/* Head Table: soft neo-brutalism in pastel (the approved mock-ups).
   Mint felt, ink outlines, one pastel per table. Tokens first; the two dark
   blocks hold the same values (one follows the phone, one is the toggle).
   No inline styles anywhere: the CSP only allows this file. */

@font-face { font-family: "Bricolage"; src: url(/fonts/BricolageGrotesque-700.ttf) format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Bricolage"; src: url(/fonts/BricolageGrotesque-800.ttf) format("truetype"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Manrope"; src: url(/fonts/manrope.ttf) format("truetype"); font-weight: 200 800; font-display: swap; }

:root {
  color-scheme: light;
  --bg: #cdeedf;          /* mint felt */
  --surface: #ffffff;
  --ink: #17201b;         /* text + outlines */
  --ink-soft: #3f4c45;
  --line: #17201b;
  --line-soft: #17201b26;
  --on-ink: #f2fbf6;
  --focus: #6b4cf5;
  --t1: #ffe07a; --t2: #ffb46e; --t3: #bcaaff; --t4: #7fdca6; --t5: #a4d6ff; --t6: #ffb8cb;
  --card-ink: #17201b;    /* text on pastel cards, both themes */
  --card-line: #17201b;
  --up: #136b3c; --down: #a63a12;
  --danger: #a3261d; --danger-soft: #fde2de;
  --warn: #6a4508; --warn-soft: #ffeeb8;
  --tabbar: #17201b;
  --scrim: rgba(23, 32, 27, .5);
  --radius-l: 26px; --radius-m: 18px; --radius-s: 12px;
  --bw: 2px;
  --tap: 48px;
  --display: "Bricolage", "Manrope", system-ui, sans-serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #111815; --surface: #1b2520; --ink: #eef6f1; --ink-soft: #b4c4bb; --line: #3e5047; --line-soft: #ffffff1f; --on-ink: #111815; --focus: #b9a8ff;
    --t1: #f2d36a; --t2: #f4a964; --t3: #ae9cf5; --t4: #72cf98; --t5: #95c9f2; --t6: #f2a8bc; --card-line: #0b100e;
    --up: #7fe0a8; --down: #ffad8a; --danger: #ff9b90; --danger-soft: #4a1f1b; --warn: #f0c977; --warn-soft: #3a2f1a;
    --tabbar: #26332c; --scrim: rgba(0, 0, 0, .6);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111815; --surface: #1b2520; --ink: #eef6f1; --ink-soft: #b4c4bb; --line: #3e5047; --line-soft: #ffffff1f; --on-ink: #111815; --focus: #b9a8ff;
  --t1: #f2d36a; --t2: #f4a964; --t3: #ae9cf5; --t4: #72cf98; --t5: #95c9f2; --t6: #f2a8bc; --card-line: #0b100e;
  --up: #7fe0a8; --down: #ffad8a; --danger: #ff9b90; --danger-soft: #4a1f1b; --warn: #f0c977; --warn-soft: #3a2f1a;
  --tabbar: #26332c; --scrim: rgba(0, 0, 0, .6);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; background: var(--bg); color: var(--ink);
  font: 500 18px/1.45 var(--sans); -webkit-font-smoothing: antialiased;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
::selection { background: var(--t3); color: var(--card-ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 10px; }
a { color: inherit; text-underline-offset: 3px; }
h1, h2, h3, .display { font-family: var(--display); font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; margin: 0; text-wrap: balance; }
h1 { font-size: 30px; }
h2 { font-size: 24px; }
h3 { font-size: 20px; }
p { margin: 0; overflow-wrap: anywhere; }
img { max-width: 100%; height: auto; display: block; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-soft); }
.sprite { display: none; }
.i { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; }
.i-s { width: 20px; height: 20px; }
.i-l { width: 30px; height: 30px; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--surface); color: var(--ink); padding: 10px 14px; border-radius: var(--radius-s); border: var(--bw) solid var(--line); z-index: 50; }
.skip:focus { top: 8px; }
.visually-hidden, .sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hidden { display: none !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ---------- frame ---------- */
.app { max-width: 480px; margin: 0 auto; min-height: 100dvh; padding: 0 18px 48px; outline: none; }
.app.has-tabbar { padding-bottom: 120px; }
.app.has-dock { padding-bottom: 150px; }
.app.wide { max-width: 480px; }
.app.landing { max-width: none; padding: 0; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 14px 0 10px; }
.topbar .title { flex: 1; min-width: 0; }
.topbar .title small { display: block; font-size: 15px; color: var(--ink-soft); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .title b, .topbar .title h1 { display: block; font: 800 22px/1.15 var(--display); letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.round-btn, .iconbtn {
  width: var(--tap); height: var(--tap); border-radius: 50%; border: var(--bw) solid var(--line);
  background: var(--surface); color: var(--ink); display: inline-grid; place-items: center; cursor: pointer; flex: none; text-decoration: none; padding: 0;
}
.round-btn.ink { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.round-btn.big { width: 58px; height: 58px; }
.badge-round { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; flex: none; border: var(--bw) solid var(--card-line); color: var(--card-ink); }
.stack { display: grid; gap: 14px; }
.stack-l { display: grid; gap: 22px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; }
.mt { margin-top: 14px; } .mt-l { margin-top: 22px; }
.offline-banner { position: fixed; left: 0; right: 0; bottom: 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--warn-soft); color: var(--warn); text-align: center; font-weight: 700; z-index: 60; border-top: var(--bw) solid var(--line); }
.noscript { padding: 16px; }
.offline-page { display: grid; place-items: center; min-height: 80dvh; }

.wordmark { min-height: 44px; font: 800 22px/1 var(--display); letter-spacing: -0.02em; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); }
.wordmark .dot { width: 22px; height: 22px; border-radius: 7px; background: var(--t1); border: var(--bw) solid var(--card-ink); display: grid; place-items: center; }
.wordmark .dot i { width: 6px; height: 6px; border-radius: 50%; background: var(--card-ink); }
.wordmark.small { font-size: 19px; }

/* ---------- surfaces ---------- */
.panel, .card { background: var(--surface); border: var(--bw) solid var(--line); border-radius: var(--radius-l); padding: 18px; }
.panel.tight { padding-top: 8px; padding-bottom: 8px; }
.card > * + * { margin-top: 12px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-head h2 { font-size: 22px; }
.section-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 26px 2px 12px; }
.section-h h2 { font-size: 24px; }
.section-h a, .section-h > span { font-size: 16px; font-weight: 700; color: var(--ink-soft); }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; border-radius: 999px; border: var(--bw) solid var(--line); background: var(--surface); font-size: 15px; font-weight: 800; }
.count { font: 800 18px var(--sans); background: var(--ink); color: var(--on-ink); border-radius: 999px; padding: 4px 12px; }
.note { padding: 14px 16px; border-radius: var(--radius-m); border: var(--bw) dashed var(--line-soft); color: var(--ink-soft); font-weight: 600; font-size: 16px; }
.note.warn { border-style: solid; border-color: var(--card-line); background: var(--t1); color: var(--card-ink); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 24px; border-radius: 999px; border: var(--bw) solid var(--line);
  font: 800 19px/1.1 var(--sans); text-decoration: none; cursor: pointer; color: var(--ink); background: var(--surface); text-align: center;
  transition: transform .08s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.btn-secondary { background: var(--surface); }
.btn-tint { background: var(--t2); color: var(--card-ink); border-color: var(--card-line); }
.btn-ghost { background: transparent; border-color: transparent; padding-inline: 12px; }
.btn-danger { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }
.btn-s { min-height: 48px; padding: 0 18px; font-size: 17px; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.btn[aria-busy="true"] { cursor: progress; }
.btn[aria-busy="true"]::after { content: ""; width: 1em; height: 1em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- chips, fields ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 4px 12px; border-radius: 999px; border: var(--bw) solid var(--line); font-size: 15px; font-weight: 700; background: var(--surface); color: var(--ink); }
.field { display: grid; gap: 8px; }
.field > label, .field > span, .label { display: block; font-size: 16px; font-weight: 700; color: var(--ink-soft); margin: 0 0 0 4px; }
.field .hint { color: var(--ink-soft); font-size: 15px; margin: 0 4px; font-weight: 600; }
.field .error { color: var(--danger); font-size: 15px; font-weight: 700; margin: 0 4px; }
.input {
  width: 100%; min-height: 58px; border-radius: var(--radius-m); border: var(--bw) solid var(--line);
  background: var(--surface); color: var(--ink); font: 700 19px var(--sans); padding: 0 18px;
}
.input::placeholder { color: var(--ink-soft); font-weight: 600; }
.input[aria-invalid="true"] { border-color: var(--danger); }
.seg { display: flex; padding: 5px; gap: 4px; border-radius: 999px; border: var(--bw) solid var(--line); background: var(--surface); }
.seg button { flex: 1; min-height: 50px; border: 0; border-radius: 999px; background: transparent; color: var(--ink); font: 800 18px var(--sans); display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); }

/* ---------- table colour cards ---------- */
.tcard { border: var(--bw) solid var(--card-line); border-radius: var(--radius-l); color: var(--card-ink); padding: 16px 18px; position: relative; }
.tc1 { background: var(--t1); } .tc2 { background: var(--t2); } .tc3 { background: var(--t3); }
.tc4 { background: var(--t4); } .tc5 { background: var(--t5); } .tc6 { background: var(--t6); }
.bg-t1 { background: var(--t1); color: var(--card-ink); border-color: var(--card-line); }
.bg-t5 { background: var(--t5); color: var(--card-ink); border-color: var(--card-line); }
.on-card { background: #ffffffc2; border: var(--bw) solid var(--card-ink); color: var(--card-ink); }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 800; background: #fff; color: var(--card-ink); border: var(--bw) solid var(--card-ink); border-radius: 999px; padding: 3px 10px 3px 8px; }

/* ---------- host tab bar ---------- */
.tabbar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(14px + env(safe-area-inset-bottom)); width: min(444px, calc(100% - 24px));
  display: flex; gap: 8px; padding: 7px; border-radius: 999px; background: var(--tabbar); z-index: 10;
}
:root[data-theme="dark"] .tabbar { border: var(--bw) solid var(--line); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tabbar { border: var(--bw) solid var(--line); } }
.tabbar a { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; color: var(--card-ink); border: var(--bw) solid var(--card-ink); text-decoration: none; flex: none; }
.tabbar a.on { flex: 1; width: auto; min-width: 0; padding: 0 16px; white-space: nowrap; border-radius: 999px; display: flex; gap: 10px; justify-content: center; font: 800 18px var(--sans); }
/* narrow phones: keep room around the open tab's label */
@media (max-width: 440px) { .tabbar a { width: 54px; height: 54px; } }
@media (max-width: 400px) { .tabbar a.on { gap: 6px; font-size: 16px; } }
@media (max-width: 370px) { .tabbar a.on .i { display: none; } }
.tabbar .k1 { background: var(--t4); } .tabbar .k2 { background: var(--t3); } .tabbar .k3 { background: var(--t2); } .tabbar .k4 { background: var(--t1); }

/* the bottom dock (setup's big button) */
.dock { position: fixed; left: 0; right: 0; bottom: 0; padding: 14px 18px calc(18px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--bg) 70%, transparent); z-index: 9; }
.dock .inner { max-width: 444px; margin: 0 auto; }
.dock p { text-align: center; font-size: 15px; font-weight: 700; color: var(--ink-soft); margin-top: 8px; }

/* ---------- sheet ---------- */
.sheet {
  border: var(--bw) solid var(--line); border-bottom: 0; padding: 20px 20px calc(24px + env(safe-area-inset-bottom)); width: 100%; max-width: 520px;
  margin: auto auto 0; border-radius: var(--radius-l) var(--radius-l) 0 0; background: var(--surface); color: var(--ink);
  max-height: 92dvh; overflow: auto;
}
.sheet::backdrop { background: var(--scrim); }
.sheet[open] { animation: rise .2s ease-out; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sheet-head h2 { margin: 0; font-size: 24px; }
.sheet .stack { gap: 12px; }
@media (min-width: 700px) { .sheet { margin: auto; border-radius: var(--radius-l); border-bottom: var(--bw) solid var(--line); } }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } }

/* ---------- toast ---------- */
.toasts { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: grid; gap: 8px; width: min(92vw, 420px); z-index: 40; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: var(--radius-m); background: var(--ink); color: var(--on-ink); font-weight: 700; animation: rise .2s ease-out; border: var(--bw) solid var(--ink); }
.toast.error { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }
.toast .btn-ghost { color: inherit; min-height: 40px; margin-left: auto; }

/* ---------- landing ---------- */
.site { max-width: 1200px; margin: 0 auto; padding: 0 20px 48px; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0; }
.nav-r { display: flex; align-items: center; gap: 10px; }
.hero { display: grid; gap: 28px; padding: 18px 0 8px; }
.hero h1 { font-size: clamp(44px, 11.5vw, 84px); line-height: .98; letter-spacing: -0.035em; }
.hero .lede { font-size: 20px; line-height: 1.5; color: var(--ink-soft); margin-top: 18px; max-width: 34ch; }
.hero .ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero .ctas .btn { flex: 1 1 auto; }
.hero .fine { margin-top: 14px; font-size: 16px; color: var(--ink-soft); font-weight: 600; }
.fan { position: relative; padding: 6px 4px 0; }
.fan .tcard { margin-top: -26px; padding: 16px 18px 34px; transform-origin: 50% 100%; }
.fan .tcard:first-child { margin-top: 0; }
.fan .tcard:nth-child(1) { transform: rotate(-2.2deg); }
.fan .tcard:nth-child(2) { transform: rotate(1.4deg) translateX(6px); }
.fan .tcard:nth-child(3) { transform: rotate(-1deg); }
.fan .tcard:nth-child(4) { transform: rotate(1.8deg) translateX(4px); padding-bottom: 18px; }
.fan .frow { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.fan .tt { font: 800 24px/1.05 var(--display); letter-spacing: -0.02em; }
.fan .names { font-size: 17px; font-weight: 700; margin-top: 4px; }
.fan .score { font: 800 30px/1 var(--display); }
.fan .badge-dark { width: 44px; height: 44px; border-radius: 50%; background: var(--card-ink); color: #fff; display: grid; place-items: center; flex: none; }
.landing .section-h h2 { font-size: 30px; }
.steps { display: grid; gap: 14px; margin-top: 8px; }
.step { display: grid; grid-template-columns: 52px 1fr; gap: 14px; align-items: start; }
.step .n { width: 52px; height: 52px; border-radius: 50%; border: var(--bw) solid var(--card-ink); color: var(--card-ink); display: grid; place-items: center; font: 800 24px var(--display); }
.step h3 { font-size: 22px; margin-top: 4px; }
.step p { color: var(--ink-soft); margin-top: 6px; }
.twocol { display: grid; gap: 14px; }
.twocol .section-h { margin-bottom: 0; }
.qr-row { display: flex; gap: 16px; align-items: center; }
.qr-row h3 { font-size: 22px; }
.qr-row p { color: var(--ink-soft); margin-top: 4px; font-size: 17px; }
.prices { display: grid; gap: 14px; }
.price { padding: 22px; }
.price .amt { font: 800 56px/1 var(--display); letter-spacing: -0.03em; margin: 12px 0 4px; }
.price .amt small { font: 700 18px var(--sans); letter-spacing: 0; opacity: .85; }
.price ul { list-style: none; padding: 0; margin: 16px 0 20px; display: grid; gap: 10px; }
.price li { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; }
.price li svg { margin-top: 2px; }
.price h3 { font-size: 24px; }
.price.year { background: var(--t3); color: var(--card-ink); border-color: var(--card-line); }
.price.year .btn { background: var(--card-ink); color: #f2fbf6; border-color: var(--card-ink); }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; margin-top: 40px; padding-top: 20px; border-top: var(--bw) solid var(--line-soft); color: var(--ink-soft); font-size: 16px; font-weight: 600; }
@media (min-width: 900px) {
  .site { padding: 0 48px 64px; }
  .hero { grid-template-columns: 1.05fr .95fr; gap: 64px; align-items: center; padding: 48px 0 40px; }
  .hero .lede { font-size: 22px; }
  .fan { padding: 0 24px; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .step { grid-template-columns: 1fr; }
  .twocol { grid-template-columns: 1fr 1fr; gap: 20px; align-items: stretch; }
  .twocol .section-h { grid-column: 1 / -1; }
  .prices { grid-template-columns: 1fr 1fr; }
}

/* ---------- nights list ---------- */
.night-item { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; min-height: 72px; }
.night-item .t { flex: 1; min-width: 0; }
.night-item b { display: block; font: 800 21px/1.15 var(--display); }
.night-item span { display: block; font-size: 15px; color: var(--ink-soft); font-weight: 600; }
.night-item .ico { width: 48px; height: 48px; border-radius: 14px; border: var(--bw) solid var(--card-line); color: var(--card-ink); display: grid; place-items: center; flex: none; }
.empty { text-align: center; padding: 28px 18px; }
.empty .badge-round { margin: 0 auto 14px; }
.empty p { color: var(--ink-soft); margin-top: 8px; }

/* ---------- setup ---------- */
.add { display: flex; gap: 10px; }
.add .input { flex: 1; }
.add .round-btn { width: 58px; height: 58px; background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.names { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.names .chip { min-height: 44px; padding: 6px 6px 6px 14px; font-size: 16px; gap: 2px; }
.names .chip.new { background: var(--t1); color: var(--card-ink); border-color: var(--card-ink); }
.names .chip.wait { border-style: dashed; }
.names .chip button { width: 32px; height: 32px; border-radius: 50%; border: 0; background: transparent; color: inherit; display: grid; place-items: center; cursor: pointer; }
.names .chip button .i { width: 18px; height: 18px; }
.names .chip.static { padding-right: 14px; }
button.chip { cursor: pointer; font-family: inherit; }
.panel-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.panel-h h2 { font-size: 22px; }
.scan { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding-top: 16px; border-top: var(--bw) dashed var(--line-soft); }
.scan p { flex: 1; font-size: 16px; color: var(--ink-soft); font-weight: 600; }
.regulars { display: flex; flex-wrap: wrap; gap: 8px; }
.regulars button { min-height: 44px; }
.plan { display: grid; grid-template-columns: 1fr 1fr; gap: 0; padding: 0; overflow: hidden; }
.plan > * { padding: 16px 18px; }
.plan > div + div { border-left: var(--bw) solid var(--card-ink); }
.plan .big { font: 800 44px/1 var(--display); }
.plan .lbl { font-weight: 700; font-size: 16px; margin-top: 4px; }
.plan .note-row { grid-column: 1 / -1; border-top: var(--bw) solid var(--card-ink); font-size: 16px; font-weight: 600; }
.stepper { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.stepper button { width: 44px; height: 44px; border-radius: 50%; border: var(--bw) solid var(--card-ink); background: #ffffffb3; color: var(--card-ink); display: grid; place-items: center; cursor: pointer; }
.stepper button[disabled] { opacity: .4; cursor: not-allowed; }
.prize-set { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 10px 0; }
.prize-set + .prize-set { border-top: var(--bw) solid var(--line-soft); }
.prize-set .ico { width: 46px; height: 46px; border-radius: 14px; border: var(--bw) solid var(--card-ink); color: var(--card-ink); display: grid; place-items: center; flex: none; }
.prize-set .t { flex: 1; min-width: 0; background: none; border: 0; padding: 0; text-align: left; color: inherit; font: inherit; cursor: pointer; }
.prize-set .t b { display: block; font-size: 18px; }
.prize-set .t span { display: block; font-size: 16px; color: var(--ink-soft); font-weight: 600; text-decoration: underline dotted; text-underline-offset: 4px; }
.tickwrap { width: 48px; height: 48px; display: grid; place-items: center; flex: none; border: 0; background: none; padding: 0; cursor: pointer; color: inherit; }
.tick { width: 32px; height: 32px; border-radius: 10px; border: var(--bw) solid var(--line); display: grid; place-items: center; background: var(--surface); }
.tickwrap[aria-pressed="true"] .tick { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.tickwrap[aria-pressed="false"] .tick .i { visibility: hidden; }

/* ---------- tables (rotation) ---------- */
.summary { display: grid; gap: 14px; }
.summary h1 { font-size: 30px; }
.summary .sub { color: var(--ink-soft); font-weight: 600; margin-top: 6px; }
.legend { display: flex; flex-wrap: wrap; gap: 8px; }
.up-ic { color: var(--up); } .down-ic { color: var(--down); }
.find { position: relative; margin-top: 16px; }
.find .i { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--ink-soft); }
.find .input { padding-left: 52px; }
.tables { display: grid; gap: 14px; }
.tcard .head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.tcard h2 { font-size: 26px; }
.tcard .head small { font-size: 15px; font-weight: 700; }
.teams { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.team { background: #ffffffc2; border: var(--bw) solid var(--card-ink); border-radius: var(--radius-m); padding: 6px 12px; min-width: 0; }
.team.won { box-shadow: inset 0 0 0 3px var(--card-ink); }
.team .p { padding: 7px 0; }
.team .p + .p { border-top: 1.5px dashed #17201b40; }
.team b { display: block; font-size: 18px; line-height: 1.2; overflow-wrap: anywhere; }
.team .ghost b { font-style: italic; font-weight: 600; color: #3f4c45; }
.team .tscore { display: flex; align-items: baseline; justify-content: space-between; border-top: var(--bw) solid var(--card-ink); margin: 4px -12px -6px; padding: 6px 12px; font-weight: 800; font-size: 15px; }
.team .tscore b { font: 800 26px/1 var(--display); display: inline; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 800; margin-top: 3px; }
.tag .i { width: 16px; height: 16px; }
.tag.up { color: #12603a; } .tag.down { color: #9a3510; } .tag.stay, .tag.start, .tag.in { color: #3f4c45; }
.tcard.match { outline: 4px solid var(--focus); outline-offset: 2px; }
.tcard.dim { opacity: .45; }
.table-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.table-actions .btn { min-height: 48px; font-size: 16px; padding: 0 16px; background: #ffffffc2; color: var(--card-ink); border-color: var(--card-ink); flex: 1; }
.table-actions .btn.solid { background: var(--card-ink); color: #f2fbf6; }

/* ---------- score pad ---------- */
.where { display: flex; align-items: center; gap: 14px; }
.where .t { flex: 1; min-width: 0; }
.where h1 { font-size: 40px; }
.where p { font-weight: 700; font-size: 17px; margin-top: 4px; }
.die { width: 64px; height: 64px; border-radius: 18px; background: #fff; border: var(--bw) solid var(--card-ink); flex: none; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); padding: 10px; }
.die i { width: 10px; height: 10px; border-radius: 50%; background: var(--card-ink); place-self: center; }
.die .p1 { grid-area: 1 / 1; } .die .p2 { grid-area: 1 / 3; } .die .p3 { grid-area: 2 / 1; } .die .p4 { grid-area: 2 / 2; }
.die .p5 { grid-area: 2 / 3; } .die .p6 { grid-area: 3 / 1; } .die .p7 { grid-area: 3 / 3; }
.board { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.side { display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; border-radius: var(--radius-l); border: var(--bw) solid var(--line); background: var(--surface); padding: 14px 16px 16px; text-align: left; font: inherit; color: var(--ink); cursor: pointer; min-width: 0; }
.side[aria-pressed="true"] { outline: 4px solid var(--ink); outline-offset: -1px; }
.side .who { display: block; font-size: 15px; font-weight: 700; color: var(--ink-soft); }
.side .who b { display: block; font-size: 17px; color: var(--ink); overflow-wrap: anywhere; }
.side .pts { font: 800 64px/1 var(--display); letter-spacing: -0.03em; margin-top: 8px; }
.side .state { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 14px; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: var(--ink); color: var(--on-ink); }
.side .state.off { background: transparent; color: var(--ink-soft); padding-left: 0; }
.pad-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 22px 4px 12px; }
.pad-h h2 { font-size: 22px; min-width: 0; overflow-wrap: anywhere; }
.pad-h span { font-size: 15px; font-weight: 700; color: var(--ink-soft); flex: none; }
.pad { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; justify-items: center; }
.pad.three { grid-template-columns: repeat(3, 1fr); }
.key { width: 100%; max-width: 86px; aspect-ratio: 1; border-radius: 50%; border: var(--bw) solid var(--line); background: var(--surface); color: var(--ink); font: 800 30px/1 var(--display); display: grid; place-items: center; cursor: pointer; padding: 0; }
.key small { font: 700 13px var(--sans); display: block; margin-top: 2px; color: var(--ink-soft); }
.key.undo { background: transparent; }
.key[disabled] { opacity: .4; cursor: not-allowed; }
.key-stack { display: flex; flex-direction: column; align-items: center; }
.bunco { grid-column: 1 / -1; width: 100%; min-height: 72px; border-radius: 999px; border: var(--bw) solid var(--card-line); background: var(--t2); color: var(--card-ink); font: 800 26px var(--display); display: flex; align-items: center; justify-content: center; gap: 12px; cursor: pointer; }
.bunco[disabled] { opacity: .45; cursor: not-allowed; }
.bunco span { font: 800 18px var(--sans); background: #ffffffc2; border: var(--bw) solid var(--card-ink); border-radius: 999px; padding: 4px 12px; }
.status { display: flex; align-items: center; gap: 12px; margin-top: 18px; padding: 14px 16px; }
.status p { font-weight: 700; font-size: 17px; }
.status p span { display: block; font-weight: 600; font-size: 15px; color: var(--ink-soft); }
.meter { height: 12px; border-radius: 999px; border: var(--bw) solid var(--line); background: var(--surface); margin-top: 8px; overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: var(--t1); border-right: var(--bw) solid var(--line); }
.last { margin-top: 12px; font-size: 15px; font-weight: 600; color: var(--ink-soft); text-align: center; }
.who-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.big-move { text-align: center; padding: 28px 18px; }
.big-move .display { font-size: 64px; line-height: 1; margin: 8px 0; }

/* ---------- leaderboard ---------- */
.live { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 800; }
.live i { width: 10px; height: 10px; border-radius: 50%; background: #1f9d5c; box-shadow: 0 0 0 3px #1f9d5c33; }
.prizes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.prize { padding: 14px 16px 16px; display: flex; flex-direction: column; min-height: 168px; min-width: 0; }
.prize .top { display: flex; flex-direction: column-reverse; align-items: flex-start; gap: 10px; }
.prize .top b { font-size: 16px; line-height: 1.2; }
.prize .ico { width: 40px; height: 40px; border-radius: 50%; background: var(--card-ink); color: #fff; display: grid; place-items: center; flex: none; }
.prize .ico .i { width: 22px; height: 22px; }
.prize .who { font: 800 26px/1.05 var(--display); margin-top: auto; padding-top: 14px; overflow-wrap: anywhere; }
.prize .who.none { font-size: 20px; opacity: .75; }
.prize .stat { font-weight: 700; font-size: 16px; margin-top: 4px; }
.prize .gift { font-weight: 700; font-size: 14px; margin-top: 6px; }
.prize .tie { display: inline-block; margin-top: 8px; font-size: 14px; font-weight: 800; background: #ffffffc2; border: var(--bw) solid var(--card-ink); border-radius: 999px; padding: 2px 10px; align-self: flex-start; }
.standings { padding: 6px 0; }
.colh, .srow { display: grid; grid-template-columns: 44px minmax(0, 1fr) 46px 46px 46px; gap: 6px; align-items: center; padding: 0 14px; }
.colh { font-size: 14px; font-weight: 800; color: var(--ink-soft); padding-top: 10px; padding-bottom: 8px; }
.colh span:nth-child(n+3), .srow .n { text-align: center; }
.srow { min-height: 64px; border-top: var(--bw) solid var(--line-soft); }
.rank { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font: 800 17px var(--sans); border: var(--bw) solid var(--line); }
.r1 .rank { background: var(--t1); color: var(--card-ink); border-color: var(--card-ink); }
.r2 .rank { background: var(--t5); color: var(--card-ink); border-color: var(--card-ink); }
.r3 .rank { background: var(--t2); color: var(--card-ink); border-color: var(--card-ink); }
.srow .name { min-width: 0; }
.srow .name b { display: block; font-size: 18px; line-height: 1.2; overflow-wrap: anywhere; }
.srow .name span { font-size: 14px; color: var(--ink-soft); font-weight: 600; }
.srow .n { font: 800 20px var(--sans); }
.srow .n.dim { color: var(--ink-soft); font-weight: 700; }
.srow.me { background: color-mix(in srgb, var(--t3) 35%, transparent); }
.more { display: flex; justify-content: center; padding: 10px 14px 8px; border-top: var(--bw) solid var(--line-soft); }
.end p { text-align: center; color: var(--ink-soft); font-weight: 600; font-size: 15px; margin-top: 8px; }
.winners-hero { text-align: center; padding: 26px 18px; }
.winners-hero h1 { font-size: 38px; }
.winners-hero p { font-weight: 700; margin-top: 8px; }

/* ---------- more / join code ---------- */
.qrbox { display: grid; justify-items: center; gap: 14px; text-align: center; }
.qrbox canvas, .qrbox .qr { width: min(280px, 72vw); height: auto; aspect-ratio: 1; background: #fff; border: var(--bw) solid var(--card-ink); border-radius: var(--radius-m); padding: 12px; image-rendering: pixelated; }
.qrbox .btn { white-space: nowrap; }
.code-text { font: 800 26px/1.1 var(--display); letter-spacing: .04em; overflow-wrap: anywhere; }
.link-text { font-size: 15px; font-weight: 700; color: var(--ink-soft); overflow-wrap: anywhere; }
.menu-item { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 8px 0; text-decoration: none; color: inherit; width: 100%; background: none; border: 0; font: inherit; text-align: left; cursor: pointer; }
.menu-item + .menu-item { border-top: var(--bw) solid var(--line-soft); }
.menu-item .ico { width: 46px; height: 46px; border-radius: 14px; border: var(--bw) solid var(--card-line); color: var(--card-ink); display: grid; place-items: center; flex: none; }
.menu-item b { display: block; font-size: 18px; }
.menu-item span { display: block; font-size: 15px; color: var(--ink-soft); font-weight: 600; }

/* ---------- account ---------- */
.plans { display: grid; gap: 12px; }
@media (min-width: 640px) { .plans { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); } }
.plan-card .amt, .card .amt { font: 800 40px/1 var(--display); margin-top: 6px; }
.plan-card .amt small, .card .amt small { font: 700 16px var(--sans); }

/* ---------- kit ---------- */
.kit-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.kit-swatch { width: 44px; height: 44px; border-radius: 10px; border: var(--bw) solid var(--line); }
.sw-canvas { background: var(--bg); } .sw-surface { background: var(--surface); } .sw-accent { background: var(--ink); }
.sw-accent-soft { background: var(--t4); } .sw-danger { background: var(--danger); } .sw-warn { background: var(--t1); }

/* ---------- desktop: host screens use the room ---------- */
@media (min-width: 900px) {
  .app.wide { max-width: 1160px; padding-left: 32px; padding-right: 32px; }
  .app.wide .tables { grid-template-columns: repeat(3, 1fr); }
  .app.wide .summary { grid-template-columns: 1fr auto; align-items: center; }
  .app.wide .summary .legend { grid-column: 1; }
  .app.wide .summary > .btn, .app.wide .summary > .row { grid-column: 2; grid-row: 1 / span 2; }
  .app.wide .split { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
  .app.wide .split > div > .section-h:first-child { margin-top: 12px; }
  .app.wide .nights { grid-template-columns: 1fr 1fr; }
  .app.wide .split > div > .stack:first-child + .panel { margin-top: 22px; }
  .app.wide .split.setup-split > div:last-child > :first-child .section-h, .app.wide .split.setup-split > div:last-child > .section-h:first-child { margin-top: 0; }
}

/* ---------- printable score cards ---------- */
.print-sheet { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
@media (min-width: 700px) { .print-sheet { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.scorecard { background: #fff; color: #17201b; border: 2px solid #17201b; border-radius: 14px; padding: 12px 14px; break-inside: avoid; font-size: 13px; }
.scorecard h3 { font-size: 20px; }
.scorecard .sub { font-weight: 700; font-size: 13px; margin: 2px 0 8px; }
.scorecard table { width: 100%; border-collapse: collapse; }
.scorecard th, .scorecard td { border: 1px solid #17201b; padding: 2px 4px; text-align: center; height: 20px; }
.scorecard th { font-size: 11px; background: #eef7f2; }
.scorecard tfoot td { font-weight: 800; }
.print-only { display: none; }
@media print {
  @page { margin: 10mm; }
  :root, :root[data-theme="dark"] { --bg: #fff; --ink: #17201b; color-scheme: light; }
  body { background: #fff; padding: 0; }
  .no-print, .tabbar, .toasts, .offline-banner, .skip { display: none !important; }
  .print-only { display: block; }
  .app { max-width: none; padding: 0; }
  .print-sheet { gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.scorecard small { font-size: 10px; font-weight: 600; }
@media print { .print-door { break-after: page; border: 0; } .print-door .qr { width: 90mm; } }
