/* AR Frenzy Tournament: one design system for the public site, the program portal, the scorer's table
   and the admin. Tokens first (light, then dark for the viewer's system setting), then the shared
   components. Rules of the system: sentence case; 13px is the smallest text; cards are lifted by
   surface colour, not borders; standalone controls are 48px on touch screens; red means live. */

:root {
  --blue: #0047AB; --blue-dark: #00337a; --blue-ink: #ffffff;
  --sky: #e9f0fb;
  --ink: #1b202b; --ink-2: #3a404c; --ink-3: #4b5260; --ink-4: #6b7280;
  --rule: #dfe3ea; --court: #f1f3f6; --surface: #ffffff; --surface-2: #f1f3f6; --field: #ffffff;
  --green: #1f6b3a; --green-bg: #e3f1e8;
  --amber: #7a4d00; --amber-bg: #fff1d6;
  --red: #a12622; --red-bg: #fdeeee; --live: #C8102E;
  --gold: #f5c542;
  --head: 'Barlow Semi Condensed', 'Arial Narrow', 'Segoe UI', Arial, sans-serif;
  --body: 'Inter', 'Segoe UI', Arial, sans-serif;
  --t-meta: 13px; --t-sm: 14px; --t-body: 16px; --t-title: 20px; --t-display: 28px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s6: 24px; --s8: 32px;
  --r-card: 14px; --r-ctl: 10px;
  --hit: 44px; --gap-touch: 8px;
  --m-press: 120ms; --m-state: 180ms; --m-sheet: 240ms; --ease: cubic-bezier(.2,.7,.2,1);
  --tabbar-h: 0px;
}
@media (pointer: coarse) { :root { --hit: 48px; } }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --blue: #7aa8ff; --blue-dark: #a5c4ff; --blue-ink: #0b1a33;
    --sky: #1b2740;
    --ink: #eceff5; --ink-2: #cfd5e0; --ink-3: #aab2c5; --ink-4: #8b93a6;
    --rule: #343b4d; --court: #12161f; --surface: #1d222e; --surface-2: #2a3142; --field: #2a3142;
    --green: #9fd6b5; --green-bg: #1b3a28;
    --amber: #f5c76b; --amber-bg: #3d2f12;
    --red: #ff8a8a; --red-bg: #3a1c1c; --live: #ff6b7a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --blue: #7aa8ff; --blue-dark: #a5c4ff; --blue-ink: #0b1a33;
  --sky: #1b2740;
  --ink: #eceff5; --ink-2: #cfd5e0; --ink-3: #aab2c5; --ink-4: #8b93a6;
  --rule: #343b4d; --court: #12161f; --surface: #1d222e; --surface-2: #2a3142; --field: #2a3142;
  --green: #9fd6b5; --green-bg: #1b3a28;
  --amber: #f5c76b; --amber-bg: #3d2f12;
  --red: #ff8a8a; --red-bg: #3a1c1c; --live: #ff6b7a;
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--court); color: var(--ink); font-family: var(--body); font-size: var(--t-body); line-height: 1.45; -webkit-tap-highlight-color: transparent; }
a { color: var(--blue); }
h1, h2, h3 { text-wrap: balance; }
h1 { font-family: var(--head); font-weight: 700; font-size: var(--t-display); line-height: 1.1; margin: var(--s3) 0 var(--s1); }
h2 { font-family: var(--head); font-weight: 700; font-size: 22px; line-height: 1.15; margin: 0 0 var(--s2); }
h3 { font-size: 16px; font-weight: 700; line-height: 1.3; margin: 0 0 var(--s2); }
.lede { color: var(--ink-2); margin: 0 0 var(--s3); }
.muted { color: var(--ink-3); font-size: var(--t-meta); }
.sec { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s2); font-size: var(--t-sm); font-weight: 600; color: var(--ink-3); margin: var(--s6) 0 var(--s2); }
.sec a { font-weight: 600; text-decoration: none; }
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: var(--r-ctl); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
@view-transition { navigation: auto; }
.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; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--blue); color: var(--blue-ink); padding: 10px 14px; border-radius: var(--r-ctl); z-index: 100; font-weight: 700; }
.skip:focus { left: 8px; }

/* ---------- page progress during in-place navigation ---------- */
#ar-progress { position: fixed; left: 0; right: 0; top: 0; height: 3px; z-index: 90; background: var(--blue); transform: scaleX(0); transform-origin: 0 50%; opacity: 0; }
html.loading #ar-progress { opacity: 1; transform: scaleX(.85); transition: transform 2s var(--ease); }
html.loading [data-soft-root] button[type=submit] { cursor: progress; }

/* ---------- skeleton ---------- */
.sk { background: var(--surface); border-radius: var(--r-card); min-height: 92px; margin-bottom: var(--s2); position: relative; overflow: hidden; }
.sk::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, var(--surface-2), transparent); transform: translateX(-100%); animation: sk 1.2s infinite; }
@keyframes sk { to { transform: translateX(100%); } }

/* ---------- app shell ---------- */
.appbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; background: var(--surface); box-shadow: 0 1px 0 var(--rule); }
.appbar-in { max-width: 1200px; margin: 0 auto; min-height: 52px; padding: 4px max(16px, env(safe-area-inset-right)) 4px max(16px, env(safe-area-inset-left)); display: flex; align-items: center; gap: var(--s3); }
.brand { display: flex; align-items: center; gap: var(--s2); min-width: 0; color: var(--ink); text-decoration: none; min-height: 44px; }
.brand .mark { flex: none; width: 32px; height: 32px; border-radius: 9px; background: var(--blue); color: var(--blue-ink); display: grid; place-items: center; font-family: var(--head); font-weight: 700; font-size: 15px; }
.brand .t { font-family: var(--head); font-weight: 700; font-size: 20px; line-height: 1.05; white-space: nowrap; }
.brand .s { display: block; font-family: var(--body); font-size: var(--t-meta); font-weight: 400; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; }
.fresh { margin-left: auto; flex: none; display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-meta); font-weight: 600; color: var(--ink-3); white-space: nowrap; }
.fresh:empty { display: none; }
.fresh::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.fresh.bad { color: var(--amber); } .fresh.bad::before { background: var(--amber); }
.topnav { display: none; gap: var(--s1); margin-left: var(--s6); }
.topnav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s3); border-radius: var(--r-ctl); color: var(--ink-2); font-weight: 600; font-size: 15px; text-decoration: none; transition: background var(--m-state) var(--ease), color var(--m-state) var(--ease); }
.topnav a:hover { background: var(--surface-2); }
.topnav a.on { color: var(--blue); background: var(--sky); }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(4, 1fr); background: var(--surface); box-shadow: 0 -1px 0 var(--rule); padding: 0 env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px; color: var(--ink-3); font-size: var(--t-meta); font-weight: 600; text-decoration: none; }
.tabbar a svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a.on { color: var(--blue); }
.tabbar a.on svg { fill: var(--sky); }
body[data-page="public"] { padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 760px) {
  .topnav { display: flex; }
  .tabbar { display: none; }
  body[data-page="public"] { padding-bottom: 0; }
}
.wrap { max-width: 1200px; margin: 0 auto; padding-block: var(--s3) 40px; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.foot { padding: var(--s4); font-size: var(--t-meta); color: var(--ink-3); text-align: center; }

/* ---------- chips and segments ---------- */
.chips, .pills { display: flex; gap: var(--s2); overflow-x: auto; padding: 2px 0 var(--s2); scrollbar-width: none; scroll-snap-type: x proximity; }
.chips::-webkit-scrollbar, .pills::-webkit-scrollbar { display: none; }
.chips > a, .chips > .chip, .pills > a { flex: none; scroll-snap-align: start; display: inline-flex; align-items: center; justify-content: center; min-height: var(--hit); min-width: var(--hit); padding: 0 14px; border-radius: 999px; background: var(--surface); color: var(--ink); font-size: var(--t-sm); font-weight: 600; text-decoration: none; transition: background var(--m-state) var(--ease), color var(--m-state) var(--ease); }
.chips > a.on, .pills > a.on { background: var(--blue); color: var(--blue-ink); }
.chip select { appearance: none; -webkit-appearance: none; border: 0; background: transparent; color: inherit; font: inherit; min-height: var(--hit); padding-right: 16px; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-size: 5px 5px; background-position: right 5px center, right 0 center; background-repeat: no-repeat; max-width: 170px; }
.chip select:focus-visible { outline: none; }
.seg { display: flex; gap: var(--s1); padding: 3px; background: var(--surface-2); border-radius: 12px; margin: var(--s2) 0 var(--s3); }
.seg > a { flex: 1 1 0; display: flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 var(--s2); border-radius: 9px; color: var(--ink-2); font-size: var(--t-sm); font-weight: 600; text-decoration: none; transition: background var(--m-state) var(--ease); white-space: nowrap; }
.seg > a.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
html.js .pane:not(.on) { display: none; }

/* ---------- cards and buttons ---------- */
.card { background: var(--surface); border-radius: var(--r-card); padding: var(--s4); margin: var(--s3) 0; }
.banner-ok { background: var(--green-bg); }
.banner-warn { background: var(--amber-bg); }
.banner-err { background: var(--red-bg); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--hit); padding: 0 var(--s4); border-radius: var(--r-ctl); background: var(--blue); color: var(--blue-ink); font: inherit; font-weight: 600; font-size: 15px; text-decoration: none; border: 0; cursor: pointer; transition: background var(--m-press) var(--ease), transform var(--m-press) var(--ease); }
.btn:hover, .btn:focus-visible { background: var(--blue-dark); color: var(--blue-ink); }
.btn:active { transform: scale(.98); }
.btn-ghost { background: var(--surface-2); color: var(--blue); }
.btn-ghost:hover, .btn-ghost:focus-visible { background: var(--sky); color: var(--blue); }
.btn-danger { background: var(--red-bg); color: var(--red); }
.btn-danger:hover, .btn-danger:focus-visible { background: var(--red-bg); color: var(--red); filter: brightness(.96); }
.btn-sm { min-height: 36px; padding: 0 var(--s3); font-size: var(--t-sm); }
@media (pointer: coarse) { .btn-sm { min-height: 44px; } }
.btn-wide { width: 100%; }
.actions { display: flex; gap: var(--s2); flex-wrap: wrap; margin-top: var(--s3); align-items: center; }
button[data-confirm].asking { background: var(--red); color: #fff; }
button[data-confirm].asking::after { content: ' · press again'; font-weight: 500; }
button.busy { opacity: .7; cursor: progress; }
button.busy::after { content: ''; display: inline-block; width: 14px; height: 14px; margin-left: 8px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; vertical-align: -2px; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.pill { display: inline-block; font-size: var(--t-meta); font-weight: 600; border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.pill-ok { background: var(--green-bg); color: var(--green); }
.pill-warn { background: var(--amber-bg); color: var(--amber); }
.pill-off { background: var(--surface-2); color: var(--ink-3); }
.pill-bad, .pill-live { background: var(--red-bg); color: var(--red); }
.pill-next { background: var(--sky); color: var(--blue); }

/* ---------- forms ---------- */
input, select, textarea { color-scheme: inherit; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: var(--s3); align-items: end; }
.fgroup { display: flex; flex-direction: column; gap: var(--s1); min-width: 0; }
.fgroup > label { font-size: var(--t-meta); color: var(--ink-3); font-weight: 600; }
.finput { border: 1px solid var(--rule); border-radius: var(--r-ctl); padding: 7px 10px; font: inherit; font-size: 16px; min-height: var(--hit); width: 100%; background: var(--field); color: var(--ink); }
.finput[type=color] { padding: 3px 4px; cursor: pointer; }
textarea.finput { min-height: 200px; font-family: Consolas, Menlo, monospace; font-size: var(--t-sm); }
.w-s { width: 80px; } .w-m { width: 140px; } .w-l { width: 220px; }
details.addbox { padding: 0; background: transparent; }
details.addbox > summary { list-style: none; display: inline-flex; }
details.addbox > summary::-webkit-details-marker { display: none; }
details.addbox > .addbody { background: var(--surface); border-radius: var(--r-card); padding: var(--s4); margin-top: var(--s2); }
details.dsp summary { cursor: pointer; color: var(--blue); font-weight: 600; font-size: var(--t-sm); list-style: none; min-height: 36px; display: inline-flex; align-items: center; }
details.dsp summary::-webkit-details-marker { display: none; }
details.dsp .fgrid { margin-top: var(--s2); }

/* ---------- tables: real tables from 720px up, labelled rows below ---------- */
.table-scroll { overflow-x: auto; }
table.rpt { border-collapse: collapse; width: 100%; font-size: var(--t-sm); }
table.rpt th, table.rpt td { border-bottom: 1px solid var(--rule); padding: 10px 8px; text-align: left; vertical-align: middle; }
table.rpt tr:last-child td { border-bottom: 0; }
table.rpt th { font-size: var(--t-meta); font-weight: 600; color: var(--ink-3); white-space: nowrap; }
table.rpt td.num, table.rpt th.num { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 719px) {
  table.rpt.list, table.rpt.list tbody, table.rpt.list tr, table.rpt.list td { display: block; width: 100%; }
  table.rpt.list tr:first-child:has(th) { display: none; }
  table.rpt.list tr { padding: var(--s3) 0; border-bottom: 1px solid var(--rule); }
  table.rpt.list tr:last-child { border-bottom: 0; }
  table.rpt.list td { border: 0; padding: 3px 0; display: flex; gap: var(--s3); align-items: baseline; text-align: left; flex-wrap: wrap; }
  table.rpt.list td.num { text-align: left; }
  table.rpt.list td[data-label]:not([data-label=""])::before { content: attr(data-label); flex: 0 0 104px; font-size: var(--t-meta); color: var(--ink-3); font-weight: 600; }
  table.rpt.list td:empty { display: none; }
  table.rpt.list td > .finput { flex: 1 1 140px; }
}

/* ---------- messages: result messages float above the page and clear themselves ---------- */
.flash { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(68px + env(safe-area-inset-bottom, 0px)); width: min(520px, calc(100vw - 24px)); z-index: 70; margin: 0; padding: var(--s3) 44px var(--s3) var(--s4); border-radius: var(--r-card); background: #1f2430 !important; color: #fff !important; box-shadow: 0 8px 28px rgba(0,0,0,.28); animation: flash-in var(--m-sheet) var(--ease); }
.flash * { color: inherit; }
.flash .flash-x { position: absolute; right: 4px; top: 4px; width: 40px; height: 40px; border: 0; background: transparent; color: inherit; font-size: 20px; cursor: pointer; border-radius: 50%; }
.flash .btn, .flash button.btn { background: #fff; color: #1f2430; }
@keyframes flash-in { from { opacity: 0; transform: translate(-50%, 10px); } }
@media (min-width: 760px) { .flash { bottom: 20px; } }

/* ---------- bottom sheet (a side panel on wide screens) ---------- */
dialog.sheet { border: 0; padding: 0; margin: auto 0 0; width: 100%; max-width: none; max-height: 86vh; background: var(--surface); color: var(--ink); border-radius: 18px 18px 0 0; overflow: auto; padding-bottom: env(safe-area-inset-bottom, 0px); }
dialog.sheet[open] { animation: sheet-in var(--m-sheet) var(--ease); }
dialog.sheet::backdrop { background: rgba(10,14,22,.45); }
@keyframes sheet-in { from { transform: translateY(40px); opacity: .4; } }
.sheet-h { display: flex; justify-content: center; padding: 10px 0 6px; touch-action: none; }
.sheet-h::before { content: ''; width: 40px; height: 4px; border-radius: 4px; background: var(--rule); }
.sheet-b { padding: var(--s2) max(16px, env(safe-area-inset-right)) var(--s4) max(16px, env(safe-area-inset-left)); }
.sheet-x { position: absolute; right: 6px; top: 6px; width: 44px; height: 44px; border: 0; background: transparent; color: var(--ink-3); font-size: 22px; cursor: pointer; border-radius: 50%; }
@media (min-width: 1024px) {
  dialog.sheet { margin: 0 0 0 auto; width: 440px; height: 100vh; max-height: 100vh; border-radius: 18px 0 0 18px; }
  @keyframes sheet-in { from { transform: translateX(40px); opacity: .4; } }
  .sheet-h { display: none; }
  .sheet-b { padding-top: var(--s6); }
}

/* ---------- game card: when and where first, then the two teams ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: var(--s2); }
.gc { display: flex; flex-direction: column; gap: 2px; background: var(--surface); border-radius: var(--r-card); padding: var(--s3); color: var(--ink); text-decoration: none; transition: background var(--m-press) var(--ease); }
a.gc:hover { background: var(--surface-2); }
.gc-when { display: flex; justify-content: space-between; gap: var(--s2); font-size: 15px; font-weight: 600; margin-bottom: 2px; }
.gc-meta { font-size: var(--t-meta); color: var(--ink-3); margin-top: 2px; }
.st { font-size: var(--t-meta); font-weight: 600; color: var(--ink-3); white-space: nowrap; }
.st.live { color: var(--live); }
.st.live::before { content: '● '; }
.st.pending { color: var(--amber); }
.gc-t { display: flex; align-items: center; gap: var(--s2); min-height: 26px; }
.gc-t .sd { width: 18px; flex: none; color: var(--ink-3); font-size: var(--t-meta); font-variant-numeric: tabular-nums; text-align: right; }
.gc-t .n { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gc-t .n.tbd { color: var(--ink-3); font-style: italic; }
.gc-t .p { font-family: var(--head); font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; min-width: 26px; text-align: right; }
.gc-t.w .n { font-weight: 700; } .gc-t.w .p { color: var(--blue); }
.p.bump { animation: bump .3s var(--ease); } @keyframes bump { 50% { transform: scale(1.18); } }
.gc.champ { box-shadow: inset 0 0 0 2px var(--gold); }
.banner-champ { display: flex; align-items: center; gap: var(--s3); background: var(--amber-bg); border-radius: var(--r-card); padding: var(--s3) var(--s4); margin: var(--s2) 0; }
.trophy { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--gold); color: #5a4300; display: grid; place-items: center; font-weight: 700; }

/* ---------- schedule feed ---------- */
.feed { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: var(--s2); }
.tgrp { position: sticky; top: calc(52px + env(safe-area-inset-top, 0px)); z-index: 5; grid-column: 1 / -1; font-family: var(--head); font-weight: 700; font-size: 20px; background: var(--court); padding: var(--s2) 0 var(--s1); }
.row { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 0 var(--s3); align-items: start; background: var(--surface); border-radius: var(--r-card); padding: var(--s3); color: var(--ink); text-decoration: none; transition: background var(--m-press) var(--ease); }
a.row:hover { background: var(--surface-2); }
.row .ct { width: 40px; height: 40px; border-radius: var(--r-ctl); background: var(--sky); color: var(--blue); display: grid; place-items: center; font-weight: 700; font-size: var(--t-sm); }
.row .gc-t { min-height: 22px; }
.row .rw-meta { display: flex; justify-content: space-between; gap: var(--s2); font-size: var(--t-meta); color: var(--ink-3); margin-top: 3px; }

/* ---------- search and your team ---------- */
.find { position: relative; margin: 0 0 var(--s3); display: flex; gap: var(--s2); }
.find input { flex: 1 1 auto; min-width: 0; min-height: 48px; border: 0; border-radius: 12px; padding: 0 14px; font: inherit; background: var(--surface); color: var(--ink); }
.find input::placeholder { color: var(--ink-3); }
.find button { min-height: 48px; }
.q-results { position: absolute; left: 0; right: 0; top: 54px; z-index: 25; background: var(--surface); border-radius: var(--r-card); box-shadow: 0 10px 30px rgba(0,0,0,.2); overflow: hidden; }
.q-results a { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); min-height: 52px; padding: var(--s2) var(--s4); color: var(--ink); text-decoration: none; }
.q-results a + a { border-top: 1px solid var(--rule); }
.q-results a:hover, .q-results a:focus-visible { background: var(--surface-2); }
.q-results small { color: var(--ink-3); font-size: var(--t-meta); white-space: nowrap; }
.mine { display: none; margin-bottom: var(--s3); }
html.has-star .mine { display: block; }
.mine.sk { min-height: 168px; }
.myteam { position: relative; background: var(--blue); color: var(--blue-ink); border-radius: 16px; padding: var(--s4); }
.myteam .lb { font-size: var(--t-meta); font-weight: 600; opacity: .92; }
.myteam .nm { font-size: 17px; font-weight: 700; margin-top: 2px; padding-right: 36px; }
.myteam .big { font-family: var(--head); font-weight: 700; font-size: 34px; line-height: 1.08; margin: var(--s2) 0 2px; }
.myteam .vs { font-size: 15px; }
.myteam .path { font-size: var(--t-sm); margin-top: var(--s2); opacity: .95; }
.myteam .acts { display: flex; gap: var(--s2); margin-top: var(--s3); }
.myteam .acts a { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 44px; border-radius: var(--r-ctl); background: rgba(127,127,127,.28); color: inherit; font-size: var(--t-sm); font-weight: 600; text-decoration: none; text-align: center; padding: 0 var(--s2); }
.myteam .x { position: absolute; right: 4px; top: 4px; width: 44px; height: 44px; border: 0; background: transparent; color: inherit; font-size: 20px; cursor: pointer; }
.star { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 48px; min-height: 48px; padding: 0 var(--s3); border: 0; border-radius: var(--r-ctl); background: var(--surface-2); color: var(--ink-2); font: inherit; font-weight: 600; font-size: var(--t-sm); cursor: pointer; }
.star[aria-pressed="true"] { background: var(--sky); color: var(--blue); }
.star.icon { background: transparent; padding: 0; font-size: 20px; color: var(--ink-3); }
.star.icon[aria-pressed="true"] { color: var(--blue); }

/* ---------- team list ---------- */
.teams { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: var(--s2); }
.tm { display: flex; align-items: center; background: var(--surface); border-radius: var(--r-card); padding-right: var(--s1); }
.tm > a { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: var(--s3); min-height: 52px; padding: var(--s2) var(--s3); color: var(--ink); text-decoration: none; }
.tm .sd { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--sky); color: var(--blue); display: grid; place-items: center; font-weight: 700; font-size: var(--t-meta); }
.tm .nm { flex: 1 1 auto; min-width: 0; font-weight: 500; overflow-wrap: anywhere; }
.tm .rec { flex: none; color: var(--ink-3); font-size: var(--t-meta); font-variant-numeric: tabular-nums; }
.kd { display: grid; grid-template-columns: max-content 1fr; gap: var(--s1) var(--s3); font-size: 15px; }
.kd b { font-weight: 600; font-variant-numeric: tabular-nums; }
.reg-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s2) 0; }
.reg-row + .reg-row { border-top: 1px solid var(--rule); }
.reg-row .btn { flex: none; }
.kd .done { color: var(--ink-3); }

/* ---------- bracket viewer: the whole tree, on every screen ---------- */
.bv { background: var(--surface); border-radius: var(--r-card); overflow: hidden; display: flex; flex-direction: column; }
.bv-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); padding: var(--s2); }
.bv-team { flex: 1 1 170px; min-width: 0; width: auto; }
.bv-zoom { display: flex; gap: var(--s1); margin-left: auto; }
.bv-zoom button { min-width: var(--hit); min-height: var(--hit); padding: 0 var(--s2); border: 0; border-radius: var(--r-ctl); background: var(--surface-2); color: var(--ink); font: inherit; font-weight: 600; font-size: var(--t-sm); cursor: pointer; }
.bv-zoom button.big { font-size: 20px; }
.bv-s { overflow: auto; max-height: 72vh; padding: var(--s2); touch-action: pan-x pan-y; overscroll-behavior: contain; cursor: grab; -webkit-overflow-scrolling: touch; }
.bv-s.drag { cursor: grabbing; user-select: none; }
.bv-s svg { display: block; }
.bv.full { position: fixed; inset: 0; z-index: 80; border-radius: 0; padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); }
.bv.full .bv-s { flex: 1 1 auto; max-height: none; min-height: 0; }
svg.bracket text { font-family: var(--body); }
svg.bracket .box { fill: var(--field); stroke: var(--rule); } svg.bracket .box.champ { stroke: var(--gold); stroke-width: 2.5; }
svg.bracket .sep { stroke: var(--rule); } svg.bracket .lnk { stroke: var(--ink-4); } svg.bracket .lnk.loser { stroke: var(--rule); }
svg.bracket .lbl, svg.bracket .st, svg.bracket .sd, svg.bracket .src, svg.bracket .lmk { fill: var(--ink-3); } svg.bracket .st { font-size: 11px; } svg.bracket .st.live { fill: var(--live); }
svg.bracket .st.live::before { content: none; }
svg.bracket .hd { fill: var(--ink); font-weight: 700; }
svg.bracket .nm, svg.bracket .p { fill: var(--ink); } svg.bracket .nm.l { fill: var(--ink-3); } svg.bracket .p.w { fill: var(--blue); }
svg.bracket g[data-game] { cursor: pointer; }
svg.bracket g[data-game]:hover .box { stroke: var(--blue); }
svg.bracket g[data-game]:focus { outline: none; } svg.bracket g[data-game]:focus-visible .box { stroke: var(--blue); stroke-width: 3; }
svg.bracket.has-hl g[data-game]:not(.hl) { opacity: .5; }
svg.bracket.has-hl .lnk:not(.hl) { opacity: .4; }
svg.bracket g.hl .box { stroke: var(--blue); stroke-width: 2.5; }
svg.bracket .lnk.hl { stroke: var(--blue); stroke-width: 3; stroke-dasharray: none; }
.bracket-thumb svg { display: block; width: 100%; height: auto; max-height: 170px; }
.bracket-thumb svg .lbl, .bracket-thumb svg .st, .bracket-thumb svg .hd, .bracket-thumb svg .lmk { display: none; }
.bthumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: var(--s3); }
.bthumb { display: flex; flex-direction: column; gap: var(--s2); background: var(--surface); border-radius: var(--r-card); padding: var(--s3); color: var(--ink); text-decoration: none; transition: background var(--m-press) var(--ease); }
a.bthumb:hover { background: var(--surface-2); }
.bthumb .hd { display: flex; justify-content: space-between; gap: var(--s2); align-items: baseline; }
.bthumb .hd b { font-family: var(--head); font-size: 20px; font-weight: 700; }
.bthumb .hd span { font-size: var(--t-meta); color: var(--ink-3); text-align: right; }
.bthumb .hd span.c { color: var(--blue); font-weight: 600; }
.bthumb .empty { font-size: var(--t-sm); color: var(--ink-3); padding: var(--s3) 0; }

/* ---------- print ---------- */
@media print {
  .appbar, .tabbar, .chips, .pills, .seg, .bv-bar, .foot, .flash { display: none !important; }
  body { background: #fff; padding: 0 !important; }
  html.js .pane:not(.on) { display: block; }
  .bv-s { overflow: visible; max-height: none; }
}

/* ---------- touch screens: every standalone control reaches the hit size ---------- */
.seg > a { min-height: var(--hit); }
.sec a { display: inline-flex; align-items: center; min-height: var(--hit); margin-block: -14px; }
details.dsp summary, .help summary, .nextlink { min-height: var(--hit) !important; display: inline-flex; align-items: center; }
details.addbox > summary.btn-ghost { background: var(--surface); }
@media (pointer: coarse) {
  .finput { min-height: var(--hit) !important; }
  table.rpt td > a:only-child, .row a, .admin-main p > a:only-child { display: inline-flex; align-items: center; min-height: var(--hit); }
}
@media (max-width: 719px) {
  /* long lists read as short rows instead of a stack of labelled lines */
  table.rpt.list.compact tr { display: flex; flex-wrap: wrap; gap: 2px 12px; align-items: center; padding: var(--s2) 0; }
  table.rpt.list.compact td { width: auto; padding: 0; display: inline-flex; gap: 4px; }
  table.rpt.list.compact td[data-label]:not([data-label=""])::before { flex: none; font-weight: 400; }
  table.rpt.list.compact td:nth-child(-n+2)::before { content: none !important; }
  table.rpt.list.compact td:nth-child(2) { font-weight: 600; flex: 1 1 60%; }
}
.tfilter { margin: var(--s2) 0; }

.bv-hint { margin: 0; padding: 0 var(--s3) var(--s2); font-size: var(--t-meta); color: var(--ink-3); }
.bv.full .bv-hint { display: none; }

.pills > a.on .muted, .chips > a.on .muted { color: inherit; }
@media (pointer: coarse) {
  .btn-sm, .brand, .menu > summary, .menu-b a, details.card > summary { min-height: var(--hit); }
  .menu > summary { width: var(--hit); height: var(--hit); }
  .back { width: var(--hit) !important; height: var(--hit) !important; }
}

/* ---------- game moved, standings, survey ---------- */
.moved { font-size: var(--t-meta); font-weight: 600; color: var(--amber); margin-top: 2px; }
.standings { margin-top: 0; }
table.cross th, table.cross td { text-align: center; white-space: nowrap; }
table.cross th:first-child, table.cross tr > th { text-align: left; }
table.cross td.x { background: var(--surface-2); }
table.cross a { text-decoration: none; font-weight: 600; }
.survey { display: flex; flex-direction: column; gap: var(--s3); }
fieldset.rate { border: 0; padding: 0; margin: 0; }
fieldset.rate legend { font-weight: 600; font-size: 15px; padding: 0 0 var(--s1); }
fieldset.rate { display: flex; gap: var(--s2); flex-wrap: wrap; }
fieldset.rate label { flex: 1 1 44px; }
fieldset.rate input { position: absolute; opacity: 0; }
fieldset.rate span { display: flex; align-items: center; justify-content: center; min-height: var(--hit); border-radius: var(--r-ctl); background: var(--surface-2); font-weight: 600; cursor: pointer; }
fieldset.rate input:checked + span { background: var(--blue); color: var(--blue-ink); }
fieldset.rate input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }
.myday .todo { margin-bottom: var(--s2); }
.todo { display: flex; flex-direction: column; gap: var(--s2); background: var(--surface); border-radius: var(--r-card); padding: var(--s3) var(--s4); margin-bottom: var(--s2); }
.todo.urgent { box-shadow: inset 0 0 0 2px var(--amber); }
.todo .acts { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
.printbar .btn { font-size: 14px; }


/* who to call or text */
.helpbox { margin-top: var(--s4); scroll-margin-top: 72px; }
.helpbox h2 { margin: 0 0 var(--s1); font-size: 18px; }
.helpline { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2) var(--s3); padding: var(--s2) 0; }
.helpwho { flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; }
.helpwho b { display: block; font-weight: 600; }
.helpacts { display: flex; flex-wrap: wrap; gap: var(--s2); }

/* settings-style forms: one section per topic, each field wide enough for what goes in it */
.tform-sec { display: grid; grid-template-columns: minmax(0, 190px) minmax(0, 1fr); gap: var(--s3) var(--s6); padding: var(--s6) 0; border-top: 1px solid var(--rule); }
.tform-sec:first-child { border-top: 0; padding-top: var(--s2); }
.tform-sec:last-child { padding-bottom: var(--s2); }
.tform-lead b { font-size: var(--t-body); font-weight: 600; }
.tform-lead p { margin: var(--s1) 0 0; }
.tform-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4) var(--s3); max-width: 720px; align-items: start; }
.tform-fields > .wide { grid-column: 1 / -1; }
.tf { min-width: 0; }
.fhint { margin: var(--s1) 0 0; font-size: var(--t-meta); color: var(--ink-3); }
.tform-foot { margin-top: var(--s4); padding-top: var(--s4); border-top: 1px solid var(--rule); }
.tset { border: 0; margin: 0; padding: 0; min-width: 0; }
.tset > legend { padding: 0; margin-bottom: var(--s1); font-size: var(--t-meta); font-weight: 600; color: var(--ink-3); }
.tchoices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); }
.tchoice { display: flex; gap: var(--s2); align-items: flex-start; padding: var(--s3); border: 1px solid var(--rule); border-radius: var(--r-ctl); background: var(--field); cursor: pointer; min-width: 0; }
.tchoice input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--blue); }
.tchoice > span { min-width: 0; }
.tchoice b { display: block; font-weight: 600; }
.tchoice small { display: block; margin-top: 2px; font-size: var(--t-meta); line-height: 1.35; color: var(--ink-3); }
.tchoice:has(input:checked) { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.tchoice:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: 2px; }
.only-vb { display: none; }
.tform:has(input[name=tn_sport][value=volleyball]:checked) .only-vb { display: block; }
.tform .finput[type=color] { width: 90px; }
@media (max-width: 720px) {
  .tform-sec { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .tform-fields, .tchoices { grid-template-columns: minmax(0, 1fr); }
  .fgrid > .fgroup { grid-column: auto !important; }
}

/* an open add form: its button closes it, and an edit has its own Cancel */
details.addbox[open] > summary { font-size: 0; }
details.addbox[open] > summary::after { content: 'Close'; font-size: 15px; }
details.addbox[open][data-focus] > summary { display: none; }
details.addbox[open][data-focus] > .addbody { margin-top: 0; }
.gbar { margin-bottom: var(--s3); }

/* boys, girls or all */
:root[data-g='B'] [data-gender='G'], :root[data-g='G'] [data-gender='B'] { display: none !important; }
.seg > button { flex: 1 1 0; display: flex; align-items: center; justify-content: center; min-height: var(--hit); padding: 0 var(--s2); border: 0; border-radius: 9px; background: transparent; color: var(--ink-2); font: inherit; font-size: var(--t-sm); font-weight: 600; cursor: pointer; }
.seg > button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.gfilter { max-width: 360px; }

/* ==========================================================================
   Design layer: room to breathe, one card style, a clear button order, one badge style
   ========================================================================== */
.card { padding: var(--s6); margin: 20px 0; border: 1px solid var(--rule); border-radius: 16px; box-shadow: 0 1px 2px rgba(20, 30, 50, .04); }
.card > h3:first-child, .card > h2:first-child { font-size: 17px; margin-bottom: var(--s3); }
.card p:last-child { margin-bottom: 0; }
.card.banner-ok { border-color: transparent; } .card.banner-warn { border-color: transparent; } .card.banner-err { border-color: transparent; }
@media (max-width: 640px) { .card { padding: var(--s4); margin: 14px 0; } }
.flash.card { padding: var(--s3) 44px var(--s3) var(--s4); margin: 0; border: 0; box-shadow: 0 8px 24px rgba(20, 30, 50, .22); }

/* buttons: primary is solid, secondary is outlined, destructive stays quiet until asked for */
.btn { font-weight: 600; }
.btn-lg { min-height: 50px; padding: 0 var(--s6); font-size: 16px; }
.btn-ghost { background: var(--surface); color: var(--blue); box-shadow: inset 0 0 0 1px var(--rule); }
.btn-ghost:hover, .btn-ghost:focus-visible { background: var(--surface-2); color: var(--blue); }
.btn-danger { background: transparent; color: var(--red); }
.btn-danger:hover, .btn-danger:focus-visible { background: var(--red-bg); color: var(--red); filter: none; }
.btn-danger-solid { background: var(--red); color: #fff; }
.btn-danger-solid:hover, .btn-danger-solid:focus-visible { background: var(--red); color: #fff; filter: brightness(.92); }
.btn-sm { min-height: 34px; padding: 0 var(--s3); font-size: 13.5px; border-radius: 8px; }
@media (pointer: coarse) { .btn-sm { min-height: 44px; } }

/* status badges: a dot and a word, the same everywhere */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 3px 10px; line-height: 1.3; }
.pill::before { content: ''; flex: none; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-live::before { animation: pill-pulse 1.4s ease-in-out infinite; }
@keyframes pill-pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .pill-live::before { animation: none; } }

/* tables */
table.rpt th { font-size: 12px; letter-spacing: .02em; padding: 8px 10px; }
table.rpt td { padding: 12px 10px; }
table.rpt:not(.keep) tr:not(:first-child):hover td { background: var(--surface-2); }
.table-scroll { margin: var(--s2) 0 0; }

/* folding sections */
details.fold > summary { display: flex; align-items: center; gap: var(--s3); cursor: pointer; list-style: none; min-height: 28px; margin: 0; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary h3 { margin: 0; font-size: 17px; }
details.fold > summary .meta { margin-left: auto; color: var(--ink-3); font-size: var(--t-meta); font-weight: 500; }
details.fold > summary::after { content: ''; flex: none; width: 8px; height: 8px; margin: 0 4px 0 var(--s2); border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(-45deg); transition: transform .12s; }
details.fold > summary:not(:has(.meta))::after { margin-left: auto; }
details.fold[open] > summary::after { transform: rotate(45deg); }
details.fold[open] > summary { margin-bottom: var(--s4); }
.notice { background: var(--surface-2); border-radius: var(--r-ctl); padding: var(--s3) var(--s4); font-size: var(--t-sm); margin: 0 0 var(--s3); }

/* page header */
.pagehead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: var(--s3) var(--s6); margin: var(--s2) 0 var(--s2); }
.ph-main { flex: 1 1 340px; min-width: 0; }
.ph-side { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--s2); }
.eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); font-size: 12.5px; font-weight: 600; letter-spacing: .03em; color: var(--ink-3); }
.pagehead h1 { font-size: 30px; margin: var(--s1) 0 var(--s1); }
.pagehead .lead { margin: 0; max-width: 70ch; color: var(--ink-2); }
.howto { margin: var(--s2) 0 var(--s4); font-size: var(--t-sm); }
.howto > summary { display: inline-flex; align-items: center; min-height: 32px; cursor: pointer; font-weight: 600; color: var(--blue); }
.howto-b { display: grid; grid-template-columns: 3fr 2fr; gap: var(--s4) var(--s6); margin-top: var(--s2); padding: var(--s4) var(--s6); background: var(--surface); border: 1px solid var(--rule); border-radius: 16px; }
.howto-b p { margin: 0 0 var(--s2); } .howto-b ol { margin: 0; padding-left: 20px; } .howto-b li { margin: 0 0 6px; }
@media (max-width: 760px) { .howto-b { grid-template-columns: minmax(0, 1fr); padding: var(--s4); } }

/* overview */
.hero { background: var(--blue); border-color: transparent; color: var(--blue-ink); padding: var(--s8); }
.hero .eyebrow { color: inherit; opacity: .85; }
.hero h2 { font-size: 28px; margin: var(--s2) 0 var(--s2); color: inherit; }
.hero p { max-width: 62ch; margin: 0 0 var(--s4); opacity: .95; }
.hero .btn { background: #fff; color: #00337a; }
.hero .btn:hover, .hero .btn:focus-visible { background: #e8eefb; color: #00337a; }
@media (max-width: 640px) { .hero { padding: var(--s6) var(--s4); } }
.phases { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: var(--s4); margin: 20px 0; }
.phases .card { margin: 0; }
.phase-h { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.phase-h h3 { margin: 0; font-size: 17px; }
.bar { height: 6px; margin: var(--s3) 0 0; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 999px; background: var(--green); }
.phase-l { list-style: none; margin: var(--s3) 0 0; padding: 0; }
.phase-l li { display: flex; align-items: center; gap: var(--s2); min-height: 34px; }
.phase-l li::before { content: ''; flex: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--rule); box-sizing: border-box; }
.phase-l li.ok::before { content: '✓'; display: grid; place-items: center; border: 0; background: var(--green); color: #fff; font-size: 11px; font-weight: 700; }
.phase-l li.next::before { border-color: var(--blue); box-shadow: 0 0 0 3px var(--sky); }
.phase-l a { color: var(--ink); text-decoration: none; font-size: var(--t-sm); }
.phase-l a:hover { text-decoration: underline; }
.phase-l li.next a { font-weight: 600; color: var(--blue); }
.cardgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: var(--s4); margin: 20px 0; }
.cardgrid .card { margin: 0; }
.chk li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s3); padding: 10px 0 10px 30px; }
.chk li > a { margin-left: auto; font-size: 13.5px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.warnlist { margin: 0; padding-left: 18px; font-size: var(--t-sm); } .warnlist li { margin-bottom: var(--s2); }

/* seeding */
.stepper { display: flex; flex-wrap: wrap; gap: 2px; list-style: none; margin: 0; padding: 0; font-size: 12.5px; font-weight: 600; }
.stepper li { padding: 4px 12px; background: var(--surface-2); color: var(--ink-3); }
.stepper li:first-child { border-radius: 999px 0 0 999px; } .stepper li:last-child { border-radius: 0 999px 999px 0; }
.stepper li.done { background: var(--green-bg); color: var(--green); }
.stepper li.on { background: var(--blue); color: var(--blue-ink); }
.sdot { display: inline-block; width: 8px; height: 8px; margin-left: 6px; border-radius: 50%; background: var(--ink-4); }
.sdot.s-approved, .sdot.s-shared { background: #4f83ee; } .sdot.s-final { background: var(--green); }
.pills > a.on .sdot { box-shadow: 0 0 0 2px #fff; }
table.seeds tr.differs td { background: var(--amber-bg); }
.seedno { font-family: var(--head); font-size: 20px; }
.w-s { width: 72px; }

/* quieter controls in dense places */
.pills > a { min-height: 38px; padding: 0 var(--s3); box-shadow: inset 0 0 0 1px var(--rule); font-size: var(--t-sm); }
.pills > a.on { box-shadow: none; }
.pills.tabs { margin: var(--s3) 0 0; }
.finput.cellsel { min-height: 36px; padding: 3px 6px; font-size: 13px; background: transparent; border: 1px dashed var(--rule); color: var(--ink-3); }
.finput.cellsel:hover, .finput.cellsel:focus { border-style: solid; color: var(--ink); }
.gfilter { margin: 0; width: 240px; max-width: 100%; }
.gfilter > a, .gfilter > button { min-height: 36px; }
@media (pointer: coarse) { .gfilter > a, .gfilter > button { min-height: var(--hit); } }

/* public site */
.hero-pub { margin: var(--s4) 0 var(--s3); }
.hero-pub h1 { margin: 0 0 var(--s1); }
.hero-pub p { margin: 0; color: var(--ink-2); }
.wrap > .gfilter { margin: var(--s3) 0; }
.bthumb, .gc, .tm { border: 1px solid var(--rule); box-shadow: 0 1px 2px rgba(20, 30, 50, .04); }
.gc { padding: var(--s4); }
g[data-game]:hover .box { stroke: var(--blue); }
table.seeds td:nth-child(2) { min-width: 240px; }
details.addbox { border: 0; box-shadow: none; }
details.addbox > .addbody { padding: var(--s6); border: 1px solid var(--rule); border-radius: 16px; }
@media (max-width: 640px) { details.addbox > .addbody { padding: var(--s4); } }

/* ==========================================================================
   AR Frenzy visual system: the bracket is the product, game day is a control
   room, and every page says plainly what to do next.
   ========================================================================== */
:root {
  --ink: #0c0d10; --ink-2: #2c2f37; --ink-3: #4a4f5a; --ink-4: #6b7080;
  --rule: #e2e4e9; --court: #f4f5f7; --surface-2: #f0f1f4;
  --signal: #b5400a; --signal-bg: #fff1e8;
  --head: 'Big Shoulders Display', 'Arial Narrow', 'Segoe UI', Arial, sans-serif;
  --body: 'Instrument Sans', 'Segoe UI', Arial, sans-serif;
  --t-display: 44px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --ink: #eceff5; --ink-2: #cfd5e0; --ink-3: #aab2c5; --rule: #343b4d; --court: #12161f; --surface-2: #2a3142; --signal: #ff9d66; --signal-bg: #3a2415; } }
:root[data-theme="dark"] { --ink: #eceff5; --ink-2: #cfd5e0; --ink-3: #aab2c5; --rule: #343b4d; --court: #12161f; --surface-2: #2a3142; --signal: #ff9d66; --signal-bg: #3a2415; }
h1 { font-weight: 900; letter-spacing: -.005em; line-height: 1; }
h2 { font-weight: 800; font-size: 30px; line-height: 1.05; }
.pagehead h1 { font-size: 52px; line-height: .98; margin: 6px 0 8px; }
.pagehead .lead { font-size: 17px; }
.eyebrow { font-size: 13px; letter-spacing: 0; }
.card > h3:first-child, details.fold > summary h3, .phase-h h3 { font-size: 18px; font-weight: 700; }
.brand .t { font-weight: 800; font-size: 26px; letter-spacing: .005em; }
.brand .mark { font-weight: 800; font-size: 19px; }
.stat b { font-weight: 800; font-size: 38px; }
.seedno { font-weight: 800; font-size: 28px; }
@media (max-width: 640px) { .pagehead h1 { font-size: 40px; } h1 { font-size: 36px; } }

/* ---------- admin frame ---------- */
.admin-top { position: sticky; top: 0; z-index: 30; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s4); padding: 6px max(20px, env(safe-area-inset-right)) 6px max(20px, env(safe-area-inset-left)); background: var(--surface); box-shadow: 0 1px 0 var(--rule); }
.admin-top .brand .t { font-size: 24px; white-space: nowrap; }
.admin-top select { flex: 0 1 auto; width: auto; max-width: 100%; min-width: 0; margin-left: auto; min-height: 40px; font-size: 14px; font-weight: 500; }
/* no tournament to pick, so nothing else pushes the menu to the right edge, and its panel opens leftward */
.admin-top > .brand + .menu { margin-left: auto; }
.stages { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; margin-left: var(--s4); }
.stages::-webkit-scrollbar { display: none; }
.stages a { flex: none; display: inline-flex; align-items: baseline; gap: 6px; min-height: 40px; padding: 9px 14px 0; border-radius: 8px; color: var(--ink-2); font-weight: 600; font-size: 15px; text-decoration: none; }
.stages a:hover { background: var(--surface-2); }
.stages a small { font-size: 12px; font-weight: 500; color: var(--ink-3); }
.stages a.on { background: var(--ink); color: var(--surface); }
.stages a.on small { color: inherit; opacity: .8; }
.admin-frame { max-width: 1320px; margin: 0 auto; padding: var(--s4) max(20px, env(safe-area-inset-right)) 72px max(20px, env(safe-area-inset-left)); }
.admin-main { min-width: 0; }
.subnav { display: flex; gap: var(--s1); overflow-x: auto; scrollbar-width: none; margin: 0 0 var(--s6); padding-bottom: 2px; border-bottom: 1px solid var(--rule); }
.subnav::-webkit-scrollbar { display: none; }
.subnav a { flex: none; display: inline-flex; align-items: center; gap: var(--s2); min-height: 44px; padding: 0 var(--s3); color: var(--ink-3); font-weight: 600; font-size: 14px; text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -3px; }
.subnav a:hover { color: var(--ink); }
.subnav a.on { color: var(--ink); border-bottom-color: var(--blue); }
.subnav a.next:not(.on) { color: var(--blue); }
.subnav .n { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--surface-2); font-size: 11px; font-weight: 700; }
.subnav a.done .n { background: var(--green); color: #fff; }
.subnav a.next .n { background: var(--blue); color: var(--blue-ink); }
@media (max-width: 900px) {
  .admin-top .brand .t { display: none; }
  .admin-top select { flex: 1 1 0; margin-left: 0; }
  .stages { order: 5; flex: 1 1 100%; margin-left: 0; }
  .pagehead .ph-side { justify-content: flex-start; }
}
.devnote { padding: 0 0 var(--s3); }

/* ---------- the wall of brackets ---------- */
.nextbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3) var(--s6); margin: var(--s6) 0 var(--s4); padding: var(--s6); border-radius: 16px; background: var(--blue); color: var(--blue-ink); }
.nextbar > div { flex: 1 1 420px; min-width: 0; }
.nextbar small { display: block; font-size: 13px; font-weight: 600; opacity: .85; margin-bottom: 2px; }
.nextbar h2 { margin: 0 0 4px; color: inherit; font-size: 34px; }
.nextbar p { margin: 0; opacity: .95; max-width: 70ch; }
.nextbar .btn { flex: none; background: #fff; color: #00337a; min-height: 50px; padding: 0 var(--s6); font-size: 16px; }
.nextbar .btn:hover, .nextbar .btn:focus-visible { background: #e8eefb; color: #00337a; }
.journey { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: var(--s3); margin: 0 0 var(--s4); }
.journey a { display: block; padding: var(--s3) var(--s4); background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; color: var(--ink); text-decoration: none; }
.journey a:hover { border-color: var(--blue); }
.journey .j-h { display: flex; justify-content: space-between; align-items: baseline; font-weight: 700; }
.journey .j-h span { font-size: 13px; font-weight: 500; color: var(--ink-3); }
.journey .bar { margin-top: var(--s2); }
.wall-h { margin: var(--s8) 0 var(--s3); font-size: 34px; }
.wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: var(--s4); }
.tile { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s4); background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; color: var(--ink); text-decoration: none; transition: transform var(--m-press), box-shadow var(--m-press), border-color var(--m-press); }
.tile:hover, .tile:focus-visible { border-color: var(--blue); box-shadow: 0 6px 18px rgba(0, 40, 110, .12); transform: translateY(-1px); }
.tile.is-live { border: 2px solid var(--signal); }
.tile-h { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); }
.tile-h b { font-family: var(--head); font-weight: 800; font-size: 36px; line-height: 1; }
.tile-s { font-size: 13px; font-weight: 600; color: var(--ink-3); text-align: right; }
.tile-s.ok { color: var(--green); } .tile-s.live { color: var(--signal); font-weight: 700; } .tile-s.next { color: var(--blue); }
.tile-b { height: 96px; display: flex; align-items: center; justify-content: center; }
.tile-b svg { display: block; width: 100%; height: 100%; }
.tile-b svg text, .tile-b svg .sep, .tile-b svg .wbar { display: none; }
.tile-b svg .box { fill: #dfe2e8; stroke: none; }
.tile-b svg .box.champ { stroke: none; }
.tile-b svg g[data-state='done'] .box { fill: #7fa4e0; }
.tile-b svg g[data-state='live'] .box { fill: #e8590c; }
.tile-b svg .lnk { stroke: #9aa1ae; stroke-width: 4; } .tile-b svg .lnk.loser { stroke: #cdd1d9; stroke-width: 3; stroke-dasharray: none; }
.tile-f { font-size: 13px; color: var(--ink-3); font-weight: 500; min-height: 18px; }

/* ---------- the readiness report ---------- */
.report-h h1 { font-size: 64px; line-height: 1; max-width: 22ch; }
.report-h h1 span { color: var(--signal); }
.report-h .lead { margin-top: var(--s3); }
.report { list-style: none; margin: var(--s6) 0 0; padding: 0; background: var(--surface); border: 1px solid var(--rule); border-radius: 16px; }
.report li { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: var(--s2) var(--s4); align-items: center; padding: var(--s4) var(--s6); border-top: 1px solid var(--rule); }
.report li:first-child { border-top: 0; }
.report .rn { font-family: var(--head); font-weight: 800; font-size: 38px; line-height: 1; color: var(--signal); }
.report .rt { font-size: 16px; font-weight: 500; min-width: 0; }
@media (max-width: 640px) { .report li { grid-template-columns: 40px minmax(0, 1fr); padding: var(--s3) var(--s4); } .report li .btn { grid-column: 2; justify-self: start; } .report-h h1 { font-size: 44px; } }

/* ---------- seeding: the ladder and what it makes ---------- */
.seedboard { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 4fr); gap: var(--s4); align-items: start; margin: 20px 0; }
.seedboard > * { margin: 0; min-width: 0; }
@media (max-width: 1000px) { .seedboard { grid-template-columns: minmax(0, 1fr); } }
.seedstatus { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s3) var(--s6); }
.seedstatus h2 { margin: 0 0 var(--s2); font-size: 38px; }
.seedstatus .actions { margin-top: 0; }
.ladder { padding: var(--s2) 0 var(--s4); }
.ladder-h { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); padding: var(--s3) var(--s4); }
.ladder-h h3 { margin: 0; font-size: 18px; }
.lrow { display: grid; grid-template-columns: 20px 64px minmax(0, 1fr) auto; gap: var(--s1) var(--s2); align-items: center; padding: var(--s3) var(--s4); border-top: 1px solid var(--rule); background: var(--surface); }
.lrow.differs { background: var(--signal-bg); }
.lrow.dragging { opacity: .45; }
.grip { color: var(--ink-4); cursor: grab; font-size: 18px; line-height: 1; user-select: none; text-align: center; }
.seedbig { width: 58px; height: 52px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--ink); text-align: center; font-family: var(--head); font-weight: 800; font-size: 40px; -moz-appearance: textfield; appearance: textfield; }
.seedbig::-webkit-outer-spin-button, .seedbig::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.seedbig:hover, .seedbig:focus { background: var(--surface-2); }
.lteam { min-width: 0; }
.lteam b { font-size: 16px; font-weight: 700; }
.lteam .muted { display: block; margin-top: 1px; }
.lside { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--s2); }
.lmove { display: flex; gap: 2px; }
.lmove button { width: 32px; height: 32px; border: 1px solid var(--rule); border-radius: 6px; background: var(--surface); color: var(--ink-2); font-size: 12px; cursor: pointer; }
.lmove button:hover { background: var(--surface-2); }
.lside select { width: 124px; min-height: 34px; padding: 3px 6px; font-size: 13.5px; }
.lwhy { grid-column: 3 / -1; font-size: 13.5px; }
.lwhy > summary { cursor: pointer; color: var(--blue); font-weight: 600; width: max-content; min-height: 24px; }
.lwhy .finput { margin-top: var(--s1); min-height: 38px; font-size: 14px; }
@media (max-width: 640px) { .lrow { grid-template-columns: 16px 52px minmax(0, 1fr); } .lside { grid-column: 3; justify-content: flex-start; } .lwhy { grid-column: 3; } .seedbig { width: 50px; font-size: 34px; } }
.mups { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: var(--s3); margin-top: var(--s3); }
.mup { border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; }
.mup-l { padding: 6px var(--s3); font-size: 12px; font-weight: 600; color: var(--ink-3); background: var(--surface-2); }
.mup-t { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: var(--s1); align-items: center; padding: var(--s2) var(--s3); border-top: 1px solid var(--rule); font-size: 14px; font-weight: 600; }
.mup-t b { font-family: var(--head); font-weight: 800; font-size: 20px; color: var(--blue); }
.mup-t.feed { color: var(--ink-3); font-weight: 400; font-style: italic; }
.seedtree { overflow-x: auto; }
.seedtree svg { display: block; max-width: 100%; height: auto; }
@media (max-width: 900px) { .seedtree svg { max-width: none; } }
.unsaved { font-size: 13px; font-weight: 600; color: var(--signal); }

/* ---------- running a division from its bracket ---------- */
.runhead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s3) var(--s6); margin: var(--s3) 0; }
.runhead h2 { margin: 0; font-size: 44px; }
.runhead .meta { color: var(--ink-3); font-weight: 500; margin-top: var(--s1); }
.runboard { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--s4); align-items: start; }
.runboard.no-sel { grid-template-columns: minmax(0, 1fr); }
.runboard.no-sel .inspector { position: static; max-height: none; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: var(--s1) var(--s6); }
.runboard.no-sel .inspector .eyebrow, .runboard.no-sel .inspector h2, .runboard.no-sel .inspector > p { grid-column: 1; }
.runboard.no-sel .inspector h3 { grid-column: 2; grid-row: 1; margin-top: 0; }
.runboard.no-sel .inspector .insp-list { grid-column: 2; grid-row: 2 / span 3; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 var(--s4); }
@media (max-width: 760px) { .runboard.no-sel .inspector { display: block; } }
.runmain { min-width: 0; }
.runmain > .card:first-child, .runmain > .bv:first-child { margin-top: 0; }
.bv { background: var(--surface); border: 1px solid var(--rule); border-radius: 16px; margin: 0 0 var(--s4); padding: var(--s2); }
.bv-s { max-height: 70vh; }
.inspector { position: sticky; top: 72px; max-height: calc(100vh - 88px); overflow: auto; padding: var(--s6); border-radius: 16px; background: #0c0d10; color: #fff;
  --surface: #1a1c22; --surface-2: #24272f; --field: #1a1c22; --ink: #fff; --ink-2: #e4e6ec; --ink-3: #c4c8d0; --rule: #3a3d46; --blue: #9fc2ff; --blue-ink: #0c0d10; --blue-dark: #cfe0ff; }
.inspector .eyebrow { color: #c4c8d0; }
.inspector h2 { color: #fff; font-size: 38px; margin: var(--s1) 0 var(--s2); }
.inspector h3 { color: #fff; margin: var(--s4) 0 var(--s2); font-size: 15px; }
.inspector a { color: #9fc2ff; }
.insp-when { color: #c4c8d0; margin: 0 0 var(--s4); }
.insp-score { min-height: 76px; margin-bottom: var(--s3); text-align: center; font-family: var(--head); font-weight: 800; font-size: 48px; }
.inspector .fgroup > label { color: #fff; font-size: 15px; font-weight: 600; }
.insp-note { color: #c4c8d0; font-size: 13.5px; margin: var(--s2) 0 0; }
.insp-more { margin-top: var(--s4); padding-top: var(--s3); border-top: 1px solid #3a3d46; }
.insp-more > summary { cursor: pointer; font-weight: 600; min-height: 28px; }
.insp-more .tform-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: var(--s3); }
.insp-list a { display: block; padding: var(--s2) 0; border-top: 1px solid #3a3d46; color: #fff; text-decoration: none; }
.insp-list b { display: block; font-size: 14px; } .insp-list span { font-size: 13px; color: #c4c8d0; }
@media (max-width: 1100px) { .runboard { grid-template-columns: minmax(0, 1fr); } .inspector { position: static; max-height: none; order: -1; } .runboard.no-sel .inspector { order: 1; } }

/* ---------- game day: the control room ---------- */
body:has(.control) {
  --surface: #131a23; --surface-2: #1f2835; --field: #1b2430; --court: #0b0f14; --ink: #e8edf4; --ink-2: #d3dae4; --ink-3: #a9b4c2; --ink-4: #8d99a8; --rule: #2a3442;
  --blue: #8fb4ff; --blue-dark: #c3d6ff; --blue-ink: #0b1a33; --sky: #1b2740; --green: #6fdba4; --green-bg: #14301f; --amber: #ffcf85; --amber-bg: #33280f; --red: #ff9c94; --red-bg: #3a1714; --live: #ffb547; --signal: #ffb547; --signal-bg: #33280f;
  background: #0b0f14; color: var(--ink); color-scheme: dark;
}
body:has(.control) .subnav a.done .n { color: #0b1a10; }
.control-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: var(--s3) var(--s6); }
.ch-title h1 { margin: var(--s1) 0 0; font-size: 56px; }
.ch-clock { font-family: var(--head); font-weight: 800; font-size: 34px; line-height: 1; color: #ffb547; white-space: nowrap; }
.daysel { margin: 0; width: auto; }
.daysel > a { min-height: 36px; padding: 0 var(--s3); white-space: nowrap; }
.ch-prog { display: flex; align-items: center; gap: var(--s2); margin: var(--s3) 0 0; color: var(--ink-3); font-size: 14px; }
.ch-prog b { font-family: var(--head); font-size: 24px; font-weight: 800; color: var(--ink); }
.ch-prog .bar { flex: 1 1 auto; margin: 0 0 0 var(--s2); max-width: 420px; }
.board { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--s4); align-items: start; margin-top: var(--s4); }
.boardmain { min-width: 0; display: flex; flex-direction: column; gap: var(--s4); }
@media (max-width: 1100px) { .board { grid-template-columns: minmax(0, 1fr); } .needs { order: -1; } }
.courts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: var(--s4); }
.ccard { display: flex; flex-direction: column; padding: var(--s4); background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; }
.ccard.live { border-color: #ffb547; } .ccard.late { border-color: #ff6b5e; }
.cc-h { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s2); margin-bottom: var(--s2); }
.cc-h b { font-weight: 700; font-size: 15px; }
.cc-h span { font-size: 13px; font-weight: 600; color: var(--ink-3); }
.ccard.live .cc-h span { color: #ffb547; } .ccard.late .cc-h span { color: #ff9c94; } .ccard.ok .cc-h span { color: #6fdba4; }
.cc-t { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); padding: 2px 0; font-size: 16px; }
.cc-t b { font-family: var(--head); font-weight: 800; font-size: 42px; line-height: 1; }
.cc-t.win { font-weight: 700; }
.cc-m { margin: var(--s2) 0 var(--s3); font-size: 13px; color: var(--ink-3); }
.ccard .btn { margin-top: auto; }
.cc-late { background: #ff6b5e; color: #1c0a08; }
.cc-late:hover, .cc-late:focus-visible { background: #ff8a80; color: #1c0a08; }
.cc-next { margin-top: var(--s3); font-size: 13px; color: var(--ink-3); }
.cc-push { display: inline-block; margin-top: var(--s1); font-size: 13px; font-weight: 600; text-decoration: none; }
.cc-empty { color: var(--ink-3); margin: var(--s2) 0; }
.tline { padding: var(--s4); background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; }
.tline h2 { margin: 0 0 var(--s3); font-size: 24px; color: var(--ink); }
.tl-scroll { overflow-x: auto; }
.tl-in { position: relative; min-width: 760px; }
.tl-hours { display: flex; margin-left: 76px; padding-bottom: var(--s2); border-bottom: 1px solid var(--rule); font-size: 12px; color: var(--ink-3); }
.tl-hours span { flex: 1 1 0; }
.tl-lane { display: flex; align-items: center; height: 66px; border-bottom: 1px solid var(--rule); }
.tl-lane:last-of-type { border-bottom: 0; }
.tl-c { flex: 0 0 76px; font-weight: 600; font-size: 14px; }
.tl-track { position: relative; flex: 1 1 auto; height: 50px; }
.tl-g { position: absolute; top: 0; bottom: 0; min-width: 34px; padding: 5px 7px; border-radius: 7px; background: var(--surface-2); color: var(--ink-2); font-size: 12px; line-height: 1.25; text-decoration: none; overflow: hidden; white-space: nowrap; }
.tl-g b { display: block; font-weight: 700; } .tl-g span { display: block; }
.tl-g:hover, .tl-g:focus-visible { outline: 2px solid #8fb4ff; outline-offset: 1px; }
.tl-g.live { background: #33280f; box-shadow: inset 0 0 0 1px #ffb547; color: #fff; }
.tl-g.late { background: #3a1714; box-shadow: inset 0 0 0 1px #ff6b5e; color: #fff; }
.tl-g.next { background: #14233f; box-shadow: inset 0 0 0 1px #5c8df0; color: #fff; }
.tl-now-wrap { position: absolute; top: 22px; bottom: 0; left: 76px; right: 0; pointer-events: none; }
.tl-now { position: absolute; top: 0; bottom: 0; width: 2px; background: #ffb547; }
.needs { padding: var(--s4); background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; }
.needs h3 { margin: 0 0 var(--s2); font-family: var(--head); font-weight: 800; font-size: 24px; }
.needs > div { padding: var(--s3) 0; }
.needs .btn { margin-top: var(--s2); }
body:has(.control) .flash { color: #0c0d10; }

/* ---------- public site ---------- */
.hero-pub h1 { font-size: 56px; }
.wrap > h1 { font-size: 52px; margin-top: var(--s4); }
.bthumb .hd b { font-weight: 800; font-size: 30px; }
.gc-t .p, .rw .p { font-family: var(--head); font-weight: 800; }
@media (max-width: 640px) { .hero-pub h1, .wrap > h1 { font-size: 40px; } }

.tile-b.few svg { width: auto; height: 56px; }

/* the small bracket drawings, the same on the director's wall and the public one */
:root { --mini-box: #dfe2e8; --mini-done: #7fa4e0; --mini-live: #e8590c; --mini-line: #9aa1ae; --mini-loser: #cdd1d9; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --mini-box: #39425a; --mini-done: #5c86d6; --mini-line: #66708a; --mini-loser: #454e63; } }
:root[data-theme="dark"] { --mini-box: #39425a; --mini-done: #5c86d6; --mini-line: #66708a; --mini-loser: #454e63; }
.tile-b svg .box, .bracket-thumb svg .box { fill: var(--mini-box); stroke: none; }
.tile-b svg .box.champ, .bracket-thumb svg .box.champ { stroke: none; }
.tile-b svg g[data-state='done'] .box, .bracket-thumb svg g[data-state='done'] .box { fill: var(--mini-done); }
.tile-b svg g[data-state='live'] .box, .bracket-thumb svg g[data-state='live'] .box { fill: var(--mini-live); }
.tile-b svg .lnk, .bracket-thumb svg .lnk { stroke: var(--mini-line); stroke-width: 4; }
.tile-b svg .lnk.loser, .bracket-thumb svg .lnk.loser { stroke: var(--mini-loser); stroke-width: 3; stroke-dasharray: none; }
.bracket-thumb { height: 96px; display: flex; align-items: center; justify-content: center; }
.bracket-thumb svg { width: 100%; height: 100%; max-height: none; }
.bracket-thumb svg text, .bracket-thumb svg .sep, .bracket-thumb svg .wbar { display: none; }
.bracket-thumb.few svg { width: auto; height: 56px; }
.bthumbs { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: var(--s4); }
.bthumb { padding: var(--s4); }
.bthumb .hd { align-items: center; }
.bthumb .hd b { font-size: 36px; line-height: 1; }
a.bthumb:hover { background: var(--surface); border-color: var(--blue); box-shadow: 0 6px 18px rgba(0, 40, 110, .12); }
.sec { margin: var(--s8) 0 var(--s3); }
.sec > span { font-family: var(--head); font-weight: 800; font-size: 28px; line-height: 1; color: var(--ink); }
.gc-t { font-size: 16px; }
.gc .p, .row .p, .gc-t b, .row .gc-t b { font-family: var(--head); font-weight: 800; font-size: 26px; line-height: 1; }
.hero-pub { margin-top: var(--s6); }
.wrap > h1:first-child { margin-top: var(--s6); }
.find { margin: var(--s4) 0; }
@media (max-width: 900px) {
  .admin-top { position: static; }
  .admin-top .brand { order: 1; }
  .admin-top .menu { order: 2; margin-left: auto; }
  .admin-top select { order: 3; flex: 1 1 100%; }
  .stages { order: 4; }
  .control-head .ph-side { justify-content: flex-start; }
}
@media (max-width: 520px) { select.finput { font-size: 13.5px; padding-left: 8px; padding-right: 4px; } }
.sbox .tm { border: 0; box-shadow: none; }
.endh { margin: 0 0 var(--s1); font-size: 16px; }
