/* Bible Audiobook — Reading Hollow's palette, one screen tall in the player (only the text scrolls). */
:root{
  --bg1:#101c18; --bg2:#1e2d24;
  --ink:#fff3d9; --ink-soft:#d4d8c4;
  --panel:rgba(26,46,33,.78); --panel-edge:rgba(186,203,162,.20);
  --cyan:#9ce0cc; --purple:#d3bde1; --rocket:#eab65f; --magenta:#d8a55b;
  --gold:#ffd18a; --green:#b7dc9a;
  --glow-cyan:0 0 18px rgba(171,192,142,.28);
}
*{box-sizing:border-box; -webkit-tap-highlight-color:transparent;}
html,body{margin:0; padding:0;}
body{
  background:radial-gradient(ellipse at 20% -10%, #24402d 0%, var(--bg2) 40%, var(--bg1) 100%) fixed;
  color:var(--ink); min-height:100vh;
  font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow-x:hidden;
}
button{font-family:inherit; cursor:pointer; border:none; background:none; color:inherit;}
button:focus-visible,a:focus-visible{outline:3px solid var(--cyan); outline-offset:2px; border-radius:999px;}
[hidden]{display:none !important;}
.stars{position:fixed; inset:0; z-index:0; pointer-events:none;}
.stars .s{position:absolute; width:2px; height:2px; border-radius:50%; background:#fff; opacity:.7;}
.stars .tw{animation:twinkle 5s ease-in-out infinite;}
@keyframes twinkle{0%,100%{opacity:.8}50%{opacity:.25}}
#app{position:relative; z-index:1;}
.screen{max-width:980px; margin:0 auto; padding:26px 20px 60px;}

/* ---------- shelf ---------- */
.lib-head{text-align:center; margin-bottom:8px; position:relative;}
.lib-head .back{position:absolute; left:0; top:0; text-decoration:none; color:var(--ink); font-weight:800; font-size:.95rem;
  background:var(--panel); border:1px solid var(--panel-edge); border-radius:999px; padding:9px 14px;}
.lib-head .back:hover{border-color:rgba(171,192,142,.5);}
.mascot{font-size:3rem; line-height:1; margin-top:46px;}
h1{font-size:2.4rem; margin:.15em 0 0; letter-spacing:1px; font-weight:900; text-transform:uppercase;
  background:linear-gradient(90deg,var(--gold),var(--rocket) 55%,var(--magenta));
  -webkit-background-clip:text; background-clip:text; color:transparent;}
.sub{color:var(--ink-soft); margin:.4em 0 0; font-size:1.05rem;}
/* Beta = a promise to come back (BETA-REGISTER.md): comes off when every chapter is narrated and the words light up */
.beta-chip{display:inline-block; vertical-align:middle; font-size:.62rem; font-weight:900; letter-spacing:.12em; color:#ffc46b;
  -webkit-text-fill-color:#ffc46b; border:1px solid rgba(255,196,77,.6); border-radius:6px; padding:3px 7px; margin-left:8px; transform:translateY(-6px);}
.prog{color:var(--gold); font-weight:800; margin:.5em 0 0; font-size:.95rem; min-height:1.2em;}
.continue{margin:12px auto 0; display:inline-flex; align-items:center; gap:8px; font-weight:800; font-size:1rem;
  background:linear-gradient(135deg,var(--rocket),var(--magenta)); color:#fff; border-radius:999px; padding:12px 20px;
  box-shadow:0 8px 24px rgba(219,175,113,.28); transition:transform .15s;}
.continue:active{transform:scale(.97);}
.testament{margin-top:34px;}
.testament h2{font-size:1.45rem; font-weight:900; margin:0 0 4px; letter-spacing:.3px;}
.testament h2 .n{font-weight:500; color:var(--ink-soft); font-size:.95rem; margin-left:8px;}
.group-title{display:flex; align-items:baseline; gap:10px; font-size:1.05rem; font-weight:800; margin:18px 0 12px; color:#e8eee0;}
.group-title .tag{font-weight:500; color:var(--ink-soft); font-size:.85rem;}
.cards{display:grid; grid-template-columns:repeat(auto-fill,minmax(240px,1fr)); gap:14px;}
.card{
  display:flex; gap:12px; align-items:flex-start; text-align:left; padding:14px 14px 12px; border-radius:20px;
  background:var(--panel); border:1px solid var(--panel-edge); box-shadow:0 8px 28px rgba(0,0,0,.28);
  transition:transform .15s, border-color .15s;
}
.card:hover{border-color:rgba(255,196,77,.5); transform:translateY(-2px);}
.card:active{transform:scale(.98);}
.card .cover{font-size:2.1rem; line-height:1; width:52px; height:52px; display:grid; place-items:center; border-radius:14px;
  background:rgba(255,255,255,.05); flex:none;}
.card .body{flex:1; min-width:0;}
.card .name{font-weight:900; font-size:1.08rem;}
.card .blurb{color:var(--ink-soft); font-size:.86rem; line-height:1.35; margin-top:3px;}
.card .meta{display:flex; align-items:center; gap:10px; margin-top:8px; font-size:.78rem; color:var(--ink-soft); font-weight:700;}
.ring{width:26px; height:26px; border-radius:50%; flex:none; display:grid; place-items:center; font-size:.62rem; font-weight:900; color:var(--gold);
  background:conic-gradient(var(--gold) calc(var(--p,0)*1%), rgba(255,255,255,.08) 0);}
.ring i{width:18px; height:18px; border-radius:50%; background:#1c3223; display:grid; place-items:center; font-style:normal;}
.chip{display:inline-block; font-weight:800; font-size:.66rem; letter-spacing:.5px; border-radius:6px; padding:2px 7px; border:1px solid;}
.chip.audio{color:#8ef5b8; border-color:rgba(94,227,154,.5);}
.chip.text{color:#dce5d0; border-color:rgba(222,230,210,.35);}
.credits{margin-top:44px; color:var(--ink-soft); font-size:.8rem; text-align:center; line-height:1.6;}
.credits a{color:#dfe7d4;}

/* ---------- topbars (book + player) ---------- */
.topbar{display:flex; align-items:center; gap:10px; padding:8px 0 6px;}
.topbar .back{font-size:1rem; font-weight:800; background:var(--panel); border:1px solid var(--panel-edge); border-radius:999px; padding:9px 16px;}
.topbar .back:hover{border-color:rgba(171,192,142,.5);}
.topbar .ttl{flex:1; text-align:center; font-weight:800; font-size:1.05rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.topbar .pageno{font-size:.85rem; color:var(--ink-soft); font-weight:700; min-width:56px; text-align:right;}

/* ---------- book ---------- */
.blurb{color:var(--ink-soft); text-align:center; margin:6px 0 18px; font-size:1rem;}
.chapters{display:grid; grid-template-columns:repeat(auto-fill,minmax(64px,1fr)); gap:10px;}
.chap{
  height:60px; border-radius:16px; font-weight:900; font-size:1.1rem; display:grid; place-items:center; position:relative;
  background:var(--panel); border:1px solid var(--panel-edge); transition:transform .12s, border-color .15s;
}
.chap:hover{border-color:rgba(255,196,77,.55);} .chap:active{transform:scale(.94);}
.chap.heard{border-color:rgba(255,196,77,.6); background:rgba(255,196,77,.1);}
.chap.heard::after{content:"★"; position:absolute; top:4px; right:7px; font-size:.7rem; color:var(--gold);}
.chap.part::after{content:""; position:absolute; left:10px; right:10px; bottom:6px; height:3px; border-radius:2px;
  background:linear-gradient(90deg,var(--gold) calc(var(--p,0)*1%), rgba(255,255,255,.12) 0);}
.chap.text{border-style:dashed; color:var(--ink-soft);}
.chap.text small{position:absolute; bottom:5px; font-size:.55rem; font-weight:700; letter-spacing:.3px;}
.chap.now{box-shadow:var(--glow-cyan); border-color:rgba(171,192,142,.7);}

/* ---------- player: one screen tall, only the words scroll ---------- */
#player{display:flex; flex-direction:column; height:100vh; height:100dvh; max-width:840px; padding:8px 16px 0;}
#player[hidden]{display:none;}
body.playing{overflow:hidden;}
#textWrap{flex:1; min-height:0; padding:8px 0 4px; display:flex;}
#textArea{
  flex:1; padding:26px 30px; overflow-y:auto; overscroll-behavior:contain; scroll-behavior:smooth;
  background:var(--panel); border:1px solid var(--panel-edge); border-radius:24px;
  box-shadow:inset 0 0 60px rgba(54,96,68,.25), 0 10px 40px rgba(0,0,0,.35);
}
#textArea p{margin:0 0 .9em; line-height:1.8; font-size:1.28rem; font-weight:500;}
#textArea p sup{font-size:.62em; color:var(--ink-soft); margin-right:.45em; font-weight:800; vertical-align:top;}
#textArea p.on{color:#fff; background:rgba(171,192,142,.10); border-radius:10px; box-shadow:0 0 0 6px rgba(171,192,142,.10);}
#textArea p.omit{color:var(--ink-soft); font-style:italic; font-size:.95rem;}
#textArea .soon{margin:0 0 18px; padding:12px 14px; border-radius:14px; background:rgba(255,196,77,.1); border:1px solid rgba(255,196,77,.35); color:var(--gold); font-weight:700; font-size:.95rem;}
#textArea .chapter-head{font-weight:900; font-size:1.6rem; margin:0 0 .6em; letter-spacing:.3px;}
.ctlbar{padding:8px 0 calc(60px + env(safe-area-inset-bottom,0px));}   /* clear of the AETHER tray chips (bottom-left, injected by sync.sh) */
@media (min-width:1100px){ .ctlbar{padding-bottom:calc(26px + env(safe-area-inset-bottom,0px));} }
/* an 8 px bar with a 32 px finger-sized hit zone (kids on iPad tap it, and it is where they seek) */
.timeline{position:relative; height:32px; cursor:pointer; touch-action:none;}
.timeline::before{content:""; position:absolute; left:0; right:0; top:12px; height:8px; border-radius:4px; background:rgba(255,255,255,.1);}
.timeline .fill{position:absolute; left:0; top:12px; height:8px; width:0; border-radius:4px; background:linear-gradient(90deg,var(--cyan),var(--purple)); transition:width .25s linear;}
.timeline .fill::after{content:""; position:absolute; right:-7px; top:-3px; width:14px; height:14px; border-radius:50%; background:#fff; box-shadow:0 0 10px rgba(171,192,142,.8);}
.times{display:flex; justify-content:space-between; font-size:.8rem; color:var(--ink-soft); font-weight:700; margin:6px 2px 2px;}
.times #hint{color:var(--gold); text-align:center; flex:1; padding:0 8px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.ctls{display:flex; align-items:center; justify-content:center; gap:14px; margin-top:6px;}
.ctl{width:52px; height:52px; border-radius:50%; background:var(--panel); border:1px solid var(--panel-edge); font-weight:900; font-size:1rem; transition:transform .12s;}
.ctl:active{transform:scale(.92);}
.ctl:disabled{opacity:.35; cursor:default;}
.play{width:76px; height:76px; border-radius:50%; font-size:2rem; color:#fff;
  background:linear-gradient(135deg,var(--rocket),var(--magenta)); box-shadow:0 10px 30px rgba(219,175,113,.35); transition:transform .12s;}
.play:active{transform:scale(.94);}
.play.retry{animation:retry 1.4s ease-in-out infinite;}
.play:disabled{filter:grayscale(1) brightness(.6); box-shadow:none; cursor:default;}
@keyframes retry{0%,100%{box-shadow:0 10px 30px rgba(219,175,113,.35)}50%{box-shadow:0 0 0 12px rgba(255,196,77,.15)}}
.opts{display:flex; justify-content:center; gap:10px; margin-top:8px;}
.opt{font-size:.82rem; font-weight:800; color:var(--ink-soft); border:1px solid var(--panel-edge); border-radius:999px; padding:7px 14px; background:var(--panel);}
.opt[aria-pressed="true"]{color:var(--green); border-color:rgba(94,227,154,.5);}

/* ---------- sheet ---------- */
.overlay{position:fixed; inset:0; background:rgba(8,13,10,.72); display:none; align-items:center; justify-content:center; padding:20px; z-index:50;}
.overlay.show{display:flex;}
.sheet{background:linear-gradient(180deg,#213b2a,#182a1e); border:1px solid var(--panel-edge); border-radius:26px; padding:28px 26px; max-width:420px; width:100%; text-align:center; box-shadow:0 20px 60px rgba(0,0,0,.5);}
.done-emoji{font-size:3.2rem; line-height:1;}
.sheet h2{margin:.4em 0 .3em; font-size:1.5rem;}
.sheet p{color:var(--ink-soft); margin:0 0 18px; line-height:1.5;}
.sheet-btns{display:flex; gap:10px; justify-content:center; flex-wrap:wrap;}
.sheetbtn{background:linear-gradient(135deg,var(--rocket),var(--magenta)); color:#fff; font-weight:800; border-radius:999px; padding:13px 22px; font-size:1rem;}
.sheetbtn.ghost{background:var(--panel); border:1px solid var(--panel-edge); color:var(--ink);}
#toast{position:fixed; left:50%; bottom:calc(96px + env(safe-area-inset-bottom,0px)); transform:translateX(-50%) translateY(20px); opacity:0; pointer-events:none;
  background:rgba(33,59,42,.95); border:1px solid rgba(255,196,77,.5); color:var(--gold); font-weight:800; padding:10px 18px; border-radius:999px; z-index:60;
  transition:opacity .25s, transform .25s; max-width:90vw; text-align:center;}
#toast.show{opacity:1; transform:translateX(-50%) translateY(0);}
#autotest{position:fixed; left:8px; bottom:8px; z-index:99; font:12px/1.4 ui-monospace,monospace; background:#000c; color:#8ef5b8; padding:8px 10px; border-radius:8px; max-width:92vw; white-space:pre-wrap;}
#autotest.fail{color:#ecd4b2;}

@media (max-width:600px){
  .screen{padding:18px 14px 90px;}
  h1{font-size:1.9rem;}
  .mascot{margin-top:44px; font-size:2.4rem;}
  .lib-head .back{padding:8px 12px; font-size:.88rem;}
  #textArea{padding:18px 18px; border-radius:20px;}
  #textArea p{font-size:1.15rem;}
  .ctl{width:46px; height:46px; font-size:.9rem;}
  .play{width:68px; height:68px;}
  .ctls{gap:10px;}
  /* keep the controls clear of the AETHER tray chips injected bottom-left by the site */
  .ctlbar{padding-bottom:calc(60px + env(safe-area-inset-bottom,0px));}
  .overlay{padding-bottom:calc(64px + env(safe-area-inset-bottom,0px));}
}
@media (prefers-reduced-motion:reduce){ *{animation:none !important; transition:none !important; scroll-behavior:auto !important;} }
