/* ==========================================================================
   Bibel-Memory PWA — Seriöses, monochromes Buchdruck-Design
   Keine bunten Farben, maximaler Kontrast, plastische Schatten
   Micro-Chunking mit schrittweisem Aufbau
   ========================================================================== */

:root {
  --ink-black: #000000;
  --ink-deep: #0f172a;        /* Tiefstes Druckerschwarz */
  --ink-primary: #1e293b;     /* Starkes Schriftdunkel */
  --ink-secondary: #334155;   /* Klare Auszeichnungen */
  --ink-muted: #64748b;       /* Ruhige Nebentexte */
  --ink-subtle: #94a3b8;      /* Zarte Führungslinien */
  
  --paper-white: #ffffff;     /* Reines Buchpapier */
  --paper-soft: #f8fafc;      /* Neutraler Untergrund */
  --paper-card: #f1f5f9;      /* Zarte Abtönung */
  
  --line-strong: #0f172a;     /* Hochkontrast-Linien */
  --line-medium: #cbd5e1;     /* Klare Rahmen */
  --line-light: #e2e8f0;      /* Zarte Trennstriche */
  
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 10px -1px rgba(0, 0, 0, 0.08), 0 2px 5px -1px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 12px 28px -4px rgba(0, 0, 0, 0.12), 0 4px 10px -2px rgba(0, 0, 0, 0.06);
  
  --shadow-book: 
    0 1px 3px rgba(0, 0, 0, 0.05),
    0 10px 28px -4px rgba(0, 0, 0, 0.09),
    0 24px 44px -10px rgba(0, 0, 0, 0.06),
    0 0 0 1px rgba(15, 23, 42, 0.08);

  --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-book: 'Newsreader', 'Georgia', 'Cambria', serif;
  
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-body);
  background-color: var(--paper-soft);
  color: var(--ink-deep);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  padding-top: var(--safe-top);
  padding-bottom: var(--safe-bottom);
}

/* Header */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line-light);
  background: var(--paper-white);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.menu-toggle-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-medium);
  background: var(--paper-soft);
  color: var(--ink-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  transition: all 0.15s ease;
}

.menu-toggle-btn:hover {
  background: var(--paper-white);
  border-color: var(--ink-deep);
}

.app-brand {
  text-decoration: none;
  color: inherit;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.brand-text-wrap {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--ink-black);
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.brand-sub {
  font-size: 0.72rem;
  color: var(--ink-muted);
  font-weight: 600;
  letter-spacing: 0.2px;
}

.header-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  min-height: 44px;
  box-sizing: border-box;
  border-radius: var(--radius-full);
  border: 1px solid var(--line-medium);
  background: var(--paper-white);
  color: var(--ink-deep);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: all 0.15s ease;
}

.header-back-btn:hover {
  background: var(--paper-soft);
  border-color: var(--ink-deep);
}

/* ==========================================================================
   Werkzeuge-Drawer (Modal Menü für separate Seiten)
   ========================================================================== */
.menu-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.menu-drawer-backdrop.is-open,
.menu-drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.menu-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 320px;
  max-width: 85vw;
  background: var(--paper-white);
  z-index: 110;
  box-shadow: var(--shadow-lg);
  transform: translateX(-100%);
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  padding: 20px;
}

.menu-drawer.is-open,
.menu-drawer.open {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-light);
  margin-bottom: 16px;
}

.drawer-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ink-black);
  display: block;
}

.drawer-sub {
  font-size: 0.75rem;
  color: var(--ink-muted);
  font-weight: 600;
}

.drawer-close-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line-medium);
  background: var(--paper-soft);
  color: var(--ink-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.15s ease;
}

.drawer-close-btn:hover {
  background: var(--paper-white);
  border-color: var(--ink-deep);
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drawer-nav-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  min-height: 44px;
  box-sizing: border-box;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  text-decoration: none;
  color: var(--ink-deep);
  transition: all 0.15s ease;
}

.drawer-nav-item:hover {
  background: var(--paper-soft);
  border-color: var(--line-medium);
}

.drawer-nav-item.active {
  background: var(--paper-soft);
  border-color: var(--ink-deep);
}

.nav-item-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--paper-card);
  border: 1px solid var(--line-medium);
  color: var(--ink-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.drawer-nav-item.active .nav-item-icon {
  background: var(--ink-deep);
  color: var(--paper-white);
  border-color: var(--ink-deep);
}

.nav-item-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink-black);
}

.nav-desc {
  font-size: 0.74rem;
  color: var(--ink-muted);
  line-height: 1.35;
}

.drawer-divider {
  height: 1px;
  background: var(--line-light);
  margin: 12px 0;
}

.drawer-nav-item.secondary {
  opacity: 0.85;
}

/* ==========================================================================
   Haupt-Container
   ========================================================================== */
.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 680px;
  width: 100%;
  margin: 0 auto;
  padding: 16px 16px 24px 16px;
  gap: 14px;
}

/* Kollektions- & Buch-Auswahl (z. B. Römerstraße vs. Der Brief des Judas) */
.collection-bar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #f8fafc;
  border: 1px solid var(--line-medium);
  border-radius: var(--radius-md);
  padding: 6px 8px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03);
}

.collection-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 4px 0 4px;
}

.collection-intro-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--ink-secondary);
}

.collection-pills-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.collection-pills-row::-webkit-scrollbar {
  display: none;
}

.collection-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--paper-white);
  border: 1.5px solid var(--line-medium);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.collection-btn:hover {
  border-color: var(--ink-deep);
  color: var(--ink-black);
}

.collection-btn.active {
  background: var(--ink-deep);
  border-color: var(--ink-deep);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.25);
}

.collection-count-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 9999px;
  background: #e2e8f0;
  color: #334155;
  transition: all 0.15s ease;
}

.collection-btn.active .collection-count-badge {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

/* Vers-Auswahlleiste */
.verse-pills-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px 2px;
}

.verse-pills-bar::-webkit-scrollbar {
  display: none;
}

.pill-item {
  padding: 7px 15px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line-medium);
  background: var(--paper-white);
  color: var(--ink-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: all 0.15s ease;
}

.pill-item:hover {
  border-color: var(--ink-deep);
  color: var(--ink-black);
}

.pill-item.active {
  background: var(--ink-deep);
  color: var(--paper-white);
  border-color: var(--ink-deep);
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.25);
}

/* Stufen-Leiste (1. Volltext, 2. Micro-Chunking, 3. Anfangsbuchstaben) */
.stages-bar {
  display: flex;
  background: #e2e8f0;
  padding: 4px;
  border-radius: var(--radius-md);
  gap: 3px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
  overflow-x: auto;
  scrollbar-width: none;
}

.stages-bar::-webkit-scrollbar {
  display: none;
}

.stage-btn {
  flex: 1;
  min-width: 0;
  padding: 8px 4px;
  font-size: 0.77rem;
  font-weight: 600;
  gap: 4px;
  white-space: nowrap;
}

@media (max-width: 500px) {
  .stage-btn {
    font-size: 0.72rem;
    padding: 7px 3px;
    gap: 2px;
  }
  .stage-num {
    width: 15px;
    height: 15px;
    font-size: 0.65rem;
  }
}

.stage-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 8px;
  border: none;
  background: transparent;
  color: var(--ink-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: calc(var(--radius-md) - 3px);
  cursor: pointer;
  transition: all 0.15s ease;
}

.stage-btn.active {
  background: var(--paper-white);
  color: var(--ink-black);
  font-weight: 700;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.12);
}

.stage-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #cbd5e1;
  color: var(--ink-deep);
  font-size: 0.72rem;
  font-weight: 800;
}

.stage-btn.active .stage-num {
  background: var(--ink-deep);
  color: var(--paper-white);
}

/* ==========================================================================
   Micro-Chunking Steuerungs-Leiste (Stufe 2)
   ========================================================================== */
.chunk-control-panel {
  background: var(--paper-white);
  border: 1px solid var(--line-medium);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chunk-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chunk-status-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-deep);
}

.chunk-mode-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-secondary);
  background: var(--paper-card);
  border: 1px solid var(--line-medium);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.chunk-pills-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.chunk-btn {
  padding: 5px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line-medium);
  background: var(--paper-soft);
  color: var(--ink-secondary);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s ease;
}

.chunk-btn:hover {
  border-color: var(--ink-deep);
  color: var(--ink-black);
}

.chunk-btn.active {
  background: var(--ink-deep);
  color: var(--paper-white);
  border-color: var(--ink-deep);
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.2);
}

/* ==========================================================================
   Buch-Seiten Layout (Hardcover-Schatten & edles Buchpapier)
   ========================================================================== */
.book-page {
  background: var(--paper-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-book);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  min-height: 290px;
}

.book-header-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.book-chapter-title {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 700;
}

.book-meta-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.ref-tag {
  background: var(--ink-deep);
  color: var(--paper-white);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  letter-spacing: 0.3px;
}

.loop-tag {
  background: var(--paper-soft);
  color: var(--ink-secondary);
  border: 1px solid var(--line-medium);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 12px;
  border-radius: var(--radius-full);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.book-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, #cbd5e1 15%, #cbd5e1 85%, transparent);
  margin: 16px 0 20px 0;
}

/* ==========================================================================
   Buch-Textkörper & Jitter-freie feste Wort-Slots
   ========================================================================== */
.book-text-box {
  font-family: var(--font-book);
  font-size: 1.62rem;
  line-height: 2.15;
  color: var(--ink-black);
  font-weight: 500;
  text-align: left;
  margin-bottom: 22px;
  word-spacing: 0.12em;
}

.verse-num {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--ink-deep);
  vertical-align: super;
  margin-right: 6px;
  user-select: none;
}

/* Fester Wort-Slot: Verhält sich exakt wie ein unverrückbares Wort im Schriftsatz */
.kw-word-slot {
  position: relative;
  display: inline-block;
  vertical-align: baseline;
  margin: 0 0.36em 0 0;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

/* Ghost: Definiert 100% der physischen Breite und Höhe des Slots */
.kw-word-ghost {
  display: inline-block;
  visibility: hidden;
  user-select: none;
  pointer-events: none;
  white-space: pre;
  font-family: inherit;
  font-size: inherit;
  font-weight: 500;
  line-height: inherit;
}

/* Visible: Liegt als absolutes Overlay millimetergenau über dem Ghost */
.kw-word-visible {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: inline-flex;
  align-items: baseline;
  white-space: nowrap;
  border-radius: 4px;
  font-family: inherit;
  font-size: inherit;
  font-weight: 500;
  color: var(--ink-black);
  box-sizing: border-box;
  padding: 0 1px;
  transition: background-color 0.08s ease, color 0.08s ease;
}

/* Inaktiv im Chunking (dezent gedimmt) */
.kw-word-slot.chunk-inactive {
  opacity: 0.22;
}

.kw-word-slot.chunk-active {
  opacity: 1;
}

/* Stufe 3 & 4: Anfangsbuchstabe + bündig sitzende Ausfülllinie auf Schrifthöhe */
.letter-layout {
  display: inline-flex;
  align-items: baseline;
  width: 100%;
  height: 100%;
  position: relative;
  line-height: inherit;
  white-space: nowrap;
}

.first-letter {
  font-family: inherit;
  font-size: inherit;
  font-weight: 700;
  color: var(--ink-black);
  flex-shrink: 0;
  line-height: inherit;
}

.word-filler-line {
  flex: 1;
  min-width: 6px;
  height: 0;
  border-bottom: 2px solid var(--ink-deep);
  margin-left: 3px;
  margin-right: 4px;
  align-self: baseline;
  margin-bottom: 2px;
}

/* Stufe 5: Punkte-Platzhalter statt Striche */
.word-filler-dots {
  display: inline-flex;
  align-items: center;
  letter-spacing: 2px;
  font-weight: 700;
  font-size: 0.88em;
  color: var(--ink-deep);
  opacity: 0.65;
  line-height: inherit;
  user-select: none;
}

.punct-char {
  font-family: inherit;
  font-size: inherit;
  color: var(--ink-black);
  flex-shrink: 0;
  line-height: inherit;
}

/* Monochromer Textmarker: Sanfter, leichter Grauton mit dezentem 1px-Abschluss und weichem Schatten */
.kw-word-slot.active-spoken .kw-word-visible {
  background: rgba(15, 23, 42, 0.08) !important;
  color: var(--ink-black) !important;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12), 0 2px 6px rgba(15, 23, 42, 0.06) !important;
  border-radius: 4px;
}

.kw-word-slot.active-spoken .first-letter,
.kw-word-slot.active-spoken .punct-char {
  color: var(--ink-black) !important;
}

.kw-word-slot.active-spoken .word-filler-line {
  border-bottom-color: var(--ink-deep) !important;
}

.kw-word-slot.active-spoken .word-filler-dots {
  color: var(--ink-black) !important;
  opacity: 1;
}

/* Beim Antippen zum Spicken */
.kw-word-slot.peeked .kw-word-visible {
  background: #e2e8f0 !important;
  color: var(--ink-black) !important;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12) !important;
}



.hint-row {
  margin-top: 14px;
  font-size: 0.74rem;
  color: var(--ink-muted);
  text-align: center;
}

/* ==========================================================================
   Steuerungs-Leiste
   ========================================================================== */
.bottom-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--paper-white);
  border: 1px solid var(--line-medium);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-md);
}

.main-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.btn-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line-medium);
  background: var(--paper-soft);
  color: var(--ink-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.15s ease;
}

.btn-icon:hover {
  background: var(--paper-white);
  border-color: var(--ink-deep);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.btn-icon:active {
  transform: scale(0.96);
}

.btn-play {
  flex: 1;
  height: 48px;
  border-radius: var(--radius-full);
  border: none;
  background: var(--ink-deep);
  color: var(--paper-white);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.28);
  transition: all 0.15s ease;
}

.btn-play:hover {
  background: #1e293b;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.32);
}

.btn-play:active {
  transform: translateY(0);
}

.btn-play.is-playing {
  background: var(--paper-white);
  color: var(--ink-deep);
  border: 2px solid var(--ink-deep);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.btn-play.is-playing .play-icon-svg {
  fill: var(--ink-deep);
}

.play-icon-svg {
  flex-shrink: 0;
}

.secondary-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.btn-sub {
  flex: 1;
  padding: 8px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line-medium);
  background: var(--paper-soft);
  color: var(--ink-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: all 0.15s ease;
}

.btn-sub:hover {
  border-color: var(--ink-deep);
  color: var(--ink-black);
}

.btn-sub.active {
  background: var(--ink-deep);
  color: var(--paper-white);
  border-color: var(--ink-deep);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.22);
}

.speed-select-mobile {
  padding: 8px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line-medium);
  background: var(--paper-soft);
  color: var(--ink-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: all 0.15s ease;
}

.speed-select-mobile:hover,
.speed-select-mobile:focus {
  border-color: var(--ink-deep);
  color: var(--ink-black);
  outline: none;
}

@media (max-width: 480px) {
  .book-page {
    padding: 22px 16px;
  }
  .book-text-box {
    font-size: 1.35rem;
    line-height: 2.05;
  }
  .btn-sub span {
    font-size: 0.76rem;
  }
  .chunk-control-panel {
    padding: 10px 12px;
  }
}

/* Stufen-Leiste responsive für 4 Buttons */
.stage-btn {
  padding: 8px 4px;
  font-size: 0.78rem;
  gap: 4px;
}

@media (max-width: 440px) {
  .stage-btn {
    font-size: 0.72rem;
    padding: 7px 2px;
    gap: 3px;
  }
  .stage-num {
    width: 16px;
    height: 16px;
    font-size: 0.68rem;
  }
}

/* Mikrofon-Aufnahme Status (Stufe 4) */
.btn-play.is-recording {
  background: #0f172a !important;
  color: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.25), 0 4px 14px rgba(15, 23, 42, 0.35) !important;
  animation: pulse-recording 1.6s infinite ease-in-out;
}

@keyframes pulse-recording {
  0% {
    box-shadow: 0 0 0 0 rgba(15, 23, 42, 0.4), 0 4px 14px rgba(15, 23, 42, 0.35);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(15, 23, 42, 0), 0 4px 14px rgba(15, 23, 42, 0.35);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(15, 23, 42, 0), 0 4px 14px rgba(15, 23, 42, 0.35);
  }
}

.btn-play.is-recording .play-icon-svg {
  fill: #ffffff;
}

/* Korrekt gesprochene Wörter in Stufe 4 */
.kw-word-slot.voice-correct .kw-word-visible {
  color: var(--ink-black) !important;
  font-weight: 700;
}

/* ==========================================================================
   Wiederholungs-Begleiter (Stufe 3 - Permanente visuelle Führung)
   ========================================================================== */
.repetition-companion {
  background: var(--paper-white);
  border: 2px solid var(--ink-deep);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 2px;
  transition: all 0.2s ease;
}

.rep-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.rep-chunk-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.rep-badge-stage {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: var(--ink-deep);
  color: var(--paper-white);
  padding: 2.5px 8px;
  border-radius: var(--radius-full);
}

.rep-chunk-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink-deep);
}

.rep-counter-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  border: 1.5px solid var(--line-medium);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.rep-counter-num {
  font-size: 0.88rem;
  font-weight: 900;
  color: #0f172a;
}

.rep-counter-remain {
  font-size: 0.74rem;
  font-weight: 700;
  color: #334155;
}

/* 5 Wiederholungs-Pillen / Tracker */
.rep-pills-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.rep-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 3px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line-medium);
  background: var(--paper-soft);
  text-align: center;
  min-height: 48px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.rep-pill-num {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--ink-secondary);
  line-height: 1.1;
}

.rep-pill-desc {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--ink-muted);
  line-height: 1.1;
  margin-top: 2px;
}

/* Pillen-Zustand: Abgeschlossen */
.rep-pill.is-completed {
  background: #ecfdf5;
  border-color: #059669;
  box-shadow: 0 1px 3px rgba(5, 150, 105, 0.15);
}
.rep-pill.is-completed .rep-pill-num {
  color: #047857;
  font-weight: 900;
}
.rep-pill.is-completed .rep-pill-desc {
  color: #065f46;
  font-weight: 700;
}

/* Pillen-Zustand: Aktiv (hört gerade zu / jetzt sprechen) */
.rep-pill.is-active {
  background: #eff6ff;
  border-color: #2563eb;
  border-width: 2px;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
  animation: repPillPulse 1.8s infinite ease-in-out;
}
.rep-pill.is-active .rep-pill-num {
  color: #1d4ed8;
  font-weight: 900;
}
.rep-pill.is-active .rep-pill-desc {
  color: #1e40af;
  font-weight: 800;
}

@keyframes repPillPulse {
  0%, 100% {
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.35);
  }
}

/* Pillen-Zustand: Ausstehend */
.rep-pill.is-pending {
  opacity: 0.65;
  background: #f8fafc;
}

/* Begleit-Leitfaden Banner */
.rep-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: #f8fafc;
  border-left: 4px solid var(--ink-deep);
  border-top: 1px solid var(--line-light);
  border-right: 1px solid var(--line-light);
  border-bottom: 1px solid var(--line-light);
  transition: all 0.2s ease;
}

.rep-banner.banner-success {
  border-left-color: #059669;
  background: #f0fdf4;
}

.rep-banner.banner-active {
  border-left-color: #2563eb;
  background: #f0f7ff;
}

.rep-banner.banner-reading {
  border-left-color: #0f172a;
  background: #f8fafc;
}

.rep-banner-icon {
  font-size: 1.35rem;
  line-height: 1;
  flex-shrink: 0;
}

.rep-banner-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.rep-banner-headline {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--ink-deep);
  line-height: 1.25;
}

.rep-banner-subline {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--ink-secondary);
  line-height: 1.35;
}

@media (max-width: 480px) {
  .rep-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .rep-counter-badge {
    align-self: flex-start;
  }
  .rep-pill {
    padding: 4px 2px;
    min-height: 44px;
  }
  .rep-pill-num {
    font-size: 0.75rem;
  }
  .rep-pill-desc {
    font-size: 0.6rem;
  }
  .rep-banner {
    padding: 8px 10px;
    gap: 8px;
  }
  .rep-banner-headline {
    font-size: 0.8rem;
  }
  .rep-banner-subline {
    font-size: 0.7rem;
  }
}

/* Stufe 5: 1 einzelner Punkt symbolisiert 1 ganzes Wort */
.letter-layout.single-dot-word {
  justify-content: center;
}

.single-dot-word .word-filler-dots {
  font-size: 1.15em;
  color: var(--ink-deep);
  opacity: 0.8;
  letter-spacing: 0;
  display: inline-block;
  line-height: 1;
}

/* Status-Spalte im Chunk-Panel mit ruhiger Unterzeile */
.chunk-status-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chunk-status-subline {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-muted);
  line-height: 1.2;
}


/* ==========================================================================
   Smartphone Startbildschirm (app.evangelisationszeit.de)
   Ultra-crisp Monochrome Luxury UI mit Smartphone Statusleiste & App Dock
   ========================================================================== */

.launcher-body {
  background-color: var(--paper-soft);
  min-height: 100vh;
  padding-bottom: 110px; /* Platz für das fixierte Dock */
}

/* Launcher Kopfzeile */
.launcher-header {
  border-bottom: 1px solid var(--line-light);
  background: var(--paper-white);
}

/* Hauptcontainer */
.launcher-main-container {
  max-width: 680px;
  margin: 0 auto;
  padding: 24px 16px 20px;
}

/* Begrüßung */
.launcher-greeting-section {
  margin-bottom: 22px;
}

.launcher-date {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin-bottom: 4px;
}

.launcher-headline {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--ink-black);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0 0 6px;
}

.launcher-subline {
  font-size: 0.92rem;
  color: var(--ink-secondary);
  margin: 0;
  line-height: 1.45;
}

/* Hero Widget: Tagesvers */
.launcher-widget-card {
  background: var(--paper-white);
  border: 1px solid var(--line-medium);
  border-radius: 20px;
  box-shadow: var(--shadow-book);
  padding: 22px 20px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.launcher-widget-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.widget-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--paper-card);
  color: var(--ink-deep);
  border: 1px solid var(--line-medium);
  border-radius: var(--radius-full);
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 700;
}

.widget-stage-indicator {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.widget-verse-body {
  margin-bottom: 18px;
}

.widget-verse-quote {
  font-family: var(--font-book);
  font-size: 1.15rem;
  font-style: italic;
  line-height: 1.55;
  color: var(--ink-black);
  margin: 0 0 8px;
}

.widget-verse-ref {
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--ink-deep);
  font-style: normal;
  display: block;
}

.widget-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.widget-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 18px;
  min-height: 44px;
  box-sizing: border-box;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.15s ease;
}

.widget-action-btn.primary {
  background: var(--ink-deep);
  color: var(--paper-white);
  border: 1px solid var(--ink-deep);
}

.widget-action-btn.primary:hover {
  background: var(--ink-black);
  transform: translateY(-1px);
}

.widget-action-btn.secondary {
  background: var(--paper-soft);
  color: var(--ink-deep);
  border: 1px solid var(--line-medium);
}

.widget-action-btn.secondary:hover {
  background: var(--paper-card);
  border-color: var(--ink-deep);
}

/* Sektions-Header */
.launcher-section {
  margin-bottom: 28px;
}

.section-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 0 4px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink-black);
  margin: 0;
  letter-spacing: -0.01em;
}

.section-count {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* App Grid: 4 Cards */
.apps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 540px) {
  .apps-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }
}

.app-icon-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--paper-white);
  border: 1px solid var(--line-medium);
  border-radius: 18px;
  padding: 16px;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.app-icon-card:hover {
  background: var(--paper-white);
  border-color: var(--ink-deep);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.app-icon-squircle {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--paper-white);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s ease;
}

.app-icon-card:hover .app-icon-squircle {
  transform: scale(1.05);
}

/* Monochrome Squircles mit feinen Akzenten */
.icon-audio {
  background: linear-gradient(135deg, #0b1120 0%, #1e293b 100%);
}

.icon-trainer {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

.icon-plan {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

.icon-pocket {
  background: linear-gradient(135deg, #090d16 0%, #1c2436 100%);
}

.icon-map {
  background: linear-gradient(135deg, #182234 0%, #293548 100%);
}

.app-card-details {
  flex: 1;
  min-width: 0;
}

.app-card-header-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
  flex-wrap: wrap;
}

.app-card-title {
  font-family: var(--font-heading);
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--ink-black);
}

.app-chip {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--paper-card);
  color: var(--ink-secondary);
  border: 1px solid var(--line-medium);
  border-radius: 4px;
  padding: 1px 6px;
}

.app-card-desc {
  font-size: 0.8rem;
  color: var(--ink-muted);
  line-height: 1.35;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.app-card-arrow {
  color: var(--ink-subtle);
  flex-shrink: 0;
  transition: transform 0.15s ease, color 0.15s ease;
}

.app-icon-card:hover .app-card-arrow {
  color: var(--ink-deep);
  transform: translateX(2px);
}

/* Sammlungen Schnellstart */
.collections-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 540px) {
  .collections-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.collection-box {
  background: var(--paper-white);
  border: 1px solid var(--line-medium);
  border-radius: 16px;
  padding: 18px 16px;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
}

.collection-box:hover {
  border-color: var(--ink-deep);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.collection-badge-tag {
  align-self: flex-start;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--ink-deep);
  color: var(--paper-white);
  border-radius: 4px;
  padding: 2px 8px;
  margin-bottom: 10px;
}

.collection-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink-black);
  margin-bottom: 4px;
}

.collection-subtitle {
  font-size: 0.82rem;
  color: var(--ink-secondary);
  line-height: 1.4;
  margin: 0 0 14px;
  flex: 1;
}

.collection-link-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-deep);
  border-top: 1px solid var(--line-light);
  padding-top: 10px;
}

/* Footer */
.launcher-footer {
  text-align: center;
  padding: 24px 12px 16px;
  border-top: 1px solid var(--line-light);
  margin-top: 10px;
}

.launcher-footer-quote {
  font-family: var(--font-book);
  font-size: 0.95rem;
  font-style: italic;
  color: var(--ink-secondary);
  line-height: 1.5;
  max-width: 480px;
  margin: 0 auto 6px;
}

.launcher-footer-ref {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.launcher-footer-legal {
  font-size: 0.72rem;
  color: var(--ink-subtle);
}

/* Smartphone Dock (Unten schwebend fixiert) */
.phone-dock-bar {
  position: fixed;
  bottom: 14px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  z-index: 1000;
  pointer-events: none; /* Nur innere Dock klickbar */
  padding: 0 16px;
}

.dock-inner {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 6px 10px;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3), 0 2px 6px rgba(0, 0, 0, 0.2);
  max-width: 95vw;
}

.dock-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 12px;
  min-width: 44px;
  min-height: 44px;
  box-sizing: border-box;
  border-radius: 18px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.72);
  transition: all 0.18s ease;
}

@media (max-width: 380px) {
  .dock-inner {
    gap: 2px;
    padding: 4px 6px;
  }
  .dock-item {
    padding: 5px 4px;
    min-width: 44px;
    min-height: 44px;
  }
  .dock-label {
    font-size: 0.62rem;
  }
}

.dock-item:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.dock-item.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.dock-icon-squircle {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dock-label {
  font-family: var(--font-heading);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
