:root {
  color-scheme: dark;
  --bg0: #040714;
  --bg1: #07152c;
  --bg2: #11264b;
  --panel: rgba(7, 11, 22, 0.74);
  --panel-strong: rgba(5, 8, 16, 0.94);
  --line: rgba(255, 255, 255, 0.14);
  --text: #f4f7ff;
  --muted: rgba(244, 247, 255, 0.72);
  --gold: #ffd54f;
  --gold-2: #fff2b5;
  --blue: #63e6ff;
  --red: #ff6d8c;
  --green: #67f5c1;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.52);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
}

*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  font-family: 'Rajdhani', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--text);
  background:
    radial-gradient(circle at 16% 8%, rgba(255, 109, 140, 0.26), transparent 18%),
    radial-gradient(circle at 82% 10%, rgba(99, 230, 255, 0.22), transparent 20%),
    radial-gradient(circle at 50% 106%, rgba(103, 245, 193, 0.16), transparent 18%),
    radial-gradient(circle at 50% 48%, rgba(255, 255, 255, 0.05), transparent 40%),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 84px),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.03) 0 1px, transparent 1px 84px),
    linear-gradient(160deg, var(--bg0), var(--bg1) 42%, var(--bg2));
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(0);
  z-index: 0;
}

body::before {
  top: -10rem;
  right: -8rem;
  width: 34rem;
  height: 34rem;
  background: radial-gradient(circle, rgba(255, 213, 79, 0.20), rgba(255, 213, 79, 0) 66%);
}

body::after {
  bottom: -12rem;
  left: -10rem;
  width: 34rem;
  height: 34rem;
  background: radial-gradient(circle, rgba(99, 230, 255, 0.14), rgba(99, 230, 255, 0) 66%);
}

a { color: inherit; text-decoration: none; }
button,
a.btn { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }

.ambient {
  position: fixed;
  inset: auto;
  width: 30rem;
  height: 30rem;
  border-radius: 50%;
  filter: blur(44px);
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
  animation: drift 18s ease-in-out infinite alternate;
}

.ambient--gold {
  top: 3rem;
  left: -10rem;
  background: rgba(255, 213, 111, 0.10);
}

.ambient--blue {
  bottom: 6rem;
  right: -10rem;
  background: rgba(119, 223, 255, 0.10);
  animation-duration: 24s;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1240px, calc(100% - 20px));
  margin: 0 auto;
  padding: 16px 0 44px;
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand__mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03)),
    linear-gradient(135deg, rgba(99, 230, 255, 0.18), rgba(255, 109, 140, 0.14));
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 12px 28px rgba(0, 0, 0, 0.26),
    0 0 24px rgba(99, 230, 255, 0.14);
  font-weight: 700;
  letter-spacing: 0.06em;
}

.brand__copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand__copy strong {
  font-family: 'Orbitron', system-ui, sans-serif;
  font-size: 1.45rem;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brand__copy span,
.masthead__nav a {
  color: var(--muted);
  font-size: 0.95rem;
}

.masthead__nav {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.masthead__nav a {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.04);
}

.hero {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
  gap: 18px;
  align-items: stretch;
}

.hero__copy,
.board {
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    linear-gradient(180deg, rgba(8, 14, 28, 0.94), rgba(4, 8, 16, 0.92));
  box-shadow:
    var(--shadow),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 0 32px rgba(99, 230, 255, 0.08);
  backdrop-filter: blur(18px);
}

.hero__copy {
  border-radius: var(--radius-xl);
  padding: clamp(22px, 3.4vw, 34px);
  position: relative;
  overflow: hidden;
}

.hero__copy::after {
  content: "";
  position: absolute;
  inset: auto -12% 1.2rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 213, 111, 0.95), rgba(119, 223, 255, 0.92), transparent);
  opacity: 0.7;
  pointer-events: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 213, 111, 0.14);
  border: 1px solid rgba(255, 213, 111, 0.30);
  color: #fff0bf;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(14px);
}

.hero h1 {
  margin: 18px 0 14px;
  font-family: 'Orbitron', system-ui, sans-serif;
  font-size: clamp(3.4rem, 7.6vw, 7.6rem);
  line-height: 0.86;
  letter-spacing: 0.08em;
  max-width: 8ch;
  text-transform: uppercase;
  text-wrap: balance;
}

.lede {
  max-width: 58ch;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.12rem);
  line-height: 1.68;
}

.hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(99, 230, 255, 0.18);
  background: linear-gradient(135deg, rgba(99, 230, 255, 0.08), rgba(255, 109, 140, 0.07));
  color: rgba(244, 247, 255, 0.98);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 18px;
  border-radius: 16px;
  border: 0;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, opacity 180ms ease;
  touch-action: manipulation;
  user-select: none;
}

.btn:hover { transform: translateY(-1px); }
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn--primary {
  color: #071018;
  font-weight: 700;
  background: linear-gradient(135deg, #fff4cb, var(--gold));
  box-shadow:
    0 16px 34px rgba(255, 213, 79, 0.24),
    0 0 0 1px rgba(255, 255, 255, 0.18) inset;
}

.btn--ghost {
  color: var(--text);
  border: 1px solid rgba(99, 230, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
}

.hero__board { min-width: 0; }

.board {
  height: 100%;
  border-radius: var(--radius-xl);
  padding: 22px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.board::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 109, 140, 0.16), transparent 24%),
    radial-gradient(circle at 100% 100%, rgba(99, 230, 255, 0.17), transparent 20%),
    radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.04), transparent 30%),
    linear-gradient(180deg, rgba(103, 245, 193, 0.08), transparent 24%, transparent 76%, rgba(255, 213, 79, 0.08));
  pointer-events: none;
}

.board::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: calc(var(--radius-xl) - 12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 0 0 1px rgba(255, 213, 79, 0.08),
    inset 0 0 0 2px rgba(99, 230, 255, 0.05);
  pointer-events: none;
}

.board__topline {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  align-items: center;
}

.board__meter {
  position: relative;
  height: 12px;
  margin: 14px 2px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(99, 230, 255, 0.12);
  overflow: hidden;
}

.board__meter::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.08), transparent 20%, transparent 80%, rgba(255,255,255,0.08));
  opacity: 0.5;
}

.board__meter-fill {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  transform-origin: left center;
  transform: scaleX(0);
  background: linear-gradient(90deg, rgba(255, 109, 140, 0.34), rgba(99, 230, 255, 0.78), rgba(103, 245, 193, 0.92));
  box-shadow: 0 0 22px rgba(99, 230, 255, 0.28);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(99, 230, 255, 0.12);
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 700;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  backdrop-filter: blur(14px);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.chip--muted {
  color: var(--muted);
  font-weight: 500;
}

.chip--danger {
  color: #fff3f4;
  border-color: rgba(255, 125, 134, 0.35);
  background: rgba(255, 125, 134, 0.16);
}

.stage {
  display: grid;
  gap: 16px;
  justify-items: center;
  padding: 18px 0 10px;
}

.card-stack {
  position: relative;
  width: min(100%, 520px);
  aspect-ratio: 0.70 / 1;
  perspective: 1600px;
  display: grid;
  place-items: center;
}

.turn-ring {
  position: absolute;
  inset: -20px;
  border-radius: 48px;
  background:
    conic-gradient(from -90deg,
      var(--gold) 0 calc(var(--turn-progress, 0) * 1turn),
      rgba(255, 255, 255, 0.08) 0 1turn);
  padding: 2px;
  opacity: 0.95;
  filter: drop-shadow(0 0 24px rgba(255, 213, 111, 0.32));
}

.turn-ring::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 46px;
  background:
    radial-gradient(circle at 20% 16%, rgba(255, 213, 111, 0.08), transparent 24%),
    linear-gradient(180deg, rgba(12, 18, 32, 0.94), rgba(4, 8, 16, 0.98));
}

.card {
  position: absolute;
  inset: 0;
  border-radius: 32px;
  transform-style: preserve-3d;
  box-shadow:
    0 36px 72px rgba(0, 0, 0, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
  overflow: hidden;
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 220ms ease, opacity 220ms ease;
}

.card--peek {
  transform: translate(18px, 18px) scale(0.96) rotate(4deg);
  border: 1px solid rgba(255, 255, 255, 0.10);
  z-index: 1;
}

.card--current { z-index: 2; }

.card--current.lh-flash {
  transform: translateY(-4px) scale(1.03) rotate(-0.8deg) !important;
}

.card--peek {
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 220ms ease, opacity 220ms ease;
}

.card--peek.lh-flash {
  transform: translate(22px, 22px) scale(0.95) rotate(6deg);
}

.card__back {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.08), transparent 25%),
    radial-gradient(circle at 82% 82%, rgba(255, 255, 255, 0.08), transparent 25%),
    linear-gradient(145deg, rgba(16, 22, 39, 0.98), rgba(3, 6, 14, 0.98));
}

.card__back::before {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 24px;
  border: 1px solid rgba(119, 223, 255, 0.30);
  background:
    repeating-linear-gradient(
      45deg,
      rgba(119, 223, 255, 0.14) 0 8px,
      rgba(255, 213, 111, 0.10) 8px 16px
    );
  opacity: 0.9;
}

.card__back::after {
  content: "";
  position: absolute;
  inset: 34px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.card__back-ring {
  position: absolute;
  width: 62%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent 64%);
  box-shadow: inset 0 0 40px rgba(255, 255, 255, 0.05);
}

.card__back-text {
  position: relative;
  z-index: 1;
  padding-top: 6rem;
  text-align: center;
  font-family: 'Orbitron', system-ui, sans-serif;
  font-size: clamp(1.4rem, 4.2vw, 2.8rem);
  letter-spacing: 0.12em;
  text-shadow: 0 6px 24px rgba(0, 0, 0, 0.30);
  text-transform: uppercase;
}

.card__face {
  position: absolute;
  inset: 0;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    radial-gradient(circle at 20% 18%, rgba(0, 0, 0, 0.05), transparent 18%),
    radial-gradient(circle at 84% 82%, rgba(0, 0, 0, 0.05), transparent 18%),
    linear-gradient(180deg, #fbfcff 0%, #eef2f8 100%);
  color: #131826;
}

.card__face::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 22px;
  border: 1px solid rgba(17, 24, 39, 0.08);
}

.card__face::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.35), transparent 18%),
    radial-gradient(circle at 50% 82%, rgba(255, 255, 255, 0.25), transparent 18%);
  mix-blend-mode: screen;
  pointer-events: none;
}

.card--red .card__face { color: #b01636; }

.card__corner {
  position: relative;
  z-index: 1;
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  align-self: flex-start;
  font-weight: 700;
  line-height: 1;
}

.card__corner--bottom {
  align-self: flex-end;
  transform: rotate(180deg);
}

.card__rank {
  font-family: 'Orbitron', system-ui, sans-serif;
  font-size: clamp(1.8rem, 6vw, 3rem);
  letter-spacing: 0.01em;
}

.card__suit {
  font-size: clamp(1rem, 3vw, 1.4rem);
}

.card__center {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-height: 0;
  flex: 1;
  font-family: 'Orbitron', system-ui, sans-serif;
  font-size: clamp(4rem, 14vw, 7rem);
  letter-spacing: 0.02em;
  text-shadow: 0 18px 24px rgba(0, 0, 0, 0.10);
}

.card__center span {
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.08));
}

.card__caption {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.06);
  color: rgba(17, 24, 39, 0.82);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-family: 'Orbitron', system-ui, sans-serif;
}

.card__caption span { font-size: 1rem; }

.stage__copy {
  width: min(100%, 420px);
  text-align: center;
}

.stage__copy p { margin: 0; }

#messageLine {
  font-size: clamp(1.02rem, 2vw, 1.2rem);
  line-height: 1.6;
}

.odds {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.choice {
  min-height: 76px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 18px;
  font-weight: 700;
  font-size: 1.06rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease, filter 180ms ease;
  position: relative;
  overflow: hidden;
  touch-action: manipulation;
  user-select: none;
  font-family: 'Orbitron', system-ui, sans-serif;
}

.choice:hover { transform: translateY(-1px); }

.choice:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.choice--lower {
  color: #fff;
  background: linear-gradient(135deg, rgba(255, 109, 140, 0.98), rgba(198, 37, 105, 0.98));
  box-shadow:
    0 18px 36px rgba(207, 48, 74, 0.24),
    0 0 0 1px rgba(255, 255, 255, 0.10) inset;
}

.choice--higher {
  color: #101522;
  background: linear-gradient(135deg, rgba(255, 244, 193, 0.98), rgba(99, 230, 255, 0.92));
  box-shadow:
    0 18px 36px rgba(99, 230, 255, 0.20),
    0 0 0 1px rgba(255, 255, 255, 0.18) inset;
}

.history {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 38px;
  margin-top: 4px;
  align-items: center;
  justify-content: flex-start;
}

.history__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(99, 230, 255, 0.10);
  color: var(--text);
  font-size: 0.86rem;
  backdrop-filter: blur(10px);
}

.history__item strong { font-size: 1rem; }
.history__item--red { color: #ffd0d4; }
.history__item--black { color: #eaf4ff; }

.overlay {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(3, 6, 12, 0.64);
  backdrop-filter: blur(14px);
}

.overlay.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.overlay__card {
  width: min(460px, 100%);
  padding: 26px;
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04)),
    linear-gradient(180deg, rgba(10, 16, 28, 0.98), rgba(6, 10, 20, 0.96));
  border: 1px solid rgba(99, 230, 255, 0.14);
  box-shadow: var(--shadow);
  text-align: center;
}

.lh-toast {
  position: fixed;
  top: calc(14px + env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%) translateY(-12px);
  z-index: 40;
  min-width: min(92vw, 360px);
  max-width: 92vw;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(180deg, rgba(12, 20, 38, 0.96), rgba(8, 14, 28, 0.96));
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(12px);
  opacity: 0;
  transition: opacity 220ms ease, transform 220ms ease;
  pointer-events: none;
}

.lh-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.lh-toast__row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.lh-toast__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-top: 6px;
  background: linear-gradient(135deg, var(--gold), #fff);
  box-shadow: 0 0 18px rgba(246, 207, 121, 0.5);
  flex: 0 0 auto;
}

.lh-toast__dot--theme {
  background: linear-gradient(135deg, var(--gold), var(--blue));
}

.lh-toast__title {
  font-weight: 700;
  letter-spacing: 0.01em;
}

.lh-toast__subtitle {
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.45;
}

.overlay__eyebrow {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(99, 230, 255, 0.10);
  border: 1px solid rgba(99, 230, 255, 0.22);
  color: #dffaff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.overlay__card h2 {
  margin: 16px 0 10px;
  font-family: 'Orbitron', system-ui, sans-serif;
  font-size: clamp(2rem, 6vw, 3rem);
  line-height: 0.98;
  letter-spacing: 0.02em;
}

.overlay__card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.overlay__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 22px;
}

.board__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  justify-content: flex-start;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}

.board__stats span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(99, 230, 255, 0.10);
}

.board__stats strong {
  color: var(--text);
  font-size: 1rem;
}

.board[data-feedback="success"] .board__meter-fill {
  filter: saturate(1.25) brightness(1.08);
}

.board[data-feedback="shield"] .board__meter-fill {
  filter: hue-rotate(12deg) saturate(1.1);
}

.board[data-feedback="miss"] .board__meter-fill {
  filter: hue-rotate(-18deg) saturate(1.2) brightness(0.92);
}

.board[data-feedback="success"] .card--current,
.board[data-feedback="shield"] .card--current {
  animation: boardPulse 360ms ease;
}

.board--shake {
  animation: boardShake 420ms cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

.vault-strip {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.vault-strip__row,
.vault-strip__themes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
}

.vault-strip .chip {
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.82rem;
}

.vault-strip__themes .chip { font-size: 0.8rem; }

.vault-strip__themes {
  padding-bottom: 4px;
}

.vault-strip__themes .chip {
  box-shadow: 0 0 0 1px rgba(255,255,255,0.03) inset;
}

body[data-run-mood="hot"] .ambient--gold { opacity: 0.62; }
body[data-run-mood="fever"] .ambient--gold { opacity: 0.78; }
body[data-run-mood="overdrive"] .ambient--gold { opacity: 0.95; }

body[data-run-mood="hot"] .board::before {
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 213, 111, 0.16), transparent 28%),
    radial-gradient(circle at 100% 100%, rgba(119, 223, 255, 0.12), transparent 22%);
}

body[data-run-mood="fever"] .board::before {
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 213, 111, 0.18), transparent 28%),
    radial-gradient(circle at 100% 100%, rgba(255, 122, 138, 0.10), transparent 24%);
}

body[data-run-mood="overdrive"] .board::before {
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 240, 180, 0.22), transparent 30%),
    radial-gradient(circle at 100% 100%, rgba(119, 223, 255, 0.14), transparent 24%);
}

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .shell {
    width: 100%;
    min-height: 100dvh;
    padding: calc(8px + env(safe-area-inset-top)) 8px calc(8px + env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .masthead {
    display: none;
  }

  .hero {
    flex: 1;
    min-height: 0;
    gap: 6px;
  }

  .hero__copy {
    display: none;
  }

  .hero__board {
    min-height: 0;
    display: flex;
  }

  .board {
    flex: 1;
    min-height: 0;
    padding: 8px;
    display: flex;
    flex-direction: column;
  }

  .board__topline {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  #deckState,
  #timePill {
    display: none;
  }

  .board__meter {
    margin: 12px 2px 8px;
  }

  .board::after {
    inset: 8px;
  }

  .chip {
    min-height: 34px;
    font-size: 0.82rem;
  }

  .stage {
    flex: 1;
    min-height: 0;
    gap: 8px;
    padding: 4px 0 2px;
  }

  .card-stack {
    width: min(100%, 220px);
  }

  .turn-ring {
    inset: -10px;
    border-radius: 28px;
  }

  .stage__copy {
    width: 100%;
  }

  .stage__copy .odds {
    display: none;
  }

  .board__stats {
    gap: 6px;
    margin-top: 2px;
    justify-content: center;
  }

  .history {
    display: none;
  }

  .controls {
    position: static;
    z-index: 1;
    gap: 10px;
    margin-top: 6px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
  }

  .choice {
    min-height: 54px;
    border-radius: 16px;
    font-size: 0.88rem;
  }

  .vault-strip {
    display: none;
  }

  .overlay__card {
    padding: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }

  .ambient { animation: none; }
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(0, 20px, 0) scale(1.05); }
}

@keyframes boardPulse {
  0% { transform: translateY(0) scale(1); }
  40% { transform: translateY(-2px) scale(1.012); }
  100% { transform: translateY(0) scale(1); }
}

@keyframes boardShake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}
