/* knesset26-live v2 — Hebrew RTL, mobile-first */
@font-face { font-family: 'Heebo'; font-style: normal; font-weight: 300 800; font-display: swap;
  src: url(/fonts/heebo-hebrew.woff2) format('woff2'); unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: 'Heebo'; font-style: normal; font-weight: 300 800; font-display: swap;
  src: url(/fonts/heebo-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  --bg: #f3f2ee; --card: #fff; --ink: #0d1526; --ink2: #2b3446; --muted: #677084; --line: #e5e2da; --soft: #f7f6f2;
  --navy: #0b1324; --navy2: #17213a; --accent: #dc2626; --up: #15803d; --dn: #c2410c; --focus: #2563eb;
  --net: #1F4E9C; --opp: #C62828; --arab: #6B7280; --out: #CFCAC0;
  --r: 14px; --shadow: 0 1px 2px rgba(13, 21, 38, .05), 0 4px 16px rgba(13, 21, 38, .04);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 Heebo, system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  font-variant-numeric: tabular-nums; padding-bottom: env(safe-area-inset-bottom); }
a { color: inherit; }
h1 { font-size: 26px; line-height: 1.2; margin: 0; font-weight: 800; letter-spacing: -.01em; }
h2 { font-size: 16px; margin: 0 0 12px; font-weight: 700; }
code { font-size: 12px; background: var(--soft); padding: 1px 5px; border-radius: 5px; direction: ltr; unicode-bidi: isolate; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 30; background: var(--navy); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.06); }
.top-in { max-width: 1320px; margin: 0 auto; display: flex; align-items: center; gap: 14px; padding: 8px 18px; min-height: 56px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.logo { width: 36px; height: 36px; border-radius: 10px; background: #fff; color: var(--navy); display: grid; place-items: center; font-weight: 800; font-size: 16px; }
.brand-t { display: flex; flex-direction: column; line-height: 1.15; }
.brand-t b { font-size: 15px; } .brand-t small { color: #9aa5bd; font-size: 12px; }
.tabs { display: flex; gap: 2px; background: var(--navy2); border-radius: 12px; padding: 4px; }
.tabs a { display: flex; align-items: center; gap: 6px; text-decoration: none; color: #c4cbdb; padding: 6px 14px; border-radius: 9px; font-weight: 500; font-size: 15px; white-space: nowrap; }
.tabs a svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.tabs a:hover { color: #fff; }
.tabs a.on { background: #fff; color: var(--navy); font-weight: 700; }
.top-gap { flex: 1; }
.iconbtn { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: var(--navy2); color: #dfe4ee; flex: none; }
.iconbtn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.pill { font-size: 13px; padding: 5px 11px; border-radius: 99px; text-decoration: none; white-space: nowrap; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.pill.live { background: var(--accent); color: #fff; }
.pill.live i { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: blink 1.4s infinite; }
.pill.replay { background: #fbbf24; color: #3b2a00; }
.pill.wait { background: var(--navy2); color: #c4cbdb; }
@keyframes blink { 50% { opacity: .25; } }
#stub-badge { position: fixed; bottom: 70px; left: 12px; z-index: 5; }

main { max-width: 1320px; margin: 0 auto; padding: 18px 18px 28px; }
.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 18px 12px 28px; }
.foot a { color: var(--muted); }

/* ---------- building blocks ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; margin-bottom: 14px; box-shadow: var(--shadow); min-width: 0; }
.row { display: flex; align-items: center; gap: 8px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.sub { color: var(--muted); font-size: 13px; }
.muted { color: var(--muted); }
.up { color: var(--up); } .dn { color: var(--dn); } .ok { color: var(--up); font-weight: 700; }
.num, .n { text-align: end; font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.loading, .empty { color: var(--muted); padding: 30px; text-align: center; }
.cmp.polls tr.sumbad td { background: #fff7e6; }
.cmp.polls td.sumflag { color: #a15c00; font-weight: 700; white-space: nowrap; }
.warn { background: #fff7e6; border: 1px solid #f5d38f; color: #7a4b00; border-radius: 10px; padding: 7px 11px; font-size: 13px; margin: 0 0 10px; }
.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: #fbbf24; color: #3b2a00; white-space: nowrap; }
.badge.live { background: var(--accent); color: #fff; }
.badge.wait { background: #e6e9f0; color: var(--ink2); }
.explain { background: #eef2fa; border: 1px solid #d6deef; color: var(--ink2); border-radius: 12px; padding: 9px 13px; font-size: 14px; margin: 0 0 14px; line-height: 1.55; }
.explain b:first-child { color: var(--navy); }
.tonet { color: var(--net); } .toopp { color: var(--opp); }
/* label + segmented control as one unit */
.segl { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
/* bloc legends and the counted ramp */
.sw3 { display: inline-flex; border-radius: 3px; overflow: hidden; } .sw3 i { width: 9px; height: 11px; border-radius: 0 !important; }
.maplegend { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; font-size: 13px; }
.lg-grad { display: inline-flex; border-radius: 4px; overflow: hidden; } .lg-grad i { width: 22px; height: 12px; display: block; }
/* gaps: national card and the three-bloc rows */
.gnat .gn-top { margin-bottom: 8px; }
.gnat .gn-top small { color: var(--muted); font-size: 13px; }
.gnat .gn-top .sub { margin: 0; }
.g3 { display: grid; grid-template-columns: minmax(0, 1fr) repeat(3, 76px); gap: 6px; align-items: center; padding: 8px 4px; border-bottom: 1px solid #f0eee8; text-decoration: none; }
.g3h { font-size: 12px; font-weight: 700; padding-top: 2px; border-bottom-color: var(--line); }
.g3 .nm { min-width: 0; } .g3 .nm b { display: block; font-weight: 600; overflow-wrap: anywhere; } .g3 .nm small { display: block; color: var(--muted); font-size: 12px; }
.g3 .rk { color: var(--muted); font-size: 12px; font-weight: 400; margin-inline-end: 6px; }
.g3 .dv { color: var(--muted); font-size: 14px; } .g3 .dv.best { font-weight: 800; font-size: 15px; }
a.g3r:hover { background: var(--soft); }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.ochips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ochip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--soft); border-radius: 99px; padding: 5px 12px 5px 10px; cursor: pointer; font-size: 14px; }
.ochip .ck { width: 16px; height: 16px; border-radius: 5px; border: 1.5px solid #b9b4a8; display: grid; place-items: center; font-size: 11px; font-weight: 800; background: #fff; }
.ochip.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.ochip.on .ck { background: #fff; color: var(--navy); border-color: #fff; }
.ochip.on .muted { color: #b7c0d3; }
.otable tr[data-o] { cursor: pointer; } .otable tr[data-o]:hover td { background: var(--soft); }
.otable td.maj { font-weight: 800; color: var(--net); }
.kv .gt, .cmp .gt { font-size: 13px; font-weight: 500; color: var(--muted); }
.gaps-sel { display: grid; grid-template-columns: auto 1fr; gap: 6px 8px; align-items: center; }
.blocdiff td, .blocdiff th { padding: 5px 6px; }
.chip { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 6px; vertical-align: baseline; flex: none; }
.btn { display: inline-flex; align-items: center; gap: 6px; background: var(--navy); color: #fff; border: 0; border-radius: 10px; padding: 8px 14px; text-decoration: none; cursor: pointer; font-weight: 600; font-size: 14px; }
.btn.ghost { background: var(--soft); color: var(--ink); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: #cfcabe; }
.back { display: inline-block; margin-bottom: 8px; color: var(--muted); text-decoration: none; font-size: 14px; }

.pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin: 4px 0 14px; }
.pagehead .sub { margin: 4px 0 0; }
.controls { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.seg { display: inline-flex; background: #e9e7e0; border-radius: 11px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; cursor: pointer; font-size: 14px; color: var(--ink2); white-space: nowrap; }
.seg button.on { background: #fff; color: var(--ink); font-weight: 700; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.chk { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; cursor: pointer; }
.chk input { width: 16px; height: 16px; accent-color: var(--navy); }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 12px 0; }
.kpi { background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.kpi small { display: block; color: var(--muted); font-size: 12px; }
.kpi b { display: block; font-size: 22px; font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; }
.kpi em { display: block; font-style: normal; color: var(--muted); font-size: 12px; }
.kpi b.bloc-label { font-size: 17px; }
.bloc-label { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0 4px; max-width: 100%; min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 13px; color: var(--ink2); max-width: 100%; }
.legend > span { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; min-width: 0; }
.legend i, .maplegend i.sw, .lg-x i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; flex: none; }

.hero { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(0, 2fr) auto; gap: 16px 26px; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; margin-bottom: 14px; box-shadow: var(--shadow); }
.hero small { color: var(--muted); font-size: 13px; }
.bignum { font-size: 44px; font-weight: 800; line-height: 1.05; letter-spacing: -.02em; margin: 2px 0 4px; }
.bignum .unit { font-size: 18px; font-weight: 600; letter-spacing: 0; }
.hero-side, .hero-cmp { display: flex; gap: 8px 22px; flex-wrap: wrap; }
.kv small { display: block; color: var(--muted); font-size: 12px; }
.kv b { display: block; font-size: 20px; font-weight: 800; }
.kv em { display: block; font-style: normal; font-size: 12px; }
.lochero .bignum { font-size: 34px; }
.turnhero, .pollhero { grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr); }

.split { display: grid; grid-template-columns: minmax(340px, 5fr) minmax(0, 6fr); gap: 14px; align-items: start; }
.split2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }

/* bars */
.stack { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: #ebe9e2; width: 100%; }
.stack.thin { height: 6px; }
.stack span { display: block; height: 100%; }
.gapbar { position: relative; display: flex; height: 30px; border-radius: 8px; overflow: hidden; background: #ebe9e2; }
.gapbar.big { height: 40px; }
.gapbar span { display: flex; align-items: center; padding: 0 10px; color: #fff; font-size: 13px; min-width: 0; overflow: hidden; white-space: nowrap; }
.gapbar span:last-of-type { justify-content: flex-end; }
.gapbar .mid { position: absolute; inset-inline-start: 50%; top: -3px; bottom: -3px; width: 2px; background: var(--ink); opacity: .55; }
.sheet-gap { margin: 6px 0 12px; }
.blocbar { position: relative; display: flex; height: 32px; border-radius: 8px; overflow: hidden; background: #ebe9e2; margin-top: 4px; }
.blocbar.big { height: 42px; }
.blocbar span { display: flex; align-items: center; justify-content: center; color: #fff; font-size: 14px; min-width: 0; overflow: hidden; white-space: nowrap; container-type: inline-size; }
/* A segment too narrow for its number hides it (b.lN = N characters); the legend below always has it. */
@container (max-width: 36px) { .blocbar b.l4 { display: none; } }
@container (max-width: 30px) { .blocbar b.l3 { display: none; } }
@container (max-width: 22px) { .blocbar b.l2 { display: none; } }
@container (max-width: 13px) { .blocbar b.l1 { display: none; } }
.blocbar .maj { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--ink); }
.progress { height: 6px; background: #ebe9e2; border-radius: 3px; overflow: hidden; margin-top: 4px; }
.progress span { display: block; height: 100%; background: linear-gradient(to left, var(--accent), #f97316); }
.pbar { display: grid; grid-template-columns: auto minmax(70px, 120px) 1fr 54px; align-items: center; gap: 4px 8px; margin: 7px 0; font-size: 14px; }
.pbar .pn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pbar .track { position: relative; height: 12px; background: #eeece6; border-radius: 6px; overflow: visible; }
.pbar .fill { height: 100%; border-radius: 6px; }
.pbar .tick { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); opacity: .7; }
.pbar .v { text-align: end; font-weight: 700; }
.pbar .meta { grid-column: 2 / -1; color: var(--muted); font-size: 12px; margin-top: -4px; }
.blocrow { display: grid; grid-template-columns: 56px 1fr; gap: 10px; align-items: center; margin: 7px 0; }

/* tables */
.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; padding: 0 4px; }
table.cmp { width: 100%; border-collapse: collapse; font-size: 14px; }
.cmp th { text-align: start; font-weight: 600; color: var(--muted); font-size: 12px; border-bottom: 1px solid var(--line); padding: 6px 6px; white-space: nowrap; }
.cmp td { padding: 7px 6px; border-bottom: 1px solid #f0eee8; }
.cmp th.n, .cmp td.n { text-align: end; }
.cmp tr.below td { color: var(--muted); }
.cmp tr.below td b { font-weight: 500; }
.ptable td.seats { font-weight: 800; font-size: 15px; }
.ptable td.sp { font-size: 13px; white-space: nowrap; }
.ptable td:first-child { white-space: nowrap; }
.polls td, .polls th { padding: 6px 5px; font-size: 13px; }
.polls th { white-space: normal; vertical-align: bottom; line-height: 1.2; }
.polls th .lab { display: inline-block; max-width: 8.5em; white-space: normal; overflow-wrap: anywhere; vertical-align: bottom; }
.polls tr.avgrow td { background: var(--soft); }
.polls td.bl, .polls th.bl { border-inline-start: 1px solid var(--line); }
.polls td.maj { font-weight: 800; color: var(--net); }

/* ---------- gaps ---------- */
.filters { display: grid; grid-template-columns: minmax(260px, 1fr) auto; gap: 10px 20px; align-items: center; }
.filters #gstat { grid-column: 1 / -1; }
.frow { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.frow input[type=search] { border: 1px solid var(--line); border-radius: 10px; padding: 7px 11px; font: inherit; font-size: 14px; background: var(--soft); width: 170px; }
.slider { display: grid; gap: 2px; }
.slider > span:first-child { font-size: 14px; }
.slider b { color: var(--navy); }
.slider input[type=range] { width: 100%; accent-color: var(--navy); height: 26px; }
.more { width: 100%; justify-content: center; margin-top: 10px; }

/* ---------- tooltip ---------- */
.tip { position: fixed; z-index: 50; background: var(--navy); color: #fff; padding: 7px 10px; border-radius: 9px; font-size: 13px; pointer-events: none; box-shadow: 0 4px 14px rgba(0,0,0,.25); max-width: 260px; }
.tip small { color: #b7c0d3; }

/* ---------- live ---------- */
.livehead .lh-t { font-size: 18px; }
.livegrid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 14px; align-items: start; }
.seatsplit { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: center; }
.hemi { width: 100%; height: auto; display: block; }
.hemi-maj { stroke: var(--ink); stroke-width: .012; stroke-dasharray: .03 .025; opacity: .55; }
.blocrow-big { display: grid; grid-template-columns: 12px 1fr auto 52px; gap: 8px; align-items: baseline; padding: 4px 0; border-bottom: 1px solid #f0eee8; }
.blocrow-big i { width: 12px; height: 12px; border-radius: 3px; align-self: center; }
.blocrow-big b { font-size: 24px; font-weight: 800; }
.blocrow-big small { color: var(--muted); text-align: end; }
.pairs { list-style: none; margin: 0; padding: 0; }
.pairs li { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid #f0eee8; font-size: 14px; color: var(--muted); }
.pairs li.on { color: var(--ink); }
.pairs li .st { font-size: 13px; }
.pairs li.on .st { color: var(--up); font-weight: 600; }
.flaglist { margin: 0; padding-inline-start: 18px; font-size: 14px; }
.flaglist li { margin: 6px 0; }
svg.hist { width: 100%; height: 150px; display: block; }
svg.hist .ref, svg.tchart .ref { stroke: var(--ink); stroke-dasharray: 5 4; opacity: .45; stroke-width: 1.2; }
details summary { cursor: pointer; color: var(--muted); font-size: 14px; margin-top: 10px; }
.livecard { border: 2px solid var(--accent); }

/* ---------- charts ---------- */
svg.tchart { width: 100%; height: auto; display: block; }
svg.tchart .grid { stroke: #ebe9e2; }
svg.tchart .axl { fill: var(--muted); font-size: 11px; font-family: Heebo, system-ui, sans-serif; }
svg.tchart .clbl { font-size: 12px; font-weight: 700; font-family: Heebo, system-ui, sans-serif; }
.pavg { display: grid; gap: 7px; }
.pa-row { display: grid; grid-template-columns: minmax(0, 140px) minmax(0, 1fr) auto auto; gap: 8px; align-items: center; font-size: 14px; }
.pa-n { display: block; min-width: 0; overflow-wrap: anywhere; }
.pa-bar { position: relative; height: 14px; }
.pa-bar .rng { position: absolute; top: 0; bottom: 0; background: #e6e3da; border-radius: 4px; }
.pa-bar .fill { position: absolute; top: 3px; bottom: 3px; inset-inline-start: 0; border-radius: 4px; opacity: .92; }

/* ---------- search / sheet ---------- */
.search input { width: 100%; font: inherit; font-size: 18px; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.results { list-style: none; padding: 0; margin: 12px 0; }
.results li a { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 11px 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 7px; text-decoration: none; }
.results mark { background: #fde68a; border-radius: 3px; }
.sheet { position: fixed; z-index: 40; bottom: 18px; left: 18px; width: min(380px, calc(100vw - 36px)); max-height: 70vh; overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; box-shadow: 0 10px 40px rgba(13,21,38,.22); }
.sheet .x { position: absolute; top: 10px; left: 10px; border: 0; background: var(--soft); width: 30px; height: 30px; border-radius: 50%; cursor: pointer; }
.sheet-h { font-size: 21px; margin: 2px 0 8px; }
.sheet .btn { margin-top: 8px; }
.empty-state { text-align: center; padding: 30px; }

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .split, .livegrid { grid-template-columns: minmax(0, 1fr); }
  .hero { grid-template-columns: minmax(0, 1fr); }
  .split2 { grid-template-columns: minmax(0, 1fr); }
}
/* Narrow screens: the tabs drop to a second row of the sticky header, full width, always on top. */
@media (max-width: 860px) {
  .top-in { flex-wrap: wrap; padding: 8px 12px 0; gap: 8px 10px; min-height: 0; }
  .tabs { order: 10; flex: 1 0 100%; margin-bottom: 8px; }
  .tabs a { flex: 1; justify-content: center; padding: 7px 4px; }
}
@media (max-width: 720px) {
  body { font-size: 14.5px; }
  /* Segmented controls fill the row and share it equally; a long label wraps inside its button. */
  .seg { display: flex; width: 100%; flex-wrap: nowrap; }
  .seg button { flex: 1 1 0; min-width: 0; white-space: normal; line-height: 1.2; padding: 7px 4px; font-size: 13px; }
  .segl { display: flex; flex-direction: column; align-items: stretch; gap: 4px; width: 100%; }
  .gaps-sel { width: 100%; }
  .controls, .frow { width: 100%; }
  .g3 { grid-template-columns: minmax(0, 1fr) repeat(3, 58px); gap: 4px; }
  .g3 .dv { font-size: 13px; } .g3 .dv.best { font-size: 14px; }
  .brand-t small { display: none; }
  .logo { width: 32px; height: 32px; }
  .iconbtn { width: 34px; height: 34px; }
  .tabs a { font-size: 14px; gap: 5px; }
  .tabs a svg { width: 16px; height: 16px; }
  main { padding: 12px 10px 20px; }
  h1 { font-size: 22px; }
  .card { padding: 13px 13px; border-radius: 12px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .bignum { font-size: 36px; }
  .hero { padding: 14px; }
  .filters { grid-template-columns: minmax(0, 1fr); }
  .frow { justify-content: flex-start; }
  .frow input[type=search] { width: 100%; }
  .hide-s { display: none; }
  .seatsplit { grid-template-columns: minmax(0, 1fr); }
  .pa-row { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) auto auto; }
  .seg button { padding: 6px 9px; font-size: 13px; }
  .sheet { left: 8px; right: 8px; bottom: calc(10px + env(safe-area-inset-bottom)); width: auto; }
  #stub-badge { bottom: 12px; }
}

/* ---------- block chart (replaces the maps) ---------- */
.tm { position: relative; background: #fff; border-radius: 10px; overflow: hidden; }
.tm-sec { position: absolute; z-index: 1; pointer-events: none; border: 2px solid #fff; }
.tm-h { position: absolute; top: 0; inset-inline: 0; height: 18px; padding: 1px 6px; font-size: 11.5px; font-weight: 700; color: var(--ink2); background: #efede6;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-t { position: absolute; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 3px 5px; border: 0; border-radius: 0; box-shadow: inset 0 0 0 1px #fff;
  color: var(--ink); text-align: start; line-height: 1.15; overflow: hidden; cursor: pointer; font: inherit; }
.tm-t b { max-width: 100%; font-size: 11.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-t span { font-size: 11px; font-variant-numeric: tabular-nums; }
.tm-t.dk { color: #fff; }
.tm-t.rest { background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.28) 0 3px, transparent 3px 7px) !important; }
.tm-t:hover, .tm-t:focus-visible { box-shadow: inset 0 0 0 2px var(--ink); z-index: 2; }
.tm-empty { padding: 40px 16px; text-align: center; color: var(--muted); background: var(--soft); border-radius: 10px; }
.restlist { list-style: none; margin: 8px 0 0; padding: 0; max-height: 50vh; overflow: auto; }
.restlist button { display: flex; justify-content: space-between; gap: 10px; width: 100%; padding: 7px 4px; border: 0; border-bottom: 1px solid #f0eee8; background: none; cursor: pointer; font: inherit; text-align: start; }
.seg button:disabled { opacity: .35; cursor: not-allowed; }
.gfilters .frow, .listctl { justify-content: flex-start; margin-bottom: 8px; }
