/* Scoped to the existing Tree House; other Hollow activities retain their layout. */
html body #hollow90.active>.h90.th-treehouse{width:100%!important;max-width:none!important;height:100dvh!important;min-height:0!important;max-height:none!important;padding:8px max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left))!important;display:flex!important;flex-direction:column!important;gap:6px!important;box-sizing:border-box!important;overflow:hidden!important;background:#352a35!important;color:#fff1dc!important}
html body.expanded-game107 #hollow90.active>.h90.th-treehouse.expand-full107{padding-top:max(8px,env(safe-area-inset-top),var(--app-safe-top197,0px))!important}
html body #hollow90.active>.h90.th-treehouse>.h90-top{flex:none!important;gap:6px!important;margin:0!important;padding-right:50px;min-height:44px}
html body #hollow90.active>.h90.th-treehouse>:is(h1,p,.eyebrow,.h90-tabs){display:none!important}
html body #hollow90.active>.h90.th-treehouse>#h90body{display:flex!important;flex:1 1 0!important;flex-direction:column!important;width:100%!important;min-height:0!important;height:auto!important;max-height:none!important;margin:0!important;padding:0!important;overflow:hidden!important;gap:0!important}
html body #hollow90.active>.h90.th-treehouse .h91-room-head{display:none!important}
html body #hollow90.active>.h90.th-treehouse #h90body #r135layout{display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr) auto auto!important;flex:1 1 0!important;gap:6px!important;min-height:0!important;width:100%!important;max-width:none!important;margin:0!important;overflow:hidden!important}
html body #hollow90.active>.h90.th-treehouse #h90body #r135layout>.th-viewport{position:relative;grid-row:1;overflow-x:auto!important;overflow-y:hidden!important;width:100%!important;height:100%!important;min-width:0!important;min-height:0!important;border-radius:14px;touch-action:pan-x;scrollbar-width:thin;scrollbar-color:#d797bb #372d36;overscroll-behavior:contain}
html body #hollow90.active>.h90.th-treehouse #h90body #r135layout #h91room.th-world{max-width:none!important;min-width:100%;min-height:0!important;max-height:none!important;aspect-ratio:auto!important;border:0!important;border-radius:0!important;margin:0!important;background-size:100% 100%!important;background-position:center!important;box-sizing:border-box;touch-action:pan-x;user-select:none}
#h91room.th-world .h91-placed{width:calc(7.3% * var(--size) * var(--depth,1))!important}
#h91room.th-world .h94-gina{width:6.4%;height:30%}
#h91room.th-world .h94-friend{width:4%}
#h91room.th-world .h91-room-title{display:none}
#h91room.th-world .w131-sleepbed{left:55.7%!important;bottom:42.2%!important;width:8.6%!important;height:auto!important}
#h91room.th-world .w131-cabinet{right:36%!important;bottom:35%!important;width:6%!important;height:9%!important}
#h91room.th-world .w131-teatray{left:40%;width:12%;height:10%}
#h91room.th-world .w131-bulbcover{display:none!important}
html body #hollow90.active>.h90.th-treehouse #h90body #r135controls{grid-row:2;position:relative;contain:none!important;height:auto!important;max-height:38dvh!important;min-height:0!important;display:flex!important;flex-direction:column!important;padding:0!important;background:#352a35;border:0;overflow:hidden!important;border-radius:10px;flex:none}
html body #hollow90.active>.h90.th-treehouse #h90body #r135controls .r135-tabs{order:2;display:flex;justify-content:center;gap:8px;flex:none!important;margin:0!important}
html body #hollow90.active>.h90.th-treehouse #h90body #r135controls .r135-tabs button{min-width:100px;background:#63445e;color:#fff4e5;border-color:#ce8dab}
html body #hollow90.active>.h90.th-treehouse #h90body #r135controls .r135-tabs button[aria-selected=true]{background:#a34879}
html body #hollow90.active>.h90.th-treehouse #h90body #r135controls [data-panel135]{display:none!important;min-height:0!important;height:auto!important;max-height:none!important;overflow:auto!important;padding:10px;background:#fff5f7;color:#3f3556;border-radius:12px;flex:1 1 auto!important}
html body #hollow90.active>.h90.th-treehouse #h90body #r135controls.th-drawer-open [data-panel135]:not([hidden]){display:block!important}
#th-close-controls{align-self:flex-end;min-height:36px!important;padding:4px 12px;order:-1;margin-bottom:4px}
#th-close-controls[hidden]{display:none!important}
.th-bottom{grid-row:3;display:flex;gap:8px;justify-content:center;align-items:center;flex-wrap:wrap;min-width:0}
.th-bottom button,.th-bottom select,#th-close-controls{font:inherit;background:#614461;color:#fff4df;border:1px solid #d491af;border-radius:18px;min-height:44px;padding:6px 13px;cursor:pointer}
.th-bottom label{display:flex;align-items:center;gap:6px;font-size:12px;color:#fff2e1}
.th-pan-label input{width:clamp(70px,17vw,260px);accent-color:#db73ae}
#th-cabinet{position:absolute;height:28%;width:auto;aspect-ratio:1142/1377;padding:0!important;border:0!important;background:transparent!important;min-height:0!important;z-index:71;touch-action:none;filter:drop-shadow(0 7px 4px #31221c66);cursor:grab}
#th-cabinet img{width:100%;height:100%;display:block;object-fit:contain;pointer-events:none;user-select:none}
#th-cabinet span{position:absolute;bottom:-7%;left:50%;transform:translateX(-50%);white-space:nowrap;padding:4px 9px;border-radius:12px;font-size:11px;background:#423244e8;color:#fff3da;pointer-events:none}
#th-cabinet:focus-visible{outline:3px dashed #ffd9f4;outline-offset:4px}
#th-music{box-sizing:border-box;width:min(970px,96vw);max-width:96vw;max-height:92dvh;padding:0;border:2px solid #c991b1;border-radius:24px;color:#fff2e1;background:#3f3049;box-shadow:0 24px 100px #0008;font:15px/1.4 system-ui,sans-serif;overflow:auto}
#th-music::backdrop{background:#181323b8;backdrop-filter:blur(4px)}
#th-music button,#th-music input{font:inherit}
#th-music button{min-height:44px;border:1px solid #cb91ad;border-radius:16px;padding:8px 14px;color:#fff2e1;background:#65476c;cursor:pointer}
#th-music button[aria-pressed=true],#th-music .th-selected .th-song{background:#a34879}
#th-music button:focus-visible,#th-music input:focus-visible{outline:3px solid #8ee4dc;outline-offset:2px}
#th-music button:disabled,.th-bottom button:disabled{opacity:.5}
.th-music-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 22px;background:#503952;border-bottom:1px solid #ba86aa66}
.th-music-head h2{font:28px Georgia;margin:0 0 5px;color:inherit}
.th-music-head p{margin:0;font-size:13px}
.th-music-body{display:grid;grid-template-columns:220px minmax(0,1fr);gap:20px;padding:18px 22px}
.th-music-body aside{text-align:center;background:radial-gradient(#926e8a55,transparent 70%);align-self:center}
.th-music-body aside img{width:180px;height:220px;object-fit:contain}
.th-music-body section{min-width:0}
.th-search{display:flex;flex-direction:column;gap:5px;font-size:13px}
#th-search{box-sizing:border-box;width:100%;padding:10px 14px;border:1px solid #a383a6;border-radius:16px;color:#3e304b;background:#fff4f8}
.th-filters{display:flex;gap:5px;flex-wrap:wrap;margin:10px 0}
#th-music .th-filters button{font-size:12px;padding:7px 11px}
#th-tracks{height:clamp(140px,28dvh,300px);overflow:auto;scrollbar-color:#d392b8 #42314e}
.th-track{display:grid;grid-template-columns:1fr 48px;gap:6px;margin-bottom:7px}
#th-music .th-song{text-align:left;min-width:0}
.th-song strong,.th-song small{display:block;white-space:normal}
.th-song small{font-size:11px;color:#ead6e7;margin-top:3px}
.th-player{padding:15px 22px 20px;background:#302737;border-top:1px solid #a8789a66}
.th-player p{font-size:12px;margin:4px 0 10px}
.th-transport{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:10px}
.th-seek{display:flex;align-items:center;gap:9px;margin-bottom:8px;font-size:12px}
.th-seek input{flex:1;min-width:0}
.th-player input{accent-color:#e07bae}
@media(max-width:600px){.th-bottom{gap:4px}.th-bottom button{font-size:12px;padding:5px 9px}.th-pan-label>span,.th-mode-label{font-size:0!important}.th-mode-label select{font-size:12px}.th-bottom #th-pause-room{display:none}.th-music-body{grid-template-columns:1fr;padding:12px}.th-music-body aside{display:none}.th-music-head{padding:12px}.th-music-head h2{font-size:23px}.th-player{padding:12px}.th-transport button{font-size:12px!important;padding:6px 9px!important}#th-cabinet span{font-size:9px}html body #hollow90.active>.h90.th-treehouse #h90body #r135controls{max-height:42dvh!important}}
@media(max-height:500px){.th-music-body aside{display:none}.th-music-body{grid-template-columns:1fr}#th-music{max-height:96dvh}.th-bottom{gap:4px}.th-bottom button,.th-bottom select{min-height:36px}html body #hollow90.active>.h90.th-treehouse #h90body #r135controls .r135-tabs button{min-height:36px}#th-cabinet span{font-size:9px}}
@media(prefers-reduced-motion:reduce){#h91room.th-world *{animation:none!important;transition:none!important}}

#h91room.th-world .v134-guest{width:6%!important}
html body #hollow90.active>.h90.th-treehouse .th-bottom{background:#352a35!important;padding:2px;border-radius:12px}
/* Activity drawers overlay the room so opening controls never squeezes the artwork. */
html body #hollow90.active>.h90.th-treehouse #h90body #r135controls{height:44px!important;max-height:none!important;overflow:visible!important;z-index:160}
html body #hollow90.active>.h90.th-treehouse #h90body #r135controls [data-panel135]{position:absolute;bottom:52px;left:50%;transform:translateX(-50%);width:min(760px,100%);height:38dvh!important;max-height:38dvh!important;box-sizing:border-box;box-shadow:0 8px 36px #160e2855}
html body #hollow90.active>.h90.th-treehouse #h90body #r135controls #th-close-controls{position:absolute;right:max(0px,calc((100% - 760px)/2));bottom:calc(38dvh + 54px);margin:0;z-index:1}
html body #hollow90.active>.h90.th-treehouse #h90body #r135layout #h91room.th-world{min-width:0!important;margin:0 auto!important}
@media(max-height:500px){html body #hollow90.active>.h90.th-treehouse #h90body #r135controls{height:36px!important}html body #hollow90.active>.h90.th-treehouse #h90body #r135controls [data-panel135]{bottom:42px;height:50dvh!important;max-height:50dvh!important}html body #hollow90.active>.h90.th-treehouse #h90body #r135controls #th-close-controls{bottom:calc(50dvh + 44px)}}

#h91room.th-world:not(.th-art-ready){background-image:linear-gradient(135deg,#52344e,#254b52)!important}
#h91room.th-world .th-loading{position:absolute;inset:0;display:grid;place-items:center;z-index:150;background:#352a35;color:#fff3e2;font-size:18px;pointer-events:none}

/* Room lighting is baked into matched artwork, never a tint layer. */
#h91room.th-world :is(.w131-darken,.h95-evening,.h95-windowglow,.h91-sparkles,.h91-sun){display:none!important}
#h91room.th-world .h94-gina img{object-fit:contain;object-position:center bottom;transform:none!important;scale:1!important;animation:none!important}
.th-gina-facing{display:flex;flex-wrap:wrap;gap:8px;padding:8px 0}
#r135controls .th-gina-facing button{appearance:none;-webkit-appearance:none;font:inherit;font-weight:700;line-height:1.25;min-height:44px;padding:10px 16px;border:1px solid #d88aad;border-radius:18px;background:#fff4f9;color:#793558;cursor:pointer;box-shadow:0 2px 5px #79355814}
#r135controls .th-gina-facing button[aria-pressed=true]{background:#a34879;color:#fff;border-color:#a34879}
#r135controls .th-gina-facing button:focus-visible{outline:3px solid #37b9c3;outline-offset:2px}
#r135controls .h91-treasure svg{overflow:hidden;isolation:isolate}
#r135controls .h91-treasure svg image{visibility:visible;opacity:1}

/* The original lantern has an extra wrapper for its on/off artwork.
   Size its SVG explicitly, just as the other original treasures are sized. */
:is(#h91room,#r135controls) [data-treehouse-lamp=original]>:not([hidden]),
:is(#h91room,#r135controls) .th-lamp-on{display:block;width:100%;height:100%;object-fit:contain}
:is(#h91room,#r135controls) .th-lamp-on>svg{display:block;width:100%!important;height:100%!important;max-height:none!important;position:static!important;overflow:hidden}
:is(#h91room,#r135controls) [data-treehouse-lamp=original]>[hidden]{display:none!important}

#h91room .th-sleeping-gina{position:absolute;left:58.8%;bottom:42%;width:10.5%;height:auto;z-index:58;pointer-events:none;filter:drop-shadow(0 2px 2px #40281c44)}
#h91room.th-balcony>*:not(.th-loading):not(.th-balcony-video):not(.th-scene-transition){visibility:hidden!important;pointer-events:none!important}
html body #hollow90.active>.h90.th-treehouse #h90body #r135layout{position:relative!important;grid-template-rows:minmax(0,1fr) auto!important}
html body #hollow90.active>.h90.th-treehouse #h90body #r135layout>.th-viewport{grid-row:1!important;grid-column:1!important}
html body #hollow90.active>.h90.th-treehouse #h90body #r135controls{grid-row:1!important;grid-column:1!important;align-self:end;z-index:150;max-height:38dvh!important;margin:8px;background:rgba(53,42,53,.12)!important;box-shadow:0 3px 14px #0003}
html body #hollow90.active>.h90.th-treehouse #h90body #r135controls [data-panel135]{background:rgba(255,245,247,.86)!important}
html body #hollow90.active>.h90.th-treehouse #h90body #r135controls:not(.th-drawer-open){background:transparent!important;box-shadow:none}
.th-bottom{grid-row:2!important;grid-column:1!important}

#h91room .th-balcony-video{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;object-fit:cover;pointer-events:none!important;z-index:0!important}#h91room .th-balcony-video[hidden]{display:none!important}

#h91room .th-scene-transition{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;object-fit:cover;background-size:100% 100%;background-position:center;pointer-events:none!important;z-index:0!important}

/* Movable controls stay within the room viewport; only the handle captures dragging. */
html body #hollow90.active>.h90.th-treehouse #h90body #r135controls.th-movable-controls{position:absolute!important;right:auto!important;bottom:auto!important;transform:none!important;align-self:auto!important;width:min(760px,calc(100% - 16px))!important;height:auto!important;max-height:var(--th-controls-height,80dvh)!important;margin:0!important;overflow:hidden!important;box-sizing:border-box!important}
html body #hollow90.active>.h90.th-treehouse #h90body #r135controls.th-movable-controls [data-panel135]{position:relative!important;inset:auto!important;transform:none!important;width:100%!important;height:38dvh!important;max-height:38dvh!important;flex:1 1 auto!important;min-height:0!important;overflow:auto!important}
html body #hollow90.active>.h90.th-treehouse #h90body #r135controls.th-movable-controls .th-controls-header{display:flex;align-items:center;justify-content:space-between;gap:8px;order:-1;flex:0 0 auto;padding:5px;background:rgba(76,47,70,.86);border-radius:10px 10px 0 0}
html body #hollow90.active>.h90.th-treehouse #h90body #r135controls.th-movable-controls:not(.th-drawer-open) .th-controls-header{display:none}
html body #hollow90.active>.h90.th-treehouse #h90body #r135controls.th-movable-controls #th-close-controls{position:static!important;inset:auto!important;margin:0!important;order:0;flex:0 0 auto;align-self:center}
#th-move-controls{flex:1;min-width:0;min-height:38px;touch-action:none;user-select:none;cursor:grab;border:1px solid #d491af;border-radius:12px;background:#614461;color:#fff4df;font:inherit;text-align:left;padding:6px 12px}
#th-move-controls::before{content:'⠿ ';font-size:20px}#th-move-controls.th-dragging{cursor:grabbing}#th-move-controls:focus-visible{outline:3px solid #37b9c3;outline-offset:-3px}
html body #hollow90.active>.h90.th-treehouse #h90body #r135controls.th-movable-controls .r135-tabs{flex:0 0 auto!important;flex-wrap:wrap}
html body #hollow90.active>.h90.th-treehouse #h90body #r135controls.th-movable-controls .r135-tabs button{min-width:0!important;flex:1}

/* Keep the departing scene above a newly ready video until its fade completes. */
#h91room .th-scene-transition{z-index:1!important}
/* Sprite lighting only: the room background and controls are never tinted. */
#h91room.th-world :is(.h91-placed>*,.h94-gina img,.h94-friend>*,.v134-guest>*,#th-cabinet>img,.th-sleeping-gina){filter:brightness(var(--th-object-light,1)) drop-shadow(0 3px 2px #241b2933)!important;transition:filter 750ms ease-in-out!important}
@media(prefers-reduced-motion:reduce){#h91room.th-world :is(.h91-placed>*,.h94-gina img,.h94-friend>*,.v134-guest>*,#th-cabinet>img,.th-sleeping-gina){transition:none!important}}

/* A readable storybook popup over the Tree House. */
#h91room .th-read-story{position:absolute;left:60.3%;top:42%;transform:translate(-50%,-50%);z-index:125;padding:9px 13px;border:1px solid #ffe7aa;border-radius:18px;background:#734361;color:#fff9ec;box-shadow:0 3px 12px #30203355;font:700 clamp(11px,1vw,15px)/1.2 system-ui;min-height:40px;white-space:nowrap;cursor:pointer}
#th-books[hidden],#th-books [hidden]{display:none!important}
#th-books{position:fixed;inset:0;z-index:2147483150;display:grid;place-items:center;padding:clamp(8px,2vw,26px);box-sizing:border-box;background:#291b3066;font:16px/1.45 system-ui,sans-serif;color:#47334f}
#th-books *{box-sizing:border-box}
#th-books .th-books-window{width:min(1080px,100%);max-height:94dvh;overflow:auto;overscroll-behavior:contain;border:2px solid #efc5dc;border-radius:26px;background:linear-gradient(145deg,#fff9f4,#fdf0f8 65%,#eafbfa);box-shadow:0 18px 80px #21132466;padding:22px;scrollbar-color:#bc739f #fff1f8}
#th-books .th-books-head{position:sticky;top:0;z-index:3;background:#fff8fa;display:flex;align-items:center;justify-content:space-between;gap:16px;border-bottom:1px solid #ebcadc;padding-bottom:15px}
#th-books .th-books-kicker{font-size:11px;letter-spacing:.16em;color:#8f527a;font-weight:800;margin:0 0 5px}
#th-books h2{font-size:clamp(22px,3vw,30px);line-height:1.15;margin:0;color:#713e65}
#th-books button{cursor:pointer;min-height:44px;font:700 14px/1.25 system-ui;border-radius:14px;padding:10px 14px;border:1px solid #ca99b7;background:#fff8fc;color:#79456a}
#th-books button:focus-visible,#h91room .th-read-story:focus-visible{outline:3px solid #209da7;outline-offset:3px}
#th-books button:disabled{cursor:default;opacity:.5}
#th-books #th-books-close{white-space:nowrap;flex-shrink:0}
#th-books .th-books-intro p{margin:16px 0 20px;color:#67546f;max-width:670px}
#th-books #th-books-status{font-size:14px;margin:12px 0;color:#80506e}
#th-books #th-books-status:empty{display:none}
#th-books .th-books-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
#th-books .th-book-card{min-width:0;display:flex;flex-direction:column;padding:11px;border:1px solid #ebd3df;border-radius:19px;background:#fffdfb;box-shadow:0 5px 12px #814c7010}
#th-books .th-book-cover{position:relative;aspect-ratio:3/2;background-position:center;background-size:cover;border-radius:12px;border:1px solid #ead7d8;overflow:hidden}
#th-books .th-book-number{position:absolute;left:8px;top:8px;padding:5px 8px;border-radius:8px;background:#fff9f0eb;color:#75486a;font-size:10px;letter-spacing:.08em;font-weight:800}
#th-books .th-book-card h3{font-size:18px;line-height:1.25;color:#634260;margin:13px 3px 6px}
#th-books .th-book-lesson{font-size:13px;color:#756879;margin:0 3px 7px}
#th-books .th-book-state{font-size:12px;color:#34777c;margin:0 3px 12px}
#th-books .th-book-choices{display:grid;gap:7px;margin-top:auto}
#th-books .th-book-listen{background:#a84f80;color:white;border-color:#a84f80}
#th-books .th-book-read{background:#e8f7f7;color:#266e77;border-color:#b3dedd}
#th-books #th-books-back{margin:14px 0 8px}
#th-books #storybook48.active{position:relative!important;inset:auto!important;z-index:auto!important;display:block!important;background:transparent!important;padding:0!important;overflow:visible!important;width:100%!important;height:auto!important}
#th-books #storybook48>.shell{width:100%!important;max-width:none!important;height:auto!important;padding:0!important;gap:12px!important;margin:0!important;display:flex!important;flex-direction:column!important}
#th-books #storybook48 .backbtn,#th-books #storybook48 .home-link86,#th-books #storybook48 .story-shelf59,#th-books #storybook48 .story-collection-title60,#th-books #storybook48 .story-explain59{display:none!important}
#th-books #storybook48 .reader48{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;grid-template-rows:auto!important;min-height:340px!important;height:min(48dvh,440px)!important;flex:none!important;border-radius:18px;overflow:hidden;background:#fff;border:1px solid #ecd5df}
#th-books #storybook48 .book-art48{min-height:0!important;min-width:0!important;display:flex;align-items:center;justify-content:center;padding:12px!important;background:#f6f0ed}
#th-books #storybook48 .book-art48>img{object-fit:contain!important;width:100%!important;height:100%!important;max-height:100%!important}
#th-books #storybook48 #storyArt59{width:100%!important;aspect-ratio:3/2;max-height:100%!important;background-size:200% 200%;background-repeat:no-repeat}
#th-books #storybook48 .book-copy48{overflow:auto!important;padding:20px!important;min-height:0!important}
#th-books #storybook48 #pageTitle48{font-size:22px!important;color:#77456d}
#th-books #storybook48 #pageText48{font-size:19px!important;line-height:1.65!important;color:#443548}
#th-books #storybook48 .book-toolbar48{display:flex;flex-wrap:wrap;gap:8px}
#th-books #storybook48 .book-nav48{display:flex;align-items:center;gap:8px}
#th-books #storybook48 #voiceStatus48{font-size:13px!important}
@media(max-width:760px){#th-books .th-books-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}#th-books .th-books-window{padding:15px;border-radius:20px}#th-books .th-book-card h3{font-size:16px}#th-books #storybook48 .reader48{grid-template-columns:1fr!important;grid-template-rows:200px minmax(190px,auto)!important;height:auto!important}#th-books #storybook48 .book-copy48{max-height:38dvh}#th-books #storybook48 #pageText48{font-size:17px!important}}
@media(max-width:420px){#th-books .th-books-grid{grid-template-columns:1fr}#th-books .th-books-head{gap:8px}#th-books #th-books-close{padding:9px}#th-books .th-book-cover{aspect-ratio:16/9}}
#th-books #storybook48 .book-heading48{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:14px!important}
#th-books #storybook48 #restartBook48{max-width:none!important;width:auto!important;min-width:150px;flex:0 0 auto;padding:10px 14px!important}
#th-books #storybook48 .book-toolbar48{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
#th-books #storybook48 .book-toolbar48 button{width:100%!important;margin:0!important}
#th-books #storybook48 #voiceStatus48{grid-column:1/-1}
#th-books #storybook48 #readBook48[aria-pressed=true]{background:#a84f80!important;color:white!important;border-color:#a84f80!important}
#th-books #storybook48 #quietBook48[aria-pressed=true]{background:#e2f4f4!important;color:#266e77!important;border-color:#94cecf!important}
@media(min-width:761px){#th-books #storybook48 .reader48{min-height:300px!important;height:min(44dvh,420px)!important}}
@media(max-width:420px){#th-books #storybook48 #restartBook48{min-width:0;max-width:110px!important;font-size:11px!important}#th-books #storybook48 .book-heading48 h2{font-size:18px!important}}

/* Compact shelf label; the story popup stays above expanded games and below access prompts. */
#h91room .th-read-story{padding:4px 7px;min-height:28px;border:1px solid #fff7e966;border-radius:10px;background:transparent;box-shadow:none;text-shadow:0 1px 3px #302033,0 0 4px #302033;font:700 clamp(10px,.8vw,12px)/1.2 system-ui}
#h91room .th-read-story:hover{background:#ffffff18}

/* A small illuminated wooden story sign beside the books. */
#h91room .th-read-story{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:34px;padding:6px 12px;border:2px solid #cfa45d;border-radius:9px 15px 9px 15px;background:repeating-linear-gradient(4deg,#ffffff04 0 2px,#00000005 3px 5px),linear-gradient(160deg,#87552f,#54311f 65%,#704526);color:#fff0c8;font:700 clamp(11px,.8vw,13px)/1.15 Georgia,serif;letter-spacing:.02em;text-shadow:0 1px 2px #25140d;box-shadow:inset 0 0 0 2px #3c251c,inset 0 0 0 3px #e3bb7555,0 3px 6px #26170e88;isolation:isolate}
#h91room .th-read-story:hover{background:linear-gradient(160deg,#98613a,#694027);color:#fff8df}
#h91room .th-read-story::before{content:'';width:19px;height:19px;flex:none;background:center/contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f7d78f' stroke-width='1.5' stroke-linejoin='round'%3E%3Cpath d='M12 6C9 4 5 4 2 5v14c3-1 7-1 10 1 3-2 7-2 10-1V5c-3-1-7-1-10 1Zm0 0v14M5 8l4 1M5 11l4 1M15 9l4-1M15 12l4-1'/%3E%3C/svg%3E")}
#h91room .th-read-story::after{content:'';position:absolute;inset:-3px;border:1px solid #ffe7a9;border-radius:11px 17px 11px 17px;pointer-events:none;box-shadow:0 0 9px #ffd77c99;animation:th-story-plaque-glow 3.6s ease-in-out infinite}
@keyframes th-story-plaque-glow{0%,100%{opacity:.18}50%{opacity:.85}}
@media(prefers-reduced-motion:reduce){#h91room .th-read-story::after{animation:none;opacity:.4}}

/* R34: fullscreen geometry belongs to the visual viewport, including installed iOS. */
html.th-open34,html.th-open34 body{overflow:hidden!important;overscroll-behavior:none!important}
.th-path34{transform:none!important;filter:none!important;backdrop-filter:none!important;perspective:none!important;contain:none!important;container-type:normal!important;will-change:auto!important;animation:none!important}
html body #hollow90.active>.h90.th-treehouse.expand-full107.th-viewport34{position:fixed!important;inset:auto!important;top:var(--th-vp-top,0px)!important;left:var(--th-vp-left,0px)!important;width:var(--th-vp-width,100vw)!important;height:var(--th-vp-height,100dvh)!important;max-height:none!important;min-height:0!important;margin:0!important;border:0!important;border-radius:0!important;overflow:hidden!important;transform:none!important;box-sizing:border-box!important;z-index:2147483100!important;padding:max(4px,env(safe-area-inset-top),var(--app-safe-top197,0px)) max(4px,env(safe-area-inset-right)) max(4px,env(safe-area-inset-bottom)) max(4px,env(safe-area-inset-left))!important}
html body #hollow90.active>.h90.th-treehouse.expand-full107.th-viewport34>.h90-top{background:transparent!important;color:#fff1dc!important;margin:0!important;padding-bottom:0!important}
html body #hollow90.active>.h90.th-treehouse.th-viewport34 #r135layout>.th-viewport{border-radius:0!important}
@media(max-width:700px),(pointer:coarse){
html body #hollow90.active>.h90.th-treehouse.th-viewport34>.h90-top button{font-size:12px!important;min-height:36px!important;padding:6px 9px!important}
html body #hollow90.active>.h90.th-treehouse.th-viewport34>.h90-top .h90-companion{height:32px!important;min-height:32px!important;max-height:32px!important;font-size:12px!important}
html body #hollow90.active>.h90.th-treehouse.th-viewport34>.h90-top .h90-companion :is(.h91-creature,svg,img){width:26px!important;height:26px!important;min-width:26px!important;max-width:26px!important;min-height:26px!important;max-height:26px!important;flex-basis:26px!important}
html body #hollow90.active>.h90.th-treehouse.th-viewport34 .th-bottom{gap:4px!important;padding:0!important}
html body #hollow90.active>.h90.th-treehouse.th-viewport34 .th-bottom :is(button,select){min-height:36px!important;font-size:12px!important;padding:5px 8px!important}
}
/* Remove the padded scroll gap above and beside the sticky story heading. */
#th-books .th-books-window{padding:0!important;isolation:isolate;scroll-padding-top:110px}
#th-books .th-books-head{top:0;margin:0;padding:18px 22px;background:#fff8fa;z-index:5}
#th-books .th-books-window>:not(.th-books-head){margin-left:22px;margin-right:22px}
#th-books .th-books-window>:last-child{margin-bottom:22px}
@media(max-width:760px){#th-books .th-books-head{padding:15px}#th-books .th-books-window>:not(.th-books-head){margin-left:15px;margin-right:15px}#th-books .th-books-window>:last-child{margin-bottom:15px}}
/* Mobile navigation: only Home, Back to the Hollow and expand. */
@media(max-width:700px),(pointer:coarse){
html body #hollow90.active>.h90.th-treehouse.th-viewport34>.h90-top{display:flex!important;flex-wrap:nowrap!important;min-height:36px!important;padding:0 40px 0 0!important;gap:4px!important}
html body #hollow90.active>.h90.th-treehouse.th-viewport34>.h90-top>:not(.h186-nav):not(.expand-toolbar107){display:none!important}
html body #hollow90.active>.h90.th-treehouse.th-viewport34>.h90-top .h186-nav{display:flex!important;flex:1 1 auto!important;min-width:0!important;padding:0!important;gap:4px!important}
html body #hollow90.active>.h90.th-treehouse.th-viewport34>.h90-top .expand-toolbar107{display:block!important;top:0!important;right:0!important}
}
@media(orientation:landscape) and (max-height:600px){
html body #hollow90.active>.h90.th-treehouse.th-viewport34 .th-bottom{flex-wrap:nowrap!important;gap:4px!important}
html body #hollow90.active>.h90.th-treehouse.th-viewport34 .th-bottom :is(button,select){font-size:11px!important;min-height:34px!important;padding:4px 7px!important;white-space:nowrap}
html body #hollow90.active>.h90.th-treehouse.th-viewport34 .th-pan-label>span,
html body #hollow90.active>.h90.th-treehouse.th-viewport34 #th-pause-room{display:none!important}
html body #hollow90.active>.h90.th-treehouse.th-viewport34 .th-mode-label{font-size:0!important}
html body #hollow90.active>.h90.th-treehouse.th-viewport34 .th-pan-label input{width:70px!important}
html body #hollow90.active>.h90.th-treehouse.th-viewport34 #r135controls:not(.th-drawer-open){width:min(460px,calc(100% - 16px))!important}
html body #hollow90.active>.h90.th-treehouse.th-viewport34 #r135controls .r135-tabs button{min-height:32px!important;font-size:12px!important;padding:5px 10px!important}
html body #hollow90.active>.h90.th-treehouse.th-viewport34 #h91room .th-read-story{font-size:11px!important;padding:6px 9px!important;min-height:32px!important}
html body #hollow90.active>.h90.th-treehouse.th-viewport34 #th-cabinet span{display:none}
}
@media(orientation:landscape) and (max-height:600px){html body #hollow90.active>.h90.th-treehouse.th-viewport34 .th-pan-label input{height:34px!important;min-height:34px!important;margin:0!important;padding:0!important}}

/* R36: match installed-game-flow200 used by Wonder Worlds in full,
   including document-flow positioning. A fixed host can remain clipped to
   WebKit's smaller visual surface even when given the large viewport height. */
html.installed197.game-flow200.th-open34{height:auto!important;min-height:100%;overflow:visible!important}
html.installed197.game-flow200.th-open34 body.play-focus134{position:static!important;height:auto!important;min-height:100%;overflow:visible!important}
html.installed197.game-flow200 body.play-focus134 #hollow90.active>.h90.th-treehouse.expand-full107.th-viewport34{position:relative!important;inset:auto!important;top:auto!important;left:auto!important;height:100vh!important;height:100lvh!important;max-height:none!important;width:100%!important;max-width:100%!important;margin:0!important}
/* R37: compact, movable mobile controls; contents scroll within the panel. */
@media(max-width:700px),(pointer:coarse){
html body #hollow90.active>.h90.th-treehouse #h90body #r135controls.th-movable-controls{width:min(350px,calc(100% - 16px))!important;max-height:min(46dvh,var(--th-controls-height,46dvh))!important;padding:0!important;gap:0!important}
html body #hollow90.active>.h90.th-treehouse #h90body #r135controls.th-movable-controls [data-panel135]{height:28dvh!important;max-height:28dvh!important;min-height:0!important;padding:7px!important;font-size:12px!important;line-height:1.35!important;overscroll-behavior:contain}
html body #hollow90.active>.h90.th-treehouse #h90body #r135controls.th-movable-controls .th-controls-header{padding:3px!important;gap:4px!important}
html body #hollow90.active>.h90.th-treehouse #h90body #r135controls.th-movable-controls button{min-height:34px!important;padding:5px 7px!important;font-size:12px!important;line-height:1.25!important}
html body #hollow90.active>.h90.th-treehouse #h90body #r135controls.th-movable-controls :is(p,small){font-size:11px!important;line-height:1.35!important;margin:4px 0!important}
html body #hollow90.active>.h90.th-treehouse #h90body #r135controls.th-movable-controls .r135-tabs{gap:4px!important;padding:3px!important;flex-wrap:nowrap!important}
html body #hollow90.active>.h90.th-treehouse #h90body #r135controls.th-movable-controls .r135-tabs button{min-width:0!important}
#r135controls.th-movable-controls .decor-grid20261012{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:5px!important}
#r135controls.th-movable-controls .decor-grid20261012 .h91-treasure{grid-template-rows:44px auto auto!important}
#r135controls.th-movable-controls .decor-grid20261012 .th-decor-art32,#r135controls.th-movable-controls .decor-grid20261012 .th-decor-art32>img{height:44px!important;min-height:44px!important}
#r135controls.th-movable-controls .h91-treasure strong{font-size:11px!important}
#r135controls.th-movable-controls #th-move-controls::before{font-size:15px}
}
@media(orientation:landscape) and (max-height:600px){
html body #hollow90.active>.h90.th-treehouse #h90body #r135controls.th-movable-controls{width:min(350px,calc(100% - 16px))!important;max-height:min(60dvh,var(--th-controls-height,60dvh))!important}
html body #hollow90.active>.h90.th-treehouse #h90body #r135controls.th-movable-controls [data-panel135]{height:calc(60dvh - 82px)!important;max-height:calc(60dvh - 82px)!important}
}
