@font-face {
  font-family: "Barlow Condensed";
  src: url("/fonts/barlow-condensed-800-italic.ttf") format("truetype");
  font-style: italic;
  font-weight: 800;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --bg: #101015;
  --surface: #1a1a22;
  --line: #393942;
  --ink: #f5f4fa;
  --dim: #b5b4c2;
  --accent: #bbabff;
  --display: "Barlow Condensed", Impact, sans-serif;
  font: 16px/1.5 Inter, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body, h1, h2, p, ol { margin: 0; }
button { font: inherit; color: inherit; }
button:enabled { cursor: pointer; }
:focus-visible { outline: 3px solid #e2d9ff; outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.wrap { width: min(1144px, calc(100% - 64px)); margin-inline: auto; }
.masthead { background: #15151b; border-bottom: 1px solid #33323c; }
.mast-inner, .brand, .phase, .section-title, .slip-header { display: flex; align-items: center; }
.mast-inner { min-height: 62px; justify-content: space-between; }
.brand { gap: 12px; }
.brand strong { font-size: 21px; font-weight: 850; letter-spacing: -.07em; }
.brand-divider { width: 1px; height: 14px; background: #585761; }
.brand-section { font-size: 13px; font-weight: 600; color: var(--dim); }
.mark { display: flex; align-items: end; gap: 2px; width: 29px; height: 20px; transform: skew(-19deg); }
.mark i { width: 6px; background: var(--accent); height: 60%; }
.mark i:nth-child(2) { height: 80%; }
.mark i:last-child { height: 100%; }
.phase { gap: 8px; color: #e0d9f6; font-size: 12px; font-weight: 650; }
.phase::before { content: ""; width: 8px; height: 8px; background: var(--accent); transform: skew(-14deg); }
.hero {
  isolation: isolate; overflow: hidden; position: relative; margin-top: 24px; min-height: 330px;
  display: grid; align-items: center; background: #09090e;
  border: 1px solid #3b3948; border-bottom: 3px solid #9180c8;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background:
    repeating-linear-gradient(117deg, transparent 0 55px, #252330 56px, transparent 57px 110px),
    linear-gradient(105deg, #1e1c29 0%, #17151e 32%, #101017 60%, #0c0c11 92%);
}
.hero::after { content: ""; position: absolute; width: 72px; height: 4px; background: var(--accent); bottom: 0; left: 0; }
.hero-copy { padding: 28px clamp(20px, 4.25vw, 64px) 32px; max-width: 62%; }
.eyebrow { font-size: 12px; font-weight: 650; color: #d1cbde; display: flex; align-items: center; gap: 10px; }
.eyebrow span { width: 24px; height: 2px; background: var(--accent); }
h1 { margin: 8px 0 18px; line-height: 1; }
.league { display: block; font: italic 800 clamp(72px, 7.5vw, 110px)/.95 var(--display); letter-spacing: -.02em; }
.title-line { display: block; font-weight: 850; font-size: clamp(32px, 3.6vw, 51px); letter-spacing: -.06em; white-space: nowrap; }
.title-line em { font: italic 800 1.17em/1 var(--display); color: var(--accent); letter-spacing: -.01em; }
.hero-deck { font-size: 15px; color: #c5c0d2; word-break: keep-all; }
#deadline { display: block; color: #ece8f8; font-size: 12px; margin-top: 6px; }
.hero-photo { position: absolute; z-index: -1; right: 3%; width: 43%; top: 0; bottom: 0; display: flex; justify-content: center; overflow: hidden; mix-blend-mode: screen; }
.hero-photo img { display: block; width: auto; max-width: 100%; height: 114%; object-fit: contain; align-self: center; mask-image: linear-gradient(90deg,transparent,#000 15%,#000 84%,transparent); }
#ballot { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(318px, 1fr); align-items: start; gap: clamp(24px, 4vw, 56px); margin-top: 32px; }
.section-title { gap: 12px; }
h2 { font-size: 24px; line-height: 1.25; font-weight: 780; letter-spacing: -.045em; }
.quantity, #count, #result-summary { color: var(--accent); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.quantity { border-left: 1px solid #494752; padding-left: 12px; }
.hint, .state > p { color: var(--dim); font-size: 14px; margin: 6px 0 16px; }
.choices { display: grid; gap: 8px; }
.choice-row { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; align-items: start; }
.team-card { min-width: 0; }
.team-choice {
  display: grid; grid-template-columns: 48px minmax(0,1fr) auto; align-items: center; column-gap: 14px;
  min-width: 0; min-height: 74px; padding: 8px 14px; text-align: left; background: var(--surface);
  border: 1px solid var(--line); border-radius: 2px; transition: background-color 120ms, border-color 120ms;
}
.team-crest { width: 46px; height: 40px; object-fit: contain; }
.team-label { display: grid; gap: 2px; }
.team-code { font: italic 800 26px/.95 var(--display); }
.team-name { color: var(--dim); font-size: 12px; line-height: 1.25; word-break: keep-all; }
.choice-rank { color: #a8a5b3; font: 400 19px/1 system-ui, sans-serif; }
.team-choice:hover:enabled { border-color: #888196; background: #25242e; }
.team-choice[aria-pressed="true"] { background: #302a40; border-color: var(--accent); box-shadow: inset 3px 0 var(--accent); }
.team-choice[aria-pressed="true"] .choice-rank { font-family: inherit; font-size: 12px; line-height: 1.3; font-weight: 700; color: #dbceff; }
.team-choice:disabled:not([aria-pressed="true"]) { opacity: .60; }
.team-card .team-choice { width: 100%; border-radius: 2px 2px 0 0; }
.roster-toggle {
  display: flex; width: 100%; min-height: 36px; align-items: center; justify-content: space-between;
  gap: 6px; padding: 6px 14px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 2px 2px;
  background: #15151b; color: var(--dim); font-size: 12px; font-weight: 650; text-align: left;
}
.roster-toggle::after { content: ""; width: 7px; height: 7px; margin-right: 2px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg) translateY(-2px); }
.roster-toggle:hover, .roster-toggle[aria-expanded="true"] { background: #282432; color: #dfd6fa; }
.roster-toggle[aria-expanded="true"]::after { transform: rotate(225deg) translate(-1px,-1px); }
.roster-panel { grid-column: 1 / -1; min-width: 0; background: #14141b; border: 1px solid #554d64; border-top: 2px solid var(--accent); border-radius: 2px; }
.roster-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 8px; padding: 6px 12px; }
.roster-header h3 { margin: 0; font-size: 14px; word-break: keep-all; }
.roster-actions { display: flex; align-items: center; gap: 10px; }
.roster-actions a, .roster-actions button, #roster-retry { display: inline-flex; align-items: center; gap: 4px; min-height: 34px; border: 0; background: transparent; padding: 0 3px; color: var(--accent); font-size: 12px; font-weight: 650; text-decoration: none; }
.roster-actions button { color: var(--dim); }
.roster-actions a:hover, .roster-actions button:hover, #roster-retry:hover { text-decoration: underline; }
#roster-picture img { display: block; width: 100%; height: auto; }
#roster-error { padding: 8px 12px; color: var(--dim); font-size: 13px; }
.picks { position: sticky; top: 16px; padding: 22px; border: 1px solid #55505e; border-top: 3px solid var(--accent); background: #202027; }
.slip-header { justify-content: space-between; margin-bottom: 16px; }
.slip-header h2 { font-size: 21px; }
#count { font: italic 800 22px/1 var(--display); }
.slots { list-style: none; padding: 0; }
.pick-slot { display: flex; align-items: center; min-height: 57px; gap: 12px; border-top: 1px solid var(--line); }
.pick-slot:last-child { border-bottom: 1px solid var(--line); }
.slot-rank { color: #dfd7f6; font-size: 12px; white-space: nowrap; font-weight: 750; }
.slot-team { flex: 1; color: #a5a1b1; font-size: 14px; word-break: keep-all; line-height: 1.3; }
[data-filled="true"] .slot-team { color: var(--ink); font-weight: 700; }
.slot-actions { display: flex; gap: 2px; }
.slot-actions button { min-width: 28px; height: 36px; padding: 0 3px; border: 1px solid #494451; background: #302c37; font-size: 16px; border-radius: 2px; }
.slot-actions button:disabled { color: #807887; background: transparent; border-color: transparent; }
.slot-actions button:enabled:hover { border-color: var(--accent); }
.scoring, .submit-note { text-align: center; font-size: 12px; color: var(--dim); }
.scoring { margin: 16px 0; }
.scoring b { color: #e4dbfb; }
.scoring i { color: #7a7484; padding-inline: 4px; font-style: normal; }
.primary { display: flex; justify-content: center; align-items: center; gap: 12px; width: 100%; min-height: 48px; background: var(--accent); color: #171122; font-size: 16px; font-weight: 800; border: 0; border-radius: 2px; }
.primary:enabled:hover { background: #d3c8ff; }
.primary:disabled { color: #b5b0c2; background: #3a3643; }
.submit-note { margin-top: 8px; }
.error { color: #ffd0c6; font-size: 14px; margin-top: 12px; }
#loading, noscript { display: block; margin-top: 28px; }
.state { margin: 32px 0; padding: 24px; border: 1px solid var(--line); border-top: 3px solid var(--accent); background: var(--surface); }
#load-failure { max-width: 600px; margin-inline: auto; }
#receipt { padding-block: 16px; border-top: 1px solid var(--line); }
#receipt h2 { font-size: 18px; }
#receipt-ranking { margin-top: 10px; display: flex; gap: 8px 24px; flex-wrap: wrap; }
#receipt-ranking .pick-slot { border: 0; min-height: 0; gap: 6px; }
#receipt + #results { margin-top: 20px; }
#receipt:not([hidden]) { margin-bottom: 0; }
.standings-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
#refresh-results { min-height: 40px; padding: 6px 14px; background: transparent; border: 1px solid #696371; border-radius: 2px; font-size: 13px; font-weight: 650; }
#refresh-results:hover:enabled { border-color: var(--accent); }
#stats-feedback { margin-bottom: 0; }
#results {
  --rank-width: 60px;
  --crest-width: 32px;
  --name-width: clamp(102px, 12vw, 150px);
  --value-width: 72px;
  --chart-gap: 12px;
  --row-pad: 12px;
}
.chart-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; padding: 20px 0; margin: 14px 0 8px; border-block: 1px solid var(--line); }
.chart-spotlight { min-width: 0; flex: 1 1 310px; display: flex; align-items: center; gap: 18px; }
#chart-lead-crest { width: 72px; height: 60px; object-fit: contain; padding: 4px; }
#chart-lead-label { font-size: 12px; font-weight: 700; color: var(--accent); }
#chart-lead { font-size: clamp(24px, 3vw, 34px); line-height: 1.2; letter-spacing: -.045em; font-weight: 800; word-break: keep-all; }
#chart-gap { font-size: 13px; color: var(--dim); margin-top: 4px; word-break: keep-all; }
#chart-filters { display: flex; flex: none; position: relative; min-width: 0; margin: 0; padding: 3px; border: 1px solid #484552; background: #111116; border-radius: 4px; }
#chart-filters label { flex: 1 0 auto; cursor: pointer; }
#chart-filters input { position: absolute; opacity: 0; width: 1px; height: 1px; }
#chart-filters span { display: grid; place-items: center; min-height: 36px; padding: 0 14px; color: var(--dim); font-size: 13px; font-weight: 650; border-radius: 2px; }
#chart-filters input:checked + span { background: #ded5ff; color: #201632; }
#chart-filters input:focus-visible + span { outline: 2px solid white; outline-offset: 2px; }
.chart-axis { display: flex; justify-content: space-between; margin: 12px calc(var(--row-pad) + var(--value-width) + var(--chart-gap)) 4px calc(var(--row-pad) + var(--rank-width) + var(--crest-width) + var(--name-width) + 3 * var(--chart-gap)); color: var(--dim); font-size: 11px; font-variant-numeric: tabular-nums; }
#score-chart { list-style: none; padding: 0; }
.chart-row { display: grid; grid-template-columns: var(--rank-width) var(--crest-width) var(--name-width) minmax(0, 1fr) var(--value-width); grid-template-areas: "place crest name bar value"; column-gap: var(--chart-gap); align-items: center; min-height: 43px; padding: 4px var(--row-pad); border-bottom: 1px solid #313039; --bar: #b9abd5; }
.chart-row[data-rank="1"] { background: #282530; box-shadow: inset 2px 0 var(--accent); }
.chart-place { grid-area: place; color: var(--dim); font-size: 12px; font-weight: 650; white-space: nowrap; font-variant-numeric: tabular-nums; }
.chart-row[data-rank="1"] .chart-place { color: #e2d9ff; }
.chart-crest { grid-area: crest; width: 100%; height: 26px; object-fit: contain; }
.chart-team { grid-area: name; font-weight: 700; font-size: 14px; line-height: 1.25; word-break: keep-all; }
.chart-track { grid-area: bar; display: block; background: #292830; position: relative; height: 13px; }
.chart-track::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(to right, #47434f 0 1px, transparent 1px 25%); }
.chart-fill { display: block; position: relative; height: 100%; background: var(--bar); }
.chart-value { grid-area: value; color: var(--ink); text-align: right; white-space: nowrap; font-size: 15px; font-weight: 750; font-variant-numeric: tabular-nums; }
.chart-row[data-team="t1"] { --bar: #fb5f70; }
.chart-row[data-team="gen"] { --bar: #d9b45f; }
.chart-row[data-team="hle"] { --bar: #fa9951; }
.chart-row[data-team="dk"] { --bar: #d6dce5; }
.chart-row[data-team="bfx"] { --bar: #e2cd68; }
.chart-row[data-team="bro"] { --bar: #71cfb6; }
.chart-row[data-team="dns"] { --bar: #598ef6; }
.chart-row[data-team="krx"] { --bar: #9eabe3; }
.chart-row[data-team="kt"] { --bar: #e97c69; }
.chart-row[data-team="ns"] { --bar: #d87790; }
.standings-method { color: var(--dim); font-size: 12px; margin: 12px 0 20px; }
.result-detail { border-top: 1px solid var(--line); }
.result-detail summary { cursor: pointer; padding: 14px 4px 2px; width: fit-content; font-size: 14px; font-weight: 650; }
.result-detail[open] summary { margin-bottom: 10px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { text-align: right; padding: 12px 8px; border-bottom: 1px solid var(--line); }
thead th { font-size: 12px; color: var(--dim); white-space: nowrap; }
th:first-child, td:first-child, th:nth-child(2) { text-align: left; }
.score { color: var(--accent); font-weight: 750; }
.footer { display: flex; justify-content: space-between; align-items: start; gap: 12px; border-top: 1px solid var(--line); margin: 36px 0 0; padding: 20px 0 28px; color: var(--dim); font-size: 12px; }
.footer strong { color: var(--ink); }
.footer strong span { color: var(--dim); font-weight: 500; margin-left: 4px; }
.footer p { text-align: right; }
@media(max-width:860px) {
  #ballot { grid-template-columns: 1fr; gap: 24px; }
  .picks { position: static; }
  .hero { min-height: 280px; }
}
@media(max-width:600px) {
  .wrap { width: calc(100% - 32px); }
  .mast-inner { min-height: 48px; }
  .brand { gap: 8px; }
  .brand strong { font-size: 18px; }
  .mark { transform: scale(.8) skew(-19deg); transform-origin: left; width: 23px; }
  .hero { min-height: 218px; margin-top: 12px; }
  .hero-copy { padding: 18px 12px 18px 16px; max-width: 65%; }
  .eyebrow { gap: 6px; font-size: 11px; }
  .eyebrow span { width: 16px; }
  h1 { margin: 8px 0 12px; }
  .league { font-size: clamp(45px, 12vw, 70px); }
  .title-line { font-size: clamp(22px,5.8vw,31px); }
  .hero-deck { max-width: 175px; font-size: 12px; }
  .hero-photo { width: 44%; right: 0; }
  .hero-photo img { width: 100%; max-width: none; height: auto; max-height: 110%; }
  #ballot { margin-top: 24px; }
  h2 { font-size: 21px; }
  .team-choice { grid-template-columns: 34px minmax(0,1fr) auto; padding: 6px 8px; min-height: 62px; gap: 6px; }
  .team-crest { width: 34px; height: 32px; }
  .team-code { font-size: 22px; }
  .team-name { font-size: 11px; }
  .choice-rank { font-size: 16px; }
  .roster-toggle { padding-inline: 8px; min-height: 40px; }
  .roster-actions a, .roster-actions button { min-height: 40px; }
  .team-choice[aria-pressed="true"] .choice-rank { font-size: 10px; }
  .picks, .state { padding: 16px; }
  .slot-actions button { min-width: 32px; height: 40px; }
  .footer { flex-direction: column; margin-top: 24px; }
  .footer p { text-align: left; }
  #results .section-title { flex-wrap: wrap; }
  #results { --row-pad: 6px; --rank-width: 46px; --crest-width: 24px; --chart-gap: 7px; padding-inline: 12px; }
  .chart-toolbar { align-items: stretch; gap: 14px; padding: 14px 0; }
  .chart-spotlight { gap: 12px; flex-basis: 100%; }
  #chart-lead-crest { width: 56px; height: 46px; }
  #chart-gap { font-size: 12px; }
  #chart-filters { width: 100%; }
  #chart-filters span { padding-inline: 4px; min-height: 38px; }
  .chart-axis { margin-left: calc(var(--row-pad) + var(--rank-width) + var(--crest-width) + 2 * var(--chart-gap)); margin-right: var(--row-pad); }
  .chart-row { grid-template-columns: var(--rank-width) var(--crest-width) minmax(0, 1fr) auto; grid-template-areas: "place crest name value" "place crest bar bar"; row-gap: 4px; padding-block: 7px; }
  .chart-track { height: 8px; }
  .chart-value { font-size: 13px; }
  .result-team { max-width: 100px; font-size: 12px; word-break: keep-all; }
  th, td { font-size: 12px; padding: 10px 4px; }
}
@media(prefers-reduced-motion:reduce) { *, *::before, *::after { transition: none !important; } }
