/* Bookplate and lower chapter controls. Only use a middle rail where the reading column has room. */
.bible-reading-first #verses{touch-action:pan-y pinch-zoom;overflow-anchor:none}
.bible-reading-first #reading .chapter-header{display:block;text-align:center}
.bible-reading-first #reading .chapter-heading-text{min-width:0;overflow-wrap:anywhere}
.bible-reading-first #reading .chapter-header #chapter-title{font-family:"Kaiti TC",STKaiti,KaiTi,"Songti TC","Noto Serif CJK TC",serif;color:#49301c;font-size:clamp(29px,6vw,37px);font-weight:650;letter-spacing:.085em;text-shadow:0 1px 0 #fff5df}
.bible-reading-first #reading .chapter-header #chapter-title:lang(en){font-family:Georgia,serif;letter-spacing:.038em}
.bible-reading-first #reading .chapter-header #chapter-title::after{content:"";width:2.3rem;display:block;margin:5px auto 0;border-bottom:1px solid #ad8652}
.bible-reading-first #reading .chapter-dock{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;align-items:center;text-align:center;margin:0;padding:0;color:#6e5a45}
.bible-reading-first #reading .chapter-dock .chapter-meta{margin:0;font-size:.76rem;line-height:1.25}
.bible-reading-first #reading .chapter-arrow{display:grid;place-items:center;position:relative;box-sizing:border-box;width:44px;height:44px;min-width:44px;min-height:44px;margin:0;border:1px solid transparent;border-radius:50%;padding:0;background:transparent;color:#745e44;touch-action:manipulation;user-select:none;-webkit-touch-callout:none}
.bible-reading-first #reading .chapter-arrow:focus-visible{outline:2px solid #936436;outline-offset:1px}
.bible-reading-first #reading .chapter-arrow:disabled{opacity:.36;cursor:default}
.bible-reading-first #reading .chapter-arrow:not(:disabled):active{background:#f0e8da}
@media(hover:hover){.bible-reading-first #reading .chapter-arrow:not(:disabled):hover{background:#f0e8da}}
.bible-reading-first #reading .chapter-arrow svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
@media(min-width:1320px){
 .bible-reading-first #reading{position:relative}
 .bible-reading-first #reading .chapter-dock{display:block;padding:4px 0 7px}
 .bible-reading-first #reading .chapter-dock .chapter-arrow{position:absolute;top:clamp(230px,46vh,500px);background:#f5eee0;border-color:#e5d0ab}
 .bible-reading-first #reading .chapter-dock .previous{left:-47px}
 .bible-reading-first #reading .chapter-dock .next{right:-47px}
}

/* Five compact controls share the main Bible version line. */
#bible-script-choice{display:flex;align-items:center;gap:4px;flex-wrap:wrap}
body.bible-reading-first .intro #bible-script-choice>button{box-sizing:border-box;min-width:44px;min-height:44px;padding:4px 7px;white-space:nowrap}
#bible-script-choice>strong,#bible-script-choice #bible-script-status{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
#bible-original-status:not([hidden]){margin:5px 0;padding:5px 8px;border-left:2px solid #ad8652;color:#5a4a3b;background:#f6eddd;font-size:.80rem;line-height:1.45}
#bible-original-status button{display:inline-block;min-height:44px;padding:4px 7px;font:inherit;text-decoration:underline;color:inherit}
#bible-script-choice #bible-original-shortcut[aria-expanded=true],#bible-script-choice #bible-audio-shortcut[aria-pressed=true]{background:#e9dfca;color:#49301c;border-color:#af8b55}
@media(max-width:360px){body.bible-reading-first .intro #bible-script-choice>button{padding-inline:5px;font-size:.80rem}}

/* Synchronized narration is teal; user selection keeps its separate amber fill. */
body[data-reading-mode=audio] #verses .audio-current-verse>.verse-text{color:#194e49;font-size:1.032em;font-weight:680;border-radius:.22em;box-decoration-break:clone;-webkit-box-decoration-break:clone}
body[data-reading-mode=audio] #verses .audio-current-verse>.verse-text:not(.bible-copy-selected){background:#d9ece8}
body[data-reading-mode=audio] #verses .audio-current-verse>.verse-text.bible-copy-selected{outline:1px solid #427c77;outline-offset:1px}
body[data-reading-mode=audio] #verses .audio-current-verse .reading-word{background:#a4d1ca!important;color:#134841!important;border-radius:.19em;box-shadow:inset 0 -1px #598f86}
body[data-reading-mode=audio] #verses .audio-current-verse .reading-word .spoken-text{background:transparent!important;color:inherit!important}
#verses .audio-verse-jump{display:inline-grid;place-items:center;min-width:44px;min-height:44px;width:44px;height:44px;padding:0;margin:1px 2px;border:1px solid #b7cfc8;border-radius:8px;background:#edf5f3;color:#21544d;font:700 .64rem/1 system-ui,sans-serif;vertical-align:middle}
#verses .audio-verse-jump[hidden]{display:none!important}
#verses .audio-verse-jump:focus-visible,.bible-copy-audio-context button:focus-visible{outline:2px solid #306c63;outline-offset:2px}
body[data-reading-mode=audio] #reading .bible-copy-audio-context:not([hidden]){position:static;inset:auto;z-index:auto;box-sizing:border-box;display:flex;align-items:center;flex-wrap:wrap;gap:0 4px;width:100%;min-width:0;margin:4px 0 6px;padding:0 3px;border:1px solid #d9ceab;border-radius:7px;background:rgba(250,247,235,.88);box-shadow:none}
body[data-reading-mode=audio] #reading .bible-copy-audio-context button{min-width:44px;min-height:44px;margin:0;padding:3px 5px;border:0;background:transparent;font-size:.78rem;color:#523b25}
body[data-reading-mode=audio] #reading .bible-copy-audio-context small{font-size:.72rem;color:#523b25}

/* Follow-reading edge controls; cover no scripture and hide outside the actual reading region. */
.bible-reading-first #reading .chapter-dock{display:block;min-height:24px;padding:2px 0 6px}
.bible-reading-first #reading .chapter-dock .chapter-arrow{position:fixed;visibility:hidden;pointer-events:none;top:calc(67vh - 22px);bottom:auto;z-index:5;background:#f5eee0;border-color:#d5ba90;box-shadow:0 2px 6px #654a251c;opacity:.93}
.bible-reading-first #reading .chapter-dock[data-rail-visible="1"] .chapter-arrow{visibility:visible;pointer-events:auto}
.bible-reading-first #reading .chapter-dock[data-rail-visible="1"] .chapter-arrow:disabled{opacity:.42}
.bible-reading-first #reading .chapter-dock .previous{left:max(2px,env(safe-area-inset-left));right:auto}
.bible-reading-first #reading .chapter-dock .next{right:max(2px,env(safe-area-inset-right));left:auto}
@media(max-width:767px){
 .bible-reading-first #reading #verses{margin-left:calc(23px + env(safe-area-inset-left));margin-right:calc(23px + env(safe-area-inset-right))}
 .bible-reading-first #reading .chapter-dock .chapter-arrow{width:36px;min-width:36px;border-radius:11px}
}
@media(min-width:375px) and (max-width:767px){
 .bible-reading-first #reading #verses{margin-left:calc(29px + env(safe-area-inset-left));margin-right:calc(29px + env(safe-area-inset-right))}
 .bible-reading-first #reading .chapter-dock .chapter-arrow{width:44px;min-width:44px}
}
@media(min-width:768px) and (max-width:1030px){.bible-reading-first #reading #verses{margin-inline:28px}}
.chapter-turn-toast{position:fixed;top:12vh;left:50%;transform:translateX(-50%);z-index:12;pointer-events:none;background:#f4ebd8;color:#4d3825;border:1px solid #bd9b65;border-radius:12px;padding:4px 9px;font-size:.78rem;white-space:nowrap}
 .chapter-turn-toast[hidden]{display:none!important}
/* Sage verse cue; an individual timed character carries typography only. */
body[data-reading-mode=audio] #verses .audio-current-verse>.verse-text{color:#294d31}
body[data-reading-mode=audio] #verses .audio-current-verse>.verse-text:not(.bible-copy-selected){background:#dfead9}
body[data-reading-mode=audio] #verses .audio-current-verse>.verse-text.bible-copy-selected{outline-color:#648660}
body[data-reading-mode=audio] #verses .audio-current-verse .timed-word.reading-word,
body[data-reading-mode=audio] #verses .audio-current-verse .timed-word.reading-word .spoken-text{background:transparent!important;border:0!important;outline:none!important;box-shadow:none!important;text-shadow:none!important;text-decoration:none!important;border-radius:0!important;color:inherit!important}
body[data-reading-mode=audio] #verses .audio-current-verse .timed-word.reading-word{font-size:1.06em;font-weight:775;line-height:1}
body[data-reading-mode=audio] #verses .audio-current-verse .timed-word.reading-word .spoken-text{font-size:inherit;font-weight:inherit;line-height:inherit}


/* Time cues use a stable letter slot across the spoken verse; only the ink is scaled. */
body[data-reading-mode=audio] #verses .audio-current-verse>.verse-text{font-size:1.05em}
body[data-reading-mode=audio] #verses .audio-current-verse .timed-word{padding-inline:.15em}
body[data-reading-mode=audio] #verses .audio-current-verse .timed-word .spoken-text{display:inline-block;vertical-align:baseline;line-height:1}
body[data-reading-mode=audio] #verses .audio-current-verse .reading-word{font-size:1em!important;font-weight:775}
body[data-reading-mode=audio] #verses .audio-current-verse .reading-word .spoken-text{font-size:inherit!important;transform:scale(1.28);transform-origin:50% 63%;font-weight:inherit}
#reading #audio-range-host[data-range-expanded=false]{display:none!important}
body.bible-reading-first #audio-floating:not([hidden]){bottom:env(safe-area-inset-bottom,0px);margin-bottom:0;background:rgba(246,241,227,.77);color:#2f271d;border-color:#bb9c64;box-shadow:0 2px 10px #45321a25;backdrop-filter:blur(6px)}
body.bible-reading-first #audio-floating button{color:#34291a}
body.bible-reading-first #audio-floating #floating-times{color:#34291a}
body.bible-reading-first.has-floating-player{scroll-padding-bottom:calc(var(--player-dock-space,0px) + env(safe-area-inset-bottom,0px))}
body.bible-reading-first.has-floating-player main{padding-bottom:calc(var(--player-dock-space,0px) + env(safe-area-inset-bottom,0px))}
body[data-reading-mode=audio] #verses .timed-word.reading-word,
body[data-reading-mode=audio] #verses .timed-word.reading-word .spoken-text{background:transparent!important;border:0!important;outline:none!important;box-shadow:none!important}
@media(max-width:767px){
 body.bible-reading-first #audio-floating:not([hidden]){display:grid;grid-template-columns:52px minmax(0,1fr) 86px;grid-template-areas:"toggle seek repeat" "time time time";column-gap:5px;row-gap:0;padding:4px 8px 5px}
 body.bible-reading-first #audio-floating #floating-play{grid-area:toggle}
 body.bible-reading-first #audio-floating #floating-seek{grid-area:seek;min-width:0;width:100%;min-height:44px;margin:0}
 body.bible-reading-first #audio-floating #floating-repeat{grid-area:repeat;min-height:44px}
 body.bible-reading-first #audio-floating #floating-play,body.bible-reading-first #audio-floating #floating-repeat{padding:3px;min-width:44px;min-height:44px;margin:0;white-space:normal;font-size:.75rem;line-height:1.2}
 body.bible-reading-first #audio-floating #floating-times{grid-area:time;justify-self:center;margin:0;font-size:.70rem;line-height:1.15}
}
.chapter-turn-toast{top:27vh;min-width:118px;text-align:center;max-width:80vw;padding:9px 14px 11px;color:#fff;background:rgba(45,47,45,.75);border:1px solid #5c605b;border-radius:12px;box-shadow:0 4px 16px #1114;line-height:1.05;opacity:1;transition:opacity 140ms ease;pointer-events:none}
.chapter-turn-toast small,.chapter-turn-toast strong{display:block}
.chapter-turn-toast small{font-size:12px;margin-bottom:4px;color:#f3f3ee}
.chapter-turn-toast strong{font-size:clamp(32px,8vw,38px);font-weight:750}
.chapter-turn-toast.chapter-toast-fading{opacity:0}
@media(prefers-reduced-motion:reduce){.chapter-turn-toast{transition:none}}

/* Keep normal CJK spacing; height, not expanded width, makes the moving letter stand out. */
body[data-reading-mode=audio] #verses .audio-current-verse>.verse-text{font-size:1.075em;font-weight:700}
body[data-reading-mode=audio] #verses .audio-current-verse .timed-word{padding-inline:0;letter-spacing:normal}
body[data-reading-mode=audio] #verses .audio-current-verse .timed-word.reading-word{font-weight:900;line-height:1;font-synthesis:weight}
body[data-reading-mode=audio] #verses .audio-current-verse .timed-word.reading-word .spoken-text{transform:scale(1,1.50);transform-origin:50% 67%;font-weight:900}
body.bible-reading-first #audio-floating:not([hidden]){background:rgba(246,241,227,.54);border-color:#aabbaa;box-shadow:none}
body.bible-reading-first #audio-floating #floating-play{background:#274b37;color:#fffdf4;border:1px solid #274b37;border-radius:8px;box-shadow:none;font-weight:750;text-shadow:none}
body.bible-reading-first #audio-floating #floating-repeat{background:#e4ecdf;color:#274433;border:1px solid #9ab19d;border-radius:8px;box-shadow:none;font-weight:720;text-shadow:none}
body.bible-reading-first #audio-floating #floating-repeat[aria-pressed=true]{background:#3b654a;color:#fffdf4;border-color:#3b654a}
body.bible-reading-first #audio-floating button:focus-visible,body.bible-reading-first #audio-floating input:focus-visible{outline:2px solid #296046;outline-offset:2px}
body.bible-reading-first #audio-floating #floating-times{color:#25392c;font-weight:650}
body.bible-reading-first #audio-floating #floating-seek{accent-color:#35684a}

/* Independent original-language side-by-side text. */
.original-verse-alignment{display:block;margin:3px 0 10px;padding:5px 7px 5px 9px;border-inline-start:2px solid #b6ab90;background:#f5efe3;color:#382f27;font:normal .90em/1.55 system-ui,sans-serif;unicode-bidi:isolate;max-width:100%;overflow-wrap:anywhere}
.original-verse-prose{display:block;unicode-bidi:isolate;font-size:1.12em;user-select:text;line-height:1.7}
.original-verse-prose[lang=he]{text-align:right;font-family:"Noto Serif Hebrew","SBL Hebrew","Ezra SIL","Times New Roman",serif}
.original-verse-prose[lang=el]{text-align:left;font-family:"Gentium Plus","Palatino","Times New Roman",serif}
.original-verse-heading{margin-top:.23em}
.original-verse-ref,.original-verse-unavailable,.original-chinese-line{display:block;font-size:.83em;color:#625442}
.original-verse-unavailable{font-style:normal}
#bible-original-status a{color:#4f3e2d;text-decoration:underline;text-underline-offset:2px}

.original-chinese-line[hidden]{display:none!important}
