:root {
  --bg: #07100e;
  --bg-2: #0b1814;
  --panel: rgba(17, 36, 30, 0.92);
  --panel-2: rgba(22, 46, 38, 0.9);
  --line: rgba(225, 255, 242, 0.14);
  --line-strong: rgba(225, 255, 242, 0.28);
  --text: #f4fff9;
  --muted: #a8bdb4;
  --lime: #b8ff5a;
  --lime-dark: #6ca41f;
  --gold: #ffd166;
  --orange: #ff8a3d;
  --red: #ff6b67;
  --cyan: #70e6d2;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --radius: 22px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; background: var(--bg); }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 15% 12%, rgba(184, 255, 90, 0.09), transparent 32%),
    radial-gradient(circle at 88% 38%, rgba(112, 230, 210, 0.07), transparent 28%),
    linear-gradient(180deg, #07100e 0%, #0a1713 52%, #06100d 100%);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .24;
  background-image:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
}
button, input, select { font: inherit; }
button { min-height: 44px; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .48; }
button:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid rgba(184, 255, 90, .78);
  outline-offset: 3px;
}

.loading-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  color: var(--muted);
}
.loading-ball, .brand-ball {
  display: inline-block;
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 46%, rgba(6,16,13,.75) 47% 53%, transparent 54%),
    linear-gradient(0deg, transparent 46%, rgba(6,16,13,.75) 47% 53%, transparent 54%),
    var(--orange);
  border: 2px solid rgba(255,255,255,.28);
}
.loading-ball { width: 48px; height: 48px; animation: bounce 1s ease-in-out infinite; }
@keyframes bounce { 50% { transform: translateY(-12px) rotate(30deg); } }

.game-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: calc(66px + var(--safe-top));
  padding: var(--safe-top) 16px 0;
  background: rgba(7, 16, 14, .82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}
.brand-button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 4px;
  border: 0;
  color: var(--text);
  background: transparent;
  text-align: left;
}
.brand-button span:last-child { display: grid; line-height: 1.1; }
.brand-button b { font-size: 15px; letter-spacing: .06em; }
.brand-button small { margin-top: 5px; color: var(--muted); font-size: 11px; }
.brand-ball { width: 30px; height: 30px; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.status-pill {
  display: none;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--lime);
  background: rgba(184,255,90,.06);
  font-size: 11px;
}
.icon-button {
  width: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  background: rgba(255,255,255,.035);
}

.screen {
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: 22px 16px calc(118px + var(--safe-bottom));
}
.section-heading { margin: 4px 0 20px; }
.center-heading { text-align: center; }
.section-heading h1, .hero-copy h1, .result-banner h1, .champion-stage h1 {
  margin: 4px 0 10px;
  line-height: 1.05;
  letter-spacing: -.035em;
}
.section-heading h1 { font-size: clamp(28px, 8vw, 48px); }
.section-heading p, .hero-copy p, .result-banner p, .champion-stage p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}
.eyebrow {
  margin: 0 0 8px !important;
  color: var(--lime) !important;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.subheading { margin: 28px 0 12px; font-size: 17px; }

.primary-button, .secondary-button, .text-button {
  width: 100%;
  min-height: 50px;
  border-radius: 15px;
  font-weight: 800;
}
.primary-button {
  border: 1px solid rgba(232,255,204,.5);
  color: #12200b;
  background: linear-gradient(135deg, #d5ff8e, var(--lime));
  box-shadow: 0 12px 28px rgba(114, 174, 35, .22);
}
.secondary-button {
  border: 1px solid var(--line-strong);
  color: var(--text);
  background: rgba(255,255,255,.055);
}
.text-button {
  border: 0;
  color: var(--muted);
  background: transparent;
}
.danger-text { color: var(--red); }
.action-dock {
  position: sticky;
  z-index: 10;
  bottom: 0;
  display: grid;
  gap: 9px;
  margin: 24px -16px calc(-118px - var(--safe-bottom));
  padding: 14px 16px calc(14px + var(--safe-bottom));
  background: linear-gradient(to top, rgba(7,16,14,.98) 62%, rgba(7,16,14,.88) 82%, transparent);
}
.microcopy { margin: 0; color: var(--muted); text-align: center; font-size: 11px; }

.landing-screen {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: calc(34px + var(--safe-top)) 18px calc(24px + var(--safe-bottom));
  overflow: hidden;
}
.hero-court {
  position: absolute;
  z-index: -1;
  top: -80px;
  right: -170px;
  width: 480px;
  height: 480px;
  border: 2px solid rgba(184,255,90,.16);
  border-radius: 50%;
  transform: rotate(-14deg);
}
.hero-court::before, .hero-court::after, .hero-court span {
  content: "";
  position: absolute;
  border: 1px solid rgba(184,255,90,.12);
}
.hero-court::before { inset: 80px; border-radius: 50%; }
.hero-court::after { top: 50%; left: -40px; right: -40px; }
.hero-court span:first-child { top: 0; bottom: 0; left: 50%; }
.hero-court span:nth-child(2) { width: 180px; height: 120px; left: 10px; top: 180px; }
.hero-court span:nth-child(3) { width: 180px; height: 120px; right: 10px; top: 180px; }
.hero-copy { margin-top: auto; padding-top: 96px; }
.hero-copy h1 {
  margin: 0;
  font-size: clamp(64px, 22vw, 104px);
  background: linear-gradient(180deg, #fff, #b8ff5a 78%);
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 12px 34px rgba(184,255,90,.12));
}
.hero-copy h2 { margin: 2px 0 18px; font-size: 18px; letter-spacing: .12em; }
.start-panel {
  display: grid;
  gap: 12px;
  margin-top: 28px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(14, 30, 25, .88);
  box-shadow: var(--shadow);
}
.start-panel form { display: grid; gap: 13px; }
.start-panel label { display: grid; gap: 7px; color: var(--text); font-size: 13px; font-weight: 700; }
.start-panel label span { color: var(--muted); font-size: 11px; font-weight: 400; }
.start-panel input, .start-panel select {
  width: 100%;
  min-height: 48px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  color: var(--text);
  background: #0a1713;
}
.legal-card {
  margin-top: 16px;
  padding: 15px 16px;
  border-left: 3px solid var(--gold);
  border-radius: 0 14px 14px 0;
  background: rgba(255,209,102,.055);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}
.legal-card strong { color: var(--gold); }
.legal-card p { margin: 6px 0 0; }

.roster-grid, .market-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.player-card {
  position: relative;
  min-width: 0;
  min-height: 246px;
  padding: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 19px;
  color: var(--text);
  background:
    linear-gradient(145deg, rgba(184,255,90,.07), transparent 42%),
    linear-gradient(180deg, rgba(25,52,43,.96), rgba(10,23,19,.98));
  box-shadow: 0 12px 28px rgba(0,0,0,.24);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.player-card[data-action] { cursor: pointer; }
.player-card[data-action]:active { transform: scale(.985); }
.player-card.is-selected {
  border-color: var(--lime);
  box-shadow: 0 0 0 2px rgba(184,255,90,.18), 0 16px 34px rgba(0,0,0,.3);
}
.player-card.is-compact { min-height: 184px; padding: 10px; }
.player-rank { position: relative; z-index: 3; color: var(--gold); font-size: 10px; font-weight: 800; }
.player-silhouette {
  position: absolute;
  top: 28px;
  right: -2px;
  display: grid;
  place-items: center;
  width: 104px;
  height: 118px;
  border-radius: 58% 42% 22% 22%;
  color: rgba(255,255,255,.12);
  background:
    radial-gradient(circle at 50% 23%, rgba(255,255,255,.11) 0 18%, transparent 19%),
    linear-gradient(145deg, rgba(112,230,210,.24), rgba(184,255,90,.08));
  font-size: 52px;
  font-weight: 900;
  transform: rotate(4deg);
}
.player-card.is-compact .player-silhouette { width: 78px; height: 86px; font-size: 38px; }
.player-ovr {
  position: relative;
  z-index: 3;
  display: grid;
  width: 68px;
  margin-top: 14px;
  line-height: .88;
}
.player-ovr span { color: var(--muted); font-size: 9px; letter-spacing: .18em; }
.player-ovr b { font-size: 42px; letter-spacing: -.06em; }
.player-card.is-compact .player-ovr b { font-size: 34px; }
.player-copy { position: absolute; z-index: 3; left: 12px; right: 12px; bottom: 14px; }
.player-copy h3 { margin: 0 0 4px; font-size: 15px; line-height: 1.25; }
.player-copy p { margin: 0; overflow: hidden; color: var(--muted); font-size: 10px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.player-subtitle { color: var(--lime) !important; }
.tag-row { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.tag-row span {
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #d8e8df;
  background: rgba(255,255,255,.035);
  font-size: 9px;
}
.selection-mark {
  position: absolute;
  z-index: 5;
  left: 8px;
  top: 8px;
  padding: 4px 7px;
  border-radius: 8px;
  color: #12200b;
  background: var(--lime);
  font-size: 9px;
  font-weight: 900;
}
.fatigue-line {
  position: absolute;
  z-index: 4;
  top: 8px;
  right: 8px;
  padding: 4px 6px;
  border-radius: 8px;
  color: var(--orange);
  background: rgba(7,16,14,.76);
  font-size: 9px;
}
.reveal-grid .player-card { animation: cardIn .48s both; }
.reveal-grid .player-card:nth-child(2) { animation-delay: .08s; }
.reveal-grid .player-card:nth-child(3) { animation-delay: .16s; }
.reveal-grid .player-card:nth-child(4) { animation-delay: .24s; }
@keyframes cardIn { from { opacity: 0; transform: translateY(18px) rotateX(12deg); } }

.bracket-scroll {
  display: flex;
  gap: 14px;
  margin: 0 -16px;
  padding: 4px 16px 24px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}
.bracket-column { flex: 0 0 min(82vw, 316px); scroll-snap-align: start; }
.bracket-column h2 { margin: 0 0 12px; color: var(--lime); font-size: 13px; letter-spacing: .06em; }
.bracket-match {
  position: relative;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--panel);
}
.bracket-match.is-human { border-color: rgba(184,255,90,.5); background: linear-gradient(135deg, rgba(184,255,90,.08), var(--panel)); }
.bracket-team { display: flex; justify-content: space-between; gap: 8px; min-height: 32px; align-items: center; color: var(--muted); font-size: 12px; }
.bracket-team span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bracket-team b { color: var(--muted); font-size: 9px; }
.bracket-team.is-winner { color: var(--text); font-weight: 800; }
.bracket-team.is-winner b { color: var(--lime); }
.bracket-score { margin: 3px 0; padding: 5px 0; border-block: 1px solid var(--line); color: var(--gold); text-align: center; font-size: 13px; font-weight: 900; }
.mini-link { min-height: 32px; padding: 0; border: 0; color: var(--cyan); background: transparent; font-size: 10px; }

.versus-strip {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin: 10px 0 18px;
  color: var(--muted);
  text-align: center;
  font-size: 11px;
}
.versus-strip b { color: var(--gold); font-size: 16px; }
.mode-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mode-card {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 9px;
  min-height: 202px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--text);
  background:
    radial-gradient(circle at 50% 22%, rgba(112,230,210,.11), transparent 42%),
    linear-gradient(180deg, rgba(22,46,38,.98), rgba(10,23,19,.98));
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.mode-card:not(:disabled):active { transform: scale(.98); }
.mode-card.is-selected { border-color: var(--lime); background: linear-gradient(180deg, rgba(94,137,42,.34), rgba(12,29,23,.98)); box-shadow: 0 0 0 2px rgba(184,255,90,.13); }
.mode-icon { display: grid; place-items: center; width: 70px; height: 70px; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--lime); background: rgba(184,255,90,.05); font-size: 38px; }
.mode-card strong { font-size: 16px; }
.mode-card small { color: var(--muted); font-size: 10px; line-height: 1.45; }
.opponent-lock {
  display: grid;
  grid-template-columns: auto 1fr;
  margin-top: 14px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.03);
}
.lock-dot { grid-row: 1 / 3; align-self: center; width: 9px; height: 9px; margin-right: 10px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 14px var(--lime); }
.opponent-lock b { font-size: 12px; }
.opponent-lock small { color: var(--muted); font-size: 10px; }
.reveal-stage { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.reveal-stage > div > small { display: block; margin-bottom: 7px; color: var(--muted); text-align: center; font-size: 10px; }
.reveal-stage .mode-card { min-height: 190px; }
.reveal-vs { color: var(--gold); font-size: 24px; }
.rule-callout { margin-top: 16px; padding: 14px; border-left: 3px solid var(--lime); border-radius: 0 13px 13px 0; color: var(--muted); background: rgba(184,255,90,.055); font-size: 11px; line-height: 1.55; }

.lineup-roster {
  display: grid;
  grid-template-columns: repeat(4, minmax(132px, 1fr));
  gap: 9px;
  margin: 0 -16px 18px;
  padding: 0 16px 8px;
  overflow-x: auto;
}
.lineup-board { display: grid; gap: 10px; }
.lineup-slot {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 86px;
  padding: 12px 42px 12px 13px;
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  color: var(--muted);
  background: rgba(255,255,255,.025);
  text-align: left;
}
.lineup-slot.is-filled { border-style: solid; border-color: rgba(184,255,90,.38); color: var(--text); background: linear-gradient(135deg, rgba(184,255,90,.08), rgba(255,255,255,.025)); }
.slot-label { color: var(--lime); font-size: 10px; font-weight: 800; letter-spacing: .04em; }
.lineup-slot b { margin-top: 5px; font-size: 13px; }
.lineup-slot small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.slot-clear { position: absolute; right: 10px; top: 50%; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.08); transform: translateY(-50%); }
.two-v-two-group { display: grid; gap: 8px; padding: 11px; border: 1px solid var(--line); border-radius: 19px; background: rgba(112,230,210,.035); }
.group-title { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 10px; }
.group-title b { color: var(--cyan); }
.chemistry-preview { display: flex; flex-wrap: wrap; gap: 6px; }
.chemistry-preview span { padding: 5px 7px; border-radius: 8px; color: var(--cyan); background: rgba(112,230,210,.08); font-size: 9px; }
.chemistry-preview span.is-penalty { color: var(--red); background: rgba(255,107,103,.08); }

.score-hero {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(184,255,90,.08), rgba(112,230,210,.04));
}
.score-hero > div { display: grid; text-align: center; }
.score-hero small { min-height: 30px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.score-hero b { font-size: 44px; letter-spacing: -.06em; }
.score-hero > span { color: var(--gold); font-size: 9px; writing-mode: vertical-rl; letter-spacing: .1em; }
.score-hero.is-pulsing { animation: scorePulse .7s ease; }
@keyframes scorePulse { 45% { box-shadow: 0 0 0 8px rgba(184,255,90,.08); transform: scale(1.01); } }
.event-progress { height: 5px; margin: 12px 4px 18px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.08); }
.event-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--lime), var(--cyan)); transition: width .5s ease; }
.event-list { display: grid; gap: 10px; }
.event-card { padding: 13px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.event-top { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 10px; }
.event-top b { color: var(--lime); }
.event-players { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin-top: 12px; text-align: center; }
.event-players span { color: var(--muted); font-size: 10px; line-height: 1.35; }
.event-players strong { color: var(--gold); font-size: 17px; white-space: nowrap; }
.event-card > p { margin: 10px 0 0; color: var(--orange); font-size: 10px; }
.event-chemistry { display: flex; justify-content: space-between; margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--line); color: var(--cyan); font-size: 9px; }
.empty-state { padding: 32px 20px; border: 1px dashed var(--line-strong); border-radius: 18px; color: var(--muted); text-align: center; }
.empty-state p { margin: 7px 0 0; font-size: 12px; }
.sudden-death-panel { margin-top: 18px; padding: 16px; border: 1px solid rgba(255,209,102,.32); border-radius: 20px; background: rgba(255,209,102,.05); }
.sudden-death-panel h2 { margin: 4px 0 14px; font-size: 17px; line-height: 1.4; }
.mini-player-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }

.result-banner, .champion-stage {
  margin-bottom: 18px;
  padding: 26px 20px;
  border: 1px solid var(--line);
  border-radius: 23px;
  text-align: center;
  background: var(--panel);
}
.result-banner.is-win { border-color: rgba(184,255,90,.42); background: radial-gradient(circle at top, rgba(184,255,90,.13), transparent 62%), var(--panel); }
.result-banner.is-loss { border-color: rgba(255,107,103,.3); background: radial-gradient(circle at top, rgba(255,107,103,.1), transparent 62%), var(--panel); }
.result-banner h1, .champion-stage h1 { font-size: 42px; }
.market-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.market-summary span { display: grid; gap: 4px; min-width: 0; padding: 10px 7px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); text-align: center; font-size: 9px; }
.market-summary b { color: var(--text); font-size: 16px; }
.trophy { display: grid; place-items: center; width: 88px; height: 88px; margin: 0 auto 14px; border: 1px solid rgba(255,209,102,.46); border-radius: 50%; color: var(--gold); background: radial-gradient(circle, rgba(255,209,102,.18), transparent 68%); font-size: 48px; }
.champion-roster { margin-top: 14px; }
.fairness-summary, .prose-card, .code-card { margin-top: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 17px; background: var(--panel); }
.fairness-summary h2, .prose-card h2 { margin: 0 0 8px; font-size: 15px; }
.fairness-summary p, .prose-card p { margin: 8px 0 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
code { display: block; overflow-wrap: anywhere; color: var(--cyan); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 10px; }
.code-card small { display: block; margin-bottom: 8px; color: var(--muted); font-size: 10px; }

.modal-backdrop { position: fixed; z-index: 100; inset: 0; display: flex; align-items: flex-end; justify-content: center; padding-top: var(--safe-top); background: rgba(0,0,0,.68); backdrop-filter: blur(8px); }
.settings-sheet { width: min(100%, 520px); max-height: 86vh; padding: 10px 18px calc(18px + var(--safe-bottom)); overflow-y: auto; border: 1px solid var(--line); border-radius: 24px 24px 0 0; background: #10221c; box-shadow: 0 -24px 60px rgba(0,0,0,.48); }
.sheet-handle { width: 42px; height: 4px; margin: 0 auto 18px; border-radius: 99px; background: rgba(255,255,255,.24); }
.settings-sheet h2 { margin: 0 0 12px; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; border-bottom: 1px solid var(--line); }
.toggle-row span { display: grid; gap: 4px; }
.toggle-row b { font-size: 13px; }
.toggle-row small { color: var(--muted); font-size: 10px; }
.toggle-row input { width: 46px; height: 26px; accent-color: var(--lime); }
.settings-sheet .secondary-button { margin-top: 12px; }
.toast { position: fixed; z-index: 200; left: 50%; bottom: calc(22px + var(--safe-bottom)); max-width: calc(100% - 32px); padding: 11px 14px; border: 1px solid var(--line-strong); border-radius: 12px; color: var(--text); background: rgba(16,34,28,.96); box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translate(-50%, 14px); transition: opacity .2s ease, transform .2s ease; font-size: 11px; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 540px) {
  .status-pill { display: inline-flex; }
  .screen { padding-inline: 24px; }
  .action-dock { margin-inline: -24px; padding-inline: 24px; }
  .roster-grid, .market-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .player-card { min-height: 270px; }
  .bracket-scroll { margin-inline: -24px; padding-inline: 24px; }
}

@media (min-width: 820px) {
  .landing-screen { display: grid; grid-template-columns: 1.12fr .88fr; grid-template-rows: 1fr auto; gap: 24px 54px; width: min(1100px, 100%); margin: auto; padding-inline: 40px; }
  .hero-copy { align-self: center; margin: 0; padding: 0; }
  .start-panel { align-self: center; margin: 0; }
  .legal-card { grid-column: 1 / -1; }
  .screen { padding-top: 34px; }
  .action-dock { position: static; grid-template-columns: repeat(2, minmax(0, 260px)); justify-content: center; margin: 30px 0 0; padding: 0; background: none; }
  .action-dock .microcopy { grid-column: 1 / -1; }
  .mode-grid { width: min(660px, 100%); margin-inline: auto; }
  .reveal-stage { width: min(720px, 100%); margin-inline: auto; }
  .lineup-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-v-two-group { grid-column: span 2; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-v-two-group .group-title, .two-v-two-group .chemistry-preview { grid-column: 1 / -1; }
  .score-hero { width: min(680px, 100%); margin-inline: auto; }
  .event-list { width: min(820px, 100%); margin-inline: auto; }
  .result-banner, .champion-stage, .fairness-summary { width: min(820px, 100%); margin-inline: auto; }
  .market-summary { width: min(680px, 100%); margin-inline: auto; }
}

@media (max-width: 359px) {
  .screen { padding-inline: 12px; }
  .action-dock { margin-inline: -12px; padding-inline: 12px; }
  .player-card { min-height: 230px; padding: 10px; }
  .player-copy { left: 10px; right: 10px; }
  .mode-card { min-height: 184px; padding: 10px; }
  .mode-icon { width: 60px; height: 60px; }
}

html[data-reduced-motion="true"] *,
html[data-reduced-motion="true"] *::before,
html[data-reduced-motion="true"] *::after {
  scroll-behavior: auto !important;
  animation-duration: .001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: .001ms !important;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
