/* Alpine Lilac Lodge — artwork frames the real engine-driven table. */
body.arcade {
  --ink: #fff5e6; --dim: #e3ccdf; --faint: #c3a6bb;
  --gold: #eed7ef; --brand: #d8bce9; --line2: #976482;
  background: #2d192a; color: var(--ink);
}
body.arcade main.wrap { display: flex; flex-direction: column; max-width: 1060px; }
body.arcade main.wrap > .ac-layout { order: 0; }
body.arcade main.wrap > .ac-hero { order: 2; }
body.arcade main.wrap > .ac-copy { order: 3; }
body.arcade main.wrap > #egm-share { order: 1; }
body.arcade .ac-layout.rail-right { display: flex; flex-direction: column; align-items: center; gap: 14px; margin: 0; }
.kl-scene {
  position: relative; isolation: isolate; flex: none;
  width: min(100%, calc((100svh - 132px) * 0.6666667)); aspect-ratio: 2 / 3;
  background: #602345 url('../assets/play/klondike/scene.webp') center / 100% 100% no-repeat;
  box-shadow: 0 20px 70px #160b1a80;
  container-type: inline-size; scroll-margin-top: 48px;
}
.kl-title { position: absolute; inset: 0 0 auto; margin: 0; line-height: 0; }
.kl-title img { display: block; width: 100%; height: auto; }
#kl-banner {
  position: absolute; z-index: 2; top: 15.3%; left: 31%; width: 38%; height: 4.4%;
  display: flex; align-items: center; justify-content: center;
  background: url('../assets/play/klondike/banner.webp') center / 100% 100% no-repeat;
  font: 900 clamp(12px, 3.4cqw, 19px) Georgia, serif; text-transform: uppercase;
  color: #fff5e6; text-shadow: 0 2px 2px #351024; white-space: nowrap;
}
body.arcade .kl-scene .ac-stage {
  position: absolute !important; left: 3.8%; right: 3.8%; top: 19.5%; height: 61%;
  width: auto; min-height: 0 !important; margin: 0; padding: 0; border: 0;
  border-radius: 0; background: none; box-shadow: none; overflow: visible;
  scroll-margin-top: 48px;
}
.kl-scene .ac-stage::after { display: none; }
#kl-canvas { touch-action: none; background: transparent; }
.kl-controls { position: absolute; inset: 79.5% 7% 0; }
.kl-controls .ac-btnrow {
  display: grid; grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 3px; margin: 0 !important;
}
.kl-controls .ac-btnrow button {
  width: 100%; height: 10cqw; min-height: 36px; margin: 0; padding: 3px 7px;
  border: 0; border-radius: 999px; color: #561535;
  background: url('../assets/play/klondike/button.webp') center / 100% 100% no-repeat;
  box-shadow: none; font: 900 clamp(11px, 3.6cqw, 18px)/1.05 Georgia, serif;
  text-transform: uppercase; text-shadow: 0 1px #fff8eb; cursor: pointer;
}
.kl-controls .ac-btnrow button:disabled { opacity: .72; filter: saturate(.65); cursor: default; }
.kl-controls .ac-btnrow button:not(:disabled):hover { filter: brightness(1.08); }
.kl-controls .ac-btnrow button:not(:disabled):active { transform: translateY(2px); }
.kl-controls #kl-auto { white-space: nowrap; font-size: clamp(10px, 3.1cqw, 16px); }
.kl-controls .ac-toggles { justify-content: center; border: 0; margin: 2px 0 0; padding: 0; }
.kl-controls .ac-toggles label { color: #fff5e6; font: 700 12px Georgia, serif; min-height: 24px; }
.kl-controls input { accent-color: #a866a7; }
.kl-scene button:focus-visible, .kl-scene input:focus-visible {
  outline: 3px solid #fff6db; outline-offset: 2px;
}
body.arcade #kl-setup, body.arcade #kl-overbox {
  padding: 4px; background: transparent; backdrop-filter: none; border-radius: 0;
  overflow: visible; touch-action: none;
}
body.arcade #kl-setup { align-items: center; }
body.arcade #kl-setup .mg-panel { padding: 10px; }
body.arcade #kl-setup .kl-sub { font-size: 11.5px; line-height: 1.4; margin: 6px 0 9px; }
body.arcade #kl-dealno { background: #fffaf0; color: #592747; border-color: #b58aa1; }
body.arcade #kl-dealno::placeholder { color: #795467; opacity: 1; }
.kl-scene .mg-panel {
  background: #fff0dd; color: #592747; border: 2px solid #ce9abc;
  box-shadow: 0 8px 24px #270b28a0, inset 0 0 0 3px #fff8ef;
  padding: 12px; border-radius: 18px; max-width: 100%; max-height: none; overflow: visible;
  --ink: #592747; --dim: #67495d; --faint: #795467; --gold: #81386c;
}
.kl-scene .mg-panel h2 { font: 900 25px Georgia, serif; color: #592747; }
.kl-scene .mg-panel h2 .mg-red { color: #89426e; }
.kl-scene .kl-sub, .kl-scene .mg-sub { font-size: 11.5px; line-height: 1.4; margin: 7px 0 10px; }
.kl-scene .kl-lv {
  background: #602345 url('../assets/play/klondike/velvet.webp') center / cover;
  border: 1px solid #a96e99; box-shadow: inset 0 1px #d4a1c1, 0 2px #cfb4bb;
  color: #fff5e6; min-height: 44px; padding: 8px; gap: 6px;
}
.kl-scene .kl-lv .pip { color: #e9c7e8; }
.kl-scene .kl-lv .txt b { font-size: 12px; }
.kl-scene .kl-lv .txt i { color: #e6ccdd; font-size: 10px; }
.kl-scene .kl-numrow input { min-width: 0; background: #fffaf0; border: 1px solid #b58aa1; color: #592747; padding: 9px; }
.kl-scene .kl-numrow button, #kl-overbox button {
  background: linear-gradient(#8b4a7b,#602345); color: #fff5e6;
  border: 1px solid #ca94bd; min-height: 40px;
}
.kl-scene .kl-foot { font-size: 10px; margin-top: 9px; }
#kl-overbox { align-items: flex-end; padding-bottom: 6px !important; }
#kl-overbox .mg-panel { margin: 0; }
.kl-scene[data-result="win"] #kl-overbox .mg-panel { background: #fff5e6; border-color: #f0ceef; }
.kl-scene[data-result="gaveup"] #kl-overbox .mg-panel { background: #e3d4e2; border-color: #9f779a; }
body.arcade .ac-rail { position: static; width: min(100%, 680px); gap: 12px; }
body.arcade .ac-panel { background: #42253d; border: 1px solid #805775; box-shadow: none; }
.ac-rail .ac-panel:first-child { padding: 12px 16px; }
.ac-rail .ac-panel:first-child > .ac-label { display: none; }
#kl-status { color: #fff3df; font-size: 12px; }
.kl-stats { grid-template-columns: repeat(3,1fr); gap: 5px 12px; font-size: 11px; }
.kl-msg { color: #ead6e8; margin-top: 6px; }
.kl-msg:empty { display: none; }
.kl-mode { color: #d6b9ce; }
body.arcade .ac-copy, body.arcade .ac-hero { width: min(100%, 760px); margin-inline: auto; }
body.arcade #egm-play-header { background: #301f2f !important; border-color: #855872 !important; color: #fff5e6 !important; }
@media(max-width:720px) {
  body.arcade main.wrap { padding-inline: 0; width: 100%; }
  .kl-scene { width: 100%; max-width: 500px; }
  body.arcade .ac-rail { width: calc(100% - 24px); }
  body.arcade .ac-copy, body.arcade .ac-hero { width: calc(100% - 36px); }
  .kl-scene .kl-lv .txt i, .kl-scene .kl-foot { display: none; }
}
@media(max-width:360px) {
  body.arcade #kl-setup .mg-panel { padding: 8px; }
  body.arcade #kl-setup h2 { font-size: 22px; }
  body.arcade #kl-setup .kl-sub { font-size: 10.5px; margin: 5px 0 7px; }
  #kl-banner { font-size: 11px; }
  .kl-scene .kl-lv { min-height: 40px; margin-bottom: 6px; padding: 7px; }
  .kl-scene .kl-lv .txt b { font-size: 11px; }
}
@media(prefers-reduced-motion:reduce) {
  .kl-scene *, .kl-scene *::before, .kl-scene *::after { transition: none !important; animation: none !important; }
}
