:root{--ink: #f5ecdb;--paper: #e5c68a;--salt: #a9c2c2;--well: rgba(13, 23, 25, .91);--edge: rgba(225, 198, 153, .31);--safe-left: max(14px, env(safe-area-inset-left));--safe-right: max(14px, env(safe-area-inset-right));--safe-top: max(12px, env(safe-area-inset-top));--safe-bottom: max(12px, env(safe-area-inset-bottom))}[hidden]{display:none!important}#game-container{width:100%;height:100%;height:100dvh}#game-container>canvas{touch-action:none}body:not([data-state=playing]) :is(#hud,#world-markers),#touch-controls,.touch-copy{display:none}#top-left-panel{left:var(--safe-left);top:var(--safe-top);max-width:30vw}#top-right-panel{right:var(--safe-right);top:var(--safe-top)}#tide{font-size:11px;color:var(--salt);white-space:nowrap}#shift-goal{display:flex;justify-content:space-between;align-items:baseline;gap:6px;margin-bottom:4px;color:var(--paper);font-size:11px;font-weight:700}#shift-count{white-space:nowrap;font-variant-numeric:tabular-nums}#btn-close-shift{display:block;width:100%;min-height:44px;margin:6px 0 0;padding:5px 8px;font-size:13px;letter-spacing:0;pointer-events:auto}#summary-goal{color:var(--paper);font-size:13px;font-weight:700}#bottom-left-hud{left:var(--safe-left);bottom:var(--safe-bottom)}#controls-hint{right:var(--safe-right);bottom:var(--safe-bottom)}#compass-wrap{top:var(--safe-top);width:min(350px,31vw)}#inspect-card{right:var(--safe-right)}#toast-container{right:var(--safe-right);max-width:min(52vw,430px)}#ticket-board{display:grid;gap:3px;font-size:13px;line-height:1.3}.ticket{background:var(--well);border-left:2px solid var(--edge);border-bottom:1px solid var(--edge);padding:5px 10px;color:var(--ink);min-width:175px}.ticket small{display:block;color:var(--salt);margin-top:2px}button.ticket{min-height:44px;border-top:0;border-right:0;cursor:pointer;text-align:left;font:inherit;pointer-events:auto;touch-action:manipulation}.ticket-front{border-left-color:var(--paper)}.ticket-chase{border-left-color:#e69568}.ticket-chase small{color:#ffc69e}:is(#top-right-panel,#bottom-left-hud,#inspect-card,#stall-bonus-pill,#controls-hint,.prompt-line){-webkit-backdrop-filter:none;backdrop-filter:none;border-radius:4px}#stall-bonus-pill{display:block;background:var(--well);font-size:11px;font-weight:600}#escape-alert{position:fixed;z-index:8;top:calc(var(--safe-top) + 39px);width:max-content;max-width:min(70vw,400px);background:#341f14f0;border:1px solid #bf704d;color:#ffe0c7;animation:none;box-shadow:0 3px 13px #0005;padding:4px 11px;font-size:12px}#stock-alert{z-index:7;font-size:12px}.w-escape-tag{background:#502719f5;color:#fff0d7;border-color:#d69c70;box-shadow:0 4px 12px #0008;animation:none}.w-customer-tag{background:var(--well);border-radius:4px}.w-customer-marker{top:var(--customer-anchor-y)}body.touch .w-customer-marker{transform:translate(-50%,max(-100%,calc(var(--customer-label-min-top, 0px) - var(--customer-anchor-y))))}#speech{position:absolute;left:50%;bottom:calc(var(--safe-bottom) + 26px);transform:translate(-50%);padding:9px 14px 10px;width:max-content;max-width:min(390px,53vw);display:grid;gap:3px;color:#291b13;line-height:1.45;background:#f0dfb8;border:1px solid #fff0ce;border-radius:11px;font-size:clamp(13px,1.48vw,17px);font-weight:700;box-shadow:0 6px 19px #0008;white-space:normal;z-index:12}#speech.anchored{left:var(--speaker-x);top:var(--speaker-y);bottom:auto;transform:translate(-50%,-110%)}#speech.anchored:after{content:"";position:absolute;bottom:-6px;left:calc(50% - 6px);width:11px;height:11px;transform:rotate(45deg);background:#f0dfb8}#speech-speaker{color:#63442e;font-size:10px;letter-spacing:.08em}.overlay-screen{padding:var(--safe-top) var(--safe-right) var(--safe-bottom) var(--safe-left);overflow-y:auto;background:radial-gradient(ellipse at 48% 32%,#121f2030,#050d0fd4);-webkit-backdrop-filter:none;backdrop-filter:none}.modal-card{width:min(570px,100%);max-height:100%;overflow-y:auto;background:linear-gradient(155deg,#1a2727f7,#0c1518fa);border-color:var(--edge);border-radius:9px}.start-card{width:min(515px,100%)}.modal-subtitle{font-size:12px;letter-spacing:.16em;color:var(--paper)}.modal-title{font-family:Songti TC,"Noto Serif TC",Georgia,serif;font-weight:800}.start-card .modal-title{font-size:clamp(32px,6.2vw,53px);letter-spacing:.095em}.start-quote{color:#f3d8ac;font-weight:700}.control-copy{color:#ccddd9;font-size:13px;line-height:1.5;margin:0 0 12px}#load-status{min-height:15px;margin-top:5px;font-size:11px;color:#b5ccc9}.game-btn,.q-btn{min-height:37px}.game-btn:disabled{opacity:.56;cursor:default;filter:none;transform:none}.game-btn,.q-btn.active{border-radius:5px}.btn-primary{background:#edd0a2;color:#271e13;border-color:#ffe0b6;box-shadow:none}.q-btn.active{background:#524331;color:#fff2d8}.settings-buttons,.gear-buttons{display:flex;gap:6px;justify-content:center;flex-wrap:wrap}.settings-buttons .game-btn,.gear-buttons .game-btn{padding:7px 11px;font-size:12px;letter-spacing:0}.gear-shop{margin:12px 0;color:#e7cda4;font-size:12px}.gear-shop small{display:block;color:#e2bf87;margin-top:2px}.gear-shop p{margin-bottom:5px}.summary-grid{grid-template-columns:repeat(3,1fr)}body.touch .keyboard-copy{display:none}body.touch .touch-copy,body.touch[data-state=playing] #touch-controls{display:block}#touch-controls{position:absolute;z-index:11;inset:0;pointer-events:none}#touch-controls button,#touch-move{pointer-events:auto;touch-action:none}.touch-button{min-width:48px;min-height:48px;background:var(--well);color:var(--ink);border:1px solid var(--edge);border-radius:6px;font-size:13px;font-family:inherit;font-weight:700;box-shadow:0 3px 11px #0006}.touch-button:active,.touch-button[aria-pressed=true]{background:#f0d9b2;color:#201a13}#touch-pause{position:absolute;top:var(--safe-top);right:calc(var(--safe-right) + 162px);font-size:18px}#touch-move{position:absolute;left:var(--safe-left);bottom:var(--safe-bottom);width:clamp(88px,14vh + 38px,126px);aspect-ratio:1;border:1px solid #f0dbb085;border-radius:50%;background:#13202265;display:grid;place-items:center}#touch-stick{width:43%;aspect-ratio:1;border:1px solid #f6e6c5bb;border-radius:50%;background:#28383ac4;box-shadow:0 2px 5px #0008}.touch-actions{position:absolute;right:var(--safe-right);bottom:var(--safe-bottom);display:grid;grid-template-columns:repeat(2,51px);gap:7px}#touch-action{grid-column:span 2;min-height:53px;background:#edd0a2;color:#241b14}#touch-action:active{background:#fff0ce}body.touch :is(#controls-hint,#upgrade-quick-bar,#inspect-card,#stall-bonus-pill,#stock-alert){display:none!important}body.touch #top-right-panel{width:154px;padding:6px 9px 8px}body.touch .tr-header{display:grid;grid-template-columns:1fr auto;grid-template-areas:"day time" "tide time";gap:2px 7px;margin-bottom:5px}body.touch .day-badge{grid-area:day;width:max-content;font-size:11px;white-space:nowrap;padding:2px 6px}body.touch #tide{grid-area:tide;padding-left:4px}body.touch #timer-box{grid-area:time;font-size:15px;white-space:nowrap}body.touch #revenue-header{font-size:11px;gap:4px;white-space:nowrap}body.touch #revenue-text{font-size:12px}body.touch #top-left-panel{max-width:min(29vw,237px)}body.touch #escape-alert{position:static;width:fit-content;max-width:100%;margin-top:4px;transform:none;white-space:normal}body.touch #bottom-left-hud{width:132px;bottom:calc(var(--safe-bottom) + clamp(88px,14vh + 38px,126px) + 5px);padding:5px 7px;gap:2px}body.touch .hud-bar-row{gap:4px}body.touch .hud-bar-label{width:27px}body.touch .hud-bar-num{width:30px}body.touch #basket-items{display:none}body.touch #toast-container{top:auto;bottom:calc(var(--safe-bottom) + 119px);max-width:min(30vw,220px)}body.touch .toast-msg{padding:5px 8px;font-size:11px}body.touch .prompt-line{max-width:53vw;white-space:normal;text-align:center;font-size:12px;padding:4px 9px}body.touch #interact-prompt{top:calc(50% + 17px)}body.touch #speech:not(.anchored){bottom:var(--safe-bottom);max-width:min(44vw,385px)}body.touch .ticket{min-width:0;font-size:11px}body.touch .ticket:not(.ticket-front){display:none}body.touch .w-customer-tag{min-width:0;padding:3px 6px}.marker-action{pointer-events:auto;touch-action:manipulation;min-width:84px;min-height:44px;display:flex;align-items:center;justify-content:center;padding:3px 0;background:transparent;color:inherit;border:0;font-family:inherit}body.touch .w-customer-want{font-size:10px}body.touch .w-bar-bg{width:64px}body.touch .w-escape-tag{font-size:10px}body.touch .w-stab-tag{padding:2px 5px}body.touch .w-stab-txt{font-size:9px}@media(max-height:500px){.modal-card{padding:12px 18px}.modal-title{margin-bottom:6px}.modal-desc,.control-copy,.quality-row{margin-bottom:8px}.start-card .modal-title{font-size:34px}.summary-grid{gap:5px;margin:8px 0 10px}.summary-item{padding:6px}.game-btn{padding:8px 19px;min-height:42px}}@media(max-width:690px){body.touch #compass-wrap{display:none}}@media(max-width:500px){body.touch #top-left-panel{max-width:40vw}#speech.anchored,body.touch #speech{max-width:61vw}body.touch #speech:not(.anchored){bottom:calc(var(--safe-bottom) + 116px)}#touch-pause{top:calc(var(--safe-top) + 86px);right:var(--safe-right)}body.touch #toast-container{bottom:calc(var(--safe-bottom) + 125px)}.summary-grid{grid-template-columns:repeat(2,1fr)}}.menu-actions,.settings-navigation{display:flex;justify-content:center;flex-wrap:wrap;gap:8px;margin-top:14px}.menu-actions button,.settings-navigation button{min-height:44px}.game-btn,.q-btn{touch-action:manipulation}#save-status{margin:11px 0 0;font-size:12px}#load-status:not(:empty),#settings-status:not(:empty),#pause-status:not(:empty){color:#efd6ac;font-size:12px;margin-top:8px}body[data-state=menu] #start-screen{background:radial-gradient(ellipse at 50% 30%,#34444175,#0a1417 88%)}#lesson{position:absolute;left:50%;top:calc(var(--safe-top) + 36px);transform:translate(-50%);width:max-content;max-width:min(390px,59vw);background:var(--well);border:1px solid var(--edge);border-radius:6px;padding:7px 11px;text-align:center;line-height:1.4;font-size:13px}.lesson-skip{pointer-events:auto;touch-action:manipulation;margin-top:3px;min-height:36px;color:var(--paper);background:none;border:0;font:inherit;text-decoration:underline;text-underline-offset:3px;cursor:pointer}body[data-lesson] :is(#top-left-panel,#top-right-panel,#stock-alert,#escape-alert){display:none!important}body[data-lesson=ice] #touch-ice{box-shadow:0 0 0 2px var(--paper)}.ledger-card{width:min(660px,100%);max-block-size:calc(100dvh - var(--safe-top) - var(--safe-bottom));display:flex;flex-direction:column;gap:8px;text-align:left}.ledger-header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.ledger-header .modal-title{margin:0 0 4px;font-size:clamp(24px,5.5vh,36px)}.ledger-header .control-copy{margin:0}.ledger-header button,#ledger-navigation button{min-height:44px;white-space:nowrap}.ledger-scroll{min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:0 8px 0 1px}.ledger-scroll:focus-visible,#ledger-title:focus-visible{outline:2px solid var(--paper);outline-offset:1px}#ledger-entries{margin:0;padding:0;list-style:none}#ledger-entries li{display:grid;grid-template-columns:3em minmax(0,1fr);gap:8px;border-top:1px solid var(--edge);padding:7px 0;color:var(--ink);font-size:13px;line-height:1.4}#ledger-entries time{color:var(--salt);font-variant-numeric:tabular-nums}#ledger-entries blockquote,#ledger-statement{margin:3px 0 0;color:var(--paper);overflow-wrap:anywhere}#ledger-signoff{margin-top:6px;border-left:2px solid var(--paper);padding:5px 0 5px 9px}#ledger-witness{font-size:12px;color:var(--salt)}#ledger-statement{font-size:14px;line-height:1.5}#ledger-navigation{display:flex;gap:8px;justify-content:flex-end}@media(max-height:385px){.start-card .modal-title{font-size:31px}.start-card .modal-desc{font-size:12px}}
