/* The Druid Circle — Base Layout, Scenes, HUD, Intro City, Rune Cast & RPG Dock */
:root {
  --obsidian: #070b09;
  --forest: #0e1612;
  --panel: rgba(12, 19, 15, 0.94);
  --panel-solid: #0f1813;
  --stone: #1c2922;
  --stone-hi: #2e4337;
  --border: #485f4f;
  --border-gold: #c9923d;
  --gold: #eab154;
  --ember: #e07634;
  --moss: #5dd38e;
  --crimson: #e36161;
  --cyan: #57d6e6;
  --ink: #f1e8d6;
  --ink-dim: #b3aa97;
  --font-pixel: "Pixelify Sans", ui-monospace, monospace;
  --font-prose: "Literata", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --z-scene: 1;
  --z-embers: 6;
  --z-stones: 10;
  --z-hud: 20;
  --z-dock: 30;
  --z-tabbar: 45;
  --z-dropdown: 50;
  --z-modal: 70;
  --z-search-sheet: 82;
  --z-toast: 90;
  --mobile-tabbar-h: 58px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
button, a, input, select, textarea, [role="button"], .pill, .hud-btn, .rs-row, .ledger-row, .sb-row, .m-tab {
  touch-action: manipulation;
}
.gold { color: var(--gold); }
.moss { color: var(--moss); }
.crimson { color: var(--crimson); }
.dim { color: var(--ink-dim); }
html, body {
  margin: 0; padding: 0; height: 100%; width: 100%;
  background: var(--obsidian); color: var(--ink);
  font-family: var(--font-prose);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.stage {
  position: relative; width: 100vw; height: 100dvh;
  overflow: hidden; background: var(--obsidian);
  user-select: none;
}

.scene-layer {
  position: absolute; inset: 0;
  background-size: cover; background-position: center center;
  opacity: 0; transition: opacity 650ms cubic-bezier(0.22, 1, 0.36, 1);
  z-index: var(--z-scene);
  image-rendering: pixelated;
}
.scene-layer.active { opacity: 1; z-index: calc(var(--z-scene) + 1); }

/* Masked Elder Druid blink-only layer (crisp classic pixel frame snap, zero ghostly crossfade) */
.face-layer {
  position: absolute; inset: 0;
  background-size: cover; background-position: center center;
  opacity: 0; transition: opacity 45ms linear;
  z-index: calc(var(--z-scene) + 2); pointer-events: none;
  image-rendering: pixelated;
  -webkit-mask-image: radial-gradient(ellipse 13% 19% at 24.5% 27%, #000 62%, transparent 100%);
  mask-image: radial-gradient(ellipse 13% 19% at 24.5% 27%, #000 62%, transparent 100%);
}
.face-layer.show { opacity: 1; }

/* Crisp full-frame Elder Druid rare left-index-finger tap layer (pixel-locked to scene_03) */
.hand-layer {
  position: absolute; inset: 0;
  background-size: cover; background-position: center center;
  opacity: 0; transition: opacity 35ms linear;
  z-index: calc(var(--z-scene) + 2); pointer-events: none;
  image-rendering: pixelated;
}
.hand-layer.show { opacity: 1; }

/* Seam-free Fireside Druid facing-you focus (z=3) + per-druid clipped idle actions (z=4) so unfocused druids animate hands WHILE the active druid looks at you! */
.fireside-focus-layer {
  position: absolute; inset: 0;
  background-size: cover; background-position: center center;
  opacity: 0; transition: opacity 420ms ease-in-out;
  z-index: calc(var(--z-scene) + 2); pointer-events: none;
  image-rendering: pixelated;
}
.fireside-focus-layer.show { opacity: 1; }
.fireside-act-layer {
  position: absolute; inset: 0;
  background-size: cover; background-position: center center;
  opacity: 0; transition: opacity 180ms ease-in-out;
  z-index: calc(var(--z-scene) + 3); pointer-events: none;
  image-rendering: pixelated;
}
#fireside-act-scout  { clip-path: inset(0 61.5% 0 0); }
#fireside-act-keeper { clip-path: inset(0 35% 0 38.5%); }
#fireside-act-bard   { clip-path: inset(0 0 0 64%); }
.fireside-act-layer.show { opacity: 1; }
.scene-vignette {
  position: absolute; inset: 0; z-index: calc(var(--z-scene) + 4); pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(7,11,9,0.52) 0%, rgba(7,11,9,0.05) 18%, rgba(7,11,9,0.05) 58%, rgba(7,11,9,0.88) 92%, rgba(7,11,9,0.96) 100%);
}

#emberCanvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: var(--z-embers); pointer-events: none;
  image-rendering: pixelated;
}

/* Top minimal HUD bar */
.topbar {
  position: absolute; top: max(12px, env(safe-area-inset-top)); left: 16px; right: 16px;
  z-index: var(--z-hud);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.brand-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--panel); border: 2px solid var(--border);
  padding: 6px 12px; border-radius: 4px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.brand-name {
  font-family: var(--font-pixel); font-weight: 700; font-size: 17px;
  color: var(--gold); letter-spacing: 0.03em;
}
.ogham-mark { font-family: var(--font-mono); color: var(--moss); font-size: 13px; opacity: 0.9; }
.hud-group { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.hud-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--panel); border: 2px solid var(--border);
  padding: 6px 11px; border-radius: 4px;
  font-family: var(--font-mono); font-size: 12px; color: var(--ink);
}
.hud-chip .dim { color: var(--ink-dim); }
.hud-chip .gold { color: var(--gold); font-weight: 600; }
.hud-chip .moss { color: var(--moss); font-weight: 600; }
.hud-chip .crimson { color: var(--crimson); font-weight: 600; }
.hud-btn {
  background: var(--panel); border: 2px solid var(--border);
  color: var(--ink); font-family: var(--font-pixel); font-size: 14px;
  padding: 6px 11px; border-radius: 4px; cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
  white-space: nowrap;
}
.hud-btn:hover { border-color: var(--gold); color: var(--gold); background: #16221b; }
.hud-btn.accent { border-color: var(--border-gold); color: var(--gold); }

/* Single Large Runestone & Clickable Circle Druids on Scene 03 (Desktop) */
.stones-layer {
  position: absolute; inset: 0; z-index: var(--z-stones);
  pointer-events: none;
  opacity: 0; transition: opacity 400ms ease;
}
.stones-layer.visible { opacity: 1; }
.runestone-monolith {
  position: absolute; transform: translate(-50%, -50%);
  pointer-events: auto; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: transparent; border: none; padding: 8px;
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
}
.runestone-monolith:hover { transform: translate(-50%, -54%) scale(1.04); }
.monolith-glyph {
  width: 38px; height: 92px; border-radius: 9px 9px 3px 3px;
  display: flex; align-items: center; justify-content: center;
  writing-mode: vertical-rl; font-family: var(--font-mono); font-size: 16px;
  letter-spacing: 3px;
  border: 2px solid var(--gold);
  background: rgba(14, 22, 17, 0.78);
  color: var(--gold);
  box-shadow: 0 0 18px rgba(234, 177, 84, 0.45);
  transition: all 180ms ease;
}
.runestone-monolith.profit .monolith-glyph {
  border-color: var(--moss); color: var(--moss);
  box-shadow: 0 0 20px rgba(93, 211, 142, 0.5);
}
.runestone-monolith.loss .monolith-glyph {
  border-color: var(--crimson); color: var(--crimson);
  box-shadow: 0 0 20px rgba(227, 97, 97, 0.48);
}
.stone-plaque {
  background: rgba(10, 16, 13, 0.94); border: 2px solid var(--border-gold);
  padding: 5px 11px; border-radius: 4px; white-space: nowrap;
  font-family: var(--font-mono); font-size: 11.5px; color: var(--ink);
  display: flex; align-items: center; gap: 8px;
}
.plaque-sym { font-weight: 700; color: var(--gold); }
.plaque-side { font-size: 10px; padding: 1px 5px; border-radius: 2px; background: #213027; color: var(--ink); }
.plaque-side.short, .plaque-side.put { background: #3b1c1c; color: #f6a4a4; }
.plaque-side.long, .plaque-side.call { background: #163624; color: #9cf0be; }
.plaque-pnl.pos { color: var(--moss); font-weight: 600; }
.plaque-pnl.neg { color: var(--crimson); font-weight: 600; }

/* Clickable Circle Druids seated around the fire */
.druid-npc {
  position: absolute; transform: translate(-50%, -50%);
  pointer-events: auto; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  background: transparent; border: none; padding: 10px 8px;
  transition: transform 180ms ease;
}
.druid-npc:hover { transform: translate(-50%, -56%); }
.npc-ring {
  width: 34px; height: 34px; border-radius: 50%;
  border: 2px solid rgba(234, 177, 84, 0.55);
  background: rgba(15, 24, 19, 0.55);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 14px; color: var(--gold);
  transition: all 160ms ease;
}
.druid-npc:hover .npc-ring, .druid-npc.talking .npc-ring {
  border-color: var(--gold); background: rgba(234, 177, 84, 0.22);
  box-shadow: 0 0 14px rgba(234, 177, 84, 0.5);
}
.npc-tag {
  background: rgba(10, 16, 13, 0.93); border: 1px solid var(--border);
  padding: 3px 8px; border-radius: 4px; white-space: nowrap;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  opacity: 0.9; transition: all 150ms ease;
}
.npc-tag .npc-name {
  font-family: var(--font-pixel); font-size: 12px; color: var(--ink); line-height: 1.15;
}
.npc-tag .npc-role {
  font-family: var(--font-mono); font-size: 9.5px; color: var(--ink-dim); line-height: 1.15;
}
.druid-npc:hover .npc-tag, .druid-npc.talking .npc-tag {
  opacity: 1; border-color: var(--gold);
}
.druid-npc:hover .npc-tag .npc-name, .druid-npc.talking .npc-tag .npc-name {
  color: var(--gold);
}

.mobile-stones-strip { display: none; }

/* Intro City Real iPhone Prop (Desktop: sleek tall titanium iPhone) */
.city-phone {
  position: absolute; right: clamp(24px, 6vw, 82px); top: 47%; transform: translateY(-54%);
  z-index: var(--z-stones); width: 258px; height: auto; min-height: 468px;
  background: linear-gradient(160deg, #0d111a 0%, #070a10 100%);
  border: 4px solid #3c4659; border-radius: 36px;
  padding: 12px 13px 10px; display: none;
  box-shadow:
    0 0 0 1px #141923,
    inset 0 0 0 2px #04060a,
    0 22px 54px rgba(0, 0, 0, 0.82),
    0 0 28px rgba(87, 214, 230, 0.14);
}
.phone-search-row {
  display: flex; align-items: center; gap: 5px;
  background: #090d14; border: 1px solid #263147; border-radius: 8px;
  padding: 5px 8px; margin-bottom: 7px;
}
.phone-search-row span { font-family: var(--font-mono); font-size: 11px; color: #57d6e6; }
.phone-search-inp {
  flex: 1; min-width: 0; background: transparent; border: none; outline: none;
  color: #e9f1ff; font-family: var(--font-mono); font-size: 11.5px;
}
.phone-search-inp::placeholder { color: #5c6c88; }
.phone-go-wild {
  width: 100%; margin: 0 0 8px; padding: 7px 8px; border-radius: 8px; cursor: pointer;
  background: linear-gradient(180deg, #e5ba6b, #c58e3d); color: #120d06;
  border: 1px solid #f5d896; font-family: var(--font-pixel); font-size: 11.5px; font-weight: 700;
  text-align: center;
}
.phone-go-wild:hover { filter: brightness(1.07); }
.city-phone::before {
  content: ""; position: absolute; left: -6px; top: 96px;
  width: 3px; height: 34px; background: #4a566d; border-radius: 2px 0 0 2px;
  box-shadow: 0 44px 0 #4a566d;
}
.city-phone::after {
  content: ""; position: absolute; right: -6px; top: 118px;
  width: 3px; height: 52px; background: #4a566d; border-radius: 0 2px 2px 0;
}
.city-phone.visible { display: flex; flex-direction: column; animation: riseIn 380ms cubic-bezier(0.22, 1, 0.36, 1); }
.phone-status {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono); font-size: 10px; color: #c7d4ea;
  margin-bottom: 8px; padding: 0 4px; position: relative;
}
.phone-island {
  width: 72px; height: 18px; background: #020305; border-radius: 99px;
  border: 1px solid #1b2230;
  position: absolute; left: 50%; transform: translateX(-50%); top: -2px;
  display: flex; align-items: center; justify-content: flex-end; padding-right: 6px;
}
.phone-island::after {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #2e5d8f, #09111d);
}
.phone-app-bar {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono); font-size: 10.5px; color: #7e8da8;
  border-bottom: 1px solid #1a2232; padding-bottom: 6px; margin-bottom: 8px;
}
.phone-app-bar .live-dot { color: var(--cyan); font-weight: 700; }
.phone-ticker { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 2px; }
.phone-ticker strong { font-family: var(--font-mono); font-size: 20px; color: #f2f6ff; letter-spacing: -0.02em; }
.phone-ticker span { font-family: var(--font-mono); font-size: 10.5px; color: var(--crimson); font-weight: 600; }
.phone-subline { font-family: var(--font-mono); font-size: 10.5px; color: #7e8da8; margin-bottom: 7px; }
.phone-chart {
  height: 54px; width: 100%; background: #080c13; border: 1px solid #1b2333;
  border-radius: 8px; padding: 5px; margin-bottom: 8px; position: relative; overflow: hidden;
}
.phone-chart svg { width: 100%; height: 100%; display: block; }
.phone-reject {
  background: rgba(227, 97, 97, 0.14); border: 1px solid var(--crimson);
  border-radius: 8px; padding: 8px 9px; margin: 0 0 8px;
  font-family: var(--font-mono); font-size: 10.5px; color: #ffb6b6; line-height: 1.4;
}
.phone-reject strong { display: block; color: var(--crimson); font-size: 11.5px; margin-bottom: 3px; letter-spacing: 0.02em; }
.phone-disabled-cta {
  width: 100%; background: #191f2b; border: 1px solid #2b3549; color: #5b6880;
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 700;
  padding: 7px 8px; border-radius: 8px; text-align: center;
  margin-bottom: 7px; cursor: not-allowed; letter-spacing: 0.03em;
}
.phone-tabs { display: flex; gap: 6px; margin-top: 0; }
.phone-tab {
  flex: 1; background: #141a26; border: 1px solid #283347; color: #9eb0cc;
  font-family: var(--font-mono); font-size: 10.5px; padding: 6px 5px;
  border-radius: 7px; cursor: pointer;
}
.phone-tab.active { border-color: var(--cyan); color: #eef5ff; background: #1b273a; font-weight: 600; }
.phone-homebar {
  width: 86px; height: 4px; background: #475369; border-radius: 99px;
  margin: 10px auto 0;
}

/* Rune Cast Results Overlay — 3 Clickable Triad Plaques pinned directly above each landed stave */
.runes-stage {
  position: absolute; inset: 0;
  z-index: var(--z-stones); display: none;
  pointer-events: none;
}
.runes-stage.visible { display: block; }
.casting-banner-wrap {
  position: absolute; left: 50%; top: 15%; transform: translateX(-50%);
  pointer-events: none;
}
@keyframes runePinRise {
  from { opacity: 0; transform: translate(-50%, calc(-100% + 10px)); }
  to   { opacity: 1; transform: translate(-50%, -100%); }
}
.rune-pin {
  position: absolute; transform: translate(-50%, -100%);
  pointer-events: auto; cursor: pointer;
  background: rgba(9, 16, 12, 0.94); border: 2px solid var(--border-gold);
  border-radius: 5px; padding: 9px 13px; min-width: 196px; max-width: 265px;
  text-align: left; color: var(--ink);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.72), 0 0 18px rgba(234, 177, 84, 0.16);
  animation: runePinRise 340ms cubic-bezier(0.22, 1, 0.36, 1) both;
  transition: border-color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}
.rune-pin:hover, .rune-pin.selected {
  border-color: var(--gold);
  transform: translate(-50%, calc(-100% - 4px));
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.8), 0 0 24px rgba(234, 177, 84, 0.38);
}
.rune-pin::after {
  content: ""; position: absolute; left: 50%; top: 100%; transform: translateX(-50%);
  width: 2px; height: 18px;
  background: linear-gradient(to bottom, var(--gold), rgba(234, 177, 84, 0.08));
  pointer-events: none;
}
.stave-hitbox {
  position: absolute; transform: translate(-50%, -50%);
  width: 118px; height: 64px; border-radius: 50%;
  background: transparent; border: none; cursor: pointer;
  pointer-events: auto;
}
.stave-hitbox:hover {
  background: radial-gradient(circle, rgba(234, 177, 84, 0.16) 0%, transparent 72%);
}
.rune-pin .rc-head {
  display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 4px;
  font-family: var(--font-pixel); font-size: 13px; color: var(--gold);
}
.rune-pin .rc-glyph { font-family: var(--font-mono); color: var(--moss); font-size: 14px; margin-right: 4px; }
.rune-pin .rc-tap { font-family: var(--font-mono); font-size: 9.5px; color: var(--ink-dim); opacity: 0.85; }
.rune-pin .rc-big {
  font-family: var(--font-mono); font-size: 15.5px; font-weight: 700;
  color: var(--ink); line-height: 1.25; margin-bottom: 3px; letter-spacing: -0.02em;
}
.rune-pin .rc-big .gold { color: var(--gold); }
.rune-pin .rc-big .moss { color: var(--moss); }
.rune-pin .rc-val { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-dim); line-height: 1.4; }
.rune-pin.warn { border-color: var(--ember); }
.rune-pin.warn .rc-head { color: #f6b078; }
.rune-inspect-drawer {
  margin-bottom: 9px; padding: 10px 13px; background: #09110c;
  border: 1px solid var(--border-gold); border-radius: 4px;
  font-family: var(--font-prose); font-size: 13.5px; color: var(--ink); line-height: 1.5;
}
.rune-inspect-drawer strong { color: var(--gold); font-family: var(--font-pixel); font-size: 14px; }
.rune-inspect-drawer .ri-meta { font-family: var(--font-mono); font-size: 11.5px; color: var(--moss); margin-top: 4px; }
.casting-banner {
  background: rgba(10, 16, 13, 0.92); border: 2px solid var(--border-gold);
  padding: 10px 18px; border-radius: 4px;
  font-family: var(--font-pixel); font-size: 16px; color: var(--gold);
  display: flex; align-items: center; gap: 10px; text-align: center;
}
.pulse-dot {
  width: 10px; height: 10px; background: var(--gold); border-radius: 2px; flex-shrink: 0;
  animation: pulseGlow 900ms infinite ease-in-out;
}

/* Fireside closeup active-speaker highlight */
.fireside-npc {
  position: absolute; transform: translate(-50%, -50%);
  pointer-events: auto; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: transparent; border: none; padding: 14px 12px;
  transition: transform 180ms ease;
}
.fireside-npc:hover { transform: translate(-50%, -55%); }
.fireside-npc .fn-badge {
  background: rgba(9, 15, 12, 0.9); border: 2px solid var(--border);
  padding: 4px 10px; border-radius: 4px; white-space: nowrap;
  font-family: var(--font-pixel); font-size: 13.5px; color: var(--ink);
  transition: all 150ms ease;
}
.fireside-npc:hover .fn-badge, .fireside-npc.talking .fn-badge {
  border-color: var(--gold); color: var(--gold);
  background: rgba(24, 34, 24, 0.96);
  box-shadow: 0 0 18px rgba(234, 177, 84, 0.42);
}
.fireside-npc .fn-sub {
  font-family: var(--font-mono); font-size: 10px; color: var(--ink-dim);
  background: rgba(9, 15, 12, 0.82); padding: 2px 7px; border-radius: 3px;
}

/* Bottom RPG Dialogue & Control Dock */
.dock {
  position: absolute; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  width: min(1040px, calc(100vw - 24px));
  z-index: var(--z-dock);
  background: var(--panel);
  border: 2px solid var(--border-gold);
  border-radius: 5px;
  padding: 14px 18px 15px;
  box-shadow: inset 0 1px 0 rgba(255, 224, 160, 0.16), 0 8px 24px rgba(0,0,0,0.65);
}
.dock-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.speaker-tag {
  font-family: var(--font-pixel); font-size: 15px; font-weight: 700;
  color: var(--gold); letter-spacing: 0.04em;
  display: inline-flex; align-items: center; gap: 8px;
}
.speaker-sub { font-family: var(--font-mono); font-size: 11px; color: var(--ink-dim); }
.dialogue-text {
  font-family: var(--font-prose); font-size: 15.5px; line-height: 1.5;
  color: var(--ink); margin: 0 0 11px; max-width: 78ch;
}
.dialogue-text em { color: var(--gold); font-style: normal; font-weight: 600; }
.dialogue-text .good { color: var(--moss); font-weight: 600; }
.dialogue-text .bad { color: var(--crimson); font-weight: 600; }

.controls-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.search-wrap { position: relative; flex: 1 1 300px; min-width: 220px; }
.term-box {
  display: flex; align-items: center; gap: 8px;
  background: #080e0a; border: 2px solid var(--border);
  border-radius: 4px; padding: 0 11px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.term-box:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(234, 177, 84, 0.16);
}
.term-box.locked { border-color: var(--moss); }
.term-prompt {
  font-family: var(--font-mono); font-weight: 700; font-size: 14px;
  color: var(--gold); flex-shrink: 0; user-select: none;
}
.term-box.locked .term-prompt { color: var(--moss); }
.term-input {
  width: 100%; background: transparent; border: none;
  color: var(--ink); font-family: var(--font-mono); font-size: 13.5px;
  padding: 10px 0; outline: none;
}
.term-input::placeholder { color: #7e9083; }
.term-hint {
  font-family: var(--font-mono); font-size: 10.5px; color: #7e9083;
  white-space: nowrap; flex-shrink: 0;
}
.field-input {
  width: 100%; background: #0a110d; border: 2px solid var(--border);
  color: var(--ink); font-family: var(--font-mono); font-size: 13.5px;
  padding: 10px 12px; border-radius: 4px; outline: none;
}
.field-input::placeholder { color: #8c9c90; }
.field-input:focus { border-color: var(--gold); }
.search-menu {
  position: absolute; left: 0; right: 0; bottom: calc(100% + 6px);
  background: #0b130f; border: 2px solid var(--border-gold);
  border-radius: 4px; max-height: 270px; overflow-y: auto;
  z-index: var(--z-dropdown); display: none;
  box-shadow: 0 -12px 30px rgba(0, 0, 0, 0.72);
}
.search-menu.open { display: block; }
.search-menu-foot {
  padding: 5px 12px; background: #070d0a; border-top: 1px solid #1e2d24;
  font-family: var(--font-mono); font-size: 10.5px; color: #8c9c90;
  display: flex; justify-content: space-between;
}
.search-item {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 9px 12px; cursor: pointer; border-bottom: 1px solid #1d2b22;
  font-family: var(--font-mono); font-size: 12px; border-left: 3px solid transparent;
}
.search-item:hover, .search-item.focused { background: #192920; border-left-color: var(--gold); }
.search-item.disabled { opacity: 0.55; cursor: not-allowed; }
.search-item.disabled:hover { background: transparent; border-left-color: transparent; }
.search-item .si-sym { font-weight: 700; color: var(--gold); }
.search-item .si-name { color: var(--ink-dim); margin-left: 6px; font-size: 11px; }
.search-item .si-meta { color: var(--moss); font-size: 11.5px; text-align: right; flex-shrink: 0; }
.search-item.disabled .si-meta { color: #8e968f; font-size: 10.5px; max-width: 52%; }

/* Anointing 4-choice FRWC × Druid name grid */
.anoint-grid {
  display: grid; grid-template-columns: repeat(2, minmax(180px, 1fr)); gap: 7px;
  margin: 9px 0 10px;
}
.anoint-card {
  text-align: left; background: #0c1410; border: 2px solid var(--border);
  border-radius: 4px; padding: 9px 11px; cursor: pointer;
  transition: all 140ms ease; display: flex; align-items: center; gap: 8px;
}
.anoint-card:hover { border-color: var(--gold); background: #15211a; }
.anoint-card.active { border-color: var(--gold); background: #1f2e22; box-shadow: inset 0 0 0 1px rgba(234,177,84,0.3); }
.anoint-card .ac-glyph { font-family: var(--font-mono); color: var(--moss); font-size: 14px; }
.anoint-card .ac-name { font-family: var(--font-pixel); font-size: 14.5px; color: var(--ink); }
.anoint-card.active .ac-name { color: var(--gold); }

.quick-coins { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.quick-label { font-family: var(--font-mono); font-size: 11px; color: var(--ink-dim); margin-right: 3px; }
.pill {
  background: #142019; border: 1px solid var(--border);
  color: var(--ink); font-family: var(--font-mono); font-size: 12px;
  padding: 5px 10px; border-radius: 3px; cursor: pointer;
  transition: all 120ms ease; display: inline-flex; align-items: center; gap: 5px;
}
.pill .pmcap { color: var(--ink-dim); font-size: 10.5px; }
.pill:hover { border-color: var(--gold); color: var(--gold); }
.pill.active { background: #263628; border-color: var(--gold); color: var(--gold); font-weight: 700; }
.pill.active .pmcap { color: #d8c298; }

.wager-grid {
  display: grid; grid-template-columns: repeat(4, minmax(140px, 1fr)); gap: 7px;
  margin: 9px 0;
}
.wager-btn {
  text-align: left; background: #101914; border: 2px solid var(--border);
  border-radius: 4px; padding: 8px 10px; cursor: pointer;
  transition: all 120ms ease;
}
.wager-btn:hover { border-color: var(--stone-hi); background: #16221b; }
.wager-btn.active { border-color: var(--gold); background: #1c291f; }
.wager-btn.active.down { border-color: var(--crimson); background: #261617; }
.wager-btn.active.up { border-color: var(--moss); background: #14261c; }
.wager-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.wager-btn .wb-title { display: block; font-family: var(--font-pixel); font-size: 14px; color: var(--ink); }
.wager-btn .wb-sub { display: block; font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-dim); margin-top: 2px; }

.btn-primary {
  background: var(--gold); border: 2px solid #f7d083;
  color: #120d06; font-family: var(--font-pixel); font-weight: 700; font-size: 16px;
  padding: 10px 18px; border-radius: 4px; cursor: pointer;
  transition: transform 120ms ease, background 120ms ease; white-space: nowrap;
}
.btn-primary:hover { background: #f2be64; transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-secondary {
  background: #16221b; border: 2px solid var(--border);
  color: var(--ink); font-family: var(--font-pixel); font-size: 14.5px;
  padding: 9px 13px; border-radius: 4px; cursor: pointer; white-space: nowrap;
}
.btn-secondary:hover { border-color: var(--gold); color: var(--gold); }
.btn-danger {
  background: #3d1818; border: 2px solid var(--crimson);
  color: #ffd0d0; font-family: var(--font-pixel); font-size: 14.5px;
  padding: 9px 13px; border-radius: 4px; cursor: pointer; white-space: nowrap;
}
.btn-danger:hover { background: #541f1f; }

.offer-summary {
  display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center;
  background: #0a110d; border: 1px solid var(--border);
  border-radius: 4px; padding: 9px 12px; margin-bottom: 9px;
  font-family: var(--font-mono); font-size: 12px;
}
.offer-stat { display: flex; flex-direction: column; gap: 2px; }
.offer-stat .os-k { font-size: 10px; color: var(--ink-dim); text-transform: uppercase; letter-spacing: 0.05em; }
.offer-stat .os-v { font-size: 14px; font-weight: 700; color: var(--ink); }
.offer-stat .os-v.gold { color: var(--gold); }
.offer-stat .os-v.moss { color: var(--moss); }
.offer-stat .os-v.crimson { color: var(--crimson); }

.selected-coin-bar {
  display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 12px; color: var(--ink-dim);
}
.selected-coin-bar strong { color: var(--gold); }
.selected-coin-bar .mtag { color: var(--moss); }

.math-link {
  background: none; border: none; color: var(--ink-dim); font-family: var(--font-mono);
  font-size: 11px; text-decoration: underline; cursor: pointer; padding: 0;
}
.math-link:hover { color: var(--gold); }
.math-drawer {
  margin-bottom: 9px; padding: 8px 11px; background: #09100c;
  border: 1px solid #2b3c31; border-radius: 4px;
  font-family: var(--font-mono); font-size: 11px; color: var(--ink-dim); line-height: 1.45;
}

