/* ============================================================
   Spielmeister — helles, weiches Pastell-Design.
   Luftiger Hintergrund, sanfte Kacheln, dunkle lesbare Zahlen.
   Die Werkzeuge (Würfel, Startspieler, Timer) bleiben bewusst
   dunkel — dort wirken Würfel und Farbkreise am schönsten.
   ============================================================ */

:root {
  --bg: #f3f2f9;          /* luftiger Hintergrund */
  --leiste: #ffffff;      /* Leisten & Karten */
  --flaeche-2: #ecebf4;   /* leicht abgesetzt / Hover */
  --text: #3b3556;        /* weiches Dunkel */
  --text-soft: #6d6789;
  --text-muted: #9c97b3;
  --rand: #e6e4f0;
  --overlay-btn: rgba(59, 53, 86, 0.06);
  --overlay-btn-akt: rgba(59, 53, 86, 0.13);
  --akzent: #e8b45a;
  --akzent-tief: #d29e3c;
  --akzent-text: #4a3708;
  --danger: #ec6a6a;
  --werk-dunkel: #17152a; /* dunkler Hintergrund der Vollbild-Werkzeuge */
  --radius: 16px;
  --kopf-hoehe: 54px;
  /* Größe und Oberkante der Tisch-Bühne. BEIDE Ansichten (Übersicht und
     „Stühle stellen") nutzen exakt diese Werte, damit der Tisch beim
     Weiterklicken auf demselben Fleck liegen bleibt.
     Die GRÖSSE ist an die Oberkante gekoppelt: unten bleiben immer 175px für
     Knopf + Schrittleiste frei — so kann sich NICHTS überlappen, egal wie
     hoch der Bildschirm ist. */
  --tisch-frei-unten: 150px;
  --tisch-oben: clamp(255px, 32vh, 290px);
  --tisch-gr: min(92vw, 340px, calc(100dvh - var(--kopf-hoehe) - var(--tisch-oben) - var(--tisch-frei-unten)
    - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)));
  --werk-hoehe: 60px;
  --schatten: 0 2px 10px rgba(59, 53, 86, 0.06);
  --font-titel: 'Love Ya Like A Sister', 'Playfair Display', Georgia, cursive;
}

/* Besondere Überschriften-Schrift (handgeschrieben), lokal für Offline-Betrieb. */
@font-face {
  font-family: 'Love Ya Like A Sister';
  font-style: normal; font-weight: 400; font-display: swap;
  src: url('../fonts/love-ya-like-a-sister.woff2') format('woff2');
}
@font-face {
  font-family: 'Niconne';
  font-style: normal; font-weight: 400; font-display: swap;
  src: url('../fonts/niconne.woff2') format('woff2');
}

/* Akzentfarben (Grün gratis, Rest = Spielmeister Plus) — weich, aber
   kräftig genug für weißen Text auf Knöpfen. */
[data-akzent="gold"]     { --akzent: #e8b45a; --akzent-tief: #d29e3c; --akzent-text: #4a3708; }
[data-akzent="amethyst"] { --akzent: #9b87e0; --akzent-tief: #7c67c8; --akzent-text: #160f30; }
[data-akzent="magenta"]  { --akzent: #d46aa6; --akzent-tief: #bd5590; --akzent-text: #2a0f20; }
[data-akzent="gruen"]    { --akzent: #57b98f; --akzent-tief: #46a079; --akzent-text: #ffffff; }
[data-akzent="petrol"]   { --akzent: #3fb0a6; --akzent-tief: #2f978d; --akzent-text: #ffffff; }
[data-akzent="blau"]     { --akzent: #6f9be6; --akzent-tief: #5985d6; --akzent-text: #ffffff; }
[data-akzent="koralle"]  { --akzent: #ef8b86; --akzent-tief: #e5746e; --akzent-text: #ffffff; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  user-select: none;
}

button { font-family: inherit; cursor: pointer; }

:focus-visible { outline: 3px solid var(--akzent); outline-offset: 2px; border-radius: 6px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------------- Kopfleiste ---------------- */

/* Die Kopfleiste bleibt IMMER stehen — auch über Dialogen und Vollbild-
   Werkzeugen. Deshalb liegt sie höher als das Overlay, und das Overlay
   beginnt erst unter ihr (siehe #overlay). So kommt man aus jedem Fenster
   ins Menü und kann jederzeit ↶ ↷ drücken. */
.kopfleiste {
  position: relative;
  z-index: 60;
  height: calc(var(--kopf-hoehe) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) 10px 0 12px;
  background: var(--leiste);
  border-bottom: 1px solid var(--rand);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.kopfleiste h1 {
  font-size: 19px;
  margin: 0;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* Pfad-Leiste (Breadcrumb) statt Titel: zeigt den Weg und lässt zu jeder Ebene
   zurückspringen. Scrollt bei Platzmangel waagerecht (aktuelle Ebene bleibt sichtbar). */
.kopf-pfad {
  flex: 1 1 auto; min-width: 0;
  display: flex; align-items: center; gap: 1px;
  overflow-x: auto; white-space: nowrap; scrollbar-width: none;
}
.kopf-pfad::-webkit-scrollbar { display: none; }
.kp-schritt {
  border: none; background: none; font-family: inherit;
  font-size: 15px; padding: 5px 6px; border-radius: 8px;
  color: var(--text-muted); cursor: pointer; white-space: nowrap; flex: 0 0 auto;
}
.kp-schritt:active { background: var(--overlay-btn-akt); }
.kp-schritt-aktuell { color: var(--text); font-weight: 700; cursor: default; }
.kp-sep { color: var(--text-muted); opacity: .55; font-size: 15px; flex: 0 0 auto; }

.kopf-knoepfe { display: flex; gap: 4px; flex-shrink: 0; }

.kopf-knoepfe button {
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 11px;
  background: var(--overlay-btn);
  color: var(--text);
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}
.kopf-knoepfe button:active { background: var(--overlay-btn-akt); }

#btn-mic.mic-an {
  background: var(--danger);
  color: #fff;
  animation: pulsieren 1.6s ease-in-out infinite;
}
/* Notizblock-Umschalter oben rechts: gold hinterlegt, wenn der Block sichtbar ist. */
#btn-block.kopf-an { background: var(--akzent); color: var(--akzent-text); }
@keyframes pulsieren {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.55); }
  50% { box-shadow: 0 0 0 9px rgba(239, 68, 68, 0); }
}

/* ---------------- Haupt-Bereich ---------------- */

#haupt {
  position: relative;   /* Bezugsrahmen für die absolut liegende Tisch-Bühne */
  height: calc(100dvh - var(--kopf-hoehe)
    - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
}
.haupt-scroll {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 12px 24px;
}

/* ---------------- Werkzeug-Leiste unten ---------------- */

.werk-leiste {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--werk-hoehe) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--leiste);
  border-top: 1px solid var(--rand);
  display: flex;
  z-index: 30;
}

.werk-tab {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-soft);
  font-size: 10.5px;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: 12px;
  margin: 5px 3px;
  transition: background 0.15s ease;
}
.werk-icon { font-size: 20px; transition: transform 0.15s ease; }
.werk-tab-aktiv { background: var(--overlay-btn); color: var(--text); }
.werk-tab-aktiv .werk-icon { transform: scale(1.15); }
.werk-tab:active { background: var(--overlay-btn-akt); }

/* ---------------- Kachel-Raster (freies Zählen) ---------------- */

#kacheln {
  height: 100%;
  display: grid;
  gap: 6px;
  padding: 6px;
  grid-template-columns: 1fr;
}
#kacheln[data-anzahl="2"] { grid-template-rows: 1fr 1fr; }
#kacheln[data-anzahl="3"] { grid-template-rows: repeat(3, 1fr); }
#kacheln[data-anzahl="4"] { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
#kacheln[data-anzahl="5"],
#kacheln[data-anzahl="6"] { grid-template-columns: 1fr 1fr; grid-template-rows: repeat(3, 1fr); }
#kacheln[data-anzahl="7"],
#kacheln[data-anzahl="8"] { grid-template-columns: 1fr 1fr; grid-template-rows: repeat(4, 1fr); }

.kachel {
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px 12px;
  min-height: 0;
  position: relative;
  color: #40384f;                 /* dunkle, gut lesbare Zahlen auf Pastell */
  border: 3px solid transparent;
  box-shadow: var(--schatten);
}
.kachel-dran {
  border-color: rgba(64, 56, 79, 0.55);
  box-shadow: 0 0 0 3px rgba(64, 56, 79, 0.14), inset 0 0 44px rgba(255, 255, 255, 0.35);
}

.kachel-kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
}

.kachel-name {
  background: rgba(255, 255, 255, 0.55);
  border: none;
  color: #40384f;
  font-size: clamp(14px, 2.6vmin, 20px);
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  max-width: 70%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 36px;
}

.dran-chip {
  background: #40384f;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 11px;
  border-radius: 999px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.kachel-punkte {
  text-align: center;
  font-size: clamp(44px, 12vmin, 110px);
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.kachel-tasten { display: flex; gap: 8px; }

.taste {
  flex: 1;
  min-height: clamp(44px, 8vmin, 64px);
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.5);
  color: #40384f;
  font-size: clamp(20px, 4.5vmin, 34px);
  font-weight: 700;
  transition: background 0.1s ease, transform 0.05s ease;
}
.taste:active { background: rgba(255, 255, 255, 0.8); transform: scale(0.97); }
.taste-zahl { flex: 0.7; font-size: clamp(14px, 2.6vmin, 20px); letter-spacing: 0.06em; }

/* ---------------- Overlay + Dialoge ---------------- */

#overlay {
  position: fixed;
  inset: calc(var(--kopf-hoehe) + env(safe-area-inset-top, 0px)) 0 0 0;
  background: rgba(2, 6, 23, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 40;
}

.dialog {
  background: white;
  color: #1e293b;
  border-radius: 18px;
  padding: 20px;
  width: 100%;
  max-width: 360px;
  max-height: 100%;
  overflow-y: auto;
  scrollbar-width: none;                 /* Firefox: kein sichtbarer Balken */
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.45);
}
.dialog::-webkit-scrollbar { display: none; } /* Chrome/Safari: kein Balken */
.dialog-breit { max-width: 520px; }

/* Ziehen & Fallenlassen (drag.js): der Klon hängt am Finger, Ziele leuchten. */
.zieh-klon {
  position: fixed; z-index: 200; pointer-events: none; margin: 0;
  transform: translate(-50%, -50%) scale(1.15);
  opacity: 0.92; filter: drop-shadow(0 8px 16px rgba(0,0,0,0.45));
}
/* RUHIGE Rückmeldung: KEIN goldener Rahmen um alle möglichen Ziele — das war zu
   unruhig. Hervorgehoben wird nur das Ziel unter dem Finger, und auch das nur
   dezent (etwas heller, minimal größer). */
.zieh-ziel { /* absichtlich ohne eigene Optik */ }
/* Nur ein weicher Schein plus etwas mehr Helligkeit. KEIN Rahmen, kein
   Verschieben — die Lage der Elemente darf sich beim Ziehen nicht ändern. */
.zieh-ziel-hover { filter: brightness(1.22) drop-shadow(0 0 7px rgba(255, 255, 255, .45)); }

/* Eigenständiges Fenster statt Popup (Spielauswahl „Mehr Spiele"): der Dialog
   füllt den ganzen Bildschirm, kein abgesetzter Popup-Rahmen mehr. */
#overlay.overlay-voll { padding: 0; align-items: stretch; }
.dialog.dialog-vollfenster {
  max-width: none; width: 100%; height: 100%; max-height: 100%;
  border-radius: 0; padding: 18px 16px 24px;
  /* Kein weißer Kasten mehr: das Vollfenster übernimmt den dunklen App-Look. */
  background: radial-gradient(120% 60% at 50% -8%, #312a47 0%, #1e1930 42%, #15111f 100%);
  color: #f1eefb;
}
.dialog.dialog-vollfenster .dialog-titel { color: #f3e7d0; }
.dialog.dialog-vollfenster .sw-vorlage {
  background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); color: #f1eefb;
}
.dialog.dialog-vollfenster .sw-vorlage-aktiv { background: var(--akzent); color: var(--akzent-text); border-color: transparent; }
.dialog.dialog-vollfenster .sw-titel { color: inherit; }
.dialog.dialog-vollfenster .sw-text { color: rgba(255,255,255,.6); }
.dialog.dialog-vollfenster .eingabe {
  background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.2); color: #fff;
}
.dialog.dialog-vollfenster .set-label, .dialog.dialog-vollfenster .eingabe-label { color: rgba(255,255,255,.65); }
.dialog.dialog-vollfenster .btn-ghost { color: rgba(255,255,255,.75); border-color: rgba(255,255,255,.25); }
/* Steckbrief im Vollfenster: alle Nebentexte und Chips hell genug */
.dialog.dialog-vollfenster .schalter-hinweis, .dialog.dialog-vollfenster .leer-text { color: rgba(255,255,255,.55); }
.dialog.dialog-vollfenster .btn-secondary { background: rgba(255,255,255,.1); color: #f1eefb; border: 1px solid rgba(255,255,255,.2); }
.dialog.dialog-vollfenster .wer-chip, .dialog.dialog-vollfenster .np-gchip {
  background: rgba(255,255,255,.08); color: rgba(255,255,255,.85); border-color: rgba(255,255,255,.2); }
.dialog.dialog-vollfenster .wer-chip-an, .dialog.dialog-vollfenster .np-gchip-an {
  background: rgba(232,180,90,.22); color: #f3e2bd; border-color: var(--akzent); }

.dialog-titel { margin: 0 0 14px; font-size: 19px; color: #0f172a; }

.dialog-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  /* Echter, fest stehender Footer (früher: position:sticky/bottom:0 — griff im
     „Neues Spiel"-Dialog NICHT zuverlässig). zeigeOverlay() steckt den übrigen
     Inhalt in einen scrollenden .dialog-scroll; diese Leiste bleibt als unteres
     Flex-Kind im .dialog-fixfoot stehen und ist damit bei langen, scrollenden
     Dialogen IMMER sichtbar. */
  flex: 0 0 auto;
  /* erbt die Dialogfarbe (weiß im Hellmodus, #1a1733 im Nachtmodus) — vorher hart
     auf weiß = greller Streifen im dunklen Design. */
  background: inherit;
  margin: 0;
  padding: 12px 20px 20px;
  border-top: 1px solid color-mix(in srgb, currentColor 12%, transparent);
}

/* Dialog mit fixem Footer: die Klasse setzt zeigeOverlay() in hilfen.js, sobald
   eine .dialog-buttons-Leiste vorhanden ist. Der Dialog wird zur Flex-Spalte, NUR
   der innere .dialog-scroll scrollt; die Buttons bleiben fest unten. Das
   20px-Padding wandert vom .dialog hierher in Scroll-Bereich bzw. Footer, damit
   nichts am Rand klebt. Dialoge OHNE Footer bekommen die Klasse nicht und bleiben
   beim normalen .dialog-Verhalten (overflow-y:auto, padding:20px). */
.dialog-fixfoot {
  display: flex;
  flex-direction: column;
  overflow: hidden;                      /* der innere .dialog-scroll übernimmt das Scrollen */
  padding: 0;
}
.dialog-fixfoot.sa-dialog { padding: 0; }           /* alten padding-bottom-Feinschliff (sticky-Zeit) neutralisieren */
.dialog-fixfoot .dialog-buttons { margin-top: 0; }  /* alten .sa-fuss-Abstand (sticky-Zeit) neutralisieren */
.dialog-scroll {
  flex: 1 1 auto;
  min-height: 0;                         /* erlaubt Schrumpfen unter die Inhaltshöhe = scrollbar */
  overflow-y: auto;
  padding: 20px 20px 12px;
  scrollbar-width: none;                 /* Firefox: kein sichtbarer Balken (wie zuvor am .dialog) */
}
.dialog-scroll::-webkit-scrollbar { display: none; } /* Chrome/Safari: kein Balken */

.btn {
  border: none;
  border-radius: 12px;
  font-size: 15.5px;
  font-weight: 600;
  padding: 12px 18px;
  min-height: 46px;
}
.btn[disabled] { opacity: 0.4; cursor: not-allowed; }
.btn-primary { background: var(--akzent); color: var(--akzent-text); }
.btn-primary:active { background: var(--akzent-tief); }
.btn-secondary { background: var(--flaeche-2); color: var(--text); width: 100%; margin-top: 10px; }
.btn-ghost { background: none; color: var(--text-soft); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger-ghost {
  background: none;
  color: var(--danger);
  border: 1px solid #f3c2c2;
  width: 100%;
  margin-top: 14px;
}
.btn-klein { min-height: 40px; padding: 8px 14px; font-size: 14px; width: auto; margin: 0; }

.eingabe {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  font-size: 17px;
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
  background: white;
  color: #1e293b;
}
.eingabe::-webkit-search-cancel-button { display: none; }
.eingabe:focus { border-color: #0ea5e9; outline: none; }

.eingabe-label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: #475569;
  margin: 14px 0 6px;
}

.leer-text { color: #64748b; margin: 4px 0 0; }

/* Farbauswahl */

.farb-reihe { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.farb-punkt { width: 38px; height: 38px; border-radius: 50%; border: 3px solid transparent; }
.farb-punkt-aktiv { border-color: #0f172a; }

/* ---------------- Ziffernblock ---------------- */

.zb-anzeige {
  text-align: center;
  font-size: 36px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  word-break: break-word;
  padding: 6px 0 2px;
  color: #0f172a;
}
/* Ergebnis-Vorschau des Taschenrechners (erst „Eintragen" übernimmt sie) */
.zb-summe {
  text-align: center;
  font-size: 20px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #15803d;
  min-height: 26px;
  padding-bottom: 10px;
}

.zb-raster { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

.zb-taste {
  min-height: 56px;
  border: none;
  border-radius: 12px;
  background: #f1f5f9;
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  /* 3D-Taste: unterer „Rand" wirkt erhaben, beim Drücken schiebt sie sich rein. */
  box-shadow: 0 3px 0 #cbd5e1;
  transition: transform .05s ease, box-shadow .05s ease, background .05s ease;
}
.zb-taste:active { transform: translateY(3px); box-shadow: 0 0 0 rgba(0,0,0,0); background: #e2e8f0; }
.zb-vorzeichen, .zb-loeschen { background: #e2e8f0; font-size: 18px; box-shadow: 0 3px 0 #cbd5e1; }
/* Rechner-Operatoren (+/−) hervorheben, Löschtaste über die ganze Breite */
.zb-op { background: #dbeafe; color: #1e3a8a; font-size: 26px; box-shadow: 0 3px 0 #93c5fd; }
.zb-breit { grid-column: 1 / -1; }

/* Dunkelmodus: Zahlen weiß, Tasten dunkel (statt heller Fremdkörper) */
[data-modus="nacht"] .zb-anzeige { color: var(--text); }
[data-modus="nacht"] .zb-summe { color: #4ade80; }
[data-modus="nacht"] .zb-taste { background: #2d2856; color: var(--text); box-shadow: 0 3px 0 #15122f; }
[data-modus="nacht"] .zb-taste:active { background: #38316a; box-shadow: 0 0 0 rgba(0,0,0,0); }
[data-modus="nacht"] .zb-vorzeichen, [data-modus="nacht"] .zb-loeschen { background: #241f47; box-shadow: 0 3px 0 #15122f; }
[data-modus="nacht"] .zb-op { background: #1e3a5f; color: #bfdcff; box-shadow: 0 3px 0 #122539; }

/* ---------------- Verlauf / Block-Tabellen ---------------- */

.verlauf-scroll { overflow: auto; max-height: 55dvh; border: 1px solid #e2e8f0; border-radius: 12px; background: white; }
.block-tabelle { max-height: none; margin-top: 14px; }

.verlauf-tabelle {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  font-size: 16px;
  color: #1e293b;
}
.verlauf-tabelle th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  padding: 10px 8px;
  border-bottom: 2px solid #0f172a;
  font-size: 14.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 110px;
}
.verlauf-tabelle td {
  text-align: center;
  padding: 7px 8px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
}
.verlauf-summe td {
  position: sticky;
  bottom: 0;
  background: #f8fafc;
  border-top: 2px solid #0f172a;   /* der "Strich" wie auf dem Papier */
  border-bottom: none;
  font-weight: 800;
  font-size: 17px;
  color: #0f172a;
  padding: 10px 8px;
}

/* Wizard-Tabelle */
.wz-th-runde, .wz-td-runde { width: 40px; color: #94a3b8 !important; font-size: 12.5px; }
.wz-tabelle td { padding: 6px 6px; }
.wz-as { display: block; font-size: 11.5px; color: #94a3b8; }
.wz-punkte { display: block; font-weight: 700; }
.wz-ok { color: #16a34a; }
.wz-daneben { color: var(--danger); }
.wz-laufend { display: block; font-size: 11.5px; color: #64748b; }

/* Rommé */
.rm-sieg-zelle { color: #16a34a !important; font-weight: 700; }
.rm-frage { font-weight: 600; color: #0f172a; margin: 14px 0 8px; }
.rm-gewinner-reihe { display: flex; flex-wrap: wrap; gap: 8px; }
.rm-gewinner {
  border: 2px solid;
  background: white;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 15px;
  font-weight: 700;
  min-height: 44px;
}
.rm-gewinner-aktiv { color: white !important; }
.rm-vorschau { background: #f0fdf4; color: #166534; border-radius: 10px; padding: 10px 12px; font-weight: 600; }
.rm-punkte-zeile {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  font-weight: 600;
}
.rm-punkte-zeile span { width: 90px; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rm-punkte-input { flex: 1; }

/* ---------------- Blöcke (Wizard/Rommé) gemeinsam ---------------- */

.summen-leiste {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
}
.summen-chip {
  border: 2px solid;
  border-radius: 12px;
  background: var(--leiste);
  box-shadow: var(--schatten);
  padding: 8px 12px;
  min-width: 86px;
  flex-shrink: 0;
  text-align: center;
}
.summen-name {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 110px;
}
.summen-wert { display: block; font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }

.block-karte {
  background: var(--leiste);
  color: var(--text);
  border: 1px solid var(--rand);
  box-shadow: var(--schatten);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 6px;
}
.block-kopf { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.block-kopf h2 { margin: 0; font-size: 19px; color: #0f172a; }
.block-fortschritt { color: #64748b; font-size: 13.5px; }
.block-warnung { color: #b45309; background: #fef3c7; border-radius: 10px; padding: 8px 12px; font-size: 13.5px; margin: 10px 0; }
.block-warnung:empty { display: none; }
.block-hinweis { color: var(--text-soft); font-size: 14px; padding: 10px 4px; }
.block-banner {
  background: var(--akzent);
  color: var(--akzent-text);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-weight: 700;
  margin-top: 6px;
}
.block-haupt-knopf { width: 100%; margin-top: 6px; }
.block-karte .btn-primary { width: 100%; margin-top: 12px; }

/* Wizard-Eingabezeile + Stepper */

.wz-zeile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
}
.wz-name { flex: 1; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wz-feld { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; color: #64748b; font-weight: 600; }

.stp { display: inline-flex; align-items: center; gap: 6px; }
.stp-knopf {
  width: 40px;
  height: 40px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
}
.stp-knopf:active { background: #e2e8f0; }
.stp-wert { min-width: 26px; text-align: center; font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }

/* ---------------- Spielwahl ---------------- */

.sw-vorlagen { display: flex; flex-direction: column; gap: 8px; }
.sw-vorlage {
  display: grid;
  grid-template-columns: 44px 1fr;
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: center;
  text-align: left;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  background: white;
  padding: 12px 14px;
}
.sw-vorlage-aktiv { border-color: var(--akzent); background: #f0fdf4; }
.sw-icon { grid-row: 1 / 3; font-size: 30px; }
.sw-titel { font-weight: 800; font-size: 16px; color: #0f172a; }
.sw-text { font-size: 12.5px; color: #64748b; }

/* ---------------- Spieler-Liste / Einstellungen ---------------- */

.sp-liste { display: flex; flex-direction: column; }
.sp-zeile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
}
.sp-farbe { width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0; }
.sp-name { flex: 1; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #1e293b; }
.sp-aktionen { display: flex; gap: 4px; }

.mini-btn {
  width: 38px;
  height: 38px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: white;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #334155;
}
.mini-btn:active { background: #f1f5f9; }
.mini-btn[disabled] { opacity: 0.3; }
.mini-btn-danger { color: var(--danger); }

.schalter-block { margin-top: 16px; border-top: 1px solid #e2e8f0; }
.schalter-zeile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  color: #1e293b;
}
.schalter-label { display: block; font-weight: 600; }
.schalter-hinweis { display: block; font-size: 12.5px; color: #64748b; }
.schalter-zeile input { width: 24px; height: 24px; accent-color: var(--akzent); flex-shrink: 0; }

.sprach-hilfe {
  margin: 14px 0 0;
  font-size: 12.5px;
  color: #64748b;
  background: #f8fafc;
  border-radius: 10px;
  padding: 10px 12px;
}

.fuss-links { text-align: center; margin: 10px 0 0; font-size: 12.5px; }
.fuss-links a { color: #94a3b8; }

/* ---------------- Werkzeug-Vollbild (Würfel, Startspieler, Timer) ---- */

.werkzeug-vollbild {
  position: fixed;
  inset: 0;
  background: var(--werk-dunkel);
  /* Werkzeuge sind dunkel — Text-Tokens lokal auf hell umstellen */
  color: #f1eefb;
  --text: #f4f2fb;
  --text-soft: rgba(255, 255, 255, 0.72);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 16px calc(env(safe-area-inset-bottom, 0px) + 16px);
  z-index: 45;
}
.werkzeug-hinweis { color: rgba(255, 255, 255, 0.5); }
.werkzeug-kopf {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start; /* Hamburger links, Titel daneben (wie Hauptleiste) */
  gap: 10px;
  margin-bottom: 8px;
}
.werkzeug-kopf h2 { margin: 0; font-size: 19px; }
.werkzeug-zu {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 18px;
}
.werkzeug-hinweis { color: #64748b; font-size: 13px; margin: 10px 0 0; }

/* ---------------- Würfel ---------------- */

.wf-anzahl-reihe { display: flex; gap: 8px; margin: 4px 0 10px; }
.wf-anzahl {
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: none;
  color: var(--text-soft);
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 14.5px;
  font-weight: 700;
  min-height: 42px;
}
.wf-anzahl-aktiv { background: white; color: #0f172a; border-color: white; }

.wf-buehne {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12vmin;
  perspective: 900px;
}

.wf-wuerfel { width: 22vmin; height: 22vmin; max-width: 130px; max-height: 130px; }
.wf-buehne.wf-zwei .wf-wuerfel { width: 20vmin; height: 20vmin; }

.wf-wurf { animation: wf-sprung 1.25s cubic-bezier(0.35, 0, 0.4, 1); }
@keyframes wf-sprung {
  0% { transform: translateY(0); }
  38% { transform: translateY(calc(-26vmin)); }
  72% { transform: translateY(0); }
  84% { transform: translateY(-3.5vmin); }
  100% { transform: translateY(0); }
}

.wf-kern {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
}

.wf-flaeche {
  position: absolute;
  inset: 0;
  background: #fdfdfd;
  border-radius: 14%;
  border: 1px solid #d8dee6;
  box-shadow: inset 0 0 12px rgba(15, 23, 42, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  backface-visibility: hidden;
}
/* Halbe Kantenlaenge des Wuerfels: 11vmin bzw. 65px (max) — vereinfacht via CSS-Var */
.wf-wuerfel { --halb: min(11vmin, 65px); }
.wf-buehne.wf-zwei .wf-wuerfel { --halb: min(10vmin, 65px); }
.wf-vorn   { transform: rotateY(0deg)   translateZ(var(--halb)); }
.wf-hinten { transform: rotateY(180deg) translateZ(var(--halb)); }
.wf-links  { transform: rotateY(-90deg) translateZ(var(--halb)); }
.wf-rechts { transform: rotateY(90deg)  translateZ(var(--halb)); }
.wf-oben   { transform: rotateX(90deg)  translateZ(var(--halb)); }
.wf-unten  { transform: rotateX(-90deg) translateZ(var(--halb)); }

.wf-pips {
  width: 74%;
  height: 74%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  place-items: center;
}
.wf-pip { width: 55%; aspect-ratio: 1; border-radius: 50%; background: transparent; }
.wf-pip-an { background: #0f172a; }

.wf-ergebnis {
  font-size: 34px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  min-height: 44px;
}
.wf-knopf { width: min(100%, 320px); }
.wf-hintergrund { cursor: pointer; }

/* ---------------- Startspieler ---------------- */

.ss-hintergrund { background: #0b1120; }
.ss-hinweis { color: var(--text-soft); font-size: 15.5px; font-weight: 600; margin: 4px 0 8px; min-height: 1.4em; }

.ss-flaeche {
  flex: 1;
  width: 100%;
  position: relative;
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: 18px;
  touch-action: none;
  overflow: hidden;
}

.ss-kreis {
  position: absolute;
  width: 92px;
  height: 92px;
  margin: -46px 0 0 -46px;
  border: 5px solid;
  border-radius: 50%;
  animation: ss-puls 1.1s ease-in-out infinite;
  transition: opacity 0.4s ease, transform 0.3s ease;
  pointer-events: none;
}
@keyframes ss-puls {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}
.ss-aktiv { background: rgba(255, 255, 255, 0.28); transform: scale(1.18); }
.ss-gewinner {
  background: rgba(255, 255, 255, 0.32);
  transform: scale(1.55);
  animation: ss-puls 0.7s ease-in-out infinite;
}
.ss-verlierer { opacity: 0.12; animation: none; }

/* ---------------- Timer ---------------- */

.tm-anzeige {
  font-size: clamp(72px, 24vmin, 150px);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  margin: 6vmin 0 4vmin;
}
.tm-knapp { color: var(--danger); }

.tm-presets { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 18px; }
.tm-preset {
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: none;
  color: var(--text-soft);
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 15px;
  font-weight: 700;
  min-height: 44px;
}
.tm-preset:active { background: rgba(255, 255, 255, 0.14); }
.tm-eigen-reihe { display: flex; gap: 8px; align-items: center; }
.tm-eigen { width: 110px; background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.25); color: white; }
.tm-knopf { width: min(100%, 320px); }
.tm-reset { color: var(--text-soft); margin-top: 6px; }

/* ---------------- Historie ---------------- */

.hi-kopf { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 4px 2px 12px; }
.hi-titel { margin: 0; font-size: 19px; }

.hi-leer {
  border: 1px dashed var(--rand);
  border-radius: var(--radius);
  padding: 26px 16px;
  color: var(--text-soft);
  text-align: center;
}
.hi-leer p { margin: 4px 0; }

.hi-liste { display: flex; flex-direction: column; gap: 8px; }

.hi-karte {
  background: var(--leiste);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  padding: 12px 14px;
  cursor: pointer;
  box-shadow: var(--schatten);
}
.hi-karte:active { background: var(--flaeche-2); }
.hi-karte-kopf { display: flex; align-items: center; gap: 10px; }
.hi-icon { font-size: 22px; }
.hi-karte-mitte { flex: 1; min-width: 0; }
.hi-spiel { font-weight: 800; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hi-datum { font-size: 12.5px; color: #94a3b8; }
.hi-foto-zahl { font-size: 12.5px; color: var(--text-soft); flex-shrink: 0; }
.hi-ergebnis {
  margin-top: 6px;
  font-size: 13.5px;
  color: var(--text-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hi-detail-ergebnis { margin: 12px 0; }
.hi-detail-zeile {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 4px;
  border-bottom: 1px solid #f1f5f9;
  font-weight: 600;
}
.hi-detail-sieger { background: #f0fdf4; border-radius: 8px; }
.hi-detail-punkte { font-variant-numeric: tabular-nums; font-weight: 800; color: #0f172a; }

.hi-foto-raster {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px;
  margin: 12px 0;
}
.hi-foto-zelle { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #f1f5f9; }
.hi-foto-zelle img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: pointer; }
.hi-foto-weg {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.8);
  color: white;
  font-size: 12px;
}

.hi-foto-gross { justify-content: center; cursor: pointer; }
.hi-foto-gross img { max-width: 100%; max-height: 80dvh; border-radius: 12px; }

.hi-notiz { margin-top: 12px; }

.hi-nachtrag-zeile {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-weight: 600;
}
.hi-nachtrag-zeile > span { width: 84px; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hi-sieger-check { display: flex; align-items: center; gap: 4px; font-size: 16px; }
.hi-sieger-check input { width: 22px; height: 22px; accent-color: var(--akzent); }

/* ---------------- Statistik (Board-Game-Stats-Lücke) ---------------- */

.hi-segment { display: flex; gap: 6px; margin-bottom: 12px; }
.hi-seg {
  flex: 1;
  border: 1px solid var(--rand);
  background: var(--leiste);
  color: var(--text-soft);
  border-radius: 12px;
  padding: 10px 8px;
  font-size: 14px;
  font-weight: 700;
  min-height: 44px;
}
.hi-seg-aktiv { background: var(--akzent); color: var(--akzent-text); border-color: var(--akzent); }

.st-kacheln { display: flex; gap: 8px; }
.st-kachel {
  flex: 1;
  background: var(--leiste);
  border: 1px solid var(--rand);
  box-shadow: var(--schatten);
  border-radius: 14px;
  padding: 14px 8px;
  text-align: center;
}
.st-kachel-zahl { display: block; font-size: 26px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.st-kachel-label { display: block; font-size: 12px; color: var(--text-soft); margin-top: 2px; }
.st-hinweis { text-align: center; color: var(--text-soft); font-size: 13px; margin: 10px 0 0; }

.st-titel { font-size: 15.5px; color: var(--text); margin: 22px 2px 10px; }
.st-liste { display: flex; flex-direction: column; gap: 10px; }

.st-spieler { display: flex; align-items: flex-start; gap: 10px; }
.st-rang { font-size: 18px; min-width: 30px; text-align: center; flex-shrink: 0; font-weight: 700; color: var(--text-soft); }
.st-spieler-mitte { flex: 1; min-width: 0; }
.st-spieler-kopf { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.st-spieler-name { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-spieler-siege { font-size: 13px; color: var(--text-soft); flex-shrink: 0; font-variant-numeric: tabular-nums; }
.st-spieler-meta { font-size: 12px; color: var(--text-muted, #94a3b8); margin-top: 3px; }
.st-serie { color: #fb923c; }

.st-balken { height: 8px; background: rgba(59, 53, 86, 0.08); border-radius: 999px; margin-top: 5px; overflow: hidden; }
.st-balken-fuell { height: 100%; background: var(--akzent); border-radius: 999px; min-width: 3px; transition: width 0.3s ease; }
.st-balken-alt { background: #7aa7dd; }

.st-spiel-kopf { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.st-spiel-name { font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-spiel-anzahl { font-size: 13px; color: var(--text-soft); flex-shrink: 0; font-variant-numeric: tabular-nums; }

.st-monate { display: flex; align-items: flex-end; gap: 4px; height: 130px; padding-top: 6px; }
.st-monat { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; }
.st-monat-saeule-raum { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.st-monat-saeule {
  width: 70%;
  min-height: 3px;
  background: var(--akzent);
  border-radius: 5px 5px 0 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  position: relative;
}
.st-monat-leer { background: rgba(59, 53, 86, 0.08); }
.st-monat-zahl { font-size: 10px; font-weight: 700; color: var(--text-soft); margin-top: -15px; position: absolute; top: 0; }
.st-monat-label { font-size: 10px; color: var(--text-muted, #94a3b8); margin-top: 4px; }

.st-teilen { width: 100%; margin-bottom: 12px; }

/* Erweiterte Statistik (Plus) */
.st-plus-box { margin-top: 8px; }
.st-plus-marke {
  display: inline-block;
  background: var(--akzent);
  color: var(--akzent-text);
  font-size: 12px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 999px;
  margin: 22px 0 4px;
}
.st-rekorde { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.st-rekord { background: var(--leiste); border: 1px solid var(--rand); box-shadow: var(--schatten); border-radius: 12px; padding: 12px; }
.st-rekord-titel { font-size: 12px; color: var(--text-soft); }
.st-rekord-wert { font-size: 28px; font-weight: 800; color: var(--akzent); font-variant-numeric: tabular-nums; margin: 2px 0; }
.st-rekord-klein { font-size: 12.5px; color: var(--text-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.st-duell {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  background: var(--leiste);
  border: 1px solid var(--rand);
  box-shadow: var(--schatten);
  border-radius: 12px;
  padding: 10px 14px;
}
.st-duell-name { font-weight: 700; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-duell-rechts { text-align: right; }
.st-duell-stand { font-size: 18px; font-weight: 800; color: var(--akzent); font-variant-numeric: tabular-nums; }
.st-duell-spiele { grid-column: 1 / 4; text-align: center; font-size: 11.5px; color: var(--text-muted, #94a3b8); margin-top: -2px; }

.st-champion { display: flex; align-items: center; gap: 10px; background: var(--leiste); border: 1px solid var(--rand); box-shadow: var(--schatten); border-radius: 12px; padding: 10px 14px; }
.st-champion-spiel { flex: 1; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-champion-name { font-size: 14px; color: var(--text); font-weight: 700; }
.st-champion-meta { font-size: 12px; color: var(--text-muted, #94a3b8); font-variant-numeric: tabular-nums; min-width: 40px; text-align: right; }

/* Sperre (ohne Plus) */
.st-sperre { position: relative; margin-top: 22px; border-radius: 16px; overflow: hidden; }
.st-sperre-vorschau { filter: blur(5px); opacity: 0.5; pointer-events: none; padding: 4px; }
.st-sperre { border: 1px solid var(--rand); }
.st-sperre-inhalt {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  gap: 6px; padding: 20px;
  background: linear-gradient(180deg, rgba(243, 242, 249, 0.75), rgba(243, 242, 249, 0.94));
}
.st-sperre-icon { font-size: 34px; }
.st-sperre-titel { font-size: 18px; font-weight: 800; color: var(--text); }
.st-sperre-text { font-size: 13px; color: var(--text-soft); max-width: 300px; }
.st-sperre-inhalt .btn { width: auto; margin-top: 8px; padding: 12px 22px; }

/* ---------------- Spielmeister Plus (Paywall) ---------------- */

.plus-dialog { text-align: center; }
.plus-held { padding: 6px 0 10px; }
.plus-krone { font-size: 46px; }
.plus-titel { margin: 6px 0 2px; font-size: 24px; color: var(--text); }
.plus-unter { margin: 0; font-size: 13.5px; color: var(--text-soft); }
.plus-vorteile { display: flex; flex-direction: column; gap: 10px; text-align: left; margin: 16px 0; }
.plus-vorteil { display: flex; gap: 12px; align-items: flex-start; }
.plus-vorteil-icon { font-size: 26px; flex-shrink: 0; width: 34px; text-align: center; }
.plus-vorteil-titel { font-weight: 700; font-size: 15px; color: var(--text); }
.plus-vorteil-text { font-size: 13px; color: var(--text-soft); }
.plus-preis { font-size: 34px; font-weight: 800; color: var(--akzent); margin: 6px 0 2px; }
.plus-preis-zusatz { font-size: 15px; color: var(--text-soft); font-weight: 600; }
.plus-kauf { width: 100%; margin-top: 10px; }
.plus-hinweis { font-size: 12px; color: var(--text-muted, #94a3b8); margin: 12px 0 0; }
.plus-danke { font-size: 14px; color: var(--text-soft); }

/* ---------------- Einstellungen: Plus/Farben/Sicherung ---------------- */

.set-trenner { display: flex; align-items: center; gap: 10px; margin: 20px 0 12px; color: var(--text-soft); font-size: 13px; font-weight: 700; }
.set-trenner::before, .set-trenner::after { content: ''; flex: 1; height: 1px; background: var(--rand); }
.set-label { font-size: 13px; font-weight: 600; color: var(--text-soft); margin: 16px 0 8px; }
.set-plus-aktiv { background: var(--flaeche-2); border-radius: 12px; padding: 12px; font-weight: 700; color: var(--text); text-align: center; }
.set-vorschau { margin-top: 12px; }

.akzent-reihe { display: flex; gap: 12px; flex-wrap: wrap; }
.akzent-punkt {
  position: relative;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 3px solid transparent;
  display: inline-flex; align-items: center; justify-content: center;
}
.akzent-punkt-aktiv { border-color: var(--text); transform: scale(1.08); }
.akzent-schloss { font-size: 15px; filter: drop-shadow(0 1px 1px rgba(255,255,255,0.7)); }

.mehr-buttonreihe { display: flex; gap: 10px; flex-wrap: wrap; }
.mehr-buttonreihe .btn { flex: 1; min-width: 130px; }

/* ---------------- Toast ---------------- */

#toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--werk-hoehe) + env(safe-area-inset-bottom, 0px) + 14px);
  transform: translateX(-50%) translateY(16px);
  background: #0f172a;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  max-width: min(92vw, 420px);
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 60;
}
#toast.sichtbar { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.toast-fehler { background: #7f1d1d; }

/* ============================================================
   Nacht-Modus „Sternenhimmel" (umschaltbar, Pastell bleibt Standard)
   ============================================================ */
[data-modus="nacht"] {
  --bg: #0c0b1e;
  --leiste: #141230;
  --flaeche-2: #1e1b3d;
  --text: #ece9ff;
  --text-soft: #b9b4e0;
  --text-muted: #8e88b8;
  --rand: #2a2650;
  --overlay-btn: rgba(255, 255, 255, 0.07);
  --overlay-btn-akt: rgba(255, 255, 255, 0.14);
  --schatten: 0 2px 14px rgba(0, 0, 0, 0.45);
}
/* Erwachsener, ruhiger Mitternachts-Verlauf mit dezentem Nebel — kein
   kindliches Sternenfunkeln mehr. Tiefes Indigo/Violett, sanfte Lichthöfe. */
[data-modus="nacht"] body {
  background:
    radial-gradient(1100px 720px at 8% -10%, rgba(108, 84, 196, 0.30), transparent 60%),
    radial-gradient(900px 700px at 108% 4%, rgba(52, 74, 168, 0.24), transparent 58%),
    radial-gradient(900px 900px at 62% 118%, rgba(150, 96, 190, 0.22), transparent 62%),
    linear-gradient(180deg, #0d0b22 0%, #0a0819 55%, #07060f 100%);
  background-attachment: fixed;
}
/* feine Vignette für Tiefe (statisch, keine Animation) */
[data-modus="nacht"] body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(120% 90% at 50% 20%, transparent 55%, rgba(0, 0, 0, 0.45) 100%);
}
/* seltene Sternschnuppe (etwa alle 5 Minuten) — nur im Dunkelmodus sichtbar */
.sternschnuppe { display: none; }
[data-modus="nacht"] .sternschnuppe {
  display: block; position: fixed; top: 8vh; left: -120px;
  width: 3px; height: 3px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 6px 2px #fff; opacity: 0; z-index: 0; pointer-events: none;
  animation: sternflug 300s linear 12s infinite;
}
.sternschnuppe::after {
  content: ""; position: absolute; right: 2px; top: 1px; width: 90px; height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,0.85), transparent);
}
@keyframes sternflug {
  0% { transform: translate(0,0) rotate(24deg); opacity: 0; }
  0.3% { opacity: 1; }
  1.4% { opacity: 1; }
  2.2% { transform: translate(105vw, 46vh) rotate(24deg); opacity: 0; }
  100% { transform: translate(105vw, 46vh); opacity: 0; }
}
/* Inhaltsflächen über das Sternenfeld heben.
   ACHTUNG: #overlay gehört hier NICHT hinein. Es muss position:fixed behalten,
   sonst rutschen alle Dialoge unter die Seite und sind unsichtbar. Es liegt
   mit z-index 40 ohnehin über dem Sternenfeld. */
[data-modus="nacht"] .kopfleiste,
[data-modus="nacht"] #haupt { position: relative; z-index: 1; }
[data-modus="nacht"] #haupt { background: transparent; }

/* ============================================================
   Hamburger-Knopf + Menü-Schublade
   ============================================================ */
/* Oben links steht das LOGO (es öffnet das Menü). Kein Kasten drumherum —
   die Marke soll wirken, nicht wie ein Knopf aussehen. */
#btn-menue {
  width: 40px; height: 40px; flex-shrink: 0;
  border: none; border-radius: 12px; padding: 0;
  background: none; color: var(--text);
  display: inline-flex; align-items: center; justify-content: center;
  margin-right: 2px;
}
#btn-menue:active { background: var(--overlay-btn-akt); }
#kopf-logo { display: flex; }
#kopf-logo svg { display: block; }
#btn-zurueck {
  width: 38px; height: 38px; flex-shrink: 0;
  border: none; border-radius: 11px;
  background: var(--overlay-btn); color: var(--text);
  font-size: 24px; line-height: 1; display: inline-flex; align-items: center; justify-content: center;
  margin-right: 2px;
}
#btn-zurueck:active { background: var(--overlay-btn-akt); }
#btn-zurueck[hidden] { display: none; }

/* Beginnt UNTER der Kopfzeile — die Kopfzeile bleibt in jedem Fenster stehen,
   auch bei offenem Menü (Pervins Regel: der Header bleibt überall). */
.menue-overlay {
  position: fixed; z-index: 55;
  inset: calc(var(--kopf-hoehe) + env(safe-area-inset-top, 0px)) 0 0 0;
  background: rgba(0, 0, 0, 0); transition: background 0.2s ease;
}
.menue-overlay.offen { background: rgba(0, 0, 0, 0.45); }
.menue-drawer {
  position: absolute; top: 0; left: 0; bottom: 0;
  width: 82%; max-width: 320px;
  background: var(--leiste); border-right: 1px solid var(--rand);
  box-shadow: 6px 0 30px rgba(0, 0, 0, 0.25);
  transform: translateX(-100%); transition: transform 0.2s ease;
  display: flex; flex-direction: column;
  padding: env(safe-area-inset-top, 0px) 0 calc(env(safe-area-inset-bottom, 0px) + 12px);
  overflow-y: auto;
}
.menue-overlay.offen .menue-drawer { transform: none; }
[data-modus="nacht"] .menue-drawer {
  background: linear-gradient(180deg, #171335 0%, #100e28 100%);
}
.menue-kopf {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 16px 8px;
}
.menue-logo { font-weight: 800; font-size: 20px; letter-spacing: 0.02em; color: var(--text); }
[data-modus="nacht"] .menue-logo { color: #fff; text-shadow: 0 0 14px rgba(190, 170, 255, 0.6); }
.menue-zu {
  width: 36px; height: 36px; border: none; border-radius: 10px;
  background: var(--overlay-btn); color: var(--text); font-size: 15px;
}
.menue-trenner {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-muted); padding: 15px 18px 4px; font-weight: 700;
}
.menue-eintrag {
  display: flex; align-items: center; gap: 14px; width: 100%;
  border: none; background: none; color: var(--text);
  padding: 13px 18px; font-size: 16px; text-align: left; font-weight: 500;
}
.menue-eintrag:active { background: var(--overlay-btn); }
.menue-icon { font-size: 19px; width: 24px; text-align: center; flex-shrink: 0; }

.kopfleiste h1 { flex: 1; }

/* ============================================================
   Party-Werkzeuge: Münzwurf, Zufallsentscheider, Team-Auslosung
   ============================================================ */
.wz-dialog { text-align: center; }
.wz-ergebnis { min-height: 26px; font-size: 20px; font-weight: 800; color: var(--akzent); margin: 6px 0 2px; }

.muenze {
  width: 128px; height: 128px; margin: 14px auto 4px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe9a8, #e8b45a 70%);
  border: 4px solid #d29e3c; color: #4a3708; font-weight: 800; font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 -6px 12px rgba(0,0,0,0.15), var(--schatten);
}
.muenze-dreht { animation: muenze-flip 0.18s linear infinite; }
@keyframes muenze-flip { 0% { transform: scaleX(1); } 50% { transform: scaleX(0.12); } 100% { transform: scaleX(1); } }

.gr-fragen { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 4px 0 12px; }
.gr-frage { border: 1px solid var(--rand); background: var(--flaeche-2); color: var(--text-soft);
  border-radius: 20px; padding: 7px 14px; font-size: 13px; }
.gr-name {
  min-height: 64px; margin: 6px auto; max-width: 260px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 800; color: #3b3556; padding: 14px 18px;
  background: var(--flaeche-2); transition: background 0.1s;
}

.teams-anzahl-reihe { display: flex; gap: 8px; justify-content: center; margin: 4px 0 12px; }
.teams-anzahl { border: 1px solid var(--rand); background: var(--flaeche-2); color: var(--text-soft);
  border-radius: 20px; padding: 8px 16px; font-size: 14px; font-weight: 600; }
.teams-anzahl-aktiv { background: var(--akzent); color: var(--akzent-text); border-color: var(--akzent); }
.teams-ausgabe { display: grid; gap: 10px; }
.team-karte { background: var(--flaeche-2); border-radius: var(--radius); padding: 12px 14px; text-align: left; }
.team-titel { font-weight: 800; font-size: 14px; color: var(--text-soft); margin-bottom: 8px; }
.team-spieler { display: flex; flex-wrap: wrap; gap: 6px; }
.team-chip { padding: 6px 12px; border-radius: 16px; font-size: 14px; font-weight: 700; color: #3b3556; }

/* ============================================================
   Zugtimer (Schachuhr)
   ============================================================ */
.zt-vollbild { display: flex; flex-direction: column; }
.zt-presets { display: flex; gap: 8px; justify-content: center; padding: 8px 12px 2px; flex-wrap: wrap; }
.zt-preset { border: 1px solid var(--rand); background: var(--flaeche-2); color: var(--text-soft);
  border-radius: 20px; padding: 8px 16px; font-size: 14px; font-weight: 600; }
.zt-preset-aktiv { background: var(--akzent); color: var(--akzent-text); border-color: var(--akzent); }
.zt-hinweis { text-align: center; color: var(--text-muted); font-size: 12.5px; margin: 6px 12px 2px; }
.zt-board { flex: 1; overflow-y: auto; display: grid; gap: 10px; padding: 10px 12px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); align-content: start; }
.zt-feld {
  border: 2px solid var(--rand); border-radius: var(--radius);
  background: var(--flaeche-2); color: var(--text);
  padding: 18px 14px; display: flex; flex-direction: column; align-items: center; gap: 6px;
  min-height: 96px; justify-content: center; transition: transform 0.1s, box-shadow 0.15s;
}
.zt-feld::before { content: ""; width: 34px; height: 4px; border-radius: 3px; background: var(--sp); }
.zt-name { font-size: 15px; font-weight: 700; }
.zt-zeit { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; }
.zt-aktiv {
  border-color: var(--akzent); background: color-mix(in srgb, var(--akzent) 14%, var(--flaeche-2));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--akzent) 30%, transparent), var(--schatten);
  transform: translateY(-2px);
}
.zt-aus { opacity: 0.55; border-color: var(--danger); }
.zt-aus .zt-zeit { color: var(--danger); font-size: 20px; }
.zt-steuerung { display: flex; gap: 10px; padding: 10px 12px calc(12px + env(safe-area-inset-bottom, 0px)); }
.zt-steuerung .btn { flex: 1; }

/* Zugtimer: aktiver Spieler ohne color-mix (breitere WebView-Kompatibilität) */
.zt-feld.zt-aktiv {
  background: var(--akzent);
  color: var(--akzent-text);
  border-color: var(--akzent);
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
  transform: translateY(-2px);
}
.zt-feld.zt-aktiv .zt-zeit { color: var(--akzent-text); }

/* ============================================================
   Spielvorlagen, Stammrunde, Erfolge, Spielziel
   ============================================================ */
/* Vorlagen */
.vl-gitter { display: grid; grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); gap: 10px; margin: 6px 0 4px; }
.vl-karte { position: relative; border: 1px solid var(--rand); background: var(--flaeche-2); color: var(--text);
  border-radius: var(--radius); padding: 10px 8px 8px; display: flex; flex-direction: column; align-items: center; gap: 3px;
  cursor: pointer; }
.vl-karte:active { background: var(--overlay-btn-akt); }
.vl-icon { font-size: 26px; line-height: 1; }
.vl-name { font-size: 13px; font-weight: 700; text-align: center; }
.vl-ziel { font-size: 11px; color: var(--text-muted); min-height: 14px; }
.vl-ziel-leer { visibility: hidden; }

/* Kopfzeile der Karte: Symbol mittig, Ziehgriff rechts */
.vl-kopf { display: flex; align-items: center; justify-content: center; width: 100%; position: relative; }
.vl-griff {
  position: absolute; right: -2px; top: -2px;
  border: none; background: none; color: var(--text-muted);
  font-size: 13px; line-height: 1; padding: 4px; cursor: grab;
  touch-action: none; /* damit Ziehen nicht scrollt */
}
.vl-griff:active { cursor: grabbing; color: var(--akzent); }
.vl-karte.vl-zieht { opacity: 0.6; outline: 2px dashed var(--akzent); }

/* Sterne-Bewertung */
.vl-sterne { display: flex; gap: 1px; margin-top: 2px; }
.vl-stern {
  border: none; background: none; padding: 0 1px; cursor: pointer;
  font-size: 13px; line-height: 1; color: var(--text-muted);
}
.vl-stern-an { color: #e8c06a; }

/* Bearbeiten-Knopf unten rechts */
.vl-edit {
  position: absolute; right: 4px; bottom: 3px;
  border: none; background: none; color: var(--text-muted);
  font-size: 12px; padding: 3px 4px; cursor: pointer;
}
.vl-edit:active { color: var(--akzent); }

/* +-Kachel für neue Vorlagen */
.vl-plus {
  border: 1px dashed var(--rand); background: none; color: var(--text-muted);
  justify-content: center; gap: 4px;
}
.vl-plus-zeichen { font-size: 28px; line-height: 1; font-weight: 300; }

/* Editor-Felder */
.vl-icon-feld { width: 70px; text-align: center; font-size: 20px; }
.vl-check { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13.5px; color: var(--text); }

/* Stammrunde */
.sr-gruppe { background: var(--flaeche-2); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 10px; }
.sr-g-kopf { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sr-g-name { font-weight: 800; font-size: 15px; }
.sr-g-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-left: 3px; vertical-align: middle; }
.sr-g-namen { font-size: 13px; color: var(--text-soft); margin: 6px 0 10px; }
.sr-g-aktionen { display: flex; gap: 8px; }
.sr-g-aktionen .btn { flex: 1; }
.sr-g-aktionen .btn-danger-ghost { flex: 0 0 auto; width: 48px; }
.sr-speichern { margin-top: 8px; }
.sr-speichern-reihe { display: flex; gap: 8px; align-items: stretch; }
/* Das Namensfeld soll den Platz füllen, der Knopf nur so breit wie sein Text —
   sonst quetscht der volle-Breite-Button (.btn width:100%) das Feld auf ~30px. */
.sr-speichern-reihe .eingabe { flex: 1 1 auto; min-width: 0; }
.sr-speichern-reihe .btn { flex: 0 0 auto; width: auto; white-space: nowrap; }

/* Erfolge */
.erf-infos { background: var(--flaeche-2); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 12px; }
.erf-info { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 14px; }
.erf-info-icon { font-size: 18px; width: 24px; text-align: center; }
.erf-badges { display: grid; gap: 10px; }
.erf-badge { display: flex; gap: 12px; align-items: center; background: var(--flaeche-2);
  border: 1px solid var(--rand); border-radius: var(--radius); padding: 12px 14px; opacity: 0.72; }
.erf-badge.erf-erreicht { opacity: 1; border-color: var(--akzent); }
.erf-badge-icon { font-size: 28px; width: 34px; text-align: center; flex-shrink: 0; }
.erf-badge-text { flex: 1; min-width: 0; }
.erf-badge-titel { font-weight: 800; font-size: 15px; }
.erf-haken { color: var(--akzent); }
.erf-badge-sub { font-size: 13px; color: var(--text-soft); }
.erf-fortschritt { height: 6px; background: var(--rand); border-radius: 4px; margin-top: 7px; overflow: hidden; }
.erf-balken { display: block; height: 100%; background: var(--akzent); border-radius: 4px; }
.erf-zahl { font-size: 11px; color: var(--text-muted); margin-top: 3px; }

/* Spielziel-Felder */
.ziel-zeile { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; }
.ziel-eingabe { width: 92px; text-align: center; }

/* ============================================================
   Spielesuche / Spiele-Bibliothek
   ============================================================ */
.sp-gitter { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin: 10px 0 4px; }
.sp-karte { text-align: left; border: 1px solid var(--rand); background: var(--flaeche-2);
  border-radius: var(--radius); overflow: hidden; padding: 0; display: flex; flex-direction: column; }
.sp-karte:active { background: var(--overlay-btn-akt); }
.sp-cover { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: var(--rand); }
.sp-cover-leer { display: flex; align-items: center; justify-content: center; font-size: 34px; color: var(--text-muted); }
.sp-info { padding: 8px 10px 10px; }
.sp-name { font-weight: 800; font-size: 14px; line-height: 1.2; overflow-wrap: anywhere; }
.sp-kauf { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.sp-zahlen { display: flex; justify-content: space-between; gap: 6px; font-size: 12px; color: var(--text-soft); margin-top: 6px; }
.sp-propartie { margin-top: 6px; font-size: 12px; font-weight: 700; color: var(--akzent); }
.sp-propartie.sp-teuer { color: var(--danger); }
.sp-propartie.sp-neu { color: var(--text-muted); font-weight: 500; }

/* Editor */
.sp-ed-cover { width: 100%; max-width: 240px; margin: 4px auto 8px; aspect-ratio: 4 / 3;
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--rand); background: var(--flaeche-2); }
.sp-ed-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sp-ed-cover .sp-cover-leer { width: 100%; height: 100%; }
.sp-ed-coverbtns { display: flex; gap: 8px; margin-bottom: 4px; }
.sp-ed-coverbtns .btn { flex: 1; }

/* ============================================================
   Statistik: Filter, „Das bin ich", Hervorhebung, Wochentag
   ============================================================ */
.st-filter { display: flex; gap: 8px; margin: 4px 0 12px; }
.st-filter-sel { flex: 1; min-width: 0; padding: 9px 10px; font-size: 13px; }
.st-koerper { display: block; }

.st-ich { background: var(--akzent); color: var(--akzent-text); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 14px; text-align: center; }
.st-ich-kopf { font-size: 13px; font-weight: 700; opacity: 0.95; }
.st-ich-prozent { font-size: 40px; font-weight: 800; line-height: 1.05; margin: 2px 0 8px; }
.st-ich .st-balken { background: rgba(255,255,255,0.28); }
.st-ich .st-balken-fuell { background: #fff; }
.st-ich-meta { font-size: 13px; margin-top: 8px; opacity: 0.95; }

.st-spieler-ich { background: var(--flaeche-2); border-radius: var(--radius); padding: 6px 8px; }
.st-ich-tag { color: var(--akzent); font-weight: 800; font-size: 12px; }

.st-wtage .st-monat-label { font-size: 11px; }

/* ============================================================
   Spielwahl: Sammlung-Auswahl, Datum/Uhrzeit
   ============================================================ */
.sw-sammlung { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; -webkit-overflow-scrolling: touch; }
.sw-spiel { flex: 0 0 auto; width: 84px; border: 2px solid var(--rand); background: var(--flaeche-2);
  border-radius: var(--radius); overflow: hidden; padding: 0; display: flex; flex-direction: column; }
.sw-spiel-aktiv { border-color: var(--akzent); }
.sw-spiel-cover { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: var(--rand); display: block; }
.sw-spiel-leer { display: flex; align-items: center; justify-content: center; font-size: 26px; color: var(--text-muted); }
.sw-spiel-name { font-size: 11px; font-weight: 700; padding: 5px 4px; text-align: center; line-height: 1.1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-wann { display: flex; gap: 8px; }
.sw-wann .eingabe { flex: 1; min-width: 0; }
.hi-foto-btns { display: flex; gap: 8px; }
.hi-foto-btns .btn { flex: 1; }

/* ============================================================
   Zugtimer-Fix: Felder passend zum dunklen Werkzeug-Hintergrund
   ============================================================ */
.zt-vollbild .zt-hinweis { color: rgba(255,255,255,0.55); }
.zt-vollbild .zt-preset { border: 1px solid rgba(255,255,255,0.25); background: none; color: rgba(255,255,255,0.82); }
.zt-vollbild .zt-preset-aktiv { background: var(--akzent); color: var(--akzent-text); border-color: var(--akzent); }
.zt-vollbild .zt-feld {
  background: rgba(255,255,255,0.07);
  border: 2px solid rgba(255,255,255,0.16);
  color: #f4f2fb;
}
.zt-vollbild .zt-feld::before { background: var(--sp); opacity: 0.9; }
.zt-vollbild .zt-name { color: #f4f2fb; }
.zt-vollbild .zt-zeit { color: #ffffff; }
.zt-vollbild .zt-feld.zt-aktiv {
  background: var(--akzent); border-color: var(--akzent);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.18);
}
.zt-vollbild .zt-feld.zt-aktiv .zt-name,
.zt-vollbild .zt-feld.zt-aktiv .zt-zeit { color: var(--akzent-text); }
.zt-vollbild .zt-feld.zt-aus { opacity: 0.5; border-color: rgba(239,106,106,0.6); }
.zt-vollbild .zt-feld.zt-aus .zt-zeit { color: #ef8b86; }
.zt-vollbild .zt-steuerung .btn-ghost { color: rgba(255,255,255,0.8); border-color: rgba(255,255,255,0.25); }

/* Zugtimer: größere Felder + Uhr im Vollbild (Schachuhr-Gefühl) */
.zt-vollbild .zt-feld { min-height: 130px; }
.zt-vollbild .zt-zeit { font-size: 48px; }
.zt-vollbild .zt-name { font-size: 17px; }

/* Zugtimer: eigene Zeit eingeben */
.zt-eigen-wrap { display: inline-flex; align-items: stretch; gap: 6px; }
.zt-eigen {
  width: 64px; border-radius: 20px; border: 1px solid var(--rand);
  background: var(--flaeche-2); color: var(--text); text-align: center;
  font-size: 14px; font-weight: 600; padding: 8px 10px;
}
.zt-vollbild .zt-eigen {
  border: 1px solid rgba(255,255,255,0.25); background: rgba(255,255,255,0.06); color: #fff;
}
.zt-vollbild .zt-eigen::placeholder { color: rgba(255,255,255,0.5); }
.zt-eigen-btn { padding-left: 14px; padding-right: 14px; }

/* Dezente Sprach-Transkript-Anzeige (was gehört wurde) */
#sprach-transkript {
  position: fixed; left: 50%; transform: translateX(-50%) translateY(6px);
  bottom: calc(env(safe-area-inset-bottom, 0px) + 14px);
  background: rgba(0, 0, 0, 0.55); color: #fff; font-size: 12.5px; font-weight: 600;
  padding: 6px 14px; border-radius: 16px; opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease; z-index: 25;
  max-width: 88%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#sprach-transkript.sichtbar { opacity: 1; transform: translateX(-50%) translateY(0); }
#sprach-transkript.transkript-fehler { background: rgba(127, 29, 29, 0.72); }

/* ============================================================
   Hamburger im Werkzeug-Kopf + Münzwurf (Vollbild, 3D)
   ============================================================ */
.werkzeug-menue {
  width: 44px; height: 44px; border: none; border-radius: 12px;
  background: rgba(255,255,255,0.1); color: #fff; font-size: 20px;
  display: inline-flex; align-items: center; justify-content: center;
}
.werkzeug-menue:active { background: rgba(255,255,255,0.2); }

.mz-vollbild { display: flex; flex-direction: column; }
.mz-buehne { flex: 1; width: 100%; display: flex; align-items: center; justify-content: center; perspective: 1100px; }
.mz-coin-wrap { will-change: transform; cursor: pointer; --mz-dx: 0px; --mz-spin: 0deg; }
.mz-coin-wrap:active { filter: brightness(1.1); }
/* Wurf: hoch, in eine zufällige Richtung zur Seite, taumeln und auf den Boden fallen. */
.mz-coin-wrap.mz-wurf { animation: mz-wurf 2s cubic-bezier(.2,.5,.35,1) forwards; }
@keyframes mz-wurf {
  0%   { transform: translate(0, 0) rotate(0deg); }
  18%  { transform: translate(calc(var(--mz-dx) * .35), -180px) rotate(calc(var(--mz-spin) * .4)); }
  48%  { transform: translate(calc(var(--mz-dx) * .7), -215px) rotate(calc(var(--mz-spin) * .7)); }
  100% { transform: translate(var(--mz-dx), 72px) rotate(var(--mz-spin)); }
}
.mz-coin { width: 180px; height: 180px; position: relative; transform-style: preserve-3d; }
.mz-face {
  position: absolute; inset: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  backface-visibility: hidden; font-size: 30px; font-weight: 800; letter-spacing: .03em;
  box-shadow: inset 0 -8px 16px rgba(0,0,0,0.18);
}
.mz-kopf { background: radial-gradient(circle at 35% 30%, #ffe9a8, #e8b45a 72%); color: #4a3708; border: 6px solid #d29e3c; }
.mz-zahl { background: radial-gradient(circle at 35% 30%, #eef1f8, #b9c0d6 72%); color: #2b3350; border: 6px solid #98a0bb; transform: rotateX(180deg); }
.mz-ergebnis { font-size: 26px; font-weight: 800; color: #fff; text-align: center; min-height: 32px; margin: 6px 0; }
.mz-werfen { align-self: center; min-width: 190px; margin-top: 8px; }

/* ============================================================
   Startseite (aufgeräumt)
   ============================================================ */
.start { max-width: 520px; margin: 0 auto; padding: 6px 2px 20px; display: flex; flex-direction: column; gap: 14px; }
.start-gruss { margin: 8px 4px 2px; }
.start-gruss-klein { margin: 0; font-size: 14px; color: var(--text-soft); }
.start-gruss-gross { margin: 2px 0 0; font-size: 24px; font-weight: 800; color: var(--text); }
[data-modus="nacht"] .start-gruss-gross { text-shadow: 0 0 18px rgba(190,170,255,0.35); }

.start-neu {
  width: 100%; border: none; border-radius: 18px; padding: 18px 20px;
  background: var(--akzent); color: var(--akzent-text);
  display: flex; align-items: center; gap: 14px; text-align: left; box-shadow: var(--schatten);
}
.start-neu:active { opacity: 0.92; }
.start-neu-plus { font-size: 30px; font-weight: 800; line-height: 1; }
.start-neu-titel { display: block; font-size: 19px; font-weight: 800; }
.start-neu-sub { display: block; font-size: 13px; opacity: 0.9; margin-top: 1px; }

.start-weiter {
  width: 100%; border: 1px solid var(--rand); border-radius: 16px; padding: 12px 14px;
  background: var(--leiste); color: var(--text); display: flex; align-items: center; gap: 12px; text-align: left;
}
.start-weiter-icon { width: 34px; height: 34px; border-radius: 10px; background: rgba(87,185,143,0.18); color: #57b98f; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.start-weiter-text { flex: 1; min-width: 0; }
.start-weiter-titel { display: block; font-weight: 700; font-size: 15px; }
.start-weiter-sub { display: block; font-size: 12.5px; color: var(--text-soft); }
.start-weiter-pfeil { color: var(--text-muted); font-size: 20px; }

.start-label { margin: 6px 4px -4px; font-size: 12px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-soft); }
.start-kacheln { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.start-kachel { border: none; border-radius: 15px; padding: 16px 14px; display: flex; flex-direction: column; gap: 8px; text-align: left; }
.start-kachel:active { filter: brightness(0.96); }
.start-kachel-icon { font-size: 24px; }
.start-kachel-text { font-size: 14.5px; font-weight: 700; }
.k-teal { background: rgba(45,157,117,0.16); color: #bfeeda; }
.k-coral { background: rgba(224,122,95,0.16); color: #f6cdbd; }
.k-purple { background: rgba(160,130,220,0.16); color: #ddccf6; }
.k-amber { background: rgba(232,180,90,0.16); color: #f6e2b6; }
.k-blau { background: rgba(90,150,220,0.16); color: #c3ddf6; }
.k-gold { background: rgba(232,192,106,0.18); color: #f4e0b0; }
[data-modus="hell"] .k-teal { color: #0f6e56; } [data-modus="hell"] .k-coral { color: #993c1d; }
[data-modus="hell"] .k-purple { color: #4a3c86; } [data-modus="hell"] .k-amber { color: #7a4f0b; }
[data-modus="hell"] .k-blau { color: #24507f; } [data-modus="hell"] .k-gold { color: #7a5a0b; }

.start-stammrunde { display: flex; flex-direction: column; gap: 8px; }
.start-runde { border: 1px solid var(--rand); background: var(--leiste); color: var(--text); border-radius: 14px; padding: 10px 14px; display: flex; align-items: center; gap: 10px; }
.start-runde-dots { display: flex; }
.start-runde-dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--leiste); margin-left: -7px; }
.start-runde-dots .start-runde-dot:first-child { margin-left: 0; }
.start-runde-name { flex: 1; font-weight: 700; font-size: 15px; }
.start-runde-los { color: var(--akzent); font-size: 18px; }

.start-teaser-inner { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; border: none; background: none; padding: 0; }
.start-teaser-kachel { background: var(--leiste); border: 1px solid var(--rand); border-radius: 14px; padding: 12px 14px; text-align: left; }
.start-teaser-label { display: block; font-size: 12px; color: var(--text-soft); }
.start-teaser-wert { display: block; font-size: 18px; font-weight: 800; margin-top: 2px; }
.start-teaser-gold { color: #e8c06a; }

.start-historie { align-self: center; margin-top: 4px; border: 1px solid var(--rand); background: var(--leiste); color: var(--text-soft); border-radius: 20px; padding: 10px 18px; font-size: 14px; font-weight: 600; }

/* ==================================================================
   Punktezähler im Notizzettel-Look (ersetzt die hellen Vollbild-Kacheln)
   Jede Wertung einzeln, Strich, dicke Summe, Notizzettel-Schrift,
   dunkel-mystisch statt krankenhaus-weiß.
   ================================================================== */
:root { --font-zettel: 'Segoe Print', 'Bradley Hand', 'Comic Sans MS', 'Marker Felt', ui-rounded, cursive; }

.z-liste { display: flex; flex-direction: column; gap: 12px; padding: 12px; }

/* Karten in voller Spielerfarbe (immer helle Pastelltöne) -> dunkler Text.
   Der Hintergrund wird per Inline-Style auf die Spielerfarbe gesetzt. */
.z-karte {
  background: var(--flaeche-2);
  border: none;
  border-radius: 18px;
  padding: 14px 16px 16px;
  box-shadow: var(--schatten);
  color: #241d3f;
}
.z-karte.z-dran { box-shadow: 0 0 0 4px var(--akzent), var(--schatten); }

.z-kopf { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.z-name {
  border: none; background: none; padding: 0;
  font-size: 27px; font-weight: 800; color: #241d3f;
  cursor: pointer; text-align: left; line-height: 1.05;
}
.z-dran-chip {
  font-size: 11px; font-weight: 700; color: #fff;
  background: rgba(30,22,60,.82); border-radius: 10px; padding: 3px 9px;
}

.z-zettel {
  display: flex; flex-wrap: wrap; gap: 6px 12px;
  min-height: 24px; padding: 2px 0;
  font-family: var(--font-zettel); font-size: 17px; color: rgba(36,29,63,.85);
}
.z-add { font-variant-numeric: tabular-nums; }
.z-add.z-minus { color: #a52a2a; }
.z-leer { color: rgba(36,29,63,.45); }

.z-fuss { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.z-strich { flex: 1; height: 0; border-top: 2px solid rgba(36,29,63,.3); }
.z-summe {
  font-family: var(--font-zettel); font-size: 34px; font-weight: 800;
  color: #241d3f; font-variant-numeric: tabular-nums; line-height: 1;
}

.z-tasten { display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 8px; margin-top: 12px; }
.z-taste {
  border: 1px solid rgba(36,29,63,.16); border-radius: 12px; padding: 12px 0;
  font-size: 22px; font-weight: 700; color: #241d3f;
  background: rgba(255,255,255,.62); cursor: pointer;
}
.z-taste:active { transform: scale(.97); background: rgba(255,255,255,.85); }
.z-zahl-t { font-size: 17px; letter-spacing: 1px; }
.z-plus-t { color: #fff; background: var(--akzent); border-color: transparent; }
.z-minus-t { color: var(--danger); }

/* ==================================================================
   Geführter Ablauf (gefuehrt.js): Spiel -> Namen -> Wer beginnt -> Punkte
   ================================================================== */
.gf-fortschritt { display: flex; gap: 6px; justify-content: center; margin-bottom: 10px; }
.gf-punkt { width: 26px; height: 4px; border-radius: 2px; background: var(--rand); }
.gf-punkt-aktiv { background: var(--akzent); }
.gf-punkt-fertig { background: var(--akzent); opacity: 0.45; }

.gf-spiele { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin: 4px 0 6px; }
.gf-spiel {
  border: 1px solid var(--rand); background: var(--flaeche-2); color: var(--text);
  border-radius: var(--radius); padding: 12px 6px;
  display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer;
}
.gf-spiel-aktiv { border-color: var(--akzent); box-shadow: 0 0 0 2px var(--akzent); }
.gf-spiel-icon { font-size: 24px; line-height: 1; }
.gf-spiel-name { font-size: 12.5px; font-weight: 700; text-align: center; }

.gf-namen { display: flex; flex-direction: column; gap: 8px; }
.gf-name-zeile { display: flex; align-items: center; gap: 8px; }
.gf-name-zeile .eingabe { flex: 1; min-width: 0; }
.gf-du { font-size: 11.5px; font-weight: 700; color: var(--akzent-text); background: var(--akzent);
  border-radius: 10px; padding: 3px 9px; }

.gf-optionen { display: flex; flex-direction: column; gap: 8px; }
.gf-option {
  display: flex; align-items: center; gap: 12px; text-align: left;
  border: 1px solid var(--rand); background: var(--flaeche-2); color: var(--text);
  border-radius: var(--radius); padding: 13px 14px; cursor: pointer;
}
.gf-option:active { background: var(--overlay-btn-akt); }
.gf-option-icon { font-size: 22px; line-height: 1; }
.gf-option-text { display: flex; flex-direction: column; gap: 2px; }
.gf-option-text strong { font-size: 14.5px; }
.gf-option-text small { font-size: 12px; color: var(--text-muted); }

.gf-los { text-align: center; padding: 10px 0; }
.gf-los-icon { font-size: 40px; }
.gf-anfaenger { font-size: 30px; font-weight: 800; color: var(--akzent); margin: 4px 0 0; }

.gf-chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 8px 0 4px; }
.gf-chip {
  border: 1px solid var(--rand); background: var(--flaeche-2); color: var(--text-soft);
  border-radius: 18px; padding: 8px 14px; font-size: 14px; font-weight: 700; cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.gf-chip-an { background: var(--akzent); color: var(--akzent-text); border-color: var(--akzent); }
.gf-eigen { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.gf-eigen .eingabe { flex: 1; min-width: 0; }
.gf-eigen .btn { width: auto; margin-top: 0; flex: 0 0 auto; }

/* Gelernte Punkte-Tasten auf der Zähler-Karte */
.z-schnell { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.z-schnell-t {
  flex: 1 1 auto; min-width: 54px;
  border: 1px solid var(--rand); background: var(--leiste); color: var(--text);
  border-radius: 10px; padding: 9px 4px; font-size: 14px; font-weight: 700;
  font-variant-numeric: tabular-nums; cursor: pointer;
}
.z-schnell-t:active { background: var(--akzent); color: var(--akzent-text); border-color: transparent; }

/* ==================================================================
   Echtes Glücksrad (Vollbild): drehende SVG-Scheibe mit den Spielernamen
   ================================================================== */
.gr-vollbild { display: flex; flex-direction: column; }
.gr-buehne {
  flex: 1; position: relative;
  display: flex; align-items: center; justify-content: center;
  padding: 6px 12px;
}
.gr-zeiger {
  position: absolute; top: 2px; left: 50%; transform: translateX(-50%);
  font-size: 30px; line-height: 1; color: #f1c470;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.6)); z-index: 2;
}
.gr-rad-wrap { width: min(78vw, 340px); aspect-ratio: 1; }
.gr-rad {
  width: 100%; height: 100%; display: block;
  transform-origin: 50% 50%;
  filter: drop-shadow(0 8px 22px rgba(0,0,0,0.45));
}
.gr-ergebnis {
  text-align: center; font-size: 26px; font-weight: 800; color: #fff;
  min-height: 36px; padding: 4px 12px;
}
.gr-knoepfe { display: flex; flex-direction: column; gap: 8px; margin: 0 12px calc(14px + env(safe-area-inset-bottom, 0px)); }
.gr-knoepfe .btn { width: 100%; margin-top: 0; }

/* Hinweis, dass der Spielername antippbar ist */
.z-name-stift { font-size: 12px; opacity: 0.5; margin-left: 5px; font-weight: 400; }

/* ==================================================================
   Dialoge im dunklen Design (vorher hart auf weiß gesetzt)
   ================================================================== */
[data-modus="nacht"] .dialog {
  background: #1a1733;
  color: #e9e6f7;
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 18px 55px rgba(0,0,0,0.6);
}
[data-modus="nacht"] .dialog-titel { color: #ffffff; }
[data-modus="nacht"] .dialog .leer-text { color: #a49fc4; }
[data-modus="nacht"] .dialog .eingabe,
[data-modus="nacht"] .dialog select.eingabe {
  background: rgba(255,255,255,0.07);
  color: #f2f0fb;
  border: 1px solid rgba(255,255,255,0.16);
}
[data-modus="nacht"] .dialog .eingabe::placeholder { color: rgba(255,255,255,0.42); }
[data-modus="nacht"] .dialog .eingabe-label { color: #b9b4d6; }
[data-modus="nacht"] .dialog .btn-ghost { color: #d9d5ee; border: 1px solid rgba(255,255,255,0.22); background: none; }
[data-modus="nacht"] .dialog .btn-secondary { background: rgba(255,255,255,0.09); color: #f2f0fb; }
/* Schalter-Zeilen (z.B. Punkte-zählen-Einstellungen) waren hart auf helles Design
   gesetzt (dunkler Text) und im Nachtmodus praktisch unsichtbar. Jetzt lesbar. */
[data-modus="nacht"] .dialog .schalter-zeile { color: var(--text); border-bottom-color: rgba(255,255,255,0.10); }
[data-modus="nacht"] .dialog .schalter-hinweis { color: var(--text-muted); }
[data-modus="nacht"] .dialog .schalter-block { border-top-color: rgba(255,255,255,0.10); }
/* Dunkelmodus-Kontrast: Namen/Titel/Texte, die hart auf das helle Design gesetzt
   waren (schwarz auf dunkel = unlesbar). Jetzt überall hell genug. */
[data-modus="nacht"] .sp-name,
[data-modus="nacht"] .block-kopf h2,
[data-modus="nacht"] .hi-detail-punkte,
[data-modus="nacht"] .rm-frage,
[data-modus="nacht"] .sg-name,
[data-modus="nacht"] .st-duell-name { color: var(--text); }
[data-modus="nacht"] .aw-inhalt { color: var(--text); }

/* ==================================================================
   Bild/Foto für Spielvorlagen + gemerkte Startspieler-Art
   ================================================================== */
.vl-bild { width: 38px; height: 38px; border-radius: 9px; object-fit: cover; display: block; }

.vl-bild-bereich { display: flex; align-items: center; gap: 12px; margin-top: 2px; }
.vl-bild-vorschau {
  width: 76px; height: 76px; flex: 0 0 auto;
  border-radius: 14px; border: 1px dashed var(--rand);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.vl-bild-gross { width: 100%; height: 100%; object-fit: cover; }
.vl-bild-leer { font-size: 30px; opacity: 0.7; }
.vl-bild-knoepfe { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.vl-bild-knoepfe .btn { width: 100%; margin-top: 0; padding: 9px 10px; font-size: 13.5px; }
.vl-bild-weg { font-size: 12.5px; }

/* „zuletzt genommen" im Schritt Wer fängt an? */
.gf-option-gemerkt { border-color: var(--akzent); box-shadow: 0 0 0 1px var(--akzent); }
.gf-zuletzt {
  margin-left: auto; flex: 0 0 auto;
  font-size: 11px; font-weight: 700; color: var(--akzent-text);
  background: var(--akzent); border-radius: 10px; padding: 3px 9px;
}

/* ==================================================================
   Rettungsleiste über jedem Dialog: Menü und Schließen sind IMMER da,
   egal wie lang der Dialog ist oder wo man gerade steckt.
   ================================================================== */
.ov-leiste {
  position: absolute; top: calc(6px + env(safe-area-inset-top, 0px)); right: 10px;
  display: flex; gap: 8px; z-index: 5;
}
.ov-knopf {
  width: 40px; height: 40px; border: 1px solid rgba(255,255,255,0.22);
  border-radius: 12px; background: rgba(20,17,45,0.85); color: #fff;
  font-size: 18px; line-height: 1; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}
.ov-knopf:active { background: rgba(255,255,255,0.22); }

/* Dialog rutscht unter die Leiste, damit sich nichts überdeckt */
#overlay .dialog { max-height: calc(100% - 50px); margin-top: 34px; }
#overlay.overlay-voll .dialog { max-height: 100%; margin-top: 0; }

/* Bild in der Spielauswahl des geführten Ablaufs */
.gf-spiel-bild { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; display: block; }

/* ==================================================================
   Spiel anlegen: ein ordentlicher Dialog mit Fotos, Preis und Zählweise
   ================================================================== */
.sa-dialog { padding-bottom: 8px; }

.sa-block { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--rand); }
.sa-block:first-of-type { margin-top: 6px; padding-top: 0; border-top: none; }
.sa-block-titel {
  margin: 0 0 10px; font-size: 12px; font-weight: 800;
  letter-spacing: 0.09em; text-transform: uppercase; color: var(--text-muted);
}

/* Großes Hauptbild */
.sa-gross {
  width: 100%; aspect-ratio: 16 / 10;
  border-radius: 16px; overflow: hidden;
  background: var(--flaeche-2); border: 1px solid var(--rand);
  display: flex; align-items: center; justify-content: center;
}
.sa-gross-bild { width: 100%; height: 100%; object-fit: cover; display: block; }
.sa-leer { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--text-muted); }
.sa-leer-icon { font-size: 34px; opacity: 0.8; }
.sa-leer-text { font-size: 13px; }

/* Streifen mit allen Fotos */
.sa-streifen { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0 2px; }
.sa-streifen:empty { display: none; }
.sa-mini { position: relative; flex: 0 0 auto; width: 62px; height: 62px; }
.sa-mini img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  border-radius: 10px; border: 2px solid transparent; cursor: pointer;
}
.sa-mini-haupt img { border-color: var(--akzent); }
.sa-mini-weg {
  position: absolute; top: -6px; right: -6px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: rgba(20,17,45,0.92); color: #fff;
  font-size: 12px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.sa-mini-marke {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: var(--akzent); color: var(--akzent-text);
  font-size: 9.5px; font-weight: 700; text-align: center;
  border-radius: 0 0 8px 8px; padding: 1px 0;
}

.sa-foto-knoepfe { display: flex; gap: 8px; margin-top: 10px; }
.sa-foto-knoepfe .btn { flex: 1; margin-top: 0; }

.sa-hinweis { font-size: 12px; color: var(--text-muted); margin: 8px 0 0; line-height: 1.45; }

.sa-zwei { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sa-icon-feld { text-align: center; font-size: 20px; }
.sa-check { display: flex; align-items: center; gap: 9px; margin-top: 12px; font-size: 13.5px; color: var(--text); }

.sa-fuss { margin-top: 18px; }
.sa-speichern { flex: 1; min-width: 130px; }

.gf-anlegen { width: 100%; margin-top: 10px; }

/* ==================================================================
   Wizard-Block: ein Bildschirm je Schritt (Namen / Tipps / Stiche / Ende)
   ================================================================== */
.wz2-seite { display: flex; flex-direction: column; gap: 12px; padding: 12px 12px 24px; max-width: 640px; margin: 0 auto; }

.wz2-kopf { text-align: center; }
.wz2-titel { margin: 4px 0 2px; font-size: 24px; }
.wz2-unter { margin: 0; font-size: 13.5px; color: var(--text-muted); }

/* Namen */
.wz2-namen { display: flex; flex-direction: column; gap: 8px; }
.wz2-name-zeile { display: flex; align-items: center; gap: 6px; }
.wz2-nr { width: 22px; text-align: center; font-weight: 800; color: var(--text-muted); flex: 0 0 auto; }
.wz2-name-zeile .eingabe { flex: 1; min-width: 0; }
.wz2-mini {
  width: 36px; height: 40px; flex: 0 0 auto;
  border: 1px solid var(--rand); border-radius: 10px;
  background: var(--flaeche-2); color: var(--text); font-size: 14px; cursor: pointer;
}
.wz2-mini:disabled { opacity: 0.3; }
.wz2-mini-weg { color: var(--danger); }
.wz2-add { width: 100%; margin-top: 2px; }

.wz2-schalter {
  display: flex; align-items: flex-start; gap: 10px;
  border: 1px solid var(--rand); border-radius: 14px; padding: 12px 14px;
  background: var(--flaeche-2);
}
.wz2-schalter input { margin-top: 2px; width: 20px; height: 20px; flex: 0 0 auto; }
.wz2-schalter-titel { display: block; font-weight: 700; font-size: 14.5px; }
.wz2-schalter-text { display: block; font-size: 12.5px; color: var(--text-muted); margin-top: 2px; line-height: 1.4; }
.wz2-los { width: 100%; }

/* Runden-Kopf */
.wz2-runde-kopf { display: flex; flex-direction: column; gap: 8px; }
.wz2-runde-zeile { display: flex; align-items: baseline; justify-content: space-between; }
.wz2-runde-titel { margin: 0; font-size: 22px; }
.wz2-runde-karten { font-size: 13px; color: var(--text-muted); }
.wz2-geber { display: flex; flex-wrap: wrap; gap: 8px; }
.wz2-geber-chip {
  font-size: 13px; font-weight: 700; color: #f4e0b0;
  background: rgba(232,192,106,0.16); border: 1px solid rgba(232,192,106,0.4);
  border-radius: 20px; padding: 4px 12px;
}
.wz2-erster-chip {
  font-size: 12.5px; color: var(--text-soft);
  background: var(--flaeche-2); border: 1px solid var(--rand);
  border-radius: 20px; padding: 4px 12px;
}

/* Laufender Punktestand */
.wz2-stand { display: flex; flex-wrap: wrap; gap: 6px; }
.wz2-stand-chip {
  display: flex; align-items: center; gap: 6px;
  border: 1px solid var(--rand); border-left: 4px solid var(--f, var(--akzent));
  border-radius: 10px; padding: 4px 10px; background: var(--flaeche-2);
}
.wz2-stand-name { font-size: 12.5px; font-weight: 600; }
.wz2-stand-wert { font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }

.wz2-phase { margin: 2px 0; font-size: 14px; font-weight: 700; color: var(--text-soft); }

/* Spielerzeilen mit Zahl-Knöpfen */
.wz2-zeilen { display: flex; flex-direction: column; gap: 10px; }
.wz2-zeile {
  border: 1px solid var(--rand); border-radius: 14px; padding: 10px 12px;
  background: var(--flaeche-2);
}
.wz2-zeile-geber { border-color: rgba(232,192,106,0.45); }
.wz2-zeile-kopf { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.wz2-spieler { font-size: 16px; font-weight: 800; }
.wz2-geber-tag { font-size: 10.5px; font-weight: 700; color: #f4e0b0; background: rgba(232,192,106,0.18); border-radius: 8px; padding: 2px 7px; }
.wz2-tipp-tag { margin-left: auto; font-size: 12.5px; font-weight: 700; color: var(--akzent); }

.wz2-zahlen { display: flex; flex-wrap: wrap; gap: 6px; }
.wz2-zahl {
  min-width: 40px; height: 44px; padding: 0 6px;
  border: 1px solid var(--rand); border-radius: 10px;
  background: var(--leiste); color: var(--text);
  font-size: 17px; font-weight: 700; cursor: pointer; font-variant-numeric: tabular-nums;
}
.wz2-zahl-an { background: var(--akzent); color: var(--akzent-text); border-color: transparent; }
.wz2-zahl:disabled { opacity: 0.28; cursor: not-allowed; }

.wz2-summe { text-align: center; font-size: 13.5px; color: var(--text-muted); margin: 2px 0; }
.wz2-summe-gleich { color: #54c99a; font-weight: 700; }

.wz2-knopfreihe { display: flex; gap: 8px; margin-top: 4px; }
.wz2-knopfreihe .btn { flex: 1; margin-top: 0; }

/* Ende / Rangliste */
.wz2-rang { display: flex; flex-direction: column; gap: 6px; }
.wz2-rang-zeile {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--rand); border-radius: 12px; padding: 10px 14px; background: var(--flaeche-2);
}
.wz2-rang-sieger { border-color: var(--akzent); box-shadow: 0 0 0 1px var(--akzent); }
.wz2-rang-platz { font-size: 20px; width: 34px; text-align: center; }
.wz2-rang-name { flex: 1; font-size: 16px; font-weight: 700; }
.wz2-rang-punkte { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }

/* ==================================================================
   Startseite 2.0 — erwachsen, mystisch, „Wow". Emblem als Held,
   edler Haupt-Knopf, schlanke Monoline-Chips statt Emoji-Kacheln.
   ================================================================== */
/* ==================================================================
   ÜBERSICHT (startseite.js) — der Filztisch IST der Einstieg.
   Bewusst ruhig: Wortmarke, Tisch, laufendes Spiel, vier Icons. Mehr nicht.
   ================================================================== */
/* ------------------------------------------------------------------
   DIE TISCH-BÜHNE — EIN Bauteil für Übersicht UND „Stühle stellen".
   Sie hängt absolut in #haupt und liegt in JEDER Ansicht auf exakt
   denselben Pixeln. Beim Weiterklicken darf sich am Tisch nichts
   bewegen, es kommen nur Stühle und Schilder dazu.
   ------------------------------------------------------------------ */
.tisch-buehne {
  position: absolute; left: 50%; top: var(--tisch-oben);
  transform: translateX(-50%);
  width: var(--tisch-gr); height: var(--tisch-gr);
  border: none; background: none; padding: 0; margin: 0;
  touch-action: none; z-index: 2;
  /* Die Bühne selbst ist DURCHLÄSSIG: ihre leeren Ecken dürfen keine Tipps auf
     darunterliegende Knöpfe schlucken (wichtig im Querformat). Nur Filz, Mitte,
     Stühle und Plätze fangen Eingaben. */
  pointer-events: none;
}
.tisch-buehne > * { pointer-events: auto; }
.tisch-buehne > .tb-ring { pointer-events: none; }
/* Der Filz: quadratisch, mittig, Doppelrand in Holz und Gold. */
.tb-filz {
  position: absolute; left: 50%; top: 50%; width: 56%; height: 56%;
  transform: translate(-50%, -50%); border-radius: 18px;
  background: radial-gradient(120% 120% at 50% 40%, #24506d, #123043 70%, #0c2230);
  box-shadow: inset 0 0 40px rgba(0,0,0,.55), 0 0 0 6px #3a2f18, 0 0 0 8px #5a4a22, 0 12px 30px rgba(0,0,0,.45);
  transition: box-shadow .12s ease, transform .12s ease;
}
/* Mitte: etwas breiter als der Filz, damit Text und Knöpfe Platz haben. */
.tb-mitte {
  position: absolute; left: 50%; top: 50%; width: 60%;
  transform: translate(-50%, -50%); text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  transition: transform .12s ease;
}

/* ==================================================================
   ÜBERSICHT (startseite.js) — Aufbau wie in 1.10: Emblem als Held,
   Wortmarke, Gruß, Update-Balken. Nur der goldene „Neues Spiel"-Knopf
   ist durch den Filztisch ersetzt, „＋ Neues Spiel" steht in der Mitte.
   ================================================================== */
.st-seite { position: relative; z-index: 1; max-width: 620px; margin: 0 auto; height: 100%;
  padding: 8px 16px 12px; display: flex; flex-direction: column; box-sizing: border-box; }
.st-held { text-align: center; display: flex; flex-direction: column; align-items: center; flex: 0 0 auto; }
.st-logo { display: block; animation: st-schweben 6s ease-in-out infinite; }
/* Emblem etwas kompakter (84 statt 104), damit der Tisch darunter GROSS sein kann */
.st-logo svg { display: block; width: 84px; height: 84px; }
@keyframes st-schweben { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.st-marke { margin: 4px 0 0; font-family: var(--font-titel); font-weight: 400; line-height: 1.05;
  font-size: clamp(1.6rem, 8.4vw, 36px); letter-spacing: .01em;
  background: linear-gradient(180deg, #f7e3a8 0%, #e8c06a 55%, #c99a3e 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.st-tagline { margin: 1px 0 0; font-family: var(--font-titel); font-size: 18px; color: var(--text-soft); line-height: 1; }
.st-gruss { margin: 4px 0 0; font-size: 13px; font-weight: 600; color: var(--text-muted); }

/* Update-Balken: steht IMMER da. Ruhig als „Nach Update suchen", grün sobald es
   wirklich eine neue Version gibt. Aufbau wie in 1.10 (Titel + Unterzeile). */
.st-update { flex: 0 0 auto; display: flex; align-items: center; gap: 11px; margin-top: 13px;
  padding: 11px 14px; border-radius: 15px; cursor: pointer; text-align: left;
  border: 1px solid var(--rand); background: var(--flaeche-2); color: var(--text); }
.st-update-icon { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 10px; font-size: 17px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(232,180,90,.16); }
.st-update-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.st-update-titel { font-size: 14.5px; font-weight: 800; }
.st-update-sub { font-size: 11.5px; color: var(--text-muted); }
.st-update-pfeil { font-size: 20px; color: var(--text-muted); flex: 0 0 auto; }
.st-update-neu { border-color: rgba(87,185,143,.5); background: rgba(87,185,143,.14); }
.st-update-neu .st-update-icon { background: rgba(87,185,143,.24); }
.st-update-neu .st-update-titel { color: #c9f3dd; }
.st-update-neu .st-update-sub { color: rgba(201,243,221,.75); }

/* Die Lücke, über der die Tisch-Bühne liegt. */
.st-luecke { flex: 1 1 auto; min-height: 0; }
/* Die vier Reiter (+ Version) sind ein FESTER FOOTER am unteren Bildschirmrand,
   wie die Kopfzeile oben — sie schweben NIE frei im Bild. Feste Leisten sind
   in dieser App IMMER position:fixed und hängen NIE in animierten Elementen. */
.st-unten {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  padding: 8px 14px calc(6px + env(safe-area-inset-bottom, 0px));
  background: var(--leiste);
  border-top: 1px solid var(--rand);
}
.st-unten > * { max-width: 612px; margin-left: auto; margin-right: auto; }

/* --- Der Tisch auf der Übersicht: „＋ Neues Spiel" mitten auf dem Filz --- */
.st-tisch { cursor: pointer; }
.st-plus { font-size: 30px; line-height: 1; font-weight: 300; color: var(--akzent);
  text-shadow: 0 2px 8px rgba(0,0,0,.55); }
/* Schriftgröße wächst mit dem Tisch, damit „Neues Spiel" auch auf kleinen
   Bildschirmen in den Filz passt. */
.st-neu-titel { font-family: var(--font-titel); color: #fff;
  font-size: clamp(14px, calc(var(--tisch-gr) * .062), 21px);
  text-shadow: 0 2px 6px rgba(0,0,0,.6); line-height: 1.05; }
.st-neu-sub { font-size: 10px; color: rgba(255,255,255,.72); }

/* Einladung zum Tippen: der Filz atmet, ein Ring läuft nach außen, das ＋ pocht.
   Der Tisch selbst wird dabei NICHT verschoben, nur ganz leicht skaliert. */
.tb-ring { position: absolute; left: 50%; top: 50%; width: 56%; height: 56%;
  transform: translate(-50%, -50%); border-radius: 18px; pointer-events: none;
  animation: tb-welle 2.8s ease-out infinite; }
@keyframes tb-welle {
  0% { box-shadow: 0 0 0 0 rgba(232,180,90,.5); }
  70% { box-shadow: 0 0 0 24px rgba(232,180,90,0); }
  100% { box-shadow: 0 0 0 0 rgba(232,180,90,0); }
}
.st-tisch .tb-filz { animation: tb-atmen 2.8s ease-in-out infinite; }
@keyframes tb-atmen { 0%,100% { transform: translate(-50%,-50%) scale(1); } 50% { transform: translate(-50%,-50%) scale(1.035); } }
.st-plus { animation: tb-pochen 2.8s ease-in-out infinite; }
@keyframes tb-pochen { 0%,100% { transform: scale(1); opacity: .9; } 50% { transform: scale(1.18); opacity: 1; } }

/* Rückmeldung beim Antippen: der Filz drückt sich sichtbar nach unten. */
.st-tisch:active .tb-filz { animation: none; transform: translate(-50%,-48%) scale(.955);
  box-shadow: inset 0 0 70px rgba(0,0,0,.8), 0 0 0 6px #3a2f18, 0 0 0 8px #5a4a22, 0 2px 6px rgba(0,0,0,.5); }
.st-tisch:active .tb-mitte { transform: translate(-50%,-48%) scale(.95); }
.st-tisch:active .tb-stuhl { animation: none; opacity: .8; }

/* Die vier Stühle stehen genau dort, wo später die echten Stühle sitzen. */
.tb-stuhl { position: absolute; font-size: 20px; transform: translate(-50%,-50%);
  animation: tb-stuhl-atmen 2.8s ease-in-out infinite; }
@keyframes tb-stuhl-atmen {
  0%,100% { transform: translate(-50%,-50%) scale(.94); opacity: .5; }
  50% { transform: translate(-50%,-50%) scale(1.08); opacity: .95; }
}

/* ------------------------------------------------------------------
   Querformat / sehr flache Bildschirme: Tisch höher setzen und kleiner,
   Emblem einklappen — nichts darf sich überdecken oder abgeschnitten sein.
   ------------------------------------------------------------------ */
/* Mittelgroße Handys (Höhe bis 760px): Startseiten-Kopf kompakter, damit der
   Tisch höher rutschen kann und unten trotzdem alles Platz hat. */
@media (max-height: 760px) {
  :root { --tisch-oben: clamp(210px, 30vh, 260px); }
  .st-logo svg { width: 56px; height: 56px; }
  .st-marke { font-size: clamp(1.3rem, 6.5vw, 30px); margin-top: 2px; }
  .st-tagline { font-size: 15px; }
  .st-gruss { margin-top: 4px; font-size: 12.5px; }
  .st-seite { padding-top: 4px; }
  .st-update { margin-top: 8px; padding: 7px 12px; }
  .st-update-sub { display: none; }
  .st-update-icon { width: 28px; height: 28px; font-size: 14px; }
  /* Footer kompakt halten, damit er dem Tisch nie zu nahe kommt */
  .st-nochmal-sub { display: none; }
  .st-fuss { display: none; }
}

/* Querformat / sehr flache Bildschirme: alles maximal kompakt. Die
   Schrittleiste entfällt hier — Springen geht weiter über die Pfad-Leiste oben. */
@media (max-height: 560px) {
  :root { --tisch-oben: clamp(60px, 18vh, 120px); --tisch-frei-unten: 80px;
    --tisch-gr: min(45vh, 230px, calc(100dvh - var(--kopf-hoehe) - var(--tisch-oben) - var(--tisch-frei-unten))); }
  .st-logo svg { width: 44px; height: 44px; }
  .st-marke { font-size: clamp(1.1rem, 4.5vw, 24px); margin-top: 2px; }
  .st-tagline, .st-gruss, .st-fuss, .st-nochmal { display: none; }
  .st-seite { padding-top: 4px; padding-bottom: 8px; }
  .st-update { margin-top: 6px; padding: 6px 12px; }
  .st-unten { padding: 5px 12px calc(4px + env(safe-area-inset-bottom, 0px)); }
  .st-ico { padding: 8px 4px; }
  .vf-titel { font-size: 19px; }
  .vf-hinweis, .vf-hinweis2 { display: none; }
  .ts-hinweis { display: none; }
  /* Spezifität höher als die Grundregeln, damit die Leiste hier sicher wegbleibt */
  .vf-fuss .schrittleiste, .wt-seite .schrittleiste, #haupt > .schrittleiste { display: none; }
  .vf-btn { padding: 10px; font-size: 14px; }
  /* Fuß bleibt fest, aber schmal; Inhalt braucht weniger Platzhalter */
  .vf-fuss { padding: 5px 12px calc(5px + env(safe-area-inset-bottom, 0px)); }
  .vf-inhalt { padding-bottom: 70px; }
  .wt-seite { padding-bottom: 8px; }
}

/* „Gleiche Runde nochmal": dieselben Leute mit einem Tipp wieder an den Tisch */
.st-nochmal { display: flex; align-items: center; gap: 10px; width: 100%; margin-bottom: 8px;
  padding: 10px 13px; border-radius: 14px; cursor: pointer; text-align: left;
  border: 1px solid var(--rand); background: var(--flaeche-2); color: var(--text); }
.st-nochmal-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.st-nochmal-titel { font-size: 13px; font-weight: 800; }
.st-nochmal-sub { font-size: 10.5px; color: var(--text-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.st-weiter { display: flex; align-items: center; gap: 10px; margin: 0 auto 8px; padding: 11px 13px; border-radius: 14px;
  cursor: pointer; border: 1px solid rgba(87,185,143,.45); background: rgba(87,185,143,.14); }
.st-weiter-punkt { width: 9px; height: 9px; border-radius: 50%; background: #57b98f; flex: 0 0 auto;
  animation: st-blink 1.7s infinite; }
@keyframes st-blink { 50% { opacity: .3; } }
.st-weiter-text { flex: 1; text-align: left; }
.st-weiter-titel { display: block; font-size: 13.5px; font-weight: 800; color: #c9f3dd; }
.st-weiter-sub { display: block; font-size: 10.5px; color: rgba(201,243,221,.7); }

.st-plus-hinweis { display: flex; align-items: center; gap: 9px; margin-top: 10px; padding: 10px 12px; border-radius: 13px; cursor: pointer;
  border: 1px solid rgba(232,180,90,.36); background: linear-gradient(100deg, rgba(232,180,90,.16), rgba(232,180,90,.06)); }
.st-plus-text { flex: 1; text-align: left; }
.st-plus-titel { display: block; font-size: 12px; font-weight: 800; color: #f3e2bd; }
.st-plus-sub { display: block; font-size: 9.5px; color: rgba(243,226,189,.7); }

.st-icons { display: flex; gap: 9px; margin-top: 0; }
.st-ico { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  padding: 12px 4px; border-radius: 15px; cursor: pointer; border: 1px solid var(--rand); background: var(--flaeche-2); }
.st-ico:active { background: var(--flaeche); }
.st-ico-em { font-size: 19px; line-height: 1; }
.st-ico-tx { font-size: 9.5px; color: var(--text-muted); }
.st-fuss { text-align: center; font-size: 10.5px; color: var(--text-muted); margin: 6px 0 0; }

/* Werkzeuge-Fenster */
.wkz-gitter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.wkz-knopf { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 11px 3px; border-radius: 13px;
  cursor: pointer; font-size: 10px; border: 1px solid var(--rand); background: var(--flaeche-2); color: var(--text-soft); }
.wkz-em { font-size: 19px; line-height: 1; }

.start2 { max-width: 620px; margin: 0 auto; padding: 8px 16px 28px; display: flex; flex-direction: column; gap: 18px; }

.sm-logo { display: block; filter: drop-shadow(0 10px 30px rgba(120, 90, 210, 0.4)); }
.sm-icon { display: block; }

/* Held */
.start2-held { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 2px; padding-top: 6px; }
.start2-logo { animation: sm-schweben 6s ease-in-out infinite; }
@keyframes sm-schweben { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.start2-marke {
  /* AUFGABE 3: Schriftgröße responsiv statt fix 44px. „Spielemeisterin" ist EIN
     unbrechbares Wort — bei 44px wurde es auf schmalen Geräten (z. B. 360px) breiter
     als der Bildschirm; da body overflow:hidden hat, wurde der Überhang gekappt und
     das „S" vorne fehlte. clamp() skaliert mit der Viewport-Breite: klein genug zum
     vollständigen Reinpassen, bis maximal 44px auf breiten Screens.
     Rechnung bei 360px: 7.7vw = 27.7px; „Spielemeisterin" (~6,9 em in dieser Schrift)
     ≈ 191px < verfügbare ~312px (360 − 2·16 .start2-Polster − 2·8 Eigenpolster). */
  margin: 8px 0 0; font-family: var(--font-titel); font-weight: 400;
  font-size: clamp(1.6rem, 7.7vw, 44px);
  letter-spacing: 0.01em; line-height: 1.05;
  /* zentriert, nie breiter als der Platz, kleines Seitenpolster als Sicherheitsnetz */
  width: 100%; max-width: 100%; box-sizing: border-box; text-align: center; padding: 0 8px;
  background: linear-gradient(180deg, #f7e3a8 0%, #e8c06a 55%, #c99a3e 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.start2-tagline { margin: 2px 0 0; font-family: var(--font-titel); font-size: 22px; color: var(--text-soft); line-height: 1; }
/* P und S in Gold — zeigt, dass PS für Punkte & Spiele steht. */
.ps-gelb { color: var(--akzent); }
.start2-gruss { margin: 10px 0 0; font-size: 15px; font-weight: 600; color: var(--text-muted); }

/* Weiterspielen */
.start2-weiter {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  border: 1px solid rgba(84, 201, 154, 0.5); background: rgba(84, 201, 154, 0.10);
  border-radius: 16px; padding: 12px 14px; cursor: pointer;
}
.start2-weiter-punkt { width: 10px; height: 10px; border-radius: 50%; background: #54c99a; box-shadow: 0 0 10px #54c99a; flex: 0 0 auto; }
.start2-weiter-text { flex: 1; display: flex; flex-direction: column; }
.start2-weiter-titel { font-weight: 800; font-size: 15px; color: var(--text); }
.start2-weiter-sub { font-size: 12.5px; color: var(--text-muted); }
.start2-weiter-pfeil { font-size: 22px; color: var(--text-muted); }

/* Edler Haupt-Knopf */
.start2-cta {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; cursor: pointer;
  border: 1px solid rgba(232, 192, 106, 0.55); border-radius: 20px; padding: 18px 18px;
  color: #fff;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(232,192,106,0.22), transparent 55%),
    linear-gradient(135deg, #3a2f6b 0%, #221a45 55%, #1a1533 100%);
  box-shadow: 0 14px 40px rgba(58, 40, 120, 0.5), inset 0 1px 0 rgba(255,255,255,0.08);
}
.start2-cta:active { transform: translateY(1px); }
.start2-cta-glanz {
  position: absolute; top: 0; left: -60%; width: 45%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.14), transparent);
  transform: skewX(-18deg); animation: sm-glanz 5.5s ease-in-out infinite;
}
@keyframes sm-glanz { 0%, 60% { left: -60%; } 100% { left: 130%; } }
.start2-cta-icon {
  flex: 0 0 auto; width: 48px; height: 48px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, #f7e3a8, #d9a441); color: #2a1e05;
}
.start2-cta-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.start2-cta-titel { font-size: 23px; font-weight: 400; font-family: var(--font-titel); }
.start2-cta-sub { font-size: 12.5px; color: rgba(255,255,255,0.66); }

/* Abschnitte */
.start2-block { display: flex; flex-direction: column; gap: 8px; }
.start2-label { margin: 4px 0 0; font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); }

/* Schnellzugriff-Chips */
.start2-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.start2-chip {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  border: 1px solid var(--rand); background: var(--flaeche-2); color: var(--text);
  border-radius: 22px; padding: 9px 14px 9px 11px; font-size: 13.5px; font-weight: 600;
}
.start2-chip:active { background: var(--overlay-btn-akt); }
.start2-chip-icon { color: #c7b3f0; display: flex; }

/* AUFGABE 2: Label-Zeile mit „✏️ Anpassen" rechts + dezenter Anpassen-Knopf. */
.start2-label-reihe { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.start2-anpassen {
  border: 1px solid var(--rand); background: var(--flaeche-2); color: var(--text-soft);
  border-radius: 999px; padding: 5px 12px; font-size: 12.5px; font-weight: 700;
  font-family: inherit; cursor: pointer; white-space: nowrap;
}
.start2-anpassen:active { background: var(--overlay-btn-akt); }
/* Lieblingsspiel-Kachel = Schnellzugriff-Chip mit Spiel-Emoji bzw. eigenem Bild. */
.start2-spiel-icon { font-size: 17px; line-height: 1; }
.start2-spiel-bild { width: 20px; height: 20px; border-radius: 6px; object-fit: cover; flex: 0 0 auto; }

/* Stammrunde */
.start2-runden { display: flex; flex-direction: column; gap: 8px; }
.start2-runde { display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer;
  border: 1px solid var(--rand); background: var(--flaeche-2); border-radius: 14px; padding: 11px 14px; color: var(--text); }
.start2-runde-dots { display: flex; }
.start2-runde-dot { width: 14px; height: 14px; border-radius: 50%; margin-left: -5px; border: 2px solid var(--flaeche-2); }
.start2-runde-dot:first-child { margin-left: 0; }
.start2-runde-name { flex: 1; font-weight: 700; font-size: 14.5px; }
.start2-runde-los { font-size: 20px; color: var(--text-muted); }

/* Bereiche */
.start2-bereiche { display: flex; flex-direction: column; gap: 6px; }
.start2-bereich { display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer;
  border: 1px solid var(--rand); background: var(--flaeche-2); border-radius: 14px; padding: 12px 14px; color: var(--text); font-size: 14.5px; font-weight: 600; }
.start2-bereich > span:nth-child(2) { flex: 1; }
.start2-bereich-icon { color: #c7b3f0; display: flex; }
.start2-bereich-pfeil { font-size: 20px; color: var(--text-muted); }

/* Teaser */
.start2-teaser { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; cursor: pointer;
  border: 1px solid var(--rand); background: var(--flaeche-2); border-radius: 16px; padding: 14px; }
.start2-teaser-kachel { text-align: left; }
.start2-teaser-label { display: block; font-size: 12px; color: var(--text-muted); }
.start2-teaser-wert { display: block; font-size: 17px; font-weight: 800; margin-top: 3px; color: var(--text); }
.start2-teaser-gold { color: #e8c06a; }

/* ---------------- Startseiten-Kacheln (kompakt, gruppiert) ----------------
   Icon oben + Label, ~3 pro Reihe. Ersetzen die früheren länglichen Chip-/
   Bereichs-Zeilen. Bewusst mittelgroß (nicht riesig-quadratisch). */
.start2-gruppe { display: flex; flex-direction: column; gap: 8px; }
.start2-kacheln { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.start2-kachel {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
  text-align: center; cursor: pointer; font-family: inherit;
  background: var(--flaeche-2); color: var(--text);
  border: 1px solid var(--rand); border-radius: 16px;
  padding: 13px 8px; min-height: 80px;
}
.start2-kachel:active { transform: scale(.97); background: var(--overlay-btn-akt); }
.start2-kachel-emoji { font-size: 25px; line-height: 1; }
.start2-kachel-bild { width: 30px; height: 30px; border-radius: 8px; object-fit: cover; }
.start2-kachel-label { font-size: 12.5px; font-weight: 700; line-height: 1.15; overflow-wrap: anywhere; }
/* dezenter „Lieblingsspiele anpassen"-Link unten */
.start2-anpassen-fuss {
  align-self: center; margin-top: 2px; padding: 6px 10px;
  background: none; border: none; color: var(--text-muted);
  font-family: inherit; font-size: 13px; cursor: pointer;
}
.start2-anpassen-fuss:active { color: var(--text); }

/* ==================================================================
   Spielauswahl als erwachsene, scrollbare Liste (statt Emoji-Kacheln)
   ================================================================== */
.gf-suche { margin-bottom: 10px; }
.gf-liste { display: flex; flex-direction: column; gap: 6px; padding: 2px; margin: 0 -2px; }
.gf-zeile {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; cursor: pointer;
  border: 1px solid var(--rand); background: var(--flaeche-2); border-radius: 14px; padding: 10px 12px; color: var(--text);
}
.gf-zeile:active { background: var(--overlay-btn-akt); }
.gf-zeile-bild { width: 42px; height: 42px; border-radius: 10px; object-fit: cover; flex: 0 0 auto; }
.gf-zeile-icon {
  width: 42px; height: 42px; flex: 0 0 auto; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, rgba(199,179,240,0.16), rgba(199,179,240,0.06));
  color: #c7b3f0;
}
.gf-zeile-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.gf-zeile-name { font-size: 15.5px; font-weight: 700; }
.gf-zeile-sub { font-size: 12px; color: var(--text-muted); }
.gf-zeile-regeln {
  flex: 0 0 auto; width: 36px; height: 36px; border-radius: 10px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--rand); background: var(--leiste); color: var(--text-soft);
}
.gf-zeile-regeln:active { color: var(--akzent); border-color: var(--akzent); }
.gf-zeile-pfeil { flex: 0 0 auto; font-size: 20px; color: var(--text-muted); }
.gf-neu-treffer {
  width: 100%; text-align: left; cursor: pointer; color: var(--text);
  border: 1px dashed var(--rand); background: none; border-radius: 14px; padding: 14px; font-size: 14px; font-weight: 600;
}
.gf-svg { display: inline-flex; }

/* ==================================================================
   Regelwerk
   ================================================================== */
.rg-ziel { font-size: 15px; font-weight: 700; color: var(--text); margin: 4px 0 10px; }
.rg-liste { margin: 0 0 6px; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.rg-liste li { font-size: 14px; color: var(--text-soft); line-height: 1.45; }
.rg-aktionen { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.rg-aktionen .btn { width: 100%; margin-top: 0; }
.rg-pdf-voll { display: flex; flex-direction: column; padding: 0; }
.rg-pdf-kopf { display: flex; align-items: center; gap: 8px; padding: 10px 12px; }
.rg-pdf-kopf > span { flex: 1; font-weight: 700; color: #fff; }
.rg-pdf { flex: 1; width: 100%; border: none; background: #fff; }

/* Regelwerk im Anlege-Dialog */
.sa-pdf-reihe { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.sa-pdf-reihe .btn { margin-top: 0; flex: 0 0 auto; }
.sa-pdf-name { font-size: 12.5px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ==================================================================
   Wizard Tisch-Ansicht (wt-*) — Steinchen, Karten, Block, Siegertreppe
   ================================================================== */
/* In den Spielphasen sitzt die Schrittleiste als fester Footer über dem
   Inhalt — die Seite braucht unten nur genug Polster, damit der letzte Knopf
   nicht hinter der Leiste verschwindet. */
.haupt-spielflaeche { padding-bottom: 6px; }
.wt-seite { max-width: 640px; margin: 0 auto; padding: 6px 12px 62px;
  box-sizing: border-box; width: 100%; }
.wt-kopf { text-align: center; }
.wt-phase { font-size: 25px; font-weight: 400; margin: 2px 0 2px; font-family: var(--font-titel); }
.wt-geber { font-size: 12.5px; color: var(--text-muted); margin: 0; }
.wt-dran { text-align: center; font-size: 14px; color: var(--akzent); font-weight: 700; margin: 8px 0; }

.wt-tisch { position: relative; height: 420px; max-width: 540px; margin: 0 auto; }
.wt-filz { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); width: 50%; height: 54%; border-radius: 18px;
  background: radial-gradient(120% 120% at 50% 40%, #24506d, #123043 70%, #0c2230);
  box-shadow: inset 0 0 40px rgba(0,0,0,.55), 0 0 0 6px #3a2f18, 0 0 0 8px #5a4a22; }
.wt-mitte { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); text-align: center; width: 50%; }
.wt-mitte-label { font-size: 11px; color: #cfe6d8; opacity: .9; margin-bottom: 5px; }
.wt-mitte-steine { display: flex; flex-wrap: wrap; gap: 7px; justify-content: center; align-items: center; min-height: 26px; }
.wt-mitte-mehr { font-size: 10.5px; color: var(--akzent); margin-top: 6px; }
.wt-cstein { width: 22px; height: 22px; border-radius: 50%; cursor: pointer;
  background: radial-gradient(circle at 35% 30%, #f7e3a8, #c99a3e); border: 1px solid rgba(0,0,0,.35); box-shadow: 0 1px 3px rgba(0,0,0,.5); }
.wt-cstein-extra { opacity: .5; }
/* Offene Stiche als kleine Karten in der Tischmitte (zum Spieler ziehen). */
.wt-ckarte { width: 17px; height: 24px; border-radius: 4px; cursor: grab; display: inline-block;
  background: linear-gradient(160deg, #fdfbf5, #ded7c6); border: 1px solid rgba(0,0,0,.45); box-shadow: 0 1px 3px rgba(0,0,0,.5); }
.wt-ckarte:active { cursor: grabbing; }
/* Karten, die nur daliegen (Spielen-Phase) — nicht ziehbar, leicht überlappend */
.wt-ckarte-ruhe { cursor: default; margin-left: -8px; }
.wt-ckarte-ruhe:first-child { margin-left: 0; }
.wt-cstein { cursor: grab; }
.wt-cstein:active { cursor: grabbing; }
/* WICHTIG: touch-action:none — sonst scrollt der Bildschirm beim Ziehen mit und
   der Browser bricht den Zug ab (dann „passiert nichts"). Genau wie bei den
   Piratenstiche-Karten, wo es von Anfang an funktioniert hat. */
.wt-cstein, .wt-ckarte, .wt-stein, .wt-efeld, .wt-platz {
  touch-action: none; user-select: none; -webkit-user-select: none;
}
.wt-stein { cursor: grab; }
.wt-tisch { touch-action: none; }
/* Ergebnis-Karten: seitliche Plätze stapeln von UNTEN nach OBEN, damit die
   Karten nicht über den Filz wachsen. */
.wt-o-links .wt-erg, .wt-o-rechts .wt-erg { flex-direction: column-reverse; flex-wrap: nowrap; max-width: none; }
.wt-efeld { cursor: grab; touch-action: none; }
.wt-efeld-voll:active { cursor: grabbing; }

/* Block-Zelle nachträglich korrigierbar */
.wt-zelle-edit { cursor: pointer; }
.wt-zelle-edit:active { filter: brightness(1.25); }
.wk-reihe { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.wk-zahl { min-width: 38px; padding: 9px 6px; border-radius: 10px; cursor: pointer; font-weight: 700;
  border: 1px solid var(--rand); background: var(--flaeche-2); color: var(--text-soft); }
.wk-zahl-an { background: var(--akzent); color: var(--akzent-text); border-color: transparent; }
.wk-punkte { margin: 4px 0 0; font-weight: 700; font-size: 14px; }
/* Plus-Funktion, noch nicht freigeschaltet (z.B. Turniermodus) */
.wz2-schalter-plus { opacity: .72; cursor: pointer; border-color: rgba(232,180,90,.45); }
.wz2-schalter-plus .wz2-schalter-titel { color: var(--akzent); }

/* Gruppenbild im Filter-Chip */
.wm-chip-bild { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; margin-right: 6px; vertical-align: middle; }

/* ==================================================================
   DIE DREI FENSTER DES ABLAUFS (vf-…) — Stühle · Namen · Spiel.
   Alle drei sind GLEICH aufgebaut und sehen gleich aus:
     Kopf (Titel + Hinweis) · Inhalt (scrollt nur wenn nötig) · Fuß (ein großer
     Knopf + Schrittleiste). #haupt bekommt dafür die Klasse .haupt-fest, damit
     die Seite selbst NICHT scrollt und alles auf den Handy-Schirm passt.
   ================================================================== */
/* WICHTIG: width:100% + min-width:0. Ohne das richtet sich die Breite nach dem
   Inhalt — die einzeilige Sitzreihenfolge („A → B → C …") zog die Seite dann
   breiter als den Bildschirm und alles ragte rechts raus (der gemeldete Fehler). */
.vf-seite { display: flex; flex-direction: column; height: 100%; min-height: 0;
  width: 100%; min-width: 0; max-width: 640px; margin: 0 auto;
  padding: 6px 14px 8px; box-sizing: border-box; }
.vf-kopf { flex: 0 0 auto; text-align: center; }
.vf-kopf-reihe { position: relative; display: flex; align-items: center; justify-content: center; min-height: 34px; }
.vf-titel { margin: 0; font-family: var(--font-titel); font-size: 24px; font-weight: 400; line-height: 1.15; }
.vf-hinweis { margin: 2px 0 0; font-size: 12px; color: var(--text-muted); }
.vf-hinweis2 { font-size: 10.5px; opacity: .75; }
.vf-plus { position: absolute; right: 0; top: 0; width: 34px; height: 34px; border-radius: 11px; cursor: pointer;
  font-size: 17px; line-height: 1; border: 1px solid rgba(232,180,90,.45); background: rgba(232,180,90,.16); color: #f3e2bd; }
.vf-plus:active { background: var(--akzent); color: var(--akzent-text); }

/* Unten Polster, damit die letzte Zeile nicht hinter dem festen Fuß liegt */
.vf-inhalt { flex: 1 1 auto; min-height: 0; overflow-y: auto; scrollbar-width: none;
  padding-bottom: 140px; }
.vf-inhalt::-webkit-scrollbar { display: none; }
/* Beim Tisch ist der Inhalt nur die Lücke, ÜBER der die Tisch-Bühne hängt. */
.vf-inhalt-tisch { overflow: hidden; }

/* Der Fuß ist ein FESTER FOOTER wie die Kopfzeile: Knopf (mit Zähler) und
   Schrittleiste kleben am unteren Bildschirmrand. Er ist ein EIGENES Kind von
   #haupt (nicht in der animierten Seite — transform würde fixed brechen). */
.vf-fuss {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  padding: 8px 14px calc(6px + env(safe-area-inset-bottom, 0px));
  background: var(--leiste);
  border-top: 1px solid var(--rand);
}
.vf-fuss > * { max-width: 612px; margin-left: auto; margin-right: auto; }
.vf-btn { width: 100%; padding: 14px; border-radius: 15px; border: none; font-size: 16px; font-weight: 800;
  background: linear-gradient(135deg, #f4d488, var(--akzent) 45%, #d29a3f); color: var(--akzent-text);
  box-shadow: 0 8px 20px rgba(232,180,90,.3); }
.vf-btn:disabled { opacity: .45; box-shadow: none; }
.vf-zurueck { display: block; width: 100%; margin-top: 3px; padding: 4px; border: none; background: none;
  color: var(--text-muted); font-size: 12px; font-family: inherit; cursor: pointer; }
.vf-zaehler { margin: 0 0 6px; text-align: center; font-size: 11.5px; color: var(--text-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vf-leer { text-align: center; font-size: 12.5px; color: var(--text-muted); margin: 14px 8px; line-height: 1.4; }

/* Reiter für die Stammgruppen (statt der alten Chips) */
.vf-reiter { flex: 0 0 auto; display: flex; gap: 2px; margin: 8px 0 6px; overflow-x: auto;
  scrollbar-width: none; border-bottom: 1px solid var(--rand); }
.vf-reiter::-webkit-scrollbar { display: none; }
.vf-reiter-btn { flex: 0 0 auto; padding: 7px 13px 8px; border: none; background: none; cursor: pointer;
  font-family: inherit; font-size: 12.5px; font-weight: 700; color: var(--text-muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px; }
.vf-reiter-an { color: var(--akzent); border-bottom-color: var(--akzent); }
[data-modus="hell"] .vf-reiter-an { color: #1d4ed8; border-bottom-color: #1d4ed8; }

/* Neuen Namen anlegen — direkt im Fenster, kein Popup */
.vf-neu { display: flex; gap: 6px; margin-bottom: 8px; }
.vf-neufeld { flex: 1 1 auto; min-width: 0; padding: 10px 12px; border-radius: 12px; font-size: 14px;
  font-family: inherit; border: 1px solid rgba(232,180,90,.45); background: var(--flaeche-2); color: var(--text); }
.vf-neufeld:focus { outline: none; border-color: var(--akzent); }
.vf-neu-ok { flex: 0 0 auto; padding: 0 14px; border-radius: 12px; border: none; cursor: pointer;
  font-family: inherit; font-size: 13px; font-weight: 800;
  background: var(--akzent); color: var(--akzent-text); }

/* Personen als Kacheln, die Zahl zeigt die Sitzreihenfolge */
.vf-gitter { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; padding-bottom: 4px; }
.vf-person { position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 10px 5px 9px; border-radius: 14px; cursor: pointer;
  border: 1px solid var(--rand); background: var(--flaeche-2); color: var(--text); }
.vf-person-an { border-color: var(--akzent); background: rgba(232,180,90,.16); }
[data-modus="hell"] .vf-person-an { border-color: #2563eb; background: rgba(37,99,235,.12); }
.vf-foto, .vf-initial { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.vf-initial { display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 800; color: #201a2e; }
.vf-name { font-size: 12.5px; font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Die Sitznummer ist bewusst GROSS — sie ist die wichtigste Information der
   Kachel (wer sitzt als Wievielter). */
.vf-nr { position: absolute; top: 4px; right: 4px; width: 27px; height: 27px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 900;
  background: var(--akzent); color: var(--akzent-text); box-shadow: 0 2px 6px rgba(0,0,0,.35); }
.vf-tipp { text-align: center; font-size: 11px; color: var(--text-muted); opacity: .7; margin: 8px 0 4px; }

/* Freundlicher Leerzustand: großes ＋ lädt direkt zum Anlegen ein */
.vf-leer-gross { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%;
  margin: 22px 0 10px; padding: 26px 16px; border-radius: 18px; cursor: pointer;
  border: 1.5px dashed rgba(232,180,90,.5); background: rgba(232,180,90,.07); color: var(--text); }
.vf-leer-plus { width: 54px; height: 54px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 30px; background: var(--akzent); color: var(--akzent-text);
  animation: tb-pochen 2.8s ease-in-out infinite; }
.vf-leer-titel { font-size: 15.5px; font-weight: 800; }
.vf-leer-sub { font-size: 11.5px; color: var(--text-muted); text-align: center; line-height: 1.4; }

/* Spielwahl-Fenster: eine Zeile je Spiel */
.vf-spiel { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; cursor: pointer;
  margin-bottom: 8px; padding: 12px 13px; border-radius: 15px;
  border: 1px solid var(--rand); background: var(--flaeche-2); color: var(--text); }
.vf-spiel-an { border-color: var(--akzent); background: rgba(232,180,90,.14); }
[data-modus="hell"] .vf-spiel-an { border-color: #2563eb; background: rgba(37,99,235,.10); }
.vf-spiel-aus { opacity: .45; }
.vf-spiel-ico { font-size: 24px; line-height: 1; flex: 0 0 auto; }
.vf-spiel-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.vf-spiel-titel { font-size: 14.5px; font-weight: 800; }
.vf-spiel-sub { font-size: 11px; color: var(--text-muted); }
.vf-spiel-haken { flex: 0 0 auto; font-size: 17px; font-weight: 900; color: var(--akzent); }
.vf-zusatz { margin: -2px 0 10px; padding: 0 4px 4px; }
.vf-zusatz-label { margin: 0 0 5px; font-size: 11px; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-muted); }
.vf-sammlung { display: flex; gap: 5px; overflow-x: auto; scrollbar-width: none; padding-bottom: 6px; }
.vf-sammlung::-webkit-scrollbar { display: none; }
.vf-samml-chip { flex: 0 0 auto; padding: 6px 11px; border-radius: 14px; cursor: pointer; font-size: 12px;
  font-family: inherit; border: 1px solid var(--rand); background: var(--flaeche-2); color: var(--text-soft); }
.vf-samml-an { border-color: var(--akzent); color: var(--akzent); }

/* ==================================================================
   Der TISCH (tisch.js) — Stühle frei platzieren, danach Geber bestimmen.
   Die Bühne selbst kommt von .tisch-buehne (identisch mit der Übersicht).
   ================================================================== */
/* Tischmitte: Zahl + Werkzeuge (Stuhl, Geber, auslosen) */
.ts-mitte { width: 54%; }
.ts-mitte-zahl { font-size: 11.5px; color: #cfe6d8; opacity: .9; margin-bottom: 7px; }
.ts-mitte-wz { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; }
.ts-mwz { padding: 7px 9px; border-radius: 9px; line-height: 1; cursor: pointer; font-size: 11px; font-weight: 700;
  border: 1px solid rgba(232,180,90,.45); background: rgba(232,180,90,.16); color: #f3e2bd; }
.ts-mwz:active { background: var(--akzent); color: var(--akzent-text); }
.ts-mwz-zieh { cursor: grab; touch-action: none; }

/* Ein Platz: Stuhl + Namensschild. Seitlich stehen die Namen hochkant. */
.ts-platz { position: absolute; display: flex; align-items: center; gap: 4px; cursor: grab; touch-action: none;
  user-select: none; -webkit-user-select: none;
  transform: translate(-50%, -50%); z-index: 5; }
/* Beim Betreten einer Stufe hüpfen Stühle und Schilder nacheinander herein.
   Danach (beim normalen Neuzeichnen) stehen sie sofort still. */
.ts-platz-rein { animation: ts-einzug .42s cubic-bezier(.34,1.56,.64,1) backwards; }
@keyframes ts-einzug {
  from { transform: translate(-50%,-50%) scale(.25); opacity: 0; }
  to { transform: translate(-50%,-50%) scale(1); opacity: 1; }
}
.ts-platz.zieht { opacity: .45; }
.ts-stuhl-ico { font-size: 20px; line-height: 1; }
.ts-schild { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 9px;
  background: rgba(20,16,33,.9); border: 1px solid rgba(255,255,255,.2); font-size: 12.5px; font-weight: 800;
  white-space: nowrap; color: var(--text); }
[data-modus="hell"] .ts-schild { background: rgba(255,255,255,.94); border-color: rgba(0,0,0,.14); }
.ts-nm { overflow: hidden; text-overflow: ellipsis; max-width: 84px; }
.ts-geber .ts-schild { border-color: var(--akzent); background: rgba(232,180,90,.24); }
/* Der EIGENE Platz: der Farbpunkt bekommt einen goldenen Ring, der Name steht
   in Gold — so findet man sich am vollen Tisch sofort wieder. */
.ts-ich .wt-dot { box-shadow: 0 0 0 2px var(--akzent); }
.ts-ich .ts-nm { color: var(--akzent); }
/* Lange Namen kleiner schreiben statt abschneiden */
.ts-nm-lang { font-size: 10.5px; max-width: 118px; letter-spacing: -.01em; }
.ts-links .ts-nm-lang, .ts-rechts .ts-nm-lang { max-width: 118px; }

/* Doppeltipp auf den Filz: alle Namen kurz GROSS über dem Bildschirm */
.ts-namen-gross { position: fixed; z-index: 55;
  inset: calc(var(--kopf-hoehe) + env(safe-area-inset-top, 0px)) 0 0 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 9px; padding: 30px;
  background: rgba(6,4,14,.88); backdrop-filter: blur(3px); animation: ng-rein .2s ease-out; }
@keyframes ng-rein { from { opacity: 0; } to { opacity: 1; } }
.ts-ng-zeile { display: flex; align-items: center; gap: 11px; font-size: 27px; font-weight: 800;
  color: #fff; animation: ng-zeile .3s cubic-bezier(.34,1.56,.64,1) backwards; }
@keyframes ng-zeile { from { opacity: 0; transform: translateY(9px) scale(.9); } to { opacity: 1; transform: none; } }
.ts-ng-zeile .wt-dot { width: 15px; height: 15px; }
/* Ausrichtung nach Tischkante: Fuß der Schrift zeigt zum Filz */
.ts-links { flex-direction: row-reverse; }
.ts-links .ts-schild, .ts-rechts .ts-schild { writing-mode: vertical-rl; text-orientation: mixed; padding: 9px 4px; }
.ts-links .ts-schild { transform: rotate(180deg); }
.ts-links .ts-nm, .ts-rechts .ts-nm { max-width: 92px; }
.ts-oben { flex-direction: column-reverse; }
.ts-unten { flex-direction: column; }

.ts-opt { display: flex; align-items: flex-start; gap: 9px; margin: 10px auto 0; max-width: 460px;
  font-size: 12.5px; color: var(--text-soft); line-height: 1.35; cursor: pointer; }
.ts-opt b { color: var(--text); }
.ts-opt-plus { opacity: .75; }
.ts-opt-plus b { color: var(--akzent); }
.ts-hinweis { text-align: center; font-size: 11px; color: var(--text-muted); margin: 2px 0 6px; }
.ts-menue { display: flex; flex-direction: column; gap: 8px; margin-bottom: 6px; }

/* ==================================================================
   Schritt-Leisten (schritte.js) — stehen immer unten.
   Erste Leiste: Stühle · Namen · Geber · Spiel (allgemein, bis zur Spielwahl).
   Zweite Leiste: je Spiel eigene Schritte, erscheint erst NACH der Spielwahl.
   ================================================================== */
/* Die Leiste steht im Fuß-Footer (vf-Fenster) bzw. klebt in den Spielphasen
   selbst als Footer am unteren Rand (#haupt > …, eigenes Kind, nie animiert). */
.schrittleiste { display: flex; gap: 3px; justify-content: center; margin-top: 6px; }
.sl-schritt { flex: 1 1 0; max-width: 152px; }
#haupt > .schrittleiste {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  margin: 0; padding: 6px 10px calc(6px + env(safe-area-inset-bottom, 0px));
  background: var(--leiste); border-top: 1px solid var(--rand);
}
.sl-schritt { flex: 1 1 0; min-width: 0; padding: 6px 2px; border-radius: 9px; text-align: center;
  background: var(--flaeche-2); border: 1px solid var(--rand); }
.sl-nr { display: block; font-size: 13px; line-height: 1.1; }
.sl-text { display: block; font-size: 9px; color: var(--text-muted); line-height: 1.2; margin-top: 1px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sl-aktiv { background: rgba(232,180,90,.18); border-color: var(--akzent); }
.sl-aktiv .sl-nr, .sl-aktiv .sl-text { color: var(--akzent); font-weight: 800; }
[data-modus="hell"] .sl-aktiv { background: rgba(37,99,235,.14); border-color: #2563eb; }
[data-modus="hell"] .sl-aktiv .sl-nr, [data-modus="hell"] .sl-aktiv .sl-text { color: #1d4ed8; }
/* Anklickbare Schritte (Sprungleiste): gleiches Maß wie die Anzeige-Kästchen */
button.sl-schritt { font-family: inherit; cursor: pointer; }
.sl-klick:active { background: rgba(232,180,90,.25); border-color: var(--akzent); }
[data-modus="hell"] .sl-klick:active { background: rgba(37,99,235,.18); border-color: #2563eb; }
.wt-haken { width: 28px; height: 28px; border-radius: 50%; margin-left: 8px; border: 1.5px solid var(--akzent);
  background: rgba(255,255,255,.06); color: var(--akzent); font-size: 15px; font-weight: 900; cursor: pointer; line-height: 1; }
.wt-haken:active { background: var(--akzent); color: var(--akzent-text); }

.wt-platz { position: absolute; display: flex; align-items: center; gap: 10px; z-index: 3; }
/* Ergebnisrunde: ganzer Platz antippbar (= Stich dazu), kurzes Tipp-Feedback. */
.wt-erg-platz { cursor: pointer; }
.wt-erg-platz:active { opacity: .72; }
/* orient = zu welcher Kante die Karten/Steinchen zeigen (zum Filz). Name sitzt AUSSEN,
   Tray INNEN am Filz, mit GLEICHEM sichtbaren Abstand: gap (Name↔Karte) = 10px, und
   padding zum Filz = 10px + 8px Holzrahmen, damit der Abstand Karte↔Filzkante auch 10px ist. */
.wt-o-links  { flex-direction: row;    justify-content: flex-end;   padding-right: 18px; }
.wt-o-rechts { flex-direction: row;    justify-content: flex-start; padding-left: 18px; }
.wt-o-oben   { flex-direction: column; justify-content: flex-end;   padding-bottom: 18px; }
.wt-o-unten  { flex-direction: column; justify-content: flex-start; padding-top: 18px; }
.wt-o-rechts .wt-name, .wt-o-unten .wt-name { order: 2; } /* Name nach außen */
.wt-o-rechts .wt-tray, .wt-o-unten .wt-tray { order: 1; } /* Tray zum Filz */
.wt-o-links .wt-name, .wt-o-rechts .wt-name { writing-mode: vertical-rl; text-orientation: mixed; padding: 8px 3px; }
.wt-o-links .wt-name { transform: rotate(180deg); } /* links von unten nach oben lesbar */
.wt-o-links .wt-tray, .wt-o-rechts .wt-tray { flex-direction: column; }
.wt-o-oben  .wt-tray, .wt-o-unten .wt-tray  { flex-direction: row; }
.wt-name { display: inline-flex; align-items: center; gap: 5px; font-size: 14px; font-weight: 800; padding: 3px 8px; border: 2px solid transparent; border-radius: 10px; max-width: 100%; }
.wt-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.wt-nm { color: var(--text); overflow: hidden; text-overflow: ellipsis; }
/* Aktiver Ansager: grüner Rahmen ums GANZE Schild (Klasse liegt am .wt-name). */
.wt-aktiv { background: rgba(63,160,107,.20); border-color: #3fa06b; box-shadow: 0 0 14px rgba(63,160,107,.55); }
/* Geber deutlich sichtbar: kleines goldenes Schild statt winzigem Text. */
.wt-gtag { font-size: 9px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; color: var(--akzent-text); background: var(--akzent); border-radius: 6px; padding: 1px 6px; margin-left: 5px; white-space: nowrap; flex: 0 0 auto; }
.wt-tray { display: flex; align-items: center; justify-content: center; gap: 4px; }
.wt-stein { width: 20px; height: 20px; border-radius: 50%; margin-left: 3px; cursor: pointer;
  background: radial-gradient(circle at 35% 30%, #f7e3a8, #c99a3e); border: 1px solid rgba(0,0,0,.35); box-shadow: 0 1px 2px rgba(0,0,0,.5); }
.wt-stein:first-child { margin-left: 0; }
.wt-karte { width: 22px; height: 31px; border-radius: 5px; margin-left: -15px; position: relative;
  background: linear-gradient(155deg, #5847a6, #2c2158); border: 1.3px solid rgba(255,255,255,.35); box-shadow: 0 2px 5px rgba(0,0,0,.5); }
.wt-karte:first-child { margin-left: 0; }
.wt-karte::after { content: ""; position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; transform: translate(-50%,-50%) rotate(45deg); background: rgba(255,255,255,.5); }
.wt-stack { cursor: pointer; }
.wt-leer { font-size: 10.5px; color: var(--text-muted); }
.wt-tippklein { font-size: 10.5px; color: var(--text-muted); }
.wt-tippklein b { color: var(--akzent); }

.wt-summe { text-align: center; font-size: 14px; color: var(--text-muted); margin-top: 6px; font-weight: 700; }
.wt-summe.wt-ok { color: #54c99a; }
.wt-summe.wt-warn { color: var(--akzent); }
.wt-hinweis { text-align: center; font-size: 11.5px; color: var(--text-muted); margin: 10px 0 0; line-height: 1.5; }
.wt-weiter { display: block; width: 100%; margin: 8px auto 0; }

.wt-spielen { text-align: center; margin: 6px 0; }
.wt-spielen-gross { font-size: 34px; font-weight: 800; font-family: 'Playfair Display', Georgia, serif; }
.wt-spielen-verd { font-size: 14px; margin-top: 4px; }
.wt-verd-viel { color: var(--danger); } .wt-verd-wenig { color: var(--akzent); } .wt-verd-genau { color: #54c99a; }

/* Block */
.wt-block-card { margin-top: 18px; background: var(--flaeche-2); border: 1px solid var(--rand); border-radius: 16px; padding: 12px; }
.wt-block-titel { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); margin: 0 0 8px; }
.wt-block-wrap { overflow-x: auto; scrollbar-width: none; }
.wt-block-wrap::-webkit-scrollbar { display: none; }
table.wt-block { border-collapse: collapse; width: 100%; min-width: 480px; }
table.wt-block td { border-bottom: 1px solid rgba(255,255,255,.08); text-align: center; padding: 6px 4px; }
table.wt-block thead th { padding: 7px 4px; font-size: 13px; font-weight: 800; }
.wt-rnd { width: 30px; color: var(--text-muted); font-weight: 700; }
.wt-grp { border-left: 3px solid var(--gc); }
.wt-geber-mini { font-size: 9px; opacity: .8; }
.wt-zelle { min-width: 62px; }
.wt-ges { font-weight: 800; font-size: 16px; }
.wt-sub { font-size: 10.5px; color: var(--text-muted); margin-top: 1px; }
.wt-ts { color: var(--text-soft); }
.wt-rp { font-weight: 700; } .wt-plus { color: #54c99a; } .wt-minus { color: var(--danger); }
.wt-block-legende { font-size: 11px; color: var(--text-muted); margin: 8px 0 0; }

/* Ende */
.wt-ende { position: relative; overflow: hidden; text-align: center; padding: 14px 8px 4px; }
.wt-ende-titel { font-family: var(--font-titel); font-size: 32px; margin: 0 0 2px; }
.wt-ende-sieger { color: var(--akzent); font-size: 16px; margin: 0 0 18px; }
.wt-podium { display: flex; align-items: flex-end; justify-content: center; gap: 8px; height: 220px; }
.wt-stufe { width: 96px; background: var(--flaeche-2); border: 1px solid var(--rand); border-top: 3px solid var(--pc); border-radius: 12px 12px 0 0;
  display: flex; flex-direction: column; align-items: center; padding: 10px 6px; }
.wt-krone { font-size: 26px; margin-bottom: 4px; } .wt-pn { font-weight: 800; font-size: 14px; } .wt-pp { font-size: 12.5px; color: var(--text-muted); }
.wt-p1 { height: 200px; box-shadow: 0 0 22px rgba(232,180,90,.4); } .wt-p2 { height: 155px; } .wt-p3 { height: 125px; }
.wt-konf { position: absolute; bottom: 110px; width: 9px; height: 14px; opacity: .95; animation: wt-hoch 1.8s ease-out forwards; }
@keyframes wt-hoch { 0% { transform: translate(0,0) rotate(0); opacity: 1; } 100% { transform: translate(var(--dx), -300px) rotate(540deg); opacity: 0; } }
.wt-ende-knoepfe { display: flex; gap: 8px; margin-top: 14px; }
.wt-ende-knoepfe .btn { flex: 1; margin-top: 0; }

/* ==================================================================
   Wizard-Feinschliff: Ergebnis-Markierungen, gekippte Seitennamen,
   mehr Abstand, Block ohne Scrollen.
   ================================================================== */
/* Ergebnis-Karten je Person, INNEN am Tischrand (Richtung kommt vom orient). Das
   Steinchen (Ansage) sitzt MITTIG auf der Karte. Steinchen ohne Karte = angesagt,
   nicht gemacht; Karte ohne Steinchen = mehr gemacht als angesagt. */
.wt-erg { gap: 4px; }
.wt-efeld { position: relative; width: 24px; height: 32px; border-radius: 5px; box-sizing: border-box; cursor: pointer; flex: 0 0 auto; }
.wt-efeld-voll { border: 1px solid rgba(0,0,0,.3); box-shadow: 0 1px 3px rgba(0,0,0,.45); }
.wt-efeld-leer { border: 1.5px dashed rgba(255,255,255,.32); background: rgba(255,255,255,.06); }
.wt-efeld:active { transform: scale(.92); }
.wt-efeld-stein { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); width: 15px; height: 15px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f7e3a8, #c99a3e); border: 1px solid rgba(0,0,0,.4); box-shadow: 0 1px 3px rgba(0,0,0,.55); z-index: 2; }

/* Mehr Abstand oben, Tischhöhe */
.wt-phase { margin-top: 10px; }
.wt-tisch { height: 440px; margin-top: 14px; }
.wt-hinweis { font-size: 11px; }
/* Fuß-Hinweis klein und dezent unten, grau */
.wt-fuss-hinweis { text-align: center; font-size: 11px; color: var(--text-muted); margin: 12px 0 0; line-height: 1.45; }
/* Ergebnis-Hinweis: zwei klare Zeilen (dazu / weg), etwas größer und deutlicher */
.wt-erg-hinweis { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; color: var(--text-soft); }
.wt-erg-hinweis b { color: var(--text); }

/* Der Block: alles auf einen Blick, ohne Scrollbalken */
table.wt-block { min-width: 0; width: 100%; table-layout: fixed; }
table.wt-block thead th { font-size: 12px; padding: 6px 2px; overflow: hidden; text-overflow: ellipsis; }
table.wt-block td { padding: 5px 2px; }
.wt-ges { font-size: 15px; }
.wt-sub { font-size: 10px; }
.wt-rnd { width: 22px; }
.wt-block-wrap { overflow-x: visible; }

/* ==================================================================
   Zugtimer kompakter (2 nebeneinander, passt auf eine Seite)
   ================================================================== */
.zt-board { grid-template-columns: repeat(2, 1fr); gap: 8px; }
.zt-feld { min-height: 74px; padding: 10px 8px; }
.zt-vollbild .zt-feld { min-height: 88px; }
.zt-vollbild .zt-zeit { font-size: 34px; }
.zt-zeit { font-size: 24px; }

/* ==================================================================
   Dunkelmodus: Dialoge dürfen nicht durchschimmern
   ================================================================== */
[data-modus="nacht"] #overlay { background: rgba(4, 3, 12, 0.88); }
[data-modus="nacht"] .dialog { background: #191536; }
[data-modus="nacht"] .werkzeug-vollbild { background: #0e0b22; }

/* Entwickler-Zeile in den Einstellungen */
.set-entwickler { text-align: center; font-size: 12.5px; color: var(--text-muted); margin: 18px 0 4px; }
.set-entwickler .herz { color: #e8b45a; }

/* Datenschutz-Fenster mit X */
.fuss-link-btn { background: none; border: none; color: var(--akzent); text-decoration: underline; cursor: pointer; font-size: 13px; padding: 0; }
.ds-vollbild { display: flex; flex-direction: column; padding: 0; }
.ds-kopf { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; }
.ds-titel { font-weight: 800; font-size: 17px; color: #fff; }
.ds-frame { flex: 1; width: 100%; border: none; background: #fff; }

/* ==================================================================
   Punktezähler kompakter (Karten waren zu hoch) + Farbe je Spieler
   ================================================================== */
.z-liste { gap: 9px; padding: 10px; }
.z-karte { padding: 12px 14px 13px; }
.z-zettel { min-height: 18px; font-size: 15px; gap: 4px 10px; }
.z-summe { font-size: 30px; }
.z-tasten { gap: 6px; margin-top: 8px; }
.z-taste { padding: 9px 0; font-size: 19px; }
.z-kopf { margin-bottom: 3px; }
.z-name { font-size: 24px; }

/* Führenden-Banner oben im Punktezähler (Score-Keeper-Stil) */
/* Dezenter Führt-Hinweis (kein Knopf-Look mehr, kein grelles Gold). */
.z-fuehrer {
  text-align: center; font-size: 13px; font-weight: 500;
  color: var(--text-soft); padding: 8px 14px 2px; margin: 0;
}
.z-fuehr-name { color: var(--akzent); font-weight: 700; }

/* Kopfzeile im Zähler: welche Runde läuft + wer dran ist */
.z-kopfzeile { display: flex; align-items: center; justify-content: center; gap: 6px 18px; flex-wrap: wrap; padding: 12px 14px 2px; }
.z-runde { font-size: 16px; font-weight: 700; color: var(--text); }
.z-dran-hinweis { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; color: var(--text-soft); background: none; border: none; font-family: inherit; cursor: pointer; padding: 4px 6px; border-radius: 10px; }
.z-dran-hinweis:active { background: var(--flaeche-2); }
.z-dran-punkt { width: 13px; height: 13px; border-radius: 50%; display: inline-block; flex: 0 0 auto; box-shadow: 0 0 0 2px var(--flaeche); }

/* Schnell-Tasten oben im Zähler (Zahl antippen = für den, der dran ist, dazuzählen) */
.z-schnell { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; padding: 6px 10px 10px; }
.z-schnell-btn { border: 1px solid var(--rand); background: var(--flaeche-2); color: var(--text); border-radius: 12px; padding: 9px 14px; font-size: 15px; font-weight: 800; font-family: inherit; cursor: pointer; min-width: 50px; }
.z-schnell-btn:active { transform: scale(.94); background: var(--overlay-btn-akt); }
.z-schnell-minus { color: #d98a8a; }

/* Spielerliste-Chips (Wer spielt? + Pool-Verwaltung in den Einstellungen) */
.wer-pool { display: flex; flex-wrap: wrap; gap: 7px; margin: 6px 0 8px; }
.wer-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--rand); background: var(--flaeche-2); color: var(--text); border-radius: 999px; padding: 6px 12px; font-size: 14px; font-family: inherit; cursor: pointer; }
.wer-chip-dot { width: 11px; height: 11px; border-radius: 50%; flex: 0 0 auto; }
.wer-chip-an { background: var(--akzent); color: var(--akzent-text); border-color: transparent; font-weight: 700; }
.wer-chip-pool { cursor: default; }
.wer-chip-x { border: none; background: none; color: inherit; font-size: 15px; line-height: 1; cursor: pointer; padding: 0 0 0 3px; opacity: .6; }
.wer-chip-x:active { opacity: 1; }

/* „Meine Leute": Personen-Karten (Steckbrief) */
.pf-liste { display: flex; flex-direction: column; gap: 7px; margin: 6px 0 10px; }
.pf-karte { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; border: 1px solid var(--rand); background: var(--flaeche-2); color: var(--text); border-radius: 12px; padding: 10px 12px; cursor: pointer; font-family: inherit; }
.pf-karte:active { background: var(--overlay-btn-akt); }
.pf-karte-dot { width: 26px; height: 26px; border-radius: 50%; flex: 0 0 auto; }
.pf-karte-bild { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.pf-karte-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.pf-karte-name { font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-karte-spiele { font-size: 12px; color: var(--text-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-karte-pfeil { color: var(--text-muted); flex: 0 0 auto; font-size: 18px; }
/* Steckbrief-Dialog: Lieblingsspiele scrollen, Knöpfe volle Breite */
.pf-spiele { max-height: 34vh; overflow-y: auto; }
.pf-farbrad { width: 100%; margin: 6px 0 2px; }
.pf-loeschen { width: 100%; margin-top: 14px; }
/* Steckbrief-Profilbild */
.pf-foto { display: flex; align-items: center; gap: 14px; margin: 4px 0 8px; }
.pf-foto-bild { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.pf-foto-platz { width: 64px; height: 64px; border-radius: 50%; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 26px; font-weight: 800; }
.pf-foto-btns { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.pf-foto-btns .btn { width: 100%; }

/* ===== Spiel: 4 in einer Reihe ===== */
.vr-spiel { display: flex; flex-direction: column; min-height: 100%; }
.vr-kopf { display: flex; align-items: center; gap: 8px; padding: 12px 14px; }
.vr-zurueck { background: none; border: none; color: var(--text); font-size: 16px; font-weight: 600; cursor: pointer; padding: 4px; }
.vr-titel { flex: 1; text-align: center; font-size: 16px; font-weight: 600; font-family: 'Playfair Display', Georgia, serif; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vr-regeln { background: none; border: none; font-size: 21px; cursor: pointer; padding: 4px; }
.vr-mitte { flex: 1; width: 100%; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 6px 8px 22px; }
.vr-stand { display: flex; gap: 16px; font-size: 14px; color: var(--text-soft); }
.vr-status { font-size: 16px; font-weight: 700; color: var(--text); min-height: 22px; text-align: center; }
.vr-board { display: grid; gap: 5px; width: 100%; max-width: 460px; background: #2f4a86; border-radius: 14px; padding: 8px; }
/* min-width/height:0 + overflow:hidden = feste Kreisgröße: sonst wächst die Zelle
   beim ersten Stein kurz auf die Emoji-Größe und springt dann zurück. */
.vr-zelle { aspect-ratio: 1; min-width: 0; min-height: 0; overflow: hidden; border: none; border-radius: 50%; background: #e9edf6; display: flex; align-items: center; justify-content: center; font-size: min(9.5vw, 46px); line-height: 1; cursor: pointer; padding: 0; }
.vr-knopf-zeile { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.vr-btn { border: 1px solid var(--rand); background: var(--flaeche-2); color: var(--text); border-radius: 12px; padding: 10px 16px; font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit; }
.vr-btn:active { transform: scale(.97); }
.vr-btn:disabled { opacity: .4; }

/* ===== Spiel: Paare finden ===== */
.pa-spiel { display: flex; flex-direction: column; min-height: 100%; }
.pa-kopf { display: flex; align-items: center; gap: 8px; padding: 12px 14px; }
.pa-zurueck { background: none; border: none; color: var(--text); font-size: 16px; font-weight: 600; cursor: pointer; padding: 4px; }
.pa-titel { flex: 1; text-align: center; font-size: 16px; font-weight: 600; font-family: 'Playfair Display', Georgia, serif; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pa-regeln { background: none; border: none; font-size: 21px; cursor: pointer; padding: 4px; }
.pa-inhalt { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 4px 12px 24px; }
.pa-optionen { display: flex; flex-direction: column; gap: 7px; width: 100%; max-width: 430px; }
.pa-opt-zeile { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pa-opt-label { font-size: 13px; color: var(--text-soft); min-width: 50px; }
.pa-modus-btn, .pa-karten-btn, .pa-level-btn { border: 1px solid var(--rand); background: var(--flaeche-2); color: var(--text); border-radius: 10px; padding: 6px 10px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; }
.pa-modus-btn.aktiv, .pa-karten-btn.aktiv, .pa-level-btn.aktiv { background: var(--akzent); color: var(--akzent-text); border-color: transparent; }
/* Modus nur als Icon; der Text erscheint als dezenter Hinweis daneben. */
.pa-modus-btn { min-width: 42px; font-size: 17px; text-align: center; }
.pa-modus-hinweis { font-size: 12px; color: var(--text-soft); font-style: italic; margin-left: 4px; flex: 1 1 100%; }
.pa-farb-punkt { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; flex: 0 0 auto; }
.pa-farb-punkt.aktiv { border-color: var(--text); }
.pa-status { font-size: 15px; font-weight: 700; color: var(--text); min-height: 20px; text-align: center; }
.pa-spielfeld { display: flex; gap: 8px; width: 100%; justify-content: center; align-items: flex-start; }
.pa-stapel { flex: 0 0 auto; width: 54px; }
/* umbrechen statt abschneiden – sonst ist "Gefunden" im schmalen Stapel weg. */
.pa-stapel-kopf { font-size: 11px; font-weight: 600; line-height: 1.15; color: var(--text-soft); text-align: center; margin-bottom: 4px; white-space: normal; word-break: break-word; }
.pa-chips { display: flex; flex-wrap: wrap; gap: 2px; justify-content: center; }
.pa-chip { font-size: 14px; line-height: 1.2; }
.pa-board { display: grid; gap: 6px; flex: 1; max-width: 340px; }
/* min-width/height:0 + overflow:hidden = feste Zellengröße: ohne das wächst die
   Zelle beim Aufdecken kurz auf die Emoji-Größe (Springen bei 18+ Karten). */
.pa-karte { aspect-ratio: 3/4; min-width: 0; min-height: 0; overflow: hidden; border: none; border-radius: 8px; font-size: min(7.5vw, 30px); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; line-height: 1; }
.pa-karte.offen { background: var(--flaeche-2) !important; color: var(--text); box-shadow: inset 0 0 0 1px var(--rand); }
.pa-karte.pa-leer { background: transparent; box-shadow: inset 0 0 0 1px var(--rand); cursor: default; }

/* ==================================================================
   Farbrad (Spielerfarbe frei wählen)
   ================================================================== */
.fr-dialog { text-align: center; }
.fr-buehne { display: flex; justify-content: center; padding: 10px 0; }
.fr-rad {
  position: relative; width: 220px; height: 220px; border-radius: 50%; cursor: crosshair; touch-action: none;
  background:
    radial-gradient(circle, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0) 62%),
    conic-gradient(from 0deg, hsl(0,90%,58%), hsl(60,90%,58%), hsl(120,90%,58%), hsl(180,90%,58%), hsl(240,90%,58%), hsl(300,90%,58%), hsl(360,90%,58%));
  box-shadow: inset 0 0 0 3px rgba(255,255,255,0.14);
}
.fr-punkt { position: absolute; left: 50%; top: 50%; width: 20px; height: 20px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,0.45); transform: translate(-50%,-50%); pointer-events: none; }
.fr-fuss { display: flex; align-items: center; gap: 10px; justify-content: center; margin: 8px 0; }
.fr-vorschau { width: 42px; height: 42px; border-radius: 12px; border: 2px solid rgba(255,255,255,0.3); flex: 0 0 auto; }
.fr-hinweis { font-size: 12px; color: var(--text-muted); }
.farb-rad-btn { width: 100%; margin-top: 8px; }

/* Spiel zuordnen (Chip + Popup) */
.z-spielchip { display: block; margin: 8px auto 0; border: 1px solid var(--rand); background: var(--flaeche-2); color: var(--text-soft); border-radius: 20px; padding: 7px 16px; font-size: 13px; font-weight: 600; cursor: pointer; }
.z-spielchip:active { background: var(--overlay-btn-akt); }
.z-zuordnen-liste { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; max-height: 42vh; overflow-y: auto; scrollbar-width: none; }
.z-zuordnen-liste::-webkit-scrollbar { display: none; }
.z-zuordnen-eintrag { display: flex; align-items: center; gap: 10px; text-align: left; border: 1px solid var(--rand); background: var(--flaeche-2); color: var(--text); border-radius: 12px; padding: 10px 12px; cursor: pointer; font-size: 14px; }
.z-zuordnen-icon { font-size: 18px; flex-shrink: 0; }
.z-zuordnen-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.z-zuordnen-ziel { font-size: 12px; color: var(--text-muted); flex-shrink: 0; }

/* ============================================================
   Sidebar-Feinschliff: Logo im Kopf, Titel mittig, schlanker
   ============================================================ */
.menue-drawer { width: 68%; max-width: 240px; }
/* Kopf: Logo + „Spielemeisterin" linksbündig, ✕ sitzt in der rechten Ecke
   (rechts genug Reserve, damit der Titel nicht unters ✕ läuft). */
.menue-kopf { position: relative; justify-content: flex-start; padding: 15px 42px 9px 16px; }
.menue-zu { position: absolute; right: 9px; top: 9px; width: 32px; height: 32px; font-size: 14px; }
.menue-marke { display: flex; align-items: center; gap: 7px; min-width: 0; }
.menue-logo-bild { display: inline-flex; flex-shrink: 0; }
.menue-logo-bild svg { display: block; width: 22px; height: 22px; }
.menue-logo { font-size: 15px; white-space: nowrap; }
.menue-eintrag { padding: 10px 14px; font-size: 14.5px; gap: 11px; }
.menue-icon { font-size: 18px; width: 22px; }
.menue-trenner { padding: 12px 14px 3px; }

/* ============================================================
   Auswertung: Reiter Statistik / Historie / Erfolge
   ============================================================ */
.aw-tabs {
  display: flex; gap: 6px; padding: 6px; margin: 6px auto 10px; max-width: 640px;
  background: var(--flaeche-2); border: 1px solid var(--rand); border-radius: 14px;
}
.aw-tab {
  flex: 1; border: none; background: none; color: var(--text-soft);
  padding: 9px 6px; border-radius: 10px; font-size: 13.5px; font-weight: 700;
  cursor: pointer; white-space: nowrap;
}
.aw-tab-aktiv { background: var(--akzent); color: var(--akzent-text); }
.aw-inhalt { max-width: 640px; margin: 0 auto; }

/* ============================================================
   Deine Spiele: Karten pro Spiel + Detail (Board-Game-Stats-Stil)
   ============================================================ */
.sg-raster { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 4px; }
.sg-karte {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  border: 1px solid var(--rand); background: var(--flaeche-2); color: var(--text);
  border-radius: 14px; padding: 11px 13px; cursor: pointer;
}
.sg-karte:active { background: var(--overlay-btn); }
.sg-icon { font-size: 24px; width: 30px; text-align: center; flex-shrink: 0; }
.sg-mitte { flex: 1; min-width: 0; }
.sg-name { font-weight: 700; font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-meta { font-size: 12px; color: var(--text-muted); margin-top: 1px; }
.sg-quote { display: flex; flex-direction: column; align-items: center; line-height: 1.1; flex-shrink: 0; }
.sg-quote-zahl { font-weight: 800; font-size: 17px; color: var(--akzent); }
.sg-quote-label { font-size: 10px; color: var(--text-muted); }
.sg-quote-name { font-size: 12px; color: var(--text-soft); font-weight: 600; max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-pfeil { color: var(--text-muted); font-size: 18px; flex-shrink: 0; }
.sg-detail-sub { text-align: center; color: var(--text-muted); font-size: 13px; margin: 0 0 6px; }
.sg-verlauf { display: flex; flex-direction: column; gap: 6px; }
.sg-verlauf-zeile { display: flex; gap: 10px; align-items: baseline; border-bottom: 1px solid var(--rand); padding-bottom: 6px; }
.sg-verlauf-datum { font-size: 12px; color: var(--text-muted); flex-shrink: 0; min-width: 74px; }
.sg-verlauf-mitte { flex: 1; min-width: 0; }
.sg-verlauf-wer { display: block; font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; }
.sg-verlauf-sieger { display: block; font-size: 12px; color: var(--akzent); font-weight: 600; }

/* ============================================================
   Sterne im „Neues Spiel"-Ablauf + Hinweis „zuletzt gespielt mit"
   ============================================================ */
.gf-sterne { display: inline-flex; gap: 1px; margin-top: 3px; }
.gf-stern { font-size: 14px; color: var(--text-muted); cursor: pointer; line-height: 1; padding: 1px; }
.gf-stern-an { color: #f2c14e; }
.gf-zuletzt-runde {
  font-size: 12.5px; color: var(--text-soft); background: var(--flaeche-2);
  border: 1px solid var(--rand); border-radius: 10px; padding: 8px 10px; margin: 0 0 10px;
}

/* Wizard-Tisch: etwas Luft zwischen Überschrift und oberem Namen. Nicht mehr,
   sonst passt die Karten-Runde bei Piratenstiche nicht mehr ohne Scrollen. */
.wt-dran { margin: 8px 0 4px; }
.wt-tisch { margin-top: 14px; }

/* Seitliche Plätze: Name senkrecht über writing-mode. Die Layout-Box folgt dem
   Text (anders als bei transform:rotate), darum umschließt der grüne Aktiv-Rahmen
   den GANZEN Namen und nichts wird am Bildrand abgeschnitten. Steinchen INNEN. */
.wt-platz-links, .wt-platz-rechts { width: auto; flex-direction: row; align-items: center; gap: 5px; }
.wt-platz-rechts { flex-direction: row-reverse; }
.wt-platz-links .wt-name, .wt-platz-rechts .wt-name {
  writing-mode: vertical-rl; text-orientation: mixed; width: auto; max-width: none; padding: 9px 4px; }
.wt-platz-links .wt-name { transform: rotate(180deg); } /* links: von unten nach oben lesbar */
.wt-platz-links .wt-nm, .wt-platz-rechts .wt-nm { max-width: 118px; }
.wt-platz-links .wt-gtag, .wt-platz-rechts .wt-gtag { margin: 5px 0 0; }
/* Steinchen senkrecht stapeln (Tipps/Spielen) */
.wt-platz-links .wt-tray, .wt-platz-rechts .wt-tray { flex-direction: column; min-height: 0; }
.wt-platz-links .wt-stein, .wt-platz-rechts .wt-stein { margin-left: 0; margin-top: 3px; }
.wt-platz-links .wt-stein:first-child, .wt-platz-rechts .wt-stein:first-child { margin-top: 0; }
/* Ergebnis-Karten an den Seiten: senkrechte Karten-Spalte (Steinchen bleibt oben drauf) */
.wt-platz-links .wt-erg, .wt-platz-rechts .wt-erg { flex-direction: column; align-items: center; max-width: none; gap: 11px; padding-top: 0; }

/* Sitz-Anordnung: Steinchen/Karten liegen IMMER zwischen Name und Tisch (nie außen). */
.wt-platz-oben  { flex-direction: column; }         /* Name oben, Steinchen darunter (zum Tisch) */
.wt-platz-unten { flex-direction: column-reverse; } /* Steinchen oben (zum Tisch), Name darunter */

/* Zahl-Hinweise in der TISCHMITTE (Tipps/Spielen): überboten / noch frei / Summe. */
.wt-mitte-tip { font-size: 10px; color: #cfe6d8; opacity: .75; margin-bottom: 5px; }
.wt-mitte-hint { font-size: 13.5px; font-weight: 800; color: #fff; margin-top: 7px; line-height: 1.25; }
.wt-mitte-hint.wt-mitte-warn { color: var(--akzent); }
.wt-mitte-hint.wt-mitte-ok { color: #7fe0b0; }
.wt-mitte-sub { font-size: 11px; color: #cfe6d8; opacity: .9; margin-top: 3px; }
/* Ergebnisrunde: Karten-Pool in der Mitte (noch offene Stiche der Runde). Eine Karte
   antippen gibt sie dem ausgewählten Spieler. */
.wt-mitte-tip.wt-mitte-warn { color: var(--akzent); }
.wt-mitte-tip.wt-mitte-ok { color: #7fe0b0; }
.wt-mitte-haken { font-size: 24px; color: #7fe0b0; line-height: 1; margin: 2px 0; }
.wt-mitte-pool { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; align-items: center; margin: 5px 0; }
.wt-poolkarte { width: 24px; height: 32px; border-radius: 5px; cursor: pointer; flex: 0 0 auto;
  background: linear-gradient(155deg, #6a6a6a, #3a3a3a); border: 1px solid rgba(255,255,255,.35); box-shadow: 0 1px 3px rgba(0,0,0,.5); }
.wt-poolkarte:active { transform: scale(.92); }
.wt-mitte-wer { font-size: 11px; color: var(--akzent); font-weight: 700; margin-top: 3px; min-height: 14px; }

/* Wizard-Tischmitte: Runde + „zu viel/zu wenig" (Spielen) und Stiche (Ergebnisse) */
.wt-mitte-runde { font-size: 26px; font-weight: 800; color: #fff; font-family: 'Playfair Display', Georgia, serif; line-height: 1.1; }
.wt-mitte-verd { font-size: 12.5px; margin-top: 4px; font-weight: 700; }
.wt-mitte-stiche { color: #fff; }
.wt-mitte-stiche-gross { font-size: 26px; font-weight: 800; font-family: 'Playfair Display', Georgia, serif; line-height: 1.1; }
.wt-mitte-stiche-label { font-size: 11px; color: #cfe6d8; opacity: .9; margin-top: 1px; }
.wt-mitte-ok .wt-mitte-stiche-gross { color: #7fe0b0; }

/* Wizard-Ergebnisse als klare Liste: wer hat was angesagt und ob zu viel */
.wt-erg-liste { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 10px; }
.wt-erg-zeile { border: 1px solid var(--rand); background: var(--flaeche-2); border-radius: 14px; padding: 10px 12px; }
.wt-erg-kopf { display: flex; align-items: center; gap: 8px; }
.wt-erg-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.wt-erg-name { font-weight: 800; font-size: 16px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wt-erg-ansage { font-size: 13px; color: var(--text-soft); font-weight: 700; background: var(--overlay-btn); border-radius: 8px; padding: 2px 8px; flex-shrink: 0; }
.wt-erg-marken { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; min-height: 22px; }
.wt-erg-karte { width: 16px; height: 22px; border-radius: 4px; border: 1px solid rgba(0,0,0,.28); box-shadow: inset 0 -2px 4px rgba(0,0,0,.15); }
.wt-erg-x { width: 20px; height: 22px; display: inline-flex; align-items: center; justify-content: center; color: var(--danger); font-weight: 800; font-size: 18px; }
.wt-erg-null { color: var(--text-muted); }
.wt-erg-fuss { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wt-erg-steuer { display: flex; align-items: center; gap: 8px; }
.wt-erg-btn { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--rand); background: var(--leiste); color: var(--text); font-size: 20px; font-weight: 700; cursor: pointer; flex-shrink: 0; }
.wt-erg-btn:active { transform: scale(.95); }
.wt-erg-zahl { font-size: 12.5px; color: var(--text-soft); min-width: 62px; text-align: center; }
.wt-erg-status { font-size: 13px; font-weight: 700; flex-shrink: 0; }
.wt-erg-gut { color: #2aa36b; }
.wt-erg-daneben { color: var(--danger); }

/* ============================================================
   Punkte zählen NEU — Kacheln, Notizblock, Konfetti, Einstellungen
   ============================================================ */
.z-liste { display: flex; flex-direction: column; gap: 8px; padding: 8px 10px; }
.z-liste.z-zwei { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.z-karte {
  background: var(--flaeche-2); border: none; border-radius: 16px;
  padding: 9px 12px 11px; box-shadow: var(--schatten);
  display: flex; flex-direction: column; gap: 4px;
  position: relative;
}
/* Wanderndes Mikrofon: pulsiert an der Kachel des Spielers, der dran ist */
.z-mic { position: absolute; top: 6px; right: 9px; font-size: 21px; line-height: 1; z-index: 3; animation: z-mic-puls 1.1s ease-in-out infinite; }
@keyframes z-mic-puls { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.2); opacity: .65; } }
/* Gelb umrandet ist, WER DRAN ist (dort steckt das Mikrofon / die nächste Aktion) —
   der Führende bekommt KEINE Umrandung mehr (nur die Krone am Namen). */
.z-karte.z-dran { box-shadow: 0 0 0 4px var(--akzent), var(--schatten); }
.z-name {
  border: none; background: none; padding: 0; color: inherit; cursor: pointer;
  text-align: center; font-size: 16px; font-weight: 800; letter-spacing: -0.01em;
  font-family: 'Arial Narrow', 'Roboto Condensed', system-ui, sans-serif;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.z-name-stift { opacity: .6; font-weight: 400; font-size: .8em; margin-left: 0; }
.z-mitte { display: flex; align-items: center; gap: 10px; }
.z-summe {
  flex: 1; border: none; background: none; color: inherit; cursor: pointer;
  font-family: var(--font-zettel); font-size: 34px; font-weight: 800; line-height: 1;
  text-align: center; font-variant-numeric: tabular-nums;
}
.z-mitte .z-taste {
  width: 46px; height: 46px; flex-shrink: 0; border-radius: 12px;
  border: 2px solid currentColor; background: rgba(255,255,255,.16); color: inherit;
  font-size: 24px; font-weight: 700; cursor: pointer; line-height: 1;
}
.z-mitte .z-taste:active { background: rgba(255,255,255,.34); transform: scale(.95); }
.z-add-spieler {
  border: 1.5px dashed var(--rand); background: transparent; color: var(--text-muted);
  border-radius: 14px; padding: 9px; font-size: 14px; cursor: pointer; width: 100%;
}
.z-add-spieler:active { background: var(--flaeche-2); }
.z-gesamt { text-align: center; color: var(--text-muted); font-size: 12.5px; margin: 8px 0 4px; }

/* Speichern-Knopf, „Wer ist dran"-Wahl und Ziffernblock-Schnellwerte (neu 1.13) */
.z-speichern { display: block; width: 100%; margin: 12px 0 2px; border: 1px solid var(--rand); background: var(--flaeche-2); color: var(--text); border-radius: 14px; padding: 13px; font-size: 16px; font-weight: 700; font-family: inherit; cursor: pointer; }
.z-speichern:active { background: var(--akzent); color: var(--akzent-text); border-color: transparent; transform: scale(.99); }
.z-dranwahl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 6px 0 2px; }
.z-dranwahl-btn { border: none; border-radius: 12px; padding: 15px 10px; font-size: 17px; font-weight: 800; font-family: inherit; cursor: pointer; }
.z-dranwahl-btn:active { transform: scale(.96); }
.zb-schnellreihe { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 2px 0 8px; }
.zb-schnellreihe .zb-schnell { min-width: 52px; padding: 8px 12px; font-size: 15px; font-weight: 800; flex: 0 0 auto; }
.zb-schnell-minus { color: #d98a8a; }

/* Blockansicht — Notizblock: leicht vergilbt, Karopapier, Schatten, Eselsohr, Handschrift */
.z-block { display: flex; justify-content: center; padding: 12px 10px 26px; }
.z-block-blatt {
  position: relative; width: 100%; max-width: 460px; color: #3a3220;
  background-color: #efe6cf;
  background-image:
    linear-gradient(rgba(120,110,80,.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120,110,80,.16) 1px, transparent 1px);
  background-size: 22px 22px;
  border-left: 3px solid #c98b8b; border-radius: 4px 10px 10px 4px;
  box-shadow: 0 12px 26px rgba(0,0,0,.45), 0 3px 0 #d8ccab, 0 6px 0 #cec2a0, 0 8px 0 #c3b892;
  padding: 16px 14px 18px 16px;
  font-family: 'Niconne', 'Bradley Hand', 'Segoe Print', cursive;
}
.z-block-ohr {
  position: absolute; top: 0; right: 0; width: 26px; height: 26px;
  background: linear-gradient(225deg, #e2d8bc 46%, #cfc4a2 48%, #b6ab88 100%);
  border-bottom-left-radius: 12px; box-shadow: -2px 2px 4px rgba(0,0,0,.18);
}
.z-block-kopf, .z-block-zeile { display: flex; align-items: center; gap: 4px; }
.z-block-kopf { border-bottom: 2px solid rgba(90,80,55,.4); padding-bottom: 5px; margin-bottom: 4px; }
.z-block-rnd { width: 30px; flex-shrink: 0; text-align: center; font-weight: 700; color: #7a6a45; font-size: 18px; }
.z-block-name { flex: 1; text-align: center; font-weight: 700; font-size: 21px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.z-block-zeile { padding: 3px 0; border-bottom: 1px dashed rgba(120,110,80,.3); }
.z-block-wert { flex: 1; text-align: center; font-size: 21px; }
.z-block-summe { border-top: 2px solid rgba(90,80,55,.45); border-bottom: none; margin-top: 4px; }
.z-block-summe .z-block-wert { font-weight: 800; font-size: 24px; }
.z-block-leer { text-align: center; color: #8a7c58; padding: 16px 0; font-size: 19px; }
/* Notizblock: Spalte des Spielers, der dran ist (dort wird eingetragen) + Mikrofon */
.z-block-name-dran { background: rgba(232,180,90,.32); border-radius: 7px; padding: 1px 3px; box-shadow: inset 0 0 0 2px var(--akzent); }
.z-block-wert-dran { background: rgba(232,180,90,.14); border-radius: 5px; }
.z-block-mic { font-size: .82em; }

/* Konfetti von unten nach oben (Spielende) */
.konfetti-schicht { position: fixed; inset: 0; pointer-events: none; z-index: 95; overflow: hidden; }
/* Kleiner Puff aus einem Punkt (konfettiPuff) — fliegt sternförmig auseinander */
.konfetti-puff-stueck { position: absolute; width: 7px; height: 10px; border-radius: 2px;
  animation: konf-puff .85s cubic-bezier(.16,.84,.44,1) forwards; }
@keyframes konf-puff {
  0% { transform: translate(-50%,-50%) scale(1) rotate(0deg); opacity: 1; }
  100% { transform: translate(calc(-50% + var(--px)), calc(-50% + var(--py))) scale(.5) rotate(260deg); opacity: 0; }
}
.konfetti-stueck { position: absolute; bottom: -24px; width: 9px; height: 14px; border-radius: 2px; opacity: 0; animation: konf-hoch 2.8s cubic-bezier(.2,.6,.3,1) forwards; }
@keyframes konf-hoch { 0% { transform: translateY(0) translateX(0) rotate(0); opacity: 1; } 100% { transform: translateY(-108vh) translateX(var(--dx)) rotate(760deg); opacity: 0; } }

/* Punkte-zählen-Einstellungen (⚙️) */
.ps-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin: 14px 0 6px; }
.ps-label2 { font-size: 14px; color: var(--text-soft); }
.ps-zeile { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 0; }
.ps-zahl { width: 88px; text-align: center; }
.ps-segment { display: flex; gap: 6px; }
.ps-seg { flex: 1; border: 1px solid var(--rand); background: var(--flaeche-2); color: var(--text-soft); border-radius: 10px; padding: 9px 6px; font-size: 13px; font-weight: 700; cursor: pointer; }
.ps-seg-an { background: var(--akzent); color: var(--akzent-text); border-color: transparent; }
.ps-wer { width: 100%; text-align: left; margin-bottom: 6px; }
.ps-hinweis { font-size: 12px; color: var(--text-muted); margin: 6px 0 0; line-height: 1.4; }
.ps-loeschen { width: 100%; margin-top: 16px; }
.ps-loeschen-optionen { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }

/* Willkommen (erster Start) */
.will-farb-zeile { display: flex; align-items: center; gap: 12px; margin: 12px 0; }
.will-farbe { width: 40px; height: 40px; border-radius: 12px; border: 2px solid var(--rand); flex-shrink: 0; }

/* ============================================================
   Ein-Klick-Update: Zeile in den Einstellungen + Dialog
   ============================================================ */
.set-update-zeile {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 2px 0 12px; padding: 9px 12px;
  border: 1px solid var(--rand); border-radius: 12px; background: var(--flaeche-2);
}
.set-update-version { font-size: 13px; color: var(--text-soft); font-weight: 600; }
.set-update-btn { flex-shrink: 0; }
.update-version { font-weight: 700; color: var(--text); margin: 0 0 6px; }
.update-text { font-size: 13.5px; color: var(--text-soft); margin: 0 0 12px; line-height: 1.5; }
.update-dl { display: block; text-align: center; text-decoration: none; margin: 4px 0; }
.update-hinweis { font-size: 12px; color: var(--text-muted); margin: 12px 0 0; line-height: 1.45; }

/* Update-Banner auf der Startseite */
.start2-update {
  display: flex; align-items: center; gap: 12px; width: 100%;
  margin: 0 0 14px; padding: 11px 14px; text-align: left; cursor: pointer;
  border: 1px solid var(--akzent); border-radius: 14px; background: var(--flaeche-2);
}
.start2-update:active { background: var(--overlay-btn); }
/* Grüner „Update verfügbar"-Banner, wenn online eine neuere Version liegt */
.start2-update-neu { border: 1.5px solid #3fa06b; background: rgba(63,160,107,.15); box-shadow: 0 0 18px rgba(63,160,107,.3); }
.start2-update-neu .start2-update-titel { color: #7fe0b0; }
.start2-update-neu .start2-update-sub { color: #bfeed6; }
.start2-update-neu .start2-update-pfeil { color: #7fe0b0; }
.start2-update-icon { font-size: 20px; flex-shrink: 0; }
.start2-update-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.start2-update-titel { font-weight: 700; font-size: 14.5px; color: var(--text); }
.start2-update-sub { font-size: 12px; color: var(--text-muted); }
.start2-update-pfeil { color: var(--akzent); font-size: 18px; flex-shrink: 0; }

/* Stimmen-Wahl (männlich/weiblich) in den Einstellungen */
.stimme-wahl { display: flex; gap: 8px; }
.stimme-opt {
  flex: 1; border: 1px solid var(--rand); background: var(--flaeche-2); color: var(--text-soft);
  border-radius: 12px; padding: 10px 6px; font-size: 14px; font-weight: 700; cursor: pointer;
}
.stimme-opt:active { transform: scale(.98); }
.stimme-opt-an { background: var(--akzent); color: var(--akzent-text); border-color: transparent; }
.stimme-andere { width: 100%; margin-top: 8px; font-size: 14px; }
/* Echte Stimmen-Liste (alle installierten de-Stimmen antippen + anhören) */
.stimme-liste { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.stimme-eintrag {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 14px; border-radius: 12px; cursor: pointer; font-size: 15px; font-weight: 600;
  text-align: left; border: 1px solid var(--rand); background: var(--flaeche-2); color: var(--text-soft);
}
.stimme-eintrag:active { transform: scale(.99); }
.stimme-eintrag-an { background: var(--akzent); color: var(--akzent-text); border-color: transparent; }
.stimme-eintrag-play { font-size: 13px; opacity: 0.65; white-space: nowrap; font-weight: 500; }
.stimme-eintrag-an .stimme-eintrag-play { opacity: 0.9; }

/* Zugtimer als 2er-Schachuhr — zwei große Felder, das obere um 180° gedreht. */
.su-vollbild .su-board { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 10px 12px; min-height: 0; }
.su-feld {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  border: 2px solid rgba(255,255,255,0.16); border-radius: 20px; background: rgba(255,255,255,0.05);
  color: #f4f2fb; cursor: pointer; padding: 12px; min-height: 0; position: relative;
  transition: background .15s, border-color .15s, transform .05s;
}
.su-feld:first-child { transform: rotate(180deg); }
.su-feld:active { transform: scale(0.99); }
.su-feld:first-child:active { transform: rotate(180deg) scale(0.99); }
.su-name { font-size: 20px; font-weight: 700; opacity: 0.92; }
.su-zeit { font-size: 64px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; color: #fff; }
.su-hint { font-size: 13px; opacity: 0.55; min-height: 16px; }
.su-feld.su-bereit { border-color: var(--sp); }
.su-feld.su-aktiv { background: var(--sp); border-color: var(--sp); color: #12141d; }
.su-feld.su-aktiv .su-zeit, .su-feld.su-aktiv .su-name { color: #12141d; }
.su-feld.su-aktiv .su-hint { color: rgba(0,0,0,0.5); }
.su-feld.su-aus { background: rgba(239,106,106,0.18); border-color: #ef6a6a; }
.su-feld.su-aus .su-zeit { color: #ef8b86; }

/* ==================================================================
   „Wer spielt mit?" — Personen-Auswahl vor der Spielwahl (stammrunde.js)
   Erst Leute wählen (Foto/Initiale, Mehrfachauswahl per Tipp, Gruppen-Chips),
   dann „Weiter" → Spielauswahl. Dunkelmodus-tauglich über die Design-Tokens;
   das Auswahl-Gold (#e0a844) ist bewusst fix. Keine waagerechte Scrollleiste,
   die Liste scrollt senkrecht im Dialog, der Fuß bleibt fest unten.
   ================================================================== */

/* AUFGABE 1c: „Wer spielt mit?" ist ein .dialog (kein werkzeug-vollbild) und hat
   KEINE .dialog-buttons-Leiste — deshalb greift der automatische Fix-Footer aus
   hilfen.js nicht, und das frühere position:sticky am .wm-fuss klebte nicht
   zuverlässig. Lösung: den Dialog selbst zur Flex-Spalte über die volle Höhe machen.
   Titel + Gruppen-Chips stehen fest oben, NUR die Personenliste scrollt, die
   Weiter-Leiste ist ein fixer Fuß unten. */
.wm-dialog {
  display: flex;
  flex-direction: column;
  overflow: hidden;                        /* nur die innere Liste scrollt, nicht der ganze Dialog */
}
.wm-dialog .dialog-titel,
.wm-dialog .wm-chips { flex: 0 0 auto; }    /* Kopf bleibt sichtbar (scrollt nicht mit) */

/* Filter-Chips oben (Alle · je Gruppe · + Gruppe) — waagerecht, umbrechend */
.wm-chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 2px 0 12px; }
.wm-chip {
  border: 1px solid var(--rand); background: var(--flaeche-2); color: var(--text);
  border-radius: 999px; padding: 7px 14px; font-size: 14px; font-weight: 600;
  font-family: inherit; cursor: pointer; white-space: nowrap;
}
.wm-chip:active { transform: scale(.97); }
.wm-chip-an { background: var(--akzent); color: var(--akzent-text); border-color: transparent; font-weight: 800; }
.wm-chip-neu { border-style: dashed; color: var(--text-soft); }

/* Liste der Personen — untereinander, eine Zeile pro Person.
   AUFGABE 1c: die Liste ist der scrollende Bereich (flex:1 1 auto; min-height:0),
   damit der Fuß fest unten bleibt. Scrollbalken bewusst unsichtbar (wie beim Dialog). */
.wm-liste {
  display: flex; flex-direction: column; gap: 8px;
  flex: 1 1 auto; min-height: 0; overflow-y: auto;
  scrollbar-width: none;                   /* Firefox: kein sichtbarer Balken */
}
.wm-liste::-webkit-scrollbar { display: none; } /* Chrome/Safari: kein Balken */
.wm-leer { color: var(--text-soft); font-size: 14.5px; line-height: 1.45; margin: 0 2px 4px; }

.wm-zeile {
  display: flex; align-items: center; gap: 12px; width: 100%;
  text-align: left; font-family: inherit; cursor: pointer;
  border: 2px solid transparent;          /* Platz für die Gold-Umrandung reservieren (kein Springen) */
  background: var(--flaeche-2); color: var(--text);
  border-radius: 14px; padding: 9px 12px;
}
.wm-zeile:active { background: var(--overlay-btn-akt); }
/* Deutliche goldene Umrandung + zarter Gold-Schimmer bei Auswahl */
.wm-zeile-an { border-color: #e0a844; background: color-mix(in srgb, #e0a844 12%, var(--flaeche-2)); }

.wm-foto { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.wm-initial {
  width: 44px; height: 44px; border-radius: 50%; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 19px; font-weight: 800;
}
.wm-zeile-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.wm-name { font-size: 16px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wm-spiele { font-size: 12.5px; color: var(--text-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Häkchen rechts — nur sichtbar, wenn die Zeile gewählt ist */
.wm-check {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #e0a844; color: #3a2a05; font-size: 15px; font-weight: 900;
  opacity: 0; transform: scale(.7); transition: opacity .12s ease, transform .12s ease;
}
.wm-zeile-an .wm-check { opacity: 1; transform: scale(1); }

/* „➕ Neue Person"-Zeile am Ende der Liste (bei leerem Pool prominent) */
.wm-neu {
  display: flex; align-items: center; gap: 10px; width: 100%;
  text-align: left; font-family: inherit; cursor: pointer;
  border: 1px dashed var(--rand); background: none; color: var(--text-soft);
  border-radius: 14px; padding: 11px 12px; font-size: 15px; font-weight: 700;
}
.wm-neu:active { background: var(--overlay-btn); }
.wm-neu-icon {
  width: 32px; height: 32px; border-radius: 50%; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  background: var(--flaeche-2); font-size: 15px;
}
.wm-neu-gross { border-color: var(--akzent); color: var(--text); font-size: 16px; padding: 14px 12px; }

/* Fester Fuß unten: 🎤 links, großer Gold-Knopf rechts. Bleibt beim Scrollen der
   Liste sichtbar.
   AUFGABE 1c: als echtes, nicht schrumpfendes Flex-Kind (flex:0 0 auto) statt
   position:sticky — im Flex-Spalten-Dialog (.wm-dialog) klebt das zuverlässig unten.
   Die negativen Ränder ziehen die Leiste über das 20px-Dialogpolster bis an die
   Kanten (volle Breite, unten bündig). */
.wm-fuss {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 10px;
  background: inherit;                    /* erbt die Dialogfarbe (hell/dunkel) */
  margin: 14px -20px -20px; padding: 12px 20px 20px;
  border-top: 1px solid color-mix(in srgb, currentColor 12%, transparent);
}
.wm-mic {
  flex: 0 0 auto; width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--rand); background: var(--flaeche-2); color: var(--text);
  font-size: 20px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.wm-mic:active { transform: scale(.95); }
/* Der große „Weiter"-Knopf — bewusst festes Gold mit dunkler Schrift */
.wm-weiter {
  flex: 1; min-height: 52px; margin: 0;
  background: #e0a844; color: #3a2a05; font-weight: 800; font-size: 16.5px;
  border-radius: 14px;
}
.wm-weiter:active { background: #d0982f; }
.wm-weiter[disabled] { opacity: .45; }

/* ==================================================================
   „Wer spielt mit?" als EIGENES Fenster (ansicht 'werspielt', in #haupt).
   #haupt hat feste Höhe; .haupt-fest macht es zur Flex-Spalte ohne
   Eigen-Scroll. Nur die Personenliste scrollt, „Weiter" bleibt fixer Fuß.
   Nutzt sonst die vorhandenen .wm-*-Bausteine (Chips, Zeilen, Fuß).
   ================================================================== */
.haupt-fest { display: flex; flex-direction: column; overflow: hidden; }
.ws-seite {
  flex: 1 1 auto; min-height: 0;
  display: flex; flex-direction: column;
  padding: 12px 12px 0;
}
.ws-chips { flex: 0 0 auto; }
.ws-liste { flex: 1 1 auto; min-height: 0; }   /* .wm-liste liefert den Scroll */
/* Fester Footer wie die Kopfzeile: der „Weiter"-Knopf klebt am unteren Rand. */
.ws-fuss {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  background: var(--leiste);
  border-top: 1px solid var(--rand);
}
.ws-fuss > * { max-width: 612px; }
.ws-fuss .wm-weiter { margin-left: auto; margin-right: auto; }
/* Die Liste braucht unten Platz, damit die letzte Zeile nicht hinterm Footer liegt */
.ws-seite .wm-liste { padding-bottom: 84px; }

/* ==================================================================
   „Neue Person"-Dialog (.np-) — EIN Weg: Person anlegen UND gleich
   Gruppen zuordnen (ersetzt die früher getrennten „➕ Neue Person"
   und „+ Gruppe"). Aufbau nach Mockup „Variante A".
   Gold bewusst fest #e0a844; dunkelmodus-tauglich über die vorhandenen
   Farb-Tokens (--flaeche-2, --rand, --text, --text-soft), die
   [data-modus="nacht"] bereits passend umstellt.
   ================================================================== */

/* (1) Kleine erklärende Zeile direkt unter dem Titel */
.np-unterzeile {
  margin: -8px 0 16px;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.4;
}

/* (2) Großes, gut tippbares Namensfeld — erbt .eingabe, nur größer/luftiger.
   Farbe/Hintergrund bleiben bei .eingabe (auch im Nachtmodus), hier nur Größe. */
.np-name {
  font-size: 18px;
  padding: 14px 16px;
  font-weight: 600;
}

/* (3) Chip-Reihe der Gruppen (Mehrfachauswahl), waagerecht umbrechend */
.np-gruppen-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 2px 0 0;
}

/* Ein Gruppen-Chip. 2px transparenter Rand reserviert den Platz für die goldene
   Auswahl-Umrandung (so springt beim Antippen nichts) — gleiches Muster wie .wm-zeile. */
.np-gchip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 2px solid transparent;
  background: var(--flaeche-2);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 14.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.np-gchip:active { transform: scale(.97); }
/* Gewählt: goldene Umrandung (fix #e0a844) + zarter Gold-Schimmer */
.np-gchip-an {
  border-color: #e0a844;
  background: color-mix(in srgb, #e0a844 12%, var(--flaeche-2));
}

/* Häkchen im Chip — nur sichtbar, wenn der Chip gewählt ist */
.np-haken {
  display: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  background: #e0a844;
  color: #3a2a05;
  font-size: 12px;
  font-weight: 900;
}
.np-gchip-an .np-haken { display: inline-flex; }

/* „➕ Neue Gruppe" — gestrichelter Chip, dezent bis zum Aufklappen */
.np-gchip-neu {
  border: 2px dashed var(--rand);
  background: none;
  color: var(--text-soft);
}
.np-gchip-neu-an {
  border-color: #e0a844;
  color: var(--text);
}

/* (3b) Aufklapp-Feld für eine ganz neue Gruppe */
.np-neugruppe { margin: 10px 0 0; }
.np-neugruppe-feld { font-size: 16px; }

/* (4) Kompakte Button-Zeile: schmales „Abbrechen" + breites goldenes „Anlegen".
   Klebt wie .dialog-buttons unten, damit „Anlegen" immer erreichbar bleibt. */
.np-btns {
  display: flex;
  align-items: center;
  gap: 10px;
  position: sticky;
  bottom: 0;
  background: inherit;                    /* erbt die Dialogfarbe (hell/dunkel) */
  margin: 18px -20px -20px;
  padding: 12px 20px 20px;
  border-top: 1px solid color-mix(in srgb, currentColor 12%, transparent);
}
.np-abbrechen {                           /* nur so breit wie nötig */
  flex: 0 0 auto;
  width: auto;
  margin: 0;
}
.np-anlegen {                             /* breit + fest Gold mit dunkler Schrift */
  flex: 1;
  margin: 0;
  min-height: 50px;
  background: #e0a844;
  color: #3a2a05;
  font-weight: 800;
  font-size: 16.5px;
}
.np-anlegen:active { background: #d0982f; }

/* ==================================================================
   Skull King — nur die neuen Teile (Boni-Panel). Tisch, Block und
   Siegertreppe nutzen die vorhandenen Wizard-Klassen (.wt-*, .wz2-*).
   ================================================================== */
.sk-namen-hinweis { font-size: 12.5px; color: var(--text-muted); text-align: center; margin: 4px 0 0; line-height: 1.45; }

/* Kopf-Hinweis über der Boni-Liste */
.sk-boni-tip { text-align: center; font-size: 11.5px; color: var(--text-muted); margin: 2px 0 4px; line-height: 1.35; }

/* Treffer-Marke im Kopf jeder Spielerzeile */
.sk-treffer { font-size: 11px; font-weight: 800; border-radius: 8px; padding: 2px 8px; flex-shrink: 0; white-space: nowrap; }
.sk-hit  { color: #0b3d24; background: #7fe0b0; }
.sk-miss { color: #fff; background: var(--danger); }

/* Ein Bonus je Zeile: Text links, Zähler (+/−) rechts */
.sk-boni-grid { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 2px; }
.sk-bonus { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sk-bonus-txt { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.sk-bonus-name { font-size: 13.5px; font-weight: 700; color: var(--text); }
.sk-bonus-wert { font-size: 11px; font-weight: 800; color: var(--akzent); }

/* „Ansage nicht getroffen" statt Zähler */
.sk-miss-note { font-size: 12.5px; color: var(--text-muted); margin: 8px 0 2px; }

/* Fußzeile der Spielerzeile: Rundenpunkte live */
.sk-rp-zeile { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--rand); font-size: 12.5px; color: var(--text-muted); font-weight: 700; }
.sk-rp { font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; }

/* Bonus-Sternchen im Block */
.sk-bo { color: var(--akzent); font-weight: 700; }

/* „← Stiche korrigieren" etwas kompakter unter dem Haupt-Knopf */
/* Der Korrektur-Knopf darf klein sein — er wird selten gebraucht und die Seite
   soll ohne Scrollen auf den Handy-Schirm passen. */
.sk-zurueck { margin-top: 5px; padding: 8px; font-size: 13px; }

/* ==================================================================
   Piratenstiche — Wert-Karten zuweisen (ersetzt das alte Boni-Panel).
   8 namenlose Karten liegen „auf dem Tisch" und werden per Ziehen
   (Pointer, touch-tauglich) oder Antippen den Spielern gegeben.
   Nur .pk-* ; Referenz sind die .wt-* / .sk-* weiter oben. Dunkelmodus
   ergibt sich automatisch aus den --tokens.
   ================================================================== */

/* Kartenreihe „auf dem Tisch" (bricht auf schmalen Handys auf 2 Reihen um) */
.pk-kartenreihe { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  padding: 2px 2px 12px; }

/* Eine Wert-Karte (Spielkarten-Optik). touch-action:none = eigenes Ziehen statt Scrollen. */
.pk-karte { position: relative; min-width: 54px; height: 66px; flex: 0 0 auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border-radius: 11px; border: 1.5px solid var(--rand); background: var(--leiste);
  color: var(--text); font-weight: 800; font-variant-numeric: tabular-nums;
  cursor: grab; user-select: none; touch-action: none;
  box-shadow: 0 2px 6px rgba(0,0,0,.16); transition: transform .08s, box-shadow .12s; }
.pk-karte:active { cursor: grabbing; }
.pk-karte-wert { font-size: 21px; line-height: 1; }
.pk-karte-tag { font-size: 9px; font-weight: 800; letter-spacing: .05em;
  text-transform: uppercase; margin-top: 3px; }

/* Positive/normale Karten: dezenter Goldrand als „Bonus"-Signal */
.pk-karte:not(.pk-karte-malus) { border-color: color-mix(in srgb, var(--akzent) 55%, var(--rand)); }

/* Malus-Karten −10/−20 = „Wette verloren": rötlich abgesetzt */
.pk-karte-malus { border-color: var(--danger);
  background: color-mix(in srgb, var(--danger) 15%, var(--leiste)); }
.pk-karte-malus .pk-karte-wert, .pk-karte-malus .pk-karte-tag { color: var(--danger); }

/* Gewählte Karte (Tipp-Weg) deutlich hervorheben */
.pk-karte-aktiv { transform: translateY(-4px);
  outline: 3px solid var(--akzent); outline-offset: 1px;
  box-shadow: 0 8px 18px rgba(0,0,0,.28); }

/* Klon, der beim Ziehen am Finger klebt (liegt über allem, fängt keine Events) */
.pk-karte-klon { position: fixed; z-index: 9999; pointer-events: none; margin: 0;
  transform: translate(-50%, -50%) rotate(-5deg); opacity: .96;
  box-shadow: 0 12px 24px rgba(0,0,0,.36); }

/* Spieler-Ablagen (Drop-Ziele) */
.pk-spieler-liste { display: flex; flex-direction: column; gap: 8px; margin: 2px 0 10px; }
.pk-spieler { border: 1.5px solid var(--rand); background: var(--flaeche-2);
  border-radius: 14px; padding: 10px 12px;
  transition: border-color .12s, background .12s, transform .08s; }
.pk-spieler-kopf { display: flex; align-items: center; gap: 8px; }
.pk-spieler-name { font-weight: 800; font-size: 15.5px; flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-summe { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; flex-shrink: 0; }

/* Ziel-Markierung: gestrichelt sobald eine Karte in der Hand/am Finger ist */
.pk-zone-ziel { border-style: dashed; border-color: var(--akzent); }
/* Aktiv überfahrenes Ziel beim Ziehen */
.pk-zone-hover { border-style: solid; border-color: var(--akzent);
  background: color-mix(in srgb, var(--akzent) 16%, var(--flaeche-2)); transform: scale(1.01); }

/* Zugewiesene Karten unter dem Spieler (Tipp entfernt sie) */
.pk-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; min-height: 30px; align-items: center; }
.pk-chips-leer { font-size: 12px; color: var(--text-muted); font-style: italic; }
.pk-chip { display: inline-flex; align-items: center; border: 1.5px solid var(--rand);
  background: var(--leiste); color: var(--text); border-radius: 9px; padding: 4px 9px;
  font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1;
  cursor: pointer; user-select: none; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.pk-chip:active { transform: scale(.93); }
.pk-chip::after { content: '✕'; font-size: 10px; color: var(--text-muted); font-weight: 700; margin-left: 5px; }
.pk-chip-malus { border-color: var(--danger); color: var(--danger);
  background: color-mix(in srgb, var(--danger) 13%, var(--leiste)); }
.pk-chip-malus::after { color: var(--danger); }

/* Block: negative (Malus-)Kartensumme rötlich statt gold */
.pk-bo-minus { color: var(--danger); }
