/* =====================================================================
   Sections: Today, Work, Notebook, Help, Calendar, News, People.
   Subject colours arrive as --sc on each element (see js/sched.js).
   ===================================================================== */

/* ============================== TODAY ============================== */
.today-hero{
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(330px, .92fr);
  gap: 24px;
  align-items: stretch;
}
.today-hero:has(> .now-card.blk-off){ grid-template-columns: minmax(0, 1fr); }
.th-main{ padding: 10px 2px 2px; display: flex; flex-direction: column; min-width: 0; }
.th-date{ display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--ink-2); font-weight: 650; font-size: 1rem; }
.th-flag{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  background: var(--now-soft);
  color: var(--now-ink);
  font-size: .8rem;
  font-weight: 800;
}
.th-flag .ic{ width: 15px; height: 15px; }
.th-day{
  font-size: clamp(4.2rem, 9.6vw, 7.6rem);
  font-weight: 800;
  letter-spacing: -.055em;
  line-height: .9;
  margin: 10px 0 12px -4px;
  color: var(--ink);
  text-wrap: nowrap;
}
.th-day .w{ display: inline-block; }
.th-day .ch{
  display: inline-block;
  animation: chIn .7s var(--ease-out) both;
  animation-delay: calc(var(--i) * 45ms);
}
@keyframes chIn{ from{ opacity: 0; transform: translateY(.3em) rotate(4deg); filter: blur(4px); } }
/* the day number sits in a clean badge in the school colours */
.th-day .num{
  position: relative;
  display: inline-grid;
  place-items: center;
  width: .98em;
  height: .98em;
  margin-left: .14em;
  vertical-align: .03em;
  border-radius: .3em;
  background: linear-gradient(145deg, var(--brand) 0%, color-mix(in srgb, var(--brand) 55%, var(--now)) 100%);
  color: #fff;
  font-size: .8em;
  letter-spacing: -.04em;
  line-height: 1;
  box-shadow:
    0 .06em 0 color-mix(in srgb, var(--brand) 60%, #000),
    0 .18em .45em -.1em color-mix(in srgb, var(--brand) 55%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, .25);
  transform: rotate(-4deg);
  animation: numIn .8s .25s cubic-bezier(.34, 1.56, .64, 1) both;
}
.th-day .num .ch{ animation: none; transform: translateY(.02em); }
/* a soft ring ripples out once when the page opens */
.th-day .num::after{
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--now) 55%, transparent);
  animation: numRing 1.4s .9s ease-out both;
  pointer-events: none;
}
@keyframes numIn{ from{ opacity: 0; transform: rotate(-24deg) scale(.4); } }
@keyframes numRing{ from{ box-shadow: 0 0 0 0 color-mix(in srgb, var(--now) 55%, transparent); } to{ box-shadow: 0 0 0 .22em transparent; } }
.th-sub{ margin: 0; max-width: 46ch; color: var(--ink-2); font-size: 1.1rem; line-height: 1.5; }
.th-stats{ display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 18px; }
.stat{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px 9px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--sh-1);
  min-width: 0;
  text-align: left;
  color: var(--ink);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), border-color var(--t) var(--ease);
}
button.stat:hover{ transform: translateY(-2px); box-shadow: var(--sh-2); border-color: var(--line-strong); }
.stat .si{
  width: 34px; height: 34px;
  flex: none;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--surface-3);
  color: var(--ink-2);
}
.stat .si .ic{ width: 18px; height: 18px; }
.stat b{ display: block; font-size: .95rem; font-weight: 750; line-height: 1.2; }
.stat small{ display: block; font-size: .76rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.stat.hot .si{ background: var(--now-soft); color: var(--now-ink); }
.stat.bad .si{ background: var(--bad-soft); color: var(--bad); }
.stat.info .si{ background: var(--info-soft); color: var(--info-ink); }
.stat.good .si{ background: var(--good-soft); color: var(--good); }

/* the "right now" card */
.now-card{
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 20px 22px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--sh-2);
}
.now-card::before{
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 6px;
  background: var(--sc, var(--brand));
}
.now-card.live{ border-color: var(--now-line); }
.nc-top{ display: flex; align-items: center; gap: 8px; font-size: .82rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.nc-top .live-dot{
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--now);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--now) 55%, transparent);
  animation: livePulse 1.8s ease-out infinite;
}
@keyframes livePulse{ 70%{ box-shadow: 0 0 0 9px transparent; } 100%{ box-shadow: 0 0 0 0 transparent; } }
.nc-top .grow{ flex: 1; }
.nc-body{ flex: 1; display: flex; align-items: center; gap: 18px; margin: 12px 0 16px; }
.nc-main{ flex: 1; min-width: 0; }
.nc-code{
  font-family: var(--display);
  font-size: clamp(2.4rem, 4.4vw, 3.3rem);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.nc-name{ font-size: .95rem; font-weight: 650; color: var(--ink-2); margin-top: 6px; }
.nc-meta{ font-size: .86rem; color: var(--ink-3); margin-top: 2px; }
.nc-ring{ position: relative; width: 104px; height: 104px; flex: none; }
.nc-ring svg{ width: 100%; height: 100%; transform: rotate(-90deg); }
.nc-ring circle{ fill: none; stroke-width: 8; }
.nc-ring .bg{ stroke: var(--surface-3); }
.nc-ring .fg{ stroke: var(--now); stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.nc-ring .lbl{
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.05;
}
.nc-ring .lbl b{ font-family: var(--mono); font-size: 1.12rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.nc-ring .lbl small{ font-size: .7rem; color: var(--ink-3); font-weight: 650; }
.nc-next{
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px dashed var(--line-strong);
  font-size: .9rem;
  color: var(--ink-2);
}
.nc-next .hand{ font-size: 1.3rem; color: var(--now-ink); line-height: 1; }
.nc-next b{ color: var(--ink); }
.nc-quiet{ display: flex; flex-direction: column; justify-content: center; flex: 1; gap: 6px; }
.nc-quiet .big{ font-family: var(--display); font-size: 1.9rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
.nc-quiet p{ color: var(--ink-2); margin: 0; }
.nc-tmrw{ display: flex; flex-wrap: wrap; gap: 6px; padding-top: 14px; border-top: 1px dashed var(--line-strong); }
.nc-tmrw span{
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: .8rem;
  font-weight: 800;
  background: color-mix(in srgb, var(--sc) 13%, var(--surface));
  color: color-mix(in srgb, var(--sc) 78%, var(--ink));
}

/* the day as a ruler */
.timeline-card .card-head{ align-items: center; }
.tl-legend{ font-size: .86rem; color: var(--ink-3); font-weight: 600; text-align: right; }
.tl-legend b{ color: var(--ink); font-family: var(--mono); font-weight: 600; }
.ruler{ position: relative; padding-bottom: 6px; }
.rl-blocks{ position: relative; height: 112px; }
.rl-block{
  position: absolute;
  top: 0;
  bottom: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
  min-width: 0;
  padding: 10px 10px 9px 13px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--sc) 11%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--sc) 24%, var(--line));
  overflow: hidden;
  text-align: left;
  color: var(--ink);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), opacity var(--t) var(--ease);
  animation: blockIn .55s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 60ms);
}
.rl-block::before{
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--sc);
}
@keyframes blockIn{ from{ opacity: 0; transform: translateY(10px) scale(.97); } }
.rl-block:hover{ transform: translateY(-3px); box-shadow: var(--sh-2); z-index: 2; }
.rl-block .rb-t{ font-family: var(--mono); font-size: .72rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rl-block .rb-c{ font-family: var(--display); font-weight: 800; font-size: 1.28rem; letter-spacing: -.02em; line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rl-block .rb-m{ font-size: .76rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* finished sessions step back in colour, not in legibility */
.rl-block.past{ opacity: .85; filter: saturate(.35); }
.rl-block.past .rb-t, .rl-block.past .rb-m{ color: var(--ink-2); }
.rl-block.past .rb-c{ text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: color-mix(in srgb, var(--ink) 35%, transparent); }
.rl-block.now{
  background: var(--now-soft);
  border-color: var(--now);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--now) 22%, transparent), var(--sh-2);
}
.rl-block.now .rb-t{ color: var(--now-ink); font-weight: 700; }
.rl-gap{
  position: absolute;
  top: 34px;
  display: flex;
  justify-content: center;
  font-family: var(--hand);
  font-size: 1.05rem;
  color: var(--ink-3);
  pointer-events: none;
}
.rl-scale{
  position: relative;
  height: 38px;
  border-radius: 8px;
  background:
    repeating-linear-gradient(90deg, var(--ink-4) 0 1px, transparent 1px calc(var(--m5) )) 0 0 / 100% 9px no-repeat,
    repeating-linear-gradient(90deg, var(--ink-3) 0 1.5px, transparent 1.5px calc(var(--m30))) 0 0 / 100% 16px no-repeat,
    color-mix(in srgb, var(--surface-3) 70%, var(--surface));
  border: 1px solid var(--line);
  overflow: hidden;
}
.rl-fill{
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: var(--p, 0%);
  background: linear-gradient(90deg, color-mix(in srgb, var(--now) 10%, transparent), color-mix(in srgb, var(--now) 24%, transparent));
  transition: width 1s linear;
}
.rl-lab{
  position: absolute;
  bottom: 4px;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: .68rem;
  color: var(--ink-3);
  white-space: nowrap;
}
.rl-lab.first{ transform: none; left: 6px !important; }
.rl-now{
  position: absolute;
  top: -6px;
  bottom: -2px;
  width: 0;
  z-index: 3;
  pointer-events: none;
  transition: left 1s linear;
}
.rl-now::before{
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: -1px;
  width: 2px;
  background: var(--now);
  border-radius: 2px;
}
.rl-now::after{
  content: "";
  position: absolute;
  bottom: -2px;
  left: -7px;
  border: 7px solid transparent;
  border-bottom: 9px solid var(--now);
}
.rl-now span{
  position: absolute;
  top: -24px;
  left: 6px;
  font-family: var(--hand);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--now-ink);
  white-space: nowrap;
  transform: rotate(-4deg);
}
.rl-end{
  position: absolute;
  right: 0;
  top: -2px;
  font-size: .72rem;
  font-weight: 700;
  color: var(--ink-3);
}

/* the dashboard row under the timeline */
.bento{
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 18px;
}
.bento > .due-card{ flex: 1.12 1 300px; }
.bento > .peek-card{ flex: 1 1 300px; }
.bento > .quick-card{ flex: .82 1 260px; }

/* due soon, as tear-off calendar pages */
.due-list{ display: flex; flex-direction: column; gap: 4px; }
.due-row{
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 8px;
  border: 0;
  border-radius: 12px;
  background: none;
  text-align: left;
  color: var(--ink);
  transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.due-row:hover{ background: var(--surface-2); }
.due-row:active{ transform: scale(.99); }
.dd{
  flex: none;
  width: 46px;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: 9px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  box-shadow: 0 2px 0 var(--line);
}
.dd span{
  width: 100%;
  padding: 2px 0 1px;
  background: var(--brand);
  color: var(--on-brand);
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-align: center;
}
.dd b{ font-family: var(--display); font-size: 1.3rem; line-height: 1.35; font-weight: 800; }
.due-row.hot .dd span{ background: color-mix(in srgb, var(--now) 64%, #000); color: #fff; }
.due-row.bad .dd span{ background: color-mix(in srgb, var(--bad) 72%, #000); color: #fff; }
.dt{ min-width: 0; flex: 1; }
.dt strong{ display: block; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dt small{ display: block; font-size: .8rem; color: var(--ink-3); }
.due-row.bad .dt small{ color: var(--bad); font-weight: 650; }
.due-row.hot .dt small{ color: var(--now-ink); font-weight: 650; }
.due-empty{ display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 6px 4px; }
.due-empty .hand{ font-size: 1.6rem; color: var(--good); line-height: 1; }

/* class chat preview */
.peek-card{ display: flex; flex-direction: column; }
.peek-list{ display: flex; flex-direction: column; justify-content: flex-end; gap: 12px; flex: 1; min-height: 120px; }
.peek-list:has(.peek-empty){ justify-content: center; align-items: flex-start; }
.peek-row{ display: flex; gap: 10px; align-items: flex-start; animation: peekIn .4s var(--ease-out) both; }
@keyframes peekIn{ from{ opacity: 0; transform: translateY(6px); } }
.peek-row .pr-b{ min-width: 0; flex: 1; }
.peek-row .pr-n{ display: flex; gap: 6px; align-items: baseline; font-size: .82rem; font-weight: 750; }
.peek-row .pr-n time{ font-weight: 500; color: var(--ink-3); font-size: .74rem; }
.peek-row .pr-t{ font-size: .88rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.peek-empty{ color: var(--ink-3); font-size: .9rem; padding: 10px 0; }
.peek-compose{ display: flex; gap: 8px; margin-top: 14px; }
.peek-compose input{ min-height: 40px !important; border-radius: var(--r-pill) !important; padding: 8px 15px !important; font-size: .9rem !important; }
.peek-compose .icon-btn{ border-radius: 50%; flex: none; }

/* quick launch */
.quick-card{ display: flex; flex-direction: column; }
.quick-grid{ flex: 1; display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); align-content: center; gap: 10px 4px; }
.quick-cell{ position: relative; }
.quick{
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  width: 100%;
  padding: 8px 2px;
  border: 0;
  border-radius: 14px;
  background: none;
  color: var(--ink-2);
  text-decoration: none;
  font-size: .78rem;
  font-weight: 650;
  transition: background var(--t-fast) var(--ease);
}
.quick:hover{ background: var(--surface-2); color: var(--ink); }
.quick .qi{
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: color-mix(in srgb, var(--q, var(--brand)) 13%, var(--surface));
  color: var(--q, var(--brand));
  border: 1px solid color-mix(in srgb, var(--q, var(--brand)) 22%, transparent);
  transition: transform var(--t) var(--spring), box-shadow var(--t) var(--ease);
}
.quick .qi svg{ width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.quick .qi b{ font-family: var(--display); font-size: 1.2rem; }
.quick:hover .qi{ transform: translateY(-3px) rotate(-4deg); box-shadow: 0 8px 16px -10px var(--q, var(--brand)); }
.quick.add .qi{ background: transparent; border: 1.5px dashed var(--line-strong); color: var(--ink-3); }
.qx{
  position: absolute;
  top: 0; right: 6px;
  width: 22px; height: 22px;
  display: none;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: var(--surface);
  font-size: .9rem;
  line-height: 1;
}
.quick-grid.editing .qx{ display: grid; }
.quick-grid.editing .quick-cell .quick{ animation: wiggle .35s ease-in-out infinite alternate; }
.quick-grid.editing .quick-cell:nth-child(even) .quick{ animation-delay: -.17s; }
@keyframes wiggle{ from{ transform: rotate(-1.6deg); } to{ transform: rotate(1.6deg); } }

/* pack your bag for the next school day */
.next-card{ margin: 0; }
.nd-head{ display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.nd-kicker{ display: block; font-size: 1.3rem; color: var(--now-ink); line-height: 1; transform: rotate(-2deg); transform-origin: left; }
.nd-head h2{ font-size: 1.4rem; margin-top: 2px; }
.nd-row{ display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 10px; }
.nd-slot{
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 11px 12px 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  position: relative;
  overflow: hidden;
}
.nd-slot::before{ content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--sc); }
.nd-n{ font-family: var(--mono); font-size: .7rem; color: var(--ink-3); }
.nd-c{ font-family: var(--display); font-weight: 800; font-size: 1.15rem; }
.nd-r{ font-size: .78rem; color: var(--ink-2); }

/* reference: timetable, bells, legend */
.ref-grid{ display: contents; }
.ref-grid > *, .bento > *, .today-hero > *, .news-grid > *{ min-width: 0; }
.sched-scroll{ overflow-x: auto; margin: 0 -22px; padding: 0 22px 4px; }
table.sched{ width: 100%; min-width: 760px; border-collapse: separate; border-spacing: 5px; }
table.sched th{
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 600;
  color: var(--ink-3);
  text-align: left;
  padding: 2px 8px 6px;
  white-space: nowrap;
}
table.sched td{
  vertical-align: top;
  padding: 9px 10px 8px 12px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--sc, var(--brand)) 8%, var(--surface));
  position: relative;
  overflow: hidden;
}
table.sched td:not(.daycol)::before{ content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--sc, var(--brand)); opacity: .8; }
table.sched td.empty{ background: transparent; border: 1px dashed var(--line-strong); }
table.sched td.empty::after{ content: "Free"; display: block; font-size: .72rem; font-weight: 600; color: var(--ink-4); letter-spacing: .02em; }
table.sched td.empty::before{ display: none; }
table.sched td.daycol{
  vertical-align: middle;
  background: transparent;
  font-family: var(--display);
  font-weight: 750;
  white-space: nowrap;
  padding-left: 4px;
}
table.sched td .code{ font-weight: 800; font-size: .92rem; }
table.sched td .rt{ font-size: .72rem; color: var(--ink-2); white-space: nowrap; }
table.sched tr.today td{ box-shadow: inset 0 0 0 1.5px var(--now); }
table.sched tr.today td.daycol{ box-shadow: none; }
/* the session happening right now, in the weekly grid */
table.sched td.now{
  background: color-mix(in srgb, var(--sc, var(--brand)) 20%, var(--surface));
  box-shadow: inset 0 0 0 2px var(--now), 0 8px 18px -12px var(--now);
}
table.sched td.now::after{
  content: "now";
  position: absolute;
  top: 6px; right: 7px;
  padding: 1px 7px;
  border-radius: var(--r-pill);
  background: var(--now);
  color: #fff;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .04em;
  animation: nowPulse 2s ease-in-out infinite;
}
@keyframes nowPulse{ 50%{ box-shadow: 0 0 0 4px color-mix(in srgb, var(--now) 25%, transparent); } }
table.sched tr.today td.daycol span{
  padding: 0 4px;
  margin-left: -4px;
  border-radius: 3px;
  background: linear-gradient(transparent 22%, var(--marker) 22%, var(--marker) 88%, transparent 88%);
}
.bells{ display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; align-items: start; }
.bell-col{ border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px 10px; background: var(--surface-2); }
.bell-col.today{ border-color: var(--now); background: var(--now-soft); }
.bell-head{ display: flex; justify-content: space-between; align-items: center; gap: 6px; font-weight: 800; font-size: .95rem; margin-bottom: 8px; }
.bell-row{ display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: .84rem; padding: 5px 0; border-top: 1px dashed var(--line); }
.bell-row span:last-child{ font-family: var(--mono); font-size: .74rem; color: var(--ink-2); white-space: nowrap; }
.bell-note{ margin: 12px 0 0; }
.legend-grid{ display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 4px 24px; }
.legend-item{ display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line); min-width: 0; }
.legend-item .code{
  flex: none;
  min-width: 52px;
  padding: 3px 8px;
  border-radius: 8px;
  text-align: center;
  font-weight: 800;
  font-size: .8rem;
  background: color-mix(in srgb, var(--sc, var(--brand)) 14%, var(--surface));
  color: color-mix(in srgb, var(--sc, var(--brand)) 55%, var(--ink));
}
.legend-item .def{ font-size: .86rem; color: var(--ink-2); }
.legend-item .def.placeholder{ color: var(--ink-3); font-style: italic; }
.legend-item input{ min-height: 36px !important; padding: 6px 10px !important; font-size: .86rem !important; }

/* ============================= CALENDAR ============================ */
.cal-card{ padding: 16px; }
.cal-grid{ display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-grid.dow{ margin-bottom: 6px; }
.cal-dow{ text-align: center; font-size: .76rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); padding: 4px 0; }
.cal-cell{
  position: relative;
  min-height: 108px;
  padding: 8px 9px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid transparent;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  animation: calIn .4s var(--ease-out) both;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.cal-cell:not(.blank):hover{ transform: translateY(-2px); box-shadow: var(--sh-2); background: var(--surface); border-color: var(--line); }
@keyframes calIn{ from{ opacity: 0; transform: scale(.96); } }
.cal-cell.blank{ background: transparent; }
.cal-cell .dnum{ font-family: var(--display); font-weight: 800; font-size: 1.05rem; line-height: 1.2; width: fit-content; padding: 0 3px; }
.cal-cell .dlabel{
  width: fit-content;
  padding: 1px 7px;
  border-radius: var(--r-pill);
  background: var(--brand-soft);
  color: var(--brand-ink);
  font-size: .7rem;
  font-weight: 800;
}
.cal-cell .ev{ font-size: .72rem; line-height: 1.3; color: var(--ink-2); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cal-cell.k-holiday{ background: var(--bad-soft); }
.cal-cell.k-holiday .dnum{ color: var(--bad); }
.cal-cell.k-async{ background: var(--info-soft); }
.cal-cell.k-halfday, .cal-cell.k-quickexit, .cal-cell.k-short{ background: var(--now-soft); }
.cal-cell.is-today{ border-color: var(--now); box-shadow: 0 0 0 2px color-mix(in srgb, var(--now) 25%, transparent); background: var(--surface); }
.cal-cell.is-today .dnum{ background: linear-gradient(transparent 18%, var(--marker) 18%, var(--marker) 88%, transparent 88%); }
.cal-legend{ display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; font-size: .82rem; color: var(--ink-3); }
.cal-legend span{ display: inline-flex; align-items: center; gap: 7px; }
.cal-legend .sw{ width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.sw.k-holiday{ background: var(--bad-soft); border: 1px solid var(--bad); }
.sw.k-async{ background: var(--info-soft); border: 1px solid var(--info); }
.sw.k-short{ background: var(--now-soft); border: 1px solid var(--now); }
.sw.k-today{ background: var(--surface); border: 2px solid var(--now); }
.cal-nav .icon-btn:disabled{ opacity: .4; }

/* =============================== WORK =============================== */
.work-list{ display: flex; flex-direction: column; gap: 10px; }
.work-group{
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 2px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.05rem;
}
.work-group:first-child{ margin-top: 0; }
.work-group b{
  font-family: var(--font);
  min-width: 24px; height: 22px;
  padding: 0 7px;
  border-radius: 11px;
  background: var(--surface-3);
  color: var(--ink-2);
  font-size: .76rem;
  display: grid; place-items: center;
}
.work-group::after{ content: ""; flex: 1; height: 1px; background: var(--line); }
.work-group.bad{ color: var(--bad); } .work-group.bad b{ background: var(--bad-soft); color: var(--bad); }
.work-group.hot{ color: var(--now-ink); } .work-group.hot b{ background: var(--now-soft); color: var(--now-ink); }
.work-card{
  position: relative;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--sh-1);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), opacity var(--t) var(--ease);
}
.work-card:hover{ box-shadow: var(--sh-2); }
.work-card.overdue{ box-shadow: inset 4px 0 0 var(--bad), var(--sh-1); }
.work-card.overdue:hover{ box-shadow: inset 4px 0 0 var(--bad), var(--sh-2); }
.work-card.done{ opacity: .6; }
.work-card.done h3{ text-decoration: line-through; text-decoration-thickness: 2px; }
.work-tick{
  flex: none;
  width: 30px; height: 30px;
  margin-top: 1px;
  display: grid; place-items: center;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  color: transparent;
  transition: background var(--t) var(--ease), border-color var(--t) var(--ease), transform var(--t) var(--spring), color var(--t) var(--ease);
}
.work-tick .ic{ width: 17px; height: 17px; stroke-width: 3; }
.work-tick:hover{ border-color: var(--good); color: color-mix(in srgb, var(--good) 50%, transparent); }
.work-tick.on{ background: var(--good); border-color: var(--good); color: #fff; transform: scale(1.08); }
.work-body{ flex: 1; min-width: 0; }
.work-top{ display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.work-top h3{ font-size: 1.08rem; }
.work-subj{
  padding: 2px 8px;
  border-radius: 7px;
  font-size: .72rem;
  font-weight: 800;
  background: color-mix(in srgb, var(--sc, var(--brand)) 14%, var(--surface));
  color: color-mix(in srgb, var(--sc, var(--brand)) 60%, var(--ink));
}
.work-detail{ margin: 6px 0 0; font-size: .9rem; color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.work-meta{ display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: .84rem; color: var(--ink-3); }
.work-due, .work-src{ display: inline-flex; align-items: center; gap: 5px; }
.work-due .ic, .work-src .ic, .work-meta .linkbtn .ic{ width: 15px; height: 15px; }
.work-due.bad{ color: var(--bad); font-weight: 700; }
.work-due.hot{ color: var(--now-ink); font-weight: 700; }

/* ============================= NOTEBOOK ============================= */
.note-grid{ display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.note-card{
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 190px;
  padding: 18px 18px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box;
  box-shadow: var(--sh-1);
  text-align: left;
  color: var(--ink);
  overflow: hidden;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), border-color var(--t) var(--ease);
}
.note-card::before{
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 5px;
  background: var(--sc, var(--brand));
}
/* ruled lines behind the snippet, like an index card */
.note-card .note-snip{
  font-size: .88rem;
  color: var(--ink-2);
  line-height: 24px;
  background-image: linear-gradient(transparent 23px, var(--line) 23px);
  background-size: 100% 24px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.note-card:hover{ transform: translateY(-4px) rotate(-.4deg); box-shadow: var(--sh-3); border-color: var(--line-strong); }
.note-card:active{ transform: translateY(-1px); }
.note-card.pending{ opacity: .6; }
.note-card h3{ font-size: 1.12rem; overflow-wrap: anywhere; }
.note-top{ display: flex; gap: 6px; flex-wrap: wrap; }
.note-foot{ display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .78rem; color: var(--ink-3); padding-top: 8px; }
.note-foot .who{ display: inline-flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-thumbs{ display: flex; gap: 6px; }
.note-thumbs .nt{
  width: 54px; height: 42px;
  border-radius: 8px;
  background: var(--surface-3);
  overflow: hidden;
  flex: none;
}
.note-thumbs .nt img{ width: 100%; height: 100%; object-fit: cover; }
.note-thumbs .more{ display: grid; place-items: center; font-size: .78rem; font-weight: 800; color: var(--ink-3); }
.note-gallery{ display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 12px 0 4px; }
.note-gallery button{
  position: relative;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-3);
  aspect-ratio: 4 / 3;
}
.note-gallery img{ width: 100%; height: 100%; object-fit: cover; transition: transform var(--t) var(--ease); }
.note-gallery button:hover img{ transform: scale(1.04); }
.img-drop{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.img-chip{
  position: relative;
  width: 76px; height: 60px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface-3);
}
.img-chip img{ width: 100%; height: 100%; object-fit: cover; }
.img-chip button{
  position: absolute;
  top: 3px; right: 3px;
  width: 22px; height: 22px;
  border: 0;
  border-radius: 50%;
  background: rgba(15, 12, 25, .72);
  color: #fff;
  font-size: .9rem;
  line-height: 1;
}
.img-chip.busy::after{ content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.4), transparent) 0 0 / 200% 100%; animation: shimmer 1s linear infinite; }
.img-add{
  width: 76px; height: 60px;
  display: grid; place-items: center;
  border: 1.5px dashed var(--line-strong);
  border-radius: 10px;
  background: none;
  color: var(--ink-3);
}
.img-add:hover{ border-color: var(--brand); color: var(--brand-ink); }
.sharebox{ display: flex; gap: 8px; margin-top: 14px; }

/* ============================= HELP BOARD ============================ */
.ask-card{ margin-bottom: 18px; }
.ask-card textarea{ min-height: 84px; }
.ask-row{ display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ask-row select{ width: auto; min-width: 150px; min-height: 42px; }
.post-list{ display: flex; flex-direction: column; gap: 12px; }
.post{
  padding: 16px 18px 12px;
  border-radius: var(--r-card);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--sh-1);
  transition: box-shadow var(--t) var(--ease);
}
.post:hover{ box-shadow: var(--sh-2); }
.post.pinned{ border-color: var(--now-line); box-shadow: 0 0 0 1px var(--now-line), var(--sh-1); }
.post.resolved{ background: color-mix(in srgb, var(--good-soft) 35%, var(--surface)); }
.post.pending{ opacity: .6; }
.post-head{ display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: .82rem; color: var(--ink-3); }
.post-head .who{ display: inline-flex; align-items: center; gap: 7px; font-weight: 750; color: var(--ink); font-size: .9rem; }
.post-body{ margin: 10px 0 8px; font-size: .98rem; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
.post-actions{ display: flex; align-items: center; flex-wrap: wrap; gap: 4px 14px; }
.react-btn{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--ink-2);
  font-weight: 750;
  font-size: .84rem;
  transition: all var(--t-fast) var(--ease);
}
.react-btn .ic{ width: 16px; height: 16px; }
.react-btn:hover{ border-color: var(--now); color: var(--now-ink); }
.react-btn.on{ background: var(--now-soft); border-color: var(--now); color: var(--now-ink); }
.react-btn.on .ic{ animation: pop .4s var(--spring); }
@keyframes pop{ 50%{ transform: scale(1.35) rotate(12deg); } }
.replies{ margin-top: 12px; padding: 4px 0 2px 16px; border-left: 2px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.reply .post-body{ margin: 5px 0 0; font-size: .92rem; }
.reply-form{ display: flex; gap: 8px; align-items: flex-end; }
.reply-form textarea{ min-height: 44px; height: 44px; }

/* =============================== NEWS =============================== */
.news-grid{ display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; }
.news-grid:has(.news-side > .card:not([hidden])){ grid-template-columns: minmax(0, 1fr) 360px; }
.announce-list{ display: flex; flex-direction: column; gap: 12px; }
.announce-item{
  position: relative;
  padding: 18px 20px;
  border-radius: var(--r-card);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--sh-1);
}
.announce-item.pinned{ border-color: var(--brand-line); background: color-mix(in srgb, var(--brand-soft) 45%, var(--surface)); }
.announce-meta{ display: flex; align-items: center; gap: 10px; font-size: .8rem; color: var(--ink-3); margin-bottom: 8px; }
.announce-meta .pin{ display: inline-flex; align-items: center; gap: 4px; color: var(--brand-ink); font-weight: 800; }
.announce-meta .pin .ic{ width: 15px; height: 15px; }
.announce-text{ font-size: 1.02rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.announce-del{
  position: absolute;
  top: 14px; right: 14px;
  border: 0; background: none;
  color: var(--bad);
  font-weight: 700;
  font-size: .82rem;
}
.news-side{ display: flex; flex-direction: column; gap: 16px; position: sticky; top: calc(var(--header-h) + 16px); }

/* ============================== PEOPLE ============================== */
.people-grid{ display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.person{
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border-radius: var(--r-card);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--sh-1);
  transition: box-shadow var(--t) var(--ease), border-color var(--t) var(--ease), transform var(--t) var(--ease);
}
.person:hover{ box-shadow: var(--sh-2); }
.person.sel{ border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent); }
.person-top{ display: flex; align-items: center; gap: 13px; min-width: 0; }
.person-top .avatar{ --av: 52px; }
.person-id{ min-width: 0; flex: 1; }
.person-id b{ display: flex; align-items: center; gap: 6px; font-size: 1.02rem; font-weight: 750; }
.person-id .you{ font-size: .68rem; font-weight: 800; padding: 1px 6px; border-radius: 6px; background: var(--surface-3); color: var(--ink-2); }
.person-id .adm{ font-size: .68rem; font-weight: 800; padding: 1px 6px; border-radius: 6px; background: var(--brand-soft); color: var(--brand-ink); }
.person-id small{ display: block; font-size: .78rem; color: var(--ink-3); }
.person-mail{
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: .8rem;
  color: var(--ink-2);
  min-width: 0;
}
.person-mail span{ flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-mail.hidden-mail{ font-family: var(--font); font-style: italic; color: var(--ink-4); }
.person-actions{ display: flex; gap: 6px; }
.person-actions .btn{ flex: 1; }
.person-sel{
  position: absolute;
  top: 14px; right: 14px;
  width: 22px !important; height: 22px !important;
  cursor: pointer;
}
.select-bar{
  position: fixed;
  left: 50%;
  bottom: calc(20px + var(--bottom-h));
  z-index: var(--z-fab);
  transform: translateX(-50%);
  width: min(94vw, 720px);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 10px 18px;
  border-radius: 16px;
  background: var(--ink);
  color: var(--surface);
  box-shadow: var(--sh-pop);
  animation: barUp .35s var(--ease-out) both;
}
.select-bar .linkbtn{ color: color-mix(in srgb, var(--surface) 70%, var(--ink)); }
.select-bar .btn.ghost{ background: transparent; color: var(--surface); border-color: color-mix(in srgb, var(--surface) 30%, transparent); box-shadow: none; }
.select-bar .btn:not(.ghost){ background: var(--surface); color: var(--ink); box-shadow: none; }
#peopleSelCount{ font-weight: 750; }
@keyframes barUp{ from{ opacity: 0; transform: translate(-50%, 20px); } }

/* ============================ MAKE IT YOURS ============================ */
#tab-schedule.active{ display: flex; flex-direction: column; gap: 18px; }
html[data-density="compact"] #tab-schedule.active{ gap: 12px; }
.blk-off{ display: none !important; }
.bento.blk-empty{ display: none; }
.th-custom{ margin-left: auto; font-size: .82rem; color: var(--ink-2); }
.th-custom:hover{ opacity: 1; }

/* the little collapse / hide buttons in a card's corner */
/* they float just above the card's top edge, so they never push the heading's own links around */
.blk-tools{
  position: absolute;
  top: -15px;
  right: 16px;
  z-index: 3;
  display: flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  box-shadow: var(--sh-2);
  opacity: 0;
  transform: translateY(5px);
  pointer-events: none;
  transition: opacity var(--t-fast) var(--ease), transform var(--t) var(--spring);
}
.card:hover > .card-head .blk-tools, .card:focus-within > .card-head .blk-tools,
.card:hover > .nd-head .blk-tools, .card:focus-within > .nd-head .blk-tools{ opacity: 1; transform: none; pointer-events: auto; }
.card:hover > .card-head .blk-tools, .card:focus-within > .card-head .blk-tools{ transform: none; pointer-events: auto; }
/* on touch screens the corner buttons would crowd the headings; Customize does it all there */
@media (hover: none), (max-width: 760px){ .blk-tools{ display: none; } }
.blk-btn{
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--ink-3);
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), transform var(--t) var(--spring);
}
.blk-btn .ic{ width: 15px; height: 15px; }
.blk-btn:hover{ background: var(--surface-3); color: var(--ink); }
.blk-btn:disabled{ opacity: .3; pointer-events: none; }
.blk-min-btn .ic{ transform: rotate(90deg); transition: transform var(--t) var(--spring); }
.blk-min .blk-min-btn .ic{ transform: rotate(0deg); }
/* collapsed: only the heading row stays */
.blk-min > :not(.card-head):not(.nd-head):not(.blk-bar){ display: none !important; }
.blk-min > .card-head, .blk-min > .nd-head{ margin-bottom: 0; }
.blk-min .hint{ display: none; }

/* customize mode */
body.customizing [data-block]{
  outline: 2px dashed color-mix(in srgb, var(--brand) 45%, transparent);
  outline-offset: 4px;
  transition: outline-color var(--t) var(--ease), opacity var(--t) var(--ease);
}
body.customizing .blk-off{ display: block !important; opacity: .45; }
body.customizing .bento.blk-off, body.customizing .bento.blk-empty{ display: flex !important; }
body.customizing .blk-off > :not(.blk-bar){ display: none !important; }
body.customizing [data-block="now"].blk-off{ min-height: 0; }
body.customizing .blk-tools{ display: none; }
body.customizing .bento{ outline-offset: 10px; padding: 36px 0 0; position: relative; }
body.customizing .bento > .blk-bar{ position: absolute; top: 0; left: 0; right: 0; }
.blk-bar{
  display: flex;
  align-items: center;
  gap: 4px;
  margin: -6px -8px 12px;
  padding: 4px 6px 4px 8px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand-ink);
  font-size: .84rem;
  flex-basis: 100%;
}
.blk-bar .grow{ flex: 1; }
.blk-bar .blk-btn{ color: var(--brand-ink); }
.blk-bar .blk-btn:hover{ background: color-mix(in srgb, var(--brand) 16%, transparent); }
.blk-bar .eye.off{ color: var(--ink-4); }
.bb-grip{ display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; cursor: grab; }
.bb-grip:active{ cursor: grabbing; }
.bb-grip .ic{ width: 15px; height: 15px; }
.now-card > .blk-bar{ margin: -8px -10px 10px; }
[data-block].dragging{ opacity: .4; }
[data-block].drop-before{ box-shadow: 0 -4px 0 var(--now); }
[data-block].drop-after{ box-shadow: 0 4px 0 var(--now); }
.bento > .drop-before{ box-shadow: -4px 0 0 var(--now); }
.bento > .drop-after{ box-shadow: 4px 0 0 var(--now); }
.custom-bar{
  position: fixed;
  left: 50%;
  bottom: calc(22px + var(--bottom-h));
  z-index: var(--z-notify);
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(640px, calc(100vw - 24px));
  padding: 10px 10px 10px 16px;
  border-radius: 18px;
  background: var(--ink);
  color: var(--surface);
  box-shadow: var(--sh-pop);
  transform: translateX(-50%);
  animation: barUp .4s var(--ease-out) both;
}
.custom-bar[hidden]{ display: none; }
.custom-bar .grow{ flex: 1; }
.cb-t{ display: flex; align-items: center; gap: 10px; min-width: 0; }
.cb-t > .ic{ flex: none; }
.cb-t b{ display: block; font-size: .92rem; }
.cb-t small{ display: block; font-size: .76rem; opacity: .7; }
.custom-bar .btn.ghost{ background: transparent; color: var(--surface); border-color: color-mix(in srgb, var(--surface) 30%, transparent); box-shadow: none; }
.custom-bar .btn:not(.ghost){ background: var(--surface); color: var(--ink); box-shadow: none; }
@media (max-width: 600px){ .cb-t small{ display: none; } }

/* the dock: what's on right now, on every page but Today. It sits in the
   menu (sidebar foot on computers, top bar on phones), never over content. */
.now-dock{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  animation: dockIn .45s cubic-bezier(.34, 1.56, .64, 1) both;
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.now-dock[hidden]{ display: none; }
.now-dock:hover{ border-color: var(--brand-line); background: var(--brand-soft); }
.now-dock:focus-visible{ outline: 2.5px solid var(--info); outline-offset: 2px; }
.nd-txt{ display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.nd-txt small{ font-size: .64rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); }
.nd-txt b{ font-size: .84rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.nd-dot{ flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--now); box-shadow: 0 0 0 0 var(--now); animation: dockPulse 2s ease-out infinite; }
@keyframes dockIn{ from{ opacity: 0; transform: translateY(8px) scale(.96); } }
@keyframes dockPulse{ 0%{ box-shadow: 0 0 0 0 color-mix(in srgb, var(--now) 55%, transparent); } 100%{ box-shadow: 0 0 0 9px transparent; } }
@media (max-width: 900px){
  .now-dock{ height: 36px; padding: 0 12px 0 10px; border-radius: var(--r-pill); margin-left: auto; max-width: 46vw; }
  .nd-txt small{ display: none; }
  .now-dock:not([hidden]) + .hdr-right{ margin-left: 0; }
}
@media (max-width: 380px){ .now-dock{ max-width: 38vw; } }
@media (min-width: 901px){
  .now-dock{ flex: none; margin-top: auto; padding: 10px 12px; border-radius: 12px; }
  .now-dock:not([hidden]) ~ .hdr-right{ margin-top: 8px; }
}
@media (min-width: 901px) and (max-width: 1099px){
  .now-dock{ justify-content: center; width: 44px; height: 44px; padding: 0; }
  .now-dock .nd-txt{ display: none; }
}
@media (min-width: 901px){
  html[data-rail="on"] .now-dock{ justify-content: center; width: 44px; height: 44px; padding: 0; }
  html[data-rail="on"] .now-dock .nd-txt{ display: none; }
}

/* settings bits */
.swatches{ display: flex; gap: 8px; }
.swatch input{ position: absolute; opacity: 0; pointer-events: none; }
.swatch span{ display: block; width: 30px; height: 30px; border-radius: 50%; background: var(--sw); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .25); cursor: pointer; transition: transform var(--t) var(--spring), box-shadow var(--t-fast) var(--ease); }
.swatch:hover span{ transform: scale(1.1); }
.swatch input:checked + span{ box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--sw); }
.swatch input:focus-visible + span{ outline: 3px solid var(--sw); outline-offset: 4px; }
.set-sub{ margin: 14px 0 8px; }
.set-sub b{ display: block; font-size: .9rem; }
.set-sub small{ color: var(--ink-3); font-size: .8rem; }
.tab-toggles{ display: flex; flex-wrap: wrap; gap: 8px; }
.tt input{ position: absolute; opacity: 0; pointer-events: none; }
.tt span{ display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: var(--r-pill); font-size: .85rem; font-weight: 650; color: var(--ink-3); text-decoration: line-through; cursor: pointer; transition: all var(--t-fast) var(--ease); }
.tt input:checked + span{ background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand-ink); text-decoration: none; }
.tt input:focus-visible + span{ outline: 3px solid var(--brand); outline-offset: 2px; }
.set-hidden{ display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.set-hidden small{ color: var(--ink-3); font-size: .8rem; margin-right: 4px; }
.toast-undo{ margin-left: 8px; padding: 2px 10px; border: 0; border-radius: var(--r-pill); background: rgba(255, 255, 255, .18); color: inherit; font-weight: 800; font-size: .82rem; }

/* ========================== POLLS & FEEDBACK ========================== */
.voice-head{ display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 6px 0 12px; }
.voice-head h2{ font-size: 1.35rem; letter-spacing: -.02em; }
.voice-head .hint{ font-weight: 650; }
.fb-head{ margin-top: 34px; align-items: center; }
.seg.sm label span{ padding: 5px 12px; font-size: .82rem; }
#fbChips{ margin-bottom: 14px; }
.chip-btn .cnt{ font-size: .72rem; font-weight: 800; color: var(--ink-3); }
.chip-btn.on .cnt{ color: inherit; opacity: .75; }

/* a poll card */
.poll-grid{ display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; align-items: start; }
.poll-card{ display: flex; flex-direction: column; gap: 12px; overflow: hidden; }
.poll-card::before{
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand), var(--now));
}
.poll-card.closed::before{ background: var(--line-strong); }
.pc-top{ display: flex; align-items: center; gap: 6px; }
.pc-top .grow{ flex: 1; }
.pc-top .badge .ic{ width: 13px; height: 13px; }
.pc-q{ font-size: 1.22rem; line-height: 1.25; letter-spacing: -.015em; }
.pc-note{ margin: -4px 0 0; color: var(--ink-2); font-size: .92rem; }
.pc-opts{ display: flex; flex-direction: column; gap: 8px; }
.po-opt{
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 650;
  text-align: left;
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.po-opt:hover{ border-color: var(--brand); background: var(--brand-soft); }
.po-opt.peek{ position: relative; overflow: hidden; isolation: isolate; }
.po-opt.peek .po-t{ flex: 1; }
.po-opt.peek .po-fill{ background: color-mix(in srgb, var(--brand) 10%, transparent); }
.po-opt:active{ transform: scale(.985); }
.po-mark{
  flex: none;
  width: 20px; height: 20px;
  display: grid; place-items: center;
  border: 2px solid var(--ink-4);
  border-radius: 50%;
  color: transparent;
  transition: all var(--t-fast) var(--ease);
}
.po-mark .ic{ width: 12px; height: 12px; stroke-width: 3; }
.pc-opts[role="group"] .po-mark{ border-radius: 6px; }
.po-opt:hover .po-mark{ border-color: var(--brand); }
.po-opt[aria-checked="true"]{ border-color: var(--brand); background: var(--brand-soft); }
.po-opt[aria-checked="true"] .po-mark{ background: var(--brand); border-color: var(--brand); color: #fff; }
.po-res{
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  overflow: hidden;
  isolation: isolate;
}
.po-fill{
  position: absolute;
  inset: 0 auto 0 0;
  z-index: -1;
  width: var(--p, 0%);
  background: color-mix(in srgb, var(--brand) 16%, transparent);
  border-radius: inherit;
  animation: pollGrow .9s cubic-bezier(.16, 1, .3, 1) both;
}
@keyframes pollGrow{ from{ width: 0; } }
.po-res.lead .po-fill{ background: color-mix(in srgb, var(--now) 22%, transparent); }
.po-res.lead{ border-color: color-mix(in srgb, var(--now) 40%, var(--line)); }
.po-res.mine{ border-color: var(--brand); }
.po-res .po-t{ flex: 1; min-width: 0; font-weight: 650; }
.po-you{ display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: var(--r-pill); background: var(--brand); color: #fff; font-size: .7rem; font-weight: 800; }
.po-you .ic{ width: 11px; height: 11px; stroke-width: 3; }
.po-pct{ font-family: var(--mono); font-size: .9rem; font-variant-numeric: tabular-nums; }
.pc-foot{ display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: .8rem; color: var(--ink-3); }
.poll-card.voted:not(.closed) .pc-q::after{ content: " \2713"; color: var(--good); font-size: .9em; }
.np-opts{ display: flex; flex-direction: column; gap: 8px; margin: 6px 0 8px; }
.np-opt{ display: flex; gap: 6px; align-items: center; }
.np-opt input{ flex: 1; }
.pm-who{ display: flex; flex-direction: column; gap: 8px; margin-top: 14px; max-height: 320px; overflow: auto; }
.pm-row{ display: flex; align-items: center; gap: 10px; font-size: .9rem; }
em.opt{ font-style: normal; font-weight: 500; color: var(--ink-4); font-size: .85em; }

/* a feedback card */
.fb-list{ display: flex; flex-direction: column; gap: 12px; }
.fb-card{ display: flex; gap: 16px; align-items: flex-start; padding: 16px 20px 16px 16px; }
.fb-vote{
  flex: none;
  width: 54px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 0 7px;
  border: 1.5px solid var(--line-strong);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink-2);
  transition: all var(--t-fast) var(--ease);
}
.fb-vote .ic{ width: 18px; height: 18px; stroke-width: 2.4; transition: transform var(--t) var(--spring); }
.fb-vote b{ font-family: var(--display); font-size: 1.05rem; }
.fb-vote:hover{ border-color: var(--brand); color: var(--brand-ink); }
.fb-vote:hover .ic{ transform: translateY(-2px); }
.fb-vote.on{ background: var(--brand); border-color: var(--brand); color: #fff; }
.fb-vote.on .ic{ animation: upPop .45s var(--spring); }
@keyframes upPop{ 40%{ transform: translateY(-5px) scale(1.2); } }
.fb-main{ flex: 1; min-width: 0; }
.fb-tags{ display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.fb-k, .fb-s{ display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: var(--r-pill); font-size: .72rem; font-weight: 800; }
.fb-k .ic{ width: 12px; height: 12px; }
.k-idea .fb-k{ background: color-mix(in srgb, #C58A06 16%, var(--surface)); color: color-mix(in srgb, #C58A06 80%, var(--ink)); }
.k-flaw .fb-k{ background: var(--bad-soft); color: var(--bad); }
.k-change .fb-k{ background: var(--info-soft); color: var(--info-ink); }
.fb-s{ background: var(--surface-3); color: var(--ink-2); }
.s-planned .fb-s{ background: var(--brand-soft); color: var(--brand-ink); }
.s-doing .fb-s{ background: var(--now-soft); color: var(--now-ink); }
.s-done .fb-s{ background: var(--good-soft); color: var(--good); }
.s-no .fb-s{ background: var(--surface-3); color: var(--ink-3); text-decoration: line-through; }
.s-done, .s-no{ opacity: .78; }
.fb-title{ font-size: 1.06rem; line-height: 1.3; }
.fb-body{ margin: 4px 0 0; color: var(--ink-2); font-size: .93rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.fb-note{ display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; padding: 9px 12px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-ink); font-size: .88rem; font-weight: 600; }
.fb-note .ic{ flex: none; margin-top: 2px; }
.fb-meta{ display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; font-size: .8rem; color: var(--ink-3); }
.fb-who{ display: inline-flex; align-items: center; gap: 6px; font-weight: 650; color: var(--ink-2); }
.fb-meta .linkbtn{ font-size: .8rem; }
.fb-status{ height: 30px; padding: 0 28px 0 10px; font-size: .8rem; border-radius: 10px; }
.fb-kinds{ display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 4px; }
.fb-kind input{ position: absolute; opacity: 0; pointer-events: none; }
.fb-kind span{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  border: 1.5px solid var(--line-strong);
  border-radius: 14px;
  text-align: center;
  font-size: .84rem;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
}
.fb-kind span .ic{ width: 22px; height: 22px; }
.fb-kind:hover span{ border-color: var(--ink-4); }
.fb-kind input:checked + span{ border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); }
.fb-kind input:focus-visible + span{ outline: 3px solid var(--brand); outline-offset: 2px; }
@media (max-width: 760px){
  .poll-grid{ grid-template-columns: 1fr; }
  .fb-card{ gap: 12px; padding: 14px; }
  .fb-vote{ width: 46px; }
  .fb-kinds span{ font-size: .76rem; }
}

/* ============================ OUR CAMPUS ============================ */
/* the full-screen gallery */
.gallery{
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-sheet) + 10);
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  background: rgba(10, 7, 20, .95);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  animation: fadeIn .25s var(--ease) both;
  transition: opacity .2s var(--ease);
}
.gallery.out{ opacity: 0; }
.gl-stage{ display: grid; place-items: center; min-height: 0; padding: 60px 84px 14px; }
.gl-img{ max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 12px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.gl-img.in.from-r{ animation: glR .45s var(--ease-out); }
.gl-img.in.from-l{ animation: glL .45s var(--ease-out); }
@keyframes glR{ from{ opacity: 0; transform: translateX(34px) scale(.985); } }
@keyframes glL{ from{ opacity: 0; transform: translateX(-34px) scale(.985); } }
.gl-nav, .gl-close{
  position: absolute;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.gl-nav{ top: 50%; width: 52px; height: 52px; margin-top: -60px; }
.gl-nav.prev{ left: 18px; }
.gl-nav.next{ right: 18px; }
.gl-close{ top: 14px; right: 14px; width: 44px; height: 44px; }
.gl-nav:hover, .gl-close:hover{ background: rgba(255, 255, 255, .18); }
.gl-nav:active, .gl-close:active{ transform: scale(.94); }
.gl-nav .ic, .gl-close .ic{ width: 22px; height: 22px; }
.gl-foot{ display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; width: 100%; max-width: 1100px; margin: 0 auto; padding: 4px 28px 8px; color: rgba(255, 255, 255, .72); }
.gl-text{ display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.gl-tag{ color: #fff; font-family: var(--display); font-size: 1.2rem; letter-spacing: -.01em; }
.gl-alt{ font-size: .9rem; }
.gl-credit{ font-size: .74rem; color: rgba(255, 255, 255, .5); text-decoration: underline; text-underline-offset: 2px; }
.gl-credit:hover{ color: rgba(255, 255, 255, .8); }
.gl-count{ flex: none; font-family: var(--mono); font-size: .85rem; }
.gl-thumbs{ display: flex; justify-content: center; gap: 8px; overflow-x: auto; padding: 10px 24px 20px; scrollbar-width: none; }
.gl-thumbs::-webkit-scrollbar{ display: none; }
.gl-thumbs button{ flex: none; width: 72px; height: 48px; padding: 0; border: 2px solid transparent; border-radius: 9px; overflow: hidden; background: none; opacity: .5; transition: opacity var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease); }
.gl-thumbs button:hover{ opacity: .85; }
.gl-thumbs button[aria-selected="true"]{ opacity: 1; border-color: var(--now); }
.gl-thumbs img{ width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 760px){
  .gl-stage{ padding: 64px 10px 10px; }
  .gl-nav{ display: none; }
  .gl-foot{ padding: 4px 16px 6px; }
  .gl-alt{ display: none; }
  .gl-thumbs{ justify-content: flex-start; padding: 8px 16px calc(16px + env(safe-area-inset-bottom)); }
}

/* ============================ RESPONSIVE ============================ */
@media (max-width: 1100px){
  .quick-grid{ grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); }
}
@media (max-width: 900px){
  .today-hero{ grid-template-columns: 1fr; gap: 16px; }
  .th-day{ font-size: clamp(3.6rem, 18vw, 5.6rem); }
  .th-stats{ padding-top: 14px; }
  .news-grid:has(.news-side > .card:not([hidden])){ grid-template-columns: 1fr; }
  .news-side{ position: static; order: -1; }
}
@media (max-width: 760px){
  .bento > *{ flex-basis: 100%; }
  .card{ padding: 16px; }
  .sched-scroll{ margin: 0 -16px; padding: 0 16px 4px; }
  /* the ruler turns into a list you read top to bottom */
  .rl-blocks{ height: auto; display: flex; flex-direction: column; gap: 8px; }
  .rl-block{
    position: relative !important;
    left: auto !important;
    width: auto !important;
    top: auto; bottom: auto;
    display: grid;
    grid-template-columns: 92px 1fr;
    grid-template-rows: auto auto;
    column-gap: 10px;
    row-gap: 0;
    padding: 10px 12px 10px 14px;
  }
  .rl-block .rb-t{ grid-row: 1 / 3; align-self: center; font-size: .76rem; white-space: normal; }
  .rl-block .rb-c{ font-size: 1.15rem; }
  .rl-gap{ position: relative; left: auto !important; width: auto !important; top: auto; justify-content: flex-start; padding-left: 104px; font-size: 1rem; margin: -4px 0; }
  .rl-scale, .rl-now, .rl-end{ display: none; }
  .tl-legend{ text-align: left; }
  .timeline-card .card-head{ flex-direction: column; align-items: flex-start; gap: 6px; }
  .cal-card{ padding: 10px; }
  .cal-grid{ gap: 4px; }
  .cal-cell{ min-height: 64px; padding: 5px; border-radius: 9px; }
  .cal-cell .ev{ display: none; }
  .cal-cell .dlabel{ font-size: .6rem; padding: 0 5px; }
  .cal-dow{ font-size: .66rem; }
  .ask-row .grow{ flex-basis: 100%; order: 3; }
  .ask-row .btn{ margin-left: auto; }
  .work-card{ padding: 14px; gap: 12px; }
  .note-grid{ grid-template-columns: 1fr; }
  .people-grid{ grid-template-columns: 1fr; }
  .select-bar{ flex-wrap: wrap; }
  .select-bar .grow{ display: none; }
}
@media (max-width: 600px){
  .bells{ display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 0 16px 6px; gap: 10px; scrollbar-width: none; }
  .bells::-webkit-scrollbar{ display: none; }
  .bell-col{ flex: 0 0 min(84%, 320px); scroll-snap-align: start; }
  .th-stats{ flex-wrap: nowrap; overflow-x: auto; margin: 0 -14px; padding: 14px 14px 4px; scrollbar-width: none; }
  .th-stats::-webkit-scrollbar{ display: none; }
  .stat{ flex: none; }
}
@media (max-width: 420px){
  .nc-ring{ width: 88px; height: 88px; }
  .stat small{ max-width: 150px; }
}

/* =========================================================
   v3.2: tabbed Settings, theme tiles, staff tools, roles
   ========================================================= */
.sheet .box.settings-box{ width: min(100%, 880px); padding: 0; display: flex; flex-direction: column; overflow: hidden; height: min(88dvh, 720px); }
.settings-box > .sheet-head{ padding: 20px 24px 14px; margin: 0; border-bottom: 1px solid var(--line); }
.set-wrap{ display: grid; grid-template-columns: 196px 1fr; min-height: 0; flex: 1; }
.set-nav{ display: flex; flex-direction: column; gap: 2px; padding: 12px 10px; border-right: 1px solid var(--line); background: var(--surface-2, transparent); overflow-y: auto; }
.set-nav button{ display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; color: var(--ink-2); font: inherit; font-size: .9rem; font-weight: 650; text-align: left; cursor: pointer; transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.set-nav button .ic{ width: 18px; height: 18px; flex: none; }
.set-nav button:hover{ background: var(--surface-3); color: var(--ink); }
.set-nav button.on{ background: var(--brand-soft); color: var(--brand-ink); }
.set-nav button:focus-visible{ outline: 2.5px solid var(--info); outline-offset: -2px; }
.set-panes{ overflow-y: auto; overscroll-behavior: contain; padding: 6px 24px 24px; min-height: 0; }
.set-pane{ animation: fadeIn .18s var(--ease) both; }

.tiles{ display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.tile{ position: relative; display: flex; flex-direction: column; gap: 7px; padding: 6px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); cursor: pointer; transition: border-color var(--t-fast) var(--ease), transform var(--t) var(--spring), box-shadow var(--t-fast) var(--ease); }
.tile:hover{ transform: translateY(-2px); box-shadow: var(--sh-1); }
.tile input{ position: absolute; opacity: 0; pointer-events: none; }
.tile-pic{ display: block; height: 62px; border-radius: 9px; background-size: cover !important; background-position: center !important; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.themes .tile-pic{ height: 70px; }
.tile-t{ display: block; padding: 0 4px 3px; min-width: 0; }
.tile-t b{ display: block; font-size: .84rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-t small{ display: block; font-size: .74rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile:has(input:checked){ border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand); }
.tile:has(input:checked)::after{ content: ""; position: absolute; top: 11px; right: 11px; width: 18px; height: 18px; border-radius: 50%; background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 12px no-repeat; box-shadow: 0 0 0 2px var(--surface); }
.tile:has(input:focus-visible){ outline: 2.5px solid var(--info); outline-offset: 2px; }

.staff-grid{ display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.staff-card{ display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; row-gap: 2px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: border-color var(--t-fast) var(--ease), transform var(--t) var(--spring), box-shadow var(--t-fast) var(--ease); }
.staff-card .ic{ grid-row: span 2; width: 38px; height: 38px; padding: 9px; border-radius: 11px; background: var(--brand-soft); color: var(--brand-ink); }
.staff-card b{ font-size: .92rem; }
.staff-card small{ font-size: .78rem; color: var(--ink-3); line-height: 1.35; }
.staff-card:hover{ border-color: var(--brand-line); transform: translateY(-2px); box-shadow: var(--sh-1); }

/* role badges: chat, People, Help, News, Settings */
.role-badge{ display: inline-flex; align-items: center; height: 18px; padding: 0 7px; margin-left: 5px; border-radius: 999px; font-size: .66rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; line-height: 1; vertical-align: middle; white-space: nowrap; border: 1px solid transparent; }
.role-badge.r-owner{ background: linear-gradient(135deg, #F4C24D, #E2892B); color: #3A2200; }
.role-badge.r-admin{ background: var(--brand); color: #fff; }
.role-badge.r-teacher{ background: #E3F3EA; color: #16633D; border-color: #BFE3CF; }
.role-badge.r-mod{ background: #E6EEFA; color: #1A4FA0; border-color: #C4D6F2; }
:root[data-theme="dark"] .role-badge.r-teacher{ background: #16302A; color: #8FDCB3; border-color: #25513F; }
:root[data-theme="dark"] .role-badge.r-mod{ background: #1C2A42; color: #9EC2F7; border-color: #2E4468; }
.mem-legend .role-badge{ margin-left: 0; }
.ann-by{ color: var(--ink-3); }
.ann-by b{ color: var(--ink-2); font-weight: 700; }

/* members and roles (admins) */
.sheet .box.members-box{ width: min(100%, 780px); }
.mem-search{ margin-top: 14px; width: 100%; }
.mem-legend{ display: flex; flex-wrap: wrap; align-items: center; gap: 6px 4px; margin: 10px 0 6px; font-size: .8rem; color: var(--ink-3); }
.mem-list{ display: flex; flex-direction: column; }
.mem-row{ display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 10px 2px; border-top: 1px solid var(--line); }
.mem-row:first-child{ border-top: 0; }
.mem-mid{ min-width: 0; }
.mem-name{ display: flex; align-items: center; gap: 6px; }
.mem-name input{ min-height: 34px; padding: 4px 10px; font-weight: 700; font-size: .92rem; border-color: transparent; background: transparent; }
.mem-name input:hover{ border-color: var(--line); }
.mem-name input:focus{ border-color: var(--brand); background: var(--surface); }
.mem-mid small{ display: block; padding-left: 11px; font-size: .76rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mem-ctl{ display: flex; align-items: center; gap: 6px; }
.mem-ctl select{ min-height: 36px; padding-top: 4px; padding-bottom: 4px; font-size: .86rem; width: auto; min-width: 110px; }
.mem-ctl .icon-btn.on{ color: var(--brand-ink); background: var(--brand-soft); }

@media (max-width: 720px){
  .sheet .box.settings-box{ height: 92dvh; }
  .set-wrap{ grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .set-nav{ flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px 10px; scrollbar-width: none; }
  .set-nav::-webkit-scrollbar{ display: none; }
  .set-nav button{ flex: none; min-height: 36px; padding: 0 11px; font-size: .84rem; }
  .set-panes{ padding: 4px 16px 20px; }
  .settings-box > .sheet-head{ padding: 18px 16px 12px; }
  .tiles{ grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
  .mem-row{ grid-template-columns: auto 1fr; }
  .mem-ctl{ grid-column: 2; }
}
.fix-facts{ display: grid; grid-template-columns: auto 1fr; gap: 7px 18px; font-size: .88rem; }
.fix-facts span{ color: var(--ink-3); }
.fix-facts b{ font-weight: 650; min-width: 0; overflow-wrap: anywhere; }
.fix-errs{ margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.fix-errs > div{ padding: 9px 12px; border-radius: 10px; background: color-mix(in srgb, var(--bad, #C62828) 8%, var(--surface)); border: 1px solid color-mix(in srgb, var(--bad, #C62828) 22%, transparent); }
.fix-errs b{ display: block; font-size: .8rem; }
.fix-errs small{ display: block; font-size: .78rem; color: var(--ink-3); overflow-wrap: anywhere; }
/* staff stand out a little in People */
.person.staff{ border-color: color-mix(in srgb, var(--rc, var(--brand)) 45%, var(--line)); box-shadow: inset 0 3px 0 var(--rc, var(--brand)); }
.person.r-owner{ --rc: #E2A12B; }
.person.r-admin{ --rc: var(--brand); }
.person.r-teacher{ --rc: #1E9E62; }
.person.r-mod{ --rc: #2F6FD6; }
.verify-note{ margin-top: 8px; padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--warn, #C58A06) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--warn, #C58A06) 30%, transparent); }
.verify-note b{ display: block; font-size: .92rem; }
.verify-note small{ display: block; margin: 3px 0 10px; color: var(--ink-3); font-size: .82rem; line-height: 1.45; }

/* =========================================================
   v3.3 polish: readable text over the campus photos
   ========================================================= */
/* fine print that sits on the page, not in a card, gets a pane of its own */
html.campus-on .trust{
  width: fit-content;
  padding: 10px 14px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--ink-2);
}
/* empty lists read as a solid card, so a busy photo can't show through */
html.campus-on .empty-state, html.campus-on .empty{
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
html.lite.campus-on .trust, html.lite.campus-on .empty-state, html.lite.campus-on .empty{ background: var(--surface); }

/* hero chips share the row evenly, so one never dangles on its own line */
@media (min-width: 761px){ .th-stats .stat{ flex: 1 1 auto; } }
:root[data-theme="dark"] .brand-txt b{ color: var(--ink); }
@media (prefers-color-scheme: dark){ :root:not([data-theme="light"]) .brand-txt b{ color: var(--ink); } }

/* phones: filter chips stay on one line and swipe sideways, so the list
   itself starts near the top instead of under three rows of subjects */
@media (max-width: 760px){
  .chip-row{
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    margin-left: -14px;
    margin-right: -14px;
    padding: 2px 14px;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 22px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 22px), transparent 100%);
  }
  .chip-row::-webkit-scrollbar{ display: none; }
  .chip-row .chip-btn{ flex: none; }
  .toolbar > .chip-row{ flex: 1 1 100%; min-width: 0; }
}
@media (max-width: 900px){ .topbar-inner:has(.now-dock:not([hidden])) .brand-txt{ display: none; } }

/* =========================================================
   v3.3: the app layer (install, share, reminders)
   ========================================================= */
.side-install{ display: none; }
@media (min-width: 901px){
  .side-install:not([hidden]){
    display: flex; align-items: center; gap: 12px; flex: none;
    height: 38px; margin-top: 10px; padding: 0 12px;
    border: 1px dashed var(--brand-line); border-radius: 10px;
    background: transparent; color: var(--brand-ink);
    font: inherit; font-size: .88rem; font-weight: 700; cursor: pointer;
    transition: background var(--t-fast) var(--ease);
  }
  .side-install:hover{ background: var(--brand-soft); }
  .side-install .ic{ width: 18px; height: 18px; }
  html[data-rail="on"] .side-install{ width: 48px; padding: 0; justify-content: center; align-self: center; }
  html[data-rail="on"] .side-install .lbl{ display: none; }
}
@media (min-width: 901px) and (max-width: 1099px){
  .side-install{ width: 48px; padding: 0 !important; justify-content: center; align-self: center; }
  .side-install .lbl{ display: none; }
}
.howto{ margin: 14px 0 4px; padding-left: 22px; display: grid; gap: 10px; line-height: 1.5; }
.share-preview{ margin: 14px 0; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); max-height: 160px; overflow: auto; }
.share-preview b{ display: block; margin-bottom: 4px; }
.share-preview p{ margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .9rem; color: var(--ink-2); }
.share-go{ display: grid; gap: 10px; }
/* the one-time "get the Android app" suggestion */
.apk-bar{
  position: fixed; left: 12px; right: 12px;
  bottom: calc(var(--bottom-h, 64px) + 12px + env(safe-area-inset-bottom));
  z-index: var(--z-fab);
  display: flex; align-items: center; gap: 12px;
  padding: 10px 10px 10px 12px;
  border: 1px solid var(--line); border-radius: 18px;
  background: var(--surface); box-shadow: var(--sh-pop);
  animation: dockIn .45s cubic-bezier(.34, 1.56, .64, 1) both;
}
.apk-bar img{ flex: none; border-radius: 10px; }
.apk-bar span{ flex: 1; min-width: 0; line-height: 1.3; }
.apk-bar b{ display: block; font-size: .92rem; }
.apk-bar small{ display: block; font-size: .78rem; color: var(--ink-3); }
.apk-bar .btn{ flex: none; }
a.more-item{ text-decoration: none; color: inherit; }
