﻿:root{font-family:"Segoe UI",Arial,sans-serif;color:#526146;color-scheme:light;background:#344b36;--toolbar-h:86px}
*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden}body{overscroll-behavior:none}
button,input{font:inherit}button{cursor:pointer;color:inherit}button:focus-visible,input:focus-visible{outline:3px solid #ad7939;outline-offset:4px}button[hidden],[hidden]{display:none!important}
#app{height:100%;height:100dvh;display:flex;flex-direction:column;align-items:center;justify-content:center;background:radial-gradient(ellipse at 50% 35%,#65815b,#2e4332);padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}
.stage{position:relative;display:flex;flex-direction:column;width:min(100%,calc((100dvh - var(--toolbar-h) - env(safe-area-inset-top) - env(safe-area-inset-bottom))*1.77777778));isolation:isolate;border-radius:20px;box-shadow:0 18px 75px #152b3440}
.scene-frame{position:relative;width:100%;aspect-ratio:16/9;overflow:hidden;border-radius:20px 20px 0 0;background:#a3b782}
canvas{display:block;width:100%;height:100%}#world{touch-action:none;user-select:none;-webkit-user-select:none}#effects{position:absolute;inset:0;pointer-events:none}
.scene-title{position:absolute;top:clamp(12px,2vw,28px);left:clamp(12px,2vw,30px);display:flex;align-items:center;gap:11px;padding:12px 21px 13px 15px;border:1px solid #fffaeb99;border-radius:19px;background:#fff8e8eb;box-shadow:0 4px 20px #4b583319;pointer-events:none}
.scene-title h1{font-family:Georgia,"Times New Roman",serif;font-weight:400;font-size:clamp(19px,2vw,30px);letter-spacing:-.5px;margin:0}.scene-title p{margin:4px 0 0;font-size:12px;color:#8a8868;letter-spacing:.5px}.little-flower{color:#c69466;font-size:32px}
.game-bar{height:var(--toolbar-h);flex:none;display:flex;gap:30px;align-items:center;justify-content:space-between;padding:10px clamp(15px,2vw,30px);background:linear-gradient(#fff9ec,#f4ebd5);border-top:1px solid #fbf4db;border-radius:0 0 20px 20px}
.invitation{display:flex;align-items:center;gap:10px;font-size:15px;margin:0;color:#8a8265}.invitation>span{color:#c49176;font-size:30px}.game-controls{display:flex;align-items:center;justify-content:center;gap:10px}
.game-button{position:relative;border:1px solid #dddfc5;border-bottom:3px solid #d2d5b6;border-radius:18px;background:#fffcf1;min-height:59px;min-width:106px;padding:8px 14px;display:flex;align-items:center;justify-content:center;gap:8px;font-size:14px;white-space:nowrap;transition:background .18s,box-shadow .18s;box-shadow:0 2px 4px #646b3610}
.game-button:hover{background:#fffdf8;box-shadow:0 4px 12px #646b361a}.game-button:active{background:#ecefdc}.game-button[aria-pressed=true]{background:#eaf0dc;border-color:#bdcba3}.game-button svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linejoin:round;stroke-linecap:round;flex:none}
#home{color:#a37954;background:#fbf1df;border-color:#e3d2b6}#music{color:#938059}#sounds{color:#729068}
.mute-mark{position:absolute;right:10px;top:6px;background:#a88b73;width:5px;height:5px;border-radius:50%}.audio-control{position:relative}
.volume-panel{position:absolute;bottom:calc(100% + 16px);left:50%;transform:translateX(-50%);width:232px;padding:19px 20px 12px;border-radius:20px;background:#fff9ebf5;box-shadow:0 6px 28px #344a322c;border:1px solid #fffdf1;z-index:6}
.volume-panel label{font-size:14px}.volume-panel input{display:block;width:100%;margin:15px 0 10px;accent-color:#799064;min-height:30px;cursor:pointer}.volume-panel p{font-size:12px;line-height:1.5;color:#94836c;margin:5px 0}
.loading{position:absolute;inset:0;z-index:8;display:grid;place-items:center;background:#4d654933;backdrop-filter:blur(3px)}.load-card{max-width:90%;padding:26px 36px;border-radius:25px;text-align:center;background:#fff9eaf5;box-shadow:0 12px 60px #233e3220}.load-card>span{font-size:32px;color:#bc9671}.load-card h2{font:400 28px Georgia,serif;margin:10px 0}.load-card p{font-size:15px;line-height:1.5}progress{width:100%;height:7px;accent-color:#8ba674}
.notice{position:absolute;bottom:16px;left:50%;transform:translateX(-50%);padding:12px 20px;border-radius:16px;background:#fff9edf5;box-shadow:0 6px 22px #324c1f23;max-width:90%;font-size:14px;z-index:6;text-align:center}
.orientation-hint{display:none}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.sr-only:focus-within{clip-path:none;width:auto;height:auto;left:20px;bottom:20px;background:#fff9ed;padding:10px;border-radius:12px;z-index:5}
.developer{position:absolute;top:12px;right:12px;background:#fff9eef5;border:1px solid #dfd3b9;border-radius:15px;padding:15px;z-index:7;max-width:480px;max-height:85%;overflow:auto;font-size:13px}.developer h2{font-size:16px;margin:0 0 12px}.developer .controls{display:flex;flex-wrap:wrap;gap:7px}.developer button{border:1px solid #bfc8a7;background:#fffdf4;border-radius:8px;padding:9px}.developer pre{font-size:11px;white-space:pre-wrap}
dialog{border:1px solid #fff7de;border-radius:28px;background:#fff7e6;color:#626548;max-width:min(420px,90vw);padding:26px 32px;text-align:center;box-shadow:0 14px 80px #344a3240}dialog::backdrop{background:#344c3c55;backdrop-filter:blur(2px)}.dialog-flower{font-size:42px;color:#c99876}dialog h2{font:400 29px Georgia,serif;margin:10px 0 16px}dialog p{font-size:15px;line-height:1.7}.menu-later{color:#a29678;font-size:13px}.return-button{background:#819869;color:#fffdf2;border:1px solid #6c8759;border-radius:16px;padding:14px 23px;min-height:50px;margin:10px 0 0}
.stage:fullscreen{width:100vw;height:100dvh;align-items:center;justify-content:center;background:#304733;border-radius:0}.stage:fullscreen .scene-frame,.stage:fullscreen .game-bar{width:min(100%,calc((100dvh - var(--toolbar-h) - env(safe-area-inset-top) - env(safe-area-inset-bottom))*1.77777778))}
@media(max-width:1100px){.invitation{display:none}.game-bar{justify-content:center}}
@media(max-height:580px),(max-width:650px){:root{--toolbar-h:66px}.stage,.scene-frame{border-radius:0}.game-bar{border-radius:0;padding:6px 10px}.scene-title{gap:7px;padding:8px 12px;top:9px;left:10px;border-radius:12px}.scene-title h1{font-size:19px}.scene-title p{font-size:10px;margin-top:2px}.little-flower{font-size:24px}.game-controls{gap:8px}.game-button{min-height:50px;min-width:83px;font-size:12px;padding:8px 11px;border-radius:14px}.game-button svg{width:21px;height:21px}.volume-panel{width:210px;bottom:calc(100% + 10px);padding:12px 15px}.volume-panel input{margin:7px 0}.load-card{padding:12px 22px}.load-card>span{display:none}.load-card h2{font-size:23px}.load-card p{font-size:13px}.developer{max-height:90%;font-size:11px}dialog{padding:14px 24px}dialog h2{font-size:24px;margin:6px 0}dialog p{margin:8px 0}.dialog-flower{font-size:28px}}
@media(max-width:430px){.game-button{flex-direction:column;gap:4px;min-width:71px;padding:5px 8px;font-size:11px}.game-controls{gap:6px}.volume-panel{width:190px}.scene-title h1{font-size:17px}.scene-title p{display:none}}
@media(orientation:portrait) and (max-width:650px){.orientation-hint{display:block;position:absolute;bottom:max(24px,env(safe-area-inset-bottom));max-width:85%;text-align:center;color:#f4ebd5c9;font-size:13px;line-height:1.7}}
@media(prefers-reduced-motion:reduce){*{transition:none!important}}

/* Stage 5.8: independent Canvas adventure and a quiet, touch-friendly interface. */
#appleGame{position:absolute;inset:0;pointer-events:none}
.apple-progress{position:absolute;left:clamp(12px,2vw,30px);top:clamp(95px,8vw,125px);padding:13px 18px;border:1px solid #fff9e7cf;border-radius:20px;background:#fff8e8ee;box-shadow:0 4px 18px #4b58331a;pointer-events:none}
.apple-progress-label{display:flex;align-items:center;justify-content:space-between;gap:22px;font-size:15px;color:#877557}
.apple-progress-label strong{font:600 24px "Segoe UI",sans-serif;color:#697d4f;font-variant-numeric:tabular-nums}
.apple-pips{display:flex;gap:9px;margin-top:8px}
.apple-pip{width:27px;height:27px;object-fit:contain;filter:grayscale(.9);opacity:.3;transition:filter .3s,opacity .3s}
.apple-pip.filled{filter:none;opacity:1}
.apple-hint{position:absolute;left:clamp(12px,2vw,30px);bottom:clamp(12px,2vw,28px);display:flex;align-items:center;gap:12px;margin:0;padding:12px 20px;border:1px solid #fff6d6c9;border-radius:22px;background:#fff9e6eb;box-shadow:0 4px 20px #4b583319;color:#6b754e;font-size:clamp(14px,1.4vw,22px);max-width:70%;pointer-events:none}
.apple-hint img{width:32px;height:32px;object-fit:contain;flex:none}
.apple-victory{position:absolute;z-index:4;top:clamp(12px,2vw,30px);left:50%;transform:translateX(-50%);width:min(510px,90%);padding:18px 26px 20px;text-align:center;border:2px solid #ffefbb;border-radius:28px;background:linear-gradient(145deg,#fffdf1f7,#fff0d6f7);box-shadow:0 8px 38px #566b3833}
.apple-victory h2{font:400 clamp(25px,2.8vw,42px) Georgia,serif;color:#7c8850;margin:0 0 5px}
.apple-victory p{font-size:clamp(15px,1.5vw,22px);color:#8d7049;margin:0 0 13px}
.apple-replay{display:inline-flex;align-items:center;justify-content:center;gap:12px;min-height:56px;min-width:190px;padding:10px 24px;font-size:19px;color:#fffdf0;background:linear-gradient(#93aa70,#718e53);border:1px solid #65814b;border-bottom:4px solid #58743d;border-radius:19px;box-shadow:0 3px 8px #70844724;touch-action:manipulation}
.apple-replay:hover{background:linear-gradient(#a1b77e,#7a985b)}
.apple-replay:active{border-bottom-width:2px;transform:translateY(2px)}
.apple-replay svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
@media(max-height:580px),(max-width:650px){
 .apple-progress{top:69px;padding:8px 12px;border-radius:14px}
 .apple-progress-label{font-size:12px;gap:15px}.apple-progress-label strong{font-size:19px}
 .apple-pips{gap:5px;margin-top:4px}.apple-pip{width:20px;height:20px}
 .apple-hint{padding:7px 12px;gap:7px;font-size:13px;bottom:8px;border-radius:15px}
 .apple-hint img{width:23px;height:23px}
 .apple-victory{width:min(370px,90%);padding:12px 20px;border-radius:22px}
 .apple-victory h2{font-size:27px}.apple-victory p{font-size:16px;margin-bottom:10px}
 .apple-replay{min-height:50px;font-size:17px}
 .scene-frame:has(.apple-victory:not([hidden])) .scene-title,
 .scene-frame:has(.apple-victory:not([hidden])) .apple-progress{visibility:hidden}
}
@media(max-width:430px){
 .apple-progress{top:55px;padding:6px 10px}.apple-progress-label{font-size:11px}
 .apple-pips{gap:3px}.apple-pip{width:18px;height:18px}
 .apple-hint{font-size:11px;max-width:70%;padding:5px 9px;gap:5px}
 .apple-hint img{width:20px;height:20px}
 .apple-victory{top:8px;padding:9px 15px}.apple-victory h2{font-size:23px}
 .apple-victory p{font-size:14px;margin-bottom:7px}.apple-replay{min-height:46px;font-size:15px;padding:7px 16px}
}
