:root {
  --ember: #ff6a1a;
  --ember-hot: #ffd27a;
  --iron: #140e0a;
  --panel: rgba(8, 4, 2, 0.62);
  --line: rgba(255, 140, 40, 0.32);
  --text: #f6e6c8;
  --muted: #c4a27a;
  --cell: 88px;
  --cell-h: 88px;
  --gap: 6px;
  --pane-l: 0px;
  --pane-t: 0px;
  --pane-w: 100%;
  --pane-h: 100%;
  --grid-pad-l: 0px;
  --grid-pad-t: 0px;
  --reel-mask-bleed: clamp(8px, 1.4vw, 18px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --font-display: "Uncial Antiqua", "IM Fell English", serif;
  --font-lore: "IM Fell English", "Uncial Antiqua", serif;
  --font-hud: "Rajdhani", sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

img,
svg,
video {
  -webkit-user-drag: none;
  user-drag: none;
}

::selection {
  background: transparent;
}

html,
body {
  margin: 0;
  width: 100%;
  max-width: 100vw;
  height: 100%;
  height: 100dvh;
  background: #050201;
  color: var(--text);
  font-family: var(--font-hud);
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

button,
input {
  font-family: inherit;
}

.app {
  position: relative;
  width: 100%;
  max-width: 100vw;
  height: 100%;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  isolation: isolate;
  touch-action: manipulation;
}

.bg-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -3;
  filter: saturate(1.08) contrast(1.05);
}

.bg-dim {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(
      ellipse at 50% 42%,
      rgba(0, 0, 0, 0.18),
      rgba(0, 0, 0, 0.62) 70%
    ),
    linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.35),
      transparent 18%,
      transparent 72%,
      rgba(0, 0, 0, 0.55)
    );
  pointer-events: none;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  box-shadow: inset 0 0 140px 40px rgba(0, 0, 0, 0.55);
}

.loader {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-content: center;
  gap: 18px;
  background: #000;
  backdrop-filter: none;
  transition: opacity 0.6s var(--ease-out);
}

.loader.is-done {
  opacity: 0;
  pointer-events: none;
}

.loader__logo {
  width: min(72vw, 640px);
  height: auto;
}

.loader__text {
  margin: 0;
  text-align: center;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--muted);
}

.loader__bar {
  width: min(52vw, 320px);
  height: 4px;
  margin: 0 auto;
  background: #2a160c;
  overflow: hidden;
  border-radius: 99px;
}

.loader__bar span {
  display: block;
  height: 100%;
  width: 8%;
  background: linear-gradient(90deg, #7a2a00, var(--ember), var(--ember-hot));
  box-shadow: 0 0 12px var(--ember);
  transition: width 0.2s linear;
}

.orientation-lock {
  display: none;
}

@media (orientation: landscape) and (max-height: 600px) and (pointer: coarse) {
  .orientation-lock {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 12px;
    padding: 24px;
    background: #000;
    color: #fff0c7;
    text-align: center;
  }

  .orientation-lock strong {
    font-family: var(--font-hud);
    font-size: clamp(18px, 5vw, 28px);
    letter-spacing: 0.16em;
    color: #ff6a1a;
    text-shadow: 0 0 14px rgba(255, 61, 10, 0.6);
  }

  .orientation-lock > span:last-child {
    font-size: 13px;
    letter-spacing: 0.08em;
    color: #c4a27a;
  }

  .orientation-lock__phone {
    position: relative;
    width: 42px;
    height: 70px;
    border: 2px solid #ff8b38;
    border-radius: 8px;
    box-shadow: 0 0 18px rgba(255, 75, 10, 0.36);
    animation: portraitHint 1.4s ease-in-out infinite;
  }

  .orientation-lock__phone::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 5px;
    width: 5px;
    height: 5px;
    transform: translateX(-50%);
    border-radius: 50%;
    background: #ff8b38;
  }
}

@keyframes portraitHint {
  50% {
    transform: rotate(-8deg);
  }
}

.top {
  position: relative;
  z-index: 4;
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: calc(6px + env(safe-area-inset-top)) 16px 0;
}

.logo {
  width: min(36vw, 340px);
  height: auto;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.7));
}

.demo-chip {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.jackpots {
  display: block;
  width: 100%;
}

.jp {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 150px;
  padding: 4px 12px 4px 4px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 0 18px rgba(255, 90, 0, 0.12);
}

.jp img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.jp__meta {
  display: grid;
  line-height: 1;
}

.jp__name {
  font-family: var(--font-display);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.jp__val {
  font-size: 18px;
  font-weight: 700;
  color: var(--ember-hot);
  text-shadow: 0 0 10px rgba(255, 110, 20, 0.45);
}

.jackpot-panel {
  position: relative;
  width: min(78vw, 840px, 82vh);
  margin: 0 auto;
  container-type: inline-size;
}

.jackpot-panel img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  user-select: none;
}

.jackpot-panel__value {
  position: absolute;
  z-index: 2;
  top: 52.5%;
  transform: translate(-50%, -50%);
  width: 17%;
  margin: 0;
  color: #fff0b8;
  font-family: var(--font-hud);
  font-size: clamp(11px, 3cqw, 28px);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-align: center;
  letter-spacing: 0.035em;
  white-space: nowrap;
  -webkit-text-stroke: 0.35px rgba(74, 18, 0, 0.9);
  text-shadow:
    0 2px 1px #280500,
    0 0 6px rgba(255, 94, 0, 0.9),
    0 0 12px rgba(255, 180, 50, 0.45);
}

.jackpot-panel__value--ember {
  left: 15.5%;
}

.jackpot-panel__value--flame {
  left: 38.3%;
}

.jackpot-panel__value--dragon-crown {
  left: 65.3%;
  width: 18%;
}

.jackpot-panel__value--inferno {
  left: 91.2%;
}

.stage {
  position: relative;
  z-index: 3;
  display: grid;
  place-items: center;
  min-height: 0;
}

.stage__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  min-height: 0;
}

.grid-frame {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.grid-shell {
  position: relative;
  width: var(--frame-w);
  height: var(--frame-h);
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.multiplier-rise {
  position: absolute;
  left: 0;
  top: -100%;
  z-index: 4;
  width: 100%;
  height: calc(100% + var(--pane-t));
  overflow: hidden;
  pointer-events: none;
}

.multiplier-circle {
  position: absolute;
  left: 76%;
  top: 100%;
  z-index: 1;
  display: grid;
  place-items: center;
  width: clamp(84px, 16%, 165px);
  aspect-ratio: 1 / 1;
  transform: translate(-50%, 12%);
  opacity: 0;
  visibility: hidden;
  clip-path: inset(0 0 35% 0);
  pointer-events: none;
  transition:
    transform 1.85s cubic-bezier(0.22, 0.72, 0.2, 1),
    opacity 0.75s ease,
    visibility 0s linear 1.85s;
}

.multiplier-circle img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.multiplier-circle__value {
  position: absolute;
  left: 76%;
  top: 100%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: clamp(84px, 16%, 165px);
  min-width: clamp(84px, 16%, 165px);
  max-width: clamp(84px, 16%, 165px);
  aspect-ratio: 1 / 1;
  transform: translate(-50%, 12%) translateY(-11px);
  opacity: 0;
  visibility: hidden;
  clip-path: inset(0 0 35% 0);
  color: #fff1c4;
  font-family: var(--font-display);
  font-size: clamp(18px, calc(var(--frame-w) * 0.027), 30px);
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
  -webkit-text-stroke: 0.35px rgba(72, 13, 0, 0.9);
  text-shadow:
    0 2px 1px #2a0500,
    0 0 7px #ff6a13,
    0 0 15px rgba(255, 155, 43, 0.72);
  transition:
    transform 1.85s cubic-bezier(0.22, 0.72, 0.2, 1),
    opacity 0.75s ease,
    visibility 0s linear 1.85s;
}

.multiplier-circle--left,
.multiplier-circle__value--left {
  left: 24%;
}

.grid-shell.is-bonus-multiplier .multiplier-circle {
  transform: translate(-50%, -65%);
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

.grid-shell.is-bonus-multiplier .multiplier-circle__value {
  transform: translate(-50%, -65%) translateY(-11px);
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

.multiplier-circle__value.is-single {
  font-size: clamp(23px, calc(var(--frame-w) * 0.038), 40px);
}

.multiplier-circle__value.is-double {
  font-size: clamp(16px, calc(var(--frame-w) * 0.025), 27px);
}

.multiplier-circle__value.is-long {
  font-size: clamp(13px, calc(var(--frame-w) * 0.021), 23px);
}

.multiplier-circle__value.is-changing {
  animation: multiplierValueUpdate 0.42s ease-out;
}

@keyframes multiplierValueUpdate {
  0% {
    opacity: 0.35;
    filter: brightness(2.4);
  }
  45% {
    opacity: 1;
    filter: brightness(1.75) drop-shadow(0 0 8px #ff5b0b);
  }
  100% {
    opacity: 1;
    filter: brightness(1);
  }
}

.fc-multiplier-fly {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 80;
  color: #fff1bd;
  font-family: var(--font-display);
  font-size: clamp(18px, 3.5vw, 34px);
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
  will-change: transform, opacity;
  -webkit-text-stroke: 0.4px rgba(70, 12, 0, 0.9);
  text-shadow:
    0 2px 2px #260400,
    0 0 8px #ff5a0a,
    0 0 18px rgba(255, 153, 35, 0.95),
    0 0 30px rgba(255, 50, 0, 0.72);
}

.scatter-spins-fly {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 80;
  object-fit: contain;
  pointer-events: none;
  will-change: transform, opacity;
  filter:
    drop-shadow(0 0 8px #ff5a0a)
    drop-shadow(0 0 18px rgba(255, 153, 35, 0.95));
}

.bonus-win-calc {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 12;
  transform: translate(-50%, -50%);
  color: #fff2c6;
  font-family: var(--font-display);
  font-size: clamp(32px, calc(var(--cell) * 0.64), 66px);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: 0.035em;
  white-space: nowrap;
  pointer-events: none;
  -webkit-text-stroke: 0.55px rgba(69, 10, 0, 0.92);
  text-shadow:
    0 3px 2px #220300,
    0 0 9px #ff5a0a,
    0 0 21px rgba(255, 139, 25, 0.96),
    0 0 38px rgba(255, 48, 0, 0.76);
}

.bonus-win-calc:not([hidden]) {
  animation: bonusWinCalcIn 1.55s cubic-bezier(0.2, 0.75, 0.2, 1) both;
}

@keyframes bonusWinCalcIn {
  0% {
    opacity: 0;
    transform: translate(-50%, -42%) scale(0.72);
  }
  24% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
  }
  76% {
    opacity: 1;
    transform: translate(-50%, -54%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -62%) scale(0.96);
  }
}

.grid-bezel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  pointer-events: none;
  z-index: 5;
}

.grid-shell::before {
  content: "";
  position: absolute;
  left: var(--pane-l, var(--hole-l));
  top: var(--pane-t, var(--hole-t));
  width: var(--pane-w, var(--hole-w));
  height: var(--pane-h, var(--hole-h));
  background: rgba(2, 0, 0, 0.83125);
  z-index: 2;
  pointer-events: none;
}

.pm-hud {
  position: relative;
  top: auto;
  left: auto;
  transform: none;
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 6px 14px;
  background: rgba(40, 10, 0, 0.85);
  border: 1px solid var(--ember);
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.12em;
  white-space: nowrap;
  box-shadow: 0 0 22px rgba(255, 80, 0, 0.35);
}

.pm-hud[hidden] {
  display: none !important;
}

.pm-hud strong {
  color: var(--ember-hot);
  font-size: 16px;
}

.grid {
  position: absolute;
  left: var(--hole-l);
  top: var(--hole-t);
  width: var(--hole-w);
  height: var(--hole-h);
  overflow: visible;
  clip-path: inset(
    calc(0px - var(--reel-mask-bleed))
    0
    calc(0px - var(--reel-mask-bleed))
    0
  );
  z-index: 3;
}

.reel {
  position: absolute;
  top: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 2;
  contain: layout style;
}

.reel__strip {
  will-change: transform;
  backface-visibility: hidden;
  transform: translate3d(0, 0, 0);
}

.reel__cell {
  position: relative;
  display: grid;
  place-items: center;
}

.reel__cell img {
  width: 88%;
  height: 88%;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.55));
}

.reel.is-blur .reel__cell img {
  filter: blur(1.2px) brightness(1.06) saturate(1.08);
}

.symbol {
  position: absolute;
  width: var(--cell);
  height: var(--cell-h);
  display: grid;
  place-items: center;
  will-change: transform, opacity, filter;
  transform: translate3d(0, 0, 0);
}

.symbol img {
  width: 88%;
  height: 88%;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.55));
}

.symbol.is-special:not(.is-fc) img {
  width: 96%;
  height: 96%;
}

.symbol.is-fc,
.reel__cell.is-fc {
  display: grid;
  place-items: center;
}

.fc-plate {
  position: relative;
  width: min(90%, calc(var(--cell-h) * 0.9 * 784 / 776));
  aspect-ratio: 784 / 776;
}

.fc-plate img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.55));
}

.symbol.is-win img {
  filter: drop-shadow(0 0 10px rgba(255, 170, 40, 0.95))
    drop-shadow(0 0 22px rgba(255, 80, 0, 0.7));
}

.symbol.is-dim {
  filter: brightness(0.38) saturate(0.7);
}

.cluster-win-amount {
  position: absolute;
  z-index: 9;
  transform: translate(-50%, -50%);
  color: #fff4c9;
  font-family: var(--font-hud);
  font-size: clamp(16px, calc(var(--cell) * 0.3), 30px);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: 0.02em;
  white-space: nowrap;
  pointer-events: none;
  -webkit-text-stroke: 0.4px rgba(72, 15, 0, 0.8);
  text-shadow:
    0 2px 2px #210400,
    0 0 7px #ff5a0b,
    0 0 15px rgba(255, 153, 38, 0.9),
    0 0 28px rgba(255, 64, 0, 0.7);
  animation: clusterAmountIn 0.58s var(--ease-out) both;
}

@keyframes clusterAmountIn {
  0% {
    opacity: 0;
    transform: translate(-50%, -35%) scale(0.72);
  }
  28% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.13);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -60%) scale(1);
  }
}

.fc-val {
  position: absolute;
  left: 50.1%;
  top: 45%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: calc(min(var(--cell), var(--cell-h)) * 0.2);
  line-height: 0;
  letter-spacing: -0.04em;
  color: #fff6d2;
  text-shadow:
    0 0 10px #ff7a18,
    0 2px 0 #4a1200;
  pointer-events: none;
  white-space: nowrap;
}

.fc-val.is-long {
  font-size: calc(min(var(--cell), var(--cell-h)) * 0.15);
}

.win-banner {
  position: absolute;
  left: 50%;
  bottom: calc(var(--hole-b) + 10px);
  transform: translateX(-50%);
  z-index: 5;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(20, 6, 0, 0.88);
  border: 1px solid var(--ember);
  font-family: var(--font-display);
  letter-spacing: 0.12em;
  font-size: 13px;
  color: var(--ember-hot);
  box-shadow: 0 0 24px rgba(255, 90, 0, 0.4);
  pointer-events: none;
}

.dock {
  position: relative;
  z-index: 5;
  display: flex;
  justify-content: center;
  align-items: end;
  padding: 4px 24px calc(10px + env(safe-area-inset-bottom));
  max-width: 920px;
  width: 100%;
  margin: 0 auto;
}

.game-hud {
  position: relative;
  z-index: 7;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: min(760px, calc(var(--frame-w) * 0.8));
  margin-top: clamp(-24px, -2.2vh, -10px);
}

.meter {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60px;
  padding: 8px 12px 9px;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 76, 20, 0.62);
  border-radius: 9px;
  background:
    radial-gradient(circle at 50% -65%, rgba(255, 72, 8, 0.2), transparent 58%),
    linear-gradient(145deg, rgba(25, 28, 31, 0.98), rgba(5, 6, 7, 0.99) 64%, rgba(17, 8, 5, 0.99));
  box-shadow:
    inset 0 1px 0 rgba(255, 232, 205, 0.1),
    inset 0 -14px 24px rgba(0, 0, 0, 0.42),
    0 7px 15px rgba(0, 0, 0, 0.55),
    0 0 13px rgba(255, 47, 0, 0.16);
}

.meter::before {
  content: "";
  position: absolute;
  top: 0;
  left: 14%;
  right: 14%;
  height: 1px;
  background: linear-gradient(90deg, transparent, #ff3d0a 28%, #ffb13b 50%, #ff3d0a 72%, transparent);
  box-shadow: 0 0 9px rgba(255, 55, 8, 0.9);
  pointer-events: none;
}

.meter::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(202, 211, 218, 0.08);
  border-radius: 5px;
  pointer-events: none;
}

.meter--win {
  text-align: center;
}

.meter__label {
  display: block;
  font-family: var(--font-hud);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: #ff7331;
  text-shadow: 0 0 7px rgba(255, 54, 0, 0.32);
}

.meter__value {
  display: block;
  font-size: clamp(19px, 2.2vw, 27px);
  font-weight: 700;
  line-height: 1.08;
  font-variant-numeric: tabular-nums;
  color: #fff0c7;
  text-shadow:
    0 0 8px rgba(255, 172, 72, 0.46),
    0 1px 2px #000;
}

.meter__row {
  display: grid;
  grid-template-columns: 27px 5.5ch 27px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.meter--bet .meter__value {
  width: 5.5ch;
  min-width: 5.5ch;
  text-align: center;
}

.chip {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 83, 24, 0.72);
  background: linear-gradient(145deg, #23272b, #070809 70%);
  color: #ffb14a;
  font-family: Arial, sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
  text-align: center;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 0 8px rgba(255, 55, 0, 0.12);
}

.chip:hover {
  background: linear-gradient(145deg, #34383c, #100806 72%);
}

.spin {
  position: relative;
  width: 118px;
  height: 118px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transform: translateZ(0);
  transition:
    transform 0.18s var(--ease-out),
    filter 0.18s ease;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.55));
}

.spin img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.spin img[hidden] {
  display: none;
}

.spin:hover:not(:disabled) {
  transform: scale(1.06);
  filter: drop-shadow(0 0 18px rgba(255, 110, 20, 0.55));
}

.spin:active:not(:disabled) {
  transform: scale(0.94);
}

.spin:disabled {
  cursor: default;
  filter: grayscale(0.15) brightness(0.85);
}

.spin.is-busy:not(.is-stop) img {
  animation: spinPulse 0.9s ease-in-out infinite;
}

.spin.is-stop img {
  animation: none;
}

.spin.is-stopping {
  filter: grayscale(0.9) brightness(0.52) drop-shadow(0 5px 8px rgba(0, 0, 0, 0.55));
  opacity: 0.72;
}

@keyframes spinPulse {
  50% {
    filter: brightness(1.25);
  }
}

.turbo {
  position: fixed;
  right: 16px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.mute--dock {
  bottom: calc(46px + env(safe-area-inset-bottom));
}

.tabs,
.sheet:not(.sheet--menu) {
  display: none;
}

.sheet--menu {
  display: contents;
}

.sheet--menu h2,
.turbo--menu,
.demo-chip--menu {
  display: none;
}

.test {
  position: fixed;
  left: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 9;
}

.test__toggle {
  background: rgba(20, 8, 4, 0.8);
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 10px;
  letter-spacing: 0.18em;
  font-size: 11px;
  cursor: pointer;
}

.test.is-open .test__body {
  display: grid;
}

.test__body {
  display: none;
  gap: 6px;
  margin-top: 8px;
  padding: 10px;
  width: 180px;
  background: rgba(10, 4, 2, 0.92);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.test__body p {
  margin: 0 0 4px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.test__body button,
.test__body label {
  font-size: 12px;
  text-align: left;
  background: #1a0c08;
  color: var(--text);
  border: 1px solid #3a2214;
  border-radius: 6px;
  padding: 6px 8px;
  cursor: pointer;
}

.test__body label {
  display: flex;
  gap: 8px;
  align-items: center;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right))
    max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(4px);
  cursor: pointer;
}

.overlay[hidden] {
  display: none;
}

.overlay__card {
  text-align: center;
  width: min(92vw, 760px);
  max-width: 100%;
  padding: 0 4px;
}

.overlay__title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: clamp(28px, 6vw, 64px);
  letter-spacing: 0.12em;
  color: var(--ember-hot);
  text-shadow: 0 0 28px rgba(255, 90, 0, 0.7);
}

.overlay__sub {
  margin: 0 0 22px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.popup {
  --popup-l: 10.03%;
  --popup-r: 10.03%;
  --popup-t: 15.625%;
  --popup-b: 17.383%;
  --popup-w: min(calc(100vw - 24px), 760px, calc((100vh - 28px) * 1.5));
  position: relative;
  width: var(--popup-w);
  height: calc(var(--popup-w) * 0.6666667);
  flex: none;
  padding: 0;
  text-align: center;
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: hidden;
  animation: popupIn 0.45s var(--ease-out);
}

.popup--bonus-art {
  --popup-w: min(94vw, calc(100vh - 20px), 780px);
  display: block;
  width: var(--popup-w);
  height: var(--popup-w);
  aspect-ratio: 1 / 1;
  cursor: pointer;
}

.overlay.is-bonus-popup {
  background: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

@supports (height: 100dvh) {
  .popup--bonus-art {
    --popup-w: min(94vw, calc(100dvh - 20px), 780px);
  }
}

.popup__artwork {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.popup__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  object-position: center;
  pointer-events: none;
  z-index: 1;
}

.popup__inner {
  container-type: size;
  position: absolute;
  left: var(--popup-l);
  top: var(--popup-t);
  right: var(--popup-r);
  bottom: var(--popup-b);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  gap: 1.2cqh;
  padding: 3cqh 4cqw 3.4cqh;
  overflow: hidden;
  background: rgba(6, 2, 0, 0.7);
}

.popup__sigil {
  width: min(28cqw, 34cqh, 96px);
  height: auto;
  margin: 0;
  display: block;
  flex: 0 0 auto;
  filter: drop-shadow(0 0 22px rgba(255, 90, 0, 0.55));
  animation: popupGlow 1.8s ease-in-out infinite;
}

.popup__kicker {
  margin: 0;
  font-family: var(--font-lore);
  font-size: clamp(10px, 6.4cqh, 13px);
  letter-spacing: 0.08em;
  font-style: italic;
  color: var(--muted);
}

.popup__count {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(26px, 26cqh, 84px);
  line-height: 0.86;
  font-weight: 400;
  color: var(--ember-hot);
  text-shadow: 0 0 28px rgba(255, 90, 0, 0.75);
}

.popup__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(14px, 11cqh, 30px);
  letter-spacing: 0.06em;
  color: #fff3d2;
}

.popup__sub {
  margin: 0;
  font-family: var(--font-lore);
  letter-spacing: 0.04em;
  font-style: italic;
  font-size: clamp(10px, 6.8cqh, 14px);
  color: var(--muted);
  max-width: 94%;
}

.popup__continue {
  margin: 0;
  font-family: var(--font-lore);
  letter-spacing: 0.1em;
  font-style: italic;
  font-size: clamp(10px, 6.2cqh, 13px);
  color: var(--ember-hot);
  animation: popupBlink 1.2s ease-in-out infinite;
}

@container (max-height: 168px) {
  .popup__kicker {
    display: none;
  }

  .popup__sigil {
    width: min(22cqw, 26cqh, 48px);
  }
}

@container (max-height: 128px) {
  .popup__sub {
    display: none;
  }
}

@keyframes popupIn {
  from {
    opacity: 0;
    transform: scale(0.86);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes popupGlow {
  50% {
    filter: drop-shadow(0 0 34px rgba(255, 160, 40, 0.9));
    transform: scale(1.04);
  }
}

@keyframes popupBlink {
  50% {
    opacity: 0.35;
  }
}

.picks {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.picks button {
  width: 112px;
  height: 112px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease-out);
}

.picks button:hover {
  transform: scale(1.08);
}

.picks img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.picks button.is-locked {
  transform: scale(1.16);
  filter: drop-shadow(0 0 22px rgba(255, 180, 40, 0.9));
}

.picks button.is-miss {
  opacity: 0.28;
  transform: scale(0.9);
}

@media (max-width: 820px) {
  .bg-video {
    filter: none;
  }

  .loader,
  .overlay {
    backdrop-filter: none;
  }

  .reel.is-blur .reel__cell img {
    filter: brightness(1.04);
  }

  .app {
    grid-template-rows: auto 1fr auto;
  }

  .top {
    gap: 6px;
    padding: calc(14px + env(safe-area-inset-top)) 6px 0;
  }

  .logo {
    display: none;
  }

  .demo-chip {
    display: none;
  }

  .jackpots {
    width: 100%;
    display: block;
  }

  .jackpot-panel {
    width: min(94%, 78vh);
  }

  .top .jackpot-panel {
    transform: translateY(clamp(42px, 6.5dvh, 58px));
  }

  .jp {
    min-width: 0;
    flex: none;
    gap: 10px;
    padding: 9px 12px 9px 8px;
    border-radius: 16px;
  }

  .jp img {
    width: 44px;
    height: 44px;
  }

  .jp__name {
    font-size: 10px;
    letter-spacing: 0.1em;
  }

  .jp__val {
    font-size: 19px;
  }

  .pm-hud {
    width: min(100%, 420px);
    margin-top: 2px;
    font-size: 11px;
    padding: 5px 10px;
  }

  .multiplier-circle {
    left: 75%;
    width: clamp(68px, 18%, 112px);
    transform: translate(-50%, 12%);
  }

  .multiplier-circle__value {
    left: 75%;
    width: clamp(68px, 18%, 112px);
    min-width: clamp(68px, 18%, 112px);
    max-width: clamp(68px, 18%, 112px);
    transform: translate(-50%, 12%) translateY(-9px);
  }

  .multiplier-circle--left,
  .multiplier-circle__value--left {
    left: 25%;
  }

  .grid-shell.is-bonus-multiplier .multiplier-circle {
    transform: translate(-50%, -65%);
  }

  .grid-shell.is-bonus-multiplier .multiplier-circle__value {
    transform: translate(-50%, -65%) translateY(-9px);
  }

  .stage__content {
    transform: translateY(clamp(-24px, -2.5dvh, -14px));
  }

  .dock {
    justify-content: center;
    align-items: end;
    max-width: none;
    padding: 0 8px 4px;
  }

  .game-hud {
    width: min(96vw, calc(var(--frame-w) * 0.94));
    gap: 6px;
    margin-top: clamp(-18px, -2dvh, -8px);
  }

  .meter {
    min-height: 50px;
    padding: 5px 3px 6px;
    border-radius: 7px;
  }

  .meter__label {
    font-size: clamp(7px, 2.1vw, 9px);
    letter-spacing: 0.1em;
  }

  .meter--win .meter__label {
    color: var(--ember);
  }

  .meter__value {
    font-size: clamp(15px, 4.5vw, 23px);
  }

  .meter--win .meter__value {
    font-size: clamp(16px, 4.8vw, 24px);
  }

  .meter__row {
    grid-template-columns: 23px 5.5ch 23px;
    gap: 3px;
  }

  .chip {
    width: 23px;
    height: 23px;
    font-size: 16px;
  }

  .spin {
    width: 158px;
    height: 158px;
    margin-top: -62px;
    z-index: 6;
  }

  .turbo:not(.turbo--menu) {
    display: none;
  }

  .sheet--menu {
    display: none;
  }

  .sheet--menu h2,
  .demo-chip--menu {
    display: block;
  }

  .sheet {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 8;
    padding: calc(18px + env(safe-area-inset-top)) 16px 96px;
    overflow: auto;
    background: rgba(5, 2, 1, 0.94);
  }

  .sheet:not([hidden]),
  .sheet--menu.is-open {
    display: block;
  }

  .sheet h2 {
    margin: 0 0 16px;
    font-family: var(--font-display);
    letter-spacing: 0.08em;
    color: var(--ember-hot);
  }

  .jackpots--sheet {
    display: block;
  }

  .jackpots--sheet .jp {
    min-width: 0;
    padding: 10px 14px;
    border-radius: 16px;
  }

  .jackpots--sheet .jp img {
    width: 48px;
    height: 48px;
  }

  .jackpots--sheet .jp__name {
    font-size: 12px;
  }

  .jackpots--sheet .jp__val {
    font-size: 26px;
  }

  .turbo--menu {
    position: static;
    display: flex;
    margin-bottom: 16px;
  }

  .demo-chip--menu {
    display: block;
  }

  .test {
    position: static;
    display: block;
    margin-top: 18px;
  }

  body.is-tab-jackpots .stage,
  body.is-tab-jackpots .dock,
  body.is-tab-menu .stage,
  body.is-tab-menu .dock {
    visibility: hidden;
  }

  .overlay__title {
    font-size: clamp(22px, 8vw, 40px);
  }

  .overlay__sub {
    margin: 0 0 16px;
    font-size: 11px;
    letter-spacing: 0.1em;
    padding: 0 8px;
  }

  .picks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    max-width: min(72vw, 280px);
    margin: 0 auto;
  }

  .picks button {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
  }
}
