/* Stage 5.9. The original courtyard, native character frames and butterflies stay intact. */
:root{--ink:#57664b;--sage:#738d54;--cream:#fff8e9;--honey:#d8aa67}
#app[data-screen=home],#app:has(.page-panel:not([hidden])){background:#e8e7c8}
#app[data-screen=home] .stage,#app:has(.page-panel:not([hidden])) .stage{width:100%;height:100%;border-radius:0;overflow:hidden;background:linear-gradient(90deg,#f9f1d8a8,#f5eddb00),url('assets/backgrounds/background.webp') center/cover;box-shadow:none}
#app[data-screen=home] .scene-frame{position:absolute;width:min(100vw,177.7778dvh);right:-12%;bottom:0;border-radius:0;overflow:visible;background:transparent}
#app[data-screen=home] .stage::after{content:'';position:absolute;inset:0;pointer-events:none;z-index:1;background:linear-gradient(90deg,#fff8eafc 0%,#fff7eaf0 24%,#fff7eab0 34%,#fff7ea08 52%,transparent 75%),linear-gradient(0deg,#f4e3bfbb,transparent 17%)}
#app[data-screen=home] #world{pointer-events:none}
.home-panel{position:absolute;z-index:2;left:5.5%;top:50%;transform:translateY(-50%);width:31%;max-width:430px;max-height:100%;padding:24px 0;overflow-y:auto;scrollbar-width:thin}
.eyebrow{display:block;color:#9b7853;font-size:12px;line-height:1.6;letter-spacing:1.4px;font-weight:600}
.home-eyebrow{display:flex;align-items:center;gap:9px;font-size:11px;letter-spacing:1.2px}
.home-eyebrow>span{font-size:23px;color:#c39b62}
.home-heading h1{position:relative;font:700 clamp(42px,5.2vw,83px)/.95 Georgia,'Times New Roman',serif;color:#687b49;letter-spacing:-3px;margin:17px 0 16px;text-shadow:0 2px 0 #fffff2,0 5px 0 #d9d4ae55}
.home-heading h1>span:first-child{color:#b4764e}
.title-flower{display:inline-block;font-size:.4em;vertical-align:top;margin:12px 0 0 5px;color:#d4a25f;animation:flower-sway 7s ease-in-out infinite}
.home-tagline{font-size:clamp(14px,1.35vw,20px);line-height:1.5;color:#8f795a;margin:0 0 24px}
.main-menu{display:grid;gap:10px}
.storybook-button{display:flex;gap:13px;align-items:center;justify-content:flex-start;min-height:56px;width:100%;border:1px solid #e6d6b7;border-bottom:3px solid #d5c59f;border-radius:18px;padding:12px 20px;background:linear-gradient(#fffdf4,#f8efd9);color:#727652;font-size:18px;font-weight:600;box-shadow:0 4px 10px #856a3010,inset 0 1px 0 #fff;touch-action:manipulation;transition:transform .18s,box-shadow .18s,background .18s}
.storybook-button:hover:enabled{transform:translateY(-2px);box-shadow:0 7px 18px #856a3026;background:linear-gradient(#fffef9,#fff6e3)}
.storybook-button:active:enabled{transform:translateY(1px)}
.storybook-button:disabled{cursor:default;opacity:.65}
.storybook-button svg,.quiet-button svg{width:25px;height:25px;flex:none;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.storybook-button .button-arrow{margin-left:auto;font-size:23px;font-weight:400;opacity:.7}
.storybook-button.primary{background:linear-gradient(#94ac70,#738d50);color:#fffdf1;border-color:#789151;border-bottom-color:#536d37;box-shadow:0 5px 14px #667e4930,inset 0 1px 0 #c6d5aa;font-size:19px}
.storybook-button.primary:hover:enabled{background:linear-gradient(#a0b97b,#809c59);box-shadow:0 8px 20px #667e493d}
.play-button{min-height:78px;border-radius:22px;font-size:25px!important}
.play-button svg{fill:#fff6dd;stroke:none;width:29px;height:29px}
.play-button small{display:block;font-size:12px;font-weight:400;color:#eff1d6;margin-top:3px}
.menu-icon{font:32px/24px Georgia,serif;width:25px;text-align:center;color:#b18b52}
.adventure-button{background:linear-gradient(#ffedc1,#f2d89c);border-color:#e1c28a;border-bottom-color:#c8aa70;color:#8c7146}
.soon-badge{margin-left:auto;font-size:10px;font-weight:500;letter-spacing:.5px;background:#eee7d2;border:1px solid #e3dac2;border-radius:20px;padding:4px 8px;color:#9a8b6a}
.menu-bottom{display:flex;justify-content:space-between;gap:8px;margin-top:4px}
.quiet-button{border:0;background:transparent;display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:44px;padding:8px 2px;font-size:13px;color:#8b7b5c;border-radius:10px;touch-action:manipulation}
.quiet-button:hover{color:#667e49;background:#fff8e677}
.quiet-button svg{width:20px;height:20px}
.home-footnote{font:italic 12px/1.6 Georgia,serif;color:#a38b67;margin:18px 0 0}
.friends-caption{position:absolute;z-index:2;bottom:2.5%;left:56%;margin:0;color:#6b724e;font:italic 20px/1.4 Georgia,serif;text-shadow:0 1px 5px #fff5d5}
.friends-caption span{display:block;font:13px/1.8 'Segoe UI',sans-serif;color:#887950;text-align:center}
#app:not([data-screen=home]) .friends-caption{display:none}
.scene-links{position:absolute;top:auto;bottom:clamp(12px,2vw,28px);right:clamp(12px,2vw,30px);display:flex;gap:8px}
.small-button{background:linear-gradient(#fffcf0,#f6ebd6);border:1px solid #ddd0b4;border-bottom:3px solid #cbbb99;border-radius:14px;min-height:44px;padding:9px 16px;color:#7a7653;font-size:14px;touch-action:manipulation}
.small-button:hover{background:#fffaf0}
.page-panel{position:absolute;z-index:3;inset:0;overflow:auto;overscroll-behavior:contain;background:radial-gradient(ellipse at 90% 95%,#dce4c488,transparent 55%),linear-gradient(110deg,#fff9eefc,#faf1dcf0);scrollbar-color:#d7c8a9 #fbf3e3}
.page-panel::before{content:'✿';position:absolute;right:4%;bottom:2%;font:280px/1 Georgia,serif;color:#b5bc7b12;pointer-events:none}
.panel-shell{position:relative;width:min(920px,90%);min-height:100%;margin:auto;padding:28px 0 40px}
.back-home{display:flex;width:max-content;min-width:100px;justify-content:flex-start;font-size:15px;margin-bottom:32px}
.panel-shell h2{font:400 clamp(30px,4vw,48px)/1.2 Georgia,serif;color:#657b4f;margin:10px 0 14px;outline-offset:6px}
.panel-lead{font-size:18px;line-height:1.7;color:#9a8161;margin:0 0 26px}
.panel-note{font-size:13px;line-height:1.7;color:#9a8b71;margin-top:24px}
.adventure-list{display:grid;gap:24px;margin-top:32px}
.adventure-card{display:flex;overflow:hidden;background:linear-gradient(140deg,#fffdf5,#fff7e7);border:1px solid #e8dcc0;border-bottom:4px solid #ded0b0;border-radius:30px;box-shadow:0 12px 34px #a38b5c17}
.adventure-picture{position:relative;display:grid;place-items:center;flex:none;width:37%;min-height:295px;background:radial-gradient(circle,#fff6cc99,#e9e9cabb),url('assets/backgrounds/background.webp') 81% 25%/auto 145%;border-right:1px solid #e1d7b6}
.adventure-picture::before{content:'';position:absolute;width:170px;height:170px;border-radius:50%;background:#fff5d6b5;box-shadow:0 8px 35px #96904926;border:1px solid #fff9e2}
.adventure-picture img{position:relative;width:140px;height:140px;object-fit:contain;filter:drop-shadow(0 13px 10px #81633140)}
.adventure-copy{padding:32px;align-self:center;flex:1}
.adventure-copy .eyebrow{font-size:10px;letter-spacing:.9px}
.adventure-copy h3{font:400 32px/1.15 Georgia,serif;color:#817448;margin:10px 0 14px}
.adventure-copy p{font-size:15px;line-height:1.7;color:#998364;margin:0 0 24px}
.adventure-copy .storybook-button{width:max-content;max-width:100%;font-size:16px;justify-content:center}
.narrow-shell{max-width:650px;text-align:center}
.narrow-shell .eyebrow{margin-top:10px}
.narrow-shell>.storybook-button{width:max-content;max-width:100%;margin:28px auto 0;justify-content:center}
.coming-illustration{display:grid;place-items:center;width:120px;height:92px;border:6px solid #bdc59c;border-bottom:10px solid #acb889;border-radius:25px;color:#9ba775;background:linear-gradient(#f9f6df,#efedce);font:48px Georgia,serif;box-shadow:0 10px 24px #aeb68826;margin:30px auto}
.book-illustration{width:110px;border-color:#d4b481;border-bottom-color:#bf9e6d;color:#ba9763;transform:rotate(-5deg);border-radius:7px 24px 24px 7px}
.large-soon{display:inline-block;background:#f0e2bc;color:#a48551;border:1px solid #e4d3a9;font-size:15px;padding:6px 21px;border-radius:30px;margin:2px 0 24px}
.author-flower{display:block;font:76px/1 Georgia,serif;color:#caa16b;margin:30px 0 20px}
.author-card{padding:26px 20px 20px;margin:28px auto;background:#fffdf2b3;border:1px solid #e6d9bb;border-radius:25px;box-shadow:0 10px 30px #a38b5c12}
.author-card p{color:#9e896b;font-size:14px;margin:0 0 12px}
.author-card h3{font:400 30px/1.4 Georgia,serif;margin:0;color:#7c8056}
.author-card>span{display:block;font-size:30px;color:#c49b77;margin:15px 0 0}
.settings-shell{max-width:650px}
.settings-card{background:#fffdf5de;border:1px solid #e6dbc4;border-bottom:4px solid #dfd1b3;border-radius:25px;padding:6px 28px;box-shadow:0 10px 25px #a38b5c12;margin:24px 0}
.setting-group{padding:23px 0 17px;border-bottom:1px solid #eae1ca}
.setting-toggle{display:flex;align-items:center;justify-content:space-between;gap:22px;cursor:pointer;font-size:20px}
.setting-toggle small,.fullscreen-setting small{display:block;font-size:12px;line-height:1.6;font-weight:400;color:#a09174;margin-top:5px}
.setting-toggle input{appearance:none;flex:none;width:54px;height:32px;border:1px solid #c3b89e;border-radius:30px;background:#d9cfba;cursor:pointer;position:relative;margin:0}
.setting-toggle input::after{content:'';position:absolute;left:3px;top:3px;width:24px;height:24px;background:#fffcf1;border-radius:50%;box-shadow:0 1px 5px #6d70452b;transition:transform .2s}
.setting-toggle input:checked{background:#91a773;border-color:#829860}
.setting-toggle input:checked::after{transform:translateX(21px)}
.volume-label{display:flex;justify-content:space-between;align-items:center;font-size:13px;color:#9a896b;margin-top:20px;gap:15px}
.volume-label output{font-variant-numeric:tabular-nums;color:#7e8959}
.setting-group>input[type=range]{display:block;width:100%;min-height:36px;margin:3px 0 0;accent-color:#819958;cursor:pointer}
.fullscreen-setting{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:22px 0;font-size:18px}
.settings-shell>.storybook-button{width:max-content;max-width:100%;font-size:17px}
#app:has(.page-panel:not([hidden])) .scene-frame{visibility:hidden}
#app:has(.page-panel:not([hidden])) .orientation-hint,#app[data-screen=home] .orientation-hint{display:none}
#app:not([data-screen=apple]) #appleGame{display:none}
#app[data-screen=home] .stage:fullscreen,#app:has(.page-panel:not([hidden])) .stage:fullscreen{height:100dvh;width:100vw}
#app[data-screen=home] .stage:fullscreen .scene-frame{width:min(100vw,177.7778dvh)}
@keyframes flower-sway{0%,100%{transform:rotate(-9deg)}50%{transform:rotate(12deg)}}
@media(min-width:1500px){.home-panel{left:8%}}
@media(max-height:740px) and (min-width:701px){.home-panel{padding:14px 0;width:30%;left:5%}.home-heading h1{font-size:clamp(42px,4.7vw,68px);margin:10px 0}.home-tagline{font-size:15px;margin-bottom:14px}.main-menu{gap:7px}.storybook-button{min-height:49px;padding:8px 16px;font-size:16px;border-radius:15px}.play-button{min-height:63px;font-size:22px!important}.home-footnote{margin-top:8px;font-size:10px}.menu-bottom{margin-top:0}.friends-caption{bottom:2%}.back-home{margin-bottom:20px}}
@media(max-height:510px) and (min-width:701px){.home-panel{width:36%;left:3%;padding:10px 0}.home-eyebrow,.home-footnote{display:none}.home-heading h1{font-size:38px;letter-spacing:-1.5px;line-height:.95;margin:3px 0 6px}.home-heading h1 br{display:none}.home-heading h1>span:first-child{margin-right:7px}.title-flower{display:none}.home-tagline{font-size:12px;line-height:1.4;margin-bottom:8px}.home-tagline br{display:none}.main-menu{grid-template-columns:1fr 1fr;gap:7px}.play-button,.adventure-button,.stories-button,.menu-bottom{grid-column:1/-1}.play-button{min-height:53px;font-size:20px!important}.storybook-button{min-height:46px;font-size:13px;padding:6px 10px;border-radius:12px;gap:7px}.storybook-button svg{width:20px;height:20px}.play-button small{font-size:10px}.soon-badge{font-size:8px;padding:3px 5px}.main-menu>.storybook-button:not(.play-button):not(.adventure-button):not(.stories-button){flex-wrap:wrap;justify-content:center;gap:4px}.menu-bottom .quiet-button{min-height:40px;font-size:12px}.friends-caption{font-size:15px}.panel-shell{padding-top:12px}.back-home{margin-bottom:10px}.panel-shell h2{font-size:30px}.panel-lead{font-size:15px;margin-bottom:16px}.adventure-list{margin-top:18px}.adventure-picture{min-height:220px}.adventure-copy{padding:20px}.adventure-copy h3{font-size:27px}.coming-illustration,.author-flower{margin:12px auto}.scene-links{top:auto;bottom:9px;right:10px}.scene-links .small-button{font-size:12px;padding:8px 10px}}
@media(max-width:700px) and (orientation:portrait){
 #app[data-screen=home] .stage{background-position:63% center}
 #app[data-screen=home] .scene-frame{width:140vw;max-width:none;right:-21vw;bottom:0}
 #app[data-screen=home] .stage::after{background:linear-gradient(180deg,#fff8eafc 0%,#fff7eafa 42%,#fff7ea9c 55%,#fff7ea00 72%)}
 .home-panel{left:7%;top:0;transform:none;width:86%;max-width:none;max-height:100%;padding:20px 0 16px;overflow:auto}
 .home-heading{text-align:center}.home-eyebrow{justify-content:center;font-size:10px}.home-heading h1{font-size:52px;line-height:1;letter-spacing:-2px;margin:8px 0 10px}.home-heading h1 br{display:none}.home-heading h1>span:first-child{margin-right:10px}.title-flower{font-size:20px;margin:3px 0 0 3px}
 .home-tagline{font-size:14px;line-height:1.5;margin:0 0 17px}.home-tagline br{display:none}
 .main-menu{grid-template-columns:1fr 1fr;gap:9px}.main-menu>.play-button,.main-menu>.adventure-button,.main-menu>.stories-button,.menu-bottom{grid-column:1/-1}.play-button{min-height:65px;font-size:23px!important}.storybook-button{min-height:55px;padding:10px 13px;font-size:16px;gap:9px;border-radius:17px}.main-menu>.storybook-button:not(.play-button):not(.adventure-button):not(.stories-button){justify-content:center;gap:5px;flex-wrap:wrap;font-size:14px}.main-menu .soon-badge{font-size:9px;padding:3px 5px;margin-left:0}.main-menu svg{width:23px;height:23px}.home-footnote{display:none}.menu-bottom{margin-top:0}.menu-bottom .quiet-button{font-size:13px;min-height:44px}.friends-caption{left:50%;transform:translateX(-50%);bottom:1.5%;font-size:17px;white-space:nowrap}.friends-caption span{font-size:11px}.scene-links{top:auto;bottom:10px;right:10px;gap:6px}.scene-links .small-button{font-size:11px;padding:6px 10px;background:#fff9e8ed}
 .panel-shell{width:88%;padding:14px 0 30px}.back-home{margin-bottom:22px}.panel-shell .eyebrow{font-size:10px;letter-spacing:1px}.panel-shell h2{font-size:34px}.panel-lead{font-size:16px}.adventure-list{margin-top:24px}.adventure-card{display:block;border-radius:24px}.adventure-picture{width:100%;min-height:180px;border-right:0;border-bottom:1px solid #e1d7b6;background-size:cover;background-position:80% 15%}.adventure-picture::before{width:130px;height:130px}.adventure-picture img{width:110px;height:110px}.adventure-copy{padding:24px}.adventure-copy h3{font-size:29px}.adventure-copy .storybook-button{font-size:15px;width:100%;min-height:52px}.settings-card{padding:0 20px}.setting-toggle{font-size:19px}.setting-toggle small{font-size:11px}.fullscreen-setting{font-size:15px}.fullscreen-setting .small-button{font-size:12px;padding:8px 12px}.author-card h3{font-size:28px}
}
@media(max-width:370px) and (orientation:portrait){.home-panel{padding-top:12px}.home-heading h1{font-size:43px}.home-eyebrow{font-size:9px}.home-tagline{font-size:12px;margin-bottom:12px}.main-menu{gap:7px}.play-button{min-height:59px}.storybook-button{min-height:50px}.title-flower{display:none}.main-menu>.storybook-button:not(.play-button):not(.adventure-button):not(.stories-button){font-size:12px}.friends-caption{display:none}}
@media(prefers-reduced-motion:reduce){.title-flower{animation:none}.storybook-button{transition:none}.setting-toggle input::after{transition:none}}

/* Keep navigation away from the apples at the top of the original tree. */
@media(max-width:700px){.scene-links{gap:6px;bottom:10px;right:10px}.scene-links .small-button{font-size:11px;padding:6px 9px}.apple-hint{bottom:62px;font-size:11px;padding:6px 10px}.apple-hint img{width:20px;height:20px}}
@media(max-height:700px) and (orientation:portrait){.home-panel{padding-top:12px}.home-eyebrow{font-size:9px}.home-heading h1{font-size:clamp(30px,9vw,44px);margin:7px 0 8px;letter-spacing:-1px}.home-tagline{font-size:12px;margin-bottom:12px}.main-menu{gap:7px}.play-button{min-height:56px}.storybook-button{min-height:49px}.friends-caption{display:none}}