/*
  BAROLOGIE – MAIN.CSS
  Inhalt / Zweck
  1. Design-Tokens und Grundlayout
  2. Header / Logo / Menü-Button
  3. Hero mit Typo im Bild
  4. Kapiteltext / Tabellen / Prose
  5. Inhaltsdrawer mit Accordion
  6. Bottom-Bar mit Kapitel + Vorlesen
  7. Responsive Feinabstimmung
*/
:root{
  --bg:#050607;
  --bg-2:#081018;
  --panel:#0d1117;
  --card:#0f1620;
  --text:#edf1f5;
  --muted:#a9b3c1;
  --muted-2:rgba(233,238,246,.58);
  --line:rgba(255,255,255,.075);
  --line-strong:rgba(255,255,255,.12);
  --gold:rgba(214,176,120,.9);
  --shadow:0 18px 48px rgba(0,0,0,.42);
  --safe-top:env(safe-area-inset-top,0px);
  --safe-bottom:env(safe-area-inset-bottom,0px);
  --font-ui:-apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  min-height:100vh;
  background:radial-gradient(circle at top center, rgba(214,176,120,.06), transparent 22%), linear-gradient(180deg,var(--bg) 0%,var(--bg-2) 100%);
  color:var(--text);
  font-family:var(--font-ui);
}
button{font:inherit;color:inherit;background:none;border:0;padding:0;cursor:pointer}
img{display:block;max-width:100%}
.material-symbols-rounded{font-variation-settings:'FILL' 0,'wght' 400,'GRAD' 0,'opsz' 24;line-height:1}
.topbar{
  position:sticky;top:0;z-index:40;
  padding:calc(10px + var(--safe-top)) 16px 10px;
  background:linear-gradient(180deg, rgba(4,6,8,.96) 0%, rgba(4,6,8,.88) 72%, rgba(4,6,8,.18) 100%);
  backdrop-filter:blur(18px);
  display:flex;align-items:center;justify-content:space-between;gap:16px;
}
.brand{display:flex;align-items:center;gap:12px;min-width:0}
.brand--header{min-width:0;flex:1}
.brand-lockup{display:none;height:30px;width:auto;object-fit:contain;max-width:min(70vw,340px)}
.brand-fallback{display:flex;align-items:center;gap:12px;min-width:0}
.brand-logo{width:28px;height:28px;object-fit:contain;flex:0 0 auto}
.brand-logo.small{width:28px;height:28px}
.brand-copy{display:flex;flex-direction:column;gap:2px;min-width:0}
.brand-title{font-size:16px;line-height:1.04;letter-spacing:-.02em;font-weight:560}
.brand-subtitle{font-size:11px;line-height:1.15;color:rgba(233,238,246,.72);letter-spacing:.01em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.icon-button{width:42px;height:42px;border-radius:16px;display:grid;place-items:center}
.topbar-menu{background:rgba(255,255,255,.025);border:1px solid var(--line);box-shadow:0 8px 24px rgba(0,0,0,.22)}
.reader-shell{padding:8px 12px calc(82px + var(--safe-bottom));max-width:980px;margin:0 auto}
.hero-shell{padding:0 0 14px}
.hero-card{position:relative;min-height:230px;border-radius:28px;border:1px solid var(--line);overflow:hidden;background:linear-gradient(180deg, rgba(11,16,24,1) 0%, rgba(8,12,18,1) 100%);box-shadow:var(--shadow)}
.hero-card.no-image{background:radial-gradient(circle at 20% 10%, rgba(214,176,120,.08), transparent 22%),linear-gradient(180deg, rgba(13,17,23,.98), rgba(8,12,18,1))}
.hero-image{width:100%;height:100%;aspect-ratio:16/9;object-fit:cover;background:#090c11}
.hero-card.no-image .hero-image{opacity:0}
.hero-overlay{position:absolute;inset:auto 0 0 0;padding:18px;background:linear-gradient(180deg, rgba(4,6,8,0) 0%, rgba(4,6,8,.24) 20%, rgba(4,6,8,.82) 64%, rgba(4,6,8,.94) 100%)}
.hero-kicker{font-size:10px;line-height:1.35;letter-spacing:.16em;text-transform:uppercase;color:var(--muted-2);margin-bottom:8px}
.hero-meta-row{display:flex;align-items:flex-start;gap:8px;flex-wrap:wrap;margin-bottom:8px}
.hero-label,.hero-subtitle,.hero-dot{font-size:12px;line-height:1.42;color:rgba(233,238,246,.74)}
.hero-title{margin:0;max-width:92%;font-size:clamp(24px,7vw,38px);line-height:1.02;letter-spacing:-.045em;font-weight:460;text-wrap:balance}
.chapter-card{border:1px solid var(--line);border-radius:28px;background:linear-gradient(180deg, rgba(14,20,30,.9), rgba(10,15,24,.92));box-shadow:var(--shadow);overflow:hidden}
.chapter-content{padding:22px 18px 30px}
.prose h2{margin:0 0 12px;font-size:clamp(24px,6.2vw,38px);line-height:1.06;letter-spacing:-.04em;font-weight:480}
.prose h3{margin:28px 0 10px;font-size:clamp(20px,5vw,28px);line-height:1.12;letter-spacing:-.03em;font-weight:500}
.prose h4{margin:22px 0 8px;font-size:clamp(17px,4.5vw,22px);line-height:1.24;color:#f1f4f8;font-weight:540}
.prose p{margin:0 0 15px;color:#e7ecf2;font-size:16px;line-height:1.76;font-weight:380}
.prose .lead{font-size:17px;line-height:1.72;color:#f2f5f9}
.prose table{width:100%;border-collapse:collapse;margin:18px 0 24px;background:rgba(255,255,255,.02);border:1px solid var(--line);border-radius:16px;overflow:hidden;display:block;overflow-x:auto}
.prose thead{background:rgba(255,255,255,.03)}
.prose tr{border-bottom:1px solid var(--line)}
.prose th,.prose td{min-width:170px;text-align:left;vertical-align:top;padding:12px 13px 13px;font-size:14px;line-height:1.55}
.prose th{color:#f5f6f8;font-weight:560}
.prose td{color:#dfe5ee;font-weight:390}
.prose ul,.prose ol{margin:0 0 18px 20px;padding:0}
.prose li{margin:0 0 9px;font-size:16px;line-height:1.7;color:#e7ecf2;font-weight:380}
.prose blockquote{margin:20px 0;padding:16px 16px 16px 18px;border-left:2px solid rgba(255,255,255,.14);background:rgba(255,255,255,.03);border-radius:14px}
.prose hr{border:0;border-top:1px solid var(--line);margin:24px 0}
.prose .tts-current{background:rgba(214,176,120,.12);outline:1px solid rgba(214,176,120,.22);border-radius:8px;transition:background .2s ease}
.toc-drawer{position:fixed;top:0;left:0;bottom:0;width:min(82vw,340px);z-index:60;transform:translateX(-102%);transition:transform .22s ease;background:linear-gradient(180deg, rgba(7,10,14,.98), rgba(7,10,14,.96));border-right:1px solid var(--line);backdrop-filter:blur(18px);display:flex;flex-direction:column}
.toc-drawer.open{transform:translateX(0)}
.toc-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:calc(12px + var(--safe-top)) 14px 12px;border-bottom:1px solid var(--line)}
.toc-brand{display:flex;align-items:center;gap:10px;min-width:0}
.toc-title-wrap{display:flex;flex-direction:column;gap:1px}
.toc-kicker{font-size:10px;letter-spacing:.16em;text-transform:uppercase;color:var(--muted);margin-bottom:1px}
.toc-title{font-size:19px;line-height:1.05;letter-spacing:-.03em;font-weight:430}
.icon-button.subtle{background:rgba(255,255,255,.025);border:1px solid var(--line);box-shadow:0 8px 24px rgba(0,0,0,.22)}
#tocNav{padding:12px 10px 24px;overflow:auto}
.toc-group{margin-bottom:10px}
.toc-group-head{padding:0}
.toc-group-trigger{width:100%;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 6px 8px;text-align:left}
.toc-group-title{font-size:10px;letter-spacing:.16em;text-transform:uppercase;color:var(--muted)}
.toc-group-chevron{font-size:18px;color:rgba(233,238,246,.52);transition:transform .2s ease}
.toc-group.open .toc-group-chevron{transform:rotate(0deg)}
.toc-group:not(.open) .toc-group-chevron{transform:rotate(-90deg)}
.toc-group-panel{display:none;padding:0 2px 2px}
.toc-group.open .toc-group-panel{display:block}
.toc-item{width:100%;text-align:left;padding:10px 12px 11px;border-radius:14px;border:1px solid transparent}
.toc-item.active{background:rgba(255,255,255,.022);border-color:var(--line)}
.toc-item-kicker{font-size:10px;letter-spacing:.11em;text-transform:uppercase;color:rgba(233,238,246,.44);margin-bottom:4px}
.toc-item-title{font-size:15px;line-height:1.2;color:var(--text);font-weight:420}
.toc-item-subtitle{margin-top:4px;font-size:12px;line-height:1.35;color:rgba(233,238,246,.56);font-weight:380}
.scrim{position:fixed;inset:0;background:rgba(0,0,0,.42);opacity:0;pointer-events:none;z-index:50;transition:opacity .22s ease}
.scrim.show{opacity:1;pointer-events:auto}
.progress-wrap{position:fixed;left:0;right:0;bottom:calc(68px + var(--safe-bottom));height:2px;background:rgba(255,255,255,.05);z-index:34}
.progress-bar{height:100%;width:0;background:var(--gold);transition:width .22s ease}
.reader-nav{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(8px + var(--safe-bottom));z-index:40;padding:8px 12px;background:rgba(4,6,8,.88);backdrop-filter:blur(18px);border:1px solid var(--line);border-radius:24px;display:flex;justify-content:center;align-items:center;gap:14px;box-shadow:0 18px 48px rgba(0,0,0,.42)}
.reader-nav-button{width:46px;height:46px;border-radius:16px;display:grid;place-items:center;background:rgba(255,255,255,.025);border:1px solid var(--line)}
.reader-nav-button .material-symbols-rounded{font-size:24px}
.reader-nav-button:disabled{opacity:.34}
.reader-nav-button.tts-toggle{width:54px;height:54px;border-radius:18px;background:rgba(214,176,120,.08);border-color:rgba(214,176,120,.22)}
.reader-nav-button.tts-toggle .material-symbols-rounded{font-size:28px}
@media (min-width:760px){
  .topbar{padding-left:22px;padding-right:22px}
  .reader-shell{padding-left:18px;padding-right:18px}
  .hero-overlay{padding:20px 22px}
  .chapter-content{padding:28px 28px 34px}
}


/* BAROLOGIE HEADER MENU SUBTITLE TTS PATCH START */
.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:calc(14px + var(--safe-top)) 18px 14px;
}
.brand{
  display:flex;
  align-items:center;
  gap:14px;
  min-width:0;
}
.brand-logo{
  width:38px;
  height:38px;
  object-fit:contain;
  border:none;
  background:none;
  padding:0;
  border-radius:0;
}
.brand-copy{
  display:flex;
  flex-direction:column;
  gap:2px;
  min-width:0;
}
.brand-title{
  font-size:19px;
  line-height:1;
  letter-spacing:.08em;
  text-transform:uppercase;
  font-weight:560;
}
.brand-subtitle{
  font-size:11px;
  line-height:1.15;
  color:rgba(233,238,246,.72);
  font-weight:380;
  white-space:nowrap;
}
.menu-toggle{
  width:58px;
  height:58px;
  border-radius:18px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:8px;
  background:rgba(255,255,255,.03);
  border:1px solid var(--line);
  box-shadow:0 12px 26px rgba(0,0,0,.26);
}
.menu-toggle-line{
  width:24px;
  height:3px;
  border-radius:999px;
  background:#f3f5f7;
}
body.toc-open .menu-toggle{
  opacity:0;
  pointer-events:none;
}
.toc-drawer{
  width:100vw;
  max-width:100vw;
  z-index:80;
}
.toc-header{
  padding:calc(14px + var(--safe-top)) 18px 14px;
}
.toc-brand{
  display:flex;
  align-items:center;
  gap:14px;
}
.toc-brand-logo{
  width:38px;
  height:38px;
  object-fit:contain;
  border:none;
  background:none;
  padding:0;
  border-radius:0;
}
.toc-title-wrap{
  display:flex;
  flex-direction:column;
  gap:2px;
}
.toc-kicker{
  font-size:11px;
  line-height:1.1;
  letter-spacing:.18em;
  text-transform:uppercase;
  color:rgba(233,238,246,.66);
  margin:0;
}
.toc-title{
  font-size:19px;
  line-height:1;
  letter-spacing:.08em;
  text-transform:uppercase;
  font-weight:560;
}
.toc-subtitle{
  font-size:11px;
  line-height:1.15;
  color:rgba(233,238,246,.72);
  font-weight:380;
}
.toc-close-button{
  width:58px;
  height:58px;
  border-radius:18px;
  background:rgba(255,255,255,.03);
  border:1px solid var(--line);
}
#tocNav{
  padding:16px 14px 30px;
}
.toc-group{
  margin-bottom:14px;
}
.toc-group-trigger{
  padding:4px 6px 10px;
}
.toc-group-title{
  font-size:12px;
  line-height:1.15;
  letter-spacing:.18em;
  text-transform:uppercase;
  color:rgba(233,238,246,.66);
}
.toc-item{
  padding:11px 12px 12px;
  border-radius:18px;
}
.toc-item-kicker{
  font-size:11px;
  line-height:1.15;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:rgba(233,238,246,.44);
  margin-bottom:6px;
}
.toc-item-title{
  font-size:16px;
  line-height:1.18;
  font-weight:430;
}
.toc-item-subtitle{
  margin-top:5px;
  font-size:12px;
  line-height:1.32;
  color:rgba(233,238,246,.56);
}
.reader-nav{
  width:min(100% - 28px, 396px);
  padding:12px 14px calc(12px + var(--safe-bottom));
  gap:18px;
}
.reader-nav-button{
  width:58px;
  height:58px;
  border-radius:18px;
}
.reader-nav-button.center{
  width:68px;
  height:68px;
  border-radius:22px;
}
.reader-nav-button .material-symbols-rounded{
  font-size:31px;
}
.reader-nav-button.center .material-symbols-rounded{
  font-size:36px;
}
@media (min-width: 900px){
  .toc-drawer{
    width:min(100vw, 460px);
  }
}
/* BAROLOGIE HEADER MENU SUBTITLE TTS PATCH END */



/* BAROLOGIE HEADER/MENU FINAL REPAIR PATCH */
.brand{flex:1;min-width:0;display:flex;align-items:center;gap:14px}
.brand-logo,.toc-brand-logo{width:38px;height:38px;object-fit:contain;filter:none !important;opacity:1 !important;display:block !important}
.brand-copy{display:flex !important;flex-direction:column;gap:2px;min-width:0}
.brand-title{display:block !important;font-size:18px;line-height:1;letter-spacing:.08em;text-transform:uppercase;font-weight:560;color:#f3f5f7}
.brand-subtitle{display:block !important;font-size:11px;line-height:1.12;color:rgba(233,238,246,.72);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.menu-toggle{width:40px;height:40px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;border:none !important;background:transparent !important;box-shadow:none !important;border-radius:0 !important;padding:0}
.menu-toggle-line{height:3px;border-radius:999px;background:#f4f6f8}
.menu-toggle-line:first-child{width:28px}
.menu-toggle-line:last-child{width:18px}
body.toc-open .menu-toggle{opacity:0;pointer-events:none}
.toc-drawer{width:100vw !important;max-width:100vw !important}
.toc-close-button{width:40px;height:40px;border:none !important;background:transparent !important;box-shadow:none !important;border-radius:0 !important}
.toc-close-button .material-symbols-rounded{font-size:34px}
.progress-wrap{display:none !important}
@media (min-width:900px){.toc-drawer{width:min(100vw,460px) !important;max-width:min(100vw,460px) !important}}


/* BAROLOGIE HEADER MENU CLOSE PLAYFILL PATCH */
:root{
  --safe-top: env(safe-area-inset-top, 0px);
}
.topbar{
  padding: calc(var(--safe-top) + 14px) 16px 10px !important;
  min-height: 78px;
  align-items: flex-start;
}
.brand{
  gap: 12px;
  align-items: center;
}
.brand-logo{
  width: 36px !important;
  height: 36px !important;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
}
.brand-copy{
  display: flex !important;
  justify-content: center;
  min-width: 0;
}
.brand-title{
  font-size: 18px !important;
  line-height: 1.0 !important;
  letter-spacing: .11em !important;
  text-transform: uppercase !important;
  font-weight: 560 !important;
}
.brand-subtitle{
  font-size: 10.5px !important;
  line-height: 1.15 !important;
  color: rgba(233,238,246,.74) !important;
  white-space: nowrap !important;
  overflow: hidden;
  text-overflow: ellipsis;
}
.menu-toggle{
  width: 44px !important;
  height: 44px !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  gap: 7px !important;
  justify-content: center;
  align-items: center;
}
.menu-toggle-line{
  width: 26px !important;
  height: 3px !important;
  background: #f4f6f8 !important;
  border-radius: 999px !important;
  display: block;
}
.menu-toggle-line:last-child{
  width: 18px !important;
  margin-left: 8px;
}
body.toc-open .menu-toggle{
  opacity: 0 !important;
  pointer-events: none !important;
}
.toc-drawer{
  width: 100vw !important;
  max-width: 100vw !important;
}
.toc-header{
  padding: calc(var(--safe-top) + 14px) 18px 14px !important;
}
.progress-wrap{
  display: none !important;
}
.reader-nav{
  width: min(100% - 34px, 320px) !important;
  gap: 16px !important;
  padding: 10px 14px calc(10px + var(--safe-bottom)) !important;
  border-radius: 28px !important;
}
.reader-nav-button{
  width: 54px !important;
  height: 54px !important;
  border-radius: 18px !important;
}
.reader-nav-button.center{
  width: 58px !important;
  height: 58px !important;
  border-radius: 20px !important;
  background: rgba(214,176,120,.12) !important;
  border: 1px solid rgba(214,176,120,.26) !important;
}
.reader-nav-button .material-symbols-rounded{
  font-size: 30px !important;
}
.reader-nav-button.center .material-symbols-rounded{
  font-size: 34px !important;
  font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24 !important;
}
@media (max-width: 430px){
  .topbar{
    padding-left: 14px !important;
    padding-right: 14px !important;
  }
  .brand-title{
    font-size: 17px !important;
    letter-spacing: .09em !important;
  }
  .brand-subtitle{
    font-size: 10px !important;
  }
}
/* BAROLOGIE HEADER MENU CLOSE PLAYFILL PATCH END */


/* Voice Lab: Stimmenauswahl und Equalizer
   Zweck: lokaler Testbereich für iPhone/Safari speechSynthesis.
   Enthält: Modal/Panel, Ladezustand, Voice-Select, Tempo/Tonhöhe/Lautstärke.
*/
.voice-panel{position:fixed;left:50%;bottom:calc(88px + var(--safe-bottom,0px));transform:translateX(-50%) translateY(18px);width:min(560px,calc(100vw - 28px));max-height:min(70vh,620px);overflow:auto;z-index:55;background:rgba(7,10,13,.96);border:1px solid rgba(255,255,255,.10);border-radius:28px;box-shadow:0 24px 80px rgba(0,0,0,.58);backdrop-filter:blur(22px);padding:20px;opacity:0;pointer-events:none;transition:opacity .18s ease,transform .18s ease}
.voice-panel.is-open{opacity:1;pointer-events:auto;transform:translateX(-50%) translateY(0)}
.voice-panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:18px}
.voice-panel-kicker{color:rgba(235,241,248,.58);font-size:11px;letter-spacing:.22em;text-transform:uppercase;margin-bottom:4px}
.voice-panel h2{margin:0;font-size:22px;line-height:1.1;font-weight:620;color:rgba(248,250,252,.96)}
.voice-panel-close{width:42px;height:42px;border:0;border-radius:16px;background:rgba(255,255,255,.055);color:rgba(248,250,252,.94);display:grid;place-items:center}
.voice-load-state{color:rgba(235,241,248,.66);font-size:14px;line-height:1.45;padding:12px 14px;border-radius:16px;background:rgba(255,255,255,.035);border:1px solid rgba(255,255,255,.07);margin-bottom:14px}
.voice-field{display:grid;gap:8px;margin-bottom:18px}
.voice-field label,.voice-slider label{color:rgba(235,241,248,.72);font-size:12px;letter-spacing:.08em;text-transform:uppercase}
.voice-field select{width:100%;min-height:48px;color:rgba(248,250,252,.96);background:rgba(255,255,255,.055);border:1px solid rgba(255,255,255,.12);border-radius:16px;padding:0 14px;font:inherit}
.voice-eq{display:grid;gap:16px}.voice-slider{display:grid;gap:8px}.voice-slider label{display:flex;justify-content:space-between;gap:16px}.voice-slider input[type="range"]{width:100%;accent-color:#d6b078}
.voice-test-button{margin-top:18px;width:100%;min-height:48px;border:1px solid rgba(214,176,120,.28);border-radius:18px;color:rgba(248,250,252,.96);background:rgba(214,176,120,.10);display:flex;align-items:center;justify-content:center;gap:10px;font:inherit}
.reader-nav-button.voice-settings-button{width:46px;height:46px}.prose .tts-speaking{background:rgba(214,176,120,.12);outline:1px solid rgba(214,176,120,.22);border-radius:8px}


/* ==========================================================================
   BAROLOGIE FINAL VISUAL CORRECTION
   Zweck: Logo #f1f1f1, Menübutton kleiner/höher, Bottom-Bar ruhiger,
   Material-3-Filled Icons und Entfernung des Blaustichs.
   ========================================================================== */

:root{
  --dg-bg:#0F0F10;
  --dg-surface:#1B1B1F;
  --dg-surface-elevated:#232327;
  --dg-outline:rgba(255,255,255,.08);
  --dg-outline-soft:rgba(255,255,255,.05);
  --dg-text:#EDEAE4;
  --dg-text-soft:#C8C1BA;
  --dg-accent:#D6B078;
  --dg-accent-soft:rgba(214,176,120,.12);
  --safe-top:env(safe-area-inset-top,0px);
  --safe-bottom:env(safe-area-inset-bottom,0px);
}

html,body{background:#0F0F10;color:var(--dg-text)}

#app{
  min-height:100svh;
  background:
    radial-gradient(circle at 50% -8%,rgba(214,176,120,.032),transparent 34%),
    linear-gradient(180deg,#0F0F10 0%,#111113 48%,#0F0F10 100%);
}

.topbar{
  min-height:calc(58px + var(--safe-top));
  height:calc(58px + var(--safe-top));
  padding-top:var(--safe-top);
  background:rgba(15,15,16,.92);
  border-bottom:1px solid rgba(255,255,255,.045);
  box-shadow:none;
}

.brand-logo,.toc-brand-logo{
  width:34px;
  height:34px;
  opacity:1;
  filter:brightness(0) saturate(100%) invert(98%) sepia(0%) saturate(2%) hue-rotate(41deg) brightness(108%) contrast(89%);
}

.brand-title{color:#f1f1f1}
.brand-subtitle{color:rgba(241,241,241,.70)}

.menu-toggle{
  width:38px;
  height:38px;
  margin-top:-5px;
  margin-right:-2px;
  border:0;
  border-radius:14px;
  background:transparent;
  box-shadow:none;
}

.menu-toggle-line{
  height:2.35px;
  border-radius:999px;
  background:#f1f1f1;
}

.menu-toggle-line:nth-child(1){width:72%}
.menu-toggle-line:nth-child(2){width:52%;margin-left:auto}

.reader-shell{
  padding-left:16px;
  padding-right:16px;
  padding-bottom:calc(82px + var(--safe-bottom));
}

.hero-card{
  border-color:rgba(255,255,255,.075);
  background:#1B1B1F;
  box-shadow:0 14px 34px rgba(0,0,0,.34);
}

.hero-image{filter:brightness(.84) contrast(1.03) saturate(.90)}

.chapter-card{
  background:#1B1B1F;
  border:1px solid rgba(255,255,255,.06);
  box-shadow:0 14px 34px rgba(0,0,0,.28);
}

.prose{
  color:#EDEAE4;
  font-size:clamp(15px,4.05vw,16px);
  line-height:1.58;
}

.prose p,.prose li{color:#EDEAE4}

.reader-nav{
  min-height:52px;
  height:52px;
  bottom:calc(10px + var(--safe-bottom));
  padding:5px 8px;
  gap:10px;
  border-radius:22px;
  background:rgba(15,15,16,.86);
  border:1px solid rgba(255,255,255,.055);
  box-shadow:0 10px 26px rgba(0,0,0,.24);
  backdrop-filter:blur(18px);
}

.reader-nav-button{
  width:40px;
  height:40px;
  min-width:40px;
  border-radius:14px;
  background:rgba(255,255,255,.030);
  border:1px solid rgba(255,255,255,.055);
  color:#f1f1f1;
  box-shadow:none;
}

.reader-nav-button.center{
  width:44px;
  height:44px;
  min-width:44px;
  border-radius:16px;
  background:rgba(214,176,120,.16);
  border-color:rgba(214,176,120,.28);
  box-shadow:none;
}

.reader-nav-button .material-symbols-rounded,
.reader-nav-button.center .material-symbols-rounded,
.voice-test-button .material-symbols-rounded,
.icon-button .material-symbols-rounded{
  font-variation-settings:"FILL" 1,"wght" 400,"GRAD" 0,"opsz" 24;
}

.reader-nav-button .material-symbols-rounded{font-size:20px}
.reader-nav-button.center .material-symbols-rounded{font-size:22px}

.voice-panel{
  background:rgba(15,15,16,.97);
  border:1px solid rgba(255,255,255,.07);
  box-shadow:0 18px 50px rgba(0,0,0,.36);
}

.voice-panel-close{
  width:40px;
  height:40px;
  border-radius:14px;
}

.voice-load-state,.voice-field select{
  background:rgba(255,255,255,.035);
  border-color:rgba(255,255,255,.075);
}

.voice-test-button{
  background:rgba(214,176,120,.10);
  border-color:rgba(214,176,120,.24);
}

.toc-drawer{background:rgba(15,15,16,.985)}
.toc-header{background:rgba(15,15,16,.98);border-bottom:1px solid rgba(255,255,255,.055)}
.toc-item.is-active,.toc-link.is-active,.toc-entry.is-active{background:rgba(255,255,255,.04);border-color:rgba(214,176,120,.16)}

/* ==========================================================================
   BAROLOGIE VISUAL CORRECTION V2
   Zweck:
   - BL-Logo wirklich sichtbar (#f1f1f1, zusätzlich SVG intern korrigiert)
   - Header kompakter und weniger schwer
   - Menübutton kleiner, höher und ruhiger
   - Bottom-Bar niedriger, dezenter und stärker aus dem Lesetext herausgenommen
   - Blaustich aus Flächen und Glow konsequent entfernt
   ========================================================================== */

:root{
  --dg-bg:#0F0F10;
  --dg-surface:#1B1B1F;
  --dg-surface-elevated:#202024;
  --dg-outline:rgba(255,255,255,.065);
  --dg-text:#EDEAE4;
  --dg-text-soft:#C8C1BA;
  --dg-accent:#D6B078;
  --safe-top:env(safe-area-inset-top,0px);
  --safe-bottom:env(safe-area-inset-bottom,0px);
}

html,
body{
  background:#0F0F10;
}

#app{
  background:#0F0F10;
}

#app::before,
#app::after,
body::before,
body::after{
  background:none;
  box-shadow:none;
}

.topbar{
  height:calc(54px + var(--safe-top));
  min-height:calc(54px + var(--safe-top));
  padding-top:var(--safe-top);
  padding-left:18px;
  padding-right:18px;
  background:#0F0F10;
  border-bottom:1px solid rgba(255,255,255,.045);
  box-shadow:none;
}

.brand{
  gap:9px;
}

.brand-logo,
.toc-brand-logo,
#brandLogo,
#tocLogo{
  width:32px;
  height:32px;
  opacity:1;
  filter:none;
}

.brand-title{
  color:#f1f1f1;
  font-size:17px;
  line-height:1;
  letter-spacing:.13em;
  font-weight:620;
}

.brand-subtitle{
  color:rgba(241,241,241,.68);
  font-size:10.5px;
  line-height:1.18;
  margin-top:3px;
}

.menu-toggle{
  width:34px;
  height:34px;
  margin-top:-8px;
  margin-right:0;
  border:0;
  border-radius:12px;
  background:transparent;
  box-shadow:none;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:flex-end;
  gap:6px;
}

.menu-toggle-line{
  display:block;
  height:2.15px;
  border-radius:999px;
  background:#f1f1f1;
}

.menu-toggle-line:nth-child(1){
  width:28px;
}

.menu-toggle-line:nth-child(2){
  width:20px;
}

.reader-shell{
  padding-left:18px;
  padding-right:18px;
  padding-bottom:calc(132px + var(--safe-bottom));
}

.hero-shell{
  margin-top:14px;
}

.hero-card{
  height:clamp(162px,28svh,208px);
  min-height:clamp(162px,28svh,208px);
  background:#171719;
  border:1px solid rgba(255,255,255,.07);
  box-shadow:0 10px 28px rgba(0,0,0,.30);
}

.hero-image{
  filter:brightness(.82) contrast(1.02) saturate(.86);
}

.chapter-card{
  background:#1B1B1F;
  border:1px solid rgba(255,255,255,.055);
  box-shadow:0 12px 30px rgba(0,0,0,.24);
}

.prose,
.prose p,
.prose li{
  color:#EDEAE4;
}

.reader-nav{
  height:48px;
  min-height:48px;
  bottom:calc(74px + var(--safe-bottom));
  padding:4px 7px;
  gap:9px;
  border-radius:21px;
  background:rgba(15,15,16,.78);
  border:1px solid rgba(255,255,255,.05);
  box-shadow:0 8px 20px rgba(0,0,0,.20);
  backdrop-filter:blur(16px);
}

.reader-nav-button{
  width:38px;
  height:38px;
  min-width:38px;
  border-radius:14px;
  background:rgba(255,255,255,.026);
  border:1px solid rgba(255,255,255,.052);
  color:#f1f1f1;
  box-shadow:none;
}

.reader-nav-button.center{
  width:42px;
  height:42px;
  min-width:42px;
  border-radius:16px;
  background:rgba(214,176,120,.15);
  border-color:rgba(214,176,120,.25);
  box-shadow:none;
}

.reader-nav-button .material-symbols-rounded,
.reader-nav-button.center .material-symbols-rounded,
.icon-button .material-symbols-rounded,
.voice-test-button .material-symbols-rounded{
  font-variation-settings:"FILL" 1,"wght" 400,"GRAD" 0,"opsz" 24;
}

.reader-nav-button .material-symbols-rounded{
  font-size:19px;
}

.reader-nav-button.center .material-symbols-rounded{
  font-size:21px;
}

.voice-panel{
  max-height:calc(100svh - 132px);
  background:rgba(15,15,16,.98);
  border:1px solid rgba(255,255,255,.065);
  box-shadow:0 16px 42px rgba(0,0,0,.32);
}

.voice-load-state,
.voice-field select{
  background:rgba(255,255,255,.032);
  border-color:rgba(255,255,255,.065);
}

.toc-drawer{
  background:#0F0F10;
}

.toc-header{
  background:#0F0F10;
  border-bottom:1px solid rgba(255,255,255,.055);
}

.toc-item.is-active,
.toc-link.is-active,
.toc-entry.is-active{
  background:rgba(255,255,255,.04);
  border-color:rgba(214,176,120,.16);
}


/* ==========================================================================
   BAROLOGIE FINAL NAV PROGRESS
   Zweck: finale Player-Bar, rechter Drawer, Fortschritt gelesen/gehoert.
   ========================================================================== */
.reader-shell{padding-bottom:calc(136px + var(--safe-bottom,0px))}
.reader-player{position:fixed;left:50%;right:auto;bottom:calc(14px + var(--safe-bottom,0px));transform:translateX(-50%);z-index:60;width:min(760px,calc(100vw - 24px));height:68px;min-height:68px;max-height:68px;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;padding:8px 10px;border-radius:28px;background:rgba(15,15,16,.94);border:1px solid rgba(255,255,255,.08);box-shadow:0 18px 44px rgba(0,0,0,.42);backdrop-filter:blur(24px);overflow:hidden}
.reader-player__info{min-width:0;display:grid;grid-template-columns:48px minmax(0,1fr);align-items:center;gap:12px}.reader-player__thumb{width:48px;height:48px;min-width:48px;border-radius:13px;object-fit:cover;background:#111113;border:1px solid rgba(255,255,255,.09);box-shadow:0 3px 10px rgba(0,0,0,.28)}.reader-player__text{min-width:0;display:flex;flex-direction:column;justify-content:center;gap:3px}.reader-player__title{color:#f1f1f1;font-size:15px;line-height:1.12;font-weight:720;letter-spacing:-.025em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.reader-player__meta{color:rgba(241,241,241,.62);font-size:12px;line-height:1.12;font-weight:520;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.reader-player__controls{flex:0 0 auto;display:flex;align-items:center;gap:9px}.reader-player__button{width:42px;height:42px;min-width:42px;border-radius:999px;display:grid;place-items:center;background:rgba(255,255,255,.045);border:1px solid rgba(255,255,255,.09);color:#f1f1f1;box-shadow:none}.reader-player__button--play{width:54px;height:54px;min-width:54px;background:#D6B078;border-color:#D6B078;color:#0F0F10}.reader-player__button .material-symbols-rounded{font-size:21px;font-variation-settings:"FILL" 1,"wght" 420,"GRAD" 0,"opsz" 24}.reader-player__button--play .material-symbols-rounded{font-size:28px;font-variation-settings:"FILL" 1,"wght" 520,"GRAD" 0,"opsz" 24}
.toc-drawer{position:fixed;top:0;right:0;left:auto;width:min(420px,96vw);height:100svh;max-width:96vw;transform:translate3d(104%,0,0);visibility:hidden;transition:transform .32s cubic-bezier(.2,.8,.2,1),visibility .32s linear;will-change:transform;background:#0F0F10;border-left:1px solid rgba(255,255,255,.08);border-right:0;z-index:90}.toc-drawer.is-open{transform:translate3d(0,0,0);visibility:visible}.scrim{opacity:0;pointer-events:none;transition:opacity .28s ease;background:rgba(0,0,0,.46);z-index:80}.scrim.is-open{opacity:1;pointer-events:auto}body.toc-is-open{overflow:hidden}
.toc-progress-marker{margin-left:auto;display:inline-flex;align-items:center;gap:4px;padding-left:8px}.toc-progress-dot{font-size:15px;line-height:1;font-variation-settings:"FILL" 1,"wght" 420,"GRAD" 0,"opsz" 20}.toc-progress-dot--read{color:#D6B078}.toc-progress-dot--listened{color:#EDEAE4;opacity:.82}.toc-progress-panel{margin:24px 18px 32px;padding:16px;border-radius:20px;background:rgba(255,255,255,.035);border:1px solid rgba(255,255,255,.07)}.toc-progress-title{color:#f1f1f1;font-size:13px;font-weight:680;letter-spacing:.08em;text-transform:uppercase}.toc-progress-stats{margin-top:8px;color:rgba(241,241,241,.68);font-size:13px}.toc-progress-reset{margin-top:14px;min-height:40px;width:100%;border-radius:999px;border:1px solid rgba(214,176,120,.24);background:rgba(214,176,120,.08);color:#EDEAE4;font:inherit;font-size:13px;font-weight:650}
@media (max-width:430px){.reader-player{width:calc(100vw - 18px);height:64px;min-height:64px;max-height:64px;padding:7px 9px;gap:9px;border-radius:26px}.reader-player__info{grid-template-columns:42px minmax(0,1fr);gap:10px}.reader-player__thumb{width:42px;height:42px;min-width:42px;border-radius:12px}.reader-player__title{font-size:13px}.reader-player__meta{font-size:11px}.reader-player__controls{gap:6px}.reader-player__button{width:36px;height:36px;min-width:36px}.reader-player__button--play{width:48px;height:48px;min-width:48px}.reader-player__button .material-symbols-rounded{font-size:19px}.reader-player__button--play .material-symbols-rounded{font-size:25px}}

