/* ============================================================
   NextClass · AUI — styles
   Concept: a departures board for classes. Dark board surfaces for
   what is live (hero, next up, headers), paper for what you work on.
   Type: Archivo (condensed for signage, normal for reading)
         + Martian Mono for tiles, times and codes.
   Motion: strong ease-out, UI under 300ms, press feedback everywhere.
   ============================================================ */

:root {
  /* board */
  --board: #0E1D18;
  --board-2: #142822;
  --board-3: #213D33;
  --board-line: rgba(242, 239, 230, .1);
  --board-text: #F2EFE6;
  --board-muted: #9DB0A5;
  /* signal colours */
  --signal: #F0B33C;
  --signal-2: #FFC65A;
  --signal-ink: #16120A;
  --now: #F0603F;
  --ok: #8FC9A6;
  /* paper */
  --paper: #F1ECE1;
  --paper-2: #E6DFD0;
  --paper-3: #D9D0BC;
  --snow: #FBF8F1;
  --ink: #0E1D18;
  --ink-2: #35443D;
  --muted: #66756D;
  --line: rgba(14, 29, 24, .12);
  --line-2: rgba(14, 29, 24, .24);
  --hi: rgba(255, 255, 255, .55);
  --amber-edge: #D9A441;
  --r-xl: 18px; --r-lg: 14px; --r-md: 10px; --r-sm: 6px;
  --shadow-1: 0 1px 2px rgba(14, 29, 24, .05), 0 8px 24px -14px rgba(14, 29, 24, .25);
  --shadow-2: 0 2px 6px rgba(14, 29, 24, .07), 0 24px 48px -20px rgba(14, 29, 24, .35);
  --font: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'Martian Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-in-out: cubic-bezier(.77, 0, .175, 1);
  --ease-drawer: cubic-bezier(.32, .72, 0, 1);
  --ease: var(--ease-out);
  --hour-h: 64px;
  --z-sticky: 20; --z-sheet: 40; --z-toast: 50; --z-grain: 60;
}

/* course colours: tinted card + dark ink (all ≥ 7:1) + saturated edge */
.c-moss  { --c-bg: #DBE8D1; --c-ink: #1C4A2C; --c-line: #6E9E7C; }
.c-clay  { --c-bg: #F6D9C8; --c-ink: #7A2F10; --c-line: #D6845C; }
.c-ochre { --c-bg: #F4E3B4; --c-ink: #634200; --c-line: #CFAA48; }
.c-plum  { --c-bg: #E8D6EC; --c-ink: #4B2859; --c-line: #A97FB7; }
.c-lake  { --c-bg: #D1E5EB; --c-ink: #134E5E; --c-line: #6FAEBE; }
.c-rose  { --c-bg: #F6D4DB; --c-ink: #7A1D37; --c-line: #D0829A; }
.c-slate { --c-bg: #D9DFEC; --c-ink: #293862; --c-line: #8798C0; }
.c-olive { --c-bg: #E4E8C2; --c-ink: #464E0B; --c-line: #A9AF5C; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16.5px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
}
/* paper grain, barely there */
body::after {
  content: ""; position: fixed; inset: 0; z-index: var(--z-grain); pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .7 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: var(--ink); text-underline-offset: 3px; transition: color 150ms ease; }
a:hover { color: var(--now); }
button { font: inherit; color: inherit; }
::selection { background: var(--signal); color: var(--signal-ink); }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ico { display: inline-flex; width: 1em; height: 1em; vertical-align: -.15em; flex: none; }
.ico svg { width: 100%; height: 100%; }
.mono { font-family: var(--mono); font-stretch: 87.5%; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.muted { color: var(--muted); }
.link { text-decoration: underline; text-underline-offset: 3px; }
[hidden] { display: none !important; }

/* signage type: condensed caps */
.display, h1, h2, h3 {
  font-family: var(--font); font-stretch: 70%; font-weight: 800; text-transform: uppercase;
  letter-spacing: .005em; line-height: .94; margin: 0;
}
h1 { font-size: clamp(54px, 6.6vw, 98px); font-stretch: 64%; line-height: .88; letter-spacing: -.005em; }
h2 { font-size: clamp(36px, 5vw, 56px); }
.eyebrow {
  display: flex; flex-wrap: wrap; gap: 0 12px; align-items: center;
  font-family: var(--mono); font-stretch: 87.5%; font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  margin: 0 0 18px; color: var(--ink-2);
}
.eyebrow span + span::before { content: "·"; margin-right: 12px; opacity: .5; }
.lede { font-size: clamp(17px, 1.6vw, 19px); line-height: 1.5; color: var(--ink-2); max-width: 52ch; margin: 22px 0 0; }
.lede strong { color: var(--ink); font-weight: 600; }
.lede-sm { color: var(--ink-2); margin: 12px 0 0; max-width: 60ch; }
.view-head { margin-bottom: 28px; }

/* ---------- topbar: a dark signage strip on every view ---------- */
.topbar {
  position: sticky; top: 0; z-index: var(--z-sticky);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  padding: 10px clamp(16px, 4vw, 40px);
  background: rgba(14, 29, 24, .86); color: var(--board-text);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--board-line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--board-text); justify-self: start; }
.brand:hover { color: var(--board-text); }
.brand-mark { width: 28px; height: 28px; border-radius: 6px; }
.brand-name { font-stretch: 75%; font-weight: 800; font-size: 20px; text-transform: uppercase; letter-spacing: .02em; }
.brand-sub { font-family: var(--mono); font-stretch: 87.5%; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--board-muted); margin-top: 3px; }
.topbar-right { display: flex; align-items: center; gap: 10px; justify-self: end; }
.tag {
  font-family: var(--mono); font-stretch: 87.5%; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap;
  color: var(--signal); border: 1px solid rgba(240, 179, 60, .45); padding: 6px 10px; border-radius: 4px;
}
.stepper { display: flex; align-items: center; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(242, 239, 230, .06); }
.step {
  display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 12px; border-radius: 999px; border: 0;
  background: transparent; color: var(--board-muted); font-family: var(--mono); font-stretch: 87.5%; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms var(--ease-out);
}
.step i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .45; transition: opacity 160ms ease, background-color 160ms ease; }
.step.is-done { color: var(--board-text); }
.step.is-done i { opacity: .8; background: var(--ok); }
.step.is-active { color: var(--signal-ink); background: var(--signal); }
.step.is-active i { background: var(--signal-ink); opacity: 1; }
.step:disabled { cursor: default; opacity: .45; }
.step:not(:disabled):active { transform: scale(.96); }

/* ---------- layout ---------- */
#app { max-width: 1160px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px) 64px; }
.view { padding-top: clamp(28px, 5vw, 56px); }
.view-upload { padding-top: 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 20px; border-radius: 8px; border: 1.5px solid transparent;
  font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms var(--ease-out), filter 160ms ease;
}
.btn:active { transform: scale(.97); }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--ink); color: var(--board-text); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); }
.btn-primary:hover { color: var(--board-text); background: var(--board-3); }
.btn-primary:disabled { background: var(--paper-3); color: var(--muted); box-shadow: none; cursor: not-allowed; }
.btn-primary:disabled:active { transform: none; }
.btn-roof { background: var(--signal); color: var(--signal-ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35); font-weight: 700; }
.btn-roof:hover { background: var(--signal-2); color: var(--signal-ink); }
.btn-ghost { background: transparent; border-color: var(--line-2); color: var(--ink); }
.btn-ghost:hover { background: var(--snow); border-color: var(--ink); color: var(--ink); }
.btn-sm { min-height: 38px; padding: 6px 14px; font-size: 14px; }
.btn-lg { min-height: 54px; padding: 12px 26px; font-size: 16px; }
.btn-icon {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line-2); background: var(--snow); cursor: pointer; color: var(--ink);
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms var(--ease-out);
}
.btn-icon:hover { background: var(--paper-2); border-color: var(--ink); }
.btn-icon:active { transform: scale(.94); }
.btn-icon svg { width: 18px; height: 18px; }

/* ============================================================
   HERO: dark board band, edge to edge
   ============================================================ */
.band {
  margin: 0 calc(50% - 50vw); padding: clamp(36px, 6vw, 80px) 0 clamp(40px, 6vw, 72px);
  background: var(--board); color: var(--board-text); position: relative; overflow: hidden;
}
.band::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(900px 420px at 88% -10%, rgba(240, 179, 60, .14), transparent 62%),
    radial-gradient(700px 400px at -10% 110%, rgba(143, 201, 166, .12), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1200' height='800' viewBox='0 0 1200 800' fill='none' stroke='%23F2EFE6' stroke-opacity='.06' stroke-width='1'%3E%3Cpath d='M-20 120c150-70 260 50 420-10s260-110 400-50 240 70 420 10'/%3E%3Cpath d='M-20 170c150-70 260 50 420-10s260-110 400-50 240 70 420 10'/%3E%3Cpath d='M-20 220c150-70 260 50 420-10s260-110 400-50 240 70 420 10'/%3E%3Cpath d='M-20 560c150-70 260 50 420-10s260-110 400-50 240 70 420 10'/%3E%3Cpath d='M-20 610c150-70 260 50 420-10s260-110 400-50 240 70 420 10'/%3E%3Cpath d='M-20 660c150-70 260 50 420-10s260-110 400-50 240 70 420 10'/%3E%3Cpath d='M560 360c80-60 180-60 260 0s80 130 0 180-190 30-260-30-80-100 0-150z'/%3E%3Cpath d='M590 375c65-45 145-45 210 0s65 100 0 140-155 25-210-22-65-80 0-118z'/%3E%3Cpath d='M620 390c50-32 110-32 160 0s50 72 0 100-120 18-160-15-50-58 0-85z'/%3E%3C/svg%3E") center / 1200px 800px;
}
.hero {
  position: relative; max-width: 1160px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .92fr); gap: clamp(28px, 5vw, 64px); align-items: start;
}
.hero .eyebrow { color: var(--signal); }
.hero h1 { color: var(--board-text); }
.hero h1 em { font-style: normal; color: var(--signal); }
.hero .lede { color: var(--board-muted); }
.hero .lede strong { color: var(--board-text); }

/* the ticket */
.ticket-wrap { margin-top: clamp(28px, 4vw, 40px); }
.ticket {
  width: 100%; display: grid; grid-template-columns: 1fr 92px; text-align: left; position: relative; overflow: hidden;
  background: var(--snow); color: var(--ink); border: 0; border-radius: 10px; padding: 0; cursor: pointer;
  -webkit-mask: radial-gradient(circle at 0 50%, transparent 11px, #000 11.5px), radial-gradient(circle at 100% 50%, transparent 11px, #000 11.5px);
  -webkit-mask-composite: source-in; mask: radial-gradient(circle at 0 50%, transparent 11px, #000 11.5px), radial-gradient(circle at 100% 50%, transparent 11px, #000 11.5px); mask-composite: intersect;
  transition: transform 200ms var(--ease-out), background-color 200ms ease;
}
.ticket::before { /* faint ticket print pattern */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .55;
  background: repeating-linear-gradient(90deg, transparent 0 22px, rgba(14, 29, 24, .035) 22px 23px);
}
.ticket-main { position: relative; display: grid; gap: 4px; padding: 20px 22px 20px 24px; min-width: 0; }
.ticket-label { display: flex; justify-content: space-between; gap: 12px; font-family: var(--mono); font-stretch: 87.5%; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.ticket-no { color: var(--ink-2); }
.dz-title { font-size: clamp(24px, 2.6vw, 30px); line-height: .96; color: var(--ink); }
.dz-title .t-over { display: none; color: var(--now); }
.ticket.is-over .t-idle { display: none; }
.ticket.is-over .t-over { display: inline; }
.dz-sub { color: var(--muted); font-size: 14.5px; margin-top: 6px; }
.dz-progress { display: block; width: 100%; height: 4px; border-radius: 999px; background: var(--paper-2); margin-top: 12px; overflow: hidden; }
.dz-bar { display: block; height: 100%; width: 100%; transform: scaleX(0); transform-origin: left; background: var(--signal); border-radius: inherit; transition: transform 320ms var(--ease-out); }
.dz-status { font-family: var(--mono); font-stretch: 87.5%; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); min-height: 1.4em; margin-top: 6px; }
.ticket-stub {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  border-left: 2px dashed var(--line-2); color: var(--ink); background: var(--paper-2);
  transition: background-color 200ms ease, color 200ms ease;
}
.ticket-stub svg { width: 28px; height: 28px; transition: transform 220ms var(--ease-out); }
.stub-text { font-family: var(--mono); font-stretch: 87.5%; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; writing-mode: vertical-rl; transform: rotate(180deg); color: var(--muted); }
.ticket.is-over { background: #FFF6E3; }
.ticket.is-over .ticket-stub { background: var(--signal); color: var(--signal-ink); }
.ticket.is-over .ticket-stub svg { transform: translateY(4px); }
.ticket:not(.is-busy):active { transform: scale(.99); }
.ticket.is-busy { cursor: progress; }
.ticket.is-busy .dz-title, .ticket.is-busy .dz-sub { opacity: .45; }
.scanline {
  position: absolute; top: 0; bottom: 0; width: 34%; left: -40%; pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(240, 179, 60, .28) 45%, rgba(240, 179, 60, .55) 50%, rgba(240, 179, 60, .28) 55%, transparent);
}
.ticket.is-busy .scanline { opacity: 1; animation: scan 1.4s linear infinite; }
@keyframes scan { to { transform: translateX(400%); } }
.dz-help { color: var(--board-muted); font-size: 14px; margin: 12px 2px 0; }
.dz-actions { margin-top: 10px; display: flex; gap: 10px; flex-wrap: wrap; }
.band .btn-ghost { border-color: rgba(242, 239, 230, .28); color: var(--board-text); }
.band .btn-ghost:hover { background: rgba(242, 239, 230, .08); border-color: var(--board-text); color: var(--board-text); }
.alert {
  margin-top: 14px; padding: 12px 14px; border-radius: var(--r-md); border-left: 4px solid var(--now);
  background: rgba(240, 96, 63, .12); color: #FFD9CF; font-size: 15px;
  animation: rise 220ms var(--ease-out) both;
}
.alert strong { display: block; color: #FFB8A6; }
.view-review .alert { background: #FBE7E1; color: #8A2E17; }

/* search (dark in the band, paper elsewhere) */
.manual { margin-top: clamp(24px, 3vw, 32px); }
.manual-label { display: block; font-family: var(--mono); font-stretch: 87.5%; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--board-muted); margin-bottom: 10px; }
.view-review .manual-label { color: var(--muted); }
.search { position: relative; }
.search-ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.search-ico svg { width: 18px; height: 18px; }
.search input {
  width: 100%; min-height: 50px; padding: 12px 14px 12px 42px; border-radius: 8px;
  border: 1.5px solid var(--line-2); background: var(--snow); font: inherit; font-size: 16px; color: var(--ink);
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}
.search input::placeholder { color: var(--muted); }
.search input:focus { outline: none; border-color: var(--signal); box-shadow: 0 0 0 4px rgba(240, 179, 60, .22); }
.band .search-ico { color: var(--board-muted); }
.band .search input { background: rgba(242, 239, 230, .06); border-color: rgba(242, 239, 230, .2); color: var(--board-text); }
.band .search input::placeholder { color: var(--board-muted); }
.band .search input:focus { background: rgba(242, 239, 230, .09); border-color: var(--signal); }
.search-list {
  position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none;
  background: var(--snow); color: var(--ink); border: 1px solid var(--line-2); border-radius: var(--r-md); box-shadow: var(--shadow-2);
  max-height: 340px; overflow: auto; transform-origin: top center;
}
.search-list.pop { animation: pop 150ms var(--ease-out) both; }
.search-list li {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px;
  padding: 9px 12px; border-radius: 6px; cursor: pointer; align-items: baseline; transition: background-color 120ms ease;
}
.search-list li .mono { font-size: 12.5px; color: var(--ink-2); grid-row: 1 / span 2; align-self: start; padding-top: 3px; }
.search-list li .sr-title { font-weight: 600; font-size: 15px; line-height: 1.3; }
.search-list li .sr-meta { font-family: var(--mono); font-stretch: 87.5%; font-size: 11.5px; color: var(--muted); letter-spacing: .02em; }
.search-list li.is-active { background: var(--paper-2); }
.search-list .sr-none { display: block; padding: 10px 12px; color: var(--muted); font-size: 14px; cursor: default; }

/* the board */
.hero-board { position: relative; }
.board {
  background: var(--board-2); border: 1px solid var(--board-line); border-radius: 12px; overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 30px 60px -30px rgba(0, 0, 0, .7);
}
.board-head {
  display: grid; grid-template-columns: auto 1fr auto auto; gap: 14px; align-items: center;
  padding: 14px 18px; border-bottom: 1px solid var(--board-line); background: rgba(0, 0, 0, .18);
}
.board-title { font-stretch: 70%; font-weight: 800; text-transform: uppercase; font-size: 22px; letter-spacing: .02em; color: var(--board-text); }
.board-day { font-family: var(--mono); font-stretch: 87.5%; font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--board-muted); }
.board-clock { font-family: var(--mono); font-stretch: 87.5%; font-size: 16px; font-weight: 600; color: var(--signal); letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.board-clock .colon { animation: blink 1s steps(2, start) infinite; }
@keyframes blink { to { opacity: .3; } }
.board-tag { font-family: var(--mono); font-stretch: 87.5%; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--board-muted); border: 1px solid var(--board-line); padding: 4px 7px; border-radius: 3px; }
.board-cols, .board-row {
  display: grid; grid-template-columns: 66px minmax(0, 1fr) 66px 42px 96px; gap: 12px; align-items: center; padding: 0 18px;
  font-family: var(--mono); font-stretch: 87.5%; font-size: 12px;
}
.board-cols { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--board-muted); padding-top: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--board-line); }
.board-rows { list-style: none; margin: 0; padding: 0; }
.board-row { min-height: 66px; padding-top: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--board-line); }
.board-row:last-child { border-bottom: 0; }
.board-row .cell { min-width: 0; }
.board-row .crs { display: grid; gap: 5px; }
.board-row .loc { display: contents; }   /* building + room fill the two columns on desktop */
.board-row .title { font-family: var(--font); font-stretch: 100%; font-size: 13.5px; color: var(--board-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: 0; }
.board-row .status { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--board-muted); display: grid; gap: 3px; line-height: 1.2; }
.board-row .st-label { display: flex; align-items: center; gap: 7px; font-weight: 600; }
.board-row .st-detail { color: var(--board-muted); font-size: 10px; letter-spacing: .06em; }
.board-row.is-next .st-label { color: var(--signal); }
.board-row.is-now .st-label { color: var(--now); }
.board-row.is-now .st-label::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--now); box-shadow: 0 0 0 3px rgba(240, 96, 63, .25); animation: pulse 1.6s ease-in-out infinite; }
.board-row.is-later .st-label { color: var(--ok); }
.board-row.is-done { opacity: .45; }
.flap { display: inline-flex; gap: 2px; }
.flap b {
  display: inline-grid; place-items: center; width: 1.28ch; height: 1.6em; border-radius: 3px; position: relative;
  background: var(--board-3); color: var(--board-text); font-weight: 500; font-size: 14px; line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 1px 0 rgba(0, 0, 0, .35);
}
.flap b::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(0, 0, 0, .5); }
.flap b.is-gap { background: transparent; box-shadow: none; width: .6ch; }
.flap b.is-gap::after { display: none; }
.board-row.is-next .time b { color: var(--signal); }
.board-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 18px 12px; font-family: var(--mono); font-stretch: 87.5%; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--board-muted); border-top: 1px solid var(--board-line); background: rgba(0, 0, 0, .12); }

/* how it works: a ruled strip on paper */
.how {
  list-style: none; margin: clamp(28px, 4vw, 44px) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2);
}
.how li { display: flex; gap: 16px; padding: 22px 22px 22px 0; align-items: flex-start; }
.how li + li { border-left: 1px solid var(--line); padding-left: 22px; }
.how-n { font-family: var(--mono); font-stretch: 87.5%; font-size: 12px; color: var(--muted); letter-spacing: .1em; padding-top: 6px; }
.how strong { display: block; font-size: 26px; margin-bottom: 4px; }
.how div span { color: var(--ink-2); font-size: 14.5px; line-height: 1.45; display: block; max-width: 30ch; }

/* ---------- review ---------- */
.review-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; align-items: start; }
.course-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.course {
  --c-bg: var(--snow); --c-ink: var(--ink); --c-line: var(--line-2);
  display: grid; grid-template-columns: 5px 1fr auto; gap: 0 16px; align-items: start;
  background: var(--snow); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 16px 16px 0;
  overflow: hidden; box-shadow: inset 0 1px 0 var(--hi);
  animation: rise 260ms var(--ease-out) both;
}
.course::before { content: ""; grid-row: 1 / -1; background: var(--c-line); align-self: stretch; }
.course.is-unmatched { background: #FFF8E8; border-color: rgba(180, 122, 10, .32); --c-line: var(--amber-edge); }
.course-body { display: grid; gap: 8px; min-width: 0; }
.course-body > * { min-width: 0; }
.course-code { font-family: var(--mono); font-stretch: 87.5%; font-size: 12.5px; color: var(--c-ink); letter-spacing: .06em; }
.course-title { font-stretch: 78%; font-weight: 700; font-size: 22px; letter-spacing: 0; line-height: 1.05; text-transform: none; }
.course-fac { color: var(--muted); font-size: 14px; }
.meeting { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; font-size: 14.5px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 5px;
  background: var(--paper-2); font-family: var(--mono); font-stretch: 87.5%; font-size: 11.5px; letter-spacing: .04em; color: var(--ink-2); white-space: nowrap;
}
.pill.loc { background: var(--c-bg); color: var(--c-ink); font-family: var(--font); font-stretch: 100%; font-weight: 600; font-size: 13px; letter-spacing: 0; }
.pill svg { width: 14px; height: 14px; }
.course-warn { color: #7A5200; font-size: 14px; font-weight: 600; display: flex; gap: 6px; align-items: center; }
.course-warn svg { width: 16px; height: 16px; flex: none; }
.sec-select { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; align-items: center; font-family: var(--mono); font-stretch: 87.5%; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); min-width: 0; }
.sec-select select {
  width: 100%; min-width: 0; text-overflow: ellipsis;
  font: inherit; font-family: var(--font); font-size: 14px; letter-spacing: 0; text-transform: none; padding: 7px 32px 7px 10px; border-radius: 6px; border: 1.5px solid var(--line-2);
  background: var(--snow) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2335443D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 14px;
  appearance: none; -webkit-appearance: none; color: var(--ink); min-height: 38px; cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.sec-select select:focus { outline: none; border-color: var(--signal); box-shadow: 0 0 0 4px rgba(240, 179, 60, .2); }
.course.is-unmatched .sec-select select { border-color: var(--amber-edge); }
.course-remove { margin-top: -4px; }
.add-course { margin-top: 24px; }
.review-side { display: grid; gap: 16px; position: sticky; top: 80px; }
.thumb { margin: 0; background: var(--snow); border: 1px solid var(--line); border-radius: var(--r-md); padding: 8px; }
.thumb canvas { width: 100%; height: auto; display: block; border-radius: 6px; }
.thumb figcaption { font-family: var(--mono); font-stretch: 87.5%; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 8px 4px 2px; }
.side-note { background: var(--paper-2); border-radius: var(--r-md); padding: 14px 16px; font-size: 14.5px; color: var(--ink); }
.side-note p { margin: 4px 0 0; color: var(--ink-2); }
.review-bar {
  position: sticky; bottom: 0; z-index: var(--z-sticky); margin-top: 28px; padding: 14px 0 max(14px, env(safe-area-inset-bottom));
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: linear-gradient(to top, var(--paper) 70%, transparent);
}

/* ---------- schedule ---------- */
.sched-top { display: flex; flex-direction: column; gap: 14px; margin-bottom: 18px; }
.next-card {
  color: var(--board-text); border-radius: 12px; padding: clamp(18px, 3vw, 26px) clamp(18px, 3vw, 28px);
  background: var(--board); border: 1px solid var(--board-line);
  position: relative; overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 30px 60px -30px rgba(0, 0, 0, .6);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center;
  animation: rise 320ms var(--ease-out) both;
}
.next-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(520px 240px at 100% 0%, rgba(240, 179, 60, .22), transparent 65%);
}
.next-card.is-now::before { background: radial-gradient(520px 240px at 100% 0%, rgba(240, 96, 63, .35), transparent 65%); }
.next-card > * { position: relative; z-index: 1; }
.next-eyebrow { font-family: var(--mono); font-stretch: 87.5%; font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--signal); margin: 0 0 10px; display: flex; gap: 8px; align-items: center; }
.next-card.is-now .next-eyebrow { color: var(--now); }
.next-eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px rgba(240, 179, 60, .22); }
.next-card.is-now .dot { animation: pulse 1.6s ease-in-out infinite; box-shadow: 0 0 0 4px rgba(240, 96, 63, .25); }
.next-title { font-stretch: 72%; font-weight: 800; text-transform: uppercase; font-size: clamp(28px, 3.6vw, 44px); line-height: .94; margin: 0; letter-spacing: .005em; }
.next-meta { margin: 12px 0 0; color: var(--board-muted); font-size: 15px; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.next-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.next-meta b { color: var(--board-text); font-weight: 600; }
.next-cta { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.next-cta .btn-ghost { border-color: rgba(242, 239, 230, .3); color: var(--board-text); }
.next-cta .btn-ghost:hover { background: rgba(242, 239, 230, .08); border-color: var(--board-text); color: var(--board-text); }
.next-empty { color: var(--board-muted); }
.sched-tools { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.tool {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 14px; border-radius: 6px;
  background: var(--snow); border: 1px solid var(--line-2); font-weight: 600; font-size: 13.5px; cursor: pointer; white-space: nowrap;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms var(--ease-out);
}
.tool:hover { background: var(--paper-2); border-color: var(--ink); }
.tool:active { transform: scale(.96); }
.tool svg { width: 16px; height: 16px; color: var(--ink-2); }
.notice {
  display: flex; gap: 10px; align-items: flex-start; margin-bottom: 16px;
  background: var(--snow); color: var(--ink-2); border: 1px solid var(--line); border-left: 4px solid var(--amber-edge);
  border-radius: var(--r-md); padding: 10px 14px; font-size: 14.5px;
}
.notice .ico { font-size: 18px; margin-top: 2px; color: #7A5200; }
.notice b { color: var(--ink); }
.link-btn { background: none; border: 0; padding: 0; cursor: pointer; color: var(--ink); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: var(--now); }
.notice .link-btn { margin-left: 4px; }

/* week grid */
.week-wrap { background: var(--snow); border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; }
.grid-scroll { overflow-x: auto; overscroll-behavior-x: contain; }
.grid { min-width: 720px; --days: 5; --hours: 12; }
.grid-head, .grid-body { display: grid; grid-template-columns: 58px repeat(var(--days), minmax(0, 1fr)); }
.grid-head { border-bottom: 1px solid var(--line-2); background: var(--board); color: var(--board-text); position: sticky; top: 0; z-index: 2; }
.dayhead { padding: 10px 10px 9px; text-align: center; font-stretch: 75%; font-weight: 800; text-transform: uppercase; font-size: 15px; letter-spacing: .04em; border-left: 1px solid var(--board-line); }
.dayhead small { display: block; font-family: var(--mono); font-stretch: 87.5%; font-weight: 400; font-size: 10px; color: var(--board-muted); letter-spacing: .1em; text-transform: uppercase; margin-top: 2px; }
.dayhead.is-today { color: var(--signal); }
.dayhead.is-today small { color: var(--signal); }
.grid-body { height: calc(var(--hours) * var(--hour-h)); position: relative; }
.axis { position: relative; font-family: var(--mono); font-stretch: 87.5%; font-size: 10.5px; color: var(--muted); }
.axis span { position: absolute; right: 8px; transform: translateY(-50%); background: var(--snow); padding: 0 2px; }
.col {
  position: relative; border-left: 1px solid var(--line);
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--hour-h) - 1px), var(--line) calc(var(--hour-h) - 1px), var(--line) var(--hour-h));
}
.col.is-today { background-color: rgba(240, 179, 60, .07); }
.ev {
  position: absolute; left: 4px; right: 4px; display: flex; flex-direction: column; gap: 2px; text-align: left;
  padding: 7px 9px; border-radius: 6px; border: 0; border-left: 3px solid var(--c-line);
  background: var(--c-bg); color: var(--c-ink); cursor: pointer; overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(14, 29, 24, .05);
  transition: box-shadow 180ms var(--ease-out), transform 160ms var(--ease-out);
  animation: rise 260ms var(--ease-out) both;
}
.ev:active { transform: scale(.98); }
.ev-time { font-family: var(--mono); font-stretch: 87.5%; font-size: 10.5px; letter-spacing: .04em; opacity: .85; }
.ev-title { font-stretch: 82%; font-weight: 700; font-size: 14px; line-height: 1.12; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ev-loc { margin-top: auto; font-size: 12.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.ev-loc svg { width: 12px; height: 12px; }
.ev.is-short { padding: 4px 8px; gap: 0; }
.ev.is-short .ev-time { display: none; }
.ev.is-short .ev-title { -webkit-line-clamp: 1; font-size: 13px; }
.nowline { position: absolute; left: 0; right: 0; height: 2px; background: var(--now); z-index: 4; pointer-events: none; box-shadow: 0 0 8px rgba(240, 96, 63, .5); }
.nowline::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--now); }

/* agenda (mobile) */
.agenda-wrap { display: none; }
.daytabs { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 6px; margin-bottom: 10px; scrollbar-width: none; }
.daytabs::-webkit-scrollbar { display: none; }
.daytab {
  flex: 1 0 auto; min-width: 58px; min-height: 54px; padding: 6px 10px; border-radius: 8px; border: 1.5px solid var(--line-2);
  background: var(--snow); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-stretch: 75%; font-weight: 800; text-transform: uppercase; font-size: 16px; letter-spacing: .04em;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, transform 160ms var(--ease-out);
}
.daytab:active { transform: scale(.95); }
.daytab small { font-family: var(--mono); font-stretch: 87.5%; font-size: 9.5px; letter-spacing: .08em; font-weight: 400; color: var(--muted); transition: color 180ms ease; margin-top: 2px; }
.daytab.is-active { background: var(--board); color: var(--signal); border-color: var(--board); }
.daytab.is-active small { color: var(--board-muted); }
.daytab.is-today:not(.is-active) { border-color: var(--amber-edge); }
.agenda { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.agenda-item { display: grid; grid-template-columns: 60px 1fr; gap: 12px; align-items: stretch; animation: rise 220ms var(--ease-out) both; }
.agenda-time { font-family: var(--mono); font-stretch: 87.5%; font-size: 11.5px; color: var(--muted); padding-top: 12px; line-height: 1.6; letter-spacing: .02em; }
.agenda-time b { display: block; color: var(--ink); font-weight: 600; font-size: 14px; }
.agenda-card {
  display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; text-align: left;
  width: 100%; padding: 12px 12px 12px 14px; border-radius: 10px; border: 0; border-left: 4px solid var(--c-line);
  background: var(--c-bg); color: var(--c-ink); cursor: pointer; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4);
  transition: box-shadow 180ms var(--ease-out), transform 160ms var(--ease-out);
}
.agenda-card:active { transform: scale(.985); }
.agenda-card .t { font-stretch: 80%; font-weight: 700; font-size: 18px; line-height: 1.08; }
.agenda-card .m { font-size: 13.5px; opacity: .9; margin-top: 4px; display: flex; gap: 8px; flex-wrap: wrap; }
.agenda-card .m .mono { font-size: 11.5px; }
.agenda-go { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: rgba(255, 255, 255, .72); color: var(--c-ink); }
.agenda-go svg { width: 18px; height: 18px; }
.agenda-empty { padding: 28px 16px; text-align: center; color: var(--muted); background: var(--snow); border: 1px dashed var(--line-2); border-radius: 10px; }
.agenda-empty b { display: block; color: var(--ink); font-size: 17px; margin-bottom: 4px; }
.sched-note { color: var(--muted); font-size: 14px; margin: 18px 4px 0; }

/* ---------- sheet (details): drawer on phones, panel on desktop ---------- */
.sheet-backdrop {
  position: fixed; inset: 0; background: rgba(14, 29, 24, .5); z-index: 39; opacity: 0;
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
  transition: opacity 200ms ease;
}
.sheet-backdrop.is-open { opacity: 1; }
.sheet {
  position: fixed; z-index: var(--z-sheet); background: var(--snow);
  box-shadow: var(--shadow-2);
  left: 0; right: 0; bottom: 0; border-radius: 18px 18px 0 0; padding: 0 20px max(20px, env(safe-area-inset-bottom));
  max-height: min(88dvh, 720px); overflow: auto; overscroll-behavior: contain;
  transform: translateY(100%); will-change: transform;
  transition: transform 220ms var(--ease-out);
}
.sheet.is-open { transform: none; transition: transform 480ms var(--ease-drawer); }
.sheet.is-dragging { transition: none; }
.sheet-handle { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 42px; height: 5px; border-radius: 999px; background: rgba(242, 239, 230, .35); z-index: 2; }
.sheet-grab { touch-action: none; cursor: grab; }
.sheet-close { position: absolute; top: 16px; right: 14px; z-index: 2; background: rgba(242, 239, 230, .1); border-color: rgba(242, 239, 230, .25); color: var(--board-text); }
.sheet-close:hover { background: rgba(242, 239, 230, .18); border-color: var(--board-text); }
.sheet-body { display: grid; gap: 16px; }
.sheet-head { display: grid; gap: 6px; padding: 26px 68px 18px 20px; margin: 0 -20px; background: var(--board); color: var(--board-text); }
.sheet-code { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-stretch: 87.5%; font-size: 11.5px; letter-spacing: .1em; color: var(--signal); }
.sheet-code::before { content: ""; width: 10px; height: 10px; border-radius: 2px; background: var(--c-line); }
.sheet-title { font-size: 28px; line-height: .96; margin: 0; }
.sheet-fac { color: var(--board-muted); font-size: 14.5px; }
.sheet-loc {
  display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center;
  background: var(--c-bg); color: var(--c-ink); border-radius: var(--r-md); padding: 14px 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5);
}
.sheet-loc .big { font-stretch: 70%; font-weight: 800; text-transform: uppercase; font-size: 30px; line-height: .92; }
.sheet-loc .sub { font-size: 14px; opacity: .85; margin-top: 4px; }
.sheet-loc .room { font-family: var(--mono); font-stretch: 87.5%; font-size: 10px; text-transform: uppercase; letter-spacing: .12em; opacity: .8; text-align: right; }
.sheet-loc .roomnum { font-family: var(--mono); font-stretch: 87.5%; font-size: 28px; font-weight: 700; line-height: 1; text-align: right; }
.sheet-loc .roomnum.is-text { font-size: 16px; font-family: var(--font); font-stretch: 100%; font-weight: 700; }
.sheet-meetings { display: grid; gap: 8px; }
.sheet-meeting { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; font-size: 15px; }
.sheet-meeting.is-current { font-weight: 600; }
.sheet-actions { display: grid; gap: 10px; }
.sheet-actions .btn { width: 100%; }
.sheet-hint { font-size: 13.5px; color: var(--muted); margin: 0; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translate(-50%, 16px) scale(.97);
  background: var(--board); color: var(--board-text); border: 1px solid var(--board-line); padding: 12px 18px; border-radius: 8px; font-size: 14.5px; font-weight: 500;
  opacity: 0; pointer-events: none; z-index: var(--z-toast); transition: opacity 200ms ease, transform 240ms var(--ease-out);
  max-width: min(92vw, 460px); text-align: center; box-shadow: var(--shadow-2);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0) scale(1); }

/* ---------- footer ---------- */
.footer {
  max-width: 1160px; margin: 0 auto; padding: 24px clamp(16px, 4vw, 40px) 40px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  color: var(--muted); font-size: 13px; border-top: 1px solid var(--line);
}

/* ---------- motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 3px rgba(240, 96, 63, .25); } 50% { box-shadow: 0 0 0 8px rgba(240, 96, 63, .1); } }
.reveal { animation: rise 480ms var(--ease-out) both; }
.hero-copy .reveal:nth-child(2) { animation-delay: 60ms; }
.hero-copy .reveal:nth-child(3) { animation-delay: 120ms; }
.hero-copy .reveal:nth-child(4) { animation-delay: 180ms; }
.hero-copy .reveal:nth-child(5) { animation-delay: 240ms; }
.hero-board.reveal { animation-delay: 200ms; }
.course:nth-child(2) { animation-delay: 40ms; } .course:nth-child(3) { animation-delay: 80ms; } .course:nth-child(4) { animation-delay: 120ms; }
.course:nth-child(5) { animation-delay: 160ms; } .course:nth-child(6) { animation-delay: 200ms; } .course:nth-child(7) { animation-delay: 240ms; } .course:nth-child(n+8) { animation-delay: 280ms; }
.agenda-item:nth-child(2) { animation-delay: 40ms; } .agenda-item:nth-child(3) { animation-delay: 80ms; } .agenda-item:nth-child(n+4) { animation-delay: 120ms; }
::view-transition-old(root) { animation: 110ms ease both vt-out; }
::view-transition-new(root) { animation: 240ms cubic-bezier(.23, 1, .32, 1) both vt-in; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(6px); } }

/* hover only where a real pointer exists */
@media (hover: hover) and (pointer: fine) {
  .ticket:not(.is-busy):hover { transform: translateY(-2px); }
  .ticket:not(.is-busy):hover .ticket-stub { background: var(--signal); color: var(--signal-ink); }
  .ev:hover { box-shadow: var(--shadow-2); z-index: 3; transform: translateY(-1px); }
  .agenda-card:hover { box-shadow: var(--shadow-2); }
  .search-list li:hover { background: var(--paper-2); }
  .step:not(:disabled):hover { color: var(--board-text); }
  .step.is-active:hover { color: var(--signal-ink); }
}

/* reduced motion: keep fades, drop movement */
@media (prefers-reduced-motion: reduce) {
  .reveal, .course, .ev, .agenda-item, .alert, .next-card { animation: fadeOnly 180ms ease both; }
  .search-list.pop { animation: fadeOnly 120ms ease both; }
  .sheet { transform: none; opacity: 0; transition: opacity 150ms ease; }
  .sheet.is-open { opacity: 1; transition: opacity 180ms ease; }
  .next-card.is-now .dot, .board-row.is-now .status::before, .board-clock .colon { animation: none; }
  .ticket.is-busy .scanline { animation: none; opacity: 0; }
  .btn:active, .tool:active, .ev:active, .agenda-card:active, .daytab:active, .btn-icon:active, .step:active, .ticket:active { transform: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: 120ms; }
  @keyframes vt-in { from { opacity: 0; } }
}
@keyframes fadeOnly { from { opacity: 0; } to { opacity: 1; } }

/* ---------- responsive ---------- */
@media (min-width: 720px) {
  .sheet {
    left: auto; right: 24px; bottom: 24px; width: 430px; border-radius: 16px; max-height: min(84dvh, 720px);
    transform: translateY(14px) scale(.98); opacity: 0; transform-origin: bottom right;
    transition: transform 150ms var(--ease-out), opacity 150ms ease;
  }
  .sheet.is-open { transform: none; opacity: 1; transition: transform 240ms var(--ease-out), opacity 200ms ease; }
  .sheet-handle { display: none; }
  .sheet-head { padding-top: 20px; border-radius: 16px 16px 0 0; }
  .sheet-grab { touch-action: auto; cursor: auto; }
}
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .hero-board { max-width: 720px; }
}
@media (max-width: 900px) {
  .review-layout { grid-template-columns: 1fr; }
  .review-side { position: static; }
  .thumb { display: none; }
  .sched-tools { justify-content: flex-start; }
  .how { grid-template-columns: 1fr; }
  .how li + li { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; }
  .how li { padding: 18px 0; }
}
@media (max-width: 860px) {
  .week-wrap { display: none; }
  .agenda-wrap { display: block; }
}
@media (max-width: 640px) {
  .step span { display: none; }
  .step { min-width: 34px; padding: 0 10px; justify-content: center; }
  .step i { width: 8px; height: 8px; }
  .board-cols { display: none; }
  .board-row { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "time course" "loc status"; gap: 10px 12px; min-height: 0; padding-top: 14px; padding-bottom: 14px; }
  .board-row .time { grid-area: time; }
  .board-row .crs { grid-area: course; }
  .board-row .loc { grid-area: loc; display: flex; gap: 8px; }
  .board-row .status { grid-area: status; }
  .board-day { white-space: nowrap; }
  .board-head { grid-template-columns: auto 1fr auto; }
  .board-tag { display: none; }
  .board-foot span + span { display: none; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .brand-sub { display: none; }
  .topbar { padding-left: 16px; padding-right: 16px; grid-template-columns: auto auto; justify-content: space-between; }
  .topbar-right { display: none; }
  .ticket-no { display: none; }
  .ticket-label span:first-child { white-space: nowrap; }
  h1 { font-size: clamp(56px, 17vw, 84px); }
  .ticket { grid-template-columns: 1fr 64px; }
  .ticket-main { padding: 18px 16px 18px 20px; }
  .ticket-label { font-size: 10px; }
  .next-card { grid-template-columns: 1fr; }
  .next-cta { flex-direction: row; }
  .next-cta .btn { flex: 1; }
  .sched-tools { flex-wrap: nowrap; overflow-x: auto; padding: 2px; margin: 0 -2px; scrollbar-width: none; }
  .sched-tools::-webkit-scrollbar { display: none; }
  .tool { min-height: 44px; }
  .review-bar { flex-direction: column-reverse; align-items: stretch; }
  .review-bar .btn { width: 100%; }
  .course { grid-template-columns: 5px 1fr; }
  .course-remove { grid-column: 2; justify-self: start; margin-top: 8px; }
}

/* ---------- print ---------- */
.print-title { display: none; }
@media print {
  body::after, .topbar, .sched-top, .agenda-wrap, .sched-note, .footer, .sheet, .sheet-backdrop, .toast, .notice { display: none !important; }
  #app { padding: 0; max-width: none; }
  .week-wrap { display: block !important; border: 0; }
  .grid-head { background: #fff; color: #000; }
  .grid { min-width: 0; --hour-h: 44px; }
  .ev { box-shadow: none; animation: none; }
  .print-title { display: block; font-weight: 700; font-size: 20px; margin: 0 0 10px; }
}
