/* Layout: sticky top bar + filter strip, then one wide column of panels; ledger-style bars with tabular figures. */
/* Neutral chrome so the five party colours carry the meaning; violet accent belongs to no party, gold marks money. */
:root {
  --bg: #f4f3f7;
  --surface: #ffffff;
  --band: #ecebf2;
  --ink: #1c1a24;
  --muted: #625e76;
  --line: #dddae6;
  --accent: #5b3fa0;
  --accent-ink: #ffffff;
  --track: #ebe9f1;
  --hi: #e9b31b;

  --p-ALP: #b3170f;   --p-ALP-ink: #fff;
  --p-LNP: #2b2db0;   --p-LNP-ink: #fff;
  --p-Greens: #2f9a3c; --p-Greens-ink: #fff;
  --p-UAP: #e8b800;   --p-UAP-ink: #1b1600;
  --p-ONP: #ee6a1f;   --p-ONP-ink: #1d0d03;
  --p-OTHER: #9893a8; --p-OTHER-ink: #16141c;

  --f-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --f-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --f-num: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121118; --surface: #1b1a23; --band: #17161e; --ink: #ecebf2; --muted: #a29eb4; --line: #2e2b3a;
    --accent: #b6a0f2; --accent-ink: #1a1030; --track: #262331; --hi: #f2c230;
    --p-ALP: #e0463b; --p-LNP: #7476f4; --p-Greens: #4cc35a; --p-OTHER: #6f6a80; --p-OTHER-ink: #fff;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121118; --surface: #1b1a23; --band: #17161e; --ink: #ecebf2; --muted: #a29eb4; --line: #2e2b3a;
  --accent: #b6a0f2; --accent-ink: #1a1030; --track: #262331; --hi: #f2c230;
  --p-ALP: #e0463b; --p-LNP: #7476f4; --p-Greens: #4cc35a; --p-OTHER: #6f6a80; --p-OTHER-ink: #fff;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.5 var(--f-body); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--surface); }
a { color: var(--accent); }
h1, h2 { font-family: var(--f-display); text-wrap: balance; margin: 0; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--hi); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.wrap { max-width: 1180px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* top bar */
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--surface); color: var(--ink); border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; gap: 12px 28px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font: 800 1.25rem/1 var(--f-display); letter-spacing: -0.01em; padding-block: 12px; }
.brand-mark { width: 30px; height: 30px; color: var(--accent); }
.tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; min-width: 0; flex: 1; align-self: stretch; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { display: flex; align-items: center; color: var(--muted); text-decoration: none; padding: 0 12px; white-space: nowrap; font-weight: 600; font-size: 0.95rem; border-bottom: 3px solid transparent; min-height: 54px; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--ink); border-bottom-color: var(--accent); }

/* filter strip */
.filters { background: var(--band); border-bottom: 1px solid var(--line); }
.filters-in { display: flex; flex-wrap: wrap; align-items: end; gap: 12px 20px; padding-block: 12px; }
.field { display: flex; flex-direction: column; gap: 3px; }
.field > span { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 700; }
#ind { max-width: 15rem; }
select, .field input { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 7px 10px; font-family: var(--f-num); font-size: 0.9rem; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; background: var(--surface); }
.seg button { border: 0; background: transparent; padding: 7px 12px; cursor: pointer; font-weight: 600; font-size: 0.9rem; color: var(--muted); }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--ink); color: var(--surface); }
.check { display: flex; align-items: center; gap: 8px; font-size: 0.92rem; color: var(--muted); padding-bottom: 7px; cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--accent); }

main { padding-block: 28px 40px; display: block; }
.loading { color: var(--muted); font-family: var(--f-num); }
.view { display: flex; flex-direction: column; gap: 18px; }

/* hero */
.hero { padding-block: 8px 6px; max-width: 62rem; }
.eyebrow { margin: 0 0 8px; font: 600 0.78rem/1.2 var(--f-num); letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.hero h1 { font-size: clamp(2.1rem, 5.4vw, 3.6rem); line-height: 1.02; letter-spacing: -0.025em; font-weight: 800; }
.lede { font-size: 1.12rem; color: var(--muted); max-width: 44rem; margin: 14px 0 0; }
.lede em { color: var(--ink); font-style: normal; background: linear-gradient(transparent 62%, color-mix(in srgb, var(--hi) 45%, transparent) 62%); }

.view-h h1 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); letter-spacing: -0.02em; font-weight: 800; line-height: 1.1; }
.view-h p { margin: 6px 0 0; color: var(--muted); max-width: 46rem; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 18px; min-width: 0; }
.panel-h { font-size: 1.05rem; font-weight: 700; margin-bottom: 14px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.panel-h .sub { font: 400 0.8rem var(--f-num); color: var(--muted); }

.ov-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 18px; }
.tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.tile { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 10px; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); transition: border-color .15s, transform .15s; }
.tile:hover { border-color: var(--accent); transform: translateY(-2px); }
.tile b { font: 700 1.1rem/1.2 var(--f-display); }
.tile span:last-child { color: var(--muted); font-size: 0.93rem; }

/* bars */
.bars { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr) 6.2rem; column-gap: 12px; row-gap: 7px; align-items: center; position: relative; }
.bars.compact { grid-template-columns: minmax(0, 11rem) minmax(0, 1fr) 5.6rem; }
.b-label { font-weight: 600; font-size: 0.95rem; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b-label button { all: unset; cursor: pointer; }
.b-label button:hover, .b-label button:focus-visible { text-decoration: underline; }
.b-row.sel .b-label { color: var(--accent); }
.b-track { position: relative; height: 26px; background: var(--track); border-radius: 4px; overflow: hidden; display: flex; }
.b-grid { position: absolute; inset: 0; pointer-events: none; }
.b-grid i { position: absolute; top: 0; bottom: 0; width: 1px; background: color-mix(in srgb, var(--ink) 9%, transparent); }
.b-seg { position: relative; height: 100%; display: flex; align-items: center; justify-content: center; font: 600 0.72rem var(--f-num); overflow: hidden; white-space: nowrap; transition: filter .12s; }
.b-seg:hover { filter: brightness(1.12); }
.b-val { font: 600 0.85rem var(--f-num); font-variant-numeric: tabular-nums; text-align: right; }
.b-axis { grid-column: 2; position: relative; height: 18px; font: 400 0.7rem var(--f-num); color: var(--muted); }
.b-axis span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.b-axis span:first-child { transform: none; }
.b-row { display: contents; }
.b-row.click { cursor: pointer; }
.more { margin-top: 14px; border: 1px solid var(--line); background: var(--bg); border-radius: 7px; padding: 7px 14px; font-weight: 600; cursor: pointer; }
.more:hover { border-color: var(--accent); }
.empty { color: var(--muted); padding: 18px 0; }

.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 0.9rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

/* party picker */
.row-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.party-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.pchip { display: inline-flex; align-items: center; gap: 8px; border: 2px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 14px 6px 8px; cursor: pointer; font-weight: 700; }
.pchip i { width: 20px; height: 20px; border-radius: 50%; display: inline-block; }
.pchip.on { border-color: var(--pc); background: color-mix(in srgb, var(--pc) 14%, var(--surface)); }
.pchip[aria-pressed="false"] { opacity: 0.7; }

/* split layout */
.split { display: grid; grid-template-columns: minmax(0, 1fr) 21rem; gap: 18px; align-items: start; }
.detail h3 { font: 700 1.05rem/1.25 var(--f-display); margin: 0 0 4px; }
.detail .kv { font: 600 1.6rem var(--f-num); letter-spacing: -0.02em; margin: 6px 0 2px; }
.detail .note { color: var(--muted); font-size: 0.88rem; margin: 0 0 12px; }
.mini { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.mini li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 0.9rem; }
.mini li span:first-child { min-width: 0; overflow-wrap: anywhere; }
.mini li span:last-child { font-family: var(--f-num); white-space: nowrap; }
.mini-h { font: 700 0.72rem var(--f-body); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 14px 0 4px; }
.detail .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.btn { display: inline-flex; border-radius: 7px; padding: 7px 12px; font-weight: 600; font-size: 0.9rem; text-decoration: none; border: 1px solid var(--accent); color: var(--accent); background: transparent; cursor: pointer; }
.btn.solid { background: var(--accent); color: var(--accent-ink); }

/* tables */
.table-panel { padding: 0; }
.tscroll { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.tbl th, .tbl td { padding: 8px 14px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line); }
.tbl th:first-child, .tbl td:first-child { text-align: left; white-space: normal; min-width: 12rem; }
.tbl thead th { background: var(--band); color: var(--ink); border-bottom: 2px solid var(--ink); font-weight: 700; font-size: 0.82rem; position: sticky; top: 0; }
.tbl td { font-family: var(--f-num); font-variant-numeric: tabular-nums; font-size: 0.85rem; }
.tbl td:first-child { font-family: var(--f-body); font-size: 0.92rem; font-weight: 600; }
.tbl tfoot td { font-weight: 700; border-top: 2px solid var(--ink); border-bottom: 0; }
.tbl .pct { color: var(--muted); }
.lean { display: inline-block; font: 700 0.7rem var(--f-body); padding: 2px 7px; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em; }

/* explorer */
.search { position: relative; max-width: 36rem; }
.search input { width: 100%; padding: 12px 14px; border-radius: 9px; border: 2px solid var(--line); background: var(--surface); font-size: 1.05rem; }
.search input:focus { border-color: var(--accent); outline: none; }
.suggest { position: absolute; z-index: 15; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; box-shadow: 0 12px 30px rgb(0 0 0 / .18); max-height: 22rem; overflow-y: auto; }
.suggest li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.suggest li span:last-child { font-family: var(--f-num); color: var(--muted); font-size: 0.85rem; white-space: nowrap; }
.suggest li.act, .suggest li:hover { background: var(--track); }
.quick { display: flex; flex-wrap: wrap; gap: 8px; }
.qchip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 12px; cursor: pointer; font-weight: 600; font-size: 0.9rem; }
a.qchip { text-decoration: none; color: var(--ink); }
a.qchip:hover { border-color: var(--accent); color: var(--accent); }
.suggest li.none { cursor: default; color: var(--muted); font-size: 0.88rem; }
.qchip.on { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.ex-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 10px 24px; }
.ex-head h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); font-weight: 800; letter-spacing: -0.02em; }
.ex-head .stat { font: 600 1.05rem var(--f-num); color: var(--muted); }
.ex-head .stat b { color: var(--ink); font-size: 1.4rem; }

/* tooltip */
.tip { position: fixed; z-index: 40; pointer-events: none; background: var(--ink); color: var(--surface); border-radius: 8px; padding: 9px 11px; font-size: 0.85rem; max-width: 20rem; box-shadow: 0 8px 24px rgb(0 0 0 / .25); }
.tip b { display: block; margin-bottom: 4px; font-family: var(--f-display); }
.tip div { display: flex; justify-content: space-between; gap: 16px; font-family: var(--f-num); font-size: 0.8rem; }

.foot { padding-block: 0 40px; color: var(--muted); font-size: 0.85rem; }
.foot p { max-width: 60rem; margin: 0; border-top: 1px solid var(--line); padding-top: 16px; }

/* links that open donor pages */
a.dl { color: inherit; text-decoration: none; }
a.dl:hover, a.dl:focus-visible { color: var(--accent); text-decoration: underline; }
.b-label a { color: inherit; text-decoration: none; }
.b-label a:hover { color: var(--accent); text-decoration: underline; }
.panel-h.gap { margin-top: 24px; }
.note-line { color: var(--muted); font-size: 0.88rem; margin: 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: var(--track); color: var(--ink); font-size: 0.82rem; font-weight: 700; text-decoration: none; }
a.chip:hover { background: color-mix(in srgb, var(--accent) 18%, var(--track)); }
.chip.ind { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: var(--accent); }

/* donor page */
.back { font-weight: 600; text-decoration: none; font-size: 0.92rem; }
.d-head { display: flex; flex-direction: column; gap: 8px; }
.d-head h1 { font-size: clamp(1.8rem, 4.4vw, 2.8rem); font-weight: 800; letter-spacing: -0.025em; line-height: 1.05; overflow-wrap: anywhere; }
.d-head .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.d-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat-b { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; min-width: 0; }
.stat-b span { display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 700; }
.stat-b b { display: block; font: 600 1.35rem/1.3 var(--f-num); letter-spacing: -0.02em; margin-top: 2px; }
.split-bar { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: var(--track); margin-top: 8px; }
.split-bar i { height: 100%; }
.similar h2 { margin-bottom: 4px; }
.similar .note { margin: 0 0 12px; }
.sim-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 6px 18px; list-style: none; padding: 0; margin: 0; }
.sim-list li { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); min-width: 0; font-size: 0.92rem; }
.sim-list li label { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; cursor: pointer; }
.sim-list li label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sim-list input { width: 16px; height: 16px; accent-color: var(--accent); flex: none; }
.sim-list .v { font-family: var(--f-num); font-size: 0.8rem; color: var(--muted); white-space: nowrap; }
.sim-list a.open { font-size: 0.8rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.combined { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 0.88rem; color: var(--muted); }
.tx-tools { padding: 16px 18px 6px; }
.tx-tools .panel-h { margin-bottom: 10px; }
.tx-filters { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: end; }
.tx-filters .grow { flex: 1; min-width: 12rem; }
.tx-filters select { max-width: 16rem; }
.field input { border: 1px solid var(--line); border-radius: 6px; padding: 7px 10px; font-size: 0.9rem; width: 100%; }
.tbl.tx td:first-child { min-width: 0; font-family: var(--f-num); font-weight: 400; font-size: 0.85rem; white-space: nowrap; }
.tbl.tx td.w { font-family: var(--f-body); font-size: 0.9rem; white-space: normal; text-align: left; min-width: 12rem; }
.tbl.tx th { cursor: pointer; user-select: none; }
.tbl.tx th.l { text-align: left; }
.tbl.tx th[aria-sort]::after { content: " ↓"; }
.tbl.tx th[aria-sort="ascending"]::after { content: " ↑"; }
.pdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.tx-foot { padding: 0 18px 16px; }

@media (max-width: 900px) {
  .d-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ov-grid, .split { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .tiles .tile:last-child { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .tiles { grid-template-columns: 1fr; }
  .stat-b b { font-size: 1.1rem; }
  .bars, .bars.compact { grid-template-columns: minmax(0, 7.5rem) minmax(0, 1fr) 4.6rem; column-gap: 8px; }
  .b-label { font-size: 0.85rem; }
  .b-val { font-size: 0.75rem; }
  .topbar-in { gap: 8px; }
  .tabs { flex-basis: 100%; }
}

/* "How it works" button + picture-book popup (fixed bright storybook palette in both themes) */
.book-open { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; border: 0; cursor: pointer; padding: 8px 14px; border-radius: 999px; font: 800 0.95rem/1 "Baloo 2", var(--f-display); background: #ffcf3f; color: #2b2340; box-shadow: 0 2px 0 #c98a00; }
.book-open svg { width: 16px; height: 16px; }
.book-open:hover { transform: translateY(-1px); }
.book { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); background: rgb(30 20 50 / 0.28); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: k-fade .25s ease; }
body.book-on { overflow: hidden; }
.book-card { --k-bg: #fff3b0; position: relative; width: min(560px, 100%); max-height: 100%; overflow-y: auto; border-radius: 28px; padding: 26px 24px 16px; background: color-mix(in srgb, var(--k-bg) 90%, transparent); color: #2b2340; border: 4px solid #2b2340; box-shadow: 0 10px 0 rgb(43 35 64 / .9), 0 30px 60px rgb(0 0 0 / .25); font-family: "Baloo 2", "Bricolage Grotesque", system-ui, sans-serif; transition: background .35s; animation: k-pop .35s cubic-bezier(.2, 1.4, .4, 1); }
.book-x { position: absolute; top: 10px; right: 12px; width: 40px; height: 40px; border-radius: 50%; border: 3px solid #2b2340; background: #fff; color: #2b2340; font: 800 1.5rem/1 sans-serif; cursor: pointer; display: grid; place-items: center; }
.book-x:hover { background: #ff7aa8; }
.book-page { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; min-height: 380px; justify-content: center; }
.book-page.in { animation: k-in .35s ease; }
.book-page h2 { font: 800 clamp(1.9rem, 6vw, 2.6rem)/1.02 "Baloo 2", var(--f-display); letter-spacing: -0.01em; margin: 10px 0 0; color: #2b2340; text-wrap: balance; }
.book-page h2 em { font-style: normal; background: #fff; padding: 0 8px; border-radius: 10px; border: 3px solid #2b2340; }
.book-page p { font: 600 1.15rem/1.35 "Baloo 2", var(--f-body); margin: 0; max-width: 26rem; color: #4a4060; }
.book-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
.book-btn { border: 3px solid #2b2340; background: #2b2340; color: #fff; font: 800 1.1rem/1 "Baloo 2", sans-serif; padding: 10px 22px; border-radius: 999px; cursor: pointer; text-decoration: none; box-shadow: 0 4px 0 rgb(43 35 64 / .35); }
.book-btn.ghost { background: #fff; color: #2b2340; }
.book-btn:hover { transform: translateY(-2px); }
.book-btn:active { transform: translateY(1px); box-shadow: none; }
.book-dots { display: flex; gap: 7px; flex-wrap: wrap; justify-content: center; }
.book-dots button { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #2b2340; background: #fff; padding: 0; cursor: pointer; }
.book-dots button.on { background: #2b2340; transform: scale(1.25); }
.book-skip { display: block; margin: 10px auto 0; background: none; border: 0; color: #4a4060; font: 700 0.92rem "Baloo 2", sans-serif; text-decoration: underline; cursor: pointer; }
.k-art { display: flex; align-items: flex-end; justify-content: center; gap: 14px; }
.k-art svg { overflow: visible; }
.k-cover { position: relative; padding: 30px 60px 0; }
.k-fly { position: absolute; animation: k-float 2.6s ease-in-out infinite; }
.k-fly.f1 { left: 0; top: 10px; } .k-fly.f2 { right: 4px; top: 0; animation-delay: .5s; } .k-fly.f3 { right: 36px; top: 60px; animation-delay: 1s; }
.k-row svg { animation: k-bob 3s ease-in-out infinite; }
.k-row svg:nth-child(2) { animation-delay: .4s; } .k-row svg:nth-child(3) { animation-delay: .8s; }
.k-arrow { display: flex; align-items: center; gap: 4px; margin-top: 4px; }
.k-arrow b { font-size: 2rem; margin: 0 6px; }
.k-arrow svg:not(:last-child) { animation: k-float 2s ease-in-out infinite; }
.k-stacks { display: flex; align-items: flex-end; justify-content: center; gap: 10px; min-height: 250px; width: 100%; }
.k-stack { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1; min-width: 0; max-width: 92px; }
.k-amt { font: 800 0.95rem/1.05 "Baloo 2", sans-serif; }
.k-coins { display: flex; flex-direction: column-reverse; align-items: center; }
.k-coins i { display: block; width: 52px; height: 18px; margin-top: -6px; border-radius: 50%; background: #ffcf3f; border: 3px solid #c98a00; box-shadow: inset 0 -3px 0 #e8a900; animation: k-drop .45s cubic-bezier(.2, 1.3, .5, 1) both; }
.k-tag { font: 800 0.8rem/1.05 "Baloo 2", sans-serif; padding: 4px 6px; border-radius: 10px; border: 2px solid #2b2340; margin-top: 4px; max-width: 100%; overflow-wrap: anywhere; }
.k-podium { display: flex; align-items: flex-end; justify-content: center; gap: 8px; width: 100%; min-height: 250px; }
.k-pod { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1; max-width: 150px; min-width: 0; text-decoration: none; color: #2b2340; }
.k-pod:hover .k-pname { text-decoration: underline; }
.k-medal { width: 46px; height: 46px; border-radius: 50%; border: 3px solid #2b2340; display: grid; place-items: center; font: 800 1.4rem "Baloo 2", sans-serif; animation: k-bob 2.4s ease-in-out infinite; }
.k-pname { font: 800 1rem/1.05 "Baloo 2", sans-serif; overflow-wrap: anywhere; }
.k-pamt { font: 700 0.9rem "Baloo 2", sans-serif; color: #4a4060; }
.k-block { width: 100%; border: 3px solid #2b2340; border-radius: 12px 12px 4px 4px; }
.k-both { align-items: center; gap: 6px; flex-wrap: nowrap; }
a.k-giver { text-decoration: none; color: #2b2340; }
.k-bag, .k-giver { display: flex; flex-direction: column; align-items: center; gap: 4px; font: 800 1rem/1.1 "Baloo 2", sans-serif; }
.k-giver b { max-width: 9rem; }
.k-bag svg { animation: k-bob 2.8s ease-in-out infinite; }
.k-bag:last-child svg { animation-delay: .6s; }
.k-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #2b2340; vertical-align: -1px; }
.k-stickers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: 100%; }
.k-stickers a { display: flex; flex-direction: column; align-items: center; gap: 0; padding: 10px 6px; border-radius: 18px; background: #fff; border: 3px solid #2b2340; text-decoration: none; color: #2b2340; box-shadow: 0 4px 0 rgb(43 35 64 / .3); transition: transform .15s; }
.k-stickers a:nth-child(odd) { transform: rotate(-2deg); } .k-stickers a:nth-child(even) { transform: rotate(2deg); }
.k-stickers a:hover { transform: rotate(0) scale(1.06); }
.k-stickers span { font-size: 2.2rem; line-height: 1.2; }
.k-stickers b { font: 800 1rem/1.05 "Baloo 2", sans-serif; }
.k-stickers small { font: 700 0.82rem "Baloo 2", sans-serif; color: #4a4060; }
.k-cta { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 10px; }
@keyframes k-pop { from { transform: scale(.85) rotate(-2deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes k-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes k-in { from { transform: translateX(24px); opacity: .2; } to { transform: none; opacity: 1; } }
@keyframes k-float { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-10px) rotate(6deg); } }
@keyframes k-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes k-drop { from { transform: translateY(-40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 560px) {
  .book-card { padding: 22px 14px 12px; border-radius: 22px; }
  .book-page { min-height: 340px; }
  .k-coins i { width: 40px; height: 14px; margin-top: -5px; }
  .k-amt { font-size: 0.78rem; }
  .k-tag { font-size: 0.68rem; padding: 3px 5px; }
  .k-stacks { gap: 5px; }
  .k-both svg { max-width: 30vw; height: auto; }
  .book-open { padding: 7px 11px; font-size: 0.85rem; }
  .book-btn { padding: 9px 16px; font-size: 1rem; }
}

/* comic extras */
.book-card { background-image: radial-gradient(rgb(43 35 64 / .07) 1.2px, transparent 1.3px); background-size: 12px 12px; }
.book-dots { gap: 5px; max-width: 60%; }
.book-dots button { width: 10px; height: 10px; }
.k-spot { display: flex; align-items: flex-end; justify-content: center; gap: 18px; width: 100%; }
.k-bubbles { display: flex; flex-direction: column; gap: 10px; align-items: flex-end; flex: 1; min-width: 0; max-width: 250px; }
.k-bub { position: relative; display: flex; flex-direction: column; align-items: flex-start; text-align: left; background: #fff; border: 3px solid #2b2340; border-radius: 18px; padding: 6px 12px; text-decoration: none; color: #2b2340; box-shadow: 0 4px 0 rgb(43 35 64 / .3); max-width: 100%; transition: transform .15s; }
.k-bub::after { content: ""; position: absolute; right: -14px; top: 50%; border: 8px solid transparent; border-left: 10px solid #2b2340; transform: translateY(-50%); }
.k-bub.b0 { transform: rotate(-2deg); } .k-bub.b1 { transform: rotate(1.5deg); margin-right: 12px; } .k-bub.b2 { transform: rotate(-1deg); margin-right: 4px; }
.k-bub:hover { transform: scale(1.05); }
.k-bub b { font: 800 1.25rem/1 "Baloo 2", sans-serif; }
.k-bub span { font: 700 0.85rem/1.1 "Baloo 2", sans-serif; color: #4a4060; overflow-wrap: anywhere; }
.k-spot-house { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: none; }
.k-spot-house svg { animation: k-bob 3s ease-in-out infinite; }
.k-say { align-items: center; gap: 4px; }
.k-big { display: flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none; color: #2b2340; }
.k-big svg { width: 120px; height: auto; animation: k-bob 3s ease-in-out infinite; }
.k-name { font: 800 1rem/1.1 "Baloo 2", sans-serif; background: #fff; border: 3px solid #2b2340; border-radius: 10px; padding: 2px 10px; max-width: 12rem; }
.k-big:hover .k-name { background: #ffcf3f; }
.k-speech { position: relative; align-self: flex-start; background: #fff; border: 3px solid #2b2340; border-radius: 22px; padding: 10px 16px; font: 700 1.1rem/1.1 "Baloo 2", sans-serif; box-shadow: 0 4px 0 rgb(43 35 64 / .3); transform: rotate(3deg); margin-top: 6px; }
.k-speech b { font-size: 1.6rem; }
.k-speech::before { content: ""; position: absolute; left: -16px; bottom: 18px; border: 9px solid transparent; border-right: 13px solid #2b2340; }
.book-page p a { color: #2b2340; font-weight: 800; }
.k-wow { position: relative; align-items: center; gap: 0; }
.k-wow svg { animation: k-pulse 1.4s ease-in-out infinite; }
.k-gift { display: flex; flex-direction: column; align-items: flex-start; margin-left: -14px; transform: rotate(-4deg); }
.k-gift b { font: 800 2.3rem/1 "Baloo 2", sans-serif; background: #fff; border: 3px solid #2b2340; border-radius: 12px; padding: 4px 12px; }
.k-gift span { font: 800 1.1rem "Baloo 2", sans-serif; margin: 6px 0 0 8px; }
.k-towers { display: flex; align-items: flex-end; justify-content: center; gap: 4px; width: 100%; min-height: 230px; }
.k-tower { display: flex; flex-direction: column; align-items: center; gap: 2px; flex: 1; min-width: 0; position: relative; }
.k-coins.sm i { width: 32px; height: 12px; margin-top: -4px; border-width: 2px; }
.k-fy { font: 700 0.72rem "Baloo 2", sans-serif; color: #4a4060; }
.k-tower.vote .k-fy { color: #2b2340; font-weight: 800; }
.k-vote { font: 800 0.7rem/1 "Baloo 2", sans-serif; background: #ff7aa8; border: 2px solid #2b2340; border-radius: 8px; padding: 2px 4px; transform: rotate(-8deg); margin-bottom: 2px; }
.k-race { display: flex; flex-direction: column; align-items: stretch; gap: 10px; width: 100%; }
.k-year { align-self: center; font: 800 2.6rem/1 "Baloo 2", sans-serif; background: #fff; border: 4px solid #2b2340; border-radius: 16px; padding: 4px 18px; transform: rotate(-2deg); font-variant-numeric: tabular-nums; box-shadow: 0 4px 0 rgb(43 35 64 / .3); }
.k-rbars { display: flex; flex-direction: column; gap: 8px; }
.k-rrow { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr) 6.6rem; gap: 8px; align-items: center; }
.k-rname { font: 800 0.95rem/1 "Baloo 2", sans-serif; text-align: right; }
.k-rtrack { height: 24px; background: #fff; border: 3px solid #2b2340; border-radius: 99px; overflow: hidden; }
.k-rtrack i { display: block; height: 100%; width: 0; border-radius: 99px; }
.k-rval { font: 800 0.88rem "Baloo 2", sans-serif; text-align: left; white-space: nowrap; }
.k-replay { align-self: center; border: 3px solid #2b2340; background: #fff; border-radius: 999px; padding: 4px 14px; font: 800 0.95rem "Baloo 2", sans-serif; cursor: pointer; color: #2b2340; }
@keyframes k-pulse { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(1.08) rotate(4deg); } }
@media (max-width: 560px) {
  .k-spot { gap: 8px; }
  .k-spot-house svg { width: 90px; }
  .k-bub b { font-size: 1.05rem; }
  .k-big svg { width: 90px; }
  .k-speech { font-size: 0.95rem; padding: 8px 12px; }
  .k-speech b { font-size: 1.25rem; }
  .k-wow svg { width: 110px; }
  .k-gift b { font-size: 1.7rem; }
  .k-coins.sm i { width: 22px; height: 9px; margin-top: -3px; }
  .k-vote { font-size: 0.55rem; padding: 1px 2px; }
  .k-fy { font-size: 0.6rem; }
  .k-rrow { grid-template-columns: 4.6rem minmax(0, 1fr) 5.4rem; gap: 6px; }
  .k-rname, .k-rval { font-size: 0.78rem; }
  .k-year { font-size: 2rem; }
}
@media (prefers-reduced-motion: reduce) { .book *, .book, .book-card { animation: none !important; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
