/* Compact mechanical controls and confirmation dialogs. */
.slotHeader .headerActions .iconBtn svg { display: block; width: 56%; height: 56%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#soundBtn .soundMuted { display: none; }
#soundBtn[aria-pressed="false"] .soundWaves { display: none; }
#soundBtn[aria-pressed="false"] .soundMuted { display: block; }
.slotHeader .balancePlaque b { font-size: clamp(13px, 1.12vw, 19px); }

/* Frame and close button stay put; one scrollbar lives inside the glass. */
.ledgerModal .ledgerCard { overflow: hidden; display: flex; flex-direction: column; }
.ledgerScroll { min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #c78b3d #132030; scrollbar-gutter: stable; padding: 34px 12px 8px; }
.ledgerScroll::-webkit-scrollbar { width: 6px; }
.ledgerScroll::-webkit-scrollbar-track { background: #132030; border-radius: 8px; }
.ledgerScroll::-webkit-scrollbar-thumb { background: #c78b3d; border-radius: 8px; }
.ledgerScroll:focus-visible { outline: 1px solid #ffda92; outline-offset: -2px; }
.ledgerModal .ledgerTableWrap { max-height: none; overflow: visible; }
.ledgerModal .ledgerActions { flex: 0 0 auto; margin-top: 12px; }
.ledgerModal .ledgerClose { z-index: 3; display: grid; place-items: center; line-height: 1; }
.ledgerModal .ledgerCard h2 { font-family: var(--ui-font); }
html:has(body.ledgerOpen) { overflow: hidden; }
.ledgerModal .ledgerHero { padding: 10px 0; }
.ledgerModal .ledgerHero > strong { font-size: clamp(30px, 4vw, 40px); margin: 3px 0 6px; }
.ledgerModal .ledgerStats > div { padding: 8px 5px; }
.ledgerModal .ledgerTable thead th { background: #10233a; }
@media (min-width: 601px) {
  .ledgerModal .ledgerCard {
    width: min(940px, 94vw, calc((100dvh - 32px) * 1512 / 1040));
    max-height: none; aspect-ratio: 1512 / 1040; padding: 0;
  }
  .ledgerModal .ledgerScroll { position: absolute; inset: 28% 12% 23% 12%; padding: 6px 12px 8px; }
  .ledgerScroll > .ledgerCrest, .ledgerScroll > .ledgerKicker { display: none; }
  .ledgerModal .ledgerClose { left: 88%; right: auto; top: 20%; width: 8%; height: 12%; min-height: 44px; margin: 0; }
  .ledgerModal .ledgerActions { position: absolute; bottom: 14%; left: 10%; right: 10%; margin: 0; }
  .ledgerModal .ledgerCard h2 { margin: 4px 0 8px; }
}
@media (max-width: 600px) {
  .ledgerModal .ledgerCard { padding: 16px 12px; }
  .ledgerScroll { padding-inline: 4px; }
  .slotHeader .balancePlaque b { font-size: clamp(14px, 4vw, 18px); }
}
.slotStage { grid-template-columns: minmax(0, 1fr); }
.slotStage .reelFrame { width: min(90%, 960px) !important; }
.slotStage .reelFrame::before { top: -40% !important; bottom: -18% !important; }
.slotStage .paylineHint { margin-top: 34px; }
.slotStage .cell[data-id="scatter"]::after { content: none; }
.slotStage .cell[data-id="scatter"] .symImg { width: 91% !important; height: 91% !important; }

.deckButton {
  cursor: pointer;
  color: #ffe0a5;
  font-family: var(--ui-font);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3px;
  transition: filter .16s, box-shadow .16s, background .16s, transform .16s;
}
.deckButton svg { width: 26px; height: 26px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.deckButton small { font-size: 10px; font-weight: 800; line-height: 1.2; }
.deckButton b { font-size: 17px; line-height: 1.15; }
.deckButton:hover:not(:disabled), .deckButton.active {
  color: #fff4c7;
  background: #ff9f202b;
  box-shadow: inset 0 0 18px #ffb83c44, 0 0 15px #ff9c2233;
}
.deckButton:active:not(:disabled) { transform: scale(.96); }
.deckButton:disabled { opacity: .5; cursor: not-allowed; }
.deckButton:focus-visible { outline: 2px solid #ffe3ac; outline-offset: 4px; }
.betButton .betReadout { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.controlDeck .deckButton { position: absolute; z-index: 2; top: 44%; height: 32%; min-height: 44px; padding: 3px; border: 0; border-radius: 8px; background-color: transparent; }
.controlDeck .historyBtn { left: 8.4%; width: 5%; flex-direction: column; }
.controlDeck .betButton { left: 15%; width: 23%; flex-direction: row; gap: 12px; }
.controlDeck .autoButton { left: 68%; width: 6%; flex-direction: column; }
.controlDeck .turboButton { left: 75.8%; width: 6%; flex-direction: column; }
.controlDeck .betButton b { font-size: clamp(20px, 2cqw, 29px); }
.controlDeck .deckButton svg { width: clamp(21px, 2.3cqw, 32px); height: clamp(21px, 2.3cqw, 32px); }
.controlDeck .autoButton svg { width: 22px; height: 22px; }
.controlDeck .deckButton.active { background: #ff9f202b; box-shadow: inset 0 0 18px #ffb83c44; }
.controlDeck .deckButton:hover:not(:disabled) { background: #ff9f202b; }

.pickerOpen { overflow: hidden; }
.controlPicker {
  position: fixed; inset: 0; z-index: 1200;
  display: grid; place-items: center;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background: #03080dde; backdrop-filter: blur(8px);
  color: #fff1d3; font-family: var(--ui-font);
}
.controlPicker[hidden] { display: none; }
.pickerCard {
  width: min(100%, 460px); max-height: calc(100dvh - 32px); overflow-y: auto;
  padding: clamp(20px, 4vw, 32px); border: 2px solid #da8f33; border-radius: 22px;
  background: radial-gradient(ellipse at 50% 0, #a9471a55, transparent 65%), linear-gradient(#20150e, #09101c);
  box-shadow: inset 0 0 0 4px #f9b95612, 0 0 45px #ff8d2529, 0 28px 80px #000a;
}
.pickerKicker { color: #d69245; letter-spacing: .25em; font-size: 10px; font-weight: 900; }
.pickerCard h2 { margin: 12px 0 8px; font-size: 28px; }
.pickerCard p { font-size: 13px; line-height: 1.5; color: #c6bbac; }
.pickerOptions { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin: 24px 0 12px; }
.pickerCard button { min-height: 48px; border: 1px solid #916536; border-radius: 10px; background: #172234; color: #eed7b2; font: 800 16px var(--ui-font); cursor: pointer; transition: background .15s, box-shadow .15s, border-color .15s; }
.pickerOptions button { min-height: 65px; font-size: 23px; }
.pickerCard button:hover { border-color: #ffd38a; background: #684321; box-shadow: 0 0 16px #ffa73d40; }
.pickerCard button.selected { border-color: #ffe2a0; color: #fff9e6; background: linear-gradient(#c56b23,#79320d); box-shadow: inset 0 0 0 1px #ffdfa488, 0 0 18px #ff973c60; }
.pickerCard button:focus-visible { outline: 2px solid #ffdb96; outline-offset: 3px; }
.pickerCard button:active { transform: translateY(1px); }
.pickerLimits, .pickerActions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pickerLimits[hidden] { display: none; }
.pickerCard .pickerSelection { color: #ffe6ad; text-align: center; font-weight: 900; font-size: 23px; margin: 20px 0; }
.pickerActions { border-top: 1px solid #d6984033; padding-top: 18px; }
#pickerConfirm { background: linear-gradient(#d17e29,#894110); border-color: #edb55f; color: #fff; }
#pickerConfirm:hover { background: linear-gradient(#e99e45,#ac5819); }

@media (max-width: 1180px), (pointer: coarse) and (max-width: 1366px) {
  .slotStage { grid-template-columns: minmax(0,1fr); }
  .slotStage .reelFrame { width: min(96%, 900px) !important; }
  .slotStage .reelFrame::before { top: -33% !important; bottom: -12% !important; }
  .slotStage .paylineHint { margin-top: 24px; }
  .controlDeck { display: grid; grid-template-columns: 1fr 2.4fr 2fr 1fr 1fr 1.4fr; align-items: center; gap: 10px; height: auto; aspect-ratio: auto; padding: 14px; background: linear-gradient(#29180e,#0d111b); border: 1px solid #a56c32; border-radius: 18px; }
  .controlDeck::before, .controlDeck::after { display: none; }
  .controlDeck .deckButton, .controlDeck .winReadout, .controlDeck .spinBtn { position: relative; inset: auto; grid-area: auto; width: 100%; height: auto; margin: 0; padding: 8px; min-height: 64px; border-radius: 12px; border: 1px solid #8d592b; background: linear-gradient(#283445,#101827); }
  .controlDeck .betButton { gap: 8px; }
  .controlDeck .betButton b { font-size: 22px; }
  .controlDeck .winReadout b { font-size: clamp(18px, 2.6vw, 27px); }
  .controlDeck .spinBtn { max-width: 104px; min-height: 0; padding: 10px; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 40% 30%,#d27e23,#75330d 68%,#281105); justify-self: center; }
}
@media (max-width: 767px) {
  .slotStage .reelFrame { width: min(96%, 520px) !important; }
  .controlDeck { grid-template-columns: 1fr 1fr 1fr 1fr 1fr; padding: 10px; gap: 8px; }
  .controlDeck .historyBtn { grid-column: 1; grid-row: 1; }
  .controlDeck .betButton { grid-column: 2 / 4; grid-row: 1; }
  .controlDeck .autoButton { grid-column: 4; grid-row: 1; }
  .controlDeck .turboButton { grid-column: 5; grid-row: 1; }
  .controlDeck .winReadout { grid-column: 1 / 4; grid-row: 2; min-height: 72px; }
  .controlDeck .spinBtn { grid-column: 4 / 6; grid-row: 2; width: 94px; margin: 5px; }
  .controlDeck .betButton b { font-size: 18px; }
  .controlDeck .betButton svg { width: 23px; height: 23px; }
  .controlDeck .deckButton { padding: 5px; }
  .deckButton small { font-size: 9px; }
  .slotStage .paylineHint { margin-top: 15px; }
}
@media (max-height: 600px) and (orientation: landscape) and (max-width: 1180px) {
  .controlDeck { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; padding: 10px; }
  .controlDeck .deckButton { min-height: 55px; }
  .controlDeck .historyBtn { grid-area: 1 / 1; }
  .controlDeck .betButton { grid-area: 1 / 2 / 2 / 4; }
  .controlDeck .winReadout { grid-area: 2 / 1 / 3 / 4; min-height: 48px; }
  .controlDeck .autoButton { grid-area: 3 / 1; }
  .controlDeck .turboButton { grid-area: 3 / 2; }
  .controlDeck .spinBtn { grid-area: 3 / 3; width: 72px; margin: 0; }
  .pickerCard { padding: 16px 24px; }
  .pickerCard h2 { margin-block: 6px; font-size: 23px; }
  .pickerOptions { margin: 12px 0 8px; }
  .pickerOptions button { min-height: 48px; }
  .pickerCard .pickerSelection { margin-block: 10px; }
}
