/* The table tent in WeHo's colors: one typeface, hard edges, and whole fields of
   bracket color. Forest is always Advanced and clay is always Beginner, on every screen. */
:root {
  color-scheme: light;
  --ground: #f7f6f1;
  --surface: #ecebe4;
  --raised: #dddcd3;
  --ink: #1e2423;
  --muted: #56605c;
  --rule: #d3d3ca;
  --alert: #a3341f;
  --adv: #27423a;
  --adv-ink: #f1eee6;
  --adv-mark: #a8c7b5; /* Advanced as text or a mark on dark grounds. */
  --beg: #e3b458;
  --beg-ink: #1e2423;
  --beg-mark: #e3b458; /* Beginner as text or a mark on dark grounds. */
  --beg-swatch: var(--beg);
  --tv-ground: #1e2423;
  --adv-swatch: var(--adv);
  --adv-swatch-ink: var(--adv-ink);
  --font: 'Archivo', system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --ground: #161b1a;
    --surface: #1f2624;
    --raised: #303a37;
    --ink: #f1eee6;
    --muted: #b6bdb8;
    --rule: #303a37;
    --alert: #f2a58e;
    --adv-swatch: var(--adv-mark);
    --beg-swatch: var(--beg-mark);
    --adv-swatch-ink: #1e2423;
  }
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --ground: #161b1a;
  --surface: #1f2624;
  --raised: #303a37;
  --ink: #f1eee6;
  --muted: #b6bdb8;
  --rule: #303a37;
  --alert: #f2a58e;
  --adv-swatch: var(--adv-mark);
    --beg-swatch: var(--beg-mark);
  --adv-swatch-ink: #1e2423;
}
/* A signed-up player's whole screen takes their bracket's color. */
body[data-field='advanced'] { color-scheme: dark; --ground: var(--adv); --ink: var(--adv-ink); --muted: var(--adv-ink); --rule: var(--adv-ink); --surface: transparent; --raised: rgba(241, 238, 230, 0.18); --alert: var(--adv-ink); }
body[data-field='beginner'] { color-scheme: light; --ground: var(--beg); --ink: var(--beg-ink); --muted: var(--beg-ink); --rule: var(--beg-ink); --surface: transparent; --raised: rgba(30, 36, 35, 0.14); --alert: var(--beg-ink); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 16px/1.4 var(--font); font-variant-numeric: tabular-nums; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 1.5rem; font-weight: 800; line-height: 1.15; font-stretch: 90%; text-wrap: balance; }
h2 { font-size: 1.25rem; font-weight: 800; line-height: 1.15; font-stretch: 90%; }
h3 { font-size: 1rem; font-weight: 700; }
a { color: inherit; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 0.9375rem; }
.stack { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.error { color: var(--alert); font-weight: 700; }
.notice { font-weight: 700; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

button, .button {
  font: 700 1rem var(--font); min-height: 48px; padding: 10px 16px; border: 2px solid var(--ink); border-radius: 0;
  background: transparent; color: var(--ink); cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; touch-action: manipulation;
}
button.primary, .button.primary { background: var(--ink); color: var(--ground); }
button.danger { color: var(--alert); border-color: var(--alert); }
button.quiet { border-color: transparent; text-decoration: underline; text-underline-offset: 3px; padding-inline: 8px; }
button.compact, .button.compact { min-height: 36px; padding: 4px 10px; font-size: 0.875rem; border-width: 1px; border-color: var(--muted); }
@media (pointer: coarse) { button.compact, .button.compact { min-height: 44px; } }
button.quiet.compact { border-color: transparent; }
button.danger.compact { border-color: var(--alert); }
button:disabled { opacity: 0.5; cursor: default; }
button.full { width: 100%; }

label { display: grid; gap: 4px; font-weight: 600; font-size: 0.875rem; }
input, select {
  font: 500 16px var(--font); min-height: 48px; padding: 8px 12px; width: 100%; border-radius: 0;
  border: 2px solid var(--muted); background: var(--ground); color: var(--ink);
}
input:focus, select:focus { border-color: var(--ink); outline: none; }
input[type='checkbox'] { width: 22px; min-height: 22px; accent-color: var(--ink); }
.check { display: flex; align-items: center; gap: 10px; font-weight: 500; font-size: 1rem; }

/* Text tabs: the selected one gets a heavy underline. */
.tabs { display: flex; gap: 20px; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; border-bottom: 1px solid var(--rule); scrollbar-width: none; }
.tabs button { border: 0; border-bottom: 4px solid transparent; padding: 8px 0; min-height: 44px; white-space: nowrap; font-weight: 600; color: var(--muted); margin-bottom: -1px; }
.tabs button[aria-pressed='true'] { color: var(--ink); border-bottom-color: var(--ink); font-weight: 800; }
.chip-swatch { width: 12px; height: 12px; display: inline-block; flex: none; }
.chip-swatch.advanced { background: var(--adv-swatch); }
.chip-swatch.beginner { background: var(--beg-swatch); }

/* The club logo: one white file, masked so it takes the text color of any ground. */
.logo { width: 132px; aspect-ratio: 1513 / 1191; background: currentColor; -webkit-mask: url('/img/weho-logo.webp') center / contain no-repeat; mask: url('/img/weho-logo.webp') center / contain no-repeat; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.logo-file { background: none; -webkit-mask: none; mask: none; height: auto; display: block; } /* Printers handle a plain image more reliably than a mask. */
.tent .logo { width: min(60vw, 240px); margin: 20px auto 0; }
.join-head { display: grid; gap: 4px; justify-items: center; text-align: center; }
.join-head .logo { width: min(136px, 17vh); }
.join-head .join-title { font-size: 2.4rem; }
@media (max-height: 620px) { .join-head .logo { width: 84px; } .join-head .join-title { font-size: 2rem; } }
#join { gap: 12px; }
#join .stack { gap: 8px; }
.nobreak { white-space: nowrap; }

/* ---------- Player ---------- */
.shell { max-width: 480px; margin: 0 auto; padding: 8px 20px 40px; display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.shell.wide { max-width: 1280px; }

.join-title { font-size: clamp(3rem, 15vw, 4.2rem); font-weight: 900; font-stretch: 62%; line-height: 0.88; text-transform: uppercase; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choice { display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; width: 1px; min-height: 0; }
.choice span { display: block; height: 100%; border: 2px solid var(--muted); padding: 12px; }
.choice b { display: block; font-size: 1.15rem; font-weight: 800; font-stretch: 85%; }
.choice small { display: block; font-size: 0.9375rem; font-weight: 500; color: var(--muted); margin-top: 2px; }
.choice input:checked + span { border-color: var(--ink); background: var(--adv); color: var(--adv-ink); }
.choice input[value='beginner']:checked + span { background: var(--beg); color: var(--beg-ink); }
.choice input:checked + span small { color: inherit; }
.choice input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; }
.choice input:disabled + span { opacity: 0.5; }

.tent { display: grid; gap: 10px; }
.tent-meta { display: flex; justify-content: space-between; gap: 12px; font-weight: 700; font-size: 0.94rem; font-stretch: 90%; }
.tent-call { font-size: clamp(3rem, 15vw, 4.2rem); font-weight: 900; font-stretch: 62%; line-height: 0.88; text-transform: uppercase; }
.tent-num { font-size: min(62vw, 15rem); font-weight: 900; font-stretch: 62%; line-height: 0.8; letter-spacing: -0.02em; margin-left: -0.03em; }
.tent-num.long { font-size: min(44vw, 11rem); }
.tent-fold { border: 0; border-top: 3px dashed var(--ink); margin: 6px -20px; }
.tent-vs { font-size: 1.5rem; font-weight: 800; font-stretch: 85%; line-height: 1.1; }
.tent-next { font-weight: 500; }
.scorepad { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 8px; }
.last-result { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-top: 2px solid var(--ink); padding-top: 10px; }

.up-alert { position: fixed; inset: 0; z-index: 20; background: var(--tv-ground); color: var(--adv-ink); display: flex; flex-direction: column; justify-content: center; gap: 12px; padding: max(24px, env(safe-area-inset-top, 0px)) 24px 24px; animation: up-flash 0.5s steps(2) 3; }
.up-alert .tent-call, .up-alert .tent-num { color: var(--adv-mark); }
.up-alert.beginner .tent-call, .up-alert.beginner .tent-num { color: var(--beg-mark); }
.up-alert button { border-color: var(--adv-ink); color: var(--tv-ground); background: var(--adv-ink); }
@keyframes up-flash { 50% { background: #39504a; } }
@media (prefers-reduced-motion: reduce) { .up-alert { animation: none; } }

/* Match card, shared by lists and the tree: a framed box with a status band,
   one row per player, and scores in their own aligned column. */
.mcard { background: var(--ground); border: 1px solid var(--muted); font-size: 0.9375rem; }
.mhead { display: flex; justify-content: space-between; gap: 8px; padding: 3px 8px; font-size: 0.8125rem; font-weight: 600; background: var(--raised); }
.mcard.onboard { border: 2px solid var(--ink); }
.mcard.onboard .mhead { background: var(--ink); color: var(--ground); font-weight: 800; }
.mcard.done { border-color: var(--raised); }
.mcard.done .mhead { background: transparent; color: var(--muted); border-bottom: 1px solid var(--raised); }
.mcard.mine { outline: 3px solid var(--ink); outline-offset: 1px; }
.mrow { display: grid; grid-template-columns: minmax(0, 1fr) 2.75em; align-items: stretch; min-height: 34px; }
.mrow + .mrow { border-top: 1px solid var(--raised); }
.mrow .nm { padding: 6px 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; align-self: center; }
.mrow .sc { display: grid; place-items: center; font-weight: 700; border-left: 1px solid var(--raised); }
.mrow.win .nm { font-weight: 800; }
.mrow.win .sc { background: var(--ink); color: var(--ground); font-weight: 900; }
.mrow.lose .nm, .mrow.lose .sc, .mrow.tbd .nm { color: var(--muted); }
.mrow.tbd .nm { font-style: italic; }
.mlist { display: grid; gap: 8px; }
.format { font-size: 0.875rem; color: var(--muted); max-width: 72ch; }

/* Tree */
.tree-wrap { overflow: auto; max-height: 80vh; }
.tree-heads, .tree { display: flex; width: max-content; }
.tree-heads > div { width: 264px; font-size: 0.875rem; font-weight: 800; padding-bottom: 8px; }
.tree-heads small { font-weight: 500; color: var(--muted); display: block; font-size: 0.75rem; }
.tree-col { width: 264px; display: flex; flex-direction: column; }
.tree-cell { flex: 1 1 0; display: flex; align-items: center; padding: 6px 24px 6px 0; position: relative; min-height: 118px; }
.tree-cell > .mcard { width: 100%; }
.tree-cell.linked::after { content: ''; position: absolute; right: 10px; width: 14px; border-right: 1px solid var(--muted); }
.tree-cell.linked:nth-child(odd)::after { top: 50%; bottom: 0; border-top: 1px solid var(--muted); }
.tree-cell.linked:nth-child(even)::after { top: 0; bottom: 50%; border-bottom: 1px solid var(--muted); }
.narrow-only { display: none !important; }
@media (max-width: 899px) {
  .wide-only { display: none !important; }
  .narrow-only { display: grid !important; }
}
.pager { display: flex; align-items: center; gap: 12px; }

/* ---------- Director ---------- */
.adm { max-width: 1400px; margin: 0 auto; padding: 0 29px 48px; display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
.adm-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; min-height: 64px; border-bottom: 1px solid var(--rule); padding-block: 8px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 28px; height: 28px; display: block; }
.code-note { font-size: 0.875rem; color: var(--muted); }
.code-note b { color: var(--ink); font-size: 1.05rem; letter-spacing: 0.08em; }
.title-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.tools-toggle { display: none; }
.pages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 480px; }
.pages button { min-height: 44px; border-width: 1px; margin-left: -1px; }
.pages button[aria-pressed='true'] { background: var(--ink); color: var(--ground); font-weight: 800; }
.sticky-tools { display: grid; gap: 8px; }
.panel.summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.summary p { max-width: 90ch; }
.celebrate { font-family: 'Marcellus', Georgia, serif; font-stretch: normal; font-weight: 400; text-transform: none; letter-spacing: 0; }
@media (max-width: 700px) { .prog .muted { display: none; } .sticky-tools { position: sticky; top: 0; z-index: 5; background: var(--ground); padding-block: 6px; } }
.find { max-width: 480px; }
.find input { min-height: 44px; }
.found:empty { display: none; }
.found { background: var(--surface); padding: 4px 16px; }
.progs { display: grid; gap: 6px; max-width: 720px; }
.prog { display: grid; gap: 2px; font-size: 0.9375rem; }
.prog progress { width: 100%; height: 8px; accent-color: var(--ink); }
.mcard.tappable { cursor: pointer; }
.mcard.tappable:hover { outline: 2px solid var(--ink); outline-offset: -1px; }
.grid-all { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1000px) { .grid-all { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .adm { padding: 0 16px 40px; gap: 14px; }
  .adm-top { min-height: 0; flex-wrap: wrap; gap: 8px; }
  .brand { flex: 1; min-width: 0; }
  .brand h1 { font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tools-toggle { display: inline-flex; }
  .adm-tools { display: none; width: 100%; }
  .adm-tools.open { display: flex; }
}
.grid-live { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1000px) { .grid-live { grid-template-columns: minmax(0, 8fr) minmax(320px, 4fr); } }
.panel { background: var(--surface); padding: 16px; display: grid; gap: 12px; min-width: 0; }
.panel.urgent { background: var(--ink); color: var(--ground); --muted: var(--ground); --rule: var(--ground); }
.panel.urgent button { color: var(--ground); border-color: var(--ground); }
.list > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--rule); flex-wrap: wrap; }
.list > div:first-child { border-top: 0; }
.tbl-tag { font-weight: 800; flex: none; min-width: 2.2em; display: inline-block; }
.pill { font-size: 0.75rem; font-weight: 700; padding: 1px 6px; background: var(--ink); color: var(--ground); flex: none; white-space: nowrap; }
.mins { font-weight: 700; flex: none; }

.board { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 4px; }
.board button { display: grid; gap: 2px; justify-items: start; align-content: space-between; min-height: 76px; min-width: 0; border: 0; padding: 6px 8px; background: var(--raised); text-align: left; font-weight: 500; }
.board b { font-size: 1.35rem; font-weight: 900; font-stretch: 75%; line-height: 1; }
.board small { font-size: 0.75rem; white-space: nowrap; }
.tile-names { font-size: 0.8125rem; font-weight: 600; line-height: 1.15; max-width: 100%; overflow-wrap: anywhere; }
.board button.free { background: transparent; outline: 1px solid var(--raised); outline-offset: -1px; color: var(--muted); cursor: default; opacity: 1; }
.board.advanced button.slow { background: var(--adv-swatch); color: var(--adv-swatch-ink); }
.board.beginner button.slow { background: var(--beg); color: var(--beg-ink); }
.board button.call { outline: 3px solid var(--alert); outline-offset: -3px; }

details.fold { background: var(--surface); padding: 0 16px; }
details.fold > summary { cursor: pointer; font-weight: 700; padding: 14px 0; min-height: 48px; }
details.fold[open] { padding-bottom: 16px; }
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
dialog { border: 0; background: var(--surface); color: var(--ink); padding: 20px; width: min(440px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(0, 0, 0, 0.7); }
.winner-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.winner-pick button { min-height: 72px; font-size: 1.05rem; line-height: 1.15; }
.winner-pick button[aria-pressed='true'] { background: var(--ink); color: var(--ground); }
.how { font-size: 0.9375rem; border-top: 1px solid var(--rule); padding-top: 10px; }
.how summary { font-weight: 700; cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: 6px; }
.how summary::before { content: '+'; font-weight: 800; width: 1em; }
.how[open] summary::before { content: '\2212'; }
.how summary::-webkit-details-marker { display: none; }
.how ol { margin: 6px 0 0; padding-left: 1.3em; display: grid; gap: 5px; }
.rejoin-note { font-size: 0.9375rem; border-top: 1px solid var(--rule); padding-top: 10px; margin-top: 8px; }
.rejoin-note b { letter-spacing: 0.08em; }
.qr { background: #fff; padding: 12px; width: 100%; display: block; }

/* ---------- TV: sized to the screen, for reading across a room ---------- */
.tv-net { position: fixed; left: 50%; bottom: 2vh; transform: translateX(-50%); z-index: 30; background: #f1eee6; color: #1e2423; padding: 1vh 1.6vw; font-size: min(1.6vw, 2.8vh); font-weight: 800; }
.tv-net[hidden] { display: none; }
.tv { font-size: min(1.4vw, 2.5vh); height: 100vh; padding: 1.6vh 1.6vw; display: flex; flex-direction: column; gap: 1.4vh; overflow: hidden; cursor: none; background: var(--tv-ground); color: #f1eee6; --ink: #f1eee6; --muted: #b6bdb8; --surface: #2a322f; --raised: #39433f; --rule: #39433f; --ground: var(--tv-ground); }
.tv-bar { display: flex; align-items: baseline; gap: 1em; padding: 0.15em 0.6em; font-weight: 800; flex: none; }
.tv-bar h1 { font-size: 2em; font-weight: 900; font-stretch: 65%; line-height: 1.1; text-transform: uppercase; }
.tv-part { font-size: 1.2em; white-space: nowrap; }
.tv-format { margin-left: auto; font-weight: 600; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-format.champ { font-size: 1.4em; font-weight: 900; }
.tv-bar.advanced { background: var(--adv); color: var(--adv-ink); outline: 1px solid var(--adv-mark); outline-offset: -1px; }
.tv-bar.beginner { background: var(--beg); color: var(--beg-ink); outline: 1px solid var(--beg-mark); outline-offset: -1px; }

.tv-split { display: grid; grid-template-columns: minmax(0, 30fr) minmax(0, 70fr); gap: 1.6vw; flex: 1; min-height: 0; }
.tv-matchups { min-width: 0; overflow: hidden; display: flex; flex-direction: column; }
.tv-scroll { flex: 1; min-height: 0; overflow: hidden; }
.tv-scroll-rows { will-change: transform; }
.tv-sub { display: flex; justify-content: space-between; align-items: baseline; gap: 1em; border-bottom: 2px solid #f1eee6; padding-bottom: 0.2em; }
.tv-sub h2 { font-size: 1.25em; font-weight: 800; }
.tv-row { display: flex; align-items: center; gap: 0.5em; height: 2.3em; border-bottom: 1px solid #39433f; min-width: 0; }
.tv-row b { font-size: 1.6em; font-weight: 900; font-stretch: 65%; min-width: 1.45em; flex: none; }
.advanced .tv-row b, .advanced .tv-table { color: var(--adv-mark); }
.beginner .tv-row b, .beginner .tv-table { color: var(--beg-mark); }
.tv-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 0.88em; }
.tv-row i { font-style: normal; color: #b6bdb8; font-weight: 400; margin-inline: 0.35em; }
.tv-matchups.few .tv-row { height: 3.2em; }
.tv-matchups.few .tv-row b { font-size: 2.2em; }
.tv-matchups.few .tv-row span { font-size: 1.1em; }
.tv-format.champ { font-family: 'Marcellus', Georgia, serif; font-weight: 400; }
.tv-empty { padding-top: 0.6em; color: #b6bdb8; }

.tv .tv-tree { display: flex; width: auto; min-width: 0; min-height: 0; }
.tv-tree .tree-col { flex: 1 1 0; width: auto; min-width: 0; }
.tv-round { font-weight: 800; border-bottom: 2px solid #f1eee6; margin-right: 1.2em; padding-bottom: 0.2em; font-size: 1.1em; white-space: nowrap; overflow: hidden; }
.tv-round small { font-weight: 500; color: #b6bdb8; }
.tree-cells { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.tv .tree-cell { min-height: 0; padding: 0.2em 1.2em 0.2em 0; }
.tv .tree-cell.linked::after { right: 0.35em; width: 0.5em; border-color: #b6bdb8; }
.tv-match { display: flex; align-items: stretch; width: 100%; min-width: 0; background: #2a322f; }
.tv-match.live { outline: 2px solid #f1eee6; outline-offset: -2px; }
.tv-table { flex: none; width: 1.6em; display: grid; place-items: center; font-size: 1.5em; font-weight: 900; font-stretch: 65%; }
.tv-names { flex: 1; min-width: 0; padding: 0.1em 0.45em; }
.tv-table + .tv-names { padding-left: 0; }
.tv-name { display: flex; justify-content: space-between; gap: 0.4em; line-height: 1.65; font-size: 0.92em; font-weight: 600; }
.tv-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-name.win { font-weight: 900; }
.tv-name.lose, .tv-name.tbd { color: #b6bdb8; font-weight: 500; }

/* The sign, on the TV rotation and on its own page */
.big-sign .logo { width: min(21vw, 32vh); }
.tv-matchups > .logo { width: 70%; margin: 3em auto 0; }
.tv.field, .poster { background: var(--adv); color: var(--adv-ink); }
.big-sign { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4vw; align-items: center; }
.big-sign .qr { height: min(86vh, 50vw); width: auto; aspect-ratio: 1; padding: 2vh; }
.big-sign-copy { display: grid; gap: 2vh; min-width: 0; align-content: center; justify-items: center; text-align: center; }
.big-sign .counts { justify-content: center; }
.big-sign h1 { font-size: min(10vw, 20vh); white-space: nowrap; font-weight: 900; font-stretch: 62%; line-height: 0.82; text-transform: uppercase; }
.big-sign p { font-size: min(2vw, 3.8vh); font-weight: 600; max-width: 30em; }
.counts { display: flex; gap: 4vw; font-size: min(2vw, 3.8vh); font-weight: 700; }
.counts b { font-size: 3em; font-weight: 900; font-stretch: 62%; line-height: 1; display: block; }
.poster { height: 100vh; padding: 4vh 4vw; overflow: hidden; }
.poster .poster-code b { font-weight: 900; }
.poster .poster-code b:last-child { letter-spacing: 0.08em; }
/* The print button appears only with a mouse over the page, so the TV stays clean. */
.poster button { position: absolute; left: 4vw; bottom: 1.5vh; border-color: var(--adv-ink); color: var(--adv); background: var(--adv-ink); font-size: min(1.2vw, 2.2vh); min-height: 0; opacity: 0; }
.poster:hover button, .poster button:focus-visible { opacity: 1; }
@media (hover: none) { .poster button { display: none; } }

@media (max-aspect-ratio: 1/1), (max-width: 700px) {
  .tv { height: auto; min-height: 100vh; overflow: visible; font-size: 16px; padding: 16px 20px; cursor: auto; }
  .tv-split, .big-sign { grid-template-columns: minmax(0, 1fr); }
  .tv-tree { overflow-x: auto; }
  .tv-tree .tree-col { flex: none; width: 240px; }
  .big-sign { gap: 20px; }
  .big-sign .qr { width: 100%; height: auto; }
  .big-sign h1 { font-size: 26vw; }
  .big-sign .logo { width: 150px; }
  .big-sign p, .counts { font-size: 1.1rem; }
  .poster { height: auto; min-height: 100vh; padding: 24px 20px; overflow: visible; }
  .poster button { position: static; opacity: 1; font-size: 1rem; min-height: 48px; }
}
@media print {
  @page sign { size: letter portrait; margin: 0; }
  .poster { page: sign; height: 10.9in; overflow: hidden; -webkit-print-color-adjust: exact; print-color-adjust: exact; grid-template-columns: minmax(0, 1fr); padding: 0.5in 0.6in; gap: 0.2in; align-content: center; }
  .poster h1 { font-size: 1.2in; }
  .poster .logo { width: 2.2in; }
  .poster p { font-size: 18pt; }
  .poster .big-sign-copy { gap: 0.14in; }
  .poster .qr { width: 4.3in; height: auto; padding: 0.15in; justify-self: center; }
}

/* ---------- Backup sheet ---------- */
.lookup { columns: 2; column-gap: 24px; font-size: 0.875rem; }
.lookup > div { display: grid; grid-template-columns: minmax(0, 1.2fr) 3.5em minmax(0, 1.2fr); gap: 8px; padding: 3px 0; border-top: 1px solid var(--rule); break-inside: avoid; }
@media (max-width: 700px) { .lookup { columns: 1; } }
.sheet { max-width: 1100px; margin: 0 auto; padding: 24px 20px 48px; display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); }
.sheet-scroll { overflow-x: auto; }
.sheet table { border-collapse: collapse; width: 100%; font-size: 0.875rem; }
.sheet th { text-align: left; font-weight: 600; color: var(--muted); padding: 4px 8px 4px 0; }
.sheet td { border-top: 1px solid var(--rule); padding: 6px 8px 6px 0; }
.sheet td.write { min-width: 90px; border-bottom: 1px solid var(--ink); }
@media print {
  :root { --ground: #fff; --ink: #000; --muted: #333; --rule: #999; --surface: #fff; color-scheme: light; }
  .no-print { display: none !important; }
  @page { margin: 0.4in; }
  .sheet { padding: 0; gap: 10pt; max-width: none; }
  .sheet table, .lookup { font-size: 9.5pt; }
  .sheet td { padding: 2.5pt 6pt 2.5pt 0; }
  .sheet section { break-before: page; gap: 8pt; }
  .sheet section:first-of-type { break-before: auto; }
  tr { break-inside: avoid; }
}
