/* ============================================================
   Würfelschatten – board.css
   Stufenleiter 1..27 (eingravierte Holzstufen, Ziel 27 hervorgehoben),
   Spielfiguren-Pins, kleiner Würfel mit Pips + Roll-Animation,
   gleitende Figurenbewegung, Fokusmarker mit Pop, Sieg-/Highlight-Effekte.

   Modelle für render.js
   ----------------------
   Stufenleiter (.ws-ladder ist column-reverse): Stufen in AUFSTEIGENDER
   Reihenfolge 1..27 anhängen -> Stufe 27 landet oben, Stufe 1 unten.

   Figuren – zwei unterstützte Varianten:
   A) Einfach: .ws-pawn als Kind von .ws-step__track einsetzen.
   B) Gleitend: einen .ws-pawn-layer über das Brett legen und je Figur
      .ws-pawn.ws-pawn--floating mit Inline-Variablen --ws-step (1..27)
      und --ws-lane (0..4) setzen. Position wird per CSS berechnet und
      animiert dadurch sanft beim Stufenwechsel.
   Spielerfarbe immer via Inline-Style --ws-player-color: #hex setzen.
   ============================================================ */

/* ----------------------------------------------------------
   Brett-Rahmen
   ---------------------------------------------------------- */
.ws-board {
  /* Geometrie der Leiter – render.js darf überschreiben */
  --ws-step-count: 27;
  --ws-step-h: 26px;
  --ws-num-w: 58px;
  --ws-lane-x: 92px;   /* x der ersten Bahn (Mitte) */
  --ws-lane-gap: 30px; /* Abstand zwischen den Spielerbahnen */

  position: relative;
  padding: 18px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--wood-darker);
  background-image:
    var(--grain-tex),
    repeating-linear-gradient(90.5deg, var(--grain-line) 0 1px, transparent 1px 9px),
    linear-gradient(150deg, var(--wood-lightest), var(--wood) 60%, var(--wood-mid));
  box-shadow:
    var(--shadow-3),
    inset 0 1px 0 var(--edge-light),
    inset 0 -4px 10px rgba(74, 46, 18, 0.18);
}
.ws-board::after {
  /* eingefräster Innenrahmen */
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: calc(var(--radius-xl) - 8px);
  border: 2px solid rgba(74, 46, 18, 0.22);
  box-shadow: inset 0 0 0 1px var(--edge-light);
  pointer-events: none;
}

.ws-board__title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 2px 4px 12px;
  font-family: var(--font-display);
  color: var(--wood-deep);
}
.ws-board__title small { color: var(--ink-muted); font-weight: 600; }

/* Behälter, der Leiter + Figuren-Layer exakt überlagert */
.ws-board__stage {
  position: relative;
}

/* ----------------------------------------------------------
   Stufenleiter
   ---------------------------------------------------------- */
.ws-ladder {
  position: relative;
  display: flex;
  flex-direction: column-reverse; /* Stufe 1 unten, 27 oben */
  gap: 0;
  border-radius: var(--radius);
  overflow: hidden;
}

.ws-step {
  position: relative;
  display: flex;
  align-items: center;
  height: var(--ws-step-h);
  padding-left: 4px;
  /* eingravierte Holzstufe: dunkle Oberkante + heller Grund */
  background-image:
    linear-gradient(180deg, rgba(74,46,18,0.16) 0 2px, transparent 2px),
    linear-gradient(180deg, rgba(255,250,235,0.5) 0%, rgba(255,250,235,0) 40%);
  box-shadow: inset 0 -1px 0 rgba(255,250,235,0.4);
  transition: background-color var(--speed);
}
/* leichte abwechselnde Maserung */
.ws-step:nth-child(even) { background-color: rgba(120, 80, 40, 0.05); }
.ws-step:nth-child(odd)  { background-color: rgba(255, 250, 235, 0.08); }

/* eingravierte Stufennummer */
.ws-step__num {
  width: var(--ws-num-w);
  flex: none;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.82rem;
  color: var(--wood-darker);
  /* "geschnitzt": dunkle Vertiefung + heller Lichtrand */
  text-shadow: 0 1px 0 var(--edge-light), 0 -1px 0 rgba(74,46,18,0.35);
}
.ws-step__num::before {
  content: "Stufe ";
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--ink-muted);
}

/* Bahn, in der die Figuren stehen (Variante A) */
.ws-step__track {
  position: relative;
  flex: 1;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  padding-right: 8px;
}

/* Markierungsstriche alle 5 Stufen für Lesbarkeit */
.ws-step--milestone { box-shadow: inset 0 1px 0 rgba(74,46,18,0.3), inset 0 -1px 0 rgba(255,250,235,0.4); }
.ws-step--milestone .ws-step__num { color: var(--accent-strong); }

/* aktuelle Stufe der/des am-Zug-Spieler(s) */
.ws-step--current {
  background-image:
    linear-gradient(90deg, rgba(217,164,65,0.32), rgba(217,164,65,0.06) 70%);
  box-shadow: inset 0 0 0 1px var(--gold), inset 0 -1px 0 rgba(255,250,235,0.4);
}

/* Ziel-Stufe 27 – hervorgehoben */
.ws-step--goal {
  height: calc(var(--ws-step-h) + 12px);
  background-image:
    repeating-linear-gradient(45deg, rgba(217,164,65,0.25) 0 10px, rgba(217,164,65,0.08) 10px 20px),
    linear-gradient(180deg, #fff2cf, #f3d489);
  box-shadow:
    inset 0 0 0 2px var(--gold),
    inset 0 2px 6px rgba(168,117,33,0.4),
    0 0 18px rgba(217,164,65,0.45);
}
.ws-step--goal .ws-step__num {
  color: var(--gold-deep);
  font-size: 0.95rem;
}
.ws-step--goal .ws-step__num::before { content: "🏁 Ziel "; }
.ws-step--goal::after {
  content: "27";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.15rem;
  color: var(--gold-deep);
  text-shadow: 0 1px 0 var(--edge-light);
  opacity: 0.55;
  pointer-events: none;
}

/* ----------------------------------------------------------
   Figuren-Layer (Variante B – gleitend)
   ---------------------------------------------------------- */
.ws-pawn-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

/* ----------------------------------------------------------
   Spielfiguren (Pins / Pode)
   ---------------------------------------------------------- */
.ws-pawn {
  --ws-player-color: var(--accent);
  position: relative;
  width: 22px;
  height: 26px;
  flex: none;
  filter: drop-shadow(0 3px 2px rgba(74,46,18,0.4));
  transition: transform var(--speed) var(--ease-back);
}
/* Pin-Kopf (Kugel) */
.ws-pawn::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 16px;
  height: 16px;
  transform: translateX(-50%);
  border-radius: 50%;
  background-color: var(--ws-player-color); /* Fallback, falls color-mix fehlt */
  background-image:
    radial-gradient(circle at 34% 28%, rgba(255,255,255,0.9), rgba(255,255,255,0) 42%),
    radial-gradient(circle at 60% 75%, rgba(0,0,0,0.28), rgba(0,0,0,0) 55%),
    linear-gradient(160deg, var(--ws-player-color), color-mix(in srgb, var(--ws-player-color) 60%, #000));
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.2);
}
/* Pin-Sockel (Konus) */
.ws-pawn::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 18px;
  height: 14px;
  transform: translateX(-50%);
  background-color: var(--ws-player-color); /* Fallback, falls color-mix fehlt */
  background-image: linear-gradient(180deg, var(--ws-player-color), color-mix(in srgb, var(--ws-player-color) 55%, #000));
  clip-path: polygon(28% 0, 72% 0, 100% 100%, 0 100%);
  border-radius: 0 0 4px 4px;
  box-shadow: inset 0 -2px 3px rgba(0,0,0,0.25);
}

/* gleitende Variante: aus --ws-step / --ws-lane positioniert */
.ws-pawn--floating {
  position: absolute;
  left: calc(var(--ws-lane-x) + var(--ws-lane, 0) * var(--ws-lane-gap));
  top: calc((var(--ws-step-count) - var(--ws-step, 1)) * var(--ws-step-h) + var(--ws-step-h) / 2);
  transform: translate(-50%, -50%);
  transition:
    top var(--speed-slow) var(--ease),
    left var(--speed) var(--ease),
    transform var(--speed) var(--ease-back);
  z-index: 3;
}

/* aktive Figur hebt sich leicht ab */
.ws-pawn--active { z-index: 5; }
.ws-pawn--active::before { box-shadow: inset 0 0 0 1px rgba(0,0,0,0.2), 0 0 0 2px var(--gold), 0 0 10px rgba(217,164,65,0.6); }

/* Hüpfen beim Vorrücken */
.ws-pawn--moving { animation: ws-pawn-hop var(--speed-slow) var(--ease) 1; }
@keyframes ws-pawn-hop {
  0%   { transform: translate(-50%, -50%) translateY(0)    scale(1); }
  35%  { transform: translate(-50%, -50%) translateY(-10px) scale(1.12); }
  70%  { transform: translate(-50%, -50%) translateY(-3px)  scale(1.02); }
  100% { transform: translate(-50%, -50%) translateY(0)    scale(1); }
}
/* Variante A (Pawn ohne --floating) ohne translate-Offset */
.ws-pawn:not(.ws-pawn--floating).ws-pawn--moving { animation-name: ws-pawn-hop-static; }
@keyframes ws-pawn-hop-static {
  0%, 100% { transform: translateY(0)    scale(1); }
  35%      { transform: translateY(-10px) scale(1.12); }
  70%      { transform: translateY(-3px)  scale(1.02); }
}

/* Name-Tooltip über der Figur (optional) */
.ws-pawn__label {
  position: absolute;
  left: 50%;
  bottom: 100%;
  transform: translate(-50%, -2px);
  font-size: 0.6rem;
  font-weight: 700;
  white-space: nowrap;
  color: var(--cream);
  background: rgba(58,42,23,0.85);
  padding: 1px 5px;
  border-radius: 999px;
  opacity: 0;
  transition: opacity var(--speed-fast);
  pointer-events: none;
}
.ws-pawn:hover .ws-pawn__label,
.ws-pawn--active .ws-pawn__label { opacity: 1; }

/* ----------------------------------------------------------
   Würfel (Pips per data-value ODER --face) + Roll-Animation
   render.js: <div class="ws-die" data-value="3"></div>
   ---------------------------------------------------------- */
.ws-die {
  --ws-pip: #46300f;        /* Pip-Farbe */
  --ws-die-size: 46px;
  --pip-r: 9%;
  position: relative;
  width: var(--ws-die-size);
  height: var(--ws-die-size);
  border-radius: 22%;
  background-color: var(--paper);
  background-image: linear-gradient(150deg, #fffaf0 0%, var(--paper) 55%, #efdcba 100%);
  border: 1px solid var(--wood-darker);
  box-shadow:
    inset 0 2px 3px rgba(255,255,255,0.8),
    inset 0 -3px 5px rgba(74,46,18,0.22),
    0 3px 6px var(--wood-shadow);
  transition: transform var(--speed) var(--ease-back);
}
/* leichter 3D-Glanz */
.ws-die::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(150deg, rgba(255,255,255,0.5), transparent 45%);
  pointer-events: none;
}

/* Pips als gestapelte radiale Verläufe.
   Positionen: TL 26/26, TR 74/26, ML 26/50, MR 74/50, C 50/50, BL 26/74, BR 74/74 */
.ws-die[data-value="1"], .ws-die--1 {
  background-image:
    radial-gradient(circle at 50% 50%, var(--ws-pip) 0 var(--pip-r), transparent calc(var(--pip-r) + 1%)),
    linear-gradient(150deg, #fffaf0, var(--paper) 60%, #efdcba);
}
.ws-die[data-value="2"], .ws-die--2 {
  background-image:
    radial-gradient(circle at 26% 26%, var(--ws-pip) 0 var(--pip-r), transparent calc(var(--pip-r) + 1%)),
    radial-gradient(circle at 74% 74%, var(--ws-pip) 0 var(--pip-r), transparent calc(var(--pip-r) + 1%)),
    linear-gradient(150deg, #fffaf0, var(--paper) 60%, #efdcba);
}
.ws-die[data-value="3"], .ws-die--3 {
  background-image:
    radial-gradient(circle at 26% 26%, var(--ws-pip) 0 var(--pip-r), transparent calc(var(--pip-r) + 1%)),
    radial-gradient(circle at 50% 50%, var(--ws-pip) 0 var(--pip-r), transparent calc(var(--pip-r) + 1%)),
    radial-gradient(circle at 74% 74%, var(--ws-pip) 0 var(--pip-r), transparent calc(var(--pip-r) + 1%)),
    linear-gradient(150deg, #fffaf0, var(--paper) 60%, #efdcba);
}
.ws-die[data-value="4"], .ws-die--4 {
  background-image:
    radial-gradient(circle at 26% 26%, var(--ws-pip) 0 var(--pip-r), transparent calc(var(--pip-r) + 1%)),
    radial-gradient(circle at 74% 26%, var(--ws-pip) 0 var(--pip-r), transparent calc(var(--pip-r) + 1%)),
    radial-gradient(circle at 26% 74%, var(--ws-pip) 0 var(--pip-r), transparent calc(var(--pip-r) + 1%)),
    radial-gradient(circle at 74% 74%, var(--ws-pip) 0 var(--pip-r), transparent calc(var(--pip-r) + 1%)),
    linear-gradient(150deg, #fffaf0, var(--paper) 60%, #efdcba);
}
.ws-die[data-value="5"], .ws-die--5 {
  background-image:
    radial-gradient(circle at 26% 26%, var(--ws-pip) 0 var(--pip-r), transparent calc(var(--pip-r) + 1%)),
    radial-gradient(circle at 74% 26%, var(--ws-pip) 0 var(--pip-r), transparent calc(var(--pip-r) + 1%)),
    radial-gradient(circle at 50% 50%, var(--ws-pip) 0 var(--pip-r), transparent calc(var(--pip-r) + 1%)),
    radial-gradient(circle at 26% 74%, var(--ws-pip) 0 var(--pip-r), transparent calc(var(--pip-r) + 1%)),
    radial-gradient(circle at 74% 74%, var(--ws-pip) 0 var(--pip-r), transparent calc(var(--pip-r) + 1%)),
    linear-gradient(150deg, #fffaf0, var(--paper) 60%, #efdcba);
}
.ws-die[data-value="6"], .ws-die--6 {
  background-image:
    radial-gradient(circle at 26% 26%, var(--ws-pip) 0 var(--pip-r), transparent calc(var(--pip-r) + 1%)),
    radial-gradient(circle at 74% 26%, var(--ws-pip) 0 var(--pip-r), transparent calc(var(--pip-r) + 1%)),
    radial-gradient(circle at 26% 50%, var(--ws-pip) 0 var(--pip-r), transparent calc(var(--pip-r) + 1%)),
    radial-gradient(circle at 74% 50%, var(--ws-pip) 0 var(--pip-r), transparent calc(var(--pip-r) + 1%)),
    radial-gradient(circle at 26% 74%, var(--ws-pip) 0 var(--pip-r), transparent calc(var(--pip-r) + 1%)),
    radial-gradient(circle at 74% 74%, var(--ws-pip) 0 var(--pip-r), transparent calc(var(--pip-r) + 1%)),
    linear-gradient(150deg, #fffaf0, var(--paper) 60%, #efdcba);
}

/* Kein Wurf vorhanden */
.ws-die--empty {
  opacity: 0.45;
  background-image: linear-gradient(150deg, #f3e7d0, #e3cfa8);
}
.ws-die--empty::before {
  content: "?";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--ink-muted);
}

/* kleiner Würfel im Spielerpanel */
.ws-die--mini { --ws-die-size: 30px; --pip-r: 10%; border-radius: 24%; }

/* Roll-Animation: schütteln & taumeln */
.ws-die--rolling {
  animation: ws-die-roll 0.6s var(--ease) infinite;
}
@keyframes ws-die-roll {
  0%   { transform: rotate(0deg)   translate(0, 0)    scale(1); }
  20%  { transform: rotate(-18deg) translate(-2px,-3px) scale(1.06); }
  40%  { transform: rotate(14deg)  translate(3px, 1px)  scale(0.98); }
  60%  { transform: rotate(-10deg) translate(-3px, 2px) scale(1.05); }
  80%  { transform: rotate(8deg)   translate(2px,-2px)  scale(0.99); }
  100% { transform: rotate(0deg)   translate(0, 0)    scale(1); }
}
/* Aufschlag-Pop, wenn der finale Wert feststeht */
.ws-die--landed { animation: ws-die-land 0.4s var(--ease-back) 1; }
@keyframes ws-die-land {
  0%   { transform: scale(1.3) rotate(-6deg); }
  60%  { transform: scale(0.92) rotate(2deg); }
  100% { transform: scale(1) rotate(0); }
}

/* Würfelbereich (Bühne) im Spielzug */
.ws-die-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 14px;
  min-height: 84px;
  border-radius: var(--radius);
  background-color: rgba(113,78,40,0.1);
  box-shadow: var(--inset-carve);
}
.ws-die-stage__caption {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--wood-deep);
}

/* ----------------------------------------------------------
   Fokusmarker (Münzen) + Pop-Animation
   ---------------------------------------------------------- */
.ws-focus-track {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.ws-focus {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex: none;
  background-image:
    radial-gradient(circle at 35% 30%, #fff3c4, rgba(255,243,196,0) 45%),
    radial-gradient(circle at 65% 75%, rgba(120,80,20,0.5), rgba(120,80,20,0) 55%),
    linear-gradient(160deg, var(--gold-light), var(--gold) 55%, var(--gold-deep));
  box-shadow: 0 1px 2px var(--wood-shadow), inset 0 0 0 1px rgba(120,80,20,0.4);
  position: relative;
  animation: ws-focus-pop var(--speed) var(--ease-back) 1;
}
/* geprägtes "F" / Glanz */
.ws-focus::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 1px solid rgba(120,80,20,0.35);
}
/* leerer Slot (Platzhalter bis maxFocus) */
.ws-focus--empty {
  background-image: none;
  background-color: rgba(113,78,40,0.16);
  box-shadow: var(--inset-carve);
  animation: none;
}
/* gerade neu erhaltener Marker betont poppen */
.ws-focus--gained { animation: ws-focus-pop 0.45s var(--ease-back) 1; }

@keyframes ws-focus-pop {
  0%   { transform: scale(0) rotate(-40deg); opacity: 0; }
  60%  { transform: scale(1.25) rotate(8deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

.ws-focus-count {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.8rem;
  color: var(--gold-deep);
}

/* Fokus-Anpassungssteuerung (−1 / +1) im Zug */
.ws-focus-adjust {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.ws-focus-adjust__btn {
  width: 30px; height: 30px;
  border-radius: 50%;
  font-weight: 900;
  line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
}

/* ----------------------------------------------------------
   Sieg- / Highlight-Effekte
   ---------------------------------------------------------- */
.ws-win-glow { animation: ws-win-glow 1.4s var(--ease) infinite; }
@keyframes ws-win-glow {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(217,164,65,0.5)); }
  50%      { filter: drop-shadow(0 0 16px rgba(217,164,65,0.9)); }
}

/* aufsteigende Funken/Konfetti beim Sieg (rein dekorativ) */
.ws-confetti {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 2;
}
.ws-confetti i {
  position: absolute;
  top: -12px;
  width: 8px;
  height: 12px;
  border-radius: 2px;
  opacity: 0.9;
  animation: ws-confetti-fall linear infinite;
}
@keyframes ws-confetti-fall {
  0%   { transform: translateY(-20px) rotate(0); opacity: 0; }
  10%  { opacity: 1; }
  100% { transform: translateY(420px) rotate(540deg); opacity: 0; }
}

/* Treffer-Blitz auf einer Stufe (z.B. erfolgreicher Schritt) */
.ws-step--flash { animation: ws-step-flash 0.6s var(--ease) 1; }
@keyframes ws-step-flash {
  0%   { background-color: rgba(217,164,65,0.55); }
  100% { background-color: transparent; }
}

/* Fehlschlag-Wackeln (z.B. Würfelbühne) */
.ws-shake { animation: ws-shake 0.4s var(--ease) 1; }
@keyframes ws-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

/* Ziel-Banner über der Leiter beim Sieg */
.ws-goal-banner {
  text-align: center;
  font-family: var(--font-display);
  font-weight: 900;
  color: var(--gold-deep);
  text-shadow: 0 1px 0 var(--edge-light), 0 0 18px rgba(217,164,65,0.6);
}

@media (prefers-reduced-motion: reduce) {
  .ws-die--rolling,
  .ws-pawn--moving,
  .ws-focus,
  .ws-win-glow,
  .ws-confetti i,
  .ws-player--active { animation: none !important; }
}

/* ==========================================================
   Mobil-Steuerelemente: am Desktop ausgeblendet / neutral
   ========================================================== */
.ws-mobilebar { display: none; }
.ws-game__top { display: contents; }   /* Desktop: Wrapper transparent -> Grid bleibt */
.ws-pawn__focus {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translate(-50%, 2px);
  font-size: 0.6rem;
  font-weight: 800;
  line-height: 1.3;
  color: var(--gold-deep);
  background-color: rgba(255, 252, 246, 0.92);
  border-radius: 7px;
  padding: 0 5px;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 1px 3px rgba(48, 30, 12, 0.25);
}

/* ==========================================================
   Mobil-Modus (Smartphone, Hochformat) <= 640px
   Leiter schmal links, Spielzug rechts daneben (volle Hoehe,
   kein Header/Titel). Alle Buttons klein in der unteren Leiste.
   Viewport exakt an die Displaygroesse gekoppelt: kein Scrollen,
   kein Ueberscroll/Verschieben beim Tippen & Wischen.
   ========================================================== */
@media (max-width: 640px) {
  html, body {
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
  }
  body { position: fixed; inset: 0; width: 100%; }
  #app {
    max-width: 100%;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    padding: 8px 8px 0;
  }

  /* Header komplett weg -> oben voller Platz */
  .ws-header { display: none; }

  /* obere Reihe (Leiter + Spielzug) + untere Button-Leiste, exakt im Viewport */
  .ws-game {
    display: flex;
    flex-direction: column;
    position: relative;
    gap: 8px;
    grid-template-columns: none;
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }
  .ws-game__top {
    display: flex;
    flex-direction: row;
    gap: 8px;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
  }
  .ws-mobilebar { flex: 0 0 auto; }

  /* Leiter breiter links (Spielzug rechts braucht nur 1 Button-Spalte) */
  .ws-game__board { flex: 0 0 56%; min-width: 0; display: flex; }
  .ws-board { padding: 8px; flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
  .ws-board__title { display: none; }
  .ws-board__stage {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    --ws-lane-x: 48px;
    --ws-lane-gap: 26px;
  }
  .ws-ladder { height: 100%; }
  .ws-step,
  .ws-step--milestone,
  .ws-step--goal { height: auto; flex: 1 1 0; min-height: 0; }
  .ws-step__num { font-size: 0.68rem; }
  .ws-step--out { display: none !important; }

  /* Figuren: nur aktiver Name, Fokus als Zahl */
  .ws-pawn__label { display: none; }
  .ws-pawn--active .ws-pawn__label { display: block; opacity: 1; font-size: 0.6rem; }
  .ws-pawn__focus { display: inline-block; }
  .ws-pawn__focus:empty { display: none; }

  /* Spielzug rechts daneben, fuellt die Hoehe */
  .ws-game__side { flex: 1 1 0; min-width: 0; position: static; top: auto; gap: 6px; overflow: hidden; }
  .ws-turn { gap: 8px; padding: 12px; height: 100%; overflow: hidden; }
  .ws-turn .ws-panel__title { font-size: 0.9rem; }
  .ws-turn .ws-die-stage { min-height: 46px; padding: 7px; }
  .ws-turn .ws-die-stage__caption { font-size: 0.82rem; }
  /* 4 Aktionen untereinander (eine Spalte) statt 2x2 -> schmaler */
  .ws-actions { grid-template-columns: 1fr; gap: 7px; }
  .ws-action-btn { padding: 8px 9px; border-radius: 11px; }
  .ws-action-btn__hint { display: none; }
  .ws-action-btn__title { font-size: 0.88rem; }
  .ws-action-btn__badge { margin-top: 2px; font-size: 0.76rem; }

  /* Overlays Spieler/Verlauf: ueber den oberen Bereich (nur eines offen) */
  .ws-game__players,
  .ws-game__side .ws-panel--log {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 58px;
    z-index: 30;
    display: none;
    overflow: auto;
    overscroll-behavior: contain;
    box-shadow: 0 14px 34px rgba(48, 30, 12, 0.45);
  }
  .ws-game__players.is-open,
  .ws-game__side .ws-panel--log.is-open { display: block; }
  .ws-game__players .ws-panel { min-height: 100%; }
  .ws-panel--log .ws-log { max-height: none; min-height: 0; overscroll-behavior: contain; }

  /* Untere Button-Leiste: alle Buttons klein */
  .ws-mobilebar {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    padding-bottom: 6px;
    z-index: 40;
  }
  .ws-mobilebar__btn {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--wood-deep);
    padding: 7px 4px;
    border-radius: 12px;
    border: 1px solid rgba(120, 82, 40, 0.28);
    background-color: rgba(255, 252, 246, 0.96);
    box-shadow: 0 2px 8px rgba(48, 30, 12, 0.2);
  }
  .ws-mobilebar__btn .ws-mb__ic { font-size: 1.1rem; line-height: 1; }
  .ws-mobilebar__btn .ws-mb__lb { font-size: 0.6rem; }
  .ws-mobilebar__btn.is-active {
    color: var(--cream);
    border-color: var(--accent-strong);
    background-image: linear-gradient(180deg, var(--accent-soft), var(--accent) 60%, var(--accent-strong));
  }
}
