:root{--ink:#3c4934;--muted:#7d816b;--paper:#f6efdd;--teal:#4ce8cc;--green:#405a3f;--gold:#bb8a38;font-family:"PingFang SC","Microsoft YaHei",sans-serif;color:var(--ink);background:#e4ddc9;font-synthesis:none}*{box-sizing:border-box}body{margin:0;min-height:100svh;display:grid;place-items:center;overscroll-behavior:none}button{font:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent}button:focus-visible{outline:3px solid #17856f;outline-offset:4px}button[hidden],[hidden]{display:none!important}.game-shell{width:min(100%,460px);height:100svh;max-height:960px;min-height:420px;position:relative;overflow:hidden;background:var(--paper);isolation:isolate;box-shadow:0 0 80px #34402e22}canvas{display:block;width:100%;height:100%;touch-action:none}.paper-grain{position:absolute;inset:0;pointer-events:none;z-index:3;opacity:.075;background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.65'/%3E%3C/svg%3E");mix-blend-mode:multiply}.screen{position:absolute;inset:0;z-index:4;text-align:center;padding:calc(env(safe-area-inset-top) + 30px) 28px calc(env(safe-area-inset-bottom) + 20px);display:flex;align-items:center;flex-direction:column}.edition{font:10px/1.5 Georgia,serif;letter-spacing:2.1px;display:flex;align-items:center;justify-content:center;gap:13px;color:#697459}.leaf-mark{font-size:27px;line-height:1}.flip{transform:scaleX(-1)}.home-copy{margin-top:clamp(38px,8vh,82px);width:100%}.eyebrow{font-size:10px;font-weight:500;letter-spacing:2px;line-height:1.8;margin:0;color:var(--muted)}h1{font:normal clamp(66px,18vw,89px)/.98 Georgia,"Times New Roman",serif;letter-spacing:-5px;margin:16px 0 27px;position:relative;color:#3b513d}h1 em{font-weight:normal}h1 .title-swish{display:block;position:absolute;left:35%;bottom:-10px;width:43%;height:12px;border-bottom:2px solid #b18d48;border-radius:0 0 50% 70%;transform:rotate(-6deg)}.intro{font-size:13px;line-height:2.1;letter-spacing:1px;color:#73775f}.home-actions{margin-top:auto;margin-bottom:16px;width:100%}.button{min-height:53px;border:1px solid #304d36;border-radius:6px 13px 7px 11px;padding:14px 21px;letter-spacing:1px;font-size:14px;width:100%;box-shadow:0 4px 0 #2f482c15;display:flex;justify-content:space-between;align-items:center}.primary{background:#405a3f;color:#fff9e9}.primary:hover{background:#334d35}.primary:active{transform:translateY(2px);box-shadow:0 2px 0 #2f482c15}.button span{font-size:21px}.text-button{background:none;border:0;color:#6f765d;text-decoration:underline;text-underline-offset:5px;font-size:12px;line-height:1.8;padding:12px}.prototype-note{font-size:10px;letter-spacing:2px;margin:17px 0;color:#78816d}footer{font-size:10px;letter-spacing:1px;color:#78816d}.hud{position:absolute;top:0;left:0;right:0;padding:calc(env(safe-area-inset-top) + 17px) 24px 25px;z-index:5;background:linear-gradient(#f6efddf8 55%,#f6efdd00);pointer-events:none}.hud-row,.status-row{display:flex;justify-content:space-between;align-items:center}.chapter .eyebrow{font:9px Georgia,serif;letter-spacing:2px}.chapter strong{display:block;font-size:17px;font-weight:500;letter-spacing:2px;margin-top:7px}.icon-button{pointer-events:auto;width:37px;height:37px;border:1px solid #b7bea1;background:#f9f1dfd9;border-radius:50%;color:#4d6347;font-size:16px}.status-row{margin-top:16px;font-size:10px;color:#6f775f;letter-spacing:1px}.leaves{display:flex;gap:7px;height:15px;align-items:center}.life-leaf{width:15px;height:9px;border-radius:2px 12px 2px 12px;background:#66805a;transform:rotate(-20deg);border:1px solid #546e48}.life-leaf.used{background:transparent;border-color:#b8bea7}.progress-track{margin-top:12px;height:3px;background:#5c79511f;position:relative;max-width:100%}#progress{height:100%;width:0;background:#79946c;transition:width .1s linear}.progress-dot{position:absolute;right:-1px;top:-3px;width:8px;height:8px;transform:rotate(45deg);border:1px solid #839475;background:#f6efdd}.guide{position:absolute;left:24px;right:24px;bottom:calc(env(safe-area-inset-bottom) + 78px);z-index:6;display:flex;gap:11px;align-items:center;padding:14px;background:#fbf5e7f0;border:1px solid #bac4a7;border-radius:6px 12px 8px 13px;box-shadow:0 5px 20px #4c593217;pointer-events:auto}.guide p{font-size:12px;line-height:1.8;margin:0}.guide b{font-weight:500;letter-spacing:1px}.guide span:not(.gesture){font-size:9px;color:#7b806c}.gesture{color:#3c927d;font-size:32px}.guide button{border:0;background:none;color:#5c7756;font-size:10px;margin-left:auto;white-space:nowrap;padding:8px}.bottom-hint{position:absolute;bottom:0;left:0;right:0;z-index:5;background:linear-gradient(#f6efdd00,#f6efdded 48%);display:flex;justify-content:space-between;align-items:center;padding:28px 23px calc(env(safe-area-inset-bottom) + 17px);font-size:10px;color:#65725b;letter-spacing:.5px;pointer-events:none}.bottom-hint button{border:0;background:none;font-size:10px;color:#537058;text-decoration:underline;text-underline-offset:4px;pointer-events:auto}.toast{position:absolute;z-index:8;top:27%;left:50%;transform:translate(-50%,-8px);opacity:0;transition:opacity .25s,transform .25s;background:#fbf5e7f4;border:1px solid #bec8a9;border-radius:4px 12px 5px 10px;box-shadow:0 3px 14px #354d2220;padding:11px 18px;white-space:nowrap;pointer-events:none;font-size:12px;max-width:95%}.toast.show{opacity:1;transform:translate(-50%,0)}.wind-label{position:absolute;right:18px;top:29%;z-index:5;color:#64816c;font-size:10px;padding:7px 12px;border-radius:20px;background:#f6efddcc;pointer-events:none}.wind-label span{font-size:17px;margin-left:9px}.modal{position:absolute;inset:0;z-index:10;background:#344b3466;backdrop-filter:blur(4px);display:grid;place-items:center;padding:27px}.modal-card{width:100%;background:#fbf4e3;border:1px solid #d5c6a0;border-radius:7px 22px 11px 18px;text-align:center;padding:24px 25px 28px;box-shadow:0 15px 50px #20372330}.modal-flourish{color:#9caa7b;font-size:36px}.modal h2{font-size:24px;font-weight:500;letter-spacing:2px;margin:10px 0 14px}.modal p:not(.eyebrow){font-size:12px;line-height:1.9;color:#7b7e69}.modal .button{margin-top:14px}.modal .secondary{background:none;color:#526449;border-color:#b5c0a2;box-shadow:none}.modal .text-button{display:block;margin:8px auto 0}.finish{background:linear-gradient(#f4eedbd9,#f4eedbf5);justify-content:space-between}.finish-card{width:100%;max-height:calc(100% - 70px);overflow:auto}.finish h2{font:normal 36px/1.45 Georgia,"PingFang SC",serif;letter-spacing:3px;margin:14px 0;color:#476045}.finish p:not(.eyebrow):not(.edition){font-size:12px;color:#6f795f;line-height:1.9}.stats{display:flex;justify-content:center;gap:20px;padding:17px 0;margin:17px 0;border-top:1px solid #c9cdb4;border-bottom:1px solid #c9cdb4}.stat b{font:24px Georgia,serif;color:#57724c}.stat small{display:block;font-size:9px;color:#81856e;margin-top:6px}.audio-placeholder{display:flex;text-align:left;gap:13px;align-items:center;border:1px dashed #aebd98;border-radius:5px 12px 7px 10px;padding:15px}.audio-placeholder>span{font-size:26px;color:#74946a}.audio-placeholder b{font-size:12px;font-weight:500;display:block;margin-bottom:5px}.audio-placeholder small{font-size:10px;color:#8b8c76}.finish .finish-note{font-size:10px!important;margin:18px 0 23px}.finish .button{margin-top:6px}@media(min-width:600px){body{padding:22px}.game-shell{height:min(880px,calc(100svh - 44px));border-radius:15px;border:1px solid #d5ccb7}}@media(max-height:650px){.home-copy{margin-top:25px}h1{font-size:65px;margin-top:10px}.intro{font-size:12px}.edition{font-size:8px}.finish h2{font-size:27px;margin:7px 0}.stats{padding:9px 0;margin:9px 0}.audio-placeholder{padding:10px}.finish .finish-note{margin:10px 0!important}}
/* Approved forest art direction: paper labels, wood controls, painted leaves. */
:root{--ink:#583c22;--muted:#76613e;--green:#526838;background:#536044}
.game-shell{background:#d4cd93;box-shadow:0 16px 80px #24371e55}
.paper-grain{opacity:.025}
.hud{padding:calc(env(safe-area-inset-top) + 15px) 18px 16px;background:none}
.chapter{display:flex;align-items:flex-start;flex-direction:column;filter:drop-shadow(0 2px 2px #35230f28)}
.chapter .eyebrow,.chapter strong{background:#f4deaa;clip-path:polygon(2% 5%,10% 2%,20% 4%,32% 0,48% 3%,65% 1%,79% 4%,95% 2%,99% 13%,98% 35%,100% 58%,98% 76%,99% 93%,86% 98%,69% 96%,55% 99%,36% 97%,21% 100%,7% 96%,1% 99%,2% 78%,0 56%,2% 34%,0 16%)}
.chapter .eyebrow{font:27px/1.2 Georgia,serif;letter-spacing:-.5px;color:#55351b;padding:9px 20px 10px}
.chapter .eyebrow::before,.chapter .eyebrow::after{content:'❧';font-size:18px;padding:0 7px;color:#77613b}
.chapter strong{font:13px/1.5 'Songti SC','STSong',serif;letter-spacing:2px;margin:1px 0 0 15px;padding:6px 15px;color:#583c22}
.icon-button,#help-inline{width:43px;height:43px;min-width:43px;border:3px solid #916334;background:repeating-radial-gradient(ellipse at 45% 40%,#d29e5d 0 5px,#cc9655 6px 7px,#dba96a 8px 12px);box-shadow:0 3px 0 #59402055,inset 0 0 0 1px #edc48d;border-radius:49% 46% 48% 47%;color:#5c361e;font:23px/1 Georgia,serif;text-decoration:none}
.hud-row{align-items:flex-start}.icon-button{margin-top:2px}
.status-row{margin:10px 4px 0;align-items:center}
.leaves{height:26px;gap:6px}.life-leaf{width:20px;height:25px;position:relative;border-radius:75% 3% 70% 5%;background:#8ca340;border:1.5px solid #f5e6b0;box-shadow:1px 2px 1px #3f432b40;transform:rotate(14deg)}
.life-leaf::after{content:'';position:absolute;left:9px;top:3px;width:1px;height:19px;background:#526b34;transform:rotate(27deg)}
.life-leaf.used{opacity:.36;background:#9b9b68;border-color:#ddd5a3}
#seed-count{background:#f8eac9e8;padding:5px 8px;border-radius:3px 7px 3px 8px;font-size:9px;color:#69512c;box-shadow:0 1px 3px #4f41252b}
.progress-track{height:2px;max-width:110px;margin:10px 0 0 5px;background:#f5e2b5ab}#progress{background:#586d35}.progress-dot{width:6px;height:6px;top:-2px;background:#f5e2b5;border-color:#697947}
.bottom-hint{background:none;padding:15px 18px calc(env(safe-area-inset-bottom) + 15px);gap:8px}
#hint-copy{display:block;max-width:calc(100% - 54px);background:#f4deaaeF;padding:10px 15px;clip-path:polygon(2% 0,24% 3%,45% 0,76% 3%,97% 0,100% 14%,98% 50%,100% 85%,97% 100%,70% 97%,45% 100%,20% 97%,1% 100%,0 80%,2% 55%,0 15%);font:13px/1.6 'Songti SC','STSong',serif;color:#5a3b20;letter-spacing:1px}
.bottom-hint button{font-size:25px;pointer-events:auto}
.guide{bottom:calc(env(safe-area-inset-bottom) + 78px);background:#fcf0d9f5;border-color:#c49c59;color:#5e4a2e;box-shadow:0 4px 18px #4f3a2033}.guide span:not(.gesture){color:#796848}.guide button{color:#65542d}.gesture{color:#498c6e}
.home .edition,.home-copy,.home footer{background:#f8ecd1d9;padding:6px 12px;border-radius:2px 6px 3px 7px}.home-copy{padding:15px 10px 20px;box-shadow:0 4px 25px #4d42251c}.home h1{color:#553c24}.home .intro{color:#71613f}.home .eyebrow{color:#7a6949}.home .prototype-note{color:#58492c;background:#f4e7c5db;display:table;margin:14px auto}.home footer{font-size:10px}.home .text-button{color:#493b23;background:#f7e7c6ed;margin-top:7px;border-radius:4px}.button.primary{background:#526638;border-color:#4c582e;color:#fff2d5;box-shadow:0 4px 0 #343f2744}.button.primary:hover{background:#465c31}.home-actions{margin-bottom:10px}
.modal-card{background:#fbefd5;border-color:#bd9a5d;box-shadow:0 15px 50px #30251150}.modal{background:#283b2866}.toast{background:#fff0ceeF;border-color:#b9a268;color:#654b2c}.finish{background:#f6ecd9ed}.finish h2{color:#5e5731}
@media(max-height:650px){.chapter .eyebrow{font-size:23px;padding:7px 11px}.chapter strong{padding:4px 11px;font-size:11px}.status-row{margin-top:6px}.hud{padding-top:calc(env(safe-area-inset-top) + 10px)}.home-copy{margin-top:16px;padding:5px 7px 10px}.home h1{margin:8px 0 15px}.home .intro{margin:8px 0}.screen{padding-top:calc(env(safe-area-inset-top) + 18px)}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}.toast{transition:none}}
/* Level two wind cue stays beneath the title/health HUD. */
.wind-label{left:50%;right:auto;top:calc(env(safe-area-inset-top) + 167px);transform:translateX(-50%);min-width:164px;padding:9px 15px 8px;background:#f5dfb4ed;border:1px solid #d0ab6d;border-radius:4px 9px 3px 8px;color:#644825;text-align:center;box-shadow:0 2px 8px #65461920}
.wind-label span{font:13px/1.5 'Songti SC','STSong',serif;margin:0;letter-spacing:1px}.wind-track{height:2px;background:#9a824331;margin-top:6px}.wind-track>div{height:100%;background:#b08a41}.wind-label[data-phase='gust']{background:#f9e8baed;border-color:#ba8d39}.wind-label[data-phase='gust'] .wind-track>div{background:#6e8745}.wind-label[data-phase='rest'] .wind-track{display:none}.wind-label[data-phase='calm']{background:#f0e8c9ed}
.home-actions #try-level2{display:table;margin:8px auto 0;background:#f6e7c6f2;padding:8px 12px;border-radius:3px 7px 4px 8px}.finish #next-level{margin-bottom:9px}.finish #next-level:not([hidden])~#replay{background:transparent;color:#526449;border-color:#a5ac7b;box-shadow:none;min-height:43px}
@media(max-height:650px){.wind-label{top:calc(env(safe-area-inset-top) + 143px);padding:7px 12px 6px;min-width:150px}.wind-label span{font-size:12px}.home-actions #try-level2{font-size:11px;padding:6px 10px}.home .prototype-note{margin:8px auto}.finish .finish-note{font-size:10px!important}}
.quick-levels{display:flex;justify-content:center;gap:8px;margin-top:8px}.home-actions .quick-levels #try-level2,.home-actions .quick-levels #try-level3{display:block;flex:1;margin:0;text-decoration:none;background:#f6e7c6f2;border:1px solid #ab975c66;padding:8px 5px;border-radius:3px 7px 4px 8px;font-size:12px;color:#5a4929}
.wind-label[data-phase='gate-open']{background:#f1edc9ed;border-color:#839a51}.wind-label[data-phase='gate-open'] .wind-track>div{background:#6d8c42}.wind-label[data-phase='gate-warning'],.wind-label[data-phase='gate-closing']{background:#f7dfaded;border-color:#b78a44}.wind-label[data-phase='gate-warning'] .wind-track>div{background:#bb8640}
@media(max-height:650px){.home-actions .quick-levels #try-level2,.home-actions .quick-levels #try-level3{font-size:11px;padding:6px 4px}}

/* Wish-tree and ribbon editor: real controls over the approved painted plates. */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.game-shell.wish-open{height:var(--wish-vh,100dvh);min-height:0}
#wish-root{position:absolute;inset:0;z-index:7;font-family:'Songti SC','STSong','SimSun',serif;color:#4d371d;background:#f8efcd}
.wish-view{position:absolute;inset:0;overflow:hidden;background-size:cover;background-position:center}
.wish-tree-plate{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:cover;pointer-events:none}
.tree-top{position:absolute;top:calc(env(safe-area-inset-top) + 16px);left:18px;right:18px;display:flex;justify-content:space-between;align-items:flex-start;z-index:2}
.tree-brand{text-align:center;filter:drop-shadow(0 2px 2px #6d4a2433)}
.tree-brand h1,.tree-brand p,.paper-button{background-color:#f9dfa8;background-image:radial-gradient(ellipse at 18% 15%,#fff5d780,transparent 50%),repeating-linear-gradient(18deg,#e4bc7022 0 1px,transparent 1px 7px);clip-path:polygon(3% 3%,14% 1%,31% 3%,50% 0,68% 3%,84% 1%,97% 4%,100% 17%,98% 41%,100% 62%,98% 83%,97% 96%,84% 99%,61% 97%,40% 100%,21% 98%,5% 100%,1% 88%,2% 65%,0 43%,2% 17%)}
.tree-brand h1{font:normal 28px/1.1 Georgia,serif;letter-spacing:-1px;margin:0;padding:9px 20px 11px;color:#52341a}
.tree-brand h1::before,.tree-brand h1::after{content:'❧';font-size:16px;display:inline-block;margin:0 8px;color:#74502c}
.tree-brand p{display:table;font-size:14px;letter-spacing:3px;margin:2px auto 0;padding:4px 22px 6px}
.tree-top .icon-button:disabled{opacity:.8;cursor:default;filter:saturate(.8)}
.tree-arrival{position:absolute;top:calc(env(safe-area-inset-top) + 102px);left:0;right:0;font-size:16px;text-align:center;letter-spacing:1px;margin:0;text-shadow:0 1px 8px #fff8cf,0 0 8px #fff8cf}
.tree-actions{position:absolute;bottom:calc(env(safe-area-inset-bottom) + 14px);left:8%;right:8%;display:flex;flex-direction:column;align-items:center;gap:7px;text-align:center}
.paper-button{min-height:46px;border:0;color:#52361d;font-family:inherit;font-size:14px;padding:10px 12px;filter:drop-shadow(0 2px 1px #68421e44)}
.paper-button:hover{background-color:#ffe7b2}.paper-button:focus-visible{clip-path:none;border-radius:8px;outline-offset:1px}
.tree-write{width:100%;font-size:20px;min-height:57px;letter-spacing:1px}
.tree-secondary{display:flex;gap:13px;width:100%}.tree-secondary button{flex:1;padding:9px 3px;font-size:14px}
.wish-demo-note{font:11px/1.6 'PingFang SC','Microsoft YaHei',sans-serif;color:#776749;margin:5px 0;overflow-wrap:anywhere}
.tree-actions .wish-demo-note{font-size:10px;color:#514727;background:#fbefcccE;padding:3px 8px;border-radius:3px;margin:0}
.tree-home.text-button{font-size:10px;color:#4c4225;padding:4px 9px;background:#fbefcccE;border-radius:4px}
.tree-actions footer{color:#fff5d4;text-shadow:0 1px 3px #3b391f;font-size:10px;margin-top:0}
.my-tree-ribbons{position:absolute;inset:0;pointer-events:none}
.my-wish-ribbon{position:absolute;width:25px;height:87px;padding:8px 0 22px;border:0;border-radius:1px;background:#4ce8cc;box-shadow:2px 2px 3px #356f4633;clip-path:polygon(0 0,50% 7%,100% 0,97% 100%,50% 89%,2% 100%);transform-origin:50% 0;transform:rotate(var(--ribbon-tilt));pointer-events:auto;animation:my-ribbon-sway 5s ease-in-out infinite alternate;color:#246a55;font:11px/1.3 'Songti SC',serif}
.my-wish-ribbon span{writing-mode:vertical-rl;letter-spacing:3px}.my-wish-ribbon:focus-visible{clip-path:none;outline-offset:2px}
.wish-header{height:calc(env(safe-area-inset-top) + 76px);padding:calc(env(safe-area-inset-top) + 15px) 18px 12px;display:flex;align-items:center;gap:10px;flex:none}
.wish-header .icon-button{width:40px;height:40px;min-width:40px;font-size:35px;line-height:30px}
.wish-header h2{font-weight:600;font-size:25px;letter-spacing:3px;line-height:1.4;text-align:center;margin:0 42px 0 0;flex:1;color:#463215;text-shadow:0 0 10px #fff9dc}
.wish-header h2:focus,.tree-brand h1:focus{outline:none}
.wish-editor{display:flex;flex-direction:column}
#wish-form{display:flex;flex-direction:column;flex:1;min-height:0}
.editor-scroll{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scroll-padding:20px;-webkit-overflow-scrolling:touch}
.writing-ribbon{width:75%;min-height:100%;margin:0 auto;background:#4ce8cc;clip-path:polygon(5% 0,50% 8%,95% 0,100% 100%,0 100%);padding:96px 28px 49px;display:flex;flex-direction:column;position:relative;isolation:isolate}
.writing-ribbon::before,.receipt-ribbon::before{content:'';position:absolute;inset:0;z-index:-1;pointer-events:none;opacity:.1;background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.12' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");mix-blend-mode:multiply}
.writing-ribbon textarea,.writing-ribbon input{display:block;width:100%;background:transparent;border:0;border-radius:0;color:#155f50;font:19px/1.65 'Songti SC','STSong','SimSun',serif;box-shadow:none;-webkit-appearance:none;}
.writing-ribbon textarea{flex:1;min-height:160px;resize:none;padding:0;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere}
.writing-ribbon textarea::placeholder{color:#247f6e;opacity:1;font-weight:600}
.writing-ribbon textarea:focus{outline:0}
.writing-ribbon textarea[aria-invalid='true']{outline:1px dashed #8b4c30;outline-offset:8px}
.signature-field{margin-top:42px;flex:none}
.signature-field label{display:block;color:#216d5c;font-size:18px;letter-spacing:2px}
.signature-field input{border-bottom:1px solid #247965;height:38px;padding:1px 3px;font-size:18px}
.signature-field input:focus{outline:0;border-bottom:2px solid #145d4b}
.editor-footer{position:relative;flex:none;background:#fff1ceeb;padding:8px 19% calc(env(safe-area-inset-bottom) + 16px);box-shadow:0 -4px 14px #fff3d16e}
.editor-footer::before{content:'';position:absolute;top:-3px;left:0;right:0;height:5px;background:#fff1ce;clip-path:polygon(0 60%,8% 35%,16% 60%,29% 30%,39% 70%,54% 35%,69% 70%,86% 40%,100% 65%,100% 100%,0 100%)}
.wish-permissions{border:0;padding:0;margin:0;min-width:0}
#wish-choice-help{font-size:11px;line-height:1.6;margin:0 0 4px;color:#665531;white-space:normal}
.wish-check{display:flex;align-items:center;gap:10px;padding:7px 0;cursor:pointer;font-size:15px;line-height:1.5;white-space:nowrap}
.wish-check input{appearance:none;-webkit-appearance:none;width:19px;height:19px;flex:none;border:2px solid #56602b;border-radius:2px;margin:0;background:#fff9e0;display:grid;place-items:center;cursor:pointer}
.wish-check input:checked{background:#526638;border-color:#526638}
.wish-check input:checked::after{content:'';width:9px;height:5px;border-left:2px solid #fff9df;border-bottom:2px solid #fff9df;transform:translateY(-1px) rotate(-45deg)}
.wish-check input:focus-visible{outline:2px solid #17856f;outline-offset:3px}
.wish-review-note{font-size:10px;line-height:1.6;color:#8a7954;margin:1px 0 0}
.editor-footer .wish-demo-note{font-size:9px;margin:4px 0 6px}
.hang-button{font:22px/1.3 'Songti SC','STSong',serif;justify-content:center;min-height:48px;border-radius:10px 15px 12px 9px;letter-spacing:2px;padding:9px 8px}
.hang-button:disabled{opacity:.7;cursor:wait}
.wish-error{font:12px/1.6 'PingFang SC',sans-serif;color:#8a3d26;margin:5px 0;overflow-wrap:anywhere}
.wish-paper-card{background:#fff3d9ed;border:1px solid #cfb67e;border-radius:5px 17px 7px 14px;box-shadow:0 8px 24px #69522820;padding:22px;text-align:center;margin:16px 24px;color:#655032}
.empty-wishes{margin-top:8vh}.empty-leaf{font-size:43px;color:#8b9657}.wish-paper-card h3{font-size:22px;font-weight:500;letter-spacing:1px}.wish-paper-card p{font-size:14px;line-height:1.9}.empty-wishes .button{margin-top:24px;justify-content:center}.wish-paper-card .text-button{color:#6b6d3c}
.wish-browse,.wish-lookup{overflow:auto;overscroll-behavior:contain;padding-bottom:20px}
.lookup-card{margin-top:30px}.lookup-card label,.receipt-details label{display:block;text-align:left;font-size:13px;margin:15px 0 8px}
#wish-code,#receipt-code{display:block;width:100%;font:13px/1.8 ui-monospace,Menlo,monospace;padding:10px 8px;border:1px solid #adac76;border-radius:4px;background:#fff9e9;color:#515b37;min-width:0}
#wish-code:focus,#receipt-code:focus{outline:2px solid #509984;outline-offset:2px}.lookup-card .button{justify-content:center;margin-top:20px}.lookup-card .wish-demo-note{font-size:10px}
.local-wish-list{border-top:1px solid #d5c6a1;margin-top:20px;padding-top:8px}.local-wish-list:empty{display:none}.local-wish-list>p{font-size:11px}.local-wish-link{width:100%;border:0;border-bottom:1px solid #d6c9a9;background:none;color:#56633a;text-align:left;padding:13px 1px}.local-wish-link span{display:block;font-size:13px;overflow-wrap:anywhere}.local-wish-link small{font:10px/1.5 ui-monospace,monospace;display:block;overflow-wrap:anywhere;margin-top:4px}
.wish-receipt{display:flex;flex-direction:column}.receipt-scroll{flex:1;min-height:0;overflow:auto;padding-bottom:24px;overscroll-behavior:contain}.receipt-ribbon{background:#4ce8cc;position:relative;isolation:isolate;width:76%;margin:0 auto;clip-path:polygon(2% 0,50% 25px,98% 0,100% 100%,50% calc(100% - 25px),0 100%);padding:58px 28px 64px;color:#1f6856;min-height:220px;overflow-wrap:anywhere;white-space:pre-wrap}.receipt-kicker{font-size:11px;letter-spacing:2px;color:#2e806b;margin:0 0 22px}#receipt-message{font-size:19px;line-height:1.9;margin:0}#receipt-name{text-align:right;font-size:13px;margin-top:20px}.receipt-details{margin-top:16px;padding:17px}.receipt-details p{font-size:12px}.receipt-details .receipt-local-label{font-size:12px;color:#56713e}.receipt-details .wish-demo-note{font-size:10px}.receipt-details .button{justify-content:center;margin-top:17px}.receipt-details .text-button{padding:9px}#receipt-consent{text-align:left;white-space:pre-line;color:#6d7246;font-size:11px;line-height:1.8}
.wish-hanging{position:absolute;inset:0;background:#fff1c84a;z-index:10;display:flex;align-items:center;justify-content:center;flex-direction:column;pointer-events:auto}.wish-hanging p{margin-top:130px;background:#fff1d5ed;border-radius:6px;padding:9px 14px;color:#52613b;font-size:15px}.flying-ribbon{position:absolute;left:45%;top:44%;width:32px;height:150px;background:#4ce8cc;clip-path:polygon(0 0,50% 8%,100% 0,98% 100%,50% 91%,2% 100%);animation:hang-ribbon 1.5s ease-in-out both}
@keyframes hang-ribbon{from{transform:translate(0,180px) rotate(12deg) scale(2);opacity:.3}50%{opacity:1}to{transform:translate(-10px,-55px) rotate(-4deg) scale(.55);opacity:1}}
@keyframes my-ribbon-sway{to{transform:rotate(calc(var(--ribbon-tilt) + 4deg))}}
@media(min-width:600px){.game-shell.wish-open{height:min(880px,calc(var(--wish-vh,100dvh) - 44px))}}
@media(max-width:370px){.editor-footer{padding-left:15%;padding-right:15%}.writing-ribbon{padding-left:22px;padding-right:22px}.wish-check{font-size:14px;gap:8px}.wish-header h2{font-size:23px;letter-spacing:2px}.tree-write{font-size:18px}.tree-secondary button{font-size:12px}}
@media(max-height:650px){.wish-header{height:calc(env(safe-area-inset-top) + 62px);padding-top:calc(env(safe-area-inset-top) + 9px);padding-bottom:7px}.wish-header h2{font-size:22px}.writing-ribbon{padding-top:78px;padding-bottom:34px}.signature-field{margin-top:25px}.tree-top{top:12px}.tree-brand h1{font-size:24px;padding:7px 12px}.tree-brand p{font-size:12px;padding:3px 17px}.tree-arrival{top:92px;font-size:14px}.tree-actions{gap:4px;bottom:8px}.tree-write{min-height:49px}.tree-secondary .paper-button{min-height:40px}.tree-home.text-button{padding:1px 8px}.tree-actions footer{font-size:9px}.editor-footer{padding-top:6px;padding-bottom:calc(env(safe-area-inset-bottom) + 10px)}.wish-check{padding:5px 0}.empty-wishes{margin-top:8px}.lookup-card{margin-top:12px}}
.keyboard-open .wish-header{height:55px;padding-top:7px;padding-bottom:7px}.keyboard-open .wish-header h2{font-size:21px}.keyboard-open .writing-ribbon{padding-top:65px;padding-bottom:30px}.keyboard-open .editor-footer{padding-top:5px;padding-bottom:8px}.keyboard-open .wish-check{padding:4px 0}.keyboard-open .hang-button{min-height:42px;font-size:20px}.keyboard-open .signature-field{margin-top:22px}
@media(prefers-reduced-motion:reduce){.my-wish-ribbon,.flying-ribbon{animation:none}.flying-ribbon{transform:translateY(-55px) scale(.55)}}

/* v8: retain the approved artwork's full composition and illustrated lettering. */
.wish-tree{background-position:center;background-size:cover}
.wish-tree::before{content:'';position:absolute;inset:0;background:#f5efca9c;backdrop-filter:blur(15px)}
.tree-full-scene{position:absolute;z-index:1;isolation:isolate;box-shadow:0 5px 30px #66642b16}
.tree-full-scene .wish-tree-plate{object-fit:fill;inset:0;width:100%;height:100%;user-select:none}
.art-hit{position:absolute;z-index:3;border:0;background:transparent;border-radius:10px;color:transparent;padding:0}
.art-hit:hover{background:#fffce715}.art-hit:focus-visible{outline:2px solid #246f59;outline-offset:1px;background:#fffce718}
#tree-explore{left:1%;top:14.5%;width:98%;height:66.5%;z-index:1;cursor:zoom-in}
#tree-music{left:86.6%;top:2.0%;width:10%;height:5.3%;cursor:default}
#write-wish.art-hit{left:16.4%;top:82.1%;width:67.2%;height:6.0%}
#browse-wishes.art-hit{left:17.2%;top:89.3%;width:32.4%;height:4.6%}
#find-wish.art-hit{left:54%;top:89.3%;width:29.5%;height:4.6%}
.tree-demo-tools{position:absolute;z-index:4;left:0;right:0;bottom:0;height:35px;display:flex;align-items:center;justify-content:center;gap:16px;background:#fbefcfeb;border-top:1px solid #d2bf8b70}
.tree-demo-tools .wish-demo-note{font-size:10px;margin:0;color:#716241}.tree-demo-tools .text-button{padding:5px;font-size:10px;color:#655733}
.full-tied-ribbon.my-wish-ribbon{clip-path:none;background:transparent;border-radius:0;box-shadow:none;padding:0;width:6%;height:13%;z-index:2;min-width:0;transform-origin:50% 13%;animation:none;pointer-events:auto}
.full-tied-ribbon svg{display:block;width:100%;height:100%;overflow:visible;filter:drop-shadow(1px 1px 1px #36704825)}
.wish-browse{display:flex;flex-direction:column;padding:0;overflow:hidden;background-color:#f8efce}
.wish-browse .wish-header{background:#faf1d5d9;z-index:2}.branch-demo-label{position:relative;z-index:2;flex:none;font:10px/1.5 'PingFang SC',sans-serif;color:#74623f;padding:0 12px 8px;text-align:center;margin:0;background:#faf1d5d9}
.branch-viewport{flex:1;min-height:0;position:relative;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;touch-action:pan-x;cursor:grab;scrollbar-width:none;background:#e6dc9d;-webkit-overflow-scrolling:touch}
.branch-viewport::-webkit-scrollbar{display:none}.branch-viewport:active{cursor:grabbing}.branch-viewport:focus-visible{outline:2px inset #5a987b;outline-offset:-2px}
.branch-world{position:relative;height:100%;min-width:300%;overflow:visible;user-select:none}
.branch-plate{position:absolute;inset:0;width:100%;height:100%;object-fit:fill;pointer-events:none;user-select:none}
#branch-ribbons{position:absolute;inset:0;pointer-events:none}
.branch-wish{position:absolute;transform:translateX(-50%);display:block;padding:0;border:0;background:transparent;pointer-events:auto;cursor:pointer;isolation:isolate;-webkit-tap-highlight-color:transparent;transition:filter .15s}
.branch-wish>svg{display:block;width:100%;height:100%;overflow:visible;filter:drop-shadow(2px 3px 2px #365f3d26)}
.branch-wish:hover{filter:brightness(1.05)}.branch-wish:focus-visible{outline:2px dashed #42734c;outline-offset:8px;border-radius:20px}
.branch-wish .ribbon-left-tail,.branch-wish .ribbon-right-tail{transform-origin:50px 55px;animation:knotted-tail-breeze 4.5s ease-in-out infinite alternate}
.branch-wish .ribbon-right-tail{animation-delay:-1.6s;animation-duration:5.3s}
.branch-ribbon-label{position:absolute;top:25%;left:33%;font:9px/1 'PingFang SC',sans-serif;color:#205f4d;opacity:.8;white-space:nowrap}
.branch-ribbon-excerpt{position:absolute;left:32%;top:33%;max-height:52%;font:13px/1.4 'Songti SC','STSong',serif;writing-mode:vertical-rl;color:#15594a;letter-spacing:1px;pointer-events:none;overflow:hidden}
.branch-toolbar{flex:none;z-index:2;padding:8px 14px calc(env(safe-area-inset-bottom) + 10px);background:#fff0ceeb;box-shadow:0 -3px 15px #fff1d56e;text-align:center}
.branch-navigation{display:flex;align-items:center;gap:12px;justify-content:space-between}.branch-navigation .icon-button{width:35px;height:35px;min-width:35px;margin:0;font-size:27px}.branch-navigation .icon-button:disabled{opacity:.38;cursor:default}
#branch-hint{font-size:13px;letter-spacing:1px;color:#5d5c32;line-height:1.6;margin:0;flex:1}#branch-own-receipt{color:#48704a;padding:8px 10px 1px;font-size:12px}
.branch-zoom-enter .branch-viewport{animation:branch-camera-zoom .65s ease-out both}
.wish-hanging{background:transparent;display:block;pointer-events:none}
.handoff-ribbon{position:absolute;left:calc(50% - 35px);top:48%;width:70px;height:192px;animation:carry-ribbon-to-tree 1.4s cubic-bezier(.32,.05,.27,1) both}
.handoff-ribbon svg{width:100%;height:100%;overflow:visible;filter:drop-shadow(2px 4px 3px #29613c20)}
.handoff-ribbon .ribbon-loop,.handoff-ribbon .ribbon-loop-light,.handoff-ribbon .ribbon-knot{visibility:hidden}
.wish-animation-status{position:absolute;z-index:18;bottom:calc(env(safe-area-inset-bottom) + 12px);left:10%;right:10%;background:#fff1d5f2;border:1px solid #c6b178;border-radius:8px 15px 9px 13px;padding:9px 13px;text-align:center;box-shadow:0 4px 16px #5e4a2726}
.wish-animation-status p{font-size:14px;margin:0;line-height:1.8}.wish-animation-status .text-button{font-size:11px;padding:4px 9px;color:#697245}
.branch-wish.is-arriving{animation:arrive-at-branch 3.8s ease-in-out both;--arrive-x:65px;--arrive-y:210px}
.is-arriving .ribbon-loop{stroke-dasharray:145;animation:wrap-ribbon-loop 3.8s linear both}
.is-arriving .ribbon-loop-light{animation:appear-ribbon-knot 3.8s linear both}
.is-arriving .ribbon-knot{transform-box:fill-box;transform-origin:center;animation:tighten-ribbon-knot 3.8s ease-in-out both}
.branch-wish.is-arriving .ribbon-left-tail{animation:tie-left-tail 3.8s ease-in-out both}
.branch-wish.is-arriving .ribbon-right-tail{animation:tie-right-tail 3.8s ease-in-out both}
.is-arriving .branch-ribbon-label,.is-arriving .branch-ribbon-excerpt{animation:appear-ribbon-knot 3.8s linear both}
#branch-reader{position:fixed;inset:auto auto 20px 50%;transform:translateX(-50%);width:min(390px,calc(100vw - 32px));max-height:78dvh;margin:0;border:1px solid #c1ad79;border-radius:9px 21px 12px 16px;padding:23px 24px 14px;background:#fff1d7;color:#51462b;box-shadow:0 10px 50px #3149233b;overflow:auto;text-align:center;font-family:'Songti SC','STSong',serif}
#branch-reader::backdrop{background:#394c2b40;backdrop-filter:blur(2px)}
#branch-reader .reader-close{position:absolute;right:9px;top:6px;border:0;background:transparent;color:#758052;font-size:26px;padding:2px 7px}
#reader-source{font:10px/1.6 'PingFang SC',sans-serif;letter-spacing:.4px;margin:2px 8px;color:#7c7b50}
#reader-heading{font-size:23px;font-weight:500;letter-spacing:2px;margin:13px 0 20px}
.reader-message-scroll{max-height:34dvh;overflow:auto;overscroll-behavior:contain;border-top:1px solid #cfc69b;border-bottom:1px solid #cfc69b;padding:12px 0;margin-bottom:12px}
#reader-message{font-size:18px;line-height:1.9;white-space:pre-wrap;overflow-wrap:anywhere;text-align:left;margin:0}
#reader-name{font-size:13px;text-align:right;margin:15px 0 0;overflow-wrap:anywhere}
#reader-note{font-size:10px}#reader-code{justify-content:center;margin-top:12px;font-size:13px;min-height:43px}#reader-continue{font-size:12px;color:#617142;padding:12px 4px 5px}
@keyframes carry-ribbon-to-tree{0%{opacity:1;transform:translate(55px,180px) rotate(-18deg) scale(1.5)}45%{opacity:1;transform:translate(-45px,45px) rotate(13deg) scale(.9)}100%{opacity:.4;transform:translate(0,-105px) rotate(-4deg) scale(.32)}}
@keyframes branch-camera-zoom{from{transform:scale(1.12);opacity:.1}to{transform:scale(1);opacity:1}}
@keyframes arrive-at-branch{0%{transform:translate(calc(-50% + var(--arrive-x)),var(--arrive-y)) rotate(-22deg) scale(1.3)}42%{transform:translate(-50%,0) rotate(6deg) scale(1)}60%{transform:translate(-50%,0) rotate(-3deg)}100%{transform:translate(-50%,0) rotate(0)}}
@keyframes wrap-ribbon-loop{0%,43%{stroke-dashoffset:145;opacity:0}44%{opacity:1}76%,100%{stroke-dashoffset:0;opacity:1}}
@keyframes appear-ribbon-knot{0%,66%{opacity:0}85%,100%{opacity:1}}
@keyframes tighten-ribbon-knot{0%,55%{opacity:0;transform:scale(.12) rotate(-30deg)}70%{opacity:1;transform:scale(1.3) rotate(12deg)}86%,100%{opacity:1;transform:scale(1) rotate(0)}}
@keyframes tie-left-tail{0%,43%{transform:rotate(20deg)}64%{transform:rotate(29deg)}82%{transform:rotate(-5deg)}100%{transform:rotate(0)}}
@keyframes tie-right-tail{0%,43%{transform:rotate(-24deg)}64%{transform:rotate(-32deg)}82%{transform:rotate(5deg)}100%{transform:rotate(0)}}
@keyframes knotted-tail-breeze{to{transform:rotate(3deg)}}
@media(max-width:370px){.branch-demo-label{font-size:9px;padding-left:6px;padding-right:6px}#branch-hint{font-size:12px;letter-spacing:.5px}.tree-demo-tools{gap:9px}.tree-demo-tools .wish-demo-note{font-size:9px}.branch-ribbon-excerpt{font-size:12px}}
@media(max-height:650px){.branch-toolbar{padding-top:6px;padding-bottom:calc(env(safe-area-inset-bottom) + 8px)}.branch-navigation .icon-button{width:32px;height:32px;min-width:32px}.branch-demo-label{padding-bottom:5px}#branch-reader{bottom:10px;max-height:84dvh}.branch-ribbon-excerpt{font-size:12px}}
@media(prefers-reduced-motion:reduce){.handoff-ribbon,.branch-wish.is-arriving,.is-arriving .ribbon-loop,.is-arriving .ribbon-loop-light,.is-arriving .ribbon-knot,.branch-wish .ribbon-left-tail,.branch-wish .ribbon-right-tail,.is-arriving .branch-ribbon-label,.is-arriving .branch-ribbon-excerpt,.branch-zoom-enter .branch-viewport{animation:none}}

/* Persistent service states reuse the approved scene and keep private wishes separate. */
#branch-tiles{position:absolute;inset:0;pointer-events:none}.branch-tile{position:absolute;top:0;height:100%;object-fit:fill;pointer-events:none;user-select:none}.branch-tile.overlap-tile{mask-image:linear-gradient(to right,transparent,#000 70px);-webkit-mask-image:linear-gradient(to right,transparent,#000 70px)}
.branch-state{position:absolute;left:12%;right:12%;top:42%;z-index:3;background:#fff2d8ec;border:1px solid #d6c28c;border-radius:8px 15px 9px 12px;padding:18px;font-size:14px;line-height:1.9;color:#75643e;text-align:center;box-shadow:0 5px 22px #5f65251c;pointer-events:none}
#branch-refresh,#branch-more{font-size:10px;color:#697544;padding:6px 8px 0}#saved-conflict{font-size:10px;padding:4px 0;color:#467659}

/* Optional virtual gifts, using the approved artwork without repainting the ribbon. */
#collection-home,#collection-finish{font-size:11px;color:#4c7046;padding:7px 8px}
#collection-finish{display:block;margin:0 auto}
.reward-dialog{padding:0;border:0;background:transparent;width:min(430px,100vw,calc(100dvh * .5628));height:auto;aspect-ratio:941/1672;max-width:100vw;max-height:100dvh;overflow:hidden;margin:auto;position:fixed;inset:0;box-shadow:0 10px 55px #34462160}
.reward-dialog::backdrop,.collection-dialog::backdrop{background:#344b2c6b;backdrop-filter:blur(3px)}
.reward-plate{width:100%;height:100%;display:block;object-fit:contain}
.reward-hit{position:absolute;border:0;background:transparent;border-radius:16px;padding:0;color:transparent}
.reward-hit:focus-visible{outline:3px solid #207b61;outline-offset:2px;background:#fff3b92a}.reward-hit:hover{background:#fff3b917}
.reward-primary{left:20%;top:77%;width:62%;height:6.5%}.reward-later{left:35%;top:84%;width:30%;height:6%}
.collection-dialog{position:fixed;inset:0;width:min(380px,calc(100vw - 28px));max-height:90dvh;margin:auto;padding:25px 22px 18px;overflow:auto;border:1px solid #c4aa72;border-radius:12px 22px 14px 20px;color:#59492b;background:#fff0cf;font-family:'Songti SC','STSong',serif;box-shadow:0 12px 45px #35482550;text-align:center}
.collection-dialog h2{font-size:23px;line-height:1.6;margin:0 0 9px;font-weight:500}.collection-dialog p{font-size:13px;line-height:1.8;margin:9px 0 15px}.collection-dialog .collection-total{font-size:29px;color:#557a49;letter-spacing:4px;margin:3px 0}.collection-dialog .button{width:100%;justify-content:center;font-size:16px;min-height:44px;margin:12px 0 3px}.collection-dialog .wish-demo-note{font-size:10px;color:#7a794c}.collection-dialog .text-button{font-size:12px;color:#5a7448;padding:10px}
.collection-level{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #d8c78f;padding:3px 5px;font-size:14px}.sticker-pack{display:flex;justify-content:center;gap:26px;height:75px;margin:12px}.sticker-pack img{width:58px;height:75px;object-fit:contain}
.writing-ribbon-area{position:relative;min-height:100%;isolation:isolate}.writing-ribbon-area .writing-ribbon{min-height:inherit}
.wish-sticker{position:absolute;object-fit:contain;pointer-events:none;user-select:none;z-index:4;filter:drop-shadow(1px 3px 2px #4a673a23)}
.writing-ribbon-area>.wish-sticker{top:15px;right:10%;height:90px;width:72px;transform:rotate(-6deg);transform-origin:center}
.writing-ribbon-area>.sticker-chime{height:86px;top:16px;transform:rotate(3deg)}.writing-ribbon-area>.sticker-leaf{height:72px;top:23px;transform:rotate(-9deg)}
.decoration-trigger{position:absolute;z-index:5;left:50%;top:7px;transform:translateX(-50%);max-width:52%;white-space:nowrap;background:#fff1d3f2;color:#637346;border:1px solid #ccb87b;border-radius:16px;padding:6px 13px;font:11px/1.5 'Songti SC','STSong',serif;box-shadow:0 2px 4px #71623615}
.decoration-trigger:focus-visible{outline:2px solid #2c866c;outline-offset:2px}
#decoration-choices{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:12px 0 0}.decoration-option{display:flex;align-items:center;justify-content:center;gap:10px;min-height:85px;padding:8px;border:1px solid #ccb980;border-radius:9px 14px 8px 12px;background:#fff8e3;color:#5d6239;font:14px 'Songti SC','STSong',serif}.decoration-option img{width:38px;height:64px;object-fit:contain}.decoration-option[aria-pressed='true']{border:2px solid #439574;background:#e0f1cf}.decoration-option:disabled{opacity:.42;cursor:default}
.branch-wish>.wish-sticker,.handoff-ribbon>.wish-sticker,.full-tied-ribbon>.wish-sticker{width:67%;height:27%;right:-22%;top:17%;transform:rotate(-6deg)}
.branch-wish>.sticker-leaf,.handoff-ribbon>.sticker-leaf,.full-tied-ribbon>.sticker-leaf{height:24%;width:62%;right:-20%}
.branch-wish[data-decoration]:not([data-decoration='']) .branch-ribbon-label{top:43%}.branch-wish[data-decoration]:not([data-decoration='']) .branch-ribbon-excerpt{top:50%;max-height:38%}
.is-arriving>.wish-sticker{animation:appear-ribbon-knot 3.8s linear both}
.receipt-ribbon-area{position:relative;isolation:isolate}.receipt-ribbon-area>.wish-sticker{right:10%;top:5px;width:58px;height:65px;transform:rotate(-6deg)}
#reader-decoration{position:relative;height:68px;margin:-13px 0 10px}#reader-decoration>.wish-sticker{position:static;width:60px;height:68px}
@media(max-height:650px){.writing-ribbon-area>.wish-sticker{height:72px;width:58px;top:10px}.writing-ribbon-area>.sticker-leaf{height:60px;top:12px}.decoration-trigger{font-size:10px;padding:4px 10px}.collection-dialog{padding-top:17px}}
.keyboard-open .writing-ribbon-area>.wish-sticker{height:58px;width:48px;top:4px}
@media(prefers-reduced-motion:reduce){.is-arriving>.wish-sticker{animation:none}}

/* v11: viewport fit, reachable mobile controls, and a scrollable keyboard layout. */
html{height:100%;-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{position:fixed;inset:0 0 auto;height:var(--viewport-height,100dvh);min-height:0;overflow:hidden;transform:translateY(var(--visual-top,0px))}
.game-shell,.game-shell.wish-open{height:var(--app-height,100dvh);min-height:0;max-height:none}
button,a,input,textarea,select{touch-action:manipulation}
canvas{touch-action:none;user-select:none;-webkit-user-select:none}
.icon-button,.wish-header .icon-button,#help-inline{min-width:44px;min-height:44px;width:44px;height:44px;flex-shrink:0}
.text-button{min-height:44px;display:inline-flex;align-items:center;justify-content:center}
.quick-levels{gap:5px;justify-content:center}.quick-levels .text-button{flex:1;padding-left:3px;padding-right:3px}
.home{overflow-y:auto;overscroll-behavior:contain;gap:12px}.home-copy{flex-shrink:0;margin-top:clamp(14px,5vh,52px)}.home-actions{flex-shrink:0;margin-bottom:0}.home footer{flex-shrink:0}
#collection-home,#collection-finish{min-height:44px}.prototype-note{margin:8px 0}.home .text-button{padding-top:5px;padding-bottom:5px}
.modal-card{max-height:calc(var(--app-height,100dvh) - 54px);overflow:auto;overscroll-behavior:contain}
.guide #got-it{min-width:44px;min-height:44px}.guide{padding:10px}.status-row{gap:6px}.status-row #seed-count{letter-spacing:.2px;font-size:10px;white-space:nowrap}
.finish-card{min-height:0;overscroll-behavior:contain}.finish-card #collection-finish{display:flex;width:100%}
.tree-demo-tools{height:44px;gap:8px}.tree-demo-tools .text-button{min-height:44px;padding:6px 8px}
#write-wish.art-hit{top:calc(85.1% - 22px);min-height:44px;height:6%}
#browse-wishes.art-hit{top:calc(91.6% - 22px);min-height:44px;height:44px}
#find-wish.art-hit{top:calc(91.6% - 22px);min-height:44px;height:44px}
.wish-check{min-height:44px;white-space:normal}.wish-check span{min-width:0}.wish-check input{width:21px;height:21px}
#keyboard-done{display:none;flex:none;font-size:13px;color:#3f755b;text-decoration:none;padding:4px 8px;min-width:44px}
.soft-keyboard #keyboard-done{display:inline-flex}.soft-keyboard .wish-editor .wish-header h2{margin-right:0}
.decoration-trigger{min-height:44px;max-width:55%;top:0;padding:6px 12px}
.writing-ribbon-area{display:flex;flex-direction:column}.writing-ribbon-area .writing-ribbon{flex:1;min-height:inherit}
.wish-header{padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right))}
.wish-header .icon-button{line-height:32px}
#reader-close{min-width:44px;min-height:44px;top:0;right:0}.branch-navigation .icon-button{min-width:44px;width:44px;height:44px}.branch-toolbar{padding-left:10px;padding-right:10px}
#branch-reader,.collection-dialog{max-height:calc(var(--viewport-height,100dvh) - 24px);overscroll-behavior:contain;scroll-padding:12px}
#branch-reader{bottom:max(12px,env(safe-area-inset-bottom))}.collection-dialog .text-button{min-height:44px}
.reward-dialog{width:min(430px,100vw,calc(var(--viewport-height,100dvh) * .5628));max-height:var(--viewport-height,100dvh)}
#receipt-code,#wish-code{font-size:16px;min-height:44px}
.soft-keyboard #wish-form{display:block;overflow-y:auto;overscroll-behavior:contain;scroll-padding:12px;-webkit-overflow-scrolling:touch}
.soft-keyboard .editor-scroll{overflow:visible;min-height:240px}
.soft-keyboard .writing-ribbon-area{min-height:240px}.soft-keyboard .writing-ribbon{min-height:240px;padding-top:62px;padding-bottom:18px}
.soft-keyboard .writing-ribbon textarea{min-height:100px;flex:none;height:120px;font-size:18px}
.soft-keyboard .signature-field{margin-top:14px}.soft-keyboard .editor-footer{padding-top:8px;padding-bottom:16px}
.soft-keyboard .wish-header{height:54px;min-height:54px;padding-top:4px;padding-bottom:4px}
.soft-keyboard .wish-header h2{font-size:21px;letter-spacing:1px}
@media(max-height:650px){
 .screen{padding-top:calc(env(safe-area-inset-top) + 16px);padding-bottom:calc(env(safe-area-inset-bottom) + 12px)}
 .home{gap:8px}.home-copy{margin-top:6px}.home h1{font-size:62px;margin:10px 0 17px}.home .intro{margin:6px 0;font-size:12px}.home .home-actions{margin-top:6px}.home .button{min-height:48px}
 .writing-ribbon{padding-top:78px;padding-bottom:22px}.writing-ribbon textarea{min-height:96px}.signature-field{margin-top:14px}.signature-field label{font-size:16px}
 .editor-footer{padding:5px 13% calc(env(safe-area-inset-bottom) + 8px)}.wish-check{padding:4px 0;font-size:13px}.wish-check span{line-height:1.4}.editor-footer .wish-demo-note{font-size:9px}.hang-button{min-height:44px;font-size:20px}
 .wish-header h2{font-size:22px;letter-spacing:1px}.wish-header{height:60px;padding-top:7px;padding-bottom:5px}
 .writing-ribbon-area>.wish-sticker{height:67px;top:8px}.writing-ribbon-area>.sticker-leaf{height:56px}
}
.compact-viewport.soft-keyboard #wish-form{overflow:auto}
@media(max-height:450px){
 #wish-form{display:block;overflow-y:auto;overscroll-behavior:contain}.editor-scroll{overflow:visible}.writing-ribbon-area,.writing-ribbon{min-height:240px!important}.writing-ribbon textarea{height:120px;flex:none}.editor-footer{padding-bottom:16px}
 .modal{padding:14px}.modal-card{max-height:calc(var(--app-height,100dvh) - 28px);padding:16px 20px}.guide{bottom:64px;left:14px;right:14px}.chapter .eyebrow{font-size:22px;padding-top:5px;padding-bottom:5px}.hud{padding-top:8px}.status-row{margin-top:7px}.chapter strong{font-size:12px;padding:3px 10px}
}
@media(pointer:coarse){body{padding:0}.game-shell{border:0;border-radius:0}.wish-header .icon-button{min-width:44px}}
/* Keep controls clear of notches and the home indicator, including keyboard mode. */
.tree-demo-tools{height:calc(44px + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom)}
@media(max-height:650px){.wish-header{height:calc(60px + env(safe-area-inset-top));padding-top:calc(7px + env(safe-area-inset-top))}}
.soft-keyboard .wish-header{height:calc(54px + env(safe-area-inset-top));min-height:calc(54px + env(safe-area-inset-top));padding-top:calc(4px + env(safe-area-inset-top))}
.soft-keyboard .editor-footer{padding-bottom:calc(16px + env(safe-area-inset-bottom))}

/* v13: independent lower control pad; the accepted continuous world scrolling is restored. */
.steering{position:absolute;z-index:6;left:50%;bottom:calc(env(safe-area-inset-bottom) + 56px);transform:translateX(-50%);width:116px;height:116px;pointer-events:auto}
.steering-pad{position:relative;width:100%;height:100%;display:block;padding:0;border:2px solid #a99561;border-radius:50%;background:radial-gradient(circle,#fff6dfe8 0 45%,#f0dfb5f0 47% 66%,#d3bd83e8 68% 71%,#fff3d8ed 74%);box-shadow:0 4px 12px #344d2d35,inset 0 0 0 4px #fff4d280;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;cursor:grab}
.steering-pad:active{cursor:grabbing}.steering-pad:focus-visible{outline:3px solid #247d65;outline-offset:4px}
.steering-knob{position:absolute;left:calc(50% - 23px);top:calc(50% - 23px);width:46px;height:46px;border:1px solid #8e9c64;border-radius:50%;display:grid;place-items:center;background:radial-gradient(circle at 35% 25%,#f7f4d5,#c8d39b);box-shadow:0 3px 5px #425b3035,inset 0 1px 2px #fffbe3;pointer-events:none;will-change:transform}
.steering-knob svg{width:20px;height:29px;filter:drop-shadow(0 1px 1px #27665128)}
.steering-arrow{position:absolute;pointer-events:none;line-height:1;font:18px Georgia,serif;color:#798150}.arrow-up{top:5px;left:calc(50% - 5px)}.arrow-down{bottom:5px;left:calc(50% - 5px)}.arrow-left{left:9px;top:calc(50% - 11px);font-size:23px}.arrow-right{right:9px;top:calc(50% - 11px);font-size:23px}
.steering-pad.is-steering{border-color:#6a8659;box-shadow:0 4px 14px #344d2d40,inset 0 0 0 4px #eef2c880}.is-steering .steering-knob{background:radial-gradient(circle at 35% 25%,#f9f6d5,#b7ca8c)}
.guide{top:calc(env(safe-area-inset-top) + 158px);bottom:auto;z-index:6}
.bottom-hint{font-size:10px}.bottom-hint #hint-copy{max-width:calc(100% - 54px);line-height:1.6}
@media(max-height:650px){.steering{width:108px;height:108px;bottom:calc(env(safe-area-inset-bottom) + 68px)}.steering-knob{width:42px;height:42px;left:calc(50% - 21px);top:calc(50% - 21px)}.guide{top:calc(env(safe-area-inset-top) + 148px)}}
@media(max-height:450px){.steering{width:88px;height:88px;bottom:calc(env(safe-area-inset-bottom) + 60px)}.steering-knob{width:36px;height:36px;left:calc(50% - 18px);top:calc(50% - 18px)}.steering-knob svg{width:16px;height:24px}.steering-arrow{font-size:14px}.arrow-left,.arrow-right{font-size:20px}.guide{top:calc(env(safe-area-inset-top) + 120px)}}

/* v14: the full portrait tree fills the visible viewport; test tools float over it. */
.tree-demo-tools{left:auto;right:6px;bottom:calc(env(safe-area-inset-bottom) + 3px);height:28px;width:auto;padding:0;border:0;background:transparent;gap:0}
.tree-demo-tools .wish-demo-note{display:none}
.tree-demo-tools .text-button{min-height:28px;padding:3px 7px;font-size:10px;background:#fbefcfcc;border-radius:4px;color:#655733}
.home .phone-seed-note{font-size:10px;line-height:1.7;letter-spacing:0;margin:5px 0;color:#58492c;background:#f7e7c6d9;padding:4px 7px;border-radius:4px}
#reset-phone-seeds{font-size:11px;margin-left:5px}

/* v15: one continuous piano track, with the approved tree's own music hit target. */
.music-toggle{position:absolute;z-index:9;right:18px;top:calc(env(safe-area-inset-top) + 14px);margin:0;touch-action:manipulation}
.music-toggle[data-scene='game']{right:72px;top:calc(env(safe-area-inset-top) + 17px)}
.music-toggle span{font-size:26px;line-height:1}
.music-toggle[data-music-state='off']::after,#tree-music[data-music-state='off']::after{content:'';position:absolute;left:22%;top:49%;width:56%;height:2px;background:#70411f;transform:rotate(-45deg);box-shadow:0 1px 0 #f9d89b}
.music-toggle[data-music-state='playing']::after,#tree-music[data-music-state='playing']::after{content:'';position:absolute;right:4px;bottom:4px;width:6px;height:6px;border-radius:50%;background:#4e9a6d;border:1px solid #fff0c4}
#tree-music{cursor:pointer;min-width:44px;min-height:44px}
.home .edition{max-width:calc(100% - 34px);align-self:flex-start;font-size:8px;gap:6px;letter-spacing:1.1px}
.finish>.edition{max-width:calc(100% - 55px);align-self:flex-start}
@media(max-height:650px){.music-toggle[data-scene='game']{top:calc(env(safe-area-inset-top) + 12px)}}
.soft-keyboard .music-toggle[data-scene='editor']{display:none}

/* v16: independent, quiet effects controls without crowding the gameplay HUD. */
.effects-switch{min-height:44px;min-width:70px;padding:6px 11px;border:1px solid #c2aa74;border-radius:4px 9px 5px 8px;background:#fbefcfe6;color:#5e5832;font:12px/1.5 'Songti SC','STSong',serif;white-space:nowrap;touch-action:manipulation}
.effects-switch[aria-pressed='false']{color:#827456;background:#f5e9d3d9}
.home .home-sound-footer{display:flex;align-items:center;gap:12px;padding:0 8px 0 0;flex-shrink:0}
#effects-pause{margin-top:12px}
.effects-tree{position:absolute;z-index:4;left:6px;bottom:calc(env(safe-area-inset-bottom) + 3px);font-size:10px;min-width:66px;padding:4px 7px;border-color:#cab58180;background:#fbefcfcc}
/* Keep the tree switch outside the illustrated browse button's hit area on 320px phones. */
.effects-tree{left:3px;width:48px;min-width:48px;padding:4px 0}
.home .home-sound-footer{position:sticky;bottom:0;z-index:1;background:#f8ecd1f5;margin-top:4px;box-shadow:0 -3px 12px #f7eac550}
/* v17: an explicit touch-triggered audition makes mobile audio easy to check. */
.effects-preview{min-width:44px;min-height:44px;padding:5px 7px;border:0;border-radius:4px;background:#fbefcfdf;color:#617044;font:11px/1.4 'Songti SC','STSong',serif;text-decoration:underline;text-underline-offset:3px;touch-action:manipulation}
.effects-preview:disabled{opacity:.45;text-decoration:none;cursor:default}
.home .home-sound-footer{gap:6px}.home-sound-footer span{white-space:nowrap}
#effects-preview-pause{margin:12px 0 0 8px}

/* v24: avoid an offscreen full-page blur underneath the opaque approved tree plate. */
.game-shell.wish-open .paper-grain{display:none}
.wish-tree::before{backdrop-filter:none}

/* v26: three canopy tiers; only nearby ribbons and art tiles are mounted. */
.wish-browse .branch-demo-label{font-size:9px;padding-bottom:5px}
.branch-wish .ribbon-left-tail,.branch-wish .ribbon-right-tail{animation:none}
.branch-wish.own-focus{filter:drop-shadow(0 0 7px #fff7a8);outline:1px dashed #43795a66;outline-offset:4px;border-radius:12px}
.branch-wish .branch-ribbon-excerpt{font-size:clamp(9px,2.7vw,13px);letter-spacing:1px;line-height:1.35;top:32%;left:35%;max-height:55%}
.branch-ribbon-label{font-size:8px;top:25%}
#branch-find-own{display:block;width:auto;min-height:38px;margin:5px auto 0;padding:7px 24px;background:#fff6d9;color:#52623b;border:1px solid #8d9159;border-radius:18px;font:16px 'Songti SC','STSong',serif}
.branch-toolbar{padding-top:5px}.branch-navigation .icon-button{min-width:32px;width:32px;height:32px}#branch-hint{font-size:12px}

.branch-wish .branch-ribbon-excerpt{font-size:var(--ribbon-font,11px);line-height:1.2;white-space:nowrap;overflow:hidden;top:34%;max-height:54%;max-width:35%}
.branch-wish[data-source="public"] .branch-ribbon-label{display:none}
.branch-toolbar{display:grid;grid-template-columns:1fr auto;align-items:center;gap:2px 8px;padding-bottom:calc(env(safe-area-inset-bottom) + 8px)}
.branch-navigation{grid-column:1/-1}.branch-navigation .icon-button{min-width:44px;width:44px;height:44px;min-height:44px}
#branch-find-own{grid-column:1;grid-row:2;justify-self:center;margin:0}
#branch-refresh{grid-column:2;grid-row:2;padding:6px;min-height:44px}
#branch-own-receipt,#branch-more{grid-column:1/-1}

/* v27: the approved portrait tree fills every screen, with controls laid over the art. */
.wish-browse{position:absolute;inset:0;display:block;padding:0;overflow:hidden;background:#d2cf79}
.wish-browse .branch-viewport{position:absolute;inset:0;min-height:0;scroll-snap-type:x mandatory;background:#d2cf79}
.wish-browse .branch-world{min-width:100%;height:100%}
.wish-browse .branch-tile{scroll-snap-align:start;scroll-snap-stop:always;mask-image:none;-webkit-mask-image:none}
.wish-browse .wish-header{position:absolute;top:calc(env(safe-area-inset-top) + 10px);left:0;right:0;height:52px;padding:0 13px;background:transparent;pointer-events:none;z-index:4;gap:0}
.wish-browse .wish-header .icon-button{pointer-events:auto;position:absolute;left:4%;top:0;margin:0}
.wish-browse .wish-header h2{position:absolute;left:27%;right:27%;margin:0;padding:9px 0;font-size:clamp(20px,5.8vw,27px);letter-spacing:2px;color:#4b2c10;background:radial-gradient(ellipse at 50% 25%,#ffedbb,#f4d89c);box-shadow:0 3px 6px #553a243d;border:1px solid #d5ad67;border-radius:9% 6% 7% 5% / 20% 15% 19% 13%;pointer-events:auto}
.wish-browse .wish-header h2::before,.wish-browse .wish-header h2::after{content:'❧';display:inline-block;font-size:.65em;margin:0 5px;color:#725127}
.wish-browse .wish-header h2{left:25%;right:25%;font-size:clamp(18px,5.2vw,25px);white-space:nowrap}
.wish-browse .branch-demo-label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;padding:0}
.music-toggle[data-scene='browse']{right:4%;top:calc(env(safe-area-inset-top) + 10px)}
.wish-browse .branch-toolbar{position:absolute;left:4%;right:4%;bottom:calc(env(safe-area-inset-bottom) + 9px);z-index:4;display:grid;grid-template-columns:1fr auto;gap:1px 4px;padding:8px 13px 7px;background:radial-gradient(ellipse at 35% 40%,#fff0c4f5,#f5dfacf5);border:1px solid #d7b772;border-radius:5% 7% 5% 6% / 13% 16% 14% 10%;box-shadow:0 3px 14px #75572840;text-align:center}
.wish-browse .branch-navigation{grid-column:1/-1;gap:4px;min-height:44px}
.wish-browse .branch-navigation .icon-button{width:44px;height:44px;min-height:44px;min-width:44px;margin:0;border:1px solid #7e542b;border-radius:50%;background:transparent;box-shadow:none;font-size:28px}
.wish-browse #branch-hint{font:clamp(10px,2.9vw,14px)/1.5 'Songti SC','STSong',serif;letter-spacing:.3px;color:#563b21}
#branch-page{grid-column:1/-1;margin:0 0 4px;font:10px/1.3 'Songti SC','STSong',serif;color:#7c803d;min-height:13px}
.wish-browse #branch-find-own{grid-row:3;grid-column:1;justify-self:center;width:auto;padding:6px 15px;min-height:44px;font:600 17px/1.25 'Songti SC','STSong',serif;letter-spacing:1px;border:3px double #687132;border-radius:22px;background:#fff0c4;color:#485623;box-shadow:0 2px 3px #84693018}
.wish-browse #branch-find-own::before,.wish-browse #branch-find-own::after{content:'❧';padding:0 5px;font-size:14px}
.wish-browse #branch-refresh{grid-row:3;grid-column:2;font-size:10px;padding:4px;min-height:44px;color:#707740}
.branch-signature{grid-column:1/-1;grid-row:5;margin:4px 0 0;font:10px/1.3 'Songti SC','STSong',serif;color:#77633a;letter-spacing:.7px}
.wish-browse #branch-own-receipt,.wish-browse #branch-more{grid-column:1/-1;grid-row:4;font-size:11px;min-height:32px;padding:2px 8px}
.wish-browse .branch-wish{filter:drop-shadow(1px 2px 1px #487a3a28)}
.wish-browse .branch-wish .branch-ribbon-excerpt{font-size:var(--ribbon-font,11px);color:#1c683f;opacity:.92;letter-spacing:.8px;line-height:1.15;top:33%;left:34%;max-height:55%;max-width:35%}
.wish-browse .branch-wish .branch-ribbon-label{display:none}
.wish-browse .branch-wish[data-source='own'] .branch-ribbon-label,.wish-browse .branch-wish[data-source='local-demo'] .branch-ribbon-label{display:block;top:19%;left:55%;writing-mode:vertical-rl;padding:4px 3px;background:#ffebad;color:#765024;border:1px solid #c9a666;border-radius:4px;z-index:3;font-size:9px}
@media(max-height:620px){.wish-browse .branch-toolbar{bottom:4px;padding-top:4px;padding-bottom:4px}.branch-signature{margin-top:1px}.wish-browse #branch-find-own{font-size:15px}.wish-browse .wish-header{top:7px}.music-toggle[data-scene='browse']{top:7px}}
.wish-browse #branch-more{grid-row:6}
@media(max-height:620px){.wish-browse .wish-header h2{padding:6px 0;font-size:20px}}
