:root {
  --primary: #0b1f3a;
  --secondary: #e5b73b;
  --on-primary: #fff;
  --on-secondary: #111;
  --bg: #f3f4f6;
  --card: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --good: #15803d;
  --good-bg: #dcfce7;
  --bad: #b91c1c;
  --bad-bg: #fee2e2;
  --draw: #6b7280;
  --draw-bg: #e5e7eb;
  --radius: 14px;
  --display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --body: Inter, system-ui, -apple-system, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0d12; --card: #161a22; --ink: #f3f4f6; --muted: #9ca3af; --line: #262b36;
    --good: #4ade80; --good-bg: #12301f; --bad: #f87171; --bad-bg: #3a1618; --draw: #cbd5e1; --draw-bg: #262b36;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0d12; --card: #161a22; --ink: #f3f4f6; --muted: #9ca3af; --line: #262b36;
  --good: #4ade80; --good-bg: #12301f; --bad: #f87171; --bad-bg: #3a1618; --draw: #cbd5e1; --draw-bg: #262b36;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.45 var(--body);
  padding-bottom: calc(72px + env(safe-area-inset-bottom));
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--display); letter-spacing: .01em; margin: 0; text-transform: uppercase; }
h2 { font-size: 22px; margin: 26px 0 10px; }
h3 { font-size: 17px; }
main { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.loading, .empty { text-align: center; color: var(--muted); padding: 60px 0; }

/* masthead */
.masthead {
  background: var(--primary); color: var(--on-primary);
  padding: calc(18px + env(safe-area-inset-top)) 16px 20px; position: relative; overflow: hidden;
}
.masthead::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 5px; background: var(--secondary);
}
.masthead .inner { max-width: 760px; margin: 0 auto; display: flex; gap: 14px; align-items: center; }
.crest { width: 58px; height: 58px; flex: none; object-fit: contain; filter: drop-shadow(0 2px 6px rgba(0,0,0,.35)); }
.crest.fallback {
  display: grid; place-items: center; border-radius: 50%; background: var(--secondary); color: var(--on-secondary);
  font: 800 24px var(--display);
}
.masthead h1 { font-size: 28px; line-height: 1; }
.masthead .sub { opacity: .8; font-size: 13px; margin-top: 4px; }
.record { display: flex; gap: 8px; margin-top: 8px; font: 700 14px var(--display); letter-spacing: .04em; }
.record span { background: rgba(255,255,255,.14); padding: 2px 8px; border-radius: 6px; }

/* tabbar */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; display: flex; background: var(--card);
  border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); z-index: 10;
}
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 10px; font-size: 11px; color: var(--muted); font-weight: 600; }
.tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a.active { color: var(--ink); }
.tabbar a.active svg { stroke: var(--ink); }

/* chips */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 16px 0 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; border: 1px solid var(--line); background: var(--card); color: var(--ink);
  padding: 7px 14px; border-radius: 999px; font: 600 13px var(--body); cursor: pointer;
}
.chip.on { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }

/* cards */
.card { background: var(--card); border-radius: var(--radius); border: 1px solid var(--line); padding: 14px 16px; margin: 10px 0; }
.season-head { display: flex; justify-content: space-between; align-items: baseline; }
.season-head small { color: var(--muted); font-weight: 600; }
.match-row { display: flex; align-items: center; gap: 12px; }
.match-row .when { color: var(--muted); font-size: 12px; }
.match-row .opp { font-weight: 700; }
.match-row .top { font-size: 12px; color: var(--muted); }
.match-row .score { margin-left: auto; font: 800 24px var(--display); white-space: nowrap; }
.pill { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; font: 800 15px var(--display); flex: none; }
.pill.W { background: var(--good-bg); color: var(--good); }
.pill.L { background: var(--bad-bg); color: var(--bad); }
.pill.D { background: var(--draw-bg); color: var(--draw); }

/* scoreboard */
.scoreboard { text-align: center; padding: 20px 16px; }
.scoreboard .teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.scoreboard .team { font: 700 16px var(--display); text-transform: uppercase; }
.scoreboard .big { font: 800 44px var(--display); letter-spacing: .04em; }
.scoreboard .meta { color: var(--muted); font-size: 12px; margin-top: 6px; }
.team-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.team-stats div { background: var(--bg); border-radius: 10px; padding: 8px 4px; }
.team-stats b { display: block; font: 800 20px var(--display); }
.team-stats span { font-size: 11px; color: var(--muted); }

/* player card */
.pcard { padding: 0; overflow: hidden; }
.pcard summary { list-style: none; display: flex; gap: 12px; align-items: center; padding: 14px 16px; cursor: pointer; }
.pcard summary::-webkit-details-marker { display: none; }
.rating {
  width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; flex: none;
  font: 800 23px var(--display); color: #fff;
}
.pname { font-weight: 700; font-size: 16px; }
.ppos { font-size: 12px; color: var(--muted); }
.cap { text-transform: capitalize; }
.headline { font-size: 13px; color: var(--muted); margin-top: 2px; }
.chev { margin-left: auto; color: var(--muted); transition: transform .2s; flex: none; }
details[open] .chev { transform: rotate(180deg); }
.pbody { padding: 0 16px 16px; border-top: 1px solid var(--line); }
.statgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.stat { background: var(--bg); border-radius: 10px; padding: 8px 10px; }
.stat b { display: block; font: 800 20px var(--display); }
.stat span { font-size: 11px; color: var(--muted); }
.stat em { display: block; font-style: normal; font-size: 11px; color: var(--muted); }

.section-label { font: 700 13px var(--display); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 18px 0 8px; }
.note { border-left: 3px solid; padding: 6px 0 6px 12px; margin: 8px 0; }
.note.good { border-color: var(--good); }
.note.bad { border-color: var(--bad); }
.note b { display: block; }
.note small { color: var(--muted); display: block; }
.tips { margin: 6px 0 0; padding-left: 18px; font-size: 13.5px; }
.tips li { margin: 4px 0; }

/* rating drivers */
.drivers { display: grid; gap: 6px; }
.driver { display: grid; grid-template-columns: 1fr 120px 44px; align-items: center; gap: 8px; font-size: 13px; }
.driver .bar { position: relative; height: 10px; background: var(--bg); border-radius: 5px; }
.driver .bar::before { content: ""; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: var(--muted); opacity: .5; }
.driver .fill { position: absolute; top: 0; bottom: 0; border-radius: 5px; }
.driver .fill.pos { left: 50%; background: var(--good); }
.driver .fill.neg { right: 50%; background: var(--bad); }
.driver .val { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.driver .val.pos { color: var(--good); }
.driver .val.neg { color: var(--bad); }
.model-note { font-size: 12px; color: var(--muted); margin-top: 8px; }

/* squad */
.squad-row { display: flex; align-items: center; gap: 12px; }
.squad-row .meta { font-size: 12px; color: var(--muted); }
.trend { margin-left: auto; font-size: 12px; font-weight: 700; }
.trend.up { color: var(--good); } .trend.down { color: var(--bad); }

/* profile */
.profile-head { display: flex; gap: 14px; align-items: center; margin-top: 18px; }
.profile-head h1 { font-size: 30px; }
.chart { width: 100%; height: auto; display: block; }
.chart text { fill: var(--muted); font: 11px var(--body); }
.progress { height: 8px; background: var(--bg); border-radius: 4px; overflow: hidden; margin: 10px 0 4px; }
.progress div { height: 100%; background: var(--secondary); }
.theme { padding: 12px 0; border-top: 1px solid var(--line); }
.theme:first-of-type { border-top: 0; }
.tag { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 6px; padding: 1px 7px; margin-left: 6px; vertical-align: 2px; }
.tag.improving { background: var(--good-bg); color: var(--good); }
.tag.worsening { background: var(--bad-bg); color: var(--bad); }
.tag.steady { background: var(--draw-bg); color: var(--draw); }
.log-row { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.log-row:first-child { border-top: 0; }
.log-row .r { margin-left: auto; font-weight: 700; }
.back { display: inline-block; margin-top: 14px; font-weight: 600; color: var(--muted); }
.about p { color: var(--ink); }
.about li { margin: 6px 0; }

.band { display: inline-block; margin-top: 4px; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 6px; background: var(--draw-bg); color: var(--draw); }
.band-top { background: var(--good-bg); color: var(--good); }
.band-bottom { background: var(--bad-bg); color: var(--bad); }

/* calendar */
.cal { padding: 12px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; text-align: center; }
.cal-head b { display: block; font: 700 18px var(--display); text-transform: uppercase; letter-spacing: .03em; }
.cal-head small { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.cal-nav { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 22px; line-height: 1; cursor: pointer; }
.cal-nav:disabled { opacity: .3; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-dow { text-align: center; font-size: 11px; font-weight: 700; color: var(--muted); padding-bottom: 2px; }
.cal-day { position: relative; aspect-ratio: 1 / 1.08; border-radius: 9px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  padding: 4px 2px 3px; font: 600 12px var(--body); color: var(--ink); background: var(--bg); border: 1.5px solid transparent; min-width: 0; }
.cal-day.blank { background: transparent; }
.cal-day.empty { color: var(--muted); opacity: .75; }
.cal-day.empty b { font-weight: 500; }
.cal-day.has { cursor: pointer; background: color-mix(in srgb, var(--primary) var(--heat), var(--card)); }
.cal-day.has.dark { color: var(--on-primary); }
.cal-day.on { border-color: var(--secondary); box-shadow: 0 0 0 2px var(--secondary); }
.cal-day.today b { text-decoration: underline; text-underline-offset: 2px; }
.cal-day:focus-visible { outline: 2px solid var(--secondary); outline-offset: 1px; }
.cal-rec { font-size: 10px; font-weight: 700; margin-top: auto; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.cal-bar { display: flex; width: 78%; height: 4px; border-radius: 2px; overflow: hidden; margin-top: 2px; background: var(--line); }
.cal-bar .seg.W, .dot.W { background: #2fb36a; }
.cal-bar .seg.D, .dot.D { background: #9aa3ad; }
.cal-bar .seg.L, .dot.L { background: #e05545; }
.cal-season { order: 2; margin-top: 2px; font: 800 8.5px var(--body); font-style: normal; color: var(--secondary); background: var(--primary); border-radius: 3px; padding: 0 3px; line-height: 12px; }
.cal-day b { order: 1; }
.cal-rec { order: 3; }
.cal-bar { order: 4; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin-top: 10px; font-size: 11.5px; color: var(--muted); }
.cal-legend .sw { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 2px; vertical-align: -1px; background: color-mix(in srgb, var(--primary) var(--heat), var(--card)); border: 1px solid var(--line); }
.cal-legend .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin: 0 2px 0 4px; }
.cal-hint { margin-left: auto; }
.selection { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--card); border: 1.5px solid var(--secondary); border-radius: var(--radius); padding: 10px 14px; margin: 10px 0; }
.selection b { display: block; }
.selection span { font-size: 13px; color: var(--muted); }

/* coach voice */
.coach-say { font-size: 14.5px; line-height: 1.5; margin: 12px 0 0; }
.coach-say.closer { font-style: italic; margin-top: 16px; }
.coach-say.closer span { font-style: normal; font-weight: 700; color: var(--muted); }
.say { margin: 3px 0 2px; font-size: 14px; }
.drill-label { font: 700 11px var(--display); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-top: 8px; }
.talk { border-top: 4px solid var(--secondary); }
.talk-head { display: flex; gap: 10px; align-items: flex-start; }
.talk-head .whistle { font-size: 24px; line-height: 1; }
.talk-head .coach-say { margin-top: 4px; }
.talk-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 4px 20px; }
.talk-list { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.talk-list li { padding-left: 2px; }
.talk-list b { display: block; font-size: 13px; }
.talk-list span { display: block; font-size: 14px; }
.talk-list em { display: block; font-style: normal; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.talk-list.good li::marker { color: var(--good); font-weight: 800; }
.talk-list.bad li::marker { color: var(--bad); font-weight: 800; }
.good-label { color: var(--good); }
.bad-label { color: var(--bad); }

.notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.notes li { position: relative; padding-left: 22px; font-size: 14px; line-height: 1.45; }
.notes li::before { position: absolute; left: 0; top: 0; font-weight: 800; }
.notes li.good::before { content: "+"; color: var(--good); }
.notes li.bad::before { content: "–"; color: var(--bad); }
.drill { margin: 14px 0 0; padding: 10px 12px; background: var(--bg); border-radius: 10px; font-size: 13.5px; }

/* daily summary */
.grade-day { text-decoration: none; }
.cal-grade { margin-top: auto; font: 800 13px var(--display); letter-spacing: .02em; }
.ga { --g: #1f9d55; } .gb { --g: #5a9e1f; } .gc { --g: #c89a12; } .gd { --g: #d26a1e; } .gf { --g: #c0392b; }
.cal-day.grade-day { background: color-mix(in srgb, var(--g) 22%, var(--card)); }
.cal-day.grade-day .cal-grade { color: var(--g); }
.daily-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.daily-head h2 { margin: 2px 0 4px; }
.eyebrow { font: 700 11px var(--display); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.grade { flex: none; width: 74px; height: 74px; border-radius: 16px; display: grid; place-items: center; align-content: center;
  background: var(--g); color: #fff; font: 800 34px var(--display); line-height: 1; }
.grade small { font: 700 10px var(--body); letter-spacing: .08em; text-transform: uppercase; opacity: .85; margin-bottom: 2px; }
.speech { margin-top: 14px; font-size: 15px; line-height: 1.6; }
.speech p { margin: 0 0 12px; }
.speech .sig { font-weight: 700; color: var(--muted); }
.keystats { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 14px; }
.table-card { background: var(--bg); border-radius: 12px; padding: 12px; }
.table-head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.table-head b { font: 700 18px var(--display); text-transform: uppercase; }
.table-head span { font-size: 13px; color: var(--muted); }
.pts-bar { position: relative; height: 14px; background: var(--line); border-radius: 7px; margin: 30px 0 10px; }
.pts-fill { position: absolute; inset: 0 auto 0 0; background: var(--primary); border-radius: 7px; }
.pts-max { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(45deg, transparent 0 4px, color-mix(in srgb, var(--primary) 30%, transparent) 4px 7px); }
.mk { position: absolute; top: -6px; bottom: -6px; width: 2px; background: var(--ink); font-style: normal; }
.mk span { position: absolute; bottom: 100%; transform: translateX(-50%); white-space: nowrap; font-size: 10.5px; font-weight: 700; color: var(--muted); margin-bottom: 1px; }
.mk.hold span { transform: translateX(-80%); }
.mk.title span { transform: translateX(-20%); }
.mk.promo { background: var(--good); }
.mk.hold { background: var(--bad); }
.season-run { display: flex; gap: 4px; flex-wrap: wrap; margin: 6px 0 8px; }
.season-run .pill { width: 24px; height: 24px; font-size: 13px; }
.pill.todo { background: var(--line); color: var(--muted); }
.status { margin: 0; padding-left: 18px; font-size: 13.5px; display: grid; gap: 3px; }
.grade-day .cal-grade { order: 3; }
.mk.promo span { bottom: auto; top: 100%; margin: 2px 0 0; transform: translateX(-50%); }
.pts-bar { margin-bottom: 26px; }

/* league ladder (in-game style) */
.ladder { display: grid; gap: 10px; }
.lad-title { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.lad-title b { font: 800 20px var(--display); text-transform: uppercase; }
.lad-title span { font-size: 13px; color: var(--muted); font-weight: 600; }
.lad-track { display: flex; align-items: center; gap: 6px; padding: 6px 0 16px; }
.shield { flex: none; width: 42px; height: 48px; display: grid; place-items: center; font: 800 22px var(--display);
  color: #f3dc8e; background: linear-gradient(160deg, #3a3a3a, #141414);
  clip-path: polygon(50% 0, 100% 14%, 100% 58%, 50% 100%, 0 58%, 0 14%); }
.shield.cur { width: 54px; height: 62px; font-size: 28px; background: linear-gradient(160deg, #5b4d2c, #17140c); }
.shield.ghost { opacity: .45; width: 34px; height: 40px; font-size: 18px; }
.lad-seg { position: relative; flex: 1; min-width: 0; }
.lad-seg.ghost { flex: .55; opacity: .45; }
.lad-bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.lad-fill { height: 100%; background: var(--secondary); }
.lad-bar.danger .lad-fill { background: var(--bad); }
.lad-label { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); white-space: nowrap; font-weight: 700; font-size: 13px; color: var(--good); }
.promo-pips { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.promo-pips .pill { width: 26px; height: 26px; }
.promo-pips small { margin-left: 6px; font-weight: 700; font-size: 13px; }
.lives { display: flex; align-items: center; gap: 3px; font-size: 18px; color: var(--line); }
.lives .on { color: var(--bad); }
.lives small { font-size: 12px; color: var(--muted); margin-left: 4px; }
.lad-hist { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.lad-hist li { display: grid; grid-template-columns: 52px 1fr; gap: 6px; }
.lad-hist span { color: var(--muted); }

.chances { display: flex; gap: 8px; }
.chances span { width: 16px; height: 16px; border-radius: 50%; }
.chances .on { background: #3fa34d; }
.chances .off { background: #111; box-shadow: inset 0 0 0 1px var(--line); }

.lad-bar.gold { background: #d4af37; }
.lad-bar.gold .lad-fill { background: #d4af37; }
.lad-title span.promo-on { font-size: 15px; font-weight: 800; color: var(--ink); }

/* ladder editor */
.lad-title { position: relative; padding-right: 34px; }
.lad-gear { position: absolute; right: -4px; top: -4px; width: 32px; height: 32px; border-radius: 8px; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.lad-gear svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.lad-gear:hover, .lad-gear:focus-visible { background: var(--bg); color: var(--ink); outline: none; }
.lad-edit { display: grid; gap: 12px; }
.ed-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 14px; }
.ed-row > span { color: var(--muted); font-weight: 600; }
.ed-row select, .ed-row input { font: inherit; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); }
.ed-row input[type=number] { width: 72px; text-align: center; }
.seg-btns { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.seg-btns button, .stepper button, .ed-actions button { font: 600 13px var(--body); padding: 7px 11px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; }
.seg-btns button.on { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.seg-btns button:disabled { opacity: .4; cursor: default; }
.stepper { display: flex; gap: 6px; align-items: center; }
.stepper button { width: 34px; padding: 6px 0; }
.chances.tap button { width: 22px; height: 22px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; }
.chances.tap .on { background: #3fa34d; }
.chances.tap .off { background: #111; box-shadow: inset 0 0 0 1px var(--line); }
.ed-actions { display: flex; justify-content: flex-end; gap: 8px; }
.ed-actions .primary { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.ed-msg { margin: 0; font-size: 13px; color: var(--good); min-height: 1em; }
.ed-msg.err { color: var(--bad); }

.lassoism { margin: 12px 0 0; padding: 10px 12px; border-left: 3px solid var(--secondary); font-size: 14px; font-style: italic; }

/* The Good / The Bad / The Ugly */
.notes li.ugly::before { content: "!"; color: var(--ugly, #b3261e); }
.notes li.ugly { font-weight: 600; }
.ugly-label { color: var(--ugly, #b3261e); }
.weighed { font-size: 12px; opacity: .7; margin: 6px 0 0; }
.dplayer { border-top: 1px solid var(--line, rgba(127,127,127,.2)); padding: 10px 0; }
.dplayer summary { display: flex; justify-content: space-between; align-items: center; gap: 8px; cursor: pointer; list-style: none; }
.dplayer summary::-webkit-details-marker { display: none; }
.dplayer ul { margin: 8px 0 0; }
.ladder-day { font-size: 14px; margin: 0 0 8px; }
.rq { color: var(--ugly, #b3261e); font-weight: 700; }

/* Banner extras and box score */
.band-perfect { background: #f5c518; color: #1a1300; }
.pg { color: #b38600; font-weight: 700; }
.boxscore h3 { margin: 0 0 8px; }
.boxscore table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.boxscore th { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; opacity: .7; text-align: center; padding: 4px 4px 6px; }
.boxscore th:first-child, .boxscore td:first-child { text-align: left; }
.boxscore td { text-align: center; padding: 6px 4px; border-top: 1px solid var(--line, rgba(127,127,127,.2)); }
.boxscore td:first-child { font-weight: 600; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.boxscore .zero { opacity: .35; }
.boxscore .rq { font-size: 10px; }

/* All-time leaderboard */
.leaderboard h3 { margin: 0 0 4px; }
.lb-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 8px -4px 0; }
.leaderboard table { border-collapse: separate; border-spacing: 0; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.leaderboard th { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); padding: 6px 8px; text-align: right; cursor: pointer; user-select: none; }
.leaderboard td { padding: 8px; text-align: right; border-top: 1px solid var(--line, rgba(127,127,127,.2)); }
.leaderboard th.on, .leaderboard td.on { color: var(--ink); font-weight: 700; background: var(--draw-bg); }
.leaderboard .lb-name { position: sticky; left: 0; z-index: 1; text-align: left; background: var(--card, var(--bg)); max-width: 130px; overflow: hidden; text-overflow: ellipsis; }
.leaderboard td.lb-name a { color: inherit; text-decoration: none; font-weight: 600; }
.lb-rank { display: inline-block; width: 18px; color: var(--muted); font-weight: 400; }
.leaderboard .zero { opacity: .35; }

/* Daily Summary players: name left, match totals right-aligned in one column, rating as before */
.dplayers .dplayer summary, .dplayers .log-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 2.6em; align-items: center; gap: 12px; }
.dplayers .dplayer summary > span:first-child, .dplayers .log-row > span:first-child { text-align: left; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dplayers .ppos { text-align: right; min-width: 7.2em; font-variant-numeric: tabular-nums; }
.dplayers .r { text-align: right; margin-left: 0; }
.dplayers .rq { font-size: 11px; }
