/* Match Stats: SquadBase look. Dark by default, light for bright days. */
:root, html.theme-dark {
  --bg: #0E141B; --surface: #16202B; --surface-2: #1C2835; --line: #263545;
  --text: #E9EEF3; --dim: #9FB0C0; --accent: #1FE0A6; --gold: #F2C14E; --bad: #FF7A45;
  --on-accent: #0B1015; --grey: #71808F; --grey-text: #C3CDD7;
  --pitch: #12241C; --pitch-line: rgba(233, 238, 243, .32); --pitch-arc: rgba(242, 193, 78, .55);
  --card-border: 1px solid var(--line); --card-shadow: none;
  --accent-wash: rgba(31, 224, 166, .12); --gold-wash: rgba(242, 193, 78, .10); --bad-wash: rgba(255, 122, 69, .12);
  color-scheme: dark;
}
html.theme-light {
  --bg: #F3F5F7; --surface: #FFFFFF; --surface-2: #E9EEF3; --line: #D5DDE5;
  --text: #111A23; --dim: #4E5F71; --accent: #0A7F5E; --gold: #8A6200; --bad: #C9401A;
  --on-accent: #FFFFFF; --grey: #71808F; --grey-text: #4A5562;
  --pitch: #E3EFE8; --pitch-line: rgba(17, 26, 35, .35); --pitch-arc: rgba(138, 98, 0, .6);
  --card-border: 1px solid transparent; --card-shadow: 0 1px 2px rgba(17,26,35,.06), 0 4px 12px rgba(17,26,35,.06);
  --accent-wash: rgba(10, 127, 94, .10); --gold-wash: rgba(138, 98, 0, .08); --bad-wash: rgba(201, 64, 26, .08);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--text);
  font-family: 'Barlow', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px; line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
}
@media (min-width: 900px) { body { font-size: 17px; } }
button, input, select, textarea { font: inherit; color: inherit; }
.cond { font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif; font-weight: 700; }
.dim { color: var(--dim); }
.small { font-size: 14px; }
.label { font-size: 12px; text-transform: uppercase; letter-spacing: .8px; color: var(--dim); font-weight: 600; }
.hidden { display: none !important; }
svg.icon { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- top bar ---------- */
.topbar {
  height: 56px; background: var(--surface); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px; padding: 0 12px;
}
.home-pill {
  height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--accent);
  background: transparent; color: var(--accent); display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600; cursor: pointer;
}
.appname { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; }
.appname .t { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 22px; line-height: 1.05; }
.appname .sub { font-size: 13px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appname .stack { display: flex; flex-direction: column; min-width: 0; }
.appname svg.icon { color: var(--accent); width: 22px; height: 22px; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 8px; border: 1px solid var(--line); background: transparent;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text);
}
.menu {
  position: absolute; right: 12px; top: 52px; z-index: 50; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 8px; min-width: 240px; box-shadow: 0 8px 24px rgba(0,0,0,.35);
}
.menu .label { padding: 8px 8px 4px; }
.menu button.item {
  display: flex; width: 100%; align-items: center; gap: 10px; min-height: 48px; padding: 0 12px; border: 0;
  background: transparent; border-radius: 8px; text-align: left; cursor: pointer;
}
.menu button.item:active, .menu button.item.on { background: var(--surface-2); }
.menu button.item.on { color: var(--accent); font-weight: 600; }

/* ---------- tabs ---------- */
.tabs {
  display: flex; gap: 4px; padding: 0 12px; border-bottom: 1px solid var(--line); background: var(--bg);
  overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  height: 44px; padding: 0 16px; border: 0; background: transparent; color: var(--dim); cursor: pointer;
  border-bottom: 3px solid transparent; font-weight: 600; white-space: nowrap;
}
.tab.on { color: var(--text); border-bottom-color: var(--accent); }

main { max-width: 1280px; margin: 0 auto; padding: 16px; }
@media (max-width: 599px) { main { padding: 12px; } }

/* ---------- parts ---------- */
.card {
  background: var(--surface); border: var(--card-border); box-shadow: var(--card-shadow);
  border-radius: 12px; padding: 16px;
}
@media (min-width: 900px) { .card { padding: 16px 24px; } }
.card h2 { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 22px; margin: 0 0 12px; }
.card h3 { font-size: 15px; margin: 0 0 8px; font-weight: 600; }
h1.page { font-family: 'Barlow Condensed', sans-serif; font-size: 30px; margin: 8px 0 16px; }
.stack-16 > * + * { margin-top: 16px; }
.stack-12 > * + * { margin-top: 12px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }

.btn {
  min-height: 48px; padding: 0 18px; border-radius: 8px; font-weight: 700; font-size: 16px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1.5px solid var(--line); background: transparent; color: var(--text);
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.danger { border-color: var(--bad); color: var(--bad); }
.btn.gold { border-color: var(--gold); color: var(--gold); }
.btn.block { width: 100%; }
.btn:active { filter: brightness(1.15); }
.btn:focus-visible, .tab:focus-visible, .icon-btn:focus-visible, .seg button:focus-visible, .pad-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.seg { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 4px; gap: 4px; flex-wrap: wrap; }
.seg button {
  min-height: 40px; padding: 0 16px; border-radius: 999px; border: 0; background: transparent; cursor: pointer;
  font-weight: 600; color: var(--dim);
}
.seg button.on { background: var(--accent); color: var(--on-accent); }
.seg.full { display: flex; }
.seg.full button { flex: 1; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field input, .field select {
  height: 48px; background: var(--surface-2); border: 1.5px solid var(--line); border-radius: 8px; padding: 0 12px;
}
.field input:focus, .field select:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 599px) { .grid-2 { grid-template-columns: 1fr; } }

.tip {
  border-left: 3px solid var(--gold); background: var(--gold-wash); padding: 10px 12px; border-radius: 0 8px 8px 0;
  font-size: 15px;
}
.tip a, .tip button.link { color: var(--gold); font-weight: 600; }
button.link { background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; }

.empty { text-align: center; padding: 32px 16px; }
.empty > svg.icon { width: 40px; height: 40px; color: var(--dim); }
.empty p { margin: 12px 0 16px; color: var(--dim); }

.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 599px) { .checks { grid-template-columns: 1fr; } }
.check {
  display: flex; gap: 12px; align-items: center; min-height: 52px; padding: 6px 12px; border-radius: 8px;
  background: var(--surface-2); cursor: pointer; border: 1.5px solid transparent;
}
.check.on { border-color: var(--accent); }
.check .box {
  width: 24px; height: 24px; border-radius: 6px; border: 2px solid var(--dim); flex: none;
  display: flex; align-items: center; justify-content: center;
}
.check.on .box { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.check .box svg.icon { width: 16px; height: 16px; stroke-width: 3; }
.check .w { font-weight: 600; }
.check .h { font-size: 13px; color: var(--dim); }

/* ---------- home ---------- */
.match-list { display: grid; gap: 12px; }
@media (min-width: 900px) { .match-list { grid-template-columns: 1fr 1fr; } }
.match-card { display: flex; align-items: center; gap: 12px; cursor: pointer; min-height: 72px; text-align: left; width: 100%; color: var(--text); }
.match-card .teams { font-weight: 700; font-size: 18px; }
.match-card .score { font-family: 'Barlow Condensed', sans-serif; font-size: 22px; font-weight: 700; white-space: nowrap; }

/* ---------- tag page ---------- */
.clockbar {
  position: sticky; top: 0; z-index: 20; background: var(--bg); padding: 8px 0 12px; margin: -4px 0 4px;
}
.scoreline { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.scoreline .team { min-width: 0; }
.scoreline .team .n { font-size: 14px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scoreline .team .s { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 30px; line-height: 1; }
.scoreline .team .s .tot { font-size: 18px; color: var(--dim); }
.scoreline .team .bd { font-size: 12px; color: var(--dim); }
.scoreline .team.r { text-align: right; }
.scoreline .clock { text-align: center; }
.scoreline .clock .c { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 34px; line-height: 1; font-variant-numeric: tabular-nums; }
.scoreline .clock .ph { font-size: 12px; text-transform: uppercase; letter-spacing: .8px; color: var(--dim); }
.clock-actions { display: flex; gap: 8px; margin-top: 10px; }
.clock-actions .btn { flex: 1; min-height: 44px; padding: 0 8px; font-size: 15px; }
.adding-banner { margin-top: 8px; }

.pad { display: grid; gap: 12px; }
.pad-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pad-cols.single { grid-template-columns: 1fr; }
.pad-col h3 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .8px; color: var(--dim); }
.pad-col.us h3 { color: var(--accent); }
.pad-col .stack-8 > * + * { margin-top: 8px; }
.pad-btn {
  width: 100%; min-height: 72px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface);
  cursor: pointer; text-align: left; padding: 10px 14px; display: flex; flex-direction: column; justify-content: center;
  box-shadow: var(--card-shadow);
}
.pad-btn .w { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 24px; line-height: 1.1; }
.pad-btn .h { font-size: 13px; color: var(--dim); }
.pad-col.us .pad-btn { border-color: var(--accent); }
.pad-btn:active { background: var(--surface-2); }
.pad-shared { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
@media (max-width: 599px) { .pad-shared { grid-template-columns: repeat(3, 1fr); } }
.pad-shared .pad-btn { min-height: 60px; }
.pad-shared .pad-btn .w { font-size: 19px; }
.num-strip { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; }
@media (max-width: 599px) { .num-strip { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.num-btn {
  min-height: 48px; border-radius: 8px; border: 1.5px solid var(--line); background: var(--surface-2); cursor: pointer;
  font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 22px;
}
.num-btn:active { background: var(--accent); color: var(--on-accent); }

.lastfive .item, .log .item {
  display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 0; border-top: 1px solid var(--line);
}
.lastfive .item:first-of-type, .log .item:first-of-type { border-top: 0; }
.item .time { font-variant-numeric: tabular-nums; color: var(--dim); width: 44px; flex: none; font-size: 14px; }
.item .what { flex: 1; min-width: 0; }
.item .what .sub { font-size: 13px; color: var(--dim); }
.item .tm { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; flex: none; }
.item .tm.us { background: var(--accent-wash); color: var(--accent); }
.item .tm.opp { background: var(--surface-2); color: var(--dim); }
.item .btn { min-height: 40px; padding: 0 12px; font-size: 14px; }
.log .add-here { display: flex; justify-content: center; }
.log .add-here button { font-size: 13px; color: var(--dim); background: none; border: 0; min-height: 32px; cursor: pointer; }
.log h3 { margin: 16px 0 4px; }

/* ---------- tag sheet ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 100; background: rgba(5, 9, 13, .6); display: flex; align-items: flex-end; justify-content: center; }
.sheet {
  background: var(--bg); width: 100%; max-width: 720px; max-height: 100%; overflow: auto; border-radius: 16px 16px 0 0;
  padding: 16px; border-top: 1px solid var(--line);
}
@media (min-width: 900px) { .sheet-wrap { align-items: center; } .sheet { border-radius: 16px; border: 1px solid var(--line); } }
@media (max-width: 599px) { .sheet { min-height: 100%; border-radius: 0; } }
.sheet-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.sheet-head .t { flex: 1; }
.sheet-head .t .k { font-size: 13px; color: var(--dim); }
.sheet-head .t .q { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 26px; line-height: 1.1; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choices.three { grid-template-columns: repeat(3, 1fr); }
.choice {
  min-height: 72px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer;
  font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 24px; padding: 8px; line-height: 1.1;
}
.choice .h { display: block; font-family: 'Barlow', sans-serif; font-weight: 400; font-size: 13px; color: var(--dim); }
.choice.good { border-color: var(--accent); color: var(--accent); }
.choice.good .h { color: var(--dim); }
.choice.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.choice:active { background: var(--surface-2); }
.sheet .num-strip { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.sheet .num-btn { min-height: 56px; font-size: 24px; }
.num-btn .nm { display: block; font-family: 'Barlow', sans-serif; font-weight: 400; font-size: 11px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 2px; }
.pitch-tap { max-width: 360px; margin: 0 auto; }
.pitch-tap svg { width: 100%; height: auto; display: block; touch-action: manipulation; cursor: crosshair; border-radius: 8px; }
.sheet-foot { display: flex; gap: 8px; margin-top: 16px; }
.sheet-foot .btn { flex: 1; }
.from-row { margin-bottom: 12px; }

/* ---------- pitch ---------- */
svg.pitch .pitch-bg { fill: var(--pitch); }
svg.pitch .pl { fill: none; stroke: var(--pitch-line); stroke-width: .5; }
svg.pitch .pl-thin { stroke-width: .35; }
svg.pitch .pl-arc { stroke: var(--pitch-arc); stroke-width: .6; stroke-dasharray: 2 1.5; }
svg.pitch .pl-goal { stroke: var(--text); stroke-width: 1.4; }
svg.pitch .pitch-label { font-size: 4px; fill: var(--dim); font-family: 'Barlow', sans-serif; }
svg.pitch .pitch-end { font-size: 5.5px; font-weight: 700; fill: var(--dim); font-family: 'Barlow', sans-serif; letter-spacing: .3px; }
svg.pitch .pitch-end.us { fill: var(--accent); }
svg.pitch .dot-marker { fill: var(--gold); stroke: var(--bg); stroke-width: .8; }
svg.pitch .d-us { fill: var(--accent); }
svg.pitch .d-us-o { fill: none; stroke: var(--accent); stroke-width: .9; }
svg.pitch .d-opp { fill: var(--grey); }
svg.pitch .d-opp-o { fill: none; stroke: var(--grey); stroke-width: .9; }
svg.pitch .d-miss line { stroke: var(--grey); stroke-width: .9; }
svg.pitch .d-goal { fill: var(--gold); }

/* ---------- board ---------- */
.board { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .board { grid-template-columns: repeat(2, minmax(0, 1fr)); } .board .wide { grid-column: 1 / -1; } }
@media (min-width: 1200px) { .board { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.board .card { padding: 16px; }
.board-tools { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.chain { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.chain th { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--dim); font-weight: 600; text-align: right; padding: 4px 6px; vertical-align: bottom; }
.chain th:first-child, .chain td:first-child { text-align: left; }
.chain td { text-align: right; padding: 8px 6px; border-top: 1px solid var(--line); }
.chain td .big { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 24px; }
.chain td .pc { font-size: 13px; color: var(--dim); display: block; }
.chain tr.us td:first-child { color: var(--accent); font-weight: 700; }
.chain tr.opp td:first-child { color: var(--dim); font-weight: 700; }
.tbl { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 15px; }
.tbl th { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--dim); font-weight: 600; text-align: right; padding: 4px 4px; }
.tbl th:first-child, .tbl td:first-child { text-align: left; }
.tbl td { text-align: right; padding: 8px 4px; border-top: 1px solid var(--line); }
.tbl tr.total td { font-weight: 700; }
.nett-pos { color: var(--accent); font-weight: 700; }
.nett-neg { color: var(--bad); font-weight: 700; }
.ko-wrap { display: grid; grid-template-columns: 120px 1fr; gap: 12px; align-items: start; }
.ko-wrap svg.pitch { width: 120px; height: auto; border-radius: 6px; }
.ko-card { container-type: inline-size; }
@container (max-width: 480px) { .ko-wrap { grid-template-columns: minmax(0, 1fr); } .ko-wrap svg.pitch { width: 140px; margin: 0 auto; display: block; } }
.ko-wrap > div { min-width: 0; }
.kept { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.kept .big { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 36px; line-height: 1; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--dim); margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; vertical-align: -1px; }
.legend i.us { background: var(--accent); } .legend i.us-o { border: 2px solid var(--accent); }
.legend i.opp { background: var(--grey); } .legend i.opp-o { border: 2px solid var(--grey); }
.legend i.goal { background: var(--gold); }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tile .k { overflow-wrap: anywhere; }
.tile { background: var(--surface-2); border-radius: 8px; padding: 8px 10px; }
.tile .v { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 24px; line-height: 1.1; }
.tile .k { font-size: 12px; color: var(--dim); line-height: 1.2; }
.team-label { font-size: 13px; font-weight: 700; margin: 12px 0 6px; }
.team-label.us { color: var(--accent); } .team-label.opp { color: var(--dim); }
.points-list { margin: 0; padding: 0; list-style: none; }
.points-list li { padding: 8px 0 8px 18px; position: relative; border-top: 1px solid var(--line); }
.points-list li:first-child { border-top: 0; }
.points-list li::before { content: ''; position: absolute; left: 0; top: 15px; width: 8px; height: 8px; border-radius: 50%; }
.points-list.fix li::before { background: var(--bad); }
.points-list.keep li::before { background: var(--accent); }
.bar3 { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; align-items: center; font-size: 14px; }
.hbar { height: 10px; border-radius: 5px; background: var(--surface-2); position: relative; overflow: hidden; }
.hbar span { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; }
.hbar.us span { background: var(--accent); } .hbar.opp span { background: var(--grey); }
.shot-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.shot-wrap svg.pitch { width: 100%; height: auto; border-radius: 6px; }

/* skeleton */
.sk { background: var(--surface-2); border-radius: 8px; animation: skp 1.2s ease-in-out infinite; }
@keyframes skp { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .sk { animation: none; } }

.toast {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 200; background: var(--surface);
  border: 1px solid var(--accent); color: var(--text); padding: 12px 18px; border-radius: 999px; font-weight: 600;
  box-shadow: 0 6px 20px rgba(0,0,0,.35); max-width: calc(100% - 32px); pointer-events: none;
}
.saved-chip { font-size: 13px; color: var(--accent); font-weight: 600; }
details.more > summary { cursor: pointer; min-height: 48px; display: flex; align-items: center; font-weight: 600; list-style: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::after { content: '+'; margin-left: auto; color: var(--dim); font-size: 22px; }
details.more[open] > summary::after { content: '\2212'; }
.sheet-grid { display: grid; grid-template-columns: 44px minmax(0, 1fr) minmax(0, 0.55fr); gap: 6px 8px; align-items: center; }
.sheet-grid .hd { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .6px; color: var(--dim); }
.sheet-grid .hd:first-child { text-align: center; }
.sheet-grid input { height: 44px; background: var(--surface-2); border: 1.5px solid var(--line); border-radius: 8px; padding: 0 10px; width: 100%; }
.sheet-grid .no { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 20px; text-align: center; }
.pts-grid { display: grid; grid-template-columns: 1fr 88px; gap: 6px 12px; align-items: center; font-size: 15px; }
.pts-grid input { height: 44px; background: var(--surface-2); border: 1.5px solid var(--line); border-radius: 8px; padding: 0 8px; width: 100%; text-align: center; }

@media (min-width: 700px) { .chain-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

/* online */
.sync-chip { font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.sync-chip.ok { color: var(--accent); background: var(--accent-wash); }
.sync-chip.warn { color: var(--gold); background: var(--gold-wash); }
@media (max-width: 420px) { .sync-chip { font-size: 12px; padding: 3px 8px; } }
.code-input {
  height: 48px; width: 9ch; flex: 1; min-width: 0; background: var(--surface-2); border: 1.5px solid var(--line); border-radius: 8px;
  padding: 0 12px; font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 24px; letter-spacing: 3px; text-transform: uppercase;
}
.share-code { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 44px; letter-spacing: 6px; line-height: 1.1; }
.share-wrap { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.share-wrap .qr { width: 168px; height: 168px; background: #FFFFFF; border-radius: 8px; padding: 6px; flex: none; }
.share-wrap .qr svg { width: 100%; height: 100%; display: block; }

.sync-chip .short { display: none; }
@media (max-width: 520px) { .sync-chip .long { display: none; } .sync-chip .short { display: inline; } }
.appname .t { white-space: nowrap; }

/* board page 2 */
.board-tools .seg + .seg { margin-left: 0; }
.alerts { list-style: none; margin: 0; padding: 0; }
.alerts li { display: flex; gap: 12px; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--line); }
.alerts li:first-child { border-top: 0; }
.alerts .tag { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.alerts .watch .tag { color: var(--bad); background: var(--bad-wash); }
.alerts .good .tag { color: var(--accent); background: var(--accent-wash); }
svg.worm { display: block; height: auto; }
svg.worm .grid { stroke: var(--line); stroke-width: 1; }
svg.worm .axis0 { stroke: var(--dim); stroke-width: 1.2; }
svg.worm .ht { stroke: var(--gold); stroke-width: 1.2; stroke-dasharray: 4 4; }
svg.worm .ax { fill: var(--dim); font-size: 12px; font-family: 'Barlow', sans-serif; }
svg.worm .lead-us { fill: var(--accent); font-weight: 600; }
svg.worm .lead-now { fill: var(--text); font-weight: 700; }
svg.worm .worm-line { fill: none; stroke: var(--text); stroke-width: 2.5; stroke-linejoin: round; }
svg.worm .worm-goal { fill: var(--gold); stroke: var(--surface); stroke-width: 2; }
svg.worm .run-us { fill: var(--accent-wash); }
svg.worm .run-opp { fill: rgba(113, 128, 143, .18); }
.poss-blocks { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; align-items: end; }
.poss-blocks .pb { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; align-items: end; text-align: center; }
.poss-blocks .bar { border-radius: 3px 3px 0 0; min-height: 2px; }
.poss-blocks .bar.us { background: var(--accent); } .poss-blocks .bar.opp { background: var(--grey); }
.poss-blocks .n { grid-column: 1 / -1; font-size: 11px; color: var(--text); font-variant-numeric: tabular-nums; }
.poss-blocks .m { grid-column: 1 / -1; font-size: 11px; color: var(--dim); }
@media (max-width: 520px) { .poss-blocks .n { display: none; } .poss-blocks .m { font-size: 10px; } }
.points-list.runs li.us::before { background: var(--accent); }
.points-list.runs li.opp::before { background: var(--grey); }
.points-list .still { color: var(--gold); font-weight: 600; }
.tbl-scroll { overflow-x: auto; }
.tbl.players td { vertical-align: top; }
.contrib { display: inline-flex; align-items: center; gap: 6px; justify-content: flex-end; }
.contrib .cb { height: 8px; border-radius: 4px; display: inline-block; }
.contrib .cb.pos { background: var(--accent); } .contrib .cb.neg { background: var(--bad); }
@media (max-width: 520px) { .hide-sm { display: none; } .contrib .cb { display: none; } }

/* ---------- report (fixed print colours: printed pages stay white) ---------- */
.r-preview { display: grid; gap: 16px; justify-items: center; }
.r-preview .r-wrap { width: 100%; max-width: 794px; overflow: hidden; border-radius: 8px; box-shadow: 0 2px 12px rgba(0,0,0,.25); background: #FFFFFF; }
.r-page {
  width: 794px; min-height: 1123px; box-sizing: border-box; padding: 40px 40px 72px; position: relative;
  background: #FFFFFF; color: #111A23; font-family: 'Barlow', Arial, sans-serif; font-size: 13px; line-height: 1.4;
}
.r-page h3 { font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif; font-weight: 700; font-size: 18px; margin: 18px 0 8px; color: #111A23; }
.r-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; border-bottom: 2px solid #111A23; padding-bottom: 12px; }
.r-title { font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif; font-weight: 700; font-size: 32px; line-height: 1.05; }
.r-sub { color: #4E5F71; font-size: 13px; margin-top: 4px; }
.r-mark { font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif; font-weight: 700; font-size: 16px; letter-spacing: .5px; white-space: nowrap; }
.r-mark .sq { color: #111A23; } .r-mark .bs { color: #0A7F5E; }
.r-scores { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin-top: 18px; }
.r-scores .v { font-family: 'Barlow Condensed', sans-serif; font-size: 22px; color: #4E5F71; }
.r-score { background: #F3F5F7; border-radius: 10px; padding: 12px 16px; }
.r-score.us { border-left: 5px solid #0A7F5E; }
.r-score.opp { border-left: 5px solid #71808F; }
.r-score .n { font-weight: 600; font-size: 15px; }
.r-score .s { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 42px; line-height: 1; }
.r-score .s span { font-size: 22px; color: #4E5F71; }
.r-score .b { font-size: 12px; color: #4E5F71; margin-top: 2px; }
.r-result { font-size: 18px; font-weight: 600; margin: 14px 0 0; }
.r-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.r-tbl { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.r-tbl th { text-align: right; font-size: 11px; color: #4E5F71; font-weight: 600; padding: 4px 6px; border-bottom: 1px solid #D5DDE5; }
.r-tbl th.us { color: #0A7F5E; }
.r-tbl th:first-child, .r-tbl td:first-child { text-align: left; }
.r-tbl td { text-align: right; padding: 5px 6px; border-bottom: 1px solid #E9EEF3; }
.r-tbl tr.tot td { font-weight: 700; }
.r-tbl small { color: #4E5F71; font-size: 11px; }
.r-tbl td small { white-space: nowrap; }
.r-tbl td:first-child small { display: block; white-space: normal; }
.r-tbl.players th, .r-tbl.players td { padding: 4px 5px; font-size: 12px; }
.r-list { margin: 0; padding: 0 0 0 16px; }
.r-list li { margin: 0 0 6px; }
.r-list.good li::marker { color: #0A7F5E; }
.r-list.fix li::marker { color: #C9401A; }
.r-list.runs li.us::marker { color: #0A7F5E; }
.r-list.runs li.opp::marker { color: #71808F; }
.r-dim { color: #4E5F71; font-size: 12px; margin: 6px 0 0; }
.r-ko { display: grid; grid-template-columns: 110px 1fr; gap: 12px; align-items: start; }
.r-ko svg, .r-maps svg { width: 100%; height: auto; display: block; border-radius: 4px; }
.r-maps { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.r-cap { font-weight: 700; font-size: 12px; margin-bottom: 4px; color: #4E5F71; }
.r-cap.us { color: #0A7F5E; }
.r-foot { position: absolute; left: 40px; right: 40px; bottom: 24px; display: flex; gap: 16px; justify-content: space-between; align-items: center; color: #4E5F71; font-size: 11px; border-top: 1px solid #D5DDE5; padding-top: 8px; }
#reportCapture { position: fixed; left: -10000px; top: 0; width: 794px; }
.report-busy { opacity: .6; pointer-events: none; }

/* possession chain */
.chain2 { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)) repeat(2, minmax(0, 1.1fr)); gap: 4px; }
.chain2 .chev, .chain2 .cbox { padding: 8px 14px 8px 18px; min-height: 64px; display: flex; flex-direction: column; justify-content: center; }
.chain2 .chev { clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%, 12px 50%); margin-right: -10px; }
.chain2 .chev:first-child { clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%); padding-left: 12px; }
.chain2 .cbox { border-radius: 8px; margin-left: 12px; padding-left: 12px; }
.chain2 .k { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; line-height: 1.2; }
.chain2 .v { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 26px; line-height: 1.1; }
.chain2 .v small { font-size: 15px; font-weight: 600; }
.chain2.us .chev:nth-child(odd) { background: var(--accent); color: var(--on-accent); }
.chain2.us .chev:nth-child(even) { background: color-mix(in srgb, var(--accent) 78%, var(--bg)); color: var(--on-accent); }
.chain2.opp .chev:nth-child(odd) { background: var(--surface-2); color: var(--text); }
.chain2.opp .chev:nth-child(even) { background: color-mix(in srgb, var(--surface-2) 70%, var(--line)); color: var(--text); }
.chain2 .cbox { background: var(--surface-2); color: var(--text); }
.chain2.us .cbox { box-shadow: inset 0 0 0 1.5px var(--accent); }
.chain2 .k { opacity: .85; }
@media (max-width: 899px) {
  .chain2 { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 6px; }
  .chain2 .chev:nth-child(4) { clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%); padding-left: 12px; }
  .chain2 .cbox { margin-left: 0; }
  .chain2 .v { font-size: 22px; }
}
/* zone cells on the pitch */
svg.pitch .cell-hi { fill: var(--accent); opacity: .9; }
svg.pitch .cell-mid { fill: var(--gold); opacity: .9; }
svg.pitch .cell-lo { fill: var(--grey); opacity: .9; }
svg.pitch .cell-t { fill: var(--on-accent); font-family: 'Barlow Condensed', sans-serif; font-weight: 700; }
html.theme-dark svg.pitch .cell-t-lo { fill: #FFFFFF; }
.legend i.cl-hi { background: var(--accent); border-radius: 2px; } .legend i.cl-mid { background: var(--gold); border-radius: 2px; } .legend i.cl-lo { background: var(--grey); border-radius: 2px; }
.last5 { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.last5 .chip { width: 26px; height: 26px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.last5 .chip.good { background: var(--accent); color: var(--on-accent); }
.last5 .chip.bad { background: var(--grey); color: #FFFFFF; }
/* worm extras */
svg.worm .run-lbl-us { fill: var(--accent); font-weight: 700; }
svg.worm .run-lbl-opp { fill: var(--dim); font-weight: 700; }
svg.worm .end-tag.us { fill: var(--accent); } svg.worm .end-tag.opp { fill: var(--grey); } svg.worm .end-tag.lvl { fill: var(--surface-2); }
svg.worm .end-tag-t { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 14px; fill: #FFFFFF; }
svg.worm .end-tag-t.us { fill: var(--on-accent); } svg.worm .end-tag-t.lvl { fill: var(--text); }
.sw-tag { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--dim); margin-right: 8px; }

.pad-btn.next { border-color: var(--gold) !important; box-shadow: 0 0 0 2px var(--gold) inset; }
.pad-btn .nx { color: var(--gold); font-weight: 700; }

/* attacking half on the tap pitch */
svg.pitch .hl-half { fill: var(--gold); opacity: .22; }
svg.pitch .dim-half { fill: #000000; opacity: .38; }
html.theme-light svg.pitch .dim-half { fill: #FFFFFF; opacity: .55; }
svg.pitch .hl-label { fill: var(--gold); font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 6.5px; }

/* guide */
.guide { max-width: 820px; }
.g-links { display: flex; flex-wrap: wrap; gap: 8px; }
.g-links .btn { min-height: 44px; font-size: 15px; font-weight: 600; }
.g-sec p, .g-sec li, .g-sec dd { line-height: 1.55; }
.g-sec ol, .g-sec ul { padding-left: 22px; margin: 8px 0; }
.g-sec li { margin: 6px 0; }
.g-sec h4 { margin: 16px 0 6px; font-size: 16px; }
.g-dl dt { font-weight: 700; margin-top: 12px; }
.g-dl dd { margin: 2px 0 0; color: var(--text); }
.g-tip { border-left: 3px solid var(--gold); background: var(--gold-wash); padding: 10px 12px; border-radius: 0 8px 8px 0; }
.g-sec { scroll-margin-top: 12px; }

/* step-by-step guide */
.g-intro { font-size: 18px; margin: -6px 0 16px; }
.g-choices { display: grid; gap: 12px; grid-template-columns: 1fr; margin-bottom: 24px; }
@media (min-width: 700px) { .g-choices { grid-template-columns: 1fr 1fr; } }
.g-choice { display: flex; flex-direction: column; gap: 4px; text-align: left; cursor: pointer; color: var(--text); min-height: 112px; border: 1.5px solid var(--accent) !important; }
.g-choice .g-ct { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 26px; line-height: 1.1; }
.g-choice .g-ch { color: var(--dim); font-size: 15px; }
.g-choice .g-cs { color: var(--accent); font-weight: 700; font-size: 14px; margin-top: auto; }
.g-h2 { font-family: 'Barlow Condensed', sans-serif; font-size: 24px; margin: 24px 0 12px; }
.g-look summary { font-size: 17px; }
.g-step { max-width: 980px; margin: 0 auto; padding-bottom: 96px; }
.g-prog { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; margin: 4px 0 10px; }
.g-prog span { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.g-meta { display: flex; justify-content: space-between; align-items: center; color: var(--dim); font-size: 14px; font-weight: 600; }
.g-meta .link { color: var(--dim); min-height: 44px; }
.g-title { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 32px; line-height: 1.1; margin: 8px 0 12px; }
.g-lead { font-size: 20px; line-height: 1.45; margin: 0 0 12px; }
.g-pts { margin: 0; padding: 0; list-style: none; }
.g-pts li { font-size: 17px; line-height: 1.45; padding: 8px 0 8px 22px; position: relative; border-top: 1px solid var(--line); }
.g-pts li:first-child { border-top: 0; }
.g-pts li::before { content: ''; position: absolute; left: 2px; top: 17px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.g-note { border-left: 3px solid var(--gold); background: var(--gold-wash); padding: 10px 12px; border-radius: 0 8px 8px 0; margin: 12px 0 0; font-size: 16px; }
.g-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .g-grid { grid-template-columns: 1fr 1fr; align-items: start; } }
.g-shots { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; }
.g-shots img { display: block; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); scroll-snap-align: start; max-height: 520px; width: auto; max-width: 100%; height: auto; }
.g-shots.g-n1 { justify-content: center; }
.g-shots.g-n2 img, .g-shots.g-n3 img { max-width: 78%; }
@media (min-width: 900px) { .g-shots.g-n2 img { max-width: 48%; } .g-shots.g-n3 img { max-width: 32%; } }
.g-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; gap: 12px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line); }
.g-nav .btn { flex: 1; min-height: 56px; font-size: 18px; }
.g-end .g-nav { position: static; border: 0; padding: 12px 0; }
.g-all { margin-bottom: 12px; break-inside: avoid; }
.g-all .g-shots img { max-height: 360px; }
.g-newhere { margin-bottom: 16px; }
@media print {
  .topbar, .tabs, .g-nav, [data-act=guide-home], [data-act=guide-print], [data-act=guide-back] { display: none !important; }
  html, body { background: #FFFFFF !important; }
  main { padding: 0 !important; }
  .card { break-inside: avoid; box-shadow: none !important; border: 1px solid #D5DDE5 !important; background: #FFFFFF !important; }
  .g-all { padding: 12px 16px !important; margin-bottom: 10px; }
  .g-all .g-grid { grid-template-columns: 1.5fr 1fr; gap: 16px; }
  .g-all .g-shots { overflow: visible; flex-wrap: nowrap; }
  .g-all .g-shots img { max-height: 260px; }
  .g-all .g-shots.g-n2, .g-all .g-shots.g-n3 { flex-wrap: wrap; }
  .g-all .g-shots.g-n2 img, .g-all .g-shots.g-n3 img { max-width: 30%; max-height: 170px; }
  .g-all .g-lead { font-size: 15px; } .g-all .g-pts li { font-size: 13px; padding: 4px 0 4px 20px; } .g-all .g-pts li::before { top: 10px; }
  .g-all .g-note { font-size: 13px; }
  .g-h2 { break-after: avoid; }
}

/* dd-mm-yyyy over the phone's own date box */
.date-wrap { position: relative; display: block; }
.date-wrap input { width: 100%; color: transparent; caret-color: transparent; }
.date-wrap input::-webkit-datetime-edit { color: transparent; }
.date-wrap .dv { position: absolute; left: 12px; top: 0; height: 48px; display: flex; align-items: center; pointer-events: none; color: var(--text); font-variant-numeric: tabular-nums; }

/* ---------- rugby ---------- */
.pad.rugby .pad-btn { min-height: 58px; padding: 8px 12px; }
.pad.rugby .pad-btn .w { font-size: 21px; }
.pad.rugby .pad-col .stack-8 > * + * { margin-top: 6px; }
@media (max-width: 599px) {
  .pad.rugby .pad-btn { min-height: 52px; padding: 6px 10px; }
  .pad.rugby .pad-btn .w { font-size: 19px; }
  .pad.rugby .pad-btn:not(.next) .h { display: none; }
}
.pad-mini { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
.pad-mini .pad-btn.mini { min-height: 48px; padding: 6px 10px; }
.pad-mini .pad-btn.mini .w { font-size: 17px; }
.pad-mini .pad-btn.mini .h { display: none; }
.pad-mini .pad-btn.mini.next .h { display: block; }
.sinbins { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.sinbins .sb { font-size: 13px; padding: 4px 10px; border-radius: 999px; border: 1.5px solid var(--bad); color: var(--text); background: var(--surface); }
.sinbins .sb b { font-variant-numeric: tabular-nums; }
.hbt-seg button { min-height: 48px; font-size: 17px; font-weight: 700; }
/* Tackle strip with a team sheet: initials big, number underneath. */
.num-btn.ini { min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; padding: 4px 2px; }
.num-btn.ini .i { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 22px; letter-spacing: .5px; }
.num-btn.ini .n { font-family: 'Barlow', sans-serif; font-weight: 600; font-size: 12px; color: var(--dim); margin-top: 3px; }
.num-btn.ini:active .n { color: inherit; }
/* Shooting efficiency stands out. */
.tbl .eff { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 1.45em; margin-left: 4px; color: var(--text); vertical-align: -1px; }
.tbl .eff.us { color: var(--accent); }
.num-btn.ini.long .i { font-size: 17px; letter-spacing: 0; }
.num-btn.ini.xlong .i { font-size: 14px; letter-spacing: 0; white-space: normal; line-height: 1.05; overflow-wrap: anywhere; }
.num-btn.ini .i { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
/* B132: Undo first and widest; half / full time asks for a second tap. */
.clock-actions .undo-btn { flex: 1.4; }
.clock-actions .btn.confirm { background: var(--gold); color: #111A23; border-color: var(--gold); font-weight: 700; }
/* B133: rugby on a wide screen: two buttons a row in each team's column, taller, so the whole pad fits. */
@media (min-width: 900px) {
  .pad.rugby .pad-col .stack-8 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .pad.rugby .pad-col .stack-8 > * + * { margin-top: 0; }
  .pad.rugby .pad-btn { min-height: 68px; }
  .pad.rugby .pad-mini { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.theme-light .clock-actions .btn.confirm { color: #FFFFFF; }
/* Work rate: hooks, blocks and tackles per player (board card and report page). */
.wr-key { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--dim); margin: 12px 0 6px; }
.wr-key i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.wr-row { display: grid; grid-template-columns: minmax(0, 7.5em) minmax(0, 1fr) 2.2em; gap: 8px; align-items: center; margin: 5px 0; }
.wr-row .nm { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wr-row .bar { display: flex; height: 22px; border-radius: 5px; overflow: hidden; background: var(--surface-2); }
.wr-row .sg { display: flex; align-items: center; justify-content: center; font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 14px; color: #0B1117; min-width: 0; }
.wr-row .sg + .sg { border-left: 2px solid var(--surface); }
.wr-row .tot { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 18px; text-align: right; }
.wr-hook { background: var(--accent); } .wr-block { background: var(--gold); } .wr-tackle { background: var(--dim); }
.r-wr-tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 6px 0 8px; }
.r-wr-tile { background: #F3F5F7; border-radius: 8px; padding: 8px 10px; }
.r-wr-tile .v { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 26px; color: #111A23; line-height: 1.1; }
.r-wr-tile .k { font-size: 11px; color: #4E5F71; text-transform: uppercase; letter-spacing: .5px; }
.r-wr-key { display: flex; gap: 16px; font-size: 12px; color: #4E5F71; margin: 8px 0 4px; }
.r-wr-key i { display: inline-block; width: 11px; height: 11px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.r-wr-row { display: grid; grid-template-columns: 170px 1fr 34px; gap: 8px; align-items: center; margin: 4px 0; font-size: 12px; color: #111A23; }
.r-wr-row .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r-wr-row .bar { display: flex; height: 18px; background: #EEF2F5; border-radius: 3px; overflow: hidden; }
.r-wr-row .sg { display: flex; align-items: center; justify-content: center; color: #FFFFFF; font-weight: 700; font-size: 11px; }
.r-wr-row .sg + .sg { border-left: 1.5px solid #FFFFFF; }
.r-wr-row .tot { text-align: right; font-weight: 700; font-size: 14px; }

/* ---------- inside SquadBase (stats.html): SquadBase's top bar is the one top bar ---------- */
html.ms-hub .topbar { height: auto; min-height: 52px; background: var(--bg); border-bottom: 0; padding: 6px 12px 0; position: relative; }
html.ms-hub .topbar .home-pill { height: 44px; }
.appname .t.sm { font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.ms-hub .menu { top: 56px; }
.file-btn { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; align-self: flex-start; }
.tip .btn.on { border-color: var(--accent); color: var(--accent); }
/* SquadBase's light look turns filled gold buttons white-on-gold; ours is an outline, so keep the gold text */
html.ms-hub.theme-light .btn.gold { color: var(--gold) !important; }
/* how joining works: numbered steps */
ol.steps { margin: 4px 0 0; padding-left: 22px; display: grid; gap: 8px; color: var(--text); line-height: 1.45; }
ol.steps li::marker { color: var(--accent); font-weight: 700; }

/* ---------- season view ---------- */
.ss-trends { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 700px) { .ss-trends { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .ss-trends { grid-template-columns: 1fr 1fr 1fr; } }
.ss-trend { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }
.ss-th { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-weight: 600; }
.ss-th b { font-family: 'Barlow Condensed', sans-serif; font-size: 24px; color: var(--accent); white-space: nowrap; }
.ss-th b small { font-family: 'Barlow', sans-serif; font-size: 12px; color: var(--dim); font-weight: 600; }
svg.ss-spark { width: 100%; height: 74px; display: block; margin: 4px 0; }
.ss-line { fill: none; stroke: var(--accent); stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.ss-avg { stroke: var(--dim); stroke-width: 1.5; stroke-dasharray: 5 5; vector-effect: non-scaling-stroke; }
.ss-dot { fill: var(--surface); stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; }
.ss-dot.last { fill: var(--accent); }
.ss-better { color: var(--accent); }
.ss-worse { color: var(--bad); }
.ss-rec .ss-v2 { font-size: 16px; color: var(--dim); }
.ss-res { display: inline-block; min-width: 22px; text-align: center; border-radius: 6px; font-weight: 700; font-size: 13px; padding: 1px 5px; margin-left: 4px; }
.ss-res.W { background: var(--accent); color: var(--on-accent); }
.ss-res.D { background: var(--surface-2); color: var(--text); border: 1px solid var(--line); }
.ss-res.L { background: transparent; color: var(--text); border: 1.5px solid var(--dim); }
tr.ss-open { cursor: pointer; }
tr.ss-open td { min-height: 44px; }
tr.ss-open:hover td { background: var(--accent-wash); }
.ss-detail > td { background: var(--surface-2); padding: 6px 8px 10px; }
.ss-lines { font-size: 14px; }
.ss-cmp-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ss-sel { min-height: 44px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); padding: 0 8px; width: 100%; }
.ss-cmp td.ss-best { color: var(--accent); font-weight: 700; }
@media (max-width: 560px) { .ss-matches .hide-sm, .ss-players .hide-sm { display: none; } }
.ss-matches th:nth-child(2), .ss-matches td:nth-child(2), .ss-lines th:first-child { text-align: left; }
.ss-matches td:first-child { white-space: nowrap; }
