/* ==========================================================================
   OAKWD CASINO — Scroll-Seite durch ein 8-Bit-Casino
   Baut auf style.css und retro.css auf (Tokens, Pixel-Panels, Buttons).
   Jede Section ist ein Raum: zwei Kulissen-Canvases (Parallax) und ein
   Spiel-Panel. Kid läuft als fixe Figur unten links mit.
   ========================================================================== */

.casino-html { scroll-behavior: smooth; }
.casino-body {
  margin: 0;
  --game-red: #c99a2e;      /* Casino: harte Schatten in Gold statt Rot – elegant, luxuriös */
  --casino-gold: #f2c94c;
  --casino-cream: #f6e7c1;
  background: var(--ink);
  overflow-x: hidden;
  overscroll-behavior-y: none;
}
@media (prefers-reduced-motion: reduce) { .casino-html { scroll-behavior: auto; } }

/* Hinweis-Overlay: fix, über allem, bei jedem Aufruf ---------------------- */
.overlay--notice {
  position: fixed;
  z-index: 50;
  background: #0a0a0af0;
}
.overlay--notice .panel-text { max-width: 40ch; }

/* HUD oben: Logo links, Chips + Ton rechts --------------------------------- */
.chud {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) calc(12px + var(--safe-r)) 10px calc(12px + var(--safe-l));
  pointer-events: none;
}
.chud > * { pointer-events: auto; }
.chud-brand { display: block; }
.chud-logo {
  display: block;
  width: 84px;
  height: auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  filter: drop-shadow(2px 2px 0 #0a0a0a);
}
.chud-right { display: flex; align-items: flex-start; gap: 10px; }
.chud-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px 0 10px;
  --frame: 3px; --drop: 4px; --notch: 4px;
}
.chud-label { font-size: 12px; letter-spacing: .22em; color: var(--muted-2); }
.chud-value {
  font-size: clamp(22px, 4vw, 30px);
  line-height: 1;
  letter-spacing: .04em;
  color: var(--paper);
  font-variant-numeric: tabular-nums;
  min-width: 3ch;
  text-align: right;
}
.chud-value.is-up { color: var(--game-gold); }
.chud-value.is-down { color: #ff7a6e; }

/* Kid steht in jedem Raum auf der nahen Ebene, gleiche Größe wie die Gäste */
.kid {
  position: absolute;
  z-index: 2;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  pointer-events: none;
}

/* Räume: jeder Raum klebt im Bild, während seine Spur (track) durchläuft ----
   Der Fortschritt in der Spur steuert Tiefe, Texte und die Tür (JS). */
.casino { display: block; }
/* Handy: die Adressleiste ändert die sichtbare Höhe. Der Raum folgt ihr (dvh),
   damit unten kein schwarzer Rand entsteht; die Spuren bleiben stabil (lvh). */
.track { position: relative; height: 240vh; height: 240lvh; }
.track--last { height: 140vh; height: 140lvh; }
.room {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  isolation: isolate;
  background: #14101c;
  perspective: 900px;
}
.layer {
  position: absolute;
  inset: 0;
  pointer-events: none;      /* die Ebene selbst fängt nichts ab – nur die Hotspots */
  transform-origin: 50% 55%;
  will-change: transform;
}
.layer--far { z-index: 0; }
.layer--near { z-index: 1; }
.layer canvas {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  pointer-events: none;
}
.vignette {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: var(--ink);
  opacity: 0;
  pointer-events: none;
}
.room-content {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  text-align: center;
  pointer-events: none;
  will-change: transform, opacity;
}
.room-content > * { pointer-events: auto; }
.room-content--entrance {
  top: calc(64% + 22px);   /* wie alle Texte: unter der Bodenlinie, die Fassade bleibt frei */
  gap: 12px;
}
/* Raumtexte stehen unter der Bodenlinie (64 %), die Szene spielt darüber in der Mitte */
.room-content--top { top: calc(64% + 28px); }
.eyebrow {
  margin: 0;
  padding: 5px 12px 3px;
  font-size: clamp(11px, 1.6vw, 14px);
  letter-spacing: .3em;
  color: var(--ink);
  background: var(--casino-gold);
}
.room-title { margin: 0; line-height: .95; font-size: clamp(38px, 8vw, 84px); }
.room-title--xl { font-size: clamp(44px, 12vw, 120px); }
.room-title .hl { box-shadow: var(--drop) var(--drop) 0 var(--game-red); }
.room-sub {
  margin: 0;
  max-width: 44ch;
  padding: 8px 14px 6px;
  font-size: clamp(14px, 2.2vw, 20px);
  letter-spacing: .2em;
  line-height: 1.4;
  color: var(--casino-cream);
  background: #0a0a0ae0;   /* dunkler Kasten: lesbar auf jeder Kulisse */
  text-wrap: balance;
}
.scroll-hint {
  margin: 10px 0 0;
  padding: 6px 12px 4px;
  font-size: 13px;
  letter-spacing: .3em;
  color: var(--casino-gold);
  background: #0a0a0ae0;
  animation: blink 1.4s steps(1) infinite;
}
.room-content--top .panel-actions { margin-top: 10px; }

/* Hotspots: liegen auf den gezeichneten Geräten und laufen mit der Ebene mit */
.hotspot {
  position: absolute;
  z-index: 4;
  padding: 0;
  border: 3px dashed transparent;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
  transition: border-color .2s ease;
}
.hotspot:hover, .hotspot:focus-visible { border-color: var(--casino-gold); outline: none; }
.hotspot-tag {
  position: absolute;
  left: 50%;
  top: -18px;
  padding: 6px 12px 4px;
  transform: translate(-50%, -100%);
  white-space: nowrap;
  font-size: clamp(13px, 1.8vw, 16px);
  letter-spacing: .24em;
  color: var(--ink);
  background: var(--casino-gold);
  box-shadow: 4px 4px 0 #0a0a0a;
  animation: hotspot-bob 1.1s steps(2) infinite;
}
.hotspot-tag::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -8px;
  width: 0; height: 0;
  margin-left: -7px;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 8px solid var(--casino-gold);
}
@keyframes hotspot-bob { 0%, 100% { transform: translate(-50%, -100%); } 50% { transform: translate(-50%, calc(-100% - 6px)); } }

/* Spiel-Ansichten: kommen aus dem angetippten Gerät heraus */
.game-view {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: calc(20px + env(safe-area-inset-top, 0px)) 18px calc(24px + var(--safe-b));
  background: #0a0a0ab3;
  overflow-y: auto;
  overflow-x: hidden;
  animation: view-fade .25s ease both;
}
.game-view .panel { margin: auto 0; animation: view-in .38s cubic-bezier(.2, 1.2, .4, 1) both; }
@keyframes view-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes view-in { from { opacity: 0; transform: scale(.25); } to { opacity: 1; transform: scale(1); } }
.game-view .panel-back { background: none; border: 0; cursor: pointer; }


/* Spiel-Panel: Panel aus retro.css, hier ohne Einblend-Versatz und mit Platz */
.game-panel { width: min(100%, 620px); margin: 0; animation: none; gap: 12px; }
.game-panel > * { animation: none; }
.game-panel .panel-title { font-size: clamp(34px, 7vw, 64px); }
.result {
  margin: 0;
  min-height: 1.4em;
  font-size: clamp(16px, 2.6vw, 24px);
  letter-spacing: .16em;
  color: var(--paper);
}
.result.is-win { color: var(--game-gold); animation: result-pop .4s steps(3) both; }
.result.is-lose { color: #ff7a6e; }
@keyframes result-pop { from { transform: scale(.8); } to { transform: scale(1); } }

/* Einsatz-Wahl */
.bets {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.bets-label { font-size: 12px; letter-spacing: .26em; color: var(--muted-2); margin-right: 4px; }
.bets button {
  min-width: 52px;
  min-height: 40px;
  padding: 6px 10px 4px;
  border: 3px solid var(--paper);
  background: var(--ink);
  color: var(--paper);
  font-size: 16px;
  letter-spacing: .1em;
  box-shadow: 3px 3px 0 var(--game-red);
  transition: transform .08s steps(2), box-shadow .08s steps(2);
}
.bets button:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--game-red); }
.bets button.is-active { background: var(--casino-gold); color: var(--ink); border-color: var(--casino-gold); }
.bets button.is-off { opacity: .35; pointer-events: none; }
.bets.is-locked button { pointer-events: none; opacity: .6; }
.bets.is-locked button.is-active { opacity: 1; }

/* Kasse */
.cash-balance {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.cash-balance span { font-size: 13px; letter-spacing: .26em; color: var(--muted-2); }
.cash-balance strong {
  font-weight: 400;
  font-size: clamp(44px, 9vw, 72px);
  line-height: 1;
  color: var(--game-gold);
  font-variant-numeric: tabular-nums;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, max-content);
  gap: 6px 22px;
  margin: 6px 0 0;
}
.stats div { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.stats dt { font-size: 11px; letter-spacing: .24em; color: var(--muted-2); }
.stats dd { margin: 0; font-size: 22px; line-height: 1; color: var(--paper); font-variant-numeric: tabular-nums; }

/* Einarmiger Bandit */
.slot {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 14px;
  width: 100%;
}
.slot-face {
  position: relative;
  flex: 0 1 344px;
  max-width: 344px;
  padding: 10px;
  border: 4px solid var(--game-gold);
  background: #1a1210;
  box-shadow: 6px 6px 0 #6e1420, inset 0 0 0 3px #3a2a10;
}
.slot-reels {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  background: #f2f2f2;
}
.slot-line {
  position: absolute;
  left: 4px;
  right: 4px;
  top: 50%;
  height: 0;
  border-top: 2px dashed #f2c94c99;
  pointer-events: none;
}
.slot-face.is-win { animation: slot-flash .25s steps(1) 6; }
@keyframes slot-flash { 0% { border-color: var(--paper); } 50% { border-color: var(--game-gold); } }
.lever {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  width: 64px;
  padding: 10px 6px 8px;
  border: 3px solid var(--paper);
  background: #2b2b2b;
  color: var(--paper);
  box-shadow: 4px 4px 0 var(--game-red);
  font-size: 12px;
  letter-spacing: .2em;
  transition: transform .08s steps(2), box-shadow .08s steps(2);
}
.lever:active, .lever.is-pulled { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--game-red); }
.lever-knob {
  display: block;
  width: 22px;
  height: 22px;
  background: var(--game-red);
  box-shadow: inset -4px -4px 0 #8f1f1a;
  position: relative;
  transition: transform .15s steps(3);
}
.lever-knob::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 22px;
  width: 6px;
  height: 46px;
  background: #b8b8b8;
}
.lever.is-pulled .lever-knob { transform: translateY(46px); }
.lever.is-pulled .lever-knob::after { top: -46px; }
.lever:disabled { opacity: .6; }
.paytable {
  display: grid;
  grid-template-columns: repeat(3, max-content);
  gap: 4px 18px;
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
}
.paytable li { display: flex; align-items: center; gap: 6px; font-size: 12px; letter-spacing: .12em; color: #c4c4c4; }
.paytable canvas { width: 20px; height: 20px; image-rendering: pixelated; image-rendering: crisp-edges; }
.paytable strong { color: var(--game-gold); font-weight: 400; }

/* Glücksrad */
.wheel-wrap { position: relative; width: min(100%, 320px); }
.wheel {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
.wheel-pointer {
  position: absolute;
  left: 50%;
  top: -6px;
  z-index: 2;
  width: 0; height: 0;
  margin-left: -14px;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 26px solid var(--casino-gold);
  filter: drop-shadow(0 3px 0 #0a0a0a);
}

/* Karten */
.cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  min-height: 112px;
}
.card {
  position: relative;
  width: 76px;
  height: 108px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: var(--paper);
  color: var(--ink);
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--game-red), inset 0 0 0 3px var(--paper), inset 0 0 0 5px #c4c4c4;
  animation: card-in .25s steps(3) both;
}
.card-rank { font-size: 40px; line-height: 1; }
.card-suit { font-size: 26px; line-height: 1; font-family: "Segoe UI Symbol", "Apple Symbols", "Noto Sans Symbols", sans-serif; }
.card.is-red { color: #d0342c; }
.card--back {
  background: #2b4a9b;
  color: transparent;
  background-image:
    linear-gradient(45deg, #1d3572 25%, transparent 25%, transparent 75%, #1d3572 75%),
    linear-gradient(45deg, #1d3572 25%, transparent 25%, transparent 75%, #1d3572 75%);
  background-size: 12px 12px;
  background-position: 0 0, 6px 6px;
  box-shadow: 4px 4px 0 var(--game-red), inset 0 0 0 3px var(--paper);
}
.card--back .card-rank, .card--back .card-suit { visibility: hidden; }
.cards--small .card { width: 58px; height: 82px; }
.cards--small .card-rank { font-size: 30px; }
.cards--small .card-suit { font-size: 20px; }
@keyframes card-in { from { opacity: 0; transform: translateY(-10px) rotate(-3deg); } to { opacity: 1; transform: none; } }
.hilo-meta { display: flex; gap: 26px; font-size: 13px; letter-spacing: .24em; color: var(--muted-2); }
.hilo-meta strong { font-weight: 400; color: var(--paper); font-size: 20px; margin-left: 4px; }

/* Blackjack */
.hand { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; }
.hand-label { font-size: 13px; letter-spacing: .24em; color: var(--muted-2); }
.hand-label strong { font-weight: 400; color: var(--paper); font-size: 20px; margin-left: 6px; }
.hand .cards { min-height: 88px; }

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(18px + var(--safe-b));
  z-index: 30;
  max-width: min(92vw, 520px);
  padding: 10px 16px 8px;
  transform: translateX(-50%);
  text-align: center;
  font-size: 14px;
  letter-spacing: .18em;
  color: var(--paper);
  --frame: 3px; --drop: 4px; --notch: 4px;
  animation: toast-in .25s steps(3) both;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* Handy */
@media (max-width: 520px) {
  .chud-logo { width: 64px; }
  .room { padding-left: 12px; padding-right: 12px; }
  .game-panel { padding: 16px 12px 14px; }
  .stats { grid-template-columns: repeat(2, max-content); }
  .slot { gap: 10px; }
  .lever { width: 52px; }
  .paytable { grid-template-columns: repeat(2, max-content); gap: 4px 14px; }
  .card { width: 64px; height: 92px; }
  .card-rank { font-size: 34px; }
  .cards--small .card { width: 50px; height: 72px; }
  .cards--small .card-rank { font-size: 26px; }
  .cards--small .card-suit { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .card, .toast, .result.is-win, .slot-face.is-win { animation: none; }
  .room-bg { will-change: auto; }
}

/* Münzen, die bei Gewinn aus dem Gerät springen */
.coin {
  position: fixed;
  z-index: 40;
  width: 10px;
  height: 10px;
  background: var(--game-gold);
  box-shadow: inset -2px -2px 0 #c99a2e;
  pointer-events: none;
  animation: coin-fly .9s ease-out forwards;
}
@keyframes coin-fly {
  0%   { transform: translate(0, 0); opacity: 1; }
  60%  { transform: translate(var(--dx), var(--dy)); opacity: 1; }
  100% { transform: translate(var(--dx), calc(var(--dy) + 140px)); opacity: 0; }
}

/* Kurze Bildschirme (Laptop quer): Titel kleiner, damit er über der Szene bleibt */
@media (max-height: 820px) {
  .room-content--entrance { top: calc(64% + 14px); gap: 8px; }
  .room-title--xl { font-size: clamp(36px, 9vh, 96px); }
  .room-content--top { top: calc(64% + 16px); gap: 6px; }
  .room-title { font-size: clamp(32px, 7vh, 64px); }
  .room-sub { font-size: clamp(13px, 2vh, 18px); }
}

/* Kleine Anleitung je Spiel: Knopf unter dem Titel, Kasten mit nummerierten Schritten */
.howto-btn {
  margin: -4px 0 0;
  padding: 6px 12px 4px;
  border: 2px solid var(--casino-gold);
  background: var(--ink);
  color: var(--casino-gold);
  font-size: 13px;
  letter-spacing: .22em;
  cursor: pointer;
}
.howto-btn:hover, .howto-btn[aria-expanded="true"] { background: var(--casino-gold); color: var(--ink); }
.howto {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: min(100%, 480px);
  padding: 12px 16px 12px;
  border: 3px solid var(--casino-gold);
  background: #141010;
  box-shadow: 5px 5px 0 var(--game-red);
  text-align: left;
  animation: view-fade .2s ease both;
}
.howto ol {
  margin: 0;
  padding: 0 0 0 1.6em;
  font-size: clamp(13px, 1.9vw, 16px);
  letter-spacing: .06em;
  line-height: 1.5;
  color: var(--casino-cream);
}
.howto li { margin: 0 0 6px; padding-left: 4px; }
.howto li::marker { color: var(--casino-gold); }
.howto .btn { min-height: 40px; padding: 8px 18px; font-size: 14px; }

/* Quer auf dem Handy: wenig Höhe – Texte kompakt unter der Bodenlinie */
@media (max-height: 460px) {
  .room-content--top { top: calc(64% + 8px); gap: 4px; }
  .room-title { font-size: 26px; }
  .room-sub { display: none; }
  .eyebrow { font-size: 10px; }
  .room-content--entrance { top: calc(64% + 6px); gap: 4px; }
  .room-title--xl { font-size: 30px; }
  .scroll-hint { display: none; }
}

/* Abspann unter dem letzten Raum: bleibt normaler Seitenfluss, nichts wird abgeschnitten */
.outro {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 40px 16px calc(48px + var(--safe-b));
  background: var(--ink);
  border-top: 4px solid var(--casino-gold);
}
.outro .panel-actions { justify-content: center; }
.outro-note {
  margin: 0;
  font-size: 12px;
  letter-spacing: .28em;
  color: var(--muted-2);
  text-align: center;
}

/* ==========================================================================
   Ausbau: Happy Hour, Fortschritt, neue Spiele, Garderobe, DJ
   ========================================================================== */

/* HUD: Happy-Hour-Abzeichen */
.chud-happy {
  min-height: 44px;
  padding: 6px 12px 4px;
  font-size: 12px;
  letter-spacing: .18em;
  color: var(--ink);
  background: var(--game-gold);
  text-align: center;
  --frame: 3px; --drop: 4px; --notch: 4px;
  animation: blink 1s steps(1) infinite;
}

/* Hotspots: gesperrt, Happy Hour, unsichtbares Gemälde */
.hotspot.is-locked .hotspot-tag { background: #8a8a8a; color: var(--ink); animation: none; }
.hotspot.is-locked .hotspot-tag::after { border-top-color: #8a8a8a; }
.hotspot.is-locked .hotspot-tag::before { content: "🔒 "; }
.hotspot.is-happy .hotspot-tag { background: var(--paper); box-shadow: 4px 4px 0 var(--game-gold); }
.hotspot.is-happy .hotspot-tag::after { border-top-color: var(--paper); }
.hotspot.is-happy .hotspot-tag::before { content: "2× "; }
.hotspot--secret .hotspot-tag { display: none; }
.hotspot--secret:hover, .hotspot--secret:focus-visible { border-color: transparent; }

/* Kid setzt sich: weicher Weg zum Platz */
.kid.is-moving { transition: left .6s ease, top .6s ease; }

/* Lever per Wischgeste: die Seite darf dabei nicht scrollen */
.lever { touch-action: none; user-select: none; -webkit-user-select: none; }
.panel-actions--tight { margin: -4px 0 0; }

/* Slot: Freispiele (goldener Rahmen), Jackpot-Topf */
.slot-face.is-free { border-color: var(--paper); background: #3a2a10; box-shadow: 6px 6px 0 var(--game-gold), inset 0 0 0 3px #6e4a2a; animation: free-glow 1s steps(2) infinite; }
@keyframes free-glow { 0% { border-color: var(--paper); } 50% { border-color: var(--game-gold); } }
.slot-pot {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 6px 14px 4px;
  font-size: 12px;
  letter-spacing: .24em;
  color: var(--muted-2);
  border: 3px solid var(--game-gold);
  background: #0a0a0a;
}
.slot-pot strong { font-weight: 400; font-size: 24px; line-height: 1; color: var(--game-gold); font-variant-numeric: tabular-nums; }

/* Kasse: Stempelkarte, Aufgaben, Verlauf */
.sub-title { margin: 6px 0 0; font-size: 13px; letter-spacing: .28em; color: var(--casino-gold); font-weight: 400; text-align: center; }
.stamps { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.stamp {
  width: 44px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--muted-2);
  border: 2px dashed #5a5a5a;
  background: #141414;
  font-variant-numeric: tabular-nums;
}
.stamp.is-on { color: var(--ink); background: var(--game-gold); border: 2px solid var(--paper); box-shadow: 2px 2px 0 #0a0a0a; }
.tasks { width: 100%; max-width: 440px; margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.task {
  display: grid;
  grid-template-columns: 1fr max-content;
  align-items: center;
  gap: 4px 12px;
  padding: 8px 12px 6px;
  border: 2px solid #3a3a3a;
  background: #141414;
  font-size: 12px;
  letter-spacing: .14em;
  color: #c4c4c4;
  text-align: left;
}
.task-name { text-align: left; }
.task-prog { color: var(--paper); font-variant-numeric: tabular-nums; }
.task.is-done { border-color: var(--game-gold); color: var(--paper); }
.task.is-claimed { opacity: .55; }
.task.is-claimed .task-prog { color: var(--game-gold); }
.task-claim { grid-column: 1 / -1; justify-self: center; min-height: 36px; padding: 6px 14px 4px; font-size: 13px; }
.chip-chart { display: block; width: min(100%, 360px); height: auto; image-rendering: pixelated; image-rendering: crisp-edges; border: 3px solid var(--game-gold); }

/* Rekorde */
.stats--records { grid-template-columns: repeat(2, max-content); gap: 10px 32px; }
.stats--records dt { font-size: 12px; }
.stats--records dd { font-size: 26px; color: var(--game-gold); }

/* Vitrine */
.game-panel--wide { width: min(100%, 720px); }
.trophies { width: 100%; margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.trophy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 6px 8px;
  border: 2px solid #3a3a3a;
  background: #141414;
  text-align: center;
  color: #8a8a8a;
}
.trophy canvas { width: 36px; height: 42px; image-rendering: pixelated; image-rendering: crisp-edges; }
.trophy strong { font-weight: 400; font-size: 12px; letter-spacing: .14em; }
.trophy span { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 11px; line-height: 1.3; }
.trophy.is-on { border-color: var(--game-gold); color: var(--paper); box-shadow: 3px 3px 0 #6e1420; }
.trophy.is-on strong { color: var(--game-gold); }

/* Roulette */
.game-panel--roul { width: min(100%, 680px); }
.roul { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 14px; width: 100%; }
.roul-wheel-wrap { flex: 0 0 auto; width: 160px; }
.roul-wheel { display: block; width: 160px; height: 160px; image-rendering: pixelated; image-rendering: crisp-edges; }
.roul-bets { flex: 1 1 260px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.rb {
  min-height: 40px;
  padding: 8px 6px 6px;
  border: 2px solid #5a5a5a;
  background: #1e6b3a;
  color: var(--paper);
  font-size: 12px;
  letter-spacing: .12em;
  cursor: pointer;
  text-align: center;
}
.rb--red { background: #d0342c; }
.rb--black { background: #1a1a1a; }
.rb--wide { grid-column: 1 / -1; }
.rb.is-active { border-color: var(--game-gold); box-shadow: inset 0 0 0 2px var(--game-gold), 3px 3px 0 #0a0a0a; color: var(--game-gold); }
.roul-nums { width: 100%; display: grid; grid-template-columns: repeat(13, 1fr); gap: 3px; }
.rnum { min-height: 30px; padding: 4px 0 2px; border: 2px solid #3a3a3a; color: var(--paper); font-size: 12px; cursor: pointer; }
.rnum--red { background: #d0342c; }
.rnum--black { background: #1a1a1a; }
.rnum--green { background: #1e6b3a; grid-column: 1 / -1; }
.rnum.is-active { border-color: var(--game-gold); box-shadow: inset 0 0 0 2px var(--game-gold); color: var(--game-gold); }

/* Video Poker: Karten zum Halten */
.game-panel--poker { width: min(100%, 680px); }
.cards--poker { gap: 8px; min-height: 120px; }
.cards--poker .card { width: 64px; height: 92px; cursor: pointer; }
.cards--poker .card-rank { font-size: 34px; }
.cards--poker .card-suit { font-size: 22px; }
.card-tag {
  position: absolute;
  left: 50%;
  bottom: -14px;
  padding: 3px 8px 1px;
  transform: translateX(-50%);
  font-size: 10px;
  letter-spacing: .2em;
  color: var(--ink);
  background: var(--game-gold);
  visibility: hidden;
}
.card.is-held { transform: translateY(-8px); box-shadow: 4px 4px 0 var(--game-gold), inset 0 0 0 3px var(--paper), inset 0 0 0 5px var(--game-gold); }
.card.is-held .card-tag { visibility: visible; }
.paytable--poker { grid-template-columns: repeat(3, max-content); }
.paytable--poker li { justify-content: space-between; gap: 10px; }
.paytable--poker li.is-hit { color: var(--game-gold); }
.paytable--poker li.is-hit strong { color: var(--paper); }

/* Würfel */
.dice { display: block; width: min(100%, 288px); height: auto; image-rendering: pixelated; image-rendering: crisp-edges; border: 3px solid var(--game-gold); }

/* Hinterzimmer: Münze */
.game-panel--secret { border-color: #3a3a3a; }
.coin-wrap { display: flex; justify-content: center; perspective: 400px; }
.coin-face {
  position: relative;
  width: 84px;
  height: 84px;
  transform-style: preserve-3d;
  transition: transform .7s ease;
}
.coin-side {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: var(--ink);
  background: var(--game-gold);
  border: 4px solid #c99a2e;
  box-shadow: inset -6px -6px 0 #c99a2e;
  backface-visibility: hidden;
}
.coin-side--t { transform: rotateY(180deg); background: #f6e7c1; }
.coin-face.is-flip { animation: coin-spin .7s linear; }
.coin-face.is-heads { transform: rotateY(0deg); }
.coin-face.is-tails { transform: rotateY(180deg); }
@keyframes coin-spin { from { transform: rotateY(0); } to { transform: rotateY(1440deg); } }

/* Garderobe */
.suits, .items { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; width: 100%; }
.suit, .item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 96px;
  padding: 10px 10px 8px;
  border: 2px solid #3a3a3a;
  background: #141414;
  color: var(--paper);
  font-size: 12px;
  letter-spacing: .16em;
  cursor: pointer;
}
.suit-swatch { width: 28px; height: 36px; border: 2px solid var(--paper); }
.suit--white .suit-swatch { background: #f2f2f2; }
.suit--black .suit-swatch { background: #1a1a1a; }
.suit--wine .suit-swatch { background: #6e1420; }
.suit.is-active, .item.is-active { border-color: var(--game-gold); box-shadow: 3px 3px 0 #6e1420; }
.item.is-locked { opacity: .5; cursor: not-allowed; }
.item-state { font-size: 10px; letter-spacing: .2em; color: var(--muted-2); }
.item.is-active .item-state { color: var(--game-gold); }
.item-icon { width: 28px; height: 20px; background: var(--game-gold); }
.item-icon--hat { clip-path: polygon(0 100%, 100% 100%, 100% 75%, 75% 75%, 75% 0, 25% 0, 25% 75%, 0 75%); background: #1a1a1a; border-bottom: 3px solid var(--game-gold); }
.item-icon--shades { background: #1a1a1a; clip-path: polygon(0 20%, 45% 20%, 45% 45%, 55% 45%, 55% 20%, 100% 20%, 100% 80%, 55% 80%, 55% 55%, 45% 55%, 45% 80%, 0 80%); }
.item-icon--chain { clip-path: polygon(0 0, 15% 0, 50% 70%, 85% 0, 100% 0, 50% 100%); }
.item-icon--bow { background: #6e1420; clip-path: polygon(0 0, 45% 40%, 55% 40%, 100% 0, 100% 100%, 55% 60%, 45% 60%, 0 100%); }

/* DJ */
.dj-now { margin: 0; font-size: 18px; letter-spacing: .2em; color: var(--game-gold); }
[data-track].is-active { box-shadow: inset 0 0 0 3px var(--paper); }

@media (max-width: 520px) {
  .chud-happy { font-size: 10px; padding: 4px 8px 2px; min-height: 36px; }
  .trophies { grid-template-columns: repeat(2, 1fr); }
  .roul-nums { grid-template-columns: repeat(9, 1fr); }
  .rb { font-size: 11px; padding: 6px 4px 4px; }
  .cards--poker .card { width: 54px; height: 78px; }
  .cards--poker .card-rank { font-size: 28px; }
  .cards--poker .card-suit { font-size: 18px; }
  .paytable--poker { grid-template-columns: repeat(2, max-content); }
  .stats--records { gap: 8px 20px; }
  .suit, .item { min-width: 80px; }
}
@media (prefers-reduced-motion: reduce) {
  .chud-happy, .slot-face.is-free, .coin-face.is-flip { animation: none; }
  .kid.is-moving, .coin-face { transition: none; }
}
.hotspot[hidden] { display: none !important; }

/* Breite Bildschirme: die Ansicht rückt nach rechts, links bleibt der Raum mit Kid am Platz sichtbar */
@media (min-width: 1100px) and (min-height: 600px) {
  .game-view { align-items: flex-end; padding-right: 24px; }
  .game-view.is-left { align-items: flex-start; padding-left: 24px; }
  .game-panel { width: min(100%, 580px); }
  .game-panel--roul, .game-panel--poker { width: min(100%, 660px); }
  .game-panel--wide { width: min(100%, 700px); }
}

/* Offene Ansicht: die Seite dahinter steht still (Body festgehalten, JS setzt top) */
body.has-view { position: fixed; left: 0; right: 0; width: 100%; overflow: hidden; }
.game-view { overscroll-behavior: contain; }
