/* TRUE LINE — Glass skin (cool dark glass, Codexr Glass match)
   Near-black blue-grey base, faceted CSS texture, translucent frosted panels,
   dense product type scale. Gold survives only as the brand accent. */
:root {
  --bg: #06090d;
  --panel-bg: linear-gradient(155deg, rgba(160, 195, 255, 0.07), rgba(255, 255, 255, 0.025) 45%, rgba(8, 12, 18, 0.28));
  --glass2: rgba(255, 255, 255, 0.04);
  --stroke: rgba(255, 255, 255, 0.08);
  --stroke-soft: rgba(255, 255, 255, 0.06);
  --hi: rgba(255, 255, 255, 0.07);
  --gold: #e8b34b;
  --gold2: #f5c86b;
  --amber: #fbbf24;
  --cream: #ffffff;
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.58);
  --faint: rgba(255, 255, 255, 0.38);
  --blue: #4cc3ff;
  --good: #34d399;
  --warn: #fbbf24;
  --bad: #f87171;
  --radius: 16px;
  --radius-in: 11px;
  --sidebar-w: 232px;
  --gap: 14px;
  --tabbar-h: 62px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 13px; line-height: 1.45;
  background: var(--bg); color: var(--text);
  min-height: 100vh; overflow-x: hidden;
  font-variant-numeric: tabular-nums;
}
/* Faceted dark texture: two cool steel glows + hard-stop triangle facets, CSS only */
.bg-glow {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(760px 460px at 78% -8%, rgba(96, 140, 200, 0.14), transparent 64%),
    radial-gradient(640px 480px at 6% 78%, rgba(70, 110, 160, 0.10), transparent 62%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.034) 25%, transparent 25%) -90px 0 / 360px 360px,
    linear-gradient(225deg, rgba(255, 255, 255, 0.022) 25%, transparent 25%) -90px 0 / 360px 360px,
    linear-gradient(315deg, rgba(0, 0, 0, 0.22) 25%, transparent 25%) 0 0 / 360px 360px,
    linear-gradient(160deg, rgba(255, 255, 255, 0.026) 30%, transparent 30%) 0 0 / 620px 620px,
    linear-gradient(20deg, rgba(0, 0, 0, 0.2) 30%, transparent 30%) 120px 80px / 620px 620px,
    linear-gradient(180deg, #0a0e14 0%, var(--bg) 420px);
}
h2 { font-size: 13.5px; font-weight: 600; letter-spacing: 0; color: #fff; }
.sub-h { font-size: 12px; font-weight: 600; color: rgba(255, 255, 255, 0.7); margin: 12px 0 7px; }
.muted { color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.asof { color: var(--faint); font-size: 11px; white-space: nowrap; }
em { font-style: normal; color: #fff; }

/* ---------- Sidebar (desktop glass panel) ---------- */
.sidebar {
  position: fixed; top: 12px; left: 12px; bottom: 12px; width: var(--sidebar-w);
  padding: 16px 12px 12px; display: flex; flex-direction: column; gap: 6px; z-index: 30;
  background: var(--panel-bg), rgba(10, 14, 20, 0.55);
  backdrop-filter: blur(18px) saturate(150%); -webkit-backdrop-filter: blur(18px) saturate(150%);
  border: 1px solid var(--stroke); border-radius: var(--radius);
  box-shadow: inset 0 1px 0 var(--hi), 0 18px 40px rgba(0, 0, 0, 0.45);
  overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 4px 12px; }
.brand-mark {
  width: 34px; height: 34px; flex: none; padding: 6px; border-radius: 10px;
  background: linear-gradient(145deg, #f5c86b, #d99a2b);
  box-shadow: 0 6px 16px rgba(232, 179, 75, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.brand-name { font-size: 14px; font-weight: 700; letter-spacing: 0.06em; color: #fff; line-height: 1.2; }
.brand-sub { font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); margin-top: 2px; }
.side-label { font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); padding: 10px 10px 4px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px;
  color: var(--muted); font-size: 13px; font-weight: 500; cursor: pointer; border: 1px solid transparent;
  background: none; text-align: left; width: 100%; font-family: inherit;
  transition: background 200ms var(--ease), color 200ms var(--ease);
}
.nav-item svg { width: 17px; height: 17px; flex: none; }
.nav-item:hover { color: #fff; background: rgba(255, 255, 255, 0.05); }
.nav-item:focus-visible { outline: 2px solid rgba(76, 195, 255, 0.6); outline-offset: 1px; }
.nav-item.active { color: #fff; background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.06); }
.nav-item.active svg { color: var(--gold2); }
.side-nav .nav-item.active::before {
  content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--gold);
}
.side-nav .nav-item[data-nav="today"]::after {
  content: "Live"; margin-left: auto; font-size: 9px; font-weight: 600; letter-spacing: 0.04em;
  color: var(--bad); background: rgba(248, 113, 113, 0.14); border-radius: 999px; padding: 1px 7px;
}
.side-note { font-size: 11px; line-height: 1.5; color: var(--faint); padding: 2px 10px; }
.side-foot { margin-top: auto; }
.user-card {
  display: flex; align-items: flex-start; gap: 9px; padding: 9px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--stroke-soft); border-radius: 12px;
}
.avatar-tile {
  width: 28px; height: 28px; flex: none; border-radius: 8px; display: grid; place-items: center;
  font-size: 10px; font-weight: 700; color: #1b1305; background: linear-gradient(145deg, #f5c86b, #d99a2b);
}
.fresh-chip { font-size: 11px; line-height: 1.45; color: rgba(255, 255, 255, 0.78); }
.fresh-chip .dim { color: var(--faint); }

/* ---------- Topbar + tabbar (mobile) ---------- */
.topbar {
  display: none; position: sticky; top: 0; z-index: 30;
  padding: calc(8px + env(safe-area-inset-top)) 14px 8px;
  background: rgba(8, 12, 18, 0.7); backdrop-filter: blur(18px) saturate(150%); -webkit-backdrop-filter: blur(18px) saturate(150%);
  border-bottom: 1px solid var(--stroke);
  align-items: center; justify-content: space-between; gap: 12px;
}
.topbar .brand { padding: 0; }
.topbar .brand-mark { width: 28px; height: 28px; padding: 5px; border-radius: 8px; }
.topbar .fresh-chip { font-size: 10px; max-width: 52vw; text-align: right; }
.brand-sm .brand-name { font-size: 13px; }
.tabbar {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding: 6px 8px env(safe-area-inset-bottom); gap: 4px;
  background: linear-gradient(180deg, rgba(160, 195, 255, 0.06), rgba(8, 12, 18, 0.78));
  backdrop-filter: blur(18px) saturate(150%); -webkit-backdrop-filter: blur(18px) saturate(150%);
  border-top: 1px solid var(--stroke);
  box-shadow: inset 0 1px 0 var(--hi);
}
.tabbar .nav-item {
  flex: 1; flex-direction: column; gap: 3px; justify-content: center; align-items: center;
  font-size: 10px; border-radius: 12px; padding: 6px 2px; letter-spacing: 0.02em;
}
.tabbar .nav-item.active { background: rgba(255, 255, 255, 0.08); border-color: transparent; color: #fff; }
.tabbar .nav-item.active svg { color: var(--gold); }
.tabbar .nav-item svg { width: 20px; height: 20px; }

/* ---------- Layout ---------- */
.main { margin-left: calc(var(--sidebar-w) + 12px); padding: 16px 18px 36px; max-width: 1440px; }
.surface { display: none; flex-direction: column; gap: var(--gap); }
.surface.active { display: flex; }
.panel {
  background: var(--panel-bg), rgba(10, 14, 20, 0.5); border: 1px solid var(--stroke); border-radius: var(--radius);
  padding: 16px; min-width: 0;
  backdrop-filter: blur(18px) saturate(150%); -webkit-backdrop-filter: blur(18px) saturate(150%);
  box-shadow: inset 0 1px 0 var(--hi), 0 18px 40px rgba(0, 0, 0, 0.4);
}
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 11px; flex-wrap: wrap; }
.panel-head h2 { display: flex; align-items: center; gap: 8px; }
.panel-tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.grid-2col { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: var(--gap); }
.vs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 4px; }
.foot { margin-top: 18px; }
.foot p { font-size: 11px; line-height: 1.55; color: var(--faint); max-width: 760px; }

/* Today composition: KPI row / chart 2fr + donut 1fr / picks 2fr + live 1fr / board */
#surface-today.active { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--gap); align-items: start; }
#surface-today .grid-2col { display: contents; }
#surface-today .kpi-row { grid-column: 1 / -1; grid-row: 1; }
#surface-today .today-chart { grid-column: 1; grid-row: 2; align-self: stretch; }
#surface-today .today-donut { grid-column: 2; grid-row: 2; align-self: stretch; }
#surface-today .today-picks { grid-column: 1; grid-row: 3; container-type: inline-size; }
#surface-today .today-live { grid-column: 2; grid-row: 3; }
#surface-today .today-board { grid-column: 1 / -1; grid-row: 4; }
@container (max-width: 560px) { .vs-grid { grid-template-columns: 1fr; } }

/* ---------- KPI cards ---------- */
.kpi-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.kpi {
  background: var(--panel-bg), rgba(10, 14, 20, 0.5); border: 1px solid var(--stroke); border-radius: var(--radius);
  padding: 13px 15px 12px;
  backdrop-filter: blur(18px) saturate(150%); -webkit-backdrop-filter: blur(18px) saturate(150%);
  box-shadow: inset 0 1px 0 var(--hi), 0 14px 30px rgba(0, 0, 0, 0.38);
  transition: transform 220ms var(--ease), border-color 220ms var(--ease);
}
.kpi:hover { transform: translateY(-4px); border-color: rgba(255, 255, 255, 0.14); }
.kpi .k-label {
  font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255, 255, 255, 0.45);
  display: flex; align-items: center; gap: 8px; line-height: 1.3;
}
.kpi .k-label svg { order: 2; margin-left: auto; width: 26px; height: 26px; padding: 5px; flex: none; border-radius: 8px; color: var(--blue); background: rgba(76, 195, 255, 0.12); }
.kpi .k-value { font-size: 23px; font-weight: 700; color: #fff; margin-top: 4px; letter-spacing: -0.01em; line-height: 1.2; }
.kpi .k-value .gold { color: rgba(255, 255, 255, 0.4); font-weight: 600; }
.kpi .k-sub { font-size: 11.5px; color: var(--muted); margin-top: 4px; line-height: 1.45; }

/* ---------- Picks / entries ---------- */
#entriesToday, #entriesToday2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 12px; margin-bottom: 12px; }
.pick-list { display: flex; flex-direction: column; gap: 5px; }
.pick {
  display: flex; align-items: center; gap: 9px; padding: 6px 10px 6px 7px; border-radius: var(--radius-in);
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--stroke-soft);
  transition: background 200ms var(--ease);
}
.pick:hover { background: rgba(255, 255, 255, 0.05); }
.pick .p-name { font-weight: 600; font-size: 12.5px; color: #fff; white-space: nowrap; }
.pick .p-line { color: var(--muted); font-size: 12px; }
.pick .p-grade { margin-left: auto; font-weight: 700; font-size: 12.5px; color: var(--good); white-space: nowrap; }
.pick .p-tag { font-size: 10px; font-weight: 600; color: var(--amber); background: rgba(251, 191, 36, 0.14); border-radius: 999px; padding: 1px 7px; white-space: nowrap; }
.pick.flagged .p-grade { color: var(--bad); }
.avatar {
  display: inline-grid; place-items: center; width: 26px; height: 26px; flex: none; border-radius: 8px;
  font-size: 10px; font-weight: 700; color: #fff; letter-spacing: 0.02em; vertical-align: middle; margin-right: 9px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.pick .avatar { margin-right: 0; }
.entry-card {
  border: 1px solid var(--stroke); border-radius: 13px; padding: 12px; margin-bottom: 0;
  background: linear-gradient(160deg, rgba(160, 195, 255, 0.05), rgba(255, 255, 255, 0.012));
}
.entry-card .e-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 9px; }
.entry-card .e-title { font-weight: 600; color: #fff; font-size: 13px; }
.entry-card .e-meta { color: var(--muted); font-size: 11.5px; margin-top: 2px; line-height: 1.5; }
.entry-card .e-win { color: var(--gold2); font-weight: 700; }
.badge {
  align-self: flex-start; font-size: 10px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap;
  border-radius: 999px; padding: 2px 9px; color: var(--amber); background: rgba(251, 191, 36, 0.14);
}
.badge.lost { color: var(--bad); background: rgba(248, 113, 113, 0.14); }
.badge.pending { color: var(--amber); background: rgba(251, 191, 36, 0.14); }
.notes { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.notes p { font-size: 12px; line-height: 1.5; color: var(--muted); border-left: 2px solid rgba(255, 255, 255, 0.14); padding-left: 10px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin: 0 -6px; padding: 0 6px; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; min-width: 640px; }
.tbl th { text-align: left; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); font-weight: 600; padding: 7px 10px; border-bottom: 1px solid var(--stroke); white-space: nowrap; }
.tbl td { padding: 7px 10px; border-bottom: 1px solid rgba(255, 255, 255, 0.04); white-space: nowrap; color: var(--text); vertical-align: middle; }
.tbl td strong { font-weight: 600; color: #fff; vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tbody tr { transition: background 200ms var(--ease); }
.tbl tbody tr:hover td { background: rgba(255, 255, 255, 0.03); }
.tbl .num { font-variant-numeric: tabular-nums; }
.tbl tr.clickable { cursor: pointer; }
.tbl tr.clickable:hover td { background: rgba(255, 255, 255, 0.05); }
.tbl tr.in-entry td { background: rgba(76, 195, 255, 0.08); }
.pill { display: inline-block; font-size: 10px; font-weight: 600; border-radius: 999px; padding: 2px 9px; letter-spacing: 0.02em; }
.pill.hit { color: var(--good); background: rgba(52, 211, 153, 0.14); }
.pill.miss { color: var(--bad); background: rgba(248, 113, 113, 0.14); }
.pill.edge-hi { color: var(--gold2); background: rgba(232, 179, 75, 0.14); }
.call-over { color: #38bdf8; font-weight: 600; }
.call-under { color: #a78bfa; font-weight: 600; }

/* ---------- Charts ---------- */
#lineChart svg { display: block; }
.glow-line { filter: drop-shadow(0 0 6px rgba(76, 195, 255, 0.65)); }
.chart-legend {
  display: inline-flex; flex-wrap: wrap; gap: 2px; margin-top: 6px; padding: 3px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--stroke-soft); border-radius: 10px;
}
.chart-legend > span { font-size: 11px; color: var(--muted); padding: 3px 10px; border-radius: 8px; }
.chart-legend > span:first-child { background: rgba(255, 255, 255, 0.08); color: #fff; }
.chart-legend .lg-key { letter-spacing: -0.1em; margin-right: 2px; }
.chart-note { font-size: 11.5px; color: var(--muted); line-height: 1.5; margin-top: 10px; }
.donut-legend { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; }
.donut-legend .dl-row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); padding: 4px 2px; border-bottom: 1px solid rgba(255, 255, 255, 0.04); }
.donut-legend .dl-row:last-child { border-bottom: none; }
.donut-legend .swatch { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.donut-legend .dl-val { margin-left: auto; color: #fff; font-weight: 600; font-size: 12px; }
.bucket-row { display: grid; grid-template-columns: 52px 1fr 104px; gap: 10px; align-items: center; padding: 4px 0; font-size: 12px; }
.bucket-row .b-label { color: var(--muted); font-variant-numeric: tabular-nums; }
.bucket-bars { position: relative; height: 22px; background: rgba(255, 255, 255, 0.04); border-radius: 6px; overflow: hidden; }
.bucket-bars .bar { position: absolute; left: 0; height: 9px; border-radius: 5px; }
.bucket-bars .bar.q { top: 2px; background: #4cc3ff; box-shadow: 0 0 8px rgba(76, 195, 255, 0.4); }
.bucket-bars .bar.a { bottom: 2px; background: rgba(255, 255, 255, 0.7); }
.bucket-row .b-nums, .stat-rate-row .b-nums { color: var(--muted); font-size: 11px; text-align: right; font-variant-numeric: tabular-nums; }
.stat-rate-row { display: grid; grid-template-columns: 52px 1fr 120px; gap: 10px; align-items: center; padding: 4px 0; font-size: 12px; }
.stat-rate-row .b-label { color: var(--muted); }
.stat-rate-row .sr-track { height: 8px; background: rgba(255, 255, 255, 0.05); border-radius: 5px; overflow: hidden; }
.stat-rate-row .sr-fill { height: 100%; background: linear-gradient(90deg, rgba(76, 195, 255, 0.55), #4cc3ff); border-radius: 5px; }

/* ---------- Live scores (feed analog) ---------- */
.live-dot {
  display: inline-flex; align-items: center; gap: 5px; order: 2; font-size: 9.5px; font-weight: 600; letter-spacing: 0.04em;
  border-radius: 999px; padding: 2px 8px; color: var(--faint); background: rgba(255, 255, 255, 0.06);
}
.live-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.live-dot::after { content: "Snapshot"; }
.live-dot.ok { color: var(--good); background: rgba(52, 211, 153, 0.14); }
.live-dot.ok::after { content: "Live feed"; }
.live-dot.on { color: var(--bad); background: rgba(248, 113, 113, 0.14); }
.live-dot.on::before { box-shadow: 0 0 8px rgba(248, 113, 113, 0.8); animation: pulse 1.6s infinite; }
.live-dot.on::after { content: "Live"; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 7px; }
#livePanel .game-grid { grid-template-columns: 1fr; }
.game {
  display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; border: 1px solid var(--stroke-soft); border-radius: var(--radius-in);
  padding: 8px 11px; background: rgba(255, 255, 255, 0.03); font-size: 12.5px;
  transition: background 200ms var(--ease);
}
.game:hover { background: rgba(255, 255, 255, 0.05); }
.game.entry-game { border-color: rgba(232, 179, 75, 0.3); background: linear-gradient(160deg, rgba(232, 179, 75, 0.08), rgba(255, 255, 255, 0.02)); }
.game .g-row { display: flex; align-items: center; gap: 8px; padding: 1px 0; }
.game .g-team { font-weight: 600; color: #fff; }
.game .g-score { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; color: #fff; }
.game .g-status { grid-column: 1 / -1; color: var(--faint); font-size: 11px; margin-top: 4px; display: flex; justify-content: space-between; gap: 8px; }
.game .g-who { color: var(--gold2); font-size: 11px; }
.snapshot-list { display: flex; flex-direction: column; gap: 5px; }
.snapshot-list .snap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px; font-size: 12.5px; padding: 7px 11px; border: 1px solid var(--stroke-soft); border-radius: var(--radius-in); background: rgba(255, 255, 255, 0.03); }
.snapshot-list .snap .s-match { font-weight: 600; color: #fff; }
.snapshot-list .snap .s-who { color: var(--gold2); font-size: 11.5px; }
.snapshot-list .snap .s-tip { color: var(--faint); font-size: 11.5px; white-space: nowrap; }
#livePanel .muted { margin-bottom: 8px; }

/* ---------- Players ---------- */
.player-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; margin-top: 10px; }
.player-card {
  text-align: left; font-family: inherit; cursor: pointer; color: var(--text);
  border: 1px solid var(--stroke-soft); border-radius: 12px; padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  transition: transform 220ms var(--ease), background 200ms var(--ease), border-color 200ms var(--ease);
}
.player-card:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.14); background: rgba(255, 255, 255, 0.05); }
.player-card:focus-visible { outline: 2px solid rgba(76, 195, 255, 0.6); outline-offset: 1px; }
.player-card .pc-name { font-weight: 600; color: #fff; font-size: 13px; }
.player-card .pc-meta { color: var(--faint); font-size: 11px; margin-top: 3px; line-height: 1.45; }
.player-card .pc-best { color: var(--blue); font-size: 11.5px; margin-top: 5px; font-weight: 500; }

/* ---------- Builder ---------- */
.input {
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--stroke); border-radius: 10px;
  color: #fff; padding: 6px 10px; font-size: 12.5px; font-family: inherit; outline: none;
  transition: border-color 200ms var(--ease), background 200ms var(--ease);
}
.input::placeholder { color: var(--faint); }
.input:focus { border-color: rgba(76, 195, 255, 0.55); background: rgba(255, 255, 255, 0.07); }
select.input option { background: #0c1118; color: #fff; }
.btn-ghost {
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--stroke); color: rgba(255, 255, 255, 0.8);
  border-radius: 10px; padding: 6px 12px; font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit;
  transition: background 200ms var(--ease), color 200ms var(--ease), transform 150ms var(--ease);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.btn-ghost:active { transform: scale(0.98); }
.btn-ghost:focus-visible { outline: 2px solid rgba(76, 195, 255, 0.6); outline-offset: 1px; }
.btn-ghost[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: #1b1305; }
.byol-grid { display: grid; grid-template-columns: 1.4fr 0.6fr 1.4fr; gap: 12px; align-items: end; margin-top: 8px; }
.byol-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 10px; color: var(--faint); letter-spacing: 0.12em; text-transform: uppercase; }
.byol-grid label .input { text-transform: none; letter-spacing: 0; }
.byol-out { border: 1px solid var(--stroke-soft); border-radius: var(--radius-in); padding: 10px 13px; background: rgba(255, 255, 255, 0.03); min-height: 66px; }
.byol-out .big { font-size: 20px; font-weight: 700; color: #fff; }
.byol-out .tier { font-weight: 700; }
.tier.fat { color: var(--good); } .tier.thin { color: var(--warn); } .tier.none { color: var(--bad); }
.entry-slots { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 10px; }
.slot {
  display: flex; align-items: center; gap: 8px; font-size: 12px; padding: 6px 10px; border-radius: 999px;
  border: 1px solid var(--stroke); background: rgba(76, 195, 255, 0.08); color: #fff;
}
.slot button { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 14px; line-height: 1; padding: 0; }
.slot button:hover { color: #fff; }
.slot.empty { border-style: dashed; color: var(--faint); background: none; border-color: var(--stroke); }
.entry-math { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-bottom: 4px; }
.em-cell { border: 1px solid var(--stroke-soft); border-radius: var(--radius-in); padding: 9px 12px; background: rgba(255, 255, 255, 0.03); }
.em-cell .em-label { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }
.em-cell .em-value { font-size: 18px; font-weight: 700; color: #fff; margin-top: 3px; }
.em-cell .em-sub { font-size: 11px; color: var(--muted); margin-top: 2px; line-height: 1.45; }

/* ---------- Record tabs (segmented control) ---------- */
.tabs {
  display: inline-flex; align-self: flex-start; gap: 2px; padding: 3px; max-width: 100%; overflow-x: auto;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--stroke); border-radius: 12px;
  box-shadow: inset 0 1px 0 var(--hi);
}
.tab {
  font-family: inherit; cursor: pointer; font-size: 12px; font-weight: 500; color: var(--muted); white-space: nowrap;
  background: none; border: none; border-radius: 9px; padding: 6px 13px;
  transition: background 200ms var(--ease), color 200ms var(--ease);
}
.tab:hover { color: #fff; }
.tab:focus-visible { outline: 2px solid rgba(76, 195, 255, 0.6); outline-offset: 1px; }
.tab.active { color: #fff; background: rgba(255, 255, 255, 0.1); }
.rtab { display: none; flex-direction: column; gap: var(--gap); }
.rtab.active { display: flex; }
.big-stat { font-size: 23px; font-weight: 700; color: #fff; }
.stand-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.05); font-size: 12.5px; }
.stand-row:last-child { border-bottom: none; }
.stand-row .sr-k { color: var(--muted); } .stand-row .sr-v { font-weight: 600; color: #fff; text-align: right; }
.await-box { border: 1px dashed rgba(255, 255, 255, 0.2); border-radius: 13px; padding: 13px; background: rgba(255, 255, 255, 0.025); }
.await-box .a-title { font-weight: 600; color: var(--amber); margin-bottom: 5px; font-size: 13px; }

/* ---------- Responsive ---------- */
@media (min-width: 1101px) {
  #livePanel #scoresBody { max-height: 440px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.18) transparent; padding-right: 2px; }
}
@media (max-width: 1100px) {
  .grid-2col { grid-template-columns: 1fr; }
  .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #surface-today.active { grid-template-columns: minmax(0, 1fr); }
  #surface-today .kpi-row, #surface-today .today-chart, #surface-today .today-donut,
  #surface-today .today-picks, #surface-today .today-live, #surface-today .today-board { grid-column: 1; grid-row: auto; }
  #surface-today .kpi-row { order: 0; }
  #surface-today .today-live { order: 1; }
  #surface-today .today-chart { order: 2; }
  #surface-today .today-donut { order: 3; }
  #surface-today .today-picks { order: 4; }
  #surface-today .today-board { order: 5; }
  #livePanel .game-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
}
@media (max-width: 860px) {
  .sidebar { display: none; }
  .topbar { display: flex; }
  .tabbar { display: flex; }
  .main { margin-left: 0; padding: 12px 12px calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 22px); }
  .surface, .rtab { gap: 12px; }
  #surface-today.active { gap: 12px; }
  .vs-grid { grid-template-columns: 1fr; }
  .byol-grid { grid-template-columns: 1fr; }
  .panel { padding: 13px; }
  .kpi-row { gap: 10px; }
  .kpi { padding: 11px 12px 10px; }
  .kpi .k-label { font-size: 9.5px; letter-spacing: 0.08em; }
  .kpi .k-label svg { width: 24px; height: 24px; padding: 5px; }
  .kpi .k-sub { font-size: 11px; }
  #entriesToday, #entriesToday2 { grid-template-columns: 1fr; }
  .pick { flex-wrap: wrap; }
  .tabs { width: 100%; }
  .tab { flex: 1; padding: 6px 10px; }
  .panel-tools .input[type="search"] { flex: 1; min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
  .kpi:hover, .player-card:hover { transform: none; }
}
