/* Nerdstub's page. Colors are the Mac's look tokens (Sources/SeatCore/Look.swift), light by default, dark under
   prefers-color-scheme. The look comes from the Mac (status.look); velvet_marquee until it has said.
   Filled shapes only: no border, no outline, anywhere (L1, L2). */

:root, :root[data-look="velvet_marquee"] {
  --bg: #F7F0E3; --surface: #FFFAF1; --raised: #EFE4D1; --line: #DCCDB4; --text: #1C1412; --dim: #6B5A4E;
  --accent: #8A4E00; --on-accent: #FFFAF1; --alert: #B3261E; --ok: #1A6E3F; --info: #1F5FAD; --held: #C2410C;
  --display: system-ui, -apple-system, "Helvetica Neue", sans-serif; --display-weight: 800; --display-stretch: condensed;
  --display-size: 28px; --display-track: 0.06em;
  --read: system-ui, -apple-system, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --panel-r: 14px; --chip-r: 6px; --button-r: 8px;
  --t-title: 17px; --t-text: 17px; --t-secondary: 15px; --t-data: 15px; --t-count: 40px; --t-button: 17px;
  --button-track: 0;
}
:root[data-look="admit_one"] {
  --bg: #F2E4D0; --surface: #FBF3E7; --raised: #EAD8BF; --line: #CDB696; --text: #2B1D16; --dim: #614E40;
  --accent: #A81F28; --on-accent: #FFF6EC; --alert: #9A3412; --ok: #1F6B45; --info: #14666A;
  --display: ui-serif, "New York", Georgia, "Times New Roman", serif; --display-weight: 900; --display-stretch: normal;
  --display-size: 25px; --display-track: 0.05em;
  --panel-r: 6px; --chip-r: 3px; --button-r: 4px;
  /* Buttons in capitals run long at 375: a smaller button size and a little tracking, and they wrap (S4). */
  --t-button: 15px; --button-track: 0.03em;
}
:root[data-look="booth_console"] {
  --bg: #E9EDF0; --surface: #F7F9FA; --raised: #DDE3E8; --line: #C4CDD5; --text: #12181D; --dim: #4E5B67;
  --accent: #0A5F98; --on-accent: #FFFFFF; --alert: #B42318; --ok: #17703F; --info: #8A5200;
  --display: var(--mono); --display-weight: 700; --display-stretch: normal; --display-size: 20px; --display-track: 0.16em;
  --read: var(--mono);
  --panel-r: 8px; --chip-r: 3px; --button-r: 5px;
  /* Monospaced words wrap every sentence at 17: one step down, never under 13. */
  --t-title: 15px; --t-text: 15px; --t-secondary: 13px; --t-data: 14px; --t-count: 36px; --t-button: 15px;
}

@media (prefers-color-scheme: dark) {
  :root, :root[data-look="velvet_marquee"] {
    --bg: #140C0E; --surface: #1F1416; --raised: #2A1B1E; --line: #3A2629; --text: #F7EBDD; --dim: #B39C8F;
    --accent: #FFC24A; --on-accent: #1A0E06; --alert: #FF6B5E; --ok: #6FD39A; --info: #8EC5FF; --held: #FF8A3D;
  }
  :root[data-look="admit_one"] {
    --bg: #1A1614; --surface: #241F1B; --raised: #2E2823; --line: #4A3F36; --text: #F1E7DA; --dim: #AA9C8C;
    --accent: #FF7A70; --on-accent: #1A1614; --alert: #FF8A5C; --ok: #7BD3A0; --info: #62C9C2;
  }
  :root[data-look="booth_console"] {
    --bg: #0D1014; --surface: #151A20; --raised: #1D242C; --line: #2A333D; --text: #E4ECF2; --dim: #8D9BA8;
    --accent: #8FD3FF; --on-accent: #06121C; --alert: #FF7A6B; --ok: #74D99F; --info: #FFB547;
  }
}
/* Increase Contrast (4.2): raised steps to line, dim to text at 80%. */
@media (prefers-contrast: more) {
  :root { --raised: var(--line); --dim: color-mix(in srgb, var(--text) 80%, transparent); }
}
@media (min-width: 420px) {
  :root[data-look="booth_console"] { --t-title: 16px; --t-text: 16px; --t-secondary: 14px; --t-data: 15px; }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font: 400 var(--t-text)/1.35 var(--read);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
button, input { font: inherit; color: inherit; }
*:focus { outline: none; }

.column { max-width: 560px; margin: 0 auto; padding: 0 16px calc(24px + env(safe-area-inset-bottom)); }

.topbar { padding: calc(12px + env(safe-area-inset-top)) 0 12px; }
.brand {
  margin: 0; font: var(--display-weight) var(--display-size)/1.1 var(--display); font-stretch: var(--display-stretch);
  letter-spacing: var(--display-track); color: var(--accent);
}

.card { background: var(--surface); border-radius: var(--panel-r); padding: 16px; margin: 0 0 16px; }
.card h2 { margin: 0 0 8px; font: 600 var(--t-title)/1.3 var(--read); }
.dim { color: var(--dim); }
.secondary { font-size: var(--t-secondary); }
.data { font-family: var(--mono); font-size: var(--t-data); }
.alert { color: var(--alert); }
p { margin: 0; }
.gap2 { margin-top: 2px; } .gap4 { margin-top: 4px; } .gap8 { margin-top: 8px; } .gap16 { margin-top: 16px; }

/* Buttons: FillButton in CSS. 44 tall, filled, no border; the keyboard sees a filled step, never a ring. */
.btn {
  appearance: none; -webkit-appearance: none; border: 0; margin: 0; min-height: 44px; min-width: 44px; padding: 0 16px;
  border-radius: var(--button-r); font-size: var(--t-button); font-weight: 600; letter-spacing: var(--button-track);
  line-height: 1.15; cursor: pointer; touch-action: manipulation; text-align: center;
}
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.quiet { background: var(--raised); color: var(--text); }
.btn.danger { background: color-mix(in srgb, var(--alert) 14%, transparent); color: var(--alert); }
.btn.quiet:hover, .btn.danger:hover { background-image: linear-gradient(color-mix(in srgb, var(--accent) 14%, transparent), color-mix(in srgb, var(--accent) 14%, transparent)); }
.btn:focus-visible { background: var(--line); color: var(--text); }
.btn.resting, .btn.resting:hover { background: color-mix(in srgb, var(--raised) 60%, transparent); background-image: none; color: var(--dim); cursor: default; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row.right { justify-content: flex-end; }

/* The Hold part: one height in every form (L4, L7). Its action area sits at the bottom, two rows reserved. */
.hold { height: 432px; display: flex; flex-direction: column; overflow: hidden; }
.hold .body { flex: 1 1 auto; min-height: 0; }
.hold .title { font: 600 var(--t-title)/1.3 var(--read); }
.hold .movie { font: 600 var(--t-text)/1.3 var(--read); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hold .seatrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; min-height: 52px; }
.chip { font: 600 var(--t-data)/1 var(--mono); background: var(--raised); color: var(--text); border-radius: var(--chip-r); padding: 8px 10px; }
.countdown { font: 700 var(--t-count)/1 var(--mono); color: var(--held); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hold .note { min-height: calc(var(--t-secondary) * 1.35 * 3); }
.hold .actions { flex: 0 0 auto; min-height: 96px; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; }
.hold .actions .row { min-height: 44px; }

/* Needs you: a fixed slot so its coming and going never moves a button (decision 16). */
.needs-slot { height: 76px; margin: 0 0 16px; }
.needs { height: 76px; margin: 0; display: flex; gap: 12px; align-items: center; color: var(--alert); background: color-mix(in srgb, var(--alert) 12%, var(--surface)); }
.needs svg { flex: 0 0 auto; }

.status p + p { margin-top: 4px; }

.code { font: 600 20px/1.35 var(--mono); letter-spacing: 0.02em; }
:root[data-look="booth_console"] .code { font-size: 18px; }
.pair .codebox { min-height: 92px; display: flex; flex-direction: column; justify-content: center; }

/* A switch: a filled track and knob, no outline (FillSwitch). */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.switch-row + .switch-row { margin-top: 8px; }
.switch { appearance: none; -webkit-appearance: none; border: 0; flex: 0 0 auto; width: 52px; height: 32px; border-radius: 16px; background: var(--line); position: relative; cursor: pointer; padding: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 13px; background: var(--surface); transition: left .15s; }
.switch[aria-checked="true"] { background: var(--ok); }
.switch[aria-checked="true"]::after { left: 23px; }
.switch:focus-visible { box-shadow: none; background: var(--dim); }
@media (prefers-reduced-motion: reduce) { .switch::after { transition: none; } }

.list { list-style: none; margin: 0; padding: 0; }
.list li + li { margin-top: 12px; }
.newline { appearance: none; -webkit-appearance: none; border: 0; background: var(--raised); color: var(--text); border-radius: var(--chip-r); min-height: 44px; width: 100%; margin-bottom: 12px; font-weight: 600; cursor: pointer; }

.device .text { min-height: calc(var(--t-text) * 1.35 + var(--t-secondary) * 1.35 * 3 + 2px); }
.footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; }

.center { text-align: center; }
.signin { padding: 32px 16px; }
.gbtn { display: flex; justify-content: center; min-height: 44px; margin-top: 16px; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.switch-row .btn, .footer .btn { flex: 0 0 auto; white-space: nowrap; }
