:root {
  --bg-0: #060505;
  --bg-1: #150f0d;
  --bg-2: #261a16;
  --panel: rgba(23, 16, 14, 0.92);
  --panel-soft: rgba(30, 20, 17, 0.82);
  --panel-deep: rgba(11, 8, 7, 0.97);
  --ink: #f4ead1;
  --ink-soft: #cab89c;
  --line: rgba(245, 214, 169, 0.12);
  --line-strong: rgba(245, 196, 120, 0.28);
  --sun: #eeb76a;
  --coral: #ea7d63;
  --jade: #77d0a8;
  --wine: #6e3146;
  --shadow-soft: 0 18px 40px rgba(0, 0, 0, 0.28);
  --shadow-hard: 0 34px 74px rgba(0, 0, 0, 0.46);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% -10%, rgba(238, 183, 106, 0.08), transparent 36%),
    linear-gradient(180deg, var(--bg-0), var(--bg-1) 34%, var(--bg-2));
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  background:
    linear-gradient(90deg, transparent 0, rgba(255, 240, 214, 0.03) 50%, transparent 100%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.012) 0px, rgba(255, 255, 255, 0.012) 1px, transparent 1px, transparent 36px);
}

body::after {
  background:
    linear-gradient(180deg, rgba(255, 247, 230, 0.04), transparent 18%, transparent 84%, rgba(0, 0, 0, 0.2));
}

.hidden {
  display: none !important;
}

.sanctum {
  width: min(1540px, 100%);
  margin: 0 auto;
  padding: 18px;
}

.altar {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(32, 21, 18, 0.94), rgba(12, 8, 7, 0.98));
  box-shadow: var(--shadow-hard);
  display: grid;
  gap: 16px;
}

.altar-top {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
}

.title-cluster {
  display: grid;
  gap: 4px;
}

.title-kicker {
  color: var(--sun);
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.title-cluster h1 {
  margin: 0;
  font-size: 2.4rem;
  font-weight: 900;
}

.status-ribbon {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.status-ribbon-item,
.oracle-band,
.archive-band,
.codex-band,
.meter-node,
.header-readout,
.engine-tag,
.ritual-module,
.ritual-toggle,
.vault-banner {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel-soft), var(--panel-deep));
  box-shadow: inset 0 1px 0 rgba(255, 245, 221, 0.04), var(--shadow-soft);
}

.status-ribbon-item {
  min-width: 122px;
  padding: 8px 10px;
  border-radius: 6px;
  display: grid;
  gap: 2px;
}

.status-ribbon-item span,
.meter-node span,
.header-readout span,
.summary-grid span,
.sim-grid span,
.ritual-module span,
.ritual-toggle span,
#spinLogStatus,
.engine-tag {
  color: var(--ink-soft);
  text-transform: uppercase;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

button,
select {
  font: inherit;
}

button {
  min-height: 58px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 10px 14px;
  font-weight: 900;
  color: #1e1208;
  cursor: pointer;
  transition: transform 0.16s ease, filter 0.16s ease;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

button:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

#spinBtn:not(.img-btn) {
  background: linear-gradient(180deg, #f4c978, #d48739);
}

#buyFreeBtn:not(.img-btn) {
  background: linear-gradient(180deg, #82d7b9, #458f6d);
}

#simulateBtn,
#simulateBonusBtn,
#rulesBtn,
#rulesPrevBtn,
#rulesNextBtn,
#rulesCloseBtn {
  background: linear-gradient(180deg, #ecdcb7, #b89c6d);
}

.altar-core {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr) 340px;
  gap: 16px;
  align-items: start;
}

/* Public (player) mode — fullscreen single-viewport game. Hides every admin
   panel and locks the layout to 100vw × 100vh with no scroll. */
body.public-mode .admin-only {
  display: none !important;
}

html:has(body.public-mode),
body.public-mode {
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}

body.public-mode .sanctum {
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  max-height: 100vh;
  padding: 0;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

body.public-mode .altar {
  width: min(100vw, 1040px);
  max-width: 1040px;
  height: 100vh;
  max-height: 100vh;
  margin: 0 auto;
  border-radius: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 8px;
  padding: 8px 18px 10px;
  overflow: hidden;
}

body.public-mode .vault-shell {
  width: min(100%, 920px);
  margin: 0 auto;
}

body.public-mode .vault-window {
  min-height: 0;
  height: 100%;
  width: 100%;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 8px;
  margin: 0 auto;
}

body.public-mode .img-btn-spin {
  justify-self: center;
  align-self: center;
}

body.public-mode .reels-stage {
  width: 100%;
  height: 100%;
  min-height: 0;
  max-width: 100%;
  aspect-ratio: 6 / 5;
  margin: 0 auto;
}

body.public-mode .altar-top {
  padding: 4px 0 2px;
  min-height: 0;
}

body.public-mode .title-cluster .title-kicker { display: none; }
body.public-mode .title-cluster h1 {
  font-size: 1.05rem;
  letter-spacing: 0.18em;
  margin: 0;
}

body.public-mode .status-ribbon {
  gap: 8px;
}
body.public-mode .status-ribbon-item {
  padding: 4px 10px;
  font-size: 0.74rem;
}

body.public-mode .altar-core {
  grid-template-columns: 1fr;
  height: 100%;
  min-height: 0;
  align-items: stretch;
}

body.public-mode .vault-shell {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 8px;
}

body.public-mode .reels-canvas {
  width: 100% !important;
  height: 100% !important;
}

/* Spin is centered by the deck's 3-column "1fr auto 1fr" layout — the auto
   middle is Spin, with deck-left (bet+ante) and deck-right (buy) flanking
   it at equal weight. */

/* HUD bar above the reels — Balance / Bet / Win / Free Spins / Multiplier
   in a compact, glassy strip that mimics production-slot top HUDs. */
.hud-bar {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(170, 210, 255, 0.18);
  background: linear-gradient(180deg, rgba(20, 28, 50, 0.74), rgba(8, 12, 24, 0.86));
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
}

.hud-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 0;
}

.hud-node span {
  font: 700 0.62rem/1 "SF Pro Display", "Segoe UI", sans-serif;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #8aa0c2;
}

.hud-node strong {
  font: 800 1.1rem/1 "SF Pro Display", "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums;
  color: #f4f7ff;
  letter-spacing: 0.01em;
}

.hud-node-multi strong {
  color: #ffe28a;
  text-shadow: 0 0 12px rgba(255, 226, 138, 0.45);
}

.hud-node-bonus strong {
  color: #ffd86f;
  text-shadow: 0 0 12px rgba(255, 216, 111, 0.5);
}

.hud-node-spins strong {
  color: #9be7ff;
  text-shadow: 0 0 10px rgba(155, 231, 255, 0.4);
}

.hud-node.hidden {
  display: none;
}

/* Bonus-only nodes (bonus total / free spins / persistent multiplier) are
   visible in both player and admin views so the player can always see the
   running bonus state. The general hud-bar still shows everywhere. */

.oracle-panel,
.archive-panel {
  display: grid;
  gap: 10px;
}

.oracle-band,
.archive-band,
.codex-band {
  border-radius: 6px;
  padding: 12px;
}

.band-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.band-head h2,
.oracle-band h2,
.archive-band h2,
.codex-band h2,
.codex-band h3 {
  margin: 0;
}

.meter-pair,
.summary-grid,
.sim-grid {
  display: grid;
  gap: 8px;
}

.meter-pair,
.summary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.meter-node {
  min-height: 74px;
  border-radius: 6px;
  padding: 10px;
  display: grid;
  align-content: center;
  gap: 4px;
}

.meter-node strong {
  font-size: 1.04rem;
}

.meter-node-multi strong {
  color: #ffd891;
}

.summary-grid > div,
.sim-grid > div {
  border: 1px solid rgba(245, 214, 169, 0.08);
  border-radius: 6px;
  padding: 8px;
  background: rgba(255, 247, 231, 0.02);
}

.summary-grid strong,
.sim-grid strong {
  display: block;
  margin-top: 4px;
  font-size: 0.96rem;
}

.spin-log-list,
#caughtLines,
#lineExamples,
.rules-list {
  margin: 0;
  padding-left: 18px;
}

.test-lab-copy {
  margin: 0 0 10px;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.test-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.test-actions button {
  min-height: 40px;
  padding: 8px 10px;
  font-size: 0.82rem;
}

.test-actions-crazy {
  grid-template-columns: 1fr;
}

.crazy-toggle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 120, 80, 0.55);
  background: linear-gradient(180deg, rgba(60, 12, 16, 0.85), rgba(28, 4, 8, 0.95));
  color: #ffd9c8;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.82rem;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 200ms ease, border-color 200ms ease, color 200ms ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 200, 160, 0.12);
}
.crazy-toggle:hover { transform: translateY(-1px); }
.crazy-toggle .crazy-toggle-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 80, 60, 0.18);
  border: 1px solid rgba(255, 130, 100, 0.45);
  color: #ffb098;
  font-size: 0.72rem;
}
.crazy-toggle.is-on {
  color: #fff7e6;
  border-color: rgba(255, 200, 100, 0.85);
  background: linear-gradient(180deg, rgba(180, 30, 30, 0.9), rgba(80, 8, 8, 0.95));
  box-shadow: 0 6px 22px rgba(255, 80, 60, 0.45), inset 0 1px 0 rgba(255, 240, 200, 0.18);
  animation: crazyPulse 1.4s ease-in-out infinite;
}
.crazy-toggle.is-on .crazy-toggle-state {
  background: linear-gradient(180deg, #ffe089, #ff9a3c);
  border-color: rgba(255, 220, 120, 0.85);
  color: #4a1c00;
  text-shadow: 0 1px 0 rgba(255, 240, 180, 0.6);
}

@keyframes crazyPulse {
  0%, 100% { box-shadow: 0 6px 22px rgba(255, 80, 60, 0.45), inset 0 1px 0 rgba(255, 240, 200, 0.18); }
  50% { box-shadow: 0 10px 30px rgba(255, 140, 60, 0.65), inset 0 1px 0 rgba(255, 240, 200, 0.28); }
}

/* Crazy-mode accent: a thin OUTER glow on the vault frame only — never
   covers reels, buttons, or HUD. No inset fills, no full-viewport pseudo. */
body.crazy-mode-on .vault-window {
  box-shadow: 0 0 0 1px rgba(255, 120, 80, 0.55), 0 0 18px rgba(255, 90, 60, 0.25);
}

.win-chip {
  position: fixed;
  z-index: 9500;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.6);
  opacity: 0;
  padding: 6px 14px;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: #fff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.55);
  background: linear-gradient(180deg, #4fd17d, #1a8c46);
  box-shadow: 0 8px 24px rgba(50, 200, 110, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.25) inset;
  will-change: transform, opacity;
}
.win-chip[data-tier="great"] {
  background: linear-gradient(180deg, #ffd86f, #d29520);
  box-shadow: 0 10px 28px rgba(255, 200, 80, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.3) inset;
  font-size: 1.18rem;
}
.win-chip[data-tier="medium"] {
  background: linear-gradient(180deg, #6ed0ff, #2f6fd0);
  box-shadow: 0 9px 26px rgba(96, 180, 255, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.28) inset;
}
.win-chip.is-rising {
  animation: winChipRise 220ms cubic-bezier(0.2, 0.9, 0.3, 1) forwards;
}
.win-chip.is-flying {
  animation: winChipFly 360ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes winChipRise {
  0% { transform: translate(-50%, -50%) scale(0.85); opacity: 0; }
  100% { transform: translate(-50%, -75%) scale(1.0); opacity: 1; }
}
@keyframes winChipFly {
  0% { transform: translate(-50%, -75%) scale(1.0); opacity: 1; }
  100% { transform: translate(calc(-50% + var(--to-x)), calc(-75% + var(--to-y))) scale(0.55); opacity: 0; }
}
@keyframes winMeterPulse {
  0% { transform: scale(1); }
  35% { transform: scale(1.08); filter: drop-shadow(0 0 6px rgba(255, 230, 130, 0.5)); }
  100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(255, 230, 130, 0)); }
}
.win-meter-pulse > strong, .win-meter-pulse strong#lastWin {
  animation: winMeterPulse 360ms ease-out;
}

.test-multi-head {
  margin: 6px 0 8px;
  color: var(--ink-soft);
  text-transform: uppercase;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.07em;
}

.test-multi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.test-multi-btn {
  min-height: 40px;
  padding: 6px 6px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  color: #f3f8ff;
  font-size: 0.92rem;
  font-weight: 900;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.test-multi-btn.tier-common {
  background: linear-gradient(180deg, #63c7ff, #3572ff);
}

.test-multi-btn.tier-rare {
  background: linear-gradient(180deg, #a28bff, #6a55d8);
}

.test-multi-btn.tier-epic {
  background: linear-gradient(180deg, #ffb777, #f1832f);
}

.test-multi-btn.tier-legendary {
  background: linear-gradient(180deg, #ffd86f, #d29520);
}

.test-multi-btn.tier-mythic {
  background: linear-gradient(180deg, #ff92ce, #cf4fa1);
}

.test-multi-btn.is-armed {
  box-shadow:
    inset 0 0 0 2px rgba(238, 247, 255, 0.9),
    0 0 0 2px rgba(170, 215, 255, 0.55),
    0 0 26px rgba(170, 215, 255, 0.52);
  transform: translateY(-1px) scale(1.03);
}

.spin-log-list {
  max-height: 280px;
  overflow: auto;
}

.spin-log-list li,
#caughtLines li,
#lineExamples li,
.rules-list li {
  margin-bottom: 7px;
  color: #e9ddc4;
}

/* Production-style spin cards */
.spin-log-list li.spin-card {
  list-style: none;
  margin: 0 0 8px 0;
  padding: 9px 11px 10px 12px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(20, 30, 54, 0.74), rgba(10, 17, 34, 0.82));
  border: 1px solid rgba(165, 203, 255, 0.14);
  border-left: 3px solid rgba(160, 190, 230, 0.35);
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  color: #cfdbef;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.spin-log-list li.spin-card.spin-tier-loss {
  opacity: 0.78;
  border-left-color: rgba(150, 165, 190, 0.3);
}

.spin-log-list li.spin-card.spin-tier-small {
  border-left-color: rgba(170, 220, 255, 0.55);
}

.spin-log-list li.spin-card.spin-tier-medium {
  border-left-color: rgba(255, 210, 130, 0.7);
  background: linear-gradient(180deg, rgba(36, 32, 28, 0.78), rgba(18, 14, 10, 0.86));
}

.spin-log-list li.spin-card.spin-tier-great {
  border-left-color: #ffd166;
  background: linear-gradient(180deg, rgba(58, 40, 18, 0.86), rgba(24, 14, 6, 0.92));
  box-shadow: inset 0 0 0 1px rgba(255, 209, 102, 0.18), 0 0 16px rgba(255, 209, 102, 0.08);
}

.spin-log-list li.spin-card.spin-bonus {
  border-left-color: #8de9a3;
}

.spin-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.spin-seq {
  font: 700 0.78rem/1 "SF Mono", "Consolas", monospace;
  color: #8aa0c2;
  letter-spacing: 0.04em;
  min-width: 38px;
}

.spin-chip {
  font: 800 0.66rem/1 "SF Pro Text", "Segoe UI", sans-serif;
  letter-spacing: 0.08em;
  padding: 3px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  color: #cfe1ff;
  background: rgba(140, 180, 230, 0.12);
  border: 1px solid rgba(165, 203, 255, 0.22);
}

.spin-chip.mode-base {
  color: #b9c8e3;
}

.spin-chip.mode-bonus {
  color: #d6ffd9;
  background: rgba(141, 233, 163, 0.16);
  border-color: rgba(141, 233, 163, 0.42);
}

.spin-chip.mode-tumble {
  color: #ffe2a6;
  background: rgba(255, 209, 102, 0.14);
  border-color: rgba(255, 209, 102, 0.36);
}

.spin-bet {
  font: 600 0.78rem/1 "SF Pro Text", "Segoe UI", sans-serif;
  color: #8aa0c2;
  margin-left: auto;
  white-space: nowrap;
}

.spin-win {
  font: 800 0.98rem/1 "SF Pro Display", "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  color: #f4f7ff;
  white-space: nowrap;
  padding-left: 8px;
}

.spin-tier-medium .spin-win {
  color: #ffd99d;
  text-shadow: 0 0 8px rgba(255, 217, 157, 0.35);
}

.spin-tier-great .spin-win {
  font-size: 1.08rem;
  color: #ffd166;
  text-shadow: 0 0 12px rgba(255, 209, 102, 0.55);
}

.spin-win-none {
  font-weight: 600;
  color: #6c7a93;
  text-shadow: none;
}

.spin-card-body {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.spin-pills {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.spin-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px 2px 5px;
  border-radius: 999px;
  background: rgba(15, 24, 42, 0.6);
  border: 1px solid rgba(165, 203, 255, 0.16);
  font: 700 0.72rem/1 "SF Mono", "Consolas", monospace;
  color: #c8d4eb;
}

.spin-pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.spin-pill-count {
  font-variant-numeric: tabular-nums;
}

.spin-pill-more {
  font-style: italic;
  color: #8aa0c2;
}

.spin-no-win {
  font: 600 0.76rem/1 "SF Pro Text", "Segoe UI", sans-serif;
  color: #6c7a93;
  letter-spacing: 0.04em;
}

.spin-math {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-variant-numeric: tabular-nums;
}

.spin-raw {
  font: 700 0.82rem/1 "SF Pro Display", "Segoe UI", sans-serif;
  color: #cfdbef;
}

.spin-math-op {
  font: 600 0.78rem/1 "SF Pro Display", "Segoe UI", sans-serif;
  color: #8aa0c2;
  letter-spacing: 0.04em;
}

.spin-mult {
  font: 800 0.78rem/1 "SF Pro Text", "Segoe UI", sans-serif;
  color: #ffe28a;
  background: rgba(255, 209, 102, 0.14);
  border: 1px solid rgba(255, 209, 102, 0.42);
  border-radius: 4px;
  padding: 3px 7px;
  letter-spacing: 0.04em;
  text-shadow: 0 0 8px rgba(255, 226, 138, 0.45);
}

.spin-log-empty {
  color: #6c7a93;
  font-style: italic;
}

.spin-log-list li.log-event {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(14, 22, 40, 0.5);
  font: 600 0.78rem/1.2 "SF Pro Text", "Segoe UI", sans-serif;
}

.spin-log-list li.log-event .event-tag {
  font: 800 0.62rem/1 "SF Pro Text", "Segoe UI", sans-serif;
  letter-spacing: 0.1em;
  color: #8aa0c2;
  background: rgba(140, 180, 230, 0.12);
  padding: 3px 6px;
  border-radius: 3px;
}

.vault-shell {
  display: grid;
  gap: 10px;
}

.vault-banner {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  width: min(440px, calc(100% - 24px));
  min-height: 38px;
  border-radius: 999px;
  padding: 9px 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #f4f7ff;
  font: 800 0.92rem/1 "SF Pro Display", "Segoe UI", sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: linear-gradient(180deg, rgba(20, 30, 54, 0.85), rgba(8, 14, 30, 0.92));
  border: 1px solid rgba(165, 203, 255, 0.22);
  box-shadow:
    0 6px 24px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
}

.spin-log-list li.log-event {
  border-left: 2px solid rgba(255, 220, 173, 0.45);
  padding-left: 8px;
}

.spin-log-list li.log-event.event-win {
  color: #ffefb8;
}

.spin-log-list li.log-event.event-bonus {
  color: #bff3c2;
}

.spin-log-list li.log-event.event-error {
  color: #ffb1b1;
}

.vault-banner.live-banner {
  animation: bannerLift 0.64s cubic-bezier(0.18, 0.84, 0.22, 1);
}

.vault-banner.banner-info {
  color: #cfe1ff;
  border-color: rgba(170, 210, 255, 0.32);
}

.vault-banner.banner-win {
  color: #fff;
  background: linear-gradient(180deg, rgba(58, 40, 18, 0.92), rgba(24, 14, 6, 0.96));
  border-color: rgba(255, 209, 102, 0.55);
  text-shadow: 0 0 14px rgba(255, 209, 102, 0.55);
  box-shadow:
    0 6px 28px rgba(255, 170, 60, 0.18),
    inset 0 1px 0 rgba(255, 220, 150, 0.18);
}

.vault-banner.banner-bonus {
  color: #f3ffe8;
  background: linear-gradient(180deg, rgba(28, 56, 32, 0.92), rgba(10, 24, 14, 0.96));
  border-color: rgba(141, 233, 163, 0.55);
  text-shadow: 0 0 14px rgba(141, 233, 163, 0.55);
  box-shadow:
    0 6px 28px rgba(80, 200, 110, 0.18),
    inset 0 1px 0 rgba(190, 255, 200, 0.16);
}

/* Sweeping shine across the banner on entry. */
.vault-banner.live-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.22) 48%, transparent 66%);
  transform: translateX(-100%);
  animation: bannerShine 0.9s ease-out 0.12s forwards;
}

@keyframes bannerShine {
  to { transform: translateX(100%); }
}

.vault-window {
  position: relative;
  padding: 14px 14px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background:
    radial-gradient(circle at 50% 18%, rgba(234, 125, 99, 0.12), transparent 26%),
    linear-gradient(180deg, rgba(25, 14, 14, 0.98), rgba(10, 8, 8, 1));
  overflow: hidden;
  min-height: clamp(520px, 70vh, 780px);
}

.vault-window.event-shake {
  animation: vaultShake 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.vault-window.event-shake-strong {
  animation: vaultShakeStrong 0.46s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.vault-aura {
  position: absolute;
  left: 50%;
  top: 14px;
  width: min(520px, 86%);
  height: 180px;
  transform: translateX(-50%);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(238, 183, 106, 0.12), rgba(234, 125, 99, 0.05) 38%, transparent 72%);
  filter: blur(16px);
  pointer-events: none;
}

.reels-stage {
  position: relative;
  z-index: 1;
  width: min(100%, 980px);
  margin: 0 auto;
  aspect-ratio: 16 / 12;
  min-height: clamp(420px, 62vh, 760px);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(245, 214, 169, 0.12);
  background:
    radial-gradient(circle at 50% 5%, rgba(238, 183, 106, 0.11), transparent 35%),
    linear-gradient(180deg, rgba(24, 14, 14, 0.86), rgba(10, 8, 8, 0.92));
}

.reels-canvas {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
}

.relic-column {
  position: relative;
  min-height: 640px;
  display: grid;
  justify-items: center;
  align-content: start;
}

.relic-spine {
  position: absolute;
  top: 18px;
  bottom: 14px;
  width: 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(238, 183, 106, 0.14), rgba(104, 49, 52, 0.1));
  box-shadow: inset 0 1px 0 rgba(255, 236, 199, 0.1);
}

.relic-crown {
  width: 56px;
  height: 56px;
  margin-bottom: 18px;
  border-radius: 50%;
  border: 1px solid rgba(245, 214, 169, 0.16);
  background:
    radial-gradient(circle at 50% 50%, rgba(238, 183, 106, 0.22), rgba(109, 49, 70, 0.12) 56%, transparent 72%);
  box-shadow: 0 0 24px rgba(238, 183, 106, 0.08);
}

.sigil-stack {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  width: 100%;
}

.sigil {
  position: relative;
  min-height: 108px;
  display: grid;
  justify-items: center;
  align-items: start;
  transform-origin: 50% 0%;
}

.sigil-chain {
  width: 2px;
  height: 18px;
  background: linear-gradient(180deg, rgba(255, 239, 211, 0.32), rgba(255, 239, 211, 0.06));
}

.sigil-medallion {
  position: relative;
  width: min(100%, 112px);
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(245, 214, 169, 0.1);
  background:
    radial-gradient(circle at 50% 26%, rgba(255, 245, 229, 0.1), transparent 36%),
    linear-gradient(180deg, rgba(61, 42, 34, 0.96), rgba(21, 15, 13, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 221, 0.05),
    inset 0 -16px 20px rgba(0, 0, 0, 0.3),
    0 10px 16px rgba(0, 0, 0, 0.16);
}

.sigil-medallion::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 1px solid rgba(255, 224, 171, 0.08);
  pointer-events: none;
}

.symbol-icon {
  width: 68%;
  height: 68%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.45));
}

.sigil.wild .sigil-medallion {
  background:
    radial-gradient(circle at 50% 26%, rgba(255, 247, 221, 0.14), transparent 36%),
    linear-gradient(180deg, rgba(114, 82, 28, 0.98), rgba(51, 34, 10, 1));
}

.sigil.scatter .sigil-medallion {
  background:
    radial-gradient(circle at 50% 26%, rgba(255, 220, 212, 0.13), transparent 36%),
    linear-gradient(180deg, rgba(107, 40, 52, 0.98), rgba(53, 20, 30, 1));
}

.multiplier-value {
  position: absolute;
  right: 10px;
  bottom: 12px;
  padding: 3px 6px;
  border-radius: 4px;
  background: rgba(247, 232, 199, 0.95);
  color: #2b190d;
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1;
}

.sigil.win-sigil .sigil-medallion {
  border-color: rgba(245, 214, 169, 0.24);
  box-shadow:
    inset 0 0 0 1px rgba(255, 233, 190, 0.44),
    0 0 20px rgba(238, 183, 106, 0.12);
  animation: haloWake 0.92s cubic-bezier(0.18, 0.82, 0.24, 1);
}

.sigil.strike-sigil .sigil-medallion {
  animation: relicSnap 0.86s cubic-bezier(0.16, 0.8, 0.24, 1);
}

.sigil.blast-small {
  --strike-scale: 1.08;
  --strike-light: 0.22;
}

.sigil.blast-medium {
  --strike-scale: 1.16;
  --strike-light: 0.36;
}

.sigil.blast-great {
  --strike-scale: 1.28;
  --strike-light: 0.5;
}

.sigil.scatter.scatter-special .sigil-medallion {
  animation: omenRing 1.1s cubic-bezier(0.2, 0.82, 0.24, 1);
}

.sigil.scatter.scatter-special .symbol-icon {
  animation: omenLift 1.1s cubic-bezier(0.2, 0.82, 0.24, 1);
}

.reels.spin-prime .sigil.spin-drop-sigil,
.reels.tumble-prime .sigil.falling-sigil {
  transform:
    translateX(var(--drop-sway, 0px))
    translateY(calc(-1 * var(--drop-px, 110px)))
    rotate(calc(-1 * var(--drop-tilt, 0deg)))
    scale(0.92);
  opacity: 0.92;
  filter: blur(var(--drop-blur, 0.14px));
}

.reels.spin-drop .sigil.spin-drop-sigil {
  animation: pendulumDescent var(--drop-duration, 1300ms) cubic-bezier(0.14, 0.82, 0.22, 1) both;
  animation-delay: var(--drop-delay, 0ms);
}

.reels.tumble-fall .sigil.falling-sigil {
  animation: veilSlip var(--drop-duration, 980ms) cubic-bezier(0.18, 0.82, 0.24, 1) both;
  animation-delay: var(--drop-delay, 0ms);
}

.sigil.explode-out .sigil-medallion {
  animation: ashBloom 0.82s cubic-bezier(0.16, 0.78, 0.24, 1) forwards;
}

.sigil.explode-out .symbol-icon,
.sigil.explode-out .multiplier-value,
.sigil.explode-out .sigil-chain {
  animation: ashFade 0.82s cubic-bezier(0.16, 0.78, 0.24, 1) forwards;
}

.win-callout {
  position: absolute;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  min-width: 320px;
  max-width: calc(100% - 40px);
  border-radius: 14px;
  padding: 22px 36px 24px;
  background: linear-gradient(180deg, rgba(20, 28, 50, 0.92), rgba(8, 12, 24, 0.96));
  border: 1px solid rgba(170, 210, 255, 0.26);
  text-align: center;
  z-index: 4;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  overflow: hidden;
  isolation: isolate;
}

.win-callout::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(circle at 50% -10%, rgba(255, 230, 170, 0.12), transparent 60%);
  z-index: -1;
}

/* Sweeping shine on entry. */
.win-callout.live-callout::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 32%, rgba(255, 255, 255, 0.28) 50%, transparent 68%);
  transform: translateX(-100%);
  animation: calloutShine 1.1s cubic-bezier(0.2, 0.7, 0.3, 1) 0.18s forwards;
}

@keyframes calloutShine {
  to { transform: translateX(100%); }
}

.win-callout.live-callout {
  animation: calloutPop 1.05s cubic-bezier(0.16, 1.1, 0.3, 1);
  will-change: transform, opacity;
}

.win-callout-label {
  display: block;
  font: 800 0.78rem/1 "SF Pro Display", "Segoe UI", sans-serif;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: #9ec0ff;
  margin-bottom: 8px;
  text-shadow: 0 0 14px rgba(158, 192, 255, 0.4);
}

.win-callout-amount {
  display: block;
  font: 900 2.2rem/1 "SF Pro Display", "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  background: linear-gradient(180deg, #ffffff 0%, #ffe9b6 55%, #f1b76a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.4)) drop-shadow(0 0 18px rgba(255, 200, 120, 0.4));
}

/* Tier variants */
.win-callout.callout-tier-small .win-callout-label {
  color: #b9c8e3;
  letter-spacing: 0.28em;
}
.win-callout.callout-tier-small .win-callout-amount {
  background: linear-gradient(180deg, #ffffff, #cfe1ff);
  -webkit-background-clip: text;
  background-clip: text;
  font-size: 1.7rem;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.3));
}

.win-callout.callout-tier-medium {
  border-color: rgba(255, 209, 102, 0.5);
  box-shadow: 0 24px 60px rgba(255, 170, 60, 0.18), inset 0 1px 0 rgba(255, 220, 150, 0.16);
}
.win-callout.callout-tier-medium .win-callout-label { color: #ffd99d; }
.win-callout.callout-tier-medium .win-callout-amount {
  font-size: 2.1rem;
  background: linear-gradient(180deg, #ffffff, #ffd99d 55%, #ffae5a 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.win-callout.callout-tier-great {
  border-color: rgba(255, 209, 102, 0.7);
  background: linear-gradient(180deg, rgba(58, 40, 18, 0.94), rgba(20, 12, 6, 0.98));
  box-shadow:
    0 28px 80px rgba(255, 170, 60, 0.32),
    inset 0 1px 0 rgba(255, 220, 150, 0.22),
    inset 0 0 0 1px rgba(255, 209, 102, 0.18);
}
.win-callout.callout-tier-great .win-callout-label {
  color: #ffd166;
  letter-spacing: 0.36em;
  text-shadow: 0 0 14px rgba(255, 209, 102, 0.6);
}
.win-callout.callout-tier-great .win-callout-amount {
  font-size: 2.6rem;
  background: linear-gradient(180deg, #ffffff 0%, #ffe9b6 40%, #ffb347 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.45)) drop-shadow(0 0 24px rgba(255, 180, 80, 0.65));
}

.win-callout.callout-tier-epic {
  border-color: rgba(255, 132, 184, 0.7);
  background: linear-gradient(180deg, rgba(48, 18, 38, 0.95), rgba(20, 8, 22, 0.98));
  box-shadow:
    0 30px 90px rgba(255, 132, 184, 0.36),
    inset 0 1px 0 rgba(255, 200, 230, 0.22),
    inset 0 0 0 1px rgba(255, 132, 184, 0.22);
}
.win-callout.callout-tier-epic .win-callout-label {
  color: #ff9ec8;
  letter-spacing: 0.42em;
  text-shadow: 0 0 18px rgba(255, 158, 200, 0.7);
}
.win-callout.callout-tier-epic .win-callout-amount {
  font-size: 3.0rem;
  background: linear-gradient(180deg, #ffffff 0%, #ffd9ec 35%, #ff7faf 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.5)) drop-shadow(0 0 28px rgba(255, 132, 184, 0.7));
}

.win-callout.callout-tier-bonus {
  border-color: rgba(141, 233, 163, 0.6);
  background: linear-gradient(180deg, rgba(20, 48, 28, 0.94), rgba(8, 22, 14, 0.98));
}
.win-callout.callout-tier-bonus .win-callout-label {
  color: #b9ffd0;
  letter-spacing: 0.32em;
  text-shadow: 0 0 14px rgba(141, 233, 163, 0.6);
}
.win-callout.callout-tier-bonus .win-callout-amount {
  background: linear-gradient(180deg, #ffffff, #d6ffe0 50%, #5fd486 100%);
  -webkit-background-clip: text;
  background-clip: text;
  font-size: 2.0rem;
}

.ritual-deck {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 14px;
  align-items: center;
}

.deck-left {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-start;
  min-width: 0;
}

.deck-right {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
  min-width: 0;
}

.ritual-deck button {
  min-width: 0;
  padding: 8px 10px;
  line-height: 1.12;
  font-size: 0.9rem;
}

/* Image-based buttons — Spin & Buy Free Spins. The PNG IS the button. */
button.img-btn,
.img-btn {
  position: relative;
  border: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  cursor: pointer;
  padding: 0 !important;
  min-height: 0 !important;
  box-shadow: none !important;
  outline: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  transition: transform 0.12s ease, filter 0.12s ease;
}
.img-btn img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  pointer-events: none;
}
.img-btn:hover { transform: translateY(-1px) scale(1.02); filter: brightness(1.08); }
.img-btn:active { transform: scale(0.96); }
.img-btn:disabled { filter: grayscale(0.6) brightness(0.7); cursor: not-allowed; transform: none; }

.img-btn-spin {
  width: 100%;
  height: 100%;
  max-width: 130px;
  max-height: 130px;
  justify-self: center;
}
.img-btn-spin img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
}
.img-btn-spin::after {
  content: "";
  position: absolute;
  width: 22%;
  height: 22%;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.7);
  border-radius: 4px;
  background: linear-gradient(180deg, #ffffff, #9bd7ff);
  box-shadow: 0 0 12px rgba(98, 203, 255, 0.65), inset 0 0 0 1px rgba(8, 20, 36, 0.45);
  opacity: 0;
  pointer-events: none;
  /* Snap on/off instantly — no fade lingering after the spin completes. */
  transition: none;
}
.img-btn-spin.is-spinning {
  filter: brightness(1.08) saturate(1.08);
}
.img-btn-spin.is-spinning::after {
  opacity: 0.92;
  transform: translate(-50%, -50%) scale(1);
}
.img-btn-spin.is-fast-stopping::after {
  background: linear-gradient(180deg, #ffe9aa, #ff9d5a);
  box-shadow: 0 0 16px rgba(255, 172, 82, 0.72), inset 0 0 0 1px rgba(50, 18, 6, 0.4);
}

.img-btn-buy {
  width: 100%;
  height: 64px;
}
.img-btn-buy img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Bet stepper — uses the BET image as its pill background, with our own
   number overlaid on the empty center display. */
.bet-stepper {
  position: relative;
  display: block;
  height: 64px;
  /* Match the BET pill image's aspect so clickable circles align. */
  aspect-ratio: 768 / 220;
  max-width: 100%;
  background: url("/assets/symbols/BET-removebg-preview.png") center / contain no-repeat;
  user-select: none;
  margin: 0 auto;
}

button.bet-step,
.bet-step {
  position: absolute;
  top: 50%;
  /* Approx the diameter of the +/- circles inside the pill image. */
  height: 88%;
  aspect-ratio: 1 / 1;
  transform: translateY(-50%);
  border: 0 !important;
  border-radius: 50%;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  min-height: 0 !important;
  padding: 0 !important;
  color: transparent;
  cursor: pointer;
  font-size: 0;
  outline: 0;
  transition: transform 0.1s ease, filter 0.12s ease;
}
.bet-step-down { left: 1.5%; }
.bet-step-up { right: 1.5%; }
.bet-step:hover { filter: brightness(1.18); }
.bet-step:active { transform: translateY(-50%) scale(0.92); }
.bet-step:disabled { cursor: not-allowed; opacity: 0.5; }

.bet-display {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font: 800 1.05rem/1 "SF Mono", "Consolas", "Segoe UI", monospace;
  color: #98e8ff;
  text-shadow: 0 0 10px rgba(152, 232, 255, 0.55);
  pointer-events: none;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.bet-select-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Ante toggle — single image swap based on checkbox state. */
.ante-toggle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 64px;
  cursor: pointer;
}

.ante-toggle input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.ante-toggle-img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: filter 0.18s ease;
}

.ante-toggle:hover .ante-toggle-img { filter: brightness(1.08); }

.ante-toggle input:disabled ~ .ante-toggle-img {
  filter: grayscale(0.5) brightness(0.7);
  cursor: not-allowed;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#simulateBtn,
#simulateBonusBtn {
  font-size: 0.84rem;
}

.ritual-module,
.ritual-toggle {
  min-height: 58px;
  border-radius: 6px;
  padding: 9px 10px;
}

.ritual-module {
  display: grid;
  align-content: center;
  gap: 6px;
}

.ritual-module select {
  width: 100%;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 4px;
  border: 1px solid rgba(245, 214, 169, 0.12);
  background: #100b09;
  color: var(--ink);
}

.ritual-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ritual-toggle input {
  margin: 0;
}

.progress-track {
  height: 14px;
  border-radius: 6px;
  border: 1px solid rgba(245, 214, 169, 0.12);
  background: #0d0908;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-bar {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--jade), var(--sun), var(--coral));
  transition: width 0.2s linear;
}

.sim-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.codex-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 1.2fr) minmax(320px, 0.9fr);
  gap: 12px;
}

.codex-band p {
  margin: 0 0 10px;
  color: #e1d3bb;
}

.multi-tier-line {
  display: inline-block;
  margin-bottom: 2px;
}

.multi-tier-name {
  font-weight: 900;
  letter-spacing: 0.02em;
}

.tier-common {
  color: #8fd8ff;
}

.tier-rare {
  color: #b8a1ff;
}

.tier-epic {
  color: #ffb067;
}

.tier-legendary {
  color: #ffd95f;
}

.tier-mythic {
  color: #ff9bd1;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 8px;
}

.paytable {
  width: 100%;
  border-collapse: collapse;
}

.paytable th,
.paytable td {
  padding: 7px 8px;
  text-align: left;
  border: 1px solid rgba(245, 214, 169, 0.09);
}

.paytable th {
  color: #ffd89d;
}

pre {
  margin: 0 0 12px;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid rgba(245, 214, 169, 0.08);
  background: rgba(0, 0, 0, 0.18);
  max-height: 240px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: #e9ddc6;
}

#sessionNet.positive,
#simLiveCasinoNet.positive {
  color: var(--jade);
}

#sessionNet.negative,
#simLiveCasinoNet.negative {
  color: var(--coral);
}

.feature-screen {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(8, 5, 6, 0.74);
  z-index: 5;
}

.feature-screen-panel {
  position: relative;
  width: min(560px, 92%);
  aspect-ratio: 2 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8% 12% 10%;
  border: 0;
  background:
    url("/assets/symbols/FREESPINS_INFO-removebg-preview.png") center / contain no-repeat;
  text-align: center;
  animation: hushCurtain 0.38s cubic-bezier(0.18, 0.84, 0.22, 1);
}

.feature-screen-panel > * {
  position: relative;
  z-index: 1;
}

.feature-screen-kicker {
  margin: 0;
  color: #ffd89d;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.feature-screen-panel h2 {
  margin: 10px 0;
  font-size: 2rem;
}

.feature-screen-copy,
.feature-screen-hint {
  margin: 0;
}

.feature-screen-hint {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 0.84rem;
}

.rules-modal {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.72);
}

.rules-dialog {
  width: min(760px, 100%);
  border-radius: 6px;
  padding: 18px;
  border: 1px solid rgba(245, 196, 120, 0.18);
  background: linear-gradient(180deg, rgba(36, 23, 18, 0.98), rgba(12, 9, 8, 1));
}

.rules-header,
.rules-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.rules-meta {
  margin: 10px 0 12px;
  color: var(--ink-soft);
}

.rules-list {
  max-height: 360px;
  overflow: auto;
}

@media (max-width: 1340px) {
  .altar-core {
    grid-template-columns: 280px minmax(0, 1fr);
  }

  .archive-panel {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .codex-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .altar-top,
  .altar-core {
    grid-template-columns: 1fr;
    display: grid;
  }

  .status-ribbon {
    width: 100%;
  }

  .oracle-panel,
  .archive-panel {
    grid-template-columns: 1fr;
  }

  .ritual-deck {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .test-actions {
    grid-template-columns: 1fr;
  }

  .test-multi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

}

@media (max-width: 720px) {
  .sanctum {
    padding: 12px;
  }

  .altar {
    padding: 14px;
  }

  .title-cluster h1 {
    font-size: 1.9rem;
  }

  .status-ribbon,
  .meter-pair,
  .summary-grid,
  .sim-grid,
  .test-multi-grid {
    grid-template-columns: 1fr;
  }

  .ritual-deck {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .status-ribbon {
    display: grid;
  }

  .feature-screen-panel h2 {
    font-size: 1.5rem;
  }

  .vault-banner {
    top: 8px;
    width: calc(100% - 16px);
  }

}

@media (max-width: 520px) {
  .ritual-deck {
    grid-template-columns: 1fr;
  }
}

@keyframes haloWake {
  0% {
    transform: scale(1);
    filter: brightness(1);
  }
  34% {
    transform: scale(1.08);
    filter: brightness(1.16);
    box-shadow:
      inset 0 0 0 1px rgba(255, 231, 188, 0.5),
      0 0 28px rgba(238, 183, 106, 0.18);
  }
  100% {
    transform: scale(1);
    filter: brightness(1);
  }
}

@keyframes relicSnap {
  0% {
    transform: scale(1);
  }
  22% {
    transform: translateY(-9px) scale(var(--strike-scale, 1.12));
    box-shadow:
      inset 0 0 0 1px rgba(255, 233, 190, 0.86),
      0 0 32px rgba(238, 183, 106, var(--strike-light, 0.22));
  }
  44% {
    transform: translateY(10px) scaleX(1.06) scaleY(0.9);
  }
  72% {
    transform: translateY(-3px) scale(1.02);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

@keyframes omenRing {
  0% {
    transform: scale(1);
  }
  36% {
    transform: scale(1.12);
    box-shadow:
      inset 0 0 0 1px rgba(255, 223, 176, 0.66),
      0 0 24px rgba(234, 125, 99, 0.22);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes omenLift {
  0% {
    transform: scale(1);
  }
  36% {
    transform: translateY(-10px) scale(1.14);
    filter: drop-shadow(0 0 18px rgba(255, 216, 152, 0.34));
  }
  100% {
    transform: scale(1);
  }
}

@keyframes pendulumDescent {
  0% {
    transform:
      translateX(var(--drop-sway, 0px))
      translateY(calc(-1 * var(--drop-px, 110px)))
      rotate(calc(-1 * var(--drop-tilt, 0deg)))
      scale(0.92);
    opacity: 0.92;
    filter: blur(var(--drop-blur, 0.14px));
  }
  44% {
    transform:
      translateX(calc(var(--drop-sway, 0px) * -0.24))
      translateY(calc(var(--drop-px, 110px) * -0.12))
      rotate(calc(var(--drop-tilt, 0deg) * 0.4))
      scale(0.97);
    opacity: 1;
  }
  68% {
    transform:
      translateX(calc(var(--drop-sway, 0px) * 0.08))
      translateY(var(--impact-depth, 6px))
      rotate(calc(var(--drop-tilt, 0deg) * -0.08))
      scale(1);
    filter: blur(0);
  }
  84% {
    transform:
      translateY(calc(-1 * var(--rebound-lift, 3px)))
      rotate(calc(var(--drop-tilt, 0deg) * 0.04));
  }
  100% {
    transform: translateX(0) translateY(0) rotate(0deg) scale(1);
    opacity: 1;
  }
}

@keyframes veilSlip {
  0% {
    transform:
      translateX(calc(var(--drop-sway, 0px) * 0.6))
      translateY(calc(-1 * var(--drop-px, 110px)))
      rotate(calc(-1 * var(--drop-tilt, 0deg)))
      scale(0.94);
    opacity: 0.9;
    filter: blur(var(--drop-blur, 0.12px));
  }
  56% {
    transform:
      translateX(calc(var(--drop-sway, 0px) * -0.1))
      translateY(0)
      rotate(calc(var(--drop-tilt, 0deg) * 0.05))
      scale(1);
    opacity: 1;
    filter: blur(0);
  }
  78% {
    transform: translateY(var(--impact-depth, 4px)) scale(1.01);
  }
  90% {
    transform: translateY(calc(-1 * var(--rebound-lift, 2px)));
  }
  100% {
    transform: translateX(0) translateY(0) rotate(0deg) scale(1);
    opacity: 1;
  }
}

@keyframes ashBloom {
  0% {
    opacity: 1;
    transform: scale(1);
    filter: brightness(1.06);
  }
  24% {
    opacity: 1;
    transform: scale(1.14) rotate(4deg);
    filter: brightness(1.16);
    box-shadow:
      inset 0 0 0 1px rgba(255, 229, 183, 0.7),
      0 0 24px rgba(238, 183, 106, 0.22);
  }
  54% {
    opacity: 0.72;
    transform: scale(0.84) rotate(-8deg);
    filter: brightness(0.96) blur(0.24px);
  }
  100% {
    opacity: 0;
    transform: scale(0.14) rotate(24deg);
    filter: brightness(0.72) blur(0.8px);
  }
}

@keyframes ashFade {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  32% {
    transform: scale(1.04);
    opacity: 0.96;
  }
  58% {
    transform: scale(0.72);
    opacity: 0.46;
  }
  100% {
    transform: scale(0.08);
    opacity: 0;
  }
}

@keyframes hushCurtain {
  0% {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes calloutPop {
  0% {
    opacity: 0;
    filter: brightness(1.6) blur(3px);
    transform: translate(-50%, -50%) scale(0.6) rotate(-2deg);
  }
  22% {
    opacity: 1;
    filter: brightness(1.35) blur(0);
    transform: translate(-50%, -50%) scale(1.18) rotate(1.2deg);
  }
  44% {
    transform: translate(-50%, -50%) scale(0.94) rotate(-0.6deg);
  }
  64% {
    transform: translate(-50%, -50%) scale(1.04) rotate(0.3deg);
  }
  82% {
    transform: translate(-50%, -50%) scale(0.99) rotate(0deg);
  }
  100% {
    opacity: 1;
    filter: brightness(1) blur(0);
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes bannerLift {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(-14px) scale(0.94);
    filter: blur(4px);
  }
  35% {
    opacity: 1;
    transform: translateX(-50%) translateY(2px) scale(1.04);
    filter: blur(0);
  }
  60% {
    transform: translateX(-50%) translateY(-1px) scale(0.99);
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes vaultShake {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-2px, 0); }
  40% { transform: translate(2px, 0); }
  60% { transform: translate(-1px, 0); }
  80% { transform: translate(1px, 0); }
}

@keyframes vaultShakeStrong {
  0%, 100% { transform: translate(0, 0); }
  15% { transform: translate(-4px, -1px); }
  30% { transform: translate(4px, 1px); }
  45% { transform: translate(-3px, 1px); }
  60% { transform: translate(3px, -1px); }
  75% { transform: translate(-2px, 0); }
  90% { transform: translate(1px, 0); }
}

/* Futuristic Liquid Glass Theme Overrides */
:root {
  --bg-0: #060a14;
  --bg-1: #0a1020;
  --bg-2: #0f1830;
  --panel: rgba(14, 22, 40, 0.62);
  --panel-soft: rgba(18, 27, 48, 0.5);
  --panel-deep: rgba(8, 14, 30, 0.76);
  --ink: #e8f1ff;
  --ink-soft: #adc2e2;
  --line: rgba(170, 206, 255, 0.2);
  --line-strong: rgba(155, 204, 255, 0.42);
  --sun: #9dcfff;
  --coral: #ff7fa8;
  --jade: #77f1d0;
  --wine: #4c4ea3;
  --shadow-soft: 0 18px 40px rgba(0, 7, 20, 0.45);
  --shadow-hard: 0 34px 80px rgba(0, 6, 20, 0.62);
}

body {
  font-family: "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(1200px 560px at 12% -8%, rgba(130, 176, 255, 0.22), transparent 60%),
    radial-gradient(1100px 520px at 92% -12%, rgba(116, 232, 255, 0.15), transparent 58%),
    linear-gradient(180deg, #050a14 0%, #080f1f 42%, #0d1730 100%);
}

body::before {
  background:
    radial-gradient(circle at 22% 18%, rgba(181, 213, 255, 0.06), transparent 32%),
    radial-gradient(circle at 80% 20%, rgba(148, 237, 255, 0.05), transparent 30%),
    linear-gradient(90deg, transparent 0, rgba(200, 225, 255, 0.02) 50%, transparent 100%),
    repeating-linear-gradient(90deg, rgba(198, 221, 255, 0.012) 0px, rgba(198, 221, 255, 0.012) 1px, transparent 1px, transparent 42px);
}

body::after {
  background: linear-gradient(180deg, rgba(205, 230, 255, 0.04), transparent 14%, transparent 84%, rgba(3, 7, 16, 0.34));
}

.altar {
  border-radius: 20px;
  border-color: rgba(171, 207, 255, 0.26);
  background: linear-gradient(180deg, rgba(14, 23, 42, 0.74), rgba(7, 13, 28, 0.74));
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
}

.status-ribbon-item,
.oracle-band,
.archive-band,
.codex-band,
.meter-node,
.header-readout,
.engine-tag,
.ritual-module,
.ritual-toggle,
.vault-banner {
  border-radius: 14px;
  border-color: rgba(165, 203, 255, 0.24);
  background: linear-gradient(180deg, rgba(22, 33, 58, 0.5), rgba(10, 17, 34, 0.54));
  backdrop-filter: blur(16px) saturate(145%);
  -webkit-backdrop-filter: blur(16px) saturate(145%);
}

.status-ribbon-item strong,
.meter-node strong,
.summary-grid strong,
.sim-grid strong {
  color: #e9f2ff;
}

.vault-window {
  border-radius: 18px;
  border-color: rgba(168, 205, 255, 0.26);
  background:
    radial-gradient(circle at 50% 12%, rgba(128, 196, 255, 0.22), transparent 28%),
    linear-gradient(180deg, rgba(10, 18, 36, 0.88), rgba(5, 11, 24, 0.92));
}

.reels-stage {
  border-radius: 16px;
  border-color: rgba(166, 206, 255, 0.24);
  box-shadow:
    inset 0 1px 0 rgba(228, 241, 255, 0.2),
    inset 0 -14px 24px rgba(0, 0, 0, 0.28),
    0 16px 38px rgba(3, 8, 20, 0.5);
  background:
    radial-gradient(circle at 50% 5%, rgba(167, 213, 255, 0.16), transparent 40%),
    linear-gradient(180deg, rgba(16, 26, 48, 0.82), rgba(8, 14, 30, 0.9));
}

button {
  border-radius: 12px;
  color: #f4f8ff;
  border-color: rgba(165, 205, 255, 0.46);
  text-shadow: 0 1px 2px rgba(3, 10, 22, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(236, 247, 255, 0.22),
    0 10px 24px rgba(3, 9, 20, 0.45);
}

#spinBtn {
  background: linear-gradient(180deg, #6bc6ff, #3d6dff);
}

#buyFreeBtn {
  background: linear-gradient(180deg, #6ef0d0, #2278be);
}

#simulateBtn,
#simulateBonusBtn,
#rulesBtn,
#rulesPrevBtn,
#rulesNextBtn,
#rulesCloseBtn {
  background: linear-gradient(180deg, #9fbfff, #546ed5);
}

.ritual-module select {
  border-radius: 10px;
  border-color: rgba(167, 205, 255, 0.28);
  background: rgba(8, 15, 30, 0.72);
  color: #eaf2ff;
}

.summary-grid > div,
.sim-grid > div {
  border-color: rgba(165, 206, 255, 0.2);
  background: rgba(160, 203, 255, 0.05);
  border-radius: 10px;
}

.progress-track {
  border-radius: 999px;
  border-color: rgba(158, 204, 255, 0.26);
  background: rgba(8, 14, 29, 0.78);
}

.progress-bar {
  background: linear-gradient(90deg, #63d7ff, #6f89ff, #88f0d0);
}

.rules-modal {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Win-combine finale: fly raw win + multiplier together → BANG → total. */
.win-combine-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 7;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: opacity 0.32s ease;
}

.win-combine-overlay.is-fading {
  opacity: 0;
}

.combine-chip {
  position: absolute;
  top: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 28px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(20, 28, 50, 0.94), rgba(8, 12, 24, 0.98));
  border: 1px solid rgba(170, 210, 255, 0.32);
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.6);
  transition:
    transform 0.48s cubic-bezier(0.18, 0.84, 0.22, 1),
    opacity 0.32s ease,
    filter 0.32s ease;
  white-space: nowrap;
}

.combine-kicker {
  font: 800 0.66rem/1 "SF Pro Display", "Segoe UI", sans-serif;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: #9ec0ff;
  text-shadow: 0 0 10px rgba(158, 192, 255, 0.4);
}

.combine-value {
  font: 900 2rem/1 "SF Pro Display", "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  color: transparent;
  background: linear-gradient(180deg, #ffffff 0%, #ffe9b6 55%, #f1b76a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.4)) drop-shadow(0 0 18px rgba(255, 200, 120, 0.45));
}

/* Amount chip — slides in from left. */
.combine-amount {
  left: 25%;
  border-color: rgba(255, 209, 102, 0.5);
}
.combine-amount .combine-kicker { color: #ffd99d; }

/* Multiplier chip — slides in from right, tier-colored. */
.combine-multi {
  left: 75%;
  border-color: var(--combine-color, rgba(255, 132, 184, 0.6));
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.6),
    0 0 36px var(--combine-glow, rgba(255, 132, 184, 0.4)),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.combine-multi .combine-kicker { color: var(--combine-color, #ff9ec8); letter-spacing: 0.36em; }
.combine-multi .combine-value {
  background: linear-gradient(180deg, #ffffff 0%, #ffd9ec 35%, var(--combine-color, #ff7faf) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.45)) drop-shadow(0 0 22px var(--combine-glow, rgba(255, 132, 184, 0.6)));
}

.combine-amount.is-entered,
.combine-multi.is-entered {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.combine-amount.is-slamming {
  transition: transform 0.36s cubic-bezier(0.5, 0, 0.85, 1);
  transform: translate(calc(-50% + (50% - 25%) * 1px), -50%) scale(1.08);
  /* Move toward 50% — using left: 25% means we need to translate +25% of viewport. */
  left: 50%;
}
.combine-multi.is-slamming {
  transition: transform 0.36s cubic-bezier(0.5, 0, 0.85, 1), left 0.36s cubic-bezier(0.5, 0, 0.85, 1);
  left: 50%;
  transform: translate(-50%, -50%) scale(1.08);
}
.combine-amount.is-slamming {
  transition: left 0.36s cubic-bezier(0.5, 0, 0.85, 1), transform 0.36s cubic-bezier(0.5, 0, 0.85, 1);
}

.combine-amount.is-merged,
.combine-multi.is-merged {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.4);
  filter: blur(6px) brightness(1.6);
  transition: opacity 0.18s ease, transform 0.22s ease, filter 0.18s ease;
}

/* Collision flash — full-frame white-hot punch. */
.combine-flash {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(255, 220, 150, 0.7) 18%,
    rgba(255, 132, 184, 0.4) 40%,
    rgba(0, 0, 0, 0) 70%);
  opacity: 0;
  transform: scale(0.4);
  pointer-events: none;
}
.combine-flash.is-live {
  animation: combineFlash 0.6s cubic-bezier(0.16, 0.84, 0.22, 1) forwards;
}
@keyframes combineFlash {
  0%   { opacity: 0; transform: scale(0.4); }
  18%  { opacity: 1; transform: scale(1.4); }
  100% { opacity: 0; transform: scale(2.6); }
}

/* Total chip — appears after the merge with shine sweep + overshoot pop. */
.combine-total {
  left: 50%;
  padding: 26px 44px 28px;
  border-radius: 18px;
  border-color: rgba(255, 209, 102, 0.7);
  background: linear-gradient(180deg, rgba(58, 40, 18, 0.94), rgba(20, 12, 6, 0.98));
  box-shadow:
    0 28px 90px rgba(255, 170, 60, 0.36),
    inset 0 1px 0 rgba(255, 220, 150, 0.22),
    inset 0 0 0 1px rgba(255, 209, 102, 0.22);
  overflow: hidden;
  isolation: isolate;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.4);
}
.combine-total .combine-kicker {
  color: #ffd166;
  letter-spacing: 0.42em;
  text-shadow: 0 0 16px rgba(255, 209, 102, 0.65);
}
.combine-total .combine-value {
  font-size: 3.2rem;
  background: linear-gradient(180deg, #ffffff 0%, #ffe9b6 35%, #ffae3c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.5)) drop-shadow(0 0 32px rgba(255, 180, 80, 0.8));
}
.combine-total.is-live {
  animation: combineTotalIn 1.5s cubic-bezier(0.16, 1.1, 0.3, 1) forwards;
}
.combine-total.is-live::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(110deg, transparent 32%, rgba(255, 255, 255, 0.32) 50%, transparent 68%);
  transform: translateX(-100%);
  animation: combineTotalShine 1.1s cubic-bezier(0.2, 0.7, 0.3, 1) 0.4s forwards;
  pointer-events: none;
}
@keyframes combineTotalIn {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.4); filter: blur(8px); }
  20%  { opacity: 1; transform: translate(-50%, -50%) scale(1.18); filter: blur(0); }
  44%  { transform: translate(-50%, -50%) scale(0.96); }
  64%  { transform: translate(-50%, -50%) scale(1.04); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); filter: blur(0); }
}
@keyframes combineTotalShine {
  to { transform: translateX(100%); }
}

.soul-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  overflow: visible;
}

.soul-orb {
  position: fixed;
  left: 0;
  top: 0;
  width: 44px;
  height: 44px;
  margin-left: -22px;
  margin-top: -22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 900 0.78rem/1 "Trebuchet MS", "Segoe UI", sans-serif;
  color: #fff;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.7), 0 1px 1px rgba(0, 0, 0, 0.85);
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.95), var(--soul-color, #9dcfff) 38%, rgba(0, 0, 0, 0) 80%);
  box-shadow:
    0 0 14px 4px var(--soul-glow, rgba(157, 207, 255, 0.55)),
    0 0 38px 12px var(--soul-glow, rgba(157, 207, 255, 0.35)),
    inset 0 0 12px rgba(255, 255, 255, 0.55);
  will-change: transform, opacity;
  transform: translate3d(0, 0, 0) scale(1);
}

.soul-orb::after {
  content: "";
  position: absolute;
  inset: -16px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--soul-glow, rgba(157, 207, 255, 0.4)), rgba(0, 0, 0, 0) 70%);
  animation: soulHalo 0.9s ease-in-out infinite;
}

.soul-trail {
  position: fixed;
  left: 0;
  top: 0;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  margin-top: -5px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--soul-color, #9dcfff), rgba(0, 0, 0, 0) 70%);
  opacity: 0.85;
  pointer-events: none;
  will-change: transform, opacity;
}

@keyframes soulHalo {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.18); opacity: 1; }
}

.soul-plus {
  position: fixed;
  left: 0;
  top: 0;
  font: 900 1.1rem/1 "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--soul-color, #ffe28a);
  text-shadow: 0 0 10px var(--soul-glow, rgba(255, 226, 138, 0.85)), 0 1px 2px rgba(0, 0, 0, 0.85);
  pointer-events: none;
  animation: soulPlusRise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  z-index: 9999;
}

@keyframes soulPlusRise {
  0%   { opacity: 0; transform: translate(-50%, 0) scale(0.6); }
  20%  { opacity: 1; transform: translate(-50%, -10px) scale(1.15); }
  100% { opacity: 0; transform: translate(-50%, -42px) scale(1); }
}

.meter-node-multi,
.hud-node-multi {
  transition: transform 0.18s ease;
}

.meter-node-multi.soul-hit,
.hud-node-multi.soul-hit {
  animation: soulHit 0.6s cubic-bezier(0.2, 0.9, 0.2, 1);
}

.meter-node-multi.soul-hit strong,
.hud-node-multi.soul-hit strong {
  animation: soulHitText 0.6s cubic-bezier(0.2, 0.9, 0.2, 1);
}

@keyframes soulHit {
  0%   { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 226, 138, 0); }
  30%  { transform: scale(1.08); box-shadow: 0 0 22px 6px var(--soul-glow, rgba(255, 226, 138, 0.55)); }
  70%  { transform: scale(0.985); box-shadow: 0 0 14px 2px var(--soul-glow, rgba(255, 226, 138, 0.3)); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 226, 138, 0); }
}

@keyframes soulHitText {
  0%   { color: inherit; text-shadow: none; }
  30%  { color: #fff; text-shadow: 0 0 12px var(--soul-glow, rgba(255, 226, 138, 0.9)); transform: scale(1.18); }
  100% { color: inherit; text-shadow: none; transform: scale(1); }
}

.rules-dialog {
  border-radius: 16px;
  border-color: rgba(168, 205, 255, 0.28);
  background: linear-gradient(180deg, rgba(18, 30, 56, 0.84), rgba(10, 17, 33, 0.86));
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

pre,
.table-wrap,
.paytable th,
.paytable td {
  border-color: rgba(165, 206, 255, 0.18);
}

/* Buy Feature confirmation modal */
.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 8, 18, 0.72);
  backdrop-filter: blur(6px) saturate(120%);
  -webkit-backdrop-filter: blur(6px) saturate(120%);
  animation: confirmFade 0.18s ease;
}

.confirm-modal.hidden { display: none; }

@keyframes confirmFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.confirm-dialog {
  width: min(420px, calc(100% - 32px));
  padding: 28px 32px 24px;
  border-radius: 16px;
  border: 1px solid rgba(255, 209, 102, 0.42);
  background: linear-gradient(180deg, rgba(38, 28, 14, 0.96), rgba(14, 10, 6, 0.98));
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 220, 150, 0.18),
    0 0 36px rgba(255, 170, 60, 0.12);
  text-align: center;
  animation: confirmPop 0.32s cubic-bezier(0.16, 1.05, 0.3, 1);
}

@keyframes confirmPop {
  0% { opacity: 0; transform: scale(0.85) translateY(8px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.confirm-title {
  margin: 0 0 6px;
  font: 900 1.5rem/1.1 "SF Pro Display", "Segoe UI", sans-serif;
  letter-spacing: 0.04em;
  color: #ffd166;
  text-shadow: 0 0 14px rgba(255, 209, 102, 0.45);
}

.confirm-copy {
  margin: 0 0 16px;
  font: 600 0.9rem/1.3 "SF Pro Text", "Segoe UI", sans-serif;
  color: #cfdbef;
}

.confirm-cost {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  margin: 4px 0 8px;
}

.confirm-cost-amount {
  font: 900 2.4rem/1 "SF Pro Display", "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #ffffff 0%, #ffe9b6 55%, #f1b76a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.4)) drop-shadow(0 0 18px rgba(255, 200, 120, 0.5));
}

.confirm-cost-currency {
  font: 800 1rem/1 "SF Pro Display", "Segoe UI", sans-serif;
  letter-spacing: 0.16em;
  color: #ffd99d;
}

.confirm-meta {
  margin: 4px 0 22px;
  font: 600 0.78rem/1 "SF Pro Text", "Segoe UI", sans-serif;
  color: #8aa0c2;
  letter-spacing: 0.02em;
}

.confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.confirm-btn {
  border: 1px solid;
  border-radius: 10px;
  padding: 12px 16px;
  font: 800 0.88rem/1 "SF Pro Display", "Segoe UI", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease, background 0.12s ease;
  min-height: 0 !important;
}

.confirm-btn-cancel {
  background: linear-gradient(180deg, rgba(40, 50, 80, 0.85), rgba(20, 26, 46, 0.95));
  border-color: rgba(170, 210, 255, 0.32);
  color: #cfdbef;
}
.confirm-btn-cancel:hover { filter: brightness(1.15); }

.confirm-btn-confirm {
  background: linear-gradient(180deg, #ffc466, #d48739);
  border-color: rgba(255, 209, 102, 0.7);
  color: #2a1808;
  text-shadow: 0 1px 0 rgba(255, 220, 150, 0.5);
}
.confirm-btn-confirm:hover { filter: brightness(1.08); transform: translateY(-1px); }
.confirm-btn:active { transform: scale(0.97); }
