:root{color-scheme:dark;--bg:#102b35;--panel:#16343e;--border:#5d7d83;--cream:#fff1d7;--muted:#b6ccce;--lime:#f1ce88;--gold:#f0ca7c;font-family:-apple-system,BlinkMacSystemFont,'PingFang SC','Microsoft YaHei',sans-serif;font-size:16px}
*{box-sizing:border-box}[hidden]{display:none!important}html,body{height:100%;margin:0}body{height:100dvh;background:#091e29;color:var(--cream);overflow:hidden;overscroll-behavior:none}a{color:inherit;text-decoration:none}button{font:inherit;color:inherit;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}button:focus-visible,a:focus-visible,canvas:focus-visible{outline:3px solid #ffdc8a;outline-offset:2px}button:disabled{opacity:.5;cursor:default}button,a{-webkit-user-select:none;user-select:none}button{transition:background .12s,transform .12s,box-shadow .12s}button:disabled:active{transform:none}
.game-layout{height:100%;max-width:1240px;margin:auto;padding:16px}.game-shell{position:relative;height:100%;display:flex;flex-direction:column;background:var(--panel);border:1px solid #6f8e6266;border-radius:20px;overflow:hidden;box-shadow:0 14px 55px #071b1b55}
.game-topbar{flex-shrink:0;display:grid;grid-template-columns:44px minmax(0,1fr) auto 48px 44px;align-items:center;gap:10px;height:62px;padding:8px 16px;background:#112c37;border-bottom:1px solid #92b8c025}.back-center{display:grid;place-items:center;width:44px;height:44px;font-size:34px;line-height:1;color:#d9e5bc;border-radius:12px}.back-center:hover{background:#30563c}.location{font-size:17px;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;letter-spacing:.4px}.hud-button{min-width:44px;min-height:44px;border:1px solid #97b38455;border-radius:12px;background:#203f49;font-size:14px;padding:0 7px;color:#ecf1e5}.hud-button:active{background:#3d6447}.menu-button{font-size:20px}.resources{display:flex;align-items:center;gap:19px;padding-right:6px}.resources b{font-size:16px;font-weight:650;font-variant-numeric:tabular-nums}.health{display:flex;flex-direction:column;gap:4px;min-width:45px}.health-value{display:flex;align-items:center;gap:5px;line-height:18px}.heart{color:#ffa98e;font-size:18px}.health-track{width:45px;height:4px;border-radius:4px;background:#38565d;overflow:hidden}.health-track i{display:block;width:100%;height:100%;background:#f5ad88;transition:width .2s}.coins{display:flex;align-items:center;gap:5px;color:#ffdf8d}.coins>span{font-size:21px;line-height:1}
.objective-strip{flex-shrink:0;display:flex;align-items:center;gap:12px;min-height:65px;padding:11px 21px;background:#193a44;color:#f3e9cf;border-bottom:1px solid #6c8f9340}.objective-mark{display:grid;place-items:center;flex-shrink:0;width:32px;height:32px;border-radius:10px;background:#d8b56622;color:#f0cf86;font-size:22px}.objective-copy{min-width:0;display:flex;flex-direction:column;gap:4px}.objective-copy strong{font-size:16px;line-height:1.35;font-weight:650}.objective-copy>span{font-size:13px;line-height:1.4;color:#aec8c9}
.canvas-wrap{position:relative;flex:1;min-height:0;overflow:hidden;background:#16333d}canvas{display:block;width:100%;height:100%;touch-action:none;image-rendering:auto;outline:none;cursor:crosshair}.view-buttons{position:absolute;right:12px;top:12px;display:flex;gap:7px}.view-buttons button{min-width:44px;min-height:44px;padding:7px 11px;border:1px solid #a1c4c55c;border-radius:12px;background:#102e3aed;color:#f1f4d6;font-size:21px;box-shadow:0 3px 9px #122d2344}.view-buttons button span{font-size:14px}.view-buttons button.active,.view-buttons button[aria-pressed=true]{background:#dfe9b1;color:#294532;border-color:#edf4ce}.canvas-toast{position:absolute;bottom:12px;left:50%;transform:translateX(-50%);width:max-content;max-width:min(90%,500px);max-height:96px;overflow:hidden;pointer-events:none;border:1px solid #b7cf86aa;border-radius:13px;padding:11px 16px;background:#143b2ef5;color:#fff5d8;text-align:center;font-size:14px;line-height:1.5;box-shadow:0 5px 20px #09271d55;opacity:0;transition:opacity .2s}
.game-bottom{position:relative;flex-shrink:0;display:flex;align-items:center;justify-content:space-between;gap:30px;height:156px;padding:8px max(24px,calc((100% - 600px)/2));background:linear-gradient(180deg,#173b45,#102b35);border-top:1px solid #acc7c32e}.mobile-pad{display:grid;grid-template-columns:repeat(3,44px);grid-template-rows:repeat(3,44px);gap:4px;width:140px;height:140px;flex-shrink:0;touch-action:none;-webkit-user-select:none;user-select:none}.mobile-pad button{min-width:44px;min-height:44px;padding:0;border:1px solid #86a9ae55;border-radius:12px;background:#264952;color:#e6eeee;box-shadow:0 3px 0 #071f29;font-size:18px;touch-action:none}.mobile-pad button:active,.mobile-pad button.is-held{background:#afcc8b;color:#294b32;transform:translateY(2px);box-shadow:0 1px 0 #071f29}.mobile-pad button[data-move="0,-1"]{grid-area:1/2}.mobile-pad button[data-move="-1,0"]{grid-area:2/1}.mobile-pad button[data-move="0,1"]{grid-area:3/2}.mobile-pad button[data-move="1,0"]{grid-area:2/3}.mobile-pad>span{grid-area:2/2;display:grid;place-items:center;color:#72949b;font-size:35px;font-weight:700;line-height:1}.context-controls{width:290px;min-width:0;display:flex;flex-direction:column;gap:10px}.context-copy{min-height:42px}.context-copy strong{display:block;font-size:15px;line-height:1.4;font-weight:600;color:#f5dfb4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.context-copy p{margin:4px 0 0;color:#adc7c9;font-size:13px;line-height:1.5;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.context-actions{display:flex;gap:8px}.context-actions button{min-height:52px;border:1px solid #ffedba;border-radius:14px;padding:10px 14px;background:#efd294;color:#3f3522;box-shadow:0 4px 0 #957447;font-size:17px;font-weight:650;white-space:nowrap}.context-actions button:active{transform:translateY(2px);box-shadow:0 2px 0 #957447}#interact{flex:1;min-width:0}#interact:disabled{opacity:1;background:#203e49;border-color:#7da1a52b;color:#a5bec1;box-shadow:none;font-size:14px;font-weight:500}#observe{flex-shrink:0;min-width:52px;padding:9px;font-size:14px;font-weight:500;background:#264751;color:#dae9df;border-color:#7fa3aa;box-shadow:0 3px 0 #0b2630}
/* Dialogues hold equipment, discoveries and settings until they are needed. */
dialog{width:min(480px,calc(100vw - 24px));max-height:calc(100dvh - 30px);overflow:auto;color:#f5f4df;background:#183742;border:1px solid #a9c881;border-radius:21px;box-shadow:0 20px 100px #0b2318aa;padding:27px;overscroll-behavior:contain}dialog::backdrop{background:#102a20b8;backdrop-filter:blur(4px)}.modal-eyebrow{font-size:12px;letter-spacing:1px;color:#b8d49c;margin:0 0 11px}.modal-title{font-size:25px;line-height:1.4;margin:0 0 13px}.modal-description{font-size:16px;line-height:1.8;white-space:pre-line;color:#cadcdb}.modal-art{font-size:53px;text-align:center;margin:16px}.modal-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:23px}.modal-actions button{min-height:48px;padding:12px 15px;border:1px solid #a6c5c15c;border-radius:11px;background:#2b4b55;color:#f0f6d7;font-size:15px;flex:1;white-space:nowrap}.modal-actions .primary,.shop-item button{background:#efd294;color:#413820;border-color:#ffe9b4;font-weight:650}.shop-items{display:flex;flex-direction:column;gap:11px;margin:21px 0}.shop-item{display:flex;align-items:center;justify-content:space-between;border:1px solid #8aafae4d;padding:13px;border-radius:11px;gap:12px}.shop-item strong{display:block;font-size:15px;line-height:1.6}.shop-item small{display:block;color:#b8cdcc;font-size:13px;line-height:1.6;margin-top:5px}.shop-item button{border-radius:9px;border:0;padding:10px;min-height:46px;flex-shrink:0;font-size:14px}.battle-health{height:9px;background:#4e7146;border-radius:6px;overflow:hidden;margin:13px 0}.battle-health i{display:block;height:100%;background:#ffa87f}.event-log{border-left:3px solid #cce68f;padding-left:12px;line-height:1.7;font-size:15px;color:#e3edc2}.guide-lines{display:flex;flex-direction:column;gap:17px;color:#c6d9d8;font-size:16px;line-height:1.8}.guide-lines b{color:#fbf4d1}.menu-status{background:#365e3f;border:1px solid #6f955b;border-radius:11px;padding:13px;font-size:14px;line-height:1.8;color:#deebbf}.menu-links{display:flex;flex-wrap:wrap;gap:8px;margin-top:15px}.menu-links button{font-size:14px;min-height:46px;padding:10px 13px;background:#254853;border:1px solid #8dafaa66;border-radius:9px;color:#edf0de}.menu-links a{padding:12px 13px;font-size:14px;min-height:46px;border-radius:9px;border:1px solid #8dafaa66;color:#f0e9bf}
@media(max-width:820px),(pointer:coarse){.game-layout{max-width:none;padding:0}.game-shell{border:0;border-radius:0;box-shadow:none}.game-topbar{height:calc(58px + env(safe-area-inset-top));padding:calc(7px + env(safe-area-inset-top)) 10px 7px;gap:7px;grid-template-columns:44px minmax(0,1fr) auto 46px 44px}.back-center{width:44px;min-height:44px}.location{font-size:15px;letter-spacing:0}.hud-button{min-width:44px;border-radius:11px;font-size:13px}.menu-button{font-size:19px}.resources{gap:11px;padding-right:3px}.resources b{font-size:14px}.health{min-width:38px;gap:3px}.health-value{gap:4px}.heart{font-size:16px}.health-track{width:38px}.coins{gap:4px}.coins>span{font-size:19px}.objective-strip{min-height:64px;padding:10px 13px;gap:10px}.objective-mark{width:28px;height:30px;border-radius:9px;font-size:21px}.objective-copy strong{font-size:15px}.objective-copy>span{font-size:13px;line-height:1.35}.view-buttons{right:10px;top:10px;gap:6px}.view-buttons button{padding:7px 10px}.game-bottom{height:calc(156px + env(safe-area-inset-bottom));padding:8px 18px calc(8px + env(safe-area-inset-bottom));gap:22px}.context-controls{width:auto;flex:1;gap:10px}.context-copy strong{font-size:14px}.context-copy p{font-size:12px;line-height:1.5}.context-actions button{font-size:16px;padding:10px 11px}.canvas-toast{font-size:14px;max-width:92%;padding:10px 13px}dialog{padding:23px;max-height:calc(100dvh - 24px)}.modal-title{font-size:23px}.modal-actions button{min-height:49px}.modal-art{font-size:43px;margin:10px}.shop-item{padding:11px}}
@media(max-width:374px){.game-topbar{padding-left:6px;padding-right:7px;gap:4px;grid-template-columns:44px minmax(0,1fr) auto 44px 44px}.back-center{width:44px}.location{font-size:14px}.resources{gap:8px}.resources b{font-size:13px}.game-bottom{padding-left:12px;padding-right:12px;gap:14px}.context-copy p{font-size:12px}.context-actions button{padding-left:7px;padding-right:7px;font-size:15px}#observe{min-width:46px;padding:7px;font-size:13px}.objective-strip{padding-left:11px;padding-right:11px;gap:8px}.objective-copy strong{font-size:14px}.objective-copy>span{font-size:12px}}
@media(max-height:540px) and (orientation:landscape) and (max-width:1100px){.game-shell[data-input=touch]{border:0;border-radius:0}.game-shell[data-input=touch] .game-topbar{height:52px;padding:4px calc(12px + env(safe-area-inset-right)) 4px calc(12px + env(safe-area-inset-left));grid-template-columns:44px minmax(0,1fr) auto 48px 44px}.game-shell[data-input=touch] .objective-strip{min-height:54px;padding:7px 18px}.game-shell[data-input=touch] .objective-copy{gap:2px}.game-shell[data-input=touch] .objective-copy strong{font-size:14px}.game-shell[data-input=touch] .objective-copy>span{font-size:12px}.game-shell[data-input=touch] .canvas-wrap{margin:0 192px 0 158px}.game-shell[data-input=touch] .game-bottom{position:absolute;inset:106px 0 0;height:auto;padding:8px 12px;gap:0;pointer-events:none;background:transparent;border:0}.game-shell[data-input=touch] .mobile-pad,.game-shell[data-input=touch] .context-controls{pointer-events:auto}.game-shell[data-input=touch] .context-controls{width:166px;max-width:166px;flex:none;gap:12px}.game-shell[data-input=touch] .context-copy{min-height:0}.game-shell[data-input=touch] .context-copy p{-webkit-line-clamp:3}.game-shell[data-input=touch] .context-actions{flex-wrap:wrap}.game-shell[data-input=touch] .context-actions button{min-height:48px}.game-shell[data-input=touch] .view-buttons{top:8px;right:8px}.game-shell[data-input=touch] .view-buttons button{min-height:40px;min-width:42px;padding:6px 8px}.game-shell[data-input=touch] .canvas-toast{bottom:7px;font-size:12px;padding:7px 10px;max-width:94%;max-height:70px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important;animation:none!important}}

/* Quiet instrument panels frame the illustrated world. */
.game-shell{border-color:#77969745;box-shadow:0 24px 80px #030e1666,inset 0 1px #d7e5d422}.game-topbar{background:linear-gradient(180deg,#1c3944,#122d38);box-shadow:inset 0 1px #b8d4d11a}.hud-button{border-color:#a4c2c328;background:linear-gradient(#28464f,#1d3943);box-shadow:inset 0 1px #b2cdca16}.objective-strip{background:linear-gradient(110deg,#1d404b,#193740);border-color:#93b1ac29;box-shadow:inset 0 1px #c1d5c915}.objective-mark{border-radius:50%;box-shadow:inset 0 0 0 1px #d7b87540}.view-buttons button{backdrop-filter:blur(12px);box-shadow:0 4px 14px #071b2855,inset 0 1px #d4e0d218}.game-bottom{box-shadow:inset 0 1px #c4d6c915}.mobile-pad{position:relative;border-radius:50%;background:radial-gradient(ellipse,#061e2b55,transparent 68%)}.mobile-pad button{background:linear-gradient(155deg,#36575e,#23434d);box-shadow:0 4px 0 #081f29,0 5px 8px #04151e38,inset 0 1px #c4d8cc3d;border-color:#88abae5e;text-shadow:0 1px 2px #071f29}.mobile-pad button:active,.mobile-pad button.is-held{background:linear-gradient(155deg,#a4bfaa,#7c9e92);color:#16313a;box-shadow:0 1px 0 #081f29,inset 0 1px #e5ecd399}.context-actions #interact:not(:disabled){background:linear-gradient(145deg,#fff0bc,#e8c27b);border:1px solid #ffeab4;border-bottom-color:#b48b4e;box-shadow:0 4px 0 #957447,0 6px 12px #071e2938,inset 0 1px #fff8d8;text-shadow:0 1px #fff0bc99}.context-actions #interact:not(:disabled):active{box-shadow:0 1px 0 #957447,inset 0 2px 4px #9f703433;transform:translateY(3px)}.canvas-toast{background:#102d39f5;border-color:#e7c78175;box-shadow:0 7px 25px #05172166}.modal-title{color:#f8dfad;letter-spacing:.5px}dialog{border-color:#93b3af66;background:linear-gradient(145deg,#234752,#122f3b);box-shadow:0 28px 100px #04131acc,inset 0 1px #d9e4d326}dialog[open]{animation:open-panel .18s ease-out}.modal-actions .primary,.shop-item button{background:linear-gradient(145deg,#fff0bb,#e4bf7c);box-shadow:0 2px 0 #927041}.shop-item{background:#09293833}.game-topbar b.value-changed{animation:resource-pulse .5s ease-out}.game-topbar .health.low .heart{color:#ff8e89}.game-topbar .health.low .health-track i{background:#ff8e89}.game-topbar .health.low b{color:#ffb4a3}@keyframes resource-pulse{40%{color:#fff1bd;transform:translateY(-2px) scale(1.17)}}@keyframes open-panel{from{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:none}}
@media(max-height:540px) and (orientation:landscape) and (max-width:1100px){.game-shell[data-input=touch] .game-bottom{box-shadow:none;background:transparent}}

/* Controls live in the menu; contextual keycaps stay small on the play surface. */
dialog[data-mode=help]{width:min(650px,calc(100vw - 24px))}.help-goal{padding:12px 15px;background:#0c29344d;border-radius:12px;border-left:3px solid #d9b471;margin-bottom:17px}.help-goal span{display:block;color:#afc7c8;font-size:14px;margin-bottom:5px}.help-goal strong{font-size:16px;line-height:1.5;font-weight:600}.help-switch{display:flex;gap:6px;padding:4px;border-radius:12px;background:#09232e80}.help-switch button{flex:1;border:1px solid transparent;background:transparent;border-radius:9px;padding:10px;min-height:44px;font-size:15px;color:#b9d0d2}.help-switch button[aria-pressed=true]{background:#31525b;border-color:#8ba8a866;color:#ffdfaa;box-shadow:0 2px 5px #061a2366}.keyboard-help{display:grid;grid-template-columns:1.2fr 1fr;gap:24px}.controls-reference h3{font-size:15px;color:#f6d99e;margin:21px 0 8px}.control-row{display:flex;justify-content:space-between;align-items:center;gap:8px;min-height:45px;padding:8px 0;border-bottom:1px solid #a3c2be24;font-size:14px;color:#e0e9e6;line-height:1.5}.control-keys{display:flex;justify-content:flex-end;gap:4px;flex-wrap:wrap;flex-shrink:0;max-width:135px}kbd{display:inline-block;white-space:nowrap;font-size:13px;line-height:1.45;font-family:inherit;padding:2px 6px;min-width:24px;text-align:center;border:1px solid #a8c4c155;border-bottom-width:3px;border-radius:5px;background:#365660;color:#fff0c9}.help-note{font-size:14px;line-height:1.7;color:#b8ced0;margin:16px 0}.help-reminder{font-size:14px;line-height:1.8;padding:13px 15px;background:#42626433;border-radius:10px;color:#d9e4dc;margin-top:16px}.touch-help{display:grid;gap:14px;margin-top:20px}.touch-help b{font-size:16px;color:#f6d99e}.touch-help p{font-size:16px;line-height:1.7;color:#c6d9d8;margin:5px 0 0}dialog[data-mode=help] .modal-description:empty{display:none}.game-shell[data-input=keyboard] [data-shortcut]::after{content:attr(data-shortcut);display:inline-block;vertical-align:middle;font-size:12px;line-height:18px;min-width:20px;margin-left:8px;border:1px solid currentColor;border-radius:4px;opacity:.65;text-align:center;font-weight:500}.game-shell[data-input=keyboard] #interact:disabled::after{display:none}
@media(max-width:560px){.keyboard-help{grid-template-columns:1fr;gap:0}.keyboard-help h3{margin-top:18px}.control-row{min-height:41px}.control-keys{max-width:165px}}


/* Keep orientation and feedback close to the action. */
.map-overview-note{position:absolute;bottom:10px;left:10px;right:10px;display:flex;justify-content:center;gap:13px;padding:8px 10px;border-radius:10px;background:#102b35ed;border:1px solid #71979a33;color:#c4d9d7;font-size:13px;line-height:1.4;pointer-events:none}.map-overview-note span+span{color:#f4d89d}.map-open .canvas-toast{bottom:53px}.map-open .canvas-wrap{background:#102b35}
.modal-heading{position:sticky;top:-27px;z-index:3;display:flex;align-items:center;justify-content:space-between;gap:12px;margin:-27px -27px 17px;padding:18px 20px 12px 27px;background:linear-gradient(#214550 80%,#1e404beb);border-bottom:1px solid #83aaa532;backdrop-filter:blur(12px);border-radius:20px 20px 0 0}.modal-heading .modal-title{margin:0;min-width:0;font-size:23px;letter-spacing:0}.modal-close{flex-shrink:0;display:grid;place-items:center;width:44px;height:44px;padding:0;font-size:28px;line-height:1;background:#102b3555;border:1px solid #8caaa442;border-radius:12px;color:#c6d9d8}.modal-close:hover{background:#42636b;color:#fff0c9}.modal-title:focus{outline:none}dialog .modal-description:empty{display:none}
.shop-wallet{display:flex;align-items:center;gap:20px;padding:14px 16px;border-radius:13px;background:#102c3880;border:1px solid #99b9ab35;min-height:91px}.shop-wallet>div{flex-shrink:0}.shop-wallet span{display:block;font-size:13px;color:#b5cccc;margin-bottom:5px}.shop-wallet strong{display:block;font-size:24px;line-height:1.2;color:#ffe09b;font-variant-numeric:tabular-nums}.shop-wallet p{border-left:1px solid #87aaa340;padding-left:17px;margin:0;color:#c7d9d5;font-size:14px;line-height:1.6}.shop-wallet .purchased{color:#f8dfa5}.shop-item{transition:border-color .2s,background .2s}.shop-item small b{font-weight:650;color:#f7dda8;white-space:nowrap}.shop-item[data-purchased=true]{border-color:#d6bb7e;background:#344f4d}.shop-item:focus{outline:2px solid #e9c983;outline-offset:3px}.shop-item button{min-width:76px;box-shadow:0 3px 0 #927041}.shop-item button:disabled{box-shadow:none}.shop-item button:active:not(:disabled){transform:translateY(2px);box-shadow:0 1px 0 #927041}
@media(max-width:820px),(pointer:coarse){.modal-heading{top:-23px;margin:-23px -23px 16px;padding:14px 15px 11px 23px}.modal-heading .modal-title{font-size:21px}.shop-wallet{padding:12px 13px;gap:14px}.shop-wallet p{padding-left:13px}.map-overview-note{font-size:12px;gap:10px}}
@media(max-height:540px) and (orientation:landscape) and (max-width:1100px){.game-shell[data-input=touch] .map-overview-note{font-size:12px;gap:8px;bottom:5px;padding:5px}.game-shell[data-input=touch] .map-overview-note span:first-child{display:none}dialog[data-input=touch] .modal-heading{padding-top:8px;padding-bottom:7px}}

.shop-instruction{font-size:15px;line-height:1.65;margin:17px 0 12px;color:#f7dfa7}.shop-instruction .shop-key-help{display:block;font-size:13px;color:#b9d0d1;margin-top:4px}.shop-item .shop-buy{min-width:120px;min-height:60px;padding:9px 10px}.shop-buy-label{display:flex;align-items:center;justify-content:center;gap:6px;font-size:15px;font-weight:650;white-space:nowrap}.shop-price{display:block;font-size:13px;line-height:1.5;margin-top:4px;font-weight:500}.shop-price:empty{display:none}.shop-buy kbd{font-size:12px;min-width:19px;padding:0 3px;background:#705b2a18;color:inherit;border-color:#7f633c66}.shop-item .shop-buy:disabled{opacity:.65;background:#284650;color:#c8d6d2;border:1px solid #6f929555}.shop-item .shop-buy:disabled kbd{display:none}.shop-item>div{min-width:0}.shop-instruction+.shop-items{margin-top:12px}
@media(pointer:fine){.game-shell[data-input=keyboard] .view-buttons [data-shortcut]::after{display:inline-block!important;font-size:12px;margin-left:6px}.view-buttons button{white-space:nowrap}}
dialog[data-input=touch] .shop-key-help{display:none!important}

@media(max-width:374px){.shop-item .shop-buy{min-width:108px;padding:8px}.shop-buy-label{font-size:14px}.shop-item{gap:9px;padding:10px}.shop-item strong{font-size:14px}}
