/* score — Apple-clean base, team colors carry the energy */
:root {
  --bg: #000; --surface: #1c1c1e; --surface2: #2c2c2e; --surface3: #3a3a3c;
  --text: #f5f5f7; --sub: #8e8e93; --faint: #48484a; --line: rgba(255,255,255,.09);
  --live: #ff453a; --accent: #0a84ff; --win: #30d158; --warn: #ffd60a;
  --blur: rgba(18,18,20,.72);
  --sans: -apple-system, BlinkMacSystemFont, "Pretendard Variable", Pretendard, "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
  --num: "Barlow Condensed", -apple-system, "SF Pro Display", system-ui, sans-serif;
  --r: 18px; --r-sm: 12px;
  --gut: clamp(12px, 3.2vw, 28px);
  --rail: 0px; --tab: 0px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f2f2f7; --surface: #fff; --surface2: #e9e9ee; --surface3: #d8d8de;
    --text: #1d1d1f; --sub: #6e6e73; --faint: #c7c7cc; --line: rgba(0,0,0,.08);
    --live: #ff3b30; --accent: #007aff; --win: #248a3d; --blur: rgba(246,246,250,.78);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f2f2f7; --surface: #fff; --surface2: #e9e9ee; --surface3: #d8d8de;
  --text: #1d1d1f; --sub: #6e6e73; --faint: #c7c7cc; --line: rgba(0,0,0,.08);
  --live: #ff3b30; --accent: #007aff; --win: #248a3d; --blur: rgba(246,246,250,.78);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans);
  font-size: 15px; line-height: 1.45; letter-spacing: -0.01em; -webkit-font-smoothing: antialiased;
  min-height: 100dvh; overflow-x: hidden; touch-action: manipulation;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.num { font-family: var(--num); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.sub { color: var(--sub); }
.hide { display: none !important; }

/* ---------- shell ---------- */
.shell { min-height: 100dvh; padding-left: var(--rail); padding-bottom: calc(var(--tab) + env(safe-area-inset-bottom)); }
.tabbar {
  position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-around;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); background: var(--blur);
  backdrop-filter: saturate(180%) blur(22px); -webkit-backdrop-filter: saturate(180%) blur(22px);
  border-top: 0.5px solid var(--line);
}
.tabbar a { flex: 1; display: grid; justify-items: center; gap: 2px; padding: 4px 0; font-size: 10.5px; font-weight: 600; color: var(--sub); }
.tabbar a svg { width: 25px; height: 25px; }
.tabbar a[aria-current="page"] { color: var(--text); }
.tabbar a.brand { display: none; }
:root { --tab: 62px; }

@media (min-width: 760px), (orientation: landscape) and (max-height: 520px) {
  :root { --rail: 76px; --tab: 0px; }
  .tabbar {
    top: 0; bottom: 0; right: auto; width: var(--rail); flex-direction: column; justify-content: flex-start; gap: 6px;
    padding: calc(14px + env(safe-area-inset-top)) 8px 16px calc(8px + env(safe-area-inset-left)); border-top: 0; border-right: 0.5px solid var(--line);
  }
  .tabbar a { flex: 0; padding: 10px 0; border-radius: 14px; }
  .tabbar a[aria-current="page"] { background: var(--surface); }
  .tabbar a.brand { display: grid; place-items: center; height: 44px; margin-bottom: 10px; padding: 0; }
  .tabbar a.brand[aria-current] { background: none; }
  .shell { padding-left: calc(var(--rail) + env(safe-area-inset-left)); }
}
@media (min-width: 1180px) {
  :root { --rail: 216px; }
  .tabbar { padding-inline: 14px; }
  .tabbar a { grid-auto-flow: column; justify-content: start; gap: 12px; padding: 10px 14px; font-size: 15px; }
  .tabbar a svg { width: 22px; height: 22px; }
  .tabbar a.brand { justify-content: start; padding-left: 12px; }
}
.tabbar a.brand svg { height: 26px; width: auto; }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 30; background: var(--blur);
  backdrop-filter: saturate(180%) blur(22px); -webkit-backdrop-filter: saturate(180%) blur(22px);
  padding-top: env(safe-area-inset-top); border-bottom: 0.5px solid transparent; transition: border-color .2s;
}
.top.scrolled { border-bottom-color: var(--line); }
.top-row { display: flex; align-items: center; gap: 12px; padding: 10px var(--gut) 6px; }
.top h1 { font-size: clamp(28px, 7vw, 36px); line-height: 1.1; margin: 0; font-weight: 900; letter-spacing: -0.04em; flex: 1; }
.top .right { display: flex; gap: 8px; align-items: center; }
.iconbtn { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--text); }
.iconbtn svg { width: 19px; height: 19px; }

.strip { display: flex; gap: 6px; overflow-x: auto; padding: 6px var(--gut) 10px; scrollbar-width: none; scroll-snap-type: x proximity; }
.strip::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 32px; padding: 0 14px; border-radius: 16px; display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface); color: var(--text); font-size: 14px; font-weight: 600; white-space: nowrap; scroll-snap-align: start;
}
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--live); }
.days { gap: 2px; }
.day { flex: none; width: 50px; padding: 6px 0 7px; border-radius: 14px; display: grid; justify-items: center; gap: 1px; scroll-snap-align: center; }
.day b { font-family: var(--num); font-style: italic; font-size: 22px; font-weight: 800; line-height: 1.05; }
.day span { font-size: 11px; color: var(--sub); font-weight: 600; }
.day[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.day[aria-pressed="true"] span { color: inherit; opacity: .7; }
.day.has::after { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--sub); margin-top: 2px; }
.day.haslive::after { background: var(--live); }

main.view { padding: 6px var(--gut) 28px; max-width: 1480px; }

/* ---------- league blocks ---------- */
.lg { margin: 18px 0 8px; }
.lg-head { display: flex; align-items: baseline; gap: 8px; margin: 0 4px 10px; }
.lg-head h2 { margin: 0; font-size: 21px; font-weight: 900; letter-spacing: -0.03em; }
.lg-head h2::before { content: ""; display: inline-block; width: 4px; height: 17px; border-radius: 2px; background: var(--live); margin-right: 8px; vertical-align: -1px; transform: skewX(-12deg); }
.lg-head .more { margin-left: auto; font-size: 14px; color: var(--accent); font-weight: 600; }
.grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); }
.gc { container-type: inline-size; }
@container (max-width: 350px) {
  .gc .side { gap: 7px; }
  .gc .badge { width: 36px; height: 36px; }
  .gc .score { font-size: 38px; padding-left: 2px; }
  .gc .side.r .score { padding-right: 2px; }
  .gc .mid { min-width: 54px; }
}
@container (max-width: 290px) { .side .tn { display: none; } }

/* ---------- game card ---------- */
.gc {
  --ca: #555; --ch: #555;
  position: relative; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px;
  min-height: 96px; padding: 14px 16px; border-radius: var(--r); overflow: hidden; isolation: isolate;
  background: var(--surface);
}
.gc::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(100deg, var(--ca) 0 6px, color-mix(in srgb, var(--ca) 70%, transparent) 6px, transparent 44%),
    linear-gradient(-80deg, var(--ch) 0 6px, color-mix(in srgb, var(--ch) 70%, transparent) 6px, transparent 44%);
  opacity: .62;
}
.gc.fin::before { opacity: .34; }
.gc.pre::before { opacity: .42; }
.gc:active { transform: scale(.985); }
.gc.fav { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--text) 30%, transparent); }
.gc.sel { box-shadow: inset 0 0 0 2px var(--accent) !important; }
.side { display: flex; align-items: center; gap: 10px; min-width: 0; }
.side.r { flex-direction: row-reverse; text-align: right; }
.side .tn { min-width: 0; }
.side .tn b { display: block; font-size: 16px; font-weight: 800; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side .tn small { display: block; font-size: 12px; color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.score { font-family: var(--num); font-weight: 800; font-style: italic; font-size: clamp(38px, 10vw, 48px); line-height: 1; font-variant-numeric: tabular-nums; margin-left: auto; padding: 0 2px 0 4px; }
.side.r .score { margin-left: 0; margin-right: auto; padding: 0 4px 0 2px; }
.score.lose { opacity: .4; }
.score.flash { animation: flash 1.4s ease-out; }
@keyframes flash { 0% { color: var(--warn); transform: scale(1.18); } 100% { color: inherit; transform: none; } }
.mid { display: grid; justify-items: center; gap: 5px; min-width: 62px; text-align: center; }
.mid .st { font-size: 13px; font-weight: 800; white-space: nowrap; }
.mid .st.live { color: var(--live); }
.mid .time { font-family: var(--num); font-style: italic; font-size: 26px; font-weight: 800; line-height: 1; }
.mid .tv { font-size: 11px; color: var(--sub); max-width: 92px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.livepill { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 900; font-style: italic; color: #fff; background: var(--live); padding: 2px 8px 2px 6px; border-radius: 5px; letter-spacing: .03em; }
.livepill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.tag { font-size: 11px; font-weight: 800; color: var(--sub); }
.endpill { font-size: 12px; font-weight: 800; color: var(--sub); padding: 2px 8px; border-radius: 5px; background: color-mix(in srgb, var(--text) 8%, transparent); }

/* team crest: emblem in a white puck, or a team-color monogram */
.badge {
  flex: none; position: relative; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: var(--c1); color: var(--ink); font-weight: 800; font-size: 13px; letter-spacing: -0.03em;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14), inset 0 -10px 16px -10px var(--c2); line-height: 1; text-align: center; padding: 2px;
  overflow: hidden; word-break: keep-all;
}
.badge.haslogo { background: #fff; border-radius: 50%; box-shadow: 0 1px 0 rgba(255,255,255,.08), 0 4px 14px rgba(0,0,0,.28); padding: 0; }
.badge img { width: 78%; height: 78%; object-fit: contain; display: block; }
.badge.haslogo b { display: none; }
.badge.lat b { font-family: var(--num); font-size: 17px; font-weight: 800; font-style: italic; letter-spacing: .01em; }
.badge.sm { width: 28px; height: 28px; border-radius: 8px; font-size: 10px; }
.badge.sm.haslogo { border-radius: 50%; }
.badge.sm.lat b { font-size: 12.5px; }
.badge.lg { width: 76px; height: 76px; border-radius: 22px; font-size: 20px; }
.badge.lg.haslogo { border-radius: 50%; box-shadow: 0 8px 30px rgba(0,0,0,.35); }
.badge.lg.lat b { font-size: 30px; }
.badge.l5 b { font-size: 10.5px; }
.badge.lg.l5 b { font-size: 15px; }

/* mini diamond */
.dia { display: flex; align-items: center; gap: 6px; }
.dia svg { width: 30px; height: 22px; }
.dia .outs { display: flex; gap: 3px; }
.dia .outs i { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.dia .outs i.on { background: var(--text); }

.empty { padding: 56px 16px; text-align: center; color: var(--sub); }
.empty b { display: block; color: var(--text); font-size: 17px; margin-bottom: 6px; }
.skel { height: 92px; border-radius: var(--r); background: linear-gradient(90deg, var(--surface) 0%, var(--surface2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: sk 1.2s infinite; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- split view (wide) ---------- */
.split { display: block; }
@media (min-width: 1180px) {
  .split.open { display: grid; grid-template-columns: minmax(380px, 0.85fr) minmax(480px, 1.15fr); gap: 24px; align-items: start; }
  .split.open .list .grid { grid-template-columns: 1fr; }
  .split.open .pane { position: sticky; top: calc(env(safe-area-inset-top) + 12px); max-height: calc(100dvh - 24px); overflow: auto; border-radius: 24px; background: var(--surface); scrollbar-width: thin; }
  .split.open .pane .gv-body { padding-inline: 18px; }
  .split.open .gv-hero { border-radius: 24px 24px 0 0; }
}

/* ---------- game view ---------- */
.gv { padding-bottom: 32px; }
.gv-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px; padding: calc(8px + env(safe-area-inset-top)) var(--gut) 8px; }
.gv-top .iconbtn { background: rgba(0,0,0,.35); color: #fff; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.gv-top .ttl { flex: 1; text-align: center; font-weight: 700; font-size: 15px; color: #fff; opacity: 0; transition: opacity .2s; text-shadow: 0 1px 8px rgba(0,0,0,.4); }
.gv-top.solid { background: var(--blur); backdrop-filter: saturate(180%) blur(22px); -webkit-backdrop-filter: saturate(180%) blur(22px); }
.gv-top.solid .ttl { opacity: 1; color: var(--text); text-shadow: none; }
.gv-top.solid .iconbtn { background: var(--surface); color: var(--text); }
.gv-hero {
  --ca: #444; --ch: #444; position: relative; overflow: hidden; color: #fff; margin-top: calc(-52px - env(safe-area-inset-top));
  padding: calc(64px + env(safe-area-inset-top)) var(--gut) 22px; isolation: isolate;
  background: linear-gradient(105deg, var(--ca) 0 49.6%, var(--ch) 50.4% 100%);
}
.gv-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0,0,0,.18), rgba(0,0,0,.55)); }
.gv-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(120% 90% at 50% 0%, rgba(255,255,255,.14), transparent 60%); }
.hero-meta { text-align: center; font-size: 13px; font-weight: 600; opacity: .85; margin-bottom: 14px; }
.hero-main { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; max-width: 760px; margin: 0 auto; }
.hero-team { display: grid; justify-items: center; gap: 8px; text-align: center; min-width: 0; }
.hero-team b { font-size: clamp(15px, 3.8vw, 19px); font-weight: 800; max-width: 100%; text-wrap: balance; word-break: keep-all; line-height: 1.25; }
.hero-team small { font-size: 12px; opacity: .8; }
.hero-score { display: flex; align-items: center; gap: clamp(10px, 3vw, 22px); }
.hero-score .s { font-family: var(--num); font-weight: 800; font-style: italic; font-size: clamp(68px, 18vw, 116px); line-height: .9; font-variant-numeric: tabular-nums; text-shadow: 0 2px 18px rgba(0,0,0,.3); }
.hero-score .s.lose { opacity: .55; }
.hero-score .dash { font-family: var(--num); font-size: 34px; opacity: .55; }
.hero-status { text-align: center; margin-top: 10px; font-weight: 800; font-size: 15px; display: flex; justify-content: center; gap: 8px; align-items: center; flex-wrap: wrap; }
.hero-sub { text-align: center; margin-top: 6px; font-size: 12.5px; opacity: .85; }
.hero-goals { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 560px; margin: 12px auto 0; font-size: 12.5px; opacity: .92; }
.hero-goals div:first-child { text-align: right; }
.hero-line { margin: 16px auto 0; max-width: 760px; overflow-x: auto; }

.seg { display: flex; gap: 2px; padding: 2px; background: var(--surface2); border-radius: 10px; margin: 16px auto 8px; max-width: 560px; position: sticky; top: calc(56px + env(safe-area-inset-top)); z-index: 15; }
.seg button { flex: 1; height: 32px; border-radius: 8px; font-size: 13.5px; font-weight: 600; color: var(--sub); }
.seg button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.18); }
.gv-body { padding: 0 var(--gut); max-width: 980px; margin: 0 auto; }
.card { background: var(--surface); border-radius: var(--r); padding: 16px; margin: 12px 0; }
.pane .card { background: var(--surface2); }
.card h3 { margin: 0 0 12px; font-size: 17px; font-weight: 800; letter-spacing: -0.02em; display: flex; align-items: center; gap: 8px; }
.card h3 small { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--sub); }
.two { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.two > .card { margin: 0; }
.stack > * + * { margin-top: 12px; }

/* line score table */
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
.tbl { overflow-x: auto; margin: 0 -4px; -webkit-overflow-scrolling: touch; }
.tbl table { min-width: 100%; }
th, td { padding: 7px 6px; text-align: center; white-space: nowrap; font-size: 13.5px; }
th { color: var(--sub); font-weight: 600; font-size: 12px; }
td.l, th.l { text-align: left; }
tbody tr + tr td { border-top: 0.5px solid var(--line); }
td.b { font-weight: 800; }
.linescore { color: #fff; }
.linescore th { color: rgba(255,255,255,.7); }
.linescore td, .linescore th { padding: 4px 5px; font-family: var(--num); font-size: 16px; }
.linescore td.l, .linescore th.l { font-family: var(--sans); font-size: 13px; font-weight: 700; }
.linescore tbody tr + tr td { border-top-color: rgba(255,255,255,.15); }
.linescore .sep { border-left: 1px solid rgba(255,255,255,.25); }

/* baseball live panel */
.bb-live { display: grid; grid-template-columns: auto 1fr; gap: 16px 18px; align-items: center; }
.bb-field svg { width: 116px; height: 100px; display: block; }
.bso { display: grid; grid-template-columns: auto auto; gap: 4px 10px; align-items: center; font-family: var(--num); font-weight: 700; font-size: 16px; margin-top: 6px; }
.bso span { display: flex; gap: 4px; }
.bso i { width: 11px; height: 11px; border-radius: 50%; background: var(--faint); display: inline-block; }
.bso .b i.on { background: var(--win); } .bso .s i.on { background: var(--warn); } .bso .o i.on { background: var(--live); }
.matchup { display: grid; gap: 10px; min-width: 0; }
.matchup .who { display: grid; grid-template-columns: 30px 1fr; column-gap: 6px; align-items: baseline; min-width: 0; }
.matchup .who em { font-style: normal; font-size: 12px; color: var(--sub); }
.matchup .who b { font-size: 18px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.matchup .who small { grid-column: 2; color: var(--sub); font-size: 12.5px; }
.zone { display: grid; grid-template-columns: 150px 1fr; gap: 14px; align-items: start; margin-top: 14px; }
.zone svg { width: 150px; height: 170px; background: var(--surface2); border-radius: 14px; }
.pane .zone svg { background: var(--surface3); }
.pitches { display: grid; gap: 6px; font-size: 13.5px; align-content: start; }
.pitches div { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: center; }
.pitches .pn { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: #000; }
.pitches .spd { font-family: var(--num); font-weight: 700; font-size: 15px; }

.pbp { display: grid; gap: 2px; }
.inn-h { font-family: var(--sans); font-size: 13px; font-weight: 800; color: var(--sub); margin: 14px 2px 6px; display: flex; align-items: center; gap: 8px; }
.inn-h::after { content: ""; flex: 1; height: 0.5px; background: var(--line); }
.pa { display: grid; grid-template-columns: 4px 1fr auto; gap: 10px; padding: 10px 4px; border-radius: 12px; align-items: start; }
.pa .bar { width: 4px; align-self: stretch; border-radius: 2px; background: var(--tc, var(--faint)); }
.pa b { font-size: 14.5px; }
.pa p { margin: 2px 0 0; font-size: 13.5px; color: var(--sub); }
.pa p.res { color: var(--text); }
.pa.scored { background: color-mix(in srgb, var(--tc) 14%, transparent); }
.pa > div, .ev > div { min-width: 0; overflow-wrap: anywhere; }
.pa .sc { font-family: var(--num); font-weight: 700; font-size: 16px; white-space: nowrap; }
.wpa { font-size: 11.5px; font-weight: 800; padding: 2px 6px; border-radius: 6px; background: var(--surface2); white-space: nowrap; }
.ev { display: grid; grid-template-columns: 52px 1fr; gap: 10px; padding: 9px 4px; align-items: start; border-radius: 12px; }
.ev .t { font-family: var(--num); font-weight: 700; color: var(--sub); font-size: 15px; text-align: right; }
.ev.big { background: color-mix(in srgb, var(--tc) 30%, transparent); box-shadow: inset 3px 0 0 var(--tc); }
.ev.h.big { box-shadow: inset -3px 0 0 var(--tc); }
.ev.vb { box-shadow: inset 3px 0 0 var(--tc); padding-left: 10px; }
.ev.vb.h { box-shadow: inset -3px 0 0 var(--tc); padding-right: 10px; }
.ev.big b { font-size: 15px; }
.ev .ico { display: inline-block; width: 10px; height: 13px; border-radius: 2px; vertical-align: -1px; margin-right: 6px; }
.ev .ico.y { background: #ffd60a; } .ev .ico.r { background: #ff453a; }
.ev.h { grid-template-columns: 1fr 52px; text-align: right; }
.ev.h .t { order: 2; text-align: left; }

/* stat compare bars */
.cmp { display: grid; gap: 14px; }
.cmp .row { display: grid; gap: 6px; }
.cmp .lbl { display: grid; grid-template-columns: 1fr auto 1fr; font-size: 14px; }
.cmp .lbl span:first-child { font-family: var(--num); font-weight: 700; font-size: 17px; }
.cmp .lbl span:last-child { font-family: var(--num); font-weight: 700; font-size: 17px; text-align: right; }
.cmp .lbl em { font-style: normal; color: var(--sub); font-size: 13px; }
.cmp .bars { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.cmp .bars i { height: 6px; border-radius: 3px; background: var(--surface2); position: relative; overflow: hidden; display: block; }
.cmp .bars i::after { content: ""; position: absolute; top: 0; bottom: 0; width: var(--w); background: var(--c); border-radius: 3px; }
.cmp .bars i:first-child::after { right: 0; }
.cmp .bars i:last-child::after { left: 0; }

.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { fill: var(--sub); font-size: 11px; font-family: var(--sans); }

/* soccer pitch */
.pitch { position: relative; aspect-ratio: 68 / 105; max-height: 680px; margin: 0 auto; border-radius: 16px; overflow: hidden; background: linear-gradient(#1f6b3b, #1a5e33); }
.pitch .lines { position: absolute; inset: 0; }
.pitch .half { position: absolute; left: 0; right: 0; display: flex; flex-direction: column; justify-content: space-around; padding: 3% 2%; }
.pitch .half.a { top: 0; height: 50%; }
.pitch .half.h { bottom: 0; height: 50%; flex-direction: column-reverse; }
.pitch .rowp { display: flex; justify-content: space-evenly; }
.pl { display: grid; justify-items: center; gap: 2px; width: 60px; color: #fff; font-size: 11px; font-weight: 700; text-align: center; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.pl i { font-style: normal; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-family: var(--num); font-size: 15px; background: var(--c); color: var(--ink); box-shadow: 0 2px 6px rgba(0,0,0,.35), inset 0 0 0 1.5px rgba(255,255,255,.6); }
.pl span { max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl small { font-size: 10px; }

/* ---------- standings ---------- */
.st-table td, .st-table th { padding: 9px 6px; }
.st-table .team { display: flex; align-items: center; gap: 10px; text-align: left; font-weight: 700; }
.st-table tr.inzone td:first-child { box-shadow: inset 3px 0 0 var(--zc); }
.st-table tr.fav td { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.st-table td.rk { font-family: var(--num); font-weight: 700; font-size: 16px; width: 34px; }
.st-table td.n { font-family: var(--num); font-size: 16px; font-weight: 600; }
.st-table td.n.b { font-weight: 800; }
.form { display: inline-flex; gap: 2px; }
.form i { width: 7px; height: 7px; border-radius: 2px; background: var(--faint); }
.form i.W { background: var(--win); } .form i.L { background: var(--live); } .form i.D { background: var(--sub); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-size: 12.5px; color: var(--sub); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--zc); }
.subhead { font-size: 14px; font-weight: 800; color: var(--sub); margin: 18px 4px 8px; }

/* ---------- scenario ---------- */
.sc-sum { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 2px 12px; font-size: 13.5px; color: var(--sub); }
.sc-sum b { color: var(--text); }
.sc-sum .btn { margin-left: auto; }
.btn { white-space: nowrap; flex: none; height: 34px; padding: 0 14px; border-radius: 17px; background: var(--surface); font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.btn.primary { background: var(--accent); color: #fff; }
.odds td { padding: 8px 5px; }
.odds .team { display: flex; align-items: center; gap: 8px; font-weight: 700; text-align: left; }
.pct { position: relative; min-width: 66px; height: 26px; border-radius: 7px; background: var(--surface2); overflow: hidden; }
.pane .pct, .card .pct { background: var(--surface2); }
.pct i { position: absolute; left: 0; top: 0; bottom: 0; width: var(--w); background: var(--c, var(--accent)); opacity: .9; }
.pct span { position: relative; display: grid; place-items: center; height: 100%; font-family: var(--num); font-weight: 700; font-size: 15px; }
.pct.zero span { color: var(--sub); font-weight: 600; }
.pct.full span { color: #fff; }
.mg { font-size: 12px; font-weight: 700; white-space: nowrap; }
.mg.ok { color: var(--win); } .mg.out { color: var(--sub); } .mg.help { color: var(--warn); }
.heat { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(18px, 1fr); gap: 2px; }
.heat i { height: 26px; border-radius: 5px; display: grid; place-items: center; font-size: 10px; font-style: normal; font-weight: 700; font-family: var(--num); color: var(--sub); background: color-mix(in srgb, var(--c) calc(var(--p) * 100%), var(--surface2)); }
.heat i.hi { color: #fff; }
.heat-head i { background: none; height: 16px; }
.picks { display: grid; gap: 8px; }
.pick { display: grid; grid-template-columns: 1fr; gap: 8px; background: var(--surface); border-radius: var(--r-sm); padding: 10px 12px; }
.pick .meta { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--sub); }
.pick .opts { display: grid; grid-template-columns: 1fr auto 1fr; gap: 6px; }
.pick.soccer .opts { grid-template-columns: 1fr 64px 1fr; }
.opt { height: 44px; border-radius: 11px; background: var(--surface2); display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: 14px; padding: 0 8px; min-width: 0; }
.opt span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.opt.mid { width: 64px; color: var(--sub); font-size: 13px; }
.opt[aria-pressed="true"] { background: var(--c, var(--text)); color: var(--ink, var(--bg)); }
.opt.mid[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.opt.locked { opacity: .55; }
.note { font-size: 12.5px; color: var(--sub); margin: 10px 2px; line-height: 1.55; }

/* ---------- teams ---------- */
.teams { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; }
.tpick { display: grid; justify-items: center; gap: 6px; padding: 12px 4px; border-radius: 16px; background: var(--surface); font-size: 12.5px; font-weight: 600; text-align: center; position: relative; }
.tpick[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--text); }
.tpick[aria-pressed="true"]::after { content: "★"; position: absolute; top: 6px; right: 9px; font-size: 12px; color: var(--warn); }
.favrow { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.favrow + .favrow { border-top: 0.5px solid var(--line); }
.favrow .grow { flex: 1; min-width: 0; }
.favrow b { display: block; }
.switch { width: 51px; height: 31px; border-radius: 16px; background: var(--surface3); position: relative; flex: none; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.25); transition: transform .2s; }
.switch[aria-checked="true"] { background: var(--win); }
.switch[aria-checked="true"]::after { transform: translateX(20px); }

/* toast */
.toast {
  position: fixed; z-index: 60; left: 50%; top: calc(10px + env(safe-area-inset-top)); transform: translate(-50%, -140%);
  display: flex; align-items: center; gap: 10px; padding: 10px 16px 10px 10px; border-radius: 20px; max-width: min(92vw, 420px);
  background: var(--blur); backdrop-filter: saturate(180%) blur(24px); -webkit-backdrop-filter: saturate(180%) blur(24px);
  box-shadow: 0 10px 40px rgba(0,0,0,.35); transition: transform .45s cubic-bezier(.2,.9,.25,1.2); font-size: 14px;
}
.toast.on { transform: translate(-50%, 0); }
.toast b { display: block; font-size: 15px; }

.conn { position: fixed; z-index: 55; right: 12px; bottom: calc(var(--tab) + 12px + env(safe-area-inset-bottom)); font-size: 12px; padding: 6px 10px; border-radius: 12px; background: var(--surface); color: var(--sub); display: none; }
.conn.on { display: block; }

@media (max-width: 380px) {
  .gc { padding: 12px 10px; gap: 4px; }
  .side { gap: 7px; }
  .badge { width: 32px; height: 32px; border-radius: 9px; font-size: 11.5px; }
  .badge.lat { font-size: 14px; }
  .side .tn b { font-size: 14px; }
  .mid { min-width: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- condition finder ---------- */
.finder { margin-top: 6px; }
.finder .q { font-size: 13px; font-weight: 800; color: var(--sub); margin: 14px 4px 2px; }
.finder .strip { padding-left: 0; padding-right: 0; margin: 0 calc(-1 * var(--gut)); padding-inline: var(--gut); }
.tbtn { flex: none; width: 74px; display: grid; justify-items: center; gap: 4px; padding: 10px 2px 8px; border-radius: 16px; background: var(--surface); scroll-snap-align: start; }
.tbtn span { font-size: 12.5px; font-weight: 800; max-width: 68px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbtn small { font-size: 11px; color: var(--sub); font-family: var(--num); font-weight: 700; font-style: italic; margin-top: -3px; }
.tbtn[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.tbtn[aria-pressed="true"] small { color: inherit; opacity: .6; }
.goalstrip .chip { height: auto; min-height: 36px; padding: 6px 14px; flex-direction: column; gap: 0; line-height: 1.15; }
.goalstrip .chip small { font-size: 10.5px; font-weight: 600; opacity: .7; }
.stepper { display: inline-flex; gap: 2px; flex: none; }
.stepper .chip { min-width: 36px; justify-content: center; padding: 6px 10px; }
.answer { margin-top: 12px; padding: 18px; position: relative; overflow: hidden; }
.ans-head { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; position: relative; }
.ans-head::before { content: ""; position: absolute; inset: -18px -18px auto -18px; height: 110px; background: linear-gradient(110deg, var(--tc) 0%, transparent 70%); opacity: .35; z-index: -1; }
.answer { isolation: isolate; }
.ans-head .badge.lg { width: 60px; height: 60px; }
.ans-q { font-size: 13.5px; font-weight: 800; color: var(--sub); }
.ans-big { font-size: 22px; font-weight: 900; letter-spacing: -0.03em; line-height: 1.25; }
.ans-big b { font-family: var(--num); font-style: italic; font-size: 34px; font-weight: 800; letter-spacing: 0; }
.ans-pill { font-family: var(--num); font-style: italic; font-weight: 800; font-size: 22px; padding: 6px 12px; border-radius: 12px; background: var(--surface2); white-space: nowrap; }
.ans-pill.ok { background: var(--win); color: #fff; font-family: var(--sans); font-style: normal; font-size: 16px; }
.ans-pill.out { background: var(--surface3); color: var(--sub); font-family: var(--sans); font-style: normal; font-size: 16px; }
.ans-sub { font-size: 13px; font-weight: 800; color: var(--sub); margin: 18px 0 8px; }
.cond { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--surface2); margin-top: 8px; }
.cond .rec { font-weight: 900; font-size: 16px; letter-spacing: -0.02em; }
.cond .out { font-weight: 800; font-size: 14px; }
.cond.yes { box-shadow: inset 4px 0 0 var(--win); }
.cond.yes .out { color: var(--win); }
.cond.no .out { color: var(--sub); }
.cond.no { opacity: .8; box-shadow: inset 4px 0 0 var(--faint); }
.cond.dep { box-shadow: inset 4px 0 0 var(--warn); }
.cond.dep .out { color: var(--warn); }
.cond ul { grid-column: 1 / -1; margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.cond li { font-size: 14px; padding-left: 16px; position: relative; }
.cond li::before { content: ""; position: absolute; left: 2px; top: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.cond li.yes::before { background: var(--win); }
.cond li.tie::before { background: var(--warn); }
.cond li b { font-weight: 800; }
.mclist { display: grid; gap: 6px; }
.mcrow { display: grid; grid-template-columns: minmax(96px, auto) 1fr; gap: 10px; align-items: center; }
.mcrow .rec { font-weight: 800; font-size: 14.5px; white-space: nowrap; }
.mcrow .rec small { display: block; font-size: 11px; color: var(--sub); font-weight: 600; }
.pick.mine { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--text) 35%, transparent); }
.pick-head { display: flex; align-items: center; gap: 8px; margin: 18px 4px 0; justify-content: space-between; }
.odds tr.focus td { background: color-mix(in srgb, var(--text) 7%, transparent); }
.odds tr { cursor: pointer; }
.pane .tbtn, .pane .chip { background: var(--surface2); }
.nudge { display: flex; align-items: center; gap: 12px; margin: 14px 0 0; padding: 14px 16px; border-radius: var(--r); background: linear-gradient(100deg, color-mix(in srgb, var(--warn) 22%, var(--surface)), var(--surface) 70%); font-size: 13.5px; color: var(--sub); }
.nudge b { display: block; color: var(--text); font-size: 15.5px; }
.nudge > span:first-child { font-size: 22px; }
.nudge div { flex: 1; }
