/* Emerald Vault — slot-specific styling. Shares the widget chrome from player.css.
   Art package: public/assets/emerald-vault/ (21 WebPs). All art is pre-rendered on a black
   background with no baked-in text; black is keyed out with `mix-blend-mode: screen`. */

/* --- Screen background: base, free-spins and portrait/mobile variants --- */
.player-widget{background-image:url('/assets/emerald-vault/bg-base.webp');background-position:center;background-size:cover}
.player-widget:has(#player-board[data-bonus="free-spins"]){background-image:url('/assets/emerald-vault/bg-free-spins.webp')}

/* --- Header logo --- */
.widget-header .identity h1{display:flex;align-items:center;gap:8px}
.identity .logo{height:42px;width:auto;max-width:100%;display:block;mix-blend-mode:screen}
@media(max-width:760px){.identity .logo{height:34px}}

/* --- Reel board: dark well, structural gold/emerald frame, vertical reel strips ---
   Each column is a `.slot-reel` window (overflow hidden) holding a `.slot-reel-strip` of
   REEL_LEN (16) symbol tiles. The strip is translated via `transform: translateY(%)` during a
   spin (offsets are percentages of the strip's own height, so no JS pixel math is required). */
.slot-scene .slot-board-wrap{position:relative}
.slot-board{position:relative;isolation:isolate;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));column-gap:7px;width:min(560px,86%);aspect-ratio:5/3.4;padding:16px;border-radius:14px;background:#000;box-shadow:inset 0 0 40px #000c,0 14px 40px #000a}
/* Outer gold frame: a gradient ring drawn on the board's own border box. Because it is
   structural (not a raster overlay stretched over the grid), it always matches the 5×3
   columns/rows and can never drift. */
.slot-board::before{content:"";position:absolute;inset:0;z-index:2;pointer-events:none;border-radius:inherit;padding:3px;background:linear-gradient(140deg,#fce9b0,#e2bd6e 22%,#8a6a2a 45%,#5e4620 55%,#8a6a2a 65%,#e2bd6e 82%,#fce9b0);-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask-composite:exclude}
/* Emerald cabochons at the four corners of the board frame. */
.slot-board::after{content:"";position:absolute;inset:4px;z-index:2;pointer-events:none;border-radius:inherit;background:radial-gradient(circle at 5px 5px,#3fe0b0 0 2.6px,transparent 3px),radial-gradient(circle at calc(100% - 5px) 5px,#3fe0b0 0 2.6px,transparent 3px),radial-gradient(circle at 5px calc(100% - 5px),#3fe0b0 0 2.6px,transparent 3px),radial-gradient(circle at calc(100% - 5px) calc(100% - 5px),#3fe0b0 0 2.6px,transparent 3px)}
/* Each reel column carries its own gold frame with an emerald inner line, drawn on the
   column's own box — exactly one column wide and exactly three rows tall by construction. */
.slot-reel{position:relative;overflow:hidden;min-height:0;border-radius:8px;border:2px solid #e7c876;box-shadow:inset 0 0 0 1px rgba(28,84,66,.92),inset 0 0 12px rgba(0,0,0,.72),0 0 0 1px rgba(94,70,32,.85)}
.slot-reel-strip{position:absolute;top:0;left:0;width:100%;height:calc(16 / 3 * 100%);display:flex;flex-direction:column}
.slot-reel.is-spinning .slot-reel-strip{will-change:transform}
.slot-reel-strip.is-landing{animation:ev-reel-bounce 250ms ease-out forwards}
.slot-cell{position:relative;flex:0 0 auto;height:calc(100% / 16);overflow:hidden;border:1px solid #3f6f5e66;border-radius:7px;background:#000}
.slot-cell .slot-symbol{width:100%;height:100%;object-fit:cover;display:block;mix-blend-mode:screen}
.slot-cell.win{border-color:#e9c56a;box-shadow:0 0 12px #d9b96a66;animation:ev-win-pulse 0.7s ease-in-out infinite}
.slot-cell.scatter{border-color:#4fe0b4;box-shadow:0 0 12px #2fe0ab66}
.slot-cell.win::after{content:"";position:absolute;inset:0;pointer-events:none;border-radius:inherit;background:radial-gradient(circle at 50% 50%,rgba(255,224,138,.42),rgba(233,197,106,.18) 45%,transparent 74%);animation:ev-win-inner 0.7s ease-in-out infinite}
.slot-cell.scatter::after{content:"";position:absolute;inset:0;pointer-events:none;border-radius:inherit;background:radial-gradient(circle at 50% 50%,rgba(79,224,180,.46),rgba(47,224,171,.2) 45%,transparent 74%)}
.slot-board[data-phase="spinning"] .slot-cell{animation:slot-flicker .18s steps(2) infinite}
.slot-reel.is-spinning .slot-symbol{animation:ev-reel-blur .18s linear infinite}
.slot-board[data-phase="landed"] .slot-cell{animation:slot-land .28s ease-out}
.slot-board[data-bonus="free-spins"] .slot-cell{border-color:#4fe0b488}
@keyframes slot-flicker{0%{opacity:.65}100%{opacity:1}}
@keyframes slot-land{from{transform:translateY(-5px);opacity:.55}to{transform:none;opacity:1}}
@keyframes ev-win-pulse{0%,100%{box-shadow:0 0 8px #d9b96a55;border-color:#e9c56a}50%{box-shadow:0 0 18px #ffd87099,0 0 6px #e9c56a66;border-color:#ffe088}}
@keyframes ev-win-inner{0%,100%{transform:scale(1);opacity:.8}50%{transform:scale(1.06);opacity:1}}
.slot-board[data-anticipate="1"] .slot-reel:last-child{box-shadow:0 0 0 2px #e9c56a88,0 0 20px #d9b96a55;animation:ev-anticipate 0.5s ease-in-out infinite}
@keyframes ev-anticipate{0%,100%{box-shadow:0 0 0 2px #e9c56a88,0 0 20px #d9b96a55}50%{box-shadow:0 0 0 3px #ffe08899,0 0 32px #ffd87077}}
/* Upward scroll blur: the strip's translateY transition drives the vertical motion, so the
   blur ramp lives on the symbol tiles (filter-only, no transform) to avoid fighting it. */
@keyframes ev-reel-blur{0%{filter:blur(0) brightness(1.06)}50%{filter:blur(2px) brightness(1.06)}100%{filter:blur(0) brightness(1.06)}}
/* Elastic landing: after a reel's scroll settles at translateY(0), overshoot 8px down, spring
   back 3px up, rest at 0. One-shot (`forwards`) on the strip's `is-landing` class. */
@keyframes ev-reel-bounce{0%{transform:translateY(0)}40%{transform:translateY(8px)}70%{transform:translateY(-3px)}100%{transform:translateY(0)}}

/* --- Effect overlays: pure CSS (gradients / glow), no raster fx-*.webp, so no white
   square or key-out artifact can ever land on the reels. The scene toggles each overlay
   with its `hidden` flag (display:none), which also restarts the CSS animations. --- */
.slot-board .effect{position:absolute;z-index:3;pointer-events:none}
/* Win line: a thin gold neon line across the central row with a soft outer glow. */
.slot-board .effect.win-line{left:2%;right:2%;top:50%;height:2px;transform:translateY(-50%);border-radius:2px;background:linear-gradient(90deg,transparent,rgba(255,233,168,.95) 18%,#fff6cf 50%,rgba(255,233,168,.95) 82%,transparent);box-shadow:0 0 10px 2px rgba(255,223,138,.85),0 0 24px 7px rgba(233,197,106,.45)}
/* Big win: a one-shot radial flash that brightens then fades back out. */
.slot-board .effect.big-win{inset:0;border-radius:inherit;opacity:0;transform:scale(0.92);background:radial-gradient(circle at 50% 50%,rgba(255,255,255,.55),rgba(255,224,138,.28) 32%,rgba(233,197,106,.14) 58%,transparent 82%);animation:ev-big-win .9s ease-out forwards}
@keyframes ev-big-win{0%{opacity:0;transform:scale(0.92)}18%{opacity:.92;transform:scale(1.04)}60%{opacity:.7;transform:scale(1)}100%{opacity:0;transform:scale(1)}}
/* Scatter trigger: a soft emerald glow that pulses gently while scatters are lit. */
.slot-board .effect.scatter-trigger{inset:0;border-radius:inherit;opacity:.45;background:radial-gradient(circle at 50% 50%,rgba(79,224,180,.5),rgba(47,224,171,.22) 42%,transparent 76%);animation:ev-scatter-glow 1.6s ease-in-out infinite}
@keyframes ev-scatter-glow{0%,100%{opacity:.35}50%{opacity:.72}}

/* --- Win plaque (payout strip). Clean CSS surface — dark emerald base with a gold ring
   and emerald corner accents — instead of the stretched ui-win-frame raster, so the payout
   and net values stay crisp and never sink into ornament. Fixed height so a longer label
   or a wrapped result line can never grow the strip and push the controls below. --- */
.round-result{position:relative;isolation:isolate;overflow:hidden;height:96px;background:linear-gradient(180deg,#0e2b23f5,#071a15f7);border:1px solid #d9b96a;border-radius:14px;box-shadow:inset 0 0 0 1px rgba(63,224,176,.16),inset 0 0 24px rgba(0,0,0,.5),0 8px 24px rgba(0,0,0,.38)}
/* Gold ring drawn on the plaque's own border box — always matches the rounded corners. */
.round-result::before{content:"";position:absolute;inset:0;z-index:1;pointer-events:none;border-radius:inherit;padding:1px;background:linear-gradient(140deg,#fce9b0,#e2bd6e 22%,#8a6a2a 45%,#5e4620 55%,#8a6a2a 65%,#e2bd6e 82%,#fce9b0);-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask-composite:exclude}
/* Emerald corner cabochons mirror the reel frame. */
.round-result::after{content:"";position:absolute;inset:3px;z-index:1;pointer-events:none;border-radius:inherit;background:radial-gradient(circle at 6px 6px,#3fe0b0 0 3px,transparent 3.5px),radial-gradient(circle at calc(100% - 6px) 6px,#3fe0b0 0 3px,transparent 3.5px),radial-gradient(circle at 6px calc(100% - 6px),#3fe0b0 0 3px,transparent 3.5px),radial-gradient(circle at calc(100% - 6px) calc(100% - 6px),#3fe0b0 0 3px,transparent 3.5px)}
.round-result>*{position:relative;z-index:2}
/* Larger, clearer values: payout in gold, net in emerald, result label a touch bigger. */
.round-result strong{font-size:1.42rem;font-weight:600;margin-top:4px}
#player-payout{color:#ffdf8a}
#player-net{color:#7cf0c8}
.round-result .result-center #result-label{font-size:.8rem;color:#e7cfab}

/* --- Bottom dock panel + spin/bet controls --- */
.player-controls{background:#0a1420}
.stake-control{background-color:#000}
#player-play.primary-action{color:#242335;text-shadow:0 1px 0 #fff5dc6e}
#player-play.primary-action:hover:not(:disabled){filter:brightness(1.12)}

.free-spins-banner{position:absolute;inset:auto 8px 8px;display:grid;gap:2px;justify-items:center;padding:10px 14px;border:1px solid #5fe0b8;border-radius:12px;background:linear-gradient(160deg,#0e2f2ac9,#0a221fc9);color:#d7f7ea;text-shadow:0 1px 4px #04110f;backdrop-filter:blur(2px)}
.free-spins-banner h3{font-family:Georgia,serif;font-weight:500;color:#b9f2dc;letter-spacing:.05em}
.free-spins-banner span{font-size:.74rem;color:#cdeee2}
.free-spins-banner #free-spins-awarded{color:#ffe9a8}
.line-wins{list-style:none;display:flex;flex-wrap:wrap;justify-content:center;align-content:flex-start;align-items:flex-start;gap:6px;margin:0;padding:4px 14px 0;flex-shrink:0;height:25px;overflow:hidden}
.line-wins li{border:1px solid #7bc9b03b;border-radius:6px;padding:3px 8px;font-size:.68rem;color:#d9efe7;background:#0a242755}
.line-wins li.scatter{border-color:#4fe0b477;color:#c6f0dd}
.scatter-tag{display:block;min-height:1em;font-size:.62rem;color:#a7e6d0;margin-bottom:2px}
.round-result .result-center{display:grid;justify-items:center;align-content:center;gap:2px}
/* --- Stable result dock: reserve the height of every dynamic strip (result, win lines,
   status/notice) so the reels, the result plaque and the bottom controls never move
   across spin → spinning → result. `.line-wins` is pinned to a single fixed row; the
   status strip already reserves one flight-status + one notice line via player.css. --- */
/* --- Stable recover dock: the recover button ("Восстановить броски") and the interrupted
   notice must not shift the reels or the bottom controls when they appear/disappear. The
   button stays in the flow — toggled with `visibility` instead of `display:none`, so its
   row is always reserved — and the notice is pinned to a single line (ellipsis) so a
   longer or wrapped message can never grow the strip. --- */
/* On desktop there is room to keep the recover button's row reserved (visibility-toggle)
   so it never shifts the reels. On mobile the same reserved row is a permanent dead band
   under the controls, so the hidden button collapses to 0 height (default [hidden]) there. */
@media(min-width:761px){#retry-round[hidden]{display:block!important;visibility:hidden;pointer-events:none}}
.status-area #player-notice{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.slot-paytable{width:100%;border-collapse:collapse;margin-top:8px;font-size:.8rem;font-variant-numeric:tabular-nums}
.slot-paytable th,.slot-paytable td{border:1px solid #6f8ba03a;padding:6px 8px;text-align:right}
.slot-paytable th{color:#c6d6e6;font-weight:550;background:#10202fa0}
.slot-paytable th:first-child,.slot-paytable td:first-child{text-align:left;color:#e5d3b3}
.slot-paytable td{color:#d9efe7}
@media(max-width:760px){
  .player-widget{background-image:url('/assets/emerald-vault/bg-portrait.webp');background-position:50% 42%}
  .player-widget:has(#player-board[data-bonus="free-spins"]){background-image:url('/assets/emerald-vault/bg-free-spins.webp')}
  /* Reel board: fit within BOTH the remaining height (board-wrap is flex:1) and 92% width,
     preserving 5/3.4. `cqh`/`cqw` are the board-wrap's own content-box dimensions, so the
     board "contains" into the free space instead of overflowing it on short viewports
     (a pure width- or height-based scale distorts the reels on the opposite axis). */
  .slot-board-wrap{container-type:size}
  .slot-board{gap:6px;padding:11px;width:min(92cqw,calc(100cqh*5/3.4))}
  .slot-cell{border-radius:6px}
  .free-spins-banner{padding:8px 10px}.free-spins-banner span{font-size:.68rem}
  .round-result{height:80px}
  .round-result strong{font-size:1.22rem}
  .round-result .result-center #result-label{font-size:.72rem}
}
/* Wide, short screens get a floating side dock; keep the result plaque compact there. */
@media(max-height:540px) and (min-width:600px){
  .round-result{height:64px}
  .round-result strong{font-size:1.05rem}
}
@media(prefers-reduced-motion:reduce){.slot-cell,.slot-reel-strip{animation:none!important}}

/* ============================================================================
   Emerald Vault — control chrome restyle (emerald / gold)
   Overrides the shared Prism-Drop blue-steel surfaces in player.css for every
   interactive control inside THIS widget only. player.css (Prism Drop) is left
   untouched; emerald-vault.css is loaded only by the Emerald Vault page.
   ============================================================================ */

/* Shared gem materials, inherited by every control in this widget.
   --ev-gloss  = glossy polished top highlight;
   --ev-facets = the angular cut facets (a brilliant-cut conic: alternating
                 dark pavilion shadows and lit crown faces);
   --ev-emerald = the emerald body gradient (bright table → deep pavilion). */
.player-widget{
  --ev-gloss:linear-gradient(180deg,rgba(255,255,255,.42) 0%,rgba(255,255,255,.14) 26%,rgba(255,255,255,0) 54%);
  --ev-facets:conic-gradient(from 210deg at 50% 50%,rgba(4,26,16,.5) 0deg,rgba(4,26,16,0) 50deg,rgba(255,255,255,.18) 102deg,rgba(255,255,255,0) 150deg,rgba(4,26,16,.4) 202deg,rgba(4,26,16,0) 250deg,rgba(124,240,200,.24) 302deg,rgba(124,240,200,0) 346deg,rgba(4,26,16,.5) 360deg),linear-gradient(135deg,rgba(255,255,255,.24) 0%,rgba(255,255,255,.05) 42%,rgba(255,255,255,0) 50%,rgba(3,18,14,0) 50%,rgba(3,18,14,.34) 60%,rgba(3,18,14,.12) 100%);
  --ev-emerald:radial-gradient(130% 130% at 50% 0%,#2fe0ab 0%,#1a8a3c 52%,#0e5f32 100%);
}

/* Shared gold bezel: a gradient ring drawn on the control's own border box via
   mask-composite (same recipe as .slot-board::before / .round-result::before),
   so it always hugs the rounded corners and can never drift or blur. */
.player-widget button::before{
  content:"";position:absolute;inset:0;z-index:1;pointer-events:none;border-radius:inherit;
  padding:2px;
  background:linear-gradient(140deg,#fce9b0,#e2bd6e 22%,#8a6a2a 45%,#5e4620 55%,#8a6a2a 65%,#e2bd6e 82%,#fce9b0);
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);
  -webkit-mask-composite:xor;mask-composite:exclude;
  opacity:1;
}
/* Generic interactive surface, scoped to this widget (player.css `button/input/
   select` use a Prism blue-steel gradient; re-skin here so Prism Drop keeps it):
   a faceted emerald gem set in a gold bezel. */
.player-widget button{
  position:relative;isolation:isolate;
  background:var(--ev-gloss),var(--ev-facets),var(--ev-emerald);
  border-color:rgba(94,70,32,.6);
  color:#eaf6ee;
  box-shadow:inset 0 1px 0 rgba(124,240,200,.32),inset 0 -3px 6px rgba(3,18,14,.82),0 3px 8px rgba(2,7,16,.55);
  text-shadow:0 1px 2px rgba(4,24,15,.7);
}
.player-widget button:hover:not(:disabled){
  --ev-emerald:radial-gradient(130% 130% at 50% 0%,#4fe0b4 0%,#2a9c52 52%,#127040 100%);
  box-shadow:inset 0 1px 0 rgba(124,240,200,.42),inset 0 -3px 6px rgba(3,18,14,.78),0 0 10px 1px rgba(47,224,171,.35),0 3px 8px rgba(2,7,16,.5);
}
/* 3D press: the gem sinks — outer shadow collapses, inner shadow deepens. */
.player-widget button:active:not(:disabled){
  transform:translateY(1px);
  box-shadow:inset 0 3px 9px rgba(3,18,14,.72),inset 0 -1px 0 rgba(124,240,200,.18),0 1px 3px rgba(2,7,16,.5);
}
.player-widget input,.player-widget select{border:1px solid #d9b96a66;background:#071a15;color:#f4f1eb}
.player-widget button:focus-visible,.player-widget input:focus-visible,.player-widget select:focus-visible{outline:3px solid #4fe0b4;outline-offset:2px}

/* --- Bottom dock panel --- */
.player-controls{background:radial-gradient(ellipse at 50% 100%,#0a241bd9,#0c2a1f54 64%,transparent 85%)}

/* --- Mode tabs (Manual / Auto) --- */
.play-modes{background:#071a15e6;border:1px solid #d9b96a59}
.play-modes button{background:transparent;border-color:transparent;box-shadow:none;color:#bfe3d4}
.play-modes button::before{opacity:.32}
.play-modes button:hover:not(:disabled){background:linear-gradient(160deg,#123528,#0c2a1f);color:#e2f6ec;border-color:#d9b96a40}
.play-modes button[aria-selected="true"]{
  color:#242335;
  border-color:#e7c876;
  background:linear-gradient(165deg,#fff5d2 0%,#d4b685 10%,#f0dbac 24%,#c59e62 76%,#806443 100%);
  box-shadow:inset 0 1px 0 #fffaf0c7,inset 0 -2px 0 #795c3d,0 2px 7px #0003;
  text-shadow:0 1px 0 #fff5dc6e;
}
.play-modes button[aria-selected="true"]::before{opacity:1}

/* --- Settings access ("5 reels · 20 lines") --- */
.settings-access strong{color:#ffe9a8}
.settings-access small{color:#9fd9c0}
.settings-access svg{color:#e7c876}

/* --- Stake control ( − / field / + ): a recessed gold-set well holding two
   gem −/+ buttons and a dark inset field. --- */
.stake-control{position:relative;isolation:isolate;background:linear-gradient(170deg,#0e2b23,#071a15);border:1px solid #d9b96a73;box-shadow:inset 0 1px 0 #7cf0c82e,inset 0 3px 8px rgba(0,0,0,.5),0 3px 10px #04110e80}
.stake-control::before{
  content:"";position:absolute;inset:0;z-index:1;pointer-events:none;border-radius:inherit;
  padding:1px;
  background:linear-gradient(140deg,#e2bd6e,#8a6a2a 45%,#5e4620 55%,#8a6a2a 65%,#e2bd6e);
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);
  -webkit-mask-composite:xor;mask-composite:exclude;
}
.stake-control button{color:#ffe9a8;border-color:rgba(94,70,32,.45);font-weight:700}
.stake-control button:hover:not(:disabled){border-color:#e7c876;color:#fff3cf}
.stake-control input{border-color:#1a4a36;background:#04120eb3;color:#eaf6ee;box-shadow:inset 0 2px 5px #00000088}
.stake-row small{color:#8fd4bb}

/* --- HUD round icon buttons (history / rules / sound) --- */
.player-widget .hud-button{color:#ffe9a8}
.player-widget .hud-button:hover:not(:disabled){color:#fff3cf}

/* --- Paytable access ("Таблица выплат ↗") --- */
.player-widget .multipliers-access{color:#ffe9a8}
.multipliers-access span{color:#4fe0b4}

/* --- Status area --- */
.status-area{background:linear-gradient(90deg,transparent,#071a15c9 15%,#071a15c9 85%,transparent)}
.status-area p{color:#cfe6dc}
.status-area #flight-status{color:#8fd4bb}
.status-area button{border-color:#d9b96a}

/* --- Spin (primary): the dominant medallion — a large oval faceted emerald gem
   in a thick gold bezel, glossy top, persistent gentle neon pulse. Pressing it
   sinks the medallion (deeper inset, dimmer glow). --- */
#player-play.primary-action{
  border:1px solid transparent;border-radius:999px;
  --ev-gloss:linear-gradient(180deg,rgba(255,255,255,.38) 0%,rgba(255,255,255,.14) 26%,rgba(255,255,255,0) 52%);
  --ev-emerald:radial-gradient(140% 150% at 50% -12%,#4fe0b4 0%,#2fe0ab 32%,#1a8a3c 64%,#0e5f32 100%);
  color:#ffe9a8;
  background:var(--ev-gloss),var(--ev-facets),var(--ev-emerald);
  font-weight:800;letter-spacing:.02em;
  text-shadow:0 1px 2px rgba(4,24,15,.9),0 0 10px rgba(0,0,0,.5);
  animation:ev-gem-glow 2.6s ease-in-out infinite;
}
#player-play.primary-action::before{
  padding:4px;
  background:linear-gradient(140deg,#fff5d2,#fce9b0 14%,#e2bd6e 30%,#8a6a2a 48%,#5e4620 56%,#8a6a2a 66%,#e2bd6e 84%,#fce9b0 96%,#fff5d2);
  opacity:1;
}
#player-play.primary-action:active:not(:disabled){
  animation:none;
  transform:translateY(1px) scale(.996);
  box-shadow:inset 0 4px 12px rgba(3,18,14,.78),inset 0 -1px 0 rgba(124,240,200,.18),0 0 6px rgba(47,224,171,.30),0 2px 6px rgba(4,17,14,.6);
}
#player-play.primary-action:disabled{animation:none}
@keyframes ev-gem-glow{
  0%,100%{box-shadow:inset 0 2px 2px rgba(255,255,255,.28),inset 0 -4px 8px rgba(3,18,14,.72),0 0 0 1px rgba(94,70,32,.6),0 0 12px 2px rgba(47,224,171,.38),0 0 26px 6px rgba(47,224,171,.16),0 6px 20px rgba(4,17,14,.65)}
  50%{box-shadow:inset 0 2px 2px rgba(255,255,255,.28),inset 0 -4px 8px rgba(3,18,14,.72),0 0 0 1px rgba(94,70,32,.6),0 0 22px 6px rgba(47,224,171,.6),0 0 48px 14px rgba(47,224,171,.3),0 6px 20px rgba(4,17,14,.65)}
}

/* --- Stop (auto-play): faceted emerald gem in gold bezel, light text. --- */
#auto-stop.stop-action{
  border-color:rgba(94,70,32,.55);color:#eafff3;font-weight:700;
  --ev-emerald:radial-gradient(130% 130% at 50% 0%,#4fe0b4 0%,#1a8a3c 52%,#0e5f32 100%);
  background:var(--ev-gloss),var(--ev-facets),var(--ev-emerald);
  text-shadow:0 1px 2px rgba(4,24,15,.85);
  box-shadow:inset 0 1px 0 rgba(124,240,200,.4),inset 0 -4px 8px rgba(3,18,14,.8),0 0 0 1px rgba(94,70,32,.55),0 0 10px 1px rgba(47,224,171,.35),0 5px 18px #04110ea6;
}
#auto-stop.stop-action:hover:not(:disabled){background:linear-gradient(165deg,#a4f4d8,#57c98f 20%,#2a9c52 76%,#127040);border-color:#fff3d4}

/* --- Gate (loading splash) --- */
.player-gate{background:linear-gradient(180deg,#071a15f5,#0a1f12f5)}
.gate-gem{color:#4fe0b4}
.player-gate h2{color:#ffe9a8}
.player-gate p{color:#b7d8c9}
.player-gate button{border-color:#d9b96a}

/* --- Modal sheet (settings / history / rules / audio) --- */
.sheet{background:#04110ebf}
.sheet-panel{background:linear-gradient(145deg,#0e2b23,#071a15);border:1px solid #d9b96a66;box-shadow:0 20px 60px #000a}
.sheet-heading{border-bottom:1px solid #d9b96a33}
.sheet-heading h2{color:#ffe9a8}
.sheet-heading button{background:transparent;border-color:transparent;color:#ffe9a8}
.sheet-heading button:hover:not(:disabled){color:#fff3cf;background:#ffffff12}
.sheet-content{color:#dcefe7}
.sheet-content h3{color:#ffe9a8}
.sheet-note{color:#b7d8c9}
.sheet-content dt{color:#d9c9a8}
.sheet-content dd{color:#eaf6ee}

/* Paytable + rule multipliers + history (inside sheet) */
.slot-paytable th,.slot-paytable td{border-color:#d9b96a33}
.slot-paytable th{color:#ffe9a8;background:#0a221f}
.slot-paytable th:first-child,.slot-paytable td:first-child{color:#e7c876}
.rule-multipliers li{border-color:#d9b96a45;background:#0a221f55;color:#e7d5b4}
.rule-multipliers small{color:#9fd9c0}
#player-history button{background:linear-gradient(160deg,#123528,#0a1f16);border-color:#d9b96a3d;color:#eaf6ee}
#player-history button>span{color:#9fd9c0}
.history-amounts small{color:#9fd9c0}
.history-detail{border-top-color:#d9b96a33}
#audio-panel input{accent-color:#4fe0b4}

/* --- Safe-area inset: keep the bottom controls clear of the iPhone home indicator --- */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .player-controls {
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
  }
}

/* ── Layout-stability fixes: prevent UI jumps during spin/result ── */
/* Spin button: fixed height + overflow clip so text change doesn't resize layout */
#player-play { min-height: 52px; }
/* Balance: fixed min-width prevents number width changes from reflowing neighbours */
.balance-box strong { min-width: 5ch; display: inline-block; }
/* Flight-status & notice: reserve height so appearing/disappearing doesn't shift content */
#flight-status { min-height: 1.2em; display: block; }
.player-notice { min-height: 1.2em; display: block; }
/* Free-spins banner: absolute so it doesn't push other elements */
#free-spins-banner { position: absolute; left: 50%; transform: translateX(-50%); z-index: 10; pointer-events: none; }
/* Turbo button: fixed size, no layout shift */
#turbo-btn { width: 44px; height: 44px; flex-shrink: 0; }
