:root{color-scheme:light;--paper:#e9e5d4;--cream:#fbf3d9;--ink:#494738;--muted:#8a866a;--line:#b9b18d;--yellow:#efc65e;--coral:#c97f58;--green:#71895a;--blue:#637d91;--mono:"SFMono-Regular",Consolas,monospace;--sans:Inter,Pretendard,-apple-system,BlinkMacSystemFont,"Apple SD Gothic Neo","Noto Sans KR",sans-serif}*{box-sizing:border-box}html{scroll-behavior:smooth;scroll-padding-top:16px}body{margin:0;background:var(--paper);color:var(--ink);font:13px var(--sans);-webkit-font-smoothing:antialiased;background-image:linear-gradient(90deg,#c7c4aa18 1px,transparent 1px),linear-gradient(#c7c4aa18 1px,transparent 1px);background-size:8px 8px}button,select,textarea{font:inherit}button,select,input{cursor:pointer}button,a,select,input{-webkit-tap-highlight-color:transparent}button:disabled{opacity:.42;cursor:not-allowed}button,select,textarea,a,input{outline-offset:4px}button:focus-visible,select:focus-visible,textarea:focus-visible,a:focus-visible,input:focus-visible,summary:focus-visible{outline:2px solid var(--blue)}a{color:inherit;text-decoration:none}button,select{transition:background .12s,transform .12s}button:not(:disabled):active{transform:translateY(2px)}select{color:var(--ink);background:#f6efd9;border:1px solid #b7b38d;border-radius:0;padding:8px;font-size:10px;max-width:100%}h1,h2,h3,p{margin:0}[hidden]{display:none!important}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
.game-titlebar{max-width:1536px;margin:auto;padding:22px 31px 19px;display:flex;align-items:center;justify-content:space-between;gap:25px}.brand{display:flex;gap:15px;align-items:center;min-width:0}.brand h1{font-size:23px;font-weight:800;letter-spacing:-1px;line-height:1.45;word-break:keep-all}.brand-kicker{display:block;font:8px var(--mono);letter-spacing:1.4px;color:#989272;margin-bottom:5px}.brand-milk{display:block;width:25px;height:33px;flex-shrink:0;position:relative;background:linear-gradient(#fff7d9 60%,#8aadb9 60%,#8aadb9 85%,#fff7d9 85%);border:2px solid #6d775f;box-shadow:3px 3px 0 #c4c5a5}.brand-milk:before{content:"";position:absolute;left:0;right:0;top:-8px;height:6px;background:#8dabb4;border:2px solid #6d775f}.titlebar-right{display:flex;gap:22px;align-items:center;flex-shrink:0;font-size:10px;color:#888566}.titlebar-right a>span{display:inline-grid;place-items:center;width:17px;height:17px;margin-left:6px;border:1px solid #bab597;font:11px var(--mono)}.local-badge{display:flex;align-items:center;gap:6px;font:8px var(--mono);letter-spacing:.5px;color:#7d8b68}.local-badge i{display:block;width:5px;height:5px;background:#88a368}.game-shell{max-width:1536px;margin:auto;padding:0 31px}.game-layout{display:grid;grid-template-columns:minmax(0,2.4fr) minmax(300px,1fr);gap:18px;align-items:start}.world-panel{min-width:0}.game-hud{display:flex;gap:12px;align-items:center;border:2px solid #858e6d;border-bottom:0;padding:13px 15px;background:#dfe5cd;box-shadow:inset 0 1px 0 #f7f8e7}.hud-quest{min-width:0;flex:1}.section-label{font:7px var(--mono);letter-spacing:1px;color:#92967a}.hud-quest .section-label{font-size:6px;color:#92a27c;letter-spacing:1.3px}.hud-quest h2{font-size:15px;font-weight:700;letter-spacing:-.4px;margin-top:5px}.hud-quest p{font-size:9px;color:#8c9478;line-height:1.5;margin-top:4px;max-width:420px}.scenario-picker{max-width:195px}.scenario-picker select{background:#eef0dd;border-color:#b7c09c;font-size:9px;max-width:185px;padding:7px}.status-pill{border:1px solid #a5b483;background:#edf3d7;color:#7a8e57;padding:6px 8px;font-size:9px;font-weight:550;white-space:nowrap;max-width:110px;overflow:hidden;text-overflow:ellipsis}.world-frame{border:2px solid #858e6d;background:#acc18b;box-shadow:3px 3px 0 #bdc2a4;overflow:hidden}.world-label{display:flex;align-items:center;justify-content:space-between;gap:12px;background:#6c7f5d;color:#eef0d4;padding:8px 11px;font-size:8px}.world-label>span:first-child{display:flex;align-items:center;gap:7px}.world-label i{width:4px;height:4px;background:#e4d487;display:block}.world-label>span:last-child{color:#c6d1ad;font-size:7px}.game-board{width:100%;display:grid;place-items:center;background:#aabd86;image-rendering:pixelated;min-height:250px;overflow:hidden}.game-board svg{display:block;width:100%;height:auto;image-rendering:pixelated}.world-caption{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:7px 11px;background:#d8e1bd;border-top:2px solid #82966a;color:#7b8f60;font-size:8px}.route-control{display:flex;align-items:center;gap:6px;cursor:pointer;white-space:nowrap}.route-control input{width:10px;height:10px;accent-color:#7d9860;margin:0}.child-dialogue{display:flex;align-items:center;gap:14px;margin-top:13px;border:2px solid #9c9171;box-shadow:3px 3px 0 #d0c7a8,inset 0 0 0 2px #fff9df;background:#fbf1d5;padding:11px 13px;min-height:86px;position:relative}.portrait-frame{position:relative;width:61px;height:61px;flex-shrink:0;border:2px solid #b1a280;background:#e4ddba;box-shadow:inset 2px 2px 0 #c8c09d;display:flex;justify-content:center;align-items:center;overflow:hidden}.portrait-frame img{image-rendering:pixelated;width:56px;height:56px;object-fit:contain;transform:translateY(-3px)}.portrait-frame>span{position:absolute;bottom:0;left:0;right:0;background:#918363;color:#fff1cf;font-size:6px;letter-spacing:.5px;text-align:center;padding:2px 0}.dialogue-copy{min-width:0;flex:1;padding-right:12px}.speaker-name{font-size:10px;font-weight:700;color:#927443}.speaker-name>span{font-size:7px;color:#b3a078;font-weight:400;margin-left:8px}.dialogue-copy p{font-size:13px;font-weight:500;line-height:1.8;color:#796a4a;margin-top:6px;word-break:keep-all}.dialogue-next{position:absolute;right:11px;bottom:10px;font-size:8px;color:#b5a478;animation:dialogue-bob 1.2s steps(2,end) infinite}.telemetry{display:flex;align-items:center;gap:22px;padding:15px 7px 13px;border-bottom:1px solid #c6c6a8}.telemetry>div>span,.speed-control>span{font-size:8px;color:#98977a;display:block;margin-bottom:5px}.telemetry strong{display:block;font:17px var(--mono);font-weight:650;letter-spacing:-.7px;color:#657856}.telemetry small{font:8px var(--sans);color:#98a07f;margin-left:4px}.speed-control{margin-left:auto;display:flex;align-items:center;gap:8px}.speed-control>span{margin-bottom:0}.speed-control select{background:#e8ebd6;border-color:#bfc7a5;color:#879875;font-size:9px;padding:6px}.panel-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}.panel-heading h2,.panel-heading h3{font-size:12px;font-weight:700;letter-spacing:-.3px;display:flex;align-items:center;gap:6px}.basket-section{padding:15px 4px 0}.basket-section h3{color:#7e8d65}.basket-section h3>span{font-size:17px;line-height:1}.basket-list{display:grid;grid-template-columns:repeat(9,minmax(0,1fr));gap:6px;margin-top:10px}.item-chip{min-width:0}.basket-list>.item-chip{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-height:69px;padding:8px 2px 6px;background:#dce1c9;border:2px solid #aeb991;box-shadow:inset 2px 2px 0 #c7d0b0,inset -1px -1px 0 #f0f2df;color:#758663;font-size:9px;text-align:center}.item-mini{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:27px;height:27px}.item-mini svg{width:29px;height:29px;image-rendering:pixelated}.basket-list .is-empty{color:#a5ad92;border-color:#c4caaf;background:#e4e7d6;box-shadow:inset 1px 1px 0 #d0d7bc}.basket-list .is-empty .item-mini{opacity:.34}.basket-list strong{font:12px var(--mono);color:#6d825c}.itinerary-section{padding:15px 4px 0}.itinerary-section h3{font-size:10px;color:#8a9477}.route-list{display:flex;flex-wrap:wrap;gap:4px;margin-top:8px}.route-list>span{padding:4px 6px;background:#e0e6cd;border:1px solid #bac5a0;color:#829466;font-size:8px}.route-list .route-empty{background:transparent;border:0;color:#a1aa8b;padding:0;font-size:9px}.route-list .route-arrow{background:none;border:0;padding:3px 0}.route-list .is-visited{background:#c9d9b6;border-color:#a1b686;color:#6b8555}.route-list .is-current{background:#f3df9c;border-color:#c7b16c;color:#a18743}.map-reference{font-size:8px;line-height:1.7;color:#a4a48a;padding:12px 4px 0;word-break:keep-all}.map-reference a{color:#8d9b76;text-decoration:underline;text-underline-offset:2px;white-space:nowrap}
.quest-panel{border:2px solid #ad9a70;box-shadow:3px 3px 0 #c8bea0;background:#fbf0cf;min-width:0}.brief-section{padding:15px 16px 17px;background:#f8eac0;border-bottom:1px dashed #ccb785}.quest-tab{font:8px var(--mono);letter-spacing:.8px;color:#aa8b48;padding-bottom:13px;margin-bottom:12px;border-bottom:1px solid #dfcfa2}.quest-tab>span{font-size:11px;margin-right:5px;color:#bd9654}.brief-section h2{font-size:14px;color:#8c6e3f}.secret-label{font-size:7px;padding:3px 4px;border:1px solid #d9c493;color:#b09965;white-space:nowrap}.section-description{font-size:9px;line-height:1.8;color:#aa9566;margin-top:8px;word-break:keep-all}.intended-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-top:12px}.intended-list>.item-chip{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-height:69px;padding:8px 4px;background:#fff6da;border:1px solid #d4bc82;box-shadow:inset 1px 1px 0 #fffbed;font-size:10px;text-align:center;color:#8e7649}.intended-list .is-empty{display:none}.intended-list strong{font:13px var(--mono);font-weight:650}.intended-list .item-mini svg{width:30px;height:30px}.shop-guide-section{padding:13px 15px;border-bottom:1px dashed #ccb785;background:#f3e7c2}.shop-guide-section summary{display:flex;align-items:center;justify-content:space-between;list-style:none;cursor:pointer;font-size:11px;font-weight:650;color:#9a7d4b}.shop-guide-section summary::-webkit-details-marker{display:none}.guide-book{font-size:16px;font-weight:400;margin-right:5px;color:#b2945b}.summary-arrow{font-size:10px;color:#bdab80}.shop-guide-section:not([open]) .summary-arrow{transform:rotate(-90deg)}.guide-description{font-size:8px;line-height:1.7;margin-top:8px;color:#b09e74}.shop-guide{display:grid;grid-template-columns:1fr;gap:5px;margin-top:10px;max-height:181px;overflow:auto;scrollbar-width:thin;scrollbar-color:#c7b484 transparent;padding-right:3px}.shop-guide>article,.shop-guide>div,.shop-guide>li{padding:7px 8px;background:#faf0d2;border:1px solid #dfcfa5;list-style:none;font-size:9px;line-height:1.7;color:#a48b5b}.shop-guide h3,.shop-guide strong{font-size:10px;color:#947746;font-weight:650}.shop-guide p{font-size:9px;line-height:1.7;margin-top:3px;word-break:keep-all}.shop-guide .guide-items,.shop-guide .shop-items{color:#b3a075;font-size:8px}.shop-guide button{background:#ece1bc;border:1px solid #d0bd8f;font-size:8px;color:#99804e;padding:4px 6px;margin-top:5px}.shop-guide .item-mini{width:18px;height:18px}.shop-guide .item-mini svg{width:19px;height:19px}.command-section{padding:17px 15px 14px;border-bottom:1px dashed #ccb785}.command-section h2{font-size:12px;color:#94723f}.instruction-formula{display:flex;align-items:center;justify-content:flex-start;gap:5px;margin-top:10px;color:#b49d69;font-size:8px}.instruction-formula>span{padding:3px 5px;border:1px solid #e3d2a5;background:#f8edcd}.instruction-formula b{font-weight:400;color:#c6b27f}.command-box{margin-top:10px;background:#fff9e4;border:1px solid #b9a16a;box-shadow:inset 2px 2px 0 #e9ddb7}.command-box:focus-within{outline:2px solid #d4b767;outline-offset:1px}.command-box textarea{display:block;width:100%;min-height:123px;max-height:280px;border:0;outline:0!important;resize:vertical;background:transparent;padding:12px 11px;color:#806e48;font-size:11px;line-height:1.9;letter-spacing:-.2px}.command-box textarea::placeholder{color:#b7a77c}.command-box textarea:disabled{background:#eee7ce;color:#b4a883}.command-rule{font-size:8px;line-height:1.7;color:#ae9560;margin-top:8px;word-break:keep-all}.command-presets{display:flex;flex-wrap:wrap;gap:4px;margin-top:9px}.command-presets button{background:#f3e6bf;border:1px solid #d8c18a;color:#a68a52;padding:5px 6px;font-size:8px}.command-presets button.selected,.command-presets button:hover:not(:disabled){background:#eed995;color:#987634;border-color:#bda063}.button{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:9px 10px;background:#f4e6bd;border:1px solid #bea777;border-radius:0;color:#9b7d48;font-size:10px;font-weight:550;line-height:1.4}.primary{background:#e5b756;border:2px solid #a88842;box-shadow:inset 1px 1px 0 #f9d781,2px 3px 0 #d4bd80;color:#715725;font-weight:750}.primary:hover:not(:disabled){background:#edc46c}.run-button{display:flex;width:100%;justify-content:flex-start;margin-top:13px;padding:10px 12px;font-size:12px;min-height:43px}.run-button>span:first-child{font-size:8px}.run-button>span:last-child{margin-left:auto;font-size:16px;font-weight:400}.playback-controls{display:flex;gap:6px;margin-top:8px}.secondary{flex:1;background:#f5eac8;border-color:#d5c08d;color:#aa925e;font-size:9px;padding:7px 5px;font-weight:450}.secondary:hover:not(:disabled){background:#edddb0}.connection-row{display:flex;gap:6px;margin-top:15px;padding-top:12px;border-top:1px solid #e2cf9f}.connection-row select{flex:1;min-width:0;font-size:9px;padding:7px 6px;border-color:#d4c49c;background:#f7efd6;color:#ab9870}.connect-button{font-size:9px;padding:6px 8px;border-color:#c2c4a0;background:#e7ecd3;color:#8c9c71}.ai-connection{display:flex;gap:6px;margin-top:8px;align-items:flex-start}.connection-dot{width:4px;height:4px;background:#9aab76;flex-shrink:0;margin-top:5px}.ai-connection strong{display:block;font-size:8px;font-weight:550;color:#a29b72;line-height:1.6}.ai-connection p{font-size:7px;line-height:1.6;color:#b9ae87;margin-top:2px;overflow-wrap:anywhere;word-break:keep-all}progress{display:block;width:100%;height:4px;margin-top:9px;accent-color:#9ca86d;border:0}progress::-webkit-progress-bar{background:#e5d9b7}progress::-webkit-progress-value{background:#a4ae78}.interpretation-section{padding:14px 15px 16px;background:#efe8ce}.interpretation-section h2{font-size:10px;color:#969974}.interpretation{padding:10px;background:#f7f2dc;border:1px solid #d5d3af;font-size:10px;color:#9a9d77;line-height:1.8;margin-top:9px;overflow-wrap:anywhere}.interpretation p{font-size:9px;line-height:1.8;margin-top:5px}.interpretation strong{display:block;color:#8d976e;font-size:10px;font-weight:550}.interpretation-source{display:inline-block;padding:2px 4px;font:7px var(--mono);line-height:1.5;background:#e1e9cd;color:#9aa87e;margin-bottom:5px}.interpretation ul{padding-left:16px;margin:6px 0}
.bottom-layout{display:grid;grid-template-columns:minmax(0,2.4fr) minmax(300px,1fr);gap:18px;margin-top:19px}.receipt-panel,.log-panel{border:1px solid #c7bea0;background:#f5eed9;padding:17px 18px;box-shadow:2px 2px 0 #d7cfb5}.receipt-panel{border-bottom:3px dotted #c4b58d;background:repeating-linear-gradient(180deg,#faf2da 0,#faf2da 23px,#f1e8ce 24px)}.receipt-panel h2{color:#9e8351}.receipt-placeholder{font-size:10px;line-height:1.9;color:#b2a077;margin-top:18px}.receipt-placeholder span{font-size:9px;color:#bcaf8b}.receipt-panel:has(#result-banner:not([hidden])) .receipt-placeholder{display:none}.result-banner{margin-top:15px}.receipt-summary{display:flex;gap:12px;align-items:flex-start}.receipt-stamp{display:grid;place-items:center;flex-shrink:0;width:32px;height:32px;background:#e8d6a3;border:1px solid #c5a86a;color:#ac8750;font-size:21px;transform:rotate(-7deg)}.receipt-summary h3{font-size:15px;color:#a4824b;letter-spacing:-.4px;line-height:1.6}.receipt-summary p{font-size:10px;line-height:1.8;color:#aa9470;margin-top:4px}.final-inventory-heading{display:flex;justify-content:space-between;align-items:center;font-size:10px;color:#a48b5a;margin-top:18px}.final-inventory-heading>span{font:7px var(--mono);color:#b9aa87;letter-spacing:.6px}.final-inventory{display:grid;grid-template-columns:repeat(9,minmax(0,1fr));gap:6px;margin-top:10px}.final-inventory>.item-chip{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;padding:8px 3px;min-height:67px;background:#f0e3c1;border:1px solid #d0bb8b;font-size:9px;color:#a08b61;text-align:center}.final-inventory .is-empty{opacity:.45}.final-inventory strong{font:12px var(--mono)}.receipt-lines{border-top:1px dashed #d5c29a;margin-top:16px;padding-top:8px;font:10px var(--mono);color:#a08a61}.receipt-row{display:grid;grid-template-columns:1fr 1fr 1fr;gap:10px;line-height:1.6;padding:6px 0;border-bottom:1px dotted #e3d4b2}.receipt-row>span:not(:first-child){text-align:right}.receipt-heading{font-size:8px;color:#b5a784}.receipt-mismatch{color:#b07d58}.receipt-total{padding-top:10px;line-height:1.8;color:#9b8659;font-weight:550}.receipt-note{font-size:9px;line-height:1.8;margin-top:8px;color:#b58c65}.retry-button{background:#e9d6aa;border-color:#c7ac74;font-size:9px;margin-top:14px}.retry-button:hover{background:#e0c58f}[data-success=true] .receipt-summary h3{color:#8a9b5b}[data-success=true] .receipt-stamp{background:#dbe7bd;color:#8ea05e;border-color:#b1c088}.log-panel{background:#e2e7d3;border-color:#bec8a3}.log-panel h2{color:#8b9a72}.log-panel .section-label{font-size:6px;color:#a3af8e}.run-log{list-style:none;padding:0;margin:14px 0 0;max-height:227px;overflow:auto;scrollbar-width:thin;scrollbar-color:#bdc9a4 transparent}.run-log>li{position:relative;border-left:1px solid #c3cfad;padding:0 0 11px 11px;margin-left:2px;font-size:9px;line-height:1.8;color:#97a37f;overflow-wrap:anywhere}.run-log>li:before{content:"";position:absolute;top:5px;left:-2px;width:4px;height:4px;background:#a3b68c}.run-log>li:last-child{border-color:transparent;padding-bottom:0}.run-log .log-number{display:block;font:7px var(--mono);color:#b1bc9d;margin-bottom:3px}.run-log .log-empty{border:0;padding:6px 0;color:#acb798}.run-log .log-empty:before{display:none}.run-log .log-warning,.run-log .log-error,.run-log .log-mismatch{color:#b28b64}.run-log .log-success,.run-log .log-collect{color:#819b61}.run-log .log-command{color:#98996a}.run-log strong{color:#8a9a6e;font-weight:600}.guide{padding:27px 0 24px;border-bottom:1px solid #cfccb4}.guide h2{font-size:12px;letter-spacing:-.3px;color:#9a9779;font-weight:550}.guide ol{list-style:none;display:grid;grid-template-columns:repeat(3,1fr);gap:32px;padding:0;margin:16px 0 0}.guide li{display:flex;gap:10px}.guide li>span{font:9px var(--mono);color:#b8b091;margin-top:3px}.guide h3{font-size:10px;line-height:1.6;color:#9c9c7d;font-weight:550}.guide p{font-size:9px;line-height:1.8;color:#afab8f;margin-top:5px;word-break:keep-all}.footer{max-width:1474px;margin:auto;padding:17px 0 22px;display:flex;align-items:center;justify-content:space-between;gap:18px;color:#aaa78b;font-size:8px}.footer>div{display:flex;gap:15px}.footer a{color:#9aa57e}.footer a:hover{color:#7f9462}@keyframes dialogue-bob{50%{transform:translateY(2px)}}
@media(min-width:1600px){.game-layout,.bottom-layout{grid-template-columns:minmax(0,2.55fr) minmax(330px,1fr)}}
@media(max-width:1150px){.game-titlebar{padding:19px 23px 17px}.game-shell{padding:0 23px}.brand h1{font-size:20px}.brand-kicker{font-size:7px}.game-layout,.bottom-layout{grid-template-columns:minmax(0,1.95fr) minmax(290px,1fr);gap:15px}.game-hud{padding:11px 12px;flex-wrap:wrap;gap:8px}.hud-quest{flex-basis:100%}.hud-quest p{display:none}.scenario-picker{margin-left:auto}.status-pill{font-size:8px;padding:5px 7px}.hud-quest{display:flex;align-items:center;gap:10px}.hud-quest h2{font-size:13px;margin-top:0}.hud-quest .section-label{font-size:6px}.game-hud .scenario-picker{margin-left:0}.basket-list{gap:4px}.basket-list>.item-chip{font-size:8px;min-height:62px;padding:6px 1px}.item-mini svg{width:26px;height:26px}.telemetry{gap:17px;padding-left:3px;padding-right:3px}.telemetry strong{font-size:15px}.telemetry>div>span{font-size:7px}.speed-control{gap:5px}.speed-control>span{display:none}.speed-control select{font-size:8px;padding:5px}.child-dialogue{gap:10px;padding:10px}.portrait-frame{width:54px;height:54px}.portrait-frame img{width:50px;height:50px}.dialogue-copy p{font-size:12px}.speaker-name>span{font-size:6px}.final-inventory{grid-template-columns:repeat(5,minmax(0,1fr))}.footer{margin:0 23px}.titlebar-right{gap:15px}.titlebar-right>a{font-size:9px}.local-badge{font-size:7px}}
@media(max-width:900px){.game-layout,.bottom-layout{grid-template-columns:minmax(0,1.7fr) minmax(270px,1fr);gap:13px}.game-titlebar{padding-left:18px;padding-right:18px}.game-shell{padding:0 18px}.brand{gap:11px}.brand h1{font-size:18px}.titlebar-right .local-badge{display:none}.brief-section,.command-section,.interpretation-section{padding-left:13px;padding-right:13px}.shop-guide-section{padding-left:13px;padding-right:13px}.brief-section h2{font-size:12px}.secret-label{font-size:6px}.intended-list>.item-chip{font-size:9px;min-height:62px}.basket-list{grid-template-columns:repeat(5,minmax(0,1fr))}.basket-list>.item-chip{font-size:9px}.hud-quest .section-label{display:none}.dialogue-copy p{font-size:11px}.speaker-name>span{display:none}.world-label{font-size:7px}.world-label>span:last-child{font-size:6px}.telemetry{gap:12px}.telemetry strong{font-size:13px}.telemetry small{font-size:7px}.shop-guide{max-height:170px}.footer{margin:0 18px}.final-inventory{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:720px){.game-titlebar{padding:20px 18px 16px;gap:8px}.brand h1{font-size:19px;max-width:480px;line-height:1.5}.brand-kicker{font-size:6px;letter-spacing:.9px;margin-bottom:4px}.brand-milk{width:22px;height:29px}.titlebar-right{display:none}.game-shell{padding:0 15px}.game-layout{grid-template-columns:1fr;gap:20px}.game-hud{flex-wrap:nowrap;padding:12px;gap:10px}.hud-quest{flex-basis:auto;display:block}.hud-quest .section-label{display:block;font-size:6px}.hud-quest h2{font-size:14px;margin-top:4px}.scenario-picker select{max-width:175px;font-size:8px}.status-pill{font-size:8px}.world-label{font-size:8px;padding:8px 10px}.world-label>span:last-child{font-size:7px}.game-board{min-height:200px}.world-caption{font-size:8px}.child-dialogue{margin-top:12px;min-height:85px;padding:11px}.portrait-frame{width:58px;height:58px}.portrait-frame img{width:54px;height:54px}.dialogue-copy p{font-size:13px}.speaker-name>span{display:inline;font-size:7px}.telemetry{gap:22px;padding:15px 5px}.telemetry strong{font-size:17px}.telemetry>div>span{font-size:8px}.speed-control select{font-size:9px;padding:6px}.speed-control>span{display:inline;font-size:8px}.basket-list{grid-template-columns:repeat(9,minmax(0,1fr));gap:5px}.basket-list>.item-chip{font-size:8px;min-height:62px}.quest-panel{display:grid;grid-template-columns:1fr 1fr;align-items:start}.brief-section{grid-column:1;border-right:1px dashed #ccb785}.shop-guide-section{grid-column:1;border-right:1px dashed #ccb785}.command-section{grid-column:2;grid-row:1/4;border-bottom:0;border-left:1px dashed #ccb785}.interpretation-section{grid-column:1;border-right:1px dashed #ccb785}.quest-tab{font-size:7px}.shop-guide{max-height:240px}.shop-guide p,.shop-guide>article,.shop-guide>div{font-size:9px}.bottom-layout{grid-template-columns:1fr 1fr;gap:14px}.receipt-panel,.log-panel{padding:16px}.final-inventory{grid-template-columns:repeat(3,minmax(0,1fr))}.guide ol{gap:18px}.guide h3{font-size:9px}.guide p{font-size:8px}.map-reference{font-size:7px}.footer{margin:0 18px}}
@media(max-width:480px){.game-titlebar{padding:18px 17px 16px}.brand h1{font-size:19px;letter-spacing:-.8px;max-width:310px;word-break:keep-all}.brand-kicker{font-size:6px;letter-spacing:.3px}.brand{gap:12px}.brand-milk{width:20px;height:27px}.game-shell{padding:0 12px}.game-hud{padding:11px 10px;flex-wrap:wrap;gap:8px}.hud-quest{flex-basis:100%;display:flex;align-items:center;gap:8px}.hud-quest .section-label{display:none}.hud-quest h2{font-size:13px;margin-top:0}.game-hud .scenario-picker{margin-left:0}.scenario-picker select{font-size:9px;max-width:225px;padding:6px}.status-pill{margin-left:auto;font-size:8px}.world-label{font-size:7px;gap:7px;padding:7px 8px}.world-label>span:last-child{font-size:6px}.world-label>span:first-child{gap:5px}.world-caption{font-size:7px;padding:7px 8px}.route-control{gap:4px}.route-control input{width:9px;height:9px}.child-dialogue{gap:10px;padding:10px;min-height:85px}.portrait-frame{width:54px;height:54px}.portrait-frame img{width:50px;height:50px}.dialogue-copy p{font-size:12px;line-height:1.8;margin-top:5px}.speaker-name{font-size:9px}.speaker-name>span{display:none}.dialogue-next{font-size:6px;right:8px;bottom:8px}.telemetry{gap:14px;padding:14px 3px 12px;flex-wrap:wrap}.telemetry strong{font-size:16px}.telemetry>div>span{font-size:8px}.telemetry small{font-size:7px}.speed-control{margin-left:auto}.speed-control>span{display:none}.speed-control select{font-size:8px;padding:5px}.basket-section{padding-top:13px}.basket-section h3{font-size:11px}.basket-section .section-label{font-size:7px}.basket-list{grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}.basket-list>.item-chip{font-size:9px;min-height:65px}.item-mini svg{width:29px;height:29px}.itinerary-section{padding-top:13px}.route-list>span{font-size:8px}.map-reference{font-size:7px;padding-top:11px}.quest-panel{display:block}.brief-section,.shop-guide-section,.interpretation-section{border-right:0}.command-section{border-left:0;border-bottom:1px dashed #ccb785}.brief-section,.command-section,.interpretation-section{padding:18px}.quest-tab{font-size:8px;padding-bottom:12px}.brief-section h2{font-size:15px}.secret-label{font-size:8px}.section-description{font-size:10px}.intended-list{gap:7px}.intended-list>.item-chip{font-size:11px;min-height:75px}.intended-list .item-mini svg{width:33px;height:33px}.shop-guide-section{padding:15px 18px}.shop-guide-section summary{font-size:12px}.guide-description{font-size:9px}.shop-guide{max-height:225px;gap:6px}.shop-guide h3,.shop-guide strong{font-size:11px}.shop-guide p,.shop-guide>article,.shop-guide>div{font-size:10px}.command-section h2{font-size:13px}.instruction-formula{font-size:9px;gap:5px}.command-box textarea{font-size:12px;min-height:144px;line-height:1.9}.command-rule{font-size:9px;line-height:1.8}.command-presets button{font-size:9px;padding:6px 7px}.run-button{font-size:13px;min-height:46px;margin-top:15px}.secondary{font-size:10px;padding:8px}.connection-row select{font-size:10px;padding:8px}.connect-button{font-size:10px}.ai-connection strong{font-size:9px}.ai-connection p{font-size:8px}.interpretation-section h2{font-size:11px}.interpretation{padding:12px;font-size:11px}.interpretation p{font-size:10px}.interpretation strong{font-size:11px}.bottom-layout{grid-template-columns:1fr;gap:15px;margin-top:18px}.receipt-panel,.log-panel{padding:18px}.receipt-panel h2,.log-panel h2{font-size:12px}.receipt-placeholder{font-size:10px}.final-inventory{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.final-inventory>.item-chip{font-size:10px;min-height:75px}.receipt-summary h3{font-size:14px}.receipt-summary p{font-size:10px}.run-log>li{font-size:10px}.guide{padding:25px 3px 22px}.guide h2{font-size:12px}.guide ol{display:flex;flex-direction:column;gap:17px}.guide h3{font-size:11px}.guide p{font-size:10px;line-height:1.8;margin-top:4px}.guide li>span{font-size:10px}.footer{margin:0 17px;padding:17px 0 20px;align-items:flex-start;flex-direction:column;gap:8px;font-size:7px}.footer>div{gap:12px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*:before,*:after{animation:none!important;transition:none!important}}
/* Original Galmuri font is bundled unchanged with its SIL OFL license. */
@font-face{font-family:Galmuri;src:url('/assets/Galmuri11.ttf') format('truetype');font-weight:400 800;font-style:normal;font-display:swap}
:root{--sans:Galmuri,-apple-system,BlinkMacSystemFont,"Apple SD Gothic Neo",sans-serif}body{-webkit-font-smoothing:auto}.brand h1{font-size:24px;font-weight:400;letter-spacing:-.5px}.hud-quest h2{font-size:14px;font-weight:400}.panel-heading h2,.panel-heading h3{font-weight:400}.brief-section h2{font-size:14px}.section-description{font-size:11px;line-height:1.8}.intended-list>.item-chip{font-size:11px}.intended-list .item-mini,.basket-list .item-mini,.final-inventory .item-mini{width:32px;height:32px}.item-mini svg,.intended-list .item-mini svg{width:32px;height:32px}.dialogue-copy p{font-size:14px;font-weight:400}.speaker-name{font-size:11px}.child-dialogue{min-height:91px}.portrait-frame{width:64px;height:64px}.portrait-frame img{width:64px;height:64px}.command-section h2{font-size:12px}.command-box textarea{font-size:12px;line-height:1.85}.command-rule{font-size:10px}.command-presets button{font-size:10px}.run-button{font-size:13px;font-weight:400}.secondary{font-size:10px}.shop-guide-section summary{font-size:12px;font-weight:400}.guide-description{font-size:10px}.shop-guide h3,.shop-guide strong{font-size:11px;font-weight:400}.shop-guide p{font-size:10px}.guide-landmark{display:inline-block;font-size:9px;color:#ba8c56;background:#f0ddb2;padding:1px 4px;margin-left:5px}.guide-location{color:#a2936e}.guide-goods{display:block;font-size:9px;color:#b4a37a;line-height:1.7;margin-top:3px}.interpretation-section summary,.log-panel summary{list-style:none;display:flex;justify-content:space-between;align-items:center;cursor:pointer;font-size:11px;color:#8f9873}.interpretation-section summary::-webkit-details-marker,.log-panel summary::-webkit-details-marker{display:none}.interpretation-section summary>span{font-size:9px;color:#b1b795}.log-panel:not([open]){align-self:start}.interpretation p,.interpretation strong{font-size:10px}.basket-list>.item-chip{font-size:10px;background-color:#d5ddbd;background-image:linear-gradient(90deg,#aebd9012 1px,transparent 1px),linear-gradient(#aebd9012 1px,transparent 1px);background-size:4px 4px}.basket-list .is-empty{background-color:#e2e7d3}.receipt-placeholder{font-size:11px}.guide h2{font-size:12px;font-weight:400}.guide h3{font-size:11px;font-weight:400}.guide p{font-size:10px}.game-titlebar{padding-top:20px;padding-bottom:17px}
@media(max-width:1150px){.brand h1{font-size:21px}.item-mini svg{width:32px;height:32px}.basket-list>.item-chip{font-size:9px}.dialogue-copy p{font-size:12px}.section-description{font-size:10px}}
@media(max-width:900px){.brand h1{font-size:19px}.intended-list>.item-chip{font-size:10px}.basket-list>.item-chip{font-size:10px}.portrait-frame{width:56px;height:64px}.portrait-frame img{width:64px;height:64px}.command-box textarea{font-size:11px}.guide-landmark{display:block;width:max-content;margin:3px 0 0}.shop-guide{max-height:185px}}
@media(max-width:720px){.brand h1{font-size:22px;line-height:1.6}.dialogue-copy p{font-size:14px}.portrait-frame{width:64px;height:64px}.basket-list>.item-chip{font-size:9px}.command-box textarea{font-size:12px}.shop-guide{max-height:240px}.guide h3{font-size:10px}.guide p{font-size:9px}}
@media(max-width:480px){.brand h1{font-size:20px;line-height:1.65;max-width:305px;letter-spacing:-.6px}.brand-kicker{font-size:6px}.brand-milk{width:18px;height:25px}.brand{gap:10px}.game-titlebar{padding:16px 14px}.dialogue-copy p{font-size:12px}.portrait-frame{width:64px;height:64px}.portrait-frame img{width:64px;height:64px}.speaker-name{font-size:10px}.child-dialogue{padding:9px;gap:10px;min-height:92px}.basket-list>.item-chip{font-size:10px}.section-description{font-size:11px}.intended-list>.item-chip{font-size:12px;min-height:79px}.intended-list .item-mini svg{width:32px;height:32px}.shop-guide-section summary{font-size:13px}.shop-guide strong{font-size:12px}.shop-guide p{font-size:11px}.guide-landmark{display:inline-block;font-size:10px;margin:0 0 0 4px}.guide-goods{font-size:10px}.shop-guide{max-height:242px}.instruction-formula{font-size:10px}.command-box textarea{font-size:12px;min-height:155px}.command-rule{font-size:10px}.command-presets button{font-size:10px}.run-button{font-size:14px}.secondary{font-size:11px}.interpretation-section summary{font-size:12px}.interpretation strong,.interpretation p{font-size:11px}.guide h3{font-size:11px}.guide p{font-size:10px}.final-inventory>.item-chip{font-size:11px}}
.remembered-stop{border-left:2px solid #c6d3ab;padding:4px 0 4px 7px;margin:5px 0;font-size:10px;color:#929b75}.child-question{margin-top:8px;padding:8px;background:#f4e6c4;border:1px solid #dcc591;color:#ac8b57;font-size:10px;line-height:1.8}.just-received{animation:bag-received .55s steps(3,end)}@keyframes bag-received{0%,50%{background-color:#f4d88a;border-color:#bb9a4d;box-shadow:inset 0 0 0 2px #ffedb3}100%{background-color:#d5ddbd}}
@media(max-width:720px){.game-board{display:block;max-height:420px;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#819766 #b7c99b}.game-board svg{width:640px;max-width:none;height:448px}.world-caption>span:after{content:' · 지도를 밀어서 둘러보기';font-size:7px;color:#93a575}}
@media(max-width:480px){.game-board{max-height:350px}.world-caption>span{font-size:0}.world-caption>span:after{content:'지도를 밀어서 둘러볼 수 있어요';font-size:8px}}
@media(prefers-reduced-motion:reduce){.just-received{animation:none}}
/* Keep instructions and status readable against the game materials. */
.hud-quest p{font-size:11px;color:#5d694d}.world-label{font-size:10px}.world-label>span:last-child{font-size:9px;color:#e1e9cf}.section-description,.guide-description,.command-rule{color:#79663f}.guide-location,.guide-goods{color:#786544}.guide-landmark{color:#795327}.shop-guide strong{color:#674d2e}.shop-guide p{font-size:11px}.command-box textarea::placeholder{color:#8b7950}.instruction-formula{font-size:10px;color:#78633b}.command-presets button{color:#755c32}.ai-connection strong{font-size:10px;color:#596c49}.ai-connection p{font-size:10px;line-height:1.6;color:#6c704f}.telemetry>div>span,.speed-control>span{font-size:10px;color:#697254}.map-reference{font-size:10px;color:#6b7359}.route-list{font-size:11px;color:#687452}.route-list>span{font-size:10px;color:#59743e}.status-pill{font-size:10px;color:#536c36}.secret-label{font-size:9px;color:#80673a}.receipt-summary p,.receipt-row,.receipt-note{font-size:12px}.interpretation p,.interpretation strong{font-size:11px;color:#586747}.child-question{color:#7b5932}.guide p{color:#687052}.game-hud .scenario-picker select{font-size:10px}.command-section{border-top:2px solid #d7c18c}.run-button{box-shadow:inset 0 2px 0 #fff0b1,0 3px 0 #b28c42}
@media(max-width:900px){.hud-quest p{display:none}.world-label>span:last-child{display:none}}
/* Each difficulty has its own native world geometry. */
.difficulty-picker{display:flex;align-items:center;gap:6px;flex-shrink:0}.difficulty-picker>span{font-size:10px;color:#798766}.difficulty-picker select{font-size:10px;border-color:#a5b687;background:#edf3d8;color:#617a45;max-width:155px;padding:7px}.game-hud{flex-wrap:wrap}.hud-quest{flex:1 1 250px}.scenario-picker{max-width:185px}.map-info{margin-top:11px;display:grid;grid-template-columns:1.1fr 1fr;gap:10px}.map-info>p{padding:9px 11px;border:1px solid #bdc8a2;background:#e2e9cf;font-size:10px;line-height:1.8;color:#768a59;word-break:keep-all}.map-info .safety-status{border-color:#cabc87;background:#eee8c8;color:#97824a}.safety-status:before{content:'길 건너기 · ';font-size:9px;color:#ad9760}.safety-status[data-kind=blocked]{border-color:#c99874;background:#f1dfc2;color:#a9744c}.safety-status[data-kind=wait]{border-color:#c8b66e;background:#f5ebbd;color:#a48a3e}.safety-status[data-kind=cross]{border-color:#a6be7e;background:#e4efce;color:#728e46}body[data-world=rural] .safety-status:before{content:'마을 길 · '}body[data-world=neighborhood] .safety-status:before{content:'횡단보도 · '}body[data-world=city] .safety-status:before{content:'보행 안전 · '}.game-board{--map-width:640px;--map-height:448px}
@media(max-width:1150px){.game-hud{gap:7px}.hud-quest{flex-basis:100%}.difficulty-picker{margin-right:auto}.scenario-picker{margin-left:0}.difficulty-picker select{font-size:9px;max-width:145px}.scenario-picker select{font-size:9px;max-width:160px}.map-info{gap:7px}.map-info>p{font-size:9px;padding:8px}}
@media(max-width:900px){.game-hud .scenario-picker select{font-size:8px;max-width:145px}.difficulty-picker>span{font-size:9px}.difficulty-picker select{max-width:137px;font-size:8px}.game-hud .status-pill{font-size:8px;padding:5px}.map-info{grid-template-columns:1fr}.map-info>p{font-size:10px;padding:8px 10px}}
@media(max-width:720px){.game-board svg{width:var(--map-width);height:var(--map-height);max-width:none;aspect-ratio:auto}.game-hud{flex-wrap:wrap}.hud-quest{flex-basis:100%}.difficulty-picker{margin-right:auto}.difficulty-picker>span{font-size:10px}.difficulty-picker select{font-size:10px;max-width:170px}.game-hud .scenario-picker select{font-size:10px;max-width:190px}.game-hud .status-pill{font-size:9px}.map-info{grid-template-columns:1fr 1fr}.map-info>p{font-size:10px}}
@media(max-width:480px){.difficulty-picker{margin-right:0;flex:1}.difficulty-picker select{font-size:9px;max-width:155px}.difficulty-picker>span{font-size:9px}.game-hud .scenario-picker{flex:1;max-width:180px}.game-hud .scenario-picker select{font-size:9px;max-width:100%;width:100%}.game-hud .status-pill{margin-left:0;font-size:9px}.map-info{grid-template-columns:1fr;gap:6px}.map-info>p{font-size:10px;padding:8px 10px}.safety-status:before{font-size:9px}}
/* Original DungeonMaker-team art: fixed pixel corners with scalable panel centers. */
@media(max-width:720px){.game-board{place-items:start}.difficulty-picker>span{white-space:nowrap}}
.button{border:6px solid transparent;border-image:url('/assets/town-pack/assets/ui/buttons/secondary-normal.png') 6 fill stretch;color:#fff3d6;background:transparent;box-shadow:none;image-rendering:pixelated}
.button:not(:disabled):hover{border-image-source:url('/assets/town-pack/assets/ui/buttons/secondary-hover.png');background:transparent;color:#fffbed}
.button:not(:disabled):active{border-image-source:url('/assets/town-pack/assets/ui/buttons/secondary-pressed.png');transform:none}
.button.primary,.run-button{border-image-source:url('/assets/town-pack/assets/ui/buttons/primary-normal.png');color:#fff3d6;background:transparent;box-shadow:none}
.button.primary:not(:disabled):hover,.run-button:not(:disabled):hover{border-image-source:url('/assets/town-pack/assets/ui/buttons/primary-hover.png')}
.button.primary:not(:disabled):active,.run-button:not(:disabled):active{border-image-source:url('/assets/town-pack/assets/ui/buttons/primary-pressed.png')}
.button:disabled{border-image-source:url('/assets/town-pack/assets/ui/buttons/primary-disabled.png');opacity:.7;color:#e0e3d8}
.quest-panel{border:12px solid transparent;border-image:url('/assets/town-pack/assets/ui/quest-paper.png') 16 16 12 12 stretch;background:#fff3d6;box-shadow:4px 4px #b0ad93}
.child-dialogue{border-style:solid;border-color:transparent;border-width:8px 8px 12px 24px;border-image:url('/assets/town-pack/assets/ui/dialogue-panel.png') 8 8 12 24 stretch;background:#fff3d6;box-shadow:none}
.portrait-frame,.portrait-frame img{width:64px;height:64px}.portrait-frame img{width:48px;height:48px;transform:none;image-rendering:pixelated}.portrait-frame{background:#c6b58e;border-color:#79664f}
.basket-section{margin-top:12px;padding:10px;border:10px solid transparent;border-image:url('/assets/town-pack/assets/ui/bag-panel.png') 10 fill stretch;image-rendering:pixelated}.basket-section .panel-heading h3,.basket-section .section-label{color:#fff3d6}.basket-list>.item-chip{border:4px solid transparent;border-image:url('/assets/town-pack/assets/ui/slots/normal.png') 4 fill stretch;background:transparent;box-shadow:none;color:#493c2b}.basket-list>.item-chip.is-empty{border-image-source:url('/assets/town-pack/assets/ui/slots/empty.png');color:#716b59}.basket-list>.item-chip.just-received{border-image-source:url('/assets/town-pack/assets/ui/slots/new.png')}
body[data-world] .safety-status::before{content:'';display:inline-block;width:16px;height:16px;margin-right:7px;vertical-align:middle;background:center/16px 16px no-repeat url('/assets/town-pack/assets/ui/icons/crossing.png');image-rendering:pixelated}
body[data-world] .safety-status[data-kind=stop]::before,body[data-world] .safety-status[data-kind=wait]::before,body[data-world] .safety-status[data-kind=blocked]::before{background-image:url('/assets/town-pack/assets/ui/icons/stop.png')}
body[data-world] .safety-status[data-kind=look]::before{background-image:url('/assets/town-pack/assets/ui/icons/look.png')}
body[data-world] .safety-status[data-kind=cross]::before{background-image:url('/assets/town-pack/assets/ui/icons/walk.png')}
@media(max-width:480px){.quest-panel{border-width:8px}.basket-section{padding:6px;border-width:8px}.child-dialogue{padding:7px;border-left-width:12px}.command-presets{gap:6px}}

/* 2.5D stage: independent camera over the same playable town. */
.game-board[data-renderer=three],.map-book-board[data-renderer=three]{display:block;position:relative;isolation:isolate;overflow:hidden;min-height:0;max-height:none;aspect-ratio:16/10;background:#b7d2d0;place-items:initial}
.game-board[data-renderer=three]{height:clamp(440px,42vw,650px);aspect-ratio:auto}
.town-canvas{display:block;width:100%;height:100%;image-rendering:pixelated;touch-action:pan-y;outline-offset:-4px}
.town-view-controls{position:absolute;top:12px;right:12px;z-index:3;display:flex;flex-wrap:wrap;justify-content:flex-end;gap:5px;max-width:calc(100% - 24px)}
.town-view-controls button{min-height:32px;min-width:34px;padding:7px 10px;border:1px solid #9cae99;background:#233b35ed;color:#f9f2d6;font:11px var(--sans);box-shadow:0 2px 0 #142920;cursor:pointer}
.town-view-controls button:hover{background:#3d5949}.town-view-controls button[aria-pressed=true]{background:#f5df9e;color:#3c4b35;border-color:#bd9a56;box-shadow:0 2px 0 #7d683d}.town-view-controls button:focus-visible{outline:2px solid #fff3bc;outline-offset:3px}
.town-bubble{position:absolute;z-index:2;max-width:240px;padding:9px 12px;border:2px solid #716244;background:#fff4d8;color:#594a31;box-shadow:3px 3px 0 #343f3a33;font:12px/1.7 var(--sans);text-align:center;word-break:keep-all;pointer-events:none}
.town-bubble:after{content:'';position:absolute;bottom:-7px;left:calc(50% - 5px);width:8px;height:8px;background:#fff4d8;border-right:2px solid #716244;border-bottom:2px solid #716244;transform:rotate(45deg)}
.town-view-status{position:absolute;bottom:12px;left:12px;z-index:2;max-width:calc(100% - 24px);background:#233b35dc;color:#f4edcf;padding:6px 9px;font:10px/1.6 var(--sans);pointer-events:none}
.town-view-error{position:absolute;inset:0;z-index:4;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:28px;gap:18px;background:#e2e5d1;color:#344d40;font:13px/1.8 var(--sans);text-align:center}.town-view-error button{padding:10px 15px;background:#355a47;color:#fff4d8;border:2px solid #253e32}
.world-caption>span:after{content:none!important}
@media(max-width:720px){.game-board[data-renderer=three]{height:460px;overflow:hidden}.town-view-controls{top:9px;right:9px;gap:4px}.town-view-controls button{min-height:36px;padding:7px 8px;font-size:10px}.town-bubble{max-width:210px;font-size:11px;padding:8px 10px}.world-caption>span{font-size:9px;line-height:1.7;max-width:75%}.town-view-status{bottom:9px;left:9px;font-size:9px}.titlebar-right{display:flex;gap:12px}.titlebar-right .local-badge,.titlebar-right a[href='#how-to-play']{display:none}.game-titlebar{align-items:flex-start;gap:12px;flex-wrap:wrap}.titlebar-right a{font-size:10px}}
@media(max-width:480px){.game-board[data-renderer=three]{height:400px}.town-view-controls button{font-size:9px;padding:7px;min-width:32px}.town-bubble{max-width:190px}.world-caption>span{font-size:8px}.game-titlebar{padding-bottom:14px}.titlebar-right{margin-left:28px}}
body[data-location=interior] .world-label{background:#6b5245;color:#fff0d3}
body[data-location=interior] .map-info>p{background:#eee3c7;border-color:#c4ad83;color:#806542}
body[data-location=interior] .safety-status::before{background-image:url('/assets/town-pack/assets/ui/icons/bag.png')}
.world-label>span{min-width:0;line-height:1.7}.world-label>span:last-child{text-align:right}

/* Store basket holds unpaid goods; the scene HUD bag contains only checked-out items. */
.shop-cart-strip{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:12px;padding:10px 13px;background:#fff0cb;border-bottom:2px solid #ad9567;color:#705436;font-size:11px;box-shadow:inset 0 2px #fff8e6}
.shop-cart-strip[hidden]{display:none}.shop-cart-title{display:flex;align-items:center;gap:8px;white-space:nowrap}.shop-cart-title img{image-rendering:pixelated;width:24px;height:24px}.shop-cart-title strong{font-size:11px;font-weight:400}.shop-cart-title small{display:block;font-size:8px;color:#a2673f;margin-top:3px}
.shop-cart-items{display:flex;gap:6px;flex-wrap:wrap;min-width:0}.shop-cart-items .item-chip{display:inline-flex;align-items:center;gap:4px;padding:3px 7px;border:1px solid #d3ba87;background:#fff9e8;font-size:11px;white-space:nowrap}.shop-cart-items .item-mini,.shop-cart-items .item-mini img,.shop-cart-items .item-mini svg{width:24px;height:24px}.shop-cart-items .inventory-empty{font-size:10px;color:#9c835d}
.shop-cart-total{text-align:right;white-space:nowrap;font-size:11px;color:#785537}.shop-cart-total small{display:block;margin-top:4px;font-size:8px;color:#a08662}
@media(max-width:720px){.shop-cart-strip{grid-template-columns:1fr auto;gap:8px;padding:9px 10px}.shop-cart-items{grid-column:1/-1;grid-row:2}.shop-cart-items .item-chip{font-size:10px}.shop-cart-title img{width:20px;height:20px}.shop-cart-title strong,.shop-cart-total{font-size:10px}.shop-cart-total small{font-size:7px}}
.town-bubble[data-speaker="clerk"]{border-color:#4f7566;background:#edf3df;color:#344f42}
.town-bubble[data-speaker="clerk"]:before{content:none}
.town-bubble[data-speaker="clerk"]:after{background:#edf3df;border-color:#4f7566}
.help-instruction{font-size:10px;line-height:1.8;color:#715d3c;margin:9px 0 0;word-break:keep-all}

/* Live story sits beside the map; the parent's paper remains a separate, quieter surface. */
.game-layout{grid-template-columns:minmax(0,1fr) minmax(330px,380px)}
.game-sidebar{display:flex;flex-direction:column;gap:17px;min-width:0}
.conversation-panel{position:relative;display:grid;grid-template-rows:auto auto minmax(0,1fr);height:clamp(440px,42vw,520px);min-width:0;max-width:100%;overflow:hidden;border:3px solid #736044;background:#f4ecd5;box-shadow:0 0 0 1px #514736,inset 0 0 0 1px #fff8de,4px 4px 0 #c8bea0;isolation:isolate}
.conversation-panel:before{content:'';position:absolute;inset:3px;border:1px solid #ead8ac;pointer-events:none;z-index:2}
.conversation-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 15px 12px;background:#6b5b43;color:#fff2cb;border-bottom:2px solid #4e4432;box-shadow:inset 0 1px #998460}
.conversation-kicker{display:block;font:7px var(--mono);letter-spacing:1.4px;color:#d5c5a0;margin-bottom:5px}
.conversation-header h2{font:16px/1.4 var(--sans);letter-spacing:-.4px}
.conversation-live{display:inline-flex;align-items:center;gap:6px;padding:4px 6px;border:1px solid #ae9b70;background:#5e513d;color:#f1dda3;font:8px var(--mono);letter-spacing:1px}
.conversation-live i{width:4px;height:4px;background:#edcb70;box-shadow:0 0 0 1px #4e4d33}
.conversation-current{display:flex;align-items:center;gap:10px;min-width:0;padding:10px 14px;background:#e5e7d0;border-bottom:1px solid #b6bd99;box-shadow:inset 0 1px #f5f7e4}
.conversation-portrait{display:block;flex:0 0 48px;width:48px;height:48px;object-fit:contain;image-rendering:pixelated;background:#d6d8bd;box-shadow:inset 0 0 0 1px #b5ba93}
.conversation-status-copy{min-width:0}.conversation-status-copy>span{display:block;margin-bottom:4px;color:#7a8361;font-size:8px;letter-spacing:.4px}
#conversation-status{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;color:#485d40;font-size:11px;line-height:1.75;overflow-wrap:anywhere;word-break:keep-all}
.conversation-feed{min-width:0;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#a99a73 #e9dfc4;list-style:none;margin:0;padding:16px 13px 25px;background-image:linear-gradient(#dccca51a 1px,transparent 1px);background-size:100% 7px;outline-offset:-3px}
.conversation-feed:empty:before{content:'작은 발걸음과 주고받는 말이\A여기에 차곡차곡 쌓여요.';display:block;padding:38px 8px;color:#857b5e;text-align:center;font-size:11px;line-height:2;white-space:pre-line}
.conversation-feed:focus-visible{outline:2px solid #6a8253}
.chat-entry{display:grid;grid-template-columns:32px minmax(0,1fr);align-items:end;gap:9px;min-width:0;max-width:100%;margin:0 0 15px;animation:chat-arrive .16s steps(2,end)}
.chat-entry:last-child{margin-bottom:0}
.chat-avatar{display:block;width:32px;height:32px;object-fit:contain;image-rendering:pixelated;background:#e0d8b8;box-shadow:0 0 0 1px #b6a580,2px 2px 0 #ded0ae}
.chat-content{--chat-paper:#fff7e2;--chat-edge:#baaa80;position:relative;min-width:0;max-width:100%;width:fit-content;padding:10px 11px;background:var(--chat-paper);border:1px solid var(--chat-edge);box-shadow:inset 1px 1px 0 #fffdf0,2px 2px 0 #d6caaa}
.chat-content:after{content:'';position:absolute;left:-5px;bottom:9px;width:5px;height:6px;background:var(--chat-paper);border-left:1px solid var(--chat-edge);border-bottom:1px solid var(--chat-edge)}
.chat-speaker{display:block;margin-bottom:5px;font-size:9px;line-height:1.4;color:#6b7954}
.chat-message{color:#474d38;font-size:12px;line-height:1.9;white-space:pre-wrap;word-break:keep-all;overflow-wrap:anywhere}
.chat-place{display:block;margin-top:7px;padding-top:5px;border-top:1px dotted #c5bea1;color:#858264;font-size:8px;line-height:1.6;overflow-wrap:anywhere}
.chat-child{grid-template-columns:minmax(0,1fr) 32px;padding-left:12px}
.chat-child .chat-avatar{grid-column:2;grid-row:1;background:#d2ddbe;box-shadow:0 0 0 1px #93a279,2px 2px 0 #d5d8b8}
.chat-child .chat-content{--chat-paper:#e3ebcc;--chat-edge:#9dab82;grid-column:1;grid-row:1;justify-self:end}
.chat-child .chat-content:after{left:auto;right:-5px;border-left:0;border-right:1px solid var(--chat-edge)}
.chat-child .chat-speaker{color:#54713f}
.chat-clerk{padding-right:12px}.chat-clerk .chat-speaker{color:#8a6841}
.chat-parent .chat-content{--chat-paper:#f4e2b7;--chat-edge:#c5ab77}.chat-parent .chat-speaker{color:#866135}
.chat-action,.chat-system{display:block;margin:12px 0;text-align:center}
.chat-action .chat-avatar,.chat-system .chat-avatar{display:none}
.chat-action .chat-content,.chat-system .chat-content{width:100%;padding:6px 5px;border:0;box-shadow:none;background:transparent}
.chat-action .chat-content:before{content:'';display:block;width:30px;border-top:1px solid #c8c6aa;margin:0 auto 7px}
.chat-action .chat-content:after,.chat-system .chat-content:after{content:none}
.chat-action .chat-speaker,.chat-system .chat-speaker{display:none}
.chat-action .chat-message,.chat-system .chat-message{font-size:10px;line-height:1.8;color:#6b7858}
.chat-system .chat-content{background:#eee1bf;border:1px dashed #c9b783}.chat-system .chat-message{color:#826a43}
.chat-action .chat-place,.chat-system .chat-place{border:0;margin-top:3px;padding:0}
.conversation-jump{position:absolute;z-index:3;left:50%;bottom:12px;transform:translateX(-50%);max-width:calc(100% - 32px);min-height:36px;padding:8px 16px;border:2px solid #6d7851;background:#e4eacb;color:#405a34;box-shadow:inset 0 1px #fbffe9,3px 3px 0 #7e805a55;font:11px var(--sans);white-space:nowrap}
.conversation-jump:hover{background:#f5efd2}.conversation-jump:not(:disabled):active{transform:translate(-50%,2px)}
.conversation-jump:focus-visible{outline:3px solid #d6a94d;outline-offset:2px}
.conversation-panel:has(.conversation-jump:not([hidden])) .conversation-feed{padding-bottom:60px}
.game-sidebar .quest-panel{display:block;border-width:8px;min-width:0;max-width:100%;box-shadow:3px 3px 0 #c5bb9e}
.parent-memo>summary{display:flex;align-items:center;gap:8px;min-height:43px;padding:10px 12px;list-style:none;cursor:pointer;border-bottom:1px solid #cdbc8c;background:#f3e5bd;color:#715d39;font-size:12px;box-shadow:inset 0 1px #fff3d1}
.parent-memo>summary::-webkit-details-marker{display:none}.parent-memo>summary>span:first-child{display:flex;align-items:center;gap:7px}.parent-memo>summary>small{margin-left:auto;font-size:8px;color:#8c7850}.parent-memo>summary>.summary-arrow{font-size:10px;color:#8c7850}
.parent-memo:not([open])>summary>.summary-arrow{transform:rotate(-90deg)}
.parent-memo .brief-section{padding:14px 13px;border-right:0;background:#fbefd0}.parent-memo .brief-section h2{font-size:12px;color:#765d37}.parent-memo .section-description{font-size:10px;line-height:1.8}
.parent-memo .intended-list{margin-top:10px}.parent-memo .intended-list>.item-chip{min-height:64px;font-size:10px;padding:7px 3px}
.parent-memo .shop-guide-section{border-right:0;padding:12px 13px}.parent-memo .shop-guide-section summary{font-size:11px}.parent-memo .shop-guide{max-height:230px}
.game-sidebar .command-section{border-left:0;border-top:1px solid #cdbb8a;padding:16px 13px 14px}.game-sidebar .interpretation-section{border-right:0;padding:13px}
.game-sidebar .command-box textarea{min-width:0;width:100%;font-size:12px;line-height:1.85}.game-sidebar .command-presets{min-width:0}.game-sidebar .command-presets button{white-space:normal;text-align:left;overflow-wrap:anywhere}
.game-sidebar .connection-row>*{min-width:0}.game-sidebar .connection-row select{flex:1;max-width:100%}
.log-panel summary{gap:12px}.log-panel summary .section-label{font-size:9px;letter-spacing:0;color:#8c9771}
/* The map keeps a tiny speaking cue; all words belong in the story panel. */
.town-bubble,.town-bubble[data-speaker="clerk"]{min-width:38px;max-width:38px;padding:3px 6px 5px;font:15px/1 var(--sans);letter-spacing:1px;white-space:nowrap;word-break:normal;overflow:visible;text-align:center;box-shadow:2px 2px 0 #343f3a33}
.town-bubble:before,.town-bubble[data-speaker="clerk"]:before{content:none;display:none}
.town-bubble:after{bottom:-5px;left:calc(50% - 3px);width:6px;height:6px}
@keyframes chat-arrive{from{opacity:.4;transform:translateY(3px)}to{opacity:1;transform:none}}
@media(max-width:1000px){.game-layout{grid-template-columns:minmax(0,1fr) 320px;gap:14px}.game-sidebar{gap:14px}.conversation-header{padding:12px}.conversation-current{padding:9px 11px}.conversation-feed{padding-left:10px;padding-right:10px}.chat-content{padding:9px}.chat-message{font-size:11px;line-height:1.9}.chat-child{padding-left:5px}.chat-clerk{padding-right:5px}}
@media(max-width:720px){
  .game-layout{display:flex;flex-direction:column;gap:12px}.world-panel,.game-sidebar{display:contents}
  .world-panel>.game-hud{order:0;width:100%}.world-panel>.world-frame{order:1;width:100%;margin-top:-12px}
  .conversation-panel{order:2;flex:none;width:100%;height:290px;max-height:290px;grid-template-rows:auto auto minmax(0,1fr);margin:3px 0}
  .game-sidebar>.quest-panel{order:3;display:block;width:100%;margin-top:2px}
  .world-panel>.map-info{order:4;width:100%;margin-top:2px}.world-panel>.telemetry{order:5;width:100%}.world-panel>.basket-section{order:6;width:100%;margin-top:0}.world-panel>.itinerary-section{order:7;width:100%}.world-panel>.map-reference{order:8;width:100%}
  .conversation-header{padding:9px 12px}.conversation-header h2{font-size:14px}.conversation-kicker{display:none}.conversation-live{font-size:7px}
  .conversation-current{padding:7px 11px;gap:9px}.conversation-portrait{flex-basis:32px;width:32px;height:32px}.conversation-status-copy>span{display:none}#conversation-status{font-size:11px;line-height:1.65;-webkit-line-clamp:1}
  .conversation-feed{padding-top:12px;padding-bottom:16px}.conversation-feed:empty:before{padding:15px 6px;font-size:11px}.chat-entry{gap:9px;margin-bottom:12px}.chat-message{font-size:12px;line-height:1.8}.chat-action .chat-message,.chat-system .chat-message{font-size:10px}
  .game-sidebar .brief-section,.game-sidebar .shop-guide-section,.game-sidebar .command-section,.game-sidebar .interpretation-section{grid-column:auto;grid-row:auto;border-right:0;border-left:0}
  .game-sidebar .command-section{padding:17px 14px}.game-sidebar .command-box textarea{min-height:145px}.parent-memo .brief-section{padding:14px}.parent-memo .intended-list>.item-chip{font-size:11px;min-height:70px}.parent-memo .shop-guide-section{padding:13px 14px}
}
@media(max-width:480px){.conversation-panel{height:280px;max-height:280px}.conversation-header h2{font-size:14px}.conversation-jump{min-height:36px;font-size:11px;bottom:9px}.parent-memo>summary{font-size:12px;padding:11px}.parent-memo>summary>small{font-size:8px}.game-sidebar .quest-panel{border-width:8px}.chat-child{padding-left:8px}.chat-clerk{padding-right:8px}.chat-content{padding:9px 10px}.chat-message{font-size:11px;line-height:1.9}}
@media(prefers-reduced-motion:reduce){.conversation-feed{scroll-behavior:auto}.chat-entry{animation:none}.conversation-jump{transition:none}}
.guide-brand{display:flex;align-items:center;gap:7px;margin-bottom:5px;min-width:0}
.guide-logo{width:32px;height:32px;padding:3px;box-sizing:content-box;flex:none;background:#fff1cc;border:1px solid #bba77e;image-rendering:pixelated}
.guide-brand strong{font-size:12px;color:#695737;white-space:nowrap}.guide-category{margin-left:auto;padding:2px 5px;border:1px solid #d3c39b;color:#83714e;font-size:9px;white-space:nowrap}
.guide-landmark{display:block;color:#78633f}.guide-goods{display:block;margin-top:3px}

/* A game-time deadline: model preparation and pauses never spend the child's time. */
.game-hud>.hud-quest{flex:1 1 210px}
.errand-timer{flex:0 0 188px;min-width:0;padding:10px 12px 9px;border:2px solid #76835b;background:#fbf0ce;color:#456044;box-shadow:inset 0 0 0 1px #fff8e2,3px 3px 0 #acb790}
.timer-topline{display:flex;align-items:center;gap:6px;font-size:10px;line-height:1.4}
.timer-topline>small{margin-left:auto;font-size:8px;color:#64754d;text-align:right}
.timer-emblem{position:relative;display:inline-block;flex:none;width:13px;height:13px;border:2px solid currentColor;box-shadow:1px 0 currentColor,-1px 0 currentColor}
.timer-emblem:before{content:'';position:absolute;left:4px;top:1px;width:1px;height:5px;background:currentColor}
.timer-emblem:after{content:'';position:absolute;left:4px;top:5px;width:4px;height:1px;background:currentColor}
.timer-digits{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin:5px 0 7px}
.timer-digits strong{font:30px/1.15 var(--sans);letter-spacing:1px;font-variant-numeric:tabular-nums;color:#3e573b}
.timer-digits>span{font-size:8px;color:#7c7859;white-space:nowrap}
.timer-progress{height:8px;overflow:hidden;border:1px solid #9ba67d;background:#d8ddbd;box-shadow:inset 0 1px #b2bd94}
.timer-progress>span{display:block;width:100%;height:100%;background:repeating-linear-gradient(90deg,#6d8f53 0,#6d8f53 7px,#85a466 7px,#85a466 8px);box-shadow:inset 0 1px #a8bc83}
.errand-timer[data-state=ready]{border-color:#9c936a;color:#75633f}.errand-timer[data-state=ready] .timer-digits strong{color:#75633f}
.errand-timer[data-state=paused]{border-color:#8b8d7b;color:#676b5c;background:#e7e6d3}.errand-timer[data-state=paused] .timer-digits strong,.errand-timer[data-state=paused] .timer-topline>small{color:#676b5c}.errand-timer[data-state=paused] .timer-progress>span{background:#989d87;box-shadow:inset 0 1px #bbc0ab}
.errand-timer[data-low=true],.errand-timer[data-state=timed-out]{border-color:#a36345;color:#914e37;background:#fff0cd;box-shadow:inset 0 0 0 1px #fff8e2,3px 3px 0 #c4a17a}
.errand-timer[data-low=true] .timer-digits strong,.errand-timer[data-state=timed-out] .timer-digits strong,.errand-timer[data-low=true] .timer-topline>small,.errand-timer[data-state=timed-out] .timer-topline>small{color:#9b4c35}
.errand-timer[data-low=true] .timer-progress>span{background:repeating-linear-gradient(90deg,#b56b46 0,#b56b46 7px,#ce9265 7px,#ce9265 8px);box-shadow:inset 0 1px #e3af76}
.errand-timer[data-state=returned]{border-color:#54764c;background:#edf1d7}.errand-timer[data-state=returned] .timer-topline>small{color:#45683a}
.hud-settings{flex:1 1 100%;display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:2px}
.hud-settings>.difficulty-picker{margin-right:0}.hud-settings>.scenario-picker{margin-left:0}
.hud-settings>.status-pill{margin-left:auto}
.deadline-picker{display:flex;align-items:center;gap:6px;min-width:0}
.deadline-picker>span{font-size:10px;color:#63704d;white-space:nowrap}
.deadline-picker select{padding:7px;font-size:10px;background:#faf0d1;border-color:#b3a36e;color:#6f5938}
.deadline-picker select:disabled{cursor:not-allowed;color:#8a8d78;background:#e0e4ce;border-color:#b9bfa3}
.timer-help{flex:1 1 100%;font-size:9px;line-height:1.8;color:#66714e;word-break:keep-all}
.result-timing{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:12px 0;margin:12px 0 15px;border-top:1px dashed #bba77f;border-bottom:1px dashed #bba77f}
.result-timing>div{min-width:0;text-align:center}.result-timing span{display:block;font-size:10px;color:#837354;margin-bottom:5px}.result-timing strong{font:22px/1.2 var(--sans);color:#587044;letter-spacing:1px}
.result-banner[data-timed-out=true] .receipt-stamp{color:#a66445;border-color:#a66445}.result-banner[data-timed-out=true] .receipt-summary h3,.result-banner[data-timed-out=true] .result-timing>div:last-child strong{color:#a0583f}
.final-inventory-heading>#final-inventory-label{font:12px var(--sans);letter-spacing:0;color:#62573c}
.final-inventory-note{font-size:10px;line-height:1.8;color:#7d7255;margin:6px 0 10px;word-break:keep-all}
.log-timeout{color:#98533b}.status-pill[data-phase=timed_out]{color:#98533b;border-color:#c08e64;background:#f8e6c3}
@media(max-width:1150px){.game-hud>.hud-quest{flex-basis:170px}.errand-timer{flex-basis:166px;padding:8px 10px}.timer-digits strong{font-size:27px}.timer-topline{font-size:9px}.timer-topline>small{font-size:7px}.deadline-picker select,.deadline-picker>span{font-size:9px}.hud-settings{gap:7px}}
@media(max-width:720px){.game-hud>.hud-quest{flex:1 1 170px}.errand-timer{flex-basis:175px}.hud-settings{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.hud-settings>label{min-width:0;max-width:none;flex:none}.hud-settings>label select{min-width:0;max-width:100%;width:100%}.hud-settings>.status-pill{justify-self:end;margin:0;max-width:none}.deadline-picker{gap:5px}.deadline-picker select{font-size:10px}.timer-help{font-size:9px}.result-timing strong{font-size:20px}}
@media(max-width:480px){.game-hud{padding:10px;gap:10px}.game-hud>.hud-quest{flex:1 1 135px}.game-hud>.hud-quest h2{font-size:12px;line-height:1.65}.errand-timer{flex:0 0 139px;padding:7px 8px}.timer-digits{gap:4px;margin-bottom:6px}.timer-digits strong{font-size:25px;letter-spacing:0}.timer-digits>span{font-size:7px}.timer-topline{gap:4px;font-size:8px;flex-wrap:wrap}.timer-topline>small{font-size:7px}.timer-emblem{width:11px;height:11px}.timer-emblem:before{left:3px;height:4px}.timer-emblem:after{left:3px;top:4px;width:3px}.hud-settings{gap:7px}.hud-settings .difficulty-picker>span,.deadline-picker>span{font-size:8px}.hud-settings .difficulty-picker select,.hud-settings .scenario-picker select,.deadline-picker select{padding:7px 4px;font-size:9px}.timer-help{font-size:8px;line-height:1.9}.final-inventory-note{font-size:10px}.result-timing{gap:5px}.result-timing span{font-size:9px}.result-timing strong{font-size:18px}}
/* The clock and paid inventory stay inside the playable scene. */
.game-titlebar{padding-top:16px;padding-bottom:15px}
.brand-kicker{display:none}
.game-hud{padding:11px 14px;gap:8px}
.game-hud>.hud-quest{flex:1 1 100%;display:block}
.game-hud>.hud-quest h2{margin:0;font-size:14px}
.game-hud .hud-settings{margin:0}
.world-viewport{position:relative;isolation:isolate}
.world-viewport .game-board[data-renderer=three]{height:clamp(490px,45vw,680px)}
.play-hud{position:absolute;inset:12px;z-index:5;display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;pointer-events:none}
.play-hud .errand-timer{flex:none;width:184px;padding:8px 10px;box-shadow:inset 0 0 0 1px #fff8e2,3px 3px 0 #34463955}
.play-hud .timer-digits strong{font-size:28px}
.play-hud .timer-topline{font-size:9px;gap:5px}
.play-hud .timer-topline>small{font-size:7px;line-height:1.4;max-width:76px}
.play-hud .inventory-hud{flex:none;align-self:center;width:min(100%,570px);margin:0;padding:7px 9px 8px;border-width:8px;filter:drop-shadow(3px 4px 0 #253c3240)}
.inventory-hud .panel-heading{gap:8px}
.inventory-hud .panel-heading h3{font-size:11px;white-space:nowrap}
.inventory-hud .panel-heading h3>span{font-size:14px}
.inventory-hud .section-label{font-size:8px;letter-spacing:0}
.inventory-hud .basket-list{grid-template-columns:repeat(auto-fit,minmax(54px,1fr));gap:4px;margin-top:7px}
.inventory-hud .basket-list>.item-chip{flex-direction:row;min-height:55px;padding:4px 0;gap:3px;border-width:3px;font-size:8px;overflow:hidden}
.inventory-hud .item-mini,.inventory-hud .item-mini img,.inventory-hud .item-mini svg{width:26px;height:26px}
.inventory-hud .item-name{line-height:1.2;white-space:nowrap;letter-spacing:-.3px}
.inventory-hud .item-count{min-width:14px;padding:1px 2px;background:#425c42;color:#fff5d5;border:1px solid #263e32;font:11px/1 var(--mono);text-align:center}
.inventory-hud .is-empty .item-count{background:#b0ad91;border-color:#99947b;color:#ece6ce}
.world-viewport .town-view-status{clip-path:inset(50%);width:1px;height:1px;overflow:hidden;padding:0;white-space:nowrap}
.world-viewport:has(.town-view-error) .play-hud{display:none}
@media(max-width:720px){
  .game-titlebar{padding-top:14px;padding-bottom:12px}
  .game-hud{padding:10px 12px;gap:7px}
  .game-hud>.hud-quest{flex:1 1 100%;display:block}
  .game-hud>.hud-quest h2{font-size:13px;line-height:1.4}
  .world-viewport .game-board[data-renderer=three]{height:480px}
  .play-hud{inset:9px}
  .play-hud .errand-timer{width:146px;padding:7px 8px}
  .play-hud .timer-topline{font-size:8px;gap:4px}
  .play-hud .timer-topline>small{font-size:7px;max-width:58px}
  .play-hud .timer-digits strong{font-size:26px}
  .play-hud .timer-digits>span{font-size:7px}
  .world-viewport .town-view-controls{top:9px;right:9px;display:grid;grid-template-columns:1fr 1fr;width:151px;max-width:calc(100% - 173px);gap:4px}
  .world-viewport .town-view-controls button{min-width:0;min-height:32px;padding:5px 4px;font-size:9px;white-space:nowrap}
  .play-hud .inventory-hud{padding:5px 5px 6px;border-width:6px}
  .inventory-hud .panel-heading h3{font-size:10px}
  .inventory-hud .section-label{font-size:7px}
  .inventory-hud .basket-list{gap:3px;margin-top:6px}
  .inventory-hud .basket-list>.item-chip{min-height:48px;font-size:8px;border-width:2px;padding-top:5px}
  .inventory-hud .item-mini,.inventory-hud .item-mini img,.inventory-hud .item-mini svg{width:22px;height:22px}
  .inventory-hud .item-count{font-size:10px;min-width:12px;padding:1px 0}
}
@media(max-width:360px){
  .play-hud{inset:7px}
  .play-hud .errand-timer{width:132px;padding:6px}
  .world-viewport .town-view-controls{right:7px;max-width:calc(100% - 153px)}
  .world-viewport .town-view-controls button{font-size:8px;padding:5px 2px}
  .inventory-hud .basket-list{gap:2px}
  .inventory-hud .basket-list>.item-chip{font-size:7px}
  .inventory-hud .item-mini,.inventory-hud .item-mini img,.inventory-hud .item-mini svg{width:20px;height:20px}
}

/* Pocket money and personal purchases stay small beside the nine errand slots. */
.hud-clock-wallet{display:flex;flex-direction:column;gap:5px;width:184px}
.play-hud .hud-clock-wallet .errand-timer{width:100%}
.pocket-wallet{padding:6px 9px;background:#5e6951ed;border:1px solid #384b3d;box-shadow:inset 0 0 0 1px #a2ad80,2px 2px #34463944;color:#fff0cc}
.pocket-wallet>div{display:flex;align-items:baseline;justify-content:space-between;gap:7px}
.pocket-wallet span{font-size:8px;white-space:nowrap}.pocket-wallet strong{font:13px/1.5 var(--mono);white-space:nowrap}.pocket-wallet small{display:block;margin-top:2px;font-size:7px;color:#dce1bd;text-align:right}
.personal-pocket{display:flex;align-items:center;flex-wrap:wrap;gap:4px 7px;padding-top:5px;margin-top:5px;border-top:1px solid #aa9470;color:#f3e6bf;font-size:8px}
.personal-pocket>.extra-items{margin-right:8px}.extra-items{display:flex;flex-wrap:wrap;align-items:center;gap:4px 7px;min-width:0}
.extra-chip{display:inline-flex;align-items:center;gap:4px;max-width:100%;font-size:10px;line-height:1.5}
.extra-chip>span:last-child{overflow-wrap:anywhere}.extra-icon{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:24px;height:24px;image-rendering:pixelated}
.extra-icon svg{display:block;width:100%;height:100%;image-rendering:pixelated}.personal-pocket .extra-icon{width:18px;height:18px}.personal-pocket .extra-chip{font:10px var(--mono)}
.extra-empty{color:#9b916e;font-size:10px}.personal-pocket .extra-empty{font-size:8px;color:#d4c6a3}
.shop-cart-content{min-width:0}.cart-extra-row{margin-top:7px;padding-top:6px;border-top:1px dashed #cdb485}.cart-extra-row>span{display:block;color:#9a6945;font-size:8px;margin-bottom:3px}.cart-extra-row .extra-chip{background:#f9e3bb;border:1px solid #ccab78;padding:2px 5px}
.shop-cart-strip[data-affordable=false] .shop-cart-total{color:#a44b3c}.shop-cart-strip[data-affordable=false]{border-bottom-color:#b96e53}
.extra-result{margin:18px 0 16px;padding:13px 0 0;border-top:2px solid #c7b68b}.extra-result h3{font-size:13px;color:#725b38}.extra-result-rule{font-size:10px;line-height:1.8;color:#8a7958;margin-top:5px}.extra-result-summary{font-size:11px;line-height:1.8;color:#695d42;margin-top:9px}.extra-result-list{list-style:none;padding:0;margin:8px 0 0}.extra-receipt-item{display:flex;gap:9px;padding:9px 0;border-top:1px dashed #d4c69f}.extra-receipt-item>.extra-icon{width:32px;height:32px}.extra-receipt-item>div{min-width:0}.extra-receipt-item strong{font-size:11px;font-weight:400;color:#665037}.extra-receipt-item p{font-size:10px;line-height:1.8;margin-top:3px}.extra-receipt-item small{display:block;font-size:9px;line-height:1.8;margin-top:3px;color:#8d7c58}.extra-unaffordable p{color:#a3593e}
.log-extra-collect,.log-extra-checkout,.log-eat-start,.log-eat-end{color:#8a653c}
@media(max-width:720px){.hud-clock-wallet{width:146px}.pocket-wallet{padding:5px 7px}.pocket-wallet strong{font-size:12px}.pocket-wallet span{font-size:7px}.pocket-wallet small{font-size:6px}.shop-cart-content{grid-column:1/-1;grid-row:2}.shop-cart-content>.shop-cart-items{grid-column:auto;grid-row:auto}.personal-pocket{gap:3px 5px;font-size:7px;padding-top:4px;margin-top:4px}.personal-pocket>.extra-items{margin-right:4px}.personal-pocket .extra-icon{width:16px;height:16px}.personal-pocket .extra-chip{font-size:9px}.extra-result-summary{font-size:10px}}
@media(max-width:360px){.hud-clock-wallet{width:132px}.pocket-wallet strong{font-size:11px}.personal-pocket{gap:3px}.personal-pocket .extra-items{gap:3px}}

.settings-logo{display:block;width:min(100%,300px);height:auto;margin:0 auto 12px;image-rendering:pixelated}

/* One viewport is the game. Only the chat and opened notes can scroll. */
html:has(body.game-screen){height:100%;overflow:hidden;overscroll-behavior:none;scroll-behavior:auto}
body.game-screen{height:100vh;height:100dvh;width:100%;overflow:hidden;overscroll-behavior:none}
.game-screen .game-shell{width:100%;max-width:none;height:100%;margin:0;padding:max(8px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));overflow:hidden}
.game-screen .game-layout{display:grid;grid-template-columns:minmax(0,1fr) clamp(330px,28vw,440px);grid-template-rows:minmax(0,1fr);height:100%;min-height:0;gap:8px;align-items:stretch}
.game-screen .world-panel{display:flex;min-width:0;min-height:0;height:auto;max-height:none}
.game-screen .world-frame{position:relative;display:flex;flex:1;min-width:0;min-height:0;width:100%;margin:0;box-shadow:none}
.game-screen .world-viewport{flex:1;min-width:0;min-height:0;overflow:hidden}
.game-screen .world-viewport .game-board,.game-screen .world-viewport .game-board[data-renderer=three]{width:100%;height:100%;min-height:0;max-height:none}
.game-screen .game-sidebar{display:grid;grid-template-rows:auto minmax(0,1fr) auto;min-width:0;min-height:0;gap:8px}
.game-screen .goal-panel{padding:10px 12px;border:2px solid #a28a5a;background:#f6e8be;box-shadow:inset 0 0 0 2px #fff3d2;min-width:0;max-height:34dvh;overflow:auto}
.goal-panel .panel-heading{gap:8px;margin:0}.goal-panel .panel-heading h2{font-size:12px;white-space:nowrap;color:#6e5634}
.goal-tools{display:flex;align-items:center;gap:5px;margin-left:auto}.quiet-button{min-height:30px;padding:5px 8px;border:1px solid #aa9369;background:#fff2cc;box-shadow:inset 0 1px #fff9e8;color:#6b583a;font-size:10px;white-space:nowrap}
.goal-panel .mission-name{margin-top:6px;color:#8a744b;font-size:9px;line-height:1.5}
.goal-panel .intended-list{grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;margin-top:8px}
.goal-panel .intended-list>.item-chip{min-height:34px;flex-direction:row;gap:5px;padding:4px 3px;font-size:10px}
.goal-panel .item-mini,.goal-panel .item-mini img,.goal-panel .item-mini svg{width:21px;height:21px}
.game-screen .conversation-panel{order:initial;display:grid;grid-template-rows:auto auto minmax(0,1fr);height:auto;max-height:none;min-height:0;width:100%;margin:0;box-shadow:inset 0 0 0 1px #fff8de}
.game-screen .conversation-header{padding:9px 11px;gap:8px}.conversation-kicker{display:none}
.game-screen .conversation-header h2{font-size:13px}.game-screen .conversation-header .status-pill{max-width:none;padding:4px 6px;font-size:8px;margin:0}
.game-screen .conversation-current{padding:7px 10px}.game-screen .conversation-portrait{width:32px;height:32px;flex-basis:32px}
.game-screen .conversation-status-copy>span{display:none}.game-screen .conversation-status-copy p{font-size:10px;line-height:1.6}
.game-screen .conversation-feed{padding:12px 10px 18px}.game-screen .conversation-feed:empty:before{padding:16px 6px}
.game-screen .run-controls{display:grid;grid-template-columns:1fr;gap:5px;min-width:0}
.game-screen .run-controls .run-button{margin:0;min-height:35px;padding:7px 9px;font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.game-screen .run-controls .playback-controls{margin:0;gap:5px}.game-screen .run-controls .playback-controls .button{min-height:28px;padding:4px 5px;font-size:9px}
.game-screen .world-frame>.shop-cart-strip{position:absolute;right:10px;top:58px;z-index:7;display:flex;flex-direction:column;align-items:stretch;gap:4px;width:min(330px,58%);max-height:110px;overflow:auto;padding:7px 9px;border:1px solid #a99565;background:#fff0d6ed;box-shadow:2px 2px 0 #31432b30}
.game-screen .shop-cart-title,.game-screen .shop-cart-total>small{display:none}.game-screen .shop-cart-content{grid-column:auto;grid-row:auto;width:100%}
.game-screen .shop-cart-total{margin:0;text-align:right}.game-screen .shop-cart-total span{font-size:9px}.game-screen .shop-cart-items .item-chip{font-size:9px;padding:3px 4px}
.game-screen .shop-cart-items .item-mini,.game-screen .shop-cart-items .item-mini svg,.game-screen .shop-cart-items .item-mini img{width:18px;height:18px}
.game-screen .cart-extra-row{padding-top:4px;margin-top:4px}.game-screen .cart-extra-row>span{font-size:8px}.game-screen .cart-extra-row .extra-chip{font-size:9px}.game-screen .cart-extra-row .extra-icon{width:18px;height:18px}
.game-screen .play-hud{inset:10px}.game-screen .inventory-hud .item-name{display:none}
.game-dialog{width:min(640px,calc(100vw - 32px));max-width:none;max-height:calc(100dvh - 32px);padding:0;margin:auto;border:3px solid #81704c;background:#f6ebcc;color:var(--ink);box-shadow:inset 0 0 0 1px #fff7db,6px 6px 0 #263c3040;overflow:hidden}
.game-dialog[open]{display:flex;flex-direction:column}.game-dialog::backdrop{background:#253b36b3;backdrop-filter:blur(2px)}
.dialog-header{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:none;padding:12px 15px;background:#e3d4aa;border-bottom:1px solid #b7a475;box-shadow:inset 0 1px #fff0c9}
.dialog-header h2{font-size:15px;line-height:1.5}.dialog-body{min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#aa9569 #f6ebcc}
.dialog-actions{display:flex;align-items:center;justify-content:space-between;gap:10px;flex:none;padding:12px 15px;border-top:1px solid #cdbb8b;background:#f4e4ba}.dialog-actions>a{font-size:10px;color:#7a6c4b}.dialog-actions .button{min-height:36px;padding:8px 12px;font-size:11px}
.memo-dialog .parent-memo{display:block;width:100%;margin:0;padding:0;border:0;max-height:none;overflow:visible;box-shadow:none}
.memo-settings,.memo-dialog .shop-guide-section,.memo-dialog .interpretation-section{display:block;border:0;border-bottom:1px solid #cfbe91;padding:12px 16px}
.memo-settings>summary,.memo-dialog .shop-guide-section>summary,.memo-dialog .interpretation-section>summary{cursor:pointer;font-size:11px;color:#75613c;line-height:1.7}
.settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:12px}.settings-grid>label{display:flex;flex-direction:column;align-items:stretch;gap:5px;max-width:none;min-width:0;margin:0!important;font-size:10px}
.settings-grid>label>span{display:block;font-size:10px}.settings-grid select{width:100%;max-width:none;font-size:11px;padding:8px}.settings-grid .route-control{flex-direction:row;align-items:center}.setting-note{font-size:10px;line-height:1.9;color:#877953;margin-top:12px}
.memo-dialog .command-section{padding:16px;border:0}.memo-dialog .connection-row{padding:0;margin:0;gap:10px;border:0}.memo-dialog .connection-row select{flex:1;min-width:0}.memo-dialog .ai-connection{margin-bottom:16px}.memo-dialog .ai-connection p{overflow-wrap:anywhere}
.memo-dialog .command-box textarea{display:block;min-height:150px;font-size:13px;line-height:1.9;resize:vertical;max-height:40dvh}.memo-dialog .command-presets{display:flex;flex-wrap:wrap;gap:5px}.memo-dialog .command-presets button{white-space:normal;text-align:left}
.memo-dialog .shop-guide{max-height:none}.memo-dialog .receipt-note{margin:12px 16px;padding:12px;background:#f5dfc2;border:1px solid #c88e68;line-height:1.9}
.result-dialog{width:min(680px,calc(100vw - 32px))}.result-dialog .receipt-panel{padding:18px;border:0;box-shadow:none;overflow:visible;background:#fbf2d8}.result-dialog .result-banner{margin-top:0}.result-dialog .receipt-summary{margin-top:0}
.result-dialog .final-inventory{grid-template-columns:repeat(auto-fit,minmax(98px,1fr))}
.result-dialog .final-inventory>.item-chip{flex-direction:row;justify-content:flex-start;min-height:34px;padding:4px 6px;white-space:nowrap}
.result-dialog .final-inventory .item-mini,.result-dialog .final-inventory .item-mini svg{width:22px;height:22px}
@media(max-width:1000px){
  .game-screen .play-hud .timer-digits{gap:0 4px;flex-wrap:wrap}
  .game-screen .play-hud .timer-digits strong{font-size:23px;letter-spacing:0;flex-shrink:0}
  .game-screen .play-hud .timer-digits>span{font-size:7px;margin-left:auto;max-width:100%}
}
@media(max-width:1000px) and (min-width:721px){
  .game-screen .game-layout{grid-template-columns:minmax(0,1fr) 320px;gap:6px}
  .game-screen .play-hud .hud-clock-wallet{width:146px}.game-screen .inventory-hud .basket-list>.item-chip{min-height:35px}
  .game-screen .inventory-hud .item-mini,.game-screen .inventory-hud .item-mini img,.game-screen .inventory-hud .item-mini svg{width:20px;height:20px}
}
@media(max-width:720px){
  .game-screen .game-shell{padding:max(4px,env(safe-area-inset-top)) max(4px,env(safe-area-inset-right)) max(4px,env(safe-area-inset-bottom)) max(4px,env(safe-area-inset-left))}
  .game-screen .game-layout{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,44fr) minmax(0,56fr);gap:5px;min-height:0;height:100%}
  .game-screen .world-panel{display:flex;min-height:0;height:auto;max-height:none}.game-screen .world-frame{order:initial;margin:0}
  .game-screen .game-sidebar{display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:5px;min-height:0}
  .game-screen .goal-panel{padding:5px 8px;max-height:23dvh}.goal-panel .panel-heading h2{font-size:10px}.goal-panel .mission-name{display:none}.goal-tools{gap:4px}.goal-tools .button{min-height:25px;font-size:9px;padding:4px 7px}
  .goal-panel .intended-list{grid-template-columns:repeat(4,minmax(0,1fr));gap:3px;margin-top:4px}.goal-panel .intended-list>.item-chip{min-height:25px;padding:2px;font-size:9px;gap:3px}.goal-panel .item-mini,.goal-panel .item-mini img,.goal-panel .item-mini svg{width:17px;height:17px}
  .game-screen .conversation-panel{height:auto;max-height:none;min-height:0;border-width:2px}.game-screen .conversation-header{padding:5px 9px}.game-screen .conversation-header h2{font-size:11px}.game-screen .conversation-header .status-pill{font-size:7px;padding:3px 5px}
  .game-screen .conversation-current{padding:4px 8px;gap:7px}.game-screen .conversation-portrait{width:24px;height:24px;flex-basis:24px}.game-screen .conversation-status-copy p{font-size:9px;line-height:1.5}
  .game-screen .conversation-feed{padding:8px 8px 12px}.game-screen .chat-entry{margin-bottom:9px;gap:7px}.game-screen .chat-avatar{width:28px;height:28px}.game-screen .chat-content{padding:7px 8px}.game-screen .chat-message{font-size:10px;line-height:1.7}.game-screen .chat-action .chat-message,.game-screen .chat-system .chat-message{font-size:9px}
  .game-screen .run-controls{gap:4px}.game-screen .run-controls .run-button{min-height:29px;padding:5px 8px;font-size:10px}.game-screen .run-controls .playback-controls .button{min-height:25px;padding:3px 5px;font-size:8px}
  .game-screen .play-hud{inset:6px}.game-screen .hud-clock-wallet{width:128px;gap:3px}.game-screen .play-hud .errand-timer{padding:5px 6px}.game-screen .play-hud .timer-digits{margin:2px 0 4px}.game-screen .play-hud .timer-digits strong{font-size:23px}.game-screen .play-hud .timer-topline{font-size:7px;gap:3px}.game-screen .play-hud .timer-topline>small{font-size:6px;max-width:55px}.game-screen .timer-emblem{display:none}
  .game-screen .pocket-wallet{padding:3px 5px}.game-screen .pocket-wallet strong{font-size:11px}.game-screen .pocket-wallet small{font-size:6px}
  .game-screen .play-hud .inventory-hud{width:min(100%,500px);padding:3px 4px 4px;border-width:5px}.game-screen .inventory-hud .panel-heading{margin-bottom:3px}.game-screen .inventory-hud h3{font-size:8px}.game-screen .inventory-hud .section-label{font-size:6px}.game-screen .inventory-hud .basket-list{grid-template-columns:repeat(auto-fit,minmax(34px,1fr));gap:3px}.game-screen .inventory-hud .basket-list>.item-chip{min-height:27px;padding:2px 0;font-size:8px;gap:1px}
  .game-screen .inventory-hud .item-mini,.game-screen .inventory-hud .item-mini img,.game-screen .inventory-hud .item-mini svg{width:16px;height:16px}.game-screen .personal-pocket{padding-top:2px;margin-top:3px}.game-screen .personal-pocket .extra-icon{width:12px;height:12px}.game-screen .personal-pocket .extra-chip{font-size:7px}
  .game-screen .world-viewport .town-view-controls{top:6px;right:6px;grid-template-columns:1fr 1fr;max-width:calc(100% - 145px);width:150px;gap:3px}.game-screen .world-viewport .town-view-controls button{min-height:26px;padding:3px 4px;font-size:8px}
  .game-screen .world-frame>.shop-cart-strip{top:68px;right:6px;width:min(245px,calc(100% - 145px));max-height:84px;padding:4px 5px;gap:2px}.game-screen .shop-cart-total span{font-size:7px}.game-screen .shop-cart-items .item-chip{font-size:7px;padding:1px 2px}.game-screen .shop-cart-items .item-mini,.game-screen .shop-cart-items .item-mini svg,.game-screen .shop-cart-items .item-mini img{width:13px;height:13px}.game-screen .cart-extra-row .extra-chip{font-size:7px}.game-screen .cart-extra-row .extra-icon{width:13px;height:13px}
  .game-dialog,.result-dialog{width:calc(100vw - 16px);max-height:calc(100dvh - 16px)}.dialog-header{padding:9px 11px}.dialog-header h2{font-size:13px}.dialog-body .command-section{padding:13px}.dialog-actions{padding:9px 11px;gap:8px}.dialog-actions .button{font-size:10px;padding:8px}.dialog-actions>a{font-size:8px}.memo-dialog .command-box textarea{font-size:12px;min-height:140px}.result-dialog .receipt-panel{padding:13px}.settings-grid select{font-size:10px}
}
@media(max-height:540px) and (min-width:641px){
  .game-screen .game-layout{grid-template-columns:minmax(0,1fr) minmax(280px,40%);grid-template-rows:minmax(0,1fr)}
  .game-screen .goal-panel{max-height:31dvh;padding:5px 8px}.goal-panel .mission-name{display:none}.goal-panel .intended-list{margin-top:4px;grid-template-columns:repeat(4,minmax(0,1fr))}.goal-panel .intended-list>.item-chip{min-height:25px;font-size:8px;padding:2px}.goal-panel .item-mini,.goal-panel .item-mini img,.goal-panel .item-mini svg{width:16px;height:16px}
  .game-screen .conversation-header{padding:5px 8px}.game-screen .conversation-current{padding:3px 8px}.game-screen .conversation-portrait{width:24px;height:24px;flex-basis:24px}.game-screen .run-controls .run-button{min-height:28px;padding:4px 8px;font-size:10px}.game-screen .run-controls .playback-controls .button{min-height:24px;font-size:8px}
}

/* Read the town guide over the map, then send the one-time note from chat. */
.town-guide{position:absolute;z-index:12;left:14px;right:14px;top:50%;transform:translateY(-50%);display:flex;flex-direction:column;max-height:calc(100% - 28px);padding:18px;background:#f7edce;border:5px solid #9b855e;box-shadow:inset 0 0 0 2px #fff8de,5px 5px #2a413442;overflow:hidden}
.town-guide-header{display:flex;align-items:center;justify-content:space-between;gap:14px;flex:none;padding-bottom:12px;border-bottom:2px solid #d1bd8d}.town-guide-header span{font-size:10px;color:#9a7c46}.town-guide-header h2{font-size:17px;line-height:1.7;color:#665139;margin-top:5px}.town-guide-header .button{flex:none}
.town-guide-intro{font-size:11px;line-height:1.9;color:#8b7550;margin:12px 0;flex:none}.town-guide-footer{font-size:10px;line-height:1.7;color:#7e865e;margin:12px 0 0;text-align:right;flex:none}
.town-guide .shop-guide{display:grid;grid-template-columns:repeat(auto-fit,minmax(235px,1fr));align-content:start;gap:11px;max-height:none;min-height:0;overflow:auto;overscroll-behavior:contain;margin:0;padding:2px;scrollbar-width:thin;scrollbar-color:#a58d62 #f0e2b8}
.town-guide .shop-guide-card{min-width:0;margin:0;padding:12px;border:1px solid #bdab7e;background:#fff7df;box-shadow:2px 2px #ddcda6}
.town-guide .guide-brand{display:flex;align-items:center;flex-wrap:wrap;gap:7px}.town-guide .guide-logo{width:38px;height:38px;image-rendering:pixelated;flex:none}.town-guide .guide-brand strong{font-size:15px;line-height:1.5}.town-guide .guide-category{font-size:9px;color:#988462;margin-left:auto}
.town-guide .guide-landmark{display:block;width:auto;white-space:normal;margin:9px 0 6px;padding:5px 7px;font-size:10px;line-height:1.7;background:#e9e5c5;border:1px solid #d1cfaa;color:#65704d}
.town-guide .guide-location{font-size:11px;line-height:1.8;margin:0}.town-guide .guide-goods{display:block;font-size:10px;line-height:1.8;color:#8f7048;padding-top:7px;margin-top:7px;border-top:1px dashed #d7c69e}
.town-guide-toggle{position:absolute;z-index:8;right:10px;top:62px;padding:7px 10px;background:#fff1c9}
.game-screen .conversation-panel{grid-template-rows:auto auto minmax(0,1fr) auto}
.conversation-history{position:relative;display:flex;min-height:0;overflow:hidden}.game-screen .conversation-history .conversation-feed{flex:1;width:100%}.conversation-history .conversation-jump{bottom:8px;min-height:28px;font-size:10px;padding:5px 9px}
.chat-composer{min-height:0;max-height:60dvh;overflow:auto;overscroll-behavior:contain;padding:10px 11px;border-top:2px solid #b6a278;background:#eee2bc;scrollbar-width:thin;scrollbar-color:#b4a078 #eee2bc}
.chat-composer .composer-connection{position:relative;margin-bottom:8px}.chat-composer .connection-row{display:flex;gap:5px;padding:0;margin:0;border:0}.chat-composer .connection-row select{width:auto;min-width:0;font-size:10px;padding:5px;height:29px;flex:1}.chat-composer .connect-button{min-height:29px;font-size:9px;padding:4px 7px;white-space:nowrap}
.chat-composer .ai-connection{margin:5px 0 0;padding:0;gap:5px;min-height:14px;padding-right:68px}.chat-composer .ai-connection strong{font-size:8px;line-height:1.6;overflow-wrap:anywhere}.chat-composer .connection-dot{width:5px;height:5px;flex-basis:5px}
.chat-composer .ai-help-button{position:absolute;right:0;bottom:0;margin:0;font-size:8px;line-height:1.7}.chat-composer #download-progress{display:none}
.composer-input>label{display:block;font-size:10px;line-height:1.6;color:#725c39;margin-bottom:6px}.game-sidebar .chat-composer .command-box textarea{display:block;min-height:82px;height:100px;max-height:23dvh;width:100%;resize:vertical;font-size:12px;line-height:1.8;padding:9px;border:1px solid #b9a271;background:#fff9e2;color:#594c34}
.chat-composer .command-rule{font-size:8px;line-height:1.7;margin:6px 0;color:#8c7956}.command-help>summary{font-size:9px;color:#7a724d;cursor:pointer;line-height:1.7}.command-help-content{max-height:115px;overflow:auto;padding:7px 0 0}.chat-composer .command-presets{display:flex;gap:4px;flex-wrap:wrap;margin:0}.chat-composer .command-presets button{font-size:8px;padding:4px 6px}.command-help-content>p{font-size:9px;line-height:1.9;margin:7px 0 0;color:#89784f}
.composer-actions{margin-top:8px}.composer-actions .run-button{width:100%;min-height:34px;padding:7px 9px;font-size:11px}.composer-actions:has(>.button[hidden]){display:none}
.sent-note{font-size:9px;line-height:1.8;margin:0;color:#81744f}.chat-composer[data-locked=true] .composer-connection{display:none}.chat-composer[data-error=true] .composer-connection{display:block}.chat-composer .child-question{font-size:10px;line-height:1.8;margin:0 0 7px;padding:8px;background:#f5dfc2;border:1px solid #c88e68}
.settings-dialog .interpretation-section{padding:14px 16px;border:0}.settings-dialog .interpretation-section summary{font-size:11px;cursor:pointer;line-height:1.8;color:#75613c}
@media(max-width:1000px){.town-guide{left:9px;right:9px;padding:12px;border-width:4px}.town-guide-header h2{font-size:14px}.town-guide .shop-guide{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.town-guide .shop-guide-card{padding:9px}.town-guide .guide-brand strong{font-size:12px}.town-guide .guide-logo{width:30px;height:30px}.town-guide .guide-category{font-size:8px}.town-guide .guide-location{font-size:10px}.town-guide .guide-goods{font-size:9px}}
@media(max-width:720px){
  .town-guide{left:5px;right:5px;padding:8px;max-height:calc(100% - 12px);border-width:3px}.town-guide-header{gap:7px;padding-bottom:7px}.town-guide-header span{font-size:7px}.town-guide-header h2{font-size:11px;line-height:1.5;margin-top:3px}.town-guide-header .button{font-size:8px;min-height:25px;padding:4px 5px}.town-guide-intro{font-size:8px;line-height:1.7;margin:7px 0}.town-guide-footer{font-size:7px;margin-top:6px}.town-guide .shop-guide{gap:5px}.town-guide .shop-guide-card{padding:6px}.town-guide .guide-brand{gap:4px}.town-guide .guide-logo{width:24px;height:24px}.town-guide .guide-brand strong{font-size:10px}.town-guide .guide-category{font-size:7px;margin:0}.town-guide .guide-landmark{font-size:8px;padding:3px 4px;margin:5px 0}.town-guide .guide-location{font-size:8px}.town-guide .guide-goods{font-size:8px;padding-top:4px;margin-top:4px}.town-guide-toggle{top:67px;right:6px;font-size:8px;min-height:24px;padding:4px 7px}
  .chat-composer{padding:6px 8px;max-height:34dvh}.chat-composer .composer-connection{margin-bottom:5px}.chat-composer .connection-row select{height:25px;font-size:9px;padding:3px}.chat-composer .connect-button{min-height:25px;font-size:8px;padding:3px 6px}.chat-composer .ai-connection strong,.chat-composer .ai-help-button{font-size:7px}.chat-composer .ai-connection{margin-top:3px}.composer-input>label{font-size:9px;margin-bottom:4px}.game-sidebar .chat-composer .command-box textarea{min-height:55px;height:64px;font-size:10px;line-height:1.7;padding:6px;max-height:15dvh}.chat-composer .command-rule{font-size:7px;margin:3px 0}.command-help>summary{font-size:8px}.command-help-content{max-height:80px}.composer-actions{margin-top:5px}.composer-actions .run-button{min-height:28px;padding:5px;font-size:9px}.sent-note{font-size:8px}.chat-composer .child-question{font-size:8px;padding:6px}.chat-composer .command-presets button{font-size:8px}
}
@media(max-height:620px) and (min-width:721px){.chat-composer{padding:6px 8px;max-height:48dvh}.game-sidebar .chat-composer .command-box textarea{min-height:55px;height:68px;font-size:11px}.chat-composer .composer-connection{margin-bottom:5px}.chat-composer .command-rule{margin:3px 0}.composer-actions{margin-top:5px}}
.composer-actions .run-button{margin:0;line-height:1.5}
@media(max-height:720px) and (min-width:721px){
  .game-screen .goal-panel{padding:6px 9px}.game-screen .goal-panel .mission-name{display:none}.game-screen .goal-panel .intended-list{grid-template-columns:repeat(4,minmax(0,1fr));margin-top:5px}.game-screen .goal-panel .intended-list>.item-chip{min-height:27px;font-size:8px;padding:2px;gap:3px}.game-screen .goal-panel .item-mini,.game-screen .goal-panel .item-mini img,.game-screen .goal-panel .item-mini svg{width:16px;height:16px}
  .game-screen .conversation-header{padding:6px 9px}.game-screen .conversation-current{padding:4px 8px}.game-screen .conversation-portrait{width:26px;height:26px;flex-basis:26px}
}
.chat-composer .command-box{margin:0}
@media(max-width:720px){.chat-composer .command-rule{display:none}.chat-composer .command-help{margin-top:4px}.chat-composer .connect-button{border-width:2px}.composer-actions .run-button{border-width:3px;padding:4px 6px}}

/* Compact sound controls use the same paper-and-wood settings panel. */
.sound-settings{margin:10px 16px 4px;padding:12px;border:2px solid #b5a27b;background:#f7edce;color:#675539;min-width:0}
.sound-settings legend{padding:0 7px;font-size:12px}.sound-master{display:flex;align-items:center;gap:8px;font-size:11px;margin-bottom:12px}.sound-settings input{accent-color:#486b54}
.sound-slider{display:grid;grid-template-columns:68px minmax(70px,1fr) 40px;align-items:center;gap:9px;font-size:10px;margin:12px 0}.sound-slider input{width:100%}.sound-slider output{text-align:right;font-variant-numeric:tabular-nums}.sound-settings .setting-note{margin:9px 0 0;line-height:1.8}.sound-settings a{color:#486b54}.sound-settings .button{font-size:10px;padding:6px 10px}#sound-toggle{min-width:29px;padding:4px 7px}
@media(max-width:720px){.sound-settings{margin:8px;padding:9px}.sound-slider{grid-template-columns:56px minmax(60px,1fr) 34px;gap:6px}}



/* Portrait play keeps the map, shopping list and live conversation in reading order. */
@media (max-width: 640px), (orientation: portrait) and (max-width: 1024px) {
  .game-screen .game-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 42fr) minmax(0, 58fr);
    gap: 4px;
  }
  .game-screen .game-sidebar { grid-template-rows: auto minmax(0, 1fr) auto; gap: 4px; }
  .game-screen .goal-panel { padding: 5px 9px; max-height: none; }
  .game-screen .goal-panel .mission-name { display: none; }
  .game-screen .goal-panel .intended-list {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    margin-top: 3px;
  }
  .game-screen .goal-panel .intended-list > .item-chip { flex: 0 0 auto; min-height: 26px; padding: 2px 7px; font-size: 11px; }
  .game-screen .goal-tools .button { min-height: 30px; padding-inline: 9px; font-size: 11px; }
  .game-screen .goal-panel .panel-heading h2, .game-screen .conversation-header h2 { font-size: 13px; }
  .game-screen .conversation-current { padding: 4px 9px; }
  .game-screen .conversation-status-copy p, .game-screen .chat-action .chat-message, .game-screen .chat-system .chat-message { font-size: 12px; }
  .game-screen .conversation-feed { padding: 8px 10px; }
  .game-screen .chat-message { font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
  .game-screen .chat-speaker, .game-screen .chat-place { font-size: 10px; }
  .game-screen .chat-composer { max-height: min(36dvh, 220px); padding: 6px 9px; }
  .chat-composer .command-rule { display: none; }
  .composer-input > label, .command-help > summary { font-size: 11px; }
  .game-sidebar .chat-composer .command-box textarea {
    height: 54px;
    min-height: 44px;
    max-height: 15dvh;
    padding: 6px 8px;
    font-size: 16px;
    line-height: 1.4;
    resize: none;
  }
  .composer-actions .run-button { min-height: 38px; font-size: 13px; }
  .game-screen .run-controls .playback-controls .button { min-height: 34px; font-size: 11px; }
  .game-screen[data-phase=ready] .run-controls { display: none; }
  .chat-composer[data-locked=true]:has(#start-run[hidden]) { display: none; }
  .town-guide-intro, .town-guide .guide-location, .town-guide .guide-goods { font-size: 11px; }
  .town-guide .guide-landmark { font-size: 10px; }
  .town-guide-header .button { min-height: 32px; font-size: 11px; }
}
@media (max-width: 640px) and (max-height: 620px) {
  .game-screen .game-layout { grid-template-rows: minmax(0, 34fr) minmax(0, 66fr); }
  .game-screen:has(#command-input:focus) .game-layout { grid-template-rows: minmax(0, 22fr) minmax(0, 78fr); }
  .game-screen:has(#command-input:focus) .conversation-current { display: none; }
  .game-screen:has(#command-input:focus) .chat-composer { max-height: none; }
  .game-screen:has(#command-input:focus) .conversation-panel { grid-template-rows: auto minmax(0, 1fr) auto; }
}

@media (max-width: 1024px) {
  .game-screen[data-note-keyboard=open] { height: var(--note-viewport-height); }
  .game-screen[data-note-keyboard=open] .game-layout { grid-template-rows: minmax(0, 22fr) minmax(0, 78fr); }
  .game-screen[data-note-keyboard=open] .conversation-current { display: none; }
  .game-screen[data-note-keyboard=open] .conversation-panel { grid-template-rows: auto minmax(0, 1fr) auto; }
  .game-screen[data-note-keyboard=open] .chat-composer { max-height: none; }
}

/* The parent scouts the same town the child will walk through. */
#prep-overlay{position:absolute;inset:0;z-index:6;pointer-events:none}
body[data-preparation=exploring] .play-hud,body[data-preparation=ended] .play-hud{display:none}
.goal-note{position:absolute;top:16px;left:16px;width:max-content;min-width:158px;max-width:min(50%,290px);color:#4e4a36;background:#fff3cc;border:2px solid #8a734b;box-shadow:3px 3px 0 #423b3255;pointer-events:auto}
.goal-note::before{content:"";position:absolute;top:-7px;left:15px;width:32px;height:9px;background:#e4bf70;border:1px solid #b89958;transform:rotate(-4deg);pointer-events:none}
.goal-note summary{display:flex;align-items:center;justify-content:space-between;gap:17px;cursor:pointer;list-style:none;padding:8px 11px 6px;border-bottom:1px dashed #bea778;color:#574a32;font-size:13px;font-weight:bold}
.goal-note summary::-webkit-details-marker{display:none}
.goal-note:not([open]) summary{border-bottom:0}
.note-fold{width:7px;height:7px;border:solid #827451;border-width:0 2px 2px 0;transform:rotate(45deg)}
.goal-note[open] .note-fold{transform:rotate(225deg)}
.note-items{display:grid;grid-template-columns:repeat(2,max-content);gap:0 10px;padding:3px 10px 7px;background:repeating-linear-gradient(transparent 0 23px,#c7ab761f 23px 24px)}
.note-items .item-chip{min-width:0;min-height:24px;display:flex;align-items:center;gap:4px;margin:0;padding:0;border:0;box-shadow:none;background:none;color:#4e4a36;font-size:11px;white-space:nowrap;animation:none}
.note-items .item-mini{flex:none;width:17px;height:17px}
.note-items .item-mini > svg{display:block;width:100%;height:100%}
.prep-clock{position:absolute;top:16px;right:16px;min-width:86px;display:grid;justify-items:center;gap:2px;padding:6px 10px;background:#344c40;color:#ffedb8;border:2px solid #d0bc8a;box-shadow:2px 2px 0 #34443677;font-variant-numeric:tabular-nums}
.prep-clock>span:first-child{font-size:10px}.prep-clock strong{font-family:var(--mono);font-size:24px;line-height:1}
.prep-track{width:100%;height:3px;margin-top:3px;background:#637566}.prep-track i{display:block;width:100%;height:100%;background:#e5bc64;transform-origin:left}
body[data-preparation=ended] .prep-clock{display:none}
.prep-hint{position:absolute;bottom:13px;left:13px;margin:0;padding:5px 8px;color:#fff8df;background:#344c40ed;border:1px solid #a5af8e;font-size:10px;line-height:1.5}
.touch-hint{display:none}
#prep-hint{max-width:calc(100% - 145px);word-break:keep-all}
body[data-preparation=exploring] .town-guide-toggle{top:86px;right:16px}
.explore-controls{position:absolute;z-index:7;right:13px;bottom:13px;display:flex;gap:3px}
.explore-controls button{font:inherit;font-size:11px;min-width:34px;min-height:34px;padding:4px 8px;color:#fff4d3;background:#344c40;border:2px solid #a8b395;box-shadow:1px 2px 0 #384c3c;cursor:pointer}
.explore-controls button:hover,.explore-controls button:focus-visible{background:#526a50}
.game-board[data-view=explore] .town-canvas{cursor:grab}.game-board[data-view=explore] .town-canvas[data-dragging=true]{cursor:grabbing}
@media(pointer:coarse){.drag-hint{display:none}.touch-hint{display:inline}.explore-controls button{min-height:40px;min-width:40px}}
@media(max-width:640px),(max-height:540px){
  .goal-note{left:8px;top:9px;min-width:135px;max-width:calc(100% - 105px)}
  .goal-note summary{font-size:11px;padding:5px 8px}
  .note-items{padding:2px 7px 4px;gap:0 6px}.note-items .item-chip{min-height:19px;font-size:10px}
  .prep-clock{top:8px;right:8px;min-width:74px;padding:4px 7px}.prep-clock strong{font-size:20px}
  body[data-preparation=exploring] .town-guide-toggle{right:8px;top:63px}
  .prep-hint{bottom:7px;left:7px;font-size:9px;padding:3px 5px}
  .explore-controls{right:7px;bottom:7px}
}

.survey-location{position:absolute;top:12px;left:12px;display:flex;align-items:center;gap:10px;max-width:calc(100% - 114px);padding:5px 6px 5px 10px;color:#4e4936;background:#fff3cc;border:2px solid #8a734b;box-shadow:2px 2px #423b3255;pointer-events:auto}
.survey-location strong{font-size:13px}.survey-location button{white-space:nowrap;min-height:32px;font-size:11px}
.survey-pins{position:absolute;inset:0;overflow:hidden;pointer-events:none}
.survey-pin{position:absolute;transform:translate(-50%,-100%);padding:3px 6px;background:#fff3cc;color:#493e2c;border:1px solid #826847;box-shadow:1px 1px #443d3355;font-size:11px;font-weight:bold;line-height:1.3;white-space:nowrap}
.survey-pin::after{content:"";position:absolute;left:50%;bottom:-4px;width:2px;height:4px;background:#826847}
.survey-pin[data-kind=counter]{background:#344c40;color:#fff5ce;border-color:#82947b}
.shop-hover {
  position: absolute; z-index: 8; pointer-events: none; width: 226px; max-width: calc(100% - 8px);
  padding: 9px 11px; color: #453e30; background: #fff5d7; border: 2px solid #786a4e;
  box-shadow: inset 0 0 0 1px #fffbe6, 3px 3px 0 #39463566;
}
.shop-hover-name { display: block; margin-bottom: 6px; color: #344e3d; font-size: 13px; }
.shop-plan-body { display: flex; align-items: center; gap: 11px; }
.shop-plan {
  flex: 0 1 112px; min-width: 0; display: grid; aspect-ratio: var(--cols) / var(--rows);
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); grid-template-rows: repeat(var(--rows), minmax(0, 1fr));
  border: 2px solid #796950; background-color: var(--floor);
  background-image: linear-gradient(90deg, #76634626 1px, transparent 1px), linear-gradient(#76634626 1px, transparent 1px);
  background-size: calc(100% / var(--cols)) calc(100% / var(--rows));
}
.shop-plan-fixture { background: #aa916b; border: 1px solid #7d6b50; }
.shop-plan-fixture[data-kind=counter], .shop-key-counter { background: #406d57; }
.shop-plan-entry, .shop-key-entry { background: #f0be54; outline: 1px solid #7b602c; }
.shop-plan-product { display: block; width: 15px; height: 15px; image-rendering: pixelated; }
.shop-plan > .shop-plan-product { place-self: center; z-index: 1; }
.shop-plan-key { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.shop-plan-key li { display: flex; align-items: center; gap: 5px; font-size: 10px; line-height: 1.3; }
.shop-plan-key i { width: 11px; height: 6px; margin: 3px 2px; }
.shop-hover p { margin: 7px 0 0; font-size: 11px; line-height: 1.6; word-break: keep-all; }
.game-board[data-view=explore] .town-canvas[data-hover-shop] { cursor: pointer; }
.guide-preview{margin-top:8px}
body:not([data-preparation=exploring]) .guide-preview{display:none}
@media(max-width:640px),(max-height:540px){
  .survey-location{top:8px;left:8px;gap:7px;padding:2px 4px 2px 7px}.survey-location strong{font-size:11px}
  .survey-pin{padding:2px 4px;font-size:10px}
}

.opening-note {
  cursor: pointer;
  width: min(490px, calc(100vw - 32px));
  max-height: min(800px, calc(100dvh - 32px));
  border: 2px solid #6d6048;
  color: #463e32;
  background: #fffae8;
  box-shadow: 3px 3px #e1cfaa, 5px 5px #806e50, 9px 11px 0 #23382d40;
}
.opening-note::backdrop { cursor: pointer; background: #24362e9c; }
.notebook-page {
  padding: 25px 25px 22px 44px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  background:
    radial-gradient(circle at 10px 12px, #9b8868 0 2px, #e2d5b1 2px 4px, transparent 4px) 0 0 / 20px 30px repeat-y,
    linear-gradient(90deg, transparent 27px, #d498886e 27px 29px, transparent 29px),
    repeating-linear-gradient(transparent 0 25px, #aaa99033 25px 26px);
}
.notebook-opening { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.notebook-opening h2 { font-size: clamp(21px, 4.8vw, 28px); line-height: 1.32; letter-spacing: -.055em; color: #354e40; }
.notebook-opening h2:focus { outline: none; }
.notebook-opening img { width: 62px; height: 62px; image-rendering: pixelated; }
.notebook-page p { font-size: 14px; line-height: 1.75; word-break: keep-all; overflow-wrap: anywhere; }
.notebook-list { margin: 16px 0; }
.notebook-list h3 { display: inline; font-size: 14px; font-weight: 750; color: #36503e; background: linear-gradient(transparent 58%, #ebca78 58%); }
.notebook-list .note-items { display: grid; grid-template-columns: repeat(auto-fit, minmax(91px, 1fr)); gap: 3px 8px; margin-top: 6px; padding: 0; background: none; }
.notebook-list .item-chip { justify-content: flex-start; gap: 6px; min-height: 25px; font-size: 13px; }
.notebook-list .item-mini { width: 22px; height: 22px; }
.notebook-footer { display: flex; align-items: center; gap: 16px; margin-top: 17px; }
.notebook-footer p { flex: 1; font-size: 12px; color: #655b49; line-height: 1.6; }
.notebook-footer .button { flex: none; min-height: 44px; padding: 8px 13px; font-size: 14px; color: #fff7da; background: #435e49; border: 2px solid #354a3b; box-shadow: 2px 2px #a69772; }
.notebook-footer .button:hover { background: #526d53; }
@media (max-width: 480px) {
  .notebook-page { padding: 18px 15px 17px 36px; }
  .notebook-opening img { width: 48px; height: 48px; }
  .notebook-list { margin: 12px 0; }
  .notebook-footer { flex-wrap: wrap; gap: 9px; }
  .notebook-footer p { flex-basis: 100%; }
  .notebook-footer .button { width: 100%; }
}
