:root {
  --bg: #070b14;
  --bg-2: #101826;
  --panel: rgba(16, 24, 38, 0.92);
  --line: rgba(232, 214, 168, 0.14);
  --text: #edf2ff;
  --muted: #93a0bd;
  --gold: #f0c14b;
  --gold-2: #ffe7a3;
  --orange: #ff7a3c;
  --green: #3dd68c;
  --red: #ff5d73;
  --blue: #7eb6ff;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  --user: #7c5cff;
  --radius: 18px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  color: var(--text);
  font-family: Bahnschrift, "Segoe UI", "Microsoft JhengHei", "PingFang TC", sans-serif;
  background:
    radial-gradient(1100px 520px at 0% -10%, rgba(240, 193, 75, 0.16), transparent 55%),
    radial-gradient(900px 480px at 100% 0%, rgba(255, 122, 60, 0.12), transparent 50%),
    radial-gradient(800px 500px at 80% 100%, rgba(124, 92, 255, 0.12), transparent 45%),
    var(--bg);
}
button, input, select, textarea { font: inherit; color: inherit; }
input:not([type="checkbox"]):not([type="file"]):not([type="hidden"]),
textarea,
select {
  background: #0c1320;
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  outline: none;
  color-scheme: dark;
}
input::placeholder, textarea::placeholder { color: #b7c3dc; opacity: 1; }
button { cursor: pointer; }
#app { min-height: 100vh; }

.wrap { width: min(1180px, calc(100% - 28px)); margin: 0 auto; }
.top {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(16px);
  background: rgba(7, 11, 20, 0.78);
  border-bottom: 1px solid var(--line);
}
.top-row, .nav-row { display: flex; align-items: center; gap: 16px; }
.top-row { padding: 14px 0 8px; justify-content: space-between; }
.brand { display: flex; gap: 12px; align-items: center; background: none; border: 0; padding: 0; text-align: left; }
.logo {
  width: 46px; height: 46px; border-radius: 14px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, var(--gold), var(--orange));
  color: #1a1203; font-weight: 800; letter-spacing: -0.04em;
  box-shadow: 0 8px 24px rgba(240, 193, 75, 0.25);
}
.brand strong { display: block; font-size: 18px; letter-spacing: 0.04em; }
.brand small, .muted, .sub { color: var(--muted); }
.brand small { letter-spacing: 0.08em; text-transform: uppercase; font-size: 11px; }
.scorebug {
  display: flex; gap: 18px; align-items: center;
  background: #070b14; border: 1px solid rgba(240, 193, 75, 0.35);
  border-radius: 14px; padding: 6px 14px;
  box-shadow: inset 0 0 18px rgba(240, 193, 75, 0.08);
}
.scorebug b { font-size: 22px; color: var(--gold-2); font-variant-numeric: tabular-nums; }
.logo.ball { background: transparent; box-shadow: none; width: 48px; height: 48px; }
.logo.ball svg { display: block; filter: drop-shadow(0 6px 10px rgba(238, 106, 47, 0.35)); }
.nav-row { padding: 0 0 12px; flex-wrap: wrap; }
.nav-row button, .chip, .btn {
  border: 1px solid var(--line); background: rgba(255,255,255,0.03);
  border-radius: 999px; padding: 8px 14px;
}
.nav-row button.active, .chip.active {
  background: var(--gold); color: #1a1203; border-color: transparent; font-weight: 700;
}
.page { padding: 22px 0 64px; }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: 1.4fr 0.8fr; }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid.cards { grid-template-columns: repeat(4, 1fr); }
.panel {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px;
}
.panel h2, .panel h3 { margin: 0 0 12px; }
.hero h1 {
  font-size: clamp(40px, 6vw, 72px); line-height: 0.95; margin: 8px 0 12px;
  letter-spacing: -0.04em;
}
.grad { background: linear-gradient(120deg, var(--gold-2), var(--orange) 55%, #fff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 18px; max-width: 680px; color: #d5def3; }
.kicker { color: var(--gold); letter-spacing: 0.16em; font-size: 12px; text-transform: uppercase; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btn.primary { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #1a1203; border: 0; font-weight: 800; }
.btn.danger { background: rgba(255, 93, 115, 0.12); color: #ffd0d6; }
.btn.good { background: rgba(61, 214, 140, 0.14); color: #c9ffe6; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 180px; }
.field span { color: var(--muted); font-size: 13px; }
input:focus, textarea:focus, select:focus { border-color: rgba(240, 193, 75, 0.7); }
.swatches { display: flex; gap: 8px; }
.swatch { width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent; padding: 0; }
.swatch.active { border-color: white; transform: scale(1.08); }
.stat { padding: 14px; }
.stat b { display: block; font-size: 28px; line-height: 1; margin-top: 6px; }
.stat span, .label { color: var(--muted); font-size: 13px; }
.pills { display: flex; gap: 4px; flex-wrap: wrap; }
.pills i, .tag, .status {
  font-style: normal; border-radius: 999px; padding: 2px 7px; font-size: 12px;
  background: rgba(255,255,255,0.06); color: var(--muted);
}
.pills i.W { background: rgba(61,214,140,.18); color: var(--green); }
.pills i.L { background: rgba(255,93,115,.16); color: #ffb3be; }
.tag { color: var(--gold-2); background: rgba(240,193,75,.12); }
.status.out { color: #ffd0d6; background: rgba(255,93,115,.16); }
.status.dtd { color: #ffe7a3; background: rgba(240,193,75,.14); }
.status.hot { color: #ffd0b8; background: rgba(255,122,60,.16); }
.status.cold { color: #c9e7ff; background: rgba(126,182,255,.14); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12px; letter-spacing: 0.04em; }
th, td { padding: 8px 8px; border-bottom: 1px solid rgba(255,255,255,0.05); white-space: nowrap; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.me { background: color-mix(in srgb, var(--user) 16%, transparent); }
button.link { background: none; border: 0; padding: 0; color: white; font-weight: 700; }
button.link:hover { color: var(--gold-2); }
.team-pill { display: inline-flex; align-items: center; gap: 6px; color: #d7e0f5; }
.team-pill i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.vs { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; }
.side-score { padding: 8px; border-radius: 14px; background: rgba(255,255,255,0.03); }
.side-score strong { font-size: 34px; display: block; font-variant-numeric: tabular-nums; }
.side-score.win strong { color: var(--green); }
.side-score.loss strong { color: #ffb3be; }
.vs em { font-style: normal; color: var(--gold); letter-spacing: 0.14em; }
.slot-list { display: grid; gap: 8px; }
.slot {
  display: grid; grid-template-columns: 64px 1fr auto; gap: 8px; align-items: center;
  padding: 8px; border-radius: 12px; background: rgba(255,255,255,0.03);
}
.slot b { color: var(--gold); font-size: 13px; }
.mini { color: var(--muted); font-size: 12px; text-align: right; }
.person { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.news-item { padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.news-item b { color: var(--gold); margin-right: 6px; }
.bracket { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.series { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin-bottom: 10px; background: rgba(0,0,0,.18); }
.series .side { display: flex; justify-content: space-between; padding: 8px 10px; }
.series .side.win { background: rgba(61,214,140,.12); }
.sched { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.sched div { border-radius: 10px; padding: 6px; background: rgba(255,255,255,0.04); font-size: 12px; display: flex; justify-content: space-between; }
.sched .g4 { outline: 1px solid rgba(240,193,75,.35); }
.modal-back {
  position: fixed; inset: 0; background: rgba(0,0,0,.62); display: grid; place-items: center; z-index: 30; padding: 18px;
}
.modal { width: min(640px, 100%); max-height: min(86vh, 820px); overflow: auto; }
.toast {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%);
  background: #1b2436; border: 1px solid var(--gold); color: white;
  padding: 12px 16px; border-radius: 999px; z-index: 40; box-shadow: var(--shadow);
}
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bar { height: 8px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--orange), var(--gold)); }
.trophy { text-align: center; padding: 12px 8px 4px; }
.trophy .cup { font-size: 64px; animation: floaty 2.4s ease-in-out infinite; }
@keyframes ticker { to { transform: translateX(-50%); } }
@keyframes floaty { 50% { transform: translateY(-6px); } }
.warn { color: #ffd0b8; }
.good { color: var(--green); }
.split { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
.check { display: flex; gap: 8px; align-items: flex-start; padding: 6px 0; }
@media (max-width: 900px) {
  .grid.two, .grid.three, .grid.cards, .bracket, .vs, .compare { grid-template-columns: 1fr; }
  .sched { grid-template-columns: repeat(3, 1fr); }
  .scorebug { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .trophy .cup { animation: none; }
  .league-track { animation: none; flex-wrap: wrap; width: auto; }
}

body::before {
  content: "";
  position: fixed;
  left: 50%;
  bottom: -240px;
  width: min(980px, 100vw);
  height: 480px;
  transform: translateX(-50%);
  border: 3px solid rgba(246, 239, 226, 0.14);
  border-bottom: 0;
  border-radius: 480px 480px 0 0;
  pointer-events: none;
  z-index: 0;
}
#app { position: relative; z-index: 1; }
.brand-lockup { display: flex; align-items: center; gap: 12px; }
.brand-lockup strong { display: block; font-size: 18px; letter-spacing: 0.04em; }
.brand-lockup small { color: var(--gold); letter-spacing: 0.14em; font-size: 11px; }
.team-rail { display: flex; gap: 4px; flex-wrap: wrap; margin: 10px 0 14px; }
.team-rail i { width: 14px; height: 14px; border-radius: 3px; display: block; box-shadow: inset 0 0 0 1px rgba(0,0,0,.35); }
.league-strip { overflow: hidden; margin: 14px 0 18px; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.league-track { display: flex; gap: 8px; width: max-content; animation: ticker 70s linear infinite; }
.team-chip { display: flex; align-items: center; gap: 8px; padding: 5px 10px 5px 5px; border-radius: 12px; background: rgba(8, 12, 20, 0.72); border: 1px solid var(--line); }
.team-chip b { position: relative; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: var(--team); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(0,0,0,.25); }
.team-chip b img { width: 32px; height: 32px; object-fit: contain; position: relative; z-index: 1; }
.team-chip b span { position: absolute; font-size: 10px; letter-spacing: 0.02em; }
.team-chip > span { font-size: 13px; }
.jumbo {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center;
  margin: 8px 0 14px; padding: 12px 16px;
  background: radial-gradient(circle at 50% 0%, rgba(240,193,75,.16), transparent 42%), #070b12;
  border-radius: 16px;
  box-shadow: inset 0 0 0 2px #f0c14b, inset 0 0 0 6px #1a1408, 0 16px 30px rgba(0,0,0,.35);
  text-align: center;
}
.jumbo span, .jumbo small { display: block; color: #d7c28a; letter-spacing: 0.14em; font-size: 11px; }
.jumbo b { display: block; color: #ffe7a3; font-size: 34px; line-height: 1; letter-spacing: 0.06em; font-variant-numeric: tabular-nums; }
.jumbo small { margin-top: 4px; letter-spacing: 0.08em; }
.jumbo-mid b { font-size: 18px; letter-spacing: 0.22em; }
.jumbo-mid .logo.ball { width: 42px; height: 42px; margin: 0 auto 4px; }
.tipoff { display: grid; grid-template-columns: 1fr 92px 1fr; gap: 10px; align-items: center; margin-top: 12px; }
.tipoff-mark { text-align: center; color: var(--gold-2); }
.tipoff-mark b { display: block; letter-spacing: 0.18em; margin-top: 4px; }
.tipoff-mark span { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.lineup { display: grid; gap: 6px; }
.lineup.away .lineup-row { direction: rtl; }
.lineup.away .lineup-row > * { direction: ltr; }
.lineup-row {
  display: grid; grid-template-columns: 22px 36px 1fr auto; gap: 8px; align-items: center;
  padding: 6px 8px; border-radius: 12px; color: #fff;
  background: linear-gradient(90deg, color-mix(in srgb, var(--team) 62%, #120c08), rgba(8,12,20,.45) 82%);
  border: 1px solid rgba(255,255,255,.08);
}
.lineup.away .lineup-row { background: linear-gradient(270deg, color-mix(in srgb, var(--team) 62%, #120c08), rgba(8,12,20,.45) 82%); }
.lineup-rank { font-weight: 800; color: #fff; text-align: center; }
.lineup-row b { display: block; line-height: 1.1; }
.lineup-row .sub { color: rgba(255,255,255,.82); }
.lineup-row em { font-style: normal; font-weight: 800; color: #ffe7a3; font-variant-numeric: tabular-nums; }
.story-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin: 16px 0; }
.story { display: flex; align-items: center; gap: 8px; background: rgba(8, 12, 20, 0.72); border: 1px solid var(--line); border-radius: 14px; padding: 8px 10px; }
.story span { display: block; color: var(--gold); font-size: 11px; letter-spacing: 0.08em; }
.story b { display: block; margin-top: 2px; font-size: 14px; }
.stage { border-radius: 18px; overflow: hidden; box-shadow: 0 16px 40px rgba(0,0,0,.35), inset 0 0 0 4px #5c3418; }
.court-svg { display: block; width: 100%; height: auto; background: #c9843a; }
.court-hero { margin-top: 6px; }
.court-caption { margin: 8px 0 0; }
.led-note, .notice { border-left: 4px solid var(--gold); }
.notice p { margin: 6px 0; }
.jersey-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.jersey {
  position: relative;
  min-height: 148px;
  padding: 22px 10px 12px;
  border-radius: 16px 16px 22px 22px;
  background: var(--team, #333);
  color: var(--ink, #fff);
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.28), 0 12px 24px rgba(0,0,0,.28);
  overflow: hidden;
}
.jersey:before {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  width: 46px; height: 14px;
  transform: translateX(-50%);
  background: #141414;
  border-radius: 0 0 12px 12px;
}
.jersey.empty { background: transparent; color: var(--muted); box-shadow: none; border: 1px dashed rgba(255,255,255,.22); }
.jersey.empty:before { display: none; }
.jersey-rank { position: absolute; top: 8px; left: 10px; font-size: 20px; font-weight: 800; }
.jersey-pos { position: absolute; top: 10px; right: 10px; font-size: 12px; letter-spacing: 0.08em; }
.jersey-name { margin-top: 6px; font-size: 22px; font-weight: 800; line-height: 1.05; }
.jersey-full, .jersey-meta { font-size: 12px; opacity: 0.88; margin-top: 4px; }
.forecast-slot {
  display: grid; grid-template-columns: 36px 1fr auto; gap: 8px; align-items: center;
  padding: 8px; margin-bottom: 6px; border-radius: 12px;
  background: rgba(255,255,255,.03); border-left: 4px solid var(--team, transparent);
}
.forecast-slot.empty { border-left-color: rgba(255,255,255,.16); color: var(--muted); }
.forecast-slot b { color: var(--gold); }
.pick-scroll { max-height: 680px; overflow: auto; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 4px; }
#pxq { flex: 1; min-width: 200px; }
textarea { width: 100%; resize: vertical; }
.broadcast-bar { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; margin: 8px 0; }
.bug-side, .bug-mid {
  background: #070b14; border: 1px solid rgba(240,193,75,.4); border-radius: 12px; padding: 8px 12px;
}
.bug-side b { display: block; font-size: 34px; line-height: 1; color: #ffe7a3; font-variant-numeric: tabular-nums; }
.bug-mid { display: grid; place-items: center; color: var(--gold); letter-spacing: 0.16em; font-size: 13px; }
.duel-mid { letter-spacing: 0; gap: 6px; }
.duel-mid span { letter-spacing: 0.08em; }
.series { display: grid; gap: 6px; }
.series-row { display: grid; grid-template-columns: 28px 1fr 1fr; gap: 8px; align-items: center; }
.series-row > b { text-align: center; color: var(--gold); }
.series-side { min-height: 48px; padding: 6px 8px; border-radius: 12px; background: rgba(255,255,255,.04); }
.series-side.win { background: rgba(240,193,75,.12); box-shadow: inset 0 0 0 1px rgba(240,193,75,.55); }
.cat-row { display: grid; grid-template-columns: 72px 1fr 72px; gap: 8px; align-items: center; margin: 8px 0; }
.cat-row > b { font-variant-numeric: tabular-nums; text-align: center; }
.cat-row.home > b:first-child, .cat-row.away > b:last-child { color: #ffe7a3; }
.bug-call { margin: 10px 0 0; padding: 10px 12px; background: #10161c; border-left: 4px solid var(--gold); border-radius: 10px; }
.play-log { margin: 8px 0 0; padding-left: 18px; color: #d5def3; }
.play-log li { margin: 4px 0; }
.athlete.on .ring { stroke: #ffe7a3; stroke-width: 5px; }
.hoop.flash { stroke: #ffe7a3; stroke-width: 6px; }
.face {
  position: relative; display: inline-grid; place-items: center; flex: none;
  width: 36px; height: 36px; border-radius: 50%; overflow: hidden;
  background: var(--team, #333); color: var(--ink, #fff);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.35);
}
.face span { font-size: 11px; font-weight: 800; line-height: 1; }
.face img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 12%; }
.face.card { width: 84px; height: 84px; border: 3px solid rgba(255,255,255,.9); box-shadow: 0 8px 18px rgba(0,0,0,.28); }
.face.card span { font-size: 18px; }
.jersey { text-align: center; }
.jersey .face.card { display: grid; margin: 16px auto 2px; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.court-svg image.mug { clip-path: circle(50% at 50% 46%); }
tr.open { outline: 1px solid rgba(240,193,75,.35); }
@media (max-width: 900px) {
  .story-row, .jersey-grid { grid-template-columns: repeat(2, 1fr); }
  .tipoff { grid-template-columns: 1fr; }
  .lineup.away .lineup-row, .lineup.away .lineup-row > * { direction: ltr; }
  .jumbo b { font-size: 26px; }
  .forecast-slot { grid-template-columns: 28px 1fr; }
  .forecast-slot .row { grid-column: 1 / -1; }
  .broadcast-bar { grid-template-columns: 1fr; }
}
