:root {
  color-scheme: dark;
  --bg: #0d0718;
  --surface: #171024;
  --surface-2: #211633;
  --surface-3: #2a1b41;
  --text: #fbf9ff;
  --muted: #a99fba;
  --line: rgba(255, 255, 255, .11);
  --violet: #8658ff;
  --violet-2: #5d32d8;
  --pink: #ff4fb3;
  --acid: #d9ff58;
  --red: #ff6685;
  --green: #57e7a0;
  --shadow: 0 22px 70px rgba(0, 0, 0, .38);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 50% -10%, rgba(134, 88, 255, .26), transparent 32rem),
    linear-gradient(180deg, #10091d 0%, var(--bg) 72%);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  opacity: .3;
  background-image:
    linear-gradient(rgba(255,255,255,.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.022) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(#000, transparent 78%);
}
.ambient-glow {
  position: fixed;
  z-index: -1;
  top: 14rem;
  left: 50%;
  width: min(80vw, 850px);
  height: 360px;
  translate: -50% 0;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .16;
  background: linear-gradient(90deg, var(--violet), var(--pink));
  pointer-events: none;
}

button, select, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .45; }
[hidden] { display: none !important; }
select, input {
  width: 100%;
  min-height: 46px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  background: #100a1b;
}
select { padding: 0 40px 0 14px; }
input { padding: 0 14px; }
select:focus, input:focus, button:focus-visible {
  outline: 3px solid rgba(217, 255, 88, .28);
  outline-offset: 2px;
  border-color: var(--acid);
}
option { background: #171024; }

.site-header {
  width: min(1080px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand-mark { position: relative; display: block; width: 100px; height: 56px; overflow: hidden; flex-shrink: 0; border-radius: 6px; }
.brand-logo { display: block; position: absolute; width: 190%; max-width: none; height: auto; left: 50%; top: 50%; transform: translate(-50%, -45%); }
.brand > span:last-child { display: grid; line-height: .95; }
.brand strong { font-size: 14px; letter-spacing: -.02em; }
.brand small { margin-top: 4px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .2em; }
@media (max-width: 480px) {
  .brand { gap: 6px; }
  .brand-mark { width: 84px; height: 46px; }
  .brand strong { font-size: 12px; }
  .brand small { font-size: 9px; letter-spacing: .14em; }
}
.header-mode { color: var(--muted); font-size: 12px; font-weight: 750; letter-spacing: .08em; }
.header-mode span { margin-left: 7px; padding: 5px 8px; color: #180d29; border-radius: 999px; background: var(--acid); font-size: 10px; }

/* Public guides and crawlable home content share the game's visual language. */
.skip-link { position: absolute; top: -80px; left: 16px; z-index: 100; padding: 12px 18px; color: var(--bg); background: var(--acid); border-radius: 8px; font-weight: 800; }
.skip-link:focus { top: 12px; }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--acid); outline-offset: 5px; border-radius: 3px; }
.home-information { margin-top: 76px; padding-top: 36px; border-top: 1px solid var(--line); }
.mode-screen:has(#difficultyStep[hidden]) .home-information { display: none; }
.home-information-heading { max-width: 730px; }
.home-information h2 { font-size: clamp(25px, 4vw, 36px); line-height: 1.16; letter-spacing: -.035em; margin: 0 0 18px; }
.home-information p, .information-card p, .information-card li { color: var(--muted); font-size: 15px; line-height: 1.8; }
.home-information .overline, .information-card .overline { color: var(--acid); font-size: 12px; line-height: 1.6; }
.home-information a, .information-card a, .site-breadcrumbs a, .site-footer a { color: var(--acid); text-decoration-thickness: 1px; text-underline-offset: 4px; }
.home-information a:hover, .information-card a:hover, .site-footer a:hover { color: var(--text); }
.site-feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 26px 0; }
.site-feature-grid article { border: 1px solid var(--line); border-radius: 16px; padding: 24px; background: rgba(23, 16, 36, .65); }
.site-feature-number { color: var(--acid); font-size: 12px; font-weight: 850; letter-spacing: .1em; }
.site-feature-grid h3 { margin: 18px 0 10px; font-size: 19px; letter-spacing: -.025em; }
.site-feature-grid p { margin: 0; font-size: 14px; }
.home-guide-links { display: flex; flex-wrap: wrap; gap: 14px 28px; font-size: 14px; font-weight: 700; }
.home-information .site-link-note { font-size: 12px; margin-top: 12px; }
.home-faq-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; margin-top: 45px; }
.home-faq-heading a { flex-shrink: 0; font-size: 14px; }
.site-faq { border-bottom: 1px solid var(--line); padding: 0; }
.site-faq summary { padding: 20px 5px; cursor: pointer; color: var(--text); font-size: 15px; font-weight: 700; line-height: 1.55; }
.site-faq summary::marker { color: var(--acid); }
.site-faq[open] summary { color: var(--acid); }
.site-faq p { margin: 0; padding: 0 22px 22px; max-width: 850px; }
.site-play-link { flex-shrink: 0; margin-left: 16px; color: var(--acid); font-size: 13px; font-weight: 750; text-decoration: none; }
.information-shell { width: min(880px, calc(100% - 32px)); margin: 28px auto 64px; }
.site-breadcrumbs { display: flex; gap: 12px; margin: 0 0 26px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.site-breadcrumbs a { color: var(--muted); }
.information-card { padding: clamp(22px, 5vw, 48px); border: 1px solid var(--line); border-radius: 22px; background: rgba(23, 16, 36, .85); }
.information-card h1 { margin: 0 0 25px; font-size: clamp(34px, 5vw, 52px); line-height: 1.08; letter-spacing: -.05em; text-wrap: balance; }
.information-card h2 { margin: 36px 0 12px; font-size: 22px; line-height: 1.35; letter-spacing: -.025em; scroll-margin-top: 24px; }
.information-card strong { color: var(--text); }
.information-card .site-lead { font-size: 18px; color: #d5cbe5; line-height: 1.65; margin: 0 0 25px; }
.information-card .policy-date { font-size: 12px; margin: -10px 0 22px; }
.article-jump-links { display: flex; flex-wrap: wrap; gap: 12px; padding: 10px 0 6px; }
.article-jump-links a { padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; text-decoration: none; }
.site-callout { padding: 20px 24px; margin: 30px 0; border: 1px solid rgba(217, 255, 88, .25); border-radius: 14px; background: rgba(217, 255, 88, .035); }
.site-callout h2 { margin: 0 0 8px; font-size: 18px; color: var(--acid); }
.site-callout p { margin: 0; }
.information-card .article-related { margin-top: 36px; border-top: 1px solid var(--line); padding-top: 24px; font-size: 14px; }
footer.site-footer { display: block; color: var(--muted); letter-spacing: normal; font-weight: 400; }
.footer-brand { font-size: 11px; font-weight: 850; letter-spacing: .09em; margin-bottom: 18px; color: var(--text); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 14px 22px; }
.site-footer nav a { font-size: 13px; color: #d5cbe5; }
.site-footer .footer-note { max-width: 860px; font-size: 12px; line-height: 1.7; margin: 18px 0 0; }
.information-card, .site-footer { overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .site-feature-grid { grid-template-columns: 1fr; }
  .site-feature-grid article { padding: 20px; }
  .site-feature-grid h3 { margin-top: 10px; }
  .home-information { margin-top: 48px; padding-top: 28px; }
  .home-faq-heading { align-items: flex-start; }
  .home-faq-heading h2 { font-size: 25px; }
  .information-shell { width: calc(100% - 20px); margin-top: 20px; }
  .information-card { padding: 24px 20px; border-radius: 16px; }
  .site-play-link { font-size: 12px; }
  .site-callout { padding: 18px; }
  .site-footer nav { gap: 16px 20px; }
}

.game-shell { width: min(1080px, calc(100% - 32px)); margin: 0 auto 70px; }
.mode-screen { padding: 64px 0 10px; }
.mode-intro { max-width: 690px; margin-bottom: 46px; }
.mode-intro h1 { margin: 0; font-size: clamp(48px, 8vw, 86px); line-height: .9; letter-spacing: -.075em; }
.mode-intro h1 em { color: var(--muted); font-style: normal; }
.mode-intro > p:last-child { max-width: 600px; margin: 22px 0 0; color: var(--muted); font-size: 16px; line-height: 1.6; }
.mode-section { margin-top: 30px; }
.mode-section-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.mode-section-title span { font-size: 13px; font-weight: 900; letter-spacing: .12em; }
.mode-section-title small { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.mode-grid { display: grid; gap: 10px; }
.team-modes { grid-template-columns: repeat(3, 1fr); }
.individual-modes { grid-template-columns: repeat(5, 1fr); }
.mode-card { min-height: 185px; position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; padding: 20px; color: var(--text); text-align: left; border: 1px solid var(--line); border-radius: 17px; background: linear-gradient(145deg, var(--surface-2), #120b1f); transition: transform .18s, border-color .18s; }
.mode-card::after { content: ""; position: absolute; width: 130px; height: 130px; right: -45px; bottom: -55px; border: 24px solid rgba(134,88,255,.13); border-radius: 50%; }
.mode-card:hover { transform: translateY(-4px); border-color: var(--violet); }
.mode-card .mode-code { width: 39px; height: 39px; display: grid; place-items: center; margin-bottom: 21px; color: #170b29; border-radius: 10px; background: var(--acid); font-size: 11px; font-weight: 950; }
.mode-card strong { position: relative; z-index: 1; font-size: 21px; letter-spacing: -.035em; }
.mode-card small { position: relative; z-index: 1; margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.mode-card b { position: relative; z-index: 1; margin-top: auto; color: var(--acid); font-size: 18px; }
.individual-modes .mode-card { min-height: 155px; padding: 17px; }
.individual-modes .mode-code { margin-bottom: 17px; }
.individual-modes .mode-card strong { font-size: 15px; }
.draft-screen { padding-top: 52px; }
.draft-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.overline, .panel-label { margin: 0 0 10px; color: var(--acid); font-size: 12px; font-weight: 850; letter-spacing: .14em; }
.draft-head h1 { margin: 0; font-size: clamp(38px, 6vw, 68px); line-height: .94; letter-spacing: -.065em; }
.draft-head h1 em { color: var(--muted); font-style: normal; }
.back-button { margin: 0 0 16px; padding: 0; color: var(--muted); border: 0; background: transparent; font-size: 11px; font-weight: 850; letter-spacing: .1em; }
.back-button:hover { color: var(--acid); }
.pick-counter { min-width: 126px; display: flex; align-items: center; justify-content: flex-end; gap: 11px; }
.pick-counter strong { font-size: 54px; line-height: .8; letter-spacing: -.08em; }
.pick-counter span { color: var(--muted); font-size: 11px; font-weight: 800; line-height: 1.2; letter-spacing: .1em; }

.draft-layout { display: grid; grid-template-columns: 292px minmax(0, 1fr); gap: 14px; align-items: stretch; }
.game-shell:has(.draft-screen:not([hidden])) { width: min(1320px, calc(100% - 32px)); }
.squad-card, .pick-stage, .route-panel, .match-panel, .result-panel {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(23, 16, 36, .88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
.squad-card { padding: 20px; }
.squad-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.squad-card-head > div { display: grid; gap: 3px; }
.squad-card-head span, .select-label, .seed-control span, .team-rating span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
}
.squad-card-head strong { font-size: 21px; letter-spacing: -.03em; }
.icon-button { width: 38px; height: 38px; color: var(--text); border: 1px solid var(--line); border-radius: 50%; background: transparent; font-size: 20px; }
.icon-button:hover { color: var(--acid); border-color: var(--acid); }
.select-label { display: block; margin-bottom: 7px; }
.nation-button { width: 100%; min-height: 42px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; color: var(--acid); border: 1px solid rgba(217,255,88,.25); border-radius: 11px; background: rgba(217,255,88,.055); font-size: 10px; font-weight: 900; letter-spacing: .08em; }
.nation-button:hover:not(:disabled) { border-color: var(--acid); background: rgba(217,255,88,.1); }
.nation-button span { font-size: 16px; }
.lineup-slots { display: grid; gap: 8px; margin: 20px 0; }
.lineup-order-hint { margin: -9px 2px 16px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.lineup-slot { min-height: 58px; display: grid; grid-template-columns: 40px minmax(0,1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border: 1px dashed rgba(255,255,255,.13); border-radius: 12px; color: #71677f; background: rgba(255,255,255,.018); }
.lineup-slot.filled { color: var(--text); border-style: solid; border-color: rgba(134,88,255,.34); background: rgba(134,88,255,.1); }
.lineup-slot.reorderable { cursor: grab; transition: border-color .15s ease, background .15s ease, opacity .15s ease, transform .15s ease; }
.lineup-slot.reorderable:active { cursor: grabbing; }
.lineup-slot.dragging { opacity: .42; transform: scale(.985); }
.lineup-slot.drag-over { border-color: var(--acid); background: rgba(217,255,88,.1); }
.slot-code { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: inherit; background: rgba(255,255,255,.06); font-size: 11px; font-weight: 900; }
.filled .slot-code { color: #170b29; background: var(--acid); }
.slot-copy { min-width: 0; display: grid; gap: 2px; }
.slot-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.slot-copy small { color: var(--muted); font-size: 10px; }
.slot-actions { display: flex; align-items: center; gap: 7px; }
.slot-drag-handle { width: 17px; color: var(--muted); font-size: 16px; line-height: 1; text-align: center; cursor: grab; user-select: none; }
.slot-drag-handle:active { cursor: grabbing; }
.slot-order-controls { display: flex; gap: 3px; }
.slot-order-button { width: 22px; height: 25px; padding: 0; color: var(--text); border: 1px solid var(--line); border-radius: 6px; background: rgba(255,255,255,.035); font-size: 12px; font-weight: 900; }
.slot-order-button:hover:not(:disabled) { color: var(--acid); border-color: rgba(217,255,88,.5); }
.slot-order-button:disabled { opacity: .22; cursor: default; }
.slot-rating { font-size: 17px; font-weight: 900; }
.team-rating { min-height: 52px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; border-radius: 12px; background: #100a1b; }
.team-rating strong { color: var(--acid); font-size: 24px; }
.seed-control { display: grid; gap: 7px; margin-top: 16px; }

.pick-stage { min-height: 610px; overflow: hidden; position: relative; }
.discipline-banner { height: 76px; display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 0 24px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.018); }
.discipline-banner > span { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 11px; color: #180d29; background: var(--acid); font-size: 13px; font-weight: 950; }
.discipline-banner > div:nth-child(2) { display: grid; gap: 2px; }
.discipline-banner small { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.discipline-banner strong { font-size: 16px; }
.draft-progress { display: flex; gap: 5px; }
.progress-dot { width: 22px; height: 5px; border-radius: 999px; background: rgba(255,255,255,.12); }
.progress-dot.done { background: var(--acid); }
.progress-dot.current { background: var(--violet); box-shadow: 0 0 12px rgba(134,88,255,.7); }

.spin-panel, .ready-panel { min-height: 533px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 38px; text-align: center; }
.country-panel { min-height: 533px; padding: 28px; }
.country-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 10px; }
.country-heading p { margin: 0 0 9px; color: var(--violet); font-size: 11px; font-weight: 850; letter-spacing: .13em; }
.country-heading h2 { margin: 0; font-size: 34px; letter-spacing: -.05em; }
.country-hint { max-width: 620px; margin: 0 0 24px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.country-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; }
.country-card { min-width: 0; min-height: 230px; position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; padding: 15px; color: var(--text); text-align: left; border: 1px solid var(--line); border-radius: 15px; background: radial-gradient(circle at 90% 0, rgba(255,79,179,.2), transparent 46%), linear-gradient(155deg, var(--surface-3), #120b1f 76%); transition: transform .18s, border-color .18s; }
.country-card:hover { transform: translateY(-5px); border-color: var(--acid); }
.country-code { min-width: 66px; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; margin-bottom: 28px; padding: 7px 9px; color: #160b26; border-radius: 12px; background: var(--acid); font-size: 12px; font-weight: 950; letter-spacing: .06em; }
.country-choice-badge .country-flag { width: 24px; height: 18px; border-color: rgba(22,11,38,.25); }
.country-card strong { overflow-wrap: anywhere; font-size: 18px; line-height: 1.05; letter-spacing: -.035em; }
.country-card small { margin-top: 8px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.country-pick { width: 100%; margin-top: auto; padding-top: 14px; display: flex; align-items: center; justify-content: space-between; color: var(--acid); border-top: 1px solid var(--line); font-size: 9px; font-weight: 900; letter-spacing: .07em; }
.country-pick b { font-size: 18px; }
.shuttle-orbit { position: relative; width: 116px; height: 116px; display: grid; place-items: center; margin-bottom: 25px; border: 1px solid rgba(134,88,255,.35); border-radius: 50%; background: radial-gradient(circle, rgba(134,88,255,.35), rgba(134,88,255,.05) 55%, transparent 56%); }
.shuttle-orbit::before, .shuttle-orbit::after { content: ""; position: absolute; inset: -13px; border: 1px solid rgba(255,79,179,.2); border-radius: 50%; }
.shuttle-orbit::after { inset: 14px; border-style: dashed; animation: orbit 12s linear infinite; }
.shuttle-orbit span { color: var(--acid); font-size: 34px; filter: drop-shadow(0 0 14px rgba(217,255,88,.55)); }
@keyframes orbit { to { rotate: 360deg; } }
.spin-panel > p:first-of-type, .choice-heading p, .ready-panel > p { margin: 0 0 11px; color: var(--violet); font-size: 12px; font-weight: 850; letter-spacing: .13em; }
.ready-panel h2 { margin: 0; font-size: clamp(38px, 6vw, 62px); line-height: .95; letter-spacing: -.06em; }
.spin-panel .action-button { margin-top: 16px; }
.action-button { min-width: 240px; min-height: 52px; display: inline-flex; align-items: center; justify-content: space-between; gap: 28px; padding: 0 18px 0 21px; color: #140a24; border: 0; border-radius: 13px; background: var(--acid); font-size: 13px; font-weight: 950; letter-spacing: .04em; box-shadow: 0 12px 30px rgba(217,255,88,.12); transition: transform .18s, filter .18s; }
.action-button:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.06); }
.action-button b { font-size: 20px; }

.choice-panel { padding: 26px; }
.choice-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.choice-heading h2 { margin: 0; font-size: 31px; letter-spacing: -.045em; }
.reroll-button, .text-button { color: var(--muted); border: 0; background: transparent; font-size: 12px; font-weight: 800; letter-spacing: .07em; }
.reroll-button:hover, .text-button:hover { color: var(--acid); }
.choice-hint { margin: -10px 0 18px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.choice-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; }
.player-card { min-width: 0; min-height: 368px; padding: 0; overflow: hidden; position: relative; display: flex; flex-direction: column; color: var(--text); text-align: left; border: 1px solid var(--line); border-radius: 17px; background: linear-gradient(155deg, var(--surface-3), #120b1f 74%); box-shadow: 0 14px 34px rgba(0,0,0,.18); transition: transform .18s, border-color .18s, box-shadow .18s; }
.player-card::before { content: ""; position: absolute; z-index: 2; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, var(--acid), var(--violet) 58%, var(--pink)); opacity: .8; }
.player-card:hover { transform: translateY(-5px); border-color: rgba(217,255,88,.46); box-shadow: 0 20px 42px rgba(0,0,0,.3), 0 0 0 1px rgba(217,255,88,.06); }
.card-top { min-height: 132px; display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; justify-content: space-between; padding: 22px 18px 18px; background: radial-gradient(circle at 90% 0, rgba(255,79,179,.2), transparent 56%), linear-gradient(140deg, rgba(134,88,255,.36), rgba(134,88,255,.08) 65%, transparent); }
.card-rating { min-width: 0; max-width: 100%; display: flex; flex-direction: column; align-items: flex-start; flex-shrink: 0; padding: 9px 13px 10px 14px; white-space: normal; border-left: 3px solid var(--acid); border-radius: 0 12px 12px 0; background: linear-gradient(110deg, rgba(8,5,16,.62), rgba(8,5,16,.18)); box-shadow: inset 0 1px rgba(255,255,255,.06); transition: border-color .18s ease, background .18s ease; }
.player-card:hover .card-rating { border-left-color: #fff; background: linear-gradient(110deg, rgba(8,5,16,.76), rgba(8,5,16,.22)); }
.card-rating strong { color: #fff; font-size: 53px; line-height: .78; letter-spacing: -.075em; text-shadow: 0 3px 18px rgba(0,0,0,.28); }
.card-rating span { margin-top: 11px; color: var(--acid); font-size: 8px; font-weight: 950; letter-spacing: .13em; }
.card-year { flex-shrink: 0; padding: 8px 11px; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; font-size: 18px; font-weight: 950; line-height: 1; letter-spacing: -.02em; }
.card-body { flex: 1; display: flex; flex-direction: column; padding: 19px 17px 16px; }
.card-body small { color: var(--violet); font-size: 11px; font-weight: 900; letter-spacing: .12em; }
.card-meta { min-height: 24px; display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--violet); font-size: 11px; font-weight: 900; letter-spacing: .12em; }
.card-country-badge { display: inline-flex; align-items: center; gap: 5px; max-width: 118px; padding: 4px 7px; color: var(--text); border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.045); font-size: 9px; letter-spacing: .07em; }
.card-country-badge > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-player-flags .country-flag { width: 28px; height: 21px; }
.card-body h3 { margin: 10px 0 7px; overflow-wrap: anywhere; font-size: 18px; line-height: 1.08; letter-spacing: -.035em; }
.card-body p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.card-pick { margin-top: auto; padding-top: 18px; display: flex; align-items: center; justify-content: space-between; color: var(--acid); border-top: 1px solid var(--line); font-size: 11px; font-weight: 900; letter-spacing: .08em; }
.card-pick b { font-size: 20px; }
.ready-panel { background: radial-gradient(circle at 50% 40%, rgba(134,88,255,.2), transparent 52%); }
.ready-record { display: flex; align-items: center; gap: 13px; margin-bottom: 22px; }
.ready-record span { font-size: 66px; line-height: .8; font-weight: 950; letter-spacing: -.09em; }
.ready-record i { color: var(--pink); font-size: 30px; font-style: normal; }
.ready-panel .action-button { margin-top: 28px; }
.error-message { min-height: 20px; margin: -32px 30px 20px; color: #ff91a9; font-size: 13px; text-align: center; }

.game-shell:has(.arena:not([hidden])) { width: calc(100% - 32px); }
.arena { padding-top: 22px; --draw-height: max(300px, calc(100dvh - 290px)); }
.arena-topline { display: flex; justify-content: space-between; align-items: end; margin-bottom: 18px; }
.arena-topline .overline { margin-bottom: 5px; }
.arena-topline h2 { margin: 0; font-size: clamp(22px, 2.6vw, 36px); letter-spacing: -.045em; }
.arena-workspace { display: grid; grid-template-columns: minmax(0,1fr) clamp(250px, 21vw, 320px); grid-template-areas: "draw match"; gap: 16px; align-items: start; }
.match-sidebar { grid-area: match; min-width: 0; display: grid; gap: 12px; }
.route-panel { padding: 15px; }
.route-panel summary { cursor: pointer; margin: 0; font-size: 11px; }
.route-panel summary span { margin-left: 10px; color: var(--muted); font-size: 9px; }
.route-panel[open] summary { margin-bottom: 10px; }
.route { display: grid; gap: 7px; }
.route-item { min-height: 54px; display: grid; grid-template-columns: 28px minmax(0,1fr) auto; gap: 8px; align-items: center; padding: 8px; color: #746985; border-radius: 11px; }
.route-item.current { color: var(--text); background: rgba(134,88,255,.14); }
.route-item.done { color: #bbb2ca; }
.route-index { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; font-size: 11px; font-weight: 900; }
.route-item.current .route-index { color: #170c28; border-color: var(--acid); background: var(--acid); }
.route-item.win .route-index { color: #10091d; border-color: var(--green); background: var(--green); }
.route-item.loss .route-index { color: #fff; border-color: var(--red); background: var(--red); }
.route-item strong { display: block; font-size: 13px; }
.route-item small { color: inherit; font-size: 10px; font-weight: 750; letter-spacing: .05em; }
.route-score { font-size: 12px; font-weight: 900; }
.route-games { grid-column: 2 / -1; }
.match-panel { min-width: 0; padding: 20px; }
.match-intro { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.stage-tag { display: inline-block; padding: 6px 9px; color: #170c28; border-radius: 6px; background: var(--acid); font-size: 10px; font-weight: 950; letter-spacing: .1em; }
.match-intro p { margin: 18px 0 3px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.match-intro h3 { margin: 0; font-size: 25px; letter-spacing: -.045em; overflow-wrap: anywhere; }
.match-intro .entry-label { white-space: normal; }
.tie-expectation { margin-top: 10px; color: var(--muted); font-size: 13px; }
.scoreboard { display: flex; align-items: end; gap: 23px; margin: 24px 0 4px; }
.scoreboard div { display: grid; }
.scoreboard small { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.scoreboard strong { font-size: 46px; line-height: 1; }
.scoreboard > span { color: #5c516a; font-size: 26px; }
.rubber-feed { display: grid; gap: 10px; margin: 16px 0 0; max-height: 390px; overflow: auto; overscroll-behavior: contain; padding-right: 4px; scroll-behavior: smooth; scrollbar-width: thin; scrollbar-color: #66517f transparent; }
.rubber-feed:empty { display: none; }
.rubber-result { display: grid; grid-template-columns: 27px 25px minmax(0,1fr); gap: 8px; align-items: start; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(135deg, rgba(255,255,255,.035), transparent); animation: card-in .32s ease both; }
.rubber-result.win { border-left: 3px solid var(--green); }
.rubber-result.loss { border-left: 3px solid var(--red); }
.rubber-result .slot { padding-top: 6px; color: var(--muted); font-size: 10px; font-weight: 900; }
.rubber-result .outcome { width: 26px; height: 26px; display: grid; place-items: center; color: #10091d; border-radius: 50%; background: var(--green); font-size: 10px; font-weight: 950; }
.rubber-result.loss .outcome { color: #fff; background: var(--red); }
.rubber-entries { min-width: 0; }
.rubber-entries strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 12px; line-height: 1.4; }
.rubber-entries small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }
.game-score-strip { display: flex; flex-wrap: wrap; gap: 6px; font-variant-numeric: tabular-nums; }
.rubber-score { grid-column: 1 / -1; padding-top: 9px; margin-top: 2px; border-top: 1px solid rgba(255,255,255,.07); }
.game-score { min-width: 55px; display: grid; justify-items: center; gap: 3px; padding: 5px 8px 6px; border: 1px solid rgba(255,255,255,.1); border-radius: 7px; background: rgba(255,255,255,.035); }
.game-score.won { border-color: rgba(87,231,160,.25); background: rgba(87,231,160,.06); }
.game-score.lost { border-color: rgba(255,87,135,.2); background: rgba(255,87,135,.04); }
.game-number { color: var(--muted); font-size: 8px; font-weight: 850; letter-spacing: .08em; }
.game-points { display: flex; align-items: baseline; gap: 4px; color: #aaa0b7; font-size: 13px; line-height: 1; }
.game-points b { font-weight: 700; }
.game-points .high-score { color: var(--text); font-weight: 950; }
.game-score.won .high-score { color: var(--green); }
.score-dash { color: #716580; font-weight: 500; }
.route-games .game-score { min-width: 46px; padding: 4px 5px; }
.route-games .game-points { font-size: 11px; }
.tie-complete { padding: 10px 2px 1px; color: var(--muted); font-size: 13px; }
.tie-complete strong { color: var(--text); }
.play-controls { display: flex; align-items: center; gap: 16px; margin-top: 16px; }
.play-controls .action-button { width: 100%; min-width: 0; min-height: 54px; padding: 12px 16px; font-size: 12px; text-align: left; }
.play-controls .action-button b { margin-left: 8px; }
@keyframes card-in { from { opacity: 0; transform: translateY(8px); } }

.result-panel { margin-top: 14px; overflow: hidden; }
.result-hero { position: relative; isolation: isolate; overflow: hidden; padding: clamp(32px,6vw,62px); background: radial-gradient(circle at 8% 10%, rgba(134,88,255,.26), transparent 42%); }
.result-hero > :not(.champion-celebration) { position: relative; z-index: 2; }
.result-hero h2 { margin: 0; font-size: clamp(44px,8vw,82px); line-height: .95; letter-spacing: -.07em; }
.result-hero > p:not(.overline) { margin: 13px 0 26px; color: var(--muted); font-size: 16px; }
.result-actions { display: flex; align-items: center; gap: 12px; }
.result-actions .action-button { min-width: 210px; }
.champion-celebration { position: absolute; z-index: 0; inset: 0; opacity: 0; pointer-events: none; }
.champion-rays { width: 520px; aspect-ratio: 1; position: absolute; top: 50%; right: -95px; border-radius: 50%; background: repeating-conic-gradient(from 8deg, rgba(217,255,88,.13) 0 8deg, transparent 8deg 20deg); filter: blur(.2px); transform: translateY(-50%) scale(.65); }
.champion-confetti { position: absolute; inset: 0; overflow: hidden; }
.champion-confetti-piece { width: 7px; height: 14px; position: absolute; top: -22px; left: var(--x); border-radius: 1px; background: var(--color); box-shadow: 0 0 8px color-mix(in srgb, var(--color) 55%, transparent); opacity: 0; will-change: transform, opacity; }
.champion-confetti-piece.is-round { width: 8px; height: 8px; border-radius: 50%; }
.champion-mark { display: none; align-items: center; gap: 11px; margin-bottom: 17px; color: var(--acid); font-size: 11px; font-weight: 950; letter-spacing: .18em; }
.champion-trophy { width: 52px; height: 52px; overflow: visible; fill: rgba(217,255,88,.15); stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 13px rgba(217,255,88,.32)); }
.result-panel.is-champion { border-color: rgba(217,255,88,.42); box-shadow: 0 24px 80px rgba(91,52,149,.28), 0 0 0 1px rgba(217,255,88,.08); }
.result-panel.is-champion .result-hero { background: radial-gradient(circle at 80% 50%, rgba(217,255,88,.14), transparent 31%), radial-gradient(circle at 8% 10%, rgba(134,88,255,.34), transparent 45%), linear-gradient(135deg, rgba(29,16,48,.98), rgba(13,8,23,.98)); }
.result-panel.is-champion .champion-celebration { opacity: 1; }
.result-panel.is-champion .champion-rays { animation: champion-rays-in 1.2s cubic-bezier(.2,.85,.25,1) both, champion-rays-turn 18s linear 1.2s infinite; }
.result-panel.is-champion .champion-mark { display: flex; animation: champion-mark-in .72s cubic-bezier(.18,.88,.3,1.2) .12s both; }
.result-panel.is-champion .result-hero h2 { color: var(--acid); text-shadow: 0 0 30px rgba(217,255,88,.2); animation: champion-title-in .75s cubic-bezier(.18,.88,.3,1.12) .22s both; }
.result-panel.is-champion .champion-confetti-piece { animation: champion-confetti-fall var(--duration) cubic-bezier(.22,.7,.35,1) var(--delay) both; }
@keyframes champion-mark-in { from { opacity: 0; transform: translateY(18px) scale(.86); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes champion-title-in { from { opacity: 0; transform: translateY(20px); letter-spacing: -.03em; } to { opacity: 1; transform: translateY(0); letter-spacing: -.07em; } }
@keyframes champion-rays-in { from { opacity: 0; transform: translateY(-50%) scale(.45) rotate(-18deg); } to { opacity: 1; transform: translateY(-50%) scale(1) rotate(0); } }
@keyframes champion-rays-turn { to { transform: translateY(-50%) scale(1) rotate(360deg); } }
@keyframes champion-confetti-fall { 0% { opacity: 0; transform: translate3d(0,-18px,0) rotate(0); } 12% { opacity: 1; } 82% { opacity: 1; } 100% { opacity: 0; transform: translate3d(var(--drift),460px,0) rotate(var(--spin)); } }
.secondary-button { min-height: 44px; padding: 0 16px; color: var(--text); border: 1px solid var(--line); border-radius: 11px; background: transparent; font-size: 12px; font-weight: 900; letter-spacing: .06em; }
.secondary-button:hover { color: var(--acid); border-color: var(--acid); }
.tournament-data { padding: clamp(24px,5vw,52px); border-top: 1px solid var(--line); }
.data-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 15px; }
.data-heading h3 { margin: 0; font-size: 24px; letter-spacing: -.03em; }
.data-heading span { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .07em; }
.standings-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; }
.group-table, .bracket-stage { min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.018); }
.group-table h4, .bracket-stage h4 { margin: 0 0 10px; color: var(--violet); font-size: 11px; font-weight: 900; letter-spacing: .1em; }
.table-row { display: grid; grid-template-columns: 18px minmax(0,1fr) 27px 33px 33px 38px; gap: 6px; align-items: center; padding: 8px 0; border-top: 1px solid rgba(255,255,255,.06); color: #7f758c; font-size: 11px; }
.table-row.header { color: var(--muted); border: 0; font-size: 9px; font-weight: 800; }
.table-row.qualifier { color: var(--text); }
.table-row .team { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.table-row .number { text-align: right; font-variant-numeric: tabular-nums; }
.bracket-heading { margin-top: 36px; }
.bracket { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.bracket-tie { margin-top: 7px; padding: 10px; border-radius: 8px; background: #100a1b; font-size: 11px; }
.bracket-tie div { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; }
.bracket-tie .winner { color: var(--acid); font-weight: 850; }

/* Live tournament draw */
.draw-panel {
  grid-area: draw;
  min-width: 0;
  margin-top: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    radial-gradient(circle at 88% 0, rgba(134,88,255,.16), transparent 28rem),
    rgba(17, 10, 28, .94);
  box-shadow: var(--shadow);
}
.draw-heading {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--line);
}
.draw-heading .overline { margin-bottom: 5px; }
.draw-heading h3 { margin: 0; font-size: 23px; letter-spacing: -.045em; }
.draw-legend { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .06em; }
.draw-legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; background: #51465f; }
.legend-dot.user { background: var(--acid); box-shadow: 0 0 11px rgba(217,255,88,.55); }
.legend-dot.winner { background: var(--green); }
.legend-dot.locked { border: 1px solid #62576e; background: transparent; }
.section-kicker { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 17px 24px 10px; color: var(--text); font-size: 12px; font-weight: 900; letter-spacing: .12em; }
.section-kicker small { color: var(--muted); font-size: 11px; letter-spacing: .1em; }
.bracket-kicker { border-top: 1px solid var(--line); }
.bracket-kicker span { font-size: 10px; color: var(--muted); letter-spacing: .04em; }
.draw-navigation { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.draw-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 20px; }
.draw-tabs { display: flex; gap: 5px; }
.draw-tabs button, .focus-draw-button { min-height: 32px; border: 1px solid transparent; border-radius: 7px; padding: 7px 10px; background: transparent; color: var(--muted); font-size: 10px; font-weight: 850; letter-spacing: .06em; }
.draw-tabs button[aria-pressed="true"] { color: var(--acid); background: rgba(217,255,88,.09); border-color: rgba(217,255,88,.22); }
.draw-tabs button:hover, .focus-draw-button:hover { color: var(--text); background: rgba(255,255,255,.07); }
.draw-toolbar button:focus-visible { outline: 2px solid var(--acid); outline-offset: 2px; }

.cup-group-stage { height: calc(var(--draw-height) + 41px); overflow: auto; padding-bottom: 20px; border-top: 1px solid var(--line); }
.live-groups { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; padding: 0 20px; }
.live-group-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.025); }
.live-group-card.is-user-group { border-color: rgba(217,255,88,.38); box-shadow: inset 0 0 0 1px rgba(217,255,88,.06); }
.live-group-card header { min-height: 55px; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.025); }
.group-letter { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; color: #160b27; border-radius: 9px; background: var(--violet); font-size: 12px; font-weight: 950; }
.is-user-group .group-letter { background: var(--acid); }
.live-group-card header div { min-width: 0; display: grid; gap: 1px; }
.live-group-card header strong { font-size: 12px; letter-spacing: .08em; }
.live-group-card header small { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.live-group-row { min-height: 43px; display: grid; grid-template-columns: 22px minmax(0,1fr) 28px; align-items: center; gap: 7px; padding: 6px 10px; color: #92879f; border-top: 1px solid rgba(255,255,255,.055); }
.live-group-row:first-of-type { border-top: 0; }
.live-group-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.group-rank { width: 20px; height: 20px; display: grid; place-items: center; color: var(--muted); border: 1px solid rgba(255,255,255,.1); border-radius: 6px; font-size: 10px; font-weight: 900; }
.group-record { color: var(--muted); font-size: 11px; font-weight: 900; text-align: right; font-variant-numeric: tabular-nums; }
.live-group-row.qualifier { color: var(--text); }
.live-group-row.is-opponent { background: rgba(134,88,255,.1); color: var(--text); }
.live-group-row.is-user { color: #170b29; background: var(--acid); }
.live-group-row.is-user .group-rank { color: #170b29; border-color: rgba(23,11,41,.25); }
.live-group-row.is-user .group-record { color: #170b29; }
.group-tie-results { border-top: 1px solid var(--line); padding: 0 10px 8px; }
.group-tie-results summary { padding: 12px 0 5px; color: var(--acid); cursor: pointer; font-size: 10px; font-weight: 850; letter-spacing: .06em; }
.group-tie-button { display: grid; width: 100%; gap: 7px; margin-top: 8px; padding: 10px; color: var(--muted); text-align: left; border: 1px solid var(--line); border-radius: 8px; background: #100a1b; }
.group-tie-button:hover { border-color: var(--violet); background: rgba(134,88,255,.08); }
.group-tie-team { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 11px; }
.group-tie-team.is-winner { color: var(--green); }
.group-tie-team b { font-size: 14px; font-variant-numeric: tabular-nums; }
.group-tie-team .country-flag { width: 17px; height: 13px; }
.has-tie-detail { cursor: pointer; }
.has-tie-detail:hover { border-color: var(--violet); }
.has-tie-detail:focus-visible, .group-tie-button:focus-visible, .group-tie-results summary:focus-visible { outline: 2px solid var(--acid); outline-offset: 3px; }
.tie-detail-hint { position: absolute; top: calc(100% + 2px); right: 2px; color: var(--muted); font-size: 8px; font-weight: 850; letter-spacing: .07em; }
.draw-round.is-right .tie-detail-hint { right: auto; left: 2px; }

/* Completed Cup ties: all rubbers, with scores in fixed team order. */
body:has(.cup-tie-dialog[open]) { overflow: hidden; }
.cup-tie-dialog { width: min(660px, calc(100vw - 28px)); max-height: calc(100dvh - 40px); margin: auto; padding: 0; color: var(--text); border: 1px solid rgba(134,88,255,.5); border-radius: 18px; background: #140d22; box-shadow: 0 24px 100px rgba(0,0,0,.65); overflow: auto; scrollbar-color: var(--violet) #140d22; scrollbar-width: thin; }
.cup-tie-dialog::backdrop { background: rgba(6,3,12,.78); backdrop-filter: blur(5px); }
.cup-tie-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 2; padding: 18px 22px; border-bottom: 1px solid var(--line); background: #1c122e; }
.cup-tie-heading .overline { font-size: 10px; margin-bottom: 5px; }
.cup-tie-heading h2 { margin: 0; font-size: 25px; letter-spacing: -.03em; }
.cup-tie-heading .icon-button { flex-shrink: 0; font-size: 26px; }
.cup-tie-summary { display: grid; gap: 10px; padding: 18px 22px; background: linear-gradient(120deg, rgba(134,88,255,.1), transparent); border-bottom: 1px solid var(--line); }
.cup-tie-team { display: flex; justify-content: space-between; align-items: center; gap: 15px; color: var(--muted); }
.cup-tie-team .entry-label { white-space: normal; }
.cup-tie-team > b { width: 35px; padding: 4px; flex-shrink: 0; border-radius: 7px; text-align: center; font-size: 24px; background: rgba(255,255,255,.05); font-variant-numeric: tabular-nums; }
.cup-tie-team.is-winner { color: var(--green); }
.cup-tie-team.is-winner > b { background: rgba(87,231,160,.09); }
.cup-tie-matches { padding: 0 22px 20px; }
.cup-tie-reading-order { margin: 14px 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.cup-rubber-detail { margin-top: 12px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.02); overflow: hidden; }
.cup-rubber-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.025); }
.cup-rubber-heading .stage-tag { margin: 0; min-height: 24px; padding: 5px 7px; font-size: 9px; }
.cup-rubber-heading strong { font-size: 12px; }
.clincher-badge { margin-left: auto; color: var(--green); font-size: 8px; font-weight: 850; letter-spacing: .06em; }
.cup-rubber-table { padding: 10px 12px; gap: 7px; }
.cup-rubber-table .draw-score-row { grid-template-columns: minmax(0,1fr) repeat(var(--game-count), 29px) 30px; gap: 6px; }
.cup-rubber-table .draw-score-name { display: flex; align-items: center; overflow-wrap: anywhere; }
.cup-rubber-table .rubber-game-total { background: transparent; font-weight: 950; font-size: 15px; border-left: 1px solid var(--line); border-radius: 0; }
.cup-rubber-unplayed { display: flex; gap: 12px; align-items: center; margin-top: 12px; padding: 14px 12px; color: var(--muted); border: 1px dashed var(--line); border-radius: 10px; font-size: 11px; }
.cup-rubber-unplayed strong { font-size: 10px; }

.bracket-viewport {
  height: var(--draw-height);
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-color: var(--violet) #100a1b;
  scrollbar-width: thin;
  background:
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,.014) 1px, transparent 1px),
    #100a1b;
  background-size: 220px 100%, 100% 38px, auto;
}
.bracket-viewport:focus-visible { outline: 2px solid var(--acid); outline-offset: -3px; }
.bracket-canvas {
  --bracket-height: 310px;
  width: max-content;
  min-width: max-content;
  margin-inline: auto;
  min-height: calc(var(--bracket-height) + 58px);
  display: flex;
  align-items: flex-start;
  gap: 38px;
  padding: 0 28px 34px 24px;
}
.draw-round { width: 260px; flex: 0 0 260px; position: relative; }
.draw-round.is-right .draw-round-header { flex-direction: row-reverse; text-align: right; }
.draw-round.is-final .draw-round-header strong { color: var(--acid); }
.draw-round.is-final .draw-match { border-color: rgba(217,255,88,.4); box-shadow: 0 0 32px rgba(134,88,255,.14); }
.draw-round-header {
  height: 58px;
  position: sticky;
  top: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  background: linear-gradient(180deg, #100a1b 78%, transparent);
}
.draw-round-header div { display: grid; gap: 1px; }
.draw-round-header strong { font-size: 13px; letter-spacing: .08em; }
.draw-round-header small { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .09em; }
.round-status { padding: 4px 6px; color: #81758f; border: 1px solid rgba(255,255,255,.1); border-radius: 999px; font-size: 9px; font-weight: 950; letter-spacing: .09em; }
.round-status.current { color: #170b29; border-color: var(--acid); background: var(--acid); }
.round-status.complete { color: var(--green); border-color: rgba(87,231,160,.3); background: rgba(87,231,160,.08); }
.draw-round-lane { display: flex; flex-direction: column; gap: var(--round-gap); padding-top: var(--round-offset); }
.draw-match {
  width: 260px;
  height: 74px;
  flex: 0 0 74px;
  position: relative;
  z-index: 2;
  overflow: visible;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(42,27,65,.95), rgba(20,12,32,.98));
  box-shadow: 0 8px 18px rgba(0,0,0,.16);
}
.draw-match.locked { border-style: dashed; background: rgba(255,255,255,.018); box-shadow: none; }
.draw-match.current { border-color: rgba(134,88,255,.48); }
.draw-match.is-active-match { z-index: 4; border-color: var(--acid); box-shadow: 0 0 0 1px rgba(217,255,88,.14), 0 10px 30px rgba(134,88,255,.28); }
.draw-match.is-active-match::before { content: "SELECTED"; position: absolute; z-index: 5; top: -8px; right: 8px; padding: 2px 5px; color: #170b29; border-radius: 4px; background: var(--acid); font-size: 9px; font-weight: 950; letter-spacing: .1em; }
.draw-match.has-score-detail { cursor: pointer; }
.draw-match.has-score-detail:focus-visible { outline: 2px solid var(--acid); outline-offset: 3px; }
.bracket-entrant { height: 36px; display: grid; grid-template-columns: 20px minmax(0,1fr) 27px; grid-template-areas: "seed name score"; align-items: center; gap: 6px; padding: 0 7px; color: #b2a8be; border-bottom: 1px solid rgba(255,255,255,.07); }
.bracket-entrant:first-child { border-radius: 9px 9px 0 0; }
.bracket-entrant:nth-child(2) { border-radius: 0 0 9px 9px; }
.draw-round.is-right .bracket-entrant { grid-template-columns: 27px minmax(0,1fr) 20px; grid-template-areas: "score name seed"; }
.draw-round.is-right .entrant-name { flex-direction: row-reverse; text-align: right; }
.draw-round.is-right .draw-match.is-active-match::before { right: auto; left: 8px; }
.bracket-entrant:nth-child(2) { border-bottom: 0; }
.bracket-entrant.is-loser { color: #8e839a; }
.bracket-entrant.is-winner { color: var(--green); font-weight: 850; }
.bracket-entrant.is-user { color: #170b29; background: var(--acid); }
.bracket-entrant.is-user.is-loser { opacity: .72; }
.bracket-entrant.is-tbd { color: #665b73; }
.entrant-seed { grid-area: seed; width: 18px; height: 18px; display: grid; place-items: center; border-radius: 5px; background: rgba(255,255,255,.07); font-size: 9px; font-weight: 900; }
.bracket-entrant.is-user .entrant-seed { background: rgba(23,11,41,.13); }
.entrant-name { grid-area: name; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 760; }
.flagged-entry { display: flex; align-items: center; gap: 7px; min-width: 0; }
.entry-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entry-flags { display: inline-flex; align-items: center; gap: 3px; flex: 0 0 auto; }
.entry-flags:empty { display: none; }
.country-flag { width: 20px; height: 15px; display: block; object-fit: cover; flex-shrink: 0; border-radius: 2px; box-shadow: 0 0 0 1px rgba(128,128,128,.3); }
.unknown-flag { display: grid; place-items: center; color: var(--muted); background: rgba(128,128,128,.15); font-size: 9px; }
.arena-topline .country-flag { width: 28px; height: 21px; }
.arena-topline .entry-label { white-space: normal; }
.entrant-state { grid-area: score; min-height: 25px; display: grid; place-items: center; border-radius: 5px; font-size: 10px; font-weight: 950; font-variant-numeric: tabular-nums; }
.entrant-state.is-score { background: rgba(255,255,255,.07); font-size: 15px; }
.is-winner .entrant-state.is-score { background: rgba(87,231,160,.12); }
.is-user .entrant-state.is-score { color: #170b29; background: rgba(23,11,41,.12); }
.draw-score-detail {
  width: min(340px, calc(100vw - 60px));
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  left: 0;
  padding: 11px;
  color: var(--text);
  border: 1px solid rgba(217,255,88,.35);
  border-radius: 10px;
  background: rgba(14,8,24,.98);
  box-shadow: 0 18px 45px rgba(0,0,0,.55);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-5px);
  transition: opacity .14s ease, transform .14s ease;
}
.draw-score-detail::before { content: ""; position: absolute; bottom: 100%; left: 28px; border: 6px solid transparent; border-bottom-color: rgba(217,255,88,.35); }
.draw-round.is-right .draw-score-detail { left: auto; right: 0; }
.draw-round.is-right .draw-score-detail::before { left: auto; right: 28px; }
.draw-match.score-above .draw-score-detail { top: auto; bottom: calc(100% + 8px); }
.draw-match.score-above .draw-score-detail::before { bottom: auto; top: 100%; border-bottom-color: transparent; border-top-color: rgba(217,255,88,.35); }
.draw-score-detail > small { display: block; margin-bottom: 8px; color: var(--acid); font-size: 9px; font-weight: 950; letter-spacing: .1em; }
.draw-score-table { display: grid; gap: 5px; }
.draw-score-row { display: grid; grid-template-columns: minmax(0,1fr) repeat(var(--game-count, 3), 29px); align-items: center; gap: 5px; color: #a99db5; }
.draw-score-heading { font-size: 8px; letter-spacing: .08em; color: var(--muted); }
.draw-score-heading > span:not(:first-child) { text-align: center; }
.draw-score-row.is-winner { color: var(--green); }
.draw-score-name { min-height: 32px; font-size: 11px; font-weight: 750; line-height: 1.4; }
.draw-score-name .entry-label { white-space: normal; }
.draw-score-row b { display: grid; height: 24px; place-items: center; border-radius: 5px; background: rgba(255,255,255,.065); font-size: 11px; }
.draw-score-row b.high-score { color: var(--text); background: rgba(87,231,160,.15); box-shadow: inset 0 -2px 0 rgba(87,231,160,.55); }
.draw-score-detail em { display: block; margin-top: 8px; color: #776b84; font-size: 9px; font-style: normal; text-align: right; }
.draw-match.has-score-detail:hover,
.draw-match.has-score-detail:focus-visible,
.draw-match.has-score-detail.score-open { z-index: 20; }
.draw-match.has-score-detail:hover .draw-score-detail,
.draw-match.has-score-detail:focus-visible .draw-score-detail,
.draw-match.has-score-detail.score-open .draw-score-detail { opacity: 1; transform: translateY(0); }
.draw-connector {
  --branch: calc((74px + var(--round-gap)) / 2);
  width: 18px;
  position: absolute;
  left: 100%;
  border-color: rgba(134,88,255,.38);
  border-style: solid;
  pointer-events: none;
}
.draw-connector.down { top: 50%; height: var(--branch); border-width: 1px 1px 0 0; border-radius: 0 7px 0 0; }
.draw-connector.up { bottom: 50%; height: var(--branch); border-width: 0 1px 1px 0; border-radius: 0 0 7px 0; }
.draw-connector::after { content: ""; width: 18px; position: absolute; right: -18px; border-top: 1px solid rgba(134,88,255,.38); }
.draw-connector.down::after { bottom: 0; }
.draw-connector.up::after { top: 0; }
.draw-connector.straight { width: 38px; top: 50%; height: 0; border-width: 1px 0 0; }
.draw-connector.straight::after { display: none; }
.draw-round.is-right .draw-connector { left: auto; right: 100%; transform: scaleX(-1); }
.draw-match.locked .draw-connector, .draw-round.locked .draw-connector { border-color: rgba(255,255,255,.1); }
.draw-match.locked .draw-connector::after, .draw-round.locked .draw-connector::after { border-color: rgba(255,255,255,.1); }

footer { width: min(1080px, calc(100% - 32px)); margin: 0 auto; padding: 24px 0 34px; display: flex; justify-content: space-between; gap: 20px; color: #6f647f; border-top: 1px solid var(--line); font-size: 10px; font-weight: 800; letter-spacing: .11em; }

@media (max-width: 820px) {
  .team-modes { grid-template-columns: 1fr; }
  .individual-modes { grid-template-columns: repeat(3, 1fr); }
  .draft-layout { grid-template-columns: 1fr; }
  .squad-card { order: 2; }
  .pick-stage { order: 1; min-height: 570px; }
  .lineup-slots { grid-template-columns: repeat(5, 1fr); }
  .lineup-slot { min-width: 0; grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .slot-copy strong { max-width: 100%; }
  .slot-rating { display: none; }
  .arena { --draw-height: clamp(220px, calc(100dvh - 420px), 450px); }
  .arena-workspace { grid-template-columns: minmax(0,1fr); grid-template-areas: "match" "draw" "history"; gap: 12px; }
  .match-sidebar { display: contents; }
  .match-panel { grid-area: match; padding: 14px; display: grid; grid-template-columns: minmax(0,1fr) 170px; column-gap: 16px; align-items: center; }
  .match-intro { border: 0; padding: 0; }
  .match-intro p { display: inline; margin-left: 7px; font-size: 9px; }
  .match-intro h3 { margin-top: 5px; font-size: 18px; }
  .tie-expectation { margin-top: 5px; font-size: 11px; }
  .play-controls { margin-top: 0; grid-column: 2; grid-row: 1; }
  .scoreboard { grid-column: 1 / -1; margin: 10px 0 0; }
  .scoreboard strong { font-size: 28px; }
  .rubber-feed { grid-column: 1 / -1; max-height: 115px; margin-top: 10px; }
  .route-panel { grid-area: history; }
  .route { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 1100px) {
  .choice-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .country-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .live-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 650px) {
  .cup-tie-heading { padding: 14px; }
  .cup-tie-summary { padding: 14px; }
  .cup-tie-matches { padding: 0 12px 14px; }
  .cup-rubber-table { padding: 9px; }
  .cup-rubber-table .draw-score-row { grid-template-columns: minmax(0,1fr) repeat(var(--game-count), 24px) 25px; gap: 4px; }
  .cup-rubber-table .draw-score-name { font-size: 10px; }
  .site-header { height: 64px; }
  .header-mode { font-size: 0; }
  .header-mode span { margin: 0; font-size: 9px; }
  .game-shell { width: min(100% - 20px, 1080px); }
  .draft-screen { padding-top: 30px; }
  .mode-screen { padding-top: 38px; }
  .mode-intro { margin-bottom: 32px; }
  .mode-intro h1 { font-size: 51px; }
  .mode-section-title small { display: none; }
  .individual-modes { grid-template-columns: repeat(2, 1fr); }
  .mode-card { min-height: 145px; }
  .draft-head { align-items: center; }
  .draft-head > div:first-child { min-width: 0; }
  .draft-head h1 { font-size: clamp(28px, 8vw, 39px); }
  .pick-counter { min-width: auto; }
  .pick-counter strong { font-size: 43px; }
  .pick-counter span { display: none; }
  .discipline-banner { grid-template-columns: 42px 1fr; padding: 0 15px; }
  .draft-progress { grid-column: 1 / -1; display: none; }
  .spin-panel, .ready-panel { min-height: 480px; padding: 28px 18px; }
  .choice-panel { padding: 17px; }
  .choice-heading { align-items: flex-start; }
  .country-panel { padding: 18px; }
  .country-heading { align-items: flex-start; }
  .country-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .country-card { min-height: 190px; }
  .country-code { margin-bottom: 18px; }
  .choice-grid { grid-template-columns: 1fr; }
  .player-card { min-height: 0; display: grid; grid-template-columns: 112px minmax(0, 1fr); }
  .card-top { min-width: 0; min-height: 174px; padding: 18px 10px; }
  .card-rating { min-width: 0; width: 100%; padding: 9px 5px 10px 10px; white-space: normal; }
  .card-rating span { line-height: 1.5; }
  .card-body { min-width: 0; }
  .card-rating strong { font-size: 36px; }
  .card-body h3 { font-size: 18px; }
  .lineup-slots { grid-template-columns: 1fr; }
  .lineup-slot { grid-template-columns: 40px minmax(0,1fr) auto; justify-items: stretch; text-align: left; }
  .slot-rating { display: block; }
  .standings-grid, .bracket { grid-template-columns: 1fr; }
  .game-shell:has(.arena:not([hidden])) { width: calc(100% - 20px); }
  .arena { padding-top: 14px; }
  .arena-topline { margin-bottom: 12px; }
  .arena-topline h2 { font-size: 20px; }
  .arena-topline .overline { font-size: 9px; }
  .match-panel { grid-template-columns: minmax(0,1fr) 123px; column-gap: 10px; padding: 12px; }
  .play-controls .action-button { font-size: 10px; padding: 10px; min-height: 50px; }
  .play-controls .action-button b { font-size: 18px; }
  .draw-heading { padding: 12px 14px; gap: 8px; min-height: 60px; }
  .draw-heading h3 { font-size: 18px; }
  .draw-heading .overline { font-size: 9px; }
  .draw-legend { justify-content: flex-start; }
  .draw-legend span:not(:first-child) { display: none; }
  .draw-toolbar { padding: 7px 10px; gap: 3px; flex-wrap: wrap; }
  .draw-tabs button, .focus-draw-button { font-size: 9px; padding: 7px; }
  .live-groups { grid-template-columns: 1fr; padding: 0 14px; }
  .section-kicker { padding-inline: 14px; }
  .bracket-kicker { padding: 10px 14px; }
  .bracket-kicker small { display: none; }
  .bracket-canvas { padding-left: 14px; }
  .rubber-result { grid-template-columns: 30px 28px minmax(0,1fr); }
  .rubber-score { grid-column: 1 / -1; }
  .play-controls { align-items: stretch; flex-direction: column; }
  .result-actions { align-items: stretch; flex-direction: column; }
  .result-actions .action-button, .result-actions .secondary-button { width: 100%; }
  .action-button { width: 100%; }
  .data-heading { align-items: flex-start; flex-direction: column; }
  .route { grid-template-columns: 1fr; }
  footer { flex-direction: column; }
}

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

/* Expanded draw uses the available viewport, including mobile browser chrome. */
.focus-draw-button[aria-pressed="true"] { color: var(--acid); background: rgba(217,255,88,.09); }
body:has(.draw-panel.is-expanded) { overflow: hidden; }
.draw-panel.is-expanded { position: fixed; inset: 8px; z-index: 50; display: flex; flex-direction: column; border-radius: 14px; background-color: #110a1c; }
.draw-panel.is-expanded .draw-heading, .draw-panel.is-expanded .draw-toolbar, .draw-panel.is-expanded .bracket-kicker { flex-shrink: 0; }
.draw-panel.is-expanded #knockoutDraw { display: flex; flex: 1; min-height: 0; flex-direction: column; }
.draw-panel.is-expanded .bracket-viewport { height: auto; flex: 1; }
.draw-panel.is-expanded .cup-group-stage { height: auto; flex: 1; min-height: 0; }
@media (max-width: 600px) {
  .draw-panel.is-expanded { inset: 0; border-radius: 0; }
  .draw-toolbar { flex-wrap: wrap; }
  .draw-navigation { gap: 2px; }
}

.country-option-note { display: block; margin-top: 8px; color: var(--muted); font-size: 12px; }

.selection-options { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 760px; }
@media (max-width: 420px) { .selection-options { grid-template-columns: 1fr; } }

.selection-options .mode-card { min-height: 200px; padding: 26px; }
.selection-options .mode-card strong { font-size: clamp(30px, 4vw, 42px); line-height: 1.15; }
.selection-options .mode-card small { margin-top: 12px; font-size: 16px; line-height: 1.5; }
.selection-options .mode-card b { font-size: 26px; }

.circuit-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.circuit-options .mode-card { min-height: 115px; }
.circuit-options .mode-card[aria-pressed="true"] { border-color: var(--acid); background: #292b1d; }
.circuit-options .mode-card strong { font-size: clamp(20px, 2.5vw, 28px); }
.circuit-options .mode-card small { font-size: 14px; }
.world-tour-panel { padding: 16px 20px; margin-bottom: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.cup-location { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; line-height: 1.5; margin: 12px 0 0; }
.cup-location .entry-flags { flex-shrink: 0; }
.result-hero .cup-location { justify-content: center; }
.tour-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.tour-heading h3 { font-size: clamp(20px, 2vw, 28px); margin: 0; }
.tour-heading p { margin: 7px 0; }
#tourLocation { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
#tourPosition { color: var(--acid); font-size: 14px; line-height: 1.7; text-align: right; }
.tour-details { display: grid; gap: 10px; margin-top: 18px; }
.season-section { min-width: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: linear-gradient(110deg, rgba(134,88,255,.08), transparent 60%); }
.season-section > summary { display: flex; align-items: center; gap: 14px; cursor: pointer; padding: 18px; list-style: none; }
.season-section > summary::-webkit-details-marker { display: none; }
.season-section > summary:hover { background: rgba(255,255,255,.035); }
.season-section > summary small { display: block; color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .12em; margin-bottom: 4px; }
.season-section > summary strong { font-size: 18px; }
.season-section-icon { display: grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0; background: rgba(134,88,255,.15); color: #c4adff; border-radius: 11px; font-size: 24px; }
.season-section-stat { margin-left: auto; color: var(--muted); font-size: 12px; text-align: right; }
.season-chevron { color: var(--acid); transition: transform .2s; }
.season-section[open] .season-chevron { transform: rotate(180deg); }
.season-section-body { padding: 0 18px 14px; }
.season-filters { display: flex; gap: 6px; flex-wrap: wrap; border-top: 1px solid var(--line); padding: 16px 0 4px; }
.season-filter { cursor: pointer; font: inherit; color: var(--muted); background: transparent; border: 1px solid transparent; padding: 8px 12px; border-radius: 8px; font-size: 12px; font-weight: 650; }
.season-filter[aria-pressed="true"] { color: var(--acid); border-color: rgba(217,255,88,.3); background: rgba(217,255,88,.07); }
.season-filter:hover { background: var(--surface-2); }
.tour-calendar { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); gap: 12px; padding: 0 5px 2px 0; list-style: none; max-height: 480px; overflow: auto; scrollbar-color: var(--surface-3) transparent; }
.tour-calendar li { display: grid; align-content: start; gap: 10px; padding: 17px; border: 1px solid var(--line); border-radius: 12px; font-size: 13px; background: var(--surface); }
.tour-calendar .is-current { border-color: rgba(217,255,88,.65); background: linear-gradient(145deg, rgba(217,255,88,.07), var(--surface) 65%); }
.tour-calendar .is-current .calendar-event-status { color: var(--acid); }
.tour-calendar .is-inactive { opacity: .6; }
.tour-calendar strong { color: var(--text); font-size: 16px; line-height: 1.4; }
.calendar-event-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.calendar-date { font-variant-numeric: tabular-nums; font-weight: 600; }
.tour-tier-badge { color: #cbb8ff; background: rgba(134,88,255,.12); border: 1px solid rgba(134,88,255,.2); border-radius: 5px; font-size: 10px; font-weight: 750; padding: 4px 7px; white-space: nowrap; }
.calendar-location { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.calendar-location .entry-flags { flex-shrink: 0; }
.calendar-event-status { padding-top: 10px; border-top: 1px solid var(--line); }
.calendar-empty { grid-column: 1 / -1; color: var(--muted); }
.tour-calendar small, .tour-note { color: var(--muted); font-size: 12px; line-height: 1.6; }
.tour-standings { width: 100%; min-width: 0; max-height: min(70dvh, 800px); overflow: auto; container-type: inline-size; border: 1px solid var(--line); border-radius: 10px; scrollbar-color: var(--surface-3) transparent; }
.tour-standings table { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; font-size: 13px; font-variant-numeric: tabular-nums; }
.tour-standings th, .tour-standings td { padding: 13px 10px; text-align: left; border-bottom: 1px solid var(--line); }
.tour-standings th { position: sticky; top: 0; z-index: 1; background: var(--surface-2); color: var(--muted); font-size: 10px; letter-spacing: .04em; text-transform: uppercase; }
.tour-standings th:first-child { width: 112px; }
.tour-standings th:nth-child(3) { width: 106px; }
.tour-standings th:nth-child(n+4) { width: 76px; }
.tour-standings .entry-label { white-space: normal; overflow-wrap: anywhere; }
.standings-sort { display: flex; align-items: center; justify-content: space-between; gap: 5px; width: 100%; min-height: 36px; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-transform: inherit; text-align: left; }
.standings-sort:hover, th[aria-sort="ascending"] .standings-sort, th[aria-sort="descending"] .standings-sort { color: var(--acid); }
.standings-sort:focus-visible { outline: 2px solid var(--acid); outline-offset: 3px; border-radius: 3px; }
.sort-arrow { flex-shrink: 0; font-size: 13px; }
.standings-toolbar { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; margin: 10px 0 16px; }
.standings-toolbar .secondary-button { min-height: 40px; padding: 8px 12px; font-size: 11px; }
.tour-standings tr:hover { background-color: rgba(255,255,255,.04); }
.tour-standings td:nth-child(2) { min-width: 0; }
.tour-standings .standings-rank { font-size: 17px; font-weight: 800; white-space: nowrap; }
.standings-points { font-weight: 750; white-space: nowrap; }
.standings-you { display: inline-block; font-size: 9px; font-weight: 800; letter-spacing: .06em; margin-left: 8px; color: var(--acid); }
.rank-movement { display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 750; margin-left: 9px; padding: 3px 6px; border-radius: 5px; vertical-align: middle; white-space: nowrap; }
.rank-up { color: var(--green); background: rgba(87,231,160,.1); }
.rank-down { color: var(--red); background: rgba(255,102,133,.1); }
.rank-new { color: #cbb8ff; background: rgba(134,88,255,.13); font-size: 9px; }
.rank-same { color: var(--muted); }
.standings-explainer { display: flex; flex-wrap: wrap; column-gap: 24px; justify-content: space-between; }
.ranking-movement-note { font-size: 11px; }
.tour-standings .is-selected { color: var(--acid); }
.tour-result-rankings { margin: 24px auto; padding: clamp(14px, 2vw, 24px); width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-align: left; }
.result-hero:has(.tour-result-rankings:not([hidden])) { padding-inline: clamp(12px, 3vw, 36px); }
.standings-dialog { width: calc(100vw - 32px); max-width: 1800px; height: calc(100dvh - 40px); max-height: calc(100dvh - 40px); }
.standings-dialog[open] { display: flex; flex-direction: column; }
.standings-dialog > header { flex-shrink: 0; }
.standings-dialog-note { margin: 0; padding: 0 24px 16px; }
.standings-dialog .tour-standings { flex: 1; min-height: 0; width: auto; max-height: none; margin: 0 20px 20px; }
@container (max-width: 740px) {
  .tour-standings table, .tour-standings thead, .tour-standings tbody { display: block; }
  .tour-standings thead { position: sticky; top: 0; z-index: 1; background: var(--surface-2); }
  .tour-standings thead tr { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 6px; gap: 4px; }
  .tour-standings th, .tour-standings th:first-child, .tour-standings th:nth-child(n+3) { position: static; width: auto; padding: 4px 6px; border: 0; border-radius: 6px; background: rgba(255,255,255,.035); }
  .tour-standings tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 12px; border-bottom: 1px solid var(--line); }
  .tour-standings td { display: block; min-width: 0; padding: 8px; border: 0; overflow-wrap: anywhere; }
  .tour-standings td::before { content: attr(data-label); display: block; margin-bottom: 5px; font-size: 10px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
  .tour-standings td:nth-child(2) { grid-column: 1 / -1; grid-row: 1; font-size: 15px; font-weight: 700; }
  .tour-standings td:nth-child(2)::before { display: none; }
  .tour-standings .is-finals-qualifier td:first-child { box-shadow: none; }
  .tour-standings tbody tr.is-finals-qualifier { box-shadow: inset 3px 0 #68e1a1; }
}
@container (max-width: 360px) {
  .tour-standings thead tr { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.tour-result-rankings h3 { margin: 0; font-size: 24px; }
.tour-finals-result { margin: 26px auto; padding: clamp(18px, 3vw, 28px); border: 1px solid rgba(217,255,88,.35); border-radius: 16px; background: linear-gradient(130deg, rgba(217,255,88,.08), var(--surface)); text-align: left; overflow-wrap: anywhere; }
.tour-finals-result h3 { margin: 0 0 20px; font-size: clamp(22px, 3vw, 30px); letter-spacing: -.025em; }
.tour-finals-champion { display: flex; align-items: center; gap: 10px; color: var(--acid); font-size: clamp(19px, 3vw, 27px); line-height: 1.4; }
.tour-finals-champion .entry-label { white-space: normal; overflow-wrap: anywhere; }
.tour-finals-score { font-size: 14px; line-height: 1.7; color: var(--text); }
.tour-finals-result .secondary-button { margin-top: 8px; white-space: normal; }
.tour-finals-groups.live-groups { padding: 0; margin: 20px 0; }
.tour-finals-groups .live-group-card { min-width: 0; overflow-x: auto; }
#tourResultsDialog:has(.tour-finals-groups) { width: min(1040px, calc(100vw - 28px)); }
.tour-finals-groups .finals-group-table { table-layout: fixed; }
.tour-finals-groups .finals-group-table th:first-child { width: 28px; }
.tour-finals-groups .finals-group-table th:nth-child(n+3) { width: 40px; white-space: nowrap; }
.tour-finals-groups .finals-group-table th, .tour-finals-groups .finals-group-table td { padding: 10px 5px; }
.tour-finals-groups .entry-label { white-space: normal; overflow-wrap: anywhere; }
.tour-result-rankings .tour-result-position { color: var(--acid); font-weight: 700; padding: 14px 16px; border: 1px solid rgba(217,255,88,.2); border-radius: 10px; background: rgba(217,255,88,.045); line-height: 1.8; }
.tour-result-rankings .tour-standings .is-selected { background: rgba(217, 255, 88, 0.08); }
.tour-standings tr.is-finals-qualifier { background: rgba(104, 225, 161, 0.10); }
.tour-standings .is-finals-qualifier td:first-child { box-shadow: inset 3px 0 #68e1a1; }
.finals-place { white-space: nowrap; }
.finals-badge { display: inline-block; padding: 3px 7px; border: 1px solid rgba(104, 225, 161, 0.5); border-radius: 5px; color: #9ef2c3; font-weight: 800; font-size: 11px; }
.finals-legend::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 2px; background: #68e1a1; }
.finals-group-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.finals-group-table th, .finals-group-table td { padding: 10px 8px; text-align: left; border-top: 1px solid var(--line); }
.finals-group-table th { font-size: 11px; color: var(--muted); }
.finals-group-table td:nth-child(n+3) { white-space: nowrap; font-variant-numeric: tabular-nums; }
.finals-group-table .is-user { color: var(--acid); }
.finals-group-table .qualifier td:first-child { font-weight: 900; color: var(--acid); }
.finals-group-match { display: grid; gap: 4px; padding: 10px; border-top: 1px solid var(--line); font-size: 12px; }
.finals-group-match small { color: var(--muted); }
.tour-next { display: grid; gap: 12px; max-width: 900px; margin: 24px auto; padding: 24px; text-align: left; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(150deg, rgba(134,88,255,.1), var(--surface) 55%); }
.tour-next label { font-size: 12px; font-weight: 750; color: var(--acid); }
.tour-planner-heading h3 { font-size: 28px; margin: 0; letter-spacing: -.04em; }
.tour-planner-heading .overline { margin: 0 0 8px; }
.tour-next > .tour-note { margin: 0; }
.tour-next select { width: 100%; min-width: 0; text-overflow: ellipsis; }
.tour-next-preview { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 12px; color: var(--muted); }
.entry-status { display: inline-block; font-size: 10px; font-weight: 750; color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 4px 7px; }
.entry-status.is-required { color: #f3cb82; border-color: rgba(243,203,130,.3); background: rgba(243,203,130,.055); }
.tour-following { padding: 18px 0; border-top: 1px solid var(--line); }
.tour-following > h4 { margin: 0 0 12px; font-size: 12px; color: var(--muted); }
.tour-following-events { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 12px; }
.following-event { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: rgba(13,7,24,.45); min-width: 0; }
.following-event h4 { margin: 14px 0 8px; font-size: 18px; letter-spacing: -.02em; }
.following-event p { margin: 8px 0; }
.following-dates { color: var(--text); font-size: 13px; font-weight: 650; }
.following-gap { color: var(--muted); font-size: 12px; line-height: 1.6; padding-top: 12px; border-top: 1px solid var(--line); }
.following-event .following-recovery { color: #9ef2c3; font-size: 12px; line-height: 1.6; }
.tour-result-button { justify-self: start; padding: 7px 10px; font-size: 11px; }
.tour-current-choice { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.tour-current-choice select { flex: 1; min-width: 180px; }
.tour-fatigue { display: grid; gap: 8px; padding: 12px 14px; margin: 12px 0; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.025); }
.tour-fatigue strong { font-size: 13px; }
.tour-fatigue small { color: var(--muted); font-size: 12px; line-height: 1.6; }
.fatigue-meter { width: 100%; height: 10px; accent-color: var(--acid); }
.fatigue-meter::-webkit-meter-bar { background: #32283f; border: 0; }
.fatigue-meter::-webkit-meter-optimum-value { background: #9ee2b0; }
.fatigue-meter::-webkit-meter-suboptimum-value { background: #e5ca79; }
.fatigue-meter::-webkit-meter-even-less-good-value { background: #ef948d; }
.tour-fatigue[data-level="high"] strong, .tour-fatigue[data-level="exhausted"] strong { color: #efb1a2; }
.tour-fatigue.is-injured { border-color: #ef948d; }
.injury-notice { display: block; color: #efb1a2; font-size: 12px; line-height: 1.6; }
.rally-dialog { width: min(740px, calc(100vw - 24px)); }
.rally-dialog > header { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.rally-dialog h3 { margin: 4px 0 0; }
.rally-dialog .icon-button { min-width: 44px; min-height: 44px; font-size: 26px; color: var(--text); border: 1px solid var(--line); border-radius: 10px; background: transparent; cursor: pointer; }
.rally-content { padding: 20px 24px; }
.rally-meta { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 12px; }
.rally-meta strong { color: var(--acid); }
.rally-scoreboard { display: grid; grid-template-columns: minmax(0, 1fr) 20px minmax(0, 1fr); align-items: center; gap: 10px; padding: 24px 0; text-align: center; }
.rally-scoreboard > div { display: grid; gap: 10px; min-width: 0; }
.rally-scoreboard > div > span { font-size: 14px; font-weight: 750; min-height: 40px; overflow-wrap: anywhere; }
.rally-scoreboard strong { font-size: clamp(54px, 11vw, 90px); line-height: 1; font-variant-numeric: tabular-nums; color: var(--acid); }
.rally-scoreboard small, .rally-divider { color: var(--muted); }
.rally-games { display: flex; justify-content: center; min-height: 24px; }
.rally-commentary { min-height: 84px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: rgba(134,88,255,.12); font-size: 16px; line-height: 1.6; }
.rally-controls { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.rally-controls .action-button, .rally-controls .secondary-button { width: auto; min-height: 44px; }
.rally-after-match { display: flex; flex-wrap: wrap; align-items: stretch; gap: 12px; }
.rally-after-match .action-button { flex: 1 1 260px; width: auto; min-height: 48px; }
.rally-after-match .secondary-button { flex: 1 1 140px; min-height: 48px; }
.rally-controls label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.rally-controls select { min-height: 44px; padding: 8px; color: var(--text); background: #211531; border: 1px solid var(--line); border-radius: 8px; }
.rally-hint { color: var(--muted); font-size: 12px; line-height: 1.6; }
.rally-history { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.rally-history summary { cursor: pointer; font-size: 13px; color: var(--acid); }
.rally-history ol { max-height: 220px; overflow-y: auto; padding-left: 26px; }
.rally-history li { padding: 6px 4px; color: var(--muted); font-size: 12px; line-height: 1.6; }
@media (max-width: 480px) { .rally-content { padding: 16px; } .rally-controls { justify-content: flex-start; } .rally-commentary { font-size: 14px; } }
.tour-archive-content { padding: 0 20px 20px; }
.tour-archive-round { border-top: 1px solid var(--line); padding: 12px 0; }
.tour-archive-round summary { cursor: pointer; color: var(--acid); }
.tour-archive-match { display: grid; gap: 8px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.tour-archive-match small { color: var(--muted); }
@media (max-width: 600px) { .circuit-options { grid-template-columns: 1fr; } .tour-heading { align-items: flex-start; flex-direction: column; gap: 4px; } .world-tour-panel { padding: 14px; } }
@media (max-width: 600px) {
  #tourPosition { text-align: left; }
  .season-section > summary { padding: 14px 10px; gap: 9px; }
  .season-section > summary strong { font-size: 15px; }
  .season-section > summary small { font-size: 8px; }
  .season-section-stat { font-size: 10px; max-width: 80px; }
  .season-section-icon { width: 30px; height: 34px; font-size: 20px; }
  .season-section-body { padding: 0 10px 10px; }
  .season-filter { padding: 7px 8px; font-size: 11px; }
  .tour-next, .tour-result-rankings { padding: 14px; }
  .tour-next .action-button, .tour-next .secondary-button { white-space: normal; }
}

.arena:has(#worldTourPanel:not([hidden])) { --draw-height: max(240px, calc(100dvh - 490px)); }
