/* Each cabinet uses the same controls. Materials, hardware and the engraved
   emblems follow the objects in the game's artwork. */
[data-game="goldline"] {
  --metal: #d7b478; --metal-bright: #fff0be; --key: #e3bd79; --key-edge: #a97839;
  --key-ink: #2d2117; --plate: #423125; --shade: #1e1917; --edge: #886c4a;
  --rim: 8px; --key-rim: 5px; --knob: 5px; --art-focus: center 51%;
  --grain: repeating-linear-gradient(91deg, transparent 0 6px, #e1b17c0b 7px, transparent 9px 13px);
  --trim: repeating-linear-gradient(90deg, #e4c78d 0 16px, transparent 16px 19px, #987145 19px 22px, transparent 22px 26px);
  --crest: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 48' fill='none' stroke='white' stroke-width='2' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M9 32h43l5 4H8m9-5V18l5-5h13l4 5v12m-21-9h19m-14-3h9m8 3h8l5 8H39M12 16H6m7 6H3m10 6H6'/%3E%3Ccircle cx='21' cy='36' r='4'/%3E%3Ccircle cx='43' cy='36' r='4'/%3E%3C/svg%3E");
}
[data-game="reef"] {
  --metal: #8ed8d6; --metal-bright: #edfefa; --key: #a7ebe0; --key-edge: #6bb4c0;
  --key-ink: #0c3036; --plate: #16434c; --shade: #09232d; --edge: #508991;
  --rim: 22px 22px 16px 16px; --key-rim: 26px; --knob: 50%; --art-focus: center 46%;
  --grain: radial-gradient(ellipse at 105% 10%, #d0a9ea21, transparent 52%), repeating-radial-gradient(ellipse at -20% 115%, transparent 0 14px, #a9f3e708 15px, transparent 17px 24px);
  --trim: radial-gradient(ellipse at center, #ddfbf0 0 23%, #77b4bc 28% 40%, transparent 43%) 0 0 / 9px 4px repeat-x;
  --crest: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 48' fill='none' stroke='white' stroke-width='2' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M31 35C21 35 9 29 9 22q0-5 6-6-1-6 6-7 3-5 9-3 5-4 10 1 6-1 9 5 7 1 7 8 4 9-20 15m-22-16 12 12m-5-19 8 16m4-20v18m9-15-6 17m13-11-10 13m-19 8q10 6 22 0'/%3E%3Ccircle cx='32' cy='33' r='5'/%3E%3C/svg%3E");
}
[data-game="jade"] {
  --metal: #e7c38c; --metal-bright: #ffe5af; --key: #ffc879; --key-edge: #d8904c;
  --key-ink: #392018; --plate: #193c30; --shade: #0b211d; --edge: #927b54;
  --rim: 13px 4px; --key-rim: 13px 3px; --knob: 7px 2px; --art-focus: center 56%;
  --grain: linear-gradient(120deg, #cde8ac0a, transparent 50%), repeating-linear-gradient(0deg, transparent 0 10px, #97cbb006 11px 12px);
  --trim: repeating-linear-gradient(90deg, #e5bd7c 0 11px, #8f4032 11px 16px, #e5bd7c 16px 19px, transparent 19px 26px);
  --crest: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 48' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M32 4v4m-8 2h16v3H24zm-2 4q-14 9 0 20h20q14-11 0-20zm5 1q-7 9 0 18m10-18q7 9 0 18m-5-18v18m-9 3h18m-12 3h6m-3 0v5m-3-3v3m6-3v3M10 18h6m-8 5h6m34-5h6m-4 5h6'/%3E%3C/svg%3E");
}
[data-game="scarab"] {
  --metal: #e8c37b; --metal-bright: #fff0bf; --key: #ebc774; --key-edge: #c5974a;
  --key-ink: #352818; --plate: #183c4a; --shade: #0d202b; --edge: #a17e44;
  --rim: 3px; --key-rim: 2px; --knob: 3px; --art-focus: center 49%;
  --grain: repeating-linear-gradient(130deg, transparent 0 21px, #92d7d305 21px 24px);
  --trim: repeating-linear-gradient(110deg, #e4c579 0 8px, #52aaa5 8px 14px, #bd8d44 14px 17px, #316578 17px 25px);
  --crest: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 48' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='32' cy='10' r='5'/%3E%3Cellipse cx='32' cy='27' rx='8' ry='11'/%3E%3Cpath d='M32 20v16m-6-15h12m-14 4Q14 26 3 12q-1 12 17 20m3-2Q11 29 5 19m14 15-5 3m26-12q10 1 21-13 1 12-17 20m-3-2q12-1 18-11M45 34l5 3'/%3E%3C/svg%3E");
}
[data-game="orrery"] {
  --metal: #d9b9e9; --metal-bright: #fff1df; --key: #eacff9; --key-edge: #b99dd2;
  --key-ink: #34263f; --plate: #373047; --shade: #171a2c; --edge: #8976a4;
  --rim: 18px; --key-rim: 24px; --knob: 50%; --art-focus: center 45%;
  --grain: radial-gradient(circle at 87% 23%, #efd7ac42 0 1px, transparent 2px), repeating-radial-gradient(ellipse at 105% -34%, transparent 0 25px, #e9cbf10c 26px 27px, transparent 28px 38px);
  --trim: repeating-linear-gradient(90deg, #dbc4de 0 1px, transparent 1px 7px, #af95c4 7px 9px, transparent 9px 17px);
  --crest: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 48' fill='none' stroke='white' stroke-width='2'%3E%3Cellipse cx='32' cy='25' rx='26' ry='8' transform='rotate(-24 32 25)'/%3E%3Cellipse cx='32' cy='25' rx='12' ry='19' transform='rotate(-35 32 25)'/%3E%3Ccircle cx='32' cy='25' r='5'/%3E%3Ccircle cx='53' cy='12' r='3' fill='white'/%3E%3C/svg%3E");
}
[data-game="magma"] {
  --metal: #f3a46b; --metal-bright: #ffe5b2; --key: #ffb575; --key-edge: #e6884b;
  --key-ink: #321b12; --plate: #353032; --shade: #17171b; --edge: #9c6551;
  --rim: 5px; --key-rim: 4px; --knob: 3px; --art-focus: center 55%;
  --grain: repeating-linear-gradient(123deg, transparent 0 9px, #f4dfc807 9px 11px, transparent 11px 14px);
  --trim: repeating-linear-gradient(120deg, #ff985c 0 8px, #6a3930 8px 10px, transparent 10px 17px);
  --crest: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 48' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 24h46l-7 7H37l2 6 7 3H22l6-4 1-5H19zm13-6 12-9 5 6-12 9m7-12 14 2m-5-7 3-4m5 9 5-1m-5 7 4 2'/%3E%3C/svg%3E");
}
[data-game="bluehour"] {
  --metal: #d2b983; --metal-bright: #fff3c9; --key: #f0dba6; --key-edge: #bfa46a;
  --key-ink: #272730; --plate: #233552; --shade: #121b33; --edge: #8c825f;
  --rim: 14px 14px 5px 5px; --key-rim: 14px 14px 5px 5px; --knob: 9px 9px 3px 3px; --art-focus: center 47%;
  --grain: repeating-conic-gradient(from -30deg at 100% 120%, #f0d9b007 0 2deg, transparent 2deg 10deg);
  --trim: repeating-linear-gradient(90deg, #e8d4aa 0 12px, #344d73 12px 14px, #e8d4aa 14px 18px, transparent 18px 23px);
  --crest: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 48' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m10 23 28-3 15-10v23L38 25l-28 2zm-4-1v7m4-5H6m13 4c0 10 13 10 13-1m-9 0v4m5-5v5m-7-12v-4m5 4v-5m5 5v-5m-12 1h4m1-1h4m1 0h4'/%3E%3C/svg%3E");
}
[data-game="skyport"] {
  --metal: #c1dcce; --metal-bright: #fff0d0; --key: #c7e9d6; --key-edge: #90bebe;
  --key-ink: #193734; --plate: #244443; --shade: #152c32; --edge: #8d9380;
  --rim: 23px 8px; --key-rim: 19px 5px; --knob: 50% 6px; --art-focus: center 45%;
  --grain: repeating-linear-gradient(75deg, transparent 0 17px, #daf0dc08 18px, transparent 19px 22px);
  --trim: repeating-linear-gradient(135deg, #e7ceb1 0 5px, #97c5bd 5px 10px, transparent 10px 17px);
  --crest: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 48' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 23Q12 9 32 9q16 0 25 11-7 12-25 13Q16 33 8 23Zm1 0q22-6 47-3m-35 10-4 6h-4l3-8m9 5 4 6h10l3-8m-1-19q8 9 0 18m-19-19q-6 11 1 19M9 20l-5-4v12l5-3'/%3E%3C/svg%3E");
}

:is(.pg-console, .ec-desk, .pg-dialog, .ec-dialog) {
  isolation: isolate;
  position: relative;
  color: #fff6e9;
  border: 1px solid var(--edge);
  border-radius: var(--rim);
  background: var(--grain), linear-gradient(145deg, var(--plate), var(--shade) 85%);
  box-shadow: inset 0 0 0 2px #0003, inset 0 1px 0 #ffffed4a, 0 6px 24px #0006;
}
:is(.pg-console, .ec-desk)::before {
  content: "";
  position: absolute;
  inset: -1px 10% auto;
  height: 3px;
  border-radius: 1px;
  pointer-events: none;
  background: var(--trim);
  box-shadow: 0 1px 2px #0008;
}
:is(.pg-console, .ec-desk) :is(.pg-stat span, .pg-bet-label, .ec-stats small, .ec-stakes label, .ec-mode) {
  color: color-mix(in srgb, var(--metal) 55%, #fff);
}
:is(.pg-back, .pg-info, .ec-head .ec-round-btn, .pg-dialog-x, .ec-dialog .ec-round-btn, .pg-step, .ec-stakes button) {
  color: var(--metal-bright);
  border: 1px solid var(--edge);
  border-radius: var(--knob);
  background: linear-gradient(150deg, var(--plate), var(--shade));
  box-shadow: inset 0 1px 0 #ffffff36, inset 0 -2px 0 #0004, 0 2px 5px #0003;
}
:is(.pg-head, .ec-head) :is(.pg-info, #encore-rules) {
  font-family: Georgia, serif;
  font-weight: bold;
}
:is(.pg-game, .ec-game) :is(.pg-main-spin, .ec-action) {
  position: relative;
  isolation: isolate;
  padding: 8px clamp(32px,8%,42px);
  min-height: 46px;
  border: 1px solid var(--metal-bright);
  border-radius: var(--key-rim);
  background: linear-gradient(177deg, var(--metal-bright), var(--key) 44%, var(--key-edge));
  box-shadow: inset 0 0 0 2px #fff3, inset 0 -3px 0 #22161c25, 0 3px 0 #080b106b, 0 3px 11px #0005;
  color: var(--key-ink);
  text-shadow: 0 1px 0 #fff5;
  line-height: 1.15;
}
:is(.pg-main-spin, .ec-action)::after {
  position: absolute;
  content: "";
  right: 7px;
  width: 24px;
  height: 21px;
  background: currentColor;
  opacity: .48;
  -webkit-mask: var(--crest) center / contain no-repeat;
  mask: var(--crest) center / contain no-repeat;
  pointer-events: none;
}
:is(.pg-game, .ec-game) :is(.pg-highlight, .ec-highlight) {
  min-height: 36px;
  padding: 5px 9px;
  border: 1px solid var(--edge);
  border-radius: var(--key-rim);
  background: linear-gradient(125deg, #fff1, transparent 65%), var(--shade);
  color: var(--metal-bright);
  line-height: 1.2;
}
:is(.pg-game, .ec-game) :is(.pg-step, .ec-stakes button) {
  min-height: 32px;
  min-width: 28px;
}
:is(.pg-game, .ec-game) :is(.pg-main-spin, .ec-action, .pg-highlight, .ec-highlight, .pg-step, .ec-stakes button):enabled:active {
  transform: translateY(1px);
  filter: brightness(.95);
}
:is(.pg-game, .ec-game) button:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}
:is(.pg-dialog, .ec-dialog) { position: fixed; }
:is(.pg-dialog, .ec-dialog)::backdrop { background: #070b12ca; }
:is(.pg-dialog-inner, .ec-dialog > div) {
  --sheet-pad: clamp(17px, 4.5vw, 26px);
  position: relative;
  padding: 0 var(--sheet-pad) var(--sheet-pad);
}
/* A cinematic header crops the actual cabinet artwork, including offline builds. */
:is(.pg-dialog-inner, .ec-dialog > div)::before {
  display: block;
  content: "";
  height: clamp(55px, 15vh, 91px);
  margin: 0 calc(-1 * var(--sheet-pad)) 17px;
  border-bottom: 2px solid var(--metal);
  background-image: linear-gradient(90deg, var(--shade), transparent 70%), var(--pg-art, var(--art));
  background-size: cover;
  background-position: var(--art-focus);
}
:is(.pg-dialog-inner, .ec-dialog > div)::after {
  pointer-events: none;
  content: "";
  position: absolute;
  top: clamp(6px, 2vh, 15px);
  left: var(--sheet-pad);
  width: clamp(54px, 12vw, 78px);
  height: clamp(40px, 9vh, 58px);
  background: var(--metal-bright);
  -webkit-mask: var(--crest) center / contain no-repeat;
  mask: var(--crest) center / contain no-repeat;
}
:is(.pg-dialog, .ec-dialog) :is(.pg-dialog-x, #encore-close) {
  position: absolute;
  top: 8px;
  right: 9px;
  min-width: 38px;
  width: 38px;
  height: 38px;
  z-index: 1;
}
:is(.pg-dialog, .ec-dialog) h2 {
  margin: 0 0 12px;
  color: var(--metal-bright);
}
:is(.pg-dialog, .ec-dialog) h3 { color: var(--metal); }
:is(.pg-dialog, .ec-dialog) p { color: #f4ede3; }
.ec-dialog #encore-samples > div {
  padding: 2px 1px 6px;
  border-radius: 6px;
  background: #080d1247;
}
.ec-dialog #encore-samples span { overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .ec-desk .ec-stakes { grid-template-columns: minmax(0, 1fr) 28px 23px 28px; }
  .ec-desk .ec-stakes label { overflow-wrap: anywhere; }
  :is(.pg-game, .ec-game) :is(.pg-main-spin, .ec-action) { min-height: 42px; }
}
@media (max-width: 370px) {
  :is(.pg-game, .ec-game) :is(.pg-main-spin, .ec-action) { padding-inline: 24px; }
  :is(.pg-main-spin, .ec-action)::after { right: 3px; width: 18px; }
}
@media (forced-colors: active) {
  :is(.pg-main-spin, .ec-action)::after, :is(.pg-dialog-inner, .ec-dialog > div)::after { background: ButtonText; }
}
/* Illustrated title plates use the same local panorama as the cabinet, with a
   separate crop so its main subject stays visible above a narrow phone board. */
:is(.pg-head, .ec-head) {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  align-items: flex-end;
  min-height: clamp(136px, 13vw, 185px);
  margin: 0 0 14px;
  padding: clamp(13px, 2vw, 23px);
  border-radius: var(--rim);
  border: 1px solid color-mix(in srgb, var(--metal) 70%, #27242a);
  background: var(--shade);
  box-shadow: 0 9px 24px #06090c80, inset 0 0 0 2px #0009;
}
:is(.pg-head, .ec-head)::before,
:is(.pg-head, .ec-head)::after {
  content: "";
  position: absolute;
  pointer-events: none;
  inset: 0;
  z-index: -1;
}
:is(.pg-head, .ec-head)::before {
  background: var(--poster-art, var(--pg-art, var(--art))) var(--poster-crop, center 52%) / cover;
}
:is(.pg-head, .ec-head)::after {
  background: linear-gradient(90deg, #081013a1, #07111916 58%, transparent),
    linear-gradient(0deg, #03090df2, #080b1026 65%, transparent 83%);
  box-shadow: inset 0 0 0 3px #0003, inset 0 -3px 0 var(--edge);
}
:is(.pg-head, .ec-head) > button {
  position: absolute;
  top: 10px;
  width: 36px;
  height: 36px;
  min-width: 36px;
  color: #fff8e4;
  background: #101319cb;
  border: 1px solid #fff3d488;
  border-radius: 50%;
}
:is(.pg-head, .ec-head) > button:first-child { left: 10px; }
:is(.pg-head, .ec-head) > button:last-child { right: 10px; }
:is(.pg-head, .ec-head) h1 {
  font-size: clamp(34px, 4.5vw, 69px);
  letter-spacing: -.045em;
  color: #fff7e6;
  text-shadow: 0 2px 4px #000b, 0 5px 22px #000a;
  text-wrap: balance;
}
.pg-head-copy p, .ec-head .ec-signature { margin: 5px 0 0; color: #fff3d9; }
.pg-game[data-game=goldline] { --poster-crop: 55% 47%; }
.pg-game[data-game=reef] { --poster-crop: 58% 49%; }
.pg-game[data-game=jade] { --poster-crop: center 40%; }
.pg-game[data-game=scarab] { --poster-crop: center 41%; }
.pg-game[data-game=orrery] { --poster-crop: center 41%; }
.ec-game[data-game=magma] { --poster-crop: center 56%; }
.ec-game[data-game=bluehour] { --poster-crop: center 54%; }
.ec-game[data-game=skyport] { --poster-crop: 52% 40%; }

:is(.pg-cabinet, .ec-cabinet) {
  border: 1px solid var(--metal);
  background: var(--grain), linear-gradient(141deg, var(--metal) -18%, var(--plate) 12%, var(--shade) 47%, var(--plate) 85%, var(--metal) 119%);
  box-shadow: inset 0 0 0 2px var(--shade), inset 0 0 0 3px var(--edge), inset 0 -7px 11px #0007, 0 3px 0 #090c10, 0 15px 38px #0009;
}
:is(.pg-stage, .ec-stage) {
  border: 1px solid var(--metal-bright);
  box-shadow: 0 0 0 2px #070a0b, 0 0 0 3px var(--edge), inset 0 2px 8px #000c;
}
:is(.pg-lintel, .ec-mechanism) { color: var(--metal-bright); }
:is(.pg-board, .ec-board) .pg-icon,
:is(.pg-board, .ec-board) .ec-gem {
  width: 90%;
  height: 90%;
  object-fit: contain;
  filter: drop-shadow(0 3px 1px #110b1390) drop-shadow(0 4px 4px #09080c4a);
}
:is(.pg-cell, .pg-band, .ec-cell, .ec-band) :is(.pg-face, .ec-face) { isolation: isolate; }
:is(.pg-board, .ec-board) :is(.pg-face, .ec-face)::after {
  pointer-events: none;
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--tile-inlay, none);
}

/* Goldline's vertical reels are polished brass and ivory; the symbols sit
   above uninterrupted cylindrical strips instead of separate dark buttons. */
.pg-game[data-game=goldline] .pg-stage { background: #5a371c; }
.pg-game[data-game=goldline] .pg-face {
  inset: 0 2%;
  border-radius: 0;
  border: 0;
  background: linear-gradient(90deg,#63421f,#d1ad6f 5%,#f8e8bd 17%,#fff4d6 40%,#eed8a2 72%,#c49a60 94%,#5a391a);
  box-shadow: inset 0 -1px #6f461f7a, inset 0 1px #fff7cfb0;
  --tile-inlay: repeating-linear-gradient(0deg,#79532608 0 1px,transparent 1px 3px);
}
.pg-game[data-game=goldline] .pg-board {
  background: repeating-linear-gradient(90deg,#5d391f 0 2px,#d4a35d 2px 3px,#50301d 3px calc(100% / var(--pg-cols)));
}

/* Pearl-glass domes carry underwater caustics, and leave the reef visible
   in the channels between cells. */
.pg-game[data-game=reef] .pg-board {
  background: linear-gradient(140deg,#0c687c96,#011c37b0 60%,#55346380),var(--pg-art) center / cover;
}
.pg-game[data-game=reef] .pg-face {
  inset: 3%;
  border-radius: 50%;
  border: 1px solid #b8ffefac;
  background: radial-gradient(ellipse at 28% 15%,#f8fff7b5 0%,#aff5ef41 8%,transparent 22%),
    radial-gradient(circle at 56% 37%,#326773a8 15%,#0a294db5 56%,#3e858cb8 74%,#9dffe4bc 85%,#265565 98%);
  box-shadow: inset -2px -3px 3px #031f47, inset 2px 2px 5px #c9fffb94, 0 2px 5px #00122bc9;
  --tile-inlay: radial-gradient(ellipse at 77% 85%,#dfb5ff60,transparent 33%);
}

/* Jade uses bevelled porcelain tiles on a green lacquer rack. */
.pg-game[data-game=jade] .pg-stage { background: #173e33; }
.pg-game[data-game=jade] .pg-face {
  inset: 2% 3% 5%;
  border-radius: 14% 7%;
  border: 1px solid #fff4ce;
  background: radial-gradient(ellipse at 27% 16%,#ffffeb 0%,transparent 54%),linear-gradient(145deg,#e5f2cc,#c7d9b2 59%,#93b7a1);
  box-shadow: inset 0 0 0 2px #c9d2a2, inset -2px -3px 4px #607f63, 0 3px 0 #417a65, 0 5px 3px #071d16;
  --tile-inlay: linear-gradient(135deg,transparent 14%,#fff6cc42 15%,transparent 15.8% 79%,#79aa8247 80%,transparent 81%);
}
.pg-game[data-game=jade] .pg-board {background:linear-gradient(130deg,#17533d,#0b2a22,#245438);}

/* The opened solar gates have fine bronze chasing and lapis inlay.
   Unopened cells remain unmistakably closed. */
.pg-game[data-game=scarab] .pg-face {
  border-radius: 13% 13% 3% 3%;
  border: 1px solid #d6a251;
  background: radial-gradient(ellipse at 50% 85%,#398785a6,transparent 58%),linear-gradient(140deg,#236a74,#123f55 52%,#092536);
  box-shadow: inset 0 0 0 2px #0e3744, inset 0 0 0 3px #d4a75d7d, 0 2px 3px #050c19;
  --tile-inlay: repeating-conic-gradient(from -36deg at 50% 110%,#efc4771d 0 1deg,transparent 1deg 14deg);
}
.pg-game[data-game=scarab] [data-symbol="-1"] .pg-face {
  border-radius: 2px;
  border: 1px solid #967340;
  background: repeating-linear-gradient(36deg,transparent 0 9px,#c9a87518 10px 11px),linear-gradient(150deg,#54482d,#252724 80%);
  box-shadow: inset 0 0 0 2px #28221c;
  --tile-inlay:none;
}

/* Sapphire night sky with a graduated celestial dial and polished sockets. */
.pg-game[data-game=orrery] .pg-board {
  border-radius: 50%;
  background: radial-gradient(circle at 21% 30%,#fff3c299 0 1px,transparent 1.4px) 0 0 / 31px 29px,
    radial-gradient(circle at 59% 64%,#e1bcfe94 0 1px,transparent 1.3px) 0 0 / 47px 33px,
    radial-gradient(ellipse at 58% 46%,#50375a,#1a244c 57%,#091320 78%);
  box-shadow: inset 0 0 0 2px #eac995,inset 0 0 0 4px #685285,inset 0 0 14px 8px #08091a;
}
.pg-game[data-game=orrery] .pg-stage {background:radial-gradient(ellipse at center,#74578380,#172438db 78%),var(--pg-art) center / cover;}
.pg-game[data-game=orrery] .pg-dial { border-color:#f6d497be;box-shadow:0 0 0 1px #684e62,inset 0 0 0 2px #55426c; }
.pg-game[data-game=orrery] .pg-wheelcell .pg-face {
  border: 1px solid #cfb6e4;
  background: radial-gradient(circle at 35% 17%,#c3bce5,#514574 29%,#2a2e4c 64%,#8b688e);
  box-shadow: inset 0 -2px 2px #100d25,0 2px 3px #050817;
}

/* A hot cast-iron mould, with a narrow seam of exposed furnace beneath. */
.ec-game[data-game=magma] .ec-board { background:linear-gradient(115deg,#4e291c,#ffae52 33%,#9f3017 55%,#6d3a27 88%,#e98948); }
.ec-game[data-game=magma] .ec-face {
  inset: 2% 2% 3%;
  border-radius: 2px;
  border: 1px solid #c87c48;
  background: radial-gradient(ellipse at 55% 110%,#d8642a8c,transparent 62%),linear-gradient(130deg,#514647,#252632 55%,#3d2d2b);
  box-shadow: inset 1px 2px 0 #8b7876, inset -2px -3px 0 #15161b, 0 2px 3px #42190f;
  --tile-inlay: repeating-linear-gradient(120deg,transparent 0 8px,#d2c0a412 9px,transparent 10px 15px);
}

/* Blue Hour's call and response banks get separate stage lights. */
.ec-game[data-game=bluehour] .ec-face {
  inset: 2% 2.5%;
  border-radius: 42% 42% 3% 3%;
  border: 1px solid #a191b5;
  background: radial-gradient(ellipse at 20% 0%,#77c5ee73,transparent 70%),linear-gradient(145deg,#16465d,#172b4c 65%,#142033);
  box-shadow: inset 0 0 0 2px #101c32, inset 0 0 0 3px #b7a16b7d;
  --tile-inlay: repeating-conic-gradient(from -55deg at 50% 119%,#e5d2a513 0 2deg,transparent 2deg 14deg);
}
.ec-game[data-game=bluehour] :is([data-col="3"],[data-col="4"],[data-col="5"]) .ec-face {
  background: radial-gradient(ellipse at 78% 0%,#f4a2c576,transparent 67%),linear-gradient(140deg,#70405c,#402943 65%,#271d34);
}
.ec-game[data-game=bluehour] .ec-board { border-top:2px solid #dcbc82; border-bottom:2px solid #aa855a; }

/* Skyport's chart paper makes each symbol feel like an item laid on a
   navigator's map, beneath the working destination dial. */
.ec-game[data-game=skyport] .ec-board {
  background: repeating-linear-gradient(0deg,transparent 0 15px,#517a702e 15px 16px),
    repeating-linear-gradient(90deg,transparent 0 15px,#517a702e 15px 16px),
    radial-gradient(ellipse at 50% 46%,#e7e0bb,#d1ccaa 57%,#b3ab85);
}
.ec-game[data-game=skyport] .ec-face {
  inset: 0;
  border: 0;
  border-right: 1px dashed #516b62ab;
  border-bottom: 1px dashed #516b62ab;
  border-radius: 0;
  background: linear-gradient(145deg,#fff7d52b,transparent 50%,#597b6c23);
  box-shadow: inset 0 1px 4px #4f5c4c22;
  --tile-inlay: repeating-radial-gradient(ellipse at 110% 110%,transparent 0 11px,#57786a30 12px,transparent 13px 23px);
}

@media (max-width: 720px) {
  :is(.pg-head, .ec-head) {min-height: clamp(122px,32vw,150px); padding: 12px 13px; margin-bottom: 11px;}
  :is(.pg-head, .ec-head) h1 {font-size:clamp(29px,8vw,44px);line-height:1;}
  :is(.pg-head, .ec-head) > button {width:32px;height:32px;min-width:32px;top:7px;}
  :is(.pg-head, .ec-head) > button:first-child {left:7px;}
  :is(.pg-head, .ec-head) > button:last-child {right:7px;}
}
@media (max-height: 550px) and (orientation: landscape) {
  :is(.pg-head, .ec-head) {min-height:94px;padding:10px 54px;}
}

/* One composited atmosphere layer per title. It drifts slowly on entry;
   the short camera push starts with a spin and leaves the reels stationary. */
.cabinet-atmosphere {
  position: absolute;
  inset: -15%;
  pointer-events: none;
  z-index: -1;
  opacity: .78;
  background-image: var(--atmosphere);
  background-repeat: no-repeat;
}
.pg-game[data-game=goldline] {
  --atmosphere: radial-gradient(ellipse at 67% 24%,#ffeace4a,transparent 14%),radial-gradient(ellipse at 83% 24%,#ffd9b758,transparent 23%);
}
.pg-game[data-game=reef] {
  --atmosphere: repeating-conic-gradient(from 164deg at 79% -57%, transparent 0deg 7deg,#befaf036 8deg 11deg,transparent 13deg 20deg);
}
.pg-game[data-game=jade] {
  --atmosphere: radial-gradient(circle at 23% 22%,#ffdf88 0 2px,#ed974b60 3px,transparent 6px),radial-gradient(circle at 63% 45%,#ffe7a6 0 1px,#fcc27c70 3px,transparent 7px),radial-gradient(circle at 76% 31%,#ffe7ac 0 2px,transparent 5px),radial-gradient(circle at 85% 53%,#fff1b7 0 1px,transparent 4px);
}
.pg-game[data-game=scarab] {
  --atmosphere: conic-gradient(from 132deg at 75% -27%, transparent 0 10deg,#ffe3a647 13deg 16deg,transparent 18deg 35deg,#ffe3b234 36deg 38deg,transparent 40deg);
}
.pg-game[data-game=orrery] {
  --atmosphere: radial-gradient(circle at 56% 19%,#fffbc8 0 1px,transparent 2px),radial-gradient(circle at 82% 53%,#e8caff 0 1.5px,transparent 3px),radial-gradient(ellipse at 73% 34%,#c798ef36,transparent 38%);
}
.ec-game[data-game=magma] {
  --atmosphere: radial-gradient(ellipse at 21% 42%,#fff6aa 0 1px,#e8661c8a 2px,transparent 5px),radial-gradient(ellipse at 58% 63%,#ffd26e 0 2px,transparent 4px),radial-gradient(ellipse at 66% 35%,#ffc39b 0 1px,transparent 3px),radial-gradient(ellipse at 70% 74%,#ff782f50,transparent 31%);
}
.ec-game[data-game=bluehour] {
  --atmosphere: conic-gradient(from 160deg at 27% -20%, transparent 0deg 4deg,#a3d8f254 7deg,transparent 15deg),conic-gradient(from 197deg at 86% -16%,transparent 0deg 4deg,#fdaed84a 9deg,transparent 18deg);
}
.ec-game[data-game=skyport] {
  --atmosphere: radial-gradient(ellipse at 58% 56%,#fff1d68c,transparent 9%),radial-gradient(ellipse at 65% 54%,#ffe9c665,transparent 13%),radial-gradient(ellipse at 80% 26%,#fff5dd59,transparent 18%);
}
@media (prefers-reduced-motion: no-preference) {
  .cabinet-atmosphere { animation: cabinet-drift calc(8s * var(--bebeto-motion-factor, 1.25)) ease-in-out infinite alternate; }
  [data-phase=rolling] > :is(.pg-wrap,.ec-in) > :is(.pg-head,.ec-head)::before {
    animation: cabinet-camera calc(1.45s * var(--bebeto-motion-factor, 1.25)) cubic-bezier(.16,.65,.25,1) both;
  }
}
@keyframes cabinet-drift {
  from { transform: translate3d(-1.7%,1.8%,0);opacity:.42; }
  to { transform: translate3d(2.6%,-2.2%,0);opacity:.86; }
}
@keyframes cabinet-camera {
  from { transform:scale(1.045); }
  to { transform:scale(1); }
}

/* Each machine has a physical actuator, mounted above its translated command.
   The transparent native button retains a generous rectangular hit target. */
[data-game="goldline"] { --actuator-throw: translate(-4px,2px) rotate(-5deg); --actuator-pivot: 85% 70%; }
[data-game="reef"] { --actuator-throw: translateY(2px) scaleY(.82); --actuator-pivot: 50% 93%; }
[data-game="jade"] { --actuator-throw: translateY(5px) rotate(3deg); --actuator-pivot: 50% 5%; }
[data-game="scarab"] { --actuator-throw: scaleX(.91) scaleY(1.07); --actuator-pivot: 50% 70%; }
[data-game="orrery"] { --actuator-throw: rotate(-9deg); --actuator-pivot: 50% 50%; }
[data-game="magma"] { --actuator-throw: translateY(5px) rotate(-3deg); --actuator-pivot: 19% 85%; }
[data-game="bluehour"] { --actuator-throw: perspective(150px) rotateX(18deg) translateY(2px); --actuator-pivot: 50% 12%; }
[data-game="skyport"] { --actuator-throw: perspective(180px) rotateY(-16deg) translateX(4px); --actuator-pivot: 26% 70%; }
:is(#club-spin,#encore-spin) {
  align-self:center; justify-self:center; width:min(100%,208px); height:86px;
  display:flex; flex-direction:column; align-items:center; justify-content:flex-end;
  border:0; border-radius:5px; background:none; padding:0 0 1px; gap:0;
  color:var(--metal-bright); text-shadow:0 1px 2px #100e10;
  box-shadow:none; filter:none; cursor:pointer; -webkit-tap-highlight-color:transparent;
}
:is(#club-spin,#encore-spin)::before {
  content:""; position:absolute; inset:1px 0 22px; z-index:0; pointer-events:none;
  background:var(--actuator-art) center bottom / contain no-repeat;
  transform-origin:var(--actuator-pivot);
  filter:drop-shadow(0 2px 1px #080b0eee) drop-shadow(0 4px 4px #0008);
}
:is(#club-spin,#encore-spin)::after {display:none}
#club-spin-glyph,#encore-spin > i {display:none}
:is(#club-spin-label,#encore-spin-label) {
  display:block; position:relative; max-width:100%; font-weight:750; font-size:14px; line-height:20px;
  color:var(--metal-bright); text-align:center; text-shadow:0 1px 2px #000;
}
:is(#club-spin,#encore-spin):focus-visible {outline:2px solid var(--metal-bright);outline-offset:1px}
:is(#club-spin,#encore-spin):disabled {cursor:default;opacity:.55}
:is(#club-spin,#encore-spin):disabled::before {filter:grayscale(.6) brightness(.7)}
@media (hover:hover) {
  :is(#club-spin,#encore-spin):enabled:hover::before {filter:brightness(1.14) drop-shadow(0 3px 3px #0009)}
}
@media (prefers-reduced-motion:no-preference) {
  :is(#club-spin,#encore-spin)::before {transition:transform calc(.16s * var(--bebeto-motion-factor, 1.25)) cubic-bezier(.2,.75,.25,1),filter calc(.16s * var(--bebeto-motion-factor, 1.25))}
  :is(#club-spin,#encore-spin):enabled:active::before {transform:var(--actuator-throw)}
}
@media (prefers-reduced-motion:reduce) {
  :is(#club-spin,#encore-spin):enabled:active {transform:none;filter:brightness(1.16)}
}
@media (max-width:720px) {
  :is(#club-spin,#encore-spin) {height:72px;width:min(100%,172px)}
  :is(#club-spin,#encore-spin)::before {bottom:19px}
}
@media (forced-colors:active) {
  :is(#club-spin,#encore-spin) {border:1px solid ButtonText;background:ButtonFace;color:ButtonText}
  :is(#club-spin-label,#encore-spin-label) {color:ButtonText}
}

[data-game=goldline] {--replay-cut:polygon(0 12%,8% 12%,10% 0,90% 0,92% 12%,100% 12%,100% 36%,97% 50%,100% 64%,100% 88%,92% 88%,90% 100%,10% 100%,8% 88%,0 88%,0 64%,3% 50%,0 36%)}
[data-game=reef] {--replay-rim:65% 32% 65% 32% / 40% 60% 40% 60%}
[data-game=jade] {--replay-cut:polygon(0 50%,7% 22%,7% 10%,15% 10%,17% 0,83% 0,85% 10%,93% 10%,93% 22%,100% 50%,93% 78%,93% 90%,85% 90%,83% 100%,17% 100%,15% 90%,7% 90%,7% 78%)}
[data-game=scarab] {--replay-cut:polygon(0 5%,18% 17%,23% 4%,77% 4%,82% 17%,100% 5%,90% 77%,80% 75%,75% 95%,25% 95%,20% 75%,10% 77%)}
[data-game=orrery] {--replay-rim:50% / 48%}
[data-game=magma] {--replay-cut:polygon(0 0,100% 0,98% 45%,90% 55%,84% 55%,80% 77%,85% 100%,15% 100%,20% 77%,16% 55%,10% 55%,2% 45%)}
[data-game=bluehour] {--replay-rim:40% 40% 5% 5% / 38% 38% 10% 10%}
[data-game=skyport] {--replay-cut:polygon(0 8%,28% 25%,36% 6%,64% 6%,72% 25%,100% 8%,86% 75%,65% 77%,59% 95%,41% 95%,35% 77%,14% 75%)}
:is(#club-highlight,#encore-highlight) {
  position:relative;isolation:isolate;min-height:44px;border:0;border-radius:4px;
  background:transparent;box-shadow:none;color:var(--metal-bright);
}
:is(#club-highlight,#encore-highlight)::before {
  content:"";position:absolute;inset:5px 0;z-index:-1;border:1px solid var(--edge);border-radius:var(--replay-rim,3px);
  background:linear-gradient(170deg,var(--plate),var(--shade));box-shadow:inset 0 1px 0 #fff4,inset 0 -2px #0008;
  clip-path:var(--replay-cut,none);pointer-events:none;
}
:is(#club-highlight,#encore-highlight):focus-visible {outline:2px solid var(--metal-bright);outline-offset:1px}
@media (forced-colors:active){:is(#club-highlight,#encore-highlight){border:1px solid ButtonText}}
@media (max-width: 720px) {
  :is(.pg-game,.ec-game) :is(.pg-head,.ec-head) {
    min-height: clamp(56px,10dvh,94px);
    padding: 6px 50px;
    margin-bottom: 6px;
  }
  :is(.pg-head,.ec-head) h1 { font-size: clamp(22px,min(6.7vw,5dvh),36px); line-height: 1.05; }
  :is(.pg-game,.ec-game) :is(.pg-wrap,.ec-in) { padding-top: 6px; }
  :is(.pg-game,.ec-game) :is(.pg-cabinet,.ec-cabinet) {
    width: min(100%, clamp(216px, calc((100dvh - 325px) * 1.35), 560px));
    margin-inline: auto;
  }
  :is(#club-spin,#encore-spin) { height: clamp(48px,9dvh,72px); }
}
@media (max-width: 720px) and (orientation: portrait) {
  :is([data-game=reef],[data-game=orrery]) .pg-cabinet {
    width: min(100%, max(182px, calc(100dvh - 350px)));
  }
}
@media (orientation: landscape) and (max-height: 550px) {
  :is(.ec-game,.pg-game) :is(.pg-wrap,.ec-in) { padding: 3px 8px 10px; max-width: none; }
  :is(.pg-game,.ec-game) :is(.pg-head,.ec-head) {
    padding: 3px 48px; min-height: 40px; margin: 0 0 4px;
  }
  :is(.pg-head,.ec-head) h1 { font-size: 24px; line-height: 1; }
  .pg-head .pg-head-copy p,.ec-head .ec-signature { margin: 0; font-size: 10px; }
  :is(.pg-theatre,.ec-layout) {
    display: grid; grid-template-columns: minmax(0,1.35fr) minmax(0,1fr); gap: 7px; align-items: start;
  }
  :is(.pg-game,.ec-game) :is(.pg-cabinet,.ec-cabinet) {
    margin-inline:auto; width:min(100%,calc((100dvh - 150px) * 1.25)); min-width:0;
  }
  :is(.pg-game,.ec-game) :is(.pg-console,.ec-desk) {
    min-width: 0; display: grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:5px;
    padding: 6px; align-items:center; margin:0;
  }
  .pg-stats,.ec-stats,.pg-actions { grid-column: 1 / -1; }
  .pg-stats,.ec-stats { margin:0; padding-bottom:3px; }
  .pg-bet,.ec-stakes { grid-column: 1 / -1; margin:0; }
  :is(#club-spin,#encore-spin) { height:48px; }
}
