: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-art,
.bg-art__img {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -3;
  pointer-events: none;
}

.bg-art__img {
  object-fit: cover;
  object-position: center;
}

.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: -1;
  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: none;
}

.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(62vw, 680px, 62vh);
  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%;
}

.jackpot-grid {
  display: none;
}

.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: var(--crest-pad, 0px) 0 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: none;
  }
  45% {
    opacity: 1;
    filter: none;
  }
  100% {
    opacity: 1;
    filter: none;
  }
}

.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: none;
}

.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,
.grid-frame {
  overflow: visible;
}

.frame-crest {
  position: absolute;
  left: var(--crest-x, 50%);
  top: var(--crest-y, 0px);
  z-index: 6;
  width: var(--crest-w, 48%);
  height: var(--crest-h, 14%);
  transform: translate(-50%, 0);
  pointer-events: none;
}

.frame-crest__bezel {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
}

.frame-crest__plate {
  position: absolute;
  left: var(--crest-hole-l, 16%);
  top: var(--crest-hole-t, 29%);
  z-index: 2;
  display: grid;
  place-items: center;
  width: var(--crest-hole-w, 68%);
  height: var(--crest-hole-h, 33%);
  overflow: hidden;
  min-width: 0;
  min-height: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.frame-crest__logo,
.frame-crest__score {
  grid-area: 1 / 1;
  min-width: 0;
  min-height: 0;
}

.frame-crest__logo {
  position: relative;
  z-index: 1;
  width: auto;
  height: 108%;
  max-width: none;
  max-height: 108%;
  object-fit: contain;
  object-position: center;
  opacity: 1;
  transform: none;
  transition:
    opacity 0.38s ease,
    transform 0.45s cubic-bezier(0.2, 0.75, 0.2, 1);
  filter: none;
}

.frame-crest.is-score .frame-crest__logo {
  opacity: 0;
  transform: scale(0.82) translateY(-8%);
}

.frame-crest__score {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.18em;
  width: 92%;
  height: 100%;
  opacity: 0;
  transform: scale(0.9);
  pointer-events: none;
  transition:
    opacity 0.32s ease,
    transform 0.4s cubic-bezier(0.2, 0.75, 0.2, 1);
}

.frame-crest.is-score .frame-crest__score {
  opacity: 1;
  transform: scale(1);
}

.frame-crest__win,
.frame-crest__mult {
  color: #fff2c4;
  font-family: var(--font-hud);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
  -webkit-text-stroke: 0.4px rgba(70, 12, 0, 0.9);
  text-shadow:
    0 2px 1px #240400,
    0 0 8px #ff5a0a,
    0 0 16px rgba(255, 150, 36, 0.8);
}

.frame-crest__win {
  font-size: clamp(14px, calc(var(--crest-h, 48px) * 0.16), 26px);
}

.frame-crest__times {
  display: inline-flex;
  align-items: baseline;
  gap: 0.06em;
}

.frame-crest__op {
  color: #ffb14a;
  font-family: var(--font-display);
  font-size: clamp(12px, calc(var(--crest-h, 48px) * 0.13), 20px);
}

.frame-crest__mult {
  font-size: clamp(13px, calc(var(--crest-h, 48px) * 0.15), 24px);
}

.frame-crest.is-pulse .frame-crest__win,
.frame-crest.is-pulse .frame-crest__mult {
  animation: crestPulse 0.42s ease-out;
}

@keyframes crestPulse {
  0% {
    filter: none;
    transform: scale(1.12);
  }
  100% {
    filter: none;
    transform: scale(1);
  }
}

.crest-win-fly,
.crest-mult-fly {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 80;
  color: #fff1bd;
  font-family: var(--font-hud);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  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);
}

.crest-mult-fly {
  font-family: var(--font-display);
}

.grid-felt {
  position: absolute;
  left: var(--pane-l, var(--hole-l));
  top: var(--pane-t, var(--hole-t));
  z-index: 2;
  width: var(--pane-w, var(--hole-w));
  height: var(--pane-h, var(--hole-h));
  object-fit: cover;
  object-position: center;
  pointer-events: none;
}

.grid-felt[hidden] {
  display: none;
}

.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.55);
  z-index: 2;
  pointer-events: none;
}

.grid-shell.has-felt::before {
  display: 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: none;
}

.reel.is-blur .reel__cell img {
  filter: none;
}

.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: none;
}

.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: none;
}

.symbol.is-win img {
  filter: none;
}

.symbol.is-dim {
  filter: none;
}

.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: 9;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(144px, 1.35fr);
  gap: 0;
  width: min(760px, calc(var(--frame-w) * 0.8));
  margin-top: clamp(-24px, -2.2vh, -10px);
  padding: 6px;
  border: 1px solid rgba(229, 184, 119, 0.24);
  border-radius: 16px;
  background: linear-gradient(160deg, #26221e, #141313 55%, #1e1a17);
  box-shadow: inset 0 1px 0 rgba(255, 240, 213, 0.08), 0 8px 24px #0008;
}

.meter {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 60px;
  padding: 7px 10px;
  min-width: 0;
  overflow: hidden;
  border: 0;
  background: none;
}

.meter--balance::after {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  right: 0;
  width: 1px;
  background: linear-gradient(transparent, rgba(229, 184, 119, 0.3), transparent);
  pointer-events: none;
}

.meter__label {
  display: block;
  font-family: var(--font-hud);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: #bba789;
  line-height: 1.2;
  white-space: nowrap;
}

.meter__value {
  display: block;
  font-size: clamp(19px, 2.2vw, 27px);
  font-weight: 700;
  line-height: 1.08;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: #fff1d6;
  text-shadow: 0 1px 2px #0008;
}

.meter > .meter__value {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

.meter__amount {
  display: grid;
  gap: 4px;
  min-width: 0;
  text-align: center;
}

.meter--bet {
  padding-left: 8px;
  padding-right: 8px;
}

.meter__row {
  display: grid;
  grid-template-columns: 44px minmax(36px, 1fr) 44px;
  align-items: center;
  justify-items: center;
  column-gap: 2px;
  width: 100%;
  min-width: 0;
}

.meter--bet .meter__value {
  width: 100%;
  min-width: 0;
  padding: 0;
  font-size: clamp(16px, 1.7vw, 22px);
  text-align: center;
}

.chip {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid rgba(225, 190, 139, 0.22);
  background: linear-gradient(155deg, #42372b, #29231d);
  color: #ffe0a8;
  font-family: Arial, sans-serif;
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
  text-align: center;
  cursor: pointer;
  flex-shrink: 0;
  appearance: none;
  -webkit-appearance: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
  box-shadow:
    inset 0 1px 0 rgba(255, 238, 207, 0.1),
    0 2px 4px #0004;
}

@media (hover: hover) {
  .chip:hover:not(:disabled) {
    background: linear-gradient(180deg, #4b3520, #2b2016);
    border-color: rgba(255, 180, 88, 0.65);
  }
}

.chip:active:not(:disabled) {
  transform: scale(0.95);
}

.chip:focus-visible {
  outline: 2px solid #ffcf85;
  outline-offset: -4px;
}

.chip:disabled {
  opacity: 0.4;
  cursor: default;
}

.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: none;
}

.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: none;
}

.spin:active:not(:disabled) {
  transform: scale(0.94);
}

.spin:disabled {
  cursor: default;
  filter: none;
}

.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: none;
  opacity: 0.72;
}

@keyframes spinPulse {
  50% {
    filter: none;
  }
}

.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: none;
  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: none;
  backdrop-filter: none;
}

@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: none;
  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: none;
    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: none;
}

.picks button.is-miss {
  opacity: 0.28;
  transform: scale(0.9);
}

@media (max-width: 820px) {
  .bg-art__img {
    filter: none;
  }

  .loader,
  .overlay {
    backdrop-filter: none;
  }

  .reel.is-blur .reel__cell img {
    filter: none;
  }

  .app {
    grid-template-rows: auto 1fr auto;
  }

  .top {
    gap: 4px;
    padding: calc(10px + env(safe-area-inset-top)) 10px 2px;
  }

  .logo {
    display: none;
  }

  .demo-chip {
    display: none;
  }

  .jackpots {
    width: 100%;
    display: block;
  }

  .jackpot-panel {
    display: none;
  }

  .jackpot-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
    width: 100%;
  }

  .jackpot-tile {
    --prize-accent: #df9367;
    position: relative;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-content: center;
    column-gap: 9px;
    row-gap: 3px;
    min-width: 0;
    min-height: 68px;
    padding: 10px 9px;
    overflow: hidden;
    border: 1px solid rgba(229, 184, 119, 0.2);
    border-radius: 14px;
    background:
      radial-gradient(ellipse at 0 50%, rgba(225, 113, 38, 0.1), transparent 70%),
      linear-gradient(150deg, #27221e, #141313 75%);
    box-shadow:
      inset 0 1px 0 rgba(255, 236, 207, 0.06),
      0 4px 12px #0004;
  }

  .jackpot-tile::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 18%;
    right: 18%;
    height: 2px;
    opacity: 0.65;
    background: linear-gradient(90deg, transparent, var(--prize-accent), transparent);
    pointer-events: none;
  }

  .jackpot-tile--flame { --prize-accent: #f5b561; }
  .jackpot-tile--inferno { --prize-accent: #f58a72; }
  .jackpot-tile--dragon-crown {
    --prize-accent: #f5d589;
    border-color: rgba(245, 213, 137, 0.34);
    background: linear-gradient(130deg, #352a1f, #191615 75%);
  }

  .jackpot-tile__icon {
    grid-row: 1 / 3;
    align-self: center;
    width: 44px;
    height: 44px;
    object-fit: contain;
    filter: none;
  }

  .jackpot-tile__name {
    font-family: var(--font-hud);
    align-self: end;
    font-size: clamp(8px, 2.3vw, 11px);
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--prize-accent);
    white-space: nowrap;
  }

  .jackpot-tile__val {
    font-size: clamp(19px, 5.6vw, 28px);
    font-weight: 700;
    line-height: 1.05;
    font-variant-numeric: tabular-nums;
    color: #fff1d6;
    text-shadow: 0 1px 2px #0008;
    white-space: nowrap;
  }

  .jackpot-tile--dragon-crown .jackpot-tile__val {
    color: #ffe4a7;
  }

  .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);
  }

  .frame-crest {
    width: var(--crest-w, 64%);
  }

  .frame-crest__win {
    font-size: clamp(14px, calc(var(--crest-h, 40px) * 0.4), 26px);
  }

  .frame-crest__mult {
    font-size: clamp(13px, calc(var(--crest-h, 40px) * 0.36), 22px);
  }

  .stage__content {
    transform: none;
  }

  .dock {
    justify-content: center;
    align-items: end;
    max-width: none;
    padding: 0 8px calc(8px + env(safe-area-inset-bottom));
  }

  .game-hud {
    width: calc(100vw - 20px);
    max-width: none;
    grid-template-columns: minmax(0, 1fr) minmax(164px, 1.5fr);
    gap: 0;
    margin-top: 10px;
    padding: 5px;
  }

  .meter {
    min-height: 58px;
    padding: 5px 8px;
  }

  .meter__label {
    font-size: clamp(9px, 2.3vw, 11px);
    letter-spacing: 0.1em;
  }

  .meter__value {
    font-size: clamp(21px, 5.6vw, 28px);
  }

  .meter--bet {
    padding-left: 8px;
    padding-right: 4px;
  }

  .meter__row {
    grid-template-columns: 44px minmax(36px, 1fr) 44px;
    column-gap: 2px;
  }

  .meter--bet .meter__value {
    font-size: clamp(21px, 5.6vw, 26px);
  }

  .chip {
    width: 44px;
    height: 44px;
    font-size: 22px;
    touch-action: manipulation;
  }

  .spin {
    width: min(176px, 44vw);
    height: min(176px, 44vw);
    margin-top: 0;
    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;
  }
}

@media (max-width: 820px) and (max-height: 700px) {
  .jackpot-tile {
    min-height: 60px;
    padding: 7px;
    grid-template-columns: 38px minmax(0, 1fr);
    column-gap: 6px;
  }

  .jackpot-tile__icon {
    width: 38px;
    height: 38px;
  }

  .jackpot-tile__val {
    font-size: clamp(16px, 4.8vw, 22px);
  }

  .meter {
    min-height: 54px;
  }

  .spin {
    width: min(156px, 40vw);
    height: min(156px, 40vw);
    margin-top: 0;
  }
}
