:root {
  --gold: #e4c56a;
  --gold-bright: #ffe9a8;
  --gold-dim: #9a7428;
  --ink: #140e08;
  --sand: #c4a574;
  --lapis: #1a3358;
  --cell: 108px;
  --dusk: 0;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  height: 100dvh;
  background: #0a0704 url("../assets/bg.jpg") center/cover no-repeat fixed;
  color: var(--gold-bright);
  font-family: "Cormorant Garamond", Georgia, serif;
  overflow: hidden;
}

body {
  touch-action: manipulation;
}

.vignette {
  position: fixed; inset: 0;
  background: radial-gradient(ellipse at center, transparent 38%, #000000d0 100%);
  pointer-events: none;
  z-index: 0;
}

.torches {
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse at 12% 78%, #ff9a2a22, transparent 42%),
    radial-gradient(ellipse at 88% 28%, #ffb43a18, transparent 36%);
  animation: flicker 3.6s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes flicker {
  0%, 100% { opacity: .65; }
  40% { opacity: 1; }
  70% { opacity: .8; }
}

.dusk {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1;
  background: linear-gradient(180deg, #14081acc, #4a1828aa 55%, #1a0808dd);
  opacity: var(--dusk);
  transition: opacity 1.4s ease;
}

.sun {
  position: fixed;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffe08a 0%, #ff9a2a 46%, transparent 72%);
  top: calc(7% + var(--dusk) * 36%);
  left: calc(10% + var(--dusk) * 76%);
  transform: translate(-50%, 0);
  pointer-events: none;
  z-index: 1;
  opacity: calc(0.9 - var(--dusk) * 0.45);
  filter: blur(.4px);
  box-shadow: 0 0 40px #ffb43a66;
  transition: top 1.4s ease, left 1.4s ease, opacity 1.4s ease;
}

.screen { position: relative; z-index: 2; }
.screen[hidden] { display: none !important; }

.screen.center {
  min-height: 100dvh;
  height: 100dvh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px 16px;
  gap: 10px;
}

.screen.center .cartouche { margin-top: 12px; }

.title-glass {
  width: min(220px, 42vw);
  filter: drop-shadow(0 12px 18px #000c);
  animation: float 4.4s ease-in-out infinite;
  background: radial-gradient(circle, #1a1008 42%, transparent 68%);
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.brand {
  font-family: Cinzel, serif;
  letter-spacing: .42em;
  text-transform: uppercase;
  font-size: 13px;
  color: #e6d09a;
}

.brand.tiny { letter-spacing: .28em; font-size: 11px; margin-bottom: 2px; }

.screen h1 {
  font-family: "Cinzel Decorative", Cinzel, serif;
  font-size: clamp(32px, 6vw, 64px);
  letter-spacing: .12em;
  color: var(--gold);
  text-shadow: 0 2px 0 #3a2508, 0 0 28px #e4c56a66;
}

.lede {
  font-size: 22px;
  font-style: italic;
  color: #ead9b4;
  max-width: 22em;
}

.sub-lede {
  font-size: 18px;
  color: #f6ead0;
  max-width: 34em;
  line-height: 1.45;
  background: #140e08cc;
  border: 1px solid #e4c56a33;
  padding: 12px 16px;
}

.cartouche {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: min(360px, 92vw);
  height: 94px;
  border: 0;
  background: transparent url("../assets/ui/btn.png") center/100% 100% no-repeat;
  color: #fff6d0;
  cursor: pointer;
  font-family: Cinzel, serif;
  filter: drop-shadow(0 6px 8px #0008);
  transition: filter .15s, transform .12s;
}

.cartouche:hover:not(:disabled) {
  filter: drop-shadow(0 0 12px #e4c56acc) brightness(1.08);
}
.cartouche:active:not(:disabled) {
  transform: translateY(2px);
  filter: brightness(.9);
}
.cartouche:disabled {
  filter: grayscale(.45) brightness(.75);
  cursor: default;
  opacity: .75;
}

.cartouche.tall-label {
  height: 110px;
}

.btn-title {
  font-weight: 700;
  font-size: 22px;
  letter-spacing: .14em;
  line-height: 1;
  color: #fff8dc;
  background: #120c08f0;
  border: 1px solid #e4c56a99;
  border-radius: 4px;
  padding: 5px 16px;
  text-shadow: 0 1px 2px #000;
}

.tall-label .btn-title {
  font-size: 15px;
  letter-spacing: .06em;
  line-height: 1.25;
  white-space: normal;
  max-width: 88%;
  text-align: center;
}

.btn-sub {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .06em;
  color: #f6ead0;
  background: #120c08e6;
  border-radius: 3px;
  padding: 2px 10px;
}

.scroll-card {
  position: relative;
  width: min(560px, 94vw);
  background: #1a120c url("../assets/ui/panel.jpg") center/cover no-repeat;
  padding: 56px 44px 40px;
  text-align: center;
  box-shadow: 0 24px 80px #000;
}

.scroll-card::before {
  content: "";
  position: absolute;
  inset: 36px 32px 32px;
  background: #120c08f5;
  border: 1px solid #e4c56a66;
  box-shadow: inset 0 0 24px #0008;
  pointer-events: none;
  z-index: 0;
}

.scroll-card > * { position: relative; z-index: 1; }

.scroll-card.wide { width: min(820px, 96vw); padding: 48px 36px 32px; }

.scroll-icon { height: 56px; margin-bottom: 6px; }
.glass-icon { height: 88px; }

.scroll-card h2 {
  font-family: "Cinzel Decorative", Cinzel, serif;
  color: #ffe9a8;
  font-size: 28px;
  margin-bottom: 10px;
  letter-spacing: .06em;
  text-shadow: 0 2px 0 #000, 0 0 12px #0008;
}

.fine {
  color: #fff6dc;
  font-size: 18px;
  line-height: 1.45;
  margin-bottom: 14px;
  text-shadow: 0 1px 2px #000;
}

.name-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
  margin: 8px 0 16px;
  font-family: Cinzel, serif;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: 12px;
  color: #e6d09a;
}

.name-field input {
  background: #140e08ee;
  border: 1px solid #e4c56a88;
  color: var(--gold-bright);
  font-family: Cinzel, serif;
  font-size: 20px;
  padding: 10px 12px;
  letter-spacing: .04em;
  text-transform: none;
}

.packs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.pack {
  border: 1px solid #e4c56a66;
  background: #140e08cc;
  color: var(--gold-bright);
  cursor: pointer;
  padding: 14px 8px 12px;
  font-family: Cinzel, serif;
  transition: transform .12s, box-shadow .12s, border-color .12s;
}

.pack:hover {
  border-color: var(--gold);
  box-shadow: 0 0 16px #e4c56a55;
  transform: translateY(-2px);
}

.pack .eur {
  font-size: 28px;
  color: var(--gold);
  letter-spacing: .04em;
}

.pack .nm {
  font-size: 13px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #ead9b4;
  margin: 4px 0;
}

.pack .sp {
  font-size: 12px;
  color: #c4a574;
}

.text-btn {
  background: none;
  border: 0;
  color: #ead9b4;
  font-family: Cinzel, serif;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

#screen-pay, #screen-leaders { z-index: 42; }

body.bonus-open { overflow: hidden; }

.overlay-screen {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: #000000b8;
  display: grid;
  place-items: center;
  padding: 20px;
  overflow-y: auto;
}

.game {
  height: 100dvh;
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 8px 14px 10px;
  overflow: hidden;
}

.hud-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  flex-shrink: 0;
}

.hud-actions { display: flex; gap: 8px; }

.hud-top .title-block { text-align: center; }
.hud-top h1 { font-size: clamp(20px, 3vw, 34px); }

.ghost {
  background: #140e08cc;
  border: 1px solid #e4c56a66;
  color: var(--gold);
  font-family: Cinzel, serif;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-size: 12px;
  padding: 10px 14px;
  cursor: pointer;
}

.ghost:hover { border-color: var(--gold); box-shadow: 0 0 12px #e4c56a44; }

.table {
  display: grid;
  grid-template-columns: clamp(200px, 18vw, 300px) minmax(0, 1fr) clamp(200px, 18vw, 300px);
  gap: 14px;
  align-items: stretch;
  width: 100%;
  margin: 0 auto;
  flex: 1;
  min-height: 0;
}

.rail {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}

.hour-card, .meter-card, .stat-card, .lead-peek {
  background: #140e08cc;
  border: 1px solid #e4c56a44;
  padding: 12px;
}

.hour-card { text-align: center; flex: 1; }

.glass-wrap {
  position: relative;
  width: min(200px, 86%);
  aspect-ratio: 1;
  height: auto;
  margin: 0 auto 8px;
}

.glass-wrap img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 10px #000a);
}

.sand-fill {
  position: absolute;
  left: 28%;
  right: 28%;
  bottom: 18%;
  height: 42%;
  background: linear-gradient(#e4c56a, #b8860b);
  opacity: .35;
  clip-path: inset(calc((1 - var(--sand, 1)) * 100%) 0 0 0);
  z-index: 1;
  filter: blur(6px);
}

.lbl {
  font-family: Cinzel, serif;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #ffe9a8;
  text-shadow: 0 1px 2px #000;
}

.num {
  font-family: Cinzel, serif;
  font-size: 30px;
  color: var(--gold);
  line-height: 1.15;
}

.num.sm { font-size: 22px; }
.num.pulse { animation: winpulse .45s ease; }
.muted { color: #f0e2c4; font-size: 14px; margin-top: 2px; text-shadow: 0 1px 2px #000; }

.hour-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}

.mini-cartouche {
  width: 100%;
  background: #140e08;
  border: 1px solid var(--gold);
  color: var(--gold-bright);
  font-family: Cinzel, serif;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-size: 12px;
  padding: 8px 6px;
  cursor: pointer;
}

.mini-cartouche:hover { box-shadow: 0 0 10px #e4c56a55; }
.mini-cartouche:disabled { opacity: .5; cursor: default; }

.scarab-row {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
  margin: 8px 0 6px;
}

.scarab-pip {
  aspect-ratio: 1;
  border: 1px solid #e4c56a66;
  background: #0a0704;
  overflow: hidden;
  opacity: .28;
  transition: opacity .2s, box-shadow .2s, transform .2s;
}

.scarab-pip.on {
  opacity: 1;
  box-shadow: 0 0 10px #e4c56acc;
}

.scarab-pip.fresh {
  animation: pippop .55s ease;
  box-shadow: 0 0 16px #ffe08a, 0 0 28px #e4c56a;
}

.scarab-pip img { width: 100%; height: 100%; object-fit: contain; }

#scarab-count {
  color: #ffe9a8;
  letter-spacing: .06em;
  margin-left: 6px;
}

.meter-card.charge {
  box-shadow: 0 0 18px #e4c56a99;
  border-color: #ffe08a;
}

.meter-card.ready {
  animation: riteready 1.1s ease;
}

@keyframes pippop {
  0% { transform: scale(.4); filter: brightness(2); }
  55% { transform: scale(1.25); }
  100% { transform: scale(1); }
}
@keyframes riteready {
  0%, 100% { box-shadow: none; }
  30%, 70% { box-shadow: 0 0 28px #ffe08acc, 0 0 48px #e4c56a99; }
}

.sym.rite img {
  animation: riteflash .7s ease-in-out infinite;
  filter: drop-shadow(0 0 12px #7ad0ff) drop-shadow(0 0 22px #e4c56a) brightness(1.35);
}
@keyframes riteflash {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

.fly-scarab {
  position: fixed;
  z-index: 80;
  pointer-events: none;
  will-change: transform;
}
.fly-scarab img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transform-origin: 50% 50%;
  filter: drop-shadow(0 0 14px #ffe08a) drop-shadow(0 0 26px #7ad0ff);
}

.hint-sm { font-size: 13px; color: #fff6dc; line-height: 1.3; text-shadow: 0 1px 2px #000; }

.stat-card {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stat-card img { width: 44px; height: 44px; object-fit: contain; }

.stat-card .lbl { line-height: 1.25; }

.stat-card.slim {
  display: grid;
  grid-template-columns: 1fr;
  text-align: center;
}

.lead-peek { font-size: 15px; color: #fff6dc; background: #0a0704ee; }
.lead-peek ol { list-style: none; }
.lead-peek li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 4px;
  border-bottom: 1px solid #e4c56a33;
  font-family: Cinzel, serif;
  font-size: 13px;
  color: #fff6dc;
  text-shadow: 0 1px 2px #000;
}
.lead-peek li.me { color: #ffe9a8; font-weight: 700; }
.lead-peek .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.disclaimer {
  font-size: 14px;
  line-height: 1.35;
  color: #fff6dc;
  background: #0a0704ee;
  border: 1px solid #e4c56a55;
  padding: 8px 10px;
  text-shadow: 0 1px 2px #000;
}

.stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  height: 100%;
}

.machine {
  position: relative;
  width: 100%;
  margin: 0 auto;
  flex: 0 0 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
  box-shadow: none;
  padding: 0;
  cursor: pointer;
}

.cabinet {
  width: 100%;
  height: 100%;
  object-fit: fill;
  display: block;
  pointer-events: none;
  filter: drop-shadow(0 12px 20px #000c);
}

.reels {
  position: absolute;
  left: 19.53%;
  width: 60.94%;
  top: 15.14%;
  height: 74.44%;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 3.2%;
  justify-content: center;
  margin: 0;
  z-index: 1;
  cursor: default;
}

.reel {
  position: relative;
  overflow: hidden;
  height: 100%;
  background: transparent;
  border: 0;
}

.reel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: linear-gradient(90deg, #00000033 0%, transparent 28%, transparent 72%, #00000033 100%);
}

.strip {
  will-change: transform;
  position: relative;
  z-index: 1;
  background: none;
}

.strip img {
  background: none !important;
}

.sym {
  width: 100%;
  height: var(--cell);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: none;
  border: 0;
  box-shadow: none;
}

.sym img {
  width: 92%;
  height: 92%;
  object-fit: contain;
  display: block;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.wild-tag {
  position: absolute;
  left: 50%;
  bottom: 8%;
  transform: translateX(-50%);
  z-index: 5;
  font-family: Cinzel, "Book Antiqua", serif;
  font-weight: 700;
  font-size: calc(var(--cell) * 0.13);
  letter-spacing: .16em;
  color: #fff8dc;
  background: #120c08f2;
  border: 1px solid #e4c56a;
  padding: 0.12em 0.45em 0.08em;
  line-height: 1;
  pointer-events: none;
  text-shadow: 0 1px 2px #000;
}

#reels.paying .reel { overflow: visible; }
#reels.paying .reel::after { opacity: 0; }
#reels.paying .strip { z-index: 5; }
#reels.paying .sym:not(.win) {
  opacity: .22;
  filter: grayscale(.45) brightness(.7);
  transition: opacity .2s, filter .2s;
}

.sym.win {
  z-index: 8;
  animation: winpop .4s cubic-bezier(.2, 1.4, .3, 1) both;
}
.sym.win::before {
  content: "";
  position: absolute;
  inset: 4%;
  border-radius: 50%;
  background: radial-gradient(circle, #ffe08a88 0%, #e4c56a33 42%, transparent 70%);
  animation: winglow .5s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}
.sym.win img {
  position: relative;
  z-index: 1;
  animation: winpulse .5s ease-in-out infinite;
  filter: drop-shadow(0 0 10px #ffe08a) drop-shadow(0 0 24px #e4c56acc) brightness(1.5);
}

@keyframes winpop {
  0% { transform: scale(.92); }
  55% { transform: scale(1.28); }
  100% { transform: scale(1.12); }
}
@keyframes winpulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 10px #ffe08a) brightness(1.35); }
  50% { transform: scale(1.14); filter: drop-shadow(0 0 26px #fff6c8) drop-shadow(0 0 40px #e4c56a) brightness(1.7); }
}
@keyframes winglow {
  0%, 100% { opacity: .55; transform: scale(.9); }
  50% { opacity: 1; transform: scale(1.15); }
}

.win-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9;
  overflow: visible;
}
.win-line {
  fill: none;
  stroke: #ffe9a8;
  stroke-width: 7;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 6px #fff6c8) drop-shadow(0 0 14px #e4c56a);
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: linedraw .4s ease-out forwards, linepulse .6s ease-in-out .4s infinite;
}
@keyframes linedraw {
  to { stroke-dashoffset: 0; }
}
@keyframes linepulse {
  0%, 100% { stroke: #ffe9a8; stroke-width: 6; }
  50% { stroke: #fff6c8; stroke-width: 9; }
}

.sym.gone {
  opacity: 0;
  transform: scale(.4);
  transition: opacity .22s, transform .22s;
}

@keyframes winpulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.35); }
}

.reel.anticipate {
  box-shadow: inset 0 0 18px #e4c56a88;
}

.reel.spinning .strip { filter: none; }

.win-banner {
  min-height: 42px;
  margin: 8px 0 4px;
  font-family: Cinzel, serif;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #ffe9a8;
  text-align: center;
  font-size: 18px;
  text-shadow: 0 1px 2px #000, 0 0 12px #e4c56a66;
  background: #120c08cc;
  border: 1px solid #e4c56a44;
  padding: 8px 12px;
}

.win-banner.big {
  font-size: 26px;
  color: #fff6c8;
  animation: winpulse .8s ease-in-out infinite;
}

.win-banner,
.controls {
  align-self: stretch;
}

.controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  margin-top: 4px;
}

.cartouche.spin { width: min(420px, 46%); height: 88px; }

.side-btn {
  width: 110px;
  height: 72px;
  border: 1px solid #e4c56a77;
  background: #140e08cc;
  color: var(--gold-bright);
  cursor: pointer;
  font-family: Cinzel, serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.side-btn .btn-title {
  font-size: 14px;
  padding: 3px 8px;
  background: transparent;
  border: 0;
}

.side-btn .btn-sub { background: transparent; font-size: 11px; color: #c4a574; }

.side-btn.on {
  border-color: var(--gold);
  box-shadow: 0 0 14px #e4c56a66;
}

.pay-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin: 16px 0;
  text-align: center;
}

.pay-art {
  position: relative;
  width: 88px;
  height: 88px;
  margin: 0 auto;
  background: none;
}
.pay-item img {
  width: 88px;
  height: 88px;
  object-fit: contain;
  background: none;
}
.pay-art .wild-tag { font-size: 11px; bottom: 6px; }

.pay-item .nm {
  font-family: Cinzel, serif;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #ffe9a8;
  margin: 4px 0 2px;
  text-shadow: 0 1px 2px #000;
}

.pay-item .pv { font-size: 14px; color: #fff6dc; text-shadow: 0 1px 2px #000; }

.board-list {
  list-style: none;
  margin: 12px 0 18px;
  text-align: left;
  background: #0a0704;
  border: 1px solid #e4c56a77;
  padding: 6px;
}

.board-list li {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid #e4c56a33;
  font-family: Cinzel, serif;
  font-size: 18px;
  color: #fff8e4;
  text-shadow: 0 1px 2px #000;
}

.board-list li:last-child { border-bottom: 0; }

.board-list li.me {
  background: #5a4218;
  color: #fff8e4;
  box-shadow: inset 0 0 0 1px #e4c56aaa;
  font-weight: 700;
}

.board-list .rk { color: #ffe08a; font-weight: 700; }

.board-list .when {
  display: block;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .06em;
  opacity: .7;
  margin-top: 2px;
}

.score {
  list-style: none;
  margin: 12px 0 8px;
  color: #fff6dc;
  font-size: 20px;
  text-align: left;
  background: #0a0704;
  border: 1px solid #e4c56a77;
  padding: 8px 10px;
}

.score li {
  display: flex;
  justify-content: space-between;
  padding: 4px 8px;
  border-bottom: 1px solid #e4c56a33;
}

.score .total {
  color: var(--gold);
  font-family: Cinzel, serif;
  font-size: 22px;
  margin-top: 6px;
}

.recap-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  background: #140e08ee;
  border: 1px solid var(--gold);
  color: var(--gold-bright);
  font-family: Cinzel, serif;
  font-size: 18px;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 12px 22px;
  z-index: 50;
  pointer-events: none;
}

.fly-coin {
  position: fixed;
  width: 36px;
  height: 36px;
  z-index: 60;
  pointer-events: none;
  transition: transform .7s cubic-bezier(.2, .7, .2, 1), opacity .7s;
}

.machine.shake { animation: shake .5s ease; }

@keyframes shake {
  0%, 100% { transform: none; }
  20% { transform: translate(-4px, 1px); }
  40% { transform: translate(5px, -2px); }
  60% { transform: translate(-3px, 2px); }
  80% { transform: translate(3px, 0); }
}

.burst {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 45;
  background: radial-gradient(circle at 50% 45%, #ffe08a55, transparent 55%);
  opacity: 0;
  animation: burst .7s ease;
}

@keyframes burst {
  0% { opacity: 0; }
  30% { opacity: 1; }
  100% { opacity: 0; }
}

@media (max-width: 1100px) {
  html, body { overflow: hidden; }
  .game {
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    padding: 4px 6px 6px;
  }
  .table {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    gap: 6px;
    align-items: stretch;
  }
  .left-rail { display: contents; }
  .hour-card { grid-column: 1; grid-row: 1; min-width: 0; }
  .meter-card { grid-column: 2; grid-row: 1; min-width: 0; }
  .right-rail {
    grid-column: 3;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
  }
  .stage {
    grid-column: 1 / -1;
    grid-row: 2;
    min-height: 0;
    overflow: hidden;
  }
  .disclaimer { display: none; }
  .machine { flex: none; max-width: 100%; }
}

@media (max-width: 900px) {
  .desktop-only { display: none !important; }
  .hint-sm { display: none; }
  .brand.tiny { display: none; }
  .hud-top .title-block { display: none; }
  .hud-top { margin-bottom: 2px; gap: 8px; }
  .ghost { padding: 8px 10px; font-size: 11px; letter-spacing: .08em; }
  #btn-fs { display: none; }

  .hour-card,
  .meter-card,
  .stat-card {
    padding: 6px 8px;
    min-width: 0;
    overflow: hidden;
  }
  .hour-card {
    display: grid;
    grid-template-columns: 36px 1fr;
    grid-template-rows: auto auto auto;
    column-gap: 6px;
    row-gap: 1px;
    text-align: left;
    align-items: center;
  }
  .glass-wrap {
    grid-row: 1 / 4;
    width: 36px;
    min-width: 36px;
    margin: 0;
  }
  .hour-card .lbl { font-size: 9px; }
  .hour-card .num { font-size: 16px; line-height: 1.1; }
  .hour-card .muted { font-size: 11px; }
  .hour-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    gap: 4px;
    margin-top: 4px;
  }
  .mini-cartouche {
    margin-top: 0;
    width: 100%;
    padding: 4px 6px;
    font-size: 9px;
  }

  .meter-card .lbl { font-size: 9px; }
  .scarab-row { gap: 2px; margin: 4px 0 0; }

  .right-rail .stat-card:not(.slim) {
    display: flex;
    align-items: center;
  }
  .right-rail .stat-card.slim {
    display: grid;
    grid-template-columns: 1fr;
  }
  .stat-card img { width: 20px; height: 20px; }
  .stat-card .num { font-size: 16px; }
  .stat-card .lbl { font-size: 9px; }
  .num.sm { font-size: 14px; }

  .win-banner {
    min-height: 24px;
    font-size: 12px;
    padding: 3px 8px;
    margin: 4px 0 2px;
  }
  .cartouche.spin { height: 58px; width: min(220px, 50%); }
  .side-btn { width: 64px; height: 48px; }
  .controls { gap: 6px; margin-top: 0; }
}

@media (max-width: 640px) {
  .pay-grid { grid-template-columns: repeat(2, 1fr); }
  .title-glass { width: 160px; }
  .scroll-card { padding: 36px 20px 24px; }
  .packs { grid-template-columns: 1fr; }
  .sun { display: none; }
}
