/* Mobile-first refinements. Shared by public pages, admin and live tracker. */
html { font-size: 100%; scroll-padding-top: 1rem; }
* { min-width: 0; box-sizing: border-box; }
.filters { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,150px),1fr)); gap: 10px; }
.filters select { width: 100%; min-width: 0; font-size: 1rem; line-height: 1.4; }
.teamcell, .teamcell span { white-space: normal; overflow: visible; text-overflow: clip; }
.xv h4 { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; font-size: .875rem; line-height: 1.4; }
.xv h4 span:last-child { text-align: right; }
.xv .r { grid-template-columns: minmax(0,1fr) 36px minmax(0,1fr); font-size: 1rem; min-height: 44px; }
.xv .r .a, .xv .r .b { white-space: normal; overflow: visible; text-overflow: clip; }
.xv .sub { font-size: .875rem; padding: 12px; }
.matchnav { flex-wrap: wrap; }
.matchnav a, .matchnav select { min-height: 48px; }
.otherteams { display: grid; grid-template-columns: repeat(auto-fit,minmax(80px,1fr)); overflow: visible; }
.otherteams a { width: auto; font-size: .875rem; padding: 8px 4px; }
@media(max-width:640px) { .matchnav select { order: -1; flex-basis: 100%; } .xv h4 { grid-template-columns: 1fr 1fr; } .xv h4 span:nth-child(2) { grid-row: 1; grid-column: 1/-1; text-align: center; color: var(--accent); } }
body { font-size: 1rem; line-height: 1.5; overflow-wrap: anywhere; }
img, svg, iframe { max-width: 100%; }
button, input, select, textarea { font-size: 1rem; }
button, select, input:not([type=checkbox]):not([type=radio]), summary { min-height: 44px; }
button { white-space: normal; }
a, button, input, select, textarea, summary { touch-action: manipulation; }
:focus-visible { outline: 3px solid #b46a00; outline-offset: 3px; }
.skip-link { position: fixed; top: -100px; left: 12px; z-index: 100; background: white; color: #350d1d; padding: 12px 18px; }
.skip-link:focus { top: 12px; }
.wrap { width: 100%; max-width: 1000px; padding: 20px max(16px, env(safe-area-inset-left)) 28px max(16px, env(safe-area-inset-right)); }
.card { padding: clamp(14px, 3vw, 24px); margin-bottom: 16px; }
.card h2 { font-size: .875rem; line-height: 1.4; }
h3 { font-size: 1.375rem; line-height: 1.2; margin-top: 20px; }
.small, .mut.small, .err, .log, .status, .form label { font-size: .875rem; }
.form label { letter-spacing: .02em; }
header:not(.masthead) { flex-wrap: wrap; }
header a.home { display: grid; place-items: center; min-width: 44px; min-height: 44px; }
.topbar { font-size: .75rem; padding: 8px max(16px, calc((100% - 1100px)/2)); }
.topbar span { white-space: normal; overflow: visible; }
.nav.site { position: relative; overflow: visible; padding: 12px max(16px, calc((100% - 1100px)/2)); align-items: center; gap: 10px; }
.nav.site .brand { display: flex; flex-direction: row; align-items: center; font: 800 1.75rem/1 var(--display); padding: 4px 0; margin-right: auto; }
.nav.site .brand small { display: block; }
.nav.site .brand small { font: 600 .75rem/1.5 -apple-system,'Segoe UI',sans-serif; color: #ebd7df; letter-spacing: .06em; }
.nav-links { display: flex; flex-wrap: wrap; gap: 4px; }
.nav.site .nav-links a { display: flex; align-items: center; justify-content: center; min-height: 44px; font-size: 1rem; padding: 12px 14px; opacity: 1; }
.nav.site a[aria-current=page] { background: var(--accent); color: #1a1400; }
.nav-toggle { display: none; background: transparent; color: white; border: 1px solid #ad7c90; padding: 8px 14px; font-weight: 700; }
.masthead { padding: clamp(24px,5vw,48px) 16px 24px; border-bottom: 4px solid var(--accent); }
.masthead h1 { max-width: 950px; margin-inline: auto; font-size: clamp(2.5rem,8vw,5.5rem); line-height: .98; }
.masthead h1 small { font-size: clamp(1.125rem,3.5vw,2rem); line-height: 1.2; }
.masthead .pres, .masthead .when { font-size: .875rem; line-height: 1.5; }
.masthead .cta a { min-height: 48px; display: flex; align-items: center; justify-content: center; font-size: 1.125rem; }
.count { max-width: 440px; margin-inline: auto; }
.count b { font-size: clamp(1.75rem,7vw,2.75rem); }
.count small, .count-note, .stats small { font-size: .75rem; letter-spacing: .04em; }
.stats { grid-template-columns: repeat(4,minmax(0,1fr)); }
.stats div { padding: 16px 6px; }
.stats b { font-size: 2rem; }
.sec { align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.sec h2 { font-size: 1.75rem; line-height: 1.15; }
.sec a { font-size: .875rem; color: var(--brand); min-height: 44px; display: inline-flex; align-items: center; text-decoration: underline; text-underline-offset: 3px; }
.mcard, .mrow { padding: 16px; margin-bottom: 12px; border-radius: 8px; border-left: 4px solid var(--brand); }
.mcard:has(.live) { border-left-color: #1e7a3c; }
.stage { font-size: .875rem; line-height: 1.3; margin-bottom: 12px; }
.mt3, .mt { grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 12px; }
.tm, .side .tm { font-size: 1rem; line-height: 1.3; overflow: visible; text-overflow: clip; }
.side { gap: 10px; }
.sc { font-size: 2rem; font-variant-numeric: tabular-nums; min-width: 0; }
.mb { font-size: .875rem; margin-top: 14px; gap: 8px; }
.tag { font-size: .75rem; line-height: 1.5; padding: 3px 8px; }
.tag.live { color: #14532d; }
.mhead .tag:not(.live):not(.warn), .livehero .tag:not(.live):not(.warn) { color: var(--ink); }
.livehero .sc, .mhead .sc { font-size: clamp(2rem,6vw,3rem); }
.mhead .sub { font-size: .875rem; margin-top: 16px; }
.tabs { flex-wrap: wrap; gap: 8px; }
.tabs button { flex: 1 1 90px; font-size: 1rem; padding: 12px; }
.rounds { gap: 8px; }
.rounds button, .mini { min-height: 44px; font-size: .875rem; }
.table-scroll { overflow-x: auto; overscroll-behavior-inline: contain; border: 1px solid var(--line); border-radius: 8px; margin: 8px 0 16px; }
table.lad { table-layout: auto; font-size: .875rem; }
table.lad th, table.lad td { padding: 12px 8px; }
table.lad th { font-size: .75rem; letter-spacing: .02em; background: #f5e9ee; }
table.lad .l { overflow: visible; text-overflow: clip; white-space: normal; min-width: 8rem; }
.table-scroll table.lad { min-width: 650px; }
.table-scroll table.lad { table-layout: fixed; }
.table-scroll table.lad col.num { width: 44px; }
.table-scroll table.lad col:nth-child(2) { width: 170px; }
.table-scroll table.lad .l { width: 170px; }
.table-scroll table.lad th { overflow-wrap: normal; }
.table-scroll table.lad .l { position: sticky; left: 0; background: white; z-index: 1; min-width: 150px; }
.table-scroll table.lad th.l { background: #f5e9ee; }
.table-hint { color: var(--mut); font-size: .875rem; margin: 6px 0; }
#snap table.lad th:first-child { width: 2rem; }
#snap table.lad .l { width: 55%; min-width: 0; }
#snap .badge { vertical-align: middle; margin-right: 4px; }
.tgrid { grid-template-columns: repeat(auto-fit,minmax(min(100%,220px),1fr)); gap: 12px; }
.tcard { padding: 16px; }
.tcard b { font-size: 1rem; line-height: 1.3; }
.tcard small, .thead .mut { font-size: .875rem; }
.tstrip { display: grid; grid-template-columns: repeat(auto-fit,minmax(80px,1fr)); gap: 12px; overflow: visible; }
.tstrip a { width: auto; font-size: .875rem; line-height: 1.3; padding: 8px 4px; }
.road div { padding: 18px; font-size: 1rem; }
.road div b { font-size: 1.25rem; line-height: 1.2; }
.tl li { font-size: .875rem; padding: 12px 0; }
.sheet ol, .sheet h4 { font-size: .875rem; }
.sheet li { padding: 8px 0; }
.player { min-height: 210px; }
.player .poster { width: 100%; border: 0; border-radius: 0; font: inherit; }
footer.site { font-size: .875rem; padding-bottom: max(24px,env(safe-area-inset-bottom)); }
.official-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.official-links a { color: white; min-height: 44px; padding: 10px 16px; border: 1px solid #ad7c90; border-radius: 6px; }
.demo-ribbon { position: static; display: block; width: 100%; border-radius: 0; text-align: center; font-size: .875rem; line-height: 1.3; box-shadow: none; }
.toast { max-width: calc(100vw - 32px); bottom: max(18px,env(safe-area-inset-bottom)); }
@media(hover:hover) { .mcard:hover, .tcard:hover { border-color: var(--brand); box-shadow: 0 4px 14px #350d1d14; } .nav-links a:hover { background: #ffffff20; } }
@media(min-width:800px) { #now, #latest, #streamed, #live { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; } #now .mcard, #latest .mcard, #streamed .mcard, #live .mcard { margin-bottom: 0; } }
@media(max-width:640px) {
  .topbar span:last-child { display: none; }
  .nav.site { gap: 8px; }
  .nav-toggle { display: block; }
  .nav-links { display: none; width: 100%; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; padding-top: 8px; }
  .nav-links.is-open { display: grid; }
  .nav.site .nav-links a { justify-content: flex-start; background: #ffffff0d; border: 1px solid #ffffff22; }
  .nav.site .nav-links a.cur, .nav.site .nav-links a.watch { background: var(--accent); }
  .nav.site .nav-links a.watch { grid-column: 1/-1; }
  .side, .side.r { flex-direction: column; text-align: center; justify-content: center; }
  .side.r .badge { order: -1; }
  .mt3 { gap: 8px; }
  .mcard .tm, .mhead .mt3 .tm { font-size: 1rem; }
  .mcard .sc { font-size: 1.875rem; }
  .masthead .cta { gap: 8px; }
  .masthead .cta a { padding: 12px; flex: 1 1 auto; }
  .stats small { letter-spacing: 0; }
  .stats div:nth-child(-n+2) { border-bottom: 0; }
  .stats div:nth-child(2) { border-right: 1px solid #ffffff20; }
  .form { grid-template-columns: minmax(0,1fr); }
  .pools { grid-template-columns: 36px minmax(0,1fr) 70px; }
  .grid { grid-template-columns: minmax(0,1fr); }
  .grid button, .cards button { font-size: .875rem; }
  .cards { flex-wrap: wrap; }
  .cards button { flex-basis: 100%; }
  .team .nm { font-size: .875rem; }
  .team .tr, .status { font-size: .875rem; }
  .pk { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .pk button small { white-space: normal; font-size: .75rem; }
  .tsrow { grid-template-columns: 44px minmax(0,1fr) 44px 44px 44px; }
  .tsrow input { font-size: 1rem; }
}
@media(max-width:359px) {
  .wrap { padding-inline: 10px; }
  .card, .mcard, .mrow { padding: 12px; }
  .stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .stats div:nth-child(-n+2) { border-bottom: 1px solid #ffffff20; }
  .tsrow { grid-template-columns: 44px minmax(0,1fr); }
  .tsrow button { min-height: 44px; }
  .per { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media(prefers-reduced-motion:reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
@media print { .nav-toggle, .official-links, .demo-ribbon { display: none; } .nav-links { display: flex; } .table-scroll { overflow: visible; } }
