*{box-sizing:border-box;margin:0;padding:0}
:root{
  --text-main:#e2e8f0;
  --text-muted:#aab8d1;
  --text-muted-strong:#c2d0e4;
  --text-dim:#8192ad;
}
body{background:#0a0e1a;color:var(--text-main);font-family:'Courier New',monospace;min-height:100vh;font-size:11pt;line-height:1.45}
::-webkit-scrollbar{width:5px}::-webkit-scrollbar-track{background:#111827}::-webkit-scrollbar-thumb{background:#334155;border-radius:3px}
.hdr{background:linear-gradient(135deg,#0f172a,#1e1b4b,#0f172a);border-bottom:1px solid #1e293b;padding:14px 20px;display:flex;align-items:center;justify-content:space-between}
.hdr h1{font-size:20px;font-weight:700;background:linear-gradient(135deg,#22d3ee,#a78bfa);-webkit-background-clip:text;-webkit-text-fill-color:transparent}
.tabs{display:flex;background:#0f1425;border-bottom:1px solid #1e293b;padding:0 18px}
.tabs button{padding:10px 16px;font-size:11pt;font-weight:600;letter-spacing:1px;color:var(--text-dim);background:none;border:none;border-bottom:2px solid transparent;cursor:pointer;font-family:inherit}

.tabs-right{margin-left:auto;display:flex;align-items:center;gap:10px}
.mode-pill{display:inline-block;padding:4px 10px;border-radius:999px;font-size:10pt;font-weight:700;letter-spacing:.6px;border:1px solid #1e293b;color:var(--text-muted);background:#0b1020}
.mode-pill.admin{color:#86efac;border-color:#14532d;background:#052e1a}
.admin-login-btn{padding:8px 12px;font-size:10pt;font-weight:700;letter-spacing:.6px;color:var(--text-main);background:#111827;border:1px solid #1e293b;border-radius:10px;cursor:pointer}
.admin-login-btn:hover{filter:brightness(1.07)}
.tabs button.active{color:#22d3ee;border-bottom-color:#22d3ee}
.content{padding:14px 18px;max-width:1400px;margin:0 auto}
.card{background:#111827;border:1px solid #1e293b;border-radius:6px;overflow:hidden}
.card-hd{padding:8px 12px;border-bottom:1px solid #1e293b;font-size:11pt;color:var(--text-muted);letter-spacing:1px;font-weight:700}
table{width:100%;border-collapse:collapse;font-size:11pt}
th{padding:9px 10px;font-size:11pt;color:var(--text-muted);letter-spacing:1px;font-weight:700;background:#0a0e1a;text-align:left}
th.r{text-align:right}
td{padding:7px 10px;font-size:11pt}
td.r{text-align:right}
tr+tr{border-top:1px solid #1e293b22}
.tb{display:inline-flex;align-items:center;padding:2px 6px;border-radius:3px;font-size:11pt;font-weight:700;letter-spacing:.5px}
.tln{background:#f59e0b22;color:#f59e0b;border:1px solid #f59e0b44}
.t1{background:#f59e0b22;color:#f59e0b;border:1px solid #f59e0b44}
.t2{background:#60a5fa22;color:#60a5fa;border:1px solid #60a5fa55}
.t3{background:#c084fc22;color:#c084fc;border:1px solid #c084fc55}
.t4{background:#cbd5e122;color:#cbd5e1;border:1px solid #cbd5e155}
.btn{padding:8px 14px;border:none;border-radius:4px;font-family:inherit;font-size:11pt;font-weight:700;letter-spacing:1px;cursor:pointer}
.btn-primary{background:linear-gradient(135deg,#059669,#0d9488);color:#f8fafc}
.btn-primary:disabled{background:#1e293b;color:#475569;cursor:not-allowed}
.btn-ghost{background:transparent;border:1px solid #334155;color:var(--text-muted)}
select,input{font-family:inherit;padding:7px 8px;background:#0a0e1a;border:1px solid #334155;border-radius:4px;color:#e2e8f0;font-size:11pt;width:100%}
label{font-size:11pt;color:var(--text-muted);display:block;margin-bottom:3px}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.grid3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:10px}
.nom-layout{display:grid;grid-template-columns:280px 1fr;gap:14px}
.nom-right{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.order-btn{display:flex;align-items:center;justify-content:space-between;width:100%;padding:8px 12px;background:transparent;border:none;border-left:3px solid transparent;color:var(--text-muted);cursor:pointer;font-family:inherit;font-size:11pt;text-align:left}
.order-btn.current{background:#1e293b;border-left-color:var(--team-color, #22d3ee);color:#f8fafc}
.order-btn.done{color:#334155;cursor:default}
.player-btn{display:flex;align-items:center;justify-content:space-between;width:100%;padding:8px 12px;background:transparent;border:none;color:var(--text-main);cursor:pointer;font-family:inherit;font-size:11pt;text-align:left;border-bottom:1px solid #1e293b08}
.player-btn:hover{background:#1e293b}
.player-btn.selected{background:#1e293b}
.player-btn:disabled{color:var(--text-muted);cursor:not-allowed;opacity:.55}
.premium-box{background:#f59e0b08;border:1px solid #f59e0b33;border-radius:4px;padding:10px;margin-top:10px}
.warn{margin-top:8px;padding:6px 10px;background:#7f1d1d22;border:1px solid #ef444444;border-radius:4px;font-size:11pt;color:#fca5a5}
.stat-mini{background:#0a0e1a88;border-radius:4px;padding:6px 10px;text-align:center;min-width:55px}
.stat-mini .lbl{font-size:11pt;color:var(--text-muted);letter-spacing:1px;font-weight:700;margin-bottom:2px}
.stat-mini .val{font-size:14px;font-weight:700}
.nom-hero{border-radius:8px;padding:16px;margin-bottom:12px;display:flex;align-items:center;justify-content:space-between}
.nom-hero-logo{width:56px;height:56px;object-fit:contain;border-radius:4px;margin-right:14px}

/* ---- Trophy case ---- */
.trophy-case{margin-top:14px}
.trophy-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
@media (max-width: 900px){.trophy-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width: 520px){.trophy-grid{grid-template-columns:1fr}}
.trophy-card{border:1px solid #1e293b;border-radius:14px;background:#0f1425;padding:12px}
.trophy-head{display:flex;align-items:center;gap:10px;margin-bottom:8px}
.trophy-head img{width:38px;height:38px}
.trophy-title{font-weight:900;letter-spacing:0.5px}
.trophy-card table{width:100%;border-collapse:collapse;font-size:10.5pt}
.trophy-card th,.trophy-card td{padding:6px 8px;border-top:1px solid #1e293b;vertical-align:top}
.trophy-card th{color:var(--text-muted);font-weight:700;text-align:left}
.trophy-card td{color:var(--text-main)}
.trophy-muted{color:var(--text-muted)}

/* trophy icon tile w/ glow + year badge */
.trophy-icons{display:flex;flex-wrap:wrap;gap:12px}
.trophy-item{position:relative;width:78px;height:78px;border-radius:18px;display:flex;align-items:center;justify-content:center}
.trophy-item img{width:78px;height:78px;filter:drop-shadow(0 0 0 rgba(0,0,0,0));transition:transform 140ms ease, filter 140ms ease}
.trophy-item:hover img{transform:translateY(-2px) scale(1.04);filter:drop-shadow(0 0 12px var(--glow))}
.trophy-badge{position:absolute;right:-6px;top:-6px;background:#0b1020;border:1px solid #334155;color:#e2e8f0;
  font-size:9.5pt;font-weight:900;letter-spacing:0.3px;padding:2px 6px;border-radius:999px}

/* v32: Trade partner icons row */
.partner-icons{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.partner-item{position:relative;width:52px;height:52px;border-radius:16px;display:flex;align-items:center;justify-content:center}
.partner-item img{width:40px;height:40px;object-fit:contain;filter:drop-shadow(0 1px 3px rgba(0,0,0,.25))}
.partner-badge{position:absolute;right:-6px;top:-6px;background:#0b1020;border:1px solid #334155;color:#e2e8f0;
  font-size:9.5pt;font-weight:900;letter-spacing:0.3px;padding:2px 6px;border-radius:999px}

/* per-trophy glow colors */
.trophy-item[data-trophy="stream"]{--glow:#60a5fa}
.trophy-item[data-trophy="anti"]{--glow:#ef4444}
.trophy-item[data-trophy="highgame"]{--glow:#a78bfa}
.trophy-item[data-trophy="mvp"]{--glow:#22c55e}
.trophy-item[data-trophy="cy"]{--glow:#f59e0b}
.trophy-item[data-trophy="pennant"]{--glow:#ef4444}
.trophy-item[data-trophy="division"]{--glow:#38bdf8}
.trophy-item[data-trophy="moldy"]{--glow:#84cc16}
.trophy-item[data-trophy="champion"]{--glow:#facc15}
.trophy-item[data-trophy="runnerup"]{--glow:#94a3b8}


.trophy-icons{display:flex;flex-wrap:wrap;gap:10px;margin-top:6px}



.hidden{display:none}

/* ---- Team selector grid (2x7) ---- */
.team-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:10px;margin-bottom:14px}
.team-tile{width:100%;padding:12px 10px;border:1px solid #334155;border-radius:12px;background:transparent;color:var(--text-muted);cursor:pointer;font-family:inherit;font-size:11pt;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;touch-action:manipulation;-webkit-tap-highlight-color:rgba(34,211,238,.15)}
.team-tile:hover{background:#1e293b}
.team-tile.active{border-color:var(--team-color,#22d3ee);background:color-mix(in srgb,var(--team-color,#22d3ee) 14%, transparent);color:var(--text-main)}
.team-tile .abbr{font-weight:800;letter-spacing:1px}
@media (max-width: 900px){
  .team-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media (max-width: 480px){
  .team-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}

@keyframes fi{from{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translateY(0)}}.fi{animation:fi .2s ease-out}
/* ---------------- Mobile responsiveness ---------------- */
@media (max-width: 900px){
  body{font-size:12pt}
  .hdr{padding:12px 12px; flex-direction:column; align-items:flex-start; gap:10px}
  .hdr h1{font-size:18px}
  .hdr > div:last-child{flex-wrap:wrap; gap:10px}
  .content{padding:10px 8px}
  .tabs{padding:0 8px; overflow-x:auto; -webkit-overflow-scrolling:touch; flex-wrap:nowrap; gap:2px}
  .tabs button{padding:10px 12px; white-space:nowrap; flex:0 0 auto}
  .tabs-right{margin-left:12px; flex:0 0 auto}
  .mode-pill{white-space:nowrap}
  .nom-layout{grid-template-columns:1fr}
  .nom-right{grid-template-columns:1fr}
  .grid2{grid-template-columns:1fr}
  .grid3{grid-template-columns:1fr}
  .card-hd{position:sticky; top:0; background:#111827; z-index:2}
  .card{overflow:auto}
  .btn{padding:10px 14px}
  select,input{padding:10px 10px}

  /* ---- Team Pages: stack columns vertically ---- */
  #tab-myteam .stat-mini{min-width:45px;padding:4px 6px}
  #tab-myteam .stat-mini .lbl{font-size:10pt}
  #tab-myteam .stat-mini .val{font-size:12px}
  #tab-myteam table{min-width:0!important}
  #tab-myteam table th, #tab-myteam table td{padding:5px 6px;font-size:10.5pt}
  /* Hide MLB column on team roster */
  #tab-myteam .tp-grid > div:first-child table th:nth-child(3),
  #tab-myteam .tp-grid > div:first-child table td:nth-child(3){display:none}
  /* Hide MLB column on FA rights */
  #tab-myteam .tp-grid > div:nth-child(2) table th:nth-child(3),
  #tab-myteam .tp-grid > div:nth-child(2) table td:nth-child(3){display:none}
  /* Reorder: Roster(1) → FA Rights(2) → Depth Hitters(3) → Depth Pitchers(4) */
  .tp-grid > div:first-child{display:flex;flex-direction:column}
  .tp-grid > div:first-child > .card:first-child{order:1}
  .tp-grid > div:first-child > .card:nth-child(2){order:3}
  .tp-grid > div:nth-child(2) > .card:first-child{order:2}
  .tp-grid > div:nth-child(2) > .card:nth-child(2){order:4}
  .tp-grid{display:flex!important;flex-direction:column}
  .tp-grid > div{display:contents!important}

  /* ---- Layout overrides for stacked mobile ---- */
  .tp-grid{grid-template-columns:1fr!important}
  .depth-grid{grid-template-columns:1fr!important}
  
  /* Team page hero stats wrap better */
  .tp-hero{flex-direction:column!important;align-items:flex-start!important;gap:10px!important}
  .tp-hero-stats{margin-left:0!important;flex-wrap:wrap!important}

  /* ---- Default table min-width for other tabs ---- */
  table{min-width:0}
}
/* Very small phones */
@media (max-width: 480px){
  body{font-size:12pt}
  .hdr h1{font-size:17px}
  .tabs button{padding:10px 10px; font-size:11pt}
}


/* ---- Season history ---- */
.hist-meta{padding:12px}
.hist-meta .line{color:var(--text-muted);margin-top:2px}
.hist-meta .line strong{color:var(--text-main)}
.hist-table{width:100%;border-collapse:collapse}
.hist-table th,.hist-table td{padding:8px 10px;border-top:1px solid #1e293b;vertical-align:top}
.hist-table th{color:var(--text-muted);font-weight:700;text-align:left}
.hist-icons{display:flex;flex-wrap:wrap;gap:10px}
.hist-icons .trophy-item{width:46px;height:46px;border-radius:14px}
.hist-icons .trophy-item img{width:46px;height:46px}
.hist-icons .trophy-badge{display:none}


/* ---- Team page 2-column section ---- */
.two-col{display:grid;grid-template-columns:1fr 1fr;gap:14px;align-items:stretch;margin-top:14px}
@media (max-width: 980px){.two-col{grid-template-columns:1fr}.fr-grid{grid-template-columns:1fr !important}}
.super-row{display:flex;flex-direction:column;gap:8px}
.super-k{color:var(--text-muted);font-weight:800;font-size:10.5pt;text-transform:uppercase;letter-spacing:.4px}
.super-v{font-weight:900;font-size:12pt}
.super-sub{color:var(--text-muted);margin-top:2px}


/* ---- Two-col alignment tweaks ---- */
.two-col{align-items:stretch}
.two-col > .card{height:100%}
.card{display:flex;flex-direction:column}
.card-bd{flex:1}
.super-k{font-size:12.5pt}
.super-v{font-size:13.5pt}
.super-sub{font-size:11pt}

/* Improve readability for inline-generated secondary copy across the app. */
.content :is(p, div, span, td, th, label, summary, small)[style*="color:#64748b"],
.content :is(p, div, span, td, th, label, summary, small)[style*="color: #64748b"]{
  color:var(--text-muted) !important;
}
.content :is(p, div, span, td, th, label, summary, small)[style*="color:#94a3b8"],
.content :is(p, div, span, td, th, label, summary, small)[style*="color: #94a3b8"]{
  color:var(--text-muted-strong) !important;
}
.content :is(p, div, span, td, th, label, summary, small)[style*="font-size:8pt"],
.content :is(p, div, span, td, th, label, summary, small)[style*="font-size:8.5pt"],
.content :is(p, div, span, td, th, label, summary, small)[style*="font-size:9pt"],
.content :is(p, div, span, td, th, label, summary, small)[style*="font-size:9.5pt"]{
  font-size:10.75pt !important;
  line-height:1.5 !important;
}


/* --- Normalize vertical spacing under TROPHY CASE --- */
#trophy-case + .two-col{margin-top:16px}
.card{margin-top:0}
.card-hd{padding-top:12px;padding-bottom:12px}
.two-col{margin-top:16px !important}


/* --- HARD ALIGN cards under Trophy Case --- */
.two-col{margin-top:18px !important}
.two-col .card{margin-top:0 !important}


.two-col .card{height:100%}

/* v40: Make top team selector buttons span same width as main content boxes */
.team-selector-row{
  display:flex;
  gap:8px;
  width:100%;
  max-width:1400px;
  margin:0 auto 14px auto;
  padding:0 18px;
}
.team-selector-row button{
  flex:1;
}
@media (max-width: 900px){
  .team-selector-row{flex-wrap:wrap}
  .team-selector-row button{flex:1 1 22%}
}


/* v46: iOS-safe mobile team picker (custom overlay) */
.team-selector-mobile{display:none;width:100%;max-width:1400px;margin:0 auto 14px auto;padding:0 18px}
.team-picker-btn{
  width:100%;
  border:1px solid #334155;
  background:#0b1020;
  color:#e2e8f0;
  border-radius:14px;
  padding:12px 12px;
  font-weight:950;
  font-family:inherit;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  cursor:pointer;
  -webkit-tap-highlight-color:rgba(34,211,238,.15);
  touch-action:manipulation;
}
.team-picker-btn .left{display:flex;align-items:center;gap:10px;min-width:0}
.team-picker-btn .left span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.team-picker-btn .chev{opacity:.75;font-weight:900}
.team-picker-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.55);
  z-index:999999;
  display:none;
  align-items:center;
  justify-content:center;
  padding:14px;
  overscroll-behavior:contain;
  -webkit-tap-highlight-color:transparent;
}
.team-picker-sheet{
  width:100%;
  max-width:340px;
  background:#0b1020;
  border:1px solid #1e293b;
  border-radius:18px;
  overflow:hidden;
  box-shadow:0 18px 50px rgba(0,0,0,.55);
}
.team-picker-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 14px;
  border-bottom:1px solid #1e293b;
  font-weight:950;
}
.team-picker-close{
  border:1px solid #334155;
  background:transparent;
  color:#e2e8f0;
  border-radius:12px;
  padding:6px 10px;
  font-weight:950;
  cursor:pointer;
}
.team-picker-list{
  padding:10px;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  overflow:auto;
  max-height:calc(100vh - 120px);
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:6px;
}
.team-picker-item{
  width:100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:4px;
  padding:10px 8px;
  border:1px solid #1e293b;
  background:#070b16;
  color:#e2e8f0;
  border-radius:12px;
  cursor:pointer;
  font-weight:900;
  font-size:10.5pt;
  letter-spacing:.5px;
  -webkit-tap-highlight-color:rgba(34,211,238,.15);
  touch-action:manipulation;
  transition:border-color .15s,background .15s;
}
.team-picker-item:active{background:#111827}
.team-picker-item.active{border-color:var(--team-color);background:color-mix(in srgb, var(--team-color) 14%, #070b16);}
@media (max-width: 900px){
  .team-selector-row{display:none !important;}
  .team-selector-mobile{display:block;}
}

.view-only { opacity: 0.86; }
/* dropdown readability (fixes DFA option visibility in dark UI) */
select, option { color:#e2e8f0 !important; background:#0b1020 !important; }

/* ---- Season history ---- */
.hist-meta{padding:12px}
.hist-meta .line{color:var(--text-muted);margin-top:2px}
.hist-meta .line strong{color:var(--text-main)}
.hist-table{width:100%;border-collapse:collapse}
.hist-table th,.hist-table td{padding:8px 10px;border-top:1px solid #1e293b;vertical-align:top}
.hist-table th{color:var(--text-muted);font-weight:700;text-align:left}
.hist-icons{display:flex;flex-wrap:wrap;gap:10px}
.hist-icons .trophy-item{width:46px;height:46px;border-radius:14px}
.hist-icons .trophy-item img{width:46px;height:46px}
.hist-icons .trophy-badge{display:none}


/* ---- Team page 2-column section ---- */
.two-col{display:grid;grid-template-columns:1fr 1fr;gap:14px;align-items:stretch;margin-top:14px}
@media (max-width: 980px){.two-col{grid-template-columns:1fr}}
.super-row{display:flex;flex-direction:column;gap:8px}
.super-k{color:var(--text-muted);font-weight:800;font-size:10.5pt;text-transform:uppercase;letter-spacing:.4px}
.super-v{font-weight:900;font-size:12pt}
.super-sub{color:var(--text-muted);margin-top:2px}


/* ---- Two-col alignment tweaks ---- */
.two-col{align-items:stretch}
.two-col > .card{height:100%}
.card{display:flex;flex-direction:column}
.card-bd{flex:1}
.super-k{font-size:12.5pt}
.super-v{font-size:13.5pt}
.super-sub{font-size:11pt}


/* --- Normalize vertical spacing under TROPHY CASE --- */
#trophy-case + .two-col{margin-top:16px}
.card{margin-top:0}
.card-hd{padding-top:12px;padding-bottom:12px}
.two-col{margin-top:16px !important}


/* --- HARD ALIGN cards under Trophy Case --- */
.two-col{margin-top:18px !important}
.two-col .card{margin-top:0 !important}


/* --- Live Scores --- */

/* Empty state */
.live-empty-state{text-align:center;padding:60px 24px;color:var(--text-muted)}
.live-empty-icon{font-size:48px;margin-bottom:12px;opacity:0.4}
.live-empty-title{font-size:16pt;font-weight:700;color:var(--text-muted-strong);margin-bottom:6px}
.live-empty-sub{font-size:11pt;color:var(--text-muted)}
.live-empty-controls{margin-top:12px;display:flex;justify-content:center}

/* Page header */
.live-header{display:flex;justify-content:space-between;align-items:flex-end;margin-bottom:18px;flex-wrap:wrap;gap:10px;padding:0 18px}
.live-header-main{display:flex;flex-direction:column;gap:8px;min-width:0;flex:1 1 300px}
.live-header-left{display:flex;flex-direction:column;gap:2px}
.live-title{margin:0;color:#e2e8f0;font-size:18pt;letter-spacing:1px}
.live-title-note{color:#a78bfa;font-size:10pt;font-weight:400}
.live-meta{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.live-period{color:#a78bfa;font-size:10pt;font-weight:600}
.live-updated{color:var(--text-muted);font-size:10pt}
.live-status-row{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.live-header-controls{display:flex;gap:10px;align-items:flex-end;flex-wrap:wrap}
.live-control-group{display:flex;flex-direction:column;gap:4px;min-width:150px}
.live-control-label{margin:0;color:var(--text-muted);font-size:10pt;font-weight:700;letter-spacing:0.7px}
.live-control-select{background:#111827 !important;color:#e2e8f0;border:1px solid #334155;border-radius:6px;padding:7px 10px;font-family:inherit;font-size:10pt;cursor:pointer;min-width:0}
.live-status-badge{font-size:10pt;padding:2px 8px;border-radius:10px;font-weight:600}
.live-status-live{background:#eab30822;color:#eab308;border:1px solid #eab30844}
.live-status-final{background:#22c55e22;color:#22c55e;border:1px solid #22c55e44}
.live-status-sched{background:#94a3b822;color:var(--text-muted-strong);border:1px solid #94a3b844}
.live-no-matchups{color:var(--text-muted);font-size:10.75pt;margin:10px 18px}

/* Grid */
.live-grid{display:grid;grid-template-columns:1fr;gap:14px;padding:0 18px}

/* Matchup card */
.live-matchup{border:1px solid #1e293b;overflow:hidden}
.live-matchup-focus{box-shadow:0 0 0 1px #22d3ee33, 0 0 22px #22d3ee12}
.live-card-inner{padding:16px 18px 14px}

/* Teams row */
.live-teams-row{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:14px;position:relative}
.live-team-col{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1 1 0}
.live-team-col-right{align-items:flex-end;text-align:right}
.live-team-name-row{display:flex;align-items:center;gap:6px}
.live-team-name-right{justify-content:flex-end}
.live-team-abbr{font-size:13pt;font-weight:700;letter-spacing:0.5px}
.live-score{font-size:22pt;font-weight:800;color:var(--text-muted-strong);line-height:1.1}
.live-score-leading{color:#22d3ee}
.live-proj-rem{display:flex;gap:10px;font-size:11pt;flex-wrap:wrap}
.live-proj{color:#e2e8f0;background:#1e293b;padding:2px 8px;border-radius:4px;border:1px solid #334155;display:inline-flex;align-items:center}
.live-rem{color:#cbd5e1;display:inline-flex;align-items:center}
.live-final-badge{display:inline-flex;align-items:center;padding:2px 8px;border-radius:999px;background:#22c55e22;color:#22c55e;border:1px solid #22c55e44;font-size:10pt;font-weight:700}
.live-vs{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);color:#334155;font-size:10pt;font-weight:600;text-transform:uppercase;letter-spacing:1px}

/* Win probability */
.live-wp-section{margin-bottom:8px}
.live-wp-display{display:flex;align-items:center;gap:8px}
.live-wp-pct{font-size:15pt;font-weight:800;min-width:44px;text-align:center;color:#e2e8f0}
.live-wp-pct-leading{color:#ffffff}
.live-wp-bar-wrap{flex:1;display:flex;flex-direction:column;gap:2px}
.win-prob-bar{display:flex;height:10px;border-radius:5px;overflow:hidden;background:#1e293b;border:1px solid #e2e8f0}
.win-prob-bar .fill-away,.win-prob-bar .fill-home{transition:width 0.5s ease}
.live-wp-label{text-align:center;font-size:7pt;color:#475569;letter-spacing:1.5px;font-weight:600;text-transform:uppercase}

/* Timeline */
.live-timeline-wrap{margin:10px 0 6px;border-radius:6px;overflow:hidden;background:#0f172a;border:1px solid #1e293b}
.live-timeline-canvas{display:block;width:100%;height:100px}

/* Player breakdown */
.live-details{margin-top:8px;border-top:1px solid #1e293b;padding-top:6px}
.live-details[open] .live-details-arrow{transform:rotate(90deg)}
.live-details-summary{cursor:pointer;color:var(--text-muted-strong);font-size:10pt;user-select:none;list-style:none;display:flex;align-items:center;gap:6px;padding:4px 0}
.live-details-summary::-webkit-details-marker{display:none}
.live-details-summary::marker{display:none;content:""}
.live-details-arrow{display:inline-block;font-size:8.5pt;transition:transform 0.15s ease;color:var(--text-muted)}
.live-players-wrap{display:flex;gap:14px;margin-top:8px;font-size:10pt}
@media(max-width:600px){.live-players-wrap{flex-direction:column}}

/* Player list */
.live-player-list{flex:1;min-width:0;overflow:hidden}
.live-player-list-header{display:flex;align-items:center;gap:5px;padding-bottom:5px;border-bottom:1px solid #1e293b;margin-bottom:2px}
.live-player-list-total{margin-left:auto;color:#22d3ee;font-weight:700;font-size:11pt}
.live-player-table{width:100%;border-collapse:collapse}
.live-player-row td{padding:2px 3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.live-player-row:hover{background:#1e293b40}
.live-player-status{width:22px;text-align:center;white-space:nowrap}
@keyframes live-pulse{0%,100%{opacity:1}50%{opacity:0.4}}
.live-player-name{color:#e2e8f0;max-width:150px;overflow:hidden;text-overflow:ellipsis}
.live-player-name-line{display:flex;align-items:center;gap:4px;min-width:0;overflow:hidden;white-space:nowrap}
.live-player-name-text{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.live-player-name-line .live-player-pos,.live-player-name-line .live-bat-badge{margin-left:0}
.live-player-pos{color:var(--text-muted);font-size:8.75pt;margin-left:4px}
.live-player-inning{color:#eab308;font-size:8.75pt;margin-left:4px;font-weight:600}
.live-player-cur{color:#22d3ee;text-align:right;font-weight:700;width:40px}
.live-player-cur-val{display:inline-block}
.live-player-rem{text-align:right;white-space:nowrap}
.live-rem-val{color:var(--text-muted-strong);font-weight:600}
.live-player-divider{border:none;border-top:1px solid #334155;margin:4px 0}
.live-player-stat-token,
.mobile-bench-stat-token{display:inline-block;padding:1px 4px;border-radius:4px}
.live-player-stat-token + .live-player-stat-token,
.mobile-bench-stat-token + .mobile-bench-stat-token{margin-left:3px}

@keyframes live-flash-up{
  0%{transform:scale(1);filter:none;text-shadow:none}
  28%{transform:scale(1.11);filter:brightness(1.22);text-shadow:0 0 18px rgba(34,197,94,0.5)}
  100%{transform:scale(1);filter:none;text-shadow:none}
}
@keyframes live-flash-down{
  0%{transform:scale(1);filter:none;text-shadow:none}
  28%{transform:scale(1.11);filter:brightness(1.16);text-shadow:0 0 18px rgba(239,68,68,0.45)}
  100%{transform:scale(1);filter:none;text-shadow:none}
}
@keyframes live-flash-neutral{
  0%{transform:translateY(0);filter:none;box-shadow:inset 0 0 0 0 rgba(34,211,238,0),0 0 0 rgba(56,189,248,0)}
  30%{transform:translateY(-1px);filter:brightness(1.1);box-shadow:inset 0 0 0 999px rgba(34,211,238,0.14),0 0 0 1px rgba(56,189,248,0.28),0 0 18px rgba(34,211,238,0.18)}
  100%{transform:translateY(0);filter:none;box-shadow:inset 0 0 0 0 rgba(34,211,238,0),0 0 0 rgba(56,189,248,0)}
}
.live-anim-flash-up,.live-anim-flash-down,.live-anim-flash{
  animation-duration:1.8s;
  animation-timing-function:cubic-bezier(0.22,1,0.36,1);
  animation-fill-mode:both;
  will-change:transform,filter,box-shadow,text-shadow;
}
.live-anim-flash-up{animation-name:live-flash-up}
.live-anim-flash-down{animation-name:live-flash-down}
.live-anim-flash{animation-name:live-flash-neutral}
.mlu-pts.live-anim-flash-up,
.mlu-pts.live-anim-flash-down,
.mlu-pts.live-anim-flash,
.mobile-bench-pts.live-anim-flash-up,
.mobile-bench-pts.live-anim-flash-down,
.mobile-bench-pts.live-anim-flash,
.live-player-cur-val.live-anim-flash-up,
.live-player-cur-val.live-anim-flash-down,
.live-player-cur-val.live-anim-flash,
.live-player-stat-token.live-anim-flash,
.mobile-bench-stat-token.live-anim-flash,
.mlu-stat-pill.live-anim-flash{
  animation-duration:0.72s;
  animation-iteration-count:3;
  border-radius:6px;
}
@keyframes live-ab-enter{
  0%{transform:scale(0.42);filter:brightness(1);box-shadow:0 0 0 rgba(34,197,94,0),inset 0 0 0 0 rgba(34,197,94,0)}
  16%{transform:scale(1.78);filter:brightness(1.35);box-shadow:0 0 0 2px rgba(34,197,94,0.45),0 0 26px rgba(34,197,94,0.45),inset 0 0 0 999px rgba(34,197,94,0.14)}
  34%{transform:scale(0.88);filter:brightness(1.12);box-shadow:0 0 0 1px rgba(34,197,94,0.22),0 0 12px rgba(34,197,94,0.18),inset 0 0 0 999px rgba(34,197,94,0.08)}
  52%{transform:scale(1.38);filter:brightness(1.22);box-shadow:0 0 0 2px rgba(34,197,94,0.32),0 0 20px rgba(34,197,94,0.28),inset 0 0 0 999px rgba(34,197,94,0.1)}
  72%{transform:scale(0.96);filter:brightness(1.08);box-shadow:0 0 0 1px rgba(34,197,94,0.16),0 0 10px rgba(34,197,94,0.14),inset 0 0 0 999px rgba(34,197,94,0.05)}
  100%{transform:scale(1);filter:brightness(1);box-shadow:0 0 0 rgba(34,197,94,0),inset 0 0 0 0 rgba(34,197,94,0)}
}
.live-ab-enter{
  animation:live-ab-enter 1.35s cubic-bezier(0.18,0.88,0.22,1) 1 both;
  transform-origin:center;
  will-change:transform,filter,box-shadow;
  z-index:2;
}

/* Standalone team cards */
.live-unmatched-section{margin-top:22px;padding:0 18px}
.live-unmatched-title{color:var(--text-muted);margin-bottom:10px;font-size:10.75pt;font-weight:600;letter-spacing:0.5px}
.live-standalone .live-standalone-inner{padding:12px 14px}
.live-standalone-top{display:flex;align-items:center;gap:6px}
.live-standalone-score{margin-left:auto;color:#22d3ee;font-weight:800;font-size:16pt}
.live-standalone-meta{color:var(--text-muted);font-size:10pt;margin-top:4px}

/* --- Dashboard --- */
.dash-active-1{background:#22d3ee22;color:#22d3ee;border:1px solid #22d3ee44}
.dash-active-2{background:#a78bfa22;color:#a78bfa;border:1px solid #a78bfa44}
.dash-active-3{background:#94a3b822;color:var(--text-muted-strong);border:1px solid #94a3b844}
.dash-active-4{background:#f59e0b22;color:#f59e0b;border:1px solid #f59e0b44}
.live-player-stats{color:var(--text-muted-strong);font-size:10pt;margin-left:6px}
.live-bat-badge{display:inline-flex;align-items:center;justify-content:center;font-size:10pt;font-weight:700;padding:2px 6px;border-radius:3px;border:1px solid;margin-left:5px;vertical-align:middle;letter-spacing:0.5px;transform-origin:center}
.live-player-proj-detail{color:var(--text-muted);font-size:9.75pt;margin-left:6px}
@media(max-width:700px){.mc-detail-grid{grid-template-columns:1fr !important}}

@media (max-width: 700px){
  .live-header{margin:0 -8px 14px;padding:0;display:block}
  .live-header-main{position:sticky;top:0;z-index:4;gap:10px;padding:10px 12px 12px;margin-bottom:10px;background:linear-gradient(180deg,rgba(10,14,26,0.98),rgba(11,18,32,0.95) 82%,rgba(10,14,26,0.88));backdrop-filter:blur(10px);border-bottom:1px solid #1e293b}
  .live-header-controls{display:grid;grid-template-columns:1fr 1fr;gap:8px;width:100%;padding:0 12px}
  .live-control-group{min-width:0}
  .live-control-select{min-height:42px;padding:10px 12px}
  .live-grid{padding:0 12px}
  .live-unmatched-section{padding:0 12px;margin-top:18px}
  .live-no-matchups{margin:10px 12px}
  .live-card-inner{padding:14px 14px 12px}
  .live-teams-row{display:grid;grid-template-columns:1fr;gap:10px;margin-bottom:12px}
  .live-vs{position:static;transform:none;justify-self:center;padding:3px 10px;border-radius:999px;background:#0f172a;border:1px solid #1e293b}
  .live-proj-rem{gap:6px;font-size:10pt}
  .live-wp-display{gap:6px}
  .live-wp-pct{font-size:12pt;min-width:38px}
  .live-timeline-canvas{height:72px}
  .live-players-wrap{flex-direction:column;gap:10px}
}

@media (max-width: 520px){
  .live-title{font-size:15pt;letter-spacing:0.7px}
  .live-meta{gap:6px}
  .live-period,.live-updated{font-size:9.75pt}
  .live-status-badge{font-size:9.5pt;padding:3px 8px}
  .live-header-controls{grid-template-columns:1fr}
  .live-teams-row{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:start;gap:8px}
  .live-team-col{display:flex;flex-direction:column;gap:5px;min-width:0;flex:none}
  .live-team-name-row{min-width:0}
  .live-team-col-right{align-items:flex-end;text-align:right}
  .live-team-col-right .live-team-name-row{justify-content:flex-end;flex-direction:row}
  .live-team-abbr{font-size:12pt}
  .live-score{font-size:20pt}
  .live-proj-rem{flex-direction:column;gap:4px;font-size:10pt;align-items:flex-start}
  .live-team-col-right .live-proj-rem{align-items:flex-end}
  .live-vs{align-self:center;justify-self:center;margin:0}
  .live-timeline-canvas{height:64px}
  .live-player-table,.live-player-table tbody{display:block}
  .live-player-row{display:grid;grid-template-columns:22px minmax(0,1fr) auto;grid-template-areas:"status name cur" "status rem rem";align-items:start;column-gap:8px;row-gap:3px;padding:6px 0}
  .live-player-row td{display:block;padding:0;white-space:normal;overflow:visible;text-overflow:clip}
  .live-player-status{grid-area:status;width:auto;padding-top:2px}
  .live-player-name{grid-area:name;max-width:none}
  .live-player-name-line{flex-wrap:wrap;white-space:normal}
  .live-player-name-text{max-width:100%}
  .live-player-cur{grid-area:cur;width:auto;font-size:11pt}
  .live-player-rem{grid-area:rem;text-align:left;white-space:normal}
  .live-player-stats{display:inline;margin-left:0}
  .live-player-proj-detail{display:inline;margin-left:4px}
  .live-player-separator td{padding:4px 0}
  .live-bat-badge{margin-left:0}
}

/* ================================================================
   LINEUP VIEW (shared mobile + desktop)
   ================================================================ */

/* Matchup navigator pills */
.mobile-matchup-pill{
  display:flex;align-items:center;justify-content:space-between;
  width:100%;padding:10px 12px;
  background:#111827;border:1px solid #1e293b;border-radius:8px;
  color:var(--text-muted);font-family:inherit;font-size:10pt;
  cursor:pointer;touch-action:manipulation;
  -webkit-tap-highlight-color:rgba(34,211,238,.15);
}
.mobile-matchup-pill.active{border-color:#22d3ee;background:#0f172a}
.mobile-matchup-pill:active{background:#1e293b}
.mmp-team{font-weight:700;flex:1 1 0;display:flex;align-items:center;gap:4px}
.mmp-team:last-child{justify-content:flex-end}
.mmp-team img{width:20px;height:20px;object-fit:contain}
.mmp-won{color:#22c55e;font-weight:900}
.mmp-lost{color:#ef4444}
.mmp-score{color:var(--text-muted-strong);font-size:10pt;flex:0 0 auto;text-align:center;padding:0 6px}

/* Side-by-side lineup */
.mobile-lineup{margin-top:10px}
.mlu-row{display:grid;grid-template-columns:1fr 28px 1fr;align-items:stretch;gap:3px;margin-bottom:3px}
.mlu-pos{display:flex;align-items:center;justify-content:center;color:#64748b;font-size:10pt;font-weight:800;letter-spacing:0.5px}
.mlu-card{min-width:0;overflow:hidden;background:#111827;border-radius:6px;padding:8px 10px;position:relative}
.mlu-card.mlu-compact{padding:3px 10px}
.mlu-card.mlu-compact .mlu-badge{margin-top:0;font-size:8pt}
.mlu-row:has(.mlu-compact){margin-bottom:1px}
/* Green = active in live game */
.mlu-card.mlu-live{background:#111d2e;border-left:2px solid #22c55e}
.mlu-card.mlu-right.mlu-live{border-left:none;border-right:2px solid #22c55e}
/* Red = game over / out of game / no game */
.mlu-card.mlu-out{border-left-color:#ef4444}
.mlu-card.mlu-right.mlu-out{border-right-color:#ef4444}
.mlu-card.mlu-final{background:#0d1117;opacity:0.7;border-left:2px solid #ef4444}
.mlu-card.mlu-right.mlu-final{border-left:none;border-right:2px solid #ef4444}
.mlu-card.mlu-off{background:#0b0f1a;opacity:0.4;border-left:2px solid #ef4444}
.mlu-card.mlu-right.mlu-off{border-left:none;border-right:2px solid #ef4444}
.mlu-card.mlu-ppd{background:#1a150d;opacity:0.5;border-left:2px solid #ef4444}
.mlu-card.mlu-right.mlu-ppd{border-left:none;border-right:2px solid #ef4444}
/* Blue = game upcoming, in lineup or unknown */
.mlu-card.mlu-sched{background:#0b0f1a;border-left:2px solid #60a5fa}
.mlu-card.mlu-right.mlu-sched{border-left:none;border-right:2px solid #60a5fa}
/* Yellow = game upcoming, confirmed not in lineup */
.mlu-card.mlu-dnp{background:#0d1117;opacity:0.5;border-left:2px solid #eab308}
.mlu-card.mlu-right.mlu-dnp{border-left:none;border-right:2px solid #eab308}
.mlu-card.mlu-gd-active{background:#172554!important;border-color:#3b82f6!important;opacity:1!important}
.mlu-card.mlu-empty{background:transparent}
.mlu-card-top{display:flex;align-items:baseline;gap:4px}
.mlu-card.mlu-left .mlu-card-top{flex-direction:row}
.mlu-card.mlu-right .mlu-card-top{flex-direction:row-reverse}
.mlu-card.mlu-right .mlu-stats{text-align:right}
.mlu-name{font-size:12pt;color:#f1f5f9;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;flex:1}
.mlu-card.mlu-right .mlu-name{text-align:right}
.mlu-lineup-badge{
  flex-shrink:0;margin-left:5px;vertical-align:middle;
  font-size:9pt;font-weight:900;
}
.mlu-card.mlu-right .mlu-lineup-badge{margin-left:0;margin-right:5px}
.mlu-lb-in{color:#22c55e}
.mlu-lb-dnp{color:#ef4444}
.mlu-lb-pp{color:#22c55e}
.mlu-pts{font-size:14pt;font-weight:800;flex-shrink:0}
.mlu-pts-pos{color:#22c55e}
.mlu-pts-neg{color:#ef4444}
.mlu-pts-zero{color:#475569}
.mlu-badge{font-size:9pt;font-weight:700;letter-spacing:0.3px;margin-top:-1px;display:block;line-height:1}
.mlu-badge-final{color:#4ade80}
.mlu-badge-live{color:#facc15}
.mlu-badge-sched{color:#64748b}
.mlu-badge-ppd{color:#f97316}
.mlu-badge-off{color:#64748b}
.mlu-card.mlu-right .mlu-badge{text-align:right}

/* Bottom corner badges (batting order, pitch count, out) */
.mlu-corner{
  position:absolute;
  bottom:0;
  padding:2px 6px;
  font-size:8pt;
  font-weight:900;
  letter-spacing:0.5px;
  line-height:1;
  border-radius:6px 0;
}
.mlu-card.mlu-left .mlu-corner{right:0;border-radius:6px 0 6px 0}
.mlu-card.mlu-right .mlu-corner{left:0;border-radius:0 6px 0 6px}
.mlu-c-ab{background:#22c55e44;color:#22c55e}
.mlu-c-od{background:#eab30844;color:#eab308}
.mlu-c-ih{background:#ef444444;color:#ef4444}
.mlu-c-away{background:#47556944;color:#64748b}
.mlu-c-due{background:#60a5fa33;color:#60a5fa}
.mlu-c-out{background:#ef444444;color:#ef4444}
.mlu-c-pc-low{background:#22c55e44;color:#22c55e}
.mlu-c-pc-med{background:#eab30844;color:#eab308}
.mlu-c-pc-high{background:#f9731644;color:#f97316}
.mlu-c-pc-crit{background:#ef444444;color:#ef4444}
.mlu-c-base{background:#f59e0b44;color:#f59e0b}
.mlu-c-dnp{background:#ef444444;color:#ef4444}
.mlu-c-off{background:#47556944;color:#64748b}
.mlu-c-ppd{background:#f9731644;color:#f97316}

/* Bench dropdown */
.mobile-bench-wrap{padding:4px 0}
.mobile-bench-header{padding:6px 10px;font-size:10pt;font-weight:700;display:flex;align-items:center;gap:6px;border-bottom:1px solid #1e293b}
.mobile-bench-row{display:flex;align-items:center;gap:4px;padding:5px 10px;font-size:10pt;border-bottom:1px solid #1e293b11}
.mobile-bench-name{flex:0 0 auto;font-weight:700;color:#e2e8f0;white-space:nowrap;display:flex;align-items:center;gap:3px}
.mobile-bench-pos{color:#64748b;font-size:9pt;font-weight:600}
.mobile-bench-mid{flex:1;min-width:0;display:flex;align-items:center;gap:4px;justify-content:flex-end}
.mobile-bench-mid .mlu-badge{font-size:8pt;margin:0}
.mobile-bench-stats{color:#94a3b8;font-size:8pt}
.mobile-bench-pts{font-weight:800;flex:0 0 auto;min-width:20px;text-align:right}

/* Gameday play-by-play panel */
.mlu-gameday-panel{
  margin:4px 0;
  border:1px solid #1e293b;
  border-radius:8px;
  overflow:hidden;
  background:#0b1020;
  padding:10px 12px;
}
.mlu-gd-loading{color:#64748b;text-align:center;padding:12px;font-size:10pt}
.mlu-gd-body{display:flex;gap:8px}
.mlu-gd-left{flex:1;min-width:0}
.mlu-gd-right{flex:0 0 70px;border-left:1px solid #1e293b;padding-left:6px;display:flex;flex-direction:column;justify-content:center}
.mlu-gd-lu-title{font-size:8pt;font-weight:800;color:#64748b;margin-bottom:3px;text-align:center}
.mlu-gd-lu{font-size:8pt;color:#94a3b8;padding:1px 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mlu-gd-lu-num{color:#64748b;font-weight:700;width:10px;display:inline-block}
.mlu-gd-lu-ab{color:#22c55e;font-weight:900}
.mlu-gd-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:6px}
.mlu-gd-team-score{font-size:14pt;font-weight:800;color:#e2e8f0;flex:1}
.mlu-gd-team-score:last-child{text-align:right}
.mlu-gd-state{display:flex;flex-direction:column;align-items:center;gap:2px;flex:0 0 auto}
.mlu-gd-state>div{font-size:9pt;color:#94a3b8;font-weight:700}
.mlu-gd-count-line{font-size:9pt;display:flex;gap:6px;justify-content:center;margin-top:2px}
.mlu-gd-balls{color:#22c55e;letter-spacing:1px}
.mlu-gd-strikes{color:#ef4444;letter-spacing:1px}
.mlu-gd-ab{font-size:10pt;color:#94a3b8;padding:6px 0;border-top:1px solid #1e293b;line-height:1.4}
.mlu-gd-ab b{color:#e2e8f0}
.mlu-gd-ab-label{color:#22c55e;font-weight:900;font-size:9pt}
.mlu-gd-count{color:#64748b;font-size:9pt}
.mlu-gd-vs{color:#475569;font-size:9pt}
.mlu-gd-pitch{color:#64748b;font-size:9pt;margin-top:2px}
.mlu-gd-speed{color:#94a3b8}
.mlu-gd-recent{border-top:1px solid #1e293b;padding-top:6px;margin-bottom:6px}
.mlu-gd-play{font-size:9pt;color:#94a3b8;padding:3px 0;border-bottom:1px solid #1e293b11;line-height:1.3}
.mlu-gd-play-inn{color:#64748b;font-weight:700;font-size:8pt;margin-right:4px}
.mlu-gd-links{display:flex;gap:0;border-top:1px solid #1e293b}
.mlu-gameday-link{
  flex:1;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:10px;
  color:#22d3ee;
  font-size:11pt;
  font-weight:700;
  text-decoration:none;
}
.mlu-gameday-link+.mlu-gameday-link{border-left:1px solid #1e293b}

.mlu-stats{display:flex;flex-wrap:wrap;gap:3px;margin-top:4px}
.mlu-card.mlu-right .mlu-stats{justify-content:flex-end}
.mlu-stat-pill{display:inline-flex;align-items:center;gap:3px;background:#1e293b;border:1px solid #334155;border-radius:4px;padding:2px 6px;font-size:9pt}
.mlu-sp-label{color:#f1f5f9;font-weight:800}
.mlu-sp-num{color:#94a3b8;font-weight:700}
.mlu-ab-line{background:#1e293b;border-color:#475569}

/* Desktop matchup navigator (vertical, 1 per row like mobile) */
.desktop-matchup-nav{
  display:flex;flex-direction:column;gap:4px;
  margin-top:14px;padding:0 18px;
}
.desktop-matchup-nav .mobile-matchup-pill{
  padding:8px 14px;
}

/* Desktop lineup enhancements */
.desktop-live .mlu-row{grid-template-columns:1fr 44px 1fr;gap:5px;margin-bottom:5px}
.desktop-live .mlu-pos{font-size:11pt}
.desktop-live .mlu-card{padding:6px 14px}
.desktop-live .mlu-card.mlu-compact{padding:4px 14px}
.desktop-live .mlu-name{font-size:11pt}
.desktop-live .mlu-pts{font-size:14pt}
.desktop-live .mlu-stat-pill{font-size:9.5pt;padding:2px 6px}
/* Desktop matchup header: bigger logos/scores, centered, no proj/rem */
.desktop-live-header .live-teams-row{align-items:center}
.desktop-live-header .live-team-col{align-items:center;text-align:center}
.desktop-live-header .live-team-col-right{align-items:center;text-align:center}
.desktop-live-header .live-team-name-row{justify-content:center}
.desktop-live-header .live-team-name-right{justify-content:center}
.desktop-live-header .live-team-name-row img{width:44px;height:44px}
.desktop-live-header .live-team-abbr{font-size:18pt}
.desktop-live-header .live-score{font-size:32pt}
.desktop-live-header .live-proj-rem{display:none}
.desktop-live .mlu-badge{font-size:9pt;margin-top:0}
/* Desktop: single-row card layout */
.desktop-live .mlu-card-row{display:flex;align-items:center;gap:8px;min-width:0}
.desktop-live .mlu-card.mlu-right .mlu-card-row{flex-direction:row-reverse}
.desktop-live .mlu-info{display:flex;flex-direction:column;min-width:0;flex:0 0 30%}
.desktop-live .mlu-info .mlu-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.desktop-live .mlu-info .mlu-badge{display:inline;line-height:1.2}
.desktop-live .mlu-stats-mid{flex:1;min-width:0;display:flex;flex-wrap:wrap;gap:3px;justify-content:flex-start;align-content:center}
.desktop-live .mlu-card.mlu-right .mlu-stats-mid{justify-content:flex-start}
.desktop-live .mlu-pts-group{display:flex;align-items:center;gap:6px;flex:0 0 110px}
.desktop-live .mlu-card.mlu-left .mlu-pts-group{justify-content:flex-end}
.desktop-live .mlu-card.mlu-right .mlu-pts-group{justify-content:flex-start}
.desktop-live .mlu-card.mlu-left .mlu-card-row .mlu-pts{flex:0 0 44px;text-align:right}
.desktop-live .mlu-card.mlu-right .mlu-card-row .mlu-pts{flex:0 0 44px;text-align:left}
/* Inline corner badges on desktop (not absolute-positioned) */
.desktop-live .mlu-corner-inline{position:static;display:inline-flex;align-items:center;justify-content:center;min-width:40px;border-radius:4px;font-size:8pt;padding:2px 6px;white-space:nowrap}
.desktop-live .mlu-card[data-gamepk]{cursor:pointer}
.desktop-live .mlu-card[data-gamepk]:hover{background:#172554;border-color:#3b82f6;transition:background 0.15s,border-color 0.15s}
.desktop-live .mlu-gameday-panel{padding:14px 18px}
.desktop-live .mlu-gd-right{flex:0 0 120px}
.desktop-live .mlu-gd-lu{font-size:10pt}
.desktop-live .mlu-gd-lu-num{width:14px}
.desktop-live .mlu-gd-lu-title{font-size:9pt}
.desktop-live .mlu-gd-team-score{font-size:16pt}
.desktop-live .mlu-gd-play{font-size:10pt}
.desktop-live .mlu-gd-ab{font-size:11pt}
.desktop-live .mobile-bench-wrap{display:grid;grid-template-columns:1fr 1fr;gap:14px}

/* ================================================================
   MOBILE BOTTOM NAV BAR (hidden on desktop)
   ================================================================ */
.mobile-score-row{display:none}
.mobile-bottom-nav{display:none}
.mobile-more-overlay{display:none}
@media (max-width: 900px){
  .mobile-bottom-nav{
    display:flex!important;
    position:fixed;
    bottom:0;left:0;right:0;
    z-index:99999;
    background:#0b1020;
    border-top:1px solid #1e293b;
    padding:4px 0;
    padding-bottom:max(4px, env(safe-area-inset-bottom));
    justify-content:space-around;
    align-items:stretch;
  }
  .mobile-nav-btn{
    flex:1;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:2px;
    padding:8px 2px 6px;
    background:none;
    border:none;
    color:var(--text-dim);
    font-family:inherit;
    font-size:8.5pt;
    font-weight:700;
    letter-spacing:0.3px;
    cursor:pointer;
    -webkit-tap-highlight-color:rgba(34,211,238,.15);
    touch-action:manipulation;
    transition:color .15s;
  }
  .mobile-nav-btn.active{color:#22d3ee}
  .mobile-nav-icon{width:22px;height:22px;display:block}
  .mobile-nav-label{line-height:1}

  /* Hide top tabs bar on mobile */
  .tabs{display:none!important}
  /* Add bottom padding so content isn't hidden behind bottom nav */
  .content{padding-bottom:72px!important}

  /* ---- Hamburger "More" overlay ---- */
  .mobile-more-overlay{
    position:fixed;inset:0;
    z-index:999999;
    background:rgba(0,0,0,.55);
    display:none;
    align-items:flex-end;
    justify-content:center;
    -webkit-tap-highlight-color:transparent;
  }
  .mobile-more-overlay.open{display:flex}
  .mobile-more-sheet{
    width:100%;
    max-width:400px;
    background:#0b1020;
    border-top:1px solid #1e293b;
    border-radius:18px 18px 0 0;
    overflow:hidden;
    padding-bottom:max(8px, env(safe-area-inset-bottom));
    animation:mobile-sheet-up .2s ease-out;
  }
  @keyframes mobile-sheet-up{from{transform:translateY(100%)}to{transform:translateY(0)}}
  .mobile-more-head{
    display:flex;align-items:center;justify-content:space-between;
    padding:14px 18px;
    border-bottom:1px solid #1e293b;
    font-weight:900;font-size:12pt;color:#e2e8f0;
  }
  .mobile-more-close{
    background:none;border:1px solid #334155;color:#e2e8f0;
    border-radius:10px;padding:4px 12px;font-size:16pt;font-weight:900;
    cursor:pointer;line-height:1;
  }
  .mobile-more-item{
    display:block;width:100%;
    padding:16px 18px;
    background:none;border:none;border-bottom:1px solid #1e293b11;
    color:#e2e8f0;font-family:inherit;font-size:12pt;font-weight:600;
    text-align:left;cursor:pointer;
    -webkit-tap-highlight-color:rgba(34,211,238,.15);
    touch-action:manipulation;
  }
  .mobile-more-item:active{background:#1e293b}
}

/* ================================================================
   MOBILE-ONLY IMPROVEMENTS (no desktop changes)
   ================================================================ */

/* ---- Tabs bar: better mobile scroll + touch targets ---- */
@media (max-width: 700px){
  .tabs{gap:0;scrollbar-width:none;-ms-overflow-style:none}
  .tabs::-webkit-scrollbar{display:none}
  .tabs button{padding:12px 14px;font-size:10pt;letter-spacing:0.5px}
  .tabs-right{gap:6px}
  .mode-pill{font-size:9pt;padding:3px 7px}
  .admin-login-btn{padding:6px 8px;font-size:9pt}
}

/* ---- Header: mobile my-team picker ---- */
.hdr-my-team{display:none}
@media (max-width: 900px){
  .hdr-year{display:none!important}
  .hdr-stats{display:none!important}
  .hdr{flex-direction:row!important;align-items:center!important;justify-content:space-between;padding:10px 14px!important;gap:0!important}
  .hdr h1{font-size:16px}
  .hdr h1{font-size:18px}
  .hdr-my-team{
    display:flex;
    align-items:center;
    gap:6px;
    background:none;
    border:none;
    padding:4px;
    color:var(--text-muted);
    font-family:inherit;
    font-size:10pt;
    font-weight:700;
    cursor:pointer;
    -webkit-tap-highlight-color:rgba(34,211,238,.15);
    touch-action:manipulation;
  }
  .hdr-my-team img{width:28px;height:28px;border-radius:50%;object-fit:contain}
  /* Hide LIVE tab MY TEAM selector on mobile (replaced by header picker) */
  .live-my-team-group{display:none!important}
  /* Game count badge in LIVE title (mobile only) */
  /* Mobile single-matchup view */
  .live-matchup{border:none!important;border-radius:0!important;background:transparent!important}
  .live-matchup-focus{box-shadow:none!important}
  .live-card-inner{padding:14px 4px!important}

  /* Mobile matchup navigator (vertical stacked) */
  .mobile-matchup-nav{
    display:flex;flex-direction:column;gap:4px;
    margin-top:12px;padding:0 4px;
  }

  /* Hide Proj/rem lines on mobile */
  .live-proj-rem{display:none!important}

  /* Mobile matchup header: Logo Score — Score Logo */
  .live-teams-row{display:none!important}
  .mobile-score-row{
    display:flex!important;
    align-items:center;
    justify-content:center;
    gap:0;
    padding:4px 0 10px;
  }
  .mobile-score-row img{width:60px;height:60px;object-fit:contain;flex-shrink:0}
  .mobile-score-row img:first-child{margin-right:auto}
  .mobile-score-row img:last-child{margin-left:auto}
  .msr-score{font-size:28pt;font-weight:800;color:var(--text-muted-strong);line-height:1}
  .msr-leading{color:#22d3ee}
  .msr-vs{color:#475569;font-size:14pt;font-weight:600;padding:0 4px}

  /* Clean up LIVE header on mobile */
  .live-title-note{display:none!important}
  .live-meta{display:none!important}
  .live-status-row{display:none!important}
  .live-header{display:flex!important;flex-direction:row!important;align-items:center!important;gap:10px!important;flex-wrap:nowrap!important;margin:0 -8px 10px!important;padding:0 14px!important}
  .live-header-main{position:static!important;flex:0 0 auto!important;padding:0!important;margin:0!important;background:none!important;border:none!important;backdrop-filter:none!important}
  .live-header-left{flex:0 0 auto}
  .live-title{font-size:15pt!important;white-space:nowrap}
  .live-header-controls{flex:1 1 0!important;min-width:0!important;display:flex!important;justify-content:flex-end!important;padding:0!important;width:auto!important}
  .live-header-controls .live-control-group{flex:0 1 auto!important;min-width:0}
  .live-header-controls .live-control-label{display:none!important}
  .live-header-controls .live-control-select{min-height:0!important;padding:4px 6px!important;font-size:11pt!important;-webkit-appearance:none;-moz-appearance:none;appearance:none}

}

/* ---- ALL CONTRACTS: responsive table ---- */
@media (max-width: 700px){
  #tab-allcontracts table{min-width:0!important}
  /* Hide MLB column (3rd col) */
  #tab-allcontracts table th:nth-child(3),
  #tab-allcontracts table td:nth-child(3){display:none}
  #tab-allcontracts table th,
  #tab-allcontracts table td{padding:7px 6px;font-size:10.5pt}
}

/* ---- Awards: fix 3-column grid that doesn't collapse ---- */
@media (max-width: 700px){
  #tab-awards [style*="repeat(3,1fr)"]{
    grid-template-columns:1fr!important;
  }
  #tab-awards [style*="minmax(320px"]{
    grid-template-columns:1fr!important;
  }
  #tab-awards [style*="minmax(240px"]{
    grid-template-columns:1fr!important;
  }
  #tab-awards [style*="minmax(220px"]{
    grid-template-columns:1fr!important;
  }
}

/* ---- Trade Log + Activity Log: fix min-width overflow ---- */
@media (max-width: 700px){
  .trade-row [style*="min-width:220px"],
  .trade-row [style*="min-width:260px"]{
    min-width:0!important;
  }
  /* Search inputs in trade/activity log filters */
  #tab-myteam input[style*="min-width:220px"],
  #tab-myteam input[style*="min-width:180px"]{
    min-width:0!important;
    flex:1 1 100%!important;
  }
  /* Trade row: stack date + text vertically */
  .trade-row > div[style*="display:flex"]{
    flex-direction:column!important;
    gap:6px!important;
  }
  .trade-row > div > div[style*="min-width:220px"]{
    min-width:0!important;
  }
  .trade-row > div > div[style*="min-width:260px"]{
    min-width:0!important;
    flex:1 1 auto!important;
  }
}

/* ---- Daily Data: tighten stat tables ---- */
@media (max-width: 700px){
  #tab-dashboard table th,
  #tab-dashboard table td{font-size:9pt;padding:3px 3px}
  #tab-dashboard .card{overflow-x:auto}
  /* Matchup cards grid */
  #tab-dashboard [style*="minmax(260px"]{
    grid-template-columns:1fr 1fr!important;
  }
}
@media (max-width: 480px){
  #tab-dashboard [style*="minmax(260px"]{
    grid-template-columns:1fr!important;
  }
}

/* ---- PESCROTA tab: table readability ---- */
@media (max-width: 700px){
  #tab-pescrota table th,
  #tab-pescrota table td{padding:6px 5px;font-size:10pt}
  #tab-pescrota .card{overflow-x:auto}
}

/* ---- Rain risk icon ---- */
.rain-icon { opacity: 0.85; font-size: 0.75em; margin-left: 2px; cursor: help; }
.rain-icon.likely { opacity: 1; }

/* ---- General mobile polish ---- */
@media (max-width: 700px){
  /* Better touch targets for buttons */
  .btn{min-height:42px}
  /* Cards: prevent horizontal overflow of the page */
  .content{overflow-x:hidden}
  /* Select dropdowns: full width when stacked */
  .content select{max-width:100%}
}
