/* =====================================================================
   Gala-stralia 2026 — site styles
   Colours come from the NSBHS crest (maroon, blush pink, gold).
   Each sport has its own colour, set in data/event.js.
   To restyle the site, change the values under :root.
   ===================================================================== */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin-wdth-normal.woff2") format("woff2");
  font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin-wdth-italic.woff2") format("woff2");
  font-weight: 100 900; font-stretch: 62% 125%; font-style: italic; font-display: swap;
}

:root {
  --maroon: #7D0945;
  --maroon-deep: #5A0631;
  --blush: #F8BBAE;
  --blush-wash: #FDF1EE;
  --gold: #AE9A63;
  --gold-ink: #6F5F2E;
  --paper: #FFFFFF;
  --ink: #2A0717;
  --muted: #6B5560;
  --line: #EBDAD6;
  --good: #1B7A47;
  --warn: #A85A00;
  --bad: #B42318;
  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
  --tabbar: 64px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1.0625rem/1.55 var(--font); font-stretch: 100%;
  padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom, 0px));
}
img, svg { max-width: 100%; }
a { color: var(--maroon); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
.on-dark :focus-visible, .hero :focus-visible, .page-head :focus-visible, .foot :focus-visible { outline-color: #fff; }

h1, h2, h3, h4 { margin: 0; text-wrap: balance; }
h1, h2 { font-stretch: 125%; font-weight: 900; font-style: italic; letter-spacing: -.02em; line-height: 1; }
h2 { font-size: clamp(1.7rem, 4.6vw, 2.5rem); }
h3 { font-stretch: 112%; font-weight: 800; font-size: 1.2rem; line-height: 1.15; letter-spacing: -.01em; }
h4 { font-weight: 700; font-size: 1rem; }
p { margin: 0 0 .8em; max-width: 66ch; }
ul, ol { margin: 0; padding-left: 1.25rem; }
li { margin: .3em 0; }
li::marker { color: var(--maroon); font-weight: 700; }
.lead { font-size: 1.2rem; line-height: 1.5; }
.muted { color: var(--muted); }
.num { font-stretch: 75%; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.section { padding-block: clamp(2.25rem, 6vw, 4.25rem); }
.section-tint { background: var(--blush-wash); }
.section > .wrap > h2 { margin-bottom: .55em; }
.section-intro { margin-bottom: 1.6rem; }
.stack > * + * { margin-top: 1.1rem; }

/* ---------- top bar ---------- */
.top {
  position: sticky; top: 0; z-index: 30; background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--maroon); }
.brand img { width: 30px; height: auto; display: block; }
.brand-name { font-stretch: 125%; font-weight: 900; font-style: italic; font-size: 1.12rem; letter-spacing: -.02em; line-height: 1; }
.topnav { display: none; }
.topnav a, .more > summary {
  display: inline-block; padding: 8px 11px; border-radius: 8px; color: var(--ink); text-decoration: none;
  font-weight: 600; font-size: .98rem; cursor: pointer; list-style: none;
}
.more > summary::-webkit-details-marker { display: none; }
.more > summary::after { content: ""; display: inline-block; width: .45em; height: .45em; margin-left: .45em; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-.2em) rotate(45deg); }
.topnav a:hover, .more > summary:hover { background: var(--blush-wash); }
.topnav a[aria-current="page"] { background: var(--maroon); color: #fff; }
.more { position: relative; display: inline-block; }
.more-menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; padding: 8px; background: #fff;
  border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 40px -18px rgba(42, 7, 23, .45);
  display: grid; gap: 2px;
}
.more-menu a { display: block; }

/* ---------- phone tab bar ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: #fff;
  border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px);
  display: grid; grid-template-columns: repeat(5, 1fr);
}
.tabbar a, .tabbar button {
  appearance: none; border: 0; background: none; font: inherit; cursor: pointer; color: var(--muted);
  display: grid; justify-items: center; align-content: center; gap: 3px; height: var(--tabbar);
  text-decoration: none; font-size: .72rem; font-weight: 700; font-stretch: 88%;
}
.tabbar svg { width: 24px; height: 24px; }
.tabbar [aria-current="page"] { color: var(--maroon); }
.tabbar [aria-current="page"] svg { stroke-width: 2.4; }
.sheet { border: 0; padding: 0; margin: auto 0 0; width: 100%; max-width: none; border-radius: 20px 20px 0 0; background: #fff; color: var(--ink); }
.sheet::backdrop { background: rgba(42, 7, 23, .55); }
.sheet-in { padding: 18px var(--gutter) calc(22px + env(safe-area-inset-bottom, 0px)); }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.sheet-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sheet-links a { display: block; padding: 14px; border-radius: 12px; background: var(--blush-wash); color: var(--ink); text-decoration: none; font-weight: 700; }
.sheet-links a[aria-current="page"] { background: var(--maroon); color: #fff; }

@media (min-width: 980px) {
  body { padding-bottom: 0; }
  .tabbar { display: none; }
  .topnav { display: flex; align-items: center; gap: 2px; }
  .top-in { min-height: 68px; }
  .brand img { width: 34px; }
  .brand-name { font-size: 1.25rem; }
}

/* ---------- court surface (hero and page headers) ---------- */
.court {
  background-color: var(--maroon);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 900' preserveAspectRatio='xMaxYMid slice'%3E%3Cg fill='none' stroke='%23fff' stroke-opacity='.2' stroke-width='7'%3E%3Crect x='1338' y='318' width='260' height='264' fill='%23000' fill-opacity='.16'/%3E%3Ccircle cx='1338' cy='450' r='88'/%3E%3Cpath d='M1600 118H1440A332 332 0 0 0 1440 782H1600'/%3E%3Cpath d='M1000 -20V920'/%3E%3Ccircle cx='1000' cy='450' r='150'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right center; background-size: cover;
  color: #fff;
}
.court a { color: #fff; }

.page-head { padding-block: clamp(1.8rem, 5vw, 3.2rem) clamp(1.6rem, 4.5vw, 2.6rem); }
.page-head h1 { font-size: clamp(2.2rem, 7.4vw, 4rem); text-transform: uppercase; }
.page-head p { margin: .9rem 0 0; max-width: 58ch; font-size: 1.12rem; color: #FCE3DC; }

/* ---------- home hero ---------- */
.hero { padding-block: clamp(1.6rem, 5vw, 3.4rem) clamp(2rem, 5vw, 3.6rem); }
.hero-school { margin: 0 0 .9rem; font-weight: 600; color: #FCE3DC; }
.hero h1 { font-size: clamp(3.1rem, 15.5vw, 6.4rem); text-transform: uppercase; line-height: .88; letter-spacing: -.035em; }
.hero-grid { display: grid; gap: 28px; margin-top: clamp(1.4rem, 4vw, 2.4rem); align-items: start; }
.hero-when { font-size: 1.2rem; max-width: 36ch; margin-bottom: 1.3rem; text-wrap: balance; }
@media (min-width: 880px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) auto; gap: 56px; }
}
.hero.is-live .hero-when { display: none; }
@media (max-width: 879px) { .hero.is-live #home-board { order: -1; } }

/* ---------- name finder ---------- */
.finder { max-width: 460px; }
.finder label { display: block; font-weight: 800; font-stretch: 112%; font-size: 1.1rem; margin-bottom: 8px; }
.finder input {
  width: 100%; font: 600 1.1rem/1.2 var(--font); padding: 15px 16px; border-radius: 12px;
  border: 2px solid var(--ink); background: #fff; color: var(--ink);
}
.court .finder input { border-color: #fff; }
.finder input::placeholder { color: #8b7780; font-weight: 500; }
.finder-results { display: grid; gap: 8px; margin-top: 10px; }
.finder-results:empty { display: none; }
.finder-hint { margin: 0; font-size: .95rem; }
.pick {
  appearance: none; font: inherit; text-align: left; cursor: pointer; width: 100%;
  display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center;
  padding: 9px 14px 9px 10px; border-radius: 12px; border: 0; background: #fff; color: var(--ink);
}
.finder:not(.court .finder) .pick { background: var(--blush-wash); }
.pick b { display: block; font-weight: 800; line-height: 1.15; }
.pick span span { display: block; font-size: .92rem; color: var(--muted); }
.pick:hover { background: var(--blush); }

.me {
  display: grid; grid-template-columns: auto 1fr; gap: 14px 16px; align-items: center;
  background: #fff; color: var(--ink); border-radius: 16px; padding: 16px; max-width: 460px;
}
.me-name { font-stretch: 112%; font-weight: 800; font-size: 1.25rem; line-height: 1.1; }
.me-team { color: var(--muted); font-weight: 600; }
.me-next { grid-column: 1 / -1; margin: 0; padding-top: 12px; border-top: 1px solid var(--line); }
.me-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ---------- buttons ---------- */
.btn {
  appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
  font: 800 1rem/1 var(--font); font-stretch: 105%; text-decoration: none;
  padding: 13px 18px; border-radius: 10px; border: 2px solid var(--maroon); background: var(--maroon); color: #fff;
}
.btn:hover { background: var(--maroon-deep); border-color: var(--maroon-deep); }
.btn-ghost { background: transparent; color: var(--maroon); }
.btn-ghost:hover { background: var(--blush-wash); color: var(--maroon-deep); }
.court .btn { background: #fff; border-color: #fff; color: var(--maroon); }
.court .btn:hover { background: var(--blush); border-color: var(--blush); }
.court .btn-ghost { background: transparent; color: #fff; }
.court .btn-ghost:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.linkbtn { appearance: none; border: 0; background: none; padding: 0; font: inherit; font-weight: 700; color: var(--maroon); text-decoration: underline; text-underline-offset: .18em; cursor: pointer; }
.btnrow { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- flip scoreboard (countdown and "on now") ---------- */
.board { background: var(--ink); color: #fff; border-radius: 18px; padding: 18px 18px 16px; width: 100%; max-width: 430px; box-shadow: 0 0 0 4px rgba(255, 255, 255, .12); }
.board-title { margin: 0 0 12px; font-weight: 700; font-size: 1rem; color: #FCE3DC; }
.board-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.unit { text-align: center; }
.flip { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; perspective: 300px; }
.card {
  position: relative; display: block; background: var(--blush); color: var(--ink); border-radius: 6px;
  font-stretch: 75%; font-weight: 800; font-size: clamp(2rem, 9.5vw, 2.9rem); line-height: 1.32; font-variant-numeric: tabular-nums;
  transform-origin: 50% 0;
}
.card::before { content: ""; position: absolute; left: 50%; top: -7px; width: 8px; height: 12px; margin-left: -4px; border: 2px solid #C9BBB0; border-radius: 5px; }
.card::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 2px solid rgba(42, 7, 23, .16); }
.card.tick { animation: flip .28s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes flip { from { transform: rotateX(-88deg); } to { transform: none; } }
.unit-label { display: block; margin-top: 6px; font-size: .85rem; font-weight: 600; color: #FCE3DC; }
.board-foot { margin: 14px 0 0; font-size: .95rem; color: #FCE3DC; max-width: none; }
.now-big { font-stretch: 112%; font-weight: 900; font-style: italic; font-size: 1.9rem; line-height: 1.02; margin: 0 0 6px; letter-spacing: -.02em; }
.now-sub { margin: 0; color: #FCE3DC; max-width: none; }
.now-me { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .22); max-width: none; }
.now-me b { display: block; }

/* ---------- bibs (team markers) ---------- */
.bib { display: inline-block; width: 26px; height: 28px; vertical-align: -.5em; flex: none; }
.bib text { font-family: var(--font); font-stretch: 70%; font-weight: 800; }
.bib-lg { width: 60px; height: 65px; }
.bib-xl { width: 84px; height: 91px; }
.team { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; white-space: nowrap; }

/* ---------- sport chips and tiles ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px 4px 7px; border-radius: 6px;
  background: var(--sc, var(--maroon)); color: #fff; font-weight: 800; font-stretch: 92%; font-size: .9rem; line-height: 1.2; white-space: nowrap;
}
.chip svg { width: 16px; height: 16px; flex: none; }

.sports-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }
.sport-tile { display: block; text-decoration: none; color: #fff; background: var(--sc); border-radius: 16px; overflow: hidden; }
.sport-tile:first-child { grid-column: 1 / -1; }
.sport-photo { display: block; aspect-ratio: 4 / 3; background: var(--sc); position: relative; overflow: hidden; }
.sport-tile:first-child .sport-photo { aspect-ratio: 16 / 9; }
.sport-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sport-photo .ico { position: absolute; inset: 0; margin: auto; width: 46%; height: 46%; opacity: .35; }
.sport-tile-text { display: block; padding: 12px 14px 14px; }
.sport-tile-name { display: block; font-stretch: 112%; font-weight: 900; font-style: italic; font-size: 1.25rem; line-height: 1.05; letter-spacing: -.01em; }
.sport-tile-where { display: block; margin-top: 4px; font-size: .92rem; font-weight: 600; opacity: .95; }
.sport-tile:hover .sport-tile-name { text-decoration: underline; text-underline-offset: .15em; }
@media (min-width: 760px) {
  .sports-grid { grid-template-columns: repeat(5, 1fr); }
  .sport-tile:first-child { grid-column: auto; }
  .sport-tile:first-child .sport-photo { aspect-ratio: 4 / 3; }
}

/* ---------- day strip (home) ---------- */
.daystrip { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.seg { margin: 0; display: grid; grid-template-columns: 5.2rem 1fr; align-items: baseline; gap: 10px; padding: 11px 14px; border-radius: 10px; background: #fff; }
.seg-time { font-stretch: 75%; font-weight: 800; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.seg-what { font-weight: 700; line-height: 1.25; }
.seg-what small { display: block; font-weight: 500; color: var(--muted); font-size: .9rem; }
.seg-key { background: var(--maroon); color: #fff; }
.seg-key small { color: #FCE3DC; }
.seg-break { background: transparent; outline: 2px dashed var(--gold); outline-offset: -2px; }
.seg-finals { background: var(--gold); color: var(--ink); }
.seg-finals small { color: var(--ink); }
.seg.is-now { outline: 3px solid var(--ink); outline-offset: 2px; }
@media (min-width: 900px) {
  .daystrip { display: flex; gap: 5px; align-items: stretch; }
  .seg { flex: var(--m) 1 92px; min-width: 0; display: block; padding: 12px 10px 14px; }
  .seg-time { display: block; margin-bottom: 4px; }
  .seg-what { display: block; font-size: .95rem; }
}

/* ---------- plain columns ---------- */
.cols { display: grid; gap: 26px 40px; }
.cols > div > h3 { margin-bottom: .5rem; padding-top: 12px; border-top: 5px solid var(--maroon); }
@media (min-width: 760px) { .cols { grid-template-columns: repeat(3, 1fr); } .cols-2 { grid-template-columns: repeat(2, 1fr); } }

.note { background: var(--blush-wash); border-radius: 12px; padding: 14px 16px; }
.note > :last-child { margin-bottom: 0; }
.note-strong { background: var(--ink); color: #fff; }
.note-strong a { color: #fff; }

/* ---------- timeline (timetable and my day) ---------- */
.tl { list-style: none; margin: 0; padding: 0; }
.tl-item { margin: 0; display: grid; grid-template-columns: 4.6rem 1fr; gap: 0 14px; position: relative; padding-bottom: 10px; }
.tl-time { text-align: right; padding-top: 12px; line-height: 1.15; }
.tl-time b { display: block; font-stretch: 75%; font-weight: 800; font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.tl-time span { font-size: .82rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.tl-body { border-radius: 12px; padding: 12px 14px; background: var(--blush-wash); border-left: 6px solid var(--sc, var(--line)); min-width: 0; }
.tl-body h3 { font-size: 1.08rem; }
.tl-body p { margin: 2px 0 0; }
.section-tint .tl-body { background: #fff; }
.tl-key .tl-body { background: var(--maroon); color: #fff; border-left-color: var(--maroon-deep); }
.tl-key .tl-body .muted { color: #FCE3DC; }
.tl-break .tl-body { background: transparent; outline: 2px dashed var(--gold); outline-offset: -2px; border-left: 0; }
.tl-game .tl-body { background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.tl-game .tl-top { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-bottom: 6px; }
.tl-round { font-stretch: 75%; font-weight: 800; color: var(--muted); }
.tl-venue { font-stretch: 112%; font-weight: 800; font-size: 1.15rem; line-height: 1.15; }
.tl-vs { margin-top: 4px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tl-item.is-now .tl-body { outline: 3px solid var(--ink); outline-offset: 2px; }
.badge { display: inline-block; font-weight: 800; font-size: .8rem; padding: 3px 8px; border-radius: 99px; background: var(--ink); color: #fff; }
.badge-win { background: var(--good); } .badge-loss { background: var(--muted); } .badge-draw { background: var(--gold-ink); }
.result-line { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-weight: 700; }

/* ---------- tables ---------- */
.tablebox { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--ink); color: #fff; font-weight: 700; font-size: .92rem; white-space: nowrap; }
tbody tr:last-child > * { border-bottom: 0; }
td.c, th.c { text-align: center; }
@media (max-width: 640px) { .hide-sm { display: none; } }

.draw { min-width: 900px; }
.draw thead th { padding: 0; vertical-align: bottom; background: #fff; color: var(--ink); border-bottom: 0; }
.draw thead th > span { display: block; padding: 8px 10px; }
.draw .st-sport { background: var(--sc); color: #fff; font-stretch: 92%; font-weight: 800; }
.draw .st-venue { font-weight: 600; font-size: .84rem; white-space: normal; line-height: 1.2; min-height: 3em; border-bottom: 2px solid var(--ink); }
.draw th.rowhead { position: sticky; left: 0; background: #fff; z-index: 1; white-space: nowrap; border-right: 1px solid var(--line); }
.draw th.rowhead b { display: block; font-stretch: 75%; font-weight: 800; font-size: 1.2rem; }
.draw th.rowhead span { font-size: .82rem; font-weight: 600; color: var(--muted); }
.draw td { font-size: .93rem; line-height: 1.2; padding: 8px 10px; border-left: 1px solid var(--line); }
.draw td .team { display: flex; margin: 3px 0; }
.draw td.mine { background: var(--blush); box-shadow: inset 0 0 0 3px var(--maroon); }

.roundpick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.roundpick button { appearance: none; cursor: pointer; font: 800 1rem/1 var(--font); font-stretch: 85%; padding: 11px 13px; border-radius: 10px; border: 2px solid var(--line); background: #fff; color: var(--ink); }
.roundpick button[aria-pressed="true"] { background: var(--maroon); border-color: var(--maroon); color: #fff; }
.matches { display: grid; gap: 8px; }
@media (min-width: 900px) { .matches { grid-template-columns: 1fr 1fr; } }
.match { display: grid; grid-template-columns: 2.2rem 1fr; gap: 4px 12px; align-items: center; padding: 11px 14px 11px 10px; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); border-left: 6px solid var(--sc); }
.match-n { grid-row: span 2; font-stretch: 75%; font-weight: 800; font-size: 1.7rem; line-height: 1; text-align: center; color: var(--sc); }
.match-where { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; font-weight: 700; }
.match-teams { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.match-score { font-stretch: 75%; font-weight: 800; font-size: 1.15rem; padding: 0 2px; }
.match.mine { background: var(--blush); box-shadow: inset 0 0 0 3px var(--maroon); }
.viewtoggle { display: inline-flex; padding: 4px; border-radius: 12px; background: var(--blush-wash); margin-bottom: 14px; }
.viewtoggle button { appearance: none; border: 0; background: none; cursor: pointer; font: 700 .98rem/1 var(--font); padding: 10px 14px; border-radius: 9px; color: var(--ink); }
.viewtoggle button[aria-pressed="true"] { background: #fff; box-shadow: 0 1px 0 var(--line), 0 0 0 1px var(--line); }

/* ---------- sports page ---------- */
.sport { scroll-margin-top: 84px; display: grid; gap: 0; border-radius: 18px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); margin-top: 22px; }
.sport-banner { background: var(--sc); color: #fff; display: grid; }
.sport-banner .sport-photo { aspect-ratio: 16 / 8; }
.sport-banner-text { padding: 16px 18px 18px; }
.sport-banner h2 { font-size: clamp(1.9rem, 6vw, 2.6rem); }
.sport-banner p { margin: .5rem 0 0; font-weight: 600; }
.sport-body { padding: 18px; display: grid; gap: 18px; }
.sport-body h3 { margin-bottom: .4rem; }
.sport-win { font-weight: 800; margin: 0; }
.where-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.where-list li { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--blush-wash); display: grid; grid-template-columns: 2rem 1fr; gap: 10px; align-items: center; }
.where-list .st-n { font-stretch: 75%; font-weight: 800; font-size: 1.6rem; line-height: 1; color: var(--sc); text-align: center; }
.where-list b { display: block; line-height: 1.2; }
.where-list span span { font-size: .9rem; color: var(--muted); }
@media (min-width: 820px) {
  .sport { grid-template-columns: 340px 1fr; }
  .sport-banner { align-content: start; }
  .sport-banner .sport-photo { aspect-ratio: 4 / 3; }
  .sport-body { grid-template-columns: 1.3fr 1fr; padding: 24px; gap: 28px; align-content: start; }
}
.credit { font-size: .78rem; color: var(--muted); margin: 6px 0 0; max-width: none; }

/* ---------- teams ---------- */
.teams-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.teamcard { border-radius: 16px; padding: 14px 16px 16px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); border-top: 8px solid var(--tc); scroll-margin-top: 90px; }
.teamcard-head { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; margin-bottom: 10px; }
.teamcard h3 { font-size: 1.3rem; font-style: italic; font-weight: 900; }
.teamcard ol { columns: 2; column-gap: 18px; padding-left: 1.5rem; font-size: .98rem; }
.teamcard li { margin: .12em 0; break-inside: avoid; }
.teamcard.mine { box-shadow: inset 0 0 0 3px var(--maroon); background: var(--blush-wash); }
mark { background: var(--blush); color: inherit; border-radius: 4px; padding: 0 3px; }
.searchrow { display: grid; gap: 8px; max-width: 460px; margin-bottom: 18px; }
.searchrow label { font-weight: 800; }
.searchrow input { font: 600 1.05rem/1.2 var(--font); padding: 13px 14px; border-radius: 12px; border: 2px solid var(--ink); background: #fff; color: var(--ink); width: 100%; }

/* ---------- ladder ---------- */
.ladder td, .ladder th { padding: 9px 10px; vertical-align: middle; }
.ladder .pos { width: 2.6rem; text-align: center; font-stretch: 75%; font-weight: 800; font-size: 1.2rem; }
.ladder .pts { font-stretch: 75%; font-weight: 800; font-size: 1.2rem; text-align: center; }
.ladder td.c { font-weight: 600; }
.ladder tr.cut > * { border-bottom: 4px solid var(--gold); }
.ladder tr.mine > * { background: var(--blush); }
.narrow { display: none; }
@media (max-width: 560px) {
  .wide { display: none; }
  .narrow { display: inline; }
  .ladder td, .ladder th { padding: 8px 4px; }
  .ladder .pos { width: 2.2rem; }
  .ladder .team { gap: 5px; }
}
.ladder-key { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 0 0; font-size: .92rem; color: var(--muted); }
.ladder-key i { display: inline-block; width: 22px; border-top: 4px solid var(--gold); vertical-align: middle; margin-right: 6px; }
.status { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-bottom: 14px; font-weight: 600; }
.dotlive { width: 10px; height: 10px; border-radius: 50%; background: var(--good); display: inline-block; margin-right: 6px; }
.dotlive.off { background: var(--muted); }
.warnbox { border: 2px solid var(--warn); border-radius: 12px; padding: 12px 14px; margin-top: 18px; font-size: .95rem; }
.warnbox ul { margin-top: 6px; }

.bracket { display: grid; gap: 18px; }
.bracket-col h3 { margin-bottom: 8px; }
.bracket-col { display: grid; gap: 10px; align-content: start; }
.fx { border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); border-top: 6px solid var(--sc); padding: 10px 12px 12px; }
.fx-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; font-size: .88rem; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.fx-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 4px 0; font-weight: 600; }
.fx-row.win { font-weight: 800; }
.fx-row.lose { color: var(--muted); }
.fx-seed { color: var(--muted); font-weight: 600; }
.fx-score { font-stretch: 75%; font-weight: 800; font-size: 1.2rem; }
.fx-gf { border-top-width: 10px; background: var(--blush-wash); }
.plate-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
@media (min-width: 860px) { .bracket { grid-template-columns: 1fr 1fr 1fr; align-items: center; } .bracket-col { align-content: center; } }

/* ---------- map ---------- */
.mapbox { position: relative; border-radius: 16px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.mapbox img { display: block; width: 100%; height: auto; }
.pin { position: absolute; transform: translate(-50%, -50%); width: 34px; height: 34px; border-radius: 50%; background: var(--sc, var(--maroon)); color: #fff; display: grid; place-items: center; font-stretch: 75%; font-weight: 800; font-size: 1.05rem; box-shadow: 0 0 0 3px #fff, 0 2px 8px rgba(0, 0, 0, .4); }
.map-empty { border: 2px dashed var(--gold); border-radius: 16px; padding: 22px; background: var(--blush-wash); }
.venues { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); list-style: none; padding: 0; }
.venue { margin: 0; display: grid; grid-template-columns: 2.6rem 1fr; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); border-left: 6px solid var(--sc, var(--maroon)); }
.venue-n { font-stretch: 75%; font-weight: 800; font-size: 2rem; line-height: 1; color: var(--sc, var(--maroon)); text-align: center; }
.venue b { display: block; font-stretch: 112%; font-weight: 800; line-height: 1.15; margin-bottom: 4px; }
.venue p { margin: 0; font-size: .95rem; }

/* ---------- risk table ---------- */
.risk { font-weight: 800; white-space: nowrap; }
.risk::before { content: ""; display: inline-block; width: .7em; height: .7em; border-radius: 50%; margin-right: .4em; background: currentColor; }
.risk-high { color: var(--bad); } .risk-med { color: var(--warn); } .risk-low { color: var(--good); }
@media (max-width: 640px) {
  .stackable thead { display: none; }
  .stackable, .stackable tbody, .stackable tr, .stackable td { display: block; }
  .stackable tr { padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .stackable tr:last-child { border-bottom: 0; }
  .stackable td { padding: 2px 0; border: 0; }
  .stackable td:first-child { font-stretch: 112%; font-weight: 800; font-size: 1.08rem; }
}

.roles { display: grid; gap: 0 36px; }
.role { display: grid; grid-template-columns: 3rem 1fr; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.role-n { font-stretch: 75%; font-weight: 800; font-size: 2.2rem; line-height: 1; color: var(--maroon); }
.role h3 { margin-bottom: 2px; }
.role p { margin: 0; }
@media (min-width: 760px) { .roles { grid-template-columns: 1fr 1fr; } }

.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2.4rem 1fr; gap: 10px; align-items: baseline; margin: 0; padding: 10px 0; border-top: 1px solid var(--line); }
.steps li::before { content: counter(step); font-stretch: 75%; font-weight: 800; font-size: 1.6rem; line-height: 1; color: var(--maroon); }

/* ---------- footer ---------- */
.foot { background: var(--ink); color: #F3E4E0; padding: 34px 0 30px; margin-top: clamp(2rem, 6vw, 4rem); }
.foot a { color: #fff; }
.foot-grid { display: grid; gap: 22px; }
.foot-brand { display: flex; gap: 14px; align-items: center; }
.foot-brand img { width: 46px; height: auto; }
.foot-brand b { display: block; font-stretch: 125%; font-weight: 900; font-style: italic; font-size: 1.2rem; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; padding: 0; }
.foot-links li { margin: 0; }
.foot small { display: block; color: #D9C3C7; font-size: .9rem; max-width: 70ch; }
@media (min-width: 860px) { .foot-grid { grid-template-columns: 1fr 1.4fr; align-items: start; } }

/* ---------- photo credits ---------- */
.credits { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.credits figure { margin: 0; }
.credits img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; }
.credits figcaption { margin-top: 8px; font-size: .95rem; }
.credits figcaption b { display: block; font-stretch: 112%; font-weight: 800; }

/* ---------- skip link ---------- */
.skip { position: absolute; left: -999px; top: 0; z-index: 100; background: #fff; color: var(--maroon); padding: 10px 14px; font-weight: 700; border-radius: 0 0 8px 0; }
.skip:focus { left: 0; }

/* ---------- print pack ---------- */
.slips { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 400px), 1fr)); margin-top: 14px; }
.slip { border: 1px solid var(--line); border-radius: 12px; padding: 12px 12px 6px; break-inside: avoid; overflow-x: auto; min-width: 0; }
.slip h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.slip table { font-size: .92rem; }
.slip th, .slip td { padding: 5px 8px; }
.slip thead th { background: none; color: var(--muted); border-bottom: 2px solid var(--ink); }

/* ---------- print pack and printing ---------- */
.print-only { display: none; }
.sheet-page h2 { font-style: normal; }
@media print {
  @page { size: A4; margin: 12mm; }
  @page wide { size: A4 landscape; margin: 10mm; }
  html { font-size: 11pt; }
  body { padding: 0; color: #000; background: #fff; }
  .top, .tabbar, .foot, .sheet, .no-print, .btn, .btnrow, .finder, .searchrow, .viewtoggle, .roundpick, .status { display: none !important; }
  .print-only { display: block; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .court { background: none !important; color: #000; }
  .page-head, .hero { padding: 0 0 6mm; }
  .page-head p, .hero-school { color: #000; }
  .page-head h1, .hero h1 { font-size: 26pt; }
  .section { padding-block: 5mm; }
  .section-tint { background: none; }
  a { color: inherit; text-decoration: none; }
  .tablebox { overflow: visible; border-radius: 0; }
  .draw { min-width: 0; font-size: 8.5pt; }
  .draw th.rowhead { position: static; }
  .draw td { padding: 3px 5px; }
  .draw td.mine { background: none; box-shadow: none; }
  .bib { width: 16px; height: 17px; }
  .tl-item, .teamcard, .match, .fx, .sport, .role, tr, .venue { break-inside: avoid; }
  .sheet-page { break-after: page; }
  .sheet-page:last-child { break-after: auto; }
  .sheet-wide { page: wide; }
  .teams-grid { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .slips { grid-template-columns: 1fr 1fr; gap: 4mm; }
  .slip { border-radius: 0; padding: 4px 6px 2px; overflow: visible; border-color: #999; }
  .slip h3 { font-size: 11pt; margin-bottom: 2px; }
  .slip table { font-size: 8.5pt; }
  .slip th, .slip td { padding: 2px 4px; }
  th, td { padding: 4px 8px; }
  thead th { background: #fff; color: #000; border-bottom: 2px solid #000; }
  .tablebox { border-color: #999; }
  .teamcard { box-shadow: inset 0 0 0 1px #999; }
  .teamcard.mine { background: none; box-shadow: inset 0 0 0 1px #999; }
  .teamcard-head { margin-bottom: 4px; gap: 8px; }
  .teamcard h3 { font-size: 10pt; }
  .teamcard .muted { font-size: 8pt; }
  .tl-item { padding-bottom: 5px; grid-template-columns: 3.6rem 1fr; }
  .tl-time { padding-top: 5px; }
  .tl-body { padding: 5px 10px; }
  .tl-key .tl-body, .tl-game .tl-body, .section-tint .tl-body { background: #fff; color: #000; box-shadow: none; outline: 1px solid #999; outline-offset: -1px; }
  .tl-key .tl-body .muted { color: #000; }
  .tl-venue { font-size: 11pt; }
  .tl-game .tl-top { margin-bottom: 2px; }
  .note { background: none; padding: 0; }
  .seg, .seg-key, .seg-finals { background: #fff; color: #000; outline: 1px solid #999; outline-offset: -1px; }
  .seg-key small { color: #000; }
  .teamcard { padding: 6px 8px; border-top-width: 5px; }
  .teamcard ol { columns: 1; font-size: 8pt; line-height: 1.28; padding-left: 1.3rem; }
  .teamcard li { margin: 0; }
  .teamcard .muted { display: none; }
  .keep { break-inside: avoid; }
  .bib-lg { width: 24px; height: 26px; }
  h2 { font-size: 16pt; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
