/* =====================================================================
   Creative-Hero-Clash — slice styling. Mobile-first, portrait-ready (§13.5):
   feed scrolls in a column, the dock is a fixed full-width bottom bar with
   safe-area insets. Rarity palette = canonical Seeker-vs-Scroll tiers.
   ===================================================================== */
:root {
  /* --- bossgames.fun parchment theme tokens (mirrored from the main site) --- */
  --paper: #f3ead6; --paper-2: #ece0c4; --tile: #f7f0df;
  --ink-: #211c17; --ink-soft: #6a6253;
  --crimson: #8e1d1d; --gold: #a9802f;
  /* SMALL-TEXT crimson tier (mirrors bossfeed.fun index.html): same as --crimson in
     light; brightened in dark so ≤15px labels clear ~4.5:1 on the dark paper.
     Fills/buttons/borders/large type keep --crimson. */
  --crimson-text: #8e1d1d;
  --line-: rgba(33,28,23,.16); --line-2: rgba(33,28,23,.08); --shadow: rgba(33,28,23,.16);
  --display: "EB Garamond", Georgia, "Times New Roman", serif;
  --ui: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* --- map the game's internal names onto the site tokens --- */
  --bg: var(--paper); --bg2: var(--paper-2); --panel: var(--tile); --panel2: var(--paper-2);
  --ink: var(--ink-); --muted: var(--ink-soft); --line: var(--line-);
  --accent: var(--gold); --accent2: var(--crimson); --good: #3f7d4f; --bad: var(--crimson);

  /* canonical Seeker-vs-Scroll rarity palette (used site-wide — unchanged) */
  --r-common: #71717a; --r-rare: #3b82f6; --r-epic: #a855f7; --r-legendary: #f59e0b; --r-mythic: #ec4899;
  /* shorter dock (§user 2026-06-16): the bar was eating ~46vh of the screen. Trimmed to 41vh
     so the feed breathes, with a 300px floor (max()) so the BATTLE arena — the tightest
     phase — stays fully visible on short phones instead of collapsing into a scroll. */
  --dock-h: max(37vh, 280px);   /* §user 2026-06-17: bottom bar compact — dock is status-only during battle now */
  /* When wrapped under bossfeed.fun, the site injects a fixed top bar (#fbXpBar). js/game.js measures
     it and sets --site-top so the feed + dock sit BELOW it (nothing hides behind the site chrome).
     Standalone (no bar) it stays 0. */
  --site-top: 0px;
  font-synthesis: none;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #16120e; --paper-2: #1f1812; --tile: #211a13;
    --ink-: #efe6d0; --ink-soft: #a99c84;
    --crimson: #cf4a43; --gold: #c79a44;
    --crimson-text: #e05a52;   /* ≥4.5:1 on both --paper and --tile above (same value as the feed) */
    --line-: rgba(239,230,208,.14); --line-2: rgba(239,230,208,.07); --shadow: rgba(0,0,0,.55);
    --good: #6cc080;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background:
    radial-gradient(130% 90% at 50% -10%, color-mix(in srgb, var(--gold) 10%, var(--paper)) 0%, var(--paper) 55%);
  color: var(--ink); font: 15px/1.45 var(--ui); overflow: hidden; -webkit-text-size-adjust: 100%;
}
/* display serif for headings & names, mirroring the site */
.phase-title, .d-title, .sc-name, .rc-name, .modal-title, .boot-goal, .dc-name,
.hero-name, .chip-name, .br-name, .enemy-name, .event-text, .fb-outcome { font-family: var(--display); }
.phase-title, .sc-name, .rc-name, .modal-title { font-weight: 600; }

/* ---------------- feed (scroll = clock) ---------------- */
.feed {
  position: fixed; inset: var(--site-top) 0 var(--dock-h) 0;
  overflow-y: auto; overflow-x: hidden; scroll-behavior: smooth;
  padding: 14px 12px 40vh; -webkit-overflow-scrolling: touch;
  transition: bottom .25s ease;
}
/* dock minimized → feed fills the screen like a normal feed, leaving only the
   ~44px minimized tab at the bottom (no big empty gap). The GAME KEEPS RUNNING when
   collapsed — this is layout only, distinct from "game off" (.feed-off below). */
.feed.feed-collapsed { bottom: 44px; }
.feed-col { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; position: relative; }
/* PRECISION-DROP SEAM — the insertion line a dragged Post snaps to (overlay: absolutely
   positioned, pointer-events none → never disturbs layout or the tick math's cached offsets) */
.drop-seam { position: absolute; left: 4%; right: 4%; height: 0; pointer-events: none; z-index: 5;
  border-top: 3px solid var(--gold);
  border-radius: 3px;
  box-shadow: 0 0 10px 1px color-mix(in srgb, var(--gold) 65%, transparent);
  animation: seam-pulse 0.9s ease-in-out infinite; }
.drop-seam::before, .drop-seam::after { content: ""; position: absolute; top: -6px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--gold); box-shadow: 0 0 6px var(--gold); }
.drop-seam::before { left: -3px; } .drop-seam::after { right: -3px; }
@keyframes seam-pulse { 0%,100% { opacity: 1; } 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .drop-seam { animation: none; } }
.post-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 13px; cursor: pointer; transition: transform .12s, border-color .2s, box-shadow .2s;
}
/* warm gold hover, not a cold blue edge — stays in the parchment palette both themes */
.post-card:hover { border-color: color-mix(in srgb, var(--gold) 55%, var(--line)); }
/* ACTIVE post highlight. --active-prog (0→1, set every frame in feed.js) warms the ring from the
   crimson accent toward gold as the marker nears the bottom seam — a clear "about to jump forward"
   cue (§user 2026-06-18). No CSS transition: the var already tracks the scroll per-frame, so the
   colour must follow it instantly (a transition would re-introduce the lag we just removed). The
   body.aim-armed combat rules below override this with red throw-tension when a super is charged. */
.post-card.is-centered {
  --ap: var(--active-prog, 0);
  border-color: color-mix(in srgb, var(--gold) calc(var(--ap) * 72%), var(--accent));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--gold) calc(var(--ap) * 72%), var(--accent)),
              0 6px calc(22px + var(--ap) * 12px) -8px color-mix(in srgb, var(--gold) calc(var(--ap) * 60%), var(--accent));
}
/* MINI DIVIDER — a slim emoji row woven between posts (a Post pulse, an ambient event, a battle
   trigger, a placement). Reads as a seam in the feed, not a card: hairline rules either side,
   no hover/cursor, and the ACTIVE ring is suppressed (it's a trace, not a stop). Kind tints:
   post pulse = gold · ambient event = violet · battle = red · placement = gold. */
.post-card.mini-card {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 5px 12px; cursor: default; background: transparent; border: 0; border-radius: 0;
  animation: mini-in .3s ease-out both;
}
.post-card.mini-card::before, .post-card.mini-card::after {
  content: ""; flex: 1; height: 1px; min-width: 18px;
  background: color-mix(in srgb, var(--mini-tint, var(--gold)) 38%, transparent);
}
.post-card.mini-card .mini-text { flex: 0 1 auto;
  font-size: 11.5px; font-weight: 700; letter-spacing: .2px; white-space: nowrap; overflow: hidden;
  /* mix the tint with INK (not muted): keeps the kind-colour but clears ~4.5:1 on light parchment
     at this 11.5px size (muted-mix measured 3.5:1 for gold) — and reads brighter on dark too */
  text-overflow: ellipsis; max-width: 78%; color: color-mix(in srgb, var(--mini-tint, var(--gold)) 72%, var(--ink)); }
/* text-presentation glyphs (e.g. the config's monochrome ⚔) inherit this and match the seam's
   tint instead of landing as a stray ink-black mark; colour emoji simply ignore it */
.post-card.mini-card .mini-emoji { font-size: 15px; line-height: 1; filter: drop-shadow(0 1px 1px rgba(0,0,0,.25));
  color: color-mix(in srgb, var(--mini-tint, var(--gold)) 72%, var(--ink)); }
.post-card.mini-card[data-kind="event"]  { --mini-tint: #8b5cf6; }
.post-card.mini-card[data-kind="battle"] { --mini-tint: var(--bad); }
.post-card.mini-card[data-kind="post"], .post-card.mini-card[data-kind="placed"] { --mini-tint: var(--gold); }
/* TAPPABLE DETAIL — a divider carrying info (hero drop / item) expands an inline panel on tap */
.post-card.mini-card { flex-wrap: wrap; }
.post-card.mini-card.has-detail { cursor: pointer; }
/* the tap affordance must survive truncation: long labels ellipsize, and an inline " ⓘ" was
   the first thing clipped — reserve a fixed slot at the right edge instead */
.post-card.mini-card.has-detail .mini-text { position: relative; padding-right: 15px; }
.post-card.mini-card.has-detail .mini-text::after { content: "ⓘ"; position: absolute; right: 0; top: 50%;
  transform: translateY(-50%); opacity: .65; font-weight: 400; }
.post-card.mini-card.open .mini-text::after { content: "▴"; }
.mini-detail { flex: 1 1 100%; display: flex; gap: 10px; align-items: flex-start; text-align: left;
  margin-top: 7px; padding: 9px 11px; border-radius: 10px; cursor: default;
  background: color-mix(in srgb, var(--mini-tint, var(--gold)) 8%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--mini-tint, var(--gold)) 35%, var(--line)); }
.mini-detail[hidden] { display: none; }
.mini-detail-img { width: 44px; height: 44px; border-radius: 9px; object-fit: cover; object-position: top center;
  flex: 0 0 auto; border: 1px solid color-mix(in srgb, var(--gold) 45%, var(--line)); }
.mini-detail-body { min-width: 0; display: grid; gap: 3px; }
.mini-detail-title { font-family: var(--display); font-weight: 600; font-size: 13.5px; color: var(--ink); }
.mini-detail-sub { font-size: 11px; color: var(--muted); }
.mini-detail-line { font-size: 11px; color: var(--ink-soft); line-height: 1.4; }

/* it's a seam, not a stop: no hover ring, no ACTIVE/NEXT treatment when the marker crosses it.
   The .is-centered/.on-deck ::before chips live later in the file (equal specificity would lose
   there), so these 3-class overrides pin the hairline + kill the chip text on dividers. */
.post-card.mini-card:hover { border-color: transparent; }
.post-card.mini-card.is-centered, .post-card.mini-card.on-deck { border: 0; box-shadow: none; }
.post-card.mini-card.is-centered::before, .post-card.mini-card.on-deck::before {
  content: ""; position: static; flex: 1; height: 1px; min-width: 18px; top: auto; left: auto; right: auto;
  background: color-mix(in srgb, var(--mini-tint, var(--gold)) 38%, transparent);
  border: 0; border-radius: 0; padding: 0; box-shadow: none; font-size: 0; letter-spacing: 0; color: transparent;
}
body.aim-armed .post-card.mini-card.is-centered { border: 0; box-shadow: none; }   /* no red throw-ring on a seam */
@keyframes mini-in { from { opacity: 0; transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) { .post-card.mini-card { animation: none; } }

/* POST INSERT PILL — a placed "power Post" recycling back INTO the scroll as a miniature pill
   (owner 2026-07-18: player-placed Posts read as pills; notifications stay line-marker seams).
   Rarity-tinted ring, ●●○ uses meter for finite-charge Posts, "↻ YOURS" ownership flag; tap to
   expand the full description. On marker-cross it ACTIVATES: one flash, then stays as a dimmed
   spent record with the outcome line stamped under it. */
.post-card.insert-card {
  --pill-tint: var(--r-common);
  display: flex; flex-direction: column; align-items: center; gap: 0;
  padding: 3px 10px; background: transparent; border: 0; border-radius: 0; cursor: pointer;
  animation: mini-in .3s ease-out both;
}
.post-card.insert-card[data-rarity="Rare"]      { --pill-tint: var(--r-rare); }
.post-card.insert-card[data-rarity="Epic"]      { --pill-tint: var(--r-epic); }
.post-card.insert-card[data-rarity="Legendary"] { --pill-tint: var(--r-legendary); }
.post-card.insert-card[data-rarity="Mythic"]    { --pill-tint: var(--r-mythic); }
.insert-pill {
  display: inline-flex; align-items: center; gap: 7px; max-width: 96%;
  padding: 4px 12px; border-radius: 999px;
  background: color-mix(in srgb, var(--pill-tint) 10%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--pill-tint) 55%, var(--line));
  box-shadow: 0 0 9px -3px color-mix(in srgb, var(--pill-tint) 60%, transparent);
}
.insert-emoji { font-size: 14px; line-height: 1; }
.insert-name { font-size: 11.5px; font-weight: 800; letter-spacing: .2px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
/* uses dots + ownership flag share the mini-card's gold-72%-ink mix: raw --gold measured
   ~2.9:1 on light parchment at this size — the ink mix clears ~4.5:1 and brightens on dark */
.insert-uses { font-size: 10px; letter-spacing: 2px; white-space: nowrap;
  color: color-mix(in srgb, var(--gold) 72%, var(--ink));
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.2)); }
/* ownership is ONE color (gold = the player), not rarity-tinted: a Common pill's gray flag
   read as scenery — the whole point of the flag is an instant "this one is MINE" */
.insert-flag { font-size: 9px; font-weight: 800; letter-spacing: .8px; white-space: nowrap;
  color: color-mix(in srgb, var(--gold) 72%, var(--ink)); }
.insert-tap { font: inherit; font-size: 10.5px; font-weight: 800; cursor: pointer;
  padding: 2px 9px; border-radius: 999px; color: var(--ink);
  background: color-mix(in srgb, var(--accent) 22%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--accent) 60%, var(--line)); }
/* expanded detail (tap the pill) — same panel language as the divider detail */
.insert-detail { display: grid; gap: 3px; text-align: left; max-width: 92%;
  margin-top: 6px; padding: 8px 11px; border-radius: 10px; cursor: default;
  background: color-mix(in srgb, var(--pill-tint) 8%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--pill-tint) 35%, var(--line)); }
.insert-detail[hidden] { display: none; }
.insert-sub { font-size: 10.5px; font-weight: 700; text-transform: capitalize; color: var(--muted); }
.insert-desc { font-size: 11.5px; color: var(--ink-soft); line-height: 1.4; }
.insert-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.insert-chip { font-size: 9.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px;
  color: color-mix(in srgb, var(--pill-tint) 70%, var(--ink));
  background: color-mix(in srgb, var(--pill-tint) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--pill-tint) 40%, var(--line)); }
/* ACTIVATION: one bright flash as the marker crosses, then a dimmed spent record */
.post-card.insert-card.fired .insert-pill { animation: insert-fire .55s ease-out both; }
.post-card.insert-card.fired { opacity: .62; }
.insert-result { margin-top: 5px; font-size: 11px; font-weight: 800; letter-spacing: .2px;
  color: color-mix(in srgb, var(--gold) 72%, var(--ink)); }
@keyframes insert-fire {
  0%   { box-shadow: 0 0 0 1px var(--gold), 0 0 18px 2px color-mix(in srgb, var(--gold) 70%, transparent); }
  100% { box-shadow: 0 0 9px -3px color-mix(in srgb, var(--pill-tint) 60%, transparent); }
}
/* it's the player's own Post, not a scenery stop: suppress the big ACTIVE card ring/chips and
   answer the marker with a pill brighten instead (same 3-class override trick as mini-card). */
.post-card.insert-card:hover { border-color: transparent; }
.post-card.insert-card.is-centered, .post-card.insert-card.on-deck { border: 0; box-shadow: none; }
.post-card.insert-card.is-centered::before, .post-card.insert-card.on-deck::before { content: none; }
.post-card.insert-card.is-centered .insert-pill {
  border-color: color-mix(in srgb, var(--gold) 65%, var(--pill-tint));
  box-shadow: 0 0 12px -2px color-mix(in srgb, var(--gold) 65%, transparent);
}
body.aim-armed .post-card.insert-card.is-centered { border: 0; box-shadow: none; }
@media (prefers-reduced-motion: reduce) { .post-card.insert-card, .post-card.insert-card.fired .insert-pill { animation: none; } }

.post-head { display: flex; align-items: center; gap: 7px; margin-bottom: 5px; font-size: 12.5px; }
.post-author { font-weight: 700; }
.post-handle { color: var(--muted); }
.post-diff {
  margin-left: auto; border: 1px solid var(--line); background: var(--panel2); color: var(--muted);
  border-radius: 999px; padding: 2px 9px; font-size: 11.5px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
/* tier borders tint from the accent/bad token so they read on light AND dark parchment;
   the 11.5px LABEL text takes the legible tiers (raw gold measured ~2.8:1 on light panel2 —
   same 72%-ink mix as .mini-text; crimson rides the small-text tier for dark) */
.post-diff[data-tier="mid"] { color: color-mix(in srgb, var(--accent) 72%, var(--ink)); border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.post-diff[data-tier="high"] { color: var(--crimson-text); border-color: color-mix(in srgb, var(--bad) 50%, var(--line)); }
.feed-off .post-diff { visibility: hidden; }     /* game OFF (true pause) hides difficulty (§7.1) */
.post-body { color: var(--ink); font-size: 14px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
/* RESERVE the image box up-front so a lazy image NEVER reflows the column when it
   decodes (kills the scroll-jump AND keeps the tick-clock's cached card offsets valid).
   The box is a FIXED height on the WRAPPER — not aspect-ratio-derived, which on some
   engines re-resolves on load and still nudges layout. The img just fills the reserved box. */
.post-imgs { margin-top: 8px; height: 200px; border-radius: 10px; overflow: hidden; background: #000; contain: layout paint; }
.post-imgs img { display: block; width: 100%; height: 100%; object-fit: cover; }
.feed-sentinel { height: 1px; }

/* small outcome tag stamped on a tapped feed post (changed info on return) */
.post-tag { margin-left: 6px; font-size: 13px; line-height: 1; }

/* consumables (§6.5): a tray of items just above the dock; drag one up onto a feed
   post (it primes there + fires when the marker passes) or tap-to-use in battle */
.cons-tray { position: fixed; left: 0; right: 0; bottom: var(--dock-h); z-index: 12; display: flex; align-items: center; gap: 7px;
  padding: 6px 12px; background: color-mix(in srgb, var(--gold) 12%, var(--panel2)); border-top: 1px solid var(--line);
  overflow-x: auto; -webkit-overflow-scrolling: touch; }
.cons-tray[hidden] { display: none; }
/* when the dock is minimized (feed fills the screen) the tray must ride DOWN with it
   to sit just above the 44px minimized tab — otherwise it floats marooned mid-feed.
   Drag-to-prime still works from here, so we drop it rather than hide it. */
.feed.feed-collapsed ~ .cons-tray { bottom: 44px; }
/* full-screen dock: the dock outgrows --dock-h, so the tray must ride UP with it too
   (same formula as body.dock-full .feed) — else it floats marooned across the middle
   of the battle board, covering the hero rank */
body.dock-full .cons-tray { bottom: min(var(--dock-h-full), calc(100vh - var(--site-top) - var(--feed-peek))); }
@supports (height: 100dvh) {
  body.dock-full .cons-tray { bottom: min(var(--dock-h-full), calc(100dvh - var(--site-top) - var(--feed-peek))); }
}
.cons-label { flex: 0 0 auto; font-size: 10px; color: var(--muted); white-space: nowrap; text-transform: uppercase; letter-spacing: .4px; }
.cons-chip { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 2px; padding: 4px 9px; border-radius: 999px;
  border: 1px solid var(--gold); background: var(--panel); cursor: grab; font-size: 16px; line-height: 1; touch-action: none; color: var(--ink); }
.cons-chip:active { cursor: grabbing; transform: scale(1.08); }
.cc-n { font-size: 11px; font-weight: 800; color: var(--muted); }
.cons-ghost { position: fixed; transform: translate(-50%, -50%); font-size: 30px; pointer-events: none; z-index: 70; filter: drop-shadow(0 3px 6px #0008); }
.post-card { position: relative; }
.post-card.drop-target { outline: 2px dashed var(--gold); outline-offset: 2px; }
/* primed item on a post — a LABELED chip (emoji + what it DOES), not a bare emoji, so
   the player reads the effect + that it fires when this post crosses the marker. Tap to
   cancel (returns the item) (§user 2026-06-16). */
.post-pending { position: absolute; top: 8px; right: 10px; z-index: 4; display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 999px; cursor: pointer;
  background: color-mix(in srgb, var(--gold) 16%, var(--panel)); border: 1px solid var(--gold); color: var(--ink);
  font-size: 11px; font-weight: 700; white-space: nowrap;
  box-shadow: 0 0 7px color-mix(in srgb, var(--gold) 45%, transparent); animation: pulse 1.1s infinite; }
.post-pending .pp-emoji { font-size: 13px; line-height: 1; }
.post-pending:hover { filter: brightness(1.05); }
/* the NEXT post to cross the marker shows it's about to fire */
.post-card.cons-armed { outline: 2px solid var(--gold); outline-offset: 2px; }

/* POST-DETAIL window — tapping a post opens this expanded modal (like clicking a
   Bluesky post on bossfeed), with the slot-reel spinner at the bottom (wireframe §13.4) */
/* scrim leans darker so the spinner modal truly takes focus — at 62% the feed read
   right through it on light parchment and the moment didn't land. */
.post-detail { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px;
  background: color-mix(in srgb, var(--ink) 74%, transparent); opacity: 0; transition: opacity .2s; }
.post-detail.show { opacity: 1; }
.pd-card { position: relative; width: min(440px, 94vw); max-height: 84vh; overflow-y: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 16px 16px 14px;
  box-shadow: 0 24px 60px -20px #000; outline: none; transform: translateY(8px); transition: transform .2s; }
.post-detail.show .pd-card { transform: translateY(0); }
.pd-close { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--panel2); color: var(--ink); font-size: 18px; line-height: 1; cursor: pointer; }
.pd-head { display: flex; align-items: center; gap: 7px; padding-right: 36px; font-size: 13px; margin-bottom: 8px; }
.pd-author { font-weight: 700; }
.pd-handle { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-diff { margin-left: auto; flex: 0 0 auto; border: 1px solid var(--line); background: var(--panel2);
  color: color-mix(in srgb, var(--accent) 72%, var(--ink));   /* 11.5px label — same ink mix as .post-diff */
  border-radius: 999px; padding: 2px 9px; font-size: 11.5px; font-weight: 700; }
.pd-body { color: var(--ink); font-size: 15px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.pd-img { margin-top: 10px; width: 100%; max-height: 300px; object-fit: cover; border-radius: 10px; background: #0002; }
.pd-spinwrap { margin: 14px -16px -14px; padding: 11px 16px; border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--gold) 5%, var(--panel2)); border-radius: 0 0 16px 16px;
  display: flex; flex-direction: column; gap: 7px; }
.pd-spin-hint { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.pd-spin { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.ps-window { position: relative; width: 120px; height: 26px; overflow: hidden; flex: 0 0 auto;
  -webkit-mask: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent);
          mask: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent); }
.ps-reel { display: flex; height: 100%; align-items: center; will-change: transform; }
.ps-cell { flex: 0 0 34px; width: 34px; text-align: center; font-size: 18px; line-height: 26px; }
.ps-marker { position: absolute; left: 50%; top: 1px; bottom: 1px; width: 0; transform: translateX(-1px);
  border-left: 2px solid var(--gold); opacity: .6; }

/* SPOILS spinner modal (§user 2026-06-16) — victory reward is its own reel (hero / item /
   timed empowerment), reusing the slot-reel inside a centered gold-washed card. */
.spoils-card { position: relative; width: min(420px, 92vw); text-align: center;
  background: var(--panel); border: 1px solid color-mix(in srgb, var(--gold) 55%, var(--line)); border-radius: 16px; padding: 18px 16px 14px;
  box-shadow: 0 24px 60px -20px #000, inset 0 0 26px -14px var(--gold); outline: none; transform: translateY(8px); transition: transform .2s; }
.post-detail.show .spoils-card { transform: translateY(0); }
.spoils-title { font-size: 16px; font-weight: 800; color: var(--accent); letter-spacing: .03em; margin-bottom: 4px; }
.spoils-card .pd-spinwrap { justify-content: center; align-items: center; }
.spoils-card .pd-spin { justify-content: center; }
.spoils-prize { display: flex; align-items: center; justify-content: center; gap: 9px; margin-top: 12px; font-size: 15px; font-weight: 800; color: var(--muted); min-height: 28px; }
.spoils-prize .sp-emoji { font-size: 26px; }
.spoils-prize.revealed { color: var(--ink); animation: rc-pop .4s both; }
.spoils-prize.revealed .sp-label { color: var(--accent); }
.ps-static { font-size: 18px; line-height: 1; }   /* parked icon when re-opening an already-rolled post */
.pd-spin.spinning .ps-label { font-style: italic; }
.pd-spin.landed .ps-label { color: var(--ink); font-weight: 700; font-size: 15px; }
.pd-spin.landed[data-outcome="battle"] .ps-label { color: var(--crimson-text); }
.pd-spin.landed[data-outcome="boss"] .ps-label { color: var(--ink); }
.pd-spin.landed[data-outcome="hero"] .ps-label { color: color-mix(in srgb, var(--gold) 80%, var(--ink)); }

/* center marker */
.center-marker {
  position: fixed; left: 0; right: 0; top: calc((100% + var(--site-top) - var(--dock-h)) * 0.5);   /* CENTER the active post in the feed band (below any site top bar) */
  transform: translateY(-50%);   /* the JS markerY is the EXACT center line; pull the arrow row up by
                                    half its height so the glyphs' vertical centers sit ON that line —
                                    not half a glyph below it — so the arrows point exactly where the
                                    active post switches (§user 2026-06-18). */
  display: flex; align-items: center; justify-content: space-between; pointer-events: none; z-index: 5; opacity: .5;
  transition: top .25s ease;   /* glide with the dock/feed mode change (.25s) instead of snapping ahead of them */
}
.cm-arrow { color: var(--accent); font-size: 13px; line-height: 1; filter: drop-shadow(0 0 4px var(--accent)); }
.feed-off ~ .center-marker { opacity: .12; }   /* game OFF dims the tick marker */
/* when the bar is minimized the feed grows to bottom:44px, so its scroll-center (the JS markerY =
   clientHeight*0.5) moves too — keep the visible arrow on that exact line or the highlight and the
   arrow would point at different posts (§user 2026-06-18: precise on all platforms/states). */
.feed.feed-collapsed ~ .center-marker { top: calc((100% + var(--site-top) - 44px) * 0.5); }

/* ---------------- dock ---------------- */
/* THREE height modes (JS toggles the classes): half = default, .h-full = near-full-screen,
   .dock-collapsed = minimized to a 44px tab. Drag the head to resize (snaps on release). */
:root { --dock-h-full: min(92vh, 760px); --feed-peek: 128px; }
.dock { position: fixed; left: 0; right: 0; bottom: 0; height: var(--dock-h); z-index: 10; transition: height .25s ease; }
/* FULL mode (owner 2026-07-10): never rises above the site top bar AND always leaves a
   --feed-peek strip of feed visible — the ACTIVE POST stays on screen and scrollable, so the
   tick clock (and battle AUTO-less play) keeps working in full-screen. 100dvh (not vh): on
   mobile, 100vh overshoots by the collapsed URL bar and shoved the dock head UNDER the site
   header (the bug in the owner's screenshot). */
.dock.h-full { height: min(var(--dock-h-full), calc(100vh - var(--site-top) - var(--feed-peek))); }
@supports (height: 100dvh) {
  .dock.h-full { height: min(var(--dock-h-full), calc(100dvh - var(--site-top) - var(--feed-peek))); }
}
/* full mode: the feed becomes the peek strip (its own scroller), and the center marker — the
   "this post is active" arrows + tick line — recenters inside that strip */
body.dock-full .feed { bottom: min(var(--dock-h-full), calc(100vh - var(--site-top) - var(--feed-peek))); }
@supports (height: 100dvh) {
  body.dock-full .feed { bottom: min(var(--dock-h-full), calc(100dvh - var(--site-top) - var(--feed-peek))); }
}
body.dock-full .center-marker { top: calc(var(--site-top) + var(--feed-peek) / 2); }
.dock.dock-dragging { transition: none; }   /* 1:1 pointer follow while dragging */
/* when minimized, the full-height .dock must STOP capturing pointer events over the feed
   where the bar used to be — otherwise the feed won't scroll/drag there (§user bug). Only
   the visible 44px tab (the .dock-bar) stays interactive. */
.dock.dock-collapsed { pointer-events: none; }
.dock.dock-collapsed .dock-bar { pointer-events: auto; }
.dock-bar {
  height: 100%; display: flex; flex-direction: column; position: relative;
  background: linear-gradient(180deg, var(--panel2), var(--bg2));
  border-top: 1px solid var(--line); border-radius: 16px 16px 0 0;
  box-shadow: 0 -10px 40px -16px #000; padding-bottom: env(safe-area-inset-bottom);
  transition: transform .25s ease;
}
/* slide DOWN to leave a 44px tab — 100% (of the current container height) works at any mode */
.dock-bar.min { transform: translateY(calc(100% - 44px)); }
.dock-bar.dragging { transition: none; }
/* sheet-style grab handle — absolutely placed so it never shifts the head; a fat hit area */
.dock-grab { position: absolute; top: 0; left: 50%; transform: translateX(-50%); z-index: 2;
  width: 84px; height: 16px; display: flex; align-items: center; justify-content: center;
  cursor: ns-resize; touch-action: none; }
/* resting pill sits at ~32% ink so it reads as a drag-handle on touch (no hover there) —
   still a subtle sheet grabber, not a heavy bar; hover/drag lifts it to gold below. */
.dock-grab::before { content: ""; width: 40px; height: 4px; border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 32%, transparent); transition: background .15s, width .15s; }
.dock-grab:hover::before, .dock.dock-dragging .dock-grab::before { background: color-mix(in srgb, var(--gold) 60%, transparent); width: 48px; }
.dock-head { touch-action: none; }   /* let head-drag resize without the page scrolling */
.dock-up:disabled { opacity: .35; cursor: default; }
/* MINIMAL utility strip (Alice): no brand title — the HUD (hearts + Lv) leads on the
   left, icon buttons recede on the right. Slimmer head (38px) than before (~58px). */
.dock-head { display: flex; align-items: center; flex-wrap: nowrap; gap: 7px; padding: 5px 11px; min-height: 34px; border-bottom: 1px solid var(--line); }
/* hearts = the SOUL motif (§32) — they carry the color and lead the strip */
.d-lives { flex: 0 1 auto; color: var(--bad); letter-spacing: .5px; overflow: hidden; white-space: nowrap; min-width: 0; font-size: 14px; }
.d-level { flex: 0 0 auto; color: var(--muted); font-weight: 600; font-size: 12px; white-space: nowrap; }   /* recede; hearts lead */
/* dock-head icon buttons: square ~34px hit targets — lighter than the old 40px, glyph
   centered, warm gold hover/active feedback. */
.dock-head button {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 34px; padding: 0 5px;
  background: var(--panel); border: 1px solid var(--line); color: var(--ink);
  border-radius: 9px; cursor: pointer; line-height: 1;
  transition: border-color .15s, background .15s, transform .08s;
}
.dock-head button:hover { border-color: color-mix(in srgb, var(--gold) 55%, var(--line)); background: color-mix(in srgb, var(--gold) 8%, var(--panel)); }
.dock-head button:active { transform: scale(.94); }
.d-board, .d-settings, .dock-min, .dock-up, .dock-off, .d-boss { font-size: 16px; }
/* Daily Boss CTA — a subtle crimson tint so the challenge reads as the day's headline goal */
.d-boss { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); }
.d-boss:hover { background: color-mix(in srgb, var(--bad) 10%, var(--panel)); border-color: color-mix(in srgb, var(--bad) 60%, var(--line)); }
.dock-min { margin-left: auto; }
.dock-head .dock-min { margin-left: 0; }
.dock-head > .d-board { margin-left: auto; }
/* power toggle — armed (game OFF) glows crimson so "off" is unmistakable */
.dock-off[aria-pressed="true"] { color: var(--crimson, var(--bad)); border-color: color-mix(in srgb, var(--bad) 60%, var(--line)); background: color-mix(in srgb, var(--bad) 12%, var(--panel)); }
/* whole bar reads as "asleep" when the game is off — desaturate + soften the body */
.dock-bar.off { filter: saturate(.55) brightness(.98); }
.dock-bar.off .dock-body { opacity: .55; }
.dock-body { flex: 1; overflow-y: auto; padding: 12px 13px; }

/* primary dock heading — lean on EB Garamond + size for a clear focal point (was 15px,
   barely above body text). font-synthesis is off, so keep weight at the loaded 600. */
.phase-title { font-size: 18px; font-weight: 600; line-height: 1.2; margin: 0 0 12px; letter-spacing: .01em; }
.phase-title b { color: var(--accent); font-weight: 600; }
.phase-sub { color: var(--muted); font-size: 11.5px; margin: 8px 0 5px; text-transform: uppercase; letter-spacing: .6px; }
.empty-note { color: var(--muted); font-size: 13px; padding: 14px; text-align: center; border: 1px dashed var(--line); border-radius: 10px; }

/* starter — THE first-impression hero choice. Stack full-width on narrow phones
   (legible, premium, no orphaned 2+1 row); go clean 3-up once there's room. */
.starter-row { display: grid; grid-template-columns: 1fr; gap: 9px; }
@media (min-width: 440px) { .starter-row { grid-template-columns: repeat(3, 1fr); } }
.starter-card { text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 13px; cursor: pointer; color: var(--ink); transition: transform .12s, border-color .2s, box-shadow .2s; }
.starter-card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 8px 22px -12px var(--shadow); }
.starter-card[data-rarity="Legendary"] { border-color: var(--r-legendary); }
.starter-card[data-rarity="Epic"] { border-color: var(--r-epic); }
/* 11px kicker: raw gold sat ~2.8:1 on the light card — same 72%-ink mix as .mini-text */
.sc-type { font-size: 11px; color: color-mix(in srgb, var(--accent) 72%, var(--ink)); text-transform: uppercase; letter-spacing: .5px; }
.sc-name { font-weight: 800; margin: 3px 0; }
.sc-meta { font-size: 12px; color: var(--muted); }
/* stat row: each stat is its own pill (clear separation) with a hover tooltip */
.sc-stats { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.stat { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 6%, transparent); border: 1px solid var(--line-2);
  font-size: 12.5px; line-height: 1; cursor: help; }
.stat .stat-ic { font-size: 12px; }
.stat .tier { color: var(--gold); font-size: 11px; letter-spacing: -1.5px; font-weight: 700; }
.stat[data-tier="low"] .tier, .stat[data-tier="medium"] .tier { color: var(--muted); letter-spacing: 0; }

/* long-press tooltip (touch): reveals a token's native `title` on phones, where
   hover doesn't exist — e.g. the stat pills above. Inverted chip so it reads in
   both light and dark themes. See js/longpress-tip.js. */
.lp-tip { position: fixed; z-index: 9999; max-width: 220px; padding: 6px 10px; border-radius: 8px;
  background: var(--ink); color: var(--paper); font-size: 12.5px; line-height: 1.3; font-weight: 600;
  box-shadow: 0 6px 20px rgba(0,0,0,.3); pointer-events: none; opacity: 0; transform: translateY(4px);
  transition: opacity .12s ease, transform .12s ease; }
.lp-tip.show { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .lp-tip { transition: none; } }

/* team */
.team-tabs { display: flex; gap: 6px; margin-bottom: 8px; }
.team-tab { flex: 1; background: var(--panel); border: 1px solid var(--line); color: var(--muted); border-radius: 9px; padding: 7px; cursor: pointer; font-weight: 700; }
.team-tab[aria-pressed="true"] { color: var(--bg); background: var(--accent); border-color: var(--accent); }
.team-slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.team-slot { min-height: 50px; background: var(--panel); border: 1px dashed var(--line); border-radius: 10px; color: var(--ink); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 4px; }
.team-slot:has(.chip-name) { border-style: solid; }
/* long author names (e.g. "Wolfgang Amadeus Mozart") get tight in a 4-up slot —
   clamp to 2 lines + size down so they read instead of stacking 3 cramped rows */
.team-slot .chip-name { font-size: 12px; line-height: 1.15; text-align: center;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.slot-empty { font-size: 22px; color: var(--muted); }
/* ITEMS / inventory tab (§user 2026-06-16): a list of owned consumables, each with
   count + a clear one-line description of what it DOES (no hidden tooltips needed). */
.item-grid { display: flex; flex-direction: column; gap: 7px; }
.item-row { display: flex; align-items: center; gap: 10px; background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 10px; padding: 9px 11px; }
.item-emoji { font-size: 22px; line-height: 1; flex: 0 0 auto; }
.item-text { min-width: 0; }
.item-name { display: flex; align-items: baseline; gap: 7px; font-weight: 800; color: var(--ink); }
.item-count { color: color-mix(in srgb, var(--gold) 72%, var(--ink)); font-weight: 800; font-size: 12px; }   /* 12px count — ink mix clears ~4.5:1 (raw gold didn't) */
.item-desc { font-size: 12px; color: var(--muted); }
.hero-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 7px; }
.hero-chip { text-align: left; background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--r-common); border-radius: 9px; padding: 6px 7px; cursor: pointer; color: var(--ink); display: flex; flex-direction: column; gap: 2px; }
.hero-chip[data-rarity="Rare"] { border-left-color: var(--r-rare); }
.hero-chip[data-rarity="Epic"] { border-left-color: var(--r-epic); }
.hero-chip[data-rarity="Legendary"] { border-left-color: var(--r-legendary); }
.hero-chip[data-rarity="Mythic"] { border-left-color: var(--r-mythic); }
.hero-chip.sel { outline: 2px solid var(--accent); }
.chip-name { font-weight: 700; font-size: 13px; }
.chip-meta { font-size: 11px; color: var(--muted); }

/* fusion — keep the whole equation (CORE + ✦ + ✦ = result) on ONE line at 375px.
   The slots used to min-width:78px and wrap-orphan the "= result" onto a left-aligned
   2nd row (read as broken). Now the slots flex-shrink to share the row and the result is
   sized to fit beside them, so the equation always reads as one intentional statement. */
.fusion-row { display: flex; align-items: stretch; gap: 5px; margin-bottom: 10px; flex-wrap: nowrap; }
/* CORE is given a touch MORE room than the two consumed Inspirations — it's the hero you
   keep, so it leads the equation both in size and in the gold treatment below (§Alice). */
.fusion-slot { flex: 1 1 0; min-width: 0; min-height: 60px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; color: var(--ink); cursor: pointer; padding: 7px 5px; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.fusion-slot[data-i="0"] { flex-grow: 1.25; }
.fslot-label { color: var(--muted); font-weight: 800; font-size: 11px; line-height: 1.1; text-align: center; letter-spacing: .2px; }
/* empty-slot role legend: CORE reads as "kept", the two Inspirations as "fuel" — so the
   player understands WHICH hero survives before they ever fill a slot (§Alice). */
.fusion-slot:not([data-filled]) .fslot-label::after { display: block; margin-top: 3px; font-size: 8.5px; font-weight: 700;
  letter-spacing: .4px; text-transform: uppercase; opacity: .8; }
.fusion-slot[data-i="0"]:not([data-filled]) .fslot-label { color: var(--gold); }
.fusion-slot[data-i="0"]:not([data-filled]) .fslot-label::after { content: "kept"; }
.fusion-slot[data-i="1"]:not([data-filled]) .fslot-label::after,
.fusion-slot[data-i="2"]:not([data-filled]) .fslot-label::after { content: "consumed"; }
/* the CORE slot wears a persistent gold left-rim + faint wash in EVERY state (empty/armed/
   filled) so the kept hero is unmistakable once portraits fill all three look-alike chips.
   The rarity-tint rule below overrides background once filled, so re-assert the wash there too. */
.fusion-slot[data-i="0"] { border-left: 3px solid color-mix(in srgb, var(--gold) 70%, var(--line));
  background: color-mix(in srgb, var(--gold) 7%, var(--panel)); }
.fusion-slot[data-i="0"][data-rarity] { background: color-mix(in srgb, var(--gold) 14%, var(--panel)); border-left-color: var(--gold); }
.fusion-op, .fusion-eq { flex: 0 0 auto; color: var(--muted); font-weight: 800; align-self: center; }
.fusion-eq { font-size: 18px; color: color-mix(in srgb, var(--gold) 80%, var(--ink)); }
.fusion-result { flex: 0 0 auto; min-width: 54px; min-height: 60px; padding: 0 7px; display: flex; align-items: center; justify-content: center; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; font-variant-numeric: tabular-nums; }
.fusion-result:has(.fres-lv), .fusion-result:has(.fres-q.disc) { border-color: color-mix(in srgb, var(--gold) 45%, var(--line)); background: color-mix(in srgb, var(--gold) 8%, var(--panel2)); }
.fres-q { color: var(--muted); font-size: 18px; }
.fres-q.disc { color: var(--r-mythic); font-weight: 900; font-size: 20px; animation: pulse 1s infinite; }
.fres-lv { color: var(--good); font-weight: 800; font-size: 14px; line-height: 1.05; text-align: center; }
.fuse-btn { width: 100%; min-height: 44px; margin: 6px 0 4px; background: var(--accent); color: var(--bg); border: none; border-radius: 10px; padding: 11px; font-weight: 800; letter-spacing: .3px; cursor: pointer; box-shadow: 0 3px 12px -4px var(--accent); transition: filter .15s, transform .08s, box-shadow .15s; }
.fuse-btn:not(:disabled):hover { filter: brightness(1.05); }
.fuse-btn:not(:disabled):active { transform: scale(.98); }
.fuse-btn:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }

/* battle arena */
.arena { position: relative; }
.battle { position: relative; }   /* anchor the banner + crit shake */

/* ============================================================
   COMPACT BATTLE (owner sketch 2026-07-10): a numbers-first board — every unit
   reads as glyph + ⚔/❤ pair, a dashed line divides the two sides, and the tick
   counter becomes a circled "moves" badge. Mechanics untouched; noise removed.
   ============================================================ */
.enemy-nums { font-size: 10px; font-weight: 800; text-align: center; color: var(--ink-soft);
  font-variant-numeric: tabular-nums; white-space: nowrap; letter-spacing: .2px; }
.hero-hp { margin-left: auto; font-size: 11px; font-weight: 800; color: var(--ink-soft);
  font-variant-numeric: tabular-nums; white-space: nowrap; }
/* THE BOARD (owner 2026-07-10): a miniaturized top-down autobattler — HoMM/TFT style.
   Heroes LEFT (🏹 back col · ⚔ front col) face enemies RIGHT (⚔ front · 🏹 back) across a
   dashed center line. Units are small tokens: portrait + ⚔/❤ pair + micro bars; names in tooltips. */
.battle.compact .b-tick { border: 2px solid color-mix(in srgb, var(--gold) 55%, var(--line)); border-radius: 999px;
  padding: 3px 9px; font-weight: 800; color: var(--ink); background: var(--panel2); }
.battle.compact .b-status { display: none; }             /* the coaching line — biggest text noise */
/* sized to FIT the half-height dock with no inner scroll (~150px board); full-screen lets it grow */
.battle.compact .board { display: flex; align-items: stretch; height: 150px; margin-bottom: 4px;
  border: 1px solid var(--line); border-radius: 12px; padding: 8px 4px;
  background:
    linear-gradient(color-mix(in srgb, var(--ink) 4%, transparent) 1px, transparent 1px) 0 0 / 100% 26px,
    color-mix(in srgb, var(--gold) 4%, var(--panel));     /* faint ruled ground = top-down board */
  overflow: hidden; }
.battle.compact .hero-zone { display: flex; gap: 6px; flex: 0 0 47%; padding: 14px 8px 6px 4px;
  border-right: 2px dashed color-mix(in srgb, var(--ink) 32%, transparent); }
.battle.compact .hero-col { flex: 1; display: flex; flex-direction: column; justify-content: space-evenly;
  gap: 6px; position: relative; padding-top: 4px; }
.battle.compact .hero-col::before { position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  font-size: 10px; opacity: .55; }
.battle.compact .hero-col[data-col="back"]::before { content: "🏹"; }
.battle.compact .hero-col[data-col="front"]::before { content: "⚔"; }
.battle.compact .enemy-lane { flex: 1; position: relative; min-height: 0; border: 0; margin: 0; border-radius: 0;
  display: flex; gap: 6px; padding: 14px 6px 6px; }
/* enemy tokens FLOW in their columns (⚔ front nearest the line · 🏹 back), like a bench */
.battle.compact .enemy-col { flex: 1; display: flex; flex-direction: column; justify-content: space-evenly;
  align-items: center; gap: 8px; position: relative; }
.battle.compact .enemy-col::before { position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  font-size: 10px; opacity: .55; }
.battle.compact .enemy-col[data-col="front"]::before { content: "⚔"; }
.battle.compact .enemy-col[data-col="back"]::before { content: "🏹"; }
.battle.compact .enemy { position: relative; transform: none; top: auto; left: auto; }
.battle.compact .enemy-name { display: none; }                 /* tokens, not cards — names in tooltips */
.battle.compact .hero-name { display: none; }
.battle.compact .enemy-portrait { width: 28px; height: 28px; }
.battle.compact .hero { padding: 4px 5px; }
.battle.compact .hero-top { justify-content: center; gap: 6px; margin: 0; }
.battle.compact .hero-hp { margin-left: 0; }
.battle.compact .hero-affixes { height: 9px; font-size: 8px; text-align: center; }
.battle.compact .hero .hpbar, .battle.compact .hero .chargebar { height: 4px; }
.battle.compact .enemy .hpbar { width: 44px; height: 4px; }
.battle.compact .aim-pulse-wrap { top: auto; }                 /* inline top from paintPulse wins on the board */
/* battle auto-expands the dock to FULL (dock.js showBattle) — the board takes the room,
   sized so hud + board always fit the window with NO inner scroll */
.dock.h-full .battle.compact .board { height: min(52vh, 430px); }
/* number pair at arm's length: 10px undershot the hero side's 11px — match it (⚔/❤ is the board's
   whole read; it can't be the smallest text on screen). Tight line-height: the body's 1.45
   padded every token ~4px taller for nothing. */
.battle.compact .enemy-nums { font-size: 11px; line-height: 1.15; }
/* column headers: 10px @ 55% was invisible on the parchment ground. VS16 forces the color-emoji
   ⚔️ so the melee header carries the same visual weight as the color 🏹 beside it */
.battle.compact .hero-col::before, .battle.compact .enemy-col::before { font-size: 11px; opacity: .7; }
.battle.compact .hero-col[data-col="front"]::before,
.battle.compact .enemy-col[data-col="front"]::before { content: "⚔\FE0F"; }
/* a column with no units gets no header — a 🏹 hanging over bare ground reads as a missing token */
.battle.compact .hero-col:empty::before, .battle.compact .enemy-col:empty::before { content: none; }
/* stacked tokens sit ~8px apart, so the 58px classic halo blob-merged across neighbors —
   shrink it to token scale so "aim here" still points at ONE unit */
.battle.compact .crit-halo { width: 44px; height: 44px; top: -2px; }
/* CROWDED RANK (half dock only): 3 full-size tokens ≈ 190px in a ~130px column — the 3rd unit
   was clipped INVISIBLE behind the board's overflow:hidden. Shrink the rank at 3+ so every
   unit stays on the board; the full-screen board has room and keeps full size. */
.dock:not(.h-full) .battle.compact .enemy-col:has(> .enemy:nth-child(3)) { gap: 2px; }
.dock:not(.h-full) .battle.compact .enemy-col:has(> .enemy:nth-child(3)) .enemy { gap: 2px; }
.dock:not(.h-full) .battle.compact .enemy-col:has(> .enemy:nth-child(3)) .enemy-icon { width: 18px; height: 18px; }
.dock:not(.h-full) .battle.compact .enemy-col:has(> .enemy:nth-child(3)) .enemy-portrait { width: 16px; height: 16px; }
.dock:not(.h-full) .battle.compact .enemy-col:has(> .enemy:nth-child(3)) .hpbar { margin-top: 0; }
.dock:not(.h-full) .battle.compact .hero-col:has(> .hero:nth-child(3)) { gap: 2px; }
.dock:not(.h-full) .battle.compact .hero-col:has(> .hero:nth-child(3)) .hero { padding: 2px 4px; }
.dock:not(.h-full) .battle.compact .hero-col:has(> .hero:nth-child(3)) .hero-top { line-height: 1.15; }
.dock:not(.h-full) .battle.compact .hero-col:has(> .hero:nth-child(3)) .hero-portrait { width: 12px; height: 12px; }
/* kits stay readable in the token tooltips — the strip is the first thing to go when cramped */
.dock:not(.h-full) .battle.compact .hero-col:has(> .hero:nth-child(3)) .hero-affixes { display: none; }
.dock:not(.h-full) .battle.compact .hero-col:has(> .hero:nth-child(3)) .hpbar,
.dock:not(.h-full) .battle.compact .hero-col:has(> .hero:nth-child(3)) .chargebar { margin-top: 2px; }
/* 4-up rank: shave the last paddings so the whole column stays on the board */
.dock:not(.h-full) .battle.compact .hero-col:has(> .hero:nth-child(4)) .hero { padding: 1px 4px; }
.dock:not(.h-full) .battle.compact .hero-col:has(> .hero:nth-child(4)) .hpbar,
.dock:not(.h-full) .battle.compact .hero-col:has(> .hero:nth-child(4)) .chargebar { margin-top: 1px; }
/* HUD row: readouts on the left, the control cluster pinned right. Tighter gap so
   the Tick/Budget pair stays coherent instead of floating apart (boss = both shown). */
.battle-hud { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); margin-bottom: 5px; }
/* readouts must never wrap — at 375px the boss "Tick"/"Budget" used to break to a
   2nd line each and read as broken. nowrap + tabular figures keep them on one line. */
.b-tick, .b-budget { white-space: nowrap; font-variant-numeric: tabular-nums; }
.b-budget { color: var(--crimson-text); }   /* small readout — text tier for dark-mode contrast */
/* ACT (single tick) + AUTO (toggle) — the paired tick-group, pinned right. The decisive
   verb (THROW) now lives full-width at the bottom of the arena (.fire-zone), not here. */
.act-btn { margin-left: auto; }
/* `.auto-btn` is ALSO reused by the team/fusion helper buttons (Auto-Equip / Fuse All),
   so every battle-segmented rule below is scoped to `.battle-hud` — otherwise the "square
   left corner" seam leaked onto those standalone gold buttons and flattened their left edge. */
.act-btn, .battle-hud .auto-btn { white-space: nowrap; background: var(--panel2); border: 1px solid var(--line); color: var(--ink); border-radius: 9px; padding: 8px 11px; min-height: 38px; font-weight: 800; font-size: 12px; letter-spacing: .3px; cursor: pointer; transition: transform .08s, background .15s, border-color .15s; }
/* join ACT↔AUTO into one segmented control: shared seam, square inner corners */
.act-btn { border-right-width: 0; border-radius: 9px 0 0 9px; }
.battle-hud .auto-btn:not(.on) { border-radius: 0 9px 9px 0; }
.act-btn:hover, .battle-hud .auto-btn:not(.on):hover { border-color: color-mix(in srgb, var(--gold) 50%, var(--line)); }
.act-btn:active, .battle-hud .auto-btn:active { transform: translateY(1px); }
/* ACT is throttled (one tick per ~600ms) — show the cooldown so mashing reads as
   "wait", not "broken": fade + a sweeping gilt wipe across the cool window. */
.act-btn.cooling { opacity: .55; pointer-events: none; position: relative; overflow: hidden; }
.act-btn.cooling::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--gold) 30%, transparent), transparent); transform: translateX(-100%); animation: act-cool .6s linear; }
@keyframes act-cool { to { transform: translateX(100%); } }
.battle-hud .auto-btn.on { background: var(--gold); color: var(--bg); border-color: var(--gold); border-radius: 9px; }

/* THROW zone = the one verb in battle: a full-width, thumb-reachable bar at the BOTTOM
   of the arena (Alice: kill the HUD fire button, put the action under the thumb). */
/* THROW only appears once a ranged SUPER is charged (.show, set by combat). Basic ranged
   shots auto-fire every tick, so there's no button to press until the payoff is ready. */
.fire-zone { display: none; width: 100%; margin-top: 9px; background: var(--bad); color: #fff; border: none; border-radius: 11px; padding: 12px; min-height: 46px; font-weight: 800; font-size: 14px; letter-spacing: .4px; cursor: pointer; box-shadow: 0 4px 16px -5px var(--bad); transition: transform .08s, box-shadow .15s, filter .15s; }
.fire-zone.show { display: block; animation: fz-pop .18s ease-out; }
@keyframes fz-pop { from { transform: translateY(7px); opacity: 0; } }
.fire-zone:hover { filter: brightness(1.06); box-shadow: 0 6px 20px -5px var(--bad); }
.fire-zone:active { transform: scale(.98); }
@media (prefers-reduced-motion: reduce) { .fire-zone.show { animation: none; } }

/* ENEMY LANE: a STATIC lineup across the top. Enemies are absolutely positioned at
   their fixed center-x so the sweeping reticle's left% maps 1:1 onto them (Darren+Alice).
   overflow:visible so the reticle + crit halos can reach up over the lineup. */
.enemy-lane { position: relative; min-height: 90px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 4px; overflow: visible;
  background:
    radial-gradient(120% 80% at 50% -20%, color-mix(in srgb, var(--gold) 9%, var(--tile)), var(--tile) 70%),
    linear-gradient(180deg, transparent 58%, color-mix(in srgb, var(--ink) 8%, var(--tile)));
  box-shadow: inset 0 3px 16px -6px var(--shadow), inset 0 -10px 18px -14px var(--shadow); }
.enemy { position: absolute; top: 12px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 4px; }
/* gold "aim here for a crit" halo under each enemy — lit only while a thrower is armed */
.crit-halo { position: absolute; top: -4px; left: 50%; width: 58px; height: 58px; transform: translateX(-50%); border-radius: 50%; pointer-events: none; opacity: 0; transition: opacity .18s;
  background: radial-gradient(circle, color-mix(in srgb, var(--gold) 65%, transparent) 0%, color-mix(in srgb, var(--gold) 26%, transparent) 40%, transparent 70%); }
.battle.armed .enemy:not(.dead) .crit-halo { opacity: .9; }
.enemy-icon { width: 32px; height: 32px; display: grid; place-items: center; background: linear-gradient(145deg, color-mix(in srgb, var(--crimson) 30%, var(--tile)), color-mix(in srgb, var(--crimson) 14%, var(--tile))); border: 1px solid var(--crimson); border-radius: 4px; transform: rotate(45deg); color: var(--crimson); font-weight: 800; box-shadow: 0 3px 10px -4px var(--shadow), inset 0 0 8px -3px var(--crimson); position: relative; z-index: 1; }
.enemy-icon > * { transform: rotate(-45deg); }
.enemy[data-boss="true"] .enemy-icon { width: 42px; height: 42px; background: #3a1a2a; box-shadow: 0 0 14px var(--r-mythic); }
.enemy.asleep { opacity: .55; }
.enemy.dead { opacity: .15; filter: grayscale(1); }
/* cap the label below the per-enemy spacing (≈73px at a 4-up lineup) so adjacent names
   never kiss; clamp to 2 lines. */
.enemy-name { font-size: 10.5px; color: var(--ink-soft); max-width: 66px; text-align: center; line-height: 1.15;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* boss affix strip — the announced modifier emoji, right under the boss name (§6: never hidden) */
.enemy-affixes { font-size: 10px; line-height: 1; text-align: center; letter-spacing: 1px; margin-top: 1px;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.3)); }

/* AIM TRACK: a thin groove under the lineup; the reticle sweeps it L↔R (constant px/sec).
   The crit zones live ON the enemies (the halos above), so this is the travel rail. */
.aim-track { position: relative; height: 12px; border-radius: 999px; margin: 0 0 8px; overflow: visible;
  background: color-mix(in srgb, var(--ink) 14%, transparent); box-shadow: inset 0 1px 2px var(--shadow); opacity: .45; transition: opacity .18s; }
.battle.armed .aim-track { opacity: 1; }
/* the reticle = your aim. A gold caret line that rises up over the enemy lineup. */
.reticle { position: absolute; top: -44px; bottom: -3px; left: 50%; width: 2px; transform: translateX(-1px); background: linear-gradient(180deg, transparent, var(--gold) 28%, var(--gold)); box-shadow: 0 0 8px var(--gold); opacity: 0; transition: opacity .18s; z-index: 2; }
.battle.armed .reticle { opacity: 1; }
.reticle::after { content: "▲"; position: absolute; bottom: -3px; left: 50%; transform: translateX(-50%); color: var(--gold); font-size: 11px; line-height: 1; }
.hero-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); gap: 6px; }
.hero { background: var(--panel); border: 1px solid var(--line); border-radius: 9px; padding: 6px; position: relative; }
.hero[data-lane="front"] { border-bottom: 2px solid var(--r-legendary); }
.hero[data-lane="back"] { border-bottom: 2px solid var(--r-rare); }
/* rarity read on the combat card (Alice: they were flat) — left edge tint */
.hero[data-rarity="Common"] { border-left: 3px solid var(--r-common); }
.hero[data-rarity="Rare"] { border-left: 3px solid var(--r-rare); }
.hero[data-rarity="Epic"] { border-left: 3px solid var(--r-epic); }
.hero[data-rarity="Legendary"] { border-left: 3px solid var(--r-legendary); }
.hero[data-rarity="Mythic"] { border-left: 3px solid var(--r-mythic); }
/* ranged "charged & ready to throw" — clear outline + a READY cue so the wind-up→throw
   mechanic reads at a glance (the charge bar fills, then this; the reticle goes live). */
.hero.ready { box-shadow: 0 0 0 2px var(--accent), 0 0 16px -2px var(--accent); animation: pulse .6s infinite; }
.hero.ready::after { content: "● READY"; position: absolute; top: -9px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: var(--bg); font-size: 8px; font-weight: 800; letter-spacing: .3px;
  padding: 1px 6px; border-radius: 999px; white-space: nowrap; box-shadow: 0 1px 4px var(--shadow); }
.hero.ready .chargefill { background: linear-gradient(180deg, #fff8, var(--accent) 60%); }   /* bar reads "full" */
/* combat juice: melee "runs forward" (lunges up toward the enemy row), ranged muzzle-pops, enemies flinch */
.hero.lunge { animation: lunge .2s ease-out; }
@keyframes lunge { 40% { transform: translateY(-7px); } }
.hero.shoot { animation: shoot .22s ease-out; }
@keyframes shoot { 30% { box-shadow: 0 0 0 2px var(--r-rare), 0 0 14px -2px var(--r-rare); } }
.enemy.hit .enemy-icon { animation: ehit .17s ease-out; }
@keyframes ehit { 40% { filter: brightness(1.9) drop-shadow(0 0 6px #fff); } }
.hero.dead { opacity: .3; }
.hero-top { display: flex; justify-content: space-between; font-size: 9.5px; color: var(--muted); gap: 4px; }
.hero-name { color: var(--ink); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* hero affix strip — kit legibility on the battle card. Fixed height (rendered even when empty)
   so Common cards stay the same height as affixed ones — no ragged row. */
.hero-affixes { height: 12px; font-size: 9.5px; line-height: 12px; letter-spacing: 1px; overflow: hidden;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.25)); }
.hero-pow { flex: 0 0 auto; color: var(--ink); font-weight: 800; font-variant-numeric: tabular-nums; }   /* POWER = avg dmg/tick */
.hero[data-type="melee"]  .hero-pow { color: var(--r-legendary); }   /* ⚔ steady */
.hero[data-type="ranged"] .hero-pow { color: var(--r-rare); }        /* 🏹 burst */
/* bars: a touch taller with an inset track + top sheen so the fills read as gauges */
.hpbar, .chargebar { height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--ink) 16%, transparent); margin-top: 4px; overflow: hidden; box-shadow: inset 0 1px 2px var(--shadow); }
.hpfill { height: 100%; background: linear-gradient(180deg, color-mix(in srgb, #fff 28%, var(--good)), var(--good) 55%, #16a34a); transition: width .2s; }
.enemy .hpbar { width: 50px; }
.enemy .hpfill { background: linear-gradient(180deg, color-mix(in srgb, #fff 22%, var(--bad)), var(--bad) 55%, #b91c1c); }
.chargefill { height: 100%; background: linear-gradient(180deg, color-mix(in srgb, #fff 26%, var(--accent2)), var(--accent2) 55%, #7c3aed); transition: width .12s linear; }
/* melee bar builds the ULT (gold), ranged bar is the shot charge (purple) */
.hero[data-type="melee"] .chargefill { background: linear-gradient(180deg, color-mix(in srgb, #fff 26%, var(--gold)), var(--gold) 60%, #8a6a23); }
.float { position: absolute; left: 50%; top: 0; transform: translateX(-50%); font-weight: 900; font-size: 13px; pointer-events: none; animation: floatup .9s ease-out forwards; z-index: 3; }
.float.crit { color: var(--accent); font-size: 17px; }
.float.splash { color: color-mix(in srgb, var(--gold) 80%, var(--good)); }   /* splash hit — in-palette, legible on light parchment */
.float.ehit { color: #b91c1c; }
/* damage floats ride the small-text crimson tier — 13px over the arena sat ~4.2:1
   in dark with raw --crimson (text tier clears 4.5:1; identical hue in light) */
.float.dmg { color: var(--crimson-text); }
.float.heal { color: var(--good); }
.b-banner { position: absolute; top: 36px; left: 50%; transform: translateX(-50%); background: #000a; border: 1px solid var(--accent); color: var(--accent); padding: 4px 12px; border-radius: 999px; font-weight: 800; font-size: 12px; animation: pop .3s; z-index: 4; }

/* events / drafts / rewards */
.event-text { color: var(--ink); font-style: italic; margin-bottom: 12px; font-size: 16px; }
.event-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.draft-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.draft-card { background: color-mix(in srgb, var(--r-epic) 8%, var(--panel)); border: 1px solid color-mix(in srgb, var(--r-epic) 55%, var(--line)); border-radius: 11px; padding: 11px; cursor: pointer; color: var(--ink); text-align: left; transition: transform .12s, border-color .2s, box-shadow .2s; }
.draft-card:hover { transform: translateY(-2px); border-color: var(--r-epic); box-shadow: 0 8px 20px -12px var(--r-epic); }
.dc-name { font-weight: 800; color: var(--crimson-text); margin-bottom: 4px; }
.dc-desc { font-size: 12px; color: var(--muted); }
/* reward = a celebratory moment: warm gold-washed card, gold glow, larger glyph */
.reward-card { display: flex; flex-direction: column; align-items: center; gap: 5px; border: 1px solid color-mix(in srgb, var(--accent) 60%, var(--line)); border-radius: 14px; padding: 22px 18px; margin-bottom: 14px;
  background: radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--gold) 12%, var(--panel)), var(--panel) 70%);
  box-shadow: 0 10px 34px -16px var(--accent), inset 0 0 24px -12px var(--accent); }
.rc-glyph { font-size: 46px; line-height: 1; filter: drop-shadow(0 3px 8px var(--shadow)); }
.rc-name { font-weight: 800; font-size: 17px; }
.rc-desc { color: var(--muted); font-size: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; background: var(--panel2); border: 1px solid var(--line); color: var(--ink); border-radius: 9px; padding: 9px 16px; font-weight: 700; cursor: pointer; transition: border-color .15s, background .15s, transform .08s, box-shadow .15s; }
.btn:hover { border-color: color-mix(in srgb, var(--gold) 55%, var(--line)); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); color: var(--bg); border-color: var(--accent); box-shadow: 0 3px 12px -4px var(--accent); }
.btn.primary:hover { filter: brightness(1.05); border-color: var(--accent); }
.btn.small { min-height: 32px; padding: 6px 10px; font-size: 12px; }
/* COUNTDOWN CONFIRM (Collect · 5 / Continue · 5, dock.js autoTapBtn): tabular digits so the
   ticking label can't wobble the centred text, plus a quiet paper-tone hairline draining along
   the bottom edge — a calm "this continues on its own" cue, not an urgency timer. Duration
   comes from --autotap-s (set in dock.js beside AUTO_TAP_S so the two can't drift). */
.collect-count { position: relative; overflow: hidden; font-variant-numeric: tabular-nums; }
.collect-count::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: color-mix(in srgb, var(--bg) 60%, transparent);
  transform-origin: left; animation: collect-drain var(--autotap-s, 5s) linear forwards; }
@keyframes collect-drain { from { transform: scaleX(1); } to { transform: scaleX(0); } }
/* the ticking label already conveys the state — the drain is decorative, so it goes */
@media (prefers-reduced-motion: reduce) { .collect-count::after { display: none; } }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 50%, var(--line)); }
.btn.danger:hover { background: color-mix(in srgb, var(--bad) 10%, var(--panel)); border-color: var(--bad); }
/* the reward's Collect is THE action here — let it span and lead the eye (was a small orphan in the corner) */
.dock-body[data-phase="reward"] > .btn.primary { width: 100%; font-size: 15px; }

/* leaderboard */
.board-list { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.board-row { display: grid; grid-template-columns: 34px 1fr auto auto; gap: 8px; padding: 7px 9px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; font-size: 13px; }
.br-rank { color: var(--accent); font-weight: 800; }
.br-ticks { color: var(--good); } .br-hp { color: var(--muted); }

/* (the prize-wheel dial was retired — outcomes now resolve via the slot-reel in the
   post-detail modal, .pd-spinwrap / .ps-*. Its dead .wheel-* rules were removed.) */

/* modal */
.modal-overlay { position: fixed; inset: 0; background: #000b; display: grid; place-items: center; z-index: 60; padding: 16px; }
.modal-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; width: min(440px, 94vw); max-height: 88vh; overflow: auto; }
.modal-title { font-weight: 800; font-size: 16px; margin-bottom: 10px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 10px 0; }
/* settings select: a proper ≥36px hit target with the same warm chrome + gold focus
   ring as the rest of the codex (was a 28px system-default control) */
.set-row select { min-height: 36px; background: var(--panel2); color: var(--ink); border: 1px solid var(--line);
  border-radius: 9px; padding: 6px 10px; font: inherit; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.set-row select:hover { border-color: color-mix(in srgb, var(--gold) 55%, var(--line)); }
.set-row select:focus-visible { outline: none; border-color: var(--gold); box-shadow: 0 0 0 2px color-mix(in srgb, var(--gold) 35%, transparent); }
/* the settings checkbox in the parchment gilt, not browser-blue */
.set-row input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--gold); cursor: pointer; }
.hint, .build-line { color: var(--muted); font-size: 11.5px; margin: 6px 0; }
.admin-box { white-space: pre-wrap; font-family: ui-monospace, monospace; font-size: 10px; color: var(--muted); max-height: 200px; overflow: auto; }
.flash { color: var(--accent); font-size: 12px; margin-top: 6px; }
hr { border: none; border-top: 1px solid var(--line); margin: 10px 0; }

/* build tag: tucked into the very bottom-right corner, faint, and it DISMISSES with the dock
   when minimized (§user 2026-06-17) — no longer floats mid-screen above the bar. */
.build-tag { position: fixed; right: 6px; bottom: calc(env(safe-area-inset-bottom) + 3px); font-size: 8.5px; color: var(--muted);
  opacity: .32; pointer-events: none; z-index: 11; padding: 0 4px; border-radius: 5px;
  background: color-mix(in srgb, var(--paper) 55%, transparent); letter-spacing: .2px; transition: opacity .25s ease; }
.dock.dock-collapsed .build-tag { opacity: 0; }     /* minimized → tag dismisses too */
.dock-bar.off ~ .build-tag { opacity: .12; }        /* game off → fade it further */

/* boot */
.boot { position: fixed; inset: 0; display: grid; place-content: center; text-align: center; gap: 8px; background: var(--bg); z-index: 80; }
.boot-goal { font-size: 19px; } .boot-goal b { color: var(--accent); }
.boot-sub { color: var(--muted); font-size: 13px; }

@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .5; } }
@keyframes floatup { to { transform: translate(-50%, -26px); opacity: 0; } }
@keyframes pop { from { transform: translateX(-50%) scale(.6); } to { transform: translateX(-50%) scale(1); } }
/* CRIT! shake — a short, low-amplitude kick so a centered shot FEELS landed (Darren P2-1) */
.battle.shake { animation: crit-shake .26s ease-in-out; }
@keyframes crit-shake { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-4px); } 40% { transform: translateX(4px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
@media (prefers-reduced-motion: reduce) { .battle.shake { animation: none; } }

/* respect reduced-motion: kill the decorative looping/entrance animations and hover
   lifts (the gameplay transforms — enemy oscillation, bar fills — stay, they convey state) */
@media (prefers-reduced-motion: reduce) {
  .fres-q.disc, .hero.ready { animation: none; }
  .post-card:hover, .starter-card:hover, .draft-card:hover, .btn:active,
  .dock-head button:active, .fire-zone:active, .fuse-btn:active { transform: none; }
  /* .dock = the new min/half/full HEIGHT grow-shrink; .dock-bar = the minimize slide */
  .wheel-pop, .dock, .dock-bar, .post-card, .starter-card { transition-duration: .01ms; }
}

/* desktop: dock becomes a side-aware shorter dock, feed centered */
@media (min-width: 860px) { :root { --dock-h: max(34vh, 324px); } .dock-body { max-width: 820px; margin: 0 auto; width: 100%; } .dock-head { max-width: 820px; margin: 0 auto; width: 100%; } }
/* very tall screens: cap the dock so it doesn't grow into a giant bar (was 420px). */
@media (min-height: 900px) { :root { --dock-h: 336px; } }

/* ---- rarity background tints (subtle wash matching the border + circle icon) ---- */
[data-rarity="Common"]    { --rar: var(--r-common); }
[data-rarity="Rare"]      { --rar: var(--r-rare); }
[data-rarity="Epic"]      { --rar: var(--r-epic); }
[data-rarity="Legendary"] { --rar: var(--r-legendary); }
[data-rarity="Mythic"]    { --rar: var(--r-mythic); }
.hero-chip[data-rarity], .team-slot[data-rarity], .fusion-slot[data-rarity] {
  background: color-mix(in srgb, var(--rar) 12%, var(--panel));
  border-left: 3px solid var(--rar);
}
.starter-card[data-rarity] {
  background: color-mix(in srgb, var(--rar) 9%, var(--panel));
  border-color: color-mix(in srgb, var(--rar) 50%, var(--line));
}
.hero[data-rarity] { background: color-mix(in srgb, var(--rar) 13%, var(--panel)); }

/* ============================================================
   ILLUMINATED CODEX — in-game polish (within the parchment palette).
   Aged paper grain · gilt + ink · manuscript flourishes · orchestrated reveals.
   ============================================================ */

/* one consistent keyboard focus ring across every game control (there was none —
   keyboard/switch users had no idea what was focused). Gilt, in-palette, :focus-visible
   only so it never shows on mouse/touch taps. */
.post-card:focus-visible, .starter-card:focus-visible, .draft-card:focus-visible,
.hero-chip:focus-visible, .team-slot:focus-visible, .team-tab:focus-visible,
.fusion-slot:focus-visible, .fuse-btn:focus-visible, .fire-zone:focus-visible,
.btn:focus-visible, .cons-chip:focus-visible, .post-diff:focus-visible,
.dock-head button:focus-visible, .pd-close:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 2px;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 22%, transparent);
}

/* aged-paper grain laid over everything (low opacity, never intercepts taps) */
body::after { content: ""; position: fixed; inset: 0; z-index: 9000; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px; opacity: .045; mix-blend-mode: multiply; }
@media (prefers-color-scheme: dark) { body::after { mix-blend-mode: overlay; opacity: .06; } }

/* warm bottom vignette for depth (shows at the feed gutters) */
body { background:
  radial-gradient(130% 80% at 50% -12%, color-mix(in srgb, var(--gold) 13%, var(--paper)) 0%, var(--paper) 50%),
  radial-gradient(120% 80% at 50% 118%, color-mix(in srgb, var(--ink) 9%, transparent), transparent 55%) fixed; }

/* manuscript scrollbars */
.feed::-webkit-scrollbar, .dock-body::-webkit-scrollbar, .pd-card::-webkit-scrollbar { width: 7px; }
.feed::-webkit-scrollbar-thumb, .dock-body::-webkit-scrollbar-thumb, .pd-card::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--gold) 38%, var(--line)); border-radius: 4px; }

/* phase title: a confident EB Garamond line closed by a gilt fleuron */
.phase-title { font-size: 20px; letter-spacing: .004em; }
.phase-title::after { content: "❧"; display: block; color: var(--gold); font-size: 13px; line-height: 1; margin-top: 5px; opacity: .85; }
/* engraved sub-labels with a leading hairline */
.phase-sub { display: flex; align-items: center; gap: 8px; }
.phase-sub::before { content: ""; flex: 0 0 14px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
/* The fusion intro is the ONLY phase-sub that's a SENTENCE (it carries a <b>), not a section
   label. Uppercasing + letter-spacing made it wrap into a cramped 2-line block where bold CORE
   collided with the all-caps run. Render it as readable sentence-case prose, drop the hairline,
   and let <b>CORE</b> carry the emphasis in gold (§Alice). */
/* …and render it as normal block text, NOT a flex row: the parent .phase-sub is display:flex
   with gap:8px, which was inserting an 8px gap on BOTH sides of the <b>CORE</b> flex item — the
   sentence read as "Fusion —   CORE   levels up" with stray gaps. Block flow lets CORE sit inline
   in the prose the way a bold word should (§Alice 2026-07-01). */
.phase-sub:has(b) { display: block; text-transform: none; letter-spacing: 0; font-size: 12.5px; line-height: 1.35;
  color: var(--ink); margin: 4px 0 7px; }
.phase-sub:has(b)::before { display: none; }
.phase-sub b { color: var(--gold); font-weight: 800; }

/* orchestrated reveal: each phase's blocks ink-in + rise, staggered */
.dock-body > * { animation: codex-rise .4s both cubic-bezier(.2,.7,.2,1); }
.dock-body > *:nth-child(2) { animation-delay: .05s; }
.dock-body > *:nth-child(3) { animation-delay: .1s; }
.dock-body > *:nth-child(n+4) { animation-delay: .15s; }
.starter-card, .draft-card { animation: codex-rise .45s both cubic-bezier(.2,.7,.2,1); }
.starter-row .starter-card:nth-child(2), .draft-row .draft-card:nth-child(2) { animation-delay: .08s; }
.starter-row .starter-card:nth-child(3), .draft-row .draft-card:nth-child(3) { animation-delay: .16s; }
@keyframes codex-rise { from { opacity: 0; transform: translateY(9px); filter: blur(2px); } }

/* starter cards → manuscript leaves: inner gilt rule, refined type, wax-seal rarity */
.starter-card { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 20%, transparent), 0 6px 18px -13px var(--shadow); }
.sc-type { font-weight: 700; }
.sc-name { font-family: var(--display); font-weight: 600; font-size: 19px; line-height: 1.1; margin: 4px 0 3px; }
.sc-meta::before { content: "●"; color: var(--rar, var(--gold)); margin-right: 5px; font-size: 8px; vertical-align: 2px; }
.starter-card:hover { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 52%, transparent), 0 16px 32px -16px var(--shadow); }

/* reward → an illuminated panel with a struck glyph */
.reward-card { background: radial-gradient(82% 72% at 50% 0%, color-mix(in srgb, var(--gold) 16%, var(--panel)), var(--panel) 70%);
  border-color: color-mix(in srgb, var(--gold) 55%, var(--line));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 24%, transparent), 0 18px 44px -22px var(--shadow); }
.rc-glyph { filter: drop-shadow(0 4px 10px color-mix(in srgb, var(--gold) 40%, transparent)); animation: rc-pop .5s both cubic-bezier(.2,1.35,.4,1); }
.rc-name { font-size: 18px; }
@keyframes rc-pop { from { transform: scale(.55) rotate(-7deg); opacity: 0; } }

/* primary actions → gilt foil */
.btn.primary, .fuse-btn:not(:disabled) {
  background: linear-gradient(180deg, color-mix(in srgb, #fff 24%, var(--gold)), var(--gold) 52%, color-mix(in srgb, var(--ink) 24%, var(--gold)));
  border: 1px solid color-mix(in srgb, var(--ink) 20%, var(--gold)); color: #2a2008; text-shadow: 0 1px 0 #ffffff55;
  box-shadow: 0 5px 14px -7px var(--shadow), inset 0 1px 0 #ffffff88; }
.btn.primary:active, .fuse-btn:not(:disabled):active { transform: translateY(1px); box-shadow: 0 2px 6px -4px var(--shadow), inset 0 1px 3px #00000033; }

/* modal cards → framed codex page; POWER numeral as a struck figure */
.pd-card, .modal-card { box-shadow: 0 30px 66px -24px #000, inset 0 0 0 1px color-mix(in srgb, var(--gold) 18%, transparent); }
.hero-pow { font-family: var(--display); font-size: 12px; }

@media (prefers-reduced-motion: reduce) {
  .dock-body > *, .starter-card, .draft-card, .rc-glyph { animation: none; }
}

/* ============================================================
   §user 2026-06-16 polish pass — red throw-tension, active-post chevron,
   Wikipedia portraits, dice-choice events, item place-mode, injuries.
   ============================================================ */

/* ---- RED "time your throw" tension: vignette + bar/post glow, gated by body.aim-armed
        (combat: a ranged super is charged) and ramped by --aim-heat (feed: active post nears
        the marker). The closer to the transition, the redder. ---- */
.aim-vignette { position: fixed; inset: var(--site-top) 0 var(--dock-h) 0; z-index: 6; pointer-events: none; opacity: 0; transition: opacity .1s linear;
  background: radial-gradient(120% 100% at 50% 45%, transparent 46%, color-mix(in srgb, var(--crimson) 80%, transparent) 100%); }
body.aim-armed .aim-vignette { opacity: calc(var(--aim-heat, 0) * 0.9); }
.feed.feed-collapsed ~ .aim-vignette { bottom: 44px; }
/* the timing bar + reticle flush red as the post nears its transition */
body.aim-armed .battle.armed .aim-track {
  box-shadow: inset 0 1px 2px var(--shadow), 0 0 calc(6px + var(--aim-heat,0)*18px) color-mix(in srgb, var(--bad) calc(var(--aim-heat,0)*100%), transparent); }
body.aim-armed .battle.armed .reticle {
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--bad) calc(var(--aim-heat,0)*100%), var(--gold)) 28%, color-mix(in srgb, var(--bad) calc(var(--aim-heat,0)*100%), var(--gold)));
  box-shadow: 0 0 calc(8px + var(--aim-heat,0)*13px) color-mix(in srgb, var(--bad) calc(var(--aim-heat,0)*100%), var(--gold)); }
body.aim-armed .battle.armed .reticle::after { color: color-mix(in srgb, var(--bad) calc(var(--aim-heat,0)*100%), var(--gold)); }
/* the active post the timing hinges on glows red as it approaches the marker */
body.aim-armed .post-card.is-centered {
  border-color: color-mix(in srgb, var(--bad) calc(var(--aim-heat,0)*100%), var(--accent));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--bad) calc(var(--aim-heat,0)*100%), var(--accent)),
              0 0 calc(6px + var(--aim-heat,0)*24px) color-mix(in srgb, var(--bad) calc(var(--aim-heat,0)*82%), transparent); }
body.aim-armed .post-card.is-centered::before { background: color-mix(in srgb, var(--bad) calc(var(--aim-heat,0)*100%), var(--accent)); }
@media (prefers-reduced-motion: reduce) { .aim-vignette { transition: none; } }

/* ---- battle is the TIGHTEST phase: trim its vertical fat so it fits the shorter dock
        on short phones. Smaller, fleuron-free title (the ❧ flourish is dead weight when the
        arena needs every pixel) + a leaner enemy lane (sized to its 62px content, not 90px). ---- */
.dock-body[data-phase="battle"] .phase-title { font-size: 16px; margin-bottom: 8px; }
.dock-body[data-phase="battle"] .phase-title::after { display: none; }
.enemy-lane { min-height: 58px; }   /* status board only now (aim moved to the feed) → compact */
.enemy { top: 8px; }
.enemy-name { -webkit-line-clamp: 1; }   /* 1-line names keep the status lane short */
/* shave a few px of inter-row margin so the worst case (all heroes ranged + charged, so the
   full-width SUPER THROW bar is showing) stays fully on-screen without a scroll. */
.dock-body[data-phase="battle"] .aim-track { margin-bottom: 6px; }
.dock-body[data-phase="battle"] .fire-zone { margin-top: 6px; }

/* ---- clearer ACTIVE-post chevron (which post the tick/throw hinges on) ---- */
.post-card.is-centered::before { content: "▶ ACTIVE"; position: absolute; top: -8px; left: 12px; z-index: 4;
  background: color-mix(in srgb, var(--gold) calc(var(--active-prog, 0) * 72%), var(--accent));
  color: var(--bg); font-size: 8px; font-weight: 800; letter-spacing: .5px;
  padding: 1px 7px; border-radius: 999px; box-shadow: 0 1px 5px var(--shadow); }
/* the post the highlight is ABOUT TO advance to — pre-lit once the marker passes the active post's
   midpoint, so the forward hand-off is telegraphed and the transition reads clearly (§user 2026-06-18) */
.post-card.on-deck { border-color: color-mix(in srgb, var(--gold) 40%, var(--line)); }
.post-card.on-deck::before { content: "▾ NEXT"; position: absolute; top: -8px; right: 12px; left: auto; z-index: 4;
  background: color-mix(in srgb, var(--gold) 32%, var(--bg)); color: var(--gold); font-size: 8px; font-weight: 800;
  letter-spacing: .5px; padding: 1px 7px; border-radius: 999px; box-shadow: 0 1px 5px var(--shadow); }
/* game OFF: drop both transition cues with the rest of the dimmed marker UI */
.feed-off .post-card.on-deck { border-color: var(--line); }
.feed-off .post-card.on-deck::before { display: none; }
/* strengthen the fixed tick-line arrows so the marker reads at a glance */
.cm-arrow { font-size: 15px; }
.center-marker { opacity: .62; }

/* ---- tiny Wikipedia portraits (round); glyph/diamond shows if the image is missing ---- */
.enemy-portrait { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 34px; height: 34px;
  border-radius: 50%; object-fit: cover; object-position: top center; z-index: 2; border: 1px solid var(--crimson);
  background: var(--tile); box-shadow: 0 2px 6px -2px var(--shadow); }
.enemy[data-boss="true"] .enemy-portrait { width: 44px; height: 44px; border-color: var(--r-mythic); box-shadow: 0 0 12px var(--r-mythic); }
.enemy.dead .enemy-portrait { filter: grayscale(1); opacity: .4; }
.enemy.asleep .enemy-portrait { opacity: .6; }
.hero-portrait { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; object-position: top center;
  flex: 0 0 auto; border: 1px solid var(--line); }
.chip-portrait { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; object-position: top center;
  flex: 0 0 auto; align-self: center; border: 1px solid var(--line); margin-bottom: 1px; }
.sc-head { display: flex; align-items: center; gap: 10px; }
.sc-portrait { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; object-position: top center;
  flex: 0 0 auto; border: 1px solid color-mix(in srgb, var(--gold) 40%, var(--line)); box-shadow: 0 2px 8px -4px var(--shadow); }

/* ---- dice-choice events ---- */
.event-choices { display: flex; flex-direction: column; gap: 8px; }
.event-choice { text-align: left; background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--line);
  border-radius: 11px; padding: 11px 13px; cursor: pointer; color: var(--ink); transition: transform .12s, border-color .2s, box-shadow .2s; }
.event-choice:hover { transform: translateY(-2px); box-shadow: 0 8px 20px -12px var(--shadow); }
.event-choice[data-risk="low"]  { border-left-color: var(--good); }
.event-choice[data-risk="med"]  { border-left-color: var(--gold); }
.event-choice[data-risk="high"] { border-left-color: var(--bad); }
.event-choice[data-risk="high"]:hover { border-color: color-mix(in srgb, var(--bad) 55%, var(--line)); }
.ec-label { font-weight: 800; font-size: 14px; }
.ec-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ---- item place-mode (tap chip → tap a post to place; long-press = use now) ---- */
.cons-chip.sel { background: var(--accent); color: var(--bg); border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent); }
.cons-chip[data-rarity="rare"] { border-color: var(--r-rare); }
body.cons-assigning .post-card { outline: 1px dashed color-mix(in srgb, var(--gold) 60%, var(--line)); outline-offset: 2px; }
body.cons-assigning .post-card::after { content: "＋ place item here"; position: absolute; bottom: 8px; right: 10px; z-index: 4;
  font-size: 10px; font-weight: 700; color: var(--gold); background: color-mix(in srgb, var(--gold) 12%, var(--panel));
  border: 1px solid var(--gold); border-radius: 999px; padding: 1px 8px; pointer-events: none; }
body.cons-assigning .post-card:has(.post-pending)::after { display: none; }   /* already primed → no prompt */

/* ---- fusion CORE-only (fielded heroes) + injured roster chips ---- */
.fusion-note { font-size: 11.5px; color: var(--ink); margin: -2px 0 9px; min-height: 14px; font-weight: 600; }
.hero-chip { position: relative; }
.hero-chip.core-only { border-style: dashed; border-color: color-mix(in srgb, var(--gold) 60%, var(--line)); }
.hero-chip.injured { opacity: .5; filter: grayscale(.45); cursor: not-allowed; }
/* a FILLED fusion chip lives in a ~110px column — squeeze the name to one tight clamped line
   and shrink the meta so the portrait + name + lvl read cleanly instead of wrapping 3 cramped
   rows that crash into the type glyph (§Alice — the all-filled row was the worst offender). */
.fusion-slot .chip-portrait { width: 26px; height: 26px; margin-bottom: 2px; }
.fusion-slot .chip-name { font-size: 11px; line-height: 1.08; text-align: center; font-weight: 700;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.fusion-slot .chip-meta { font-size: 9.5px; line-height: 1.1; text-align: center; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
/* fusion slot states (§user 2026-06-18): ARMED = "tap a hero to fill me"; placed roster heroes dim */
.fusion-slot { transition: border-color .12s, box-shadow .15s, background .15s, transform .08s; }
.fusion-slot:active { transform: scale(.97); }
/* ARMED ring used to be gold-on-gold-on-parchment — nearly invisible in this palette. Crimson
   accent ring + soft pulse makes "now tap a hero" unmistakable against the warm theme (§Alice). */
.fusion-slot.armed { border-color: var(--accent2); background: color-mix(in srgb, var(--accent2) 8%, var(--panel));
  box-shadow: 0 0 0 2px var(--accent2), 0 0 16px -3px color-mix(in srgb, var(--accent2) 70%, transparent);
  animation: pulse 1.1s infinite; }
.fusion-slot.armed .fslot-label, .fusion-slot.armed .fslot-label::after { color: var(--accent2); opacity: 1; }
@media (prefers-reduced-motion: reduce) { .fusion-slot.armed { animation: none; } }
.hero-chip.in-fusion { opacity: .5; }
.hero-chip.in-fusion::after { content: "✓"; position: absolute; top: 4px; right: 5px; font-size: 9px; font-weight: 900;
  color: var(--bg); background: var(--accent); border-radius: 50%; width: 14px; height: 14px; display: grid; place-items: center; }

/* ---- team inspect panel (tap a hero → detailed stats) + slot-first equip (armed slot) ---- */
.inspect { background: var(--panel); border: 1px solid color-mix(in srgb, var(--gold) 42%, var(--line)); border-radius: 11px;
  padding: 10px 11px; margin: 8px 0; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 16%, transparent); }
.inspect[hidden] { display: none; }
.inspect-head { display: flex; align-items: center; gap: 10px; }
.inspect-portrait { width: 40px; height: 40px; border-radius: 9px; object-fit: cover; object-position: top center;
  flex: 0 0 auto; border: 1px solid color-mix(in srgb, var(--gold) 40%, var(--line)); }
.inspect-id { min-width: 0; flex: 1; }
.inspect-name { font-family: var(--display); font-weight: 600; font-size: 16px; line-height: 1.1; }
.inspect-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.inspect-pow { flex: 0 0 auto; font-weight: 800; font-size: 15px; color: var(--accent); font-variant-numeric: tabular-nums; }
/* PWR — the hero's one power score, the loudest number on the card (display serif, gold) */
.inspect-pwr { flex: 0 0 auto; text-align: center; line-height: 1;
  padding: 6px 10px; border-radius: 10px;
  background: color-mix(in srgb, var(--gold) 12%, var(--panel2));
  border: 1px solid color-mix(in srgb, var(--gold) 45%, var(--line));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 15%, transparent); }
.inspect-pwr .pwr-num { display: block; font-family: var(--display); font-weight: 700; font-size: 24px;
  font-variant-numeric: tabular-nums; color: var(--gold); }
.inspect-pwr .pwr-label { display: block; font-size: 9px; font-weight: 800; letter-spacing: 1.5px;
  color: color-mix(in srgb, var(--gold) 70%, var(--muted)); margin-top: 2px; }
/* rarity affixes — the bonus attributes, one quiet row each; magnitudes scale with level */
.affix-list { margin-top: 8px; display: grid; gap: 4px; }
.affix-row { display: flex; align-items: baseline; gap: 7px; font-size: 11.5px; line-height: 1.35;
  padding: 4px 8px; border-radius: 8px; background: color-mix(in srgb, var(--gold) 6%, var(--panel2));
  border: 1px solid color-mix(in srgb, var(--gold) 22%, var(--line)); }
.affix-emoji { flex: 0 0 auto; font-size: 13px; }
.affix-name { flex: 0 0 auto; font-weight: 800; color: var(--crimson-text); }
.affix-desc { color: var(--muted); min-width: 0; }
.team-pwr { font-weight: 800; color: var(--gold); white-space: nowrap; }
.inspect .sc-stats { margin-top: 9px; }
.inspect-actions { margin-top: 10px; display: flex; gap: 6px; }
.inspect-actions .btn { flex: 1; }

/* Team / Fusion auto buttons (auto-equip · fuse all · per-hero level-up) */
.team-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
/* ONE quiet instruction line (owner copy 2026-07-11) — lowercase, single line, tight */
.team-head .phase-sub { flex: 1; margin: 4px 0; text-transform: none; letter-spacing: .2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.auto-btn { flex: 0 0 auto; border-color: color-mix(in srgb, var(--gold) 45%, var(--line));
  color: var(--gold); white-space: nowrap; }
.auto-btn:not(:disabled):hover { background: color-mix(in srgb, var(--gold) 12%, var(--panel)); }
/* FUSE is full-width (its own .fuse-btn styling); the two auto helpers share a row beneath it */
.fusion-autos { display: flex; gap: 8px; align-items: stretch; margin: 4px 0 2px; }
.fusion-autos .auto-btn { flex: 1; margin: 0; }
.team-slot.await { border-style: solid; border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent); animation: pulse 1s infinite; }
@media (prefers-reduced-motion: reduce) { .team-slot.await { animation: none; } }

/* ============================================================
   RANGED-ATTACK QTE POST (§user 2026-06-17) — the "time your shot" minigame, now a
   dynamic post in the feed. Rises from below, sweeps a reticle while it's the centered
   post, fires on scroll-past or its FIRE button, then stays as a spent record.
   ============================================================ */
/* status board sits in the .battle-hud flex row beside the right-pinned ACT/AUTO cluster.
   It MUST take the flexible middle (flex:1 + min-width:0) so its nowrap+ellipsis actually
   clips instead of shoving the buttons off the row at 375px (Alice). */
.dock-body .b-status { flex: 1 1 auto; min-width: 0; color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* overflow VISIBLE so the "▶ ACTIVE" chevron (top:-8px) isn't clipped at the card's top edge
   (§user 2026-06-18 — the dig title/badge was getting cut off). Inner micro-games clip their
   own dynamic content (the fishing water lane, the dig grid, the QTE lane each set overflow). */
.mg-card { position: relative; overflow: visible;
  border: 1px solid color-mix(in srgb, var(--gold) 55%, var(--line));
  background: radial-gradient(120% 90% at 50% -10%, color-mix(in srgb, var(--gold) 13%, var(--panel)), var(--panel) 70%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 20%, transparent), 0 10px 30px -16px var(--shadow);
  animation: mg-rise .5s cubic-bezier(.2,.7,.2,1) both; }
@keyframes mg-rise { from { opacity: 0; transform: translateY(44px) scale(.985); } }
/* when this QTE post IS the centered/active post the sweep is live — lift the gilt frame
   so "armed, time your shot NOW" reads instantly (was a faint border nudge). The generic
   .post-card.is-centered "▶ ACTIVE" chevron + ring also apply; this just warms the card. */
.mg-card.is-centered { border-color: color-mix(in srgb, var(--gold) 78%, var(--line));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 38%, transparent), 0 12px 34px -16px color-mix(in srgb, var(--gold) 50%, var(--shadow)); }

/* COMPACT (§user 2026-06-17 "combat post as compact as possible") */
.qte-body { display: flex; flex-direction: column; gap: 6px; --qte-heat: 0; }
.qte-head { display: flex; align-items: center; gap: 8px; }
.qte-hero-portrait { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; object-position: top center; flex: 0 0 auto; border: 1px solid color-mix(in srgb, var(--gold) 45%, var(--line)); }
.qte-title { min-width: 0; flex: 1; }
.qte-hero { font-family: var(--display); font-weight: 600; font-size: 14px; line-height: 1.1; }
.qte-sub { font-size: 9.5px; color: var(--crimson-text); text-transform: uppercase; letter-spacing: .4px; }
.qte-badge { flex: 0 0 auto; font-size: 9px; font-weight: 800; letter-spacing: .3px; color: var(--bg); background: var(--accent2);
  border-radius: 999px; padding: 2px 7px; box-shadow: 0 1px 5px var(--shadow); }

/* the enemy lane (targets at their fixed center-x) + the sweeping reticle track below it */
.qte-lane { position: relative; height: 58px; border-radius: 10px; overflow: visible;
  background: radial-gradient(120% 80% at 50% -20%, color-mix(in srgb, var(--gold) 9%, var(--tile)), var(--tile) 70%),
    linear-gradient(180deg, transparent 58%, color-mix(in srgb, var(--ink) 8%, var(--tile)));
  box-shadow: inset 0 2px 12px -6px var(--shadow); }
.qte-target { position: absolute; top: 6px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 2px; }
.qte-target[data-dead="true"] { opacity: .2; filter: grayscale(1); }
.qte-halo { position: absolute; top: -2px; left: 50%; width: 44px; height: 44px; transform: translateX(-50%); border-radius: 50%; pointer-events: none; opacity: 0; transition: opacity .15s;
  background: radial-gradient(circle, color-mix(in srgb, var(--gold) 58%, transparent) 0%, transparent 70%); }
.qte-live .qte-target:not([data-dead="true"]) .qte-halo { opacity: .5; }
.qte-icon { width: 26px; height: 26px; display: grid; place-items: center; background: linear-gradient(145deg, color-mix(in srgb, var(--crimson) 30%, var(--tile)), color-mix(in srgb, var(--crimson) 14%, var(--tile))); border: 1px solid var(--crimson); border-radius: 4px; transform: rotate(45deg); color: var(--crimson); font-weight: 800; position: relative; z-index: 1; }
.qte-icon > * { transform: rotate(-45deg); }
.qte-target[data-boss="true"] .qte-icon { width: 32px; height: 32px; background: #3a1a2a; box-shadow: 0 0 0 1px color-mix(in srgb, var(--r-mythic) 70%, transparent), 0 0 8px -2px color-mix(in srgb, var(--r-mythic) 60%, transparent); }
.qte-portrait { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 28px; height: 28px; border-radius: 50%; object-fit: cover; object-position: top center; z-index: 2; border: 1px solid var(--crimson); background: var(--tile); }
.qte-target[data-boss="true"] .qte-portrait { width: 34px; height: 34px; border-color: var(--r-mythic); box-shadow: 0 0 0 2px color-mix(in srgb, var(--r-mythic) 35%, transparent); }
.qte-tname { font-size: 9px; color: var(--ink-soft); max-width: 60px; text-align: center; line-height: 1.05;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }

/* TRACK with explicit CRIT (gold) / SPLASH (faint gold) zones at each live target, so
   "aim here = crit vs glancing hit" is clearly delineated (§user 2026-06-17). */
.qte-track { position: relative; height: 11px; border-radius: 999px; margin-top: 1px; overflow: visible;
  background: color-mix(in srgb, var(--ink) 12%, transparent); box-shadow: inset 0 1px 2px var(--shadow); opacity: .55; transition: opacity .15s; }
.qte-live .qte-track { opacity: 1; }
.qte-zone-splash, .qte-zone-crit { position: absolute; top: 0; bottom: 0; pointer-events: none; border-radius: 999px; }
.qte-zone-splash { background: color-mix(in srgb, var(--gold) 15%, transparent); }
.qte-zone-crit { background: color-mix(in srgb, var(--gold) 58%, transparent); box-shadow: 0 0 6px -1px color-mix(in srgb, var(--gold) 65%, transparent); }
.qte-reticle { position: absolute; top: -40px; bottom: -3px; left: 50%; width: 2px; transform: translateX(-1px); opacity: 0; transition: opacity .15s; z-index: 3;
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--bad) calc(var(--qte-heat,0)*100%), var(--gold)) 26%, color-mix(in srgb, var(--bad) calc(var(--qte-heat,0)*100%), var(--gold)));
  box-shadow: 0 0 calc(7px + var(--qte-heat,0)*13px) color-mix(in srgb, var(--bad) calc(var(--qte-heat,0)*100%), var(--gold)); }
.qte-live .qte-reticle { opacity: 1; }
.qte-caret { position: absolute; bottom: -4px; left: 50%; transform: translateX(-50%); font-size: 12px; line-height: 1; color: color-mix(in srgb, var(--bad) calc(var(--qte-heat,0)*100%), var(--gold)); }
.qte-oncrit .qte-reticle { animation: qte-critpulse .5s infinite; }
@keyframes qte-critpulse { 0%,100% { filter: brightness(1); } 50% { filter: brightness(1.6); } }

.qte-hint { font-size: 10.5px; color: var(--muted); min-height: 13px; }
.qte-live .qte-hint { color: var(--crimson-text); }
.qte-fire { width: 100%; background: var(--bad); color: #fff; border: 1px solid transparent; border-radius: 10px; padding: 9px; min-height: 40px; font-weight: 800; font-size: 13.5px; letter-spacing: .4px; cursor: pointer; box-shadow: 0 4px 16px -5px var(--bad); transition: transform .08s, filter .15s, background .18s, box-shadow .18s, color .18s; }
.qte-fire:hover { filter: brightness(1.06); }
.qte-fire:active { transform: scale(.98); }
.qte-fire:disabled { background: var(--panel2); color: var(--muted); box-shadow: none; cursor: default; }
.qte-body:not(.qte-live):not(.qte-spent) .qte-fire {
  background: color-mix(in srgb, var(--bad) 10%, var(--panel)); color: var(--bad);
  border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); box-shadow: none; }
.qte-result { font-size: 12px; font-weight: 700; color: var(--muted); min-height: 15px; }

/* SPENT = inert record that SHOWS WHERE THE SHOT LANDED (§user 2026-06-17 "scroll back up
   to see where the spinner landed"): the head recedes + the card drops its armed frame, but
   the track + zones + a FROZEN reticle stay so you can see the landing spot vs the crit zone.
   Persistent struck tags mark which targets took the hit + for how much. */
.qte-spent { filter: saturate(.92); }
.mg-card:has(.qte-spent) { border-color: var(--line); background: var(--panel); box-shadow: 0 4px 16px -12px var(--shadow); }
.qte-spent .qte-head { opacity: .62; }
.qte-spent .qte-badge { background: var(--panel2); color: var(--muted); box-shadow: none; }
.qte-spent .qte-hint { display: none; }
.qte-spent .qte-track { opacity: .9; }
.qte-spent .qte-reticle { opacity: 1; animation: none;
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--gold) 72%, var(--ink)) 26%, color-mix(in srgb, var(--gold) 72%, var(--ink)));
  box-shadow: 0 0 6px color-mix(in srgb, var(--gold) 55%, transparent); }
.qte-spent .qte-caret { color: color-mix(in srgb, var(--gold) 72%, var(--ink)); }
.qte-body[data-kind="CRIT"].qte-spent .qte-reticle, .qte-body[data-kind="ULT"].qte-spent .qte-reticle {
  background: linear-gradient(180deg, transparent, var(--accent) 26%, var(--accent)); box-shadow: 0 0 9px var(--accent); }
.qte-body[data-kind="CRIT"].qte-spent .qte-caret, .qte-body[data-kind="ULT"].qte-spent .qte-caret { color: var(--accent); }
.qte-body[data-kind="CRIT"] .qte-result, .qte-body[data-kind="ULT"] .qte-result { color: var(--accent); }
.qte-body[data-kind="CRIT"] .qte-fire:disabled, .qte-body[data-kind="ULT"] .qte-fire:disabled { color: var(--accent); }
.qte-struck .qte-icon, .qte-struck .qte-portrait { box-shadow: 0 0 0 2px var(--bad); }
.qte-tag { position: absolute; bottom: -3px; left: 50%; transform: translateX(-50%); white-space: nowrap; z-index: 4;
  font-size: 8.5px; font-weight: 800; color: #fff; background: var(--bad); border-radius: 999px; padding: 0 5px; box-shadow: 0 1px 4px var(--shadow); }
.qte-body[data-kind="CRIT"] .qte-tag, .qte-body[data-kind="ULT"] .qte-tag { background: var(--accent); color: var(--bg); }

@media (prefers-reduced-motion: reduce) {
  .mg-card { animation: none; }
  .qte-oncrit .qte-reticle { animation: none; }
}

/* ============================================================
   DIG FOR TREASURE POST (§user 2026-06-17) — a miniature Leaverite dig in the feed.
   Reuses .mg-card (rise + gilt frame). 6×1 dirt grid, dig-attempt pips, tap to clear.
   ============================================================ */
.dig-body { display: flex; flex-direction: column; gap: 8px; }
.dig-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
/* GOAL line — the dig's core verb leads, like every other card's title (best-practices: clear goal). */
.dig-title { font-family: var(--display); font-weight: 600; font-size: 15px; color: var(--accent); }
.dig-pips { display: flex; gap: 4px; align-items: center; }
.dig-pip { width: 12px; height: 12px; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--good) 55%, var(--line)); background: transparent; transition: background .15s, box-shadow .15s; }
.dig-pip[data-on="true"] { background: var(--good); box-shadow: 0 0 6px -1px var(--good); }

/* the 6×1 dirt grid — a touch more height so the reveal art + name strip both breathe. */
.dig-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.dig-tile { position: relative; aspect-ratio: 1 / 1.22; border: 1px solid color-mix(in srgb, #3a2a1a 70%, var(--line)); border-radius: 9px;
  /* domed earth so a covered tile reads as "unbroken ground" before the texture loads */
  background: radial-gradient(120% 120% at 50% 22%, #5a4129, #3c2a19 78%);
  overflow: hidden; cursor: pointer; padding: 0; transition: transform .08s, box-shadow .15s, filter .2s; }
.dig-live .dig-tile:not(.cleared):not(.missed):hover { box-shadow: 0 0 0 2px color-mix(in srgb, var(--gold) 60%, transparent); }
.dig-tile:not(.cleared):active { transform: scale(.94); }
.dig-dirt { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; image-rendering: auto; }
/* first tap on a 2-cost tile = a CRACKED clod: darker, pressed-in, with a hairline split so
   "it gave a little — tap again" reads without any copy. */
.dig-tile.dug:not(.cleared) { box-shadow: inset 0 0 12px -2px #000; }
.dig-tile.dug:not(.cleared) .dig-dirt { filter: brightness(.62) contrast(1.18) saturate(.9); }
.dig-tile.dug:not(.cleared)::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(118deg, transparent 47%, rgba(0,0,0,.55) 48%, rgba(0,0,0,.55) 50%, transparent 51%),
    linear-gradient(64deg, transparent 58%, rgba(0,0,0,.4) 59%, rgba(0,0,0,.4) 60.5%, transparent 61.5%); }

/* tap-count badge — a quiet METADATA chip ("taps to clear"), not a price. Sits low so it never
   fights the dirt; the 2-cost gets a gold ring so "this one's buried deeper" reads at a glance. */
.dig-cost { position: absolute; left: 50%; bottom: 5px; transform: translateX(-50%); z-index: 2;
  min-width: 16px; height: 16px; padding: 0 3px; display: grid; place-items: center;
  color: #f4ead2; font-weight: 800; font-size: 10px; line-height: 1; border-radius: 999px;
  background: color-mix(in srgb, #000 52%, transparent); box-shadow: inset 0 0 0 1px rgba(244,234,210,.22); }
.dig-tile[data-cost="2"] .dig-cost { color: #fff; background: color-mix(in srgb, var(--gold) 78%, #000);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 90%, #fff), 0 0 6px -1px color-mix(in srgb, var(--gold) 70%, transparent); }

.dig-reveal { position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 2px; }
.dig-tile.cleared .dig-dirt { display: none; }
.dig-tile.cleared .dig-reveal { display: flex; animation: dig-pop .3s cubic-bezier(.2,1.4,.4,1) both; }
/* CLEARED = freshly excavated: bright parchment niche with an inset rim so the find sits IN a pocket. */
.dig-tile.cleared { background: radial-gradient(120% 120% at 50% 30%, color-mix(in srgb, var(--gold) 9%, var(--panel)), var(--panel) 75%);
  border-color: color-mix(in srgb, var(--gold) 45%, var(--line)); box-shadow: inset 0 1px 6px -3px var(--shadow); }
/* PAINTER = the hero find: gilt frame + warm glow so the artwork clearly reads as the prize. */
.dig-tile.cleared[data-kind="painter"] { border-color: var(--accent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 55%, transparent), 0 0 12px -3px color-mix(in srgb, var(--gold) 60%, transparent); }
.dig-tile[data-kind="rubble"] { opacity: .82; }
/* MISSED = left buried (never dug): keep the dirt but dim + desaturate it so the record clearly
   separates "found" from "never opened". */
.dig-tile.missed { filter: grayscale(.55) brightness(.62) contrast(.95); opacity: .8; }
.dig-tile.missed .dig-cost { opacity: .35; box-shadow: none; }   /* a left-buried tile's tap-count isn't actionable anymore — recede it */
@keyframes dig-pop { from { transform: scale(.4); opacity: 0; } }
.dig-art { width: 100%; height: 100%; object-fit: cover; }
.dig-nugget { width: 58%; height: 58%; object-fit: contain; filter: drop-shadow(0 2px 4px var(--shadow)); }
.dig-emoji { font-size: 23px; line-height: 1; filter: drop-shadow(0 1px 3px var(--shadow)); }
/* per-tile name is unavoidably cramped at ~50px — keep it legible as a caption strip but lean on the
   .dig-result "finds" line below for the full, readable artist/treasure names (the hero payoff). */
.dig-label { font-size: 8px; font-weight: 700; line-height: 1.05; color: #fff; text-align: center; max-width: 100%;
  position: absolute; bottom: 0; left: 0; right: 0; padding: 3px 3px 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: linear-gradient(transparent, rgba(0,0,0,.2) 30%, rgba(0,0,0,.72)); text-shadow: 0 1px 2px #000; }
/* on a cleared parchment niche (item / power-up) the band sits on light ground — flip to ink type. */
.dig-tile.cleared:not([data-kind="painter"]) .dig-label { color: var(--ink); background: none; text-shadow: none; }
.dig-label.muted { color: var(--muted); font-weight: 600; background: none; text-shadow: none; }

.dig-hint { font-size: 10.5px; color: var(--muted); min-height: 13px; }
.dig-live .dig-hint { color: var(--crimson-text); }
.dig-collect { align-self: flex-start; min-height: 34px; padding: 6px 14px; border-radius: 10px; border: 1px solid var(--accent);
  background: var(--accent); color: var(--bg); font-weight: 800; font-size: 12px; cursor: pointer; box-shadow: 0 3px 12px -5px var(--accent);
  transition: transform .08s, filter .15s; }
.dig-collect:hover { filter: brightness(1.06); }
.dig-collect:active { transform: scale(.97); }
.dig-collect[hidden] { display: none; }
/* FINDS line — where the full, legible artist/treasure names land (per-tile labels truncate). Reads
   as a small unearthed-haul banner so the painter payoff actually registers. Empty until finalize. */
.dig-result { font-size: 12px; font-weight: 700; color: var(--accent); line-height: 1.35; }
.dig-result:not(:empty) { padding: 7px 10px; border-radius: 9px;
  background: color-mix(in srgb, var(--gold) 12%, var(--panel)); border: 1px solid color-mix(in srgb, var(--gold) 40%, var(--line));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 14%, transparent); }
/* each find is tappable → shows what it is (§user 2026-06-18). Reads as an inline gilt token. */
/* FISHING CATCH CHIPS — each reeled-in reward is tappable → expands hero stats / item info
   (owner report 2026-07-18: plain-text names gave nothing to inspect). Same look as .dig-find. */
.catch-chip { font: inherit; color: var(--accent); background: none; border: 0; padding: 0 1px; cursor: pointer;
  font-weight: 700; text-decoration: underline dotted; text-underline-offset: 2px; }
.catch-chip:hover, .catch-chip.open { color: var(--gold); }
.fishing-body .mini-detail, .dig-body .mini-detail, .pigment-body .mini-detail { margin-top: 7px; text-align: left; }
.pig-result.has-detail { cursor: pointer; }
.pig-result.has-detail::after { content: " ⓘ"; opacity: .65; font-weight: 400; }
.pig-result.has-detail.open::after { content: " ▴"; }
/* game surfaces are UI, not prose: a long-press must open GAME detail, never the OS
   text-selection menu (Copy/Search/Share hijacked the reel-in line on Android) */
.post-card.mg-card, .post-card.mini-card, .post-card.insert-card {
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }

.dig-find { font: inherit; color: var(--accent); background: none; border: 0; padding: 0 1px; cursor: pointer;
  text-decoration: underline dotted color-mix(in srgb, var(--gold) 55%, transparent); text-underline-offset: 2px; }
.dig-find:hover, .dig-find.open { color: var(--gold); }
.dig-tip { margin-top: 6px; font-size: 11px; font-weight: 600; color: var(--ink); line-height: 1.3;
  padding: 6px 9px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); }
.dig-tip[hidden] { display: none; }

/* spent — settle into an inert record like the QTE post: head recedes, frame relaxes, the dug grid
   stays so you can scroll back and see what you unearthed vs left buried. */
.dig-spent { filter: saturate(.95); }
.mg-card:has(.dig-spent) { border-color: var(--line); background: var(--panel); box-shadow: 0 4px 16px -12px var(--shadow); }
.dig-spent .dig-head { opacity: .7; }
.dig-spent .dig-title { color: var(--muted); }

@media (prefers-reduced-motion: reduce) { .dig-tile.cleared .dig-reveal { animation: none; } }

/* ============================================================
   CAST A LINE — fishing micro-game (§user 2026-06-18). Flat water post: PWR bar on the
   rod side, cast out, reel back steering up/down past 1 bomb + 2 rewards. Reuses .mg-card.
   ============================================================ */
.fishing-body { display: flex; flex-direction: column; gap: 6px; }
.fishing-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.fishing-title { font-family: var(--display); font-weight: 600; font-size: 15px; color: var(--accent); }
.fishing-sub { font-size: 10px; color: var(--crimson-text); text-transform: uppercase; letter-spacing: .4px; }

/* flat landscape water lane (touch-action pan-y so vertical feed scroll still works).
   Layered so the flat lane reads as LIVING water — distinct from the QTE/Dig posts — without
   stealing focus from the rewards: (1) a base depth gradient, (2) a slow drifting caustic
   shimmer, (3) a sunlit sheen across the top third. All ::before/::after so no new JS hooks. */
.fishing-water { position: relative; height: 150px; border-radius: 12px; overflow: hidden; touch-action: pan-y;
  background: linear-gradient(180deg, #bfe3f5 0%, #7fc1e6 36%, #4a90c2 100%);
  box-shadow: inset 0 4px 16px -6px rgba(0,0,0,.3), inset 0 -8px 18px -10px rgba(0,0,0,.35),
    inset 0 0 0 1px rgba(255,255,255,.18); }
@media (prefers-color-scheme: dark) { .fishing-water { background: linear-gradient(180deg, #1f4a63 0%, #163b50 40%, #0e2738 100%); } }
/* drifting caustic ripples — two soft diagonal light bands that slide sideways = water moving */
.fishing-water::before { content: ""; position: absolute; inset: -20% -40%; pointer-events: none; z-index: 0; opacity: .5;
  background:
    repeating-linear-gradient(74deg, transparent 0 26px, rgba(255,255,255,.10) 28px 34px, transparent 36px 70px),
    repeating-linear-gradient(108deg, transparent 0 40px, rgba(255,255,255,.06) 42px 48px, transparent 50px 96px);
  animation: fish-drift 9s linear infinite; }
/* sunlit surface sheen on the top third so the lane reads as a real surface (not a flat fill) */
.fishing-water::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 42%; pointer-events: none; z-index: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.30), transparent); }
@media (prefers-color-scheme: dark) { .fishing-water::before { opacity: .32; } .fishing-water::after { background: linear-gradient(180deg, rgba(255,255,255,.12), transparent); } }
@keyframes fish-drift { to { transform: translateX(70px); } }

/* reach marker — a faint dashed line showing where the CURRENT PWR would land, so timing the
   bar to reach the far fish is a legible skill (Darren §feel 2026-06-18). JS toggles display. */
.fishing-reach { position: absolute; top: 4px; bottom: 4px; width: 0; display: none; pointer-events: none; z-index: 1;
  border-left: 2px dashed rgba(255,255,255,.6); transform: translateX(-1px); }
.fishing-reach::after { content: "🎯"; position: absolute; top: -2px; left: 50%; transform: translateX(-50%); font-size: 10px; opacity: .85; }
.fishing-pwr { position: absolute; top: 12px; bottom: 12px; width: 18px; border-radius: 999px; overflow: hidden;
  background: rgba(0,0,0,.32); box-shadow: inset 0 0 0 1px rgba(255,255,255,.3), 0 2px 6px -2px rgba(0,0,0,.5); z-index: 3; }
.fishing-pwr[data-side="left"] { left: 8px; } .fishing-pwr[data-side="right"] { right: 8px; }
/* the fill is the heartbeat of the cast — a hot meter that glows as it crests, so timing reads instantly */
.fishing-pwr-fill { position: absolute; left: 0; right: 0; bottom: 0; height: 0%; border-radius: 999px;
  background: linear-gradient(180deg, #ffe08a, #ff9d3d 55%, #cf4a43);
  box-shadow: 0 0 8px -1px rgba(255,180,90,.8), inset 0 1px 1px rgba(255,255,255,.5); transition: filter .15s; }
.fishing-live .fishing-pwr-fill { animation: fish-pwr-glow 1.1s ease-in-out infinite; }
@keyframes fish-pwr-glow { 0%,100% { filter: brightness(1); } 50% { filter: brightness(1.18); } }
.fishing-pwr.locked .fishing-pwr-fill { background: linear-gradient(180deg, #9aa, #667); box-shadow: none; animation: none; }
.fishing-pwr-label { position: absolute; bottom: 3px; left: 50%; transform: translateX(-50%); font-size: 7px; font-weight: 800; color: #fff; text-shadow: 0 1px 2px #000; letter-spacing: .4px; z-index: 1; }

/* rod tip = a gilt reel anchor; a small ring sells it as the line's origin point */
.fishing-rod { position: absolute; top: 44%; width: 13px; height: 13px; border-radius: 50%; transform: translate(-50%, -50%); z-index: 3;
  background: radial-gradient(circle at 35% 30%, #f4d98a, var(--gold) 60%, #7a5a20);
  box-shadow: 0 0 0 2px rgba(0,0,0,.22), 0 1px 3px rgba(0,0,0,.45), inset 0 0 0 2px rgba(255,255,255,.25); }
.fishing-rod[data-side="left"] { left: 8%; } .fishing-rod[data-side="right"] { left: 92%; }
/* taut monofilament line — crisp 1.5px with a faint glow; brightens while reeling = tension */
.fishing-line { position: absolute; height: 1.5px; transform-origin: left center; pointer-events: none; z-index: 2;
  background: linear-gradient(90deg, rgba(255,255,255,.95), rgba(255,255,255,.55));
  box-shadow: 0 0 2px rgba(255,255,255,.6); }
.fishing-reeling .fishing-line { background: linear-gradient(90deg, #fff, rgba(255,235,200,.7));
  box-shadow: 0 0 4px rgba(255,220,170,.85); }
.fishing-bobber { position: absolute; width: 15px; height: 15px; border-radius: 50%; transform: translate(-50%, -50%); z-index: 4;
  background: radial-gradient(circle at 35% 28%, #fff 0%, #fff 26%, #e8554c 30%, var(--bad) 100%);
  box-shadow: 0 0 0 1px rgba(0,0,0,.35), 0 2px 6px rgba(0,0,0,.45); }
/* idle bob so the lane feels alive before the cast (paused once reeling — then it's all motion) */
.fishing-live:not(.fishing-reeling) .fishing-bobber { animation: fish-bob 2.2s ease-in-out infinite; }
.fishing-reeling .fishing-bobber { box-shadow: 0 0 0 1px rgba(0,0,0,.35), 0 0 12px 1px var(--accent); }

.fishing-item { position: absolute; transform: translate(-50%, -50%); z-index: 3; display: grid; place-items: center; }
.fishing-emoji { font-size: 23px; line-height: 1; filter: drop-shadow(0 1px 2px rgba(0,0,0,.45)); }
/* gentle independent bob on EVERY reward so the field feels like it's swimming, not pinned */
.fishing-item[data-kind="bomb"] .fishing-emoji { animation: fish-bob 1.6s ease-in-out infinite; }
/* danger tell: the bomb pulses while the bobber closes in, so the dodge window is legible BEFORE the hit */
.fishing-item[data-kind="bomb"].fishing-near .fishing-emoji { animation: fish-danger .5s ease-in-out infinite; }
@keyframes fish-danger { 0%,100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(0,-3px) scale(1.22); filter: drop-shadow(0 1px 2px rgba(0,0,0,.45)) drop-shadow(0 0 6px var(--bad)); } }
.fishing-item[data-kind="item"] .fishing-emoji,
.fishing-item[data-kind="powerup"] .fishing-emoji,
.fishing-item[data-kind="coin"] .fishing-emoji { animation: fish-bob 2.4s ease-in-out infinite; }

/* THE HERO CATCH — a painting clipped to a fish, dressed as the treasure of the lane:
   a gilt body ring + soft halo so it reads as a prize at a glance (was a dark torn-rag blob).
   The clip is a rounder, fuller fish (less spiky) so the artwork inside stays legible. */
.fishing-fish.painting { width: 54px; height: 36px; animation: fish-swim 3s ease-in-out infinite; }
/* the art IS the fish: same clip on a thin gilt under-layer so the rim hugs the body (a hairline
   frame, not a gold slab). Layered drop-shadows = a crisp dark edge + a 1px gold rim + rarity bloom,
   so the painting stays the dominant read and clearly looks like a treasure worth catching. */
.fishing-fish.painting .fishing-art { width: 100%; height: 100%; object-fit: cover; object-position: center;
  clip-path: polygon(0% 50%, 16% 30%, 40% 40%, 70% 22%, 100% 50%, 70% 78%, 40% 60%, 16% 70%);   /* Channel3-style fish silhouette (fuller body) */
  filter: saturate(1.15) contrast(1.06)
    drop-shadow(1px 0 0 #c9a456) drop-shadow(-1px 0 0 #c9a456) drop-shadow(0 1px 0 #c9a456) drop-shadow(0 -1px 0 #c9a456)
    drop-shadow(0 2px 3px rgba(0,0,0,.5)) drop-shadow(0 0 5px rgba(201,154,68,.65)); }
.fishing-fish.painting[data-rarity="Epic"] .fishing-art { filter: saturate(1.15) contrast(1.06)
  drop-shadow(1px 0 0 var(--r-epic)) drop-shadow(-1px 0 0 var(--r-epic)) drop-shadow(0 1px 0 var(--r-epic)) drop-shadow(0 -1px 0 var(--r-epic))
  drop-shadow(0 2px 3px rgba(0,0,0,.5)) drop-shadow(0 0 6px color-mix(in srgb, var(--r-epic) 80%, transparent)); }
.fishing-fish.painting[data-rarity="Legendary"] .fishing-art { filter: saturate(1.15) contrast(1.06)
  drop-shadow(1px 0 0 var(--r-legendary)) drop-shadow(-1px 0 0 var(--r-legendary)) drop-shadow(0 1px 0 var(--r-legendary)) drop-shadow(0 -1px 0 var(--r-legendary))
  drop-shadow(0 2px 3px rgba(0,0,0,.5)) drop-shadow(0 0 7px color-mix(in srgb, var(--r-legendary) 85%, transparent)); }
.fishing-fish.painting[data-rarity="Mythic"] .fishing-art { filter: saturate(1.15) contrast(1.06)
  drop-shadow(1px 0 0 var(--r-mythic)) drop-shadow(-1px 0 0 var(--r-mythic)) drop-shadow(0 1px 0 var(--r-mythic)) drop-shadow(0 -1px 0 var(--r-mythic))
  drop-shadow(0 2px 3px rgba(0,0,0,.5)) drop-shadow(0 0 8px color-mix(in srgb, var(--r-mythic) 85%, transparent)); }
@keyframes fish-swim { 0%,100% { transform: translate(-50%, -50%) rotate(-2.5deg); } 50% { transform: translate(-50%, calc(-50% - 3px)) rotate(2.5deg); } }
.fishing-item.caught { animation: fish-caught .42s cubic-bezier(.2,1.4,.4,1) forwards; }
.fishing-item.boom { animation: fish-boom .4s ease-out forwards; }
@keyframes fish-bob { 0%,100% { transform: translate(-50%, -50%); } 50% { transform: translate(-50%, calc(-50% - 4px)); } }
/* catch = a punchy pop-then-yank: a flash + overshoot before the trophy flies off the hook */
@keyframes fish-caught { 0% { transform: translate(-50%,-50%) scale(1); filter: brightness(1); }
  35% { transform: translate(-50%,-50%) scale(1.35); filter: brightness(1.6); }
  100% { transform: translate(-50%, calc(-50% - 18px)) scale(0); opacity: 0; } }
@keyframes fish-boom { 0% { filter: brightness(2); transform: translate(-50%,-50%) scale(1.5); } 100% { transform: translate(-50%,-50%) scale(0); opacity: 0; } }

.fishing-hint { font-size: 10.5px; color: var(--muted); min-height: 13px; }
.fishing-live .fishing-hint { color: var(--crimson-text); }
.fishing-controls { display: flex; gap: 8px; }
.fishing-cast, .fishing-reel { flex: 1; min-height: 40px; border-radius: 10px; border: 1px solid transparent; font-weight: 800; font-size: 13px; letter-spacing: .3px; cursor: pointer; transition: transform .08s, filter .15s, box-shadow .15s; }
.fishing-cast { background: var(--accent); color: var(--bg); box-shadow: 0 4px 14px -5px var(--accent); }
.fishing-reel { background: var(--bad); color: #fff; box-shadow: 0 4px 14px -5px var(--bad); }
.fishing-cast:hover, .fishing-reel:hover { filter: brightness(1.06); box-shadow: 0 5px 16px -5px var(--accent); }
.fishing-reel:hover { box-shadow: 0 5px 16px -5px var(--bad); }
.fishing-cast[hidden], .fishing-reel[hidden] { display: none; }
.fishing-cast:active, .fishing-reel:active { transform: scale(.97); }
/* the haul line — where the catch lands as a readable payoff (display serif = it reads as a trophy) */
.fishing-result { font-size: 12.5px; font-weight: 700; color: var(--accent); min-height: 15px; }
.fishing-result:not(:empty) { padding: 8px 11px; border-radius: 9px; font-family: var(--display); font-size: 14px; line-height: 1.3;
  background: color-mix(in srgb, var(--gold) 12%, var(--panel)); border: 1px solid color-mix(in srgb, var(--gold) 40%, var(--line));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 14%, transparent); }
.fishing-body[data-outcome="win"] .fishing-result { animation: fish-haul .45s cubic-bezier(.2,1.3,.4,1) both; }
@keyframes fish-haul { from { transform: translateY(6px) scale(.97); opacity: 0; } }
.fishing-body[data-outcome="bomb"] .fishing-result { color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, var(--panel)); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }

/* ============================================================
   PIGMENT MIXER — match a painting's pigments (js/pigment.js). A prompt swatch,
   three choices, a mixing strip with UNDO, then the zoom-out painting REVEAL.
   ============================================================ */
.pigment-body { display: grid; gap: 9px; }
.pig-head { display: flex; align-items: baseline; gap: 8px; }
.pig-title { font-family: var(--display); font-weight: 600; font-size: 16.5px; color: var(--accent2); }
.pig-sub { font-size: 11px; color: var(--muted); }
.pig-board { display: grid; gap: 10px; }
.pig-prompt-wrap { display: grid; gap: 5px; justify-items: center; }
.pig-prompt-label { font-size: 9.5px; font-weight: 800; letter-spacing: 1.4px; color: var(--muted); }
.pig-prompt { width: 74px; height: 74px; border-radius: 50%;
  border: 3px solid color-mix(in srgb, var(--gold) 55%, var(--line));
  box-shadow: inset 0 2px 8px rgba(0,0,0,.25), 0 3px 12px -4px var(--shadow); transition: background .25s; }
.pig-prompt-wrap.spent { opacity: .45; }
.pig-choices { display: flex; gap: 10px; justify-content: center; }
.pig-choice { width: 58px; height: 58px; border-radius: 12px; border: 2px solid var(--line); cursor: pointer;
  box-shadow: inset 0 2px 6px rgba(0,0,0,.2), 0 2px 8px -4px var(--shadow);
  transition: transform .1s, border-color .15s, box-shadow .15s; }
.pig-choice:hover { transform: translateY(-2px); }
.pig-choice:active { transform: scale(.94); }
.pig-choice.sel { border-color: var(--gold); box-shadow: 0 0 0 2px color-mix(in srgb, var(--gold) 55%, transparent), inset 0 2px 6px rgba(0,0,0,.2); }
.pig-choice.gone { opacity: 0; pointer-events: none; }
.pig-tools { display: flex; align-items: center; gap: 8px; }
.pig-strip { display: flex; gap: 4px; flex: 1; }
.pig-tube { font-size: 15px; line-height: 1; filter: drop-shadow(0 1px 1px rgba(0,0,0,.3)); }
.pig-tube.empty::before { content: "·"; color: var(--muted); font-weight: 800; }
.pig-undo, .pig-mix { min-height: 34px; padding: 0 13px; border-radius: 9px; font-weight: 800; font-size: 12px;
  border: 1px solid var(--line); background: var(--panel2); color: var(--ink); cursor: pointer; }
.pig-undo:disabled, .pig-mix:disabled { opacity: .4; cursor: default; }
.pig-mix.armed { background: var(--accent); color: var(--bg); border-color: transparent;
  box-shadow: 0 4px 14px -5px var(--accent); }
.pig-hint { font-size: 10.5px; color: var(--muted); min-height: 13px; }
.pigment-live .pig-hint { color: var(--accent2); }
.pig-result { font-size: 12.5px; font-weight: 700; color: var(--accent); }
.pig-result:not(:empty) { padding: 8px 11px; border-radius: 9px; font-family: var(--display); font-size: 14px; line-height: 1.3;
  background: color-mix(in srgb, var(--gold) 12%, var(--panel)); border: 1px solid color-mix(in srgb, var(--gold) 40%, var(--line)); }
/* THE REVEAL — zoom out from the pigment to the whole canvas it came from */
.pig-reveal { display: grid; gap: 6px; justify-items: center; }
.pig-reveal[hidden] { display: none; }
.pig-reveal-frame { max-width: 78%; overflow: hidden; border-radius: 10px;
  border: 3px solid color-mix(in srgb, var(--gold) 60%, var(--line));
  box-shadow: 0 8px 26px -10px var(--shadow), inset 0 0 0 1px color-mix(in srgb, var(--gold) 25%, transparent); }
.pig-reveal-frame img { display: block; width: 100%; height: auto; animation: pig-zoom 1.15s cubic-bezier(.2,.8,.3,1) both; }
.pig-reveal-fallback { font-size: 54px; padding: 26px 44px; }
@keyframes pig-zoom { from { transform: scale(2.4); opacity: .4; } to { transform: scale(1); opacity: 1; } }
.pig-reveal-cap { font-family: var(--display); font-size: 13.5px; color: var(--accent2); text-align: center; }
.pigment-body[data-outcome="perfect"] .pig-reveal-frame { border-color: var(--gold);
  box-shadow: 0 0 26px -6px color-mix(in srgb, var(--gold) 70%, transparent), 0 8px 26px -10px var(--shadow); }
@media (prefers-reduced-motion: reduce) { .pig-reveal-frame img { animation: none; } }

.mg-card.fishing-shake { animation: crit-shake .3s ease-in-out; }
/* WIN — the gilt frame lifts and a warm glow blooms so a catch clearly reads as a victory */
.mg-card:has(.fishing-win) { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 60%, transparent), 0 0 30px -8px var(--accent), 0 10px 30px -16px var(--shadow); }
.fishing-win .fishing-water { box-shadow: inset 0 4px 16px -6px rgba(0,0,0,.3), inset 0 -8px 18px -10px rgba(0,0,0,.35), inset 0 0 0 1px color-mix(in srgb, var(--gold) 55%, transparent), inset 0 0 24px -6px color-mix(in srgb, var(--gold) 60%, transparent); }
/* SPENT — settle into an inert record like the QTE/Dig posts: water calms (drift stops, desaturates),
   head recedes, frame relaxes. The lane stays so you can scroll back and see the run. */
.mg-card:has(.fishing-spent) { background: var(--panel); }
.fishing-spent .fishing-head { opacity: .7; }
.fishing-spent .fishing-water { filter: saturate(.72) brightness(.97); }
.fishing-spent .fishing-water::before { animation: none; opacity: .25; }
.mg-card:has(.fishing-spent):not(:has(.fishing-win)) { border-color: var(--line); box-shadow: 0 4px 16px -12px var(--shadow); }

@media (prefers-reduced-motion: reduce) {
  .fishing-item[data-kind="bomb"] .fishing-emoji, .fishing-item[data-kind="bomb"].fishing-near .fishing-emoji,
  .fishing-item[data-kind="item"] .fishing-emoji,
  .fishing-item[data-kind="powerup"] .fishing-emoji, .fishing-item[data-kind="coin"] .fishing-emoji,
  .fishing-fish.painting, .fishing-item.caught, .fishing-item.boom, .mg-card.fishing-shake,
  .fishing-water::before, .fishing-live .fishing-pwr-fill, .fishing-live:not(.fishing-reeling) .fishing-bobber,
  .fishing-body[data-outcome="win"] .fishing-result { animation: none; }
}

/* ============================================================
   RANGED auto-attack PULSE RING (§user 2026-06-18) — over the targeted enemy in the dock
   status board; fill it (time your scroll-tick) for a bigger ranged hit. Melee = flat.
   ============================================================ */
.aim-pulse-wrap { position: absolute; top: 26px; width: 0; height: 0; z-index: 2; pointer-events: none; }
.aim-target { position: absolute; left: 0; top: 0; width: 46px; height: 46px; transform: translate(-50%, -50%); border-radius: 50%;
  border: 2px solid rgba(255,255,255,.85); box-shadow: 0 0 6px rgba(255,255,255,.5), inset 0 0 6px rgba(255,255,255,.3); }
.aim-pulse { position: absolute; left: 0; top: 0; width: 46px; height: 46px; transform: translate(-50%, -50%) scale(.15); border-radius: 50%;
  border: 3px solid var(--gold); box-shadow: 0 0 10px -1px var(--gold); }
.aim-pulse-wrap.hot .aim-pulse { border-color: #ffe08a; box-shadow: 0 0 16px 1px var(--gold); }
.aim-pulse-wrap.hot .aim-target { border-color: #ffe08a; box-shadow: 0 0 12px var(--gold); }
@media (prefers-reduced-motion: reduce) { .aim-pulse { transition: none; } }

/* fielded roster heroes can't be re-equipped — dim + a "fielded" tag (§user 2026-06-18 glitch) */
.hero-chip.fielded { opacity: .42; filter: grayscale(.3); cursor: default; position: relative; }
/* 9px floor (matches .qte-badge) — at 7.5px inside the 42%-dimmed chip the tag was unreadable,
   and it's the one label explaining why the chip won't respond */
.hero-chip.fielded::after { content: "fielded"; position: absolute; top: 3px; right: 4px; font-size: 9px; font-weight: 800;
  letter-spacing: .3px; color: var(--bg); background: var(--accent); border-radius: 999px; padding: 1px 6px; }

/* fusion / discovery FANFARE (§user 2026-06-18) — make the payoff feel good: a gold-glowing
   reward card + a radial sparkle burst (epic = bigger burst for a discovery or skipped level). */
.reward-card { position: relative; }
.reward-card[data-fanfare="true"], .reward-card[data-fanfare="epic"] {
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--gold) 55%, transparent), 0 0 28px -6px var(--gold);
  animation: rc-pulse .9s ease-out 1; }
.reward-card[data-fanfare="epic"] { box-shadow: 0 0 0 1.5px var(--gold), 0 0 40px -4px var(--gold); }
.reward-card[data-fanfare="epic"] .rc-glyph { animation: rc-glyph-pop .6s cubic-bezier(.2,1.5,.4,1) 1; }
@keyframes rc-pulse { 0% { box-shadow: 0 0 0 1px var(--gold), 0 0 8px -2px var(--gold); } }
@keyframes rc-glyph-pop { 0% { transform: scale(.4); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .reward-card[data-fanfare] { animation: none; } .reward-card[data-fanfare] .rc-glyph { animation: none; }
}

/* HARD-post warning (§user 2026-06-18): a post +levels over you turns its level badge RED, and
   when it's highlighted the badge + the dock level pip gently flash — "watch out before tapping". */
.post-diff[data-danger="1"] { color: #fff !important; background: var(--bad); border-color: var(--bad); }
.post-card.is-centered[data-danger="1"] .post-diff { animation: danger-flash 1.05s ease-in-out infinite; }
body.post-danger .d-level { animation: danger-flash 1.05s ease-in-out infinite; padding: 0 5px; border-radius: 6px; }
@keyframes danger-flash { 0%, 100% { color: var(--bad); background: transparent; } 50% { color: #fff; background: var(--bad); } }

/* "Tap a post to roll an encounter" hint — mostly static; .nudge gently fades its color after a
   few scrolls without tapping to draw the eye (§user 2026-06-18). */
.tap-hint { position: fixed; left: 50%; bottom: 76px; transform: translateX(-50%); z-index: 40; pointer-events: none;
  font-size: 12px; font-weight: 700; color: var(--ink); background: var(--panel); border: 1px solid var(--line);
  border-radius: 999px; padding: 7px 14px; box-shadow: 0 4px 14px -6px var(--shadow); white-space: nowrap; }
.tap-hint[hidden] { display: none; }
.tap-hint.nudge { animation: tap-hint-fade 2.2s ease-in-out infinite; }
@keyframes tap-hint-fade {
  0%, 100% { color: var(--ink); border-color: var(--line); box-shadow: 0 4px 14px -6px var(--shadow); }
  50% { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 60%, var(--line));
        box-shadow: 0 4px 18px -4px color-mix(in srgb, var(--accent) 50%, transparent); } }
@media (prefers-reduced-motion: reduce) {
  .tap-hint.nudge, .post-card.is-centered[data-danger="1"] .post-diff, body.post-danger .d-level { animation: none; }
}

/* ATTACK-INTENT telegraph (§user 2026-06-18 — Alice structure + Darren slot-colors): a slot-tinted
   ⚔/🏹 chip on each enemy shows WHICH hero is about to strike it (chip color = that hero's slot
   ring on its power pip); a one-shot impact ring on the hit pays it off, tinted to the attacker. */
.enemy-intent { position: absolute; top: -7px; right: -8px; z-index: 3; display: flex; gap: 2px; pointer-events: none; }
.intent-chip { display: grid; place-items: center; min-width: 15px; height: 15px; padding: 0 2px; border-radius: 999px;
  font-size: 9px; line-height: 1; color: #fff; background: var(--slot-color, var(--accent)); box-shadow: 0 1px 3px var(--shadow); }
/* hero's power pip carries its slot color so a chip maps back to a specific hero */
.hero[data-slot] .hero-pow { box-shadow: 0 0 0 1.5px var(--slot-color, transparent); }
/* impact ring on the strike, tinted to the attacker (crit=gold, melee=amber, ranged=blue) —
   distinct from the persistent white ranged-timing ring (.aim-target) so they never blur. */
.enemy.struck::before { content: ""; position: absolute; left: 50%; top: 16px; width: 30px; height: 30px;
  transform: translate(-50%, -50%) scale(.2); border-radius: 50%; border: 2px solid var(--ring, var(--gold));
  pointer-events: none; z-index: 2; animation: impact-ring .32s ease-out forwards; }
.enemy[data-hit-type="melee"]  { --ring: #e0a43b; }
.enemy[data-hit-type="ranged"] { --ring: #4f8bd6; }
.enemy[data-hit-type="crit"]   { --ring: var(--gold); }
@keyframes impact-ring { from { opacity: .9; transform: translate(-50%, -50%) scale(.2); }
  to { opacity: 0; transform: translate(-50%, -50%) scale(1.5); } }
@media (prefers-reduced-motion: reduce) { .enemy.struck::before { animation: none; } }

/* one-time TUTORIAL overlays (§user 2026-06-18) — launch + first-battle pop-ups, parchment modal */
.tut-overlay { position: fixed; inset: 0; z-index: 9000; display: grid; place-items: center; padding: 20px;
  background: color-mix(in srgb, var(--ink) 62%, transparent); backdrop-filter: blur(2px); animation: tut-in .2s ease-out; }
@keyframes tut-in { from { opacity: 0; } }
.tut-card { width: min(420px, 92vw); background: var(--panel); border: 1px solid color-mix(in srgb, var(--gold) 55%, var(--line));
  border-radius: 16px; padding: 20px 20px 16px; box-shadow: 0 24px 60px -20px var(--shadow), inset 0 0 0 1px color-mix(in srgb, var(--gold) 20%, transparent);
  animation: tut-pop .26s cubic-bezier(.2,1.3,.4,1); }
@keyframes tut-pop { from { transform: translateY(12px) scale(.96); opacity: 0; } }
.tut-title { font-family: var(--display); font-weight: 600; font-size: 22px; color: var(--accent); text-align: center; margin-bottom: 12px; }
.tut-list { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.tut-list li { font-size: 14px; line-height: 1.4; color: var(--ink); padding-left: 2px; }
.tut-list li b { color: var(--accent); }
.tut-go { width: 100%; min-height: 44px; font-size: 15px; }
@media (prefers-reduced-motion: reduce) { .tut-overlay, .tut-card { animation: none; } }

/* OFF state clarity (§user 2026-06-18): hide the feed's "▶ ACTIVE" chevron (nothing is live) and
   clearly mark the bottom bar OFF — a pulsing crimson "⏻ OFF" pill using the SAME power icon as the
   toggle, plus a dimmed bar + a lit power button, so it reads instantly on mobile. */
.feed-off .post-card.is-centered::before { display: none; }
.feed-off .post-card.is-centered { box-shadow: none; }
.d-offtag { display: none; }
.dock-bar.off .d-offtag { display: inline-flex; align-items: center; gap: 3px; margin-left: 6px;
  font-size: 12px; font-weight: 800; letter-spacing: .5px; color: #fff; background: var(--bad);
  border-radius: 999px; padding: 2px 9px; box-shadow: 0 0 10px -2px var(--bad); animation: off-pulse 1.6s ease-in-out infinite; }
@keyframes off-pulse { 0%, 100% { opacity: .85; } 50% { opacity: 1; box-shadow: 0 0 14px 0 var(--bad); } }
.dock-bar.off { filter: saturate(.6); }
.dock-bar.off .dock-off { color: #fff; background: var(--bad); border-color: var(--bad); box-shadow: 0 0 10px -2px var(--bad); }
@media (prefers-reduced-motion: reduce) { .dock-bar.off .d-offtag { animation: none; } }

/* ============================================================
   §Alice 2026-06-18 polish pass — Story outcome warmth + first-spin legibility.
   Two teammate-flagged moments: (1) the "Story" outcome read as a dead-end null
   reward (bare 📖 + a flat line of italic text on raw parchment — no card, no
   frame, no warmth, unlike every other reward). (2) the first-spin reel offers no
   legend for its 8 outcome icons. Visual fixes here; copy/markup notes routed to Ulrich.
   ============================================================ */

/* ---- STORY / narrative outcome → an illuminated manuscript leaf ----
   Reframe the phase as a found PASSAGE, not "nothing happened": the body content
   sits in a warm gold-washed panel (same gilt language as .reward-card / starter
   leaves), the 📖 becomes a struck illuminated drop-cap glyph, and the text reads
   as a quoted margin-note. Pure CSS on the existing showNarrative() DOM
   (.phase-title 📖 + .event-text + .btn.primary), so no JS change needed. */
.dock-body[data-phase="narrative"] {
  /* hug the content into a single illuminated card */
  padding: 2px;
}
.dock-body[data-phase="narrative"] > .phase-title,
.dock-body[data-phase="narrative"] > .event-text {
  background: radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--gold) 13%, var(--panel)), var(--panel) 72%);
  border: 1px solid color-mix(in srgb, var(--gold) 48%, var(--line));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 18%, transparent), 0 14px 40px -22px var(--shadow);
  margin: 0;
}
/* title row = the illuminated header: a big struck 📖 with an engraved "A Passage"
   eyebrow, on the warm leaf. Drop the orphaned ❧ fleuron HERE (the card frame already
   carries the gilt) so the glyph stops reading as a stray floating mark. */
.dock-body[data-phase="narrative"] > .phase-title {
  display: flex; align-items: center; gap: 10px;
  border-radius: 13px 13px 0 0; border-bottom: 0;
  padding: 13px 15px 9px; font-size: 30px; line-height: 1;
  filter: drop-shadow(0 3px 8px color-mix(in srgb, var(--gold) 40%, transparent));
  animation: rc-pop .5s both cubic-bezier(.2,1.35,.4,1);
}
.dock-body[data-phase="narrative"] > .phase-title::after {
  content: "A Passage";                       /* replaces the floating fleuron with a real label */
  font-family: var(--ui); font-weight: 700; font-size: 10.5px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent); opacity: .9; margin-top: 0;
}
/* the prose = a quoted manuscript passage: serif, generous, with a gilt opening rule */
.dock-body[data-phase="narrative"] > .event-text {
  border-radius: 0 0 13px 13px; padding: 4px 16px 16px;
  font-size: 16px; line-height: 1.65; color: var(--ink); font-style: italic;
  position: relative;
}
.dock-body[data-phase="narrative"] > .event-text::before {
  content: ""; display: block; width: 40px; height: 2px; margin: 0 0 11px;
  background: linear-gradient(90deg, var(--gold), transparent);
}
/* Continue = THE action — let it span and lead, matching the reward phase's Collect
   (it was a small orphan button in the corner). */
.dock-body[data-phase="narrative"] > .btn.primary { width: 100%; font-size: 15px; margin-top: 12px; }
@media (prefers-reduced-motion: reduce) {
  .dock-body[data-phase="narrative"] > .phase-title { animation: none; }
}

/* ---- FIRST-SPIN reel: readability + affordance ----
   The reel emoji were 18px in a 120px window — a first-timer can't tell the 8
   outcomes apart, and the marker (a faint 0.6 gold hairline) didn't read as a clear
   "this is where it lands" target. Bump the glyphs, widen the window a touch, and
   give the marker a lit gold caret + a soft spotlight so the landing cell pops. */
.ps-window { width: 132px; height: 30px; }
.ps-cell { flex: 0 0 36px; width: 36px; font-size: 21px; line-height: 30px; }
.ps-marker { width: 0; border-left: 2px solid var(--gold); opacity: .9;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--gold) 30%, transparent), 0 0 8px 1px color-mix(in srgb, var(--gold) 55%, transparent); }
/* a faint vertical spotlight at center so the eye knows the result reads UNDER the marker */
.ps-window::after { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 38px;
  transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(60% 100% at 50% 50%, color-mix(in srgb, var(--gold) 16%, transparent), transparent 72%); }
/* the "behind the door…" hint reads a touch stronger so the moment has a voice */
.pd-spin-hint { color: color-mix(in srgb, var(--accent) 70%, var(--muted)); font-weight: 600; }

/* ---- WHEEL LEGEND (pre-styled for Ulrich) ----
   A one-time strip that names the 8 outcome icons on the FIRST spin (so ⚔️🪶🧪🪏🎣✨📖💀
   aren't a mystery). Ulrich: mount a `.wheel-legend` inside `.pd-spinwrap` on the very
   first openDetailSpin (gate on a localStorage flag), built from SLICE_INFO — each entry
   an `<span class="wl-item"><span class="wl-ic">⚔️</span>Battle</span>`. Styled here. */
.wheel-legend { display: flex; flex-wrap: wrap; gap: 5px 8px; margin-top: 2px;
  padding-top: 9px; border-top: 1px dashed color-mix(in srgb, var(--gold) 30%, var(--line)); }
.wheel-legend .wl-head { flex: 0 0 100%; font-size: 10px; font-weight: 700; letter-spacing: .5px;
  text-transform: uppercase; color: var(--muted); margin-bottom: 1px; }
.wl-item { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--ink);
  background: color-mix(in srgb, var(--gold) 8%, var(--panel)); border: 1px solid color-mix(in srgb, var(--gold) 26%, var(--line));
  border-radius: 999px; padding: 2px 8px 2px 5px; line-height: 1.4; white-space: nowrap; }
.wl-item .wl-ic { font-size: 14px; line-height: 1; }

/* ============================= JUICE FX (shared js/juice.js) =============================
   Vampire-Survivors / Balatro punch: screen-space particle bursts, pop-text, impact rings.
   One fixed overlay above everything; pointer-events:none so it never blocks taps/scroll. */
.fx-layer { position: fixed; inset: 0; z-index: 9500; pointer-events: none; overflow: hidden; }
.fx-dot { position: absolute; border-radius: 50%; will-change: transform, opacity; box-shadow: 0 0 6px 1px currentColor; }
.fx-pop { position: absolute; font-family: var(--display, "EB Garamond", Georgia, serif); font-weight: 800;
  font-size: 16px; letter-spacing: .3px; white-space: nowrap; will-change: transform, opacity;
  text-shadow: 0 1px 2px rgba(0,0,0,.55), 0 0 10px color-mix(in srgb, currentColor 60%, transparent); }
.fx-ring { position: absolute; border: 2px solid var(--gold); border-radius: 50%; transform: translate(-50%,-50%);
  will-change: width, height, opacity; box-shadow: 0 0 10px 1px currentColor; }
@media (prefers-reduced-motion: reduce) { .fx-ring { display: none; } }

/* ---------------- CLAIM pop-ups (Seeker-vs-Scroll parity) ----------------
   A rarity-tinted "CLAIM" pill drifts over the feed; a draining timer bar shows the window before
   it expires. Layer is pass-through so it never blocks feed scroll; only the pill is tappable. */
.claim-layer { position: fixed; inset: 0; z-index: 40; pointer-events: none; overflow: hidden; }
.claim-pill {
  position: absolute; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 15px 9px 11px; white-space: nowrap; cursor: pointer; pointer-events: auto;
  color: var(--ink);
  background: linear-gradient(135deg, color-mix(in srgb, var(--claim-color) 24%, var(--panel)) 0%, var(--panel2) 100%);
  border: 1.5px solid color-mix(in srgb, var(--claim-color) 70%, var(--line));
  border-radius: 999px;
  box-shadow: 0 0 22px -2px color-mix(in srgb, var(--claim-color) 60%, transparent), 0 6px 16px -6px #000;
  animation: claim-pop-in .28s cubic-bezier(.2,.9,.3,1.2), claim-wiggle 1.5s ease-in-out .28s infinite;
}
.claim-pill:active { animation: none; transform: translate(-50%, -50%) scale(.94); }
.claim-glyph { font-size: 22px; line-height: 1; filter: drop-shadow(0 0 5px color-mix(in srgb, var(--claim-color) 75%, transparent)); }
.claim-body { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.05; }
.claim-cta { font-family: var(--display, "EB Garamond", Georgia, serif); font-weight: 800; font-size: 14px; letter-spacing: .07em; color: var(--gold); }
.claim-sub { font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: color-mix(in srgb, var(--claim-color) 78%, var(--muted)); margin-top: 1px; }
/* draining timer = the "tap before it expires" affordance */
.claim-timer { position: absolute; left: 12px; right: 12px; bottom: 3.5px; height: 3px; border-radius: 2px;
  background: color-mix(in srgb, var(--claim-color) 88%, white); transform-origin: left center;
  box-shadow: 0 0 6px color-mix(in srgb, var(--claim-color) 70%, transparent);
  animation: claim-drain var(--claim-dur, 5500ms) linear forwards; }
.claim-pill.claimed { animation: none; transition: transform .28s cubic-bezier(.2,.7,.2,1), opacity .28s ease; opacity: 0; transform: translate(-50%, -80%) scale(1.18); }
.claim-pill.expiring { animation: none; transition: transform .22s ease, opacity .22s ease; opacity: 0; transform: translate(-50%, -50%) scale(.8); }
.claim-pill.claimed .claim-timer { display: none; }
@keyframes claim-pop-in { 0% { transform: translate(-50%,-50%) scale(.3); opacity: 0; } 60% { transform: translate(-50%,-50%) scale(1.12); opacity: 1; } 100% { transform: translate(-50%,-50%) scale(1); opacity: 1; } }
@keyframes claim-wiggle { 0%,100% { transform: translate(-50%,-50%) rotate(-3.5deg); } 50% { transform: translate(-50%,-50%) rotate(3.5deg); } }
@keyframes claim-drain { from { transform: scaleX(1); } to { transform: scaleX(0); } }
/* reduced motion: keep the pop-in + timer (the timer is INFORMATION), drop the perpetual wiggle */
@media (prefers-reduced-motion: reduce) { .claim-pill { animation: claim-pop-in .2s ease-out; } }
/* heavy-hit squash: the struck enemy punches in scale on a CRIT/ULT/kill (Balatro overshoot).
   .enemy is centered via transform:translateX(-50%) — the keyframe MUST keep that or it jumps sideways. */
.enemy.crit-punch { animation: crit-punch .26s cubic-bezier(.2,.8,.3,1); }
@keyframes crit-punch { 0% { transform: translateX(-50%) scale(1); } 35% { transform: translateX(-50%) scale(1.22); } 100% { transform: translateX(-50%) scale(1); } }
@media (prefers-reduced-motion: reduce) { .enemy.crit-punch { animation: none; } }

/* ---- fishing "tap or scroll to move" steer demo (rides the bobber until the first steer) ---- */
.fishing-taptarget { position: absolute; transform: translate(-50%,-50%); z-index: 6; pointer-events: none;
  display: grid; justify-items: center; gap: 1px; color: var(--gold); }
.fishing-taptarget .ftt-up { font-size: 12px; line-height: 1; filter: drop-shadow(0 0 4px var(--gold)); animation: ftt-up 1s ease-in-out infinite; }
.fishing-taptarget .ftt-down { font-size: 12px; line-height: 1; filter: drop-shadow(0 0 4px var(--gold)); animation: ftt-down 1s ease-in-out infinite; }
.fishing-taptarget .ftt-ring { width: 30px; height: 30px; border: 2px dashed color-mix(in srgb, var(--gold) 70%, transparent);
  border-radius: 50%; animation: ftt-ring 1.4s ease-out infinite; }
.fishing-taptarget .ftt-label { position: absolute; top: calc(100% + 3px); left: 50%; transform: translateX(-50%);
  font: 700 8.5px/1 var(--ui); letter-spacing: .04em; white-space: nowrap; color: var(--gold);
  background: color-mix(in srgb, var(--bg) 72%, transparent); padding: 2px 6px; border-radius: 999px; }
.fishing-taptarget.ftt-out { animation: ftt-out .26s ease-in forwards; }
@keyframes ftt-up   { 0%,100% { opacity: .45; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }
@keyframes ftt-down { 0%,100% { opacity: .45; transform: translateY(0); } 50% { opacity: 1; transform: translateY(3px); } }
@keyframes ftt-ring { 0% { transform: scale(.7); opacity: .9; } 100% { transform: scale(1.25); opacity: 0; } }
@keyframes ftt-out  { to { opacity: 0; transform: translate(-50%,-50%) scale(1.4); } }
@media (prefers-reduced-motion: reduce) {
  .fishing-taptarget .ftt-up, .fishing-taptarget .ftt-down, .fishing-taptarget .ftt-ring { animation: none; }
}

/* =====================================================================
   2026-06 EMERGENCE SLICE — FAKE XP bar, feed toast, Posts board + sidebar.
   Parchment theme tokens reused; this layer is purely additive.
   ===================================================================== */

/* ---- FAKE XP bar (slim top overlay; clearly test-only) ---- */
.fx-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 14; display: flex; align-items: center; gap: 8px;
  padding: 4px 10px calc(4px + env(safe-area-inset-top, 0px)); min-height: 26px;
  background: color-mix(in srgb, var(--panel) 86%, transparent); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line); font: 600 11px/1 var(--ui); color: var(--muted); }
.fx-bar .fx-tag { font-size: 9px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 2px 6px; opacity: .8; }
.fx-bar .fx-lvl { font-weight: 800; color: var(--ink); font-size: 12px; min-width: 38px; }
.fx-bar .fx-track { flex: 1; height: 7px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 12%, transparent); overflow: hidden; }
.fx-bar .fx-fill { height: 100%; width: 0%; border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), color-mix(in srgb, var(--gold) 55%, var(--accent2))); transition: width .35s ease; }
.fx-bar .fx-num { font-variant-numeric: tabular-nums; font-size: 10px; opacity: .85; min-width: 56px; text-align: right; }
/* push the feed down so the bar never hides the first post */
body.has-xpbar .feed { padding-top: calc(34px + env(safe-area-inset-top, 0px)); }

/* ---- feed toast (a Post / mini-post fired) ---- */
.fx-toast { position: fixed; top: calc(38px + env(safe-area-inset-top, 0px)); left: 50%; transform: translate(-50%, -6px);
  z-index: 13; display: inline-flex; align-items: center; gap: 7px; max-width: min(86vw, 420px);
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); pointer-events: none;
  background: color-mix(in srgb, var(--panel) 94%, transparent); box-shadow: 0 6px 20px var(--shadow);
  font: 600 12.5px/1.2 var(--ui); color: var(--ink); opacity: 0; transition: opacity .18s ease, transform .18s ease; }
.fx-toast[hidden] { display: none; }
.fx-toast.show { opacity: 1; transform: translate(-50%, 0); }
.fx-toast .fxt-emoji { font-size: 15px; }
.fx-toast[data-tone="fuse"] { border-color: color-mix(in srgb, var(--r-epic) 55%, var(--line)); }
.fx-toast[data-tone="mini"] { border-color: color-mix(in srgb, var(--gold) 50%, var(--line)); }
.fx-toast[data-tone="warn"] { border-color: color-mix(in srgb, var(--bad) 50%, var(--line)); }

/* ---- Posts tab: board (left) + sidebar (right) ---- */
.posts-wrap { display: flex; gap: 12px; align-items: flex-start; }
.posts-main { flex: 1 1 60%; min-width: 0; }
.posts-side { flex: 0 0 38%; max-width: 220px; border-left: 1px solid var(--line); padding-left: 10px; }
@media (max-width: 560px) { .posts-wrap { flex-direction: column; } .posts-side { flex-basis: auto; max-width: none; width: 100%;
  border-left: 0; border-top: 1px solid var(--line); padding-left: 0; padding-top: 8px; } }

/* small gap so non-fused neighbours read as DISTINCT cards (they used to butt edge-to-edge
   at gap:0 and merge into one block); a fused pair's .post-link connector sits in this gap
   and visually bridges them, so the seam still reads as "these two interact". */
.posts-board { display: flex; flex-direction: column; gap: 7px; margin-bottom: 6px; }
.post-slot { display: flex; align-items: flex-start; gap: 9px; background: var(--panel); border: 1px solid var(--line);
  border-left: 3px solid var(--r-common); border-radius: 10px; padding: 8px 9px; }
.post-slot[data-rarity="Rare"] { border-left-color: var(--r-rare); }
.post-slot[data-rarity="Epic"] { border-left-color: var(--r-epic); }
.post-slot[data-rarity="Legendary"] { border-left-color: var(--r-legendary); }
.post-slot[data-shared="1"] { box-shadow: 0 0 0 1px color-mix(in srgb, var(--gold) 45%, transparent) inset; }
.post-slot .ps-emoji { font-size: 20px; line-height: 1.2; }
.post-slot .ps-text { flex: 1; min-width: 0; }
.post-slot .ps-name { font-weight: 700; font-size: 13.5px; }
.post-slot .ps-meta { color: var(--muted); font-size: 10.5px; margin-top: 1px; }
.post-slot .ps-desc { color: var(--muted); font-size: 11px; margin-top: 3px; line-height: 1.35; }
.post-slot .ps-ctrl { display: flex; flex-direction: column; gap: 3px; align-items: stretch; }
.ps-btn { background: var(--bg2); border: 1px solid var(--line); color: var(--ink); border-radius: 7px;
  font: 700 12px/1 var(--ui); padding: 4px 7px; cursor: pointer; min-width: 28px; }
.ps-btn:hover { border-color: color-mix(in srgb, var(--gold) 55%, var(--line)); }
.ps-btn:disabled { opacity: .35; cursor: default; }
.ps-btn.ps-x { color: var(--bad); }
.ps-btn.ps-answer { color: var(--bg); background: var(--accent); border-color: var(--accent); font-size: 11px; }

/* adjacency connector + fuse affordance between two neighbouring Posts. Negative margins
   pull the connector INTO the board gap so a fused pair reads as one linked unit, not two
   cards floating apart. */
.post-link { display: flex; justify-content: center; padding: 1px 0; margin: -4px 0; position: relative; z-index: 1; }
.fuse-link { background: color-mix(in srgb, var(--r-epic) 12%, var(--panel)); border: 1px dashed color-mix(in srgb, var(--r-epic) 55%, var(--line));
  color: var(--ink); border-radius: 999px; font: 600 11px/1 var(--ui); padding: 4px 12px; cursor: pointer; }
.fuse-link:hover { background: color-mix(in srgb, var(--r-epic) 22%, var(--panel)); }
.post-link[data-harmful="1"] .fuse-link { border-color: color-mix(in srgb, var(--bad) 55%, var(--line));
  background: color-mix(in srgb, var(--bad) 10%, var(--panel)); }

/* (legacy .post-hand/.post-mini base block removed 2026-07-18 — the 2026-06-27 touch-polish
   block below is the single source for hand styles) */

/* sidebar blocks */
.side-title { font: 700 11px/1 var(--ui); text-transform: uppercase; letter-spacing: .5px; color: var(--muted);
  margin: 10px 0 5px; }
.side-title:first-child { margin-top: 0; }
.side-row { display: flex; align-items: center; gap: 6px; padding: 3px 0; font-size: 12px; color: var(--ink); flex-wrap: wrap; }
.side-row .side-emoji { font-size: 14px; }
.side-row .side-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-row .side-n { color: var(--muted); font-size: 11px; }
/* Reliquary sidebar tap-to-expand (owner 2026-07-18): rows with a description open an inline
   detail on tap and retract on a second tap — hover titles don't exist on a phone */
.side-row.has-desc { cursor: pointer; border-radius: 7px; }
.side-row.has-desc .side-name { position: relative; padding-right: 13px; }
.side-row.has-desc .side-name::after { content: "ⓘ"; position: absolute; right: 0; top: 50%;
  transform: translateY(-50%); opacity: .55; font-weight: 400; font-size: 10px; }
.side-row.has-desc.open .side-name::after { content: "▴"; }
.side-row.has-desc:hover, .side-row.has-desc.open { background: color-mix(in srgb, var(--gold) 7%, transparent); }
.side-desc { flex: 1 1 100%; font-size: 11px; color: var(--ink-soft, var(--muted)); line-height: 1.45;
  padding: 4px 8px 5px; margin: 2px 0 3px; border-radius: 8px;
  background: color-mix(in srgb, var(--gold) 8%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--gold) 30%, var(--line)); }
.side-desc[hidden] { display: none; }
.side-empty { color: var(--muted); font-size: 11px; font-style: italic; padding: 2px 0 4px; }

/* =====================================================================
   POSTS — touch drag-to-place polish + type iconography (2026-06-27).
   Overrides the base Posts styles above for a flawless mobile/desktop feel.
   ===================================================================== */
/* HAND — comfortable, wrapping, thumb-reachable; cards capture touch-drag (no scroll-steal) */
.post-hand { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.post-mini { display: inline-flex; align-items: center; gap: 8px; background: var(--panel);
  border: 1px solid var(--line); border-left: 4px solid var(--r-common); border-radius: 11px;
  padding: 9px 11px; min-height: 46px; cursor: grab; color: var(--ink); font: 600 12.5px/1.1 var(--ui);
  touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  transition: transform .08s ease, box-shadow .12s ease, border-color .12s ease; }
.post-mini:active { cursor: grabbing; transform: scale(.97); }
.post-mini[data-rarity="Rare"] { border-left-color: var(--r-rare); }
.post-mini[data-rarity="Epic"] { border-left-color: var(--r-epic); }
.post-mini[data-rarity="Legendary"] { border-left-color: var(--r-legendary); }
.post-mini:not(:disabled):hover { border-color: color-mix(in srgb, var(--gold) 55%, var(--line)); box-shadow: 0 3px 12px var(--shadow); }
.post-mini:disabled { opacity: .4; cursor: default; }
.post-mini .pm-emoji { font-size: 20px; line-height: 1; }
.post-mini .pm-body { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; min-width: 0; }
.post-mini .pm-name { font-weight: 700; font-size: 13px; }
.post-mini .pm-n { color: var(--muted); font-size: 11px; align-self: flex-start; }

/* the floating drag GHOST */
.post-ghost { position: fixed; z-index: 30; transform: translate(-50%, -130%); pointer-events: none;
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 12px;
  background: color-mix(in srgb, var(--panel) 96%, transparent); border: 1px solid var(--gold);
  border-left: 4px solid var(--r-common); box-shadow: 0 10px 26px var(--shadow);
  font: 700 13px/1 var(--ui); color: var(--ink); white-space: nowrap; }
.post-ghost[data-rarity="Rare"] { border-left-color: var(--r-rare); }
.post-ghost[data-rarity="Epic"] { border-left-color: var(--r-epic); }
.post-ghost[data-rarity="Legendary"] { border-left-color: var(--r-legendary); }
.post-ghost .pg-ic { font-size: 17px; }
body.posts-dragging { cursor: grabbing; }
body.posts-dragging .feed { scroll-behavior: auto; }

/* the FEED becomes a drop zone while dragging a Post */
/* precision drop (owner 2026-07-18): the SEAM indicator is the star now — the whole-feed
   outline drops to a whisper so the insertion line reads as THE target, not the zone */
.feed.post-drop-zone { outline: 1px dashed color-mix(in srgb, var(--gold) 30%, transparent); outline-offset: -4px; }
.feed.post-drop-zone::after { content: "⤵ Drop between two posts to time it"; position: fixed; left: 50%; top: 38%;
  transform: translateX(-50%); z-index: 13; padding: 8px 16px; border-radius: 999px; pointer-events: none;
  background: color-mix(in srgb, var(--gold) 92%, #000); color: #fff; font: 700 13px/1 var(--ui);
  box-shadow: 0 8px 24px var(--shadow); }

/* TYPE ICONOGRAPHY badge — distinct per effect/type so every dropped Post reads at a glance */
.post-kind { display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: 999px;
  font: 700 9.5px/1.2 var(--ui); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap;
  border: 1px solid var(--line); background: color-mix(in srgb, var(--muted) 12%, var(--panel)); color: var(--muted); }
.post-kind .pk-ic { font-size: 11px; }
.post-kind[data-tone="dmg"]    { color: var(--bad);          background: color-mix(in srgb, var(--bad) 14%, var(--panel));        border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.post-kind[data-tone="heal"]   { color: var(--good);         background: color-mix(in srgb, var(--good) 16%, var(--panel));       border-color: color-mix(in srgb, var(--good) 40%, var(--line)); }
.post-kind[data-tone="shield"] { color: var(--r-rare);       background: color-mix(in srgb, var(--r-rare) 14%, var(--panel));     border-color: color-mix(in srgb, var(--r-rare) 40%, var(--line)); }
.post-kind[data-tone="charge"] { color: var(--gold);         background: color-mix(in srgb, var(--gold) 16%, var(--panel));       border-color: color-mix(in srgb, var(--gold) 40%, var(--line)); }
.post-kind[data-tone="buff"]   { color: var(--r-legendary);  background: color-mix(in srgb, var(--r-legendary) 16%, var(--panel)); border-color: color-mix(in srgb, var(--r-legendary) 40%, var(--line)); }
.post-kind[data-tone="xp"]     { color: var(--r-rare);       background: color-mix(in srgb, var(--r-rare) 13%, var(--panel));     border-color: color-mix(in srgb, var(--r-rare) 38%, var(--line)); }
.post-kind[data-tone="split"]  { color: var(--r-epic);       background: color-mix(in srgb, var(--r-epic) 14%, var(--panel));     border-color: color-mix(in srgb, var(--r-epic) 40%, var(--line)); }
.post-kind[data-tone="quest"]  { color: var(--r-epic);       background: color-mix(in srgb, var(--r-epic) 14%, var(--panel));     border-color: color-mix(in srgb, var(--r-epic) 40%, var(--line)); }
.post-kind[data-tone="weaken"] { color: var(--ink);          background: color-mix(in srgb, var(--ink) 9%, var(--panel)); }

/* placed-slot text: NAME + badge on one line, description ALWAYS clear + readable */
.post-slot .ps-name { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-weight: 700; font-size: 14px; }
.post-slot .ps-desc { color: var(--ink); opacity: .92; font-size: 12.5px; margin-top: 4px; line-height: 1.4; }
.post-slot .ps-meta { color: var(--muted); font-size: 10.5px; margin-top: 4px; }
/* board uses meter — same gold-ink mix as the in-feed pill's dots so the two meters read
   as one system; slightly larger + spaced so ●●○ doesn't dissolve into the meta fine print */
.post-slot .ps-uses { color: color-mix(in srgb, var(--gold) 72%, var(--ink));
  font-weight: 700; font-size: 11px; letter-spacing: 1px; white-space: nowrap; }
/* nudge the flavour emoji down a hair so its glyph optically aligns with the NAME row
   (its 24px box otherwise floats above the smaller name text in a flex-start row). */
.post-slot .ps-emoji { font-size: 24px; line-height: 1; margin-top: 2px; flex: 0 0 auto; }

/* ↑ ↓ ✕ controls — the primary way to reorder/remove a placed Post, so they need real
   touch targets (they rendered 28×22 before — a thumb-miss on a phone). Square ~30px,
   centred glyphs, with the ✕ given a touch of breathing room from the move pair. */
.post-slot .ps-ctrl { gap: 4px; flex: 0 0 auto; }
.ps-btn { display: inline-flex; align-items: center; justify-content: center;
  min-width: 30px; min-height: 30px; padding: 4px; font-size: 13px;
  transition: border-color .12s ease, background .12s ease, transform .08s ease; }
.ps-btn:not(:disabled):active { transform: scale(.92); }
.ps-btn.ps-x { margin-top: 2px; }   /* separate the destructive remove from the move pair */
.ps-btn.ps-answer { min-width: auto; padding: 4px 10px; }   /* text button keeps its label room */
@media (prefers-reduced-motion: reduce) { .ps-btn:not(:disabled):active { transform: none; } }

/* on a short mobile dock, keep the sidebar from shoving the hand/board off-screen:
   it drops BELOW and the dock body scrolls to it. Hand-first ordering does the heavy lifting. */
@media (max-width: 560px) {
  .posts-side { order: 3; }
  .post-mini { min-height: 48px; }   /* fat-finger target */
  .ps-btn { min-width: 34px; min-height: 34px; }   /* fuller thumb target on phones */
}

/* =====================================================================
   POSTS — motion & feedback polish (2026-06-27): make the board feel alive.
   Gentle, theme-token, reduced-motion-aware. Movement & clarity central.
   ===================================================================== */
/* a freshly placed / fused Post drops in with a soft gold settle */
.post-slot.just-placed { animation: ps-drop .42s cubic-bezier(.18,.9,.3,1.2) both; }
@keyframes ps-drop {
  0%   { opacity: 0; transform: translateY(10px) scale(.95); box-shadow: 0 0 0 0 color-mix(in srgb, var(--gold) 60%, transparent); }
  55%  { opacity: 1; box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 32%, transparent); }
  100% { opacity: 1; transform: none; box-shadow: 0 0 0 0 transparent; }
}
/* the FUSE connector is the headline emergent action — give it a slow attention pulse */
.fuse-link { animation: fuse-glow 2.4s ease-in-out infinite; }
@keyframes fuse-glow {
  0%,100% { box-shadow: 0 0 0 0 transparent; }
  50%     { box-shadow: 0 0 0 3px color-mix(in srgb, var(--r-epic) 22%, transparent); }
}
.post-link[data-harmful="1"] .fuse-link { animation-name: fuse-glow-harm; }
@keyframes fuse-glow-harm {
  0%,100% { box-shadow: 0 0 0 0 transparent; }
  50%     { box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 24%, transparent); }
}
/* two tag-sharing neighbours breathe softly so "neighbours interact" reads at a glance */
.post-slot[data-shared="1"] { animation: shared-breathe 3s ease-in-out infinite; }
@keyframes shared-breathe {
  0%,100% { box-shadow: 0 0 0 1px color-mix(in srgb, var(--gold) 30%, transparent) inset; }
  50%     { box-shadow: 0 0 0 2px color-mix(in srgb, var(--gold) 55%, transparent) inset; }
}
/* toast gets a small pop on entry (was a plain fade) */
.fx-toast.show { animation: toast-pop .22s ease-out; }
@keyframes toast-pop { 0% { transform: translate(-50%, 4px) scale(.96); } 60% { transform: translate(-50%, 0) scale(1.02); } 100% { transform: translate(-50%, 0) scale(1); } }

@media (prefers-reduced-motion: reduce) {
  .post-slot.just-placed, .fuse-link, .post-link[data-harmful="1"] .fuse-link,
  .post-slot[data-shared="1"], .fx-toast.show { animation: none; }
}

/* ---- Admin config panel (Settings → 🔧 Admin config, password 6673) ---- */
.admin-panel { margin-top: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 10px;
  background: color-mix(in srgb, var(--gold) 6%, var(--panel)); display: flex; flex-direction: column; gap: 4px; }
.admin-note { color: var(--muted); font-size: 11px; font-style: italic; margin-bottom: 4px; }
.admin-h { font: 700 11px/1 var(--ui); text-transform: uppercase; letter-spacing: .5px; color: var(--gold);
  margin: 9px 0 3px; padding-bottom: 3px; border-bottom: 1px solid var(--line); }
.admin-num { width: 52px; text-align: center; background: var(--bg2); color: var(--ink);
  border: 1px solid var(--line); border-radius: 7px; padding: 4px; font: 600 13px/1 var(--ui); }
.admin-presets, .admin-actions { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 2px; }
.admin-json { max-height: 220px; overflow: auto; margin-top: 8px; padding: 8px; border-radius: 8px;
  background: var(--bg2); border: 1px solid var(--line); color: var(--muted);
  font: 11px/1.4 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; white-space: pre; }
.btn.small.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); }
