/* Gambia Decides 2026. Tokens and rules are documented in /DESIGN.md.
   Kola-dark page, cream ink, and two warm clay objects (the tally tray and the country)
   that carry every candidate colour. Only marbles are round. */
:root {
  --page: #21121a; --surface: #2c1a24; --raise: #3a2430; --line: #523746;
  --ink: #fcefe0; --ink-2: #dcc7c8; --ink-3: #ab919b;
  --clay: #ebd0ba; --clay-2: #dcbb9f; --clay-3: #c39a7d; --clay-ink: #2a1420; --clay-ink-2: #5b4350;
  --hole-a: #a67f66; --hole-b: #cfa98c;
  --water: #24788a; --water-2: #24788a; --water-ink: #d9f2f5;
  --accent: #74d3de; --warn: #ffb454; --warn-ink: #2a1420;
  --btn: #fcefe0; --btn-ink: #2a1420;
  --shadow: 0 14px 34px rgba(8, 2, 5, .5);
  --display: "Avenir Next Condensed", "DIN Condensed", "Roboto Condensed", Bahnschrift, "Arial Narrow", sans-serif-condensed, system-ui, sans-serif;
  --text: "Avenir Next", "Segoe UI", Roboto, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --page: #fbf1e2; --surface: #fff9ef; --raise: #f4e4cc; --line: #e0c9a8;
  --ink: #2a1420; --ink-2: #55404a; --ink-3: #765e68;
  --clay: #f0d6bf; --clay-2: #e2c2a6; --clay-3: #c9a182; --clay-ink: #2a1420; --clay-ink-2: #5b4350;
  --hole-a: #b08a70; --hole-b: #d8b497;
  --water: #86cad3; --water-2: #86cad3; --water-ink: #113f4a;
  --accent: #0f6f82; --warn: #9a5b00; --warn-ink: #ffffff;
  --btn: #2a1420; --btn-ink: #fcefe0;
  --shadow: 0 14px 34px rgba(90, 50, 20, .22);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font: 15px/1.45 var(--text); font-variant-numeric: tabular-nums lining-nums;
  -webkit-font-smoothing: antialiased; min-height: 100vh; overflow-x: hidden;
}
h1, h2, h3, h4, p, ul, dl, dd, figure { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.ic { width: 18px; height: 18px; flex: none; }
kbd { font: 600 12px var(--text); padding: 1px 6px; border-radius: 6px; background: var(--raise); box-shadow: inset 0 -1.5px 0 var(--line); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--btn); color: var(--btn-ink); padding: 8px 12px; border-radius: 10px; }
.skip:focus { top: 8px; }
.quiet-t { color: var(--ink-3); }
.warn-t { color: var(--warn); font-weight: 600; }

/* ---------- top bar ---------- */
.top {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 16px;
  padding: 8px 24px; background: color-mix(in srgb, var(--page) 88%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.brand-mark { width: 34px; height: 34px; }
.bm-hole { fill: var(--clay); } .bm-ball { fill: #1f4e9c; }
.brand-text { display: grid; line-height: 1.05; }
.brand-text strong { font: 700 21px/1 var(--display); letter-spacing: .01em; }
.brand-text small { font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.nav { display: flex; gap: 4px; }
.nav a { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: 12px; text-decoration: none; font-weight: 600; color: var(--ink-2); }
.nav a:hover { background: var(--surface); color: var(--ink); }
.nav a[aria-current] { background: var(--raise); color: var(--ink); }
.top-status { margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--ink-2); min-width: 0; }
.watch { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; padding: 4px 10px; border-radius: 999px; background: var(--water); color: var(--water-ink); font-weight: 600; white-space: nowrap; }
.watch.bad { background: var(--warn); color: var(--warn-ink); }
.sync { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; flex: none; }
.sync i { width: 9px; height: 9px; border-radius: 2px; background: var(--ink-3); flex: none; }
.sync[data-state="live"] i { background: var(--accent); animation: beat 2.4s ease-in-out infinite; }
.sync[data-state="offline"] { color: var(--warn); font-weight: 600; } .sync[data-state="offline"] i { background: var(--warn); }
.clock { font: 600 15px var(--display); letter-spacing: .03em; color: var(--ink); white-space: nowrap; }
.top-acts { display: flex; gap: 8px; flex: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 14px; border: 0; border-radius: 12px; font-weight: 600; font-size: 14px; white-space: nowrap; text-decoration: none; }
.btn.primary { background: var(--btn); color: var(--btn-ink); }
.btn.primary:hover { filter: brightness(.93); }
.btn.quiet { background: transparent; color: var(--ink-2); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.quiet:hover { color: var(--ink); background: var(--surface); }
.btn.quiet[aria-pressed="true"] { background: var(--raise); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.btn.icon { width: 40px; padding: 0; }
.link { background: none; border: 0; padding: 0; display: inline-flex; align-items: center; gap: 6px; text-decoration: underline; text-underline-offset: 3px; color: var(--ink-2); }
.link:hover { color: var(--ink); }

/* ---------- page ---------- */
#app { max-width: 1440px; margin: 0 auto; padding: 24px 24px 16px; outline: none; }
.foot { max-width: 1440px; margin: 0 auto; padding: 16px 24px 32px; color: var(--ink-3); font-size: 13px; display: flex; gap: 12px 24px; justify-content: space-between; flex-wrap: wrap; }
.foot p:first-child { max-width: 90ch; }
.foot-acts { display: flex; gap: 16px; }
.tabbar { display: none; }

/* ---------- marbles, holes, drums ---------- */
.mb {
  --s: 18px; display: inline-block; width: var(--s); height: var(--s); border-radius: 50%; flex: none;
  background: radial-gradient(circle at 34% 28%, rgba(255,255,255,.82) 0 7%, rgba(255,255,255,.22) 22%, transparent 42%),
    radial-gradient(circle at 44% 40%, transparent 52%, rgba(0,0,0,.34) 100%), var(--c);
  box-shadow: 0 0 0 2px var(--clay), 0 0 0 3px rgba(42,20,32,.22);
}
.mb.sm { --s: 11px; box-shadow: 0 0 0 1.5px var(--clay); }
.mb.hd { --s: .56em; margin-right: .18em; box-shadow: 0 0 0 .05em var(--clay); vertical-align: .05em; }
.mb.lg { --s: 44px; }
.mb.flat { background: var(--c); }
.mb.hole { background: linear-gradient(var(--hole-a), var(--hole-b)); box-shadow: inset 0 2px 3px rgba(40,15,20,.4), 0 0 0 2px var(--clay); }
.mb.hole.sm { box-shadow: inset 0 1px 2px rgba(40,15,20,.4), 0 0 0 1.5px var(--clay); }
.drum { width: 28px; height: 36px; flex: none; }

/* ---------- hero ---------- */
.hero { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.say h1 { font: 700 clamp(38px, 6.4vw, 76px)/.96 var(--display); letter-spacing: -.005em; text-wrap: balance; }
.say .sub { margin-top: 12px; font-size: 17px; line-height: 1.5; color: var(--ink-2); max-width: 58ch; }
.hero-feeds { margin-top: 12px; display: grid; gap: 8px; }
.hero-feeds li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 8px 12px; border-radius: 12px; background: var(--surface); max-width: 58ch; }
.hero-feeds .ic { color: var(--accent); } .hero-feeds .bad .ic { color: var(--warn); }
.hero-feeds span { color: var(--ink-2); }
.progress { margin-top: 24px; }
.count { font-size: 16px; font-weight: 600; color: var(--ink-2); }
.count b { font: 700 40px/1 var(--display); color: var(--ink); margin-right: 4px; }
.meter { display: flex; gap: 2px; height: 18px; margin-top: 8px; }
.meter i, .meter-key i { flex: 1; border-radius: 2px; background: var(--raise); }
.meter i.official, .meter-key i.official { background: var(--ink); }
.meter i.provisional, .meter-key i.provisional { background: repeating-linear-gradient(135deg, var(--ink) 0 2px, transparent 2px 4.5px); box-shadow: inset 0 0 0 1px var(--ink-3); }
.meter i.differ { background: var(--warn); box-shadow: none; }
.meter-key { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; font-size: 13px; color: var(--ink-2); }
.meter-key span { display: inline-flex; align-items: center; gap: 6px; }
.meter-key i { flex: none; width: 10px; height: 14px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px 24px; margin-top: 24px; }
.stats div { display: flex; flex-direction: column-reverse; justify-content: flex-end; }
.stats dd { font: 700 30px/1.05 var(--display); }
.stats dt { font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.stats.tight { margin-top: 16px; }

/* the tray: every candidate colour sits on clay */
.tray { background: var(--clay); color: var(--clay-ink); border-radius: 24px; padding: 16px 20px 8px; }
.tray.inset { border-radius: 16px; padding: 4px 16px; margin-top: 16px; }
.tray > header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; padding-bottom: 8px; }
.tray h2 { font: 700 22px/1.1 var(--display); }
.tray > header span, .tray > footer { font-size: 13px; color: var(--clay-ink-2); }
.tray > footer { display: flex; align-items: center; gap: 8px; padding: 8px 0 4px; border-top: 1px solid var(--clay-2); }
.t-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; column-gap: 12px; row-gap: 6px; align-items: center; padding: 10px 0; border-top: 1px solid var(--clay-2); }
.tray.inset .t-row:first-child { border-top: 0; }
.t-row .drum { grid-row: 1; }
.t-who { min-width: 0; }
.t-who b { display: block; font-weight: 600; font-size: 16px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-who span { display: block; font-size: 12.5px; color: var(--clay-ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-fig { text-align: right; line-height: 1.1; }
.t-fig b { display: block; font: 700 22px/1 var(--display); }
.t-fig span { font-size: 13px; color: var(--clay-ink-2); }
.t-bar { grid-column: 2 / -1; position: relative; height: 14px; background: linear-gradient(var(--clay-2), var(--clay-2)) left center / 100% 2px no-repeat; }
.t-bar i { position: absolute; left: 0; top: 1px; height: 12px; min-width: 10px; border-radius: 3px 7px 7px 3px; background: var(--c); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 70%, #000); transition: width .8s cubic-bezier(.2,.8,.2,1); }
.t-bar i::after {
  content: ""; position: absolute; right: -6px; top: -3px; width: 18px; height: 18px; border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, rgba(255,255,255,.82) 0 7%, rgba(255,255,255,.22) 22%, transparent 42%),
    radial-gradient(circle at 44% 40%, transparent 52%, rgba(0,0,0,.34) 100%), var(--c);
  box-shadow: 0 0 0 2px var(--clay), inset 0 0 0 1px rgba(0,0,0,.2);
}
.t-tick { position: absolute; top: -3px; width: 3px; height: 20px; margin-left: -1.5px; border-radius: 1.5px; background: var(--clay-ink); box-shadow: 0 0 0 1.5px var(--clay); }
.t-tick.demo { position: static; flex: none; height: 14px; margin: 0; }
.t-led { grid-column: 2 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 3px; }
.t-led i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0,0,0,.28); }
.t-led span { font-size: 12.5px; color: var(--clay-ink-2); margin-left: 6px; }
.t-row.zero .t-fig b { opacity: .4; }
.t-row.lead .t-who b { font-size: 19px; }
.t-row.lead .t-fig b { font-size: 32px; }
.t-row.lead .t-bar { height: 18px; }
.t-row.lead .t-bar i { height: 16px; }
.t-row.lead .t-bar i::after { width: 22px; height: 22px; }
.t-row.lead .t-tick { height: 24px; }

/* ---------- map ---------- */
.mapcard { margin-top: 24px; background: var(--surface); border-radius: 24px; overflow: hidden; }
.map-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px 24px; padding: 16px 20px 0; }
.map-head h2 { font: 700 26px/1.1 var(--display); }
.map-head p { color: var(--ink-2); margin-top: 4px; max-width: 70ch; }
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--raise); flex: none; }
.seg button { border: 0; background: transparent; height: 34px; padding: 0 12px; border-radius: 9px; font-weight: 600; font-size: 14px; color: var(--ink-2); }
.seg button[aria-pressed="true"], .seg button[aria-checked="true"] { background: var(--btn); color: var(--btn-ink); }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 12px 20px; font-size: 13px; color: var(--ink-2); }
.legend > span { display: inline-flex; align-items: center; gap: 7px; }
.legend b { color: var(--ink); }
.legend .mb { --s: 14px; }
.legend-note { color: var(--ink-3); }
.legend-note .ic { color: var(--warn); }
.key { display: inline-grid; place-items: center; width: 14px; height: 14px; border-radius: 50%; background: var(--clay-3); flex: none; font: 700 10px var(--text); color: var(--warn-ink); }
.key.seal { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink); margin: 0 3px; }
.key.plain { box-shadow: 0 0 0 2px var(--clay); }
.key.flag { background: var(--warn); }
.map svg { display: block; width: 100%; height: auto; }
.mapsvg { font-family: var(--text); -webkit-tap-highlight-color: transparent; }
.mapsvg .land { fill: var(--clay); }
.mapsvg .border { fill: none; stroke: var(--clay-3); stroke-width: 1.6; stroke-dasharray: 5 4; stroke-linejoin: round; }
.mapsvg .divider { fill: none; stroke: var(--clay-3); stroke-width: 1.2; stroke-dasharray: 2 5; stroke-linecap: round; }
.mapsvg .sea { fill: var(--water); }
.mapsvg .riv { fill: var(--water-2); }
.mapsvg .bol { fill: none; stroke: var(--water-2); stroke-width: 3; stroke-linecap: round; }
.mapsvg .isle { fill: var(--clay); stroke: var(--clay-3); stroke-width: 1; }
.mapsvg .geo-t { fill: var(--ink-3); font-style: italic; letter-spacing: .04em; }
.mapsvg .geo-t.on-water { fill: var(--water-ink); opacity: .85; }
.mapsvg .geo-t.on-land { fill: var(--clay-ink-2); }
.mapsvg .zone { fill: color-mix(in srgb, var(--clay-3) 40%, transparent); stroke: var(--clay-ink); stroke-width: 1.2; stroke-dasharray: 3 3; }
.mapsvg .mini { stroke: rgba(42,20,32,.5); stroke-width: .7; }
.mapsvg .mini.await { fill: var(--hole-a); }
.mapsvg .lens-link path { fill: none; stroke: var(--water-ink); stroke-width: 1.2; stroke-dasharray: 3 4; opacity: .7; }
.mapsvg .lens .sea { fill: var(--water-2); }
.mapsvg .lens-frame { fill: none; stroke: var(--water-ink); stroke-width: 2; opacity: .85; }
.mapsvg .lbl { fill: var(--clay-ink); font-weight: 600; paint-order: stroke; stroke: var(--clay); stroke-width: 3.2px; stroke-linejoin: round; pointer-events: none; }
.mapsvg .rlabel text { font-family: var(--display); font-weight: 700; letter-spacing: .03em; fill: var(--ink); }
.mapsvg .rlabel .rc { fill: var(--ink-3); font-weight: 600; }
.mapsvg .rlabel:hover .rn, .mapsvg .rlabel:focus-visible .rn { text-decoration: underline; }
.mapsvg .lens .rlabel text { fill: var(--clay-ink); paint-order: stroke; stroke: var(--clay); stroke-width: 4px; stroke-linejoin: round; }
.mapsvg .lens .rlabel .rc { fill: var(--clay-ink-2); }
.mk { cursor: pointer; outline: none; }
.mk .hit { fill: transparent; }
.mk .hole { fill: url(#hole-g); stroke: rgba(42,20,32,.4); stroke-width: 1; }
.mk .rim { fill: none; stroke: rgba(30,10,18,.5); stroke-width: 1; }
.mk .seal { fill: none; stroke: var(--clay-ink); stroke-width: 2.2; }
.mk .flag circle { fill: var(--warn); stroke: var(--clay-ink); stroke-width: 1; }
.mk .flag path { fill: none; stroke: var(--warn-ink); stroke-width: 1.9; stroke-linecap: round; }
.mk .ball, .mk .hole { transform-box: fill-box; transform-origin: center; transition: transform .16s ease-out; }
.mk:hover .ball, .mk:focus-visible .ball, .mk.sel .ball { transform: scale(1.14); }
.mk:hover .hole, .mk.sel .hole { stroke: var(--clay-ink); stroke-width: 2.2; }
.mk:focus-visible .hole { stroke: var(--accent); stroke-width: 3.5; }
.mk.past .rim { stroke-dasharray: 2.5 2; stroke: rgba(30,10,18,.75); }
.mk.dim, .mini.dim, .lbl.dim, .lens.dim, .zone.dim { opacity: .28; }
.mk .halo { fill: none; stroke: var(--clay-ink); stroke-width: 3; animation: halo 1.8s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.mk.target .hole { stroke: var(--clay-ink); stroke-width: 2; }
.map.boot .mk .hole { animation: seat .5s cubic-bezier(.2,.9,.3,1.25) both; animation-delay: calc(var(--i) * 16ms + 120ms); }
.map.boot .mk .ball { animation: seat .5s cubic-bezier(.2,.9,.3,1.25) both; animation-delay: calc(var(--i) * 16ms + 320ms); }
.mk.fresh .ball { animation: drop 1s cubic-bezier(.3,1.5,.5,1) both; }
.mk.fresh .hole { animation: ring 1.6s ease-out; }
.strips { display: grid; gap: 16px; padding-bottom: 4px; }
.strip figcaption { font: 700 17px var(--display); padding: 0 16px 6px; letter-spacing: .01em; }
.lens-strip svg { max-width: 400px; padding: 0 16px; }
.locator .map { border-radius: 12px; overflow: hidden; background: var(--surface); }
.locator .mk { pointer-events: none; }
.locator .mk.target { pointer-events: auto; }

/* ---------- sections that sit on the page under a rule ---------- */
.band { display: grid; gap: 24px; margin-top: 24px; grid-template-columns: minmax(0, 1fr); }
.panel { border-top: 2px solid var(--ink); padding-top: 12px; min-width: 0; }
.panel-h { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; margin-bottom: 8px; }
.panel-h h2 { font: 700 22px/1.1 var(--display); }
.panel-h span, .panel-h a { font-size: 13px; color: var(--ink-3); }
.panel-h a { text-underline-offset: 3px; } .panel-h a:hover { color: var(--ink); }
.sub-h { font: 700 16px var(--display); margin: 16px 0 6px; letter-spacing: .01em; }
.empty { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 28px 16px; color: var(--ink-2); }
.empty b { font: 700 22px/1.15 var(--display); color: var(--ink); }
.empty span { max-width: 46ch; }
.empty .btn { margin-top: 8px; }
.empty.small { padding: 16px; justify-items: start; text-align: left; background: var(--surface); border-radius: 14px; }
.empty.small .ic { color: var(--accent); width: 22px; height: 22px; }

/* feed */
.fi { display: flex; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--line); text-decoration: none; }
.fi:hover { background: var(--surface); }
.fi.new { animation: flash 2.6s ease-out; }
.fi-b { min-width: 0; flex: 1; display: grid; gap: 4px; }
.fi-t { display: flex; justify-content: space-between; gap: 8px; }
.fi-t b { font-size: 16px; } .fi-t time { color: var(--ink-3); font-size: 13px; }
.fi-v { display: flex; flex-wrap: wrap; gap: 2px 14px; color: var(--ink-2); font-size: 14px; }
.fi-v span { display: inline-flex; align-items: center; gap: 6px; } .fi-v b { color: var(--ink); }
.fi-m { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.src { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--raise); color: var(--ink); font: 700 11px var(--text); flex: none; }
.src.auto { background: var(--water); color: var(--water-ink); }

/* chips and statuses: pills carry status by weight and icon, never by hue alone */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: var(--raise); color: var(--ink-2); font-size: 13px; border: 0; white-space: nowrap; }
.chip b { color: var(--ink); } .chip .ic { width: 14px; height: 14px; }
.chip.pick { height: 34px; padding: 0 12px; }
.chip.pick:hover { color: var(--ink); }
.chip.pick[aria-pressed="true"], .chip.pick[aria-checked="true"], .chip.solid { background: var(--btn); color: var(--btn-ink); }
.chip.pick[aria-pressed="true"] b, .chip.pick[aria-checked="true"] b { color: inherit; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.st { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.st .ic { width: 14px; height: 14px; }
.st.declared { background: var(--ink); color: var(--page); }
.st.prov { box-shadow: inset 0 0 0 1.5px var(--ink-3); color: var(--ink-2); }
.st.await { box-shadow: inset 0 0 0 1.5px var(--line); color: var(--ink-3); }
.st.differ { background: var(--warn); color: var(--warn-ink); }

/* share bar: a clay groove so dark and light colours both read */
.share { display: flex; gap: 2px; height: 16px; padding: 2px; border-radius: 8px; background: var(--clay); min-width: 0; }
.share span { min-width: 3px; background: var(--c); border-radius: 2px; display: grid; align-items: center; overflow: hidden; }
.share span:first-child { border-radius: 6px 2px 2px 6px; } .share span:last-child { border-radius: 2px 6px 6px 2px; } .share span:only-child { border-radius: 6px; }
.share.empty { background: none; box-shadow: inset 0 0 0 1.5px var(--line); }
.share em { font-style: normal; font-size: 12.5px; font-weight: 600; color: var(--ink); padding: 0 8px; white-space: nowrap; }
.tray .share, .tip .share { background: var(--clay-2); }

/* region rows */
.rrow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px 12px; align-items: center; padding: 9px 4px; border-bottom: 1px solid var(--line); text-decoration: none; }
.rrow:hover { background: var(--surface); }
.rr-n b { font-size: 16px; } .rr-n small { color: var(--ink-3); font-size: 13px; margin-left: 8px; }
.rr-l { justify-self: end; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink-2); } .rr-l b { color: var(--ink); }
.rrow .share { grid-column: 1 / -1; grid-row: 2; }

/* sources */
.feeds { display: grid; gap: 8px; }
.feeds li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px; border-radius: 14px; background: var(--surface); }
.f-ic { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--water); color: var(--water-ink); }
.feeds .bad .f-ic { background: var(--warn); color: var(--warn-ink); }
.f-body { display: grid; gap: 2px; min-width: 0; }
.f-body b { font-size: 16px; } .f-body a { text-underline-offset: 3px; }
.f-detail { color: var(--ink-2); } .f-meta { color: var(--ink-3); font-size: 13px; }
.f-err { color: var(--warn); font-size: 13px; overflow-wrap: anywhere; }
.f-n { text-align: right; font-size: 12px; color: var(--ink-3); line-height: 1.1; }
.f-n b { display: block; font: 700 24px/1 var(--display); color: var(--ink); }
.close { display: grid; }
.close a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 12px; padding: 8px 4px; border-bottom: 1px solid var(--line); text-decoration: none; }
.close a:hover { background: var(--surface); }
.close span { grid-column: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 5px; color: var(--ink-2); font-size: 13px; }
.close em { grid-column: 2; grid-row: 1 / 3; align-self: center; font: 700 22px var(--display); font-style: normal; }

/* ---------- inner pages ---------- */
.page-h { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px 24px; margin-bottom: 16px; }
.page-h h1 { font: 700 clamp(34px, 5vw, 56px)/1 var(--display); }
.page-h p { color: var(--ink-2); margin-top: 8px; max-width: 70ch; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; font-size: 14px; }
.crumbs a { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 10px 0 6px; border-radius: 10px; background: var(--surface); text-decoration: none; color: var(--ink-2); }
.crumbs a:hover { color: var(--ink); background: var(--raise); }
.crumbs a + a { padding-left: 10px; }
.cols { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.stack { display: grid; gap: 24px; min-width: 0; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.search { flex: 1 1 240px; position: relative; display: flex; align-items: center; }
.search .ic { position: absolute; left: 12px; color: var(--ink-3); }
.search input[type="search"] { padding-left: 40px; }
input[type="text"], input[type="search"], input[type="number"], input[type="url"], textarea, select {
  width: 100%; height: 44px; padding: 0 12px; border: 0; border-radius: 12px; background: var(--surface); color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--line); font-size: 16px;
}
textarea { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.4; }
input::placeholder, textarea::placeholder { color: var(--ink-3); }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 0; box-shadow: inset 0 0 0 2px var(--accent); border-radius: 12px; }
.sel { display: flex; align-items: center; gap: 8px; color: var(--ink-3); font-size: 13px; }
.sel select { width: auto; padding-right: 8px; }
#app > .chips { margin-bottom: 8px; }
.rows { margin-top: 8px; }
.group-h { display: flex; align-items: baseline; gap: 12px; padding: 20px 4px 6px; font: 700 20px var(--display); border-bottom: 2px solid var(--ink); }
.group-h:first-child { padding-top: 4px; }
.group-h a { text-decoration: none; } .group-h a:hover { text-decoration: underline; text-underline-offset: 3px; }
.group-h span { font: 500 13px var(--text); color: var(--ink-3); }
.row { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; padding: 10px 6px; border-bottom: 1px solid var(--line); text-decoration: none; }
.row:hover { background: var(--surface); }
.r-n b { display: block; font-size: 16px; line-height: 1.2; } .r-n small { color: var(--ink-3); font-size: 13px; }
.r-bar { grid-column: 2 / -1; grid-row: 2; }
.r-l { grid-column: 2 / -1; grid-row: 3; font-size: 14px; color: var(--ink-2); }
.r-l b { color: var(--ink); } .r-l small { margin-left: 8px; color: var(--ink-3); font-size: 13px; }
.r-s { display: flex; align-items: center; gap: 8px; justify-self: end; }
.r-s time { color: var(--ink-3); font-size: 13px; }
.row.await .r-bar { display: none; } .row.await .r-l { grid-row: 2; }

.res-h { font: 700 clamp(26px, 3.6vw, 40px)/1.02 var(--display); text-wrap: balance; }
.panel .sub { color: var(--ink-2); margin-top: 8px; }
.banner { display: flex; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--warn); color: var(--warn-ink); margin-bottom: 12px; }
.banner .ic { margin-top: 2px; }
.reg-edit { display: grid; gap: 6px; margin-top: 12px; font-size: 13px; color: var(--ink-3); }
.past-y { padding: 10px 0; border-top: 1px solid var(--line); }
.past-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 6px; }
.past-h b { font: 700 22px var(--display); } .past-h span { color: var(--ink-3); font-size: 13px; }
.past-l { margin-top: 8px; display: grid; gap: 4px; }
.past-l li, .swing li { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 8px; align-items: center; font-size: 14px; }
.past-l small { color: var(--ink-3); }
.swing { padding-bottom: 12px; } .swing .sub-h { margin-top: 0; }
.swing ul { display: grid; gap: 4px; }
.swing b { display: inline-flex; align-items: center; gap: 4px; } .swing b .ic { width: 15px; height: 15px; }
.swing .quiet-t { font-size: 13px; margin-top: 6px; }
.reports { margin-top: 24px; border-top: 2px solid var(--ink); padding-top: 12px; }
.rc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 12px; }
.rc { background: var(--surface); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.rc.cur { box-shadow: inset 0 0 0 2px var(--ink); }
.rc > header { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.rc > header b { display: block; font-size: 16px; line-height: 1.2; } .rc > header span { font-size: 13px; color: var(--ink-3); }
.rc > header .btn { width: 34px; height: 34px; box-shadow: none; }
.rc-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.rc-v { display: grid; gap: 5px; }
.rc-v li { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto 50px; gap: 8px; align-items: center; color: var(--ink-2); }
.rc-v b { color: var(--ink); font-weight: 600; } .rc-v em { font-style: normal; text-align: right; color: var(--ink-3); font-size: 13px; }
.rc-v li.is-top span, .rc-v li.is-top b { font-weight: 700; color: var(--ink); }
.rc-sum, .rc-note, .rc-st { font-size: 13px; color: var(--ink-3); }
.rc-note { color: var(--ink-2); }
.rc-stbar { height: 6px; border-radius: 3px; background: var(--raise); margin-bottom: 4px; overflow: hidden; }
.rc-stbar i { display: block; height: 100%; background: var(--accent); }
.rc-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); text-underline-offset: 3px; min-width: 0; margin-top: auto; }
.rc-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; }
.pager a { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border-radius: 12px; background: var(--surface); text-decoration: none; font-weight: 600; }
.pager a:hover { background: var(--raise); }

/* ---------- tooltip, toasts ---------- */
.tip { position: fixed; z-index: 60; width: 272px; padding: 12px 14px; border-radius: 16px; background: var(--clay); color: var(--clay-ink); box-shadow: var(--shadow); pointer-events: none; }
.tip h4 { font: 700 21px/1.1 var(--display); display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.tip h4 small { font: 500 12.5px var(--text); color: var(--clay-ink-2); white-space: nowrap; flex: none; }
.tp-m { font-size: 13px; color: var(--clay-ink-2); margin: 4px 0 8px; }
.tp-r { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto 46px; gap: 8px; align-items: center; font-size: 14px; padding: 2px 0; }
.tp-r span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-r em { font-style: normal; text-align: right; color: var(--clay-ink-2); font-size: 13px; }
.tip .share { margin-top: 8px; }
.tp-a { display: flex; gap: 8px; margin-top: 12px; }
.tp-a .btn.primary { background: var(--clay-ink); color: var(--clay); flex: 1; }
.tp-a .btn.quiet { color: var(--clay-ink); box-shadow: inset 0 0 0 1.5px var(--clay-3); }
.tip.peek { pointer-events: auto; left: 12px; right: 12px; top: auto; bottom: calc(84px + env(safe-area-inset-bottom)); width: auto; max-width: 440px; margin: 0 auto; }
.toasts { position: fixed; z-index: 70; top: 68px; right: 16px; display: grid; gap: 8px; width: min(340px, calc(100vw - 32px)); }
.toast { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 16px; background: var(--clay); color: var(--clay-ink); box-shadow: var(--shadow); text-decoration: none; cursor: pointer; animation: toast .5s cubic-bezier(.2,.9,.3,1.2) both; }
.toast .mb { --s: 26px; }
.toast b { display: block; font: 700 19px/1.1 var(--display); } .toast span { font-size: 13.5px; color: var(--clay-ink-2); }

/* ---------- sheets ---------- */
.sheet { width: min(640px, calc(100vw - 24px)); max-height: min(92vh, 900px); padding: 0; border: 0; border-radius: 24px; background: var(--page); color: var(--ink); box-shadow: var(--shadow), 0 0 0 1px var(--line); overflow: hidden; }
.sheet.small { width: min(420px, calc(100vw - 24px)); }
.sheet[open] { display: flex; }
.sheet > form, .sheet > div { display: flex; flex-direction: column; min-height: 0; width: 100%; }
.sheet::backdrop { background: rgba(18, 6, 12, .62); }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 16px 20px 12px; }
.sheet-head h2 { font: 700 28px/1.05 var(--display); } .sheet-head p { color: var(--ink-2); margin-top: 4px; }
.sheet-body { padding: 4px 20px 16px; overflow: auto; display: grid; gap: 16px; }
.sheet-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }
.field { display: grid; gap: 6px; min-width: 0; }
.field-label { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; }
.field-label .total { margin-left: auto; font-weight: 500; color: var(--ink-3); }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.hint { font-size: 13px; color: var(--ink-3); min-height: 1em; } .hint.ok { color: var(--accent); font-weight: 600; }
.paste textarea { background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.form-error { color: var(--warn); font-weight: 600; min-height: 1.2em; }
.combo { position: relative; }
.combo-list { position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 4px); max-height: 260px; overflow: auto; background: var(--raise); border-radius: 12px; padding: 4px; box-shadow: var(--shadow); }
.combo-list li { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.combo-list li small { color: var(--ink-3); font-size: 13px; }
.combo-list li[aria-selected="true"], .combo-list li:hover { background: var(--btn); color: var(--btn-ink); }
.combo-list li[aria-selected="true"] small, .combo-list li:hover small { color: inherit; }
.combo-list li.none { display: block; color: var(--ink-3); cursor: default; background: none; }
.vote-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 8px; }
.vote { display: grid; grid-template-columns: 24px minmax(0, 1fr) 104px; gap: 10px; align-items: center; padding: 6px 6px 6px 10px; border-radius: 14px; background: var(--clay); color: var(--clay-ink); }
.vote .drum { width: 24px; height: 31px; }
.vote span { font-weight: 600; font-size: 14px; line-height: 1.2; }
.vote input { height: 40px; background: #fff8ef; color: var(--clay-ink); box-shadow: inset 0 0 0 1.5px var(--clay-3); text-align: right; font-weight: 600; }
.vote input::placeholder { color: #9a8088; }
.vote.filled { box-shadow: 0 0 0 2px var(--ink); }
.sheet .seg { align-self: start; }
.sheet .seg button { height: 38px; }
.set-row { display: grid; grid-template-columns: 44px minmax(0, 1.3fr) minmax(0, 1.3fr) 84px; gap: 8px; }
.set-row input[type="color"] { width: 44px; height: 44px; padding: 3px; border: 0; border-radius: 12px; background: var(--clay); }
.keys { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; align-items: center; }
.keys dt { justify-self: start; }

/* ---------- motion ---------- */
@keyframes beat { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.72); } }
@keyframes seat { from { opacity: 0; transform: scale(.2); } to { opacity: 1; transform: none; } }
@keyframes drop { 0% { opacity: 0; transform: translateY(-54px) scale(.7); } 45% { opacity: 1; transform: translateY(0) scale(1.18); } 70% { transform: translateY(-7px) scale(1); } 100% { transform: none; } }
@keyframes ring { 0% { stroke-width: 1; } 30% { stroke: var(--clay-ink); stroke-width: 10; stroke-opacity: .45; } 100% { stroke-width: 1; } }
@keyframes halo { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.25); opacity: .35; } }
@keyframes flash { 0% { background: var(--raise); } 100% { background: transparent; } }
@keyframes toast { from { opacity: 0; transform: translateY(-14px) scale(.96); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- wider screens ---------- */
@media (min-width: 720px) {
  .band { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .band .panel:last-child { grid-column: 1 / -1; }
  .row { grid-template-columns: 18px minmax(0, 1.25fr) minmax(90px, 1.5fr) minmax(0, 1.2fr) auto; }
  .r-bar, .r-l { grid-column: auto; grid-row: auto; }
  .row.await .r-bar { display: block; } .row.await .r-l { grid-row: auto; }
  .r-l small { display: block; margin-left: 0; }
  .r-s { width: 196px; justify-content: flex-end; }
  .t-row { grid-template-columns: 28px minmax(0, 210px) minmax(0, 1fr) 104px; column-gap: 16px; }
  .t-who { grid-column: 2; grid-row: 1; } .t-bar { grid-column: 3; grid-row: 1; } .t-fig { grid-column: 4; grid-row: 1; }
  .t-led { grid-column: 3; grid-row: 2; }
  .tray.narrow .t-row { grid-template-columns: 28px minmax(0, 1fr) auto; column-gap: 12px; }
  .tray.narrow .t-who { grid-column: 2; } .tray.narrow .t-fig { grid-column: 3; }
  .tray.narrow .t-bar { grid-column: 2 / -1; grid-row: 2; } .tray.narrow .t-led { grid-column: 2 / -1; grid-row: 3; }
}
@media (min-width: 1000px) {
  .cols { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .cols.wide-left { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .cols > .sticky { position: sticky; top: 72px; }
}
@media (min-width: 1100px) {
  .hero { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px; }
  .say h1 { font-size: clamp(48px, 4.6vw, 76px); }
  .band { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .band .panel:last-child { grid-column: auto; }
}
/* ---------- narrower screens ---------- */
@media (max-width: 1519px) {
  .top-acts .btn.quiet { width: 40px; padding: 0; }
  .top-acts .btn.quiet .lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
@media (max-width: 1180px) {
  .brand-text small { display: none; }
}
@media (max-width: 1279px) {
  .watch span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .watch { padding: 6px; }
}
@media (max-width: 1099px) {
  .clock { display: none; }
}
@media (max-width: 999px) {
  .top { gap: 10px; padding: 8px 16px; }
  .nav a { padding: 0 10px; }
}
@media (min-width: 840px) and (max-width: 999px) {
  .brand-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}
@media (max-width: 839px) {
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .nav, .top-acts .btn.primary { display: none; }
  .top { padding: 8px 12px; gap: 8px; }
  .top-acts { gap: 6px; }
  .brand-text strong { font-size: 18px; }
  .brand-mark { width: 28px; height: 28px; }
  .sync { flex: 0 1 auto; min-width: 0; } .sync span { max-width: 96px; overflow: hidden; text-overflow: ellipsis; }
  #app { padding: 16px 16px 8px; }
  .foot { padding: 16px 16px 24px; }
  .tabbar {
    position: fixed; z-index: 45; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--page) 92%, transparent);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-top: 1px solid var(--line);
  }
  .tabbar a, .tabbar button { display: grid; justify-items: center; gap: 2px; padding: 6px 2px; border: 0; border-radius: 12px; background: none; text-decoration: none; font-size: 11.5px; font-weight: 600; color: var(--ink-3); min-height: 52px; }
  .tabbar .ic { width: 22px; height: 22px; }
  .tabbar a[aria-current] { color: var(--ink); background: var(--raise); }
  .tabbar .tab-add { background: var(--btn); color: var(--btn-ink); }
  #app > .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 8px; padding: 0 16px 4px; scrollbar-width: none; }
  #app > .chips::-webkit-scrollbar { display: none; }
  #app > .chips .chip { flex: none; }
  .toasts { top: 60px; right: 12px; left: 12px; width: auto; }
  .sheet { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 24px 24px 0 0; max-height: 94dvh; }
  .sheet-head, .sheet-body { padding-left: 16px; padding-right: 16px; }
  .sheet-foot { padding-left: 16px; padding-right: 16px; }
  .sheet-foot .btn { flex: 1; }
  .set-row { grid-template-columns: 44px minmax(0, 1fr) 76px; }
  .set-row .party { grid-column: 2 / -1; }
  .set-row .name { grid-column: 2; } .set-row .short { grid-column: 3; grid-row: 1; }
}
@media (max-width: 719px) {
  .mapcard { margin-left: -16px; margin-right: -16px; border-radius: 0; }
  .map-head, .legend { padding-left: 16px; padding-right: 16px; }
  .tray { padding: 14px 14px 6px; border-radius: 20px; }
  .lens-strip svg { margin: 0 auto; }
}
@media (max-width: 479px) {
  .sync[data-state="live"] span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .sync span { max-width: 170px; }
  .top:has(.sync[data-state="offline"]) .brand-text, .top:has(.sync[data-state="connecting"]) .brand-text { display: none; }
}
