*{box-sizing:border-box;margin:0;padding:0}
:root{
  --bg:#09080f;
  --panel:#191827;
  --panel-soft:#232238;
  --panel-border:#34314f;
  --text:#f5f7fb;
  --muted:#9ca1bd;
  --accent:#ff8a1d;
  --accent-strong:#c85f00;
  --playoff:#b5961d;
  --playin:#2b81b5;
  --out:#8f3341;
}
body{
  min-height:100vh;
  overflow-x:hidden;
  background:
    radial-gradient(circle at top left,rgba(102,40,140,.18),transparent 30%),
    radial-gradient(circle at top right,rgba(25,59,122,.22),transparent 32%),
    linear-gradient(180deg,#0f0820 0%,#0b0915 28%,#09080f 100%);
  color:var(--text);
  font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
}
.app-shell{max-width:1040px;margin:0 auto;padding:18px 14px 40px}
.app-header{
  position:sticky;
  top:0;
  z-index:20;
  padding:0;
  background:linear-gradient(90deg,rgba(26,11,43,.97),rgba(12,25,50,.97));
  border-bottom:1px solid rgba(255,138,29,.28);
  box-shadow:0 12px 30px rgba(0,0,0,.22);
}
.hdr-top{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:10px;
  padding:10px 16px 4px;
}
.header-brand{display:flex;align-items:center;gap:10px;min-width:0}
.app-ball{font-size:1.28rem;flex-shrink:0}
.app-title{font-size:1.55rem;font-weight:800;color:var(--accent);letter-spacing:-.02em;white-space:nowrap}
.app-subtitle{margin-top:1px;font-size:.72rem;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:260px}
.header-btns{
  display:flex;
  gap:5px;
  flex-shrink:0;
  align-items:center;
  align-self:flex-end;
  transform:translateY(calc(24px + 1.5mm));
  padding-bottom:0;
}
.hdr-btn{
  display:inline-flex;
  align-items:center;
  height:26px;
  padding:0 9px;
  border:1px solid rgba(255,255,255,.1);
  border-radius:999px;
  background:rgba(255,255,255,.05);
  color:#dde1f0;
  font-size:.68rem;
  font-weight:700;
  cursor:pointer;
  white-space:nowrap;
  transition:background .15s ease;
}
.hdr-btn:hover{background:rgba(255,255,255,.1)}
.hdr-btn-accent{background:rgba(255,138,29,.14);border-color:rgba(255,138,29,.28);color:#ffd2a6}
.hdr-btn-accent:hover{background:rgba(255,138,29,.22)}
.header-status{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  padding:0 16px 8px;
}
.header-pill{
  display:inline-flex;
  align-items:center;
  min-height:24px;
  padding:0 10px;
  border-radius:999px;
  background:rgba(255,138,29,.13);
  border:1px solid rgba(255,138,29,.2);
  color:#ffd1a1;
  font-size:.7rem;
  font-weight:800;
}
.muted-pill{background:rgba(255,255,255,.05);border-color:rgba(255,255,255,.07);color:#d6d8e7}
.screen{display:none}
.screen.active{display:block}
.auth-screen,.setup-shell{width:min(100%,520px);margin:0 auto}
.auth-screen{display:flex;flex-direction:column;gap:18px;padding-top:10px}
.auth-hero,.setup-intro{
  padding:8px 4px 0;
}
.auth-kicker{
  margin-bottom:8px;
  color:#ffb869;
  font-size:.78rem;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.08em;
}
.auth-hero h1,.setup-intro h2{
  font-size:2rem;
  line-height:1;
  letter-spacing:-.04em;
}
.auth-hero p,.setup-intro p{
  margin-top:10px;
  color:#b9bdd2;
  line-height:1.55;
}
.auth-card{
  padding:20px;
  background:linear-gradient(180deg,rgba(25,24,39,.98),rgba(18,18,29,.98));
  border:1px solid rgba(95,92,132,.38);
  border-radius:24px;
  box-shadow:0 18px 38px rgba(0,0,0,.2);
}
.auth-toggle{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin-bottom:18px;
  padding:6px;
  background:rgba(255,255,255,.03);
  border-radius:18px;
}
.auth-mode-btn{
  min-height:46px;
  border:none;
  border-radius:14px;
  background:transparent;
  color:#9ca1bd;
  font-weight:800;
  cursor:pointer;
}
.auth-mode-btn.active{background:linear-gradient(180deg,rgba(255,138,29,.22),rgba(255,138,29,.1));color:#fff1dc}
.auth-fields{margin-bottom:14px}
.field-label{display:block;margin-bottom:7px;font-size:.78rem;font-weight:800;color:#cfd3e6}
.app-input{
  width:100%;
  min-height:50px;
  padding:0 14px;
  border:1px solid rgba(255,255,255,.1);
  border-radius:14px;
  background:rgba(8,10,17,.45);
  color:var(--text);
  font-size:.98rem;
}
.app-input:focus{outline:none;border-color:rgba(255,138,29,.55);box-shadow:0 0 0 3px rgba(255,138,29,.1)}
.password-wrapper{position:relative;display:flex;align-items:center}
.password-wrapper .app-input{padding-right:46px}
.password-eye-btn{position:absolute;right:14px;background:none;border:none;cursor:pointer;color:#9ca1bd;display:flex;align-items:center;padding:0;line-height:1;transition:color .2s}
.password-eye-btn:hover{color:#f5f7fb}
.forgot-row{display:flex;justify-content:flex-end;margin:-4px 0 10px}
.forgot-link{background:none;border:none;color:#ffb869;font-size:.82rem;font-weight:700;cursor:pointer;padding:2px 0;text-decoration:underline;text-underline-offset:2px}
.forgot-link:hover{color:#ffd1a1}
.auth-success{display:none;margin:-2px 0 14px;padding:10px 12px;border-radius:12px;background:rgba(43,129,68,.18);border:1px solid rgba(80,200,120,.32);color:#a4e4b8;font-size:.82rem;line-height:1.4}
.forgot-modal-desc{color:#9ca1bd;font-size:.88rem;line-height:1.5;margin-top:4px}
.forgot-cancel-btn{width:100%;margin-top:10px;background:none;border:none;color:#9ca1bd;font-size:.88rem;font-weight:700;cursor:pointer;padding:8px 0}
.forgot-cancel-btn:hover{color:#f5f7fb}
.auth-note{margin:2px 0 18px;color:#9ca1bd;font-size:.84rem;line-height:1.5}
.auth-error{
  display:none;
  margin:-2px 0 14px;
  padding:10px 12px;
  border-radius:12px;
  background:rgba(143,51,65,.18);
  border:1px solid rgba(211,107,121,.32);
  color:#ffb8c3;
  font-size:.82rem;
  line-height:1.4;
}
.primary-btn,.secondary-btn{
  min-height:52px;
  padding:0 18px;
  border:none;
  border-radius:16px;
  font-size:.98rem;
  font-weight:800;
  cursor:pointer;
}
.primary-btn{
  width:100%;
  background:linear-gradient(180deg,#b85a10,#8d4308);
  color:#f7f4ee;
  box-shadow:0 14px 28px rgba(100,45,4,.26);
}
.secondary-btn{
  background:rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.08);
  color:#edf1fb;
}
.auth-submit{margin-top:4px}
.competition-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
  margin-top:8px;
}
.competition-card{
  padding:28px 20px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px;
  background:var(--panel-soft);
  border:2px solid #34314b;
  border-radius:18px;
  cursor:pointer;
  text-align:center;
  transition:transform .18s ease,border-color .18s ease,background .18s ease,box-shadow .18s ease;
}
.competition-card:hover{
  transform:translateY(-3px);
  border-color:#4b4568;
  box-shadow:0 18px 38px rgba(0,0,0,.22);
}
.competition-card.selected{
  border-color:var(--accent);
  background:linear-gradient(180deg,rgba(74,43,26,.55),rgba(44,28,21,.92));
  box-shadow:0 0 0 1px rgba(255,138,29,.2) inset;
}
.comp-logo{font-size:2.4rem;height:96px;display:flex;align-items:center;justify-content:center}
.comp-logo-img{
  width:140px;
  height:88px;
  object-fit:contain;
  background:#fff;
  border-radius:18px;
  padding:10px 14px;
  box-shadow:0 2px 12px rgba(0,0,0,.25);
}
#sport-basketball .comp-logo span,
#sport-baseball .comp-logo span,
#comp-mlb .comp-logo span{
  display:none;
}
#sport-basketball .comp-logo-img,
#sport-baseball .comp-logo-img{
  width:210px;
  height:132px;
  background:transparent;
  border-radius:26px;
  padding:0;
  box-shadow:none;
}
#sport-basketball,
#sport-baseball{
  background:transparent;
  border-color:transparent;
  box-shadow:none;
  padding:12px 8px 4px;
}
#sport-basketball:hover,
#sport-baseball:hover,
#sport-basketball.selected,
#sport-baseball.selected{
  background:transparent;
  border-color:transparent;
  box-shadow:none;
  transform:translateY(-3px);
}
#sport-basketball .comp-logo,
#sport-baseball .comp-logo{
  height:auto;
}
.comp-name{font-size:1.35rem;font-weight:800;color:var(--text)}
.comp-season{font-size:.78rem;font-weight:700;color:var(--accent)}
.comp-desc{font-size:.82rem;color:var(--muted);line-height:1.4}
.setup-footer{
  display:flex;
  gap:12px;
  margin-top:8px;
}
.setup-footer .secondary-btn{width:auto;min-width:110px}
.setup-enter-btn{flex:1}
.conf-section{margin-bottom:28px}
.conf-title{
  display:inline-block;
  margin-bottom:12px;
  padding:6px 14px;
  border-radius:999px;
  background:rgba(255,138,29,.14);
  border:1px solid rgba(255,138,29,.22);
  color:#ffd2a6;
  font-size:.8rem;
  font-weight:800;
  letter-spacing:.04em;
  text-transform:uppercase;
}
.tabs{
  display:grid;
  grid-template-columns:repeat(6,1fr);
  background:linear-gradient(90deg,rgba(20,9,36,.97),rgba(10,20,42,.97));
  border-bottom:1px solid rgba(255,255,255,.07);
  overflow:hidden;
  position:sticky;
  top:60px; /* fallback; JS sets exact value via updateStickyOffset() */
  z-index:15;
  box-shadow:0 4px 16px rgba(0,0,0,.18);
}
.tab-btn{
  padding:14px 8px;
  background:none;
  border:none;
  color:#8e8aa8;
  font-size:.86rem;
  font-weight:700;
  cursor:pointer;
  border-bottom:3px solid transparent;
  transition:color .2s ease,border-color .2s ease,background .2s ease;
}
.tab-btn.active{
  color:var(--accent);
  border-bottom-color:var(--accent);
  background:linear-gradient(180deg,rgba(255,138,29,.08),transparent);
}
.tab-content{display:none;max-width:1040px;margin:0 auto;padding:24px 4px 48px}
.tab-content.active{display:block}
.panel{
  max-width:520px;
  margin:0 auto 22px;
  padding:22px;
  background:linear-gradient(180deg,rgba(28,27,44,.98),rgba(22,21,34,.98));
  border:1px solid rgba(95,92,132,.38);
  border-radius:18px;
  box-shadow:0 14px 32px rgba(0,0,0,.18);
}
.analysis-toolbar{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
  margin-bottom:18px;
}
.analysis-actions{display:flex;gap:10px;flex-wrap:wrap}
.compact-btn{width:auto;min-width:170px}
.live-badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:4px 10px;
  border-radius:999px;
  background:#d44545;
  color:#fff;
  font-size:.68rem;
  font-weight:800;
  letter-spacing:.05em;
  animation:livePulse 1.4s ease-in-out infinite;
}
.live-badge--pulsing{
  position:relative;
  padding-left:18px;
}
.live-badge--pulsing::before{
  content:'';
  position:absolute;
  left:8px;
  top:50%;
  width:7px;
  height:7px;
  border-radius:999px;
  background:#fff;
  transform:translateY(-50%);
  animation:liveDotPulse 1.2s ease-in-out infinite;
}
.live-clock{
  display:inline-block;
  margin-left:8px;
  color:#f7a34b;
  font-size:.76rem;
  font-weight:800;
  letter-spacing:.04em;
}
.final-badge{
  display:inline-flex;
  align-items:center;
  padding:4px 10px;
  border-radius:999px;
  background:#3d8b52;
  color:#fff;
  font-size:.68rem;
  font-weight:800;
  letter-spacing:.05em;
}
.upcoming-badge{
  color:#98a2bf;
  font-size:.72rem;
  font-weight:700;
}
.live-results-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
  margin-bottom:18px;
  padding-bottom:12px;
  border-bottom:1px solid rgba(255,255,255,.08);
}
.live-data-source{
  color:#98a2bf;
  font-size:.78rem;
  font-weight:700;
}
.live-section{margin-bottom:22px}
.live-section-title{
  margin-bottom:12px;
  color:var(--accent);
  font-size:.88rem;
  font-weight:800;
  letter-spacing:.03em;
  text-transform:uppercase;
}
.live-games-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:12px;
}
.live-game-card{
  padding:14px;
  border-radius:16px;
  background:linear-gradient(180deg,rgba(28,27,44,.98),rgba(22,21,34,.98));
  border:1px solid rgba(95,92,132,.38);
  box-shadow:0 14px 28px rgba(0,0,0,.18);
}
.live-game-card--mine{
  border-color:rgba(255,138,29,.72);
  box-shadow:0 0 0 1px rgba(255,138,29,.22) inset,0 14px 28px rgba(0,0,0,.18);
}
.live-game-header{
  min-height:24px;
  margin-bottom:10px;
}
.live-game-body{
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  gap:10px;
}
.live-score-stack{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:6px;
}
.live-team{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:6px;
  text-align:center;
  color:#edf1fb;
  font-size:.78rem;
  font-weight:800;
}
.live-score{
  color:#f8f3eb;
  font-size:1.24rem;
  font-weight:900;
  text-align:center;
}
.live-score--tbd{
  color:#98a2bf;
  font-size:.92rem;
  font-weight:800;
}
.live-game-clock{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:24px;
  padding:4px 10px;
  border-radius:999px;
  background:rgba(247,163,75,.14);
  color:#f7a34b;
  font-size:.74rem;
  font-weight:800;
  letter-spacing:.05em;
  white-space:nowrap;
}
.wanted-result-label{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  max-width:180px;
  padding:4px 10px;
  border-radius:999px;
  background:rgba(96,165,250,.14);
  color:#9ec5ff;
  font-size:.7rem;
  font-weight:800;
  letter-spacing:.04em;
  text-align:center;
  line-height:1.25;
}
.no-results{
  padding:28px 16px;
  border-radius:16px;
  background:rgba(255,255,255,.03);
  border:1px dashed rgba(255,255,255,.08);
  color:#98a2bf;
  text-align:center;
}
@keyframes livePulse{
  0%,100%{opacity:1}
  50%{opacity:.62}
}
@keyframes liveDotPulse{
  0%,100%{opacity:1;transform:translateY(-50%) scale(1)}
  50%{opacity:.35;transform:translateY(-50%) scale(1.35)}
}
.analysis-chip{
  display:inline-flex;
  align-items:center;
  min-height:38px;
  margin:0 8px 8px 0;
  padding:0 14px;
  border-radius:999px;
  background:rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.08);
  color:#dce2f1;
  font-size:.84rem;
  font-weight:800;
}
.strong-chip{background:rgba(255,138,29,.14);border-color:rgba(255,138,29,.24);color:#ffd2a6}
.section-title{
  margin-bottom:16px;
  font-size:.95rem;
  font-weight:800;
  color:#d6d8e7;
  letter-spacing:.01em;
}
.highlight-title{color:var(--accent);font-size:1.05rem}
.team-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.team-card{
  min-height:118px;
  padding:12px 10px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:8px;
  background:var(--panel-soft);
  border:2px solid #34314b;
  border-radius:14px;
  cursor:pointer;
  transition:transform .18s ease,border-color .18s ease,background .18s ease,box-shadow .18s ease;
}
.team-card:hover{transform:translateY(-1px);border-color:#4b4568}
.team-card.selected{
  border-color:var(--accent);
  background:linear-gradient(180deg,rgba(74,43,26,.55),rgba(44,28,21,.92));
  box-shadow:0 0 0 1px rgba(255,138,29,.2) inset;
}
.logo-shell{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:16px;
  background:linear-gradient(180deg,rgba(255,255,255,.95),rgba(228,232,241,.92));
  box-shadow:0 8px 18px rgba(0,0,0,.18),inset 0 0 0 1px rgba(34,42,66,.08);
  flex-shrink:0;
}
.logo-shell-lg{width:56px;height:56px;padding:8px}
.logo-shell-sm{width:30px;height:30px;padding:5px;border-radius:10px}
.team-logo{width:40px;height:40px;object-fit:contain;filter:drop-shadow(0 1px 1px rgba(0,0,0,.12))}
.logo-text-fallback{font-size:.62rem;font-weight:800;opacity:.7}
.logo-shell-sm .team-logo{width:20px;height:20px}
.team-name{font-size:.83rem;font-weight:700;text-align:center;line-height:1.2}
.team-record{font-size:.75rem;color:var(--muted)}
.goal-section{margin-bottom:28px}
.goal-btns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.goal-btn{
  padding:18px 12px;
  background:var(--panel-soft);
  border:2px solid #383450;
  border-radius:14px;
  color:var(--text);
  font-size:1rem;
  font-weight:800;
  cursor:pointer;
  transition:border-color .18s ease,background .18s ease,transform .18s ease;
}
.goal-btn small{display:block;margin-top:6px;font-size:.85rem;color:#cfd3e6;font-weight:700}
.goal-btn:hover{transform:translateY(-1px)}
.goal-btn:focus{outline:none}
.goal-btn:focus-visible{box-shadow:0 0 0 2px rgba(255,138,29,.28)}
.goal-btn.playoffs.selected{border-color:var(--accent);background:linear-gradient(180deg,rgba(58,39,28,.92),rgba(42,28,22,.96))}
.goal-btn.playin.selected{border-color:#4da2d9;background:linear-gradient(180deg,rgba(19,43,60,.96),rgba(16,29,44,.96))}
.position-card,.game-card,.player-card,.leader-card,.game-row,.no-selection,.error-msg{
  background:linear-gradient(180deg,rgba(28,27,44,.98),rgba(22,21,34,.98));
  border:1px solid rgba(95,92,132,.38);
  border-radius:18px;
}
.position-card{padding:18px 20px;margin-bottom:18px}
.verdict-card{
  margin-bottom:18px;
  padding:18px 20px;
  background:linear-gradient(180deg,rgba(28,27,44,.98),rgba(22,21,34,.98));
  border:1px solid rgba(95,92,132,.38);
  border-radius:18px;
  box-shadow:0 14px 32px rgba(0,0,0,.18);
}
.verdict-label{
  margin-bottom:10px;
  font-size:.8rem;
  font-weight:800;
  color:#b8b4d1;
  letter-spacing:.04em;
}
.verdict-headline{
  font-size:2rem;
  font-weight:900;
  color:#ff9c1f;
  letter-spacing:-.03em;
}
.verdict-copy{
  margin-top:10px;
  font-size:1rem;
  line-height:1.55;
  color:#b3b8d2;
}
.pos-row{display:flex;align-items:center;gap:14px;margin-bottom:10px}
.pos-bubble{width:50px;height:50px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:1.1rem;font-weight:800;flex-shrink:0}
.pos-info h3{font-size:1.7rem;font-weight:800}
.pos-info p{margin-top:3px;font-size:.95rem;color:var(--muted)}
.pos-bar{display:flex;gap:6px;flex-wrap:wrap;margin-top:12px}
.pos-legend{
  display:flex;
  flex-wrap:wrap;
  gap:16px;
  margin-top:14px;
  font-size:.9rem;
  font-weight:800;
}
.pos-legend-item{display:inline-flex;align-items:center;gap:6px}
.pos-legend-playoff{color:#d9bd43}
.pos-legend-playin{color:#4da2d9}
.pos-legend-out{color:#d36b79}
.pos-zone{
  min-width:34px;
  height:34px;
  border-radius:10px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#f4f7fc;
  font-size:.78rem;
  line-height:1;
  font-weight:800;
  border:1px solid rgba(255,255,255,.12);
  text-shadow:0 1px 2px rgba(0,0,0,.35);
}
.zone-playoff{background:rgba(181,150,29,.24);border-color:rgba(181,150,29,.6)}
.zone-playin{background:rgba(43,129,181,.24);border-color:rgba(43,129,181,.65)}
.zone-out{background:rgba(143,51,65,.18);border-color:rgba(143,51,65,.45)}
.zone-current{background:linear-gradient(180deg,#ff9e1a,#ff7b00)!important;border-color:#ffc06c;box-shadow:0 0 0 1px rgba(255,166,52,.22)}
.games-list{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:22px}
.player-list{display:flex;flex-direction:column;gap:12px;margin-bottom:22px}
.game-card{display:flex;flex-direction:column;min-height:100%;padding:14px 16px;border-top:4px solid #4b4568}
.game-card.good{border-left-color:#51c878}
.game-card.watch{border-left-color:#d48721}
.game-card.neutral{border-left-color:#52639a}
.game-card.myteam{border-left-color:var(--accent)}
.game-card.good{border-top-color:#51c878}
.game-card.watch{border-top-color:#d48721}
.game-card.neutral{border-top-color:#52639a}
.game-card.myteam{border-top-color:var(--accent)}
.game-card-head{display:flex;justify-content:flex-end;align-items:center;margin-bottom:10px}
.game-date{font-size:.68rem;color:#8892b0;font-weight:700;text-align:right}
.game-teams{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:8px;margin-bottom:12px}
.matchup-team{display:flex;align-items:center;gap:8px;min-width:0}
.matchup-team-away{justify-content:flex-end;text-align:right}
.matchup-team-copy{display:flex;flex-direction:column;min-width:0}
.matchup-team-name{font-size:.95rem;font-weight:800;line-height:1.1}
.matchup-team-record{font-size:.7rem;color:var(--muted);font-weight:700;line-height:1.1}
.vs-label{color:var(--muted);font-size:.78rem;font-weight:800;text-transform:uppercase}
.game-verdict{font-size:.88rem;color:#dfe3f2;line-height:1.45}
.verdict-badge{display:inline-block;margin-right:6px;padding:3px 9px;border-radius:999px;font-size:.66rem;font-weight:800}
.badge-good{background:rgba(81,200,120,.18);color:#78e59b}
.badge-myteam{background:rgba(255,138,29,.16);color:#ffb869}
.badge-watch{background:rgba(212,135,33,.18);color:#ffcd7a}
.badge-neutral{background:rgba(82,99,154,.2);color:#b5c1ea}
.h2h-note{margin-top:8px;padding-top:8px;border-top:1px solid rgba(255,255,255,.08);font-size:.78rem;color:#ffb869;line-height:1.45}
.summary-card{margin-top:12px}
.summary-lede{color:#e8ecf8;font-size:.9rem;line-height:1.55}
.summary-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:14px}
.summary-column{padding:14px;border-radius:16px;background:rgba(255,255,255,.03);border:1px solid rgba(255,255,255,.07)}
.summary-column.good-summary{background:rgba(81,200,120,.08);border-color:rgba(81,200,120,.18)}
.summary-column.bad-summary{background:rgba(211,107,121,.08);border-color:rgba(211,107,121,.18)}
.summary-heading{margin-bottom:10px;font-size:.78rem;font-weight:800;text-transform:uppercase;letter-spacing:.08em}
.summary-list{margin:0;padding-left:18px;color:#d7dcef}
.summary-list li{margin-bottom:8px;line-height:1.5}
.summary-list li:last-child{margin-bottom:0}
.result-alert-modal{position:fixed;inset:0;display:none;align-items:center;justify-content:center;padding:20px;z-index:60}
.result-alert-modal.open{display:flex}
.result-alert-backdrop{position:absolute;inset:0;background:rgba(4,6,12,.68);backdrop-filter:blur(8px)}
.result-alert-card{
  position:relative;
  width:min(100%,460px);
  padding:24px;
  border-radius:24px;
  background:linear-gradient(180deg,rgba(28,27,44,.98),rgba(18,20,31,.98));
  border:1px solid rgba(95,92,132,.38);
  box-shadow:0 24px 60px rgba(0,0,0,.36);
}
.result-alert-kicker{color:#ffb869;font-size:.76rem;font-weight:800;text-transform:uppercase;letter-spacing:.1em}
.result-alert-title{margin-top:8px;font-size:1.6rem;font-weight:900;color:#fff3de;letter-spacing:-.03em}
.result-alert-body{margin-top:12px;color:#c4cadf;font-size:.95rem;line-height:1.6}
.result-alert-btn{margin-top:18px}
.standings-wrap{overflow:auto}
.standings-table{width:100%;min-width:430px;border-collapse:collapse}
.standings-table th{padding:8px 4px;text-align:center;font-size:.68rem;color:var(--muted);text-transform:uppercase;border-bottom:1px solid rgba(255,255,255,.08)}
.standings-table th:nth-child(2),.standings-table td:nth-child(2){text-align:left}
.standings-table td{padding:10px 4px;text-align:center;border-bottom:1px solid rgba(255,255,255,.06);font-size:.84rem}
.standings-table tr.my-team td{background:rgba(255,138,29,.09)}
.team-cell{display:flex;align-items:center;gap:8px;white-space:nowrap}
.team-cell img{width:20px;height:20px;object-fit:contain;flex-shrink:0}
.pos-num{font-weight:800}
.pos-num.playoff{color:#d9bd43}
.pos-num.playin{color:#4da2d9}
.pos-num.out{color:#d36b79}
.zone-border-playoff td{border-bottom:2px solid rgba(181,150,29,.7)!important}
.zone-border-playin td{border-bottom:2px solid rgba(43,129,181,.8)!important}
.l10-dots{display:flex;justify-content:center;gap:4px}
.dot{width:7px;height:7px;border-radius:50%}
.dot-w{background:#51c878}
.dot-l{background:#d36b79}
.diff-pos{color:#78e59b}
.diff-neg{color:#ff8d9c}
.round-group{margin-bottom:22px}
.round-label{
  display:inline-block;
  margin-bottom:10px;
  padding:6px 12px;
  border-radius:999px;
  background:rgba(39,38,59,.92);
  color:#cfd3e6;
  font-size:.76rem;
  font-weight:800;
}
.round-label.next-round{background:rgba(255,138,29,.16);color:#ffb869}
.game-row{display:flex;align-items:center;gap:10px;margin-bottom:8px;padding:12px 14px}
.game-row.my-game{border-left:4px solid var(--accent)}
.gr-teams{flex:1;display:flex;flex-direction:column;gap:5px}
.gr-team{display:flex;align-items:center;gap:7px;font-size:.92rem}
.gr-team img{width:18px;height:18px;object-fit:contain}
.gr-team.winner{font-weight:800}
.gr-scores{display:flex;flex-direction:column;gap:5px;min-width:34px;text-align:right}
.gr-score{font-size:.98rem;font-weight:800;color:#b8bfdc}
.gr-score.winner{color:#68dd8f}
.gr-time{min-width:64px;text-align:right;font-size:.73rem;color:var(--muted)}
.player-card{padding:14px 16px;display:flex;align-items:center;gap:12px}
.player-img,.leader-img{object-fit:cover;background:#25233a}
.player-img{width:50px;height:50px;border-radius:50%}
.player-info{flex:1;min-width:0}
.player-name{font-size:.92rem;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.player-pos{margin-top:2px;font-size:.72rem;color:var(--muted)}
.player-stats{display:flex;gap:12px;flex-wrap:wrap;margin-top:8px}
.pstat{text-align:center}
.pstat-val{display:block;font-size:.92rem;font-weight:800;color:#ffb869}
.pstat-lbl{font-size:.58rem;color:var(--muted);text-transform:uppercase}
.leaders-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
@media (max-width: 1100px){
  .games-list{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (max-width: 840px){
  .games-list{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width: 560px){
  .games-list{grid-template-columns:minmax(0,1fr)}
}
.leader-card{padding:12px}
.leader-cat{margin-bottom:10px;font-size:.7rem;font-weight:800;color:#ffb869;text-transform:uppercase;letter-spacing:.08em}
.leader-row{display:flex;align-items:center;gap:8px;margin-bottom:8px}
.leader-medal{width:18px;font-size:.8rem;text-align:center;color:#ffcf72}
.leader-img{width:28px;height:28px;border-radius:50%}
.leader-info{flex:1;min-width:0}
.leader-name{font-size:.72rem;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.leader-team{font-size:.6rem;color:var(--muted)}
.leader-val{font-size:.8rem;font-weight:800}
.scenario-intro,.scenario-card,.scenario-empty{
  padding:18px 20px;
  background:linear-gradient(180deg,rgba(28,27,44,.98),rgba(22,21,34,.98));
  border:1px solid rgba(95,92,132,.38);
  border-radius:18px;
}
.scenario-intro{margin-bottom:16px}
.scenario-stack{display:flex;flex-direction:column;gap:16px}
.scenario-bucket-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-bottom:14px;
}
.scenario-bucket-copy{
  flex:1;
  min-width:0;
}
.scenario-toggle-icon{
  flex:0 0 18px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:#ffd18b;
  font-weight:900;
  font-size:1rem;
  line-height:1;
}
.scenario-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:16px;
}
.scenario-bucket-meta{
  margin-top:6px;
  color:var(--muted);
  font-size:.8rem;
  font-weight:700;
}
.scenario-percent{
  min-width:82px;
  padding:10px 12px;
  border-radius:14px;
  background:rgba(255,138,29,.12);
  border:1px solid rgba(255,138,29,.22);
  color:#ffd2a6;
  font-size:1rem;
  font-weight:900;
  text-align:center;
}
.scenario-kicker{
  margin-bottom:8px;
  color:#ffb869;
  font-size:.76rem;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.08em;
}
.scenario-title{
  font-size:1.25rem;
  font-weight:900;
  line-height:1.2;
  color:#fff3de;
}
.scenario-placement{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:4px;
  min-width:120px;
}
.scenario-placement-rank{
  color:var(--accent);
  font-size:1rem;
  font-weight:900;
}
.scenario-placement-record{
  color:var(--muted);
  font-size:.82rem;
  font-weight:700;
}
.scenario-outcome-list{display:flex;flex-direction:column;gap:12px}
.scenario-team-outcome{
  padding:14px 16px;
  border-radius:16px;
  background:rgba(255,255,255,.03);
  border:1px solid rgba(255,255,255,.07);
}
.scenario-team-head{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:12px;
  margin-bottom:8px;
}
.scenario-team-name{font-size:.95rem;font-weight:800;color:#edf1fb}
.scenario-team-record{font-size:.76rem;font-weight:800;color:#ffb869}
.scenario-split{
  color:#c9d0e4;
  font-size:.86rem;
  line-height:1.55;
}
.scenario-split + .scenario-split{margin-top:4px}
.scenario-explanation{
  margin-top:16px;
  padding-top:16px;
  border-top:1px solid rgba(255,255,255,.08);
}
.scenario-explanation p{
  color:#d7dcef;
  font-size:.9rem;
  line-height:1.6;
}
.scenario-explanation p + p{margin-top:10px}
.scenario-option-list{
  margin:0;
  padding-left:22px;
  display:flex;
  flex-direction:column;
  gap:12px;
}
.scenario-option-item{
  color:#dfe5f5;
  line-height:1.55;
  list-style:none;
}
.scenario-bucket-toggle{
  display:block;
}
.scenario-option-title{
  display:block;
  margin-bottom:4px;
  color:#ffb869;
  font-size:.82rem;
  font-weight:800;
}
.scenario-option-copy{
  display:block;
  color:#d7dcef;
  font-size:.9rem;
}
.scenario-option-copy p{
  margin:0;
  line-height:1.55;
}
.scenario-option-copy p + p{
  margin-top:14px;
}
.scenario-option-highlight{
  padding:10px 12px;
  border-radius:14px;
  background:linear-gradient(180deg,rgba(255,207,150,.95),rgba(255,189,120,.92));
  border:1px solid rgba(161,105,44,.7);
  color:#2f1a08;
  box-shadow:0 6px 18px rgba(0,0,0,.18);
  font-weight:700;
}
.scenario-bucket-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  cursor:pointer;
  list-style:none;
}
.scenario-bucket-head::-webkit-details-marker{display:none}
.scenario-bucket-toggle[open] .scenario-toggle-icon{font-size:0}
.scenario-bucket-toggle[open] .scenario-toggle-icon::before{
  content:'-';
  font-size:1rem;
}
.scenario-bucket-toggle .scenario-option-list{display:none}
.scenario-bucket-toggle[open] .scenario-option-list{
  display:flex;
  margin-top:14px;
}
.no-selection,.error-msg{padding:28px 20px;text-align:center;color:var(--muted);line-height:1.6}
.error-msg{color:#ffb3bd}
/* Schedule compact rows */
.sched-row{
  display:flex;
  align-items:flex-start;
  gap:8px;
  padding:9px 12px;
  margin-bottom:6px;
  border-radius:12px;
  background:linear-gradient(180deg,rgba(28,27,44,.98),rgba(22,21,34,.98));
  border:1px solid rgba(95,92,132,.32);
}
.sched-row--mine{
  border-color:rgba(255,138,29,.72);
  box-shadow:0 0 0 1px rgba(255,138,29,.22) inset,0 14px 28px rgba(0,0,0,.12);
}
.sched-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
.sched-line{display:flex;align-items:center;gap:8px;min-width:0}
.sched-result{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:22px;
  height:22px;
  border-radius:6px;
  font-size:.72rem;
  font-weight:900;
  flex-shrink:0;
}
.sched-live{
  display:inline-flex;
  align-items:center;
  padding:3px 7px;
  border-radius:999px;
  background:#d44545;
  color:#fff;
  font-size:.62rem;
  font-weight:800;
  white-space:nowrap;
  animation:livePulse 1.4s ease-in-out infinite;
}
.sched-w{background:rgba(81,200,120,.18);color:#68dd8f}
.sched-l{background:rgba(211,107,121,.18);color:#ff8d9c}
.sched-date{font-size:.68rem;color:var(--muted);font-weight:700;white-space:nowrap;flex-shrink:0}
.sched-meta{font-size:.68rem;color:var(--muted);font-weight:700;line-height:1.35;white-space:normal}
.sched-ha{font-size:.68rem;color:var(--muted);font-weight:800;min-width:14px;text-align:center;flex-shrink:0}
.sched-opp{flex:1;font-size:.88rem;font-weight:700;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sched-score{font-size:.9rem;font-weight:800;white-space:nowrap;flex-shrink:0}
.sched-opp-logo{width:20px;height:20px;object-fit:contain;flex-shrink:0;opacity:.9}
.sched-section{margin-bottom:18px}
.sched-section-title{font-size:.72rem;font-weight:800;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);padding:2px 4px 8px;opacity:.8}
.sched-date-group{margin-bottom:12px}
.sched-date-group-title{
  font-size:.84rem;
  font-weight:800;
  color:#f3efe2;
  padding:2px 4px 8px;
}
.live-date-group{
  margin-bottom:16px;
}
.live-date-group-title{
  font-size:.86rem;
  font-weight:800;
  color:#f3efe2;
  padding:2px 2px 10px;
}
.loading-msg{padding:28px 20px;text-align:center;color:var(--muted)}
@media (max-width:480px){
  .competition-grid{grid-template-columns:1fr}
}
@media (max-width:720px){
  .app-shell{padding:14px 10px 28px}
  .app-title{font-size:1.35rem}
  .auth-hero h1,.setup-intro h2{font-size:1.7rem}
  .auth-card{padding:16px}
  .tab-btn{font-size:.7rem;padding:11px 3px}
  .panel{padding:18px}
  .team-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .leaders-grid{grid-template-columns:1fr}
  .goal-btns{grid-template-columns:1fr}
  .analysis-actions{width:100%}
  .analysis-actions .secondary-btn,.analysis-actions .primary-btn{flex:1}
  .summary-grid{grid-template-columns:1fr}
  .pos-legend{gap:10px;font-size:.8rem}
  .verdict-headline{font-size:1.55rem}
  .verdict-copy{font-size:.92rem}
  .result-alert-card{padding:20px}
  .result-alert-title{font-size:1.35rem}
  .live-game-body{grid-template-columns:1fr;justify-items:center}
  .live-score{order:-1}
  .scenario-header{flex-direction:column}
  .scenario-bucket-head{align-items:flex-start;flex-wrap:wrap}
  .scenario-percent{align-self:flex-end}
  .scenario-placement{align-items:flex-start;min-width:0}
  .header-btns{transform:translateY(calc(18px + 1.5mm))}
  .app-subtitle{max-width:160px}
}
@media (max-width:720px) and (orientation:portrait){
  .hdr-top{
    display:grid;
    grid-template-columns:minmax(0,1fr);
    align-items:start;
  }
  .header-brand{
    justify-content:center;
    text-align:center;
  }
  .header-btns{
    width:100%;
    justify-content:center;
    flex-wrap:wrap;
    transform:none;
    margin-top:6px;
    align-self:start;
  }
  .header-status{
    justify-content:center;
  }
  .app-subtitle{
    max-width:none;
    text-align:center;
  }
  .hdr-btn{
    min-height:24px;
    height:24px;
    padding:0 10px;
    font-size:.7rem;
    font-weight:800;
    border-radius:999px;
  }
}
@media (max-width:722px) and (orientation:portrait){
  .header-btns{
    transform:none;
  }
}
