@font-face { font-family: "Bricolage Grotesque"; src: url("/fonts/bricolage.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("/fonts/hanken.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/jbmono.woff2") format("woff2"); font-weight: 100 800; font-style: normal; font-display: swap; }
/* FTL-Q design system: Philippine flag palette, Archivo (display) + Inter (text), self-hosted. */

:root {
  /* legacy names are kept (used by staff.js inline styles) but now map to the flag palette */
  --purple: #0038a8; --purple-d: #071a44; --purple-l: #e9eefc;
  --green: #12a150; --green-d: #0b6e36; --green-l: #e2f6ea;
  --gold: #fcd116; --gold-d: #a88700;
  --red: #ce1126; --ink: #0d1530; --muted: #5d6788; --line: #e1e6f2;
  --bg: #f1f4fb; --card: #fff; --grey: #eef1f8;
  --navy: #071a44; --navy-2: #0c2a69; --blue: #0038a8; --yellow: #fcd116;
  --radius: 22px; --shadow: 0 1px 2px rgba(7, 26, 68, .05), 0 10px 30px -12px rgba(7, 26, 68, .18);
  --display: "Bricolage Grotesque", "Segoe UI", "Helvetica Neue", Arial, sans-serif; --font: "Hanken Grotesk", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif; --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 16px; color: var(--ink); background: var(--bg); line-height: 1.5; -webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; } a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--display); line-height: 1.02; margin: 0 0 .5em; letter-spacing: -.035em; font-weight: 800; }
h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); letter-spacing: -.05em; }
h2 { font-size: 1.9rem; letter-spacing: -.045em; } h3 { font-size: 1.1rem; letter-spacing: -.02em; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .center { text-align: center; } .right { text-align: right; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 8px; top: 8px; background: #fff; padding: 8px 12px; z-index: 99; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; box-shadow: 0 0 0 5px var(--blue); }

/* ---------- header ---------- */
.site-header { background: rgba(255, 255, 255, .92); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 30; border-bottom: 1px solid var(--line); }
.site-header::before { content: ""; display: block; height: 5px; background: linear-gradient(90deg, var(--blue) 0 40%, var(--red) 40% 70%, var(--yellow) 70%); }
.site-header .wrap { display: flex; align-items: center; gap: 18px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand img { height: 50px; width: 50px; object-fit: contain; }
.brand .bt { font-family: var(--display); font-weight: 800; letter-spacing: -.04em; font-size: 1.35rem; letter-spacing: .01em; line-height: 1; }
.brand small { display: block; font-family: var(--font); font-style: normal; font-weight: 600; color: var(--muted); font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; margin-top: 3px; }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; flex-wrap: wrap; background: var(--grey); padding: 5px; border-radius: 999px; }
.nav a { color: var(--ink); padding: 8px 15px; font-weight: 600; font-size: .88rem; border-radius: 999px; transition: background .15s; }
.nav a:hover { text-decoration: none; background: #fff; }
.nav a.on { background: var(--navy); color: #fff; }
.nav a.staff { background: var(--yellow); color: #2b2300; font-weight: 700; margin-left: 4px; }
.nav a.staff:hover { background: #ffdf3d; }
.menu-btn { display: none; margin-left: auto; background: var(--grey); border: 0; border-radius: 999px; padding: 10px 16px; font-size: 1rem; cursor: pointer; }
@media (max-width: 1020px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; left: 12px; right: 12px; top: calc(100% + 8px); background: #fff; flex-direction: column; align-items: stretch; padding: 10px; border-radius: 24px; box-shadow: 0 20px 50px rgba(7, 26, 68, .25); border: 1px solid var(--line); }
  .nav.open { display: flex; } .nav a { padding: 13px 16px; } .nav a.staff { margin: 6px 0 0; text-align: center; }
}
#season-banner .arch { background: var(--yellow); color: #2b2300; text-align: center; padding: 9px 16px; font-weight: 700; font-size: .9rem; }
#season-banner a { color: #2b2300; text-decoration: underline; }

/* ---------- hero ---------- */
.hero { position: relative; color: #fff; overflow: hidden; isolation: isolate; background: radial-gradient(900px 420px at 15% 0%, #1b4fc4 0%, transparent 60%), linear-gradient(135deg, #061636 0%, var(--navy-2) 100%); }
.hero .sun { position: absolute; width: 560px; height: 560px; left: -190px; bottom: -260px; opacity: .14; z-index: -1; animation: spin 160s linear infinite; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, .92fr) 150px minmax(0, 1.08fr); align-items: stretch; min-height: 600px; padding: 0 0 0 20px; max-width: 1400px; }
.hero .copy { padding: 70px 40px 70px 0; align-self: center; position: relative; z-index: 2; }
.hero .kicker { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: .74rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: #c9d6f7; }
.hero .kicker i { width: 9px; height: 9px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 4px rgba(252, 209, 22, .25); animation: pulse 1.6s infinite; }
.hero h1 { font-size: clamp(2.8rem, 6.2vw, 5.4rem); line-height: .96; margin: 20px 0 20px; font-weight: 800; letter-spacing: -.055em; }
.hero h1 em { display: inline-block; font-style: normal; color: var(--navy); background: var(--yellow); padding: 0 .14em .04em; border-radius: .12em; margin-top: .08em; transform: rotate(-1.2deg); box-shadow: 0 10px 30px -10px rgba(252, 209, 22, .6); }
.hero .sub { font-size: 1.15rem; color: #cfdaf5; max-width: 36ch; margin: 0 0 6px; line-height: 1.6; }
.hero .meta { display: flex; flex-wrap: wrap; gap: 8px 10px; margin: 20px 0 28px; }
.hero .meta span { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); border-radius: 999px; padding: 7px 15px; font-size: .86rem; color: #e6edff; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .wave { position: relative; z-index: 3; background: url("/img/ph-wave.svg") center / cover no-repeat; box-shadow: -14px 0 40px rgba(0, 0, 0, .25), 14px 0 40px rgba(0, 0, 0, .25); }
.hero .photo { position: relative; margin-right: 0; min-height: 440px; }
.hero .photo > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 36% 50%; }
.hero .photo::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(0deg, rgba(6, 22, 54, .55), transparent 40%); }
.hero .badge-float { position: absolute; z-index: 3; right: 22px; bottom: 22px; background: #fff; color: var(--ink); border-radius: 20px; padding: 12px 18px 12px 12px; box-shadow: 0 18px 40px rgba(0, 0, 0, .35); display: flex; align-items: center; gap: 12px; }
.hero .badge-float img { height: 48px; width: auto; }
.hero .badge-float b { font-family: var(--display); font-size: 1.8rem; color: var(--blue); line-height: 1; letter-spacing: -.04em; } .hero .badge-float span { font-family: var(--mono); font-size: .66rem; color: var(--muted); line-height: 1.3; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
@media (max-width: 1000px) { .hero .wrap { grid-template-columns: minmax(0, 1fr) 110px minmax(0, 1fr); } .hero .copy { padding-right: 24px; } }
@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; min-height: 0; padding: 0; } .hero .photo { height: 300px; min-height: 0; order: -1; }
  .hero .wave { order: 0; height: 34px; background-size: 260% auto; background-position: 50% 34%; box-shadow: none; } .hero .copy { padding: 30px 20px 44px; } .hero .sun { width: 380px; height: 380px; }
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- buttons & chips ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 2px solid var(--blue); background: var(--blue); color: #fff; border-radius: 999px; padding: 11px 24px; font-weight: 700; font-size: .92rem; cursor: pointer; font-family: var(--font); transition: transform .12s, background .15s; }
.btn:hover { background: var(--navy); border-color: var(--navy); text-decoration: none; color: #fff; transform: translateY(-1px); }
.btn.light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .55); } .btn.light:hover { background: rgba(255, 255, 255, .14); border-color: #fff; }
.btn.gold { background: var(--yellow); border-color: var(--yellow); color: #2b2300; } .btn.gold:hover { background: #ffe14d; border-color: #ffe14d; color: #2b2300; }
.btn.ghost { background: #fff; color: var(--blue); border-color: var(--line); } .btn.ghost:hover { background: var(--purple-l); color: var(--navy); border-color: var(--purple-l); }
.btn.danger { background: #fff; border-color: #f3c2c8; color: var(--red); } .btn.danger:hover { background: var(--red); border-color: var(--red); color: #fff; }
.btn.small { padding: 5px 13px; font-size: .8rem; } .btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 11px; border-radius: 999px; font-size: .7rem; font-weight: 700; letter-spacing: .05em; background: var(--grey); color: #46506f; text-transform: uppercase; }
.chip.live { background: var(--red); color: #fff; } .chip.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: pulse 1.2s infinite; }
.chip.final { background: var(--green); color: #fff; } .chip.sched { background: var(--purple-l); color: var(--blue); }
.chip.gold { background: var(--yellow); color: #2b2300; } .chip.err { background: #fde6e9; color: var(--red); } .chip.warn { background: #fff4c7; color: #7a5b00; } .chip.ok { background: var(--green-l); color: var(--green-d); }
@keyframes pulse { 50% { opacity: .45; } }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 20px; }
.tabs button, .tabs a { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 18px; font-weight: 600; cursor: pointer; font-family: var(--font); font-size: .88rem; color: var(--ink); }
.tabs .on { background: var(--navy); color: #fff; border-color: var(--navy); } .tabs a:hover { text-decoration: none; }

/* ---------- sections ---------- */
.section { padding-block: 44px; } .section.tight { padding-block: 24px; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.section-title h2 { margin: 0; display: flex; align-items: center; gap: 12px; color: var(--navy); }
.section-title h2::before { content: ""; width: 8px; height: 30px; border-radius: 4px; background: linear-gradient(180deg, var(--yellow) 0 50%, var(--red) 50%); transform: skewX(-12deg); }
.section-title a { font-weight: 700; font-size: .88rem; }
.page-head { padding: 34px 0 10px; } .page-head h1 { color: var(--navy); margin: 0 0 6px; } .page-head p { margin: 0; }
.grid { display: grid; gap: 18px; } .g2 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); } .g3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); overflow: hidden; }
.card.pad { padding: 20px; }
.empty { background: #fff; border: 2px dashed #cdd5ea; border-radius: var(--radius); padding: 30px; text-align: center; color: var(--muted); }

/* home dashboard panels */
.panels { display: grid; grid-template-columns: 1.15fr 1.1fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 1100px) { .panels { grid-template-columns: 1fr 1fr; } .panels > :last-child { grid-column: 1 / -1; } }
@media (max-width: 720px) { .panels { grid-template-columns: 1fr; } }
.panel { padding: 22px; } .panel h3 { display: flex; align-items: center; gap: 10px; font-size: 1.25rem; color: var(--navy); margin-bottom: 16px; }
.panel h3 .ico { width: 34px; height: 34px; border-radius: 12px; background: var(--navy); color: var(--yellow); display: inline-flex; align-items: center; justify-content: center; font-size: 1rem; font-style: normal; }
.panel .more { display: block; margin-top: 14px; font-weight: 700; font-size: .86rem; }
.mini-match { display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 18px; margin-bottom: 10px; color: var(--ink); background: #fff; transition: border-color .15s, transform .15s; }
.mini-match:hover { border-color: var(--blue); text-decoration: none; transform: translateY(-2px); }
.mini-match .tm { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: .95rem; min-width: 0; } .mini-match .tm + .tm { margin-top: 6px; } .mini-match .tm span.nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-match .tm .sc { margin-left: auto; font-family: var(--display); font-size: 1.15rem; font-weight: 900; color: var(--blue); } .mini-match .tm.w { color: var(--green-d); }
.mini-match .when { text-align: right; font-size: .78rem; color: var(--muted); border-left: 1px solid var(--line); padding-left: 14px; line-height: 1.5; } .mini-match .when b { color: var(--ink); display: block; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); overflow: hidden; }
.kpi { padding: 20px 22px; display: flex; gap: 14px; align-items: center; border-right: 1px solid var(--line); } .kpi:last-child { border-right: 0; }
.kpi .ic { width: 44px; height: 44px; border-radius: 14px; background: var(--purple-l); display: grid; place-items: center; font-size: 1.3rem; flex: none; }
.kpi b { display: block; font-family: var(--display); font-size: 1.5rem; line-height: 1; color: var(--navy); } .kpi span { font-size: .78rem; color: var(--muted); }
@media (max-width: 900px) { .kpis { grid-template-columns: 1fr 1fr; } .kpi:nth-child(2) { border-right: 0; } .kpi:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }

/* match cards */
.mcard { display: flex; flex-direction: column; color: var(--ink); transition: transform .18s, box-shadow .18s; }
.mcard:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -14px rgba(7, 26, 68, .35); text-decoration: none; }
.mcard .top { background: linear-gradient(180deg, #fff, #f6f8fe); display: flex; align-items: center; justify-content: center; gap: 16px; padding: 22px 12px 16px; min-height: 108px; position: relative; }
.mcard .top::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, var(--blue) 0 40%, var(--red) 40% 70%, var(--yellow) 70%); opacity: .9; }
.mcard .score { font-family: var(--display); font-size: 2.2rem; font-weight: 900; color: var(--navy); letter-spacing: .02em; min-width: 84px; text-align: center; line-height: 1; }
.mcard .score small { display: block; font-family: var(--font); font-style: normal; font-size: .68rem; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-top: 4px; }
.mcard .vs { font-family: var(--display); font-weight: 900; color: #a4aec8; font-size: 1.1rem; }
.mcard .bot { background: #fff; padding: 14px 18px 16px; flex: 1; }
.mcard .teams { font-weight: 800; margin-bottom: 3px; font-size: 1.02rem; } .mcard .teams .w { color: var(--green-d); }
.mcard .sub { color: var(--muted); font-size: .84rem; } .mcard .foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; font-size: .82rem; }
.mcard .go { color: var(--blue); font-weight: 700; }
.badge { width: 56px; height: 56px; border-radius: 34%; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-family: var(--display); font-weight: 900; font-size: 1.1rem; flex: none; background-image: linear-gradient(145deg, rgba(255, 255, 255, .28), transparent 55%); box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .35), 0 6px 14px -4px rgba(7, 26, 68, .4); }
.badge.sm { width: 32px; height: 32px; font-size: .72rem; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35); } .badge.empty-b { background: #cfd6e8 !important; box-shadow: none; }

/* tables */
.tbl-wrap { overflow-x: auto; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { background: #f5f7fd; color: #4a5580; font-size: .7rem; text-transform: uppercase; letter-spacing: .09em; white-space: nowrap; font-weight: 700; }
td.num, th.num { text-align: center; font-variant-numeric: tabular-nums; }
tbody tr:last-child td { border-bottom: 0; } tbody tr:hover td { background: #f7f9ff; }
tr.top1 td:first-child { box-shadow: inset 5px 0 var(--yellow); } tr.cut td { border-bottom: 2px dashed var(--blue); }
.st-name { font-weight: 700; display: flex; align-items: center; gap: 10px; white-space: nowrap; color: var(--ink); }
.rank-cell { font-family: var(--display); font-weight: 900; color: var(--navy); font-size: 1.1rem; }
table.full th.grp { background: var(--navy); color: #fff; text-align: center; border-left: 2px solid #fff; }
table.full td.sep, table.full th.sep { border-left: 2px solid var(--line); }
td.bye { background: var(--green-l) !important; text-align: center; color: var(--green-d); font-weight: 700; letter-spacing: .1em; }
td.tot { background: #fff9d9 !important; font-weight: 800; }

/* scoresheet (view-only, mirrors the printed sheet) */
.sheet { background: #fff; border-radius: 26px; border: 1px solid var(--line); box-shadow: var(--shadow); max-width: 1000px; margin: 0 auto; overflow: hidden; }
.sheet-head { display: flex; align-items: center; gap: 16px; background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #fff; padding: 16px 22px; position: relative; }
.sheet-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: linear-gradient(90deg, var(--blue) 0 40%, var(--red) 40% 70%, var(--yellow) 70%); }
.sheet-head img { height: 64px; background: #fff; border-radius: 50%; padding: 2px; } .sheet-head h2 { color: #fff; margin: 0; font-size: 1.15rem; }
.sheet-head p { margin: 3px 0 0; font-size: .88rem; color: #c3d0f0; }
.sheet-sub { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 12px 22px; border-bottom: 1px solid var(--line); font-weight: 600; align-items: center; }
.sheet-bar { background: var(--yellow); color: #2b2300; text-align: center; letter-spacing: .5em; font-family: var(--display); font-weight: 900; padding: 6px; font-size: .85rem; }
.sheet-teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 22px; gap: 12px; text-align: center; }
.sheet-teams .tn { font-family: var(--display); font-size: 1.35rem; font-weight: 800; display: flex; align-items: center; gap: 12px; justify-content: center; flex-wrap: wrap; } .sheet-teams .tn.win { color: var(--green-d); }
.sheet-teams .big { font-family: var(--display); font-size: 3.2rem; font-weight: 900; color: var(--navy); line-height: 1; }
.sheet table td, .sheet table th { padding: 10px 10px; } .sheet td.pl { font-weight: 600; } .sheet td.sc { text-align: center; font-family: var(--display); font-weight: 900; font-size: 1.2rem; width: 56px; background: #f5f7fd; }
.sheet td.sc.w { background: var(--green-l); color: var(--green-d); }
.sheet tfoot td { font-weight: 800; background: #fff9d9; }
.pending-note { padding: 12px 22px; background: #fff9d9; font-size: .9rem; }
@media (max-width: 640px) { .sheet-teams { grid-template-columns: 1fr; } .sheet-teams .big { font-size: 2.4rem; } }

/* bracket */
.bracket { display: flex; gap: 56px; align-items: stretch; overflow-x: auto; padding: 8px 4px 20px; }
.bcol { display: flex; flex-direction: column; justify-content: space-around; gap: 24px; min-width: 270px; position: relative; }
.bcol h3 { text-align: center; color: var(--navy); font-size: .8rem; text-transform: uppercase; letter-spacing: .16em; margin: 0; font-style: normal; }
.bmatch { background: #fff; border-radius: 18px; box-shadow: var(--shadow); border: 1px solid var(--line); border-left: 6px solid var(--blue); position: relative; overflow: hidden; }
.bmatch.final { border-left-color: var(--yellow); box-shadow: 0 0 0 3px rgba(252, 209, 22, .35), var(--shadow); } .bmatch.third { border-left-color: var(--red); }
.bmatch .bt { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--line); } .bmatch .bt:last-of-type { border-bottom: 0; }
.bmatch .bt.w { background: var(--green-l); font-weight: 800; } .bmatch .bt .nm { flex: 1; font-weight: 600; } .bmatch .bt .sc { font-family: var(--display); font-weight: 900; font-size: 1.15rem; color: var(--blue); }
.bmatch .bt .ph { color: var(--muted); font-weight: 500; font-size: .88rem; } .bmatch .binfo { padding: 6px 14px; font-size: .74rem; background: #f5f7fd; color: var(--muted); display: flex; justify-content: space-between; align-items: center; }

/* forms */
label.f { display: block; font-weight: 600; font-size: .85rem; margin-bottom: 12px; }
input, select, textarea { font: inherit; padding: 10px 14px; border: 1px solid #cdd5ea; border-radius: 14px; background: #fff; color: var(--ink); max-width: 100%; }
label.f input, label.f select, label.f textarea { display: block; width: 100%; margin-top: 5px; font-weight: 400; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); outline: 3px solid rgba(0, 56, 168, .15); box-shadow: none; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; } .row > * { flex: 1 1 140px; } .row .fit { flex: 0 0 auto; }
dialog { border: 0; border-radius: 26px; padding: 0; box-shadow: 0 30px 80px rgba(7, 26, 68, .45); width: min(580px, 94vw); max-height: 90vh; }
dialog::backdrop { background: rgba(7, 26, 68, .6); backdrop-filter: blur(3px); }
dialog form, dialog .dlg { padding: 26px; } dialog h3 { color: var(--navy); font-size: 1.3rem; } .dlg-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }
.form-err { color: var(--red); font-weight: 600; min-height: 1.2em; font-size: .9rem; }
#toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(120px); background: var(--navy); color: #fff; padding: 12px 24px; border-radius: 999px; transition: transform .25s; z-index: 100; max-width: 90vw; font-weight: 600; box-shadow: 0 14px 40px rgba(0, 0, 0, .35); }
#toast.show { transform: translateX(-50%); } #toast.err { background: var(--red); }

/* staff */
.staff-shell { display: grid; grid-template-columns: 230px 1fr; gap: 24px; padding: 28px 0 44px; align-items: start; }
.side { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); padding: 10px; position: sticky; top: 94px; }
.side a { display: block; padding: 10px 14px; border-radius: 14px; color: var(--ink); font-weight: 600; font-size: .9rem; } .side a:hover { background: var(--purple-l); text-decoration: none; }
.side a.on { background: var(--navy); color: #fff; } .side .who { padding: 10px 14px 12px; border-bottom: 1px solid var(--line); margin-bottom: 8px; font-size: .8rem; color: var(--muted); word-break: break-all; }
@media (max-width: 860px) { .staff-shell { grid-template-columns: 1fr; } .side { position: static; display: flex; flex-wrap: wrap; gap: 4px; } .side .who { width: 100%; } }
.login-card { max-width: 420px; margin: 44px auto; padding: 30px; }
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; } .toolbar .grow { flex: 1; }
.entry input.sc-in { width: 58px; text-align: center; font-family: var(--display); font-weight: 900; font-size: 1.2rem; padding: 7px 2px; border-radius: 12px; }
.entry input.nm-in { width: 100%; min-width: 140px; padding: 8px 12px; } .entry input.sm-in { width: 82px; padding: 8px 10px; } .entry td { padding: 5px 6px; }
.entry tfoot td { font-weight: 800; background: #fff9d9; font-size: 1.05rem; }
.savebar { position: sticky; bottom: 0; background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px); border-top: 3px solid var(--blue); padding: 12px 16px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; box-shadow: 0 -6px 20px rgba(7, 26, 68, .1); margin-top: 14px; }
.pill-list { display: flex; flex-wrap: wrap; gap: 6px; } .pill { background: var(--purple-l); border-radius: 999px; padding: 4px 5px 4px 13px; font-size: .82rem; display: inline-flex; gap: 6px; align-items: center; font-weight: 600; } .pill button { border: 0; background: var(--blue); color: #fff; border-radius: 50%; width: 21px; height: 21px; cursor: pointer; line-height: 1; }
.tie-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; } .tie-pick label { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 9px 12px; display: flex; gap: 8px; align-items: center; font-size: .88rem; cursor: pointer; }
.tie-pick label:has(input:checked) { border-color: var(--blue); background: var(--purple-l); }
.secret { font-family: ui-monospace, Consolas, monospace; font-size: 1.2rem; background: #fff9d9; border: 2px dashed var(--gold-d); padding: 12px 16px; border-radius: 14px; user-select: all; word-break: break-all; }
.preview-row.error td { background: #fff0f2 !important; } .preview-row.warn td { background: #fffbe6 !important; }
.msgs { font-size: .82rem; margin: 0; padding-left: 16px; } .msgs .e { color: var(--red); }
.accordion summary { cursor: pointer; font-weight: 800; color: var(--blue); padding: 10px 0; }

/* footer */
.site-footer { background: var(--navy); color: #a9b8de; margin-top: 56px; padding: 36px 0; font-size: .88rem; position: relative; overflow: hidden; }
.site-footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: linear-gradient(90deg, var(--blue) 0 40%, var(--red) 40% 70%, var(--yellow) 70%); }
.site-footer .wrap { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; } .site-footer img.lg { height: 62px; } .site-footer a { color: #fff; } .site-footer .grow { flex: 1; min-width: 220px; }
.site-footer strong { font-family: var(--display); color: #fff; font-size: 1.05rem; }
.site-footer img.sun { height: 54px; opacity: .9; }

@media print { .site-header, .site-footer, #season-banner, .noprint, #toast { display: none !important; } body { background: #fff; } .sheet { box-shadow: none; border: 1px solid #000; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }

/* mono labels (registrack-style eyebrows) */
th, .chip, .mini-match .when, .tabs button, .kpi span, .mcard .sub, .site-header .brand small { font-family: var(--mono); letter-spacing: .02em; }
th, .chip { text-transform: uppercase; letter-spacing: .08em; } .chip { font-weight: 700; font-size: .66rem; }
.mcard .sub, .mini-match .when, .kpi span { font-size: .74rem; }
.section-title h2, .page-head h1 { letter-spacing: -.045em; }
.btn { font-weight: 700; letter-spacing: -.01em; } .btn:not(.ghost):not(.light):not(.gold):not(.danger) { background: var(--navy); border-color: var(--navy); } .btn:not(.ghost):not(.light):not(.gold):not(.danger):hover { background: var(--blue); border-color: var(--blue); }

/* team logos */
.badge.logo { background: #fff; background-image: none; padding: 4px; border: 1px solid var(--line); box-shadow: 0 6px 14px -6px rgba(7, 26, 68, .3); }
.badge.logo.sm { padding: 2px; box-shadow: none; } .badge.logo img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* rankings panel: never overflow the card */
.panels { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr) minmax(0, 1.05fr); }
.panel { min-width: 0; overflow: hidden; }
.panel table { table-layout: fixed; font-size: .9rem; }
.panel th, .panel td { padding: 10px 6px; }
.panel th:first-child, .panel td:first-child { width: 36px; padding-left: 10px; } .panel th:nth-child(n+3), .panel td:nth-child(n+3) { width: 40px; text-align: center; }
.panel td:nth-child(2) { min-width: 0; } .panel .st-name { min-width: 0; } .panel .st-name .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.panel .tabs { flex-wrap: nowrap; } .panel .tabs button { padding: 7px 16px; }
