/* OFFscript – Design-System „Nachtlicht“
   Zwei Themes (dunkel/hell), umschaltbar; ohne Auswahl folgt die App dem System.
   Dunkel ist das Leitdesign: tiefes Grünschwarz, warmes Off-White, ein Signal (Limette).
   Das alte Design (Kobalt/Creme/Terrakotta) liegt unter /archiv/design-kobalt/.
   Kontraste (WCAG AA), gemessen gegen den jeweiligen Hintergrund:
     Text ≥ 12:1 · gedämpfter Text ≥ 7:1 · Akzent als Text ≥ 5:1 · Text auf Akzentfläche ≥ 12:1
   Schriften sind selbst gehostet (fonts/fonts.css). */

:root {
  /* Schrift */
  --font-ui: 'Fira Sans', system-ui, sans-serif;
  --font-text: 'Fira Sans', system-ui, sans-serif;   /* Fragen, Überschriften */
  --font-lese: 'Newsreader', Georgia, serif;                   /* Schreiben, Lesen */
  --font-mono: 'DM Mono', ui-monospace, monospace;             /* Labels */
  --font-brand: 'Unbounded', system-ui, sans-serif;            /* Wortmarke „FF“ */
  --font-script: 'Instrument Serif', Georgia, serif;           /* Wortmarke „script“ */
  --fs-label: 12px;
  --fs-ui: 14px;
  --fs-btn: 17px;
  --fs-form: clamp(22px, 2.4vw, 28px);
  --fs-frage: clamp(34px, 5vw, 64px);
  --fs-display: clamp(52px, 8.5vw, 112px);
  --fs-schreib: clamp(20px, 2.2vw, 23px);
  --lh-frage: 1.05;
  --lh-schreib: 1.75;
  --measure: 720px;

  /* Abstände, Formen */
  --page-x: 44px;
  --r-pill: 999px;
  --r-card: 20px;
  /* Schalter: feine Linie, runder Knopf */
  --switch-w: 80px; --switch-h: 44px; --switch-border: 1.5px; --switch-pad: 7px; --knob: 28px; --knob-travel: 35px;

  /* Bewegung */
  --ease-snap: cubic-bezier(.3,1.5,.5,1);
  --ease-spring: cubic-bezier(.2,1.6,.4,1);
  --ease-swipe: cubic-bezier(.7,0,.3,1);
  --ease-light: cubic-bezier(.7,0,.2,1);

  /* ---------- DUNKEL: Nachtlicht ---------- */
  color-scheme: dark;
  --bg: #0C1210;
  --glow: rgba(198,243,107,.08);
  --bg-img: radial-gradient(900px 600px at 50% 40%, var(--glow), transparent 70%);
  --bg-lese: #0C1210;            /* Fokus, Recherche, Eintrag lesen */
  --text: #E9EFE6;
  --text-dim: #A9B6AD;
  --line: rgba(233,239,230,.18);
  --line-strong: rgba(233,239,230,.38);
  --surface: rgba(233,239,230,.05);
  --surface-2: rgba(233,239,230,.1);
  --accent: #C6F36B;             /* Fläche: Buttons, Knopf, Marker (Limette) */
  --accent-hover: #D3F78A;
  --on-accent: #0C1210;          /* Text auf Akzentfläche */
  --accent-text: #C6F36B;        /* Akzent als Text */
  --warn-text: #FFB59A;
  --focus: #E9EFE6;
  --card: #151E1A;               /* Modus-Karte, Panels */
  --paper: #151E1A;              /* Karten (Archiv, Antworten, Dialoge) */
  --paper-ink: #E9EFE6;
  --paper-dim: #A9B6AD;
  --paper-accent: #C6F36B;
  --paper-line: rgba(233,239,230,.14);
  --shadow-card: 0 10px 30px -18px rgba(0,0,0,.7);
  --shadow-float: 0 30px 60px -28px rgba(0,0,0,.8);
  --week-empty: rgba(233,239,230,.16);
  --knob-on: rgba(233,239,230,.55);
  --switch-line: rgba(233,239,230,.6);
  --regel-bg: #070B09;
  --regel-text: #E9EFE6;
}

/* ---------- HELL: Nachtlicht bei Tag ---------- */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dunkel"]) {
    color-scheme: light;
    --bg: #F4F7EF; --glow: transparent; --bg-img: none; --bg-lese: #FBFCF7;
    --text: #0F1A14; --text-dim: rgba(15,26,20,.74);
    --line: rgba(15,26,20,.16); --line-strong: rgba(15,26,20,.4);
    --surface: rgba(15,26,20,.04); --surface-2: rgba(15,26,20,.08);
    --accent: #C6F36B; --accent-hover: #B8E85A; --accent-text: #3F6B00; --warn-text: #A33A0E; --focus: #0F1A14;
    --card: #FFFFFF; --paper: #FFFFFF; --paper-ink: #0F1A14; --paper-dim: rgba(15,26,20,.74); --paper-accent: #3F6B00;
    --paper-line: rgba(15,26,20,.12);
    --shadow-card: 0 1px 2px rgba(15,26,20,.08), 0 10px 30px -18px rgba(15,26,20,.35);
    --shadow-float: 0 30px 60px -28px rgba(15,26,20,.45);
    --week-empty: rgba(15,26,20,.14); --knob-on: rgba(15,26,20,.45); --switch-line: rgba(15,26,20,.6);
  }
}
:root[data-theme="hell"] {
  color-scheme: light;
  --bg: #F4F7EF; --glow: transparent; --bg-img: none; --bg-lese: #FBFCF7;
  --text: #0F1A14; --text-dim: rgba(15,26,20,.74);
  --line: rgba(15,26,20,.16); --line-strong: rgba(15,26,20,.4);
  --surface: rgba(15,26,20,.04); --surface-2: rgba(15,26,20,.08);
  --accent: #C6F36B; --accent-hover: #B8E85A; --accent-text: #3F6B00; --warn-text: #A33A0E; --focus: #0F1A14;
  --card: #FFFFFF; --paper: #FFFFFF; --paper-ink: #0F1A14; --paper-dim: rgba(15,26,20,.74); --paper-accent: #3F6B00;
  --paper-line: rgba(15,26,20,.12);
  --shadow-card: 0 1px 2px rgba(15,26,20,.08), 0 10px 30px -18px rgba(15,26,20,.35);
  --shadow-float: 0 30px 60px -28px rgba(15,26,20,.45);
  --week-empty: rgba(15,26,20,.14); --knob-on: rgba(15,26,20,.45); --switch-line: rgba(15,26,20,.6);
}

/* ---------- Räume ---------- */
/* Fokus, Recherche, Eintrag: ruhige Lese-Fläche ohne Glow */
body[data-modus="fokus"], body[data-modus="eintrag"], body[data-modus="recherche"] { --bg: var(--bg-lese); --bg-img: none; }


/* ---------- Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); }
html, body { margin: 0; }
body {
  min-height: 100dvh; overflow-x: hidden;
  background-color: var(--bg); background-image: var(--bg-img); background-attachment: fixed;
  color: var(--text); font-family: var(--font-ui); -webkit-font-smoothing: antialiased;
  transition: background-color .5s;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--on-accent); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
kbd { font-family: var(--font-ui); font-size: 10.5px; padding: 2px 7px; border: 1px solid var(--line-strong); border-radius: 5px; }
.label { font-size: var(--fs-label); font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--text-dim); margin: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}

/* ---------- Welche Screens sind sichtbar? (body[data-modus]) ---------- */
#ziehung, #abschluss, .seite { display: none; min-height: 100dvh; flex-direction: column; }
body[data-modus="ziehung"] #ziehung, body[data-modus="regel"] #ziehung,
body[data-modus="fokus"] #ziehung, body[data-modus="recherche"] #ziehung { display: flex; }
body[data-modus="abschluss"] #abschluss { display: flex; }
body[data-modus="archiv"] #archiv, body[data-modus="kalender"] #kalender, body[data-modus="eintrag"] #eintrag,
body[data-modus="spiel"] #spiel, body[data-modus="guide"] #guide, body[data-modus="modi"] #modi,
body[data-modus="einstellungen"] #einstellungen { display: flex; }

/* ---------- Kopfzeile + Wortmarke ---------- */
.kopf { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px var(--page-x) 0; }
.kopf-nav { display: flex; align-items: center; gap: 22px; font-size: var(--fs-ui); font-weight: 500; flex-wrap: wrap; justify-content: flex-end; }
.nav-btn { background: none; border: 0; padding: 6px 2px; color: var(--text); font-size: var(--fs-ui); font-weight: 500; }
.nav-btn:disabled { opacity: .6; }
.nav-btn:hover:not(:disabled) { text-decoration: underline; text-underline-offset: 5px; }
.nav-btn[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.nav-pt { background: transparent; color: var(--text); border: 1px solid var(--line-strong); border-radius: var(--r-pill); padding: 7px 14px;
  font-size: var(--fs-ui); font-weight: 600; white-space: nowrap; }
.nav-pt:hover { background: var(--surface-2); }
.icon-btn { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%;
  border: 1px solid var(--line-strong); background: transparent; color: var(--text); }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg { width: 18px; height: 18px; }

.wortmarke { font-family: var(--font-ui); font-weight: 900; font-size: 24px; letter-spacing: -.01em; color: var(--text);
  text-decoration: none; display: inline-flex; align-items: center; line-height: 1; }
.wortmarke-btn { background: none; border: 0; padding: 0; }
.wm-o { display: inline-flex; align-items: center; width: 1.3em; height: .76em; border: .11em solid currentColor;
  border-radius: 999px; padding: 0 .07em; margin-right: .04em; }
.wm-knob { width: .4em; height: .4em; border-radius: 50%; background: var(--accent); flex: none;
  animation: wm-einrasten 1.2s var(--ease-snap) both; }
@keyframes wm-einrasten {
  0%, 58% { transform: translateX(.54em); background: var(--knob-on); }
  100% { transform: none; background: var(--accent); }
}
.wm-script { font-family: var(--font-text); font-style: italic; font-weight: 400; font-size: 1.08em; margin-left: .14em; letter-spacing: -.01em; }
.pt-marke { margin-left: 12px; margin-right: auto; padding: 5px 12px; border-radius: var(--r-pill); border: 1px solid var(--line-strong);
  font-size: 10px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--accent-text); }

/* Wochen-Pille */
.woche-pille { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: var(--r-pill); padding: 8px 14px; }
.woche-tage { display: flex; gap: 3px; }
.woche-tage i { width: 9px; height: 9px; border-radius: 2px; background: var(--week-empty); box-sizing: border-box; }
.woche-tage i.erledigt { background: var(--accent); }
.woche-tage i.heute { background: transparent; box-shadow: inset 0 0 0 1.5px var(--text); animation: os-pulse 1.6s ease-in-out infinite; }
.woche-text { font-size: var(--fs-ui); font-weight: 500; white-space: nowrap; }
@keyframes os-pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes os-einblenden { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Einstellungs-Panel */
.panel { position: fixed; top: 68px; right: var(--page-x); z-index: 40; width: min(300px, calc(100vw - 32px)); padding: 18px;
  background: var(--paper); color: var(--paper-ink); border-radius: var(--r-card); box-shadow: var(--shadow-float); border: 1px solid var(--paper-line); }
.panel h2 { margin: 0 0 8px; font-size: var(--fs-label); font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--paper-dim); }
.panel-gruppe + .panel-gruppe { margin-top: 18px; }
.panel .chips-zeile { gap: 6px; }
.panel .chip { color: var(--paper-ink); border-color: rgba(29,27,23,.4); }
.panel .chip:hover { background: rgba(29,27,23,.06); }
.panel .chip[aria-pressed="true"] { background: var(--paper-ink); border-color: var(--paper-ink); color: var(--paper); }

/* ---------- Chips, Segment, Select ---------- */
.chips-zeile { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: var(--r-pill);
  border: 1px solid var(--line-strong); background: transparent; color: var(--text); font-size: var(--fs-ui); font-weight: 500; }
.chip:hover:not(:disabled) { background: var(--surface-2); }
.chip[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); font-weight: 600; }
.chip:disabled { opacity: .5; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: none; }
.chip-trenner { width: 1px; height: 20px; background: var(--line); margin: 0 6px; }

/* Welt-Chips und Art-Segment (eine Zeile) */
#welt-chips { margin-top: 26px; padding: 0 var(--page-x); display: flex; flex-wrap: wrap; gap: 6px; row-gap: 8px; justify-content: center; align-items: center; }
.segment { display: flex; padding: 3px; border: 1px solid var(--line-strong); border-radius: var(--r-pill); }
.chip.mini { height: 28px; padding: 0 12px; border: 0; font-size: 11.5px; }
.chip.mini[aria-pressed="true"] { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); }

/* ---------- Bühne ---------- */
.buehne { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: 0 clamp(16px, 7vw, 90px); }
.frage-slot { width: 100%; min-height: 240px; margin-top: 18px; display: flex; align-items: center; justify-content: center; }
.frage, #frage-text { font-family: var(--font-text); font-weight: 400; font-size: var(--fs-frage); line-height: var(--lh-frage);
  letter-spacing: -.015em; text-wrap: balance; max-width: 980px; margin: 0 auto; will-change: transform, filter; }
#frage-text.italic-platzhalter { font-style: italic; color: var(--text-dim); }
#frage-text em { position: relative; z-index: 0; font-style: italic; }
#frage-text em::after { content: ""; position: absolute; left: -.015em; right: -.06em; bottom: .06em; height: .2em; z-index: -1;
  background: var(--accent); opacity: .85; border-radius: 40% 60% 45% 55% / 60% 40% 60% 40%;
  clip-path: inset(0 100% 0 0); transition: clip-path .5s var(--ease-swipe) .15s; }
#ziehung[data-status="fertig"] #frage-text em::after { clip-path: inset(0 0 0 0); }
#form-block { min-height: 150px; margin-top: 22px; display: flex; flex-direction: column; align-items: center; gap: 6px;
  opacity: 0; transform: translateY(6px); transition: opacity .5s .35s, transform .5s .35s; }
#ziehung[data-status="fertig"] #form-block { opacity: 1; transform: none; }
#form-text { margin: 0; min-height: 1.15em; font-family: var(--font-text); font-style: italic; font-size: var(--fs-form); line-height: 1.15; color: var(--accent-text); }
#form-text.wechselt { animation: os-einblenden .45s var(--ease-spring) both; }

.joker-btn { display: inline-flex; align-items: center; gap: 10px; margin-top: 6px; padding: 4px 8px; background: none; border: 0;
  color: var(--text-dim); font-size: 11.5px; font-weight: 500; }
.joker { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 13px; transition: transform .5s var(--ease-spring); }
.joker-btn[aria-disabled="true"] { cursor: default; }
.joker-btn[aria-disabled="true"] .joker { background: transparent; border: 1.5px dashed var(--line-strong); color: var(--text-dim); transform: rotate(-180deg); }
.joker-btn:not([aria-disabled="true"]):hover .joker-text { text-decoration: underline; text-underline-offset: 3px; }

#modus-start { margin-top: 34px; min-height: 150px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 14px; }
.hinweis-taste { margin: 0; font-size: 11px; font-weight: 500; color: var(--text-dim); }
.erststart { margin: 14px 0 0; font-family: var(--font-text); font-style: italic; font-size: 22px; color: var(--text-dim); }

/* ---------- Buttons ---------- */
.gross.drehen, .drehen { height: 58px; padding: 0 44px; border: 0; border-radius: var(--r-pill); background: var(--accent); color: var(--on-accent);
  font-size: var(--fs-btn); font-weight: 600; transition: background .15s, transform .12s; }
.gross.drehen:hover:not(:disabled) { background: var(--accent-hover); }
.gross.drehen:active:not(:disabled) { transform: translateY(1px); }
.gross.drehen:disabled { opacity: .5; }
.btn-ghost { height: 46px; padding: 0 22px; border-radius: var(--r-pill); border: 1px solid var(--line-strong); background: transparent;
  color: var(--text); font-size: var(--fs-ui); font-weight: 500; white-space: nowrap; }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); }
.btn-ghost:disabled { opacity: .5; }
.link { background: none; border: 0; padding: 4px; font-size: 12px; font-weight: 500; color: var(--text-dim);
  text-decoration: underline; text-underline-offset: 4px; }
.link:hover:not(:disabled) { color: var(--text); }

.start-reihe { display: flex; align-items: center; justify-content: center; gap: 44px; flex-wrap: wrap; animation: os-einblenden .5s .5s both; }
.schalter-btn { background: none; border: 0; padding: 0; display: flex; align-items: center; gap: 24px; border-radius: var(--r-pill); font: inherit; color: inherit; text-align: left; cursor: pointer; }
.schalter-text { text-align: left; max-width: 250px; }
.schalter-text strong { display: block; font-size: 17px; font-weight: 700; }
.schalter-text span { font-family: var(--font-text); font-size: 18px; color: var(--text-dim); }
.trenner-v { width: 1px; height: 48px; background: var(--line); }

/* Schalter */
.switch { flex: none; width: var(--switch-w); height: var(--switch-h); border: var(--switch-border) solid var(--text);
  border-radius: var(--r-pill); padding: 0 6px; display: flex; align-items: center; }
.switch .knob { width: var(--knob); height: var(--knob); border-radius: 50%; background: var(--knob-on);
  transform: translateX(var(--knob-travel)); transition: transform .45s var(--ease-snap), background .25s .2s; }
[aria-checked="false"] .switch .knob { transform: none; background: var(--accent); }
.switch.klein { --switch-w: 110px; --switch-h: 60px; --knob: 36px; --knob-travel: 46px; }
.switch.mini { --switch-w: 44px; --switch-h: 26px; --switch-border: 3.5px; --knob: 12px; --knob-travel: 17px; padding: 0 4px; }
.switch.klein .knob, .switch.mini .knob { transform: none; background: var(--accent); }
[aria-checked="true"] .switch.mini .knob { transform: translateX(var(--knob-travel)); background: var(--knob-on); }

/* ---------- A4 · Regel-Vorhang ---------- */
#regel { position: fixed; inset: 0; z-index: 10; background: var(--regel-bg); color: var(--regel-text);
  display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px;
  opacity: 0; visibility: hidden; transition: opacity .5s, visibility 0s .5s; }
body[data-modus="regel"] #regel, body[data-modus="fokus"] #regel, body[data-modus="recherche"] #regel { opacity: 1; visibility: visible; transition: opacity .5s; }
#regel .switch { border-color: var(--regel-text); }
.regel-inhalt { display: flex; flex-direction: column; align-items: center; gap: 40px; }
.regel-zeilen { margin: 0; font-family: var(--font-ui); font-weight: 900; font-size: clamp(30px, 6vw, 60px); line-height: 1.05; letter-spacing: -.015em; }
.regel-zeilen span { display: block; opacity: 0; transform: translateY(14px); }
body[data-modus="regel"] .regel-zeilen span { animation: os-zeile .6s var(--ease-swipe) forwards; }
body[data-modus="regel"] .regel-zeilen span:nth-child(1) { animation-delay: .2s; }
body[data-modus="regel"] .regel-zeilen span:nth-child(2) { animation-delay: .55s; }
body[data-modus="regel"] .regel-zeilen span:nth-child(3) { animation-delay: .9s; }
body[data-modus="fokus"] .regel-zeilen span, body[data-modus="recherche"] .regel-zeilen span { opacity: 1; transform: none; }
@keyframes os-zeile { to { opacity: 1; transform: none; } }
.regel-frage p { margin: 0; font-family: var(--font-text); font-size: 22px; line-height: 1.3; max-width: 640px; text-wrap: balance; }
.regel-frage #regel-frage { color: rgba(241,236,227,.85); }
.regel-frage #regel-form { font-style: italic; color: #E8A77D; margin-top: 4px; }
.regel-los { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.pille-hell { height: 46px; padding: 0 24px; border: 0; border-radius: var(--r-pill); background: #F1ECE3; color: #14171B;
  font-size: var(--fs-ui); font-weight: 600; font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 10px; }
.pille-hell:hover { background: #fff; }
.regel-balken { width: 120px; height: 2px; background: rgba(241,236,227,.25); }
.regel-balken span { display: block; height: 100%; width: 0; background: #D58F5E; }
#regel :focus-visible { outline-color: #F1ECE3; }

/* ---------- Recherche ---------- */
#recherche { position: fixed; inset: 0; z-index: 15; background: var(--bg-lese); color: var(--text); overflow-y: auto;
  display: flex; flex-direction: column; opacity: 0; visibility: hidden; transition: opacity .5s, visibility 0s .5s; }
body[data-modus="recherche"] #recherche { opacity: 1; visibility: visible; transition: opacity .5s; }
.recherche-inhalt { width: 100%; max-width: 760px; margin: 0 auto; padding: 36px var(--page-x) 60px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.recherche-frage { margin: 14px 0 0; font-family: var(--font-text); font-weight: 400; font-size: clamp(28px, 4.4vw, 48px); line-height: 1.1; text-wrap: balance; }
.recherche-frage em { font-style: italic; }
.recherche-form { margin: 6px 0 0; font-family: var(--font-text); font-style: italic; font-size: 24px; color: var(--accent-text); }
.recherche-zeit { margin: 26px 0 0; font-family: var(--font-ui); font-weight: 900; font-size: var(--fs-display); letter-spacing: -.045em; line-height: 1; font-variant-numeric: tabular-nums; }
.recherche-zeit.ende { color: var(--warn-text); }
.recherche-notiz { margin: 8px 0 0; min-height: 1.4em; font-family: var(--font-text); font-style: italic; font-size: 20px; color: var(--text-dim); }
.recherche-dauer { display: inline-flex; gap: 4px; margin-top: 14px; padding: 4px; border: 1px solid var(--line-strong); border-radius: var(--r-pill); }
.recherche-dauer button { height: 34px; padding: 0 14px; border: 0; border-radius: var(--r-pill); background: transparent; font-size: 12px; font-weight: 500; color: var(--text); }
.recherche-dauer button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.notizen-feld { width: 100%; margin-top: 26px; min-height: 28vh; resize: vertical; text-align: left; border: 1px solid var(--line-strong); border-radius: var(--r-card);
  background: var(--surface); padding: 18px 20px; font-family: var(--font-text); font-size: 21px; line-height: 1.5; color: var(--text); caret-color: var(--accent); }
.notizen-feld::placeholder { color: var(--text-dim); }
.recherche-aktionen { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; align-items: center; }

/* ---------- A5 · Fokus ---------- */
#fokus { position: fixed; inset: 0; z-index: 20; background: var(--bg-lese); color: var(--text); display: flex; flex-direction: column;
  clip-path: circle(0% at 50% 50%); visibility: hidden; transition: clip-path .9s var(--ease-light), visibility 0s .9s; }
body[data-modus="fokus"] #fokus { clip-path: circle(150% at 50% 50%); visibility: visible; transition: clip-path .9s var(--ease-light); }
.zeitlinie { position: fixed; top: 0; left: 0; z-index: 2; width: 0; height: 3px; background: var(--accent-text);
  transition: width 1s linear, background .6s, box-shadow .6s; }
.zeitlinie.fluss { height: 4px; box-shadow: 0 0 14px var(--accent); }
.zeitlinie.ende { background: var(--accent); }

.fokus-kopf { display: grid; grid-template-columns: 240px 1fr 240px; gap: 16px; padding: 26px 40px 0; align-items: start; }
.mini-schalter { display: inline-flex; align-items: center; gap: 12px; background: none; border: 0; padding: 0; color: var(--text); text-align: left; }
.mini-schalter-text { font-size: 11px; font-weight: 500; color: var(--text-dim); }
.fokus-mitte { text-align: center; }
.fokus-frage { margin: 0; font-family: var(--font-text); font-size: 21px; line-height: 1.25; color: var(--text-dim); text-wrap: balance; }
.fokus-frage em { font-style: italic; }
.fokus-form { margin: 4px 0 0; font-family: var(--font-text); font-style: italic; font-size: 20px; color: var(--accent-text); }
.fokus-rechts { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.restzeit { margin: 0; font-size: 13px; font-weight: 600; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.timer-wahl { display: inline-flex; gap: 2px; }
.timer-wahl button { border: 0; background: transparent; border-radius: var(--r-pill); padding: 5px 10px; font-size: 11px; font-weight: 500; color: var(--text); }
.timer-wahl button[aria-pressed="true"] { background: var(--surface-2); font-weight: 700; box-shadow: inset 0 0 0 1px var(--line-strong); }
.fokus-notiz { margin: 10px 0 0; min-height: 18px; text-align: center; font-size: 11.5px; font-weight: 500; color: var(--text-dim); }

.fokus-notizen { width: min(var(--measure), calc(100% - 48px)); margin: 8px auto 0; }
.fokus-notizen textarea { width: 100%; min-height: 110px; max-height: 30vh; resize: vertical; border: 1px solid var(--line-strong); border-radius: 14px;
  background: var(--surface); padding: 12px 16px; font-family: var(--font-text); font-size: 18px; line-height: 1.45; color: var(--text); }
.fokus-buehne { flex: 1; min-height: 0; display: flex; justify-content: center; padding: 0 24px; }
.fokus-feld { width: min(var(--measure), 100%); height: 100%; padding-top: 34px; resize: none; border: 0; outline: none; background: transparent;
  font-family: var(--font-text); font-size: var(--fs-schreib); line-height: var(--lh-schreib); color: var(--text); caret-color: var(--accent); }
.fokus-feld::placeholder { color: var(--text-dim); opacity: .8; }

.fokus-fuss { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 18px 40px 26px; }
.ziel { display: flex; align-items: center; gap: 12px; color: var(--accent-text); }
.ziel.erreicht { color: var(--accent-text); }
.ziel.drueber { color: var(--warn-text); }
.ring circle:first-child { stroke: var(--line); }
.ring circle:last-child { transition: stroke-dashoffset .6s var(--ease-swipe); }
.zaehler { margin: 0; font-size: 13px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.zaehler-sub { margin: 2px 0 0; font-size: 11.5px; font-weight: 500; color: var(--text-dim); }
.ziel.drueber .zaehler-sub { color: var(--warn-text); }
.fluss { margin: 0; font-size: 11.5px; font-weight: 600; color: var(--accent-text); text-align: center; min-height: 1.4em; font-variant-numeric: tabular-nums; }
.fluss .punkt { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 6px; animation: os-pulse 1.4s ease-in-out infinite; }
.fluss.ende { font-family: var(--font-text); font-style: italic; font-weight: 400; font-size: 18px; animation: os-einblenden 1.2s both; }
.fertig-btn { justify-self: end; background: none; border: 0; padding: 8px 4px; font-size: 11.5px; font-weight: 600; color: var(--text); }
.fertig-btn:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Toast, Dialog ---------- */
.toast { position: fixed; left: 50%; bottom: 70px; z-index: 50; transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  padding: 12px 22px; border-radius: var(--r-pill); background: #14171B; color: #F1ECE3; font-size: 12px; font-weight: 500;
  border: 1px solid rgba(241,236,227,.2);
  transition: opacity .3s, transform .3s var(--ease-spring); white-space: nowrap; max-width: 92vw; }
.toast.sichtbar { opacity: 1; transform: translate(-50%, 0); }
.toast.mit-aktion { pointer-events: auto; display: flex; align-items: center; gap: 14px; padding-right: 10px; }
.toast button { height: 28px; padding: 0 14px; border-radius: var(--r-pill); border: 0; background: #F1ECE3; color: #14171B; font-size: 11px; font-weight: 600; }

.dialog-hintergrund { position: fixed; inset: 0; z-index: 60; background: rgba(8,10,12,.6); display: flex; align-items: center; justify-content: center; padding: 20px; }
.dialog { background: var(--paper); color: var(--paper-ink); border-radius: var(--r-card); padding: 28px; max-width: 420px; width: 100%; box-shadow: var(--shadow-float); }
.dialog h2 { margin: 0 0 8px; font-family: var(--font-text); font-weight: 400; font-size: 30px; line-height: 1.1; }
.dialog p { margin: 0 0 22px; font-size: 13px; line-height: 1.5; color: var(--paper-dim); }
.dialog-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; }
.dialog-knoepfe button { height: 40px; padding: 0 18px; border-radius: var(--r-pill); border: 1px solid rgba(29,27,23,.4); background: transparent;
  font-size: 12px; font-weight: 500; color: var(--paper-ink); }
.dialog-knoepfe button.primaer { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.dialog :focus-visible, .panel :focus-visible { outline-color: #1D1B17; }

/* ---------- A6 · Abschluss ---------- */
#abschluss { animation: os-einblenden .6s both; }
.abschluss-grid { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 40px; align-items: center; padding: 0 70px 40px 90px; }
.plus-zeile { margin: 12px 0 0; display: flex; align-items: baseline; gap: 22px; flex-wrap: wrap; }
.display { font-family: var(--font-ui); font-weight: 900; font-size: var(--fs-display); line-height: .95; letter-spacing: -.045em; white-space: nowrap;
  display: inline-block; animation: os-plus .9s var(--ease-spring) both; }
@keyframes os-plus { from { opacity: 0; transform: translateY(30px) scale(.94); } to { opacity: 1; transform: none; } }
.fuer-dich { font-family: var(--font-text); font-style: italic; font-size: clamp(30px, 4vw, 50px); }
.gespeichert { margin: 14px 0 0; font-family: var(--font-text); font-size: 24px; color: var(--text-dim); }
.woche-gross { display: flex; gap: 8px; margin-top: 36px; }
.tag { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 11px; font-weight: 600; color: var(--text-dim); }
.tag i { width: 38px; height: 38px; border-radius: 9px; box-sizing: border-box; border: 1.5px solid var(--line-strong); background: transparent; }
.tag.erledigt i { background: var(--accent); border: 0; }
.tag.heute i { border: 2px dashed var(--text); transform: scale(.86); animation: os-pulse 1.4s ease-in-out infinite; }
.tag.heute.rastet i { background: var(--accent); border: 0; transform: scale(1); animation: none; transition: transform .5s var(--ease-spring), background .15s; }
.serie-text { margin: 22px 0 0; font-size: 20px; font-weight: 700; }
.woche-min { margin: 6px 0 0; font-size: 12px; font-weight: 500; color: var(--text-dim); }
.abschluss-aktionen { margin-top: 44px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.pille { height: 54px; padding: 0 26px; border: 0; border-radius: var(--r-pill); background: var(--text); color: var(--bg);
  font-size: var(--fs-ui); font-weight: 600; display: inline-flex; align-items: center; gap: 10px; }
.pille:hover { filter: brightness(1.1); }
.pille[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.pille .raute { border-color: currentColor; transition: transform .5s var(--ease-spring), background .2s; flex: none; }
.pille[aria-pressed="true"] .raute { background: var(--on-accent); border: 0; transform: rotate(90deg) scale(1.1); }
.abschluss-aktionen .btn-ghost { display: inline-flex; align-items: center; gap: 10px; height: 54px; }

.raute { width: 10px; height: 10px; transform: rotate(45deg); border: 1.5px solid var(--paper-dim); display: inline-block; }
.raute.an { background: var(--accent); border: 0; }
.leiter { display: flex; gap: 2px; align-items: flex-end; }
.leiter span { width: 5px; background: rgba(29,27,23,.2); }
.leiter span:nth-child(1) { height: 7px; } .leiter span:nth-child(2) { height: 11px; } .leiter span:nth-child(3) { height: 15px; }
.leiter span.an { background: var(--accent); }
.mini-leiter span { background: var(--line-strong); }
.mini-leiter span.an { background: var(--accent); }

.karte { background: var(--paper); border-radius: var(--r-card); padding: 22px 24px; box-shadow: var(--shadow-card);
  display: flex; flex-direction: column; gap: 10px; color: var(--paper-ink); border: 1px solid var(--paper-line); }
.sammlungs-karte { padding: 24px 26px; gap: 14px; transform: rotate(4deg); box-shadow: var(--shadow-float);
  animation: os-karte .9s .45s var(--ease-spring) both; }
@keyframes os-karte { from { opacity: 0; transform: translateY(160px) rotate(16deg); } to { opacity: 1; transform: rotate(4deg); } }
.karte-kopf { display: flex; align-items: center; justify-content: space-between; font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--paper-dim); }
.karte-leiter { display: flex; align-items: flex-end; gap: 10px; }
.karte-frage { margin: 0; font-family: var(--font-text); font-size: 25px; line-height: 1.15; }
.karte-frage em { font-style: italic; }
.karte-text { margin: 0; font-family: var(--font-text); font-size: 16px; line-height: 1.45; color: var(--paper-dim); }
.karte-form { margin: 0; font-family: var(--font-text); font-style: italic; font-size: 17px; color: var(--paper-accent); }
.karte-fuss { font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--paper-dim); }

/* ---------- Archiv, Kalender, Eintrag ---------- */
.seite-inhalt { width: 100%; max-width: 1100px; margin: 0 auto; padding: 36px var(--page-x) 80px; }
.seiten-titel { margin: 8px 0 24px; font-family: var(--font-text); font-weight: 400; font-size: clamp(36px, 5vw, 56px); line-height: 1.05; letter-spacing: -.015em; }
.suche { width: 100%; max-width: 520px; height: 46px; padding: 0 20px; border-radius: var(--r-pill); border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--text); font-size: 13px; }
.suche::placeholder { color: var(--text-dim); }
.filter-reihe { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.zaehl-text { margin: 22px 0 14px; min-height: 1.2em; font-size: 12px; font-weight: 500; color: var(--text-dim); }
.karten-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.archiv-karte { text-align: left; width: 100%; cursor: pointer; padding: 22px 24px; gap: 12px; font: inherit;
  transition: transform .25s var(--ease-spring), box-shadow .25s; }
.archiv-karte:hover { transform: translateY(-3px); box-shadow: var(--shadow-float); }
.archiv-karte .karte-kopf { gap: 12px; }
.archiv-karte .karte-kopf > span:first-child { display: inline-flex; align-items: center; gap: 6px; }
.archiv-karte .karte-frage { display: block; font-size: 22px; }
.archiv-karte .karte-text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 15px; }
.archiv-karte .karte-fuss { display: block; }
.leer { grid-column: 1 / -1; margin: 40px 0; font-family: var(--font-text); font-size: clamp(26px, 3.4vw, 38px); line-height: 1.2; }
.leer span { font-family: var(--font-ui); font-size: 13px; color: var(--text-dim); }

.kal-zahlen { display: flex; gap: clamp(20px, 5vw, 56px); flex-wrap: wrap; margin-bottom: 36px; }
.kal-zahl strong { display: block; font-family: var(--font-ui); font-weight: 900; font-size: clamp(36px, 5vw, 56px); letter-spacing: -.015em; line-height: 1; }
.kal-zahl span { font-size: 12px; font-weight: 500; color: var(--text-dim); }
.kal-scroll { overflow-x: auto; padding-bottom: 12px; scrollbar-width: thin; }
.kal-monate, .kal-raster { display: grid; grid-template-columns: repeat(53, 16px); gap: 4px; width: max-content; }
.kal-monate span { font-size: 10px; font-weight: 600; letter-spacing: .06em; color: var(--text-dim); white-space: nowrap; height: 18px; }
.kal-raster { grid-template-rows: repeat(7, 16px); grid-auto-flow: column; }
.kal-zelle { width: 16px; height: 16px; padding: 0; border: 0; border-radius: 4px; background: var(--week-empty); }
.kal-zelle.voll { background: var(--accent); }
.kal-zelle.zukunft { background: transparent; box-shadow: inset 0 0 0 1px var(--week-empty); cursor: default; }
.kal-zelle.heute { box-shadow: inset 0 0 0 2px var(--text); }
.kal-zelle.gewaehlt { box-shadow: 0 0 0 2px var(--text); }
.kal-zelle:hover:not(:disabled) { filter: brightness(1.15); }
.kal-hinweis { margin: 28px 0 14px; font-size: 13px; font-weight: 600; }

.eintrag-inhalt { width: 100%; max-width: 720px; margin: 0 auto; padding: 24px var(--page-x) 100px; }
.eintrag-frage { margin: 10px 0 8px; font-family: var(--font-text); font-weight: 400; font-size: clamp(30px, 4.4vw, 46px); line-height: 1.1; letter-spacing: -.015em; text-wrap: balance; }
.eintrag-frage em { font-style: italic; }
.eintrag-form { margin: 0 0 32px; font-family: var(--font-text); font-style: italic; font-size: 24px; color: var(--accent-text); }
.eintrag-text { font-family: var(--font-text); font-size: var(--fs-schreib); line-height: var(--lh-schreib); white-space: pre-wrap; overflow-wrap: anywhere; }
.eintrag-notizen { margin-top: 36px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
.eintrag-notizen p:last-child { margin: 8px 0 0; font-family: var(--font-text); font-size: 19px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-dim); }
.eintrag-feld { width: 100%; min-height: 50vh; resize: vertical; border: 0; outline: none; background: transparent; padding: 0;
  font-family: var(--font-text); font-size: var(--fs-schreib); line-height: var(--lh-schreib); color: var(--text); caret-color: var(--accent); }
.eintrag-zahlen { margin: 28px 0 0; font-size: 12px; font-weight: 500; color: var(--text-dim); }
.eintrag-aktionen { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.edit-knoepfe { display: inline-flex; align-items: center; gap: 12px; }

/* ---------- Playtogether ---------- */
.spiel-inhalt { text-align: center; max-width: 880px; }
.spiel-inhalt.links { text-align: left; }
.spiel-block { margin-top: 28px; text-align: left; }
.spiel-block h2 { margin: 0 0 10px; font-size: var(--fs-label); font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--text-dim); }
.set-karten { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.set-karte { text-align: left; padding: 16px 18px; border-radius: 16px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); }
.set-karte strong { display: block; font-size: 15px; margin-bottom: 4px; }
.set-karte span { font-family: var(--font-text); font-size: 17px; color: var(--text-dim); }
.set-karte:hover { background: var(--surface-2); }
.set-karte[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.set-karte[aria-pressed="true"] span { color: var(--on-accent); }
.set-neu { border-style: dashed; background: transparent; }
.deck-leiste { margin: 12px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: 12px; font-weight: 500; color: var(--text-dim); }
.deck-leiste .link { color: var(--accent-text); }
.deck-trenner { opacity: .5; }
.namen-liste { display: flex; flex-direction: column; gap: 8px; max-width: 420px; }
.name-zeile { display: flex; gap: 8px; align-items: center; }
.name-zeile .suche { max-width: none; flex: 1; }
.spiel-start { margin-top: 36px; display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.dran { margin: 0; font-family: var(--font-ui); font-weight: 900; font-size: clamp(26px, 4vw, 42px); letter-spacing: -.03em; }
.akt-pille { display: inline-block; margin: 6px 0 4px; padding: 5px 14px; border-radius: var(--r-pill); border: 1px solid var(--accent-text);
  font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-text); }
.spiel-frage { margin: 18px auto 0; min-height: 4.5em; }
.spiel-form { margin: 8px 0 0; font-family: var(--font-text); font-style: italic; font-size: clamp(24px, 3vw, 34px); color: var(--accent-text); }
.spiel-aktionen { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; align-items: center; }
.redezeit { margin: 12px 0 0; font-family: var(--font-ui); font-weight: 900; font-size: var(--fs-display); letter-spacing: -.045em; line-height: 1; font-variant-numeric: tabular-nums; color: var(--accent-text); }
.redezeit.ende { color: var(--warn-text); }
.redezeit.klein { font-size: clamp(32px, 5vw, 56px); margin: 6px 0 10px; }
.spiel-hinweis { margin: 14px 0 0; font-family: var(--font-text); font-style: italic; font-size: 22px; color: var(--text-dim); min-height: 1.3em; }
.spiel-hinweis .link { font-family: var(--font-ui); font-style: normal; font-size: 14px; color: var(--accent-text); }
.impuls { margin: 18px auto 0; max-width: 560px; font-family: var(--font-text); font-style: italic; font-size: 28px; line-height: 1.25; color: var(--accent-text); }
.fortschritt-text { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--text-dim); margin: 0 0 8px; }
.spiel-verlauf { list-style: none; margin: 24px 0 0; padding: 0; text-align: left; display: flex; flex-direction: column; gap: 10px; }
.spiel-verlauf li { padding: 14px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); font-family: var(--font-text); font-size: 20px; }
.spiel-verlauf strong { font-family: var(--font-ui); font-size: 12px; margin-right: 8px; color: var(--accent-text); }
.spiel-verlauf li.mit-antworten { display: flex; flex-direction: column; gap: 8px; }
.spiel-verlauf.klein { margin-top: 14px; }
.spiel-verlauf.klein li { padding: 10px 14px; font-size: 17px; }
.ende-frage { font-family: var(--font-ui); font-size: 13px; font-weight: 600; color: var(--accent-text); }
.ende-antwort { font-family: var(--font-text); font-size: 19px; line-height: 1.35; white-space: pre-wrap; overflow-wrap: anywhere; }
.ende-antwort strong { display: inline-block; min-width: 3.2em; margin-right: 6px; font-family: var(--font-ui); font-size: 12px; color: var(--text); }
.deck-feld, .schreib-feld { width: 100%; max-width: 640px; border: 1px solid var(--line-strong); border-radius: 16px; background: var(--surface);
  padding: 18px 20px; font-family: var(--font-text); font-size: 22px; line-height: 1.5; color: var(--text); resize: vertical; caret-color: var(--accent); }
.deck-feld { display: block; font-size: 19px; }
.schreib-feld { display: block; margin: 22px auto 0; min-height: 34vh; font-size: 24px; text-align: left; }
.antwort-karte { margin: 26px auto 0; max-width: 680px; padding: 28px 30px; background: var(--paper); color: var(--paper-ink); border-radius: var(--r-card);
  box-shadow: var(--shadow-card); font-family: var(--font-text); font-size: clamp(22px, 2.6vw, 30px); line-height: 1.4; text-align: left;
  white-space: pre-wrap; overflow-wrap: anywhere; animation: os-einblenden .4s var(--ease-spring) both; }
.aufloesung { margin: 18px 0 0; font-family: var(--font-text); font-size: 24px; color: var(--accent-text); }
.aufloesung strong { font-family: var(--font-ui); font-size: 20px; font-weight: 900; letter-spacing: -.01em; }
.runde-karte { cursor: default; align-items: stretch; }
.runde-karte summary { list-style: none; cursor: pointer; display: flex; flex-direction: column; gap: 12px; }
.runde-karte summary::-webkit-details-marker { display: none; }
.runde-karte:hover { transform: none; }
.runde-karte[open] { grid-column: 1 / -1; }
.runde-karte .spiel-verlauf li { background: transparent; border-color: var(--paper-line); }
.runde-karte .ende-frage, .runde-karte .spiel-verlauf strong { color: var(--paper-accent); }
.runde-karte .ende-antwort strong { color: var(--paper-ink); }
.runde-karte .link { margin-top: 12px; align-self: flex-start; color: var(--paper-dim); }
.pt-mini { padding: 2px 8px; border-radius: var(--r-pill); background: var(--paper-ink); color: var(--paper); font-size: 9px; letter-spacing: .14em; text-transform: uppercase; }

.guide-inhalt { max-width: 760px; }
.guide-lead { font-family: var(--font-text); font-size: 26px; line-height: 1.3; margin: 0 0 24px; }
.guide-inhalt h2 { margin: 40px 0 10px; font-family: var(--font-ui); font-weight: 900; font-size: 21px; letter-spacing: -.01em; color: var(--accent-text); }
.guide-inhalt ul, .guide-inhalt ol { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; font-family: var(--font-text); font-size: 21px; line-height: 1.35; }
.guide-inhalt p { font-family: var(--font-text); font-size: 21px; line-height: 1.35; }
.guide-inhalt strong { font-family: var(--font-ui); font-size: 14px; font-weight: 600; }
.guide-fuss { margin-top: 48px; }

/* ---------- Mobil (ab 375 px) ---------- */
@media (max-width: 760px) {
  :root { --page-x: 16px; }
  .kopf { flex-wrap: wrap; row-gap: 12px; }
  .kopf-nav { gap: 12px; }
  .wortmarke { font-size: 21px; }
  .woche-text { display: none; }
  .panel { top: 120px; }
  .buehne { justify-content: flex-start; padding-top: 20px; }
  .frage-slot { min-height: 190px; }
  #welt-chips { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
  #welt-chips > * { flex: none; }
  #modus-start { margin-top: auto; padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
  .start-reihe { flex-direction: column; gap: 18px; }
  .schalter-text { text-align: center; }
  .trenner-v { display: none; }
  .fokus-kopf { grid-template-columns: 1fr auto; padding: 18px 16px 0; }
  .fokus-mitte { grid-column: 1 / -1; grid-row: 2; }
  .fokus-frage { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
  .fokus-fuss { grid-template-columns: 1fr auto; padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); }
  .fluss { grid-column: 1 / -1; grid-row: 2; text-align: left; }
  .abschluss-grid { grid-template-columns: 1fr; padding: 24px 16px 40px; align-items: start; }
  .sammlung { max-width: 330px; }
}

/* ---------- Modus-Hinweis und Anleitung "Die 6 Modi" ---------- */
#form-hinweis { margin: 0; max-width: 460px; font-size: 13px; line-height: 1.45; color: var(--text-dim); }
.form-aktionen { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 16px; margin-top: 2px; }
.form-aktionen > .link:not(.joker-btn) { color: var(--accent-text); }
.spiel-hinweis-klein { margin: 4px 0 0; font-size: 13px; color: var(--text-dim); }
.spiel-form-hilfe { margin-top: 6px; }
.spiel-form-hilfe .link { color: var(--accent-text); }

.modi-seite { max-width: 820px; }
.modi-lead { margin: 0 0 22px; font-family: var(--font-text); font-size: clamp(22px, 2.6vw, 28px); line-height: 1.3; }
.modi-lead em { font-style: italic; color: var(--accent-text); }
.modi-index { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.modi-liste { display: flex; flex-direction: column; gap: 22px; }
.modus-karte { background: var(--paper); color: var(--paper-ink); border: 1px solid var(--paper-line); border-radius: var(--r-card);
  padding: 26px 28px; box-shadow: var(--shadow-card); scroll-margin-top: 20px; }
.modus-karte:focus-visible { outline: 3px solid var(--paper-ink); outline-offset: 3px; }
.modus-kopf { display: flex; align-items: center; gap: 14px; }
.modus-kopf h2 { margin: 0; font-family: var(--font-text); font-weight: 400; font-size: clamp(28px, 3.6vw, 38px); line-height: 1.1; }
.modus-nr { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--on-accent);
  display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; }
.modus-hinweis { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 12px 0 0; font-size: 13px; color: var(--paper-dim); }
.modus-hinweis strong { font-weight: 600; color: var(--paper-ink); }
.modus-karte h3 { margin: 20px 0 6px; font-size: var(--fs-label); font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--paper-accent); }
.modus-text, .modus-schritte { margin: 0; font-family: var(--font-text); font-size: 21px; line-height: 1.35; }
.modus-schritte { padding-left: 22px; display: flex; flex-direction: column; gap: 4px; }
.modus-bsp-frage { margin: 0 0 8px; font-family: var(--font-text); font-style: italic; font-size: 19px; color: var(--paper-dim); }
.modus-bsp-frage span { font-family: var(--font-ui); font-style: normal; font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; margin-right: 6px; }
.modus-beispiel { margin: 0; padding: 14px 18px; border-left: 3px solid var(--accent); background: rgba(31,37,71,.05); border-radius: 0 12px 12px 0;
  font-family: var(--font-text); font-size: 20px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.modus-tipp { margin: 16px 0 0; font-size: 13px; line-height: 1.5; color: var(--paper-dim); }
.modus-tipp strong { color: var(--paper-ink); font-weight: 600; }

/* ---------- Einstellungen: Fragen, Backup ---------- */
.panel-link { width: 100%; text-align: left; padding: 10px 14px; border-radius: 12px; border: 1px solid rgba(31,37,71,.35); background: transparent;
  font-size: 12px; font-weight: 600; color: var(--paper-ink); }
.panel-link:hover { background: rgba(31,37,71,.06); }
.einst-seite { max-width: 820px; }
.einst-block { margin-top: 34px; padding-top: 26px; border-top: 1px solid var(--line); }
.einst-block:first-of-type { border-top: 0; padding-top: 0; margin-top: 8px; }
.einst-block h2 { margin: 0 0 8px; font-family: var(--font-ui); font-weight: 900; font-size: 20px; letter-spacing: -.01em; }
.einst-block h3 { margin: 24px 0 6px; font-size: var(--fs-label); font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--text-dim); }
.einst-block > p { margin: 0 0 14px; font-family: var(--font-text); font-size: 20px; line-height: 1.35; max-width: 640px; }
.einst-hinweis { color: var(--text-dim); }
.einst-ok { color: var(--accent-text); font-weight: 600; }
.einst-knoepfe { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.pille.klein { height: 44px; padding: 0 20px; }
.frage-neu { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 4px 0 18px; }
.frage-neu .suche { flex: 1 1 260px; max-width: none; }
.welt-wahl { height: 46px; padding: 0 14px; border-radius: var(--r-pill); border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font-size: 13px; }
.welt-wahl option { color: #1F2547; background: #FBF8F2; }
.frage-gruppen { display: flex; flex-direction: column; gap: 8px; }
.frage-gruppe { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.frage-gruppe summary { display: flex; align-items: center; gap: 10px; padding: 14px 18px; cursor: pointer; font-size: 13px; font-weight: 600; list-style: none; }
.frage-gruppe summary::-webkit-details-marker { display: none; }
.frage-gruppe summary::after { content: "+"; margin-left: 10px; color: var(--text-dim); }
.frage-gruppe[open] summary::after { content: "–"; }
.frage-zahl { margin-left: auto; font-weight: 500; font-size: 12px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.frage-liste { list-style: none; margin: 0; padding: 0 18px 12px; display: flex; flex-direction: column; }
.frage-zeile { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 0; border-top: 1px solid var(--line); }
.frage-zeile.aus .frage-text { color: var(--text-dim); text-decoration: line-through; }
.frage-check { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; flex: 1; }
.frage-check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent-text); flex: none; }
.frage-text { font-family: var(--font-text); font-size: 19px; line-height: 1.3; }
.frage-knoepfe { display: flex; gap: 6px; flex: none; }
.frage-zeile.bearbeiten { flex-wrap: wrap; }
.frage-zeile.bearbeiten .suche { flex: 1 1 260px; max-width: none; }

.panel-link-a { display: block; margin-top: 8px; text-decoration: none; }


/* =====================================================================
   Responsive-Feinschliff: Handy, Tablet, Querformat, Touch
   ===================================================================== */

/* Kopfzeile: Logo links, Navigation und Extras rechts (Desktop) */
.kopf-extras { display: flex; align-items: center; gap: 14px; }
.kopf > .wortmarke:has(~ .kopf-extras) { margin-right: auto; }
.form-hint { display: block; margin-top: 6px; font-family: var(--font-ui); font-style: normal; font-size: 12px; font-weight: 500; color: rgba(241,236,226,.8); }
.fokus-form .form-hint { display: inline; margin: 0; font-size: inherit; font-family: inherit; font-style: inherit; color: var(--text-dim); }
.woche-gross { display: grid; grid-template-columns: repeat(7, minmax(0, 38px)); gap: 8px; }
.tag i { width: 100%; aspect-ratio: 1; height: auto; }
#fokus { bottom: auto; height: var(--vvh, 100dvh); }
#recherche { bottom: auto; height: var(--vvh, 100dvh); }

/* Tablet und schmale Laptops */
@media (max-width: 1000px) {
  :root { --page-x: 28px; }
  .woche-text { display: none; }
  .kopf-nav { gap: 16px; flex-wrap: nowrap; }
  .kopf-extras { gap: 10px; }
  .abschluss-grid { grid-template-columns: 1fr; gap: 32px; padding: 24px clamp(16px, 5vw, 60px) 48px; align-items: start; }
  .sammlung { max-width: 340px; }
  .fokus-kopf { grid-template-columns: 1fr auto; padding: 18px 20px 0; }
  .fokus-mitte { grid-column: 1 / -1; grid-row: 2; }
  .fokus-fuss { padding-left: 20px; padding-right: 20px; }
  .buehne { padding-left: clamp(16px, 5vw, 60px); padding-right: clamp(16px, 5vw, 60px); }
}

/* Handy */
@media (max-width: 760px) {
  /* Kopfzeile mit langer Navigation: Zeile 1 Logo und Extras, Zeile 2 Navigation (seitlich wischbar) */
  .kopf-scroll { display: grid; grid-template-columns: 1fr auto; align-items: center; row-gap: 8px; column-gap: 12px; padding-top: 16px; }
  .kopf-scroll > .wortmarke, .kopf-scroll > .wortmarke-btn { grid-column: 1; grid-row: 1; margin-right: 0; }
  .kopf-scroll > .kopf-extras, .kopf-scroll > .pt-marke { grid-column: 2; grid-row: 1; margin: 0; }
  .kopf-scroll > .kopf-nav { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; flex-wrap: nowrap; gap: 4px 18px;
    overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--page-x)); padding: 0 var(--page-x) 2px;
    -webkit-mask-image: linear-gradient(to right, #000 90%, transparent); mask-image: linear-gradient(to right, #000 90%, transparent); }
  .kopf-scroll > .kopf-nav::-webkit-scrollbar { display: none; }
  .kopf-nav > * { flex: none; }
  .kopf-extras { gap: 8px; }
  .woche-pille { padding: 6px 10px; }
  #welt-chips { -webkit-mask-image: linear-gradient(to right, #000 88%, transparent); mask-image: linear-gradient(to right, #000 88%, transparent); padding-right: 40px; }
  .filter-reihe .chips-zeile { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--page-x)); padding: 0 var(--page-x) 4px;
    -webkit-mask-image: linear-gradient(to right, #000 90%, transparent); mask-image: linear-gradient(to right, #000 90%, transparent); }
  .filter-reihe .chips-zeile::-webkit-scrollbar, #welt-chips::-webkit-scrollbar { display: none; }
  .filter-reihe .chip { flex: none; }
  .modi-index { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--page-x)) 24px; padding: 0 var(--page-x) 4px; }
  .modi-index .chip { flex: none; }
  /* iOS zoomt in Felder unter 16 px hinein */
  .suche, .welt-wahl, .name-zeile input, #frage-edit { font-size: 16px; }
  .fokus-form .form-hint { display: none; }
  .start-reihe { margin-top: 8px; }
  .frage-slot { min-height: 150px; }
  #form-block { min-height: 130px; }
  .panel { left: 16px; right: 16px; width: auto; top: 104px; }
  .karten-liste { grid-template-columns: 1fr; }
  .set-karten { grid-template-columns: 1fr; }
  .modus-karte { padding: 22px 18px; }
  .abschluss-aktionen .pille, .abschluss-aktionen .btn-ghost { width: 100%; justify-content: center; }
  .eintrag-aktionen > * { flex: 1 1 auto; }
  .frage-neu .welt-wahl { width: 100%; }
  .spiel-aktionen .gross, .spiel-aktionen .btn-ghost { width: 100%; }
  .toast { bottom: calc(24px + env(safe-area-inset-bottom)); white-space: normal; text-align: center; width: max-content; }
}

/* Kleine Handys (320 px) */
@media (max-width: 360px) {
  :root { --page-x: 14px; }
  .segment .chip.mini { padding: 0 9px; }
  .gross.drehen { padding: 0 28px; }
  .display { font-size: 48px; }
  .switch { --switch-w: 112px; --switch-h: 62px; --knob: 38px; --knob-travel: 48px; }
}

/* Touch: größere Tippflächen (mindestens ca. 44 px) */
@media (pointer: coarse) {
  .chip { min-height: 40px; }
  .chip.mini { min-height: 36px; }
  .icon-btn { width: 44px; height: 44px; }
  .nav-btn { min-height: 44px; }
  .nav-pt { min-height: 40px; }
  .link { padding: 12px 8px; }
  .timer-wahl button, .recherche-dauer button { min-height: 40px; padding-left: 14px; padding-right: 14px; }
  .joker-btn, .fertig-btn, .mini-schalter { min-height: 44px; }
  .btn-ghost, .pille { min-height: 48px; }
  .panel-link { padding: 14px; }
  .kal-monate, .kal-raster { grid-template-columns: repeat(53, 20px); }
  .kal-raster { grid-template-rows: repeat(7, 20px); }
  .kal-zelle { width: 20px; height: 20px; }
  .nur-tastatur, .hinweis-taste kbd, .hinweis-taste { display: none; }
}

/* Niedrige Fenster, zum Beispiel Handy im Querformat */
@media (max-height: 520px) {
  #welt-chips { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; scrollbar-width: none; margin-top: 12px; padding-bottom: 4px; }
  #welt-chips > * { flex: none; }
  #welt-chips::-webkit-scrollbar { display: none; }
  .frage-slot { min-height: 0; margin-top: 8px; }
  #form-block { min-height: 0; margin-top: 10px; }
  #modus-start { min-height: 0; margin-top: 14px; }
  .buehne { justify-content: flex-start; padding-top: 8px; padding-bottom: 20px; }
  #regel { overflow-y: auto; align-items: flex-start; padding: 12px; }
  .regel-inhalt { margin: auto; gap: 14px; }
  .regel-zeilen { font-size: clamp(22px, 9vh, 40px); }
  .regel-frage p { font-size: 17px; }
  .fokus-kopf { padding-top: 10px; gap: 8px; }
  .fokus-frage { font-size: 17px; }
  .fokus-feld { padding-top: 10px; }
  .fokus-fuss { padding-top: 8px; padding-bottom: 8px; }
  .recherche-inhalt { padding-top: 14px; gap: 4px; }
  .recherche-zeit { font-size: 56px; margin-top: 6px; }
  .recherche-frage { font-size: 26px; }
  .notizen-feld { min-height: 120px; margin-top: 12px; }
  .display { font-size: 60px; }
  .abschluss-aktionen { margin-top: 18px; }
  .woche-gross { margin-top: 18px; }
  .seiten-titel { margin-bottom: 12px; }
  .redezeit { font-size: 64px; }
}


/* ---------- Playtogether: Kartenspiel ---------- */
.spiel-inhalt .fortschritt-text { margin-bottom: 6px; }
.punkte-leiste { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.punkte-leiste li { padding: 5px 12px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); font-size: 12px; font-variant-numeric: tabular-nums; }
.punkte-leiste li strong { font-weight: 700; margin-right: 6px; }
.punkte-leiste li.aktiv { border-color: var(--accent-text); box-shadow: inset 0 0 0 1px var(--accent-text); }
.punkte-leiste li.team-0, .team-wahl.team-0 { border-color: #3C4B94; }
.punkte-leiste li.team-1, .team-wahl.team-1 { border-color: #C96B3E; }
.typ-badge { display: inline-block; margin: 0 0 8px; padding: 6px 16px; border-radius: var(--r-pill); background: var(--accent-text); color: var(--bg); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.rampenlicht { margin: 0 0 6px; font-size: 13px; color: var(--text-dim); }
.rampenlicht strong { color: var(--text); font-size: 15px; }
.regel-box { margin: 20px auto 0; max-width: 560px; padding: 14px 18px; border-left: 3px solid var(--accent); background: var(--surface); border-radius: 0 12px 12px 0; text-align: left;
  font-family: var(--font-text); font-size: 20px; line-height: 1.35; }
.spiel-frage.klein { font-size: clamp(24px, 3vw, 36px); min-height: 0; margin-top: 8px; }
.dran-titel { margin: 16px auto 0; max-width: 680px; font-family: var(--font-ui); font-weight: 900; font-size: clamp(24px, 3.6vw, 38px); letter-spacing: -.03em; line-height: 1.1; text-wrap: balance; }
.titel-text { margin: 12px auto 0; max-width: 620px; font-family: var(--font-text); font-style: italic; font-size: clamp(24px, 3vw, 34px); color: var(--accent-text); }
.wahl-duell { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 22px auto 0; max-width: 680px; }
.wahl-seite { padding: 18px 16px; border: 1px solid var(--line-strong); border-radius: var(--r-card); background: var(--surface); font-family: var(--font-text); font-size: 22px; line-height: 1.25; }
.wahl-seite span { display: block; margin-bottom: 6px; font-family: var(--font-ui); font-weight: 900; font-size: 26px; color: var(--accent-text); }
.optionen-liste { list-style: none; margin: 20px auto 0; padding: 0; max-width: 560px; display: flex; flex-direction: column; gap: 8px; text-align: left; }
.optionen-liste li { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface); font-family: var(--font-text); font-size: 21px; }
.optionen-liste li span, .opt-knopf span, .loesung span { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-ui); font-weight: 700; font-size: 14px; }
.opt-wahl { display: flex; flex-direction: column; gap: 10px; margin: 24px auto 0; max-width: 560px; }
.opt-knopf { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border: 1px solid var(--line-strong); border-radius: 16px; background: var(--surface); text-align: left; font-family: var(--font-text); font-size: 22px; color: var(--text); min-height: 64px; }
.opt-knopf:hover { background: var(--surface-2); }
.loesung { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 22px auto 0; padding: 22px; max-width: 600px; border-radius: var(--r-card); background: var(--paper); color: var(--paper-ink); box-shadow: var(--shadow-card);
  font-family: var(--font-text); font-size: 28px; line-height: 1.2; }
.countdown { margin: 40px 0 6px; font-family: var(--font-ui); font-weight: 900; font-size: clamp(110px, 24vw, 220px); letter-spacing: -.06em; line-height: 1; color: var(--accent-text); font-variant-numeric: tabular-nums; animation: os-einblenden .25s both; }
.countdown.zeigt { font-size: clamp(64px, 14vw, 150px); color: var(--text); }
.stepper { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 26px auto 0; }
.stepper-knopf { width: 64px; height: 64px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); font-size: 30px; line-height: 1; color: var(--text); }
.stepper-knopf:hover { background: var(--surface-2); }
.stepper-werte { display: flex; gap: 14px; }
.stepper-werte div { min-width: 120px; padding: 16px 12px; border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--line); }
.stepper-werte strong { display: block; font-family: var(--font-ui); font-weight: 900; font-size: 52px; letter-spacing: -.015em; line-height: 1; font-variant-numeric: tabular-nums; }
.stepper-werte span { display: block; margin-top: 6px; font-size: 12px; font-weight: 600; color: var(--text-dim); }
.spieler-wahl { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 26px auto 0; max-width: 640px; }
.gross-chip { height: auto; min-height: 56px; padding: 10px 26px; font-size: 16px; }
.weise-text { margin: 10px 0 0; font-family: var(--font-text); font-size: 20px; color: var(--text-dim); }
.weise-text.warn { color: var(--warn-text); }
.team-wahl { height: 34px; flex: none; }
.name-zeile .team-wahl { border-width: 2px; }
details.mehr summary { cursor: pointer; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--text-dim); padding: 6px 0; }
details.mehr h2 { margin-top: 14px; }
.deck-hilfe { margin-top: 12px; font-size: 13px; }
.deck-hilfe summary { cursor: pointer; font-weight: 600; color: var(--accent-text); }
.deck-hilfe code { font-size: 12px; padding: 1px 6px; border-radius: 6px; background: var(--surface-2); }
.deck-hilfe ul { padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.deck-hilfe p { font-family: var(--font-text); font-size: 18px; }
.ende-zahl { margin: 14px 0 0; font-family: var(--font-ui); font-weight: 900; font-size: clamp(64px, 12vw, 120px); letter-spacing: -.05em; line-height: 1; color: var(--accent-text); }
.ende-zahl span { display: block; margin-top: 8px; font-family: var(--font-text); font-weight: 400; font-size: 24px; letter-spacing: 0; color: var(--text); }
.team-ergebnis { display: flex; justify-content: center; gap: 18px; margin-top: 16px; }
.team-ergebnis div { min-width: 140px; padding: 20px; border-radius: var(--r-card); background: var(--surface); border: 2px solid var(--line); }
.team-ergebnis .team-0 { border-color: #3C4B94; } .team-ergebnis .team-1 { border-color: #C96B3E; }
.team-ergebnis strong { display: block; font-family: var(--font-ui); font-weight: 900; font-size: 64px; letter-spacing: -.015em; line-height: 1; }
.team-ergebnis span { font-size: 12px; font-weight: 600; color: var(--text-dim); }
.rang-liste { list-style: none; margin: 18px auto 0; padding: 0; max-width: 460px; display: flex; flex-direction: column; gap: 8px; }
.rang-liste li { display: flex; justify-content: space-between; padding: 14px 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); font-size: 16px; }
.rang-liste li.sieger { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.rang-liste span { font-variant-numeric: tabular-nums; }
.ende-unter { margin: 34px 0 10px; font-size: var(--fs-label); font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--text-dim); }
.titel-liste { list-style: none; margin: 0 auto; padding: 0; max-width: 620px; text-align: left; display: flex; flex-direction: column; gap: 6px; font-family: var(--font-text); font-size: 19px; }
.titel-liste strong { font-family: var(--font-ui); font-size: 13px; margin-right: 8px; color: var(--accent-text); }
.fav-liste { display: flex; flex-direction: column; gap: 8px; max-width: 640px; margin: 0 auto; }
.fav-karte { text-align: left; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); font-family: var(--font-text); font-size: 19px; color: var(--text); }
.fav-karte span { display: block; font-family: var(--font-ui); font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 2px; }
.fav-karte[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.fav-karte[aria-pressed="true"] span { color: var(--on-accent); }
@media (max-width: 760px) {
  .wahl-duell { grid-template-columns: 1fr; }
  .stepper-werte div { min-width: 92px; }
  .stepper-werte strong { font-size: 40px; }
  .stepper-knopf { width: 56px; height: 56px; }
  .countdown { margin-top: 24px; }
  .regel-box { font-size: 19px; }
}
@media (max-height: 520px) { .countdown { font-size: 90px; margin-top: 8px; } }

.spiel-inhalt .spiel-frage { min-height: 2.4em; }
.spiel-inhalt .spiel-frage.klein { min-height: 0; }


/* ---------- Playtogether: Funken-Leiste zum Antippen, Zweier-Timer ---------- */
.punkte-leiste { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; margin: 0 0 14px; padding: 0; }
.punkt-knopf { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 8px 6px 16px; border-radius: var(--r-pill); border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--text); font-size: 13px; transition: background .15s, transform .12s; }
.punkt-knopf:hover { background: var(--surface-2); }
.punkt-knopf:active { transform: scale(.97); }
.punkt-knopf strong { font-weight: 700; }
.punkt-knopf span { font-variant-numeric: tabular-nums; font-weight: 600; min-width: 1ch; }
.punkt-knopf i { font-style: normal; display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; border-radius: 50%;
  background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 16px; line-height: 1; }
.punkt-knopf.aktiv { border-color: var(--accent-text); box-shadow: inset 0 0 0 1px var(--accent-text); }
.punkt-knopf.team-0 { border-color: #3C4B94; border-width: 2px; }
.punkt-knopf.team-1 { border-color: #C96B3E; border-width: 2px; }
.punkt-undo { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-strong); background: transparent; color: var(--text); font-size: 18px; }
.punkt-undo:hover { background: var(--surface-2); }
.regel-box p { margin: 0; }
.regel-box p + p { margin-top: 10px; }
.funke-regel { font-family: var(--font-ui); font-size: 12.5px !important; font-weight: 600; line-height: 1.45; color: var(--accent-text); }
.jetzt { margin: 16px 0 0; font-family: var(--font-ui); font-weight: 900; font-size: clamp(28px, 5vw, 44px); letter-spacing: -.03em; line-height: 1.1; }
.segmente { list-style: none; display: flex; justify-content: center; gap: 8px; margin: 6px 0 0; padding: 0; }
.segmente li { width: 34px; height: 6px; border-radius: 3px; background: var(--line); }
.segmente li.aktiv { background: var(--accent); }
.segmente li.fertig { background: var(--accent-text); }

.spiel-ende-link { display: block; margin: -4px auto 8px; font-size: 12px; color: var(--text-dim); }

.spiel-inhalt .spiel-frage.aktion { font-family: var(--font-ui); font-weight: 700; font-size: clamp(20px, 2.8vw, 30px); letter-spacing: -.01em; line-height: 1.25; }
.ende-zahl { font-size: clamp(56px, 10vw, 96px); }


/* =====================================================================
   Nachtlicht: Feinschliff über den Grundbausteinen
   (Reihenfolge wichtig: steht bewusst ganz am Ende)
   ===================================================================== */

/* Wortmarke bleibt: Schalter-O, „FF“ in Unbounded, „script“ in Serif kursiv */
.wortmarke { font-family: var(--font-brand); }
.wm-script { font-family: var(--font-script); }

/* Mono-Labels */
.label, .karte-kopf, .karte-fuss, .tag, .fortschritt-text, .zaehl-text, .woche-text, .restzeit, .zaehler, .zaehler-sub, .fluss,
kbd, .hinweis-taste, .mini-schalter-text, .kal-monate span, .pt-marke, .pt-mini, .akt-pille, .typ-badge, .panel h2, .ende-unter {
  font-family: var(--font-mono); }
.label, .karte-kopf, .fortschritt-text, .panel h2, .ende-unter { font-weight: 400; letter-spacing: .1em; }
#frage-label { color: var(--accent-text); }
kbd { font-size: 12px; font-weight: 500; padding: 3px 8px; border-radius: 6px; }
.link { font-family: var(--font-mono); font-size: 13px; font-weight: 400; }

/* Kopfzeile und Navigation */
.kopf-nav { gap: 6px; }
.nav-btn { min-height: 44px; padding: 0 14px; color: var(--text-dim); }
.nav-btn:hover:not(:disabled) { color: var(--text); text-decoration: none; }
.nav-btn[aria-current="page"] { color: var(--text); text-decoration: underline; text-underline-offset: 8px; text-decoration-thickness: 1.5px; }
.nav-pt { min-height: 44px; padding: 0 18px; border: 1.5px solid var(--accent-text); color: var(--accent-text); font-weight: 500; }
.nav-pt:hover { background: var(--surface-2); }
.icon-btn { width: 44px; height: 44px; border-color: var(--line); }
.woche-pille { min-height: 44px; padding: 0 16px; }
.woche-text { font-size: 13px; font-weight: 400; color: var(--text-dim); }
.woche-tage i { border-radius: 50%; }

/* Chips */
.chip { height: 44px; padding: 0 18px; border: 1px solid var(--line); color: var(--text-dim); font-size: 14px; }
.chip:hover:not(:disabled) { color: var(--text); }
.chip[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.dot { width: 10px; height: 10px; }
.chip.mini { height: 36px; padding: 0 14px; font-size: 13px; }
.segment { border-color: var(--line); }

/* Bühne: Frage groß, fett, ohne Serif */
.frage-slot { min-height: 210px; }
.frage, #frage-text { font-weight: 800; letter-spacing: -.015em; }
#frage-text.italic-platzhalter { font-style: normal; color: var(--text); opacity: .9; }
#frage-text em { font-style: normal; color: inherit; transition: color .5s .15s; }
#frage-text em::after { display: none; }
#ziehung[data-status="fertig"] #frage-text em { color: var(--accent-text); }
.recherche-frage em, .fokus-frage em, .karte-frage em, .eintrag-frage em, .modi-lead em, .spiel-frage em { font-style: normal; color: var(--accent-text); }

/* Modus-Karte */
#form-block { width: min(560px, 100%); padding: 14px 24px 12px; justify-content: center; background: var(--card); border: 1px solid var(--paper-line); border-radius: var(--r-card); }
#form-text { font-family: var(--font-ui); font-style: normal; font-weight: 600; letter-spacing: -.01em; color: var(--text); }
#form-hinweis { font-size: 14px; }
.joker { transition: transform .5s var(--ease-spring); }
.erststart { font-family: var(--font-mono); font-style: normal; font-size: 13px; letter-spacing: .04em; }

/* Buttons */
.gross.drehen, .drehen { height: 68px; padding: 0 56px; font-size: 20px; font-weight: 800; letter-spacing: -.01em;
  box-shadow: 0 0 48px color-mix(in srgb, var(--accent) 28%, transparent); }
.btn-ghost { height: 48px; border: 1.5px solid var(--line-strong); font-size: 15px; font-weight: 600; }
.pille { font-weight: 600; }

/* Schalter: feine Linie */
.start-reihe { gap: 20px 40px; }
.schalter-text strong { font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.schalter-text span { font-family: var(--font-ui); font-size: 16px; }
.switch { border-color: var(--switch-line); padding: 0 var(--switch-pad); }
.switch.klein { --switch-w: 72px; --knob: 28px; --knob-travel: 27px; }
.switch.mini { --switch-w: 38px; --switch-h: 22px; --knob: 10px; --knob-travel: 14px; --switch-pad: 4px; }
@media (max-width: 760px) { .switch { --switch-w: 72px; --knob-travel: 27px; } .switch.mini { --switch-w: 38px; --knob-travel: 14px; } }
@media (max-width: 360px) { .switch { --switch-w: 72px; --switch-h: 44px; --knob: 28px; --knob-travel: 27px; } .switch.mini { --switch-w: 38px; --switch-h: 22px; --knob: 10px; --knob-travel: 14px; } }

/* Regel-Vorhang */
.regel-zeilen { font-weight: 800; letter-spacing: -.01em; }
.regel-frage p { font-family: var(--font-ui); font-size: 20px; }
.regel-frage #regel-frage { color: rgba(233,239,230,.85); }
.regel-frage #regel-form { font-style: normal; color: #C6F36B; margin-top: 6px; }
.pille-hell { background: #C6F36B; color: #0C1210; font-weight: 700; }
.pille-hell:hover { background: #D3F78A; }
.regel-balken { background: rgba(233,239,230,.2); }
.regel-balken span { background: #C6F36B; }
#regel :focus-visible { outline-color: #E9EFE6; }

/* Fokus und Recherche: Schreibfeld als ruhige Karte */
.fokus-frage { font-family: var(--font-text); font-weight: 800; font-size: clamp(20px, 2.4vw, 28px); letter-spacing: -.01em; color: var(--text); }
.fokus-form, .recherche-form { font-family: var(--font-mono); font-style: normal; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim); }
.recherche-form { font-size: 14px; margin-top: 10px; }
.fokus-buehne { padding: 14px 24px 0; }
.fokus-feld { font-family: var(--font-lese); padding: 28px 32px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); }
.zeitlinie { background: var(--accent); height: 3px; }
.fluss.ende { font-family: var(--font-ui); font-style: normal; font-size: 15px; }
.recherche-notiz { font-family: var(--font-ui); font-style: normal; font-size: 16px; }
.recherche-dauer { border-color: var(--line); }

/* Toast, Dialoge, Einstellungs-Panel */
.toast { background: var(--text); color: var(--bg); border: 0; font-size: 14px; font-weight: 600; }
.toast button { background: var(--bg); color: var(--text); }
.panel .chip { border-color: var(--line-strong); }
.panel .chip:hover { background: var(--surface-2); }
.dialog h2, .modus-kopf h2 { font-weight: 800; letter-spacing: -.03em; }
.dialog-knoepfe button { border-color: var(--line-strong); }
.dialog :focus-visible, .panel :focus-visible { outline-color: var(--focus); }
.panel-link { border-color: var(--line-strong); }
.panel-link:hover { background: var(--surface-2); }
.dialog-hintergrund { background: rgba(4,7,6,.7); }

/* Abschluss und Karten */
.fuer-dich { font-family: var(--font-ui); font-style: normal; font-weight: 600; letter-spacing: -.03em; color: var(--accent-text); }
.gespeichert { font-family: var(--font-ui); font-size: 20px; }
.karte-frage { font-weight: 800; letter-spacing: -.03em; }
.karte-form, .eintrag-form, .spiel-form, .titel-text, .impuls { font-family: var(--font-ui); font-style: normal; font-weight: 600; letter-spacing: -.01em; }
.karte-form { font-size: 16px; }
.leiter span, .mini-leiter span { background: var(--line-strong); }
.leiter span.an, .mini-leiter span.an { background: var(--accent); }
.modus-beispiel { background: var(--surface); }
.modus-bsp-frage { font-family: var(--font-ui); font-style: normal; font-size: 16px; }
.spiel-hinweis { font-family: var(--font-ui); font-style: normal; font-size: 18px; }
.welt-wahl option { color: var(--text); background: var(--bg); }
.kal-zelle.voll { background: var(--accent); }

/* Titel und Überschriften */
.seiten-titel, .eintrag-frage, .recherche-frage, .leer { font-weight: 800; letter-spacing: -.015em; }
.leer { font-weight: 600; letter-spacing: -.03em; }
.modi-lead { font-weight: 600; letter-spacing: -.01em; }
.guide-lead { font-family: var(--font-ui); font-weight: 600; letter-spacing: -.01em; }

/* Lese- und Schreibtexte in Serif (Newsreader) */
.karte-text, .eintrag-text, .eintrag-notizen p:last-child, .eintrag-feld, .notizen-feld, .fokus-notizen textarea, .deck-feld, .schreib-feld,
.antwort-karte, .ende-antwort, .modus-text, .modus-schritte, .modus-beispiel, .guide-inhalt ul, .guide-inhalt ol, .guide-inhalt p,
.einst-block > p, .frage-text, .spiel-verlauf li, .regel-box, .deck-hilfe p, .titel-liste, .fav-karte, .weise-text { font-family: var(--font-lese); }
.fokus-feld, .eintrag-feld, .notizen-feld, .schreib-feld { caret-color: var(--accent); }

/* Teamfarben (auf dunklem Grund lesbar) */
.punkte-leiste li.team-0, .team-wahl.team-0, .punkt-knopf.team-0, .team-ergebnis .team-0 { border-color: #8C9AE0; }
.punkte-leiste li.team-1, .team-wahl.team-1, .punkt-knopf.team-1, .team-ergebnis .team-1 { border-color: #E0A458; }

/* Welt-Chips: Trennstrich entfällt, das Art-Segment hat einen eigenen Rahmen */
.chip-trenner { display: none; }
#frage-label { margin-top: 22px; }

/* Guide: Label, Einleitung und Fettdruck im Fließtext */
.guide-inhalt .label { font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; }
.guide-inhalt .guide-lead { font-family: var(--font-ui); font-weight: 500; font-size: clamp(20px, 2.4vw, 24px); line-height: 1.4; letter-spacing: -.005em; }
.guide-inhalt strong { font-family: var(--font-ui); font-size: .92em; font-weight: 600; }

/* Sprachknopf mit Flagge und Menü */
.sprachwahl { position: relative; display: inline-flex; }
.sprach-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px 0 10px; border: 1px solid var(--line); border-radius: 999px;
  background: transparent; color: var(--text); font-family: var(--font-mono); font-size: 13px; letter-spacing: .06em; cursor: pointer; }
.sprach-btn:hover { background: var(--surface-2, var(--surface)); }
.sprach-btn[aria-expanded="true"] .sprach-pfeil { transform: rotate(180deg); }
.sprach-pfeil { color: var(--text-dim); transition: transform .2s; }
.flagge { display: inline-flex; width: 22px; height: 22px; border-radius: 50%; box-shadow: 0 0 0 1px var(--line); flex: none; }
.sprach-menue { position: absolute; top: calc(100% + 8px); right: 0; z-index: 60; min-width: 190px; margin: 0; padding: 6px; list-style: none;
  background: var(--paper); color: var(--paper-ink); border: 1px solid var(--paper-line); border-radius: 18px; box-shadow: var(--shadow-float, var(--shadow)); }
.sprach-option { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: 12px; background: transparent;
  color: inherit; font-family: var(--font-ui); font-size: 15px; font-weight: 500; text-align: left; cursor: pointer; }
.sprach-option:hover { background: var(--surface); }
.sprach-option[aria-pressed="true"] { font-weight: 700; }
.sprach-option[aria-pressed="true"]::after { content: "✓"; margin-left: auto; color: var(--accent-text); }

/* =====================================================================
   Mobile first: Handy ist das Hauptgerät
   (steht ganz am Ende, damit es die Grundbausteine oben überschreibt)
   ===================================================================== */
html, body { overflow-x: clip; }

@media (max-width: 760px) {
  /* Kopfzeile: Zeile 1 Logo + Sprache + Woche + Einstellungen, Zeile 2 Navigation */
  .kopf-scroll { padding-top: calc(10px + env(safe-area-inset-top)); row-gap: 4px; column-gap: 8px; }
  .kopf-scroll > * { min-width: 0; }
  .kopf-scroll > .kopf-extras { gap: 6px; }
  .sprach-btn { padding: 0 10px; gap: 6px; }
  .woche-pille { min-height: 44px; padding: 0 12px; }
  .woche-tage { gap: 3px; }
  .woche-tage i { width: 8px; height: 8px; }
  .sprachwahl { position: static; }
  .sprach-menue { position: fixed; top: calc(60px + env(safe-area-inset-top)); left: auto; right: var(--page-x); min-width: 210px; }
  .kopf-scroll > .kopf-nav { gap: 0 4px; }
  .nav-btn { padding: 0 12px; }
  .nav-pt { padding: 0 16px; }
  .panel { top: calc(112px + env(safe-area-inset-top)); }

  /* Themenwelten: kompakter, schnell wischbar */
  #welt-chips { margin-top: 6px; gap: 8px; padding-right: 48px; }
  .chip { height: 40px; padding: 0 16px; }
  .chip.mini { height: 36px; }

  /* Bühne: Frage oben im Blick, Ziehen-Knopf im Daumenbereich */
  .buehne { padding: 12px var(--page-x) 0; justify-content: flex-start; }
  #frage-label { margin-top: 18px; }
  .frage-slot { min-height: 0; flex: 1 0 auto; margin-top: 10px; align-items: center; }
  .frage, #frage-text { font-size: clamp(28px, 8.4vw, 38px); line-height: 1.1; }
  #form-block { min-height: 0; width: 100%; margin-top: 12px; padding: 12px 18px 8px; }
  #ziehung[data-status="bereit"] #form-block, #ziehung[data-status="zieht"] #form-block { display: none; }
  .erststart { margin: 0; padding: 0 8px 4px; font-size: 12.5px; line-height: 1.5; }
  #modus-start { order: 9; position: sticky; bottom: 0; z-index: 5; width: auto; align-self: stretch; min-height: 0; margin: 12px calc(-1 * var(--page-x)) 0;
    padding: 20px var(--page-x) calc(16px + env(safe-area-inset-bottom));
    background: linear-gradient(to top, var(--bg) 72%, transparent); }
  .hinweis-taste { display: none; }
  .gross.drehen, .drehen { width: 100%; max-width: 440px; height: 64px; padding: 0 24px; font-size: 20px; }

  /* Nach dem Ziehen: Schalter links, Text rechts, „Neu ziehen“ darunter */
  .start-reihe { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 10px 16px; width: 100%; max-width: 440px; margin: 0 auto; }
  .schalter-text { text-align: left; max-width: none; }
  .schalter-text strong { font-size: 18px; }
  .schalter-text span { font-size: 14px; }
  .start-reihe > .btn-ghost { grid-column: 1 / -1; width: 100%; }
}

/* Schmale Handys: Sprache nur als Flagge */
@media (max-width: 400px) {
  .sprach-kuerzel, .sprach-pfeil { display: none; }
  .sprach-btn { width: 44px; padding: 0; justify-content: center; }
}

/* Sehr schmal (320 px) */
@media (max-width: 340px) {
  .kopf-scroll { column-gap: 4px; }
  .wortmarke { font-size: 18px; }
  .woche-pille { padding: 0 9px; }
  .woche-tage { gap: 2px; }
  .woche-tage i { width: 6px; height: 6px; }
  .kopf-scroll > .kopf-extras { gap: 4px; }
  .nav-btn { padding: 0 9px; }
}

/* Kopfzeile Handy, ruhiger: Logo | Sprache | Einstellungen, darunter Navigation, darunter Wochenpunkte */
@media (max-width: 760px) {
  .kopf-scroll { grid-template-columns: minmax(0, 1fr) auto auto; column-gap: 8px; row-gap: 6px; }
  .kopf-scroll > .kopf-extras { display: contents; }
  .kopf-scroll .sprachwahl { grid-column: 2; grid-row: 1; }
  .kopf-scroll #btn-einstellungen { grid-column: 3; grid-row: 1; }
  .kopf-scroll .woche-pille { grid-column: 1 / -1; grid-row: 3; justify-self: center; min-height: 20px; padding: 0; border: 0; background: none; }
  .woche-tage { gap: 6px; }
  .woche-tage i { width: 9px; height: 9px; }
  .sprach-kuerzel, .sprach-pfeil { display: none; }
  .sprach-btn { width: 44px; padding: 0; justify-content: center; }
  #welt-chips { margin-top: 2px; }
}
@media (max-width: 340px) { .woche-tage i { width: 7px; height: 7px; } .woche-tage { gap: 4px; } }
@media (min-width: 341px) and (max-width: 760px) { .kopf-scroll > .wortmarke, .kopf-scroll > .wortmarke-btn { font-size: 24px; } }

/* Gezogener Zustand auf dem Handy: mehr Luft, klare Rangfolge (Frage > Modus > Schalter) */
@media (max-width: 760px) {
  .buehne { padding-top: 20px; }
  #frage-label { margin-top: 14px; }
  .frage-slot { margin-top: 18px; padding: 4px 4px 0; }
  .frage, #frage-text { line-height: 1.14; }
  #form-block { margin-top: 28px; padding: 20px 20px 4px; gap: 8px; border-radius: 22px; }
  #form-text { font-size: 24px; }
  #form-hinweis { font-size: 15px; line-height: 1.45; color: var(--text-dim); margin: 0 0 6px; }
  .form-aktionen { width: calc(100% + 40px); margin: 10px -20px 0; flex-direction: column; gap: 0; }
  .form-aktionen > .link { width: 100%; justify-content: center; min-height: 48px; padding: 0 20px; border-top: 1px solid var(--line); text-decoration: none; }
  .form-aktionen > .link:not(.joker-btn) { text-decoration: none; }
  .joker-btn .joker-text { text-decoration: underline; text-underline-offset: 4px; }
  #ziehung[data-status="fertig"] #modus-start { margin-top: 20px; padding-top: 16px; }
  .start-reihe { gap: 8px 16px; }
  .start-reihe > .btn-ghost { height: 44px; min-height: 44px; border: 0; color: var(--text-dim); font-size: 14px; font-weight: 500; }
  .erststart { padding-bottom: 14px; font-size: 13px; }
}

/* Schalter mobil: ganze Zeile ist der Schalter (Tippen oder nach links wischen) */
@media (max-width: 760px) {
  .start-reihe { grid-template-columns: 1fr; }
  .schalter-btn { width: 100%; min-height: 76px; padding: 10px 16px 10px 24px; gap: 16px; justify-content: space-between;
    background: var(--accent); color: var(--on-accent); --switch-line: var(--on-accent); box-shadow: 0 0 40px color-mix(in srgb, var(--accent) 25%, transparent);
    transition: transform .12s; -webkit-tap-highlight-color: transparent; touch-action: pan-y; }
  .schalter-btn:active { transform: scale(.985); }
  .schalter-btn .switch { order: 2; }
  .schalter-btn .knob, [aria-checked="false"] .schalter-btn .knob, .schalter-btn[aria-checked="false"] .knob { background: var(--on-accent); }
  .schalter-btn .schalter-text strong { font-size: 19px; font-weight: 800; }
  .schalter-btn .schalter-text span { color: var(--on-accent); opacity: .72; }
}

/* Nach dem Ziehen nichts mehr fixieren: alles läuft im normalen Fluss, nichts wird überdeckt */
@media (max-width: 760px) {
  #ziehung[data-status="fertig"] #modus-start { position: static; background: none; margin: 24px 0 0; padding: 0 0 calc(32px + env(safe-area-inset-bottom)); }
  #form-hinweis { min-height: 0; }
  .schalter-btn .schalter-text strong { font-size: 18px; line-height: 1.2; }
  .schalter-btn .schalter-text span { font-size: 14px; line-height: 1.35; }
  .schalter-btn .switch { --switch-w: 64px; --switch-h: 40px; --knob: 24px; --knob-travel: 24px; }
}

/* Tippen auf dem Handy: Overlays folgen dem sichtbaren Bereich über der Tastatur, die Seite dahinter bleibt stehen */
#regel, #fokus, #recherche { top: var(--vvt, 0px); bottom: auto; height: var(--vvh, 100dvh); }
body[data-modus="fokus"], body[data-modus="recherche"], body[data-modus="regel"] { overflow: hidden; overscroll-behavior: none; }
#recherche { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.notizen-feld:focus, .fokus-feld:focus, .fokus-notizen textarea:focus { outline: none; }
.notizen-feld:focus { border-color: var(--accent-text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }

@media (max-width: 760px) {
  /* Recherche */
  .recherche-inhalt { padding: calc(20px + env(safe-area-inset-top)) var(--page-x) calc(24px + env(safe-area-inset-bottom)); gap: 6px; }
  .recherche-frage { font-size: clamp(24px, 7vw, 32px); }
  .recherche-zeit { margin-top: 14px; font-size: clamp(56px, 18vw, 80px); }
  .recherche-dauer { width: 100%; justify-content: space-between; }
  .recherche-dauer button { flex: 1; height: 44px; font-size: 14px; padding: 0 6px; }
  .notizen-feld { margin-top: 16px; min-height: 140px; font-size: 18px; padding: 14px 16px; }
  .recherche-aktionen { width: 100%; margin-top: 18px; flex-direction: column; gap: 4px; }
  .recherche-aktionen .gross { width: 100%; }
  /* Schreiben (Fokus) */
  .fokus-kopf { padding-top: calc(14px + env(safe-area-inset-top)); }
  .fokus-buehne { padding: 0 var(--page-x); }
  .fokus-feld { padding-top: 16px; padding-bottom: calc(16px + env(safe-area-inset-bottom)); font-size: 19px; line-height: 1.6; }
  .fokus-notizen { width: calc(100% - 2 * var(--page-x)); }
  .fokus-notizen textarea { font-size: 16px; }
}
.zeitlinie { top: var(--vvt, 0px); }
body[data-modus="fokus"] #ziehung, body[data-modus="recherche"] #ziehung { visibility: hidden; }

/* Schreiben mit Tastatur: Kopf schrumpft auf das Wesentliche, das Feld bekommt den Platz */
@media (max-width: 760px) {
  .fokus-kopf { row-gap: 6px; padding-bottom: 4px; }
  .fokus-rechts { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0 14px; }
  .fokus-rechts .timer-wahl { order: 3; flex-basis: 100%; justify-content: flex-end; }
  .fokus-form { font-size: 12px; margin-top: 2px; }
  .fokus-notiz { margin-top: 2px; }
  .fokus-feld { padding: 16px 18px; border-radius: 18px; font-size: 18px; line-height: 1.6; }
  #fokus:has(.fokus-feld:focus) .timer-wahl,
  #fokus:has(.fokus-feld:focus) .fokus-form,
  #fokus:has(.fokus-feld:focus) .fokus-notiz { display: none; }
}

/* =====================================================================
   Mobil-Navigation: Tab-Leiste unten statt Menü in der Kopfzeile (bis 760 px)
   Ziehung · Archiv · Together · Mehr. Kalender sitzt im Archiv (Liste | Kalender),
   Modi in der Modus-Karte, Sprache/Darstellung/Ton in „Mehr“.
   ===================================================================== */
.tabbar, .ansicht-seg, .panel-titel { display: none; }

@media (max-width: 760px) {
  :root { --tab-h: calc(67px + env(safe-area-inset-bottom)); }

  /* sichtbar nur auf den Hauptseiten, nie im Schreiben, Recherche, Regel, Eintrag oder im laufenden Spiel */
  body:is([data-modus="ziehung"], [data-modus="archiv"], [data-modus="kalender"], [data-modus="spiel"], [data-modus="guide"], [data-modus="einstellungen"], [data-modus="modi"]) .tabbar { display: flex; }
  body[data-modus="spiel"]:has(#spiel-inhalt.mitte) .tabbar { display: none; }
  body:is([data-modus="ziehung"], [data-modus="archiv"], [data-modus="kalender"], [data-modus="spiel"], [data-modus="guide"], [data-modus="einstellungen"], [data-modus="modi"]):not(:has(#spiel-inhalt.mitte)) { padding-bottom: var(--tab-h); }

  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; box-sizing: border-box; height: var(--tab-h); padding: 6px 8px calc(8px + env(safe-area-inset-bottom));
    background: var(--bg); border-top: 1px solid var(--line); }
  .tab { flex: 1; min-height: 52px; display: flex; flex-direction: column; align-items: center; gap: 3px; background: none; border: 0; padding: 0;
    color: var(--text-dim); font: 500 12px var(--font-ui); cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .tab-ico { width: 56px; height: 30px; border-radius: 15px; display: flex; align-items: center; justify-content: center; transition: background .18s; }
  .tab svg { width: 24px; height: 24px; }
  body[data-modus="ziehung"]:not(.mehr-offen) .tab[data-tab="ziehung"],
  body:is([data-modus="archiv"], [data-modus="kalender"]):not(.mehr-offen) .tab[data-tab="archiv"],
  body:is([data-modus="spiel"], [data-modus="guide"]):not(.mehr-offen) .tab[data-tab="spiel"],
  body:is([data-modus="einstellungen"], [data-modus="modi"]) .tab[data-tab="mehr"],
  body.mehr-offen .tab[data-tab="mehr"] { color: var(--accent-text); font-weight: 600; }
  body[data-modus="ziehung"]:not(.mehr-offen) .tab[data-tab="ziehung"] .tab-ico,
  body:is([data-modus="archiv"], [data-modus="kalender"]):not(.mehr-offen) .tab[data-tab="archiv"] .tab-ico,
  body:is([data-modus="spiel"], [data-modus="guide"]):not(.mehr-offen) .tab[data-tab="spiel"] .tab-ico,
  body:is([data-modus="einstellungen"], [data-modus="modi"]) .tab[data-tab="mehr"] .tab-ico,
  body.mehr-offen .tab[data-tab="mehr"] .tab-ico { background: color-mix(in srgb, var(--accent) 16%, transparent); }
  body.mehr-offen:is([data-modus="einstellungen"], [data-modus="modi"]) .tab[data-tab="mehr"] { color: var(--accent-text); }

  /* Kopf Ziehung: Logo links, Wochenpunkte rechts. Sprache und Einstellungen wohnen in „Mehr“ */
  .kopf-scroll .sprachwahl, .kopf-scroll #btn-einstellungen { display: none; }
  .kopf-scroll .woche-pille { grid-column: 2; grid-row: 1; justify-self: end; }
  #ziehung .kopf-nav { display: none; }

  /* Archiv und Kalender: Kopf entfällt, Umschalter Liste | Kalender oben */
  #archiv > .kopf, #kalender > .kopf { display: none; }
  .ansicht-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin: calc(14px + env(safe-area-inset-top)) 0 18px;
    border: 1px solid var(--line); border-radius: 28px; background: var(--card); }
  .ansicht-seg button { height: 44px; border-radius: 24px; border: 0; background: transparent; color: var(--text); font: 500 15px var(--font-ui); cursor: pointer; }
  .ansicht-seg button[aria-pressed="true"] { background: var(--text); color: var(--bg); font-weight: 600; }

  /* Together: ohne „← Solo“ (die Tabs führen zurück) */
  #spiel .kopf-nav [data-nav="ziehung"], #guide .kopf-nav [data-nav="ziehung"] { display: none; }

  /* Mehr: Einstellungs-Panel als Vollbild über der Tab-Leiste */
  .panel { top: 0; right: 0; left: 0; bottom: var(--tab-h); width: auto; max-height: none; overflow-y: auto; border-radius: 0; border: 0; box-shadow: none;
    padding: calc(58px + env(safe-area-inset-top)) 20px 28px; background: var(--bg); color: var(--text); z-index: 40; }
  .panel[hidden] { display: none; }
  .panel-titel { display: block; margin: 0 0 8px; font-family: var(--font-text); font-weight: 800; font-size: 38px; letter-spacing: -.025em; line-height: 1; }
  .panel h2 { color: var(--text-dim); }
  .panel .chip { color: var(--text); border-color: var(--line); height: 44px; }
  .panel .chip[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
  .panel-link { color: var(--text); background: var(--card); border: 1px solid var(--line); min-height: 52px; border-radius: 20px; }

  /* Together: „Los“ bleibt unten im Blick, über der Tab-Leiste */
  #spiel-inhalt.links .spiel-start { position: sticky; bottom: var(--tab-h); z-index: 5; margin: 20px calc(-1 * var(--page-x)) 0; padding: 16px var(--page-x) 12px;
    background: linear-gradient(to top, var(--bg) 78%, transparent); }
  #spiel-inhalt.links .spiel-start .gross { width: 100%; max-width: none; }

  /* Ziehen-Knopf sitzt über der Tab-Leiste statt am Rand */
  #modus-start { bottom: var(--tab-h); padding-bottom: 12px; }
  .toast { bottom: calc(var(--tab-h) + 12px); }
}


/* =====================================================================
   Startseite: Mitte füllen · Playtogether: mehr Fläche · Spielart
   ===================================================================== */
.bereit-schritte { display: none; list-style: none; margin: 56px auto 0; padding: 0; width: 100%; max-width: 920px; grid-template-columns: repeat(3, 1fr); gap: 16px; text-align: left; }
#ziehung[data-status="bereit"] .bereit-schritte { display: grid; animation: os-einblenden .5s .2s both; }
#ziehung[data-status="bereit"] #form-block { display: none; }
.bereit-schritte li { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 22px 22px 20px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
.bereit-schritte li > strong { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.bereit-schritte li > span:last-child { font-family: var(--font-text); font-size: 18px; line-height: 1.35; color: var(--text-dim); }
.schritt-nr { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; margin-bottom: 6px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: 14px; font-weight: 700; }
.bereit-schritte + #form-block + #modus-start, #ziehung[data-status="bereit"] #modus-start { margin-top: 44px; }
@media (min-width: 761px) { .erststart { display: none; } }
@media (max-width: 760px) { .bereit-schritte, #ziehung[data-status="bereit"] .bereit-schritte { display: none; } }
@media (max-height: 760px) and (min-width: 761px) { .bereit-schritte { margin-top: 28px; } .bereit-schritte li { padding: 16px 18px; } .bereit-schritte li > span:last-child { font-size: 16px; } }

/* Spielart-Auswahl */
.art-wahl { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.art-karte { position: relative; text-align: left; padding: 20px 22px; border-radius: 18px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); }
.art-karte i { display: block; margin-bottom: 8px; font-style: normal; font-size: 22px; letter-spacing: .05em; color: var(--accent-text); }
.art-karte strong { display: block; margin-bottom: 4px; font-size: 18px; }
.art-karte span { font-family: var(--font-text); font-size: 18px; line-height: 1.3; color: var(--text-dim); }
.art-karte:hover { background: var(--surface-2); }
.art-karte[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.art-karte[aria-pressed="true"] i, .art-karte[aria-pressed="true"] span { color: var(--on-accent); }
@media (max-width: 560px) { .art-wahl { gap: 10px; } .art-karte { padding: 14px 14px 16px; border-radius: 16px; } .art-karte i { margin-bottom: 4px; font-size: 18px; } .art-karte strong { font-size: 16px; } .art-karte span { font-size: 14px; } }

/* Fortschritt als Balken */
.karten-balken { list-style: none; display: flex; gap: 4px; justify-content: center; margin: 0 auto 14px; padding: 0; max-width: 420px; }
.karten-balken li { flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.karten-balken li.fertig { background: var(--accent-text); }
.karten-balken li.aktiv { background: var(--accent); }

/* Playtogether am Bildschirm: größere Karte, breiter, gut gefüllt */
@media (min-width: 761px) {
  #spiel-inhalt { max-width: 1180px; }
  #spiel-inhalt.links { max-width: 1040px; }
  #spiel-inhalt.links .set-karten { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  #spiel-inhalt.mitte { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: calc(100dvh - 120px); padding-top: 8px; padding-bottom: 40px; }
  #spiel-inhalt.mitte > * { max-width: 100%; }
  #spiel-inhalt.mitte .fortschritt-text { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; }
  #spiel-inhalt.mitte .typ-badge { padding: 8px 22px; font-size: 12px; }
  #spiel-inhalt.mitte .rampenlicht { font-size: 16px; margin-bottom: 14px; }
  #spiel-inhalt.mitte .rampenlicht strong { font-size: 18px; }
  #spiel-inhalt.mitte .spiel-frage { max-width: 1040px; margin-top: 10px; font-size: clamp(44px, 5.6vw, 84px); line-height: 1.06; min-height: 0; }
  #spiel-inhalt.mitte .spiel-frage.klein { font-size: clamp(32px, 4vw, 56px); }
  #spiel-inhalt.mitte .spiel-frage.aktion { font-size: clamp(32px, 4vw, 54px); line-height: 1.15; }
  #spiel-inhalt.mitte .regel-box { max-width: 760px; margin-top: 36px; padding: 20px 26px; font-size: 24px; border-radius: 0 16px 16px 0; }
  #spiel-inhalt.mitte .wahl-duell { max-width: 960px; gap: 18px; margin-top: 32px; }
  #spiel-inhalt.mitte .wahl-seite { padding: 30px 26px; font-size: 28px; }
  #spiel-inhalt.mitte .optionen-liste { max-width: 760px; gap: 10px; margin-top: 30px; }
  #spiel-inhalt.mitte .optionen-liste li { padding: 16px 20px; font-size: 25px; }
  #spiel-inhalt.mitte .spiel-aktionen { margin-top: 44px; }
  #spiel-inhalt.mitte .spiel-aktionen .gross.drehen { height: 68px; padding: 0 56px; font-size: 22px; }
  #spiel-inhalt.mitte .spiel-aktionen .btn-ghost { height: 56px; padding: 0 28px; font-size: 16px; }
  #spiel-inhalt.mitte .karten-balken { max-width: 560px; }
  #spiel-inhalt.mitte .dran-titel { font-size: clamp(32px, 4vw, 52px); }
  #spiel-inhalt.mitte .jetzt { font-size: clamp(40px, 6vw, 72px); }
  #spiel-inhalt.mitte .spiel-hinweis { max-width: 760px; font-size: 22px; }
}
