/* Große, ruhige Oberfläche für ältere Menschen: warmer Cremeton, keine reinweißen Flächen, riesige Knöpfe */
:root {
  --bg: #F2E8D0; --card: #E8DCBC; --text: #2A1F14; --muted: #6B5A44;
  --primary: #5A3A1E; --on-primary: #FBF3DF;
  --secondary: #D8C79C; --on-secondary: #2A1F14;
  --hi: #E9CF85; --hi-border: #8A5A12; --line: #CDBB92;
  --g1: #D9B99B; --g2: #C9CF9F; --g3: #E3CF8F; --g4: #B7C9C6; --g5: #D6A9A0; --g6: #C4B3D3; --g7: #B8C79F; --g8: #E0B77E;
  --scale: 1;
}
:root[data-theme="dark"] {
  --bg: #1F1A13; --card: #2D261A; --text: #F0E5CB; --muted: #BBA989;
  --primary: #D2A94F; --on-primary: #1F1A13;
  --secondary: #3C3323; --on-secondary: #F0E5CB;
  --hi: #4B3F22; --hi-border: #D2A94F; --line: #4A3F2B;
  --g1: #5A4636; --g2: #4F5638; --g3: #5E5330; --g4: #3F5352; --g5: #5C3E3A; --g6: #4B4258; --g7: #465236; --g8: #5C4A2E;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 20px; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text);
  font-family: Georgia, "Times New Roman", serif; overscroll-behavior: none; }
body { padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
#app { height: 100%; display: flex; flex-direction: column; }
button { font: inherit; color: inherit; border: 0; cursor: pointer; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
button:active { transform: scale(0.98); filter: brightness(0.93); }
button:focus-visible { outline: 4px solid var(--hi-border); outline-offset: 3px; }

.bar { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: var(--card); border-bottom: 2px solid var(--line); min-height: 88px; }
.bar h1 { margin: 0; flex: 1; font-size: 1.6rem; text-align: center; line-height: 1.2; }
.btn { min-height: 76px; padding: 12px 26px; border-radius: 18px; font-size: 1.35rem; font-weight: 700; background: var(--secondary); color: var(--on-secondary); display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.btn.primary { background: var(--primary); color: var(--on-primary); }
.btn.small { min-height: 64px; font-size: 1.15rem; padding: 8px 18px; }
.btn.on { outline: 4px solid var(--hi-border); }

/* Start */
.start { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 26px; padding: 28px min(8vw, 90px); max-width: 900px; width: 100%; margin: 0 auto; }
.start .title { font-size: 2.6rem; text-align: center; margin: 0 0 6px; font-weight: 700; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.start .btn.big { min-height: 150px; font-size: 2.1rem; border-radius: 26px; flex-direction: column; gap: 6px; }
.start .btn.big small { font-size: 1.3rem; font-weight: 400; opacity: 0.9; }
.start .row { display: flex; gap: 16px; }
.start .row .btn { flex: 1; }

/* Bücher und Kapitel */
.scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 18px 20px 40px; }
.tabs { display: flex; gap: 14px; padding: 16px 20px 0; }
.tabs .btn { flex: 1; min-height: 80px; font-size: 1.5rem; }
.group h2 { font-size: 1.35rem; margin: 26px 4px 12px; color: var(--muted); letter-spacing: 0.02em; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.tile { min-height: 96px; border-radius: 18px; background: var(--card); font-size: 1.6rem; font-weight: 700; padding: 12px 16px; text-align: center; line-height: 1.2; border: 3px solid transparent; }
.tile small { display: block; font-size: 1rem; font-weight: 400; opacity: 0.85; margin-top: 4px; }
.chapters { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.chapters .tile { min-height: 110px; font-size: 2.1rem; position: relative; }
.chapters .tile.noaudio { opacity: 0.55; }
.chapters .tile .note { position: absolute; top: 6px; right: 10px; font-size: 1.1rem; }

/* Player */
.reader { position: relative; flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 22px min(6vw, 70px) 30px; }
.reader .inner { max-width: 880px; margin: 0 auto; }
.verse { font-size: calc(1.55rem * var(--scale)); line-height: 1.6; margin: 0 0 0.35em; padding: 10px 16px; border-radius: 14px; border-left: 8px solid transparent; cursor: pointer; }
.verse .n { font-size: 0.6em; font-weight: 700; vertical-align: super; margin-right: 8px; color: var(--muted); }
.verse { transition: background-color 1s ease, border-color 1s ease; }
.verse.active { background: rgba(90, 58, 30, 0.10); border-left-color: var(--primary); }
:root[data-theme="dark"] .verse.active { background: rgba(210, 169, 79, 0.14); }
.hidden-text { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; padding: 30px; }
.hidden-text .big { font-size: 2.4rem; font-weight: 700; }
.hidden-text .sub { font-size: 1.4rem; color: var(--muted); }
.controls { background: var(--card); border-top: 2px solid var(--line); padding: 14px 18px 18px; display: flex; flex-direction: column; gap: 12px; }
.progress { height: 14px; background: var(--line); border-radius: 8px; overflow: hidden; }
.progress > div { height: 100%; width: 0; background: var(--primary); transition: width 0.3s linear; }
.times { display: flex; justify-content: space-between; font-size: 1.1rem; color: var(--muted); }
.ctl { display: grid; grid-template-columns: 1fr 1.5fr 1fr; gap: 14px; align-items: stretch; }
.ctl .btn { min-height: 110px; font-size: 1.5rem; flex-direction: column; gap: 2px; line-height: 1.1; }
.ctl .btn .ic { font-size: 2.4rem; line-height: 1; }
.ctl .play { min-height: 130px; font-size: 1.9rem; border-radius: 26px; }
.ctl .play .ic { font-size: 3.4rem; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; }
.toolbar .btn { flex: 1; min-width: 150px; }
.msg { font-size: 1.3rem; text-align: center; color: var(--muted); padding: 8px; }

/* Einrichtung (für Dani) */
.setup { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; font-size: 1.15rem; line-height: 1.5; }
.setup .bigbar { height: 26px; background: var(--line); border-radius: 13px; overflow: hidden; }
.setup .bigbar > div { height: 100%; width: 0; background: var(--primary); transition: width 0.2s; }
.ok { color: #2d6a2d; font-weight: 700; } :root[data-theme="dark"] .ok { color: #9ad89a; }
.bad { color: #9a2a1a; font-weight: 700; } :root[data-theme="dark"] .bad { color: #f0a090; }

@media (max-width: 700px) { html { font-size: 17px; } .ctl .btn { min-height: 96px; } }
@media (prefers-reduced-motion: reduce) { .reader { scroll-behavior: auto; } .progress > div { transition: none; } }

.sc { font-size: 0.82em; letter-spacing: 0.04em; }
.pbody { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.pbody .reader, .pbody .hidden-text { min-height: 0; }
/* iPad quer: links der Text, rechts die großen Bedienknöpfe */
@media (orientation: landscape) and (min-width: 900px) {
  .pbody { flex-direction: row; }
  .controls { width: 400px; flex: none; border-top: 0; border-left: 2px solid var(--line); justify-content: center; overflow-y: auto; }
  .ctl { grid-template-columns: 1fr 1fr; }
  .ctl .play { grid-column: 1 / 3; order: -1; min-height: 150px; }
  .ctl .btn { min-height: 100px; }
  .toolbar .btn { min-width: 0; flex: 1 1 45%; }
}
/* niedrige Fenster: Bedienfeld etwas kompakter */
@media (max-height: 760px) and (orientation: portrait) { .ctl .btn { min-height: 90px; } .ctl .play { min-height: 104px; } .toolbar .btn { min-height: 54px; } }

.start .btn.big.withicon { flex-direction: row; justify-content: flex-start; gap: 26px; text-align: left; padding: 14px 34px; }
.start .btn.big.withicon .bibleicon { flex: none; display: flex; }
.start .btn.big.withicon .txt { display: flex; flex-direction: column; gap: 6px; }
.start .btn.big.withicon .txt small { font-size: 1.25rem; font-weight: 400; opacity: 0.9; }
.start .btn.big.withicon .txt { font-size: 1.85rem; line-height: 1.15; }
