/* A book for reading, a stage for playing. Shared by the four story adapters. */
body.rrdd-adventure.reading-book-open{--adv-hud-height:62px;--adv-hud-centre:92px;background:#eee9dd!important}
body.reading-book-open .story-world-backdrop{display:none!important}
body.rrdd-adventure.rrdd-game-shell #readingScreen#readingScreen.reading-book:not([hidden]){
 display:grid!important;grid-template-columns:minmax(0,56fr) minmax(0,44fr)!important;grid-template-rows:minmax(0,1fr)!important;
 gap:0!important;width:100%!important;height:min(100%,65vw)!important;max-height:850px!important;min-height:0!important;align-self:center!important;
 margin:0!important;padding:8px!important;position:relative;isolation:isolate;overflow:hidden!important;
 background:#fff9eb!important;border:1px solid #d8c9ae!important;border-radius:24px!important;box-shadow:0 8px 0 #cdbda266,0 18px 40px #715e4315!important;
}
body.rrdd-adventure.rrdd-game-shell #readingScreen#readingScreen.reading-book>figure{
 height:100%!important;min-height:0!important;border-radius:17px 2px 2px 17px!important;position:relative;background:#e5dfd0!important;overflow:hidden!important;
}
body.rrdd-adventure.rrdd-game-shell #readingScreen#readingScreen.reading-book>figure:before{content:'';position:absolute;inset:-20px;background:var(--book-art) center/cover;filter:blur(20px);opacity:.32;pointer-events:none}
body.rrdd-adventure.rrdd-game-shell #readingScreen#readingScreen.reading-book>figure:after{content:'';position:absolute;right:0;top:0;bottom:0;width:16px;background:linear-gradient(90deg,transparent,#55482a22);pointer-events:none;z-index:2}
body.rrdd-adventure.rrdd-game-shell #readingScreen#readingScreen.reading-book>figure :is(img,picture){position:relative;display:block;width:100%!important;height:100%!important;max-height:none!important;min-height:0!important}
body.rrdd-adventure.rrdd-game-shell #readingScreen#readingScreen.reading-book>figure img{object-fit:contain!important;object-position:center!important;border-radius:0!important}
body.rrdd-adventure.rrdd-game-shell #readingScreen#readingScreen.reading-book .adv-reading-copy{
 display:flex!important;position:relative;flex-direction:column;align-items:center!important;justify-content:center!important;
 gap:clamp(12px,2.2vh,24px)!important;width:100%!important;height:100%!important;min-width:0;min-height:0!important;
 box-sizing:border-box;padding:clamp(22px,3.4vw,54px)!important;border-radius:0 17px 17px 0!important;border:0!important;
 background:linear-gradient(90deg,#cfbd9a21,transparent 20px),#fffaf0!important;box-shadow:none!important;overflow:auto!important;text-align:center!important;
}
body.rrdd-adventure.rrdd-game-shell #readingScreen#readingScreen.reading-book #readingTitle{display:block!important;flex:none;font:700 clamp(10px,1vw,14px)/1.5 'Trebuchet MS',sans-serif!important;letter-spacing:.1em;color:#63837b!important;text-align:center;margin:0!important}
body.rrdd-adventure.rrdd-game-shell #readingScreen#readingScreen.reading-book #readingSentence{font:700 clamp(25px,3.15vw,43px)/1.5 Froople,'Trebuchet MS',sans-serif!important;text-align:center!important;letter-spacing:.005em;margin:0!important;color:#173f48!important;max-width:100%;overflow-wrap:normal}
body.rrdd-adventure.rrdd-game-shell #readingScreen#readingScreen.reading-book[data-book-density=medium] #readingSentence{font-size:clamp(23px,2.5vw,34px)!important;line-height:1.4!important}
body.rrdd-adventure.rrdd-game-shell #readingScreen#readingScreen.reading-book[data-book-density=long] #readingSentence{font-size:clamp(21px,2.05vw,29px)!important;line-height:1.4!important}
.reading-book .book-keyword{border-radius:7px;background:#ffe294;box-decoration-break:clone;-webkit-box-decoration-break:clone;padding:0 .08em;cursor:pointer;transition:background .2s;outline-offset:5px}
.reading-book .book-keyword[aria-disabled=true]{cursor:default;background:#ffe8ad}
.reading-book .book-keyword.book-word-ready{box-shadow:0 3px 0 #e9bc4f}
.reading-book .book-keyword:focus-visible{outline:3px solid #4699ad}
body.rrdd-adventure.rrdd-game-shell #readingScreen#readingScreen.reading-book #readingSentence .active{background:#ffd45e!important;color:#153d48!important;border-radius:6px;box-shadow:0 3px 0 #ddb66055;transition:background .15s}
body.rrdd-adventure.rrdd-game-shell #readingScreen#readingScreen.reading-book #readAgain{order:1!important;flex:none;width:46px!important;height:46px!important;min-height:46px!important;min-width:46px!important;margin:0!important;padding:0!important;border-radius:50%!important;background:#fffdf5!important;border:1px solid #e4d7bd!important;box-shadow:0 3px 0 #c9bd9e!important;font-size:21px!important;align-self:center!important}
body.rrdd-adventure.rrdd-game-shell #readingScreen#readingScreen.reading-book #readAgain:before,body.rrdd-adventure.rrdd-game-shell #readingScreen#readingScreen.reading-book #readAgain:after{content:none!important}
body.rrdd-adventure.rrdd-game-shell #readingScreen#readingScreen.reading-book #readingStatus{order:2;margin:0!important;min-height:18px;font:14px/1.35 'Trebuchet MS',sans-serif!important;color:#708077!important;text-align:center!important}
body.rrdd-adventure.rrdd-game-shell #readingScreen#readingScreen.reading-book #openDiscovery{order:3;flex:none;align-self:center!important;min-height:52px!important;padding:10px 28px!important;font:700 clamp(20px,2vw,27px)/1.2 Froople,'Trebuchet MS',sans-serif!important;border-radius:28px!important;margin:0!important;background:#ffdb69!important;color:#254a49!important}
body.rrdd-adventure.rrdd-game-shell #readingScreen#readingScreen.reading-book #openDiscovery:disabled{display:none!important}
body.rrdd-adventure.rrdd-game-shell #readingScreen#readingScreen.reading-book .reading-word-card.book-word-note{
 display:block!important;order:2;position:relative!important;width:100%!important;max-width:360px;box-sizing:border-box;flex:none;
 padding:14px 34px 14px 18px!important;margin:0!important;background:#eaf0df!important;border:0!important;border-radius:14px!important;text-align:left!important;box-shadow:none!important;
}
body.rrdd-adventure.rrdd-game-shell #readingScreen#readingScreen.reading-book .reading-word-card.book-word-note[hidden]{display:none!important}
body.rrdd-adventure.rrdd-game-shell #readingScreen#readingScreen.reading-book .book-word-note>.eyebrow{display:none!important}
body.rrdd-adventure.rrdd-game-shell #readingScreen#readingScreen.reading-book #readingWord{display:inline-block;min-height:36px!important;font:700 24px/1.25 Froople,'Trebuchet MS',sans-serif!important;background:none!important;border:0!important;box-shadow:none!important;color:#28534b!important;padding:0!important;margin:0 0 3px!important}
body.rrdd-adventure.rrdd-game-shell #readingScreen#readingScreen.reading-book #readingMeaning{font:16px/1.4 'Trebuchet MS',sans-serif!important;color:#37574f!important}
.reading-book .book-note-close{position:absolute;right:1px;top:1px;width:36px;height:36px;padding:0!important;min-height:36px!important;border:0!important;border-radius:50%;background:transparent!important;box-shadow:none!important;color:#456959;font:24px/1 sans-serif;cursor:pointer}
.reading-book .book-word-fallback{align-self:center;min-height:44px;border:0;border-radius:9px;padding:5px 14px;background:#ffe294;color:#234b4c;font:700 25px/1.25 Froople,'Trebuchet MS',sans-serif;box-shadow:0 3px 0 #e9bc4f}
.reading-book .book-word-fallback[hidden]{display:none!important}
.reading-book.book-page-enter{animation:reading-book-enter .45s ease-out both}
@keyframes reading-book-enter{from{opacity:.3;transform:translateY(8px)}to{opacity:1;transform:none}}
@media(max-width:700px) and (orientation:portrait){
 body.rrdd-adventure.reading-book-open{--adv-hud-height:50px;--adv-hud-centre:78px;--adv-shell-gutter:8px}
 body.rrdd-adventure.rrdd-game-shell #readingScreen#readingScreen.reading-book:not([hidden]){display:block!important;height:100%!important;max-height:none!important;overflow-y:auto!important;padding:6px!important;border-radius:18px!important;scrollbar-width:thin}
 body.rrdd-adventure.rrdd-game-shell #readingScreen#readingScreen.reading-book>figure{height:clamp(205px,38dvh,380px)!important;border-radius:12px 12px 2px 2px!important}
 body.rrdd-adventure.rrdd-game-shell #readingScreen#readingScreen.reading-book>figure:after{display:none}
 body.rrdd-adventure.rrdd-game-shell #readingScreen#readingScreen.reading-book .adv-reading-copy{height:auto!important;min-height:260px!important;overflow:visible!important;padding:22px 18px 26px!important;gap:15px!important;border-radius:2px 2px 12px 12px!important;background:#fffaf0!important}
 body.rrdd-adventure.rrdd-game-shell #readingScreen#readingScreen.reading-book #readingSentence{font-size:clamp(25px,6.9vw,32px)!important;line-height:1.4!important}
 body.rrdd-adventure.rrdd-game-shell #readingScreen#readingScreen.reading-book[data-book-density=medium] #readingSentence{font-size:25px!important}
 body.rrdd-adventure.rrdd-game-shell #readingScreen#readingScreen.reading-book[data-book-density=long] #readingSentence{font-size:23px!important}
 body.rrdd-adventure.rrdd-game-shell #readingScreen#readingScreen.reading-book #readingTitle{font-size:10px!important}
}
@media(max-height:500px) and (orientation:landscape){
 body.rrdd-adventure.reading-book-open{--adv-hud-height:42px;--adv-hud-centre:72px}
 body.rrdd-adventure.rrdd-game-shell #readingScreen#readingScreen.reading-book .adv-reading-copy{padding:14px 20px!important;gap:10px!important;justify-content:flex-start!important}
 body.rrdd-adventure.rrdd-game-shell #readingScreen#readingScreen.reading-book #readingSentence{font-size:25px!important;line-height:1.35!important}
}
@media(prefers-reduced-motion:reduce){.reading-book.book-page-enter{animation:none}.reading-book .book-keyword{transition:none}}
body.reduce-motion .reading-book.book-page-enter{animation:none}

/* Vocabulary and game entry are explicit, permanent steps. */
body.rrdd-adventure.rrdd-game-shell #readingScreen#readingScreen.reading-book #openDiscovery:disabled{display:inline-flex!important;align-items:center;justify-content:center;opacity:.65!important;cursor:default!important}
body.rrdd-adventure.rrdd-game-shell #readingScreen#readingScreen.reading-book .adv-reading-copy{justify-content:safe center!important;gap:clamp(10px,1.6vh,18px)!important}
body.rrdd-adventure.rrdd-game-shell #readingScreen#readingScreen.reading-book .book-vocabulary-label{display:block!important;margin:0 0 7px!important;font:700 14px/1.4 'Trebuchet MS',sans-serif!important;letter-spacing:.035em;color:#52716a!important}
body.rrdd-adventure.rrdd-game-shell #readingScreen#readingScreen.reading-book .reading-word-card.book-word-note{padding:14px 18px!important;max-width:390px}
body.rrdd-adventure.rrdd-game-shell #readingScreen#readingScreen.reading-book #readingStatus{max-width:100%;font-size:13px!important}
@media(max-width:700px) and (orientation:portrait){
 body.rrdd-adventure.rrdd-game-shell #readingScreen#readingScreen.reading-book>figure{height:clamp(170px,28dvh,280px)!important}
 body.rrdd-adventure.rrdd-game-shell #readingScreen#readingScreen.reading-book .adv-reading-copy{padding:16px!important;gap:11px!important}
 body.rrdd-adventure.rrdd-game-shell #readingScreen#readingScreen.reading-book #readingSentence{font-size:25px!important;line-height:1.35!important}
 body.rrdd-adventure.rrdd-game-shell #readingScreen#readingScreen.reading-book #readAgain{width:40px!important;height:40px!important;min-height:40px!important;min-width:40px!important}
 body.rrdd-adventure.rrdd-game-shell #readingScreen#readingScreen.reading-book #openDiscovery{min-height:48px!important;font-size:21px!important}
 body.rrdd-adventure.rrdd-game-shell #readingScreen#readingScreen.reading-book .reading-word-card.book-word-note{padding:10px 14px!important}
 body.rrdd-adventure.rrdd-game-shell #readingScreen#readingScreen.reading-book .book-vocabulary-label{font-size:12px!important;margin-bottom:4px!important}
}

/* Reading template v3: no visible page metadata or status sentences. */
body.rrdd-adventure.rrdd-game-shell #readingScreen#readingScreen.reading-book #readingTitle{display:none!important}
body.rrdd-adventure.rrdd-game-shell #readingScreen#readingScreen.reading-book #readingStatus{position:absolute!important;left:0!important;top:0!important;width:1px!important;height:1px!important;min-height:0!important;padding:0!important;margin:0!important;overflow:hidden!important;clip-path:inset(50%)!important;white-space:nowrap!important}
body.rrdd-adventure.rrdd-game-shell #readingScreen#readingScreen.reading-book #readAgain{display:grid!important;place-items:center!important;color:#2e716b!important}
body.rrdd-adventure.rrdd-game-shell #readingScreen#readingScreen.reading-book #readAgain svg{display:block;width:23px;height:23px;margin-left:2px;pointer-events:none}
body.rrdd-adventure.rrdd-game-shell #readingScreen#readingScreen.reading-book #readingWord{display:inline-flex!important;align-items:center!important;gap:10px!important}
.reading-book .book-human-voice{display:inline-flex;width:34px;height:32px;color:#4685a0;vertical-align:middle;flex:none;pointer-events:none}
.reading-book .book-human-voice svg{display:block;width:100%;height:100%}
