:root{color-scheme:light;--ink:#365347;--muted:#74867a;--cream:#f7f4e9;--pink:#ce736b;--line:#d9dfd0}*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden}body{font-family:ui-rounded,'Trebuchet MS',system-ui,sans-serif;background:#edf1e3;color:var(--ink);overscroll-behavior:none}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer;color:inherit;border:0}button:focus-visible,a:focus-visible,canvas:focus-visible{outline:3px solid #d97b6d;outline-offset:3px}button:disabled{cursor:wait;opacity:.65}button{touch-action:manipulation}button:active:not(:disabled){transform:translateY(2px)}.app{height:100dvh;max-width:1536px;margin:0 auto;padding:0 34px;display:flex;flex-direction:column}.topbar{height:78px;flex-shrink:0;display:flex;align-items:center;justify-content:space-between}.brand{text-decoration:none;color:var(--ink);font-weight:800;font-size:24px;letter-spacing:-1px;display:flex;gap:13px;align-items:center}.brand-heart{font-size:25px;color:var(--pink);text-shadow:2px 2px #e5c9b8}.stats{display:flex;align-items:center;gap:12px}.heart-count{display:flex;align-items:center;gap:8px;font-size:19px;color:var(--pink);padding-right:16px;border-right:1px solid var(--line)}.heart-count b{font-size:18px;color:var(--ink)}.heart-count>span{font-size:14px;color:var(--muted);margin-left:-4px}.icon-button{width:37px;height:37px;border:1px solid #d5ddce;background:transparent;border-radius:12px;font-weight:700;position:relative}.sound-dot{width:5px;height:5px;background:#a9b49f;border-radius:50%;display:block;position:absolute;right:6px;bottom:6px}.sound-on .sound-dot{background:#ce736b}.game-shell{flex:1;min-height:0;position:relative;border-radius:20px;overflow:hidden;border:1px solid #aebfaa;box-shadow:0 9px 0 -5px #ccd9c4,0 15px 35px #35514610;background:#a6bd83}canvas{width:100%;height:100%;display:block;image-rendering:pixelated;touch-action:none}.chapter{position:absolute;left:26px;top:24px;display:flex;align-items:center;gap:8px;padding:9px 13px;color:#355447;background:#f7f4e9e8;border-radius:8px;font-size:12px;font-weight:700;pointer-events:none}.chapter-dot{width:6px;height:6px;background:#d88473;box-shadow:2px 2px #eac9a5}.toast{position:absolute;left:50%;top:76px;transform:translate(-50%,-6px);background:#fcf7e9f7;border:1px solid #d8d7bb;border-radius:10px;padding:12px 18px;font-size:14px;text-align:center;line-height:1.4;max-width:calc(100% - 40px);width:max-content;opacity:0;transition:opacity .2s,transform .2s;pointer-events:none;box-shadow:0 5px 0 #5d704020;z-index:5}.toast.show{opacity:1;transform:translate(-50%,0)}.screen-shade{position:absolute;inset:0;background:#274a3b37;backdrop-filter:blur(2px);z-index:7}.start-card,.help-card,.finish-card{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);background:var(--cream);border:1px solid #ecedd9;border-radius:20px;box-shadow:0 10px 0 #35534345,0 30px 70px #29462e25;z-index:8;text-align:center;padding:28px 42px;width:422px;max-width:calc(100% - 32px)}.eyebrow{font-size:9px;letter-spacing:2.5px;font-weight:800;color:#8a967e}.start-card h1{font-size:49px;letter-spacing:-2px;line-height:1.1;margin:13px 0 12px;position:relative;white-space:nowrap}.start-card h1>span{display:inline-block;font-size:13px;color:#d78578;vertical-align:super;margin-left:7px;transform:rotate(12deg)}.intro{font-size:16px;line-height:1.5;color:#7b897c;margin:0 0 14px}.character-picker{display:flex;align-items:center;justify-content:center;gap:7px;margin:14px -4px 20px}.character{border:1px solid transparent;border-radius:12px;width:140px;padding:0 0 10px;background:#eff0e3;display:flex;align-items:center;flex-direction:column;transition:border-color .15s,background .15s}.character.selected{border-color:#899f7c;background:#e1e8ce}.portrait{height:106px;width:96px;display:block;background-repeat:no-repeat;background-size:768px 1144px;image-rendering:pixelated;margin:5px 0 2px}.portrait.me{background-image:url('assets/pixelme.png')}.portrait.muse{background-image:url('assets/pixelmuse.png')}.character strong{font-size:14px}.choice-state{font-size:10px;color:#829176;margin-top:5px}.selected .choice-state{color:#597a4e}.between{font-family:Georgia,serif;color:#acb49a;font-style:italic}.primary{display:block;width:100%;border:1px solid #395c47;background:#456a51;color:#fffaf0;border-radius:9px;font-size:15px;font-weight:700;padding:15px 18px;box-shadow:0 4px 0 #2d4a36;letter-spacing:.1px}.primary:hover{background:#507759}.start-note{font-size:10px;color:#95a087;margin:16px 0 0}.asset-error{font-size:12px;color:#a54748}.bottom-hud{position:absolute;left:24px;right:24px;bottom:21px;display:flex;align-items:center;gap:12px;pointer-events:none}.swap{display:flex;align-items:center;gap:9px;pointer-events:auto;background:#faf6eaf2;border:1px solid #d6dbbd;border-radius:10px;padding:11px 13px;font-size:12px;box-shadow:0 3px 0 #52604728}.swap>span{font-size:20px}.objective{display:flex;flex-direction:column;background:#faf6eaf2;border:1px solid #d6dbbd;border-radius:10px;padding:10px 15px;box-shadow:0 3px 0 #52604728;gap:4px;max-width:360px}.objective small{font-size:8px;letter-spacing:1.6px;color:#8d977c;font-weight:800}.objective>span{font-size:12px;font-weight:600}.world-actions{position:absolute;right:24px;bottom:97px;display:flex;gap:10px}.action{display:flex;align-items:center;gap:7px;background:#f8f4e9ed;border:1px solid #e6e4cd;border-radius:11px;padding:12px 15px;box-shadow:0 4px 0 #52604735}.action>span{font-size:23px;line-height:1}.action b{font-size:12px}.action kbd{font:9px inherit;font-size:9px;color:#9ca188;margin-left:3px}.hug>span{color:#cd796e}.hug{background:#fff0dff2}.action:hover{background:#fffaf0}.touch-zone{display:none;position:absolute;left:25px;bottom:112px;width:115px;height:115px;touch-action:none}.joystick{height:100%;width:100%;border-radius:50%;border:2px solid #fcf9e590;background:#fffbe130;display:flex;align-items:center;justify-content:center;box-shadow:inset 0 0 0 10px #fbf5d420}.joystick>span{width:49px;height:49px;border-radius:50%;background:#fbf7e8ca;box-shadow:0 4px 0 #56603e30;position:absolute}.joystick>i{font-size:27px;z-index:1;color:#728369;pointer-events:none;font-style:normal;opacity:.4}.help-card{text-align:left;padding:33px;max-height:calc(100% - 30px);overflow:auto}.help-card h2,.finish-card h2{font-size:26px;letter-spacing:-.9px;margin:12px 0}.help-card p,.finish-card p{font-size:13px;line-height:1.6;color:#7a897b}.help-card ul{list-style:none;padding:0;font-size:13px;line-height:2.6}.help-card li>span{display:inline-block;width:28px;font-weight:bold;color:#bd7769}.close{position:absolute;right:14px;top:10px;background:none;font-size:28px;color:#85967e}.finish-card{padding:30px 36px}.finish-heart{font-size:36px;color:#cf7f70;margin:0 0 15px}.finish-card h2{line-height:1.25}.finish-card .primary{margin-top:23px}.text-button{background:none;text-decoration:underline;text-underline-offset:4px;font-size:11px;color:#8a967f;margin-top:18px}.hidden,[hidden]{display:none!important}footer{height:43px;flex-shrink:0;display:flex;justify-content:space-between;align-items:center;font-size:10px;color:#8c9c86;letter-spacing:.3px}.desktop-hint{margin-left:auto;margin-right:18px}.desktop-hint i{margin:0 7px;font-style:normal;color:#b5bea6}.footer-heart{color:#c4a99a}.app:not(.playing) .world-actions,.app:not(.playing) .bottom-hud,.app:not(.playing) .touch-zone{visibility:hidden}.app:not(.playing) .chapter{opacity:0}@media (pointer:coarse){.touch-zone{display:block}.desktop-hint{display:none}.action kbd{display:none}}@media(max-width:650px){.app{padding:0 12px}.topbar{height:62px}.brand{font-size:20px;gap:9px}.brand-heart{font-size:21px}.stats{gap:7px}.heart-count{font-size:16px;gap:6px;padding-right:10px}.heart-count b{font-size:15px}.heart-count>span{font-size:11px}.icon-button{width:31px;height:31px;border-radius:9px}.game-shell{border-radius:15px}.start-card{padding:24px 24px;width:342px}.start-card h1{font-size:42px;margin-top:14px}.intro{font-size:14px}.character-picker{margin:10px -4px 17px}.character{width:118px}.eyebrow{font-size:8px;letter-spacing:2px}.portrait{margin-top:2px}.chapter{left:14px;top:14px;font-size:10px;padding:8px 10px}.toast{top:58px;font-size:12px;padding:9px 12px}.bottom-hud{left:13px;right:13px;bottom:15px;gap:8px}.swap{padding:9px 10px;border-radius:9px}.swap b{display:none}.objective{padding:9px 11px;max-width:calc(100% - 50px);gap:3px;flex:1}.objective>span{font-size:10px}.objective small{font-size:7px;letter-spacing:1.2px}.world-actions{right:15px;bottom:102px;gap:8px;flex-direction:column}.action{padding:10px 13px;justify-content:center}.action b{font-size:10px}.action>span{font-size:22px}.action kbd{display:none}.touch-zone{display:block;left:20px;bottom:108px;width:100px;height:100px}footer{height:32px;font-size:9px}.desktop-hint{display:none}.help-card{padding:25px}.help-card h2{font-size:23px}.help-card p,.help-card ul{font-size:12px}}@media(max-height:650px){.start-card{padding-top:16px;padding-bottom:17px}.intro{display:none}.start-card h1{font-size:36px;margin:9px 0}.character-picker{margin:8px 0 14px}.portrait{height:90px;background-size:672px 1001px;width:84px}.character{padding-bottom:7px}.start-note{margin-top:12px}.primary{padding:12px}.topbar{height:56px}footer{height:28px}.help-card{padding:20px 30px}.help-card p{margin:8px 0}.help-card ul{line-height:2;margin:8px 0}.finish-card{padding:20px 30px}.finish-heart{margin-bottom:8px;font-size:28px}}
/* Keep controls and instructions readable on small screens. */
.choice-state,.start-note{font-size:12px}.chapter{font-size:12px}.objective>span{font-size:14px}.objective small{font-size:10px}.action b{font-size:14px}.help-card p,.help-card ul,.finish-card p{font-size:16px}.text-button{font-size:13px}.eyebrow{font-size:10px}.intro{font-size:16px}@media(max-width:650px){.objective>span{font-size:12px;line-height:1.35}.objective small{font-size:10px;letter-spacing:.8px}.action b{font-size:12px}.chapter{font-size:12px}.intro{font-size:16px}.eyebrow{font-size:10px;letter-spacing:1.6px}.help-card p,.help-card ul{font-size:14px}.start-note{font-size:11px}}@media(max-height:650px){.help-card p,.help-card ul{font-size:14px}}

.start-card,.help-card,.finish-card{max-height:calc(100% - 30px);overflow:auto}
/* High-density rendering uses original atlas pixels, with no CSS nearest-neighbour step. */
canvas{image-rendering:auto}
.app{padding-bottom:max(18px,env(safe-area-inset-bottom))}
.portrait{width:120px;height:130px;background-size:960px 1430px;image-rendering:auto;margin:8px 0}
.character-picker{gap:14px;margin:20px 0 24px}
.character{width:145px;padding-bottom:14px;flex-shrink:0}
.start-card h1{font-size:28px;letter-spacing:-.7px;margin:0}
.start-card{padding:28px 30px}
.toast{top:18px;padding:9px 14px;font-size:13px}
.objective{padding:9px 13px;max-width:none;flex:0 1 auto;box-shadow:none;background:#faf6eadc;line-height:1.35}
.bottom-hud{justify-content:flex-start}
.world-actions{bottom:83px}
.touch-zone{bottom:98px}
@media(max-width:650px){
 .app{padding:0 10px max(12px,env(safe-area-inset-bottom))}
 .topbar{height:58px}
 .portrait{width:120px;height:130px;background-size:960px 1430px}
 .character-picker{gap:10px;margin:20px -4px 23px}
 .character{width:132px}
 .start-card{padding:24px 20px}
 .start-card h1{font-size:27px;margin:0}
 .toast{top:14px}
 .objective{max-width:calc(100% - 54px);padding:9px 12px;flex:0 1 auto}
 .objective>span{font-size:12px}
 .bottom-hud{bottom:14px}
 .world-actions{bottom:78px}
 .touch-zone{bottom:91px}
}
@media(max-height:500px){
 .start-card{padding:15px 22px}
 .start-card h1{font-size:22px}
 .character-picker{margin:8px 0 12px}
 .portrait{width:84px;height:91px;background-size:672px 1001px;margin:2px 0}
 .character{width:110px;padding-bottom:7px}
 .primary{padding:10px}
 .world-actions{bottom:64px}
 .touch-zone{width:82px;height:82px;bottom:65px}
}
@media(max-width:350px){
 .character{width:104px;flex-shrink:1;min-width:0}
 .portrait{width:96px;height:104px;background-size:768px 1144px}
 .character-picker{gap:8px}
 .start-card{padding-left:16px;padding-right:16px}
 .brand{font-size:18px;gap:6px}
 .stats{gap:5px}
}
.action{min-height:46px;min-width:46px}.icon-button{min-width:40px;min-height:40px}.swap{min-width:46px;min-height:46px}.action:disabled{cursor:default;opacity:.43;transform:none}.context-action{background:#ebedd3f5;border-color:#cfdaad;animation:context-in .18s ease-out}.context-action>span{color:#64856b}.world-actions{align-items:flex-end}.help-card #restart{display:block;margin:18px auto 0}@keyframes context-in{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}@media(max-width:650px){.action{min-height:46px;min-width:111px}.world-actions{right:13px;bottom:79px;gap:7px}.icon-button{width:36px;height:36px;min-width:36px;min-height:36px}.stats{gap:6px}.heart-count{padding-right:8px}.action b{font-size:12px}.touch-zone{bottom:95px}}@media(max-width:350px){.brand{font-size:17px}.brand-heart{font-size:18px}.heart-count{gap:4px}.icon-button{width:32px;height:36px;min-width:32px}.stats{gap:4px}.action{min-width:105px}}
/* Photo strip stays readable and saveable on small, landscape and Retina screens. */
.postcard-card{width:380px;padding:24px 26px;display:flex;flex-direction:column;align-items:center;gap:12px;max-height:calc(100% - 24px)}
.postcard-card h2{font-size:22px;margin:0}
.postcard-card canvas{width:auto;height:auto;max-width:100%;max-height:min(48vh,470px);aspect-ratio:900/1320;object-fit:contain;touch-action:auto;box-shadow:0 3px 12px #48604720}
.postcard-card .primary{margin:0;min-height:46px;flex:none}
.postcard-card .text-button{margin:0;min-height:40px;flex:none}
.postcard-card #save-status{font-size:12px;margin:0;line-height:1.3}
.postcard-card #save-status:empty{display:none}
@media(max-height:520px){.postcard-card{padding:16px;gap:6px}.postcard-card canvas{max-height:35vh}.postcard-card h2{font-size:18px}.postcard-card .primary{padding:9px;min-height:42px}}
@media(prefers-reduced-motion:reduce){.toast,.context-action{transition:none;animation:none}}

/* Preserve touch selection and callout protection for park controls. */
button,button *,a.brand,a.brand *,.touch-zone,.touch-zone *,.world-actions,.world-actions *{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}.world-actions button,.touch-zone{touch-action:none}canvas#game{-webkit-touch-callout:none;user-select:none;-webkit-user-select:none}.help-card p,.help-card li{user-select:text;-webkit-user-select:text}.postcard-card canvas{touch-action:auto;-webkit-touch-callout:default}
.help-links{display:flex;justify-content:space-between;gap:12px}.help-card .help-links #restart{margin:14px 0 0}.help-links .text-button{margin:14px 0 0;min-height:40px}
#stat-symbol{font-size:inherit;margin:0}
