/* External developer funding is unavailable in the native iOS/iPadOS app. */
html.hybrid-ios .sponsor-link,
html.hybrid-ios .external-development-support {
  display: none !important;
}

:root {
  color-scheme: light dark;
  --bg: #f6f7f8;
  --panel: #ffffff;
  --text: #202124;
  --muted: #6b7280;
  --line: #d9dde3;
  --accent: #4f2fd8;
  --accent-soft: #ede9ff;
  --danger: #b42318;
  --radius: 8px;
  --skeleton-base: rgba(0, 0, 0, 0.06);
  --skeleton-shimmer: rgba(0, 0, 0, 0.14);
  /* Markierung bereits erfasster Bibelstellen (per Settings-Colorpicker
     überschreibbar). --captured-bg leitet sich automatisch ab. */
  --captured-accent: #16a34a;
  --captured-bg: color-mix(in srgb, var(--captured-accent) 12%, transparent);
  /* Klassische "Red letter"-Einfärbung für Verse, in denen Jesus direkt
     spricht (siehe .study-strong daneben für Strong-Wörter). */
  --jesus-speech-color: #a3231f;

  /* --- Zoom-korrigierte Viewport-Maße -------------------------------------
     Die Schriftgrößen-Einstellung setzt `zoom` auf <html> (siehe applyUiScale).
     Innerhalb eines gezoomten Wurzelelements liefern vw/vh/dvh und env(safe-area-*)
     weiterhin die *ungezoomten* Werte - sie werden anschließend mitskaliert und
     sind dadurch um den Zoomfaktor zu groß. `width: min(560px, calc(100vw - 24px))`
     ergibt bei 130 % also 366px * 1.3 = 476 reale Pixel auf einem 390px-Display:
     das Element ragt beidseitig aus dem Bildschirm.
     Deshalb NIE direkt vw/vh/dvh/env() verwenden, sondern die Variablen unten -
     sie teilen durch --ui-scale und ergeben damit immer echte Bildschirmmaße.
     Bei 100 % ist --ui-scale = 1, alle Variablen sind dann identisch zum Original. */
  --ui-scale: 1;
  --vpw: calc(100vw / var(--ui-scale));
  --vph: calc(100dvh / var(--ui-scale));
  --safe-top: calc(env(safe-area-inset-top, 0px) / var(--ui-scale));
  --safe-bottom: calc(env(safe-area-inset-bottom, 0px) / var(--ui-scale));
  --safe-left: calc(env(safe-area-inset-left, 0px) / var(--ui-scale));
  --safe-right: calc(env(safe-area-inset-right, 0px) / var(--ui-scale));

  /* Legacy fixed-element gaps remain zero. Earlier JavaScript measurements
     captured transient iOS viewport states and left stale offsets behind.
     Zero gaps alone do not prevent a browser's stale fixed containing block;
     mobile navigation therefore uses an explicit top-anchored viewport frame. */
  --fix-right-gap: 0px;
  --fix-bottom-gap: 0px;
  /* Breite der rechts angedockten Mitschrift; 0, solange sie nicht angedockt
     ist. app-mitschrift.js hält den Wert aktuell (siehe renderMitschrift). */
  --mitschrift-dock-w: 0px;
  /* Width of the study inspector docked on wide screens; 0 while it floats or is closed
     (see syncStudyInspectorDock in app.js). When both docks are open they stack vertically
     in one shared right column, so --right-dock-w is their shared column width. */
  --inspector-dock-w: 0px;
  --right-dock-w: max(var(--mitschrift-dock-w), var(--inspector-dock-w));
  --right-dock-split: 0.48;
  /* Höhe der klebenden Kopfzeile der geführten Seiten. app.js hält den Wert per
     ResizeObserver aktuell; der Startwert deckt nur die Zeit bis zum ersten
     Messen ab. Alle Elemente, die unter der Kopfzeile kleben, rechnen damit -
     vorher standen dort feste 76px (Desktop) bzw. 56px (Mobil), während die
     Kopfzeile tatsächlich 79px bzw. 105px hoch ist. Die Aktionsleiste des
     Bibelkapitels verschwand dadurch beim Scrollen bis zu 60px weit darunter. */
  --simple-head-h: 79px;
}

/* Zweistufiger Icon-Font: ein ~10-KB-Subset mit den ~110 Zeichen, die die
   Web-App-Chrome tatsächlich verwendet (sofort da, für Buttons/Icons überall),
   plus der volle Font Awesome Solid (~280 KB) als Auffangbecken für frei
   gewählte Codes (z. B. individuelle Sammlungs-/Gruppen-Icons), die nicht im
   Subset stecken. Beide @font-face teilen sich denselben font-family-Namen;
   das Subset trägt ein explizites unicode-range, der Vollfont keins - der
   Browser lädt den Vollfont dadurch nur dann nach, wenn auf der Seite
   tatsächlich ein Zeichen außerhalb des Subsets vorkommt, für die meisten
   Nutzer:innen also nie. So bleibt jeder gültige Font-Awesome-Solid-Code
   nutzbar, ohne dass alle immer 280 KB laden.
   Neu gebaut mit scripts/subset-icon-font.py, sobald ein neues Chrome-Icon
   dazukommt (aktualisiert Subset-Datei, Vollfont-Datei, FASolid900.codepoints.txt
   UND das unicode-range unten in einem Rutsch); von __tests__/iconFontSubset.test.js
   gegen den Quellcode geprüft.
   font-display: swap statt block – bis der Font da ist, bleibt der Platz leer
   statt die Icons zu blockieren. */
@font-face {
  font-family: "FAS";
  src: url("FASolid900.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
  /* AUTO-GENERATED:unicode-range:START - see scripts/subset-icon-font.py, do not hand-edit */
  unicode-range: U+E17C,U+E317,U+E755,U+E7A5,U+E80B,U+F001,U+F002,U+F004,U+F005,U+F007,U+F00C,U+F00D,U+F00E,U+F010,U+F013,U+F015,U+F017,U+F019,U+F021,U+F023,U+F024,U+F028,U+F02C,U+F02D,U+F02E,U+F032,U+F033,U+F034,U+F03A,U+F03E,U+F042,U+F044,U+F048,U+F04B,U+F04C,U+F04D,U+F051,U+F053,U+F054,U+F055,U+F058,U+F05A,U+F05E,U+F060,U+F061,U+F062,U+F063,U+F065,U+F066,U+F067,U+F06C,U+F06D,U+F06E,U+F070,U+F071,U+F073,U+F074,U+F075,U+F077,U+F078,U+F07B,U+F07C,U+F07D,U+F080,U+F084,U+F085,U+F08E,U+F090,U+F091,U+F093,U+F0AC,U+F0AD,U+F0B0,U+F0C0,U+F0C1,U+F0C5,U+F0C7,U+F0C9,U+F0CA,U+F0CC,U+F0CD,U+F0D7,U+F0DC,U+F0E0,U+F0EB,U+F0EC,U+F0FE,U+F110,U+F130,U+F132,U+F13D,U+F141,U+F142,U+F14E,U+F15C,U+F187,U+F19D,U+F1C1,U+F1D8,U+F1DA,U+F1DC,U+F1DE,U+F1E0,U+F1F8,U+F204,U+F205,U+F234,U+F249,U+F27A,U+F2A2,U+F2EA,U+F2ED,U+F2F1,U+F2F5,U+F303,U+F304,U+F31C,U+F337,U+F340,U+F362,U+F518,U+F522,U+F539,U+F544,U+F560,U+F561,U+F58E,U+F591,U+F5D3,U+F5DA,U+F5FD,U+F647,U+F654,U+F65E,U+F723,U+F865;
  /* AUTO-GENERATED:unicode-range:END */
}

@font-face {
  font-family: "FAS";
  src: url("FASolid900Full.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

html.theme-dark {
  --bg: #181818;
  --panel: #222222;
  --text: #f2f2f2;
  --muted: #a3a3a3;
  --line: #3d3d3d;
  --accent: #a78bfa;
  --accent-soft: #35245f;
  /* Text on accent surfaces: the dark accents are light, so it turns black. */
  --on-accent: #000000;
  --skeleton-base: rgba(255, 255, 255, 0.04);
  --skeleton-shimmer: rgba(255, 255, 255, 0.12);
  --jesus-speech-color: #e0645f;
}

body.workspace-tone-warm {
  --bg: #fbf7f8;
  --panel: #fffdfb;
  --text: #262022;
  --muted: #75676b;
  --line: #eadde1;
  --accent: #a9475b;
  --accent-soft: #fae8ed;
  --skeleton-base: rgba(169, 71, 91, 0.07);
  --skeleton-shimmer: rgba(169, 71, 91, 0.15);
}

html.theme-dark body.workspace-tone-warm {
  --bg: #1f1a1c;
  --panel: #282124;
  --text: #f6eeee;
  --muted: #c8b7bc;
  --line: #49363c;
  --accent: #f09aad;
  --accent-soft: #4a2630;
  --on-accent: #000000;
  --skeleton-base: rgba(240, 154, 173, 0.06);
  --skeleton-shimmer: rgba(240, 154, 173, 0.16);
}

* { box-sizing: border-box; }

[hidden] {
  display: none !important;
}

html {
  /* min(100%, --vpw): 100% ist das Initial Containing Block, --vpw das echte
     Bildschirmmaß. Engines, die den ICB beim Wurzel-`zoom` nicht mitverkleinern
     (WebKit/iOS), würden die ganze Seite sonst um den Zoomfaktor zu breit
     rendern -> horizontales Wegschieben der kompletten Oberfläche. Auf Engines,
     die korrekt verkleinern, ist 100% bereits das Minimum -> kein Unterschied.
     100% (statt nur --vpw) hält außerdem die Desktop-Scrollbar draußen, die in
     100vw mitgezählt würde. */
  width: min(100%, var(--vpw));
  max-width: min(100%, var(--vpw));
  overflow-x: clip;
}

/* Keep Mac Catalyst text autosizing from counteracting the app zoom. */
html.native-mac-menu {
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: clip;
}

/* ==...== aus renderInlineMarkdown() (siehe app.js) markiert ausschließlich
   inline aufgelöste Bibelstellen mitten im Fließtext - im Gegensatz zu separat
   stehenden Zitaten (eigene Zeile -> Blockzitat mit Rahmen, siehe blockquote-
   Regeln) braucht dieser Fall nur eine dezente Tönung statt des grellen
   gelben UA-Standards. Spezifischere Selektoren (z. B. .ws-bible-chapter mark
   für Suchtreffer) überschreiben das bewusst weiterhin. */
mark {
  padding: 1px 3px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  color: var(--text);
}

/* Obsidian-artige Callouts ("> [!note] Titel …", siehe renderMarkdownBlock/
   CALLOUT_TYPES in app.js). --md-callout-color wird pro Typ unten gesetzt und
   vererbt sich an Rahmen/Hintergrund/Titelfarbe der Box. */
.md-callout {
  display: grid;
  gap: 4px;
  margin: 6px 0;
  padding: 10px 12px;
  border-radius: var(--radius);
  border-left: 3px solid var(--md-callout-color, var(--accent));
  background: color-mix(in srgb, var(--md-callout-color, var(--accent)) 12%, transparent);
}

.md-callout-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--md-callout-color, var(--accent));
}

.md-callout-body {
  color: var(--text);
}

.md-callout-body p {
  margin: 4px 0 0;
}
.md-callout-body ul,
.md-callout-body ol { margin:6px 0; padding-inline-start:24px; }
.md-callout-body li + li { margin-top:3px; }

/* Faltbare Callouts (Body vorhanden, siehe renderMarkdownBlock): Titelzeile
   klickbar auf-/zuklappen, Pfeil zeigt den Zustand. Nicht faltbare Callouts
   (nur Titel, kein Body) bleiben ohne Pfeil/Cursor - da gibt es nichts zu
   verstecken. */
.md-callout-foldable > .md-callout-title {
  cursor: pointer;
  user-select: none;
}

.md-callout-foldable > .md-callout-title::after {
  content: "\f078";
  font-family: "FAS";
  font-weight: 900;
  margin-left: auto;
  font-size: 0.8em;
  opacity: 0.7;
  transition: transform 0.15s ease;
}

.md-callout-collapsed > .md-callout-title::after {
  transform: rotate(-90deg);
}

.md-callout-collapsed > .md-callout-body {
  display: none;
}

.md-callout-abstract { --md-callout-color: #06b6d4; }
.md-callout-note { --md-callout-color: #2f6fed; }
.md-callout-tip { --md-callout-color: #12b886; }
.md-callout-success { --md-callout-color: #2f9e44; }
.md-callout-question { --md-callout-color: #e8a400; }
.md-callout-failure { --md-callout-color: #e8590c; }
.md-callout-danger { --md-callout-color: #e03131; }
.md-callout-bug { --md-callout-color: #d6336c; }
.md-callout-example { --md-callout-color: #7048e8; }
.md-callout-quote { --md-callout-color: #64748b; }
.md-callout-bible { --md-callout-color: #9A6B22; }

/* Uploaded images in companion texts (renderContentImageMarkdown in app.js,
   docs/content-images.md). The wrapper is a <span> so it may sit inside a <p>;
   width classes are relative to the text column, left/right float the text. */
.md-image {
  display: block;
  max-width: 100%;
  margin: 8px auto;
}
.md-image a { display: block; }
.md-image img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: var(--radius);
}
.md-image-w25 { width: 25%; min-width: 140px; }
.md-image-w50 { width: 50%; }
.md-image-w75 { width: 75%; }
.md-image-w100 { width: 100%; }
.md-image-w25 img, .md-image-w50 img, .md-image-w75 img, .md-image-w100 img { width: 100%; }
.md-image-left { float: left; margin: 4px 16px 8px 0; }
.md-image-right { float: right; margin: 4px 0 8px 16px; }
.md-image-left:not(.md-image-w25, .md-image-w50, .md-image-w75, .md-image-w100),
.md-image-right:not(.md-image-w25, .md-image-w50, .md-image-w75, .md-image-w100) { max-width: 50%; }
.md-image-caption {
  display: block;
  margin-top: 4px;
  font-size: 0.85em;
  color: var(--muted);
  text-align: center;
}
/* A floated image must not hang out of its card into the next one. */
:has(> p > .md-image-left, > p > .md-image-right)::after {
  content: "";
  display: block;
  clear: both;
}
@media (max-width: 600px) {
  .md-image-left,
  .md-image-right {
    float: none;
    margin: 8px auto;
  }
  .md-image-left:not(.md-image-w25, .md-image-w50, .md-image-w75, .md-image-w100),
  .md-image-right:not(.md-image-w25, .md-image-w50, .md-image-w75, .md-image-w100) { max-width: 100%; }
  /* Sized for the desktop text column; on a phone that would be a thumbnail. */
  .md-image-w25 { width: 50%; }
  .md-image-w50,
  .md-image-w75 { width: 100%; }
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--on-accent, #fff);
  min-height: 40px;
  padding: 0 16px;
  cursor: pointer;
}

button.secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}

button.icon-button {
  width: 40px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
}

button.button-icon-mode {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

button.button-icon-text-mode {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

button.button-icon-mode.icon-button {
  width: 40px;
}

button.button-text-mode.icon-button {
  width: auto;
  min-width: 40px;
  padding: 0 10px;
  font-size: 13px;
  line-height: 1.2;
}

.button-icon-stack {
  position: relative;
  display: inline-grid;
  width: 1.45em;
  height: 1.2em;
  place-items: center;
}

.button-icon-stack-base {
  font-size: 1em;
}

.button-icon-stack-badge {
  position: absolute;
  right: -0.08em;
  bottom: -0.08em;
  font-size: .58em;
  text-shadow:
    0 1px 0 var(--panel),
    1px 0 0 var(--panel),
    0 -1px 0 var(--panel),
    -1px 0 0 var(--panel);
}

button.active .button-icon-stack-badge {
  text-shadow:
    0 1px 0 var(--accent),
    1px 0 0 var(--accent),
    0 -1px 0 var(--accent),
    -1px 0 0 var(--accent);
}

.fa-icon {
  font-family: "FAS";
  font-weight: 900;
  line-height: 1;
}

button:disabled {
  opacity: .55;
  cursor: default;
}

input,
textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
  padding: 8px 10px;
}

textarea {
  resize: vertical;
  line-height: 1.45;
}

input:read-only,
textarea:read-only {
  background: var(--bg);
  color: var(--muted);
}

select {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
  padding: 8px 10px;
  font: inherit;
}

input[type="checkbox"] {
  width: auto;
  min-height: auto;
  margin: 0;
}

:root {
  --shell-max-w: 1320px;
  --content-max-w: 900px;
  --lists-max-w: 1480px;
}

body[data-layout-width="wide"] {
  --shell-max-w: 1680px;
  --content-max-w: 1200px;
  --lists-max-w: 1720px;
}

body[data-layout-width="full"] {
  --shell-max-w: min(calc(var(--vpw)*.96),2400px);
  --content-max-w: min(calc(var(--vpw)*.94),1600px);
  --lists-max-w: calc(var(--vpw)*.96);
}

.shell {
  min-height: var(--vph);
  padding: 16px;
  padding-top: max(16px, var(--safe-top));
  padding-right: max(16px, var(--safe-right));
  padding-bottom: max(16px, var(--safe-bottom));
  padding-left: max(16px, var(--safe-left));
  max-width: var(--shell-max-w, 1320px);
  margin: 0 auto;
}

.shell.auth-only {
  max-width: 560px;
  display: grid;
  align-content: start;
  justify-content: center;
  padding-top: max(clamp(24px, 10vh, 120px), var(--safe-top));
}

/* In installed iOS apps, document scrolling can corrupt the fixed viewport.
   Keep navigation and overlays outside the scrolling content instead. */
html.ios-pwa-scroll,
html.ios-pwa-scroll body {
  height:var(--nav-viewport-height, var(--vph));
  overflow:hidden;
}
html.ios-pwa-scroll .shell {
  box-sizing:border-box;
  height:var(--app-scroll-height, var(--nav-viewport-height, var(--vph)));
  min-height:0;
  /* overflow-y:auto alone makes overflow-x compute to auto as well, so any wider
     child let the whole page be panned sideways with a finger. */
  overflow-x:hidden;
  overflow-y:auto;
  overscroll-behavior-y:contain;
}
html.ios-pwa-scroll:has(.lexikon-image-viewer[open]) .shell {
  overflow:hidden;
}

/* Hinweis auf eine neue Fassung in den Akzentfarben der App. */
.update-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 8px 12px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--text);
}

.update-banner button { min-height: 34px; padding: 0 14px; }

.guest-mode-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, #d8ddd9);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 8%, #ffffff);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}
:where(html.theme-dark) .guest-mode-banner { border:1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); background:color-mix(in srgb, var(--accent) 8%, var(--panel)); } /* dark:gen */
.guest-mode-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 65ch;
}
.guest-mode-copy strong {
  color: var(--accent);
  font-size: 0.95rem;
}
.guest-mode-copy span {
  font-size: 0.86rem;
  color: var(--muted);
}
.guest-mode-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.guest-mode-actions button {
  white-space: nowrap;
  min-height: 38px;
  padding: 0 16px;
  font-weight: 600;
}

/* Aktualisieren und Abmelden stehen zusaetzlich im Start-Menue, damit sie von
   jeder Seite aus erreichbar sind - sichtbar bleiben die Knoepfe hier trotzdem.
   Sie waren eine Zeit lang ausgeblendet; auf der Startseite fehlten sie damit
   ganz, obwohl das Menue nur ein zweiter Weg dorthin sein sollte. */

@media (max-width:760px) {
  /* Follow actual visibility so direct links, history and sign-out stay in sync. */
  body:has(#loginPanel[hidden]):not(:has(#workspacePanel:not([hidden]) #simpleHome:not([hidden]))) .topbar { display:none; }
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
  min-width: 0;
}

.brand {
  display: flex;
  flex-direction: row;
  gap: 12px;
  align-items: center;
  min-width: 0;
  flex: 1;
}

.brand-details {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  width: 100%;
}

.app-icon {
  align-self: stretch;
  height: auto;
  max-height: 64px;
  min-height: 36px;
  aspect-ratio: 1 / 1;
  flex: 0 0 auto;
  border-radius: 12px;
  object-fit: contain;
}

.title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.topbar h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  flex-shrink: 0;
}

.version-text {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
  flex-shrink: 1;
  display: inline-block;
  vertical-align: bottom;
}

.topbar p {
  margin: 4px 0 0;
  color: var(--muted);
}

.actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
  margin-left: auto;
}

/* Header-Aktionen (Info, Aktualisieren, Abmelden) einheitlich dezent: es sind
   Hilfsaktionen und sollen optisch leiser sein als der gefüllte Accent-Default.
   Vorher erbten die .icon-buttons (Info/Refresh) den lauten Accent-Hintergrund,
   während Logout (.secondary) bereits transparent war – das wirkte inkonsistent
   und drängte die Nebenaktionen unnötig in den Vordergrund. Akzent erst bei
   Hover/Fokus. */
.actions button {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}
.actions button:hover:not(:disabled),
.actions button:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

/* Titelzeile (Name + Aktions-Icons) auf schmalen Schirmen umbrechen lassen: die
   Icon-Leiste kann nicht schrumpfen und lief sonst über den Viewport hinaus –
   das verbreiterte die ganze Seite (mit overflow-x:hidden = rechts abgeschnitten). */
.title-row {
  flex-wrap: wrap;
}

.login-panel,
.sidebar,
.content,
.detail {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius);
}

/* Sprachumschalter im Anmeldebereich - dieselbe Pille wie auf der Landingpage:
   zwei gleich grosse Haelften, oben rechts. Das Formular ist ein Grid, deshalb
   "justify-self" statt "align-self" (das wirkt in der Blockachse) - ohne das
   zog die Pille ueber die ganze Dialogbreite. DE und EN liegen auf getrennten
   Domains; der Knopf wechselt notfalls hinueber. */
.lang-switch {
  display: flex;
  justify-self: end;
  margin-bottom: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: var(--panel);
}

.lang-switch button {
  appearance: none;
  /* Gleiche Basis fuer beide Haelften, sonst richtet sich die Breite nach dem
     Text und "DE" faellt schmaler aus als "EN". */
  flex: 1 1 0;
  min-width: 54px;
  min-height: 34px;
  padding: 6px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
}

.lang-switch button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--on-accent, #fff);
}

.login-panel {
  max-width: 520px;
  width: min(520px, calc(var(--vpw) - 32px));
  padding: 16px;
}

.login-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  z-index: 9998;
}

.login-panel.is-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
  background: var(--panel, #ffffff);
}
:where(html.theme-dark) .login-panel.is-modal { background:var(--panel, var(--panel)); } /* dark:gen */

html.hybrid-app .login-panel.is-modal {
  inset: 0;
  height: fit-content;
  max-height: calc(var(--vph) - 32px);
  margin: auto;
  overflow-y: auto;
  transform: none;
}

.login-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.login-form {
  display: grid;
  gap: 12px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.auth-tab {
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
}

.auth-tab.active {
  background: var(--accent);
  color: var(--on-accent, #fff);
}

.google-signin-row {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.google-signin-separator {
  position: relative;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

.google-signin-separator::before {
  content: "";
  position: absolute;
  inset: 50% 0 auto 0;
  border-top: 1px solid var(--line);
}

.google-signin-separator span {
  position: relative;
  background: var(--bg, #fff);
  padding: 0 8px;
}
:where(html.theme-dark) .google-signin-separator span { background:var(--bg, var(--panel)); } /* dark:gen */

.google-signin-button {
  display: flex;
  justify-content: center;
}

.auth-legal-links {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 16px;
}

#authSupportLink {
  margin-inline-start: auto;
}

.apple-signin-row {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

.apple-signin-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  width: 280px;
  max-width: 100%;
  padding: 0;
  border: 1px solid #000;
  border-radius: 6px;
  background: #000;
  color: #fff;
  font: 500 17px -apple-system, BlinkMacSystemFont, sans-serif;
}

.apple-signin-button img {
  width: 100%;
  height: auto;
  border-radius: 6px;
}

.login-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
}

.password-row {
  display: flex;
  gap: 8px;
}

.password-row #passwordInput {
  flex: 1;
  min-width: 0;
}

.password-row {
  position: relative;
  display: block;
}

.password-row input {
  padding-right: 48px;
}

.button-style-text .password-row input {
  padding-right: 112px;
}

.password-row .icon-button {
  position: absolute;
  top: 0;
  right: 0;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.password-row .icon-button:hover {
  color: var(--text);
}

.layout {
  display: grid;
  grid-template-columns: minmax(220px, 270px) minmax(0, 1fr) minmax(280px, 340px);
  gap: 12px;
  align-items: start;
}

.sidebar,
.content,
.detail {
  padding: 12px;
  min-width: 0;
}

.detail {
  position: sticky;
  top: 12px;
}

.search-row {
  display: flex;
  gap: 8px;
}

.search-row #searchInput {
  flex: 1;
  min-width: 0;
}

.filter-block {
  margin-top: 14px;
}

.filter-block h2 {
  font-size: 14px;
  margin: 0 0 8px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  min-height: 34px;
  padding: 0 10px;
}

.chip.active {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--on-accent, #fff);
}

.chip.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* „Neuen Tag anlegen"-Option im Tag-Picker: gestrichelt + akzentuiert, damit sie
   sich klar von vorhandenen Tags abhebt. */
.chip.chip-create {
  border-style: dashed;
  border-color: var(--accent);
  color: var(--accent);
}

.chip.chip-create:hover {
  background: var(--accent-soft);
}

.context-menu {
  position: fixed;
  z-index: 100;
  display: grid;
  min-width: 170px;
  /* Grundschutz für JEDES Kontextmenü: Ein Menü darf nie breiter oder höher als
     der Bildschirm werden. Ohne max-height rutschten lange Menüs (z. B. das
     Sammlungsmenü) auf dem Handy oben aus dem Bild - ohne Scrollmöglichkeit
     waren die obersten Einträge schlicht nicht erreichbar. */
  max-width: calc(var(--vpw) - 16px);
  max-height: calc(var(--vph) - 16px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 12px 32px rgb(0 0 0 / 18%);
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

@media (min-width: 761px) {
  .context-menu:has(> button[data-simple-action="manageCollection"]) {
    width: max-content;
  }
}

/* Auf Touch-Geräten konkurriert die native Textauswahl mit unserem eigenen
   Long-Press-Menü. Nur explizit gebundene Aktionsflächen werden ausgenommen;
   normaler Bibel- und Begleittext bleibt ansonsten markierbar. */
@media (pointer: coarse) {
  .custom-longpress-target {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
  }

  /* ... mit einer Ausnahme: dem Verstext. Verskarten sind selbst
     Long-Press-Ziele, also erbte ihr Text das Auswahlverbot - auf dem Handy
     liess sich damit gar nichts auswaehlen, und der Textmarker konnte dort
     nur ganze Verse anstreichen. Hier gehoert das lange Druecken der nativen
     Wortauswahl; das Vers-Menue bleibt ueber Versnummer, Stellenangabe und
     Kartenrand erreichbar. Die Regeln stehen auf den Textkoerpern selbst und
     schlagen damit den geerbten Wert der Karte.
     Gespiegelt in VERSE_HIGHLIGHT_BODIES (app.js) - dieselben Flaechen. */
  .simple-flow-verse-text,
  .parallel-verse-text > span,
  .simple-verse-card > p,
  .entry-reading-text,
  p.entry-verse-text {
    -webkit-touch-callout: default;
    -webkit-user-select: text;
    user-select: text;
  }

  /* ... und solange eine Auswahl im Verstext steht, faellt das Verbot ganz.
     Der Textkoerper allein reicht nicht: iOS zeichnet die Ziehgriffe als
     Kreise ueber und unter die Zeile, also in den Innenabstand der Karte
     daneben. Dort war nichts auswaehlbar, der Griff nicht zu fassen und die
     Auswahl nicht zu erweitern. Die Klasse setzt markVerseTextSelectionOnBody
     im selectionchange - sie steht also, bevor der Finger den Griff sucht. */
  body.has-verse-text-selection .custom-longpress-target {
    -webkit-user-select: text;
    user-select: text;
  }
}

/* Auswahlleiste: auf Touch gibt es keinen Rechtsklick, also braucht eine
   bestehende Auswahl einen eigenen Weg zu den Farben. Fest oberhalb der
   App-Navigation statt an der Textstelle: Dort legt iOS sein eigenes
   Auswahlmenue ab, dessen Position fuer die Webseite nicht messbar ist.
   Unter .context-menu (z-index 100), damit ein geoeffnetes Menue vorne bleibt. */
.verse-highlight-bar {
  position: fixed;
  left: max(12px, calc((var(--vpw) - 560px) / 2));
  right: max(12px, calc((var(--vpw) - 560px) / 2));
  bottom: calc(80px + var(--safe-bottom) + var(--fix-bottom-gap));
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: 0 8px 24px rgb(0 0 0 / 22%);
  box-sizing: border-box;
}

/* Ausweichplatz, wenn der Platz unten auf der Auswahl laege: dort haengen auf
   iOS die Ziehgriffe, und eine Leiste darueber nimmt ihnen die Beruehrung -
   die Auswahl liesse sich dann nicht mehr erweitern. Gesetzt aus
   refreshVerseHighlightBar, sobald sich die Rechtecke ueberschneiden. */
.verse-highlight-bar.verse-highlight-bar-top {
  bottom: auto;
  top: calc(12px + var(--safe-top));
}

.verse-highlight-bar .verse-highlight-bar-scope {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

/* Wortweises Verschieben der Auswahlenden - der Ersatz für die nativen
   Ziehgriffe, die auf dem iPhone je nach Laufzeit kaum zu fassen sind (siehe
   docs/ios-textauswahl-untersuchung.md). Zwei Gruppen, weil vier gleiche Pfeile
   ohne Beschriftung nicht auseinanderzuhalten wären. */
.verse-highlight-bar .verse-highlight-bar-nudge {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 3px;
}

.verse-highlight-bar .verse-highlight-bar-nudge-label {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.verse-highlight-bar .verse-highlight-bar-nudge-button {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 26px;
  min-height: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: transparent;
  cursor: pointer;
}

/* Weg ins volle Vers-Menü. Durch den Trennstrich als eigene Sache erkennbar:
   die Farbtupfer wirken sofort, dieser Knopf öffnet erst etwas. */
/* Admin-only: Worte-Jesu-Markierung setzen/entfernen (JesusSpeechMark). */
.verse-highlight-bar .verse-highlight-bar-jesus-speech {
  flex: 0 0 auto;
  height: 26px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
}
.verse-highlight-bar .verse-highlight-bar-jesus-speech.active {
  background: var(--jesus-speech-color);
  border-color: var(--jesus-speech-color);
  color: #fff;
}

.verse-highlight-bar .verse-highlight-bar-more {
  flex: 0 0 auto;
  width: 30px;
  height: 26px;
  min-height: 0;
  padding: 0;
  margin-left: 2px;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

/* "Ansicht" of a list: popover below the header button (inline top/right
   from positionSimpleCollectionView), bottom sheet on phones. */
.simple-collection-view {
  position: fixed;
  z-index: 9500;
  width: min(420px, calc(var(--vpw) - 16px));
  max-height: calc(var(--vph) - 120px);
  overflow: auto;
  overscroll-behavior: contain;
  box-sizing: border-box;
  padding: 4px 14px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 24px 60px rgba(31, 45, 39, .26);
}
.simple-collection-view.is-dropdown { padding:12px 14px; border-radius:8px; }
.simple-collection-view.is-dropdown .simple-collection-view-head { display:none; }
.simple-collection-view.is-dropdown .simple-collection-view-group { padding:0; border:0; }
.simple-collection-view-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; }
.simple-collection-view-close { width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; color: var(--muted); background: transparent; }
.simple-collection-view-close:hover { background: var(--accent-soft); }
.simple-collection-view-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.simple-collection-view-group.is-toggles { display: flex; flex-wrap: wrap; }
.simple-collection-view-group.is-toggles > button { flex: 1 1 160px; min-height: 44px; }
.simple-collection-view-field { display: grid; gap: 4px; min-width: 0; }
.simple-collection-view-field label { color: var(--muted); font-size: .85rem; }
.simple-collection-view-field select { width: 100%; min-width: 0; min-height: 44px; }
.simple-collection-view-hint { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: .85rem; }
@media (max-width: 760px) {
  .simple-collection-view {
    left: 0 !important;
    /* !important: a popover opened on desktop keeps inline top/right when the
       window narrows to phone width. */
    right: 0 !important;
    top: auto !important;
    bottom: var(--fix-bottom-gap);
    width: var(--vpw);
    max-height: calc(var(--vph) * .8);
    padding-bottom: calc(14px + var(--safe-bottom));
    border-bottom: 0;
    border-radius: 20px 20px 0 0;
  }
}
.bible-location-picker-current { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; padding-right: 48px; }
.bible-location-picker-current-label { min-width: 0; overflow-wrap: anywhere; color: var(--muted); }
.bible-location-picker-current-verses,
.bible-location-picker-current-chapters { flex: 0 0 auto; min-height: 36px; padding: 0 12px; white-space: nowrap; }

.context-menu button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  text-align: left;
  padding: 0 10px;
}

/* Feste Icon-Spalte: ohne sie klebte die Beschriftung am Glyph, und weil die
   Glyphen unterschiedlich breit sind, rückten die Beschriftungen im selben Menü
   verschieden weit ein. */
.context-menu button > .fa-icon {
  flex: none;
  width: 1.15em;
  text-align: center;
}

/* Entries without an icon in a menu with icons keep the label column. */
.context-menu:has(> button > .fa-icon) > button:not(:has(> .fa-icon, > .button-icon-stack))::before,
.context-menu-group:has(> button > .fa-icon) > button:not(:has(> .fa-icon, > .button-icon-stack))::before {
  content: "";
  flex: none;
  width: 1.15em;
}

.context-menu button:hover {
  background: var(--accent-soft);
}

.context-menu button.markdown-callout-option {
  background: color-mix(in srgb, var(--md-callout-color) 12%, transparent);
}

.context-menu button.markdown-callout-option:hover {
  background: color-mix(in srgb, var(--md-callout-color) 22%, transparent);
}

.context-menu button.markdown-callout-option > .fa-icon {
  color: var(--md-callout-color);
}

.context-menu button:disabled {
  opacity: .45;
}

.context-menu .danger-menu-item {
  color: var(--danger);
}

.context-menu button.is-current {
  background: var(--bg-soft, #f4f7ff);
}
:where(html.theme-dark) .context-menu button.is-current { background:var(--bg-soft, var(--panel)); } /* dark:gen */

.content-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.items-list {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.item-row {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  text-align: left;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  padding: 10px;
  min-width: 0;
  align-items: start;
}

.item-row.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.item-title {
  font-weight: 700;
  overflow-wrap: anywhere;
}

.form-hint,
.item-preview,
.item-tags,
.status,
.eyebrow,
.empty-state,
.sort-label,
.detail-status {
  color: var(--muted);
}

.form-hint {
  margin: 0;
}
body.workspace-tone-warm .ws-share-list .form-hint {
  border: 1px solid color-mix(in srgb, var(--accent) 14%, var(--line));
  border-radius: 10px;
  padding: 12px 14px;
  background: color-mix(in srgb, var(--accent-soft) 22%, var(--panel));
  color: color-mix(in srgb, var(--muted) 78%, var(--text));
}

.item-preview {
  margin-top: 4px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.item-tags {
  font-size: 12px;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.item-stage {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.entry-state {
  margin-top: 4px;
  color: var(--danger);
}

.detail h2 {
  margin: 0;
  font-size: 18px;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  text-transform: uppercase;
}

.sort-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.sort-label {
  font-size: 13px;
}

.sort-buttons {
  display: flex;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.sort-btn {
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

.sort-btn.button-text-mode {
  font-size: 12px;
  min-width: 92px;
}

.sort-buttons .sort-btn + .sort-btn {
  border-left: 1px solid var(--line);
}

.sort-btn.active {
  background: var(--accent);
  color: var(--on-accent, #fff);
}

.sort-btn:disabled {
  cursor: default;
  opacity: .45;
}

.sort-btn.active:disabled {
  background: var(--accent-soft);
  color: var(--muted);
}

.sort-stack {
  position: relative;
  display: inline-grid;
  width: 1.55em;
  height: 1.25em;
  place-items: center;
}

.sort-stack-base {
  font-size: 1em;
}

.sort-stack-arrow {
  position: absolute;
  right: -0.05em;
  bottom: -0.1em;
  font-size: .58em;
  text-shadow:
    0 1px 0 var(--panel),
    1px 0 0 var(--panel),
    0 -1px 0 var(--panel),
    -1px 0 0 var(--panel);
}

.sort-btn.active .sort-stack-arrow {
  text-shadow:
    0 1px 0 var(--accent),
    1px 0 0 var(--accent),
    0 -1px 0 var(--accent),
    -1px 0 0 var(--accent);
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--accent);
  min-height: auto;
  padding: 0;
  font-size: 12px;
  text-decoration: underline;
}

.link-button[aria-pressed="true"] {
  font-weight: 700;
}

.note-box {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  padding: 12px 16px;
  font-size: 13.5px;
  line-height: 1.6;
  margin-top: 16px;
}

.detail-tag-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.capture-tag-picker {
  min-height: 32px;
}

/* On-demand tag picker: full suggestion list only appears as a dropdown while
   the input is focused, so it no longer permanently inflates the dialogs. */
.field.has-tag-popup,
.entry-field.has-tag-popup {
  position: relative;
}

.detail-tag-picker.tag-picker-popup {
  display: none;
}

.detail-tag-picker.tag-picker-popup.open {
  display: flex;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 40;
  margin-top: 4px;
  max-height: 220px;
  overflow-y: auto;
  padding: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(20, 16, 60, .18);
}
.detail-tag-picker.tag-picker-popup.open.empty {
  display: none;
}

/* Im Dossier ist die Vorschlagsliste keine schwebende Miniatur unter dem
   Suchfeld: Der Dialog reserviert ihr einen eigenen, ausreichend hohen Bereich.
   So bleiben mehrere Tags gleichzeitig erreichbar, ohne hinter dem Footer zu
   verschwinden. */
.verse-dossier-tag-editor .detail-tag-picker.tag-picker-popup.open {
  position: static;
  max-height: min(320px, calc(var(--vph) * .42));
  box-shadow: none;
}

.tag-manager {
  display: grid;
  gap: 6px;
}

.tag-manager-row {
  display: flex;
  gap: 6px;
  align-items: center;
}

.tag-manager-row input {
  flex: 1;
  min-width: 0;
  min-height: 34px;
}

.tag-count {
  color: var(--muted);
  font-size: 13px;
}

.tag-manager-row .danger-button {
  flex-shrink: 0;
  padding: 0 10px;
  min-height: 34px;
}

/* ── Tag cloud (Tag-Suchmodus) ────────────────────────────────────────────── */
.capture-tag-cloud-field {
  display: grid;
  gap: 6px;
}

.capture-tag-cloud-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.capture-tag-cloud-head > span {
  font-size: 13px;
  color: var(--muted);
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
}

.tag-cloud .chip {
  cursor: pointer;
}

.capture-options-action {
  width: 100%;
}

/* ── Themen-Vorschläge in der Bibelsuche ──────────────────────────────────── */
.capture-library-suggest {
  display: grid;
  gap: 6px;
  margin: 4px 0 10px;
  padding: 8px 10px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

.capture-library-suggest-label {
  font-size: 13px;
  color: var(--muted);
}

.capture-library-suggest-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ── Tag-Manager modal ────────────────────────────────────────────────────── */
.tag-manager-modal {
  max-width: 520px;
}

.tag-manager-create {
  margin-bottom: 12px;
}

.tag-manager-list {
  display: grid;
  gap: 6px;
  max-height: calc(var(--vph) * 0.5);
  overflow-y: auto;
}

.tag-manager-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.tag-manager-actions button {
  flex: 1 1 auto;
  min-height: 34px;
}

/* Shared favorites and account history. */
.quick-access-dialog {
  width: min(680px, calc(var(--vpw) - 24px));
  max-height: calc(var(--vph) - 24px);
  box-sizing: border-box;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
}
.quick-access-dialog[open] { display: flex; flex-direction: column; gap: 10px; }
.quick-access-dialog::backdrop { background: rgb(0 0 0 / 35%); }
.quick-access-dialog > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.quick-access-dialog h2 { margin: 0; font-size: 1.2rem; }
.quick-access-dialog > header h2 { min-width: 0; overflow-wrap: anywhere; }
.quick-access-dialog > header button { max-width: 45%; white-space: normal; }
.quick-access-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.quick-access-tabs button[aria-pressed="true"], .quick-access-category-chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.quick-access-dialog input { flex-shrink: 0; width: 100%; min-width: 0; box-sizing: border-box; }
.quick-access-categories { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 44px; flex-shrink: 0; }
.quick-access-category-chip { min-height: 36px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--text); font: 600 .88rem/1.2 system-ui, sans-serif; cursor: pointer; }
.quick-access-dialog .form-hint { margin: 0; }
.quick-access-results { overflow-y: auto; min-height: 0; overscroll-behavior: contain; }
.quick-access-results h3 { margin: 12px 0 6px; font-size: 1rem; }
.quick-access-row { display: flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--line); padding: 6px 0; }
.quick-access-row .simple-choice { flex: 1; min-width: 0; }
.quick-access-row > button { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.quick-access-row > .secondary { flex: 0 0 auto; }
@media (max-width: 600px) {
  .quick-access-dialog { width: var(--vpw); max-width: none; max-height: var(--vph); height: var(--vph); margin: 0; border-radius: 0; padding: calc(12px + var(--safe-top)) 12px calc(12px + var(--safe-bottom)); }
  .quick-access-row { flex-wrap: wrap; }
  .quick-access-row:has(.button-text-mode) .simple-choice { flex-basis: 100%; }
}

/* ── Generic in-app dialog (prompt/confirm) ───────────────────────────────── */
.ui-dialog-modal {
  max-width: 440px;
}

.ui-dialog-message {
  margin: 0 0 12px;
  line-height: 1.5;
  color: var(--text);
}

.copy-format-form { display: grid; gap: 10px; min-width: 0; }
.copy-format-form select, .copy-format-form input[type="text"], .copy-format-form textarea {
  width: 100%; min-width: 0; box-sizing: border-box;
}
.copy-format-form .field { display: grid; gap: 6px; }
.copy-format-form select, .copy-format-form button { white-space: normal; overflow-wrap: anywhere; }
.copy-format-preview { white-space: pre-wrap; overflow-wrap: anywhere; min-width: 0; margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); font: inherit; }
.copy-format-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.copy-format-actions button { max-width: 100%; }

.share-access-form label { display: flex; flex-direction: column; gap: 6px; }
.ui-dialog-modal.ui-dialog-modal { max-height: calc(var(--vph) - 24px); grid-template-rows: auto minmax(0, 1fr) auto; }
.share-access-form label[hidden] { display: none; }
.share-access-form select { width: 100%; min-width: 0; }

/* Liste der Zielgruppen einer Freigabe: eine Zeile je Zugang, Name links,
   Aktionen rechts. Die Zeilen sind bewusst schlicht - sie zeigen einen
   Zustand, sie sind keine Karten. */
/* Sprachfassungen einer Sammlung als Reiter - sie sind eigene Freigaben, sollen
   aber nicht in einem anderen Dialog versteckt sein. */
.share-language-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.share-language-tab {
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.share-language-tab[aria-selected="true"] {
  color: var(--text);
  border-color: currentColor;
  font-weight: 600;
  cursor: default;
}

/* Tagesbalken der Besucherzahlen im Teilen-Dialog; Höhe kommt inline in Prozent. */
.share-visits-chart {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 64px;
  border-bottom: 1px solid var(--line);
}
.share-visits-chart-small { height: 28px; min-width: 120px; }
.share-visits-bar {
  flex: 1;
  min-height: 2px;
  background: var(--accent);
  border-radius: 2px 2px 0 0;
}

.share-access-list { display: flex; flex-direction: column; gap: 8px; }
.share-access-list h3 { margin: 0; font-size: .95rem; }
.share-access-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.share-access-row > strong { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.share-access-note { flex: 0 1 auto; color: var(--muted); font-size: .85rem; }
.share-access-translation { flex: 0 1 auto; max-width: 100%; }
.share-access-remove { flex: 0 0 auto; }
@media (max-width: 480px) {
  .share-access-row > strong { flex-basis: 100%; }
  .share-access-remove { margin-left: auto; }
}
.sharing-transfer-hint { flex-basis: 100%; color: var(--muted); font-size: .85rem; margin: 6px 0 0; }

.ui-dialog-input {
  width: 100%;
  box-sizing: border-box;
  min-height: 38px;
}

.ui-dialog-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.ui-dialog-footer button { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }

.settings-pron-edit-voice-field {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: auto;
}
.settings-pron-edit-voice-field > span {
  white-space: nowrap;
}

.ui-dialog-modal:has(.custom-smart-list-editor) {
  max-width: 720px;
}

.ui-dialog-modal:has(.study-note-content) {
  max-width: 720px;
}

.ui-dialog-modal:has(.strong-definition-content) {
  max-width: 720px;
}

.ui-dialog-modal:has(.sync-conflict-comparison) {
  width: min(780px, 100%);
  max-width: 780px;
  max-height: calc(var(--vph) - 24px);
}

.ui-dialog-modal:has(.sync-conflict-comparison) .ui-dialog-footer {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ui-dialog-modal:has(.sync-conflict-comparison) .ui-dialog-footer button {
  min-width: 0;
  white-space: normal;
}

.sync-conflict-field {
  margin-top: 14px;
}

.sync-conflict-field-heading {
  font-weight: 700;
}

.sync-conflict-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 5px;
}

.sync-conflict-value {
  min-width: 0;
}

.sync-conflict-value-heading {
  margin-bottom: 4px;
  font-size: .85em;
  font-weight: 600;
  opacity: .7;
}

.sync-conflict-value-body {
  max-height: min(calc(var(--vph) * .46), 480px);
  padding: 8px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--panel) 88%, var(--bg));
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 520px) {
  .sync-conflict-columns {
    grid-template-columns: minmax(0, 1fr);
  }

  .sync-conflict-value-body {
    max-height: min(calc(var(--vph) * .34), 320px);
  }
}

/* Strong-Verweis im Begleittext ("{Bibeltext: G26}", siehe
   renderCompanionStrongToken): bewusst als leise Pille im Fliesstext - erkennbar
   klickbar, aber ohne den Lesefluss so zu zerschneiden wie ein aufgelöstes
   Bibelzitat. Klick öffnet den Studien-Inspektor. */
.strong-token {
  display: inline-block;
  padding: 0 .4em;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  cursor: pointer;
  font-size: .9em;
  white-space: nowrap;
}

.strong-token:hover {
  background: color-mix(in srgb, var(--accent) 22%, transparent);
}

.strong-definition-content {
  display: grid;
  gap: 12px;
  max-height: min(calc(var(--vph) * 0.65), 620px);
  overflow-y: auto;
  padding-right: 4px;
}

.strong-definition-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.strong-definition-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.strong-audio-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.strong-definition-card > p {
  margin: 0;
  white-space: pre-line;
}

.strong-definition-section {
  display: grid;
  gap: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.strong-definition-section > h3 {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
}

.strong-definition-section > p {
  margin: 0;
  white-space: pre-line;
}

.strong-usage {
  display: grid;
  gap: 10px;
  margin-top: 4px;
}

.strong-usage-toggle {
  justify-self: start;
}

.strong-usage-list {
  display: grid;
  gap: 8px;
}

.strong-usage-row {
  display: grid;
  gap: 4px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.strong-usage-reference,
.strong-usage-text {
  margin: 0;
}

.study-note-content {
  display: grid;
  gap: 14px;
  max-height: min(calc(var(--vph) * 0.65), 620px);
  overflow-y: auto;
  padding-right: 4px;
}

.study-note-content > p,
.study-note-reference-group,
.study-note-passage p {
  margin: 0;
}

.study-note-reference-group {
  display: grid;
  gap: 10px;
}

.study-note-passage {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.study-note-passage p {
  white-space: pre-line;
}

.study-note-passage button {
  justify-self: start;
}

.study-reference-preview-actions { display:flex; flex-wrap:wrap; gap:8px; }

/* The translation comparison inside the study inspector: the dialog card without its modal chrome. */
.changelog-modal.compare-in-inspector {
  display: block;
  flex: 0 0 auto;
  overflow: visible;
  max-width: none !important;
  width: auto !important;
  max-height: none;
  background: none;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  animation: none;
}
.compare-in-inspector .changelog-header,
.compare-in-inspector .changelog-footer { display: none !important; }
.compare-in-inspector .changelog-body { max-height: none !important; overflow: visible !important; padding: 0 !important; }
.compare-header-actions { display: flex; align-items: center; gap: 10px; }
.sanctuary-inspector-body:has(> .compare-in-inspector) { min-height: 0; overscroll-behavior-y: contain; }
.sanctuary-inspector-head:has(.compare-back-button) { flex-shrink: 0; }
.compare-back-button { display:inline-flex; align-items:center; gap:7px; }
.study-reference-preview-back { display:inline-flex; align-items:center; gap:7px; }

.study-note-loading,
.study-note-error {
  color: var(--muted);
}
.custom-smart-list-editor {
  display: grid;
  gap: 12px;
}
.custom-smart-list-editor > label {
  display: grid;
  gap: 5px;
  font-weight: 600;
}
.custom-smart-list-editor input,
.custom-smart-list-editor select {
  width: 100%;
  box-sizing: border-box;
}
.custom-smart-list-rules {
  display: grid;
  gap: 8px;
}
.custom-smart-list-rule {
  display: grid;
  grid-template-columns: minmax(90px, auto) minmax(130px, 1fr) minmax(70px, 100px) minmax(90px, auto) auto;
  gap: 8px;
  align-items: center;
}
.custom-smart-list-rule-remove {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.custom-smart-list-rule-remove:hover {
  background: var(--accent-soft);
  color: var(--text);
}
.custom-smart-list-add {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.custom-smart-list-preview {
  padding: 10px 12px;
  border-radius: 9px;
  background: var(--accent-soft);
  font-weight: 600;
}

@media (max-width: 600px) {
  .custom-smart-list-rule {
    grid-template-columns: 1fr;
  }
  .custom-smart-list-rule-remove {
    justify-self: end;
  }
}

.field {
  display: grid;
  gap: 4px;
}

.field > span {
  font-size: 12px;
  color: var(--muted);
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-actions #detailSaveButton {
  flex: 1;
  min-width: 120px;
}

.danger-button {
  background: transparent;
  color: var(--danger);
  border-color: var(--danger);
}

.detail-status {
  min-height: 18px;
  margin: 0;
  font-size: 13px;
}

.detail-status.error {
  color: var(--danger);
}

.status {
  min-height: 24px;
  margin: 12px 0 0;
}
body.workspace-tone-warm .status:not(:empty) {
  display: inline-block;
  max-width: 100%;
  padding: 8px 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 14%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent-soft) 26%, var(--panel));
  color: color-mix(in srgb, var(--accent) 72%, var(--text));
}

.status.error,
.form-hint.error {
  color: var(--danger);
}
.status.status-dismissible { cursor:pointer; }
.status-report-button {
  min-height: 30px;
  margin-left: 6px;
  padding: 0 12px;
  font-size: 0.9em;
}

/* Fehler in #statusText sonst leicht übersehen (unscheinbarer Text ganz unten
   in <main>, kann durch langen Inhalt oder Scroll-Position aus dem Blickfeld
   geraten) - deshalb als fixierter, auffälliger Hinweis statt in-flow. */
.status.error:not(:empty) {
  position: fixed;
  left: 50%;
  bottom: calc(max(16px, var(--safe-bottom)) + var(--fix-bottom-gap));
  transform: translateX(-50%);
  z-index: 9500;
  max-width: min(calc(var(--vpw) * 0.92), 32rem);
  margin: 0;
  padding: 10px 16px;
  border: 1px solid color-mix(in srgb, var(--danger) 30%, var(--line));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--danger) 12%, var(--panel));
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
  color: var(--danger);
  text-align: center;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  margin: 0;
  padding: 18px;
  text-align: center;
}

.panel-card {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius);
  padding: 12px;
}

/* Capture als Rechts-Sheet (überlagert den Arbeitsbereich, ersetzt den alten Tab). */
.capture-sheet-backdrop {
  position: fixed;
  inset: 0 var(--fix-right-gap) var(--fix-bottom-gap) 0;
  z-index: 9600;
  background: rgba(0, 0, 0, 0.34);
}

.capture-sheet-backdrop[hidden] {
  display: none;
}

.capture-panel {
  position: fixed;
  top: 0;
  right: var(--fix-right-gap);
  bottom: var(--fix-bottom-gap);
  z-index: 9601;
  width: min(560px, var(--vpw));
  overflow: auto;
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 16px;
  background: var(--panel);
  border-left: 1px solid var(--line);
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.18);
}

/* display:grid würde das hidden-Attribut überschreiben — explizit zurücksetzen. */
.capture-panel[hidden] {
  display: none;
}

/* Forscher-Modus: breiteres Sheet für ausgiebiges Stöbern/Fassungsvergleich.
   Gemerkt via localStorage; Default ist das schmale Sammler-Sheet. */
.capture-panel.expanded {
  width: min(960px, 100%);
}

.capture-panel.compact-entry-edit {
  width: min(760px, 100%);
  max-width: var(--vpw);
  overflow-x: hidden;
}
.capture-panel.compact-entry-edit .capture-card > :not(.capture-sheet-head):not(.capture-compact-entry) {
  display: none;
}
.capture-panel.compact-entry-edit .capture-options-wrap,
.capture-panel.compact-entry-edit #captureSheetExpandButton {
  display: none;
}
.capture-compact-entry {
  min-width: 0;
  max-width: 100%;
  margin-top: 12px;
  overflow: visible;
}
.capture-panel.compact-entry-edit .capture-card,
.capture-panel.compact-entry-edit .collection-entry {
  min-width: 0;
  max-width: 100%;
}

/* Wenn das Dossier gleichzeitig offen ist, teilen sich Bearbeitung und
   Studien-Inspector den Desktop nebeneinander statt sich zu überdecken. */
@media (min-width: 721px) {
  body.study-inspector-open .capture-panel.compact-entry-edit {
    right: calc(420px + var(--mitschrift-dock-w) + var(--fix-right-gap));
    width: min(760px, calc(var(--vpw) - 420px - var(--mitschrift-dock-w) - 16px));
  }
  body.study-inspector-docked .capture-panel.compact-entry-edit {
    right: calc(var(--right-dock-w) + var(--fix-right-gap));
    width: min(760px, calc(var(--vpw) - var(--right-dock-w) - 16px));
  }
}

/* Aus einer geführten Sammlung wird dieselbe bewährte Bibelsuche als ruhige
   Vollseitenfläche gezeigt, nicht als schmales Classic-Seitenpanel. */
.capture-panel.guided-collection-add {
  left: 0;
  width: auto;
  border-left: 0;
  box-shadow: none;
}
.capture-panel.guided-collection-add .capture-card {
  width: min(960px, 100%);
  margin-inline: auto;
}
.capture-panel.guided-collection-add #captureSheetExpandButton { display: none; }

/* Master-Detail: Trefferliste + Detail liegen zusammen im Sheet, damit die
   Liste beim Bearbeiten sichtbar bleibt (kein Vollbild-Modal mehr). */
.capture-workarea {
  display: block;
}

/* Detail als Inline-Panel statt Overlay. */
.capture-detail {
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 12px;
}

.capture-detail[hidden] {
  display: none;
}

.capture-draft-status {
  margin: 8px 0 0;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
}

#captureSaveButton.capture-draft-dirty {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

.capture-detail .content-header {
  margin-bottom: 10px;
}
.capture-detail--inline {
  margin: 4px 0 10px 18px;
  border-left: 3px solid var(--accent);
  box-shadow: 0 6px 20px rgba(79, 47, 216, .1);
}

/* Breites Sheet + offenes Detail: zwei Spalten (Liste | Detail), beide eigen
   scrollbar. .detail-open wird per JS gesetzt, damit die leere Spalte bei
   geschlossenem Detail nicht die Liste halbiert. */
.capture-panel.expanded.detail-open .capture-workarea {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.capture-panel.expanded.detail-open .capture-detail {
  margin-top: 0;
  max-height: calc(var(--vph) - 240px);
  overflow-y: auto;
}

/* Schmales (gestapeltes) Sheet mit offenem Detail: Liste kürzer halten, damit
   das darunterliegende Detail ohne langes Scrollen sichtbar ist. */
.capture-panel.detail-open:not(.expanded) .capture-results {
  max-height: calc(var(--vph) * 0.38);
}

/* Desktop collection capture scrolls in the outer panel, including inline details. */
@media (min-width: 721px) {
  .capture-panel.guided-collection-add .capture-results,
  .capture-panel.guided-collection-add.detail-open .capture-results {
    max-height: none;
    overflow: visible;
  }
}

.capture-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.stats-panel {
  display: grid;
  gap: 12px;
}

.stats-card {
  display: grid;
  gap: 14px;
}

.stats-title-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.stats-title-row .card-title {
  margin: 0;
}

.stats-scope-field {
  min-width: min(260px, 100%);
  margin: 0;
}

.stats-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.stats-kpi {
  display: grid;
  gap: 4px;
  min-height: 104px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--panel), var(--accent-soft));
}

.stats-kpi span,
.stats-kpi small {
  color: var(--muted);
}

.stats-kpi strong {
  font-size: 30px;
  line-height: 1.1;
}

.stats-visual-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.stats-visual-panel {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

.stats-visual-panel h3 {
  margin: 0;
  font-size: 15px;
}

.stats-donut-wrap {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.stats-donut {
  position: relative;
  width: 156px;
  aspect-ratio: 1;
  border-radius: 50%;
}

.stats-donut::after {
  content: "";
  position: absolute;
  inset: 20px;
  border-radius: 50%;
  background: var(--panel);
}

.stats-donut-center {
  position: absolute;
  inset: 34px;
  z-index: 1;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 50%;
}

.stats-donut-center strong {
  font-size: 28px;
  line-height: 1;
}

.stats-donut-center span {
  color: var(--muted);
  font-size: 12px;
}

.stats-legend {
  display: grid;
  gap: 8px;
}

.stats-legend span {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--muted);
}

.stats-legend i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.stats-bar-chart {
  display: grid;
  gap: 9px;
}

.stats-bar-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 32px;
  gap: 8px;
  align-items: center;
}

.stats-bar-row span {
  color: var(--muted);
  font-size: 13px;
}

.stats-bar-row strong {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.stats-bar-track,
.stats-collection-track {
  overflow: hidden;
  height: 12px;
  border-radius: 999px;
  background: var(--line);
}

.stats-bar-track i,
.stats-collection-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.stats-bar-track .stage-0 { background: #7c3aed; }
.stats-bar-track .stage-1,
.stats-bar-track .stage-2 { background: #e11d48; }
.stats-bar-track .stage-3,
.stats-bar-track .stage-4 { background: #0891b2; }
.stats-bar-track .stage-5 { background: #16a34a; }

.stats-due-chart {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  min-height: 180px;
  align-items: end;
}

.stats-due-col {
  display: grid;
  grid-template-rows: auto minmax(72px, 1fr) auto;
  gap: 6px;
  min-width: 0;
  align-items: end;
  text-align: center;
}

.stats-due-col i {
  width: 100%;
  max-width: 34px;
  justify-self: center;
  border-radius: 999px 999px 4px 4px;
  background: linear-gradient(180deg, #f59e0b, #e11d48);
}

.stats-due-col strong {
  font-variant-numeric: tabular-nums;
}

.stats-due-col span {
  color: var(--muted);
  font-size: 12px;
}

.stats-collection-list {
  display: grid;
  gap: 10px;
}

.stats-collection-row {
  display: grid;
  gap: 6px;
}

.stats-collection-row > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.stats-collection-row strong,
.stats-collection-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats-collection-row span {
  color: var(--muted);
  flex: 0 0 auto;
  font-size: 13px;
}

.stats-collection-track i {
  background: linear-gradient(90deg, #0891b2, #16a34a);
}

/* Must follow the base stats rules: same specificity, so source order decides. */
@media (max-width: 620px) {
  .stats-title-row {
    display: grid;
  }

  .stats-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats-visual-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .stats-donut-wrap {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
  }

  .stats-legend {
    justify-self: stretch;
  }
}

.capture-card {
  width: 100%;
}

.capture-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.capture-title-row .card-title {
  margin: 0;
}

.capture-source-toggle {
  display: inline-flex;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.capture-source-button {
  width: 40px;
  min-height: 36px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--panel);
  color: var(--muted);
  opacity: .65;
}

.capture-source-button.button-text-mode {
  width: auto;
  min-width: 96px;
  padding: 0 12px;
  font-size: 13px;
}

.capture-source-button + .capture-source-button {
  border-left: 1px solid var(--line);
}

.capture-source-button.active {
  background: var(--accent);
  color: var(--on-accent, #fff);
  opacity: 1;
}

.admin-panel {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.admin-card {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.settings-panel {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.settings-card {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.settings-card > .card-title {
  margin-bottom: 14px;
  font-size: 18px;
}

.settings-form {
  display: grid;
  gap: 0;
  min-width: 0;
}

.settings-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 18px;
  align-items: end;
  min-width: 0;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.settings-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.settings-row:last-child {
  padding-bottom: 0;
}

.settings-row > div,
.settings-row > label,
.settings-row > button,
.settings-row > span {
  align-self: end;
}

.settings-row > div {
  display: grid;
  gap: 7px;
}

.settings-row .field {
  gap: 6px;
}

/* Bei "Nach der Kapitelwahl" hängt unter der Auswahl noch ein Hinweis. Mit dem
   sonst üblichen align-items:end zöge der die Auswahl nach oben und säße nicht
   mehr auf einer Linie mit dem Zahlenfeld daneben - hier also oben ausrichten.
   Bibelfarben hat dasselbe Problem: die Buchgruppen-Liste rechts ist meist
   länger als Auswahl + Hinweis links, align-items:end schöbe die dadurch ganz
   nach unten mit viel Leerraum darüber. */
.bible-navigation-settings,
.bible-color-settings-row {
  align-items: start;
}
.bible-navigation-settings > div,
.bible-navigation-settings > label,
.bible-color-settings-row > div {
  align-self: start;
}

.settings-row .field > span,
.settings-row .field > legend,
.settings-row > div > span,
.settings-color-row > span,
.settings-pron-toolbar > span {
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.25;
}

.setting-study-sources {
  border: 0;
  margin: 0;
  padding: 0;
}

.setting-study-sources > div,
.simple-study-sources,
.callout-filter-options,
.simple-callout-filter-options {
  display: grid;
  gap: 8px;
}

.setting-study-sources label,
.simple-study-sources label,
.callout-filter-options label,
.simple-callout-filter-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
}

.setting-study-sources input,
.simple-study-sources input,
.callout-filter-options input,
.simple-callout-filter-options input {
  width: 18px;
  height: 18px;
}

/* Jede Studienquelle steht jetzt in einer Zeile (statt direkt als <label>), damit
   neben der Checkbox noch der "i"-Aufklapper und ggf. die Sortierpfeile Platz
   finden - siehe appendStudySourceInfoToggle/appendStudySourceMoveButtons. */
.study-source-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 6px;
}

.study-source-row > label {
  flex: 1 1 0;
  min-width: 0;
}

.study-source-info-toggle,
.study-source-move-up,
.study-source-move-down {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 0;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
}

.study-source-info-toggle:hover,
.study-source-info-toggle[aria-expanded="true"],
.study-source-move-up:hover:not(:disabled),
.study-source-move-down:hover:not(:disabled) {
  border-color: var(--line);
  background: var(--accent-soft);
  color: var(--accent);
}

.study-source-move-up:disabled,
.study-source-move-down:disabled {
  opacity: 0.35;
  cursor: default;
}

.study-source-move-buttons {
  display: inline-flex;
  gap: 2px;
  flex: 0 0 auto;
}

/* Flächenbündig statt unter der Checkbox eingerückt - jedes Zeichen Breite hilft
   gegen Umbrüche, siehe Nutzer-Feedback zum abgerissenen letzten Wort. */
.study-source-description {
  flex-basis: 100%;
  margin: 2px 0 4px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}

/* Jede Zeile trägt zusätzlich die "md-callout-{typ}"-Klasse (siehe
   calloutFilterCheckboxGroup in app.js) - dieselbe Farbe wie die Box selbst
   (--md-callout-color, siehe oben), damit der Filter auf einen Blick zeigt,
   wie der jeweilige Typ inline aussieht. */
.callout-filter-options label,
.simple-callout-filter-options label {
  border-radius: 6px;
  padding: 2px 8px 2px 7px;
  border-left: 3px solid var(--md-callout-color, transparent);
  background: color-mix(in srgb, var(--md-callout-color, transparent) 10%, transparent);
}
.callout-filter-item-icon {
  color: var(--md-callout-color, var(--muted));
}

/* Vorlese-Bestandteile: die Beschriftungen dürfen nicht als unlesbare
   Inline-Kette aneinanderkleben (besonders im schmalen Dialog). */
#readAloudConfigComponents {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 6px 10px;
  margin-top: 8px;
}
#readAloudConfigComponents .check-row {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  min-width: 0;
  min-height: 32px;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
#readAloudConfigComponents .check-row input {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin: 1px 0 0;
}

/* Begleittext-Karten, deren gesamter Inhalt der aktive Callout-Filter
   weggefiltert hat (siehe renderCompanionDisplayMarkdown) - komplett
   ausblenden statt eine leere Karte stehen zu lassen. */
.callout-filtered-hidden {
  display: none !important;
}

.settings-row select,
.settings-row input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
.settings-row textarea,
.settings-pron-toolbar input {
  width: 100%;
  color: var(--text);
  font-weight: 500;
}

.settings-row input[type="range"] {
  width: 100%;
  min-width: 0;
}

.settings-row .form-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.settings-row .capture-learn {
  align-items: center;
}

.settings-row .capture-learn > input {
  margin-top: 0;
}

.settings-row .capture-learn > span {
  color: var(--text);
  font-weight: 500;
}

.settings-row .muted-line {
  align-self: center;
  justify-self: start;
  min-width: 56px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.settings-row > *,
.settings-row .field,
.admin-card .field,
.admin-card label,
.admin-card select,
.admin-card input {
  min-width: 0;
  max-width: 100%;
}

.settings-card p,
.settings-card span,
.settings-card label,
.admin-card p,
.admin-card span,
.admin-card label {
  overflow-wrap: anywhere;
}

.admin-card .content-header > span {
  min-width: 0;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}

/* AP1: Toggles für aktivierte Bibel-Inhaltssprachen, oberhalb der
   Übersetzungsliste. Nur sichtbar, wenn das Manifest >1 Sprache anbietet. */
.bible-language-toggles {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.bible-reference-preferences {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.bible-reference-preferences .form-hint {
  grid-column: 1 / -1;
  margin: 0;
}

@media (max-width: 640px) {
  .bible-reference-preferences {
    grid-template-columns: 1fr;
  }
}
.bible-language-toggle {
  margin: 0;
}
.bible-language-toggle input:disabled {
  opacity: .5;
}

.bible-manifest-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.bible-manifest-item {
  display: grid;
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.bible-manifest-item.active {
  margin: 0 -10px;
  padding: 10px;
  border: 1px solid #4b9b5f;
  border-radius: var(--radius);
  background: rgba(75, 155, 95, .08);
}
.bible-manifest-item.disabled {
  opacity: .55;
}
.bible-manifest-item.dragging {
  opacity: .35;
}
.bible-manifest-item.drop-target {
  border-color: var(--accent);
  border-style: dashed;
}

.bible-manifest-item:first-child {
  border-top: 0;
  padding-top: 10px;
}

.bible-manifest-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  list-style: none;
}
.bible-manifest-header::-webkit-details-marker {
  display: none;
}
.bible-manifest-body {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}
.bible-manifest-grip {
  color: var(--muted);
  cursor: grab;
  user-select: none;
}

.bible-manifest-main {
  display: grid;
  gap: 2px;
  flex: 1 1 auto;
  min-width: 0;
}

.bible-manifest-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.bible-manifest-move {
  width: 34px;
  min-height: 34px;
  padding: 0;
  font-size: 14px;
  line-height: 1;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
}
.bible-manifest-move:disabled {
  opacity: .4;
}

.bible-manifest-current {
  color: #16803c;
  font-size: 13px;
  font-weight: 700;
}
:where(html.theme-dark) .bible-manifest-current { color:#aceac2; } /* dark:gen */

.bible-manifest-main span,
.bible-manifest-meta {
  color: var(--muted);
  font-size: 13px;
}

.bible-manifest-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.bible-manifest-license {
  margin: 0;
  font-size: 13px;
}

.bible-manifest-attribution {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.bible-promotion-details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  font-size: 13px;
}

.bible-promotion-details summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 6px 10px;
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

.bible-promotion-details summary::-webkit-details-marker {
  display: none;
}

.bible-promotion-details summary .fa-icon {
  color: var(--accent);
}

.bible-promotion-body {
  display: grid;
  gap: 8px;
  padding: 0 10px 10px;
  color: var(--muted);
}

.bible-promotion-body p {
  margin: 0;
}

.bible-promotion-body a {
  color: var(--accent);
}

.bible-promotion-inline {
  margin-top: 2px;
}

.bible-manifest-license a {
  color: var(--accent);
}

.bible-manifest-meta span:not(:last-child)::after {
  content: "·";
  margin-left: 6px;
}

.markdown-content {
  display: grid;
  gap: 12px;
}

.markdown-content:empty {
  min-height: 120px;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content p,
.markdown-content ul,
.markdown-content ol {
  margin: 0;
}

.markdown-content h1 {
  font-size: 24px;
}

.markdown-content h2 {
  font-size: 19px;
}

.markdown-content h3 {
  font-size: 16px;
}

.markdown-content ul,
.markdown-content ol {
  padding-left: 20px;
}

.markdown-content blockquote {
  margin: 0;
  padding: 4px 12px;
  border-left: 3px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--text);
}

.markdown-content blockquote p {
  margin: 2px 0;
}

.admin-report {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.admin-report p {
  margin: 0;
}

.admin-report-list {
  display: grid;
  gap: 10px;
}

.admin-report-group {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
}

.admin-report-group h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.admin-report-group ul {
  margin: 0;
  padding-left: 18px;
}

/* ── Admin Dashboard & Tables ────────────────────────────────────────────── */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 8px;
  margin-bottom: 8px;
}

.stat-box {
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  display: grid;
  gap: 4px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.stat-box.clickable {
  cursor: pointer;
}

.stat-box.clickable:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
}

.stat-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.admin-tts-box {
  text-align: left;
}

.admin-tts-box .stat-value,
.admin-tts-box .stat-label {
  text-align: center;
}

.admin-tts-progress {
  height: 7px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}

.admin-tts-progress-bar {
  width: 0;
  height: 100%;
  background: var(--accent);
  transition: width .2s ease;
}

.admin-tts-progress-bar.has-usage {
  min-width: 2px;
}

.admin-tts-quota {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
}

.admin-tts-gauges {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 12px;
  justify-content: center;
}

.tts-gauge {
  flex: 0 0 124px;
  text-align: center;
}

.tts-gauge-svg {
  width: 124px;
  height: 74px;
  display: block;
  margin: 0 auto;
}

.tts-gauge-value {
  font-size: 15px;
  font-weight: 700;
  fill: var(--text);
}

.tts-gauge-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-top: 2px;
}

.tts-gauge-sub {
  font-size: 11px;
  color: var(--muted);
}

.tts-gauge-scale {
  font-size: 10px;
  color: var(--muted);
  opacity: 0.8;
}

.admin-tts-top {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--muted);
  font-size: 13px;
}

.admin-tts-top-title {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-weight: 700;
}

.admin-tts-top ol {
  margin: 0;
  padding-left: 20px;
}

.admin-tts-top li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 0;
}

.admin-tts-top strong {
  color: var(--text);
  white-space: nowrap;
}

.admin-tts-quota-editor {
  margin-top: 12px;
  display: grid;
  grid-template-columns: minmax(180px, 260px) auto minmax(120px, 1fr);
  gap: 8px;
  align-items: end;
}

.admin-tts-quota-editor label {
  display: grid;
  gap: 6px;
  min-width: 0;
  font-weight: 600;
}

.admin-tts-quota-editor input {
  width: 150px;
  max-width: 100%;
}

.admin-tts-quota-editor .form-hint {
  margin: 0;
}

.admin-tts-preview-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(120px, 160px) minmax(220px, 1fr);
  gap: 10px;
  align-items: end;
}

.admin-tts-preview-grid label {
  display: grid;
  gap: 6px;
  min-width: 0;
  font-weight: 600;
}

.admin-tts-provider-grid {
  grid-template-columns: minmax(180px, 1fr) minmax(100px, 140px) minmax(120px, 180px) minmax(200px, 1fr);
}

.admin-tts-text-label {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  font-weight: 600;
}

.admin-tts-text-input {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  white-space: pre-wrap;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  background: var(--panel);
  color: var(--text);
  line-height: 1.5;
  font: inherit;
  font-weight: 400;
}

@media (max-width: 760px) {
  .admin-tts-quota-editor,
  .admin-tts-preview-grid {
    grid-template-columns: 1fr;
  }
}

.admin-table-container {
  min-width: 0;
  max-width: 100%;
  width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  /* touch-action: iOS Safari verschluckt sonst horizontale Touch-Swipes in
     diesem Container, wenn ein Vorfahre (html) ein CSS-`zoom` trägt (siehe
     applyUiScale() in app.js, auch bei Faktor 1 gesetzt) - bekannter
     WebKit-Bug, der die Geste an die Seite statt an den Container gibt.
     pan-x allein erlaubt laut Spec nur die horizontale Geste auf diesem
     Element und unterdrückt vertikales Scrollen, sobald der Touch hier
     startet - beide Achsen explizit freigeben, sonst lässt sich das nach
     unten anschließende Seiten-/Dialog-Scrollen nicht mehr anfassen. */
  touch-action: pan-x pan-y;
  margin-top: 10px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

#adminTtsCoverageTable th:not(:first-child),
#adminTtsCoverageTable td:not(:first-child) {
  min-width: 110px;
}

/* Die Buchspalte darf nicht mitschrumpfen: sie erbt overflow-wrap: anywhere und
   brach dadurch bis auf einen Buchstaben pro Zeile um ("2 . M O S E"), sobald die
   Stimmspalten ihre Mindestbreite beanspruchten. */
#adminTtsCoverageTable th:first-child,
#adminTtsCoverageTable td:first-child {
  min-width: 132px;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}

/* Auf dem Telefon passt die Matrix nicht nebeneinander, und auf das seitliche
   Wischen ist kein Verlass: in der WKWebView der App schluckt ein CSS-`zoom` am
   Wurzelelement die horizontale Geste (siehe touch-action-Notiz bei
   .admin-table-container). Statt eine Scrollgeste zu erzwingen, die dort nicht
   ankommt, wird pro Buch gestapelt - je Übersetzung eine Zeile, ganz ohne
   Querscrollen. */
@media (max-width: 640px) {
  #adminTtsCoverageTable thead {
    display: none;
  }

  #adminTtsCoverageTable,
  #adminTtsCoverageTable tbody,
  #adminTtsCoverageTable tr,
  #adminTtsCoverageTable th,
  #adminTtsCoverageTable td {
    display: block;
    width: 100%;
  }

  #adminTtsCoverageTable tr {
    margin-bottom: 10px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
  }

  #adminTtsCoverageTable tbody th,
  #adminTtsCoverageTable tbody td {
    min-width: 0;
    border-bottom: none;
  }

  #adminTtsCoverageTable tbody th:first-child {
    padding: 0 0 6px;
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
    text-transform: none;
  }

  #adminTtsCoverageTable tbody td {
    display: grid;
    grid-template-columns: minmax(0, 88px) minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    padding: 4px 0;
  }

  /* Ersetzt die ausgeblendete Kopfzeile: welche Übersetzung diese Balken zeigen. */
  #adminTtsCoverageTable tbody td::before {
    content: attr(data-label);
    overflow: hidden;
    color: var(--muted);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

#adminTtsCoverageTable tbody tr:first-child {
  background: color-mix(in srgb, var(--accent) 9%, transparent);
}

.admin-table th,
.admin-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}

.admin-table th {
  font-weight: 600;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.admin-table tbody tr:hover {
  background: var(--bg);
}

@media (max-width: 640px) {
  .admin-share-visits-table thead {
    display: none;
  }

  .admin-share-visits-table,
  .admin-share-visits-table tbody {
    display: block;
    width: 100%;
  }

  .admin-share-visits-table tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px 12px;
    margin-bottom: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
  }

  .admin-share-visits-table td {
    display: block;
    min-width: 0;
    padding: 0;
    border: 0;
    overflow-wrap: anywhere;
  }

  .admin-share-visits-table td::before {
    content: attr(data-label);
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 400;
  }

  .admin-share-visits-table .admin-share-visits-name {
    grid-column: 1;
    grid-row: 1;
    font-weight: 600;
  }

  .admin-share-visits-table .admin-share-visits-name::before {
    content: none;
  }

  .admin-share-visits-table .admin-share-visits-total {
    grid-column: 2;
    grid-row: 1;
    text-align: right;
    font-size: 20px;
    font-weight: 600;
  }

  .admin-share-visits-table .admin-share-visits-language {
    grid-column: 1;
    grid-row: 2;
  }

  .admin-share-visits-table .admin-share-visits-status {
    grid-column: 2;
    grid-row: 2;
  }

  .admin-share-visits-table .admin-share-visits-owner,
  .admin-share-visits-table .admin-share-visits-history {
    grid-column: 1 / -1;
  }

  .admin-share-visits-table .share-visits-chart-small {
    min-width: 0;
    height: 48px;
    margin-top: 4px;
  }
}

.feedback-comment-cell {
  max-width: 420px;
  white-space: pre-wrap;
}

.admin-problem-mono {
  font-family: monospace;
  font-size: 11px;
}

.admin-problem-detail-pre {
  white-space: pre-wrap;
  font-family: monospace;
  font-size: 11px;
  margin: 0;
  padding: 10px;
  background: #fff3f3;
  border: 1px solid #fecaca;
  border-radius: 4px;
  max-height: 300px;
  overflow-y: auto;
  color: #b91c1c;
}
:where(html.theme-dark) .admin-problem-detail-pre { background:var(--panel); border:1px solid #653131; color:#e69b9b; } /* dark:gen */

.admin-table .tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}
.admin-table .tag.info { background: var(--accent-soft, #eef); color: var(--accent, #446); }
:where(html.theme-dark) .admin-table .tag.info { background:var(--accent-soft, var(--panel)); color:var(--accent, #bdbdd3); } /* dark:gen */
.admin-table .tag.warn { background: #fff3cd; color: #7a5b00; }
:where(html.theme-dark) .admin-table .tag.warn { background:#433b22; color:#ecdeb4; } /* dark:gen */
.admin-table .tag.positive { background: #d1fae5; color: #065f46; }
:where(html.theme-dark) .admin-table .tag.positive { background:#234333; color:#baeedf; } /* dark:gen */
.admin-table .tag.danger { background: #fee2e2; color: #991b1b; }
:where(html.theme-dark) .admin-table .tag.danger { background:#371c1c; color:#e8a4a4; } /* dark:gen */
.admin-table .tag.muted { background: #e5e7eb; color: var(--muted); }
:where(html.theme-dark) .admin-table .tag.muted { background:color-mix(in srgb, var(--text) 6%, var(--panel)); } /* dark:gen */

#adminInviteTable {
  min-width: 0;
  max-width: 100%;
  margin-top: 14px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.feedback-backdrop {
  position: fixed;
  inset: 0 var(--fix-right-gap) var(--fix-bottom-gap) 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(17, 24, 39, 0.35);
}

.feedback-backdrop[hidden] {
  display: none;
}

.feedback-modal {
  display: grid;
  gap: 12px;
  width: min(680px, 100%);
  max-height: calc(var(--vph) - 32px);
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.22);
}

.feedback-screenshot {
  display: grid;
  gap: 6px;
  font-weight: 600;
}

.feedback-screenshot img {
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
}

.capture-search {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

.capture-search-collection-field,
.capture-translation-field,
.capture-scope-field,
.capture-book-field {
  grid-column: span 3;
  min-width: 0;
}

.capture-reference {
  grid-column: span 11;
}

/* Das Capture-Sheet ist immer schmal — Suchzeile unabhängig vom Viewport
   einspaltig (Eingabe + Such-Button), sonst greift nur das Desktop-Grid. */
.capture-panel .capture-search {
  grid-template-columns: minmax(0, 1fr) 44px;
}

.capture-panel .capture-reference {
  grid-column: 1;
}

.capture-reference-input-wrap {
  position: relative;
  display: flex;
}

.capture-reference-input-wrap input {
  width: 100%;
  padding-right: 34px; /* Platz für den ×-Button */
}

/* type="search" bringt sein eigenes ×-Icon mit – das dopplet sich sonst mit
   unserem .capture-reference-clear-Button. */
.capture-reference-input-wrap input::-webkit-search-cancel-button {
  display: none;
}

.capture-search .capture-reference-clear {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}

.capture-search .capture-reference-clear:hover {
  background: var(--accent-soft, rgba(0, 0, 0, 0.08));
  color: var(--text);
}

.capture-search .capture-reference-clear[hidden] {
  display: none;
}

.capture-search button {
  min-height: 38px;
  width: 100%;
  padding-inline: 0;
}

.capture-panel #captureBrowseBibleButton {
  grid-column: 1 / -1;
  justify-self: start;
  width: auto;
  padding-inline: 12px;
}

/* Such-Optionen als Trigger neben den Quelle-Buttons + Popover-Panel */
.capture-title-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.capture-options-wrap { position: relative; }
.capture-options-button {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  min-height: 40px;
  border-radius: var(--radius);
  padding: 0 12px;
  cursor: pointer;
}
.capture-options-button.button-icon-mode { width: 40px; padding: 0; }
.capture-options-button.active {
  border-color: var(--accent);
  color: var(--accent);
}
.capture-options-panel {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 6px;
  z-index: 40;
  width: 280px;
  max-width: calc(var(--vpw) * 0.8);
  display: grid;
  gap: 10px;
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(20, 16, 60, .18);
}
.capture-options-panel .field { min-width: 0; }

/* Schmale Schirme (inkl. iPhone): einspaltige Suche, Sticky-Aktion */
@media (max-width: 720px) {
  .capture-search { grid-template-columns: minmax(0, 1fr) 44px; }
  .capture-search-collection-field { grid-column: 1 / -1; }
  .capture-reference { grid-column: 1; }
  .capture-actions {
    position: sticky;
    bottom: 0;
    z-index: 5;
    background: var(--panel);
    border-top: 1px solid var(--line);
    padding: 10px 0 12px;
    margin-top: 4px;
  }
}

.capture-preview {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  margin: 8px 0 12px;
  background: var(--bg);
}

.capture-results {
  display: grid;
  /* Spalte auf Containerbreite begrenzen: sonst richtet sich das Grid an der
     nicht umbrechenden Referenzzeile aus und läuft im schmalen Sheet über. */
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  margin: 8px 0 6px;
  /* Wächst mit der Fensterhöhe statt fixer 320px; der Platz im hohen Sheet
     wurde sonst verschenkt. Bei wenigen Treffern bleibt die Box trotzdem klein. */
  max-height: calc(var(--vph) - 240px);
  overflow-y: auto;
  overflow-x: hidden;
}

/* ── Neue Ergebnisliste (capture-result-row) ── */
.capture-results {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.capture-result-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0; /* Grid-Item darf schrumpfen, statt am Inhalt zu überlaufen */
  padding: 0;
  border-bottom: 1px solid var(--line);
  outline: none;
  cursor: pointer;
  user-select: none;
}

.capture-result-row:last-child {
  border-bottom: none;
}

.capture-result-row:hover {
  background: var(--accent-soft);
}

.capture-result-row.focused {
  background: var(--accent-soft);
  box-shadow: inset 3px 0 0 var(--accent);
}

.capture-result-row.selected {
  background: var(--accent-soft);
  box-shadow: inset 3px 0 0 var(--accent);
}

.capture-result-row.captured {
  box-shadow: inset 3px 0 0 var(--captured-accent);
}

.highlight-captured .capture-result-row.captured {
  background: var(--captured-bg);
}

.capture-result-content {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.capture-result-ref {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.capture-result-topic {
  font-weight: 400;
  font-size: 0.78rem;
  color: var(--muted);
}

.capture-result-translation {
  font-weight: 400;
  font-size: 0.72rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 4px;
}

.capture-result-existing {
  color: var(--captured-accent);
  font-size: 0.78rem;
  vertical-align: middle;
  opacity: .9;
}

.capture-result-existing.interactive {
  cursor: pointer;
}

.capture-result-existing.interactive:hover,
.capture-result-existing.interactive:focus-visible {
  opacity: 1;
  outline: none;
}

.capture-result-existing.interactive:focus-visible {
  box-shadow: 0 0 0 2px rgba(22, 163, 74, .45);
  border-radius: 3px;
}

.capture-result-existing-count {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--captured-accent);
  opacity: .85;
  vertical-align: middle;
}

.context-menu-heading {
  padding: 4px 10px 6px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted, #6b7280);
}
:where(html.theme-dark) .context-menu-heading { color:var(--muted, #b6bac2); } /* dark:gen */

.context-menu .workspace-menu-hint {
  /* max-width statt nur white-space:normal - ein Grid-Item (siehe .context-menu:
     display:grid) sizet seine Spalte sonst nach der ungewrappten max-content-
     Breite des Fließtexts, wodurch das ganze Menü unnötig breit würde. */
  max-width: 220px;
  padding: 0 10px 8px;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--muted, #6b7280);
  white-space: normal;
}
:where(html.theme-dark) .context-menu .workspace-menu-hint { color:var(--muted, #b6bac2); } /* dark:gen */

.captured-collections-popover button {
  display: flex;
  align-items: center;
  gap: 8px;
}

.captured-collections-popover .fa-icon {
  opacity: .7;
}

.capture-result-text {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere; /* lange Wörter brechen statt zu überlaufen */
}

.capture-result-actions {
  flex-shrink: 0;
  padding: 0 10px;
  display: flex;
  align-items: center;
}

.capture-result-collected {
  font-size: 1rem;
  color: #16a34a;
}
:where(html.theme-dark) .capture-result-collected { color:#a2e8bc; } /* dark:gen */

.capture-result-quick {
  min-height: 30px;
  padding: 0 10px;
  font-size: 0.82rem;
  white-space: nowrap;
}

.capture-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 6px;
}

.capture-preview h3 {
  min-width: 0;
  margin: 0;
  font-size: 16px;
}

.capture-preview-text-mode {
  display: inline-flex;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.capture-preview-text-mode button {
  min-height: 28px;
  padding: 0 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}

.capture-preview-text-mode button + button {
  border-left: 1px solid var(--line);
}

.capture-preview-text-mode button.active {
  background: var(--accent);
  color: var(--accent-contrast);
}

.capture-preview p {
  margin: 0;
  line-height: 1.5;
  white-space: pre-wrap;
}

.capture-context-visible-ref {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
}

.capture-range-handle {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  gap: 8px;
  align-items: center;
  margin: 8px 0;
}

.capture-range-handle span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.capture-range-handle span::before,
.capture-range-handle span::after {
  content: "";
  height: 1px;
  background: var(--line);
  flex: 1 1 auto;
}

.capture-context-button {
  min-height: 30px;
  width: 34px;
  padding: 0;
  border-radius: 999px;
  background: var(--panel);
  color: var(--accent);
}

.capture-context-verse {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 8px;
  margin: 5px 0;
}

.capture-context-verse.extra {
  color: var(--muted);
}

.capture-context-verse.core {
  color: var(--text);
}

.capture-context-verse.captured,
.capture-preview-verse.captured {
  border-radius: 6px;
  box-shadow: inset 3px 0 0 var(--captured-accent);
}

.highlight-captured .capture-context-verse.captured,
.highlight-captured .capture-preview-verse.captured {
  background: var(--captured-bg);
}

.capture-context-verse.captured {
  padding: 3px 6px 3px 0;
}

.capture-preview-verse.captured {
  display: block;
  padding: 4px 6px;
}

.capture-context-num {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}

.capture-context-verse.extra .capture-context-num {
  color: var(--muted);
}

.capture-adopt-context {
  width: 100%;
  margin-top: 10px;
}

.capture-options {
  display: grid;
  gap: 10px;
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.field-label-row > span {
  font-size: 12px;
  color: var(--muted);
}

#captureCreateCollectionBtn {
  min-height: 24px;
  font-size: 13px;
  margin-left: auto;
  align-self: center;
}
#captureCreateCollectionBtn.button-text-mode {
  padding: 0 8px;
}
#captureCreateCollectionBtn.button-icon-mode {
  width: 24px;
  padding: 0;
}

.capture-collections {
  display: block;
  position: relative;
}
.capture-collections > input {
  width: 100%;
  box-sizing: border-box;
}

.capture-learn {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: start;
  column-gap: 8px;
  row-gap: 2px;
  min-width: 0;
  max-width: 100%;
}
.capture-learn > input {
  margin: 2px 0 0;
  justify-self: start;
}
.capture-learn > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.capture-learn input {
  min-height: auto;
}

/* Zustimmungs-Checkbox im Community-Submit-Dialog: Link innerhalb des
   Labels soll wie ein normaler Text-Link aussehen, nicht wie ein Radio-Text. */
.pron-submit-consent {
  margin-top: 4px;
}
.pron-submit-consent > span {
  font-size: var(--font-sm, 13px);
  color: var(--text-muted, #555);
  line-height: 1.4;
}
:where(html.theme-dark) .pron-submit-consent > span { color:var(--text-muted, var(--muted)); } /* dark:gen */
.pron-submit-consent a {
  color: var(--accent, #2a6df4);
}
:where(html.theme-dark) .pron-submit-consent a { color:var(--accent, #86a4e1); } /* dark:gen */

/* Hinweis: Das frühere Zwei-Spalten-Layout (@media min-width:1120px) für die
   .capture-card stammt aus der Zeit, als Capture ein vollbreiter Tab war und
   die Such-Optionen eine dauerhafte rechte Spalte (minmax(340px,…)) hatten.
   Capture ist jetzt ein schmales Rechts-Sheet (≤560px) und die Optionen sind
   ein absolut positioniertes Dropdown im Header. Die Media-Query feuerte aber
   weiterhin anhand der Viewport-Breite und reservierte im 560px-Sheet eine
   leere 340px-Spalte, sodass der Inhalt in ~130px zusammengequetscht wurde.
   Daher entfernt: die Card bleibt einspaltig (width:100%). */

.card-title {
  margin: 0 0 10px;
  font-size: 16px;
}

.muted-line {
  color: var(--muted);
  font-size: 13px;
}

.collection-audit-panel {
  display: grid;
  gap: 10px;
  margin: 10px 0 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

.collection-audit-controls {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  gap: 8px;
  align-items: end;
}

.collection-audit-controls .field {
  margin: 0;
}

.collection-audit-results {
  display: grid;
  gap: 8px;
}

.collection-audit-group {
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.collection-audit-group h3 {
  margin: 0;
  font-size: 14px;
}

.collection-audit-items {
  display: grid;
  gap: 6px;
}

.collection-audit-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 6px;
  border-radius: 6px;
}

.collection-audit-item:hover {
  background: var(--accent-soft);
}

.collection-audit-item span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.collection-audit-item strong,
.collection-audit-item small {
  overflow: hidden;
  text-overflow: ellipsis;
}

.collection-audit-item small {
  color: var(--muted);
  font-size: 12px;
}

/* ── Einträge zusammenführen: Auswahlmodus ───────────────────────────────── */
.simple-collection-merge-hint {
  gap: 10px;
}

.merge-selectable {
  position: relative;
  cursor: pointer;
  padding-left: 40px;
}

.merge-selectable .merge-select-check {
  position: absolute;
  top: 14px;
  left: 12px;
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
}

.merge-selectable.merge-selected {
  border-color: color-mix(in srgb, var(--accent) 60%, var(--line));
  background: var(--accent-soft);
}

.collection-merge-bar {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.collection-merge-preview {
  max-height: calc(var(--vph) * 0.4);
  overflow: auto;
  margin: 10px 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2, var(--bg));
  font-size: .82rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* ── Collapsed entry card ────────────────────────────────────────────────── */
.collection-entry {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
  transition: border-color .15s, box-shadow .15s;
}
body.workspace-tone-warm .workspace-panel .collection-entry {
  border-color: color-mix(in srgb, var(--accent) 12%, var(--line));
  border-radius: 10px;
}
.collection-entry.open {
  border-color: var(--accent);
  box-shadow: 0 6px 20px rgba(79, 47, 216, .12);
  overflow: visible;
  position: relative;
  z-index: 2;
}
body.workspace-tone-warm .collection-entry.open {
  box-shadow: 0 10px 26px rgba(169, 71, 91, .14);
}
body.workspace-tone-warm .collection-entry.display-reading:not(.open) {
  margin-inline: -2px;
  padding: 2px 4px;
  border-bottom-color: color-mix(in srgb, var(--accent) 12%, var(--line));
}
body.workspace-tone-warm .collection-entry.display-reading:not(.open) .entry-row {
  border-radius: 10px;
}
body.workspace-tone-warm .collection-entry.display-reading:not(.open):hover .entry-row {
  background: color-mix(in srgb, var(--accent-soft) 18%, transparent);
}
/* Lernverse werden allein durch den verstärkten linken Rahmen gekennzeichnet
   (keine Hintergrundfarbe mehr). Reine Sammelverse gleichen die schmalere
   Rahmenbreite per padding aus, damit der Inhalt – und damit alle übrigen
   Dialogkomponenten – unabhängig vom Lernzustand bündig bleiben:
   4px Rahmen ≙ 1px Rahmen + 3px padding (box-sizing: border-box). */
.collection-entry.learning-enabled {
  border-left-width: 4px;
  border-left-color: var(--accent);
}
.collection-entry.learning-disabled {
  border-left-width: 1px;
  padding-left: 3px;
}
/* Begleittext (companion) entries have no Bible passage/learning state at
   all — a dashed, muted left border sets them apart from both learning
   states above without implying "wrong" or "needs attention". */
.collection-entry.collection-entry-companion {
  border-left-width: 3px;
  border-left-style: dashed;
  border-left-color: var(--muted);
  padding-left: 1px;
}
/* Geschlossener, noch leerer Begleittext: ohne Platzhalter nur eine leere
   Zeile - kaum als eigener, klickbarer Eintrag erkennbar (siehe
   entry-companion-empty in app.js). */
.entry-companion-empty {
  color: var(--muted);
  font-style: italic;
}
.ws-content > .collection-entry + .collection-entry {
  margin-top: 8px;
}
.collection-entry.dragging { opacity: .5; }
.collection-entry.drop-target { border-color: var(--accent); border-style: dashed; }

.settings-color-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 2px;
  font-size: 0.85rem;
  color: var(--text);
}
/* .settings-row select setzt sonst width:100% - hier soll die Auswahl neben
   dem Label bleiben statt die ganze Zeilenbreite einzunehmen. */
.settings-color-row select {
  width: auto;
  min-width: 160px;
  max-width: 220px;
}
.settings-color-row input[type="color"] {
  width: 40px;
  height: 26px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}
.bible-area-color-list {
  display: grid;
  gap: 8px;
}
.bible-area-color-list[hidden] {
  display: none !important;
}
.bible-area-color-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 0.9rem;
}
.bible-area-color-row input[type="color"] {
  width: 44px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}

/* Liste der betroffenen Sammlungen im „Entfernen"-Bestätigungsdialog. */
.uncollect-collection-list {
  margin: 8px 0 0;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
  text-align: left;
}

.uncollect-collection-option {
  display: flex;
  align-items: center;
  gap: 10px;
}

.entry-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  cursor: pointer;
}

.entry-grip {
  color: var(--muted);
  cursor: grab;
  opacity: .55;
  flex: 0 0 auto;
  user-select: none;
  font-size: 15px;
}
.entry-grip:active { cursor: grabbing; }

.entry-ref {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
}
.entry-ref-top {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.entry-ref-display {
  min-width: 0;
  overflow: hidden;
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.entry-reference-label { display: block; font-weight: 600; }
.entry-custom-title { display:block; margin-bottom:2px; font-size:.9rem; }
.collection-entry.open .entry-ref small { display: none; }
.entry-ref small {
  display: block;
  color: var(--muted);
  font-weight: 400;
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.collection-entry.entry-expanded:not(.open) .entry-ref small {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.45;
}
.collection-entry.display-reading:not(.open) .entry-row {
  display: block;
  padding: 6px 8px 7px;
  position: relative;
}
/* Einziger Weg, den vollen Bearbeitungszustand einer Karte zu öffnen (siehe
   JS) - ein Klick irgendwo in die Kopfzeile tat das früher zusätzlich auch,
   störte damit aber beim bloßen Lesen/Scrollen/Markieren. Der Stift ist daher
   jetzt IMMER sichtbar (nicht nur im Lesemodus), nicht nur ein Hinweis. Im
   Lesemodus, der .entry-head-actions komplett ausblendet, bleibt die
   absolute Sonderposition oben rechts erhalten; in den übrigen Modi reiht er
   sich normal ans Ende der Kopfzeile ein. */
.entry-reading-edit-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: .78rem;
  opacity: .55;
  cursor: pointer;
}
.entry-reading-edit-hint:hover,
.entry-reading-edit-hint:focus-visible {
  opacity: 1;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  outline: none;
}
.collection-entry.display-reading:not(.open) .entry-reading-edit-hint {
  position: absolute;
  top: 2px;
  right: 2px;
}
.collection-entry.display-reading:not(.open) {
  border-width: 0;
  border-radius: 0;
  border-left-width: 0;
  background: transparent;
  box-shadow: none;
}
.reading-context-bar {
  position: sticky;
  top: calc(52px + var(--safe-top));
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -2px 0 8px;
  padding: 6px 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--panel) 96%, transparent);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--text) 10%, transparent);
  backdrop-filter: blur(12px);
}
.reading-context-location {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1 1 auto;
  min-width: 0;
  gap: 1px;
}
.reading-context-title,
.reading-context-meta {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.reading-context-title {
  color: var(--text);
  font-size: .92rem;
  font-weight: 700;
  line-height: 1.2;
}
.reading-context-meta {
  color: var(--muted);
  font-size: .78rem;
  font-variant-numeric: tabular-nums;
}
.reading-bar-btn {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
}
.reading-bar-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}
.reading-bar-btn:disabled {
  opacity: 0.4;
  cursor: default;
}
.reading-bar-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}
/* Translation strip outside the chapter reader: below the page head row / the reading bar. */
.simple-page-head > .simple-reader-strip {
  grid-column: 1 / -1;
}
.reading-context-bar + .simple-reader-strip {
  margin: 4px 8px;
}
@media (max-width: 600px) {
  .reading-context-bar {
    gap: 6px 8px;
    padding: 6px 8px;
  }
  /* Standardfall: Zurück/Titel/Weiter/Controls bleiben in einer Zeile - der
     Titel schrumpft bei Bedarf per Ellipsis (siehe .reading-context-title).
     Nur wenn installReadingSequenceNavigation per JS erkennt, dass der Titel
     dabei tatsächlich abgeschnitten würde, kommt reading-context-bar--wrap
     dazu: Titel bekommt eine eigene, zentrierte Zeile, darunter alle Controls
     gleichmäßig verteilt. */
  .reading-context-bar.reading-context-bar--wrap {
    flex-wrap: wrap;
    justify-content: space-between;
  }
  .reading-context-bar.reading-context-bar--wrap .reading-context-location {
    order: 1;
    flex: 1 1 100%;
    align-items: center;
    text-align: center;
  }
  .reading-context-bar.reading-context-bar--wrap .reading-bar-prev,
  .reading-context-bar.reading-context-bar--wrap .reading-bar-next,
  .reading-context-bar.reading-context-bar--wrap .reading-bar-controls {
    order: 2;
  }
  .reading-context-bar.reading-context-bar--wrap .reading-bar-controls {
    margin-left: 0;
  }
}
.ws-content:has(.reading-verse-nav) {
  padding-bottom: 72px;
}
.reading-verse-nav {
  position: fixed;
  left: 50%;
  bottom: calc(max(72px, calc(64px + var(--safe-bottom))) + var(--fix-bottom-gap));
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  width: min(520px, calc(var(--vpw) - 24px));
  margin: 12px 0 0;
  padding: 7px;
  border: 1px solid color-mix(in srgb, var(--accent) 36%, var(--line));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--panel) 96%, transparent);
  box-shadow: 0 10px 30px color-mix(in srgb, var(--text) 16%, transparent);
  backdrop-filter: blur(12px);
  transform: translateX(-50%);
}
.reading-verse-nav button {
  min-width: 0;
  min-height: 38px;
  padding: 0 10px;
  border-radius: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.entry-reading-verse-line[data-reading-reference],
.collection-entry.display-reading:not(.open)[data-reading-reference] {
  scroll-margin-top: 112px;
}
.collection-entry.display-reading:not(.open).reading-passage-break {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.ws-content > .collection-entry.display-reading:not(.open) +
.collection-entry.display-reading:not(.open) {
  margin-top: 0;
}
.collection-entry.display-reading:not(.open) .entry-grip,
.collection-entry.display-reading:not(.open) .entry-learn-button,
.collection-entry.display-reading:not(.open) .entry-translation-select,
.collection-entry.display-reading:not(.open) .entry-badges,
.collection-entry.display-reading:not(.open) .entry-head-actions {
  display: none;
}
.collection-entry.display-reading:not(.open) .entry-ref-top {
  display: block;
}
.collection-entry.display-reading:not(.open) .entry-ref {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  column-gap: .48rem;
  align-items: baseline;
}
.collection-entry.display-reading:not(.open).reading-lines .entry-ref {
  display: block;
}
.collection-entry.display-reading:not(.open).reading-lines .entry-ref-top {
  display: none;
}
@media (max-width: 760px) {
  .collection-entry.display-reading:not(.open) .entry-ref {
    display: block;
  }
}
.collection-entry.display-reading:not(.open) .entry-reference-label {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.55;
}
.collection-entry.display-reading:not(.open) .entry-reference-label:empty {
  display: none;
}
.entry-reading-passage {
  display: block;
}
.bibletext-picker-menu {
  min-width: 280px;
  gap: 10px;
  padding: 14px;
}
.bibletext-picker-heading {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}
.bibletext-picker-menu .field {
  display: grid;
  gap: 4px;
}
.bibletext-picker-menu .field > span {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}
.bibletext-picker-hint {
  margin: -6px 0 0;
  font-size: 0.76rem;
}
.bibletext-picker-menu .form-hint.error {
  margin: 0;
}
.bibletext-picker-options {
  display: grid;
  gap: 6px;
}
.bibletext-picker-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
}
.bibletext-picker-checkbox-nested {
  margin-left: 22px;
  color: var(--muted);
}
.bibletext-picker-checkbox:has(input:disabled) {
  opacity: 0.5;
}
.bibletext-picker-menu .bibletext-picker-preview {
  margin: 0;
  padding: 6px 8px;
  border-radius: 6px;
  background: var(--surface-muted, rgba(127, 127, 127, 0.12));
  font-size: 0.9em;
  font-style: italic;
  opacity: 0.85;
}
.bibletext-picker-menu .bibletext-picker-preview.loading {
  opacity: 0.55;
}
.bibletext-picker-menu .bibletext-picker-insert {
  width: 100%;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--on-accent, #fff);
  min-height: 40px;
  font-weight: 600;
  text-align: center;
}
/* background erneut setzen: .context-menu button:hover (background:
   --accent-soft) ist dank :hover sonst spezifischer als unsere Basisregel und
   überschreibt sie - der weiße Text blieb, nur auf hellem statt kräftigem
   Hintergrund praktisch unsichtbar. */
.bibletext-picker-menu .bibletext-picker-insert:hover {
  background: var(--accent);
  filter: brightness(1.08);
}
/* Voller Begleittext im Lesemodus: Absätze im Rohtext bleiben sichtbar statt
   (wie sonst bei <small>) zu einer einzigen Zeile zu kollabieren. */
.entry-reading-companion-text {
  display: block;
  white-space: pre-line;
}
.entry-reading-text::after {
  content: " ";
}
.entry-reading-verse-line {
  display: none;
}
.collection-entry.display-reading:not(.open) .entry-ref small {
  font-size: 1.05rem;
}
.collection-entry.display-reading:not(.open) .entry-reading-text,
.collection-entry.display-reading:not(.open) .entry-reading-verse-line {
  display: block;
}
.collection-entry.display-reading:not(.open) .entry-reading-verse-line {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.collection-entry.display-reading:not(.open).reading-context-bible-chapter .entry-reading-verse-line {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.collection-entry.display-reading:not(.open) .entry-reading-verse-line.passage-break {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.collection-entry.display-reading:not(.open) .entry-reading-inline-number {
  flex: 0 0 auto;
  min-width: 2ch;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 750;
  line-height: 1.55;
  padding-right: 2em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: normal;
  white-space: nowrap;
}
.collection-entry.display-reading:not(.open) .entry-reading-text {
  color: var(--text);
  display: inline;
  line-height: 1.5;
}

@media (max-width: 480px), (max-height: 650px) {
  .reading-context-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin: 0 0 4px;
    padding: 4px 8px;
    border-radius: 8px;
  }
  .reading-context-title {
    font-size: .84rem;
    font-weight: 700;
  }
  .reading-context-meta {
    font-size: .76rem;
  }
  .reading-verse-nav {
    bottom: calc(max(54px, calc(48px + var(--safe-bottom))) + var(--fix-bottom-gap));
    width: min(380px, calc(var(--vpw) - 12px));
    margin: 0;
    padding: 3px 6px;
    border-radius: 10px;
    gap: 4px;
  }
  .reading-verse-nav button {
    min-height: 32px;
    padding: 0 6px;
    font-size: .8rem;
  }
    .ws-content:has(.reading-verse-nav) {
    padding-bottom: 48px;
  }
}
.entry-reading-verse-body {
  display: flex;
  align-items: baseline;
  gap: .48rem;
  min-width: 0;
}
/* Dezentes Abweichungs-Label in der Leseansicht („Eigener Text" / „andere
   Fassung"): zeigt an, warum ein Eintrag nicht in der gewählten Übersetzung
   erscheint. */
.entry-reading-fassung {
  margin-left: 6px;
  padding: 0 5px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: .7rem;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  vertical-align: middle;
}

/* Lesemodus, Desktop: Griff, Badges und Kopf-Aktionen (Lernstatus/Bearbeiten/
   Vergleichen/Kopieren bzw. Sammeln/Vergleichen/Kopieren für noch nicht
   gesammelte Stellen) zurück in die erste Zeile statt sie ganz auszublenden -
   auf schmalen/mobilen Ansichten bleibt es bei der bisherigen platzsparenden
   Ausblendung.
   entry-row bleibt bewusst dieselbe Flex-Zeile wie im Standardlayout (grip,
   ref, badges, headActions in derselben Reihenfolge) - nur mit Zeilenumbruch
   und der Stellenangabe/dem Lesetext als eigener, voller Zeile danach (via
   order + flex-basis:100%). Griff/Badges/Aktionen sitzen dadurch beim
   Auf- und Zuklappen an derselben Stelle und "rutschen" nicht mehr nach.
   entry-ref und entry-ref-top werden aufgelöst (display: contents), damit
   Stellenangabe und Lesetext direkt an dieser Flex-Zeile teilnehmen. */
/* Lesemodus zeigt bewusst KEINE Controls (Griff, Badges, Kopf-Aktionen,
   Sammeln-Button) - auf keiner Breite. Reine Leseansicht: nur Stellenangabe +
   Lesetext. Die Basisregeln oben (display-reading:not(.open)) blenden diese
   Elemente bereits per display:none aus; der frühere Desktop-Block, der sie ab
   761px wieder in die erste Zeile holte, ist hier bewusst entfernt. */
.entry-translation-select {
  flex: 0 0 16ch;
  width: 16ch;
  min-height: 30px;
  padding: 3px 5px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font-size: 12px;
}
.entry-translation-select:disabled {
  cursor: default;
  opacity: .72;
}
.entry-ref-header-edit {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  flex: 1 1 auto;
}
.entry-ref-header-edit[hidden],
.entry-ref-display[hidden] { display: none; }
.entry-ref-header-edit input {
  min-width: 7ch;
  flex: 1 1 14ch;
  padding: 5px 7px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
}
.entry-ref-scope {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.entry-ref-scope.error {
  color: var(--danger);
  text-transform: none;
  letter-spacing: normal;
}
.entry-custom-editor {
  display: grid;
  gap: 8px;
  justify-items: end;
}
.entry-custom-editor[hidden] { display: none; }
.entry-custom-editor .entry-custom-text {
  width: 100%;
  box-sizing: border-box;
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  resize: vertical;
}
.entry-custom-editor button {
  min-height: 32px;
  padding: 0 12px;
}
.entry-range-editor {
  display: grid;
  justify-items: start;
  gap: 8px;
  margin-top: 8px;
}
.entry-range-editor[hidden] { display: none; }
.entry-range-panel {
  display: grid;
  width: 100%;
  box-sizing: border-box;
  gap: 8px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.entry-range-panel[hidden] { display: none; }
.entry-range-preview {
  font-size: 13px;
  line-height: 1.5;
}

.entry-badges {
  display: flex;
  gap: 6px;
  align-items: center;
  flex: 0 0 auto;
}
.entry-badge {
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  line-height: 1.6;
}
.entry-badge .fa-icon { font-size: 11px; }

.entry-tag-chip {
  font: inherit;
  font-size: 11px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-radius: 999px;
  padding: 2px 8px;
  line-height: 1.6;
  white-space: nowrap;
  cursor: pointer;
}

/* ── Compact learning-state action ───────────────────────────────────────── */
.entry-learn-button {
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  padding: 0;
  flex: 0 0 auto;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  /* Häkchen-Zustand = gesammelt (grün); Mütze = gelernt (Lern-Akzent). */
  color: var(--captured-accent);
}
.entry-learn-button.learned,
.entry-learn-button[aria-pressed="true"] {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.entry-learn-button:hover:not(:disabled),
.entry-learn-button:focus-visible {
  border-color: currentColor;
}
.entry-learn-button:disabled {
  cursor: default;
  opacity: .35;
}

/* ── Expanded editor ─────────────────────────────────────────────────────── */
.entry-editor { display: none; padding: 0 12px 12px; }
.collection-entry.open .entry-editor { display: block; }

.entry-versecontext {
  background: var(--bg);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 9px 11px;
  margin-bottom: 12px;
}
.entry-vc-label { font-size: 11px; color: var(--muted); }
.entry-verse-text { margin: .35em 0 .5em; font-size: 14px; }
.entry-verse-text.clamp {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.entry-morelink {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 12px;
  padding: 0;
  margin-right: 14px;
  min-height: 0;
}
.entry-editlink {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  padding: 0;
  min-height: 0;
}

.entry-fieldgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.entry-field { display: grid; gap: 4px; align-content: start; min-width: 0; }
.entry-field-full { grid-column: 1 / -1; }
.entry-field > span { color: var(--muted); font-size: 12px; }
.entry-field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}
.entry-field-head-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
/* Feldnaher Autosave-Status (siehe createInlineSaveIndicator in app.js) -
   macht sichtbar, wann wirklich gespeichert wurde, statt es raten zu lassen. */
.entry-save-indicator {
  font-size: 11px;
  white-space: nowrap;
}
.entry-save-indicator.pending {
  color: var(--muted);
}
.entry-save-indicator.saved {
  color: var(--accent);
}
.entry-save-indicator.error {
  color: var(--danger);
}
.entry-text-zoom {
  min-height: 0;
  padding: 3px 5px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.entry-text-zoom:hover,
.entry-text-zoom:focus-visible {
  background: var(--accent-soft);
  color: var(--accent);
}
.entry-field input,
.entry-field textarea {
  /* width:100% + min-width:0 + box-sizing: sonst erzwingt die intrinsische
     cols/size-Breite der Felder eine Mindestbreite, die den Editor auf schmalen
     Schirmen über den Viewport hinaus zieht (rechts abgeschnitten). */
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
}
.entry-field textarea { min-height: 60px; resize: vertical; }
.entry-field input:focus,
.entry-field textarea:focus { outline: none; border-color: var(--accent); }
.entry-comment-preview-label { margin-top: 2px; }
.entry-comment-preview {
  padding: 8px 10px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--text);
  font-size: 13px;
  white-space: pre-wrap;
}
/* Aufgelöste {Bibeltext: ...}-Zitate (siehe decorateResolvedBibleText) werden
   optisch vom umgebenden Begleittext/Kommentar abgesetzt: kurze Treffer inline
   hinterlegt (globale mark-Regel oben), längere/mehrzeilige als eigener Block.
   Beide Formen nutzen bewusst exakt dieselbe Hintergrundtönung. */
.entry-comment-preview blockquote,
.entry-reading-companion-text blockquote,
.entry-text-dialog-body .entry-comment-preview blockquote,
.simple-companion-card blockquote {
  margin: 6px 0;
  padding: 4px 12px;
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  color: var(--text);
}
.entry-comment-preview blockquote p,
.entry-reading-companion-text blockquote p,
.simple-companion-card blockquote p { margin: 2px 0; }

.entry-tags-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* Auf schmalen Editoren umbrechen: der nicht-schrumpfende „Diese Sammlung /
     Überall"-Schalter wurde sonst über den rechten Rand geschoben. */
  flex-wrap: wrap;
  gap: 8px;
}
.tag-target-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.tag-target-opt {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.72rem;
  padding: 2px 9px;
  cursor: pointer;
}
.tag-target-opt.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.entry-tags-origin {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.assignment-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-size: 0.78rem;
  overflow: hidden;
}
.assignment-chip-label {
  padding: 3px 10px;
  white-space: nowrap;
}
.assignment-chip-label .fa-icon {
  margin-right: 6px;
}
.assignment-chip:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.assignment-chip.has-custom-color {
  border-color: var(--custom-color);
}
.assignment-chip.is-pinned {
  background: var(--accent-soft);
}
.origin-empty {
  font-size: 0.72rem;
  color: var(--muted);
  font-style: italic;
}

.entry-url-links {
  display: grid;
  gap: 4px;
  font-size: 13px;
  margin-top: 4px;
}
.entry-url-links a {
  color: var(--accent);
  overflow-wrap: anywhere;
}

.entry-section-head {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 8px;
}

/* Der Zoom-Dialog ist ein frei verschieb- und resizbares Fenster statt eines
   blockierenden Modals: das Backdrop lässt Klicks/Zeigerereignisse zum Rest
   der App durch (kein Abdunkeln, kein Verwischen), nur das Fenster selbst
   fängt sie wieder ab. Position (left/top) und Größe (width/height) werden
   von app.js inline gesetzt (siehe applyEntryTextDialogGeometry) und
   überschreiben damit automatisch die Default-Zentrierung/-Größe unten.
   Die vier Kerneigenschaften hängen bewusst an den IDs statt an den Klassen:
   ".changelog-backdrop"/"body.ui-mode-simple .changelog-backdrop" haben sonst
   gleiche oder höhere Spezifität (2 Klassen im Simple-UI-Fall) und würden das
   Abdunkeln/den z-index wieder zurückholen. */
#entryTextDialogBackdrop {
  z-index: 10210;
  pointer-events: none;
  background: transparent;
  backdrop-filter: none;
}
#entryTextDialogModal {
  position: fixed;
  pointer-events: auto;
}
.entry-text-dialog {
  width: min(900px, 100%);
  height: min(760px, calc(var(--vph) - 32px));
}
.entry-text-dialog.is-maximized {
  left: 8px !important;
  top: 8px !important;
  width: calc(var(--vpw) - 16px) !important;
  height: calc(var(--vph) - 16px) !important;
}
.entry-text-dialog .changelog-footer {
  gap: 10px;
}
/* "Zur Sammlung" and "Text löschen" sit on the left, apart from Abbrechen/Speichern. */
#entryTextDialogDeleteBtn:not([hidden]),
#entryTextDialogNavigateBtn:not([hidden]):has(+ #entryTextDialogDeleteBtn[hidden]) {
  margin-right: auto;
}
/* .changelog-footer button would paint it like the primary action. */
.entry-text-dialog .changelog-footer button.danger-button {
  background: transparent;
  color: var(--danger) !important;
  border: 1px solid var(--danger);
}
.entry-text-dialog .changelog-header h2 {
  margin: 0;
}
.entry-text-dialog .changelog-header p {
  margin: 4px 0 0;
}
#entryTextDialogHeaderBar {
  cursor: move;
  touch-action: none;
}
.entry-text-dialog-maximize {
  font-size: 14px;
}
.entry-text-dialog-resize-handle {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 18px;
  height: 18px;
  cursor: nwse-resize;
  touch-action: none;
  background:
    linear-gradient(135deg, transparent 0 40%, var(--muted) 40% 46%, transparent 46% 100%),
    linear-gradient(135deg, transparent 0 65%, var(--muted) 65% 71%, transparent 71% 100%);
  opacity: .55;
}
.entry-text-dialog-resize-handle:hover {
  opacity: .9;
}
.entry-text-dialog-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}
.entry-text-dialog-body .markdown-toolbar {
  flex: 0 0 auto;
}
.entry-text-dialog-body textarea {
  width: 100%;
  flex: 1;
  min-height: 220px;
  box-sizing: border-box;
  resize: none;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  line-height: 1.55;
}
.entry-text-dialog-body textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.entry-text-dialog-body .entry-comment-preview {
  flex: 0 0 auto;
  max-height: 35%;
  overflow-y: auto;
}

@media (max-width: 760px) {
  .entry-text-dialog-backdrop {
    padding: 0;
  }
  .entry-text-dialog {
    width: 100%;
    height: var(--vph);
    max-height: none;
    border: 0;
    border-radius: 0;
  }
  .entry-text-dialog.is-maximized {
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: var(--vph) !important;
  }
  .entry-text-dialog-maximize,
  .entry-text-dialog-resize-handle {
    display: none;
  }
  .entry-text-dialog-body textarea {
    min-height: 0;
  }
  .entry-text-dialog .changelog-footer {
    padding-bottom: max(12px, var(--safe-bottom));
  }
}

/* Formatierungs-Toolbar für Kommentar-/Begleittext-Felder (Kartenansicht und
   Zoom-Dialog) - kompakte Icon-Buttons im selben Stil wie .entry-text-zoom. */
.markdown-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.markdown-toolbar-btn {
  min-height: 0;
  padding: 5px 7px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
}
.markdown-toolbar-btn:hover,
.markdown-toolbar-btn:focus-visible {
  background: var(--accent-soft);
  color: var(--accent);
}

.entry-collections {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

/* ── Kopf-Aktionen (Kopieren, Sortieren) links neben dem Chevron ─────────── */
.entry-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
}
.entry-head-btn {
  background: none;
  border: none;
  color: var(--muted);
  min-height: 0;
  padding: 4px 6px;
  font-size: 13px;
  line-height: 1;
  border-radius: 6px;
  cursor: pointer;
}
.entry-head-btn:hover:not(:disabled) {
  color: var(--accent);
  background: var(--accent-soft);
}
.entry-head-btn:disabled { opacity: .3; cursor: default; }
.entry-head-btn.copied { color: var(--green-primary, #1a7f37); }
:where(html.theme-dark) .entry-head-btn.copied { color:var(--green-primary, #abeabd); } /* dark:gen */

/* Passage-Karten (noch nicht gesammelte Bibelstellen): Sammeln/Vergleichen/
   Kopieren stehen als eigene Gruppe in der Kopfzeile (entry-ref-top) - hier
   ans rechte Ende drücken statt direkt neben der Stellenangabe zu kleben. */
.entry-ref-top > .entry-head-actions {
  margin-left: auto;
}

.entry-translation-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
  color: var(--muted);
  background: color-mix(in srgb, var(--muted) 12%, transparent);
  line-height: 1.6;
}
.entry-translation-badge.non-default {
  color: var(--accent);
  background: var(--accent-soft);
  cursor: pointer;
}
.entry-translation-badge.non-default:hover {
  background: color-mix(in srgb, var(--accent) 25%, transparent);
}
.entry-translation-badge.orphan {
  color: var(--error, #dc2626);
  background: color-mix(in srgb, var(--error, #dc2626) 12%, transparent);
  cursor: pointer;
}
:where(html.theme-dark) .entry-translation-badge.orphan { color:var(--error, #e38e8e); } /* dark:gen */
.entry-translation-badge.orphan:hover {
  background: color-mix(in srgb, var(--error, #dc2626) 22%, transparent);
}
.entry-ref-header-edit .entry-head-btn {
  flex-shrink: 0;
  font-size: 0.85rem;
  padding: 2px 5px;
}

.inline-peek-panel {
  border-top: 1px solid var(--line);
  padding: 6px 8px 8px;
  background: color-mix(in srgb, var(--accent) 3%, var(--panel));
}
.inline-peek-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 4px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
}
.inline-peek-hint {
  font-size: 0.78rem;
  color: var(--muted);
}
.inline-peek-close {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 1px 4px;
  font-size: 0.85rem;
  line-height: 1;
  border-radius: 4px;
  min-height: 0;
}
.inline-peek-close:hover { color: var(--text); background: var(--accent-soft); }
.inline-peek-loading {
  font-size: 0.85rem;
  color: var(--muted);
  padding: 6px 4px;
  font-style: italic;
}
.inline-peek-row {
  display: grid;
  grid-template-columns: minmax(56px, 70px) 1fr;
  gap: 6px;
  align-items: baseline;
  padding: 5px 4px;
  border-radius: 6px;
  cursor: pointer;
}
.inline-peek-row:hover { background: var(--accent-soft); }
.inline-peek-row.current-translation {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}
.inline-peek-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  text-align: left;
  pointer-events: none;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
}
.inline-peek-text {
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--text);
}

@media (min-width: 761px) {
  #collectionCommentToggle {
    display: none;
  }
}

@media (max-width: 620px) {
  .entry-fieldgrid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .ws-content {
    align-content: start;
  }

  .collection-entry {
    align-self: start;
    min-height: 0;
    height: auto;
  }

  .entry-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 7px 8px;
    align-items: center;
    padding: 8px;
  }

  .entry-grip {
    grid-column: 1;
    grid-row: 1;
  }

  .entry-head-actions {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    max-width: 100%;
  }

  .entry-ref {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
  }

  .entry-ref-top {
    align-items: stretch;
    flex-direction: column;
    gap: 6px;
  }

  
  .entry-translation-select {
    flex: none;
    width: 100%;
  }

  .entry-ref-header-edit {
    width: 100%;
  }

  .entry-badges {
    grid-column: 1 / -1;
    grid-row: 3;
    flex-wrap: wrap;
  }

  .entry-editor {
    padding: 0 8px 8px;
  }

  .capture-detail--inline {
    margin-left: 0;
  }
}

/* Zugeklappte Einträge im Inline-Editor - AUF ALLEN BREITEN:
   entry-ref wird per display:contents aufgelöst, damit Stellenangabe-Kopf
   (entry-ref-top) und Text (small) eigenständige Flex-Items der Zeile werden.
   Ergebnis: Griff + Angabe + Buttons in der OBEREN Zeile, der Text als eigene
   VOLLE Zeile darunter - der Text verliert keine Breite an die Buttons. */
.collection-entry.entry-expanded:not(.open) .entry-row {
  /* display:flex ist nötig, weil die allgemeine Mobile-Basisregel (~Zeile 4321)
     .entry-row auf display:grid setzt - ohne dieses Override bliebe die Zeile
     mobil ein Grid und die display:contents-Aufteilung bräche. */
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}
.collection-entry.entry-expanded:not(.open) .entry-grip {
  flex: 0 0 auto;
}
.collection-entry.entry-expanded:not(.open) .entry-ref {
  display: contents;
}
.collection-entry.entry-expanded:not(.open) .entry-ref-top {
  flex: 1 1 auto;
  min-width: 0;
}
.collection-entry.entry-expanded:not(.open) .entry-custom-title {
  flex: 0 0 100%;
  width: 100%;
}
/* Text in eigene, volle Zeile: order schiebt ihn hinter die order:0-Elemente
   (Griff/Angabe/Badges/Buttons), flex-basis:100% erzwingt den Umbruch auf eine
   eigene Zeile über die ganze Kartenbreite. */
.collection-entry.entry-expanded:not(.open) .entry-ref > small {
  order: 1;
  flex: 0 0 100%;
  width: 100%;
  min-width: 0;
  margin-top: 3px;
}
.collection-entry.entry-expanded:not(.open) .entry-badges {
  flex: 0 0 auto;
  flex-wrap: nowrap;
}
/* margin-left:auto drückt die Aktionsgruppe an den rechten Rand der oberen Zeile
   (neben der Angabe; die wachsende Angabe füllt den Rest davor). */
.collection-entry.entry-expanded:not(.open) .entry-head-actions {
  flex: 0 0 auto;
  margin-left: auto;
}
.collection-entry.entry-expanded:not(.open) .entry-ref-display {
  min-width: 0;
  overflow: visible;
}
.collection-entry.entry-expanded:not(.open) .entry-reference-label {
  white-space: normal;
  overflow-wrap: normal;
  line-height: 1.25;
}

@media (max-width: 760px) {
  /* nur schmal/mobil: engeres Spacing */
  .collection-entry.entry-expanded:not(.open) .entry-row {
    gap: 5px 7px;
  }
  .collection-entry.entry-expanded:not(.open) .entry-badge {
    padding: 1px 6px;
  }
  /* flex-direction:row überschreibt das flex-direction:column der allgemeinen
     Mobile-Basisregel (.entry-ref-top ~Zeile 4347) - sonst zentriert
     align-items:center die Angabe horizontal (Cross-Achse). */
  .collection-entry.entry-expanded:not(.open) .entry-ref-top {
    flex-direction: row;
    gap: 6px;
  }
  /* Bearbeiten-Zustand (nur mobil): zweispaltiges Raster + volle Dropdown-Breite.
     Auf Desktop bleibt das Standard-Bearbeiten-Layout erhalten. */
  .collection-entry.entry-expanded:not(.open) .entry-ref-top:has(> .entry-ref-header-edit:not([hidden])) {
    display: grid;
    grid-template-columns: minmax(9ch, 11ch) minmax(0, 1fr);
    align-items: start;
  }
  .collection-entry.entry-expanded:not(.open) .entry-translation-select {
    width: 100%;
    min-height: 30px;
  }
}

/* Touch devices (phones, tablets): larger hit targets per platform guidelines. */
@media (pointer: coarse) {
  button,
  input,
  textarea,
  select {
    min-height: 44px;
  }

  button.icon-button {
    width: 44px;
  }

  input[type="checkbox"] {
    min-height: auto;
  }

  .chip,
.sort-btn,
.tag-manager-row input,
.tag-manager-row .danger-button {
    min-height: 44px;
  }

  .link-button {
    min-height: auto;
  }

  .capture-search {
    grid-template-columns: minmax(0, 1fr) 44px;
  }

  .capture-search-collection-field {
    grid-column: 1 / -1;
  }

  .capture-reference {
    grid-column: 1;
  }

    .entry-head-btn {
    min-height: 40px;
    min-width: 36px;
  }
}

@media (max-width: 1180px) {
  .layout {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  }

  .sidebar {
    grid-column: 1 / -1;
  }

  .detail {
    top: 8px;
  }
}

@media (max-width: 760px) {
  
  .shell {
    padding: 10px;
    padding-top: max(10px, var(--safe-top));
    padding-right: max(10px, var(--safe-right));
    padding-bottom: max(10px, var(--safe-bottom));
    padding-left: max(10px, var(--safe-left));
  }

  .layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .collection-audit-controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .settings-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding: 12px 0;
    align-items: stretch;
  }

  .settings-row > div,
  .settings-row > label,
  .settings-row > button,
  .settings-row > span {
    align-self: stretch;
  }

  .settings-card,
  .admin-card {
    padding: 10px;
  }

  .settings-card select,
  .admin-card select {
    width: 100%;
  }

  .admin-card .content-header {
    align-items: flex-start;
  }

  .admin-card .admin-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .admin-card .admin-actions button {
    flex: 0 0 auto;
  }

  .admin-tts-quota-editor,
  .admin-tts-preview-grid {
    min-width: 0;
  }

  .admin-tts-quota-editor button {
    justify-self: start;
  }

  .shortcut-row {
    align-items: flex-start;
  }

  .shortcut-label {
    flex: 1 1 100%;
    min-width: 0;
  }

  .readaloud-components li {
    min-width: 0;
  }

  .readaloud-components li .component-label {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  /* Header stays one row (title + arrows); the "Standard" text is redundant
     next to the green highlight and would squeeze the title. */
  .bible-manifest-current {
    display: none;
  }
  .bible-manifest-actions {
    gap: 4px;
  }
  .bible-manifest-move {
    width: 32px;
    min-height: 32px;
  }

  .sidebar {
    grid-column: auto;
  }

    
  
  
  /* Detail opens as a full-screen overlay above the list. */
  .detail {
    position: fixed;
    inset: 0 var(--fix-right-gap) var(--fix-bottom-gap) 0;
    z-index: 50;
    border: 0;
    border-radius: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateX(100%);
    transition: transform .2s ease;
    padding: 16px;
    padding-top: max(16px, var(--safe-top));
    padding-right: max(16px, var(--safe-right));
    padding-bottom: max(16px, var(--safe-bottom));
    padding-left: max(16px, var(--safe-left));
  }

  body.detail-open {
    overflow: hidden;
  }

  body.detail-open .detail {
    transform: translateX(0);
  }

  
  .content,
  .sidebar {
    padding: 10px;
  }

  .capture-search {
    grid-template-columns: minmax(0, 1fr) 44px;
  }

  .capture-search-collection-field {
    grid-column: 1 / -1;
  }

  .capture-reference {
    grid-column: 1;
  }

  .item-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .item-stage {
    display: none;
  }
}

@media (max-width: 420px) {
  .admin-stats-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-card .content-header > span {
    flex: 1 1 100%;
  }
}

/* Changelog Modal Styles */
.changelog-backdrop {
  position: fixed;
  inset: 0 var(--fix-right-gap) var(--fix-bottom-gap) 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(17, 24, 39, 0.45);
  backdrop-filter: blur(12px);
  animation: changelog-fade-in 0.25s ease-out;
}

.changelog-backdrop[hidden] {
  display: none !important;
}

.changelog-modal {
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: min(600px, 100%);
  max-height: calc(var(--vph) - 40px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: calc(var(--radius) * 1.5);
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(20px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  animation: changelog-scale-up 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
:where(html.theme-dark) .changelog-modal { border:1px solid rgba(255,255,255,0.15); background:rgba(27,34,31,0.75); } /* dark:gen */

html.theme-dark .changelog-modal {
  background: rgba(30, 30, 30, 0.75);
  border-color: rgba(255, 255, 255, 0.05);
}

.changelog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, var(--accent-soft), transparent);
}

.changelog-header h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.changelog-close-btn {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.15s;
}

.changelog-close-btn:hover {
  color: var(--text);
}

.changelog-body {
  padding: 24px;
  overflow-y: auto;
  min-height: 0; /* Grid-Item darf schrumpfen → Footer bleibt sichtbar */
  line-height: 1.6;
  color: var(--text);
}

.changelog-body h3 {
  margin-top: 20px;
  margin-bottom: 10px;
  font-size: 1.1rem;
  color: var(--accent);
}

.changelog-body h3:first-child {
  margin-top: 0;
}

.changelog-body hr {
  margin: 24px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.changelog-body ul {
  margin: 0 0 16px;
  padding-left: 20px;
}

.changelog-body li {
  margin-bottom: 8px;
}

.changelog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  background: var(--panel);
}

.changelog-footer button {
  padding: 10px 20px;
  background: var(--accent);
  color: var(--on-accent, #fff) !important;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.changelog-footer button:hover {
  background: linear-gradient(rgba(0,0,0,0.07), rgba(0,0,0,0.07)), var(--accent);
  transform: translateY(-1px);
}

.changelog-footer button:active {
  transform: translateY(0);
}

/* ── Mobile Header: Stand ausblenden ──────────────────────────────────── */
@media (min-width: 601px) {
  .simple-choice.simple-choice-phone-only {
    display: none;
  }
}

@media (max-width: 600px) {
  .brand {
    gap: 10px;
  }

  /* Small iOS-style icon next to the title instead of the tall desktop icon. */
  .app-icon {
    align-self: center;
    width: 40px;
    height: 40px;
    min-height: 0;
    border-radius: 9px;
  }

  /* Title, version and the account button share one row (docs/kopfzeilen-umbau.md, stage 5b):
     e-mail, "Stand" and the system icons live in the account menu. */
  .title-row {
    flex-wrap: nowrap;
    gap: 6px;
  }

  .topbar h1 {
    min-width: 0;
    font-size: 16px;
  }

  .version-text {
    max-width: none;
    flex: 0 0 auto;
    font-size: 0;
  }

  .version-text::after {
    content: attr(data-short-version);
    font-size: 11px;
  }

  .actions {
    gap: 4px;
  }
}

/* ── Compare/Changelog Dialog: scrollbar auf kleinen Screens ──────────── */
@media (max-width: 600px) {
  /* Top-aligned dialogs start below the status bar in the iOS app. */
  .changelog-backdrop {
    align-items: flex-start;
    overflow-y: auto;
    padding: calc(12px + var(--safe-top)) calc(12px + var(--safe-right))
      calc(12px + var(--safe-bottom)) calc(12px + var(--safe-left));
  }

  .changelog-modal {
    max-height: none;
    width: 100%;
  }

  /* Inline max-height des Compare-Dialogs überschreiben */
  #compareBackdrop .changelog-body {
    max-height: none !important;
    overflow-y: visible;
  }

  /* About-Dialog: kompakt + scrollbar auf XS */
  .about-modal {
    width: 100% !important;
  }

  #aboutBackdrop .changelog-header {
    padding: 10px 14px;
  }

  .about-body {
    flex-direction: column !important;
    align-items: center;
    text-align: center;
    padding: 12px 14px;
    gap: 12px;
  }

  #aboutBackdrop .changelog-footer {
    padding: 8px 14px;
  }

  .about-tagline {
    font-size: 0.95rem;
    margin-bottom: 8px;
  }

  .about-links {
    gap: 8px;
  }

  .about-link {
    padding: 9px 12px;
    font-size: 0.88rem;
    justify-content: center;
  }

  .about-profile-pic {
    width: 72px;
    height: 72px;
  }

  .changelog-body {
    padding: 16px;
  }

  .changelog-header {
    padding: 12px 16px;
  }

  .changelog-footer {
    padding: 10px 16px;
  }

  .ui-dialog-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .ui-dialog-footer .settings-pron-edit-voice-field {
    margin-right: 0;
    justify-content: space-between;
  }

  .ui-dialog-footer .settings-pron-edit-voice-field select {
    flex: 1;
  }

  .ui-dialog-footer button,
  .ui-dialog-footer > a.link-button {
    width: 100%;
    box-sizing: border-box;
    text-align: center;
  }

  /* Two short actions (e.g. Cancel / OK) fit side by side. */
  .ui-dialog-footer:not(:has(> :nth-child(3 of :not([hidden])))) {
    flex-direction: row;
  }
  .ui-dialog-footer:not(:has(> :nth-child(3 of :not([hidden])))) > :is(button, a.link-button) {
    flex: 1 1 0;
    width: auto;
  }
}

@keyframes changelog-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes changelog-scale-up {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* About Dialog Styles */
.brand .app-icon,
.brand h1 {
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.brand .app-icon:hover,
.brand h1:hover {
  opacity: 0.85;
  transform: translateY(-0.5px);
}

.about-modal {
  width: min(520px, 100%) !important;
}

.about-version-text {
  font-size: 0.85rem;
  color: var(--muted);
}

.pulsing-glow {
  animation: logo-glow 3s infinite ease-in-out;
  border-radius: 12px;
}

@keyframes logo-glow {
  0%, 100% {
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.2);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.45);
    transform: scale(1.03);
  }
}

.about-body {
  display: flex !important;
  flex-direction: row !important;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding: 24px;
}

.about-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.about-tagline {
  font-size: 1.05rem;
  margin: 0 0 12px 0;
  color: var(--text);
}

.about-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.about-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius);
  text-decoration: none !important;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  min-width: 0;
  overflow: hidden;
}

.mail-link {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text) !important;
}

.mail-link:hover {
  background: var(--line);
  color: var(--accent) !important;
  transform: translateY(-2px);
}

.sponsor-link {
  background: linear-gradient(135deg, #ff007f, #ff5e36);
  border: none;
  color: #ffffff !important;
  box-shadow: 0 4px 15px rgba(255, 0, 127, 0.25);
}

.sponsor-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 0, 127, 0.4);
  background: linear-gradient(135deg, #ff1a8c, #ff6f4d);
}

.about-link-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.about-link-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pulse-heart {
  display: inline-block;
  animation: heart-beat 1.2s infinite ease-in-out;
}

@keyframes heart-beat {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.15); }
  50% { transform: scale(1); }
  75% { transform: scale(1.15); }
}

.about-photo-wrapper {
  flex-shrink: 0;
  align-self: flex-end;
  display: flex;
  align-items: flex-end;
}

.about-profile-pic {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #ffffff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.3s ease, box-shadow 0.3s ease;
}
:where(html.theme-dark) .about-profile-pic { border:3px solid var(--line); } /* dark:gen */

html.theme-dark .about-profile-pic {
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 12px rgba(0,0,0,0.35);
}

.about-profile-pic:hover {
  transform: scale(1.12) rotate(4deg);
  border-color: var(--accent);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

@media (max-width: 480px) {
  .about-body {
    flex-direction: column !important;
    align-items: center;
    text-align: center;
  }
  
  .about-photo-wrapper {
    align-self: center;
    margin-top: 8px;
  }
  
  .about-link {
    justify-content: center;
  }
}

/* ── Lernmodus ───────────────────────────────────────────────────────────── */
/* Vollbild-Overlay, damit der Lesemodus das ganze Browserfenster nutzt und
   nicht durch die zentrierte .shell (max-width 1480) begrenzt wird. */
.learn-panel {
  position: fixed;
  inset: 0 var(--fix-right-gap) var(--fix-bottom-gap) 0;
  z-index: 9997;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px clamp(16px, 4vw, 40px);
  background: var(--bg);
  overflow: hidden;
  touch-action: pan-y;
}
body.workspace-tone-warm .learn-panel {
  background:
    radial-gradient(circle at top, color-mix(in srgb, var(--accent) 12%, transparent), transparent 28rem),
    var(--bg);
}
.swipe-navigation-hint {
  position: fixed;
  left: 50%;
  bottom: calc(84px + var(--safe-bottom) + var(--fix-bottom-gap));
  z-index: 10020;
  max-width: min(calc(var(--vpw) * 0.9), 420px);
  transform: translateX(-50%);
  padding: 9px 14px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text) 88%, transparent);
  color: var(--bg);
  font-size: 0.88rem;
  text-align: center;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.22);
  pointer-events: none;
}
@media (max-width: 640px) {
  .learn-panel { padding: 12px; gap: 14px; }
  .learn-flashcard { padding: 18px 14px; font-size: 0.95rem; }
}

/* Learning header: title with progress · text size · ⋮ · close;
   the progress bar is the bottom edge (docs/kopfzeilen-umbau.md). */
.learn-header {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "title actions"
    "details actions";
  align-items: center;
  gap: 0 8px;
  width: 100%;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}
body.workspace-tone-warm .learn-header,
body.workspace-tone-warm .learn-footer {
  border-color: color-mix(in srgb, var(--accent) 16%, var(--line));
}

.learn-header-actions {
  grid-area: actions;
  justify-self: end;
  display: flex;
  gap: 2px;
  align-items: center;
}

/* One shape with the page header tools: borderless round icons. */
.learn-header .learn-head-button {
  width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  color: #315246;
  background: transparent;
}
:where(html.theme-dark) .learn-header .learn-head-button { color:#c2dbd2; } /* dark:gen */

.learn-header .learn-head-button:hover {
  background: rgba(49, 82, 70, .08);
}

.learn-header .learn-head-button[hidden] {
  display: none;
}

.ui-scale-menu {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10020;
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 6px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .22);
  transform-origin: top center;
}

.ui-scale-menu.ui-scale-menu-above {
  transform-origin: bottom center;
}

.ui-scale-menu button {
  min-width: 46px;
  min-height: 38px;
  padding: 0 10px;
  font-weight: 700;
}

.ui-scale-menu .ui-scale-value {
  min-width: 70px;
  font-variant-numeric: tabular-nums;
}

.learn-title-block {
  display: contents;
}

.learn-title-block h2 {
  grid-area: title;
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  min-width: 0;
  text-align: left;
  overflow-wrap: anywhere;
}

.learn-title-block span {
  grid-area: details;
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: left;
}

.learn-progress-container {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  background: var(--bg);
  overflow: hidden;
}

.learn-progress-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
body.workspace-tone-warm .learn-progress-container {
  background: color-mix(in srgb, var(--accent-soft) 42%, var(--panel));
}

@media (max-width: 640px) {
  .learn-title-block h2 {
    font-size: 1.05rem;
  }
}

.learn-content {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
}

.learn-card {
  width: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 24px;
}

.learn-card > :first-child {
  margin-top: auto;
}

.learn-card > :last-child {
  margin-bottom: auto;
}

.learn-footer {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 76px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.learn-footer:empty {
  display: none;
}

.learn-footer-stack {
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.learn-footer .learn-nav-row,
.learn-footer .learn-ratings-grid {
  margin-top: 0 !important;
}

/* Premium Lernkarte */
.learn-flashcard {
  width: 100%;
  min-height: 200px;
  padding: 32px 24px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) * 1.5);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
body.workspace-tone-warm .learn-flashcard {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--panel) 92%, var(--accent-soft)), var(--panel));
  border-color: color-mix(in srgb, var(--accent) 18%, var(--line));
  box-shadow: 0 18px 48px rgba(169, 71, 91, 0.12);
}

.learn-flashcard:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}
body.workspace-tone-warm .learn-flashcard:hover {
  box-shadow: 0 20px 54px rgba(169, 71, 91, 0.16);
}

.learn-flashcard-text {
  font-size: 1.35rem;
  line-height: 1.6;
  color: var(--text);
  margin: 0;
  font-weight: 500;
  word-break: break-word;
  animation: fadeInCard 0.4s ease;
  white-space: pre-wrap;
}
.learn-flashcard-callouts {
  width: 100%;
  margin-top: 18px;
  color: var(--text);
  text-align: left;
  white-space: normal;
}
.learn-flashcard-callouts:first-of-type { margin-top: 0; }
body.workspace-tone-warm .learn-flashcard-text {
  line-height: 1.72;
  font-weight: 450;
}

.learn-flashcard-notes {
  font-size: 0.95rem;
  font-style: italic;
  color: var(--muted);
  margin-top: 16px;
  border-top: 1px dashed var(--line);
  padding-top: 12px;
  width: 100%;
}

.learn-flashcard-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
  justify-content: center;
}

.learn-flashcard-tag {
  font-size: 0.75rem;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 3px 8px;
  border-radius: 12px;
  font-weight: 600;
}

.learn-flashcard-meta {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  background: var(--panel);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--line);
}

/* Buttons & Ratings */
.learn-action-btn {
  min-width: 180px;
  font-size: 1.05rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(79, 47, 216, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.learn-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(79, 47, 216, 0.3);
}

.learn-action-btn:active {
  transform: translateY(0);
}

.learn-ratings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 680px;
}

@container (min-width: 252px) {
  .learn-ratings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@container (min-width: 516px) {
  .learn-ratings-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.learn-rate-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 6px;
  min-height: 64px;
  color: #ffffff;
  border: none;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}

.learn-rate-btn:hover {
  transform: translateY(-3px) scale(1.03);
}

.learn-rate-btn .rate-lbl {
  font-size: 0.95rem;
  font-weight: 700;
}

.learn-rate-btn .rate-desc {
  font-size: 0.68rem;
  opacity: 0.85;
  margin-top: 2px;
}

.learn-rate-btn.rate-red {
  background: hsl(0, 84%, 55%);
  box-shadow: 0 4px 10px rgba(220, 53, 69, 0.25);
}
.learn-rate-btn.rate-red:hover {
  background: hsl(0, 84%, 60%);
  box-shadow: 0 6px 14px rgba(220, 53, 69, 0.35);
}

.learn-rate-btn.rate-yellow {
  background: hsl(38, 92%, 50%);
  box-shadow: 0 4px 10px rgba(255, 193, 7, 0.25);
}
.learn-rate-btn.rate-yellow:hover {
  background: hsl(38, 92%, 55%);
  box-shadow: 0 6px 14px rgba(255, 193, 7, 0.35);
}

.learn-rate-btn.rate-green {
  background: hsl(142, 68%, 42%);
  box-shadow: 0 4px 10px rgba(40, 167, 69, 0.25);
}
.learn-rate-btn.rate-green:hover {
  background: hsl(142, 68%, 47%);
  box-shadow: 0 6px 14px rgba(40, 167, 69, 0.35);
}

.learn-rate-btn.rate-blue {
  background: hsl(217, 85%, 52%);
  box-shadow: 0 4px 10px rgba(0, 123, 255, 0.25);
}
.learn-rate-btn.rate-blue:hover {
  background: hsl(217, 85%, 57%);
  box-shadow: 0 6px 14px rgba(0, 123, 255, 0.35);
}

/* Completion screen */
.learn-complete {
  text-align: center;
  padding: 32px 16px;
  animation: fadeInCard 0.4s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.learn-complete-icon {
  font-size: 4rem;
  line-height: 1;
  margin-bottom: 8px;
  animation: bounceIcon 0.8s ease;
}

.learn-complete h3 {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 700;
}

.learn-complete p {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.learn-debrief-metrics {
  width: min(100%, 680px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.learn-debrief-metric {
  min-width: 0;
  padding: 12px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-soft);
}

.learn-debrief-metric strong,
.learn-debrief-metric span {
  display: block;
}

.learn-debrief-metric strong {
  color: var(--accent);
  font-size: 1.45rem;
}

.learn-debrief-metric span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
}

.learn-debrief-insight {
  width: min(100%, 680px);
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line));
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 6%, var(--panel));
  text-align: left;
}

.learn-debrief-insight h4 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.learn-debrief-insight > p {
  font-size: 0.9rem;
}

.learn-debrief-distribution {
  display: grid;
  gap: 7px;
  margin-top: 14px;
}

.learn-debrief-distribution-row {
  display: grid;
  grid-template-columns: 72px minmax(80px, 1fr) 24px;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
}

.learn-debrief-distribution-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted) 18%, transparent);
}

.learn-debrief-distribution-track > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.learn-complete .learn-debrief-detail {
  margin-top: 10px;
  color: var(--text);
  font-size: 0.82rem;
}

.learn-debrief-actions {
  width: 100%;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 560px) {
  .learn-complete {
    padding: 20px 8px;
  }

  .learn-debrief-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .learn-debrief-actions .learn-action-btn {
    width: 100%;
  }
}

.learn-no-due {
  width: min(100%, 640px);
  padding: 32px 16px;
  text-align: center;
  animation: fadeInCard 0.4s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.learn-no-due-icon {
  color: var(--accent);
  font-size: 4rem;
  line-height: 1;
}

.learn-no-due h3,
.learn-no-due p {
  margin: 0;
}

.learn-no-due h3 {
  font-size: 1.6rem;
}

.learn-no-due p {
  max-width: 520px;
  color: var(--muted);
  font-size: 1.05rem;
}

.learn-no-due-actions {
  width: 100%;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

@media (max-width: 479px) {
  .learn-no-due-actions .learn-action-btn {
    width: 100%;
  }
}

/* Animations */
@keyframes fadeInCard {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes bounceIcon {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* Dark mode overrides */
html.theme-dark .learn-panel {
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}
html.theme-dark .learn-flashcard-meta {
  background: var(--bg);
}

/* ── Üben Panel ────────────────────────────────────────────────────────── */
.ueben-panel {
  padding: 16px;
}

.ueben-start-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ueben-actions {
  display: flex;
  justify-content: flex-end;
}

.practice-tag-filter {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

.practice-tag-filter summary {
  padding: 10px 12px;
  cursor: pointer;
  font-weight: 600;
}

.practice-tag-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 0 12px 12px;
  max-height: 180px;
  overflow-y: auto;
}

.practice-tag-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
}

.practice-tag-option input {
  margin: 0;
}

.ueben-mode-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  color: var(--fg);
  width: 100%;
}

.ueben-mode-card:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.ueben-mode-card:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.ueben-mode-icon {
  font-size: 32px;
  color: var(--accent);
  flex: 0 0 44px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.ueben-mode-details h3 {
  margin: 0 0 4px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--fg);
}

.ueben-mode-details p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

/* ── Üben: zwei Schritte (Was / Wie) mit fester Fußzeile ───────────────── */
.ueben-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 700px) {
  .ueben-columns {
    grid-template-columns: 1fr;
  }
}

.ueben-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.ueben-step {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}

.ueben-step-num {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent, #fff);
  font-size: 12px;
}

.ueben-seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

.ueben-seg button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

.ueben-seg button.active {
  background: var(--accent);
  color: var(--on-accent, #fff);
}

.ueben-label {
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ueben-note {
  margin: 0;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--accent-soft);
  font-size: 13px;
}

.ueben-foot {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 -16px -16px;
  padding: 12px 16px;
  background: var(--panel);
  border-top: 1px solid var(--line);
}

.ueben-summary {
  flex: 1 1 220px;
  min-width: 0;
}

.ueben-summary p {
  margin: 0;
}

.ueben-start-btn {
  padding: 11px 22px;
  font-weight: 700;
}

@media (max-width: 520px) {
  .ueben-start-btn {
    flex: 1 1 100%;
  }
}

.ueben-mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

@media (max-width: 500px) {
  .ueben-mode-grid {
    grid-template-columns: 1fr;
  }
}

.ueben-mode-card.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.ueben-mode-card {
  gap: 12px;
  padding: 12px;
}

.ueben-mode-icon {
  font-size: 24px;
  flex-basis: 32px;
}

.ueben-chip small {
  margin-left: 4px;
  font-weight: 500;
  opacity: 0.75;
}

.ueben-chip:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Chip-Gruppe unterhalb der Mode-Karten */
.ueben-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 2px;
}

.ueben-chip {
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s, color 0.12s;
  white-space: nowrap;
}

.ueben-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.ueben-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent, #fff);
}

/* ── Interaktive Hilfe-Tour ─────────────────────────────────────────────── */
.app-tour-layer {
  position: fixed;
  inset: 0 var(--fix-right-gap) var(--fix-bottom-gap) 0;
  z-index: 5000;
  pointer-events: none;
}

.app-tour-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 10, 20, 0.42);
  pointer-events: auto;
}

.app-tour-highlight {
  position: absolute;
  border: 3px solid #fff36d;
  border-radius: 10px;
  box-shadow:
    0 0 0 9999px rgba(12, 10, 20, 0.36),
    0 0 0 6px rgba(225, 29, 72, 0.42),
    0 10px 30px rgba(0, 0, 0, 0.3);
  pointer-events: none;
  transition: left 0.18s ease, top 0.18s ease, width 0.18s ease, height 0.18s ease;
}
:where(html.theme-dark) .app-tour-highlight { border:3px solid #847e40; } /* dark:gen */

.app-tour-popover {
  position: absolute;
  padding: 14px;
  border: 2px solid #f97316;
  border-left: 6px solid #e11d48;
  border-radius: 8px;
  background: linear-gradient(135deg, #fff36d 0%, #ffd166 52%, #80ffdb 100%);
  color: #201300;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.32);
  pointer-events: auto;
}
:where(html.theme-dark) .app-tour-popover { background:linear-gradient(135deg, #7c7740 0%, #806d42 52%, #3a7061 100%); color:#f1dfc6; } /* dark:gen */

.app-tour-popover::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 28px;
  width: 18px;
  height: 18px;
  background: #fff36d;
  border-left: 2px solid #f97316;
  border-top: 2px solid #f97316;
  transform: rotate(45deg);
}
:where(html.theme-dark) .app-tour-popover::before { background:#7c7740; } /* dark:gen */

.app-tour-popover-above::before {
  top: auto;
  bottom: -10px;
  border: 0;
  border-right: 2px solid #f97316;
  border-bottom: 2px solid #f97316;
}

.app-tour-progress {
  display: inline-block;
  margin-bottom: 6px;
  color: #7c2d12;
  font-size: 0.78rem;
  font-weight: 800;
}
:where(html.theme-dark) .app-tour-progress { color:#ebbeae; } /* dark:gen */

.app-tour-popover h3 {
  margin: 0 0 6px;
  color: #201300;
  font-size: 1.05rem;
}
:where(html.theme-dark) .app-tour-popover h3 { color:#f1dfc6; } /* dark:gen */

.app-tour-popover p {
  margin: 0;
  color: #201300;
  font-size: 0.92rem;
  line-height: 1.45;
}
:where(html.theme-dark) .app-tour-popover p { color:#f1dfc6; } /* dark:gen */

.app-tour-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

/* ── Lückentext (Cloze) ─────────────────────────────────────────────────── */
.cloze-text {
  line-height: 1.9;
}

.cloze-input {
  display: inline-block;
  border: none;
  border-bottom: 2px solid var(--accent);
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: inherit;
  padding: 0 2px;
  margin: 0 1px;
  outline: none;
  vertical-align: baseline;
  min-width: 4ch;
}

.cloze-input:focus {
  border-bottom-color: var(--accent);
  background: var(--accent-soft);
  border-radius: 2px 2px 0 0;
}

.cloze-result {
  display: inline;
  font-weight: 600;
  padding: 1px 3px;
  border-radius: 3px;
}

.cloze-correct {
  color: var(--success, #22a060);
  background: color-mix(in srgb, var(--success, #22a060) 12%, transparent);
}
:where(html.theme-dark) .cloze-correct { color:var(--success, #a0e7c3); } /* dark:gen */

.cloze-wrong {
  color: var(--danger, #d93025);
  background: color-mix(in srgb, var(--danger, #d93025) 12%, transparent);
  text-decoration: line-through;
}
:where(html.theme-dark) .cloze-wrong { color:var(--danger, #e3948f); } /* dark:gen */

.cloze-correction {
  color: var(--success, #22a060);
  font-size: 0.9em;
}
:where(html.theme-dark) .cloze-correction { color:var(--success, #a0e7c3); } /* dark:gen */

.study-strong,
.study-footnote {
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
  padding: 0;
}

/* Notiz-Marker am Vers: gehört zur Stellenangabe, nicht in den Fliesstext — die
   Notiz gilt dem ganzen Vers und nicht einem einzelnen Wort. Die Regel ist
   bewusst über .entry-ref spezifiziert, weil dessen Kinder sonst als Block
   umbrechen und der Marker in einer eigenen Zeile landet. */
.entry-ref .verse-note-marker,
.verse-note-marker {
  display: inline-flex;
  align-items: center;
  width: auto;
  margin-left: 6px;
  font-size: .85em;
  line-height: 1;
  opacity: .85;
}

.verse-note-marker:hover,
.verse-note-marker:focus-visible {
  opacity: 1;
}

.study-references,
.study-strongs,
.study-topics,
.study-lexikon,
.study-tsk-crossrefs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.study-references summary,
.study-strongs summary,
.study-topics summary,
.study-lexikon summary,
.study-own-notes summary,
.study-commentary summary,
.study-tsk-crossrefs summary {
  flex-basis: 100%;
  min-width: 0;
  cursor: pointer;
  color: var(--accent);
  font-size: .9em;
  /* Der zusammengelegte Titel ("Luther 1912 – Strong-Wörter") passt auf
     schmalen Bildschirmen nicht immer in eine Zeile - lieber sauber
     abschneiden (voller Text bleibt per title-Attribut erreichbar) als
     unkontrolliert umbrechen. */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.study-commentary {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.study-commentary summary {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
}

.study-commentary-entry {
  display: grid;
  gap: 4px;
  padding: 8px 10px;
  border-left: 3px solid var(--accent);
  background: rgba(0, 0, 0, .03);
  border-radius: 0 8px 8px 0;
}

/* Titelzeile jedes Eintrags: ganze Zeile klappt auf/zu (natives <summary>),
   optisch wie die frühere <h4>-Überschrift statt wie ein Link. Die Regel muss
   die allgemeine ".study-commentary summary"-Regel weiter oben überstimmen. */
.study-commentary .study-commentary-entry-head {
  margin: 0;
  cursor: pointer;
  color: inherit;
  font-size: .95em;
  font-weight: 600;
}

.study-commentary-entry[open] > .study-commentary-entry-head {
  margin-bottom: 2px;
}

.study-commentary-numbering-hint {
  margin-left: .4em;
  color: var(--accent);
  cursor: help;
}

.study-commentary-text {
  font-size: .9em;
  line-height: 1.45;
}

/* Zeile mit dem KI-Übersetzungshinweis und dem EN/DE-Umschalter, nur bei
   Einträgen mit vorhandenem englischem Original (MHCC/JFB). */
.study-commentary-lang-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-bottom: 4px;
}

.study-commentary-translated-hint {
  font-size: .8em;
  font-style: italic;
  opacity: .65;
}

/* Vermerk "KI-übersetzt" hinter dem Quellennamen in der Studienquellen-Auswahl. */
.study-source-text {
  min-width: 0;
}

.study-source-ai-tag {
  display: block;
  font-size: .75em;
  font-style: italic;
  opacity: .65;
  white-space: nowrap;
}

/* Flaggen-Bild statt Flaggen-Emoji: Flaggen-Unicode (🇬🇧/🇩🇪) wird je nach
   Plattform/Schriftart uneinheitlich oder gar nicht dargestellt. */
.study-commentary-lang-toggle {
  background: none;
  border: none;
  border-radius: 3px;
  padding: 0;
  margin: 0;
  line-height: 0;
  cursor: pointer;
}

.study-commentary-lang-flag {
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 3px;
  object-fit: cover;
}

/* Bibelstellen-Verweise im Kommentartext: öffnen die Stellen-Vorschau
   (showStudyReferenceDialog), kein echter Seitensprung. */
.study-commentary-ref {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

/* Eigene Notizen/Kommentare als Studienquelle: anders als die Verweislisten
   daneben ist das Fließtext, deshalb untereinander statt als Chip-Wolke. */
.study-own-notes {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.study-own-note {
  display: grid;
  gap: 4px;
  padding: 8px 10px;
  border-left: 3px solid var(--accent);
  background: rgba(0, 0, 0, .03);
  border-radius: 0 8px 8px 0;
}

.study-own-note-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.study-own-note-source {
  font-size: .85em;
  opacity: .75;
}

.study-own-note-open {
  margin-left: auto;
  padding: 2px 8px;
  font-size: .8em;
}

.study-own-note-body > :first-child { margin-top: 0; }
.study-own-note-body > :last-child { margin-bottom: 0; }

.study-own-note-detail {
  margin: 0;
  font-size: .85em;
  opacity: .75;
}

.lexikon-article-content {
  display: grid;
  gap: 12px;
}

.lexikon-article-body :is(h1, h2, h3) {
  margin-top: 0;
}

.lexikon-article-images {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.lexikon-article-images figure {
  margin: 0;
  max-width: 220px;
}

.lexikon-article-images img {
  max-width: 100%;
  border-radius: 8px;
  display: block;
  cursor: zoom-in;
}

.lexikon-article-images figcaption {
  color: var(--muted);
  font-size: .8rem;
  margin-top: 4px;
}

.lexikon-image-open { padding: 0; border: 0; background: transparent; }
html:has(.lexikon-image-viewer[open]) { overflow: hidden; }
.lexikon-image-viewer {
  inset: var(--safe-top) var(--safe-right) var(--safe-bottom) var(--safe-left);
  margin: auto;
  width: min(1100px, calc(var(--vpw) - 24px - var(--safe-left) - var(--safe-right)));
  height: calc(var(--vph) - 24px - var(--safe-top) - var(--safe-bottom));
  max-width: none;
  max-height: none;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--text);
  overflow: hidden;
}
.lexikon-image-viewer[open] { display: flex; flex-direction: column; }
.lexikon-image-viewer::backdrop { background: rgb(0 0 0 / 75%); }
.lexikon-image-viewer-header { display: flex; justify-content: space-between; gap: 8px; padding: 10px; flex: 0 0 auto; }
.lexikon-image-viewer-header button { min-height: 44px; }
.lexikon-image-viewport { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; }
.lexikon-image-viewport img { display: block; width: 100%; height: 100%; object-fit: contain; }
.lexikon-image-viewport.is-zoomed img { width: 200%; max-width: none; height: auto; }
.lexikon-image-caption { flex: 0 0 auto; max-height: 20%; overflow: auto; margin: 0; padding: 10px; overflow-wrap: anywhere; }

.lexikon-article-crossrefs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.study-source-block {
  width: 100%;
  margin-top: 10px;
  padding: 8px 10px;
  border-left: 3px solid color-mix(in srgb, var(--accent) 55%, transparent);
  border-radius: 0 8px 8px 0;
}

/* The expanded editor repeats the complete study material below the header. */
.collection-entry.open > .entry-row .entry-ref > :is(
  .study-source-block,
  .study-footnotes,
  .study-references,
  .study-lexikon,
  .study-tsk-crossrefs
) {
  display: none;
}

.study-source-label {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.study-strong-source {
  text-align: left;
}

.study-topic-row {
  flex-basis: 100%;
  display: grid;
  gap: 5px;
}

.study-topic-meta {
  color: var(--muted);
  font-size: .82rem;
}

.study-topic-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Parallel Bible reading */
.parallel-layout-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  background: color-mix(in srgb, var(--panel) 82%, var(--bg));
}

.parallel-layout-option {
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
  border-color: transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  font-size: .84rem;
  font-weight: 650;
}

.parallel-layout-option:hover,
.parallel-layout-option:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  color: var(--text);
}

.parallel-layout-option.active {
  border-color: color-mix(in srgb, var(--accent) 28%, var(--line));
  background: var(--panel);
  color: var(--accent);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--text) 10%, transparent);
}

.reader-display-config-button {
  display: inline-grid;
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  place-items: center;
}

.parallel-verse-group {
  position: relative;
  margin-block: 6px;
  border: 1px solid color-mix(in srgb, var(--line) 78%, var(--accent));
  border-left: 3px solid color-mix(in srgb, var(--accent) 58%, var(--line));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent-soft) 20%, var(--panel));
}

.parallel-verse-text {
  margin: 0;
}

.parallel-native-verse {
  display: inline-block;
  min-width: 2ch;
  color: var(--accent);
  font-size: .88em;
  font-variant-numeric: tabular-nums;
  text-align: end;
}

.parallel-native-verse.parallel-verse-differing {
  font-weight: 700;
  color: var(--accent-hover, #2563eb);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  padding: 1px 5px;
  border-radius: 4px;
}
:where(html.theme-dark) .parallel-native-verse.parallel-verse-differing { color:var(--accent-hover, #8aa6e2); } /* dark:gen */

.parallel-verse-text + br + .parallel-verse-text {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.parallel-verse-version {
  min-width: 0;
  padding: 14px 16px;
  line-height: 1.65;
}

.parallel-verse-version + .parallel-verse-version {
  border-left: 0;
}

.parallel-verse-retry {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  text-decoration: underline;
}

.parallel-verse-version-label {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: 0;
  line-height: 1.25;
  text-transform: none;
}

.parallel-verse-group.parallel-layout-columns {
  container-type: inline-size;
  display: grid;
  grid-auto-columns: minmax(min(calc(var(--vpw) * 0.72), 22rem), 1fr);
  grid-auto-flow: column;
  grid-template-rows: auto auto;
  overflow-x: auto;
  /* Mandatory: a swipe must not rest between two columns (strip highlight would sit between tabs). */
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

.parallel-verse-group.parallel-layout-columns .parallel-verse-version {
  grid-row: 1;
  scroll-snap-align: start;
}

.parallel-verse-group.parallel-layout-columns .parallel-study-area {
  position: sticky;
  left: 0;
  z-index: 1;
  grid-column: 1;
  grid-row: 2;
  width: var(--parallel-reading-width, 100cqw);
}

.parallel-verse-group.parallel-layout-stack {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.parallel-verse-group.parallel-layout-stack .parallel-verse-version {
  padding-block: 12px;
}

.parallel-verse-group.parallel-layout-stack .parallel-verse-version + .parallel-verse-version {
  border-top: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  border-left: 0;
}

.parallel-study-area {
  min-width: 0;
  padding: 10px 16px 14px;
  border-top: 1px dashed color-mix(in srgb, var(--accent) 34%, var(--line));
  background: color-mix(in srgb, var(--accent-soft) 34%, transparent);
}

.entry-reading-verse-body > .parallel-verse-group {
  width: 100%;
  min-width: 0;
  flex: 1 1 auto;
}

.entry-reading-verse-body:has(> .parallel-verse-group) {
  align-items: flex-start;
}

.parallel-verse-group.parallel-layout-stack .parallel-study-area {
  grid-column: 1;
}

body.bible-verse-selection-active .bible-verse-selection-context {
  cursor: pointer;
}

.bible-verse-selection-context .parallel-verse-version {
  transition: opacity .16s ease, background-color .16s ease, box-shadow .16s ease;
}

.bible-verse-selection-context .parallel-verse-version.bible-verse-selection-other {
  opacity: .42;
}

.bible-verse-selected:not(.parallel-reading-card),
.bible-verse-selected .parallel-verse-version.bible-verse-selection-target {
  background: color-mix(in srgb, var(--accent-soft) 72%, var(--panel));
  box-shadow: inset 4px 0 0 var(--accent);
}

.simple-flow-verse.bible-verse-selected {
  background: color-mix(in srgb, var(--accent-soft) 85%, var(--panel));
  border-radius: 4px;
  box-shadow: inset 0 0 0 2px var(--accent);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  padding: 1px 3px;
}

.bible-verse-selection-bar {
  position: fixed;
  left: 50%;
  bottom: calc(max(16px, var(--safe-bottom)) + var(--fix-bottom-gap));
  z-index: 9450;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: min(720px, calc(var(--vpw) - 24px));
  padding: 8px 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--line));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--panel) 96%, transparent);
  box-shadow: 0 12px 36px color-mix(in srgb, var(--text) 22%, transparent);
  backdrop-filter: blur(14px);
  transform: translateX(-50%);
}

.bible-verse-selection-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 28px;
}

.bible-verse-selection-summary {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .84rem;
  color: var(--text);
}

.bible-verse-selection-palette {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  padding: 0;
}

.bible-verse-selection-close {
  flex: 0 0 auto;
  min-width: 28px !important;
  min-height: 28px !important;
  width: 28px;
  height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 13px;
}

.bible-verse-selection-highlight-clear {
  width: 26px;
  height: 26px;
  min-width: 26px;
  min-height: 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--panel);
}

.bible-verse-selection-actions-wrapper {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  min-width: 0;
  position: relative;
}

.bible-verse-selection-scroll-btn {
  flex: 0 0 auto;
  width: 26px !important;
  height: 26px !important;
  min-width: 26px !important;
  min-height: 26px !important;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-size: 11px;
  cursor: pointer;
  transition: background .15s, opacity .15s;
}

.bible-verse-selection-scroll-btn:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.bible-verse-selection-scroll-btn[hidden] {
  display: none !important;
}

.bible-verse-selection-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--accent) 45%, transparent) color-mix(in srgb, var(--line) 30%, transparent);
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  width: 100%;
}

.bible-verse-selection-actions::-webkit-scrollbar {
  height: 4px;
  display: block;
}

.bible-verse-selection-actions::-webkit-scrollbar-track {
  background: color-mix(in srgb, var(--line) 20%, transparent);
  border-radius: 999px;
}

.bible-verse-selection-actions::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--accent) 55%, transparent);
  border-radius: 999px;
}

.bible-verse-selection-actions::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

.bible-verse-selection-actions button {
  min-width: 44px;
  min-height: 32px;
  padding: 3px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
  flex: 0 0 auto;
  font-size: .80rem;
  user-select: none;
  touch-action: pan-x;
}

.bible-verse-selection-actions button .button-label {
  white-space: nowrap;
}

.context-menu {
  /* Muss über .entry-text-dialog-backdrop (10210) liegen, sonst rendert ein aus
     dem Zoom-Dialog geöffnetes Popup (z. B. der BibelText-Picker) unsichtbar
     dahinter. */
  z-index: 10500;
}

.ui-dialog-modal:has(.reader-display-config) {
  width: min(680px, 100%);
  max-width: 680px;
}

.reader-display-config {
  display: grid;
  gap: 14px;
  max-height: min(calc(var(--vph) * 0.68), 680px);
  overflow-y: auto;
  padding-right: 3px;
  overscroll-behavior: contain;
}

.reader-display-section {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  background: color-mix(in srgb, var(--panel) 88%, var(--bg));
}

.reader-display-section > :is(h2, h3, legend) {
  margin: 0;
  color: var(--text);
  font-size: .9rem;
  font-weight: 750;
}

.bible-order-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.bible-language-group-button {
  font-size: .8rem;
}

.reader-display-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.reader-display-option {
  display: flex;
  flex: 1 1 145px;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  margin: 0;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
}

button.reader-display-option {
  justify-content: flex-start;
  text-align: left;
}

.reader-display-option:hover,
.reader-display-option:focus-within,
.reader-display-option.active {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  background: color-mix(in srgb, var(--accent-soft) 55%, var(--panel));
}

.reader-display-option :is(input[type="checkbox"], input[type="radio"]) {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
}

.reader-display-section > :is(select, input[type="text"]) {
  width: 100%;
}

.reader-display-profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.reader-display-profile-actions > button {
  min-height: 44px;
}

.reader-display-translation-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.reader-display-translation-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 4px 5px 4px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.reader-display-translation-row > :is(label, span) {
  min-width: 0;
  overflow-wrap: anywhere;
}

.reader-display-order-button {
  display: inline-grid;
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  place-items: center;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.reader-display-order-button:hover,
.reader-display-order-button:focus-visible {
  border-color: var(--line);
  background: var(--accent-soft);
  color: var(--accent);
}

.reader-display-order-button:disabled {
  opacity: .38;
  cursor: not-allowed;
}

@media (max-width: 760px) {
  /* The reference stays above a parallel verse group on narrow screens. */
  .entry-reading-verse-body:has(> .parallel-verse-group) {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .entry-reading-verse-body:has(> .parallel-verse-group) .entry-reading-inline-number {
    padding-right: 0;
  }
}

@media (max-width: 760px) {
  .bible-verse-selection-bar {
    bottom: calc(max(76px, calc(68px + var(--safe-bottom))) + var(--fix-bottom-gap));
    width: calc(var(--vpw) - 16px);
    padding: 6px 8px;
    gap: 4px;
  }

  .bible-verse-selection-header {
    min-height: 26px;
    gap: 6px;
  }

  .bible-verse-selection-summary {
    font-size: .78rem;
  }

  .bible-verse-selection-palette {
    gap: 5px;
  }

  .bible-verse-selection-palette .context-menu-highlight,
  .bible-verse-selection-palette .bible-verse-selection-highlight-clear {
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
  }

  .bible-verse-selection-close {
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
    min-height: 26px !important;
  }

  .bible-verse-selection-actions-wrapper {
    gap: 2px;
  }

  .bible-verse-selection-scroll-btn {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    min-height: 22px !important;
    font-size: 10px;
  }

  .bible-verse-selection-actions {
    gap: 4px;
  }

  .bible-verse-selection-actions::-webkit-scrollbar {
    height: 3px;
  }


  .bible-verse-selection-actions button {
    flex: 0 0 auto;
    width: auto;
    min-width: 44px;
    min-height: 30px;
    padding: 3px 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: .72rem;
    line-height: 1.15;
    white-space: nowrap;
    border-radius: 6px;
    touch-action: pan-x;
    user-select: none;
  }

  .bible-verse-selection-actions button > :last-child,
  .bible-verse-selection-actions button .button-label {
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
}

@media (max-height: 520px) {
  .bible-verse-selection-bar {
    padding: 3px 6px;
    gap: 2px;
  }

  .bible-verse-selection-header {
    min-height: 22px;
    gap: 4px;
  }

  .bible-verse-selection-summary {
    font-size: .72rem;
  }

  .bible-verse-selection-palette {
    gap: 4px;
  }

  .bible-verse-selection-palette .context-menu-highlight,
  .bible-verse-selection-palette .bible-verse-selection-highlight-clear {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
  }

  .bible-verse-selection-close {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    min-height: 22px !important;
    font-size: 11px;
  }

  .bible-verse-selection-scroll-btn {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    font-size: 9px;
  }

  .bible-verse-selection-actions button {
    min-height: 24px;
    padding: 2px 6px;
    font-size: .68rem;
    gap: 3px;
  }
}

@media (max-width: 760px) {
  .bible-verse-selection-bar {
    --selection-tap: max(44px, calc(44px / var(--ui-scale)));
    max-height: calc(var(--vph) * .6);
    overflow-y: auto;
    padding: 8px;
    gap: 8px;
  }
  .bible-verse-selection-header { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:4px 6px; }
  .bible-verse-selection-summary { grid-column:1 / -1; white-space:normal; overflow-wrap:anywhere; }
  .bible-verse-selection-palette { min-width:0; flex-wrap:wrap; gap:4px; }
  .bible-verse-selection-palette .context-menu-highlight,
  .bible-verse-selection-palette .bible-verse-selection-highlight-clear,
  .bible-verse-selection-close {
    width:var(--selection-tap) !important; height:var(--selection-tap) !important;
    min-width:var(--selection-tap) !important; min-height:var(--selection-tap) !important;
    flex-shrink:0;
  }
  .bible-verse-selection-close { align-self:start; }
  .bible-verse-selection-scroll-btn { display:none !important; }
  .bible-verse-selection-actions-wrapper { display:block; min-width:0; }
  .bible-verse-selection-actions { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,4rem),1fr)); overflow:visible; gap:6px; }
  .bible-verse-selection-actions button { min-width:0; min-height:var(--selection-tap); padding:6px 4px; flex-direction:column; white-space:normal; touch-action:manipulation; font-size:.75rem; }
  .bible-verse-selection-actions button > :last-child { overflow:visible; white-space:normal; text-overflow:clip; }
  .bible-verse-selection-actions :is([data-selection-action="copyAs"],[data-selection-action="dossier"],[data-selection-action="note"],[data-selection-action="mitschrift"]) { display:none; }
}

@media (max-width: 600px) {
  .parallel-layout-switch {
    gap: 0;
    padding: 2px;
  }

  .parallel-layout-option {
    padding-inline: 10px;
  }

  .parallel-verse-version {
    padding-inline: 12px;
  }

  .ui-dialog-backdrop:has(.reader-display-config),
  .ui-dialog-backdrop:has(.mobile-bible-navigation) {
    align-items: end;
    justify-items: stretch;
    overflow: hidden;
    padding: max(8px, var(--safe-top)) 0 0;
  }

  body .ui-dialog-modal.ui-dialog-modal:has(.reader-display-config),
  body .ui-dialog-modal.ui-dialog-modal:has(.mobile-bible-navigation) {
    align-self: end;
    width: 100%;
    max-width: none;
    max-height: calc(var(--vph) - max(8px, var(--safe-top)));
    margin: 0;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 20px 20px 0 0;
  }

  .ui-dialog-modal:has(.reader-display-config) .changelog-body,
  .ui-dialog-modal:has(.mobile-bible-navigation) .changelog-body {
    min-height: 0;
    overflow: hidden;
    padding-bottom: max(14px, var(--safe-bottom));
  }

  .reader-display-config {
    max-height: calc(var(--vph) - 9rem - var(--safe-top) - var(--safe-bottom));
    padding-right: 0;
    padding-bottom: 2px;
  }

  .reader-display-section {
    padding: 12px;
  }

  .reader-display-option {
    flex-basis: 100%;
  }

  .reader-display-profile-actions > button {
    flex: 1 1 100%;
  }
}

.collection-entry.open .entry-study-summary {
  display: none;
}

.entry-reading-verse-line .study-references,
.entry-reading-verse-line .study-lexikon,
.entry-reading-verse-line .study-tsk-crossrefs,
.entry-reading-verse-line .study-source-block {
  margin-left: 2.2rem;
  width: auto;
}

/* Steht das <details> in einem Quellblock, bringt bereits .study-source-block
   den Einzug mit - die Regel oben rückte den Chevron dort ein zweites Mal ein.
   .study-strongs und .study-topics stehen in jener Liste nicht und blieben
   bündig, wodurch die Chevrons desselben Blocks unterschiedlich weit vom Rand
   standen. Im Quellblock richten sich deshalb alle nach dessen Beschriftung. */
.entry-reading-verse-line .study-source-block .study-references,
.entry-reading-verse-line .study-source-block .study-lexikon,
.entry-reading-verse-line .study-source-block .study-tsk-crossrefs,
.entry-reading-verse-line .study-source-block .study-footnotes {
  margin-left: 0;
}

.study-footnotes {
  margin-top: 8px;
  width: 100%;
}

.study-footnotes summary {
  cursor: pointer;
  color: var(--accent);
  font-size: .9em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.entry-reading-verse-line .study-footnotes {
  margin-left: 2.2rem;
  width: auto;
}

.study-footnote-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 6px;
  margin-top: 6px;
  font-size: .9em;
}

.study-footnote-word {
  color: var(--muted);
  flex: none;
}

.study-footnote-index {
  display: inline-block;
  min-width: 1.35em;
  padding: 0 .2em;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent, #fff);
  font-size: .8em;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  flex: none;
}

.study-footnote-text {
  flex: 1 1 12em;
  min-width: 0;
}

.study-footnote-link {
  color: var(--accent);
  cursor: pointer;
  border: 0;
  background: transparent;
  font: inherit;
  text-decoration: underline;
  padding: 0;
}

.study-info-toggle[aria-pressed="false"] {
  opacity: .78;
}

.study-info-controls {
  display: inline-flex;
  align-items: stretch;
  gap: 0;
  min-width: 0;
}

.study-source-picker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.study-info-controls > .study-info-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  padding: 0 10px;
  border-radius: var(--radius) 0 0 var(--radius);
  opacity: 1;
}

.study-info-controls > .study-source-picker {
  border-left: 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  padding-left: 6px;
}

.study-source-picker[aria-pressed="true"],
.study-info-controls > .study-info-toggle[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.study-source-picker .study-source-chevron {
  font-size: .8em;
  opacity: .85;
}

body.ui-scale-compact-nav .simple-chapter-toolbar .study-source-picker > span:not(.fa-icon) {
  display: none;
}

.study-source-master-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin: 6px 0 8px;
  padding: 8px 12px;
  font-weight: 600;
  box-sizing: border-box;
}

.study-source-bulk-actions {
  display: flex;
  gap: 8px;
  margin: 0 0 8px;
}

.study-source-bulk-button {
  display: flex;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 10px;
  box-sizing: border-box;
}

.study-source-menu {
  width: 400px;
  box-sizing: border-box;
}

.study-source-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.study-source-menu button.study-source-close,
.context-menu.workspace-mobile-menu button.study-source-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  flex: 0 0 auto;
}

.study-source-menu button.study-source-close:hover {
  color: var(--text);
  background: var(--accent-soft);
}

.study-source-menu-options label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 12px;
  box-sizing: border-box;
  cursor: pointer;
}

.study-source-menu-options input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 0;
}

.study-source-menu-options label:hover {
  background: var(--hover);
}

/* In der schmalen Leserleiste des klassischen Modus zeigt der Schalter nur
   sein Icon - der Text steckt weiterhin im title/aria-label, geht also weder
   für Tooltip noch für Screenreader verloren. */
.study-info-toggle-compact {
  width: 32px;
  min-width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.study-info-toggle-compact > span:not(.fa-icon) {
  display: none;
}

.study-strong {
  border-bottom: 2px solid currentColor;
}

/* "Red letter": Verse, in denen Jesus direkt spricht (übersetzungsunabhängig
   aus dem \wj-Markup der World English Bible, siehe speaker-jesus.json), und
   die admin-kuratierten, wortgenauen Markierungen (JesusSpeechMark). Der Stil
   kommt aus dem Baukasten in Einstellungen > Bibeln und wird von
   applyJesusSpeechStyle() in app.js als eigenes Stylesheet erzeugt. Hier nur
   die Grundlage: !important nötig gegen ".simple-verse-card mark" (gelber
   Such-Treffer-Hintergrund, höhere Spezifität durch den Tag-Selektor). */
.jesus-speech-mark {
  background: none !important;
  color: inherit;
}

.jesus-speech-style-builder {
  display: grid;
  gap: 6px;
  margin: 6px 0 4px;
}
.jesus-speech-style-builder input[type="checkbox"] {
  margin: 0;
}
.jesus-speech-style-builder input[type="color"]:disabled {
  opacity: .35;
  cursor: not-allowed;
}
.jesus-speech-style-preview {
  margin: 4px 0 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: var(--reading-font, Georgia, serif);
}

.study-footnote {
  display: inline-block;
  min-width: 1.35em;
  padding: 0 .2em;
  margin-left: 2px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent, #fff);
  font-size: .72em;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  transform: translateY(-.35em);
}

/* ── Progressive Reveal ─────────────────────────────────────────────────── */
.progressive-blank {
  display: inline;
  color: var(--accent);
  letter-spacing: 2px;
  font-weight: 600;
}

.progressive-hidden {
  color: var(--muted);
  font-style: italic;
  text-align: center;
  padding: 24px 0;
}

/* ── Umgekehrte Abfrage (Reverse) ───────────────────────────────────────── */
.reverse-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin-top: 8px;
}

.reverse-ref-label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.reverse-ref-input {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--fg);
  font: inherit;
}

.reverse-ref-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  outline: none;
}

.warmup-feedback-banner {
  width: 100%;
  max-width: 520px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--fg);
  font-size: 0.92rem;
  text-align: center;
}

.warmup-feedback-success {
  border-color: var(--success, #22a060);
  background: color-mix(in srgb, var(--success, #22a060) 10%, var(--bg));
}

.warmup-feedback-partial {
  border-color: hsl(38, 92%, 50%);
  background: color-mix(in srgb, hsl(38, 92%, 50%) 10%, var(--bg));
}

.warmup-feedback-wrong {
  border-color: var(--danger, #d93025);
  background: color-mix(in srgb, var(--danger, #d93025) 10%, var(--bg));
}

/* ── Eingabe-Modus ──────────────────────────────────────────────────────── */
.input-mode-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin-top: 8px;
}

.input-mode-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--fg-muted, var(--fg));
  letter-spacing: 0.02em;
}

.input-mode-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  font-size: 1rem;
  font-family: inherit;
  line-height: 1.6;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--input-bg, var(--bg));
  color: var(--fg);
  resize: vertical;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.input-mode-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  outline: none;
}

.input-mode-hint {
  margin: 0;
  font-size: 0.8rem;
  color: var(--fg-muted, #888);
}
:where(html.theme-dark) .input-mode-hint { color:var(--fg-muted, var(--muted)); } /* dark:gen */

/* Wort-für-Wort-Differenzanzeige */
.input-diff-container {
  width: 100%;
  max-width: 580px;
  padding: 14px 16px;
  background: var(--card-bg, var(--bg));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  line-height: 2;
  font-size: 1rem;
}

.input-diff-word {
  display: inline;
  padding: 1px 3px;
  border-radius: 3px;
  font-weight: 500;
}

.input-diff-ok {
  color: var(--success, #22a060);
  background: color-mix(in srgb, var(--success, #22a060) 12%, transparent);
}
:where(html.theme-dark) .input-diff-ok { color:var(--success, #a0e7c3); } /* dark:gen */

.input-diff-err {
  color: var(--danger, #d93025);
  background: color-mix(in srgb, var(--danger, #d93025) 12%, transparent);
  text-decoration: underline;
  text-decoration-style: wavy;
}
:where(html.theme-dark) .input-diff-err { color:var(--danger, #e3948f); } /* dark:gen */

.input-diff-given {
  font-size: 0.78em;
  font-weight: 400;
  opacity: 0.8;
  font-style: italic;
}

/* Auswertungs-Modus-Zeile inline in der Eingabe-Karte */
.input-match-mode-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.input-match-mode-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--fg-muted, var(--fg));
  white-space: nowrap;
}

.input-match-mode-select {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--input-bg, var(--bg));
  color: var(--fg);
  font-size: 0.88rem;
  font-family: inherit;
  cursor: pointer;
  flex: 1;
  min-width: 180px;
  max-width: 320px;
}

.input-match-mode-select:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* ── Aufsagen-Modus ─────────────────────────────────────────────────────── */
.recite-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: 8px;
  text-align: center;
}

.recite-status {
  margin: 0;
  font-size: 0.92rem;
  color: var(--fg-muted, var(--fg));
}

.recite-interim {
  margin: 0;
  min-height: 1.4em;
  font-size: 0.9rem;
  font-style: italic;
  opacity: 0.75;
  color: var(--fg-muted, var(--fg));
}

.recite-mic-btn.listening {
  background: var(--danger, #d93025);
  border-color: var(--danger, #d93025);
  color: #fff;
  animation: recite-pulse 1.4s ease-in-out infinite;
}

@keyframes recite-pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--danger, #d93025) 45%, transparent); }
  50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--danger, #d93025) 0%, transparent); }
}

/* Settings: Eingabe-Modus-Auswertung */
#settingInputMatchMode {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.setting-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--fg);
}

.setting-select {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--input-bg, var(--bg));
  color: var(--fg);
  font-size: 0.95rem;
  font-family: inherit;
  cursor: pointer;
  max-width: 360px;
}

.setting-select:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* ── Read-aloud (Vorlesen) ─────────────────────────────────────────────── */
.readaloud-components {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.readaloud-components li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  cursor: grab;
}
.readaloud-components li.dragging {
  opacity: 0.5;
}
.readaloud-components li .drag-handle {
  color: var(--muted);
  cursor: grab;
}
.readaloud-components li .component-label {
  flex: 1;
}

.readaloud-rate-profiles {
  display: grid;
  gap: 10px;
}
.readaloud-rate-profiles > div {
  display: grid;
  gap: 12px;
}
.readaloud-rate-profile-section {
  display: grid;
  gap: 8px;
}
.readaloud-rate-profile-section > span {
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
}
.readaloud-rate-profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 8px;
}
.readaloud-rate-profile-row {
  display: grid;
  grid-template-columns: minmax(82px, 1fr) minmax(90px, 1.2fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}
.readaloud-rate-profile-row input[type="range"] {
  min-width: 0;
}
.readaloud-rate-profile-value {
  color: var(--muted);
  font-size: 12px;
  min-width: 36px;
  text-align: right;
}
.readaloud-rate-profile-preview.is-playing,
.readaloud-rate-profile-preview.active {
  background: var(--accent) !important;
  color: var(--on-accent, #fff) !important;
  border-color: var(--accent) !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25);
}

.readaloud-recordings-modal {
  width: min(760px, 100%) !important;
  height: min(760px, calc(var(--vph) - 40px));
  max-height: calc(var(--vph) - 40px);
}
.readaloud-recordings-modal .changelog-body {
  display: grid;
  min-height: 0;
  overflow: hidden;
}
.readaloud-recordings-list {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}
/* Recording items are action cards; record/listen stay visible as tools. */
.readaloud-recordings-list > .action-card-list { gap: 8px; }
.action-card-meta .readaloud-recording-preview {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.action-card-meta .readaloud-recording-text {
  display: block;
  white-space: pre-wrap;
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.5;
}
.readaloud-recordings-list .action-card-tools .recording {
  background: var(--danger, #d93025);
  border-color: var(--danger, #d93025);
  color: #fff;
}
.action-card-badge.is-recorded { color: var(--success, #22a060); }
:where(html.theme-dark) .action-card-badge.is-recorded { color:var(--success, #a0e7c3); } /* dark:gen */
.action-card-badge.is-missing { background: transparent; color: var(--muted); }

/* Vollbild-Lesefläche, am Aufbau des Lesemodus (.learn-panel) orientiert:
   ganzer Schirm, zentrierte, breite Lesespalte, Controls als Footer. */
.readaloud-player {
  position: fixed;
  inset: 0 var(--fix-right-gap) var(--fix-bottom-gap) 0;
  z-index: 9997;
  display: flex;
  justify-content: center;
  align-items: stretch;
  background: var(--bg);
  touch-action: pan-y;
}
.readaloud-player-inner {
  width: 100%;
  max-width: none;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--bg);
  color: var(--text);
  /* Full-screen layer: keep head and controls clear of status bar and home indicator. */
  padding: calc(24px + var(--safe-top)) calc(clamp(16px, 4vw, 40px) + var(--safe-right))
    calc(24px + var(--safe-bottom)) calc(clamp(16px, 4vw, 40px) + var(--safe-left));
}
@media (min-width: 761px) {
  .readaloud-player-inner {
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
  }
}
@media (max-width: 640px) {
  .readaloud-player-inner {
    padding: calc(12px + var(--safe-top)) calc(12px + var(--safe-right))
      calc(16px + var(--safe-bottom)) calc(12px + var(--safe-left));
    gap: 10px;
  }
  .readaloud-player-text { font-size: 0.95rem; }
}
/* Controls + Tempo ans untere Ende schieben (Footer-Charakter). */
.readaloud-player-controls { margin-top: auto; }
.readaloud-player-head {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  gap: 8px;
  min-height: 32px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}
.readaloud-player-head #readAloudPlayerCloseButton {
  position: absolute;
  right: 0;
  top: 0;
}
.readaloud-player-head #readAloudPlayerEditButton {
  position: absolute;
  right: 36px;
  top: 0;
}
.readaloud-player-head #readAloudPlayerCopyButton {
  position: absolute;
  right: 72px;
  top: 0;
}
.readaloud-edit-btn {
  background: transparent;
  border: none;
  font-size: 1.25rem;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.15s, transform 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* A text label ("Bearbeiten") does not fit the fixed icon offsets above:
   let the header buttons flow after the title instead. */
.readaloud-player-head:has(.button-text-mode) .readaloud-player-collection {
  flex: 1;
  min-width: 0;
  text-align: left;
}
.readaloud-player-head:has(.button-text-mode) :is(#readAloudPlayerCopyButton, #readAloudPlayerEditButton, #readAloudPlayerCloseButton) {
  position: static;
}
.readaloud-player-head #readAloudPlayerEditButton.button-text-mode {
  font-size: 0.95rem;
}
.readaloud-edit-btn:hover {
  color: var(--text);
  transform: scale(1.15);
}
.readaloud-player-collection {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
}
.readaloud-player-component {
  margin: 0 0 4px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-align: center;
}
.readaloud-player-component:empty { display: none; }
.readaloud-player-card {
  flex: 1 1 auto;
  min-height: 0;
  padding: 32px 24px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) * 1.5);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}
.readaloud-player-text {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  width: 100%;
  line-height: 1.6;
  margin-bottom: 0;
  color: var(--text);
  font-size: 1.35rem;
  font-weight: 500;
  word-break: break-word;
  white-space: pre-wrap;
}
.readaloud-verse-line {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
}
.readaloud-verse-num {
  flex: 0 0 auto;
  min-width: 22px;
  text-align: right;
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 700;
}
.readaloud-verse-text {
  min-width: 0;
}
.readaloud-player-text .spoken-word {
  background: var(--accent-soft);
  color: var(--text);
  border-radius: 4px;
}
.readaloud-player-progress {
  height: 6px;
  border-radius: 3px;
  background: var(--line);
  overflow: hidden;
}
.readaloud-player-progress-bar {
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 0.2s linear;
}
.readaloud-player-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 6px 12px;
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.readaloud-player-reference {
  margin: 0 0 12px;
  font-size: 1.8rem;
  font-weight: 800;
  text-align: center;
  color: var(--text);
  letter-spacing: -0.02em;
}
.readaloud-player-reference:empty { display: none; }
.readaloud-player-source {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--success, #22a060);
  font-weight: 700;
}
:where(html.theme-dark) .readaloud-player-source { color:var(--success, #a0e7c3); } /* dark:gen */
.readaloud-player-source::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}
.readaloud-player-source.src-cache { color: #6b7280; }
:where(html.theme-dark) .readaloud-player-source.src-cache { color:#b6bac2; } /* dark:gen */
.readaloud-player-source.src-browser { color: #2563eb; }
:where(html.theme-dark) .readaloud-player-source.src-browser { color:#8aa6e2; } /* dark:gen */
.readaloud-player-source.src-local { color: #0d9488; }
:where(html.theme-dark) .readaloud-player-source.src-local { color:#a9eae4; } /* dark:gen */
.readaloud-player-source.src-premium { color: #7c3aed; }
:where(html.theme-dark) .readaloud-player-source.src-premium { color:#a684e0; } /* dark:gen */
.readaloud-player-source.src-rec-own { color: #22a060; }
:where(html.theme-dark) .readaloud-player-source.src-rec-own { color:#a0e7c3; } /* dark:gen */
.readaloud-player-source.src-rec-ai { color: #d97706; }
:where(html.theme-dark) .readaloud-player-source.src-rec-ai { color:#e5c198; } /* dark:gen */
.readaloud-player-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
/* Text mode: wrap into rows instead of squeezing labels letter by letter. */
.readaloud-player-controls {
  flex-wrap: wrap;
}
.readaloud-player-controls .button-text-mode {
  white-space: nowrap;
}
.readaloud-player-controls .recording {
  background: var(--danger, #d93025);
  border-color: var(--danger, #d93025);
  color: #fff;
}
.readaloud-player-rate,
.readaloud-player-volume {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
}
.readaloud-player-rate input[type="range"],
.readaloud-player-volume input[type="range"] {
  flex: 1;
}

@media (max-width: 640px) {
  .learn-footer {
    min-height: 64px;
    padding-top: 12px;
  }

  .readaloud-player-card {
    padding: 18px 14px;
  }

  .readaloud-player-reference {
    font-size: 1.45rem;
  }

  .readaloud-player-text {
    font-size: 0.95rem;
  }

  .readaloud-player-controls {
    gap: 8px;
    padding-top: 12px;
  }
}

.readaloud-config-footer {
  gap: 16px;
}

#readAloudConfigModal .readaloud-config-footer { flex-wrap: wrap; }
#readAloudConfigError { flex-basis: 100%; margin: 0; color: var(--danger); }
/* Favorite stays at the left edge, away from Cancel/Start. */
#readAloudConfigModal .readaloud-favorite-button { margin-right: auto; }

.readaloud-config-body .field { display: grid; gap: 6px; margin: 12px 0; }
.readaloud-config-body select { width: 100%; min-width: 0; }
.readaloud-presets { display: flex; align-items: end; gap: 10px; margin: 8px 0 4px; }
.readaloud-presets .field { flex: 1; margin: 0; }
.readaloud-preset-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.readaloud-preset-actions button { white-space: nowrap; }
.readaloud-section { border-bottom: 1px solid var(--border-color, #ddd); padding: 12px 0; }
:where(html.theme-dark) .readaloud-section { border-bottom:1px solid var(--border-color, var(--line)); } /* dark:gen */
.readaloud-section > summary { cursor: pointer; padding: 8px 0; overflow-wrap: anywhere; }
#readAloudConfigModal .changelog-modal { display: flex; flex-direction: column; max-height: calc(var(--vph) * 0.9); }
#readAloudConfigModal .changelog-body { min-height: 0; overflow-y: auto; }
#readAloudConfigModal .changelog-header,
#readAloudConfigModal .changelog-footer { flex-shrink: 0; }
#ttsResourcePolicyBody .field { display: grid; gap: 6px; margin: 12px 0; }
@media (max-width: 600px) {
  /* Bottom sheet: close button and footer stay within thumb reach. A tall sheet
     stops below the status bar; the footer stays above the home indicator. */
  #readAloudConfigModal { padding: 0; align-items: flex-end; justify-content: center; }
  #readAloudConfigModal .changelog-modal { width: 100%; max-height: calc(var(--vph) - var(--safe-top) - 12px); margin: 0; border-bottom: 0; border-radius: 20px 20px 0 0; padding: 0 var(--safe-right) var(--safe-bottom) var(--safe-left); }
  /* The selected configuration name needs the full width; actions go below it. */
  .readaloud-presets { flex-direction: column; align-items: stretch; }
  .readaloud-preset-actions button { flex: 1 1 auto; }
}

/* ── Collection Properties Modal ─────────────────────────────────────────── */
.collection-props-modal {
  max-width: 480px;
}

.collection-props-body {
  padding: 20px 24px;
}

.props-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.props-field:last-child {
  margin-bottom: 0;
}

.props-field > label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.props-input,
.props-textarea,
.props-select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-size: 0.95rem;
  box-sizing: border-box;
}

.props-input:focus,
.props-textarea:focus,
.props-select:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
}

.props-textarea {
  resize: vertical;
  min-height: 80px;
  font-family: monospace;
}

.props-color-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.props-color-label {
  font-size: 0.9rem;
  font-weight: normal;
  text-transform: none;
  letter-spacing: normal;
  color: var(--text);
  cursor: pointer;
}

.props-color-picker {
  width: 40px;
  height: 32px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  cursor: pointer;
  flex-shrink: 0;
}

.props-color-picker:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.props-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.props-transfer-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.props-transfer-actions button {
  font-size: 0.85rem;
  padding: 7px 12px;
}

/* Rail color dot */
.ws-rail-color-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-left: 2px;
}

.context-menu.ws-tag-filter-popup {
  max-height: min(calc(var(--vph) * 0.6), 420px);
  overflow-y: auto;
}

@media (max-width: 760px) {
  .context-menu.workspace-mobile-menu {
    inset: auto 8px calc(68px + var(--safe-bottom)) 8px;
    z-index: 10500;
    width: auto;
    min-width: 0;
    max-height: min(calc(var(--vph) - 84px - var(--safe-bottom)), 560px);
    box-sizing: border-box;
    padding: 8px 8px 12px;
    border-radius: 16px 16px 12px 12px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    box-shadow: 0 -8px 32px rgb(0 0 0 / 24%);
  }

  .context-menu.workspace-mobile-menu::before {
    content: "";
    width: 42px;
    height: 4px;
    margin: 0 auto 6px;
    border-radius: 999px;
    background: var(--line);
  }

  .context-menu.workspace-mobile-menu button {
    min-height: 48px;
    padding: 8px 12px;
    font-size: 1rem;
    white-space: normal;
  }

  /* ... aber die Farbtupfer sind keine Menüzeilen. Die Mindesthöhe für
     Touch-Ziele zog sie in die Länge, aus den Kreisen wurden Ellipsen - vier
     bunte Eier, die nach nichts aussahen. Rund bleiben, und dabei gleich
     fingergerecht groß: 26px sind für den Daumen ohnehin zu klein. */
  .context-menu.workspace-mobile-menu .context-menu-highlights,
  .context-menu.workspace-top-popover .context-menu-highlights {
    align-items: center;
  }

  .context-menu.workspace-mobile-menu .context-menu-highlight,
  .context-menu.workspace-top-popover .context-menu-highlight {
    width: 44px;
    height: 44px;
    min-height: 44px;
  }

  .context-menu.workspace-mobile-menu .workspace-menu-heading {
    padding: 10px 12px 5px;
    border-top: 1px solid var(--line);
    margin-top: 4px;
    font-weight: 700;
  }

  .context-menu.workspace-mobile-menu .workspace-menu-heading:first-of-type {
    border-top: 0;
    margin-top: 0;
  }

  /* Sheet: title as heading, groups as bands (docs/kopfzeilen-umbau.md). */
  .context-menu.workspace-mobile-menu > .workspace-menu-heading:first-of-type { padding: 2px 12px 8px; color: var(--text); font: 700 1.15rem/1.25 Georgia, serif; }
  .context-menu.workspace-mobile-menu .context-menu-sep { height: 8px; margin: 6px -8px; background: rgb(49 82 70 / 7%); }

  .context-menu.workspace-mobile-menu.ws-tag-filter-popup {
    max-height: min(calc(var(--vph) - 84px - var(--safe-bottom)), 560px);
  }

  .context-menu.workspace-top-popover {
    position: fixed;
    z-index: 10500;
    width: auto;
    min-width: 200px;
    max-width: calc(var(--vpw) - 16px);
    max-height: min(calc(var(--vph) * 0.7), 480px);
    box-sizing: border-box;
    padding: 8px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgb(0 0 0 / 28%);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .context-menu.workspace-top-popover button {
    min-height: 44px;
    padding: 8px 12px;
    font-size: 0.95rem;
    white-space: normal;
  }

  .context-menu.workspace-top-popover .workspace-menu-heading {
    padding: 8px 12px 4px;
    border-top: 1px solid var(--line);
    margin-top: 4px;
    font-weight: 700;
  }

  .context-menu.workspace-top-popover .workspace-menu-heading:first-of-type {
    border-top: 0;
    margin-top: 0;
  }
}

/* ── Workspace (Arbeitsbereich) ──────────────────────────────────────────── */
.workspace-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
body.workspace-tone-warm .workspace-panel {
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--accent) 10%, transparent), transparent 34rem),
    linear-gradient(180deg, color-mix(in srgb, var(--panel) 68%, transparent), transparent 18rem);
  border-radius: 12px;
}
.ws-rail-practice {
  width: 26px;
  height: 26px;
  min-height: 0;
  flex: none;
  padding: 0;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  opacity: 0;
}
.ws-rail-practice:hover,
.ws-rail-kebab:hover {
  background: rgba(255, 255, 255, 0.18);
}
:where(html.theme-dark) .ws-rail-practice:hover, :where(html.theme-dark) .ws-rail-kebab:hover { background:rgba(27,34,31,0.18); } /* dark:gen */
.ws-rail-item:hover .ws-rail-kebab,
.ws-rail-item:hover .ws-rail-practice,
.ws-rail-item:focus-within .ws-rail-kebab,
.ws-rail-item:focus-within .ws-rail-practice,
.ws-rail-item.active .ws-rail-kebab {
  opacity: 1;
}
.ws-rail-item.active .ws-rail-practice {
  opacity: 1;
}
.ws-start-losungen {
  display: grid;
  gap: 8px;
  margin: 0 14px;
  padding: 14px 0;
  border-top: 1px solid color-mix(in srgb, var(--accent) 14%, var(--line));
}
.ws-losungen-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--muted);
}
.ws-losungen-header {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ws-losungen-date {
  flex: 1;
  font-size: 0.92rem;
}
.ws-losungen-nav {
  min-height: 0;
  padding: 4px 8px;
}
.ws-losungen-verse p {
  margin: 0;
  color: var(--text);
}
.ws-losungen-verse-ref {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  font-size: 0.85rem;
}
.ws-losungen-verse-ref-link {
  border: 0;
  border-bottom: 1px dotted currentColor;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
  min-height: 0;
  padding: 0;
}
.ws-losungen-verse-actions {
  display: inline-flex;
  gap: 6px;
  margin-left: auto;
}
.ws-losungen-action {
  width: 28px;
  height: 28px;
  min-height: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--line));
  border-radius: 8px;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font-size: 0.8rem;
}
.ws-losungen-action:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.ws-losungen-copyright {
  margin: 4px 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}
.ws-losungen-copyright a {
  color: inherit;
}
.ws-losungen-loading {
  color: var(--muted);
  font-size: 0.85rem;
}

/* Strong-Wörterbuch-Trefferzeilen (Volltextsuche über die Definitionen) */
.strong-search-result {
  display: block;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  text-align: left;
  padding: 10px 12px;
  cursor: pointer;
}
.strong-search-result:last-child {
  border-bottom: 0;
}
.strong-search-result:hover,
.strong-search-result:focus-visible {
  background: var(--accent-soft);
  outline: none;
}
.strong-search-result-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-weight: 600;
}
.strong-search-result-lemma {
  font-weight: 400;
  color: var(--muted);
}
.strong-search-result-snippet {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

/* Vollbild-Overlay für Detail im Workspace bei schmalem Viewport (< 1080px). */
.capture-detail--overlay {
  display: block !important;
  position: fixed !important;
  inset: 0 var(--fix-right-gap) var(--fix-bottom-gap) 0;
  z-index: 50;
  border: 0 !important;
  border-radius: 0 !important;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--panel);
  padding: 16px;
  padding-top: max(16px, var(--safe-top));
  padding-right: max(16px, var(--safe-right));
  padding-bottom: max(16px, var(--safe-bottom));
  padding-left: max(16px, var(--safe-left));
}

.ws-group-subheader {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 4px 10px;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  text-align: left;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.ws-group-subheader:hover { color: var(--text); }
.ws-group-subheader.collapsed > .ws-group-chevron { transform: rotate(-90deg); }
.ws-group-subheader:not(.collapsed) > .ws-group-chevron { transform: rotate(0); }
.ws-group-chevron { transition: transform 0.15s ease; display: inline-block; font-size: 0.7em; }
@keyframes rail-skeleton-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.ws-skeleton-row {
  height: 28px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--skeleton-base) 25%, var(--skeleton-shimmer) 50%, var(--skeleton-base) 75%);
  background-size: 200% 100%;
  animation: rail-skeleton-shimmer 1.5s infinite;
  margin: 4px 8px;
}
.ws-bible-pager-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ws-bible-page-head {
  position: sticky;
  top: calc(52px + var(--safe-top));
  z-index: 30;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  margin: 0 2px 8px;
  padding: 7px 8px;
  background: color-mix(in srgb, var(--panel) 96%, transparent);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--text) 10%, transparent);
  backdrop-filter: blur(12px);
}
.ws-bible-location {
  display: none;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  gap: 8px;
}
.ws-bible-compact-jump {
  display: none;
}
.ws-bible-reading-meta {
  min-width: 0;
  color: var(--muted);
  font-size: .76rem;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ws-bible-pager-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}
.ws-bible-pager-btn:disabled {
  opacity: 0.4;
  cursor: default;
}
.context-menu-sep {
  height: 1px;
  background: var(--line);
  margin: 4px 8px;
}
.bible-passage-range-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin: 8px 0 14px;
}
.bible-passage-range-controls button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.bible-passage-range-controls strong {
  text-align: center;
  white-space: nowrap;
}
.bible-passage-range-controls .bible-passage-whole-chapter {
  grid-column: 1 / -1;
  justify-self: center;
  padding-inline: 22px;
}
.bible-passage-range-controls--toolbar {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
  margin: 0;
}
.bible-passage-range-controls--toolbar button {
  min-height: 38px;
  padding: 0 10px;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .bible-passage-range-controls {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .bible-passage-range-controls strong {
    grid-column: 1 / -1;
    grid-row: 1;
  }
  .bible-passage-range-controls--toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}
.ws-bible-verse-highlight {
  border-width: 2px;
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--panel));
}
.ws-bible-verse-highlight:hover {
  border-color: var(--accent);
}
.settings-disclosure > summary {
  cursor: pointer;
  font-weight: 600;
}
.settings-disclosure > .settings-row { margin-top: 12px; }

/* ── Keyboard shortcuts setting (step 11) ────────────────────────────────── */
.shortcut-context {
  display: block;
  font-size: 0.8rem;
  font-weight: normal;
}
.settings-component-dialog {
  width: min(960px, calc(var(--vpw) - 24px));
  max-width: none;
  max-height: calc(var(--vph) - 24px);
  box-sizing: border-box;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  overflow: hidden;
}
.settings-component-dialog[open] { display: flex; flex-direction: column; gap: 12px; }
.settings-component-dialog::backdrop { background: rgb(0 0 0 / 35%); }
.settings-component-dialog > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-shrink: 0; }
.settings-component-dialog h2 { margin: 0; font-size: 1.2rem; }
.settings-component-dialog > header button { flex-shrink: 0; }
.settings-component-body { min-height: 0; overflow: auto; overscroll-behavior: contain; }
.settings-component-dialog .settings-subtitle,
.settings-component-dialog .settings-disclosure > summary { display: none; }
.settings-component-dialog .settings-disclosure { margin: 0; }
.start-hero-settings-window {
  position: fixed;
  inset: auto auto 12px 12px;
  margin: 0;
  width: min(700px, calc(var(--vpw) - 24px));
  z-index: 9500;
  box-shadow: 0 12px 40px rgb(0 0 0 / 20%);
}
.start-hero-settings-window.is-maximized {
  left: 12px !important;
  top: 12px !important;
  width: calc(var(--vpw) - 24px) !important;
  height: calc(var(--vph) - 24px) !important;
}
@media (min-width: 761px) {
  .start-hero-settings-window > header { cursor: move; touch-action: none; user-select: none; }
}
@media (max-width: 760px) {
  .start-hero-settings-window { max-height: calc(var(--vph) * .6); }
}
@media (max-width: 760px) {
  .settings-component-dialog .shortcut-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; }
  .settings-component-dialog .shortcut-label { grid-column: 1 / -1; min-width: 0; }
  .settings-component-dialog .shortcut-combo { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
}

.shortcuts-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.shortcut-section > summary {
  cursor: pointer;
  font-weight: 600;
  padding: 8px 0;
}
.shortcut-reference .shortcut-combo {
  white-space: normal;
  overflow-wrap: anywhere;
}
@media (max-width: 760px) {
  .settings-component-dialog .shortcut-reference { grid-template-columns: minmax(0, 1fr); }
}
.shortcut-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.shortcut-label {
  flex: 1;
  min-width: 140px;
}
.shortcut-combo {
  font-family: ui-monospace, monospace;
  font-size: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 8px;
  background: var(--bg);
  white-space: nowrap;
}
.shortcut-combo.recording {
  border-color: var(--accent);
  color: var(--accent);
}
.shortcut-row button {
  min-height: 0;
  padding: 5px 10px;
  font-size: 0.85rem;
}
@media (max-width: 760px) {
  .shell {
    padding-bottom: max(92px, calc(var(--safe-bottom) + 86px));
  }

  body.keyboard-active .shell {
    padding-bottom: max(16px, var(--safe-bottom));
  }

  .capture-detail--overlay {
    padding-bottom: max(92px, calc(var(--safe-bottom) + 86px));
  }

  body.keyboard-active .capture-detail--overlay {
    padding-bottom: max(16px, var(--safe-bottom));
  }

  .reading-context-bar,
.ws-bible-page-head {
    top: calc(46px + var(--safe-top));
  }

  /* Gehört zwingend zur Regel darunter: dort wird das Vorschlagspanel vom
     absolut positionierten Overlay zum normalen Flex-Kind (position: static)
     und fordert mit flex-basis 100% eine eigene Zeile. Ohne flex-wrap bleibt es
     jedoch in derselben Zeile wie das Eingabefeld und drückt dieses - es hat
     flex:1 und min-width:0 - auf Breite 0: der getippte Text verschwindet,
     sichtbar bleibt nur der Cursor. Wer eine der beiden Regeln ändert, muss
     die andere mitprüfen. */
  .ws-spot {
    flex-wrap: wrap;
  }

  .ws-spot-input {
    flex-basis: calc(100% - 82px);
  }

  /* Über der fixierten Bottom-Nav schweben lassen, sonst wird der Fehlerhinweis
     dahinter verdeckt. */
  .status.error:not(:empty) {
    bottom: calc(max(74px, calc(var(--safe-bottom) + 70px)) + var(--fix-bottom-gap));
  }
}

/* ── Command palette (⌘K) ────────────────────────────────────────────────── */
.cmd-palette-backdrop {
  position: fixed;
  inset: 0 var(--fix-right-gap) var(--fix-bottom-gap) 0;
  z-index: 9500;
  background: rgba(10, 8, 30, 0.4);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: calc(var(--vph) * 0.12);
}
.cmd-palette {
  width: min(620px, calc(var(--vpw) * 0.92));
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}
.cmd-palette-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.cmd-palette-icon {
  color: var(--muted);
}
.cmd-palette-input-row input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 1.05rem;
  outline: none;
}
.cmd-palette-kbd {
  font-size: 0.72rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 6px;
}
/* Touch devices have no Alt key: the per-row Alt+N / Enter hints are noise there. */
@media (hover: none) and (pointer: coarse) {
  .cmd-palette-item .cmd-palette-kbd { display: none; }
}
.cmd-palette-kbd-button {
  flex: none;
  font-family: inherit;
  line-height: 1.4;
  background: transparent;
  cursor: pointer;
}
.cmd-palette-kbd-button:hover {
  color: var(--text);
  border-color: var(--muted);
  background: var(--panel);
}
.cmd-palette-kbd-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.cmd-palette-scopes { display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding:8px 16px; border-bottom:1px solid var(--line); }
.cmd-palette-scope { display:inline-flex; align-items:center; gap:6px; min-height:34px; margin:0; padding:0 12px; border:1px solid var(--line); border-radius:999px; color:var(--text); background:transparent; font-size:.85rem; cursor:pointer; }
.cmd-palette-scope[hidden] { display:none; }
.cmd-palette-scope .fa-icon { font-size:.8rem; }
.cmd-palette-scope.active { border-color:var(--accent); color:var(--accent); background:var(--accent-soft); }
.cmd-palette-scope-mode { border-style:dashed; color:var(--muted); }
.cmd-palette-scope:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.cmd-palette-local-status { padding:10px 12px; color:var(--muted); font-size:.85rem; }
/* List scope: the page behind shows the live result, so no dimming. */
.cmd-palette-backdrop.is-local-scope,
body.ui-mode-simple .cmd-palette-backdrop.is-local-scope { background:transparent; -webkit-backdrop-filter:none; backdrop-filter:none; }
.cmd-palette-backdrop.is-local-scope .cmd-palette-list { max-height:none; padding:0; }
.cmd-palette-backdrop.is-local-scope .cmd-palette-quote-hint { display:none; }
.cmd-palette-quote-hint { margin:0; padding:8px 16px; color:var(--muted); font-size:.8rem; }
.cmd-palette-error {
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--danger);
  font-weight: 600;
}
.cmd-palette-list {
  max-height: calc(var(--vph) * 0.46);
  overflow: auto;
  padding: 6px;
}
.cmd-palette-section {
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 6px 8px 2px;
  font-weight: 700;
}
.cmd-palette-section--collapsible {
  display: flex;
  align-items: center;
  gap: 6px;
  width: calc(100% - 20px);
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
}
.cmd-palette-section--collapsible .ws-group-chevron {
  transition: transform 0.15s;
}
.cmd-palette-section--collapsible.collapsed .ws-group-chevron {
  transform: rotate(-90deg);
}
.cmd-palette-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 5px 9px;
  min-height: 32px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}
.cmd-palette-item-icon {
  width: 20px;
  text-align: center;
  color: var(--muted);
}
.cmd-palette-item-meta {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--muted);
}
.cmd-palette-match {
  background: transparent;
  color: var(--accent);
  font-weight: 700;
  padding: 0;
  border-radius: 0;
}
.cmd-palette-item.selected,
.cmd-palette-item:hover {
  background: var(--accent-soft);
}

/* Collection Customizations (Icons, Colors & Pinned) */
.props-color-hex {
  width: 90px !important;
  height: 32px !important;
  font-family: monospace;
  text-transform: uppercase;
}

.props-icon-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.props-icon-label {
  font-size: 0.9rem;
  font-weight: normal;
  text-transform: none;
  letter-spacing: normal;
  color: var(--text);
  cursor: pointer;
}
.props-icon-custom {
  width: 90px !important;
  height: 32px !important;
  font-family: monospace;
}
.props-icon-preview {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
}
.props-icon-link {
  font-size: 0.85rem;
}
.props-icon-help {
  color: var(--muted);
  font-size: 0.95rem;
  text-decoration: none;
}
.props-icon-help:hover,
.props-icon-help:focus-visible {
  color: var(--accent);
}
.props-icon-presets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(44px, 1fr));
  gap: 6px;
  margin-top: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}
.props-icon-preset-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  font-family: "FAS";
  font-weight: 900;
  font-size: 1.1rem;
  transition: background 0.1s, border-color 0.1s;
  padding: 0;
}
.props-icon-preset-btn:hover {
  background: var(--line);
}
.props-icon-preset-btn.active {
  background: var(--accent);
  color: var(--on-accent, #fff);
  border-color: var(--accent);
}

.chip.is-pinned::after {
  content: "\f005";
  font-family: "FAS";
  font-weight: 900;
  font-size: 0.75rem;
  margin-left: 6px;
  opacity: 0.7;
}

/* Custom accent colors for chips */
.chip.has-custom-color {
  --border-mix: color-mix(in srgb, var(--custom-color) 40%, var(--line));
  --bg-mix: color-mix(in srgb, var(--custom-color) 12%, var(--panel));
  --text-mix: color-mix(in srgb, var(--custom-color) 85%, var(--text));

  border-color: var(--border-mix);
  background: var(--bg-mix);
  color: var(--text-mix);
}
.chip.has-custom-color:hover {
  background: color-mix(in srgb, var(--custom-color) 20%, var(--panel));
}
.chip.has-custom-color.active {
  background: var(--custom-color);
  border-color: var(--custom-color);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

/* Workspace rail item custom colors */
.ws-rail-item.has-custom-color .ws-rail-item-icon {
  color: var(--custom-color);
}
.ws-rail-item.has-custom-color:hover {
  background: color-mix(in srgb, var(--custom-color) 10%, var(--panel));
}
.ws-rail-item.has-custom-color.active {
  background: var(--custom-color);
  color: #fff;
}
.ws-rail-item.has-custom-color.active .ws-rail-item-icon {
  color: #fff;
}

/* Dark mode overrides */
html.theme-dark .chip.has-custom-color {
  --bg-mix: color-mix(in srgb, var(--custom-color) 16%, var(--panel));
  --text-mix: color-mix(in srgb, var(--custom-color) 80%, #fff);
}
html.theme-dark .chip.has-custom-color.active {
  filter: saturate(0.85) brightness(0.95);
}

.ws-rail-item.is-favorite .ws-rail-item-name::before {
  content: "\f005";
  font-family: "FAS";
  font-weight: 900;
  font-size: 0.7rem;
  margin-right: 6px;
  opacity: 0.6;
}

/* ── Groups UI ─────────────────────────────────────────────────────────── */
/* Group cards (action cards); subgroups are indented under their parent. */
.groups-tree .action-card { margin-left: calc(var(--group-depth, 0) * 20px); }
@media (max-width: 600px) {
  .groups-tree .action-card { margin-left: calc(var(--group-depth, 0) * 10px); }
}

/* ── Shares ───────────────────────────────────────────────────────────────── */

.ws-share-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 0;
}

/* Own shares keep language editions and management actions together. */
.ws-my-share-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.ws-my-share-toolbar input { flex: 1; min-width: 180px; }
.ws-my-share-groups, .ws-my-share-folder-body { display: flex; flex-direction: column; gap: 8px; }
.ws-my-share-folder-body[hidden] { display: none; }
.ws-share-folder-toggle { border: 0; background: transparent; color: var(--text); font-weight: 700; text-align: left; padding: 4px 0; }
.ws-my-share-folder .ws-share-group-head { opacity: 1; flex-wrap: wrap; text-transform: none; letter-spacing: 0; }
.ws-my-share-collection { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); overflow: hidden; }
.ws-my-share-collection-title { display: block; width: 100%; border: 0; border-radius: 0; background: transparent; color: var(--text); font-weight: 700; text-align: left; padding: 12px 14px 4px; white-space: normal; }
/* Language editions are cards inside the collection frame: no second border. */
.ws-my-share-collection .action-card-list { gap: 0; }
.ws-my-share-collection .action-card { border: 0; border-radius: 0; }
.ws-my-share-collection .action-card + .action-card { border-top: 1px solid var(--line); }
.ws-my-share-collection-title ~ .action-card-list .action-card-main { padding-left: 28px; }
.ws-my-share-order { display: flex; gap: 4px; flex: none; }

.ws-share-activity-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 7%, var(--panel));
  color: var(--muted);
  font-size: 0.82rem;
}

.ws-share-activity-summary strong {
  color: var(--text);
}

.ws-share-activity-summary span + span::before {
  content: "·";
  margin-right: 8px;
}

.action-card-badge.ws-share-activity-badge.warn,
.action-card-badge.ws-share-activity-badge.changed { background: #fef3c7; color: #92400e; }
:where(html.theme-dark) .action-card-badge.ws-share-activity-badge.warn, :where(html.theme-dark) .action-card-badge.ws-share-activity-badge.changed { background:#474025; color:#eac2a9; } /* dark:gen */
.action-card-badge.ws-share-activity-badge.new { background: #dbeafe; color: #1e40af; }
:where(html.theme-dark) .action-card-badge.ws-share-activity-badge.new { background:#1e2b3b; color:#9daee6; } /* dark:gen */
.action-card-badge.ws-share-activity-badge.local,
.action-card-badge.ws-share-activity-badge.detached { background: #f3e8ff; color: #6b21a8; }
:where(html.theme-dark) .action-card-badge.ws-share-activity-badge.local, :where(html.theme-dark) .action-card-badge.ws-share-activity-badge.detached { background:#261a33; color:#c69ee7; } /* dark:gen */
.action-card-badge.ws-share-activity-badge.subscribed { background: #dcfce7; color: #166534; }
:where(html.theme-dark) .action-card-badge.ws-share-activity-badge.subscribed { background:#1f3c29; color:#b4ecc9; } /* dark:gen */

/* ── Conflict badge on the Start button of the bottom navigation ─────────── */
/* Id selector: outranks the generic .simple-bottom-nav button rules. */
#conflictBadge {
  position: absolute;
  top: -10px;
  left: calc(7px + (100% - 14px) / 5 - 30px);
  z-index: 1;
  display: inline-flex;
  align-items: center;
  min-height: 0;
  padding: 2px 8px;
  border: 1px solid #f0c36d;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
:where(html.theme-dark) #conflictBadge { border:1px solid #897142; background:#474025; color:#eac2a9; } /* dark:gen */
#conflictBadge[hidden] { display: none; }
#conflictBadge:hover,
#conflictBadge:focus-visible { background: #fde68a; color: #78350f; }
:where(html.theme-dark) #conflictBadge:hover, :where(html.theme-dark) #conflictBadge:focus-visible { background:#6c6137; color:#ebc6b0; } /* dark:gen */

/* ── Share Edit / Conflict / Report Cards ──────────────────────────────────── */
.share-edit-card,
.conflict-card,
.report-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--panel);
}
.share-edit-card .field,
.conflict-card .field {
  margin-bottom: 8px;
}
.share-edit-card textarea,
.share-edit-card input {
  width: 100%;
  box-sizing: border-box;
}

/* ── Positive/Negative soft backgrounds for diff display ──────────────────── */
:root {
  --positive-soft: #e8f5e9;
  --negative-soft: #ffebee;
}
html.theme-dark {
  --positive-soft: #1b3a1b;
  --negative-soft: #3a1b1b;
}

/* Mobile: Collection-Detail-Titel ist redundant zum Mobile-Workspace-Header.
   Auf <760px zeigt der Mobile-Header den aktiven Sammlungsnamen; der
   collectionTitle im Detail-Panel würde doppelt erscheinen. */
@media (max-width: 760px) {
  #collectionTitle {
    display: none;
  }

  }

/* ── Settings tabs ──────────────────────────────────────────────────────── */
.linked-signin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}
.settings-form[hidden],
.settings-general-card[hidden],
[data-settings-tab-panel][hidden],
[data-admin-panel][hidden] {
  display: none !important;
}
.section-tabs {
  display: flex;
  max-width: 100%;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line, #d9dde3);
  border-radius: 8px;
  background: var(--bg);
  margin-bottom: 20px;
  overflow-x: auto;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
:where(html.theme-dark) .section-tabs { border:1px solid var(--line, var(--line)); } /* dark:gen */
.settings-tab,
.section-tab {
  flex: 1 0 auto;
  border: 0;
  background: transparent;
  color: var(--muted, #6b7280);
  min-height: 38px;
  padding: 8px 16px;
  cursor: pointer;
  border-radius: 6px;
  font: inherit;
  font-weight: 500;
  white-space: nowrap;
}
:where(html.theme-dark) .settings-tab, :where(html.theme-dark) .section-tab { color:var(--muted, #b6bac2); } /* dark:gen */
.settings-tab:hover,
.section-tab:hover {
  background: var(--accent-soft, #ede9ff);
  color: var(--accent, #4f2fd8);
}
:where(html.theme-dark) .settings-tab:hover, :where(html.theme-dark) .section-tab:hover { background:var(--accent-soft, #1e1a32); color:var(--accent, #9d8de2); } /* dark:gen */
.settings-tab.active,
.section-tab.active {
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
  font-weight: 650;
}
.settings-tab:focus-visible,
.section-tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* Keep every settings category visible, including on narrow screens. */
.settings-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: visible;
}
.settings-tabs .settings-tab {
  min-width: 0;
  white-space: normal;
}
@media (max-width: 760px) {
  .settings-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .settings-tabs .settings-tab {
    min-width: 0;
    padding: 10px 8px;
  }
}

/* ── Pronunciation list ────────────────────────────────────────────────── */
.settings-subtitle {
  margin: 18px 0 0;
  font-size: 14px;
}

.settings-pron-toolbar {
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 2fr) auto auto;
  align-items: end;
  gap: 10px;
}

.pronunciation-table {
  width: 100%;
}
.dt-container {
  color: var(--text);
}
.dt-container .dt-layout-row {
  gap: 10px;
  margin: 8px 0;
}
.dt-container .dt-search input,
.dt-container .dt-length select,
.dt-container .dtcc-content :is(input, select) {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  padding: 6px 8px;
}
.dt-container table.dataTable {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.dt-container table.dataTable thead th,
.dt-container table.dataTable tbody td {
  border-bottom-color: var(--line);
  vertical-align: top;
}
/* DataTables' eigenes Default-CSS setzt auf .dt-column-title overflow-wrap:
   anywhere - im Flex-Header (.dt-column-header) darf der Titel dadurch bis auf
   Bruchteile eines Zeichens schrumpfen, sobald mehrere Spalten samt Sortier-/
   ColumnControl-Icons um zu wenig Breite konkurrieren. Ergebnis: Titel wie
   "Zuletzt gesehen" brechen mitten im Wort über 4+ Zeilen. Titel bleiben
   einzeilig; passt die Gesamttabelle nicht mehr in die Karte, übernimmt das
   ohnehin vorhandene overflow-x: auto (siehe .admin-table-container). */
.dt-container .dt-column-title {
  white-space: nowrap;
  overflow-wrap: normal;
}
.dt-container table.dataTable tbody tr {
  background: var(--panel);
}
.dt-container table.dataTable tbody tr:hover {
  background: var(--control-hover, rgba(148, 163, 184, .12));
}
.dt-container .dt-paging .dt-paging-button {
  border-radius: 8px;
  color: var(--text) !important;
}
.pronunciation-table .pron-action {
  margin: 0 4px 4px 0;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .section-tabs {
    align-items: stretch;
    margin-left: -4px;
    margin-right: -4px;
    padding: 4px;
    scroll-snap-type: x proximity;
  }

  .settings-tab,
  .section-tab {
    flex: 0 0 auto;
    min-width: max-content;
    padding: 8px 12px;
    font-size: 12px;
    scroll-snap-align: start;
  }

  .settings-pron-toolbar {
    grid-template-columns: minmax(0, 1fr);
  }

  
  
  }

.admin-pron-tabs {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  margin-bottom: 12px;
}
.admin-pron-tab {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  min-height: 34px;
  padding: 7px 12px;
  cursor: pointer;
  font: inherit;
}
.admin-pron-tab:hover {
  background: var(--accent-soft);
  color: var(--accent);
}
.admin-pron-tab.active {
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
  font-weight: 650;
}
.admin-pron-regeneration {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.admin-pron-regeneration .field {
  grid-template-columns: minmax(120px, auto) minmax(160px, 1fr) minmax(80px, .5fr) minmax(80px, .5fr) auto auto;
}
.admin-pron-regeneration-samples {
  display: grid;
  gap: 14px;
  margin-top: 8px;
}
.admin-pron-regeneration-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
  font-size: 0.9em;
}
.admin-pron-regeneration-group {
  display: grid;
  gap: 6px;
}
.admin-pron-regeneration-group h4 {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}
.admin-pron-regeneration-sample {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(100px, auto) auto;
  align-items: center;
  gap: 4px 10px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}
.admin-pron-regeneration-sample small {
  grid-column: 1 / -1;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.admin-pron-regeneration-cleanup {
  justify-self: start;
}
@media (max-width: 640px) {
  .admin-pron-regeneration .field,
  .admin-pron-regeneration-sample {
    grid-template-columns: minmax(0, 1fr);
  }
}
#adminPronEntriesPanel[hidden],
#adminPronReportsPanel[hidden],
#adminPronSubmissionsPanel[hidden] {
  display: none !important;
}

/* Status-Badges für Community-Submissions (Admin-Vorschlags-Queue). */
.pron-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  text-transform: lowercase;
}
.pron-status-pending {
  background: rgba(244, 187, 35, 0.18);
  color: #a06c00;
}
:where(html.theme-dark) .pron-status-pending { color:#ead5a9; } /* dark:gen */
.pron-status-approved {
  background: rgba(63, 168, 80, 0.18);
  color: #1f6b30;
}
:where(html.theme-dark) .pron-status-approved { color:#b2e9be; } /* dark:gen */
.pron-status-rejected {
  background: rgba(220, 80, 80, 0.18);
  color: #8a2222;
}
:where(html.theme-dark) .pron-status-rejected { color:#e9a6a6; } /* dark:gen */

.ui-dialog-backdrop {
  /* Above #entryTextDialogBackdrop (10210): the text editor is a non-blocking
     window, and a confirmation asked from it (e.g. "Text löschen") must not
     render hidden behind it. */
  z-index: 10220;
}
.modal-form {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}
.modal-form-body {
  display: grid;
  gap: 12px;
}

/* Simple UI: a guided entry layer over the existing workspace. */
/* Simple mode is a warm-green surface. Overriding the theme variables here
   makes every shared dialog, button and form control follow the green key
   color automatically — even when the classic mode uses the warm red tone
   (workspace-tone-warm). This block intentionally comes after
   body.workspace-tone-warm so it wins. Its dark counterpart is
   html.theme-dark body.ui-mode-simple further down (docs/dark-mode.md). */
body.ui-mode-simple {
  color-scheme: light;
  --bg: #eef1eb;
  --panel: #fffdf8;
  --text: #27312d;
  --muted: #66716c;
  --line: #dedbd3;
  --accent: #3e6b59;
  --accent-soft: #e2eee7;
  /* The green accent stays dark here, even under a dark system scheme. */
  --on-accent: #fff;
  --skeleton-base: rgba(62,107,89,.07);
  --skeleton-shimmer: rgba(62,107,89,.15);
}

/* ---- Farbstimmung des Startbilds ------------------------------------------
   Das gewählte Startbild bleibt nicht auf der Startseite stehen:
   applySimpleHomeHero() setzt data-hero (Motiv) und data-hero-mood (Stärke) auf
   <body>, alles Weitere passiert hier.

   Pro Motiv stehen nur zwei Dinge: eine Schlüsselfarbe, die aus dem Bild
   gemessen wurde, und eine 20x12-Pixel-Miniatur desselben Bildes. Papier-,
   Linien-, Dekor- und Hinweisfarbe leitet color-mix daraus ab - sonst müssten
   vier Motive x zwei Stärken = acht Paletten von Hand gepflegt werden.

   Die Miniaturen sind ~200 Byte groß und stehen deshalb als data-URI direkt
   hier: hochskaliert ergeben sie von selbst das weiche Farbfeld hinter der
   Oberfläche - kein Blur-Filter, kein zusätzlicher Request, nichts, was auf
   dem Handy ruckeln könnte.

   Nicht eingefärbt werden Textfarbe und Primärfarbe (das Grün). Der einfache
   Modus soll seine Handschrift behalten, und der Kontrast bleibt so in jeder
   Kombination über 9:1 (Fließtext) bzw. über 4,5:1 (Hinweise, Dekor). */
body[data-hero="eagle"] {
  --hero-key: #6babd7;
  --hero-image: url("images/simple-home-hero-eagle-sky.webp");
  --hero-focus: 70% 45%;
  --hero-field: url("data:image/webp;base64,UklGRsgAAABXRUJQVlA4ILwAAADQBQCdASoUAAwAPm0skUWkIqGYBABABsS2AE6ZQjuRYFWrt8fTM93bIpwWETEDMl2BtjD5Vc8gAP7Ixpydiq88B/rx8PRifYS53/J6+M1Xr8yPbzm3kjmmbh97O9W2sfnqIg9ht+oP+/g1psPAyQyKnCZf2/1LA0h6b6wCE/K72LBcYcBhEdlZQ5F+ZNExl5L7tYe7ySc334Cny/utGDbWzu5VHoR+xji6+aHvuAJ6RGzcSrwuIrWFgZyAAA==");
}
body[data-hero="wheat"] {
  --hero-key: #b9813a;
  --hero-image: url("images/simple-home-hero-wheat-mountains.webp");
  --hero-focus: 62% 45%;
  --hero-field: url("data:image/webp;base64,UklGRsYAAABXRUJQVlA4ILoAAACwBACdASoUAAwAPm0skkWkIqGYBABABsS1AE6ZQYwTOqBAX6ShjtI5vLgpbgqQAP7z7neDgz0/NZtVdj/Oew7OOuNLNrmnAHZsJF3RXtpuGpyRcCx3eQxxE/xFcU3zt4bQqNH/kN1LXwq8NueMisd9p9+mjXZj/bCzBOB/wrqxSw5AHLW2ipSecqY3SS9RYoxtmsUa95jnez+bipfqh6rA0ZM2wKck+xVkXMQA5uSM8clv3q7a1EV5AAA=");
}
body[data-hero="lion-lamb"] {
  --hero-key: #8a6f3f;
  --hero-image: url("images/simple-home-hero-lion-lamb-eagle.webp");
  --hero-focus: 72% 40%;
  --hero-field: url("data:image/webp;base64,UklGRqYAAABXRUJQVlA4IJoAAACQBACdASoUAAwAPm0skUWkIqGYBABABsSyAE6ZQjgb0AAxxnojz8kGJpU8uAAA/vji+Nnwzm4a584B1EWJNaEehRGaQPVnZQOCLNAtUOaWSaPiZe/i9eDYas7TrANH92jaZ2Ff3mnnZU7K3V/Zoz5D18giatPqxCRCaFd+oitpWVUcCa2XBkPM8bE3Fzq0u7b98PykwoHxPcwA");
}
body[data-hero="crosses"] {
  --hero-key: #4a4168;
  --hero-image: url("images/simple-home-hero-three-crosses.webp");
  --hero-focus: 74% 58%;
  --hero-field: url("data:image/webp;base64,UklGRqQAAABXRUJQVlA4IJgAAADwAwCdASoUAAwAPm0qkUWkIqGYBABABsSyAE6AERH8IvoPEQfJtWQAAP79AnrJzCFUHVFKq7Df6vglsfUPB72XT8h6JPiC981+O65Ao9gy2Qv5O5EL9Lo6cglJ0a8M49UkPLnCAHkTeiuT3zJu98ZMqFRXpCdIglPtwfJXn1s66+P1lP6LBtN8zL89De7Pf20SOoKYQ8AAAA==");
}

/* Schlüsselfarbe aus der Wiese gemessen (#5a5f3a) und leicht angehoben: das
   Bild ist warm ausgeleuchtet, sein Grün also olivstichig - ungehoben läge die
   Tönung bei 7 % zu nah an den Kornfeldern. */
body[data-hero="empty-tomb"] {
  --hero-key: #6b7442;
  --hero-image: url("images/simple-home-hero-empty-tomb.webp");
  --hero-focus: 72% 42%;
  --hero-field: url("data:image/webp;base64,UklGRqAAAABXRUJQVlA4IJQAAADwAwCdASoUAAwAPm0skkWkIqGYBABABsSgCdL1ABz8jx4dk6FuF5bUAP76vdKXpUnv7HbvSK2UpYwzcSFZaBeIRf1kgPRCUu5okxr//lg4QXjtN6itl4JTfoLNYVs/QsCa1QAidc6FzDHr7MPYduaeMAk5TD2BRgCotNJfTt9ZjTBC5bdDo35D6429EOGPhCSAAAAA");
}

/* Eigenes Markenmotiv statt Fotoszene: das App-Icon freigestellt auf einem
   Farbverlauf aus seiner eigenen Palette (Creme → Koralle → Indigo). Schlüssel-
   farbe aus der Koralle rund ums Icon gemessen. */
body[data-hero="brand"] {
  --hero-key: #714f56;
  --hero-image: url("images/simple-home-hero-brand-herzwort.webp");
  --hero-focus: 60% 50%;
  --hero-field: url("data:image/webp;base64,UklGRoAAAABXRUJQVlA4IHQAAABwBACdASoUAAwAPrVKnkonJCKhsAgA4BaJbACdMoRwACPgjHAys/J+F1sHAAD+88eSmVXqxdB/VZoPKyhLAieJyXmfP15WRS+L8hugkZ7TncxHNudh7OIjJBhN0xU01NqmN7ZCKZK/40t/AUHat5D5jUAAAA==");
}

/* Psalm 119,105, Markus 4,39 und 1. Mose 15,5. Schlüsselfarben aus dem Bild
   gemessen; Öllampe (#dea254) und Wüste (#aea984, vom Himmel entsättigt) auf
   einen kräftigeren Mittelton gesetzt, sonst fielen Hinweis- und Dekorfarbe
   unter 4,5:1 bzw. die Tönung wäre grau. */
body[data-hero="oil-lamp"] {
  --hero-key: #a9743a;
  --hero-image: url("images/simple-home-hero-oil-lamp-scroll.webp");
  --hero-focus: 66% 40%;
  --hero-field: url("data:image/webp;base64,UklGRpAAAABXRUJQVlA4IIQAAABQBACdASoUAAwAPrVInkmnJCKhMAgA4BaJZgCdMoRwAB/SSJYe3tIvgLQAAP7uQ4gYujVN4WvDkYlBCKvoCdFReJjmvDg3fh01My17rdG0Ap1rH+Bx/7o6VUa0DrDMhUr9dcZ//5fQO02HZMgPcG6k0odgosenIqtE2LAxQUmgLbgYwAA=");
}
body[data-hero="lake"] {
  --hero-key: #3d9cc9;
  --hero-image: url("images/simple-home-hero-lake-boat-moon.webp");
  --hero-focus: 72% 55%;
  --hero-field: url("data:image/webp;base64,UklGRqIAAABXRUJQVlA4IJYAAADwBACdASoUAAwAPrVInkmnJCKhMAgA4BaJbACdMoRwGQA5/8BtLxKLnnlBKeZnDIAA/rYNMJ6vszARGJcbnejAKqhxhnuuMExpnksw4HMnwsIXiqKr2Iv1VqkE2cvYGh+8p6XmuDWoNfnJ7NTSgLhpCmqo6OxikDiI/Oyid1EWWmXtuy9vWxr1qemxhNC2cqPVCuA7+AA=");
}
body[data-hero="stars"] {
  --hero-key: #a8844f;
  --hero-image: url("images/simple-home-hero-desert-stars.webp");
  --hero-focus: 74% 45%;
  --hero-field: url("data:image/webp;base64,UklGRoIAAABXRUJQVlA4IHYAAABwBACdASoUAAwAPrVKnkonJCKhsAgA4BaJagCdMoMYAE59nxRKLjmH4t9fUAD+xXiY7W6a63oFjtP4VzR3aUQ/S8acnB+IMSo+YT9JpzT2+1tfJoTXrm7A9l0mEyiGkd/0xpsly9VbpSCsShJwkrLLc6sgyAAA");
}

/* Nachtfassungen im dunklen Erscheinungsbild (docs/dark-mode.md): gleicher
   Bildaufbau, deshalb bleibt --hero-focus; Schlüsselfarbe und Farbfeld aus dem
   Nachtbild gemessen. Die Drei Kreuze sind schon ein Nachtbild. */
html.theme-dark body[data-hero="eagle"] {
  --hero-key: #36507d;
  --hero-image: url("images/simple-home-hero-eagle-sky-night.webp");
  --hero-field: url("data:image/webp;base64,UklGRnIAAABXRUJQVlA4IGYAAABQBACdASoUAAwAPrVKnkmnJCKhMAgA4BaJQBOmUI4ABTu6m2D+LPTH1ygAAP71bk6MKbp/8TvrgFoeHuK9o//rOjgNslG0JHuUvY5lXx/NA8iFyqIcDwGt2JPuj7VKGbUJH7NAAAA=");
}
html.theme-dark body[data-hero="wheat"] {
  --hero-key: #34587e;
  --hero-image: url("images/simple-home-hero-wheat-mountains-night.webp");
  --hero-field: url("data:image/webp;base64,UklGRoIAAABXRUJQVlA4IHYAAAAwBACdASoUAAwAPrVInkmnJCKhMAgA4BaJYwCdEf/gNaHeoTHYwvRJOQAA/vaT5oX/a4vd6AaNxWiMTw2Y/5Az9D3vBBJMGDV6WNAf/xx3TCIZVtntIXHLhgoq6holyyb5VBselkToKbn0FKIGOBAiPQ7yAAAA");
}
html.theme-dark body[data-hero="lion-lamb"] {
  --hero-key: #35497d;
  --hero-image: url("images/simple-home-hero-lion-lamb-eagle-night.webp");
  --hero-field: url("data:image/webp;base64,UklGRngAAABXRUJQVlA4IGwAAAAQBACdASoUAAwAPrVKnkmnJCKhMAgA4BaJQBOl4AA0ZRokwi5TwXwgAAD+7EQWumnC3hl4CDekMZnHaTGceohWkyOCPUM+oPdQ22aVCL2+Tzkq2MS7F+2nKoglIIXeyvi6lW74FAdLy/CkAAA=");
}
html.theme-dark body[data-hero="empty-tomb"] {
  --hero-key: #425670;
  --hero-image: url("images/simple-home-hero-empty-tomb-night.webp");
  --hero-field: url("data:image/webp;base64,UklGRnwAAABXRUJQVlA4IHAAAADQAwCdASoUAAwAPrVKnkmnJCKhMAgA4BaJYwCw7CG7pp208NHXrYAA/vRPXZ1TmnYBJkTY1MSgijCZ+l27amm135xEsMyTu+sQxvyFLUQ2k9x9lSQv9qWiKMJvt1O91rUNDRkpNLbmzXpkuV2wawAA");
}
html.theme-dark body[data-hero="brand"] {
  --hero-key: #753d4c;
  --hero-image: url("images/simple-home-hero-brand-herzwort-night.webp");
  --hero-field: url("data:image/webp;base64,UklGRmwAAABXRUJQVlA4IGAAAAAwBACdASoUAAwAPrVInkmnJCKhMAgA4BaJZgC7ACIcbf+mHfpmdRLyCQAA/vVuiut4YpIHpPUppCvgK1Bc+aLClzWIr4hOZxEuvgcfBYHgrZb/eFCphnQ1aC1qjhYFIAA=");
}
html.theme-dark body[data-hero="oil-lamp"] {
  --hero-key: #7d5a35;
  --hero-image: url("images/simple-home-hero-oil-lamp-scroll-night.webp");
  --hero-field: url("data:image/webp;base64,UklGRpAAAABXRUJQVlA4IIQAAADwAwCdASoUAAwAPrVOn0onJCKhsAgA4BaJYgCdACHf6rDpeyQcmQ7AAP74UUkY5bhd6iang1vuLlJKER35XuzA9U2Gok0dVRlbFWagoKTv3O8uuiv37jGdqVHy/qwv6nhb+E787QeXf8gHb3HAyST+7keEDESJ9hlf4deD7Sh0Q4w8AAA=");
}
html.theme-dark body[data-hero="stars"] {
  --hero-key: #3b3f77;
  --hero-image: url("images/simple-home-hero-desert-stars-night.webp");
  --hero-field: url("data:image/webp;base64,UklGRmQAAABXRUJQVlA4IFgAAADQAwCdASoUAAwAPrVMnkonJCKhsAgA4BaJYwCsACHf4ozzRsoQGsAA/vaJngBZBTbEW26I2gqhswVx9I8xVVcjz2Y3Xc7q5DSG8QN8c9m+AmolKN8dLQAA");
}
html.theme-dark body[data-hero="lake"] {
  --hero-key: #3d5a76;
  --hero-image: url("images/simple-home-hero-lake-boat-moon-night.webp");
  --hero-field: url("data:image/webp;base64,UklGRmQAAABXRUJQVlA4IFgAAADwAwCdASoUAAwAPrVKnkmnJCKhMAgA4BaJZQCsACHhYBsFQt5sSAgAAP72jUfj6RVssU5jgo2tPLFB+JHJ3lqbuPig97K+qn2gazbPakAa4fYyd5uPgAAA");
}

/* Neue Motive: NASA/Hubble/JWST (Hi 38,7 & Ps 19,2) sowie Naturmotive (Klgl 3,23, Ps 1,3, Ps 18,3, Ps 42,2). */
body[data-hero="pillars"] {
  --hero-key: #b87a3d;
  --hero-image: url("images/simple-home-hero-pillars.webp");
  --hero-focus: 55% 40%;
  --hero-field: url("data:image/webp;base64,UklGRnoAAABXRUJQVlA4IG4AAAAQBACdASoUAAwAPpE4l0eloyIhMAgAsBIJZQCsACB0JRBzfT1u8d/naAD+9uGjPx425wRIkUfjkv/AlE1/i2ju3/g70U1mOP7+fM172+eTHoi5fbpUqNC+jtkpFWckNicsznxl8w8AmsCtXgAAAA==");
}
html.theme-dark body[data-hero="pillars"] {
  --hero-key: #5c88c4;
}
body[data-hero="carina"] {
  --hero-key: #c26e38;
  --hero-image: url("images/simple-home-hero-carina.webp");
  --hero-focus: 50% 48%;
  --hero-field: url("data:image/webp;base64,UklGRqAAAABXRUJQVlA4IJQAAACwBACdASoUAAwAPpE6l0eloyIhMAgAsBIJbACdMoMYLIBz44EB3gMGKAL5SRPuAP715918R85JNlcJ5iDfX0KpmxcYgYIN2rWZS7HRt9pPuQ3xv1fSrStyvhavy0WV0bcSsZvlqgO5dKa3RXtRbXXA0BiUCOdL2EfpQF5v9D3eekTfNiOjJ/n9f3iH/YQDQQjHyAAA");
}
html.theme-dark body[data-hero="carina"] {
  --hero-key: #4b8ec2;
}
body[data-hero="dawn"] {
  --hero-key: #c9684b;
  --hero-image: url("images/simple-home-hero-dawn.webp");
  --hero-focus: 50% 52%;
  --hero-field: url("data:image/webp;base64,UklGRpQAAABXRUJQVlA4IIgAAACwBACdASoUAAwAPpE6l0eloyIhMAgAsBIJQBOmUGUlkA5/8B5AE69Z1x3CWmgAAP2dA8e3FtZa2yrZHwP80pDfiLkK5Aaq2z87a9p7Qn6VGw1fAMM0mj0mhvRbB9HTMkbHqbri7By1GYNBC+yT/nV9aTIBacRZ83U8Wh+yHe0MkIuQzJHxvAAA");
}
html.theme-dark body[data-hero="dawn"] {
  --hero-key: #b3625e;
  --hero-image: url("images/simple-home-hero-dawn-night.webp");
  --hero-field: url("data:image/webp;base64,UklGRngAAABXRUJQVlA4IGwAAADwAwCdASoUAAwAPpE6mEeloyKhMAgAsBIJQBOkCYhgb/qlSf31RWZEAP724pXfZCyju5Dwub60Rvg/Gp7M/V6uwYZY3CtiiloISJ/gDTx0m1D772fy7TcNHY718wvIMTsU3RME1VL21K4AAAA=");
}
body[data-hero="olive"] {
  --hero-key: #4d8557;
  --hero-image: url("images/simple-home-hero-olive.webp");
  --hero-focus: 55% 45%;
  --hero-field: url("data:image/webp;base64,UklGRp4AAABXRUJQVlA4IJIAAABQBACdASoUAAwAPpE4l0eloyIhMAgAsBIJZACdMoGv/gMO0jf0dl6X+kDgAP7tAeTk4K4RgQ1rPh5ntB+2HJ61ENkzDqIzB+I7V0w855oAGgc19x8OBcyYPzNcmNfBLo/5lPdqkxYzy7iYwC6Dm2KrAVAu1E9n0UhaPl392T2nrwFYAQaKD8EHhA84iJqh24JAAA==");
}
html.theme-dark body[data-hero="olive"] {
  --hero-key: #5fa36c;
  --hero-image: url("images/simple-home-hero-olive-night.webp");
  --hero-field: url("data:image/webp;base64,UklGRnYAAABXRUJQVlA4IGoAAACwAwCdASoUAAwAPpE6l0eloyIhMAgAsBIJYwC7ACFQAwpoq2BbgAD++JQiEagIhzJGV+DEUpLnR6DVwU7v5rZhOJjjk9I1T3AL1u+B3EICOAzvJSzHablFQqLxyRilxyvHz8EFzBbd5gAA");
}
body[data-hero="lighthouse"] {
  --hero-key: #2f6b7d;
  --hero-image: url("images/simple-home-hero-lighthouse.webp");
  --hero-focus: 60% 42%;
  --hero-field: url("data:image/webp;base64,UklGRp4AAABXRUJQVlA4IJIAAABwBACdASoUAAwAPpE6l0eloyIhMAgAsBIJYwCdH8GJjgNcGE+hu0ih2XEAAAD+3Kqpl3TT6EF2ksIb+fkN3/iBIB+lH90957zXZkFXwAeHjSTAgq9sUZpNgwxbLrbpQ5veyUhxZ1mL3xPOL8VHjH9cXGMDtYPRI0tfQR5fntYXPhcX1Wf3iX6k0z+8S/Uwl4AAAA==");
}
html.theme-dark body[data-hero="lighthouse"] {
  --hero-key: #4d9bb3;
  --hero-image: url("images/simple-home-hero-lighthouse-night.webp");
  --hero-field: url("data:image/webp;base64,UklGRogAAABXRUJQVlA4IHwAAAAQBACdASoUAAwAPpE4l0eloyIhMAgAsBIJQBOgA3S2t2F/U28I+SIYAAD++UpLyxVmPir+P2gAu8jhdMj89dgjDV6nGFErSAYSsdvZ9CMBsFo++uj7IQMN530i2VO+Rw7a1S/kdekEw2E6aqXXIWuMHkpNwCDagGCzIAAA");
}
body[data-hero="stream"] {
  --hero-key: #4f86a6;
  --hero-image: url("images/simple-home-hero-stream.webp");
  --hero-focus: 50% 55%;
  --hero-field: url("data:image/webp;base64,UklGRqAAAABXRUJQVlA4IJQAAACQBACdASoUAAwAPpE4l0eloyIhMAgAsBIJYwCdMoAltRVfaSKE2en3BBdiOIAA/u0nko1AeAl2dyzpqmWOmG9WwibhvmAwUgs4M6HgQ/9O1Q+WtGOxy/G1A0gWYOP8uFgpyu4Z+FjfCv5rDj1pet7goF/2JrkCIIvg6AM8+aiaaubaE6G3vyfJno84Xr1ezs8EQAAA");
}
html.theme-dark body[data-hero="stream"] {
  --hero-key: #6ca6c9;
  --hero-image: url("images/simple-home-hero-stream-night.webp");
  --hero-field: url("data:image/webp;base64,UklGRogAAABXRUJQVlA4IHwAAAAQBACdASoUAAwAPpE4l0eloyIhMAgAsBIJYwCdMoAC+jgaZvkIumoRAAD++Ka6tZDg5gxmMXLjqJO+rHb+4K7jsCTFCGJMxvFCi3EcHt5klgMiJGZh9DCc+jCVhYiv1goIi1SyNWMbY2aQHrteRzz3fjL4s48rFQRJIAAA");
}

body[data-hero-mood="soft"] {
  --hero-mix-paper: 7%;
  --hero-mix-shell: 9%;
  --hero-mix-line: 14%;
  --hero-strip: .14;
  --hero-field-opacity: .1;
  --hero-head-alpha: 94%;
  --hero-picture-veil: 92%;
}
body[data-hero-mood="strong"],
body[data-hero-mood="picture"] {
  --hero-mix-paper: 14%;
  --hero-mix-shell: 20%;
  --hero-mix-line: 28%;
  --hero-strip: .3;
  --hero-field-opacity: .2;
  --hero-head-alpha: 94%;
  --hero-picture-veil: 90%;
}
body[data-hero-mood="vivid"] {
  --hero-mix-paper: 24%;
  --hero-mix-shell: 34%;
  --hero-mix-line: 42%;
  --hero-strip: .48;
  --hero-field-opacity: .38;
  --hero-head-alpha: 86%;
  --hero-picture-veil: 84%;
}
body[data-hero-mood="bold"] {
  --hero-mix-paper: 34%;
  --hero-mix-shell: 46%;
  --hero-mix-line: 54%;
  --hero-strip: .64;
  --hero-field-opacity: .52;
  --hero-head-alpha: 78%;
  --hero-picture-veil: 76%;
}

/* Höhere Spezifität als body.ui-mode-simple oben - deshalb gewinnen diese
   Werte, ohne dass die Reihenfolge im Stylesheet eine Rolle spielt. */
body.ui-mode-simple[data-hero-mood="soft"],
body.ui-mode-simple[data-hero-mood="strong"],
body.ui-mode-simple[data-hero-mood="vivid"],
body.ui-mode-simple[data-hero-mood="bold"],
body.ui-mode-simple[data-hero-mood="picture"] {
  --bg: color-mix(in srgb, var(--hero-key) var(--hero-mix-shell), #eef1eb);
  --panel: color-mix(in srgb, var(--hero-paper) 65%, #ffffff);
  --line: color-mix(in srgb, var(--hero-key) var(--hero-mix-line), #dedbd3);
  --muted: color-mix(in srgb, var(--hero-key) 22%, #505955);
  --accent-soft: color-mix(in srgb, var(--hero-key) 22%, var(--hero-paper));
  --hero-paper: color-mix(in srgb, var(--hero-key) var(--hero-mix-paper), #f7f4ec);
  --hero-line: color-mix(in srgb, var(--hero-key) var(--hero-mix-line), #dedbd3);
  --hero-decor: color-mix(in srgb, var(--hero-key) 46%, #26302c);
}

/* Das Farbfeld liegt fix hinter der ganzen Oberfläche und wird an den Rändern
   der Seitenkarte sichtbar. z-index:-1 malt es über den Body-Hintergrund, aber
   unter jeden Inhalt; inset:0 statt vw/vh, damit die Schriftgrößen-Zoomstufe
   keine Rolle spielt. */
body.ui-mode-simple[data-hero-mood="soft"]::before,
body.ui-mode-simple[data-hero-mood="strong"]::before,
body.ui-mode-simple[data-hero-mood="vivid"]::before,
body.ui-mode-simple[data-hero-mood="bold"]::before,
body.ui-mode-simple[data-hero-mood="picture"]::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0;
  background: var(--hero-field) center / cover no-repeat;
  opacity: var(--hero-field-opacity);
  pointer-events: none;
}

/* ---- Dunkles Erscheinungsbild der geführten Oberfläche --------------------
   applyColorScheme() (app.js) bzw. das Startskript in index.html setzt
   html.theme-dark. Dieselben Tokens wie oben, nur auf dunklem Grund: ein
   schwarzgrünes Papier statt Creme, das Grün als helle Akzentfarbe. Die
   Bildstimmung mischt sich darunter wie im hellen Modus, nur in dunkle Basen.
   Hoher Kontrast steht am Dateiende und gewinnt darüber. */
html.theme-dark body.ui-mode-simple {
  color-scheme: dark;
  --bg: #121715;
  --panel: #1b221f;
  --text: #e4ebe7;
  --muted: #a2aea8;
  --line: #34403a;
  --accent: #82c9a8;
  --accent-soft: #1d3329;
  --on-accent: #0b1a13;
  --danger: #f08a80;
  --skeleton-base: rgba(130,201,168,.06);
  --skeleton-shimmer: rgba(130,201,168,.14);
  --hero-paper: #171d1a;
  --hero-line: #34403a;
  --hero-decor: #a9c4b6;
  --positive-soft: #1b3324;
  --negative-soft: #3a1f1d;
}
html.theme-dark body.ui-mode-simple[data-hero-mood="soft"],
html.theme-dark body.ui-mode-simple[data-hero-mood="strong"],
html.theme-dark body.ui-mode-simple[data-hero-mood="vivid"],
html.theme-dark body.ui-mode-simple[data-hero-mood="bold"],
html.theme-dark body.ui-mode-simple[data-hero-mood="picture"] {
  --bg: color-mix(in srgb, var(--hero-key) var(--hero-mix-shell), #121715);
  --panel: color-mix(in srgb, var(--hero-paper) 65%, #232c28);
  --line: color-mix(in srgb, var(--hero-key) var(--hero-mix-line), #34403a);
  --muted: color-mix(in srgb, var(--hero-key) 18%, #a2aea8);
  --accent-soft: color-mix(in srgb, var(--hero-key) 22%, var(--hero-paper));
  --hero-paper: color-mix(in srgb, var(--hero-key) var(--hero-mix-paper), #171d1a);
  --hero-line: color-mix(in srgb, var(--hero-key) var(--hero-mix-line), #34403a);
  --hero-decor: color-mix(in srgb, var(--hero-key) 40%, #d6e2dc);
}

.simple-home { --simple-home-hero-image:var(--hero-image, url("images/simple-home-hero-eagle-sky.webp")); min-height:calc(var(--vph) - 150px); overflow:hidden; border:1px solid var(--line); border-radius:24px; background:var(--hero-paper, #f7f4ec); box-shadow:0 18px 55px rgba(42,51,47,.12); }
:where(html.theme-dark) .simple-home { background:var(--hero-paper, color-mix(in srgb, var(--text) 3%, var(--panel))); } /* dark:gen */
.simple-home[hidden],
.simple-page[hidden] { display:none !important; }

.simple-search-groups {
  display: grid;
  gap: 24px;
}

.simple-search-section > h2 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.simple-search-all-sources,
.simple-search-show-all {
  min-height: 44px;
}

.simple-search-all-sources {
  justify-self: start;
}

.simple-search-show-all {
  width: 100%;
  margin-top: 12px;
}

.simple-search-sort {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 0.85rem;
}

.simple-search-sort-label {
  color: var(--muted);
}

.simple-search-sort-option {
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  background: transparent;
  color: inherit;
  border-radius: 999px;
  padding: 4px 12px;
  cursor: pointer;
  font: inherit;
}

.simple-search-sort-option[aria-pressed="true"] {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  cursor: default;
}

.simple-search-match {
  grid-column: 1 / -1;
  margin: 0;
  padding: 8px 10px;
  border-left: 3px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  font-size: 0.88rem;
}
body.ui-mode-simple .shell { padding-bottom:calc(88px + var(--safe-bottom)); }
.simple-home-hero { min-height:295px; display:flex; align-items:center; padding:clamp(28px,5vw,56px) clamp(20px,3.5vw,42px) 48px; color:#fff; background:linear-gradient(90deg,rgba(24,42,35,.9) 0%,rgba(24,42,35,.55) 43%,rgba(24,42,35,.08) 76%),var(--simple-home-hero-image) center/cover no-repeat; }
.simple-home-admin-summary { display:flex; flex-wrap:wrap; gap:8px; padding:12px 16px; border-bottom:1px solid rgba(49,82,70,.14); background:#fffdf7; }
:where(html.theme-dark) .simple-home-admin-summary { background:var(--panel); } /* dark:gen */
.simple-home-admin-stat { display:flex; align-items:baseline; gap:6px; padding:6px 10px; border:1px solid rgba(49,82,70,.18); border-radius:8px; background:transparent; color:#315246; cursor:pointer; text-align:left; }
:where(html.theme-dark) .simple-home-admin-stat { color:#c2dbd2; } /* dark:gen */
.simple-home-admin-stat:hover, .simple-home-admin-stat:focus-visible { border-color:#315246; background:#f1f5ef; }
:where(html.theme-dark) .simple-home-admin-stat:hover, :where(html.theme-dark) .simple-home-admin-stat:focus-visible { background:color-mix(in srgb, var(--text) 2%, var(--panel)); } /* dark:gen */
.simple-home-admin-value { font-size:1.05rem; font-weight:700; }
.simple-home-admin-label { font-size:.82rem; }
.simple-home-admin-problems { color:#a33a2b; border-color:rgba(163,58,43,.35); }
:where(html.theme-dark) .simple-home-admin-problems { color:#e5a79e; } /* dark:gen */
.simple-home-hero-content { max-width:580px; }
.simple-home-eyebrow { display:block; margin-bottom:6px; color:#b8d5c6; font-size:.78rem; font-weight:750; letter-spacing:.11em; text-transform:uppercase; }
.simple-home-hero h1 { margin:0 0 10px; font-family:Georgia,serif; font-size:clamp(2rem,5vw,3.45rem); line-height:1.04; letter-spacing:-.03em; }
.simple-home-hero p { max-width:52ch; margin:0 0 20px; color:rgba(255,255,255,.86); font-size:1.02rem; }
.simple-home-primary { min-height:50px; padding:0 22px; border:0; border-radius:14px; color:#315246; background:#fff; font-weight:750; box-shadow:0 8px 22px rgba(0,0,0,.18); }
:where(html.theme-dark) .simple-home-primary { color:#c2dbd2; background:var(--panel); } /* dark:gen */
.simple-home-hero-actions { display:flex; flex-wrap:wrap; align-items:center; gap:10px; }
.simple-home-search { min-height:50px; display:inline-flex; align-items:center; gap:9px; padding:0 18px; border:1px solid rgba(255,255,255,.58); border-radius:14px; color:#fff; background:rgba(24,42,35,.34); font-weight:700; backdrop-filter:blur(8px); }
:where(html.theme-dark) .simple-home-search { border:1px solid rgba(255,255,255,0.16); } /* dark:gen */
.simple-home-search:hover { background:rgba(24,42,35,.52); }
/* Search field look of the Start hero: the button shows the palette's placeholder. */
.simple-home-search-field { flex:1 1 280px; justify-content:flex-start; min-width:0; border-radius:999px; font-weight:500; text-align:left; }
.simple-home-search-field > span:last-child { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; opacity:.9; }
.simple-home-content { position:relative; z-index:2; margin-top:-36px; padding:0 clamp(20px,3.5vw,42px) 44px; display:flex; flex-direction:column; gap:20px; }
#simpleHomeContinue { position:relative; z-index:2; margin:0; }
.simple-home-actions { position:relative; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:0; }
.simple-library { margin-top:20px; }

#simpleHomeLosungen .ws-start-losungen { margin:0; padding:22px 24px; border:1px solid color-mix(in srgb,var(--accent) 24%,#d8ddd9); border-radius:20px; background:rgba(255,255,255,.98); box-shadow:0 12px 32px rgba(24,42,35,.10); display:flex; flex-direction:column; gap:12px; }
#simpleHomeDailyVerse .ws-start-losungen { margin:0; padding:22px 24px; border:1px solid color-mix(in srgb,var(--accent) 24%,#d8ddd9); border-radius:20px; background:rgba(255,255,255,.98); box-shadow:0 12px 32px rgba(24,42,35,.10); display:flex; flex-direction:column; gap:12px; }
:where(html.theme-dark) #simpleHomeDailyVerse .ws-start-losungen { border-color:var(--line); background:var(--panel); }
#simpleHomeDailyVerse .ws-losungen-title { color:var(--accent); font-size:.74rem; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
#simpleHomeDailyVerse .ws-losungen-verse { padding:12px 14px; border-radius:12px; background:color-mix(in srgb,var(--accent) 5%,var(--panel)); border-left:3px solid var(--accent); }
#simpleHomeDailyVerse .ws-losungen-verse p { margin:0; font-family:Georgia,serif; font-size:1.05rem; line-height:1.52; }
#simpleHomeDailyVerse .ws-losungen-verse-ref { display:flex; align-items:center; gap:8px; margin-top:6px; font-size:.86rem; font-weight:600; }
#simpleHomeDailyVerse .ws-losungen-verse-ref-link { border:0; border-bottom:1px dotted currentColor; background:transparent; color:var(--accent); cursor:pointer; font:inherit; min-height:0; padding:0; }
:where(html.theme-dark) #simpleHomeLosungen .ws-start-losungen { border:1px solid color-mix(in srgb,var(--accent) 24%,var(--line)); background:rgba(27,34,31,0.98); } /* dark:gen */
#simpleHomeLosungen .ws-losungen-title { color:var(--accent); font-size:.74rem; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
#simpleHomeLosungen .ws-losungen-header { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:2px; }
#simpleHomeLosungen .ws-losungen-date { flex:1; font:700 1.15rem/1.2 Georgia,serif; color:#27312d; }
:where(html.theme-dark) #simpleHomeLosungen .ws-losungen-date { color:var(--text); } /* dark:gen */
#simpleHomeLosungen .ws-losungen-nav { width:32px; height:32px; min-height:32px; border:1px solid color-mix(in srgb,var(--accent) 20%,#d8ddd9); border-radius:9px; background:#fff; color:#315246; display:inline-flex; align-items:center; justify-content:center; cursor:pointer; padding:0; font-size:.82rem; transition:background .12s,border-color .12s; }
:where(html.theme-dark) #simpleHomeLosungen .ws-losungen-nav { border:1px solid color-mix(in srgb,var(--accent) 20%,var(--line)); background:var(--panel); color:#c2dbd2; } /* dark:gen */
#simpleHomeLosungen .ws-losungen-nav:hover:not(:disabled) { background:#f1f5ef; border-color:var(--accent); }
:where(html.theme-dark) #simpleHomeLosungen .ws-losungen-nav:hover:not(:disabled) { background:color-mix(in srgb, var(--text) 2%, var(--panel)); } /* dark:gen */
#simpleHomeLosungen .ws-losungen-verse { padding:12px 14px; border-radius:12px; background:color-mix(in srgb,var(--accent) 5%,#faf8f3); border-left:3px solid var(--accent); }
:where(html.theme-dark) #simpleHomeLosungen .ws-losungen-verse { background:color-mix(in srgb,var(--accent) 5%,var(--panel)); } /* dark:gen */
#simpleHomeLosungen .ws-losungen-verse p { margin:0; font-family:Georgia,serif; font-size:1.05rem; line-height:1.52; color:#24302b; }
:where(html.theme-dark) #simpleHomeLosungen .ws-losungen-verse p { color:var(--text); } /* dark:gen */
#simpleHomeLosungen .ws-losungen-verse-ref { display:flex; align-items:center; gap:8px; margin-top:6px; font-size:.86rem; font-weight:600; }
#simpleHomeLosungen .ws-losungen-verse-ref-link { border:0; border-bottom:1px dotted currentColor; background:transparent; color:var(--accent); cursor:pointer; font:inherit; min-height:0; padding:0; }
#simpleHomeLosungen .ws-losungen-copyright { margin:4px 0 0; font-size:.74rem; color:#7b8882; line-height:1.4; }
:where(html.theme-dark) #simpleHomeLosungen .ws-losungen-copyright { color:var(--muted); } /* dark:gen */

@media (min-width:960px) {
  .simple-home-content.has-losungen { display:grid; grid-template-columns:1.15fr 1fr; align-items:start; gap:18px 24px; }
  .simple-home-content:not(.has-losungen) { max-width:960px; margin-inline:auto; }
  #simpleHomeContinue { max-width:none; }
  .simple-library { grid-column:1 / -1; margin-top:12px; }
  /* Library cards share the column split and gutter of the grid above */
  .simple-home-content.has-losungen .simple-library-cards { grid-template-columns:1.15fr 1fr; gap:18px 24px; }
}

.simple-continue-card { position:relative; width:100%; min-height:102px; display:grid; grid-template-columns:52px 1fr auto; align-items:center; gap:16px; padding:18px 22px; border:1px solid color-mix(in srgb,var(--accent) 28%,#d8ddd9); border-radius:20px; color:#27312d; background:rgba(255,255,255,.98); box-shadow:0 12px 32px rgba(24,42,35,.12); text-align:left; }
:where(html.theme-dark) .simple-continue-card { border:1px solid color-mix(in srgb,var(--accent) 28%,var(--line)); color:var(--text); background:rgba(27,34,31,0.98); } /* dark:gen */
.simple-continue-card:hover { border-color:var(--accent); transform:translateY(-2px); }
.simple-continue-icon { width:52px; height:52px; display:grid; place-items:center; border-radius:15px; color:var(--on-accent, #fff); background:var(--accent); font-size:1.2rem; }
.simple-continue-copy { min-width:0; display:grid; gap:3px; }
.simple-continue-copy small { color:var(--accent); font-size:.72rem; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.simple-continue-copy strong { overflow:hidden; color:#27312d; font:700 1.22rem/1.15 Georgia,serif; text-overflow:ellipsis; white-space:nowrap; }
:where(html.theme-dark) .simple-continue-copy strong { color:var(--text); } /* dark:gen */
.simple-continue-copy > span { color:#66716c; font-size:.88rem; }
:where(html.theme-dark) .simple-continue-copy > span { color:var(--muted); } /* dark:gen */
.simple-continue-chips { display:flex; flex-wrap:wrap; gap:8px; margin-top:8px; }
.simple-continue-chip { display:inline-flex; align-items:center; gap:7px; min-height:34px; padding:4px 13px; border:1px solid color-mix(in srgb,var(--accent) 26%,#d8ddd9); border-radius:999px; color:#315246; background:rgba(255,255,255,.92); font-size:.84rem; font-weight:600; cursor:pointer; }
:where(html.theme-dark) .simple-continue-chip { border:1px solid color-mix(in srgb,var(--accent) 26%,var(--line)); color:#c2dbd2; background:rgba(27,34,31,0.92); } /* dark:gen */
.simple-continue-chip:hover { border-color:var(--accent); background:#f1f5ef; }
:where(html.theme-dark) .simple-continue-chip:hover { background:color-mix(in srgb, var(--text) 2%, var(--panel)); } /* dark:gen */
.simple-continue-chip .fa-icon { color:var(--accent); font-size:.8rem; }
.simple-action-card { min-height:114px; padding:12px 10px; border:1px solid #c9e4e6; border-radius:16px; color:#163a4b; background:rgba(255,255,255,.97); box-shadow:0 8px 24px rgba(28,103,125,.10); text-align:center; display:flex; flex-direction:column; align-items:center; justify-content:center; transition:transform .15s,border-color .15s; }
:where(html.theme-dark) .simple-action-card { border:1px solid #35696d; color:#bdddec; background:rgba(27,34,31,0.97); } /* dark:gen */
.simple-action-card:hover { transform:translateY(-2px); border-color:#43a9b7; }
.simple-action-illustration { position:relative; display:block; width:82px; height:62px; transform:scale(.72); margin:-6px auto 2px; overflow:hidden; border-radius:17px; flex-shrink:0; }
.simple-action-illustration::before, .simple-action-illustration::after { content:""; position:absolute; }
/* Dunkles Erscheinungsbild: die hellen Tagesbilder gedämpft statt umgefärbt -
   Farben und Motiv bleiben erkennbar, leuchten aber nicht aus der dunklen Karte. */
html.theme-dark .simple-action-illustration { filter:brightness(.7) saturate(.8); }
.simple-action-illustration-bible { background:linear-gradient(180deg,#9edff7 0 62%,#75c87d 63%); }
.simple-action-illustration-bible::before { z-index:1; left:17px; right:17px; bottom:10px; height:28px; border-radius:5px 5px 15px 15px; background:linear-gradient(90deg,#fffde7 0 48%,#42a4b9 49% 51%,#fffde7 52%); box-shadow:0 9px 14px rgba(24,100,119,.18); }
.simple-action-illustration-bible::after { top:-28px; left:26px; width:32px; height:78px; background:radial-gradient(ellipse,rgba(255,255,255,.9),transparent 68%); transform:rotate(-8deg); }
.simple-action-illustration-read { background:linear-gradient(180deg,#b7edff 0 58%,#dff6cc 59%); }
.simple-action-illustration-read::before { left:25px; top:11px; width:32px; height:32px; border-radius:50%; background:#ffe46b; box-shadow:0 0 0 8px rgba(255,244,146,.54),0 0 0 16px rgba(255,244,146,.22); }
.simple-action-illustration-read::after { right:-9px; bottom:-21px; width:62px; height:48px; border-radius:50% 50% 0 0; background:#5dbf78; box-shadow:-37px 12px 0 -7px #8bd482; }
.simple-action-illustration-listen { background:linear-gradient(135deg,#b7eff6,#e4f8c8); }
.simple-action-illustration-listen::before { left:16px; bottom:15px; width:13px; height:28px; border-radius:9px 9px 5px 5px; background:#fffde6; box-shadow:14px -8px 0 -3px #ee7b79; }
.simple-action-illustration-listen::after { right:12px; top:14px; width:37px; height:37px; border:3px solid #2e9ec2; border-left:0; border-bottom:0; border-radius:0 46px 0 0; box-shadow:10px -10px 0 -6px #ee7b79,20px -20px 0 -11px #f3c447; }
.simple-action-card strong, .simple-action-card small { display:block; }
.simple-action-card strong { font-size:.95rem; line-height:1.25; }
.simple-action-card small { margin-top:3px; color:#66716c; font-size:.78rem; line-height:1.25; }
:where(html.theme-dark) .simple-action-card small { color:var(--muted); } /* dark:gen */
.simple-library { margin-top:40px; }
.simple-section-head { display:flex; flex-wrap:wrap; align-items:end; gap:12px 18px; margin-bottom:17px; }
.simple-section-head h2 { margin:0; color:#27312d; font-family:Georgia,serif; font-size:clamp(1.55rem,3vw,2rem); }
:where(html.theme-dark) .simple-section-head h2 { color:var(--text); } /* dark:gen */
/* A button beside the heading moves below it before the heading has to break inside words. */
.simple-section-head > div { flex:1 1 12rem; }
.simple-library-cards { display:grid; grid-template-columns:repeat(2,1fr); gap:13px; }
.simple-card-arrow { position:absolute; right:20px; top:50%; color:var(--simple-accent); font-size:1.25rem; transform:translateY(-50%); }

/* Startseite: Wochen-Aktivitätspuls (Habit-Tracker) */
.simple-home-habit-tracker {
  margin-top: 18px;
}
.simple-habit-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.simple-habit-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 40px;
  padding: 4px 6px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 10px;
  background: rgba(24, 42, 35, 0.3);
  backdrop-filter: blur(6px);
  color: rgba(255, 255, 255, 0.85);
  transition: all 0.15s ease;
}
:where(html.theme-dark) .simple-habit-day { border:1px solid rgba(255,255,255,0.16); } /* dark:gen */
.simple-habit-day.is-today {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.5);
}
:where(html.theme-dark) .simple-habit-day.is-today { border-color:var(--line); background:rgba(27,34,31,0.22); } /* dark:gen */
.simple-habit-day.is-active {
  background: color-mix(in srgb, #34d399 40%, rgba(24, 42, 35, 0.45));
  border-color: #34d399;
  color: #ffffff;
}
:where(html.theme-dark) .simple-habit-day.is-active { border-color:#50a687; } /* dark:gen */
.simple-habit-day.is-future {
  opacity: 0.45;
}
.simple-habit-name {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.simple-habit-dot {
  font-size: 0.72rem;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Startseite: Completion-Actions */
.simple-home-completion-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.simple-home-completion-actions button {
  min-height: 46px;
  padding: 0 16px;
  border-radius: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.95);
  color: #27312d;
  border: 1px solid #d8ddd9;
}
:where(html.theme-dark) .simple-home-completion-actions button { background:rgba(27,34,31,0.95); color:var(--text); border:1px solid var(--line); } /* dark:gen */
.simple-home-completion-actions button:hover {
  background: #ffffff;
  border-color: var(--accent);
}
:where(html.theme-dark) .simple-home-completion-actions button:hover { background:var(--panel); } /* dark:gen */

/* Startseite: Wiederentdeckt-Karte */
.simple-rediscover-card {
  padding: 20px 24px;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, #d8ddd9);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 10px 28px rgba(24, 42, 35, 0.08);
  cursor: pointer;
  text-align: left;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
:where(html.theme-dark) .simple-rediscover-card { border:1px solid color-mix(in srgb, var(--accent) 24%, var(--line)); background:rgba(27,34,31,0.98); } /* dark:gen */
.simple-rediscover-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(24, 42, 35, 0.14);
  border-color: var(--accent);
}
.simple-rediscover-header {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
/* Narrow cards (large UI scale on phones): icon and buttons share the first row,
   the label and reference get the full width below instead of breaking inside words. */
.simple-rediscover-card { container-type: inline-size; }
@container (max-width: 17rem) {
  .simple-rediscover-header { display: grid; grid-template-columns: auto 1fr auto auto; row-gap: 8px; }
  .simple-rediscover-meta { grid-row: 2; grid-column: 1 / -1; }
  .simple-rediscover-shuffle { grid-column: 3; }
  .simple-rediscover-header .simple-card-arrow { grid-column: 4; }
}
.simple-rediscover-header .simple-card-arrow {
  position: static;
  transform: none;
  color: var(--accent);
}
.simple-rediscover-shuffle {
  width: 32px;
  height: 32px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted, #6b7280);
  cursor: pointer;
}
:where(html.theme-dark) .simple-rediscover-shuffle { color:var(--muted, #b6bac2); } /* dark:gen */
.simple-rediscover-shuffle:hover,
.simple-rediscover-shuffle:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}
.simple-rediscover-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: color-mix(in srgb, #eab308 18%, #faf8f3);
  color: #ca8a04;
  font-size: 1.1rem;
}
:where(html.theme-dark) .simple-rediscover-icon { background:color-mix(in srgb, #eab308 18%, var(--panel)); } /* dark:gen */
.simple-rediscover-meta {
  flex: 1;
  min-width: 0;
}
.simple-rediscover-ref {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text, #27312d);
}
:where(html.theme-dark) .simple-rediscover-ref { color:var(--text, var(--text)); } /* dark:gen */
.simple-rediscover-text {
  margin: 0;
  font-family: Georgia, serif;
  font-size: 1.05rem;
  font-style: italic;
  line-height: 1.5;
  color: #374151;
}
:where(html.theme-dark) .simple-rediscover-text { color:#c4ccd7; } /* dark:gen */

/* Startseite: Sammlungs-Favoriten */
/* The home content overlaps the hero so the first card rides on its edge. This
   section opens with a bare heading instead of a card, so as first visible section
   the content starts below the hero (keeps the Losungen grid columns aligned). */
.simple-home-content:has(> .simple-home-favorites:not([hidden]):not(:not([hidden]) ~ *)) { margin-top:20px; }
.simple-favorites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
/* Einstellungen: Startseiten-Sektionen Reorder Manager */
.home-sections-manager {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.home-section-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel, #ffffff);
  gap: 12px;
}
:where(html.theme-dark) .home-section-item { background:var(--panel, var(--panel)); } /* dark:gen */
.home-section-item.is-disabled {
  opacity: 0.55;
}
.home-section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 500;
  flex: 1;
  min-width: 0;
}
.home-section-btns {
  display: flex;
  align-items: center;
  gap: 4px;
}
.home-section-btns button {
  width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

/* overflow:clip instead of hidden: hidden turns .simple-page into a scroll
   container, so the sticky page head would never stick while the body scrolls. */
.simple-page { min-height:calc(var(--vph) - 160px); overflow:clip; border:1px solid var(--hero-line, #dedbd3); border-radius:24px; background:var(--hero-paper, #f7f4ec); box-shadow:0 18px 55px rgba(42,51,47,.12); }
:where(html.theme-dark) .simple-page { border:1px solid var(--hero-line, var(--line)); background:var(--hero-paper, color-mix(in srgb, var(--text) 3%, var(--panel))); } /* dark:gen */
body.ui-mode-simple[data-hero-mood="picture"]:not(.contrast-high) .simple-page,
body.ui-mode-simple[data-hero-picture="true"]:not([data-hero-mood="off"]):not(.contrast-high) .simple-page { background-image:linear-gradient(color-mix(in srgb, var(--hero-paper) var(--hero-picture-veil, 90%), transparent), color-mix(in srgb, var(--hero-paper) var(--hero-picture-veil, 90%), transparent)), var(--hero-image); background-position:center; background-size:cover; background-attachment:fixed; }
.simple-page-head { position:sticky; top:0; z-index:5; display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:18px; padding:20px clamp(18px,4vw,38px); border-bottom:1px solid var(--hero-line, #dedbd3); background:color-mix(in srgb, var(--hero-paper, #fffdf8) var(--hero-head-alpha, 94%), transparent); backdrop-filter:blur(14px); }
:where(html.theme-dark) .simple-page-head { border-bottom:1px solid var(--hero-line, var(--line)); background:color-mix(in srgb, var(--hero-paper, var(--panel)) var(--hero-head-alpha, 94%), transparent); } /* dark:gen */
/* Prägender Ausschnitt des Startbilds hinter der Kopfzeile. backdrop-filter
   oben macht die Kopfzeile zum Stacking-Kontext, darum bleibt z-index:-1 in
   ihr gefangen: über der Glasfläche, unter Titel und Schaltflächen. Der Streifen
   ist deutlich breiter als 16:9, cover zeigt also einen schmalen waagerechten
   Ausschnitt - entscheidend ist der Y-Anteil von --hero-focus (Adler: Vogel,
   Kreuze: Kuppe, Kornfelder: Scheune, Löwe: Mähne). */
.simple-page-head::before { content:""; position:absolute; z-index:-1; inset:0; background:var(--hero-image, none) var(--hero-focus, center)/cover no-repeat; opacity:var(--hero-strip, 0); pointer-events:none; }
/* iOS WebKit sometimes paints only the blurred backdrop of this sticky header (a
   frosted, empty band with the page text smeared behind it) after another fixed
   layer such as the Mitschrift sheet appears. The header is already ~94% opaque,
   so on touch devices drop the blur instead of risking the broken layer. The
   header keeps its stacking context through position:sticky + z-index. */
@media (pointer:coarse) { .simple-page-head { -webkit-backdrop-filter:none; backdrop-filter:none; background:color-mix(in srgb, var(--hero-paper, #fffdf8) 98%, transparent); } }
:where(html.theme-dark) .simple-page-head { background:color-mix(in srgb, var(--hero-paper, var(--panel)) 98%, transparent); } /* dark:gen */
/* Glass surface (Etappe 3). Opaque panel without backdrop-filter, with reduced transparency
   and on touch devices (WebKit bug above). */
.glass {
  --glass-tint: var(--hero-paper, #f7f4ec);
  border:1px solid color-mix(in srgb, #fff 60%, transparent);
  background:color-mix(in srgb, var(--glass-tint) 62%, transparent);
  box-shadow:inset 0 1px 0 color-mix(in srgb, #fff 75%, transparent), 0 6px 20px rgba(31,45,39,.12);
  -webkit-backdrop-filter:blur(16px) saturate(1.6);
  backdrop-filter:blur(16px) saturate(1.6);
}
:where(html.theme-dark) .glass { border:1px solid color-mix(in srgb, var(--line) 60%, transparent); } /* dark:gen */
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))) {
  .glass { background:color-mix(in srgb, var(--glass-tint) 92%, transparent); }
}
@media (prefers-reduced-transparency:reduce) {
  .glass { background:var(--glass-tint); -webkit-backdrop-filter:none; backdrop-filter:none; }
}
@media (pointer:coarse) {
  .glass { background:color-mix(in srgb, var(--glass-tint) 92%, transparent); -webkit-backdrop-filter:none; backdrop-filter:none; }
}
.simple-page-head-actions { display:flex; align-items:center; gap:10px; }
.simple-library-controls { display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin-bottom:12px; }
.simple-library-controls > label { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.simple-library-sort-menu > label { display:grid; gap:6px; padding:10px 14px; }
.simple-library-sort-menu select { min-width:0; width:100%; max-width:100%; }
.simple-filter-count { color:var(--muted); font-size:.85rem; }
.simple-reader-tool-bar .simple-filter-count { white-space:nowrap; }
.simple-list-favorite { max-width:160px; white-space:normal; }
.simple-list-favorite[aria-pressed="true"] { border-color:var(--accent); color:var(--on-accent, #fff); background:var(--accent); }
.simple-cross-link { display:inline-flex; align-items:center; gap:7px; margin-top:6px; padding:5px 12px; border:1px solid #d7d6cf; border-radius:999px; color:#315246; background:#fff; font-size:.85rem; font-weight:600; }
:where(html.theme-dark) .simple-cross-link { border:1px solid var(--line); color:#c2dbd2; background:var(--panel); } /* dark:gen */
.simple-cross-link:hover { border-color:#5f806f; background:#f2f7f4; }
:where(html.theme-dark) .simple-cross-link:hover { background:var(--panel); } /* dark:gen */
.simple-page-head h1 { margin:0; color:#27312d; font:700 clamp(1.55rem,4vw,2.2rem)/1.1 Georgia,serif; }
:where(html.theme-dark) .simple-page-head h1 { color:var(--text); } /* dark:gen */
.simple-page-head h1.has-overview-link { display:flex; flex-wrap:wrap; align-items:baseline; gap:2px 8px; }
.simple-page-overview-link { flex:none; min-height:40px; margin:0; padding:0; border:0; background:transparent; color:var(--hero-decor, #527363); font:700 .8rem/1.3 system-ui,sans-serif; white-space:nowrap; text-decoration:underline; text-underline-offset:3px; }
:where(html.theme-dark) .simple-page-overview-link { color:var(--hero-decor, #b9cdc3); } /* dark:gen */
.simple-page-overview-link:hover { background:transparent; color:var(--accent); }
.simple-page-overview-link:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
.simple-page-overview-separator { color:var(--muted); font:400 1rem/1 system-ui,sans-serif; }
.simple-page-current-title { flex:0 1 auto; min-width:0; overflow-wrap:anywhere; }
.simple-page-head .simple-home-eyebrow { color:var(--hero-decor, #527363); }
:where(html.theme-dark) .simple-page-head .simple-home-eyebrow { color:var(--hero-decor, #b9cdc3); } /* dark:gen */
/* Alle Kopf-Bedienelemente auf eine gemeinsame Höhe (40) – sonst sitzen
   Zurück-Knopf, Kapitel-Navigation, Übersetzungs-Pille und Such-Kreis auf
   vier verschiedenen Höhen. */
/* Blasser als die Kapitel-Navigation daneben: "Zurück" (Browser-Verlauf) und
   die Kapitel-Pfeile lösen unterschiedliche Aktionen aus, sollen sich also
   nicht gleich schwer anfühlen, obwohl beide auf links zeigen. */
.simple-page-back { min-height:40px; height:40px; padding:0 14px; border:1px solid transparent; border-radius:12px; color:#4b5a54; background:transparent; font-weight:600; }
:where(html.theme-dark) .simple-page-back { color:var(--muted); } /* dark:gen */
.simple-page-back:hover { border-color:#d7d6cf; background:#fff; }
:where(html.theme-dark) .simple-page-back:hover { border-color:var(--line); background:var(--panel); } /* dark:gen */
/* Start has no page header: the back button sits on the dark hero image. */
.simple-home-back { display:inline-flex; align-items:center; gap:6px; margin:0 0 14px; border-color:rgba(255,255,255,.35); color:#fff; background:rgba(0,0,0,.2); }
:where(html.theme-dark) .simple-home-back { border-color:rgba(255,255,255,0.16); } /* dark:gen */
.simple-home-back:hover { border-color:rgba(255,255,255,.6); color:#fff; background:rgba(0,0,0,.35); }
:where(html.theme-dark) .simple-home-back:hover { border-color:rgba(255,255,255,0.16); } /* dark:gen */
.simple-home-back[hidden] { display:none; }
/* One shape for header tools (docs/kopfzeilen-umbau.md): borderless round icons;
   only the translation pill has a surface, as it shows a value. */
.simple-page-menu,
.simple-title-favorite { width:40px; height:40px; padding:0; display:inline-flex; align-items:center; justify-content:center; border:0; border-radius:50%; color:#315246; background:transparent; }
:where(html.theme-dark) .simple-page-menu, :where(html.theme-dark) .simple-title-favorite { color:#c2dbd2; } /* dark:gen */
.simple-page-menu:hover,
.simple-title-favorite:hover { background:rgba(49,82,70,.08); }
.simple-page-head-actions > .simple-page-closed-status { flex:none; margin:0; }
.simple-page-head-actions > .simple-page-closed-status.button-icon-mode { width:40px; height:40px; min-height:40px; padding:0; border:0; border-radius:50%; background:transparent; }
/* Favorite = state of the title, inside the h1 after its last word: outline off, gold on. */
.simple-title-favorite .fa-icon { color:transparent; -webkit-text-stroke:1.6px #315246; font-size:1.15rem; }
.simple-title-favorite[aria-pressed="true"] .fa-icon { color:#d1a021; -webkit-text-stroke:0; }
.simple-page-current-title > .simple-title-favorite { margin:-8px 0 -8px 4px; vertical-align:middle; }
/* Ortskapsel (Etappe 3): the real button .simple-page-capsule-hit covers the capsule; the
   text, star, breadcrumb link and query token above it keep their own taps. Glass only when
   collapsed, hovered or focused. */
.simple-page-title-container { min-width:0; }
.simple-page-capsule { position:relative; display:grid; grid-template-columns:auto minmax(0,1fr) auto auto; align-items:center; gap:2px 12px; width:fit-content; max-width:100%; min-width:0; padding:4px 14px 4px 16px; border-radius:24px; }
.simple-page-capsule[hidden] { display:none; }
@media (min-width:481px) {
  .simple-page-head:not(.is-collapsed) .simple-page-capsule.glass:not(:hover):not(:focus-within) { border-color:transparent; background:transparent; box-shadow:none; -webkit-backdrop-filter:none; backdrop-filter:none; }
}
.simple-page-capsule-hit { position:absolute; inset:0; z-index:0; width:100%; height:100%; min-height:0; margin:0; padding:0; border:0; border-radius:inherit; color:inherit; background:transparent; box-shadow:none; cursor:pointer; }
.simple-page-capsule-hit:hover { background:transparent; }
.simple-page-capsule-hit:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.simple-page-capsule-icon { color:var(--accent); font-size:1rem; pointer-events:none; }
.simple-page-capsule-text { min-width:0; pointer-events:none; }
.simple-page-capsule-text :is(button, a),
.simple-page-capsule-token { position:relative; z-index:1; pointer-events:auto; }
.simple-page-capsule-end { display:inline-flex; align-items:center; gap:8px; color:var(--muted); font-size:.8rem; pointer-events:none; }
.simple-page-capsule-kbd { display:none; padding:1px 6px; border:1px solid var(--line); border-radius:6px; font:600 .72rem/1.4 system-ui,sans-serif; white-space:nowrap; }
@media (hover:hover) and (pointer:fine) and (min-width:700px) { .simple-page-capsule-kbd:not(:empty) { display:inline-block; } }
.simple-page-capsule-token { display:inline-flex; align-items:center; max-width:12em; border:1px solid var(--accent); border-radius:999px; color:var(--accent); background:var(--accent-soft); font:600 .85rem/1.2 system-ui,sans-serif; }
.simple-page-capsule-token[hidden] { display:none; }
.simple-page-capsule-tokens { display:flex; align-items:center; gap:6px; min-width:0; max-width:15em; }
.simple-page-capsule-tokens[hidden] { display:none; }
.simple-page-capsule-tokens > .simple-page-capsule-token { flex:0 1 auto; min-width:0; }
.simple-page-capsule-token button { min-height:32px; margin:0; padding:0 8px; border:0; border-radius:999px; color:inherit; background:transparent; font-size:inherit; }
.simple-page-capsule-token-label { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font:inherit; }
.simple-page-capsule-token-clear { padding:0 10px 0 4px; }
.simple-page-capsule .simple-page-current-title { overflow-wrap:normal; }
.simple-page-head.is-collapsed .simple-page-capsule { min-width:min(100%, 240px); padding-block:2px; }
.simple-page-head.is-collapsed .simple-page-capsule-text { overflow:hidden; }
/* Narrow phones: a compact glass pill at rest; title (ellipsis), star and tokens stay on one line. */
@media (max-width:480px) {
  .simple-page-capsule { width:100%; min-height:44px; padding:4px 12px 4px 14px; gap:2px 8px; }
  .simple-page-capsule h1:has(.simple-title-favorite) { display:flex; flex-wrap:nowrap; align-items:center; min-width:0; }
  .simple-page-capsule .simple-page-current-title:has(> .simple-title-favorite) { display:flex; align-items:center; min-width:0; }
  .simple-page-capsule .simple-page-title-text { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .simple-page-capsule .simple-page-current-title > .simple-title-favorite { flex:0 0 auto; }
  .simple-page-capsule-tokens { max-width:9em; }
}
/* Collapsed large title (updateSimplePageHeadCollapse): one row, small title, progress edge. */
.simple-page-head.is-collapsed { padding-block:6px; }
.simple-page-head.is-collapsed :is(.simple-home-eyebrow, .simple-page-overview-link, .simple-page-overview-separator, .collection-edition-progress) { display:none; }
.simple-page-head.is-collapsed .simple-page-title-container.has-edition-switch { grid-template-columns:minmax(0,1fr) auto; }
.simple-page-head.is-collapsed h1 { display:flex; flex-wrap:nowrap; align-items:center; min-width:0; font-size:1.1rem; white-space:nowrap; }
.simple-page-head.is-collapsed .simple-page-current-title { overflow:hidden; text-overflow:ellipsis; }
/* With the favorite star inside the title span only the text is shortened. */
.simple-page-head.is-collapsed .simple-page-current-title:has(> .simple-title-favorite) { display:flex; align-items:center; overflow:visible; }
.simple-page-head.is-collapsed .simple-page-title-text { min-width:0; overflow:hidden; text-overflow:ellipsis; }
.simple-page-head.is-collapsed .simple-page-current-title > .simple-title-favorite { flex:none; }
.simple-page-head:is(.is-collapsed, .has-custom-nav)::after { content:""; position:absolute; left:0; bottom:-1px; width:calc(var(--page-progress, 0) * 100%); height:2px; background:var(--accent); }
.simple-page-head .sanctuary-translation-pill { min-height:40px; }
.simple-page-head.has-custom-nav { grid-template-columns:auto minmax(0,1fr) auto; gap:6px 12px; padding-block:8px; padding-inline:max(12px, calc((100% - var(--content-max-w, 900px)) / 2 + clamp(20px,4vw,42px))); }
.simple-page-head.has-custom-nav .simple-page-title-container { display:flex; flex-wrap:wrap; align-items:center; gap:6px 12px; min-width:0; }
.simple-page-head.has-custom-nav .sanctuary-translation-pill { border-radius:10px; }

/* Desktop head (docs/kopfzeilen-umbau.md, stage 5b): one head instead of two. From 761 px the page head
   carries [logo][back] [capsule] [page menu][account]; the top bar only stays on Start and the views
   without a page head. Below that the wrapper is display:contents, so phones lay out as before. */
.simple-page-head-lead { display:contents; }
.simple-page-logo,
.simple-page-head .account-button { display:none; }
@media (min-width:761px) {
  body:has(#workspacePanel:not([hidden]) #simplePage:not([hidden])) .topbar { display:none; }
  .simple-page-head-lead { display:flex; align-items:center; gap:8px; min-width:0; }
  .simple-page-logo { display:inline-flex; flex:none; align-items:center; justify-content:center; width:40px; height:40px; min-height:40px; padding:0; border:0; border-radius:12px; background:transparent; }
  .simple-page-logo:hover { background:rgba(49,82,70,.08); }
  .simple-page-logo img { width:32px; height:32px; border-radius:8px; object-fit:contain; }
  .simple-page-head .account-button { display:inline-flex; }
  .simple-page-head .simple-page-capsule { width:100%; }
}
/* Account button: round avatar (initial; guest: user glyph) with a sync-state dot. The same dot
   colours the status line of the account menu. */
button.account-button { position:relative; flex:none; display:inline-flex; align-items:center; justify-content:center; width:40px; height:40px; min-height:40px; padding:0; border:0; border-radius:50%; color:inherit; background:transparent; }
button.account-button:hover:not(:disabled) { border:0; background:rgba(49,82,70,.08); }
button.account-button:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.account-avatar { display:flex; align-items:center; justify-content:center; width:34px; height:34px; border-radius:50%; color:var(--on-accent, #fff); background:var(--accent); font:700 .95rem/1 system-ui,sans-serif; pointer-events:none; }
.account-avatar-glyph { display:none; font-size:.9rem; }
.account-button[data-sync-state="guest"] .account-avatar { color:var(--accent); background:var(--accent-soft); }
.account-button[data-sync-state="guest"] .account-avatar-letter { display:none; }
.account-button[data-sync-state="guest"] .account-avatar-glyph { display:inline; }
.account-sync-dot { flex:none; width:10px; height:10px; border-radius:50%; background:var(--muted); box-sizing:border-box; }
.account-button .account-sync-dot { position:absolute; right:1px; bottom:1px; width:13px; height:13px; border:2px solid var(--panel, #fff); pointer-events:none; }
:where(html.theme-dark) .account-button .account-sync-dot { border:2px solid var(--panel, var(--line)); } /* dark:gen */
.account-button[data-sync-state="guest"] .account-sync-dot { display:none; }
[data-sync-state="ok"] .account-sync-dot { background:#2e9d5b; }
[data-sync-state="syncing"] .account-sync-dot { background:#d99a1e; animation:account-sync-pulse 1.2s ease-in-out infinite; }
[data-sync-state="error"] .account-sync-dot { background:var(--danger); }
.account-button[data-sync-state="error"] .account-sync-dot { width:15px; height:15px; box-shadow:0 0 0 2px color-mix(in srgb, var(--danger) 35%, transparent); }
[data-sync-state="offline"] .account-sync-dot { background:var(--muted); }
@keyframes account-sync-pulse { 50% { opacity:.35; } }
@media (prefers-reduced-motion:reduce) { [data-sync-state="syncing"] .account-sync-dot { animation:none; } }
.account-menu-summary { display:grid; gap:2px; padding:2px 10px 8px; font-size:.85rem; }
.account-menu-status { display:flex; align-items:center; gap:8px; font-weight:600; }
.account-menu-summary[data-sync-state="error"] .account-menu-status { color:var(--danger); font-weight:700; }
.account-menu-stand,
.account-menu-version { color:var(--muted); font-size:.75rem; }
.account-menu-stand { padding-left:18px; }
.account-menu-version { padding:6px 10px 2px; }
.simple-page-content { max-width:var(--content-max-w, 900px); margin:auto; padding:clamp(20px,4vw,42px); padding-top:clamp(12px,2vw,20px); }
/* Bilingual collections (app-language-editions.js) */
.ui-dialog-modal:has(.entry-language-editions-editor) { width:min(1100px, 100%); max-width:1100px; }
.entry-language-editions-editor { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:24px; }
.entry-language-editions-toolbar { grid-column:1 / -1; }
.entry-language-editions-editor > section { min-width:0; }
.entry-language-editions-editor h3 { margin:0; }
.entry-language-editions-editor textarea { min-height:320px; resize:vertical; }
@media (max-width:700px) {
  .entry-language-editions-editor { grid-template-columns:minmax(0, 1fr); }
}
.simple-page-title-container.has-edition-switch { display:grid; grid-template-columns:minmax(0,auto) auto; justify-content:start; align-items:center; column-gap:12px; }
.has-edition-switch > .simple-home-eyebrow { grid-column:1 / -1; }
.collection-edition-tools { display:flex; flex-wrap:wrap; align-items:center; gap:4px 10px; }
.collection-edition-switch { margin:0; }
.collection-edition-progress { min-height:28px; padding:2px 6px; border:0; color:var(--muted); background:none; font-size:12px; }
.collection-edition-switch button { min-width:42px; min-height:28px; padding:3px 0; font-size:12px; }
.simple-verse-card.edition-untranslated { position:relative; border-style:dashed; }
.simple-verse-card.edition-source-changed { position:relative; border-color:var(--accent); }
.edition-untranslated-badge { position:absolute; top:-10px; left:18px; padding:1px 8px; border:1px solid var(--line); border-radius:999px; color:var(--muted); background:var(--panel); font-size:11px; font-weight:600; }
.simple-choice.has-area-color { border-left:4px solid var(--sb-area-color); }
.simple-choice.has-area-color:hover { border-left-color:var(--sb-area-color); }
.simple-choice.has-area-color > .fa-icon { color:var(--sb-area-color); }
.simple-bible-chapter-nav { display:grid; grid-template-columns:auto minmax(150px,1fr) auto; gap:10px; align-items:center; margin:0 0 18px; }
.simple-bible-chapter-nav.in-header { display:grid; grid-template-columns:44px minmax(0,1fr) 44px; align-items:center; gap:4px; flex:1 1 160px; min-width:0; margin:0; }
.simple-bible-chapter-nav.in-header .simple-bible-location-button { min-width:0; min-height:40px; height:40px; justify-content:center; padding:0 8px; border-color:transparent; background:transparent; color:#27312d; font:700 1.15rem/1.2 Georgia,serif; touch-action:pan-y; }
:where(html.theme-dark) .simple-bible-chapter-nav.in-header .simple-bible-location-button { color:var(--text); } /* dark:gen */
.simple-bible-chapter-nav.in-header .simple-bible-location-label { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; transition:transform .15s; }
/* Wide chapter targets stay within the existing title row on touch and desktop. */
.simple-bible-chapter-nav.in-header .simple-nav-btn { display:inline-flex; width:44px; height:40px; min-height:40px; padding:0; align-items:center; justify-content:center; border:0; border-radius:50%; color:#315246; background:transparent; font-size:.85rem; }
:where(html.theme-dark) .simple-bible-chapter-nav.in-header .simple-nav-btn { color:#c2dbd2; } /* dark:gen */
.simple-bible-chapter-nav.in-header .simple-nav-btn:hover:not(:disabled) { background:rgba(49,82,70,.08); }
.simple-bible-chapter-nav.in-header .simple-nav-btn:disabled { opacity:.35; }
.simple-bible-chapter-nav:not(.in-header) { margin:24px 0 0; }
.simple-bible-chapter-nav button { min-height:44px; padding:0 12px; border:1px solid #d7d6cf; border-radius:12px; color:#315246; background:#fff; font-weight:700; }
:where(html.theme-dark) .simple-bible-chapter-nav button { border:1px solid var(--line); color:#c2dbd2; background:var(--panel); } /* dark:gen */
.simple-bible-chapter-nav button:disabled { opacity:.45; }
.simple-bible-location-button { display:flex; align-items:center; justify-content:center; gap:8px; min-width:0; }
.simple-bible-location-label { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* Lock the document scroller without shrinking the body. A viewport-height body
   collapses the scroll range, resets the reading position and forces fixed bars
   through a second viewport change when the picker hands off to settings. */
html:has(body.bible-location-picker-open) { overflow:hidden; }
.bible-location-picker-backdrop { position:fixed; inset:0; z-index:11000; display:grid; place-items:center; padding:18px; background:rgba(31,41,36,.56); backdrop-filter:blur(3px); }
/* --pick-* skalieren Trefferflächen/Abstände gemeinsam; die Presets weiter unten
   überschreiben sie. Der Standard entspricht dem bisherigen Aussehen. */
.bible-location-picker { position:relative; display:flex; flex-direction:column; width:min(940px,100%); max-height:min(860px,calc(var(--vph) - 36px)); overflow:hidden; border:1px solid #d7d6cf; border-radius:20px; background:#fffdf8; box-shadow:0 18px 55px rgba(32,40,36,.22);
  --pick-book-min:100px; --pick-num-min:80px; --pick-gap:7px; --pick-tile-h:48px; --pick-tile-font:1rem; --pick-section-gap:28px; --pick-area-min:190px; }
:where(html.theme-dark) .bible-location-picker { border:1px solid var(--line); background:var(--panel); } /* dark:gen */
.bible-location-picker.size-compact { --pick-book-min:74px; --pick-num-min:58px; --pick-gap:5px; --pick-tile-h:42px; --pick-tile-font:.86rem; --pick-section-gap:20px; --pick-area-min:150px; }
.bible-location-picker.size-large { --pick-book-min:150px; --pick-num-min:110px; --pick-gap:10px; --pick-tile-h:62px; --pick-tile-font:1.14rem; --pick-section-gap:32px; --pick-area-min:250px; }
.bible-location-picker.size-xlarge { --pick-book-min:210px; --pick-num-min:150px; --pick-gap:14px; --pick-tile-h:78px; --pick-tile-font:1.3rem; --pick-section-gap:40px; --pick-area-min:320px; }
.bible-location-picker-header { position:absolute; inset:0 0 auto; z-index:5; height:0; pointer-events:none; }
.bible-location-picker-header button { position:absolute; top:8px; right:8px; display:grid; place-items:center; width:44px; height:44px; padding:0; border:0; border-radius:10px; color:#315246; background:transparent; pointer-events:auto; }
:where(html.theme-dark) .bible-location-picker-header button { color:#c2dbd2; } /* dark:gen */
.bible-location-picker-header button:hover { background:#e7efe9; }
:where(html.theme-dark) .bible-location-picker-header button:hover { background:color-mix(in srgb, var(--text) 5%, var(--panel)); } /* dark:gen */
.bible-location-picker-body { flex:1; min-height:0; overflow-y:auto; overscroll-behavior:contain; padding:20px clamp(16px,4vw,30px) 24px; }
.bible-location-picker-stage[hidden] { display:none; }
.bible-location-picker-search[hidden] { display:none; }
.bible-location-picker-search { position:sticky; top:-20px; z-index:2; margin:-4px 0 20px; padding:4px 52px 10px 0; background:linear-gradient(#fffdf8 78%,transparent); }
:where(html.theme-dark) .bible-location-picker-search { background:linear-gradient(var(--panel) 78%,transparent); } /* dark:gen */
.bible-location-picker-search input { width:100%; min-height:48px; padding:10px 14px; border:1px solid #d7d6cf; border-radius:12px; color:#27312d; background:#fff; }
:where(html.theme-dark) .bible-location-picker-search input { border:1px solid var(--line); color:var(--text); background:var(--panel); } /* dark:gen */
.bible-location-picker-feedback,.bible-location-picker-status { min-height:1.25rem; margin:5px 3px 0; color:#66716c; font-size:.78rem; }
:where(html.theme-dark) .bible-location-picker-feedback, :where(html.theme-dark) .bible-location-picker-status { color:var(--muted); } /* dark:gen */
.bible-location-picker-feedback.error { color:#a12f35; }
:where(html.theme-dark) .bible-location-picker-feedback.error { color:#e39fa3; } /* dark:gen */
.bible-location-picker-footer { flex:none; display:flex; align-items:center; gap:8px; padding:10px clamp(12px,3vw,18px); border-top:1px solid #dedbd3; background:#fffdf8; }
:where(html.theme-dark) .bible-location-picker-footer { border-top:1px solid var(--line); background:var(--panel); } /* dark:gen */
.bible-location-picker-footer .spacer { flex:1; }
.bible-location-picker-footer button { min-height:44px; padding:0 16px; border:1px solid #d7d6cf; border-radius:11px; color:#315246; background:#fff; font-weight:700; }
:where(html.theme-dark) .bible-location-picker-footer button { border:1px solid var(--line); color:#c2dbd2; background:var(--panel); } /* dark:gen */
.bible-location-picker-footer button:hover { border-color:#5f806f; background:#f2f7f4; }
:where(html.theme-dark) .bible-location-picker-footer button:hover { background:var(--panel); } /* dark:gen */
.bible-location-picker-foot-back { display:inline-flex; align-items:center; gap:8px; }
.bible-location-picker-foot-back[hidden] { display:none; }
:is(.bible-location-picker-foot-settings, .bible-location-picker-foot-notes) { min-width:44px; padding:0; display:grid; place-items:center; font-size:1rem; }
:is(.bible-location-picker-foot-settings, .bible-location-picker-foot-notes)[hidden] { display:none; }
.bible-location-picker-footer .bible-location-picker-foot-notes[aria-pressed="true"] { outline:2px solid currentColor; outline-offset:-4px; background:var(--text); color:var(--panel); }
/* Ueber die Fussleiste qualifiziert: .bible-location-picker-footer button traegt
   ein Element mehr und gewann sonst gegen diese Regel - der primaere Knopf blieb
   dadurch weiss statt gefuellt. */
.bible-location-picker-footer .bible-location-picker-foot-close { background:#315246; color:#fff; border-color:#315246; }
.bible-location-picker-footer .bible-location-picker-foot-close:hover { background:#274035; border-color:#274035; }
/* "Zuletzt gelesen": eine seitlich scrollbare Zeile, damit die Buchkacheln auch
   bei grossen Trefferflaechen nicht nach unten wegrutschen. */
.bible-location-picker-history { margin:0 0 18px; }
.bible-location-picker-history[hidden] { display:none; }
.bible-location-picker-history h3 { margin:0 0 7px; color:#27312d; font-size:.95rem; }
:where(html.theme-dark) .bible-location-picker-history h3 { color:var(--text); } /* dark:gen */
.bible-location-picker-history-head { display:flex; align-items:baseline; justify-content:space-between; gap:12px; }
.bible-location-picker-history-clear { min-height:0; margin:0 0 7px; padding:0 2px; border:0; background:none; color:#5f806f; font-size:.8rem; font-weight:600; text-decoration:underline; cursor:pointer; }
:where(html.theme-dark) .bible-location-picker-history-clear { color:#b5c8be; } /* dark:gen */
.bible-location-picker-history-clear:hover { color:#315246; background:none; }
:where(html.theme-dark) .bible-location-picker-history-clear:hover { color:#c2dbd2; } /* dark:gen */
/* Das Verlaufs-Menue (Eintrag entfernen) haengt am body und muss ueber dem Dialog liegen. */
body:has(.bible-location-picker-backdrop) .context-menu { z-index:11100; }
.bible-location-picker-history-row { display:flex; gap:8px; overflow-x:auto; padding-bottom:4px; scrollbar-width:none; }
.bible-location-picker-history-row::-webkit-scrollbar { display:none; }
.bible-location-picker-history-row button { flex:0 0 auto; min-height:44px; padding:0 14px; border:1px solid #d7d6cf; border-left:5px solid var(--picker-book-color,#d7d6cf); border-radius:11px; color:#27312d; background:#fff; font-weight:700; white-space:nowrap; }
:where(html.theme-dark) .bible-location-picker-history-row button { border:1px solid var(--line); border-left:5px solid var(--picker-book-color,var(--line)); color:var(--text); background:var(--panel); } /* dark:gen */
.bible-location-picker-history-row button:hover { border-color:#5f806f; border-left-color:var(--picker-book-color,#5f806f); background:#f2f7f4; }
:where(html.theme-dark) .bible-location-picker-history-row button:hover { background:var(--panel); } /* dark:gen */
.bible-location-picker-testament { margin:0 0 var(--pick-section-gap); }
.bible-location-picker-testament-heading { display:flex; align-items:center; gap:8px; margin:0 0 8px; padding-bottom:6px; border-bottom:1px solid #dedbd3; }
:where(html.theme-dark) .bible-location-picker-testament-heading { border-bottom:1px solid var(--line); } /* dark:gen */
.bible-location-picker-testament-heading h2 { margin:0 auto 0 0; color:#27312d; font:700 1.12rem/1.3 Georgia,serif; }
:where(html.theme-dark) .bible-location-picker-testament-heading h2 { color:var(--text); } /* dark:gen */
.bible-location-picker-testament-heading small { color:#66716c; }
:where(html.theme-dark) .bible-location-picker-testament-heading small { color:var(--muted); } /* dark:gen */
/* Die Testament-Ueberschrift IST der Umschalter: die h2 traegt den Knopf, der
   ueber die ganze Zeile geht - Pfeil, Titel und Anzahl sind ein Ziel. */
h2.bible-location-picker-testament-heading.is-collapsible { display:block; margin:0 0 8px; padding:0; font:inherit; }
.bible-location-picker-testament-toggle { display:flex; align-items:center; gap:8px; width:100%; padding:2px 6px 6px 0; border:0; border-radius:8px; background:transparent; text-align:left; cursor:pointer; }
.bible-location-picker-testament-toggle .label { flex:1 1 auto; min-width:0; color:#27312d; font:700 1.12rem/1.3 Georgia,serif; }
:where(html.theme-dark) .bible-location-picker-testament-toggle .label { color:var(--text); } /* dark:gen */
.bible-location-picker-testament-toggle small { flex:0 0 auto; color:#66716c; font-weight:400; }
:where(html.theme-dark) .bible-location-picker-testament-toggle small { color:var(--muted); } /* dark:gen */
.bible-location-picker-testament-toggle .caret { flex:0 0 auto; display:grid; place-items:center; width:24px; color:#527363; font-size:.85rem; transition:transform .15s ease; }
:where(html.theme-dark) .bible-location-picker-testament-toggle .caret { color:#b9cdc3; } /* dark:gen */
.bible-location-picker-testament-toggle:hover { background:#e7efe9; }
:where(html.theme-dark) .bible-location-picker-testament-toggle:hover { background:color-mix(in srgb, var(--text) 5%, var(--panel)); } /* dark:gen */
.bible-location-picker-testament-toggle:hover .label { color:#1f2a25; }
:where(html.theme-dark) .bible-location-picker-testament-toggle:hover .label { color:var(--text); } /* dark:gen */
.bible-location-picker-testament-toggle:focus-visible { outline:2px solid #5f806f; outline-offset:2px; }
.bible-location-picker-testament.is-collapsed .bible-location-picker-testament-toggle .caret { transform:rotate(-90deg); }
.bible-location-picker-testament.is-collapsed .bible-location-picker-legend,
.bible-location-picker-testament.is-collapsed .bible-location-picker-book-grid { display:none; }
.bible-location-picker-legend { display:flex; gap:6px 12px; margin:0 0 10px; overflow-x:auto; color:#66716c; font-size:.72rem; scrollbar-width:none; }
:where(html.theme-dark) .bible-location-picker-legend { color:var(--muted); } /* dark:gen */
.bible-location-picker-legend::-webkit-scrollbar { display:none; }
.bible-location-picker-legend span { display:inline-flex; align-items:center; flex:0 0 auto; gap:5px; white-space:nowrap; }
.bible-location-picker-legend i { width:8px; height:8px; border-radius:50%; background:var(--picker-book-color); }
.bible-location-picker-book-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(var(--pick-book-min),1fr)); gap:var(--pick-gap); }
.bible-location-picker-book { display:flex; align-items:center; justify-content:center; min-height:var(--pick-tile-h); padding:6px 4px; overflow:hidden; border:0; border-radius:9px; color:var(--picker-book-ink); background:var(--picker-book-color); font-weight:800; font-size:var(--pick-tile-font); line-height:1.15; white-space:nowrap; }
.bible-location-picker-book.is-long { font-size:calc(var(--pick-tile-font) * .82); letter-spacing:-.02em; }
.bible-location-picker-book:hover { filter:brightness(.94); }
.bible-location-picker-book.current { box-shadow:inset 0 0 0 3px #fff; outline:2px solid var(--picker-book-color); outline-offset:1px; }
/* Hoher Kontrast: Farbe wird zum Rahmen statt zur Füllung – ruhigere Fläche,
   dunkle fette Schrift auf Weiß liest sich für schwache Augen zuverlässiger. */
.bible-location-picker.contrast-contrast .bible-location-picker-book { background:#fff; color:#1a1a1a; border:3px solid var(--picker-book-color); }
:where(html.theme-dark) .bible-location-picker.contrast-contrast .bible-location-picker-book { background:var(--panel); color:var(--text); } /* dark:gen */
.bible-location-picker.contrast-contrast .bible-location-picker-book:hover { filter:none; background:#f3f6f4; }
:where(html.theme-dark) .bible-location-picker.contrast-contrast .bible-location-picker-book:hover { background:var(--panel); } /* dark:gen */
.bible-location-picker.contrast-contrast .bible-location-picker-book.current { box-shadow:none; outline:3px solid #1a1a1a; outline-offset:2px; }
.bible-location-picker-areas-stage h4 { margin:16px 0 8px; color:#315246; font:700 .95rem/1.3 Georgia,serif; }
:where(html.theme-dark) .bible-location-picker-areas-stage h4 { color:#c2dbd2; } /* dark:gen */
.bible-location-picker-areas { display:grid; grid-template-columns:repeat(auto-fill,minmax(var(--pick-area-min),1fr)); gap:var(--pick-gap); }
.bible-location-picker-area { display:flex; flex-direction:column; align-items:flex-start; justify-content:center; gap:2px; min-height:calc(var(--pick-tile-h) + 22px); padding:10px 14px; border:0; border-radius:12px; color:var(--picker-book-ink,#17211d); background:var(--picker-book-color,#e3ebe7); text-align:left; }
:where(html.theme-dark) .bible-location-picker-area { color:var(--picker-book-ink,var(--text)); background:var(--picker-book-color,color-mix(in srgb, var(--text) 6%, var(--panel))); } /* dark:gen */
.bible-location-picker-area strong { font-size:var(--pick-tile-font); font-weight:800; }
.bible-location-picker-area small { font-size:.8rem; font-weight:600; opacity:.85; }
.bible-location-picker-area:hover { filter:brightness(.95); }
.bible-location-picker.contrast-contrast .bible-location-picker-area { background:#fff; color:#1a1a1a; border:3px solid var(--picker-book-color,#8a94a6); }
:where(html.theme-dark) .bible-location-picker.contrast-contrast .bible-location-picker-area { background:var(--panel); color:var(--text); } /* dark:gen */
.bible-location-picker.contrast-contrast .bible-location-picker-area:hover { filter:none; background:#f3f6f4; }
:where(html.theme-dark) .bible-location-picker.contrast-contrast .bible-location-picker-area:hover { background:var(--panel); } /* dark:gen */
.bible-location-picker-settings { padding-top:48px; }
.bible-location-picker-settings { display:flex; flex-direction:column; gap:16px; }
.bible-location-picker-setting { display:flex; flex-direction:column; gap:7px; }
.bible-location-picker-setting > span { color:#27312d; font-size:.9rem; font-weight:700; }
:where(html.theme-dark) .bible-location-picker-setting > span { color:var(--text); } /* dark:gen */
.bible-location-picker-setting-select { flex-direction:row; align-items:center; gap:12px; }
.bible-location-picker-setting-select > span { flex:0 0 auto; white-space:nowrap; }
.bible-location-picker-setting-select select { flex:1 1 auto; min-width:0; min-height:42px; padding:0 10px; border:1px solid #d7d6cf; border-radius:10px; color:#315246; background:#fff; font-weight:700; }
:where(html.theme-dark) .bible-location-picker-setting-select select { border:1px solid var(--line); color:#c2dbd2; background:var(--panel); } /* dark:gen */
.bible-location-picker-segment { display:flex; flex-wrap:wrap; gap:6px; }
.bible-location-picker-segment button { min-height:42px; padding:0 14px; border:1px solid #d7d6cf; border-radius:10px; color:#315246; background:#fff; font-weight:700; }
:where(html.theme-dark) .bible-location-picker-segment button { border:1px solid var(--line); color:#c2dbd2; background:var(--panel); } /* dark:gen */
.bible-location-picker-segment button:hover { border-color:#5f806f; }
.bible-location-picker-segment button.active { border-color:#315246; color:#fff; background:#315246; }
:is(.bible-location-picker-settings-link, .bible-location-picker-open-chapter) { align-self:flex-start; min-height:42px; padding:0 14px; border:1px solid #d7d6cf; border-radius:10px; color:#315246; background:#fff; font-weight:700; }
:where(html.theme-dark) :is(.bible-location-picker-settings-link, :where(html.theme-dark) .bible-location-picker-open-chapter) { border:1px solid var(--line); color:#c2dbd2; background:var(--panel); } /* dark:gen */
:is(.bible-location-picker-settings-link, .bible-location-picker-open-chapter):hover { border-color:#5f806f; }
.bible-location-picker-settings-hint { margin:0; color:#66716c; font-size:.8rem; }
:where(html.theme-dark) .bible-location-picker-settings-hint { color:var(--muted); } /* dark:gen */
.bible-location-picker-summary { display:flex; align-items:center; gap:12px; margin-bottom:14px; padding:12px 14px; border:1px solid color-mix(in srgb,var(--picker-book-color) 45%,#dedbd3); border-radius:13px; background:color-mix(in srgb,var(--picker-book-color) 13%,#fff); }
:where(html.theme-dark) .bible-location-picker-summary { border:1px solid color-mix(in srgb,var(--picker-book-color) 45%,var(--line)); background:color-mix(in srgb,var(--picker-book-color) 13%,var(--panel)); } /* dark:gen */
.bible-location-picker-summary > span:first-child { width:8px; align-self:stretch; border-radius:8px; background:var(--picker-book-color); }
.bible-location-picker-summary strong,.bible-location-picker-summary small { display:block; }
.bible-location-picker-summary small { margin-top:2px; color:#66716c; }
:where(html.theme-dark) .bible-location-picker-summary small { color:var(--muted); } /* dark:gen */
.bible-location-picker-stage > h3 { margin:0 0 9px; color:#27312d; font-size:.95rem; }
:where(html.theme-dark) .bible-location-picker-stage > h3 { color:var(--text); } /* dark:gen */
.bible-location-picker-number-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(var(--pick-num-min),1fr)); gap:var(--pick-gap); }
.bible-location-picker-number-grid button { min-width:var(--pick-num-min); min-height:var(--pick-num-min); padding:5px; border:1px solid #d7d6cf; border-radius:10px; color:#315246; background:#fff; font-weight:750; font-size:var(--pick-tile-font); }
:where(html.theme-dark) .bible-location-picker-number-grid button { border:1px solid var(--line); color:#c2dbd2; background:var(--panel); } /* dark:gen */
.bible-location-picker-number-grid button:hover { border-color:#5f806f; background:#eef4f0; }
:where(html.theme-dark) .bible-location-picker-number-grid button:hover { background:color-mix(in srgb, var(--text) 3%, var(--panel)); } /* dark:gen */
.bible-location-picker-number-grid button.current { border-color:#315246; color:#fff; background:#315246; }
/* Zusammengefasste Verse ("24-25", siehe bibleLocationPickerVerseLabel): in einer
   Kachel, die auf eine zweistellige Zahl ausgelegt ist, sonst zweizeilig. */
.bible-location-picker-number-grid button.is-range { white-space:nowrap; letter-spacing:-.02em; font-size:calc(var(--pick-tile-font) * .72); }
.bible-location-picker-empty { padding:38px 12px; color:#66716c; text-align:center; }
:where(html.theme-dark) .bible-location-picker-empty { color:var(--muted); } /* dark:gen */
.bible-location-picker-handoff { display:flex; flex-direction:column; gap:8px; }
.bible-location-picker-handoff .bible-location-picker-empty { padding:20px 12px 8px; }
.bible-location-picker-handoff-row { display:flex; align-items:center; gap:12px; width:100%; padding:14px 16px; border:1px solid #d7d6cf; border-radius:13px; color:#27312d; background:#fff; text-align:left; }
:where(html.theme-dark) .bible-location-picker-handoff-row { border:1px solid var(--line); color:var(--text); background:var(--panel); } /* dark:gen */
.bible-location-picker-handoff-row:hover { border-color:#5f806f; background:#fbfdfb; }
:where(html.theme-dark) .bible-location-picker-handoff-row:hover { background:var(--panel); } /* dark:gen */
.bible-location-picker-handoff-row > .fa-icon { flex:0 0 auto; color:#527363; }
:where(html.theme-dark) .bible-location-picker-handoff-row > .fa-icon { color:#b9cdc3; } /* dark:gen */
.bible-location-picker-handoff-text { min-width:0; display:flex; flex-direction:column; gap:2px; }
.bible-location-picker-handoff-text strong { overflow-wrap:anywhere; }
.bible-location-picker-handoff-text small { color:#66716c; }
:where(html.theme-dark) .bible-location-picker-handoff-text small { color:var(--muted); } /* dark:gen */
.simple-bible-search-nav { position:sticky; top:8px; z-index:2; display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-bottom:14px; padding:10px; border:1px solid #d7d6cf; border-radius:14px; background:#fffdf8; box-shadow:0 6px 18px rgba(42,51,47,.1); }
:where(html.theme-dark) .simple-bible-search-nav { border:1px solid var(--line); background:var(--panel); } /* dark:gen */
.simple-bible-search-nav strong { margin-right:auto; color:#315246; }
:where(html.theme-dark) .simple-bible-search-nav strong { color:#c2dbd2; } /* dark:gen */
.simple-bible-search-nav button { min-height:40px; }
.simple-verse-card:not(.simple-companion-card) mark { padding:1px 2px; border-radius:3px; background:#ffe69a; }
:where(html.theme-dark) .simple-verse-card:not(.simple-companion-card) mark { background:#615532; } /* dark:gen */
.simple-verse-card:not(.simple-companion-card) mark.active { outline:3px solid var(--accent); background:#ffd45c; }
:where(html.theme-dark) .simple-verse-card:not(.simple-companion-card) mark.active { background:#867545; } /* dark:gen */
.simple-choice-list { display:grid; gap:12px; }
.simple-library-quick-access { justify-self:start; min-height:44px; margin-top:12px; padding:8px 10px; border:0; background:transparent; color:var(--accent); }
.simple-tags-untagged { margin-top:16px; }
.simple-choice-order-controls { display:flex; flex-wrap:wrap; gap:4px; justify-content:center; }
.simple-choice-order-button { min-width:34px; min-height:44px; padding:4px 8px; border:1px solid #dedbd3; border-radius:8px; color:#527363; background:#fff; }
:where(html.theme-dark) .simple-choice-order-button { border:1px solid var(--line); color:#b9cdc3; background:var(--panel); } /* dark:gen */
.simple-choice-order-button:hover:not(:disabled) { border-color:#5f806f; background:#fbfdfb; }
:where(html.theme-dark) .simple-choice-order-button:hover:not(:disabled) { background:var(--panel); } /* dark:gen */
.simple-choice-order-button:disabled { opacity:.35; cursor:default; }
.simple-choice { min-height:78px; display:flex; align-items:center; justify-content:space-between; gap:16px; padding:16px 18px; border:1px solid #dedbd3; border-radius:16px; color:#27312d; background:#fff; text-align:left; }
:where(html.theme-dark) .simple-choice { border:1px solid var(--line); color:var(--text); background:var(--panel); } /* dark:gen */
.simple-choice[hidden] { display:none; }
.simple-choice:hover { border-color:#5f806f; background:#fbfdfb; }
:where(html.theme-dark) .simple-choice:hover { background:var(--panel); } /* dark:gen */
/* min-width:0 statt des Flex-Items-Standards (auto): sonst weichen lange Titel
   (z.B. Themennamen) nicht auf eine zweite Zeile aus, sondern sprengen die
   Kartenbreite und damit die ganze Seite in die horizontale Breite. */
.simple-choice-text { min-width:0; }
.simple-choice strong,.simple-choice small { display:block; overflow-wrap:anywhere; }
.simple-choice small { margin-top:3px; color:#66716c; }
:where(html.theme-dark) .simple-choice small { color:var(--muted); } /* dark:gen */
.simple-choice > .fa-icon { flex-shrink:0; color:#527363; }
:where(html.theme-dark) .simple-choice > .fa-icon { color:#b9cdc3; } /* dark:gen */
.offline-packages-page { display:grid; gap:14px; }
.offline-packages-intro { margin:0; max-width:72ch; color:#59645f; line-height:1.55; }
:where(html.theme-dark) .offline-packages-intro { color:var(--muted); } /* dark:gen */
.offline-packages-summary { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:12px 16px; border:1px solid #d7ded9; border-radius:14px; background:#f5f8f6; }
:where(html.theme-dark) .offline-packages-summary { border:1px solid var(--line); background:var(--panel); } /* dark:gen */
.offline-packages-summary strong,.offline-packages-summary small { display:block; }
.offline-packages-summary small { color:#66716c; text-align:right; }
:where(html.theme-dark) .offline-packages-summary small { color:var(--muted); } /* dark:gen */
.offline-package-card { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:18px; padding:18px; border:1px solid #dedbd3; border-radius:16px; background:#fff; }
:where(html.theme-dark) .offline-package-card { border:1px solid var(--line); background:var(--panel); } /* dark:gen */
.offline-package-copy { min-width:0; }
.offline-package-copy h3,.offline-installed-section h3 { margin:0; font-size:1rem; color:#27312d; }
:where(html.theme-dark) .offline-package-copy h3, :where(html.theme-dark) .offline-installed-section h3 { color:var(--text); } /* dark:gen */
.offline-package-copy > p { margin:5px 0 0; color:#66716c; line-height:1.45; }
:where(html.theme-dark) .offline-package-copy > p { color:var(--muted); } /* dark:gen */
.offline-package-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; }
.offline-bible-picker { display:grid; grid-template-columns:minmax(150px,1fr) auto; gap:8px; margin-top:14px; }
.offline-bible-picker select { min-width:0; }
.offline-book-choice { margin-top:12px; }
.offline-book-choice summary,.offline-translation-group summary { cursor:pointer; color:#396b58; font-weight:600; }
:where(html.theme-dark) .offline-book-choice summary, :where(html.theme-dark) .offline-translation-group summary { color:#b8d9cd; } /* dark:gen */
.offline-book-choice select { display:block; width:100%; margin:10px 0 8px; }
.offline-translation-group { padding:12px 16px; border:1px solid #d7ded9; border-radius:14px; background:#fff; }
:where(html.theme-dark) .offline-translation-group { border:1px solid var(--line); background:var(--panel); } /* dark:gen */
.offline-translation-group > summary > button { margin:4px 0 4px 10px; }
.settings-row:has(> #settingReviewRemindersRow[hidden]) { display:none; }

#reviewReminderTime {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
}
.offline-translation-group .offline-installed-list { margin-top:12px; }
.offline-packages-page .bible-manifest-row { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:10px; padding:12px 0; border-top:1px solid #e4e9e5; }
:where(html.theme-dark) .offline-packages-page .bible-manifest-row { border-top:1px solid var(--line); } /* dark:gen */
.offline-packages-page .bible-manifest-row:first-child { border-top:0; }
.offline-packages-page .bible-manifest-row .green-button { min-width:0; }
/* Running download (createDownloadProgress in app.js). */
.download-progress { display:grid; gap:4px; width:100%; max-width:420px; margin-top:8px; }
.download-progress progress { display:block; width:100%; height:8px; accent-color:var(--accent); }
.download-progress .form-hint { margin:0; font-variant-numeric:tabular-nums; }
.offline-installed-section { display:grid; gap:10px; padding-top:6px; }
.offline-installed-list { display:grid; gap:8px; }
.simple-lists-page { display:grid; gap:24px; }
.simple-page-content:has(.simple-lists-layout) { max-width:var(--lists-max-w, 1480px); }
.simple-bible-filter-page { display:grid; }
.simple-lists-layout { display:grid; grid-template-columns:minmax(270px,340px) minmax(0,1fr); gap:28px; align-items:start; }
.simple-lists-column { min-width:0; display:grid; gap:24px; }
.simple-lists-column.simple-database-list { gap:12px; }
.simple-database-list-count { margin:0; color:var(--muted); font-size:.9rem; line-height:1.4; }
.simple-database-list .simple-database-list-search { display:grid; grid-template-columns:minmax(0,1fr) auto auto; align-items:center; gap:8px; margin:0; }
.simple-database-list-search .ws-spot-input { min-width:0; width:100%; margin:0; min-height:44px; }
.simple-database-list-search button { min-height:44px; margin:0; }
.simple-database-list-search .button-icon-mode { width:44px; min-width:44px; padding:0; }
.simple-database-list > .simple-primary-actions { margin:0; padding:0; }
@media (max-width:600px) {
  .simple-database-list-search:has(.button-text-mode) { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .simple-database-list-search:has(.button-text-mode) .ws-spot-input { grid-column:1 / -1; }
}
.simple-lists-filter { position:sticky; top:var(--simple-head-h); z-index:4; display:flex; align-items:center; gap:10px; min-height:50px; padding:0 12px; border:1px solid #d7d6cf; border-radius:14px; color:#527363; background:rgba(255,253,248,.96); box-shadow:0 6px 18px rgba(42,51,47,.09); backdrop-filter:blur(14px); }
:where(html.theme-dark) .simple-lists-filter { border:1px solid var(--line); color:#b9cdc3; background:rgba(27,34,31,0.96); } /* dark:gen */
.simple-lists-filter > .fa-icon { flex:none; }
.simple-lists-filter input { flex:1; min-width:0; border:0; outline:0; color:#27312d; background:transparent; font:inherit; -webkit-appearance:none; appearance:none; }
:where(html.theme-dark) .simple-lists-filter input { color:var(--text); } /* dark:gen */
.simple-lists-filter input::-webkit-search-cancel-button { display:none; }
.simple-lists-filter-clear { width:36px; height:36px; flex:none; padding:0; border:0; border-radius:50%; color:#527363; background:transparent; }
:where(html.theme-dark) .simple-lists-filter-clear { color:#b9cdc3; } /* dark:gen */
.simple-lists-filter-clear:hover { background:#e2eee7; }
:where(html.theme-dark) .simple-lists-filter-clear:hover { background:color-mix(in srgb, var(--text) 6%, var(--panel)); } /* dark:gen */
.simple-list-categories { display:grid; gap:18px; }
.simple-list-category { min-width:0; display:grid; gap:10px; }
.simple-list-folder-children { min-width:0; display:grid; gap:12px; margin-left:12px; padding-left:12px; border-left:2px solid var(--line); }
.simple-list-category-head { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; min-height:42px; border-bottom:1px solid #dedbd3; }
:where(html.theme-dark) .simple-list-category-head { border-bottom:1px solid var(--line); } /* dark:gen */
/* flex-basis + min-width halten den Titel lesbar; reicht der Platz neben den
   Aktions-Buttons nicht, wandern die Buttons (dank flex-wrap am Head) in eine
   eigene Zeile, statt den Titel senkrecht zu zerbrechen. */
.simple-list-category-toggle { flex:1 1 11rem; min-width:min(11rem, 100%); display:flex; align-items:center; gap:9px; padding:8px 4px; border:0; color:#315246; background:transparent; text-align:left; }
:where(html.theme-dark) .simple-list-category-toggle { color:#c2dbd2; } /* dark:gen */
.simple-list-category-toggle strong { min-width:0; overflow:hidden; overflow-wrap:anywhere; }
.simple-list-category-head-actions { flex:0 1 auto; }
.simple-list-category-chevron { flex:none; font-size:.78rem; transition:transform .15s; }
.simple-list-category-toggle[aria-expanded="false"] .simple-list-category-chevron { transform:rotate(-90deg); }
.simple-list-category-count { min-width:24px; padding:2px 7px; border-radius:999px; color:#527363; background:#e2eee7; font-size:.8rem; font-weight:750; text-align:center; }
:where(html.theme-dark) .simple-list-category-count { color:#b9cdc3; background:color-mix(in srgb, var(--text) 6%, var(--panel)); } /* dark:gen */
.simple-list-category-action { min-height:36px; display:inline-flex; align-items:center; gap:6px; padding:0 10px; border:1px solid #c8d7ce; border-radius:10px; color:#315246; background:#fff; font-weight:700; }
:where(html.theme-dark) .simple-list-category-action { border:1px solid var(--line); color:#c2dbd2; background:var(--panel); } /* dark:gen */
/* Icon mode: folder actions show only the icon (text mode keeps icon + label; phones already show only the icon). Title and aria-label keep the name. */
body:not(.button-style-text) .simple-list-category-action { width:36px; padding:0; justify-content:center; }
body:not(.button-style-text) .simple-list-category-action > span:not(.fa-icon) { display:none; }
.simple-list-category--indent .simple-list-category-toggle { padding-left:22px; }
.simple-bible-filter { position:sticky; top:var(--simple-head-h); max-height:calc(var(--vph) - 104px); overflow:auto; scrollbar-gutter:stable; padding:14px; border:1px solid #d7d6cf; border-radius:18px; background:#fffdf8; box-shadow:0 8px 26px rgba(42,51,47,.07); }
:where(html.theme-dark) .simple-bible-filter { border:1px solid var(--line); background:var(--panel); } /* dark:gen */
.simple-bible-filter-heading { position:sticky; top:-14px; z-index:2; display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:-14px -14px 10px; padding:14px; border-bottom:1px solid #e2ded5; background:#fffdf8; }
:where(html.theme-dark) .simple-bible-filter-heading { border-bottom:1px solid var(--line); background:var(--panel); } /* dark:gen */
.simple-bible-filter-heading strong { flex:1; color:#315246; }
:where(html.theme-dark) .simple-bible-filter-heading strong { color:#c2dbd2; } /* dark:gen */
.simple-bible-filter-heading .secondary { min-height:34px; padding:0 8px; font-size:.78rem; }
.simple-bible-filter-areas-title { display:block; margin:0 2px 8px; color:#315246; font-size:.88rem; }
:where(html.theme-dark) .simple-bible-filter-areas-title { color:#c2dbd2; } /* dark:gen */
.simple-bible-filter-used-only { display:flex; align-items:center; gap:8px; margin:0 2px 10px; color:#527363; font-size:.86rem; font-weight:700; }
:where(html.theme-dark) .simple-bible-filter-used-only { color:#b9cdc3; } /* dark:gen */
.simple-bible-filter-used-only input { width:16px; height:16px; margin:0; accent-color:#3e6b59; }
.simple-bible-filter-sort { display:grid; gap:4px; margin:0 2px 10px; color:#527363; font-size:.86rem; font-weight:700; }
:where(html.theme-dark) .simple-bible-filter-sort { color:#b9cdc3; } /* dark:gen */
.simple-bible-filter-sort select { width:100%; min-width:0; min-height:36px; font:inherit; }
.simple-bible-filter-status { margin:0 2px 10px; color:#527363; font-size:.8rem; line-height:1.35; }
:where(html.theme-dark) .simple-bible-filter-status { color:#b9cdc3; } /* dark:gen */
.simple-bible-filter-used-empty { margin:10px 4px; }
.simple-bible-filter-sources { display:grid; gap:8px; margin:14px 2px 0; padding:12px 0 0; border-top:1px solid #e2ded5; color:#315246; }
:where(html.theme-dark) .simple-bible-filter-sources { border-top:1px solid var(--line); color:#c2dbd2; } /* dark:gen */
.simple-bible-filter-sources strong { font-size:.88rem; }
.simple-bible-filter-source { display:flex; align-items:center; gap:8px; color:#527363; font-size:.86rem; font-weight:700; }
:where(html.theme-dark) .simple-bible-filter-source { color:#b9cdc3; } /* dark:gen */
.simple-bible-filter-source input { width:16px; height:16px; margin:0; accent-color:#3e6b59; }
.simple-bible-filter-source-count { margin-left:auto; flex:0 0 auto; }
.simple-bible-tree-levels { display:flex; gap:6px; margin:0 2px 10px; }
.simple-bible-tree-levels[hidden] { display:none; }
.simple-bible-tree-level { width:28px; height:28px; padding:0; border:1px solid #c8d7ce; border-radius:50%; color:#527363; background:transparent; font-size:.78rem; font-weight:700; }
:where(html.theme-dark) .simple-bible-tree-level { border:1px solid var(--line); color:#b9cdc3; } /* dark:gen */
.simple-bible-tree-level:hover { background:#eef4f0; }
:where(html.theme-dark) .simple-bible-tree-level:hover { background:color-mix(in srgb, var(--text) 3%, var(--panel)); } /* dark:gen */
.simple-bible-tree-level-all { border-color:#66716c; color:#fff; background:#66716c; }
.simple-bible-tree-level-mixed { border-color:#66716c; color:#315246; background:color-mix(in srgb, #66716c 24%, transparent); }
:where(html.theme-dark) .simple-bible-tree-level-mixed { color:#c2dbd2; } /* dark:gen */
.simple-bible-tree { display:grid; gap:1px; }
.simple-bible-tree-row { min-width:0; display:flex; align-items:center; }
.simple-bible-tree-row.level-1 { padding-left:12px; }
.simple-bible-tree-row.level-2 { padding-left:24px; }
.simple-bible-tree-row.level-3 { padding-left:38px; }
.simple-bible-tree-expander,.simple-bible-tree-spacer { width:24px; height:32px; flex:none; padding:0; border:0; color:#66716c; background:transparent; font-size:.68rem; }
:where(html.theme-dark) .simple-bible-tree-expander, :where(html.theme-dark) .simple-bible-tree-spacer { color:var(--muted); } /* dark:gen */
.simple-bible-tree-choice { position:relative; isolation:isolate; overflow:hidden; min-width:0; flex:1; display:grid; grid-template-columns:18px minmax(0,1fr) auto; align-items:center; gap:7px; min-height:34px; padding:3px 5px; border:0; border-radius:8px; color:#27312d; background:transparent; text-align:left; }
:where(html.theme-dark) .simple-bible-tree-choice { color:var(--text); } /* dark:gen */
.simple-bible-tree-choice:hover { background:#eef4f0; }
:where(html.theme-dark) .simple-bible-tree-choice:hover { background:color-mix(in srgb, var(--text) 3%, var(--panel)); } /* dark:gen */
.simple-bible-tree-bar { position:absolute; z-index:-1; inset:2px auto 2px 0; width:var(--simple-bible-tree-share,0%); border-radius:6px; background:color-mix(in srgb,var(--simple-bible-tree-color,#6b7280) 24%,transparent); transition:width .18s ease; }
.simple-bible-tree-check { width:14px; height:14px; border:1.5px solid #789184; border-radius:4px; background:#fff; }
:where(html.theme-dark) .simple-bible-tree-check { background:var(--panel); } /* dark:gen */
.simple-bible-tree-choice.selection-all .simple-bible-tree-check { border-color:#3e6b59; background:#3e6b59; }
.simple-bible-tree-choice.selection-partial .simple-bible-tree-check { border-color:#3e6b59; background:linear-gradient(90deg,#3e6b59 50%,#fff 50%); }
:where(html.theme-dark) .simple-bible-tree-choice.selection-partial .simple-bible-tree-check { background:linear-gradient(90deg,#3e6b59 50%,var(--panel) 50%); } /* dark:gen */
.simple-bible-tree-label { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.simple-bible-tree-count { min-width:24px; padding:1px 6px; border-radius:999px; color:#66716c; background:#f0eee8; font-size:.75rem; text-align:center; }
:where(html.theme-dark) .simple-bible-tree-count { color:var(--muted); background:color-mix(in srgb, var(--text) 4%, var(--panel)); } /* dark:gen */
.simple-bible-filter-mobile-close,.simple-bible-filter-mobile-title { display:none; }
/* The title row (filter-list icon + "Ergebnisse filtern") is the collapse toggle. */
.simple-bible-filter-toggle { position:relative; flex:1; display:flex; align-items:center; gap:8px; min-height:34px; padding:0 6px; border:0; border-radius:8px; color:#315246; background:transparent; font-weight:700; text-align:left; }
:where(html.theme-dark) .simple-bible-filter-toggle { color:#c2dbd2; } /* dark:gen */
.simple-bible-filter-toggle:hover { background:#eef4f0; }
:where(html.theme-dark) .simple-bible-filter-toggle:hover { background:color-mix(in srgb, var(--text) 3%, var(--panel)); } /* dark:gen */
.simple-bible-filter-count { min-width:18px; padding:0 5px; border-radius:999px; color:var(--on-accent, #fff); background:var(--accent); font-size:.7rem; font-weight:700; line-height:18px; text-align:center; }
.simple-bible-filter-toggle > .simple-bible-filter-count { display:none; }
.simple-bible-filter-title-block { display:flex; flex-direction:column; min-width:0; line-height:1.2; }
.simple-bible-filter-result { color:var(--muted); font-size:.78rem; font-weight:600; }
.simple-bible-filter.collapsed { width:44px; padding:10px 6px; overflow:visible; }
/* Eingeklappt bleibt von der Titelzeile nur das Symbol (mit Zähler aktiver Filter). */
.simple-bible-filter.collapsed .simple-bible-filter-heading { position:static; margin:0; padding:0; border:0; background:transparent; }
.simple-bible-filter.collapsed .simple-bible-filter-heading > .secondary,
.simple-bible-filter.collapsed .simple-bible-filter-title-block { display:none; }
.simple-bible-filter.collapsed .simple-bible-filter-toggle { flex:0 0 auto; justify-content:center; width:32px; height:32px; min-height:32px; margin:0 auto; padding:0; border:1px solid #d7d6cf; background:#fff; }
:where(html.theme-dark) .simple-bible-filter.collapsed .simple-bible-filter-toggle { border:1px solid var(--line); background:var(--panel); } /* dark:gen */
.simple-bible-filter.collapsed .simple-bible-filter-toggle > .simple-bible-filter-count { display:block; position:absolute; top:-8px; right:-10px; }
.simple-bible-filter.collapsed .simple-bible-filter-areas-title,
.simple-bible-filter.collapsed .simple-bible-filter-used-only,
.simple-bible-filter.collapsed .simple-bible-filter-sort,
.simple-bible-filter.collapsed .simple-bible-filter-status,
.simple-bible-filter.collapsed .simple-bible-tree-levels,
.simple-bible-filter.collapsed .simple-bible-tree,
.simple-bible-filter.collapsed .simple-bible-filter-sources { display:none; }
.simple-lists-layout:has(.simple-bible-filter.collapsed) { grid-template-columns:auto minmax(0,1fr); }
.simple-bible-filter-detail { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; margin-bottom:8px; padding:10px 12px; border:1px solid #c8d7ce; border-radius:13px; color:#315246; background:#eef4f0; }
:where(html.theme-dark) .simple-bible-filter-detail { border:1px solid var(--line); color:#c2dbd2; background:color-mix(in srgb, var(--text) 3%, var(--panel)); } /* dark:gen */
.simple-bible-filter-detail button { min-height:38px; white-space:nowrap; }
.simple-bible-filter-detail button.simple-bible-filter-detail-info { min-height:0; width:auto; padding:0 4px; border:0; background:none; color:inherit; vertical-align:middle; cursor:pointer; }
.simple-bible-filter-detail-hint { order:1; flex-basis:100%; margin:0; font-size:.88rem; line-height:1.4; }
/* Result line and Bible band (Etappe 4): count, compact band and filter chip in one row above the list.
   On phones the band moves into the chip's panel (see the max-width:720px block). */
.simple-result-line { display:flex; flex-wrap:wrap; align-items:center; gap:6px 14px; min-height:44px; padding:6px 12px; border:1px solid #c8d7ce; border-radius:13px; color:#315246; background:#eef4f0; }
:where(html.theme-dark) .simple-result-line { border:1px solid var(--line); color:#c2dbd2; background:color-mix(in srgb, var(--text) 3%, var(--panel)); } /* dark:gen */
.simple-result-count { flex:0 0 auto; font-weight:700; }
.simple-result-line button.simple-bible-filter-detail-info { min-height:0; width:auto; padding:0 4px; border:0; background:none; color:inherit; vertical-align:middle; cursor:pointer; }
.simple-result-band { flex:1 1 160px; min-width:120px; max-width:460px; }
.simple-result-chip { display:inline-flex; align-items:center; height:36px; max-width:100%; margin-left:auto; border:1px solid #c8d7ce; border-radius:999px; color:#315246; background:#fff; }
:where(html.theme-dark) .simple-result-chip { border:1px solid var(--line); color:#c2dbd2; background:var(--panel); } /* dark:gen */
.simple-result-chip.is-active { border-color:var(--accent); color:var(--accent); background:var(--accent-soft); }
.simple-result-chip button { margin:-4px 0; min-height:44px; padding:0 12px; border:0; border-radius:999px; color:inherit; background:transparent; }
.simple-result-chip button:focus-visible { outline:2px solid var(--accent); outline-offset:-2px; }
.simple-result-chip-main { min-width:0; display:inline-flex; align-items:center; gap:8px; font:600 .9rem/1.2 system-ui,sans-serif; }
.simple-result-chip-main:has(+ .simple-result-chip-clear) { padding-right:2px; }
.simple-result-chip-label { min-width:0; max-width:14em; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.simple-result-chip-main .fa-icon { font-size:.7rem; transition:transform .15s; }
.simple-result-chip-main[aria-expanded="true"] .fa-icon { transform:rotate(180deg); }
.simple-result-chip .simple-result-chip-clear { flex:0 0 auto; min-width:44px; padding:0; font-size:.85rem; }
.simple-result-panel { order:2; flex:1 1 100%; display:flex; flex-wrap:wrap; align-items:center; gap:8px 14px; padding-top:8px; border-top:1px solid #d3e0d8; }
:where(html.theme-dark) .simple-result-panel { border-top:1px solid var(--line); } /* dark:gen */
.simple-result-panel[hidden] { display:none; }
.simple-result-panel .simple-bible-band-wrap { display:none; flex:1 1 100%; }
/* Presets: Alle/AT/NT as one select, the used Bible areas in one sideways-scrolling row. */
.simple-result-presets { display:flex; flex:1 1 auto; align-items:center; gap:6px; min-width:0; }
/* width:0 keeps the chips out of the intrinsic width of the line, else the auto-sized grid column widens the page. */
.simple-result-preset-strip { position:relative; display:flex; flex:1 1 0; gap:6px; width:0; min-width:0; padding-right:20px; overflow-x:auto; overflow-y:hidden; scrollbar-width:none; mask-image:linear-gradient(90deg, #000 calc(100% - 20px), transparent); }
.simple-result-preset-strip::-webkit-scrollbar { display:none; }
.simple-result-line .simple-result-preset { flex:0 0 auto; min-height:36px; padding:0 12px; border:1px solid #c8d7ce; border-radius:999px; color:#315246; background:#fff; font-weight:600; white-space:nowrap; }
:where(html.theme-dark) .simple-result-line .simple-result-preset { border:1px solid var(--line); color:#c2dbd2; background:var(--panel); } /* dark:gen */
.simple-result-line .simple-result-preset[aria-pressed="true"] { border-color:var(--accent); color:var(--accent); background:var(--accent-soft); }
.simple-result-line .simple-result-scope { position:relative; flex:0 0 auto; display:inline-flex; align-items:center; gap:6px; min-height:36px; padding:0 12px; border:1px solid #c8d7ce; border-radius:999px; color:#315246; background:#fff; font-weight:600; white-space:nowrap; }
:where(html.theme-dark) .simple-result-line .simple-result-scope { border:1px solid var(--line); color:#c2dbd2; background:var(--panel); } /* dark:gen */
.simple-result-scope .fa-icon { font-size:.7rem; }
.simple-result-scope select { position:absolute; inset:0; width:100%; height:100%; min-height:0; margin:0; padding:0; border:0; opacity:0; cursor:pointer; }
.simple-result-scope:has(select:focus-visible) { outline:2px solid var(--accent); outline-offset:1px; }
.simple-result-line .simple-result-scope.is-active { border-color:var(--accent); color:var(--accent); background:var(--accent-soft); }
.simple-result-line .simple-result-tree-link { min-height:44px; margin-left:auto; padding:0 4px; border:0; color:var(--accent); background:transparent; text-decoration:underline; font-weight:600; }
@media (pointer:coarse) { .simple-result-line .simple-result-preset, .simple-result-line .simple-result-scope { min-height:44px; } }
.simple-bible-band-wrap { position:relative; }
.simple-bible-band { display:flex; align-items:stretch; gap:1px; height:30px; touch-action:pan-y; user-select:none; -webkit-user-select:none; }
.simple-bible-band-wrap.is-panel .simple-bible-band { height:40px; }
.simple-bible-band-bar { flex:1 1 0; min-width:2px; min-height:0; margin:0; padding:0; border:0; border-radius:2px; display:flex; align-items:flex-end; color:inherit; background:transparent; -webkit-tap-highlight-color:transparent; }
.simple-bible-band-bar.is-testament-start { margin-left:4px; }
.simple-bible-band-bar > i { display:block; width:100%; height:var(--band-h,0%); min-height:3px; border-radius:2px 2px 0 0; background:color-mix(in srgb, var(--band-c,#6f8f80) 55%, #fff); }
:where(html.theme-dark) .simple-bible-band-bar > i { background:color-mix(in srgb, var(--band-c,#6f8f80) 55%, var(--panel)); } /* dark:gen */
.simple-bible-band-bar.is-empty > i { height:3px; background:color-mix(in srgb, var(--band-c,#6f8f80) 25%, #fff); }
:where(html.theme-dark) .simple-bible-band-bar.is-empty > i { background:color-mix(in srgb, var(--band-c,#6f8f80) 25%, var(--panel)); } /* dark:gen */
.simple-bible-band-bar:hover > i { background:color-mix(in srgb, var(--band-c,#6f8f80) 80%, #fff); }
:where(html.theme-dark) .simple-bible-band-bar:hover > i { background:color-mix(in srgb, var(--band-c,#6f8f80) 80%, var(--panel)); } /* dark:gen */
.simple-bible-band-bar.is-selected > i,
.simple-bible-band-bar.is-selected:hover > i { background:var(--accent); }
.simple-bible-band-bar.is-dim > i { opacity:.4; }
.simple-bible-band-bar:focus-visible { outline:2px solid var(--accent); outline-offset:1px; }
.simple-bible-band.is-readonly .simple-bible-band-bar { cursor:default; }
.simple-bible-band-tip { position:absolute; bottom:calc(100% + 6px); z-index:5; padding:4px 8px; border-radius:8px; color:#fff; background:#27312d; font:600 .78rem/1.2 system-ui,sans-serif; white-space:nowrap; transform:translateX(-50%); pointer-events:none; }
.simple-bible-band-tip[hidden] { display:none; }
/* Zoomed band: the books of one area or testament, wider (taller on phones), names under the bars. */
.simple-bible-band-wrap.is-zoomed .simple-bible-band { gap:3px; }
.simple-bible-band-wrap.is-panel.is-zoomed .simple-bible-band { height:56px; }
.simple-bible-band-names { display:flex; gap:3px; margin-top:3px; color:var(--muted); font:600 .6rem/1.2 system-ui,sans-serif; letter-spacing:-.02em; }
.simple-bible-band-names span { flex:1 1 0; min-width:0; overflow:hidden; text-align:center; white-space:nowrap; }
.simple-bible-band-axis { display:flex; margin-top:2px; color:var(--muted); font-size:.7rem; }
.simple-bible-band-axis span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
/* A running list query shows its count in the result line; the status bar keeps mode and stepper. */
.simple-lists-column:has(.simple-result-line) .simple-list-search-bar .simple-filter-count { display:none; }
.simple-lists-column:has(.simple-result-line) .simple-list-search-bar:not([hidden]) { grid-template-columns:44px auto; justify-content:start; }
.simple-bible-read-picker { display:grid; gap:14px; }
.simple-bible-read-direct { width:100%; }
.simple-bible-read-direct label { display:grid; gap:7px; color:#315246; font-weight:750; }
:where(html.theme-dark) .simple-bible-read-direct label { color:#c2dbd2; } /* dark:gen */
.simple-bible-read-direct label > div { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; }
.simple-bible-read-direct input { min-width:0; }
.simple-bible-read-direct button { display:inline-flex; align-items:center; gap:7px; white-space:nowrap; }
.simple-bible-read-picker .simple-lists-column > h3 { margin:18px 0 0; color:#315246; font-size:1rem; }
:where(html.theme-dark) .simple-bible-read-picker .simple-lists-column > h3 { color:#c2dbd2; } /* dark:gen */
.simple-smart-list-pager { display:flex; align-items:center; justify-content:center; gap:12px; margin-top:16px; }
.simple-list-actions { padding-top:6px; border-top:1px solid #dedbd3; }
:where(html.theme-dark) .simple-list-actions { border-top:1px solid var(--line); } /* dark:gen */
.simple-list-pager { display:flex; flex-direction:column; align-items:center; gap:8px; margin-top:18px; width:100%; min-width:0; container-type:inline-size; }
.simple-list-pager-numbers { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:4px; }
.simple-list-pager-btn,.simple-list-pager-num { min-height:40px; min-width:40px; padding:0 4px; border:1px solid #dedbd3; border-radius:10px; color:#315246; background:#fff; font-weight:700; }
:where(html.theme-dark) .simple-list-pager-btn, :where(html.theme-dark) .simple-list-pager-num { border:1px solid var(--line); color:#c2dbd2; background:var(--panel); } /* dark:gen */
.simple-list-pager-btn:hover:not(:disabled),.simple-list-pager-num:hover:not(:disabled) { border-color:#5f806f; background:#fbfdfb; }
:where(html.theme-dark) .simple-list-pager-btn:hover:not(:disabled), :where(html.theme-dark) .simple-list-pager-num:hover:not(:disabled) { background:var(--panel); } /* dark:gen */
.simple-list-pager-btn:disabled { opacity:.4; }
.simple-list-pager-num.active { border-color:#315246; background:#315246; color:#fff; }
.simple-list-pager-ellipsis { min-width:16px; color:#66716c; text-align:center; }
:where(html.theme-dark) .simple-list-pager-ellipsis { color:var(--muted); } /* dark:gen */
.simple-list-pager .pager-compact,.simple-list-pager .pager-wide { display:none; }
.simple-list-pager-controls { display:flex; flex-wrap:wrap; justify-content:center; align-items:center; gap:8px 16px; max-width:100%; }
.simple-list-pager-controls label { display:flex; align-items:center; gap:6px; font-size:.9rem; color:#315246; }
:where(html.theme-dark) .simple-list-pager-controls label { color:#c2dbd2; } /* dark:gen */
.simple-list-pager .simple-list-pager-controls input { width:5rem; min-width:0; max-width:100%; min-height:40px; padding:6px 8px; }
.simple-list-pager .simple-list-pager-controls select { width:auto; min-height:40px; padding:6px 8px; }
.simple-list-pager-controls button { min-width:44px; min-height:40px; }
.shared-table-pagination .dt-paging,.shared-table-pagination .dataTables_paginate { display:none; }
@container (min-width: 360px) {
  .simple-list-pager .pager-narrow { display:none; }
  .simple-list-pager .pager-compact { display:flex; }
}
@container (min-width: 650px) {
  .simple-list-pager .pager-compact { display:none; }
  .simple-list-pager .pager-wide { display:flex; }
}
.simple-chapter-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(54px,1fr)); gap:10px; }
.simple-chapter-grid button { aspect-ratio:1; min-height:52px; padding:0 4px; white-space:nowrap; border:1px solid #d8d8d1; border-radius:14px; color:#315246; background:#fff; font-weight:750; }
:where(html.theme-dark) .simple-chapter-grid button { border:1px solid var(--line); color:#c2dbd2; background:var(--panel); } /* dark:gen */
.simple-verse-list { display:grid; gap:14px; }
.bible-verse-scrubber { position:fixed; z-index:6; right:var(--safe-right); bottom:calc(100px + var(--safe-bottom)); width:28px; height:min(320px, calc(var(--vph) - var(--simple-head-h) - 140px)); touch-action:none; user-select:none; cursor:pointer; outline:none; }
.bible-verse-scrubber::before { content:""; position:absolute; top:0; bottom:0; right:7px; width:3px; border-radius:3px; background:color-mix(in srgb, var(--hero-decor, #527363) 25%, transparent); }
.bible-verse-scrubber::after { content:""; position:absolute; top:var(--verse-position); right:5px; width:7px; height:18px; transform:translateY(-50%); border-radius:5px; background:var(--hero-decor, #527363); }
.bible-verse-scrubber-preview { position:absolute; top:clamp(65px, var(--verse-position), calc(100% - 65px)); right:30px; transform:translateY(-50%); min-width:76px; padding:8px 12px; border:1px solid #d7d6cf; border-radius:14px; background:var(--hero-paper, #fffdf8); color:#66716c; box-shadow:0 4px 18px rgba(31,45,39,.15); display:none; text-align:center; white-space:nowrap; pointer-events:none; }
:where(html.theme-dark) .bible-verse-scrubber-preview { border:1px solid var(--line); background:var(--hero-paper, var(--panel)); color:var(--muted); } /* dark:gen */
.bible-verse-scrubber-preview span { display:block; line-height:24px; font-size:14px; }
.bible-verse-scrubber-preview .is-current { color:#315246; font-weight:700; }
:where(html.theme-dark) .bible-verse-scrubber-preview .is-current { color:#c2dbd2; } /* dark:gen */
.bible-verse-scrubber--left { left:var(--safe-left); right:auto; }
.bible-verse-scrubber--left::before { left:7px; right:auto; }
.bible-verse-scrubber--left::after { left:5px; right:auto; }
.bible-verse-scrubber--left .bible-verse-scrubber-preview { left:30px; right:auto; }
.bible-verse-scrubber.is-active .bible-verse-scrubber-preview,
.bible-verse-scrubber:focus-visible .bible-verse-scrubber-preview { display:block; }
.bible-verse-scrubber:focus-visible { outline:2px solid var(--hero-decor, #527363); outline-offset:-2px; border-radius:8px; }
body.keyboard-active .bible-verse-scrubber,
.simple-page-content:has(.simple-verse-list.is-filtered) .bible-verse-scrubber { display:none; }
/* Trennt mehrere Blöcke auf einer geführten Seite (z.B. Sammlungen und
   Bibelstellen auf der Tag-Seite). Am ersten Block kein Abstand nach oben. */
.simple-section-heading { margin:22px 0 12px; color:#27312d; font-size:1rem; font-weight:750; }
:where(html.theme-dark) .simple-section-heading { color:var(--text); } /* dark:gen */
.simple-section-heading:first-child { margin-top:0; }
.simple-text-plan-nav { display:flex; align-items:center; gap:12px; margin:0 0 14px; padding:10px 14px; border:1px solid #dedbd3; border-radius:14px; background:#fffdf8; }
:where(html.theme-dark) .simple-text-plan-nav { border:1px solid var(--line); background:var(--panel); } /* dark:gen */
.simple-text-plan-nav-label { display:flex; flex-direction:column; flex:1 1 auto; min-width:0; }
.simple-text-plan-nav-label strong { color:#27312d; }
:where(html.theme-dark) .simple-text-plan-nav-label strong { color:var(--text); } /* dark:gen */
.simple-text-plan-nav-label small { color:var(--muted); }
.simple-text-plan-nav button { flex:0 0 44px; min-height:44px; padding:0; }
.simple-notes-facet-bar { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 14px; }
/* Lesemodus: ein Absatz statt eines Kartenstapels. display:block statt grid,
   damit die Verse als Inline-Elemente umbrechen; max-inline-size hält die
   Zeilenlänge im lesbaren Bereich, sonst laufen sie auf dem Desktop über die
   volle Breite. */
.simple-verse-list.simple-verse-flow {
  display: block;
  max-inline-size: 100%;
  margin-inline: auto;
  padding: 26px clamp(18px, 4vw, 34px);
  border: 1px solid #dedbd3;
  border-radius: 18px;
  background: #fffdf8;
  box-shadow: 0 8px 24px rgba(42, 51, 47, .06);
  font-size: 1.12rem;
  line-height: 1.75;
  text-align: justify;
  hyphens: auto;
}
:where(html.theme-dark) .simple-verse-list.simple-verse-flow { border:1px solid var(--line); background:var(--panel); } /* dark:gen */
.simple-flow-verse { display: inline; }
.simple-flow-verse-num {
  vertical-align: baseline;
  position: relative;
  top: -0.38em;
  margin-inline-end: .18em;
  color: var(--accent);
  font-size: .68em;
  font-weight: 700;
  line-height: 0;
  /* Nicht markierbar: beim Ziehen über den Text sollen die Nummern nicht
     mitkopiert werden. */
  user-select: none;
}
.simple-verse-flow .simple-flow-verse.ws-bible-verse-highlight,
.simple-verse-flow .simple-flow-verse mark { border-radius: 4px; padding: 0 2px; }
.simple-verse-flow .simple-flow-verse.ws-bible-verse-highlight { background: var(--accent-soft); }
@media (max-width: 760px) {
  .simple-verse-list.simple-verse-flow { padding: 20px 16px; font-size: 1.08rem; text-align: left; }
}
/* "Volle Breite" on phones: trim the nested side padding around the Bible reader text. */
@media (max-width: 760px) {
  body[data-layout-width="full"] .shell:has(.simple-verse-flow) {
    padding-right: max(4px, var(--safe-right));
    padding-left: max(4px, var(--safe-left));
  }
  body[data-layout-width="full"] .simple-page-content:has(.simple-verse-flow) { padding-inline: 8px; }
  body[data-layout-width="full"] .simple-verse-list.simple-verse-flow { padding-inline: 10px; }
}
/* Abschnittsüberschriften der Übersetzung im Bibelleser: zwischen den
   Verskarten bzw. als Absatzbeginn im Fließtext. Nicht markierbar, damit sie
   beim Kopieren über mehrere Verse nicht im Bibeltext landen. */
.bible-section-heading { margin: 10px 2px -4px; text-align: left; user-select: none; }
.bible-section-heading:first-child { margin-top: 0; }
.bible-section-heading p { margin: 0; }
.bible-section-heading-major { font-size: 1.05rem; font-weight: 800; color: var(--text); }
.bible-section-heading .bible-section-heading-range { font-size: .82rem; color: var(--muted); margin-bottom: 6px; }
.bible-section-heading-title { margin: 0; font-size: 1rem; font-weight: 700; line-height: 1.35; color: var(--accent); }
.simple-verse-flow .bible-section-heading { margin: 1.1em 0 .35em; }
.simple-verse-flow .bible-section-heading:first-child { margin-top: 0; }
.simple-verse-list.is-filtered .bible-section-heading { display: none; }
/* ── Textmarker ────────────────────────────────────────────────────────────
   Vier feste Farben ohne Bedeutung. Bewusst als blasse Lasur (~25 %): der
   Suchtreffer (<mark>) und die Sprungziel-Hervorhebung liegen an denselben
   Versen und müssen darauf erkennbar bleiben. Der Rand links gibt der Farbe
   genug Fläche, damit sie auch bei kurzen Versen ablesbar ist. */
:root {
  --verse-highlight-yellow: #f2c200;
  --verse-highlight-green: #4caf50;
  --verse-highlight-blue: #2196f3;
  --verse-highlight-pink: #e0559b;
}
[data-verse-highlight] { --verse-highlight: var(--verse-highlight-yellow); }
[data-verse-highlight="green"] { --verse-highlight: var(--verse-highlight-green); }
[data-verse-highlight="blue"] { --verse-highlight: var(--verse-highlight-blue); }
[data-verse-highlight="pink"] { --verse-highlight: var(--verse-highlight-pink); }
.simple-verse-card[data-verse-highlight] {
  --simple-verse-card-bg: color-mix(in srgb, var(--verse-highlight) 25%, #fffdf8);
  border-left: 4px solid color-mix(in srgb, var(--verse-highlight) 65%, transparent);
  background: var(--simple-verse-card-bg);
}
html.theme-dark .simple-verse-card[data-verse-highlight] {
  --simple-verse-card-bg: color-mix(in srgb, var(--verse-highlight) 25%, var(--panel));
}
.simple-flow-verse[data-verse-highlight] {
  border-radius: 4px;
  padding: 0 2px;
  background: color-mix(in srgb, var(--verse-highlight) 25%, transparent);
}
/* Ausschnitt im Vers: dieselbe Farbe wie beim ganzen Vers, damit beides als
   dasselbe Werkzeug lesbar bleibt - aber kraeftiger und mit Unterstrich. Mit
   derselben 25%-Lasur wie der Ganzvers verschwand ein markiertes Wort spurlos,
   sobald derselbe Vers zusaetzlich ganz angestrichen war: zwei gleiche Lasuren
   uebereinander sehen aus wie eine. Der Unterstrich traegt den Unterschied
   auch dann, wenn die Farben identisch sind. <mark> bringt eine eigene
   Browservorgabe mit, die hier ueberschrieben wird. */
/* Mit [data-verse-highlight] statt nur der Klasse: die Suchtreffer-Regel
   ".simple-verse-card:not(.simple-companion-card) mark" weiter oben ist
   spezifischer als eine einzelne Klasse und faerbte den Marker sonst gelb,
   egal welche Farbe gewaehlt war. */
mark.verse-highlight-range[data-verse-highlight] {
  border-radius: 3px;
  padding: 0 1px;
  color: inherit;
  background: color-mix(in srgb, var(--verse-highlight) 45%, transparent);
  box-shadow: inset 0 -2px 0 0 color-mix(in srgb, var(--verse-highlight) 85%, transparent);
}

/* Die Lesezeile eines Eintrags ist eine eigene Flaeche ohne Verskarte - die
   Ganzvers-Lasur braucht dort ihre eigene Regel. */
.entry-reading-verse-line[data-verse-highlight] {
  border-radius: 6px;
  padding: 2px 6px;
  background: color-mix(in srgb, var(--verse-highlight) 25%, transparent);
}

/* Farbtupfer im Kontextmenü, in der Vers-Auswahlleiste und in der
   Text-Markierungsleiste. Spezifisch genug, damit .context-menu button
   (background / padding) und allgemeine Button-Regeln überschrieben werden. */
/* Sagt vor dem Klick, worauf die Farbtupfer wirken: auf die Auswahl oder auf
   den ganzen Vers. Stand frueher nur im aria-label und war fuer Sehende damit
   gar nicht da. */
.context-menu .context-menu-highlight-scope {
  padding: 6px 12px 0;
  font-size: 12px;
  color: var(--muted);
}
.context-menu .context-menu-highlights { display:flex; gap:6px; padding:6px 12px; }
:is(.context-menu, .verse-highlight-bar, .bible-verse-selection-palette) .context-menu-highlight,
.context-menu-highlight {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  min-width: 26px;
  min-height: 26px;
  padding: 0;
  border: 1px solid #d7d6cf;
  border-radius: 50%;
  background: var(--verse-highlight);
  cursor: pointer;
}
:where(html.theme-dark) :is(.context-menu, :where(html.theme-dark) .verse-highlight-bar, :where(html.theme-dark) .bible-verse-selection-palette) .context-menu-highlight, :where(html.theme-dark) .context-menu-highlight { border:1px solid var(--line); } /* dark:gen */
.context-menu-highlight.color-yellow { --verse-highlight: var(--verse-highlight-yellow); }
.context-menu-highlight.color-green { --verse-highlight: var(--verse-highlight-green); }
.context-menu-highlight.color-blue { --verse-highlight: var(--verse-highlight-blue); }
.context-menu-highlight.color-pink { --verse-highlight: var(--verse-highlight-pink); }
:is(.context-menu, .verse-highlight-bar, .bible-verse-selection-palette) .context-menu-highlight.active,
.context-menu-highlight.active { outline: 2px solid #315246; outline-offset: 2px; }
:is(.context-menu, .verse-highlight-bar, .bible-verse-selection-palette) .context-menu-highlight:hover,
.context-menu-highlight:hover { filter: brightness(.94); }
:is(.context-menu, .verse-highlight-bar, .bible-verse-selection-palette) .context-menu-highlight:focus-visible,
.context-menu-highlight:focus-visible { outline: 2px solid #5f806f; outline-offset: 2px; }

.simple-verse-card { --simple-verse-card-bg:#fffdf8; display:grid; grid-template-columns:minmax(0,1fr) auto; gap:12px; padding:22px; border:1px solid #dedbd3; border-radius:18px; background:var(--simple-verse-card-bg); box-shadow:0 8px 24px rgba(42,51,47,.06); }
:where(html.theme-dark) .simple-verse-card { border:1px solid var(--line); } /* dark:gen */
html.theme-dark .simple-verse-card { --simple-verse-card-bg:var(--panel); }
.simple-verse-card > strong { min-width:0; align-self:center; color:var(--accent); }
.simple-verse-header > .simple-verse-reference { min-width:0; min-height:0; grid-column:1; grid-row:1; justify-self:start; padding:0; border:0; color:var(--accent); background:transparent; font:inherit; font-weight:700; line-height:1.3; text-align:left; text-decoration:underline; text-decoration-color:color-mix(in srgb,var(--accent) 35%,transparent); text-underline-offset:3px; }
.simple-verse-card > .simple-entry-title { grid-column:1; grid-row:1; align-self:end; color:var(--text); font-size:1rem; }
.simple-verse-card > .simple-search-section-heading { grid-column:1 / -1; color:var(--accent); font-weight:700; }
.simple-verse-card.has-entry-title > .simple-verse-header { grid-column:1 / -1; grid-row:2; }
.simple-verse-header > .simple-verse-reference:hover { text-decoration-color:currentColor; }
.simple-verse-translation {
  display:inline-block;
  margin-left:4px;
  padding:2px 6px;
  border-radius:999px;
  color:var(--accent);
  background:var(--accent-soft);
  font-size:.72rem;
  font-weight:750;
  line-height:1.2;
  text-decoration:none;
  vertical-align:.12em;
}
.ui-dialog-modal:has(.verse-dossier-tag-editor) { max-width:560px; }
.verse-dossier { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; text-align:left; }
.verse-dossier-summary { grid-column:1/-1; margin:0; color:#66716c; }
:where(html.theme-dark) .verse-dossier-summary { color:var(--muted); } /* dark:gen */
.verse-dossier-picker { grid-column:1/-1; display:grid; gap:6px; color:#315246; font-size:.88rem; font-weight:700; }
:where(html.theme-dark) .verse-dossier-picker { color:#c2dbd2; } /* dark:gen */
.verse-dossier-picker select { width:100%; min-height:42px; padding:8px 10px; }
.verse-dossier-section { min-width:0; padding:15px; border:1px solid var(--line); border-radius:14px; background:var(--panel-soft); }
.verse-dossier-section-header { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:9px; }
.verse-dossier-section h3 { margin:0; font-size:.92rem; }
.verse-dossier-section-action { display:inline-grid; place-items:center; width:30px; min-width:30px; height:30px; min-height:30px; padding:0; border-radius:9px; }
.verse-dossier-empty { margin:0; color:var(--muted); }
.verse-dossier-values { display:flex; flex-wrap:wrap; gap:7px; }
.verse-dossier-values > span,.verse-dossier-values > button { min-height:32px; padding:6px 10px; border:1px solid var(--line); border-radius:999px; color:var(--text); background:var(--panel); font-size:.84rem; text-align:left; }
/* Lange Fließtexte (z.B. Notizen) statt als Pille als vollwertiger, den Text
   eng umschließender Block darstellen - eine 999px-Pille wird bei mehrzeiligem
   Text zur Ellipse, die den Text nicht mehr umschließt. */
.verse-dossier-values-block { display:grid; gap:7px; }
.verse-dossier-values-block > span,.verse-dossier-values-block > button { display:block; width:100%; min-height:0; border-radius:10px; white-space:pre-wrap; }
.verse-dossier-learning-choices { display:grid; gap:9px; }
.verse-dossier-highlight-palette { margin-top:9px; }
.verse-dossier-section:has(.verse-dossier-highlight-palette) > .verse-dossier-empty { margin-top:9px; font-size:.84rem; }
.verse-dossier-values > [data-verse-highlight]::before { content:""; display:inline-block; width:12px; height:12px; margin-right:7px; border-radius:50%; background:var(--verse-highlight); border:1px solid color-mix(in srgb,var(--text) 25%,transparent); }
.verse-dossier-highlight-palette > [aria-pressed="true"] { outline:2px solid var(--accent); outline-offset:1px; }
.verse-dossier-learning-choice { display:grid; grid-template-columns:auto minmax(0,1fr); align-items:start; gap:10px; padding:12px; border:1px solid var(--line); border-radius:12px; background:var(--panel); cursor:pointer; }
.verse-dossier-learning-choice input { margin-top:3px; }
.verse-dossier-learning-choice strong,.verse-dossier-learning-choice small { display:block; }
.verse-dossier-learning-choice small { margin-top:3px; color:var(--muted); }
.verse-dossier-actions { grid-column:1/-1; display:flex; flex-wrap:wrap; gap:8px; padding-top:4px; }
.verse-dossier-actions button { display:inline-flex; align-items:center; gap:7px; }
.verse-study-info { display:grid; gap:12px; text-align:left; }
.verse-study-info-back { justify-self:start; display:inline-flex; align-items:center; gap:7px; }
.verse-study-info-status { margin:0; color:var(--muted); }
.simple-verse-card.verse-dossier-target { outline:3px solid color-mix(in srgb,var(--accent) 55%,transparent); outline-offset:3px; animation:verse-dossier-target-pulse 1.4s ease-out; }
@keyframes verse-dossier-target-pulse {
  from { outline-width:7px; outline-color:color-mix(in srgb,var(--accent) 75%,transparent); }
  to { outline-width:3px; outline-color:color-mix(in srgb,var(--accent) 55%,transparent); }
}
@media (prefers-reduced-motion:reduce) {
  .simple-verse-card.verse-dossier-target { animation:none; }
  .bible-location-picker-testament-toggle .caret { transition:none; }
}
@media (max-width:720px) {
  .verse-dossier { grid-template-columns:1fr; }
  .verse-dossier-summary,.verse-dossier-picker,.verse-dossier-actions { grid-column:1; }
  .verse-dossier-actions button { flex:1 1 190px; justify-content:center; }
}
.simple-verse-header { grid-column:1; grid-row:1; min-width:0; align-self:center; display:flex; align-items:center; gap:10px; overflow-x:auto; scrollbar-width:thin; padding-block:2px; background:var(--simple-verse-card-bg, #fffdf8); }
:where(html.theme-dark) .simple-verse-header { background:var(--simple-verse-card-bg, var(--panel)); } /* dark:gen */
.simple-page-content .simple-verse-card > .simple-verse-header { position:sticky; top:var(--simple-head-h, 0px); z-index:3; align-self:start; min-height:40px; }
.simple-page-content .simple-verse-card:not(.simple-verse-card-readonly):not(.has-entry-title) > .simple-verse-header { margin-right:-12px; padding-right:12px; }
.simple-verse-card-readonly > .simple-verse-header { grid-column:1 / -1; min-height:0; }
.simple-verse-header > :is(strong,.simple-verse-reference) { flex:0 0 auto; white-space:nowrap; color:var(--accent); }
.simple-verse-tags { display:flex; flex:0 0 auto; flex-wrap:nowrap; align-items:center; gap:6px; }
.simple-verse-card .simple-verse-tags .entry-tag-chip { min-height:24px; padding:2px 8px; line-height:1.4; }
.simple-verse-header :is(button,strong):focus-visible { outline-offset:-2px; }
.simple-verse-card > .parallel-verse-group { grid-column:1 / -1; grid-row:auto; min-width:0; }
.simple-verse-list > .simple-verse-card-readonly { padding:14px; gap:8px; }
.simple-verse-card-readonly > .parallel-verse-group { margin-block:0; }
.simple-verse-card-readonly > .parallel-verse-group > .parallel-verse-version { padding:10px 12px; }
.simple-verse-card > .simple-smart-list-parallel { grid-column:1 / -1; min-width:0; }
.simple-verse-card .parallel-verse-group button { grid-column:auto; grid-row:auto; }
.simple-verse-card p { grid-column:1 / -1; margin:0; color:#27312d; font:1.08rem/1.65 Georgia,serif; }
:where(html.theme-dark) .simple-verse-card p { color:var(--text); } /* dark:gen */
.simple-verse-card-readonly p { margin-bottom:0; }
.simple-companion-card > div { grid-column:1 / -1; color:#27312d; font:1.08rem/1.65 Georgia,serif; }
:where(html.theme-dark) .simple-companion-card > div { color:var(--text); } /* dark:gen */
.simple-companion-card > div p:first-child { margin-top:0; }
.simple-companion-card > div p:last-child { margin-bottom:0; }
.simple-companion-card > div.simple-empty-inline { color:#7a7568; font-style:italic; }
:where(html.theme-dark) .simple-companion-card > div.simple-empty-inline { color:#c3c0b9; } /* dark:gen */
/* Collapsible companion text: the toggle sits in the top-right grid cell. Untitled cards
   put the text beside it; collapsed titled cards show only the title, collapsed untitled
   cards a 3-line preview. */
.simple-companion-card:not(.has-entry-title) > div { grid-column:1; grid-row:1; }
/* On narrow cards (phones) the text beside the toggle would shrink to a few words per line. */
.simple-companion-card { container-type:inline-size; }
@container (max-width: 30rem) {
  .simple-companion-card:not(.has-entry-title) > div { grid-column:1 / -1; grid-row:2; }
}
.simple-companion-card > .simple-companion-toggle { align-self:start; }
.simple-companion-card.is-collapsed.has-entry-title > div { display:none; }
.simple-companion-card.is-collapsed:not(.has-entry-title) > div,
.simple-verse-list[data-companion-preview="lines"] .simple-companion-card.is-collapsed > div { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:3; line-clamp:3; overflow:hidden; }
.simple-note-card { grid-template-columns:minmax(0,1fr); }
.simple-note-card-heading { grid-column:1 / -1; display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }
.simple-note-card-labels { min-width:0; display:flex; align-items:baseline; flex-wrap:wrap; gap:4px 10px; }
.simple-note-card-labels strong { color:var(--accent); }
.simple-note-card-labels small { flex-basis:100%; color:var(--muted); }
.simple-note-card-badge { color:var(--muted); font-size:.78rem; letter-spacing:.02em; text-transform:uppercase; }
.simple-note-card-body { grid-column:1 / -1; color:#27312d; font:1.08rem/1.65 Georgia,serif; }
:where(html.theme-dark) .simple-note-card-body { color:var(--text); } /* dark:gen */
.simple-note-card-body > :first-child { margin-top:0; }
.simple-note-card-body > :last-child { margin-bottom:0; }
.simple-note-card-edit { flex:0 0 auto; }
.simple-collection-entry-editor { min-width:0; width:100%; }
.simple-collection-entry-editor .collection-entry { width:100%; box-sizing:border-box; }
.simple-verse-card button { grid-column:2; grid-row:1; min-height:40px; }
.simple-verse-card > button.secondary { background:var(--simple-verse-card-bg, #fffdf8); }
:where(html.theme-dark) .simple-verse-card > button.secondary { background:var(--simple-verse-card-bg, var(--panel)); } /* dark:gen */
.simple-page-content .simple-verse-card:not(.has-entry-title) > button { position:sticky; top:var(--simple-head-h, 0px); z-index:3; align-self:start; box-shadow:0 0 0 6px var(--simple-verse-card-bg, #fffdf8); }
.simple-verse-card button.simple-collected { background:#e9f3ec; border-color:#a8c8b2; color:#2f6a45; }
:where(html.theme-dark) .simple-verse-card button.simple-collected { background:color-mix(in srgb, var(--text) 4%, var(--panel)); border-color:#4b7659; color:#b7dfc6; } /* dark:gen */
.simple-verse-card button.simple-collected.simple-collected-partial { background:color-mix(in srgb, #e9f3ec 55%, var(--simple-verse-card-bg, #fffdf8)); border-style:dashed; }
:where(html.theme-dark) .simple-verse-card button.simple-collected.simple-collected-partial { background:color-mix(in srgb, color-mix(in srgb, var(--text) 4%, var(--panel)) 55%, var(--simple-verse-card-bg, var(--panel))); } /* dark:gen */
html.theme-dark .simple-verse-card button.simple-collected.simple-collected-partial { background:color-mix(in srgb, #4b7659 22%, var(--simple-verse-card-bg, var(--panel))); }
.simple-verse-card button.simple-collected .fa-icon { font-size:.85em; }
/* Studieninfo-Blöcke sind Grid-Kinder der Vers-Karte: ohne explizite Zeile
   landen Fußnoten und Querverweise nebeneinander in den zwei Spalten und
   quetschen sich (Text bricht wortweise um). Immer volle Breite geben und die
   großzügigen Karten-Button-Maße innerhalb der Blöcke zurücknehmen. */
.simple-verse-card .study-footnotes,
.simple-verse-card .study-references,
.simple-verse-card .study-strongs,
.simple-verse-card .study-topics,
.simple-verse-card .study-lexikon,
.simple-verse-card .study-tsk-crossrefs,
.simple-verse-card .study-source-block { grid-column:1 / -1; grid-row:auto; }
.simple-verse-card .study-footnotes button,
.simple-verse-card .study-references button,
.simple-verse-card .study-strongs button,
.simple-verse-card .study-lexikon button,
.simple-verse-card .study-tsk-crossrefs button,
.simple-verse-card .study-topics button,
.simple-verse-card .study-own-notes button { grid-column:auto; grid-row:auto; min-height:34px; }
/* In einfachen Verskarten ist der Marker nur der Ersatz für ausgeblendete
   eigene Studieninfos. Als ruhige Fußaktion liegt er unter dem Text statt vor
   der Stellenangabe oder über dem Sammeln-Knopf. */
.simple-verse-card > .verse-note-marker { grid-column:1 / -1; grid-row:auto; justify-self:end; align-self:center; min-height:0; margin-left:0; }
.simple-verse-card .study-footnote-row button { min-height:0; }
/* Inline-Marker im Verstext (Fußnoten-Pin, Strong-Unterstreichung) dürfen die
   Karten-Button-Mindesthöhe nicht erben - sie stehen mitten im Fließtext. */
.simple-verse-card .study-footnote,
.simple-verse-card .study-strong { min-height:0; }
.simple-filter { width:100%; min-height:48px; margin-bottom:16px; padding:0 15px; }
.simple-empty { padding:28px; border:1px dashed #cfcfc8; border-radius:16px; color:#66716c; text-align:center; }
:where(html.theme-dark) .simple-empty { border:1px dashed var(--line); color:var(--muted); } /* dark:gen */
/* Sticky direkt unter .simple-page-head (auch sticky, top:0) - hält beim
   Scrollen durch die Leseplan-Tageskarten "Als gelesen markieren" & Co.
   erreichbar, statt nur einmal oben im Content zu stehen. */
.simple-collection-actions { position:sticky; top:var(--simple-head-h); z-index:4; display:flex; flex-wrap:wrap; gap:10px; padding:10px 0; margin-bottom:6px; background:color-mix(in srgb, var(--hero-paper, #f7f4ec) 94%, transparent); backdrop-filter:blur(14px); }
:where(html.theme-dark) .simple-collection-actions { background:color-mix(in srgb, var(--hero-paper, color-mix(in srgb, var(--text) 3%, var(--panel))) 94%, transparent); } /* dark:gen */
.simple-collection-actions button { flex:1 1 auto; min-height:46px; }
.simple-primary-actions { flex-wrap:wrap; }
.simple-primary-actions .sanctuary-translation-pill { max-width:100%; white-space:normal; overflow-wrap:anywhere; }
.simple-primary-actions button { min-width:0; display:inline-flex; align-items:center; justify-content:center; gap:7px; }
.simple-primary-actions button span { overflow-wrap:normal; word-break:normal; }
/* Labeled page action strip (docs/kopfzeilen-umbau.md): text mode drops the icons; phones get one swipeable row. */
/* Icon mode: the chapter read-aloud button shows only the speaker icon; title and aria-label keep the name. */
body:not(.button-style-text) .simple-chapter-actions button.simple-chapter-listen > span:not(.fa-icon) { display:none; }
body:not(.button-style-text) .simple-chapter-actions button.simple-chapter-listen { min-width:44px; padding-inline:0; }
/* Icon-only buttons (no text sibling, e.g. the display configuration button) keep their icon. */
.button-style-text .simple-page-actions > button:has(> span:not(.fa-icon)) > .fa-icon { display:none; }
@media (max-width:760px) {
  .simple-page-actions { flex-wrap:nowrap; gap:8px; padding:8px 24px 8px 0; overflow-x:auto; scrollbar-width:none; mask-image:linear-gradient(90deg, #000 calc(100% - 24px), transparent); }
  .simple-collection-actions.simple-page-actions > * { flex:0 0 auto; }
  .simple-collection-actions.simple-page-actions > button { min-height:40px; padding:0 14px; border-radius:999px; white-space:nowrap; }
}
.simple-collection-entry-editor .collection-entry.open > .entry-row { display:grid; grid-template-columns:minmax(0, 1fr) auto; grid-template-areas:"actions close" "reference reference" "badges badges"; }
.simple-collection-entry-editor .collection-entry.open > .entry-row > .entry-grip { display:none; }
.simple-collection-entry-editor .collection-entry.open > .entry-row > .entry-head-actions { grid-area:actions; justify-self:start; flex-wrap:wrap; }
.simple-collection-entry-editor .collection-entry.open > .entry-row > .entry-ref { grid-area:reference; min-width:0; }
.simple-collection-entry-editor .collection-entry.open > .entry-row > .entry-badges { grid-area:badges; }
.simple-collection-entry-editor .collection-entry.open > .entry-row > .entry-reading-edit-hint { grid-area:close; align-self:start; width:44px; height:44px; font-size:1.1rem; opacity:1; }
.simple-action-label-short { display:none; }
.simple-reading-plan-progress { margin:0 0 12px; font-weight:700; color:#315246; }
:where(html.theme-dark) .simple-reading-plan-progress { color:#c2dbd2; } /* dark:gen */

.guided-reading-plan-builder {
  width: min(100%, 860px);
  margin: 0 auto;
}

.guided-reading-plan-intro {
  margin: 0 0 16px;
  color: var(--muted);
}

.guided-reading-plan-form {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, .65fr);
  gap: 14px;
}

.guided-reading-plan-step,
.guided-reading-plan-preview {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
}

.guided-reading-plan-step h3,
.guided-reading-plan-preview h3 {
  margin: 0 0 16px;
  font-size: 1.05rem;
}

.guided-reading-plan-field {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.guided-reading-plan-field > span,
.guided-reading-plan-section-label {
  font-weight: 700;
  font-size: .88rem;
}

.guided-reading-plan-sections {
  display: grid;
  gap: 8px;
  margin: 7px 0 10px;
}

.guided-reading-plan-section-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.guided-reading-plan-section-row select {
  flex: 1 1 auto;
  min-width: 0;
}

.guided-reading-plan-warning {
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 1px solid #e3b23c;
  border-radius: 10px;
  background: #fdf6e3;
  color: #7a5b00;
  font-size: .82rem;
}
:where(html.theme-dark) .guided-reading-plan-warning { border:1px solid #9e864c; background:#37301c; color:#ecdeb4; } /* dark:gen */

.guided-reading-plan-generate {
  grid-column: 1 / -1;
  justify-self: center;
}

.guided-reading-plan-status {
  min-height: 22px;
  margin: 12px 0;
  color: var(--muted);
  text-align: center;
}

.guided-reading-plan-status.error {
  color: var(--danger);
}

.guided-reading-plan-preview {
  scroll-margin-top: calc(var(--simple-head-h, 79px) + 12px);
}

.guided-reading-plan-preview-summary {
  color: var(--muted);
}

.guided-reading-plan-day-list {
  display: grid;
  gap: 7px;
  margin: 14px 0;
}

.guided-reading-plan-day {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: .86rem;
}

.guided-reading-plan-count {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: .9rem;
}

.guided-reading-plan-strophes-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

.guided-reading-plan-export {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.guided-reading-plan-export > summary {
  cursor: pointer;
  font-weight: 700;
}

.guided-reading-plan-export-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 4px;
}

.guided-reading-plan-export-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

.guided-reading-plan-export-calendar {
  margin-top: 8px;
}

.guided-reading-plan-export-weekdays {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 6px 0;
}

@media (max-width: 720px) {
  .guided-reading-plan-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .guided-reading-plan-generate {
    width: 100%;
  }

  .guided-reading-plan-preview > button,
  .guided-reading-plan-export-buttons button {
    width: 100%;
    margin: 8px 0 0;
    text-align: center;
  }
}
.simple-chapter-actions { margin:2px 0 14px; }
.simple-chapter-actions button { flex:0 1 auto; padding:0 22px; }
.simple-collection-actions .simple-reader-tool-toggle,
.simple-primary-actions .simple-reader-tool-toggle,
.simple-collection-actions .reader-display-config-button { flex:0 0 44px; min-height:44px; padding:0; font-size:1.05rem; }
.simple-reader-tool-toggle[aria-expanded="true"] { border-color:var(--accent); color:var(--accent); }
.simple-page-actions:empty { display:none; }
/* Tools only (search); Lesen/Vorlesen are page menu entries. */
.simple-library-reading-actions { display:flex; align-items:center; gap:10px; }
.simple-library-reading-actions > .simple-reader-tool-toggle { min-width:48px; min-height:44px; padding:0 10px; }
.simple-library-reading-actions > .simple-reader-tool-toggle.button-icon-mode { width:48px; padding:0; }
.simple-list-search-bar:not([hidden]) { display:grid; grid-template-columns:44px minmax(0,1fr) auto; align-items:center; gap:4px 8px; }
.simple-list-search-bar > .simple-reader-tool-mode { width:44px; min-height:44px; margin:0; padding:0; }
.simple-list-search-bar > .simple-reader-tool-mode { border:1px solid var(--line); border-radius:8px; }
.simple-list-search-bar > .simple-filter-count { grid-column:2 / -1; }
.simple-list-search-bar > .simple-bible-search-nav { grid-column:1 / -1; position:static; margin:0; padding:0; box-shadow:none; }
.simple-reader-tool-bar { margin:0 0 14px; }
.simple-reader-tool-mode { border:0; background:transparent; padding:0; cursor:pointer; color:var(--muted); }
.simple-reader-tool-mode:hover { color:var(--accent); }
/* Chapter controls share the measured sticky page header. Keep the search row
   independent of workspace styles, including their legacy commented block. */
.simple-chapter-toolbar { grid-column:1 / -1; display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px; width:100%; max-width:var(--content-max-w, 900px); min-width:0; justify-self:center; }
.simple-chapter-toolbar[hidden] { display:none; }
.simple-chapter-tools-toggle[aria-expanded="true"] { color:var(--accent); background:var(--accent-soft); }
.simple-chapter-toolbar .simple-chapter-actions { position:static; flex:0 1 auto; flex-wrap:nowrap; align-items:center; gap:6px; margin:0; padding:0; background:none; backdrop-filter:none; }
.simple-chapter-toolbar .simple-chapter-actions button { min-height:44px; padding-inline:10px; }
.simple-chapter-toolbar .simple-reader-tool-toggle,
.simple-chapter-toolbar .reader-display-config-button { padding:0; }
.simple-chapter-toolbar .simple-reader-tool-bar { display:flex; flex:1 1 160px; align-items:center; gap:4px; min-width:0; margin:0; }
.simple-chapter-toolbar .ws-spot-input { flex:1; width:0; min-width:0; min-height:44px; margin:0; padding:6px 8px; }
.simple-chapter-toolbar .simple-reader-tool-mode,
.simple-chapter-toolbar .ws-spot-clear { flex:0 0 44px; width:44px; height:44px; padding:0; border:0; background:transparent; color:var(--accent); }
.simple-chapter-toolbar .simple-bible-search-nav { position:static; flex:1 1 100%; flex-wrap:nowrap; gap:6px; margin:0; padding:0; border:0; border-radius:0; background:none; box-shadow:none; }
.simple-chapter-toolbar .simple-bible-search-nav strong { min-width:0; font-size:.8rem; }
.simple-chapter-toolbar .simple-bible-search-nav button { flex:0 0 auto; min-height:40px; min-width:40px; padding:0 8px; }
.simple-chapter-toolbar .simple-bible-search-nav.is-compact { flex:0 0 auto; margin-left:auto; }
.simple-chapter-toolbar .simple-bible-search-nav.is-compact strong { white-space:nowrap; }
.simple-page:has(.simple-chapter-toolbar) .simple-page-content { padding-top:12px; }
.simple-page:has(.simple-chapter-toolbar) mark { scroll-margin-top:var(--simple-head-h); }
.study-info-label-short { display:none; }
.simple-chapter-toolbar .study-info-label-full { display:none; }
.simple-chapter-toolbar .study-info-label-short { display:inline; }
.simple-chapter-toolbar .study-info-toggle[aria-pressed="true"] { background:var(--accent-soft); border-color:var(--accent); color:var(--accent); }
.simple-readaloud-scope { display:grid; gap:10px; margin:4px 0; }
.simple-readaloud-scope label { display:flex; align-items:center; gap:10px; padding:12px 14px; border:1px solid #dedbd3; border-radius:12px; }
:where(html.theme-dark) .simple-readaloud-scope label { border:1px solid var(--line); } /* dark:gen */
.simple-readaloud-scope input { width:18px; height:18px; }
.settings-preferences { display:grid; gap:12px; }
.simple-setting { padding:16px 18px; border:1px solid var(--hero-line, #dedbd3); border-radius:16px; background:var(--panel, #fff); }
:where(html.theme-dark) .simple-setting { border:1px solid var(--hero-line, var(--line)); background:var(--panel, var(--panel)); } /* dark:gen */
.simple-setting label { display:grid; gap:8px; }
.simple-setting label > span { font-weight:700; }
.simple-setting select { width:100%; min-height:46px; }
.simple-setting .simple-study-sources label { display:flex; }
.simple-setting small { display:block; margin-top:8px; color:var(--muted); }
.simple-hero-setting > strong { display:block; }
.simple-hero-mood { margin-top:16px; }
.simple-setting label.simple-hero-picture-toggle { display:flex; align-items:center; gap:10px; margin-top:12px; cursor:pointer; font-size:.92rem; }
.simple-setting label.simple-hero-picture-toggle input { width:18px; height:18px; flex:none; accent-color:var(--accent); }
.simple-hero-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-top:12px; }
.simple-hero-option { display:grid; grid-template-columns:72px 1fr; align-items:center; gap:12px; padding:8px; border:1px solid #dedbd3; border-radius:14px; background:#fffdf8; cursor:pointer; }
:where(html.theme-dark) .simple-hero-option { border:1px solid var(--line); background:var(--panel); } /* dark:gen */
.simple-hero-option.selected { border-color:#b46a2a; box-shadow:0 0 0 2px rgba(198,121,44,.16); }
.simple-hero-option input { position:absolute; width:1px; height:1px; margin:0; opacity:0; pointer-events:none; } /* a global width:100% on inputs made this hidden radio wider than the screen */
.simple-hero-thumb { min-height:52px; border-radius:11px; background:var(--simple-hero-thumb) center/cover no-repeat; box-shadow:inset 0 0 0 1px rgba(39,49,45,.16); }
html.theme-dark .simple-hero-thumb { background-image:var(--simple-hero-thumb-night, var(--simple-hero-thumb)); }
.simple-hero-copy strong, .simple-hero-copy small { display:block; }
.simple-hero-copy small { margin-top:3px; font-size:.79rem; }
.simple-collect-form { display:grid; gap:14px; min-width:min(360px,calc(var(--vpw) * 0.7)); }
.simple-collect-form p { margin:0; font-weight:700; }
.simple-collect-form select { width:100%; min-height:46px; }
.simple-collect-new-collection { display:grid; gap:6px; }
.simple-collect-new-collection span { font-weight:700; }
.simple-collect-new-name { width:100%; min-height:46px; }
.simple-collect-learn { display:flex; align-items:center; gap:9px; }
/* Kein transform/backdrop-filter: WebKit löst diese Kombination bei Root-Zoom
   während des Scrollens gelegentlich aus dem fixed Viewport. Symmetrische
   Seitenränder zentrieren dieselbe 560px-Leiste ohne eigene Compositing-Ebene. */
.simple-bottom-nav { position:fixed; left:max(12px,calc((var(--vpw) - 560px)/2)); right:max(12px,calc((var(--vpw) - 560px)/2)); bottom:calc(max(12px,var(--safe-bottom)) + var(--fix-bottom-gap)); z-index:9300; display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); padding:7px; border:1px solid #d7d6cf; border-radius:20px; background:#fffdf8; box-shadow:0 14px 40px rgba(31,45,39,.2); }
:where(html.theme-dark) .simple-bottom-nav { border:1px solid var(--line); background:var(--panel); } /* dark:gen */
/* Optional frosted-glass bar (setting "bottomNavStyle"). The strength sets how
   much of the content shows through; without backdrop-filter support the
   opaque background above stays. */
body.nav-glass { --nav-glass-alpha:.72; --nav-glass-blur:20px; }
body.nav-glass.nav-glass-subtle { --nav-glass-alpha:.85; --nav-glass-blur:8px; }
body.nav-glass.nav-glass-strong { --nav-glass-alpha:.55; --nav-glass-blur:32px; }
@supports ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))) {
  /* A restrained sheen and soft shadow separate the frosted surface from
     the content without giving the capsule a raised, glossy edge. */
  body.nav-glass .simple-bottom-nav {
    border-color:rgba(255,255,255,.45);
    background:
      linear-gradient(to bottom, rgba(255,255,255,.12), rgba(255,255,255,0) 48%),
      rgba(255,253,248,var(--nav-glass-alpha));
    -webkit-backdrop-filter:blur(var(--nav-glass-blur)) saturate(180%);
    backdrop-filter:blur(var(--nav-glass-blur)) saturate(180%);
    box-shadow:0 6px 20px rgba(31,45,39,.12);
  }
:where(html.theme-dark) body.nav-glass .simple-bottom-nav { border-color:rgba(255,255,255,0.16); background:linear-gradient(to bottom, rgba(27,34,31,0.12), rgba(27,34,31,0.00) 48%), rgba(255,253,248,var(--nav-glass-alpha)); } /* dark:gen */
  /* Dark labels stay legible even over dark content shining through. */
  body.nav-glass:not(.contrast-high) .simple-bottom-nav button { color:#17211b; }
  body.nav-glass:not(.contrast-high) .simple-bottom-nav button.active {
    background:color-mix(in srgb, var(--accent) 10%, transparent);
  }
}
.simple-bottom-nav-viewport { display:contents; }
.simple-collection-add {
  position:fixed;
  right:calc(max(20px, var(--safe-right)) + var(--fix-right-gap));
  bottom:calc(max(12px, var(--safe-bottom)) + var(--fix-bottom-gap) + 90px);
  z-index:9200;
  width:56px;
  height:56px;
  padding:0;
  border:1px solid var(--accent);
  border-radius:50%;
  background:var(--accent);
  color:var(--accent-contrast, #fff);
  font-size:24px;
  box-shadow:0 8px 24px rgba(31,45,39,.24);
}
.simple-collection-add:focus-visible { outline:3px solid var(--text); outline-offset:3px; }
body:has(.mitschrift-pill:not([hidden])) .simple-collection-add { bottom:calc(max(12px, var(--safe-bottom)) + var(--fix-bottom-gap) + 148px); }
body.keyboard-active .simple-collection-add { display:none; }
body:has(#capturePanel:not([hidden])) .simple-collection-add,
body:has(#entryTextDialogBackdrop:not([hidden])) .simple-collection-add { display:none; }
body.mitschrift-docked .simple-collection-add,
body.study-inspector-docked .simple-collection-add { right:calc(20px + var(--fix-right-gap) + var(--right-dock-w)); }
.simple-lists-column:has(.simple-collection-add) { padding-bottom:76px; }
.simple-page-content:has(> .simple-collection-add) { padding-bottom:90px; }
.simple-bottom-nav[hidden] { display:none !important; }
.simple-bottom-nav button { min-height:52px; display:grid; place-items:center; gap:2px; border:0; border-radius:14px; color:#66716c; background:transparent; font-size:.76rem; padding:2px; }
:where(html.theme-dark) .simple-bottom-nav button { color:var(--muted); } /* dark:gen */
.simple-bottom-nav button > span:last-child { max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.simple-bottom-nav button:hover,.simple-bottom-nav button:focus-visible { color:#315246; background:#e2eee7; }
:where(html.theme-dark) .simple-bottom-nav button:hover, :where(html.theme-dark) .simple-bottom-nav button:focus-visible { color:#c2dbd2; background:color-mix(in srgb, var(--text) 6%, var(--panel)); } /* dark:gen */
.simple-bottom-nav button.active { color:var(--accent); background:var(--accent-soft); font-weight:700; }
.simple-bottom-nav .fa-icon { font-size:1rem; }
body.ui-scale-compact-nav .simple-bottom-nav {
  padding:4px;
}
body.ui-scale-compact-nav .simple-bottom-nav button { min-height:44px; gap:0; padding:2px; }
body.ui-scale-compact-nav .simple-bottom-nav button > span:last-child { display:none; }
body.ui-mode-simple .learn-panel { background:#eef2ed; }
:where(html.theme-dark) body.ui-mode-simple .learn-panel { background:color-mix(in srgb, var(--text) 3%, var(--panel)); } /* dark:gen */
body.ui-mode-simple .learn-flashcard { border-radius:24px; box-shadow:0 18px 50px rgba(42,51,47,.12); }

/* Keep secondary surfaces in the same visual language as the simple home. */
body.ui-mode-simple .cmd-palette-backdrop,
body.ui-mode-simple .changelog-backdrop,
body.ui-mode-simple .capture-sheet-backdrop,
body.ui-mode-simple .feedback-backdrop,
body.ui-mode-simple .ui-dialog-backdrop {
  background:rgba(31,45,39,.48);
  backdrop-filter:blur(10px);
}
/* Der Zoom-Dialog bleibt auch im einfachen UI-Modus ein durchsichtiges,
   nicht-blockierendes Fenster (siehe .entry-text-dialog-backdrop weiter oben)
   - eine abgedunkelte Fläche hier würde blockierend aussehen, obwohl Klicks
   längst durchgehen. */
body.ui-mode-simple .cmd-palette,
body.ui-mode-simple .changelog-modal,
body.ui-mode-simple .capture-panel,
body.ui-mode-simple .feedback-modal,
body.ui-mode-simple .ui-dialog-modal,
body.ui-mode-simple .entry-text-dialog,
body.ui-mode-simple .tag-manager-modal {
  border:1px solid #d9d6cd;
  border-radius:22px;
  color:#27312d;
  background:#fffdf8;
  box-shadow:0 28px 75px rgba(31,45,39,.24);
}
:where(html.theme-dark) body.ui-mode-simple .cmd-palette, :where(html.theme-dark) body.ui-mode-simple .changelog-modal, :where(html.theme-dark) body.ui-mode-simple .capture-panel, :where(html.theme-dark) body.ui-mode-simple .feedback-modal, :where(html.theme-dark) body.ui-mode-simple .ui-dialog-modal, :where(html.theme-dark) body.ui-mode-simple .entry-text-dialog, :where(html.theme-dark) body.ui-mode-simple .tag-manager-modal { border:1px solid var(--line); color:var(--text); background:var(--panel); } /* dark:gen */
body.ui-mode-simple .cmd-palette-input-row,
body.ui-mode-simple .capture-sheet-head,
body.ui-mode-simple .changelog-header,
body.ui-mode-simple .content-header {
  border-color:#dedbd3;
  background:linear-gradient(135deg,#e8f0eb,#fffdf8);
}
:where(html.theme-dark) body.ui-mode-simple .cmd-palette-input-row, :where(html.theme-dark) body.ui-mode-simple .capture-sheet-head, :where(html.theme-dark) body.ui-mode-simple .changelog-header, :where(html.theme-dark) body.ui-mode-simple .content-header { border-color:var(--line); background:linear-gradient(135deg,color-mix(in srgb, var(--text) 4%, var(--panel)),var(--panel)); } /* dark:gen */
body.ui-mode-simple .cmd-palette-input-row { padding:18px 20px; }
body.ui-mode-simple .cmd-palette-input-row input { color:#27312d; font-size:1.08rem; }
:where(html.theme-dark) body.ui-mode-simple .cmd-palette-input-row input { color:var(--text); } /* dark:gen */
body.ui-mode-simple .cmd-palette-icon { color:#3e6b59; }
:where(html.theme-dark) body.ui-mode-simple .cmd-palette-icon { color:#b9d7cb; } /* dark:gen */
body.ui-mode-simple .cmd-palette-list,
body.ui-mode-simple .changelog-body { scrollbar-color:#9eb5a8 transparent; }
body.ui-mode-simple .cmd-palette-item:hover,
body.ui-mode-simple .cmd-palette-item.selected { background:#e2eee7; color:#315246; }
:where(html.theme-dark) body.ui-mode-simple .cmd-palette-item:hover, :where(html.theme-dark) body.ui-mode-simple .cmd-palette-item.selected { background:color-mix(in srgb, var(--text) 6%, var(--panel)); color:#c2dbd2; } /* dark:gen */
/* Translation comparison cards: full-width text, menu button in the bottom-right
   corner like the action cards; the spacer keeps the last line clear of it. */
.compare-row-item > .compare-row-more { position:absolute; right:6px; bottom:6px; }
.compare-row-spacer { display:inline-block; width:40px; height:1px; }
/* Phones: the command bar fills the screen; "esc" becomes a close cross (docs/kopfzeilen-umbau.md). */
@media (max-width:760px) {
  .cmd-palette-backdrop { align-items:stretch; padding-top:0; }
  .cmd-palette, body.ui-mode-simple .cmd-palette { display:flex; flex-direction:column; width:100%; height:var(--vph); border:0; border-radius:0; box-shadow:none; }
  .cmd-palette-input-row, body.ui-mode-simple .cmd-palette-input-row { padding:max(10px, var(--safe-top)) 12px 10px 16px; }
  .cmd-palette-list { flex:1; max-height:none; padding-bottom:calc(12px + var(--safe-bottom)); }
  .cmd-palette-backdrop.is-local-scope { align-items:flex-start; }
  .cmd-palette-backdrop.is-local-scope .cmd-palette,
  body.ui-mode-simple .cmd-palette-backdrop.is-local-scope .cmd-palette { height:auto; border-radius:0 0 18px 18px; box-shadow:0 14px 40px rgba(31,45,39,.24); }
  .cmd-palette-backdrop.is-local-scope .cmd-palette-list { flex:none; padding-bottom:12px; }
  .cmd-palette-item { min-height:48px; }
  .cmd-palette-kbd-button { width:40px; height:40px; padding:0; border:0; border-radius:50%; font-size:0; }
  .cmd-palette-kbd-button::before { content:"\f00d"; font:900 1.1rem/1 FAS; }
}
body.ui-mode-simple input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
body.ui-mode-simple textarea,
body.ui-mode-simple select { border-color:#d7d6cf; border-radius:12px; background:#fff; }
:where(html.theme-dark) body.ui-mode-simple input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]), :where(html.theme-dark) body.ui-mode-simple textarea, :where(html.theme-dark) body.ui-mode-simple select { border-color:var(--line); background:var(--panel); } /* dark:gen */
body.ui-mode-simple button:not(.danger-button):focus-visible,
body.ui-mode-simple input:focus-visible,
body.ui-mode-simple textarea:focus-visible,
body.ui-mode-simple .simple-lists-filter:focus-within,
body.ui-mode-simple select:focus-visible { outline:3px solid rgba(62,107,89,.28); outline-offset:2px; }
body.ui-mode-simple .simple-lists-filter input:focus-visible { outline:none; }
body.ui-mode-simple .learn-header,
body.ui-mode-simple .learn-footer,
body.ui-mode-simple .readaloud-player-controls { border-color:var(--hero-line, #d9ded9); background:var(--hero-paper, #f7f4ec); }
:where(html.theme-dark) body.ui-mode-simple .learn-header, :where(html.theme-dark) body.ui-mode-simple .learn-footer, :where(html.theme-dark) body.ui-mode-simple .readaloud-player-controls { border-color:var(--hero-line, var(--line)); background:var(--hero-paper, color-mix(in srgb, var(--text) 3%, var(--panel))); } /* dark:gen */
body.ui-mode-simple .learn-flashcard-text { font-family:Georgia,serif; line-height:1.65; }
body.ui-mode-simple .panel-card,
body.ui-mode-simple .settings-card,
body.ui-mode-simple .stats-card { border-color:#dedbd3; border-radius:20px; background:#fffdf8; box-shadow:0 12px 36px rgba(42,51,47,.08); }
:where(html.theme-dark) body.ui-mode-simple .panel-card, :where(html.theme-dark) body.ui-mode-simple .settings-card, :where(html.theme-dark) body.ui-mode-simple .stats-card { border-color:var(--line); background:var(--panel); } /* dark:gen */

@media (max-width:720px) {
  /* An explicit top-anchored frame does not inherit a stale keyboard-sized
     fixed containing-block height. Keep the document's scrolling model intact. */
  .simple-bottom-nav-viewport {
    position:fixed;
    top:0;
    left:0;
    width:var(--vpw);
    height:var(--nav-viewport-height, var(--vph));
    display:block;
    z-index:9300;
    pointer-events:none;
  }
  .simple-bottom-nav-viewport:has(.simple-bottom-nav[hidden]),
  body.keyboard-active .simple-bottom-nav-viewport { display:none; }
  .simple-bottom-nav {
    position:absolute;
    pointer-events:auto;
    left:0;
    right:0;
    bottom:0;
    padding-bottom:max(7px,var(--safe-bottom));
    border-inline:0;
    border-bottom:0;
    border-radius:20px 20px 0 0;
  }
  /* Glass style: floating capsule above the home indicator, as in iOS tab bars. */
  body.nav-glass .simple-bottom-nav {
    left:max(12px,var(--safe-left));
    right:max(12px,var(--safe-right));
    bottom:max(12px,calc(var(--safe-bottom) - 14px));
    padding-bottom:7px;
    border-style:solid;
    border-width:1px;
    border-radius:32px;
  }
  body.nav-glass .simple-bottom-nav button { border-radius:25px; }
  body.nav-glass.ui-scale-compact-nav .simple-bottom-nav { padding:4px; }
  .ws-bible-page-head {
    flex-wrap: wrap;
    top: 52px;
    padding: 6px;
  }
  .ws-bible-page-head .ws-bible-location {
    flex: 1 1 120px;
  }
  .ws-bible-page-head .ws-bible-reading-meta {
    display: none;
  }
  .ws-bible-page-head .bible-passage-range-controls--toolbar {
    order: 3;
    flex: 1 1 100%;
  }
  body.ui-mode-simple .shell:has(.workspace-panel.showing-simple-page) { padding-top:0; }
  /* Full-bleed: cancel the shell's side padding so the hero image reaches the screen edges. */
  .simple-home { min-height:calc(var(--vph) - 95px); margin-left:calc(-1 * max(10px, var(--safe-left))); margin-right:calc(-1 * max(10px, var(--safe-right))); border-radius:0; border-inline:0; box-shadow:none; }
  .simple-page { min-height:calc(var(--vph) - 95px); border-radius:0; border-inline:0; }
  .simple-page-head { grid-template-columns:auto 1fr auto; gap:8px; padding:10px; }
  .workspace-panel.showing-simple-page .simple-page-head { padding-top:max(10px, var(--safe-top)); }
  .simple-page-head-actions { gap:6px; }
  .simple-lists-layout { display:block; }
  .simple-lists-column { display:grid; }
  .simple-bible-filter-heading .simple-bible-filter-mobile-title { display:flex; flex:1 1 100%; align-items:center; gap:8px; }
  .simple-bible-filter { display:none; }
  .simple-bible-filter.mobile-open { position:fixed; inset:0; z-index:9600; display:block; max-height:none; padding:18px; border:0; border-radius:0; background:#fffdf8; }
:where(html.theme-dark) .simple-bible-filter.mobile-open { background:var(--panel); } /* dark:gen */
  .simple-bible-filter.mobile-open .simple-bible-filter-heading { top:-18px; margin:-18px -18px 10px; padding:16px 18px; }
  .simple-bible-filter-mobile-close { display:inline-flex; flex:1; align-items:center; justify-content:center; gap:8px; min-height:44px; padding:8px 12px; border:0; border-radius:8px; color:#315246; background:#eef4f0; font:inherit; }
:where(html.theme-dark) .simple-bible-filter-mobile-close { color:#c2dbd2; background:color-mix(in srgb, var(--text) 3%, var(--panel)); } /* dark:gen */
  .simple-bible-filter-toggle { display:none; }
  .simple-bible-filter-detail { gap:8px; padding-block:6px; }
  /* Result line: count and chip share one row, the band lives in the chip's panel. */
  .simple-result-line { gap:4px 10px; padding-block:4px; }
  .simple-result-band { display:none; }
  .simple-result-panel .simple-bible-band-wrap { display:block; }
  .simple-result-presets { flex-basis:100%; margin-top:4px; }
  .simple-bible-read-direct label > div { grid-template-columns:1fr; }
  .simple-bible-read-direct button { justify-content:center; width:100%; }
  .simple-list-category-action span:last-child { display:none; }
  .simple-list-category-action { width:36px; padding:0; justify-content:center; }
  .simple-primary-actions button.has-short-label .simple-action-label-full { display:none; }
  .simple-primary-actions button.has-short-label .simple-action-label-short { display:inline; }
  .simple-chapter-actions { flex-wrap:nowrap; }
  .simple-chapter-actions .reader-display-config-button { flex:0 0 44px; padding:0; }
  .simple-chapter-actions .study-info-label-full { display:none; }
  .simple-chapter-actions .study-info-label-short { display:inline; }
  .simple-chapter-toolbar .simple-chapter-actions { flex:1 1 100%; }
  body.ui-scale-compact-nav .simple-chapter-toolbar .study-info-label-short { display:none; }
  .simple-page-back { width:42px; overflow:hidden; padding:0; font-size:0; }
  .simple-page-back span { font-size:1.2rem; }
    .offline-packages-summary,.offline-package-card { align-items:stretch; }
  .offline-package-card { grid-template-columns:1fr; }
  .offline-packages-summary { display:grid; }
  .offline-packages-summary small { text-align:left; }
  .offline-package-actions { justify-content:stretch; }
  .offline-package-actions button { flex:1 1 auto; }
  .offline-bible-picker { grid-template-columns:1fr; }
  .offline-packages-page .bible-manifest-row { grid-template-columns:1fr; }
  .simple-bible-chapter-nav { grid-template-columns:auto minmax(0,1fr) auto; }
  .simple-bible-chapter-nav.in-header { gap:4px; }
  .simple-bible-chapter-nav.in-header .simple-bible-location-button { flex:0 1 auto; min-width:0; font-size:1.05rem; }
  /* Text spans the full width here, so darken top-down instead of left-right. */
  .simple-home-hero { min-height:250px; padding:24px max(14px, var(--safe-right)) 46px max(14px, var(--safe-left)); background-image:linear-gradient(180deg,rgba(24,42,35,.8) 0%,rgba(24,42,35,.42) 55%,rgba(24,42,35,.6) 100%),var(--simple-home-hero-image); background-position:65% center; }
  .simple-home-content { margin-top:-26px; padding:0 14px 28px; gap:14px; }
  .simple-home-actions { grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin:0; }
  .simple-home-hero-actions > button { flex:1 1 auto; min-width:0; justify-content:center; white-space:nowrap; }
  .simple-home-hero-actions > .simple-home-primary { flex-basis:100%; }
  .simple-action-card { min-height:76px; padding:8px 4px; border-radius:14px; }
  .simple-action-illustration { float:none; transform:scale(.52); margin:-9px auto -7px; }
  .simple-action-card strong { font-size:.80rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:100%; text-align:center; }
  .simple-action-card small { display:none; }
  .simple-continue-card { min-height:84px; padding:14px 16px; gap:12px; grid-template-columns:44px 1fr auto; border-radius:16px; }
  .simple-continue-icon { width:44px; height:44px; border-radius:12px; font-size:1.1rem; }
  .simple-continue-copy strong { font-size:1.06rem; }
  .simple-continue-copy > span { font-size:.84rem; }
  #simpleHomeLosungen .ws-start-losungen { padding:16px; border-radius:16px; gap:10px; }
  #simpleHomeLosungen .ws-losungen-date { font-size:1.05rem; }
  #simpleHomeLosungen .ws-losungen-verse p { font-size:.98rem; }
  .simple-hero-options { grid-template-columns:1fr; }
  .simple-library-cards { grid-template-columns:1fr; }
  .simple-section-head { align-items:start; }
  .simple-section-head .secondary { white-space:nowrap; }
}

@media (prefers-reduced-motion:reduce) { .simple-action-card { transition:none; } }

/* Auf sehr schmalen Telefonen passen Zurück, Seitentitel und Aktionen nicht
   verlässlich in dieselbe Kopfzeile. Der Titel bzw. die fachliche
   Kapitelnavigation erhält deshalb eine eigene Reihe über die volle Breite. */
@media (max-width:480px) {
  .simple-page-head { grid-template-columns:auto minmax(0,1fr) auto; }
  .simple-page-head .simple-page-back { grid-column:1; grid-row:1; }
  .simple-page-head .simple-page-head-actions { grid-column:3; grid-row:1; }
  .simple-page-head-actions > .simple-page-closed-status.button-text-mode { max-width:clamp(44px,calc(var(--vpw) * 0.15),90px); padding:6px; white-space:normal; overflow-wrap:anywhere; }
  .simple-page-head .simple-page-title-container {
    grid-column:1 / -1;
    grid-row:2;
    min-width:0;
  }
  .simple-page-head.is-collapsed .simple-page-title-container { grid-column:2; grid-row:1; }
  .simple-page-head.is-collapsed .simple-page-title-container.has-edition-switch { grid-column:1 / -1; grid-row:2; }
  /* Zweisprachige Sammlung: DE | EN rückt in die freie Mitte der ersten Reihe,
     damit der Titel die volle Breite der zweiten behält; der
     Übersetzungsfortschritt folgt als eigene Zeile unter dem Titel. */
  .simple-page-head:not(.is-collapsed) .simple-page-title-container.has-edition-switch,
  .simple-page-head:not(.is-collapsed) .has-edition-switch > .collection-edition-tools { display:contents; }
  .simple-page-head:not(.is-collapsed) .has-edition-switch .collection-edition-switch { grid-column:2; grid-row:1; justify-self:end; }
  .simple-page-head:not(.is-collapsed) .has-edition-switch > .simple-page-capsule { grid-column:1 / -1; grid-row:2; }
  .simple-page-head:not(.is-collapsed) .has-edition-switch > :is(.simple-home-eyebrow, h1),
  .simple-page-head:not(.is-collapsed) .has-edition-switch .collection-edition-progress { grid-column:1 / -1; min-width:0; }
  .simple-page-head:not(.is-collapsed) .has-edition-switch .collection-edition-progress { justify-self:start; margin:-6px 0 0 -6px; text-align:left; }
  /* Die erste Reihe trägt sonst nur Zurück und Suche. Das Übersetzungs-Pill
     rückt dort hinein, damit der Stellen-Wähler zwischen den Kapitelpfeilen
     die volle Breite der zweiten Reihe bekommt. */
  .simple-page-head.has-custom-nav .simple-page-title-container { display:contents; }
  .simple-page-head.has-custom-nav { grid-template-columns:auto minmax(0,1fr) auto; }
  .simple-page-head.has-custom-nav .simple-page-head-actions { grid-column:3; }
  .simple-page-head.has-custom-nav .sanctuary-translation-container { grid-column:2; grid-row:1; justify-self:end; min-width:0; max-width:100%; }
  /* Bei hoher Skalierung ist die Spalte schmaler als das Pill; es würde sonst
     nach links über den Zurück-Knopf ragen. Das Label kürzt stattdessen. */
  .simple-page-head.has-custom-nav .sanctuary-translation-pill { min-width:0; max-width:100%; }
  .simple-page-head.has-custom-nav .sanctuary-translation-pill > span:not(.fa-icon) { min-width:0; overflow:hidden; text-overflow:ellipsis; }
  .simple-page-head.has-custom-nav .simple-page-header-nav { grid-column:1 / -1; grid-row:2; min-width:0; }
  /* Die untere Kapitelnavigation nennt nur die Kapitelnummer ("← 30"), kurz genug
     auch bei hoher Skalierung. */
  .simple-bible-chapter-nav:not(.in-header) > button:not(.simple-bible-location-button) { min-width:44px; padding:0 10px; white-space:nowrap; }
  .simple-page-head.has-custom-nav .simple-bible-chapter-nav.in-header {
    justify-content:center;
  }
  .simple-page-head.has-custom-nav .simple-bible-chapter-nav.in-header .simple-bible-location-button {
    flex:1 1 auto;
    min-width:0;
    max-width:none;
  }
}

@media (max-width:760px) {
  .simple-chapter-toolbar .simple-chapter-actions.simple-page-actions { flex-wrap:nowrap; }
  .simple-chapter-toolbar .simple-page-actions > * { flex:0 0 auto; }
}
/* Keep the reading controls usable when zoom reduces the available width. */
@media (max-width:360px) {
  .simple-chapter-toolbar .study-info-label-short,
  .simple-chapter-toolbar .study-source-label,
  .simple-chapter-toolbar .study-source-picker > span:not(.fa-icon) { display:none; }
}
@media (max-width:760px) {
  .simple-page-head.has-custom-nav { padding:6px 10px; gap:4px 8px; }
  .simple-page-head.has-custom-nav .simple-page-title-container { gap:4px 8px; }
  .simple-page-head.has-custom-nav .simple-page-header-nav { flex:1 1 160px; min-width:0; }
  .simple-page-head.has-custom-nav .sanctuary-translation-container { position:static; }
  .simple-page-head.has-custom-nav .sanctuary-translation-menu { min-width:0; width:min(360px, calc(100% - 20px)); right:10px; }
}

@media (max-width:480px) {
  body.ui-scale-compact-nav .simple-page-head.has-custom-nav { grid-template-columns:auto minmax(0,1fr) auto; column-gap:4px; }
  body.ui-scale-compact-nav .simple-page-head.has-custom-nav .sanctuary-translation-container { grid-column:1 / -1; grid-row:2; justify-self:center; }
  body.ui-scale-compact-nav .simple-page-head.has-custom-nav .simple-page-header-nav { grid-column:1 / -1; grid-row:1; }
}

/* Chapter tools keep their position when the surrounding controls are hidden. */
body .simple-page-head.has-custom-nav { grid-template-columns:auto minmax(0,1fr) auto; padding:6px 10px; padding-top:max(6px,var(--safe-top)); }
body .simple-page-head.has-custom-nav .simple-page-title-container { display:contents; }
body .simple-page-head.has-custom-nav .simple-page-header-nav { grid-column:1 / -1; grid-row:1; width:auto; margin-inline:88px; }
body .simple-page-head.has-custom-nav .simple-page-head-actions { position:absolute; grid-area:auto; top:max(6px,var(--safe-top)); right:10px; }
body .simple-page-head.has-custom-nav :is(.simple-page-back, .simple-page-head-lead) { grid-column:1; grid-row:2; }
body .simple-page-head.has-custom-nav .sanctuary-translation-container { grid-column:2; grid-row:2; justify-self:end; min-width:0; max-width:100%; }
@media (min-width:1000px) {
  body .simple-page-head.has-custom-nav { grid-template-columns:auto minmax(0,1fr) auto auto; }
  body .simple-page-head.has-custom-nav .sanctuary-translation-container { grid-column:3; }
}
/* Stage 5b: the account button widens the absolutely placed actions by 46 px. */
@media (min-width:761px) {
  body .simple-page-head.has-custom-nav .simple-page-header-nav { margin-inline:134px; }
}
/* Chapter reader head (docs/kopfzeilen-umbau.md, stage 5a): one glass row [back] [capsule] [tools],
   the tools strip and the translation strip below it, and a small pill instead of all of it
   while reading. The head has no has-custom-nav class, so the older layers above do not apply. */
.simple-page-head.is-reader-head::before { display:none; }
body .simple-page-head.is-reader-head { grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:6px; padding:6px max(12px, calc((100% - var(--content-max-w, 900px)) / 2 + clamp(20px,4vw,42px))); padding-top:max(6px,var(--safe-top)); border-bottom:0; background:linear-gradient(var(--hero-paper, #f7f4ec) calc(100% - 14px), transparent); -webkit-backdrop-filter:none; backdrop-filter:none; }
:where(html.theme-dark) body .simple-page-head.is-reader-head { background:linear-gradient(var(--hero-paper, color-mix(in srgb, var(--text) 3%, var(--panel))) calc(100% - 14px), transparent); } /* dark:gen */
body .simple-page-head.is-reader-head .simple-page-head-lead { grid-area:1 / 1; }
body .simple-page-head.is-reader-head .simple-page-back { grid-area:1 / 1; width:40px; height:40px; min-height:40px; padding:0; overflow:hidden; border-radius:50%; font-size:0; }
body .simple-page-head.is-reader-head .simple-page-back span { font-size:1.15rem; }
body .simple-page-head.is-reader-head .simple-page-title-container { display:contents; }
body .simple-page-head.is-reader-head .simple-page-header-nav { grid-area:1 / 2; }
body .simple-page-head.is-reader-head .simple-page-head-actions { grid-area:1 / 3; position:static; gap:6px; }
body .simple-page-head.is-reader-head .simple-reader-strip { grid-area:2 / 1 / 3 / -1; }
body .simple-page-head.is-reader-head .simple-chapter-toolbar { grid-area:3 / 1 / 4 / -1; }
/* .simple-page-back and .simple-page-menu come later than .glass and reset its surface. */
body .simple-page-head.is-reader-head :is(.simple-page-back, .simple-chapter-tools-toggle).glass { border:1px solid color-mix(in srgb, #fff 60%, transparent); color:#315246; background:color-mix(in srgb, var(--glass-tint) 62%, transparent); }
:where(html.theme-dark) body .simple-page-head.is-reader-head :is(.simple-page-back, :where(html.theme-dark) .simple-chapter-tools-toggle).glass { border:1px solid color-mix(in srgb, var(--line) 60%, transparent); color:#c2dbd2; } /* dark:gen */
body .simple-page-head.is-reader-head .simple-chapter-tools-toggle { width:40px; height:40px; }
body .simple-page-head.is-reader-head .simple-chapter-tools-toggle[aria-expanded="true"] { color:var(--accent); }
@media (prefers-reduced-transparency:reduce) {
  body .simple-page-head.is-reader-head :is(.simple-page-back, .simple-chapter-tools-toggle).glass { background:var(--glass-tint); }
}
@media (pointer:coarse) {
  body .simple-page-head.is-reader-head :is(.simple-page-back, .simple-chapter-tools-toggle).glass { background:color-mix(in srgb, var(--glass-tint) 92%, transparent); }
}
/* Capsule: prev | place | translation segment | next. */
body .simple-page-head.is-reader-head .simple-bible-chapter-nav.in-header { display:flex; flex:none; align-items:center; gap:0; width:auto; min-width:0; height:44px; padding:0 2px; border-radius:24px; }
body .simple-page-head.is-reader-head .simple-bible-chapter-nav.in-header .simple-nav-btn { flex:none; width:36px; height:36px; min-height:36px; }
body .simple-page-head.is-reader-head .simple-bible-chapter-nav.in-header .simple-bible-location-button { flex:1 1 0; min-width:0; height:40px; padding:0 4px; font-size:1.05rem; }
body .simple-page-head.is-reader-head .simple-bible-location-button .fa-icon { display:none; }
body .simple-page-head.is-reader-head .simple-bible-chapter-nav.in-header .simple-bible-location-label { flex:1 1 0; text-align:center; }
/* On narrow screens with large UI scale the short name may shrink (ellipsis) instead of
   pushing the next-chapter button out; system-ui is wider on Linux/Android than on Apple. */
body .simple-page-head.is-reader-head .sanctuary-translation-container { flex:0 1 auto; min-width:0; align-self:stretch; }
body .simple-page-head.is-reader-head .sanctuary-translation-pill { max-width:100%; }
body .simple-page-head.is-reader-head #simpleSanctuaryTranslationPillLabel { min-width:0; overflow:hidden; text-overflow:ellipsis; }
body .simple-page-head.is-reader-head .sanctuary-translation-pill { min-height:28px; height:28px; padding:0 8px; gap:4px; border:0; border-left:1px solid var(--line); border-radius:0; color:var(--muted); background:transparent; font:600 .72rem/1 system-ui,sans-serif; }
body .simple-page-head.is-reader-head .sanctuary-translation-pill:hover { color:var(--accent); background:transparent; }
body .simple-page-head.is-reader-head .sanctuary-translation-pill .fa-icon { display:none; }
body .simple-page-head.is-reader-head.has-translation-strip .sanctuary-translation-pill { display:none; }
body .simple-page-head.is-reader-head .simple-bible-chapter-nav.in-header:has(.sanctuary-translation-menu:not([hidden])) { -webkit-backdrop-filter:none; backdrop-filter:none; }
@media (min-width:1000px) {
  /* Room for the full title of the translation. */
  body .simple-page-head.is-reader-head .simple-bible-chapter-nav.in-header { min-width:min(100%, 22rem); }
  body .simple-page-head.is-reader-head .simple-bible-chapter-nav.in-header .simple-bible-location-button { font-size:1.15rem; }
  body .simple-page-head.is-reader-head .sanctuary-translation-pill { padding:0 10px; }
  body .simple-page-head.is-reader-head .sanctuary-translation-pill .fa-icon { display:inline; font-size:.7rem; }
  body .simple-page-head.is-reader-head #simpleSanctuaryTranslationPillLabel[data-title]:not([data-title=""]) { max-width:14rem; overflow:hidden; font-size:0; text-overflow:ellipsis; white-space:nowrap; }
  body .simple-page-head.is-reader-head #simpleSanctuaryTranslationPillLabel[data-title]:not([data-title=""])::before { content:attr(data-title); font-size:.8rem; }
}
/* Tools strip: the former chapter toolbar. */
body .simple-page-head.is-reader-head .simple-chapter-toolbar { justify-self:stretch; width:auto; max-width:none; gap:4px 6px; padding:4px 6px; border-radius:22px; }
body .simple-page-head.is-reader-head .simple-chapter-toolbar .simple-chapter-actions button { min-height:40px; }
body .simple-page-head.is-reader-head .simple-chapter-toolbar[hidden] { display:none; }
/* Large UI scale on a phone: back and tools leave no room for the capsule in one row, so it takes its own. */
@media (max-width:720px) {
  body.ui-scale-compact-nav .simple-page-head.is-reader-head .simple-page-header-nav { grid-area:2 / 1 / 3 / -1; justify-self:stretch; }
  body.ui-scale-compact-nav .simple-page-head.is-reader-head .sanctuary-translation-pill { padding:0 4px; gap:2px; }
  body.ui-scale-compact-nav .simple-page-head.is-reader-head .simple-reader-strip { grid-area:3 / 1 / 4 / -1; }
  body.ui-scale-compact-nav .simple-page-head.is-reader-head .simple-chapter-toolbar { grid-area:4 / 1 / 5 / -1; }
}
/* Translation strip. */
.simple-reader-strip { position:relative; display:flex; align-items:center; gap:2px; min-width:0; height:38px; padding:3px; border-radius:20px; }
.simple-reader-strip-tabs { position:relative; display:flex; flex:1 1 0; align-items:center; gap:2px; min-width:0; height:100%; overflow-x:auto; overflow-y:hidden; scrollbar-width:none; }
.simple-reader-strip-tabs::-webkit-scrollbar { display:none; }
.simple-reader-strip.is-scrollable .simple-reader-strip-tabs { mask-image:linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 14px), transparent); }
.simple-reader-strip-indicator { position:absolute; top:0; bottom:0; left:0; width:0; border-radius:16px; background:#fff; box-shadow:0 1px 4px rgba(0,0,0,.14); transition:left .22s ease, width .22s ease; pointer-events:none; }
:where(html.theme-dark) .simple-reader-strip-indicator { background:var(--panel); } /* dark:gen */
.simple-reader-strip-indicator[hidden] { display:none; }
.simple-reader-strip.is-live .simple-reader-strip-indicator { transition:none; }
.simple-reader-strip-tab { position:relative; z-index:1; flex:1 0 auto; min-width:44px; height:100%; min-height:0; padding:0 10px; border:0; border-radius:16px; color:var(--muted); background:transparent; font:700 .72rem/1 system-ui,sans-serif; letter-spacing:.02em; white-space:nowrap; }
.simple-reader-strip-tab.on { color:var(--text, #27312d); }
:where(html.theme-dark) .simple-reader-strip-tab.on { color:var(--text, var(--text)); } /* dark:gen */
.simple-reader-strip[data-layout="columns"] .simple-reader-strip-tab { font-weight:400; }
.simple-reader-strip[data-layout="columns"] .simple-reader-strip-tab.is-visible-column { font-weight:700; }
.simple-reader-strip[data-layout="stack"] .simple-reader-strip-tab.on { background:#fff; box-shadow:0 1px 4px rgba(0,0,0,.14); }
:where(html.theme-dark) .simple-reader-strip[data-layout="stack"] .simple-reader-strip-tab.on { background:var(--panel); } /* dark:gen */
.simple-reader-strip-tab[hidden] { display:none; }
.simple-reader-strip-more { flex:none; display:grid; place-items:center; width:32px; height:32px; min-height:0; padding:0; border:0; border-radius:50%; color:var(--accent); background:transparent; font-size:.9rem; }
/* All columns fit side by side: column header row, one segment above each column. */
.simple-reader-strip.is-columns-header .simple-reader-strip-tabs { flex-basis:100%; overflow:hidden; }
.simple-reader-strip.is-columns-header .simple-reader-strip-tab { position:absolute; top:0; flex:none; min-width:0; padding:0 4px; overflow:hidden; color:var(--text, #27312d); text-overflow:ellipsis; }
:where(html.theme-dark) .simple-reader-strip.is-columns-header .simple-reader-strip-tab { color:var(--text, var(--text)); } /* dark:gen */
.simple-reader-strip.is-columns-header .simple-reader-strip-more { position:absolute; top:3px; right:3px; }
/* Header row that moves with scrolled columns: arrows over its ends for the columns out of view. */
.simple-reader-strip-step { position:absolute; top:3px; z-index:2; display:grid; place-items:center; width:32px; height:32px; min-height:0; padding:0; border:0; border-radius:50%; color:var(--accent); background:var(--panel); box-shadow:0 1px 4px rgba(0,0,0,.14); font-size:.8rem; }
.simple-reader-strip-step[hidden] { display:none; }
.simple-reader-strip-step.is-back { left:3px; }
.simple-reader-strip-step.is-forward { right:3px; }
.simple-reader-strip:has(> .simple-reader-strip-more) .simple-reader-strip-step.is-forward { right:38px; }
/* The Bible an active verse selection acts on. */
/* The active Bible: segment and column share one tint. A verse selection keeps its stronger styling. */
.simple-reader-strip .simple-reader-strip-tab.is-active-translation { color:var(--text, #27312d); background:color-mix(in srgb, var(--accent) 16%, transparent); }
:where(html.theme-dark) .simple-reader-strip .simple-reader-strip-tab.is-active-translation { color:var(--text, var(--text)); } /* dark:gen */
.parallel-verse-version.is-active-translation { background:color-mix(in srgb, var(--accent-soft) 60%, transparent); }
/* The strip names the column, so the label on every verse card goes. Stack layout keeps it. */
.simple-page-content[data-parallel-strip="columns"] .parallel-verse-version-label { display:none; }
/* Collapsed while reading: only the pill. */
.simple-reader-pill { display:none; }
body .simple-page-head.is-reader-collapsed { height:calc(max(6px, var(--safe-top)) + 36px); padding-block:0; background:none; }
body .simple-page-head.is-reader-collapsed > :not(.simple-reader-pill) { display:none !important; }
body .simple-page-head.is-reader-collapsed .simple-reader-pill { position:absolute; top:max(6px, var(--safe-top)); left:50%; display:inline-flex; align-items:center; gap:8px; height:30px; min-height:0; padding:0 14px; border-radius:999px; color:var(--text, #27312d); font:700 .8rem/1 system-ui,sans-serif; white-space:nowrap; transform:translateX(-50%); animation:reader-head-in .2s ease; }
:where(html.theme-dark) body .simple-page-head.is-reader-collapsed .simple-reader-pill { color:var(--text, var(--text)); } /* dark:gen */
.simple-reader-pill-dots { display:inline-flex; gap:3px; }
.simple-reader-pill-dots:empty { display:none; }
.simple-reader-pill-dots i { width:5px; height:5px; border-radius:50%; background:color-mix(in srgb, var(--muted) 45%, transparent); }
.simple-reader-pill-dots i.on { background:var(--accent); }
@keyframes reader-head-in { from { opacity:0; transform:translateX(-50%) translateY(-6px); } }
body.ui-mode-simple .simple-bottom-nav { transition:transform .25s ease, opacity .2s ease, visibility 0s; }
body.ui-mode-simple:has(.workspace-panel.showing-simple-page:not([hidden]) .simple-page-head.is-reader-collapsed) .simple-bottom-nav { transform:translateY(calc(100% + 40px)); opacity:0; visibility:hidden; pointer-events:none; transition:transform .25s ease, opacity .2s ease, visibility 0s .25s; }
.simple-page:has(.simple-page-head.is-reader-collapsed) .bible-verse-scrubber { bottom:calc(20px + var(--safe-bottom)); height:min(320px, calc(var(--vph) - var(--simple-head-h) - 40px)); }
@media (prefers-reduced-motion:reduce) {
  .simple-reader-strip-indicator, body.ui-mode-simple .simple-bottom-nav { transition:none !important; }
  body .simple-page-head.is-reader-collapsed .simple-reader-pill { animation:none; }
}
@media (max-width:480px) {
  body .simple-page-head.has-custom-nav .simple-page-header-nav { margin-inline:0; padding-top:40px; }
}

@media (max-width:700px) {
  .bible-location-picker-backdrop { place-items:stretch; padding:0; }
  .bible-location-picker { width:100%; height:var(--vph); max-height:none; border:0; border-radius:0; }
  .bible-location-picker-body { padding:8px 9px 18px; }
  .bible-location-picker-search { top:-8px; margin-bottom:10px; padding:0 52px 6px 0; }
  .bible-location-picker-search input { min-height:42px; }
  .bible-location-picker-testament { margin-bottom:18px; }
  .bible-location-picker-testament-heading { margin-bottom:6px; padding-bottom:4px; }
  .bible-location-picker-testament-heading h2,
  .bible-location-picker-testament-toggle .label { font-size:1.04rem; }
  /* Auf kleinen Screens war die Gruppen-Legende ohnehin abgeschnitten – weg
     damit, das schafft Platz für die Buch-Kacheln. */
  .bible-location-picker-legend { display:none; }
  /* Spaltenzahl ergibt sich aus --pick-book-min per auto-fill – keine festen
     Spalten mehr nötig. Nur die Standardwerte enger für kleine Screens; die
     Presets Groß/Sehr groß gewinnen per Spezifität und bleiben großflächig. */
  .bible-location-picker { --pick-book-min:56px; --pick-num-min:52px; --pick-gap:5px; }
  .bible-location-picker-setting-select { flex-direction:column; align-items:stretch; gap:6px; }
  .bible-location-picker-setting-select select { min-width:0; width:100%; }
}

/* ==========================================================================
   SANCTUARY UNIFIED WORKSPACE UI STYLES
   ========================================================================== */

/* 1. Sticky Translation Switcher Pill */
.sanctuary-translation-container {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.sanctuary-translation-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.sanctuary-translation-pill:hover {
  background: var(--panel);
  border-color: var(--accent);
}

.sanctuary-translation-menu {
  position: absolute;
  top: calc(100% + 6px);
  right:0;
  z-index: 1000;
  width:min(360px,calc(var(--vpw) - 24px));
  max-height:min(calc(var(--vph) - 140px), 640px);
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y pinch-zoom;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sanctuary-translation-menu > * {
  flex-shrink: 0;
}

.simple-page-head:has(.sanctuary-translation-menu:not([hidden])) { z-index:10000; }

/* Phones: the translation list is a bottom sheet instead of a dropdown under the pill. */
@media (max-width:760px) {
  .sanctuary-translation-menu,
  .simple-page-head.has-custom-nav .sanctuary-translation-menu {
    position: fixed;
    top: auto;
    left: 0;
    right: var(--fix-right-gap);
    bottom: calc(max(72px, calc(64px + var(--safe-bottom))) + var(--fix-bottom-gap));
    z-index: 9500;
    width: auto;
    min-width: 0;
    max-height: calc(var(--vph) * 0.6);
    border-radius: 18px 18px 0 0;
    padding: 12px;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.28);
  }
  /* backdrop-filter makes the header the containing block of fixed children */
  .simple-page-head:has(.sanctuary-translation-menu:not([hidden])) {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

.sanctuary-translation-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: calc(var(--radius) * 0.7);
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
  width: 100%;
  min-height: 44px;
}

.sanctuary-translation-item.has-selection-marker { display:grid; grid-template-columns:20px minmax(0, 1fr); justify-content:initial; gap:8px; }
.sanctuary-translation-check { text-align:center; }
.sanctuary-translation-item.has-selection-marker > :last-child { overflow-wrap:anywhere; }
.sanctuary-translation-bulk-actions { position:sticky; top:0; z-index:1; display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto; gap:4px; padding:4px 0; background:var(--panel); }
.sanctuary-translation-bulk-actions > button { min-width:0; min-height:36px; padding:4px 8px; font-size:.82rem; }
.sanctuary-translation-done { position:sticky; bottom:0; justify-content:center; border:1px solid var(--line); background:var(--panel); font-weight:700; }

.sanctuary-translation-item:hover,
.sanctuary-translation-item.active {
  background: var(--accent-soft);
  color: var(--accent-text);
  font-weight: 600;
}

.sanctuary-translation-divider {
  width: 100%;
  margin: 4px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.sanctuary-translation-heading {
  padding: 2px 12px 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* 2. Slide-Over Study Inspector */
.sanctuary-study-inspector {
  position: fixed;
  top: 0;
  right: var(--fix-right-gap);
  bottom: var(--fix-bottom-gap);
  width: 420px;
  max-width: calc(var(--vpw) * 0.9);
  z-index: 9998;
  background: var(--panel);
  color: var(--text);
  border-left: 1px solid var(--line);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.36);
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(16px);
  animation: sanctuarySlideInRight 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.sanctuary-study-inspector[hidden] {
  display: none !important;
}

/* Docked (wide screens): a column beside the page instead of a layer above the text. */
body.study-inspector-docked .sanctuary-study-inspector {
  /* Below the desktop menu bar, whose search field and account button stay reachable. */
  top: var(--ribbon-h);
  width: var(--inspector-dock-w);
  max-width: none;
  box-shadow: none;
  animation: none;
}
.sanctuary-inspector-dock-handle {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 7px;
  cursor: ew-resize;
  touch-action: none;
}
.sanctuary-inspector-dock-handle[hidden] { display: none !important; }
.sanctuary-inspector-dock-handle:hover { background: var(--accent-soft); }
.sanctuary-inspector-sheet-handle,
.sanctuary-inspector-sheet-button { display: none; }

.sanctuary-inspector-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex: 1 1 100%; }
.sanctuary-inspector-actions .icon-button { width: 36px; height: 36px; min-width: 0; padding: 0; font-size: 0.95rem; }
/* View helpers (refresh / follow) stay quieter than the content actions next to them;
   the pressed follow toggle fills in so its state reads at a glance. */
.sanctuary-inspector-actions #sanctuaryInspectorRefresh,
.sanctuary-inspector-actions #sanctuaryInspectorFollow { background: transparent; color: var(--accent); border: 1px solid var(--line); }
.sanctuary-inspector-actions #sanctuaryInspectorFollow[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent, #fff); }
.sanctuary-inspector-head { flex-wrap: wrap; gap: 10px; }
.sanctuary-inspector-head h3 { flex: 1 1 100%; min-width: 0; }

.sanctuary-inspector-head {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.sanctuary-inspector-head h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sanctuary-inspector-body {
  /* 20px, nicht 16px: weiter unten stand lange eine zweite Regel für dieselbe
     Klasse, die das padding überschrieben hat. Sie ist entfernt, ihr Wert steht
     jetzt hier - die Darstellung bleibt damit unverändert. */
  padding: 20px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sanctuary-inspector-body .strong-definition-content,
.sanctuary-inspector-body .study-note-content {
  max-height: none;
  overflow-y: visible;
  padding-right: 0;
}

/* 4. Floating Sticky Audio Dock */
.sanctuary-audio-dock {
  position: fixed;
  bottom: calc(24px + var(--fix-bottom-gap));
  left: 50%;
  transform: translateX(-50%);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(640px, calc(var(--vpw) - 32px));
  padding: 10px 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(16px);
}

.sanctuary-audio-info {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.sanctuary-audio-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sanctuary-audio-title {
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}

.sanctuary-audio-subtitle {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sanctuary-audio-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sanctuary-audio-select {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
  font-size: 0.85rem;
  font-weight: 600;
}

@media (max-width: 720px) {
  .sanctuary-study-inspector {
    position: fixed;
    top: auto;
    max-width: none;
    bottom: var(--fix-bottom-gap);
    left: 0;
    right: auto;
    width: var(--vpw);
    height: calc(var(--vph) * var(--inspector-sheet-height, 0.6));
    max-height: calc(var(--vph) - var(--fix-bottom-gap) - var(--safe-top) - 12px);
    border-left: none;
    border-top: 1px solid var(--line);
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.2);
  }
  .sanctuary-inspector-sheet-handle {
    display: flex;
    flex: 0 0 24px;
    align-items: center;
    justify-content: center;
    touch-action: none;
    cursor: ns-resize;
  }
  .sanctuary-inspector-sheet-handle::before {
    content: "";
    width: 40px;
    height: 4px;
    border-radius: 2px;
    background: var(--muted);
  }
  .sanctuary-inspector-actions .sanctuary-inspector-sheet-button { display: inline-flex; }
  .sanctuary-inspector-actions { flex-wrap: wrap; }
  .sanctuary-inspector-actions .icon-button { width: 44px; height: 44px; }
  .sanctuary-study-inspector.is-expanded { height: calc(var(--vph) * 0.94); }
  .sanctuary-study-inspector.is-minimized {
    height: auto;
    bottom: calc(max(84px + var(--safe-bottom), 92px / var(--ui-scale)) + var(--fix-bottom-gap));
  }
  .sanctuary-study-inspector.is-minimized .sanctuary-inspector-body,
  .sanctuary-study-inspector.is-minimized .sanctuary-inspector-sheet-handle,
  .sanctuary-study-inspector.is-minimized .sanctuary-inspector-actions > :not(#sanctuaryInspectorSize):not(#sanctuaryInspectorClose) { display: none; }
  .sanctuary-study-inspector.is-minimized .sanctuary-inspector-head { flex-wrap: nowrap; gap: 6px; padding: 6px 12px; }
  .sanctuary-study-inspector.is-minimized .sanctuary-inspector-head h3 { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sanctuary-study-inspector.is-minimized .sanctuary-inspector-actions { flex: 0 0 auto; }
  .sanctuary-audio-dock {
    bottom: calc(76px + var(--fix-bottom-gap));
    width: calc(var(--vpw) - 24px);
  }
}

/* Dual Pager: Vers-/Stellen-Stepper (◄ / ►) in der Unified Sanctuary Header-Bar */
.ws-bible-verse-stepper {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 6px;
  vertical-align: middle;
}

.ws-bible-verse-stepper .reading-bar-btn {
  width: 26px;
  height: 26px;
  min-width: 26px;
  border-radius: 50%;
  font-size: 0.72rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-hover, rgba(0, 0, 0, 0.04));
  border: 1px solid var(--border-subtle, rgba(0, 0, 0, 0.08));
  color: var(--text);
  transition: background-color 0.15s ease, transform 0.1s ease;
}

.ws-bible-verse-stepper .reading-bar-btn:hover:not(:disabled) {
  background: var(--accent-soft, rgba(79, 47, 216, 0.12));
  color: var(--accent, #4f2fd8);
  transform: scale(1.05);
}
:where(html.theme-dark) .ws-bible-verse-stepper .reading-bar-btn:hover:not(:disabled) { color:var(--accent, #9d8de2); } /* dark:gen */

.ws-bible-verse-stepper .reading-bar-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Sanctuary Header Collection Title Pill Button & Quick Switcher */
.reading-context-bar .reading-context-title-pill,
.reading-context-title-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-hover, rgba(0, 0, 0, 0.04));
  border: 1px solid var(--border-subtle, rgba(0, 0, 0, 0.08));
  border-radius: 9999px;
  padding: 4px 12px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.reading-context-bar .reading-context-title-pill:hover,
.reading-context-title-pill:hover {
  background: var(--accent-soft, rgba(79, 47, 216, 0.12));
  border-color: var(--accent, #4f2fd8);
  color: var(--accent, #4f2fd8);
}
:where(html.theme-dark) .reading-context-bar .reading-context-title-pill:hover, :where(html.theme-dark) .reading-context-title-pill:hover { color:var(--accent, #9d8de2); } /* dark:gen */

/* Floating Sticky Audio Dock */
.sanctuary-audio-dock {
  position: fixed;
  bottom: calc(20px + var(--safe-bottom) + var(--fix-bottom-gap));
  left: 50%;
  -webkit-transform: translateX(-50%) translateZ(0);
  transform: translateX(-50%) translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  z-index: 9995;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--surface-card, #181825);
  color: var(--text-on-dark, #ffffff);
  padding: 10px 20px;
  border-radius: 9999px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35), 0 2px 10px rgba(0, 0, 0, 0.18);
  border: 1px solid var(--accent, #7c3aed);
  backdrop-filter: blur(16px);
  animation: sanctuarySlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  min-width: 320px;
  max-width: calc(var(--vpw) * 0.9);
}

.sanctuary-audio-dock[hidden] {
  display: none !important;
}

.sanctuary-audio-info {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
}

.sanctuary-audio-text {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  line-height: 1.25;
}

.sanctuary-audio-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: #ffffff;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.sanctuary-audio-subtitle {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.sanctuary-audio-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.sanctuary-audio-select {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 9999px;
  padding: 4px 10px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
}
:where(html.theme-dark) .sanctuary-audio-select { background:rgba(27,34,31,0.12); border:1px solid rgba(255,255,255,0.16); } /* dark:gen */

.sanctuary-audio-select option {
  background: #1e1e2d;
  color: #ffffff;
}

@keyframes sanctuarySlideUp {
  from {
    opacity: 0;
    transform: translate(-50%, 20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* Hier standen .sanctuary-inspector-header und .sanctuary-inspector-title:
   beide haben nie gegriffen, das Markup verwendet .sanctuary-inspector-head
   mit einem <h3> (siehe index.html). Sie trugen dieselbe Token-Falle wie oben
   (--border-subtle/--accent mit dunklem Fallback) und hätten bei einer
   Umbenennung sofort wieder zugeschlagen. Ebenfalls entfernt: eine zweite
   Definition von .sanctuary-inspector-body, deren einziger Effekt das größere
   padding war - das steht jetzt direkt in der einzigen Regel weiter oben. */

@keyframes sanctuarySlideInRight {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ===================================================================
   Mobile-Härtung: nichts darf breiter als der Bildschirm werden
   =================================================================== */

/* iOS Safari zoomt beim Fokussieren eines Eingabefelds mit weniger als 16px
   gerenderter Schriftgröße automatisch in die Seite hinein - und zoomt danach
   NICHT zurück. Die Oberfläche bleibt vergrößert und horizontal verschiebbar;
   fixe Leisten und Bottom-Sheets ragen aus dem Bild. Deshalb auf Touch- und
   Schmalgeräten überall mindestens 16px erzwingen. Die Division durch
   --ui-scale rechnet die Schriftgrößen-Einstellung heraus, sodass die
   *gerenderte* Größe die 16px-Schwelle auch bei Verkleinerung nicht
   unterschreitet.

   Die zweite Selektorgruppe wiederholt dieselbe Regel mit [class]: die meisten
   Felder tragen eine Klasse mit eigener font-size (.props-input, .setting-select
   …), die einen reinen Typselektor überstimmen würde. [class] hebt die
   Spezifität auf Klassenniveau und macht die Absicherung damit wirksam, ohne
   !important zu verwenden. */
@media (max-width: 900px), (pointer: coarse) {
  :is(input, select, textarea):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
  :is(input, select, textarea)[class]:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
  .mitschrift-editor .mitschrift-marks {
    font-size: max(calc(16px / var(--ui-scale)), 1em);
  }
}

/* Medien und eingebettete Inhalte nie über ihren Container hinaus. */
img,
svg,
video,
canvas,
iframe,
table {
  max-width: 100%;
}

/* Lange, umbruchlose Zeichenketten (URLs, Strong-Nummern, Referenzketten,
   E-Mail-Adressen) sind der zweite klassische Grund für eine zu breite Seite.
   Auf Schmalgeräten notfalls mitten im Wort umbrechen statt den Viewport
   aufzuspannen; `anywhere` behält im Gegensatz zu `break-word` die normale
   Silbentrennung, wenn der Platz reicht. */
@media (max-width: 760px) {
  body {
    overflow-wrap: anywhere;
  }

  /* `anywhere` schneidet ein zu langes Wort an beliebiger Stelle ab ("Repertoir|e").
     Überschriften, Titel und Beschriftungen trennen vorher nach Silben mit
     Trennstrich; Bibel- und Fließtext bleiben ungetrennt. */
  :is(h1, h2, h3, h4, strong, button, label, summary, .simple-eyebrow, .simple-home-eyebrow, .action-card-text) {
    -webkit-hyphens: auto;
    hyphens: auto;
  }

  /* Ausnahme: horizontal scrollbare Bereiche (Tabellen, Code) sollen weiterhin
     scrollen statt umzubrechen. */
  pre,
code,
[data-scroll-x] {
    overflow-wrap: normal;
  }
}

/* ── Mitschrift ────────────────────────────────────────────────────────────
   Der Notizblock, der die Navigation überlebt (siehe app-mitschrift.js). Drei
   Erscheinungsformen, ein Inhalt:
     .mitschrift.is-sheet  – Handy: Bottom-Sheet, Rastpunkte halb/voll
     .mitschrift           – Desktop: freies Fenster (Geometrie inline aus JS)
     .mitschrift.is-dock   – Desktop: rechts angedockt, nimmt der App Platz weg
   Alle Maße über --vpw/--vph/--safe-*, nie über rohe vw/vh: bei gesetztem
   Wurzel-`zoom` blähen die rohen Einheiten den Viewport auf (siehe Kopf dieser
   Datei). */
.mitschrift-pill {
  position: fixed;
  right: calc(12px + var(--fix-right-gap));
  /* Über der unteren Navigation (52px Knopf + Polster), damit die Pille sie
     nicht verdeckt - sie soll danebenliegen, nicht davor. */
  bottom: calc(max(12px, var(--safe-bottom)) + var(--fix-bottom-gap) + 78px);
  z-index: 9320;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 23px;
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 10px 30px rgba(31, 45, 39, .22);
}
.mitschrift-pill[hidden] { display: none !important; }
/* Waehrend eine Wortauswahl im Verstext steht, gehoert der untere Streifen der
   Auswahlleiste. Die Pille liegt mit z-index 9320 darueber und verdeckte sonst
   deren rechte Seite - und im Text darunter die iOS-Ziehgriffe, mit denen die
   Auswahl erweitert wird. Gesetzt aus refreshVerseHighlightBar. */
.mitschrift-pill.mitschrift-pill-selection-aside { display: none; }
.mitschrift-pill:hover,
.mitschrift-pill:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}
.mitschrift-pill-count:empty { display: none; }
.mitschrift-pill.has-count .mitschrift-pill-count {
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: .8rem;
  font-weight: 750;
}
.mitschrift-pill-title { max-width:180px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mitschrift-session-list { display:grid; gap:9px; text-align:left; }
/* Quittung für ein "+1", während die Mitschrift zugeklappt ist: ohne sie wüsste
   man nicht, ob das Übernehmen aus dem Lexikon angekommen ist. */
.mitschrift-pill.is-flashing {
  animation: mitschrift-pill-flash .9s ease;
}
@keyframes mitschrift-pill-flash {
  0%   { transform: scale(1); }
  25%  { transform: scale(1.12); box-shadow: 0 0 0 6px var(--accent-soft); }
  100% { transform: scale(1); }
}

.mitschrift {
  position: fixed;
  z-index: 9400;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 24px 60px rgba(31, 45, 39, .26);
  overflow: hidden;
  overscroll-behavior: contain;
}
.mitschrift[hidden] { display: none !important; }
.mitschrift.is-maximized {
  left: 8px !important;
  top: 8px !important;
  width: calc(var(--vpw) - 16px) !important;
  height: calc(var(--vph) - 16px) !important;
}

.mitschrift-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  cursor: move;
  touch-action: none;
}
.mitschrift-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mitschrift-title-wrap { flex:1; min-width:0; display:grid; gap:1px; }
.mitschrift-session-meta { overflow:hidden; color:var(--muted); font-size:.72rem; text-overflow:ellipsis; white-space:nowrap; }
.mitschrift-head-actions {
  display: flex;
  gap: 2px;
}
.mitschrift-head-btn {
  min-height: 0;
  padding: 6px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
}
.mitschrift-head-btn:hover,
.mitschrift-head-btn:focus-visible {
  background: var(--accent-soft);
  color: var(--accent);
}
.mitschrift-head-btn[hidden] { display: none !important; }
/* Der Griff ist auf dem Handy die Rastpunkt-Geste; auf dem Desktop wird am
   ganzen Kopf gezogen, dort wäre er nur Zierde. */
.mitschrift-grip { display: none; }
.mitschrift.is-sheet .mitschrift-head {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "grip grip" "title actions";
  gap: 8px;
  cursor: default;
}
.mitschrift.is-sheet .mitschrift-grip {
  display: block;
  grid-area: grip;
  width: 44px;
  height: 5px;
  margin: 0 auto;
  border-radius: 3px;
  background: var(--line);
  touch-action: none;
  cursor: ns-resize;
}
.mitschrift.is-sheet .mitschrift-title-wrap { grid-area: title; }
.mitschrift.is-sheet .mitschrift-head-actions { grid-area: actions; }

.mitschrift-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-height: 0;
  padding: 10px 12px;
  overscroll-behavior: contain;
}
.mitschrift-quick {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  flex: 0 0 auto;
}
.mitschrift-quick input { min-width: 0; }
.mitschrift-quick-add {
  min-width: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--muted);
}
.mitschrift-quick-add:hover,
.mitschrift-quick-add:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}
.mitschrift-quick-preview {
  flex: 0 0 auto;
  margin: 0;
  color: var(--accent);
  font-size: .9rem;
  font-weight: 700;
}
.mitschrift-toolbar { flex: 0 0 auto; }
.mitschrift-toolbar .markdown-toolbar-btn { font-size: 16px; }
@media (max-width: 760px) {
  .mitschrift-toolbar .markdown-toolbar { flex-wrap: nowrap; }
  .mitschrift-toolbar .markdown-toolbar-btn { flex: 1 1 0; }
}
/* Der einzige Knopf der Leiste, der abgeschaltet sein kann - ohne alleinstehend
   notierte Stelle gibt es nichts umzuwandeln. */
.mitschrift-convert-btn:disabled {
  opacity: .4;
  cursor: default;
}
.mitschrift-convert-btn:disabled:hover {
  background: transparent;
  color: var(--muted);
}
/* Schreibfläche und Unterlegung sind zwei Ebenen desselben Kastens: die
   Textarea liegt durchsichtig über einer Kopie ihres Textes, in der die
   erkannten Stellen farbig hinterlegt sind. Der Hintergrund gehört deshalb an
   den Rahmen, nicht an die Textarea - sonst deckt sie die Farben zu. */
.mitschrift-editor {
  position: relative;
  display: flex;
  flex: 1;
  min-height: 0;
  border-radius: var(--radius);
  background: var(--bg);
  overscroll-behavior: contain;
}
.mitschrift-input {
  flex: 1;
  width: 100%;
  min-height: 0;
  box-sizing: border-box;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  font: inherit;
  line-height: 1.55;
  resize: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}
/* Die Oberflächen setzen ihren Feldhintergrund über `body.… textarea` - das ist
   spezifischer als eine einzelne Klasse und deckte die Unterlegung wieder zu.
   Zwei Klassen stechen das in jeder Oberfläche. */
.mitschrift-editor .mitschrift-input { background: transparent; }
.mitschrift-input:focus {
  outline: none;
  border-color: var(--accent);
}
.mitschrift-input.is-mod-down { cursor: pointer; }
.mitschrift-preview-btn[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.mitschrift-preview { flex: 1; min-height: 0; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--text); line-height: 1.55; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; -webkit-overflow-scrolling: touch; }
.mitschrift-preview[hidden], .mitschrift-editor[hidden] { display: none !important; }
.mitschrift-preview > :first-child { margin-top: 0; }
.mitschrift-preview > :last-child { margin-bottom: 0; }
.mitschrift-preview-link, .mitschrift-preview a[href^="#mitschrift-"] { display: inline-flex; align-items: center; gap: 4px; min-height: 0; padding: 1px 7px; border: 1px solid var(--line); border-radius: 10px; background: var(--accent-soft); color: var(--accent); font: inherit; font-size: .92em; font-weight: 650; line-height: 1.35; text-decoration: none; cursor: pointer; }
.mitschrift-preview-link:hover, .mitschrift-preview-link:focus-visible, .mitschrift-preview a[href^="#mitschrift-"]:hover, .mitschrift-preview a[href^="#mitschrift-"]:focus-visible { border-color: var(--accent); }
/* Deckungsgleich mit dem Innenkasten der Textarea: top/left/bottom setzen den
   Rand ab (1px Rahmen), die Breite kommt aus renderMitschriftMarks - nur die
   kennt einen Rollbalken, und der würde sonst den Zeilenumbruch verschieben. */
.mitschrift-marks {
  position: absolute;
  top: 1px;
  left: 1px;
  bottom: 1px;
  box-sizing: border-box;
  padding: 12px;
  overflow: hidden;
  font: inherit;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  color: transparent;
  pointer-events: none;
}
.mitschrift-mark {
  border-radius: 3px;
  color: transparent;
  background: transparent;
}
.mitschrift-mark.is-ok {
  background: color-mix(in srgb, var(--success, #22a060) 20%, transparent);
}
/* Nicht nur Farbe: die Wellenlinie sagt auch ohne Farbunterscheidung, dass hier
   etwas nicht aufgeht - dieselbe Sprache wie die Rechtschreibprüfung. */
.mitschrift-mark.is-bad {
  background: color-mix(in srgb, var(--danger, #d93025) 18%, transparent);
  text-decoration: underline wavy var(--danger, #d93025);
  text-underline-offset: 3px;
}
/* Die erkannten Stellen als Chip-Zeile: eine Zeile hoch, waagerecht scrollend.
   Mehr Platz darf sie nicht nehmen - geschrieben wird oben. */
.mitschrift-chips {
  display: flex;
  gap: 6px;
  flex: 0 0 auto;
  overflow-x: auto;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-inline: contain;
  touch-action: pan-x;
}
.mitschrift-chips[hidden] { display: none !important; }
.mitschrift-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--bg);
  color: var(--text);
  font-size: .88rem;
  white-space: nowrap;
}
.mitschrift-chip:hover,
.mitschrift-chip:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}
.mitschrift-foot {
  display: flex;
  gap: 10px;
  flex: 0 0 auto;
  justify-content: flex-end;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.mitschrift-foot button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.mitschrift-resize-handle {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 18px;
  height: 18px;
  cursor: nwse-resize;
  touch-action: none;
  background:
    linear-gradient(135deg, transparent 0 40%, var(--muted) 40% 46%, transparent 46% 100%),
    linear-gradient(135deg, transparent 0 65%, var(--muted) 65% 71%, transparent 71% 100%);
  opacity: .55;
}
.mitschrift-resize-handle[hidden] { display: none !important; }
.mitschrift-dock-handle {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 7px;
  cursor: ew-resize;
  touch-action: none;
}
.mitschrift-dock-handle[hidden] { display: none !important; }
.mitschrift-dock-handle:hover { background: var(--accent-soft); }
.mitschrift-split-handle { position: absolute; left: 0; right: 0; top: 0; height: 7px; cursor: ns-resize; touch-action: none; z-index: 2; }
body:not(.mitschrift-docked.study-inspector-docked) .mitschrift-split-handle, .mitschrift-split-handle[hidden] { display: none !important; }
.mitschrift-split-handle:hover { background: var(--accent-soft); }

/* Angedockt: kein Fenster mehr, sondern die rechte Spalte unterhalb der Desktop-Leiste (--ribbon-h). */
.mitschrift.is-dock {
  left: auto !important;
  top: var(--ribbon-h, 0px) !important;
  right: var(--fix-right-gap);
  bottom: var(--fix-bottom-gap);
  width: var(--right-dock-w) !important;
  height: auto !important;
  border-radius: 0;
  border-right: 0;
  border-top: 0;
  border-bottom: 0;
}
body.mitschrift-docked .shell,
body.study-inspector-docked .shell {
  padding-right: var(--right-dock-w);
}
body.mitschrift-docked .sanctuary-study-inspector {
  right: calc(var(--fix-right-gap) + var(--mitschrift-dock-w));
}
body.mitschrift-docked.study-inspector-docked .sanctuary-study-inspector { right: var(--fix-right-gap); width: var(--right-dock-w); bottom: calc(var(--fix-bottom-gap) + (var(--vph) - var(--ribbon-h, 0px) - var(--fix-bottom-gap)) * (1 - var(--right-dock-split, 0.48))); border-bottom: 1px solid var(--line); }
body.mitschrift-docked.study-inspector-docked .mitschrift.is-dock { top: calc(var(--ribbon-h, 0px) + (var(--vph) - var(--ribbon-h, 0px) - var(--fix-bottom-gap)) * var(--right-dock-split, 0.48)) !important; width: var(--right-dock-w) !important; border-top: 1px solid var(--line); }
body.mitschrift-docked .simple-bottom-nav,
body.study-inspector-docked .simple-bottom-nav {
  left: max(12px, calc((var(--vpw) - var(--right-dock-w) - 560px) / 2));
  right: max(calc(12px + var(--right-dock-w)), calc((var(--vpw) - var(--right-dock-w) - 560px) / 2 + var(--right-dock-w)));
}
body.mitschrift-docked .mitschrift-pill,
body.study-inspector-docked .mitschrift-pill {
  right: calc(12px + var(--fix-right-gap) + var(--right-dock-w));
}

/* Bottom-Sheet: die Handy-Hülle. Kein Ziehen/Resizen - dort rastet man. */
.mitschrift.is-sheet {
  left: 0 !important;
  right: 0;
  top: auto !important;
  bottom: var(--fix-bottom-gap);
  width: var(--vpw) !important;
  height: calc(var(--vph) * .5) !important;
  border-radius: 20px 20px 0 0;
  border-bottom: 0;
  padding-bottom: var(--safe-bottom);
  transition: height .18s ease;
}
.mitschrift.is-sheet.is-full {
  height: calc(var(--vph) * .92) !important;
}
/* Während der Ziehgeste setzt JS die Höhe direkt - eine Transition würde ihr
   hinterherlaufen und sich zäh anfühlen. */
.mitschrift.is-sheet.is-dragging {
  transition: none;
}

/* Über allem, was Text zeigt, in dem man markieren kann: Dialoge (10200),
   Changelog (10000), Studien-Inspector (9998), Lernpanel und Vorleser (9997).
   Auf 9500 lag der Chip zwar richtig, war aber hinter genau diesen Flächen
   verdeckt und nicht anklickbar - "Mitschrift läuft, geht trotzdem nicht". */
.mitschrift-selection-chip {
  position: fixed;
  z-index: 10600;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--accent);
  border-radius: 17px;
  background: var(--panel);
  color: var(--accent);
  font-size: .88rem;
  white-space: nowrap;
  box-shadow: 0 8px 22px rgba(31, 45, 39, .22);
}
.mitschrift-selection-chip[hidden] { display: none !important; }
.mitschrift-selection-chip span:last-child { overflow: hidden; text-overflow: ellipsis; }
/* Am Rand geparkt trägt der Chip die ersten Worte der Markierung statt der
   Aktion (die steht dann im title). Der Textausschnitt darf dabei nicht über
   den Schirm laufen - --vpw statt vw, weil vw unter dem Wurzel-Zoom der
   UI-Skalierung zu große Werte liefert. */
.mitschrift-selection-chip.is-parked { max-width: min(calc(var(--vpw) * .6), 320px); }

/* Im einfachen UI-Modus dieselbe warme Palette wie Sheets und Dialoge dort
   (siehe body.ui-mode-simple weiter oben) - sonst stünde ein graues Fenster
   in einer beigen App. */
body.ui-mode-simple .mitschrift,
body.ui-mode-simple .mitschrift-pill,
body.ui-mode-simple .mitschrift-selection-chip {
  border-color: #d9d6cd;
  background: #fffdf8;
  color: #27312d;
}
:where(html.theme-dark) body.ui-mode-simple .mitschrift, :where(html.theme-dark) body.ui-mode-simple .mitschrift-pill, :where(html.theme-dark) body.ui-mode-simple .mitschrift-selection-chip { border-color:var(--line); background:var(--panel); color:var(--text); } /* dark:gen */
body.ui-mode-simple .mitschrift-head,
body.ui-mode-simple .mitschrift-foot {
  border-color: #dedbd3;
  background: linear-gradient(135deg, #e8f0eb, #fffdf8);
}
:where(html.theme-dark) body.ui-mode-simple .mitschrift-head, :where(html.theme-dark) body.ui-mode-simple .mitschrift-foot { border-color:var(--line); background:linear-gradient(135deg, color-mix(in srgb, var(--text) 4%, var(--panel)), var(--panel)); } /* dark:gen */
body.ui-mode-simple .mitschrift-chip,
body.ui-mode-simple .mitschrift-quick-add {
  border-color: #d8d8d1;
  background: #fff;
  color: #27312d;
}
:where(html.theme-dark) body.ui-mode-simple .mitschrift-chip, :where(html.theme-dark) body.ui-mode-simple .mitschrift-quick-add { border-color:var(--line); background:var(--panel); color:var(--text); } /* dark:gen */
/* Die Textarea bleibt auch hier durchsichtig, damit die Unterlegung der
   erkannten Stellen sichtbar ist; der Hintergrund sitzt am Rahmen. */
body.ui-mode-simple .mitschrift-input {
  border-color: #d8d8d1;
  color: #27312d;
}
:where(html.theme-dark) body.ui-mode-simple .mitschrift-input { border-color:var(--line); color:var(--text); } /* dark:gen */
body.ui-mode-simple .mitschrift-editor { background: #fff; }
:where(html.theme-dark) body.ui-mode-simple .mitschrift-editor { background:var(--panel); } /* dark:gen */
body.ui-mode-simple .mitschrift-title { color: #315246; }
:where(html.theme-dark) body.ui-mode-simple .mitschrift-title { color:#c2dbd2; } /* dark:gen */
body.ui-mode-simple .mitschrift-selection-chip { color: #3e6b59; border-color: #3e6b59; }
:where(html.theme-dark) body.ui-mode-simple .mitschrift-selection-chip { color:#b9d7cb; } /* dark:gen */

/* ── Sammlungsordner ──────────────────────────────────────────────────────
   Ablage für eigene Sammlungen UND die daraus veröffentlichten Freigaben
   (app-collection-folders.js). Bewusst nah an den vorhandenen Listen-/
   Eigenschaften-Stilen, damit ein Ordner-Abschnitt aussieht wie jeder andere
   Abschnitt der Bibliothek. */
.simple-list-category-head-actions { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.props-folder-row { display: flex; gap: 8px; align-items: center; }
.props-folder-row .props-select { flex: 1 1 auto; min-width: 0; }

.ui-dialog-modal:has(.folder-manager) { width: min(1040px, 100%); max-width: 1040px; }
.folder-manager { display: flex; flex-direction: column; gap: 16px; text-align: left; min-width: 0; width: 100%; }
.folder-manager-title { margin: 0; font-size: 1.2rem; }
.folder-manager > .note { margin: 0; }
.folder-manager-list { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.folder-manager-row { min-width: 0; margin-left: calc(var(--depth, 0) * 20px); border: 1px solid var(--line); border-radius: 12px; }
.folder-manager-row > summary { padding: 14px 16px; cursor: pointer; overflow-wrap: anywhere; }
.folder-manager-row > summary strong { margin-right: 12px; }
.folder-manager-row[open] > summary { border-bottom: 1px solid var(--line); background: var(--surface); border-radius: 12px 12px 0 0; }
.folder-manager-editor { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 16px; min-width: 0; }
.folder-manager-field, .folder-manager-description { min-width: 0; display: flex; flex-direction: column; gap: 6px; font-size: .85rem; font-weight: 700; }
.folder-manager-field input, .folder-manager-description textarea { width: 100%; min-width: 0; font-size: 1rem; font-weight: 400; }
.folder-manager-public-fields { grid-column: 1 / -1; min-width: 0; border-top: 1px solid var(--line); }
.folder-manager-public-fields > summary { padding: 12px 0; cursor: pointer; font-weight: 600; }
.folder-manager-translations, .folder-manager-descriptions { display: grid; grid-template-columns: 1fr 1fr; min-width: 0; gap: 12px; margin-bottom: 12px; }
.folder-manager-description-hint { grid-column: 1 / -1; margin: 0; }
.folder-manager-description textarea { resize: vertical; min-height: 110px; }
.folder-manager-counts { font-size: .8rem; color: var(--muted); }
.folder-manager-public { grid-column: 1 / -1; font-size: .9rem; font-weight: 700; overflow-wrap: anywhere; }
.folder-manager summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.folder-manager button, .folder-manager input, .folder-manager select { min-height: 44px; }
.folder-manager-actions { grid-column: 1 / -1; }
.folder-manager-actions .icon-button { min-width: 44px; }
@media (max-width: 600px) {
  .folder-manager-editor, .folder-manager-translations, .folder-manager-descriptions { grid-template-columns: minmax(0, 1fr); }
  .folder-manager-editor { padding: 12px; }
  .folder-manager-row { margin-left: calc(var(--depth, 0) * 10px); }
  .folder-manager-row > summary { padding: 12px; }
  .folder-manager-counts { display: block; margin-top: 4px; }
}

.public-language-links { display: grid; gap: 10px; min-width: 0; }
.public-language-links h3 { margin: 6px 0 0; }
.public-language-link { display: grid; gap: 6px; min-width: 0; }
.public-language-link .form-row { align-items: stretch; }
.public-language-link input { min-width: 0; flex: 1 1 240px; }
.public-language-open { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); text-decoration: none; }
@media (max-width: 520px) { .public-language-link .form-row { flex-wrap: wrap; } .public-language-link input { flex-basis: 100%; } }
.folder-manager-actions { display: inline-flex; gap: 4px; margin-left: auto; }
.folder-manager-parent-field { display: flex; flex-direction: column; gap: 4px; flex: 1 1 100%; min-width: 0; font-size: .8rem; font-weight: 700; }
.folder-manager-parent-field small { font-weight: 400; color: var(--muted); }
.folder-manager-parent { font-size: .8rem; font-weight: 400; padding: 8px; min-width: 0; width: 100%; }
.folder-manager-add { display: flex; gap: 8px; align-items: center; }
.folder-manager-add .props-input { flex: 1 1 auto; min-width: 0; }

/* Ordnerkopf über den eigenen Freigaben - dieselbe Gliederung wie in der
   Bibliothek, damit "veröffentlicht" und "eigene Sammlung" nicht zwei
   verschiedene Ablagen zu sein scheinen. */
.ws-share-group-head { display: flex; align-items: baseline; gap: 10px; margin: 12px 0 4px; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; opacity: .7; }
.ws-share-group-head:first-child { margin-top: 0; }
.ws-share-group-link { font-size: .75rem; font-weight: 700; text-transform: none; letter-spacing: 0; }
.language-edition-form {
  max-height: min(calc(var(--vph) * 0.68), 720px);
  overflow-y: auto;
  padding-right: 4px;
}

.language-edition-form h3 {
  margin: 8px 0 0;
}

.language-edition-progress {
  margin: 4px 0 0;
  font-weight: 650;
}

.language-edition-publication {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

.language-edition-publication input {
  width: 100%;
  box-sizing: border-box;
  font-family: var(--mono);
  font-size: 13px;
}

.language-edition-publication-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ── Ersteinrichtung (app-onboarding.js) ─────────────────────────────────────
   Vollflächiger Assistent über allem anderen (Bibelstellen-Dialog liegt bei
   11000). Die Karte scrollt intern, damit auch bei 200 % Schriftgröße Kopf und
   Fußzeile mit den Navigationsknöpfen erreichbar bleiben. */
.onboarding-backdrop {
  position: fixed;
  inset: 0 var(--fix-right-gap) var(--fix-bottom-gap) 0;
  z-index: 12000;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(17, 24, 39, 0.55);
  backdrop-filter: blur(8px);
}

.onboarding-backdrop[hidden] { display: none !important; }

/* Hintergrund nicht mitscrollen lassen, solange der Assistent offen ist. Das
   Wurzelelement muss mit gesperrt werden: es trägt die Schriftgrößen-Zoomstufe
   und scrollt sonst weiter, auch wenn der Body gesperrt ist. */
body.onboarding-open,
html:has(body.onboarding-open) { overflow: hidden; }

.onboarding-modal {
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: min(640px, 100%);
  max-height: calc(var(--vph) - 32px);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) * 1.5);
  color: var(--text);
  background: var(--panel);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.onboarding-head {
  display: grid;
  gap: 6px;
  padding: 20px 24px 14px;
  border-bottom: 1px solid var(--line);
}

.onboarding-counter {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.onboarding-head h2 { margin: 0; font-size: 22px; }

.onboarding-lead { margin: 0; color: var(--muted); }

.onboarding-progress { display: flex; gap: 6px; margin-top: 8px; }

.onboarding-dot {
  width: 22px;
  height: 4px;
  border-radius: 2px;
  background: var(--line);
}

.onboarding-dot.done { background: color-mix(in srgb, var(--accent) 55%, transparent); }
.onboarding-dot.current { background: var(--accent); }

.onboarding-body {
  display: grid;
  gap: 18px;
  align-content: start;
  padding: 20px 24px;
  overflow-y: auto;
}

.onboarding-section { display: grid; gap: 10px; }
.onboarding-section h3 { margin: 0; font-size: 15px; }
.onboarding-hint { margin: 0; color: var(--muted); font-size: 13px; }

.onboarding-agenda { margin: 0; padding-left: 20px; display: grid; gap: 6px; }

/* Sprachwahl auf der ersten Seite: als Auswahlfeld statt als eigener Schritt.
   Der Abstand ist kleiner als das Raster des Rumpfes, damit Feld und Hinweis
   darunter als eine Einheit lesen. */
.onboarding-language {
  display: grid;
  gap: 6px;
  margin-bottom: -10px;
  font-weight: 600;
}

.onboarding-language select { min-height: 40px; }

.onboarding-sample {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

.onboarding-sample-reference {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.onboarding-sample-text { margin: 0; line-height: 1.55; }

.onboarding-scale-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.onboarding-scale-row input[type="range"] { flex: 1; min-width: 0; }

.onboarding-scale-value {
  min-width: 56px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.onboarding-choices { display: grid; gap: 10px; }

.onboarding-choice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}

.onboarding-choice.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* Global gilt `input, textarea { width: 100% }`, und nur Checkboxen werden davon
   ausgenommen. Ohne diese feste Breite füllt der Radiobutton die ganze Karte und
   drückt die Beschriftung auf null. min-width:0 erlaubt dem Text danach, statt
   überzulaufen umzubrechen. */
.onboarding-choice input[type="radio"],
.onboarding-check input[type="checkbox"] {
  flex: 0 0 auto;
  width: 18px;
  margin-top: 3px;
}

.onboarding-choice-body { flex: 1; min-width: 0; display: grid; gap: 4px; }
.onboarding-choice-body small { color: var(--muted); }
.onboarding-choice-body .onboarding-preview { justify-self: start; margin-top: 6px; }

.onboarding-check-list { display: grid; gap: 8px; }

/* Überschrift über einer sprachlich gruppierten Übersetzungsliste. */
.onboarding-group-heading {
  margin: 4px 0 -2px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Muster für die Kontrastwahl. Beide Varianten tragen ihre Farben selbst, statt
   von den Tokens zu erben - nur so stehen sie vergleichbar nebeneinander,
   unabhängig davon, was gerade eingestellt ist. Die Werte spiegeln die echten
   Paletten (einfache Oberfläche bzw. body.contrast-high). */
.onboarding-contrast-sample {
  --ocs-bg: #fffdf8;
  --ocs-text: #27312d;
  --ocs-muted: #6b7472;
  --ocs-line: #dedbd3;
  --ocs-accent: #3e6b59;
  display: grid;
  gap: 5px;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid var(--ocs-line);
  border-radius: var(--radius);
  color: var(--ocs-text);
  background: var(--ocs-bg);
}

.onboarding-contrast-sample[data-contrast="high"] {
  --ocs-bg: #ffffff;
  --ocs-text: #101114;
  --ocs-muted: #3f4550;
  --ocs-line: #6b7280;
  --ocs-accent: #1f4d3c;
}

.onboarding-contrast-sample .ocs-reference { color: var(--ocs-muted); font-size: 12px; font-weight: 600; }
.onboarding-contrast-sample .ocs-text { font-size: 14px; line-height: 1.4; }
.onboarding-contrast-sample .ocs-hint {
  padding-top: 5px;
  border-top: 1px solid var(--ocs-line);
  color: var(--ocs-muted);
  font-size: 12px;
}

.onboarding-contrast-sample .ocs-button {
  justify-self: start;
  padding: 4px 12px;
  border-radius: 6px;
  color: #fff;
  background: var(--ocs-accent);
  font-size: 12px;
  font-weight: 600;
}

html.theme-dark .onboarding-contrast-sample {
  --ocs-bg: #222222;
  --ocs-text: #f2f2f2;
  --ocs-muted: #a3a3a3;
  --ocs-line: #3d3d3d;
  --ocs-accent: #82c9a8;
}
html.theme-dark .onboarding-contrast-sample[data-contrast="high"] {
  --ocs-bg: #131313;
  --ocs-text: #ffffff;
  --ocs-muted: #d5d5d5;
  --ocs-line: #8a8a8a;
  --ocs-accent: #8fe0b8;
}

/* Farbmuster der Bibelbereiche - gefüllte Kacheln wie im Bibelstellen-Dialog. */
.onboarding-color-preview { display: flex; flex-wrap: wrap; gap: 6px; }

.onboarding-color-chip {
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
}

.onboarding-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.onboarding-check small { display: block; color: var(--muted); font-size: 12px; }

.onboarding-field { display: grid; gap: 5px; }
.onboarding-field > span { font-weight: 600; font-size: 14px; }
.onboarding-field small { color: var(--muted); font-size: 12px; }

.onboarding-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  border-top: 1px solid var(--line);
}

/* Der Skip-Link steht in der Mitte, "Weiter" immer ganz rechts. */
.onboarding-skip { margin-left: auto; }
.onboarding-foot > button:last-child { margin-left: auto; }
.onboarding-skip + button { margin-left: 0; }

/* Die Studienquellen-Gruppe wird aus den Einstellungen wiederverwendet. */
.onboarding-study-sources { display: grid; gap: 8px; }
.onboarding-study-sources label { display: flex; align-items: center; gap: 8px; }

@media (max-width: 560px) {
  .onboarding-backdrop { padding: 0; }
  .onboarding-modal {
    width: 100%;
    max-height: var(--vph);
    border: 0;
    border-radius: 0;
  }
  .onboarding-head { padding: 16px 16px 12px; }
  .onboarding-body { padding: 16px; }
  .onboarding-foot { padding: 12px 16px; }
}

/* ── Hoher Kontrast (Einstellungen / Ersteinrichtung) ────────────────────────
   Kein eigenes Theme, sondern kräftigere Werte derselben Farbtokens. Steht am
   Ende der Datei und trägt die Hero-Selektoren mit, weil die einfache
   Oberfläche --bg/--line/--muted/--hero-* über
   `body.ui-mode-simple[data-hero-mood="…"]` (Spezifität 0,2,1) setzt; ohne die
   zusätzliche Klasse im Selektor bliebe die Verstärkung dort wirkungslos.
   Der dekorative Farbschleier hinter der Oberfläche wird mit abgeschaltet - er
   senkt genau den Kontrast, um den es hier geht. */
body.contrast-high,
body.ui-mode-simple.contrast-high[data-hero-mood="soft"],
body.ui-mode-simple.contrast-high[data-hero-mood="strong"],
body.ui-mode-simple.contrast-high[data-hero-mood="vivid"],
body.ui-mode-simple.contrast-high[data-hero-mood="bold"],
body.ui-mode-simple.contrast-high[data-hero-mood="picture"] {
  --bg: #ffffff;
  --panel: #ffffff;
  --text: #101114;
  --muted: #3f4550;
  --line: #6b7280;
  --danger: #8f1a12;
  --hero-paper: #ffffff;
  --hero-line: #6b7280;
  --hero-decor: #101114;
  --hero-field-opacity: 0;
  --hero-strip: 0;
}

/* Die Akzentfarbe bleibt bei der jeweiligen Hausfarbe, nur dunkler: violett in
   der klassischen, gruen in der einfachen Oberflaeche. Deshalb steht sie nicht
   im Block oben - der traegt die Hero-Selektoren und wuerde die einfache
   Oberflaeche sonst mit auf Violett ziehen. */
body.contrast-high {
  --accent: #3b1fa8;
  --accent-soft: #e4dcff;
}

body.ui-mode-simple.contrast-high,
body.ui-mode-simple.contrast-high[data-hero-mood="soft"],
body.ui-mode-simple.contrast-high[data-hero-mood="strong"],
body.ui-mode-simple.contrast-high[data-hero-mood="vivid"],
body.ui-mode-simple.contrast-high[data-hero-mood="bold"],
body.ui-mode-simple.contrast-high[data-hero-mood="picture"] {
  --accent: #1f4d3c;
  --accent-soft: #d7e8de;
}

html.theme-dark body.contrast-high,
html.theme-dark body.ui-mode-simple.contrast-high[data-hero-mood="soft"],
html.theme-dark body.ui-mode-simple.contrast-high[data-hero-mood="strong"],
html.theme-dark body.ui-mode-simple.contrast-high[data-hero-mood="vivid"],
html.theme-dark body.ui-mode-simple.contrast-high[data-hero-mood="bold"],
html.theme-dark body.ui-mode-simple.contrast-high[data-hero-mood="picture"] {
  --bg: #000000;
  --panel: #131313;
  --text: #ffffff;
  --muted: #d5d5d5;
  --line: #8a8a8a;
  --danger: #ff8a80;
  --hero-paper: #131313;
  --hero-line: #8a8a8a;
  --hero-decor: #ffffff;
}

/* Light accents: text on them turns black (also in the simple UI). */
html.theme-dark body.contrast-high {
  --accent: #c9b6ff;
  --accent-soft: #241a45;
  --on-accent: #000000;
}

html.theme-dark body.ui-mode-simple.contrast-high {
  --accent: #8fe0b8;
  --accent-soft: #102a20;
}

/* Flächen der einfachen Oberfläche, die ihre Farben fest verdrahtet haben und
   deshalb keinem Token folgen. */
:is(body.contrast-high, html.theme-dark body) .simple-page-head,
:is(body.contrast-high, html.theme-dark body:not(.nav-glass)) .simple-bottom-nav,
:is(body.contrast-high, html.theme-dark body) .simple-lists-filter,
:is(body.contrast-high, html.theme-dark body) .simple-bible-search-nav,
:is(body.contrast-high, html.theme-dark body) .simple-bible-filter-heading,
:is(body.contrast-high, html.theme-dark body) .simple-bible-filter.mobile-open,
:is(body.contrast-high, html.theme-dark body) .bible-location-picker-search {
  border-color: var(--line);
  color: var(--text);
  background: var(--panel);
}

/* Headings and header tools without a surface of their own sit directly on
   --hero-paper but hard-code dark text, which was dark on black in dark high
   contrast. The back button's hover surface follows the tokens as well. */
:is(body.contrast-high, html.theme-dark body) .simple-page-head h1,
:is(body.contrast-high, html.theme-dark body) .simple-page-back,
:is(body.contrast-high, html.theme-dark body) .simple-page-menu,
:is(body.contrast-high, html.theme-dark body) .simple-section-head h2,
:is(body.contrast-high, html.theme-dark body) .simple-section-heading,
:is(body.contrast-high, html.theme-dark body) .offline-installed-section h3 {
  color: var(--text);
}
:is(body.contrast-high, html.theme-dark body) .simple-page-back:hover {
  border-color: var(--line);
  background: var(--panel);
}
/* Reader head: glass controls hard-code dark text; the strip's white active tab
   was white on white. */
:is(body.contrast-high, html.theme-dark body) .simple-page-head.is-reader-head :is(.simple-page-back, .simple-chapter-tools-toggle:not([aria-expanded="true"])).glass,
:is(body.contrast-high, html.theme-dark body) .simple-bible-chapter-nav.in-header .simple-nav-btn,
:is(body.contrast-high, html.theme-dark body) .simple-bible-chapter-nav.in-header .simple-bible-location-button {
  color: var(--text);
}
:is(body.contrast-high, html.theme-dark body) .simple-reader-strip-indicator,
:is(body.contrast-high, html.theme-dark body) .simple-reader-strip[data-layout="stack"] .simple-reader-strip-tab.on {
  background: var(--panel);
  box-shadow: 0 0 0 1px var(--line);
}

/* Der Bibelstellen-Dialog verdrahtet seine Flächen ebenfalls fest (helles
   Papier, dunkle Schrift). Bisher hing nur seine Suchleiste an den Tokens - im
   dunklen Hoch-Kontrast-Modus sass damit eine schwarze Leiste auf einer
   cremefarbenen Karte. Farbige Buch- und Bereichskacheln bleiben bewusst
   außen vor: die tragen ihre Bibelbereichsfarbe samt berechneter Schrift und
   heben sich auf beiden Untergründen ab. */
:is(body.contrast-high, html.theme-dark body) .bible-location-picker,
:is(body.contrast-high, html.theme-dark body) .bible-location-picker-footer {
  border-color: var(--line);
  color: var(--text);
  background: var(--panel);
}
:is(body.contrast-high, html.theme-dark body) .bible-location-picker-summary,
:is(body.contrast-high, html.theme-dark body) .bible-location-picker-history-row button,
:is(body.contrast-high, html.theme-dark body) .bible-location-picker-handoff-row,
:is(body.contrast-high, html.theme-dark body) .bible-location-picker-number-grid button,
:is(body.contrast-high, html.theme-dark body) .bible-location-picker-footer button,
:is(body.contrast-high, html.theme-dark body) .bible-location-picker-segment button,
:is(body.contrast-high, html.theme-dark body) .bible-location-picker-settings-link,
:is(body.contrast-high, html.theme-dark body) .bible-location-picker-setting-select select {
  border-color: var(--line);
  color: var(--text);
  background: var(--panel);
}
:is(body.contrast-high, html.theme-dark body) .bible-location-picker-testament-heading {
  border-bottom-color: var(--line);
}
:is(body.contrast-high, html.theme-dark body) .bible-location-picker-header button,
:is(body.contrast-high, html.theme-dark body) .bible-location-picker-stage > h3,
:is(body.contrast-high, html.theme-dark body) .bible-location-picker-history h3,
:is(body.contrast-high, html.theme-dark body) .bible-location-picker-areas-stage h4,
:is(body.contrast-high, html.theme-dark body) .bible-location-picker-setting > span,
:is(body.contrast-high, html.theme-dark body) .bible-location-picker-testament-heading h2,
:is(body.contrast-high, html.theme-dark body) .bible-location-picker-testament-toggle .label {
  color: var(--text);
}
:is(body.contrast-high, html.theme-dark body) .bible-location-picker-feedback,
:is(body.contrast-high, html.theme-dark body) .bible-location-picker-status,
:is(body.contrast-high, html.theme-dark body) .bible-location-picker-empty,
:is(body.contrast-high, html.theme-dark body) .bible-location-picker-legend,
:is(body.contrast-high, html.theme-dark body) .bible-location-picker-settings-hint,
:is(body.contrast-high, html.theme-dark body) .bible-location-picker-summary small,
:is(body.contrast-high, html.theme-dark body) .bible-location-picker-handoff-text small,
:is(body.contrast-high, html.theme-dark body) .bible-location-picker-testament-heading small,
:is(body.contrast-high, html.theme-dark body) .bible-location-picker-testament-toggle small {
  color: var(--muted);
}
/* Zustände: die festen Grüntöne würden auf dunklem Grund aufblitzen. */
:is(body.contrast-high, html.theme-dark body) .bible-location-picker-header button:hover,
:is(body.contrast-high, html.theme-dark body) .bible-location-picker-testament-toggle:hover,
:is(body.contrast-high, html.theme-dark body) .bible-location-picker-number-grid button:hover,
:is(body.contrast-high, html.theme-dark body) .bible-location-picker-handoff-row:hover,
:is(body.contrast-high, html.theme-dark body) .bible-location-picker-footer button:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
:is(body.contrast-high, html.theme-dark body) .bible-location-picker-testament-toggle:hover .label {
  color: var(--text);
}
/* Zustandsmarker und der primaere Knopf fuellen sich mit der Akzentfarbe. Der
   Schliessen-Knopf muss dafuer ueber die Fussleiste qualifiziert werden, sonst
   gewinnt :is(body.contrast-high, html.theme-dark body) .bible-location-picker-footer button. */
:is(body.contrast-high, html.theme-dark body) .bible-location-picker-footer .bible-location-picker-foot-close,
:is(body.contrast-high, html.theme-dark body) .bible-location-picker-segment button.active,
:is(body.contrast-high, html.theme-dark body) .bible-location-picker-number-grid button.current {
  border-color: var(--accent);
  color: var(--panel);
  background: var(--accent);
}

/* Einmaliger Hinweis, wenn die App auf iOS nicht in Safaris Web-App-Laufzeit
   läuft. Über allem, weil er sonst hinter der App-Navigation verschwände, und
   ohne feste Höhe, weil der Text in beiden Sprachen unterschiedlich umbricht.
   Siehe showIosRuntimeHintOnce in app.js. */
.runtime-hint {
  position: fixed;
  top: calc(8px + var(--safe-top));
  left: 8px;
  right: 8px;
  z-index: 9500;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 12px 32px rgb(0 0 0 / 18%);
}

.runtime-hint-text {
  flex: 1;
  margin: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
}

.runtime-hint-close {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

/* Eingabefelder der einfachen Oberfläche sind fest auf Weiß verdrahtet
   (`body.ui-mode-simple input/textarea/select`, weiter oben) und setzen dabei
   keine Schriftfarbe. Die kommt aus `--text` - im hohen Kontrast bei dunklem
   Systemschema also Weiß. Ergebnis: weiße Schrift auf weißem Feld, der
   aktuelle Inhalt der Auswahl- und Eingabefelder war unsichtbar (beobachtet in
   der Ersteinrichtung). Deshalb Fläche, Rand und Schrift hier gemeinsam auf die
   Kontrast-Tokens ziehen. Gleiche Spezifität wie die Regel oben, gewinnt über
   die spätere Position. */
:is(body.contrast-high, html.theme-dark body) input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
:is(body.contrast-high, html.theme-dark body) textarea,
:is(body.contrast-high, html.theme-dark body) select {
  border-color: var(--line);
  color: var(--text);
  background: var(--panel);
}

/* Die einfache Oberfläche erzwingt `color-scheme: light`, weil sie eine helle,
   warme Fläche ist. Im hohen Kontrast mit dunklem Systemschema sind die Tokens
   aber dunkel - dann müssen auch die vom Browser selbst gezeichneten Teile
   (Auswahlliste eines <select>, Schreibmarke, Bildlaufleisten, Autofill) dunkel
   sein, sonst kehrt dort dasselbe Weiß-auf-Weiß zurück. */
html.theme-dark body.contrast-high {
  color-scheme: dark;
}

/* ── Action cards (docs/action-cards.md) ─────────────────────────────────── */
.sr-only { position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; }
.action-card-list { display:grid; gap:12px; }
.action-card { position:relative; display:flex; align-items:center; gap:8px; min-width:0; padding:6px 6px 6px 0; border:1px solid var(--line,#dedbd3); border-radius:16px; color:var(--text,#27312d); background:var(--panel,#fff); }
:where(html.theme-dark) .action-card { border:1px solid var(--line,var(--line)); color:var(--text,var(--text)); background:var(--panel,var(--panel)); } /* dark:gen */
.action-card:hover,.action-card:focus-within { border-color:var(--accent,#5f806f); }
.action-card.has-area-color { border-left:4px solid var(--sb-area-color); }
.action-card-main { flex:1; min-width:0; min-height:64px; display:flex; align-items:center; padding:10px 12px 10px 18px; border:0; border-radius:14px; color:inherit; background:transparent; text-align:left; }
.action-card-text { min-width:0; }
.action-card-title,.action-card-meta { display:block; overflow-wrap:anywhere; }
.action-card-meta { margin-top:3px; color:var(--muted,#66716c); font-size:.875em; font-weight:400; }
:where(html.theme-dark) .action-card-meta { color:var(--muted,var(--muted)); } /* dark:gen */
.action-card-favorite { margin-right:6px; color:var(--accent); font-size:.78em; }
.action-card-badge { display:inline-block; margin-left:8px; padding:1px 8px; border-radius:999px; font-size:.75em; font-weight:600; vertical-align:middle; background:var(--accent-soft,#eef3f0); }
:where(html.theme-dark) .action-card-badge { background:var(--accent-soft,color-mix(in srgb, var(--text) 3%, var(--panel))); } /* dark:gen */
.action-card-flag { margin-left:6px; color:var(--muted,#66716c); font-weight:400; }
:where(html.theme-dark) .action-card-flag { color:var(--muted,var(--muted)); } /* dark:gen */
.action-card-count { color:var(--muted,#66716c); font-weight:400; }
:where(html.theme-dark) .action-card-count { color:var(--muted,var(--muted)); } /* dark:gen */
.action-card-tools { display:flex; flex-wrap:wrap; align-items:center; gap:4px; }
.action-card-more { flex:none; min-width:44px; min-height:44px; color:var(--accent,#527363); background:transparent; border:1px solid transparent; border-radius:12px; }
:where(html.theme-dark) .action-card-more { color:var(--accent,#b9cdc3); } /* dark:gen */
.action-card-more:hover { border-color:var(--line,#dedbd3); }
:where(html.theme-dark) .action-card-more:hover { border-color:var(--line,var(--line)); } /* dark:gen */
.action-card-list.density-compact { gap:6px; }
.action-card.density-compact { border-radius:12px; padding:2px 2px 2px 0; }
.action-card.density-compact .action-card-main { min-height:44px; padding:6px 10px 6px 14px; }
.action-card-list.density-cloud { display:flex; flex-wrap:wrap; gap:8px; }
.action-card.density-cloud { gap:0; padding:0; border-radius:999px; font-size:calc(.85rem + var(--action-card-weight,0) * .12rem); }
.action-card.density-cloud .action-card-main { min-height:44px; padding:4px 4px 4px 14px; border-radius:999px; }
.action-card.density-cloud .action-card-more { min-width:36px; font-size:.85rem; }
.action-card.is-long-pressing { box-shadow:0 0 0 3px var(--accent-soft,#d8e6de); transition:box-shadow .5s ease-in; }
.action-card-tip { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.context-menu button.is-primary { font-weight:700; }
.context-menu [aria-checked="true"]::before { content:"\2713"; order:2; margin-left:auto; padding-left:12px; }
.context-menu [aria-checked="true"][data-shortcut-hint]::after { order:3; margin-left:8px; }
.context-menu button[data-shortcut-hint]:not([data-shortcut-hint=""])::after { margin-left:auto; padding-left:12px; color:var(--muted); font-size:.8em; }
@media (pointer: fine) {
  .context-menu button[data-shortcut-hint]:not([data-shortcut-hint=""])::after { content:attr(data-shortcut-hint); }
}
/* Undo notices must stay visible wherever the page is scrolled. */
.status.has-undo:not(:empty) { position:fixed; left:50%; bottom:calc(max(16px, var(--safe-bottom)) + var(--fix-bottom-gap) + 64px); transform:translateX(-50%); z-index:9500; display:flex; align-items:center; gap:8px; max-width:min(calc(var(--vpw) * 0.92), 32rem); margin:0; padding:8px 8px 8px 16px; border:1px solid var(--line); border-radius:var(--radius); background:var(--panel); color:var(--text); box-shadow:0 8px 24px rgba(0,0,0,.18); }
.status-undo-button { min-height:36px; padding:0 12px; }
.action-card.is-selectable .action-card-main::before { content:""; flex:none; width:20px; height:20px; margin-right:12px; border:2px solid var(--accent,#527363); border-radius:6px; }
.action-card.is-selected { border-color:var(--accent,#527363); background:var(--accent-soft,#eef3f0); }
:where(html.theme-dark) .action-card.is-selected { background:var(--accent-soft,color-mix(in srgb, var(--text) 3%, var(--panel))); } /* dark:gen */
.action-card.is-selected .action-card-main::before { content:"\2713"; display:grid; place-items:center; color:#fff; background:var(--accent,#527363); font-size:14px; font-weight:700; }
.action-card-selection-bar { position:fixed; left:50%; bottom:calc(max(16px, var(--safe-bottom)) + var(--fix-bottom-gap) + 64px); transform:translateX(-50%); z-index:9400; display:flex; flex-wrap:wrap; align-items:center; gap:6px; max-width:calc(var(--vpw) - 16px); padding:8px; border:1px solid var(--line); border-radius:var(--radius); background:var(--panel); box-shadow:0 8px 24px rgba(0,0,0,.18); }
.action-card-selection-count { padding:0 8px; font-weight:600; }
body.has-card-selection .status.has-undo:not(:empty) { bottom:calc(max(16px, var(--safe-bottom)) + var(--fix-bottom-gap) + 128px); }
body.has-card-selection .simple-page-content { padding-bottom:140px; }
.action-card-progress { display:block; width:100%; max-width:240px; height:6px; margin-top:6px; accent-color:var(--accent); }
.action-card-badge.is-closed { background:var(--bg-soft,#eef1ee); color:var(--muted,#4d5a54); }
:where(html.theme-dark) .action-card-badge.is-closed { background:var(--bg-soft,color-mix(in srgb, var(--text) 3%, var(--panel))); color:var(--muted,var(--muted)); } /* dark:gen */
.action-card-icon { flex:none; width:40px; height:40px; display:flex; align-items:center; justify-content:center; margin-right:12px; border-radius:12px; background:color-mix(in srgb, var(--card-accent, var(--accent)) 14%, #f7f4ec); color:var(--card-accent, var(--accent)); font-size:1.1rem; }
:where(html.theme-dark) .action-card-icon { background:color-mix(in srgb, var(--card-accent, var(--accent)) 14%, color-mix(in srgb, var(--text) 3%, var(--panel))); } /* dark:gen */
.action-card[style*="--card-accent"] { border-color:color-mix(in srgb, var(--card-accent) 22%, #d8ddd9); }
:where(html.theme-dark) .action-card[style*="--card-accent"] { border-color:color-mix(in srgb, var(--card-accent) 22%, var(--line)); } /* dark:gen */
.action-card-list + .simple-list-actions { margin-top:12px; }
.action-card-grip { display:flex; align-items:center; justify-content:center; min-width:32px; min-height:44px; color:var(--muted,#66716c); cursor:grab; touch-action:none; }
:where(html.theme-dark) .action-card-grip { color:var(--muted,var(--muted)); } /* dark:gen */
.action-card.is-dragging { opacity:.75; box-shadow:0 10px 24px rgba(0,0,0,.16); cursor:grabbing; }
.action-card-reorder-bar { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; padding:10px 14px; border:1px solid var(--accent,#527363); border-radius:12px; background:var(--accent-soft,#eef3f0); }
:where(html.theme-dark) .action-card-reorder-bar { background:var(--accent-soft,color-mix(in srgb, var(--text) 3%, var(--panel))); } /* dark:gen */
/* Reordering is a focused task: arrows and grip replace the actions control. */
.action-card-list.is-reordering .action-card-more { display:none; }
.action-card-list.is-reordering .action-card-tools { padding-left:12px; }
.action-card-badge.is-due { background:var(--accent,#527363); color:#fff; }
.action-card-badge.is-group-list { background:#dcfce7; color:#166534; }
:where(html.theme-dark) .action-card-badge.is-group-list { background:#1f3c29; color:#b4ecc9; } /* dark:gen */
/* Lists shared with the user's groups that wait for a decision (start page, "Meine Listen"). */
.group-share-hint { display:grid; gap:10px; padding:16px 18px; border:1px solid var(--accent,#527363); border-radius:16px; background:var(--panel,#fff); box-shadow:0 8px 24px rgba(24,42,35,.10); }
:where(html.theme-dark) .group-share-hint { background:var(--panel,var(--panel)); } /* dark:gen */
.group-share-hint h2 { margin:0; font-size:1.15rem; }
.group-share-hint p { margin:0; }
.group-share-hint-actions { display:flex; flex-wrap:wrap; gap:8px; }
.group-share-hint .action-card-tools { padding:0 4px 8px 16px; }
.simple-home-group-shares { grid-column:1 / -1; }
.simple-lists-column > .group-share-hint { margin-bottom:12px; }
.simple-list-category-badge { flex:none; padding:2px 8px; border-radius:999px; background:#dbeafe; color:#1e40af; font-size:.78rem; font-weight:700; }
:where(html.theme-dark) .simple-list-category-badge { background:#1e2b3b; color:#9daee6; } /* dark:gen */
.ws-share-group-heading { margin:14px 0 6px; font-size:1rem; }
.ws-share-group-heading:focus { outline:2px solid var(--accent,#527363); outline-offset:2px; }
.share-preview-entries { display:grid; gap:8px; max-height:min(calc(var(--vph) * .5), 420px); margin:8px 0 0; padding-left:1.4em; overflow:auto; }
.share-preview-text { display:block; color:var(--muted,#66716c); font-size:.9rem; }
:where(html.theme-dark) .share-preview-text { color:var(--muted,var(--muted)); } /* dark:gen */
/* Cards with extra tools (reorder arrows, quick-access buttons) wrap them below on narrow screens. */
.action-card:has(> .action-card-tools) { flex-wrap:wrap; }
.action-card:has(> .action-card-tools) > .action-card-main { flex:1 1 14rem; }
/* The "Aktionen" text button moves below a narrow card instead of squeezing the title. */
.action-card:has(> .action-card-more.button-text-mode) { flex-wrap:wrap; }
.action-card:has(> .action-card-more.button-text-mode) > .action-card-main { flex:1 1 12rem; }
.action-card > .action-card-more.button-text-mode { margin-left:auto; }
.action-card-meta-block { display:block; margin-top:2px; }
.context-menu-group { display:grid; }
/* Start-page tiles ("Wiederfinden und entdecken") are action cards: icon above
   the title, accent colour, an arrow on navigation tiles. */
.action-card.action-card-tile { align-items:center; border-radius:18px; padding:0; }
.action-card-tile .action-card-main { flex-direction:column; align-items:flex-start; justify-content:center; min-height:126px; padding:20px 24px; }
.action-card-tile .action-card-icon { width:auto; height:auto; margin:0 0 9px; background:none; color:var(--card-accent, #5f806f); font-size:1.1rem; }
:where(html.theme-dark) .action-card-tile .action-card-icon { color:var(--card-accent, #b5c8be); } /* dark:gen */
.action-card-tile.has-arrow .action-card-main { padding-right:54px; }
.action-card-tile.has-arrow::after { content:"\2192"; position:absolute; right:20px; top:50%; transform:translateY(-50%); color:var(--card-accent, #5f806f); font-size:1.25rem; pointer-events:none; }
:where(html.theme-dark) .action-card-tile.has-arrow::after { color:var(--card-accent, #b5c8be); } /* dark:gen */
.action-card-tile .action-card-more { margin-right:10px; }
/* Narrow favorites: the icon ellipsis sits bottom-right; titles use the full width. */
.simple-favorites-grid :has(> .button-icon-mode) { padding:0; }
.simple-favorites-grid :has(> .button-icon-mode) .action-card-main { padding-right:18px; }
.simple-favorites-grid .button-icon-mode { position:absolute; right:4px; bottom:4px; }
.simple-favorites-grid :has(> .button-icon-mode) .action-card-text > :last-child { padding-right:30px; }
.settings-page-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.settings-page-heading .card-title { margin: 0; }
.settings-save-feedback { grid-column: 1 / -1; }
.settings-save-feedback[data-phase="failed"] { color: var(--negative); }
.settings-save-retry { margin-left: .5em; }

.external-bible-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:8px; }

/* Retain the Web bar's layout/anchors while UIKit owns rendering and input.
   visibility also removes duplicate buttons from Web accessibility navigation. */
html.native-bottom-navigation .simple-bottom-nav {
  visibility:hidden !important;
  pointer-events:none !important;
}
html.native-bottom-navigation body.ui-mode-simple .shell {
  padding-bottom:max(calc(88px + var(--safe-bottom)), calc(92px / var(--ui-scale, 1)));
}

/* UIKit owns glass strength whenever native navigation is active, and iOS doesn't use web glass strength. */
html.hybrid-ios .settings-row > div:has(#settingBottomNavGlass),
html.native-bottom-navigation .settings-row > div:has(#settingBottomNavGlass) {
  display:none;
}
html.hybrid-ios #settingBottomNavStyle option[value="ribbon"] { display:none; }

/* Web menu bar (app-desktop-menu.js): full window width, flush with the top edge, like the menu
   bar of a desktop app. Smaller windows keep the existing navigation. */
.desktop-ribbon { display:none; }
:root { --ribbon-h:0px; }
@media (min-width:1024px) {
  body.nav-ribbon .desktop-ribbon:not([hidden]) { display:block; position:sticky; top:0; z-index:9200; background:var(--panel); border-bottom:1px solid var(--line); font-size:.88rem; }
  body.nav-ribbon:has(.desktop-ribbon:not([hidden])) .simple-bottom-nav { display:none !important; }
  /* Logo and version live in the menus; account access sits at the toolbar's right end. */
  body.desktop-menu-active .topbar,
  body.desktop-menu-active #simplePageLogo,
  body.desktop-menu-active .simple-page-head .account-button { display:none !important; }
  body.desktop-menu-active .simple-page-head { top:var(--ribbon-h); }
  .desktop-menu-row { display:flex; align-items:center; gap:4px; min-height:30px; padding:0 4px; }
  .desktop-menu-row nav { display:flex; flex:1; align-items:center; min-width:0; overflow-x:auto; }
  .desktop-ribbon button.desktop-menu-title { min-height:0; margin:2px 0; padding:3px 7px; flex-shrink:0; white-space:nowrap; border:0; border-radius:4px; background:transparent; color:var(--text); font:inherit; cursor:default; }
  .desktop-ribbon button.desktop-menu-title:hover,
  .desktop-ribbon button.desktop-menu-title:focus-visible,
  .desktop-ribbon button.desktop-menu-title[aria-expanded="true"] { background:var(--accent-soft); outline:none; }
  .desktop-menu-title u { text-decoration:none; }
  .desktop-ribbon.show-mnemonics .desktop-menu-title u { text-decoration:underline; }
  .desktop-ribbon button.ribbon-search { display:flex; align-items:center; gap:8px; width:150px; flex-shrink:0; min-height:0; margin:2px 6px; padding:3px 8px; border:1px solid var(--line); border-radius:6px; background:var(--bg, transparent); color:var(--muted); font:inherit; text-align:left; cursor:pointer; }
  .desktop-ribbon button.ribbon-search:hover, .desktop-ribbon button.ribbon-search:focus-visible { border-color:var(--accent); outline:none; }
  .desktop-ribbon .ribbon-search-text { flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .desktop-ribbon .ribbon-search kbd { font:inherit; font-size:.8em; padding:0 5px; border:1px solid var(--line); border-radius:4px; }
  .desktop-ribbon .ribbon-search kbd[hidden] { display:none; }
  /* The search field takes over the capsule's search marks (magnifier, shortcut, chevron). */
  body.desktop-menu-active :is(.simple-page-capsule-icon, .simple-page-capsule-end) { display:none !important; }
  .desktop-ribbon button.ribbon-login { min-height:0; padding:3px 10px; border:0; border-radius:4px; background:transparent; color:var(--accent); font:inherit; }
  .desktop-ribbon button.ribbon-login:hover { background:var(--accent-soft); }
  .desktop-ribbon button.ribbon-account { width:28px; height:28px; min-height:28px; }
  .desktop-ribbon button.ribbon-account[hidden] { display:none; }
  .desktop-ribbon .ribbon-account .account-avatar { width:24px; height:24px; font-size:.75rem; }
  .desktop-ribbon .ribbon-account .account-sync-dot { width:10px; height:10px; right:0; bottom:0; }
  .ribbon-account-controls { display:flex; flex:none; align-items:center; gap:4px; }
  .ribbon-toolbar-row { display:flex; align-items:center; }
  .ribbon-toolbar-row > .ribbon-tools { flex:1; min-width:0; border-top:0; }
  .ribbon-toolbar-row:has(> .ribbon-tools:not([hidden])) { border-top:1px solid var(--line); }
  .ribbon-toolbar-row > .ribbon-account-controls { margin:2px 6px; }
  .ribbon-tools { display:flex; flex-wrap:nowrap; align-items:center; gap:2px 4px; padding:2px 4px; border-top:1px solid var(--line); }
  .ribbon-tools[hidden] { display:none; }
  .ribbon-tools > button, .ribbon-tools > .study-info-controls { flex-shrink:0; }
  .desktop-toolbar-overflow:not([hidden]) { display:flex; flex-direction:column; align-items:stretch; gap:8px; width:max-content; max-width:calc(var(--vpw) - 16px); padding:12px; }
  .desktop-toolbar-overflow > button { display:flex; align-items:center; gap:8px; min-height:36px; padding:6px 10px; border:0; border-radius:4px; background:transparent; color:var(--text); font:inherit; white-space:nowrap; text-align:left; }
  .desktop-toolbar-overflow > button:hover:not(:disabled) { background:var(--accent-soft); }
  .desktop-toolbar-overflow > .reader-display-config-button { display:flex; width:auto; justify-content:flex-start; gap:8px; padding:6px 10px; }
  .desktop-toolbar-overflow > .reader-display-config-button::after { content:attr(aria-label); font:inherit; }
  .ribbon-tools > #desktopToolbarMore { margin-left:auto; }

  .ribbon-tools-divider { width:1px; height:18px; margin:0 2px; background:var(--line); flex:none; }
  .ribbon-tools > button:not(.reader-display-config-button) { display:flex; gap:6px; align-items:center; min-height:30px; padding:2px 10px; border:0; border-radius:4px; background:transparent; color:var(--text); font:inherit; }
  .ribbon-tools > button:not(.reader-display-config-button):hover:not(:disabled),
  .ribbon-tools > button[aria-pressed="true"] { background:var(--accent-soft); }
  .ribbon-tools > button[aria-pressed="true"] { color:var(--accent); }
  .ribbon-tools > button:disabled { opacity:.5; cursor:default; }
  .ribbon-tools .study-info-label-full { display:none; }
  .ribbon-tools .study-info-label-short { display:inline; }
  .ribbon-tools .study-info-controls button,
  .ribbon-tools > .reader-display-config-button { min-height:30px; }
  .ribbon-tools > .reader-display-config-button { width:34px; min-width:34px; }
  .ribbon-tools .simple-chapter-toolbar { flex:1 1 auto; width:auto; max-width:none; justify-self:stretch; gap:4px 8px; }
  .ribbon-tools .simple-chapter-toolbar .simple-chapter-actions button,
  .ribbon-tools .simple-chapter-toolbar .ws-spot-input { min-height:30px; }
  .ribbon-tools .simple-chapter-toolbar .simple-reader-tool-mode,
  .ribbon-tools .simple-chapter-toolbar .ws-spot-clear { flex-basis:30px; width:30px; height:30px; }
  .ribbon-tools .simple-chapter-toolbar .simple-bible-search-nav button { min-height:30px; min-width:30px; }
}
/* Web and native Mac menus replace the page's ⋮ menu. A visible toolbar replaces
   matching page controls; hiding it restores those controls on the page. */
:is(body.desktop-menu-active, html.native-mac-menu body) #simplePageMenu:not([data-menu-only]),
body.desktop-menu-active:has(#ribbonTools:not([hidden])) :is(#simplePageBack, .simple-page-head-lead, #viewBack, #simpleHomeBack, #settingsBackToMore),
body.desktop-menu-active:has(#ribbonTools:not([hidden])) .admin-tabs { display:none; }
body.desktop-menu-active:has(#ribbonTools:not([hidden])) #simplePage :is(.study-info-controls, .study-info-toggle, .reader-display-config-button, .simple-reading-plan-nav, .simple-reader-tool-toggle, .simple-collection-add, .pdf-library-upload),
body.desktop-menu-active:has(#ribbonTools:not([hidden])) #simplePage .simple-collection-actions:not(:has(> :not(.study-info-controls, .study-info-toggle, .reader-display-config-button))) { display:none !important; }
body.desktop-menu-active:has(#ribbonTools:not([hidden])) .simple-page-head:not(.is-reader-head):not(.has-custom-nav) { grid-template-columns:1fr auto; }
/* Start page: "Heute wiederholen" and "Mitschrift" live in the toolbar row, search in the menu bar. */
body.desktop-menu-active:has(#ribbonTools:not([hidden])) :is(#simpleHomePractice, #simpleHomeMitschrift, #simpleHomeSearch) { display:none !important; }
/* Desktop menu mode (web menu bar or native Mac menu) + full layout width: truly edge-to-edge under the menu bar without outer card frame/margins. */
body.ui-mode-simple.desktop-menu-active .shell { padding-bottom:max(16px, var(--safe-bottom)); }
:is(body.desktop-menu-active, html.native-mac-menu body)[data-layout-width="full"] {
  --shell-max-w:100%;
  --content-max-w:100%;
  --lists-max-w:100%;
}
:is(body.desktop-menu-active, html.native-mac-menu body)[data-layout-width="full"] .shell:not(.auth-only) {
  max-width:none;
  min-height:calc(var(--vph) - var(--ribbon-h));
  padding:0;
}
/* The rule above must not take the room of the docked Mitschrift or study inspector away. */
:is(body.desktop-menu-active, html.native-mac-menu body)[data-layout-width="full"]:is(.mitschrift-docked, .study-inspector-docked) .shell:not(.auth-only) {
  padding-right:var(--right-dock-w);
}
/* The reading scrollbar belongs beside the dock, below the desktop toolbar. */
html.dock-content-scroll,
html.dock-content-scroll body {
  height:var(--vph);
  overflow:hidden;
}
html.dock-content-scroll body .shell:not(.auth-only) {
  position:fixed;
  inset:var(--ribbon-h) var(--right-dock-w) 0 0;
  max-width:none;
  min-height:0;
  margin:0;
  padding-left:calc(max(16px, var(--safe-left)) + max(0px, (var(--vpw) - var(--shell-max-w)) / 2));
  padding-right:max(0px, (var(--vpw) - var(--shell-max-w)) / 2);
  overflow-x:hidden;
  overflow-y:auto;
  overscroll-behavior-y:contain;
}
html.dock-content-scroll body .simple-page-head {
  top:0;
}
html.dock-content-scroll :is(body.desktop-menu-active, body.nav-ribbon)[data-layout-width="full"] .shell:not(.auth-only),
html.native-mac-menu.dock-content-scroll body[data-layout-width="full"] .shell:not(.auth-only) {
  padding-left:0;
  padding-right:0;
}
:is(body.desktop-menu-active, html.native-mac-menu body)[data-layout-width="full"] :is(.simple-home, .simple-page, .ueben-start-card) {
  min-height:calc(var(--vph) - var(--ribbon-h));
}
/* The settings page stacks several cards (e.g. the account tab): no viewport height for each one. */
:is(body.desktop-menu-active, html.native-mac-menu body)[data-layout-width="full"] :is(.simple-home, .simple-page, .settings-card, .ueben-start-card) {
  border:0;
  border-radius:0;
  box-shadow:none;
}
:is(body.desktop-menu-active, html.native-mac-menu body)[data-layout-width="full"] .settings-card + .settings-card { border-top:1px solid var(--line); }
:is(body.desktop-menu-active, html.native-mac-menu body)[data-layout-width="full"] .simple-home-content:not(.has-losungen) { max-width:none; }
:is(body.desktop-menu-active, html.native-mac-menu body)[data-layout-width="full"] :is(.stats-panel, .admin-panel) { padding:16px clamp(18px,4vw,38px); }
.desktop-menu-popup { position:fixed; z-index:10600; min-width:220px; max-width:420px; overflow-y:auto; padding:4px; border:1px solid var(--line); border-radius:6px; background:var(--panel); color:var(--text); box-shadow:0 8px 24px color-mix(in srgb, var(--text) 18%, transparent); font-size:.88rem; }
.desktop-menu-popup button.desktop-menu-item { display:grid; grid-template-columns:16px minmax(0,1fr) auto 12px; align-items:center; gap:6px; width:100%; min-height:0; padding:4px 8px; border:0; border-radius:4px; background:transparent; color:var(--text); font:inherit; text-align:left; cursor:default; }
.desktop-menu-popup button.desktop-menu-item:focus,
.desktop-menu-popup button.desktop-menu-item[aria-expanded="true"] { background:var(--accent-soft); outline:none; }
.desktop-menu-popup button.desktop-menu-item[aria-disabled="true"] { color:var(--muted); }
.desktop-menu-label { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.desktop-menu-shortcut { padding-left:16px; color:var(--muted); font-size:.9em; white-space:nowrap; }
.desktop-menu-check, .desktop-menu-arrow { text-align:center; }
.desktop-menu-separator { height:1px; margin:4px 6px; background:var(--line); }

/* Mac Catalyst supplies its own menu bar; retain web navigation if the bridge is unavailable.
   Only the toolbar row of the web ribbon is shown there (app-desktop-menu.js), Mac-styled. */
@media (min-width:1024px) {
  html.native-mac-menu .desktop-ribbon:not([hidden]) { display:block; position:sticky; top:0; z-index:9200; background:var(--panel); border-bottom:1px solid var(--line); font-size:.88rem; }
  html.native-mac-menu .desktop-menu-row { display:none; }
  html.native-mac-menu .ribbon-toolbar-row:has(> .ribbon-tools) { border-top:0; }
  html.native-mac-menu .ribbon-tools { gap:4px 6px; padding:6px 12px; border-top:0; }
  html.native-mac-menu .ribbon-tools > button:not(.reader-display-config-button) { min-height:28px; padding:2px 10px; border-radius:6px; }
}
html.native-mac-menu .simple-bottom-nav,
html.native-mac-menu .settings-row[data-settings-keys~="bottomNavStyle"] { display:none !important; }

/* Endless read-aloud confirmation next to "Starten" (replaces a second confirm dialog). */
.readaloud-endless-confirm { display:flex; flex-basis:100%; align-items:center; gap:8px; margin:0; font-weight:600; }
.readaloud-endless-confirm[hidden] { display:none; }

/* Keyboard shortcuts are only useful with a mouse-like pointer; hide the settings on touch-only devices. */
@media not all and (hover: hover) and (pointer: fine) { .settings-shortcuts-section { display:none; } }
