:root{--ink:#fff0d0;--gold:#f5bd71;--peach:#f09b79;--mint:#b6e1b1;--navy:#1c2540;--panel:#202a45;--line:#8e8d99;--shadow:#0a0f1f;font-family:Consolas,"Courier New",monospace;color:var(--ink);color-scheme:dark}
*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden}button{font:inherit;cursor:pointer}button:disabled{opacity:.45;cursor:not-allowed}button:focus-visible{outline:3px solid var(--gold);outline-offset:2px}[hidden]{display:none!important}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.game-root{position:fixed;inset:0;background:#627949;overflow:hidden;user-select:none;touch-action:none}#world{position:absolute;inset:0;display:block;width:100%;height:100%;image-rendering:pixelated;image-rendering:crisp-edges}.screen-vignette{position:absolute;inset:0;pointer-events:none;box-shadow:inset 0 0 110px 25px #1017295c}
.hud-top{position:absolute;top:0;left:0;right:0;display:flex;justify-content:space-between;align-items:flex-start;gap:20px;padding:calc(12px + env(safe-area-inset-top)) calc(14px + env(safe-area-inset-right)) 0 calc(14px + env(safe-area-inset-left));pointer-events:none}.hud-top>*{pointer-events:auto}.hud-left{width:340px;max-width:calc(100vw - 235px);background:#1c2743e8;border:2px solid #f0bd78;box-shadow:5px 5px 0 #10172c8c;padding:10px 12px 12px;backdrop-filter:blur(3px)}.brand{display:flex;align-items:center;gap:9px;padding-bottom:9px;border-bottom:1px solid #80869b79}.brand>span{font-size:27px;line-height:1;color:var(--gold);text-shadow:2px 2px 0 #8b5c5d}.brand>div{display:flex;flex-direction:column;gap:3px}.brand small{font-size:8px;color:#c0c7cf;letter-spacing:1.4px;font-weight:900}.brand strong{font-size:14px;letter-spacing:1px;white-space:nowrap}.main-stats{display:grid;grid-template-columns:1.3fr .75fr;gap:8px;padding:9px 0 6px}.stat>span,.pressure>span{display:block;font-size:8px;color:#c6c6ce;font-weight:900;letter-spacing:1px}.stat strong{display:block;margin-top:3px;font-size:13px;color:var(--ink)}.fame-stat{grid-column:1/-1}.fame-stat>span{display:flex;justify-content:space-between}.stat b,.pressure b{color:var(--gold);font-size:10px}.meter{height:8px;background:#10172d;border:1px solid #0b1126;margin-top:5px}.meter i{display:block;height:100%;width:0;background:linear-gradient(90deg,#e58673,#f8c67a);transition:width .1s}.pressure-bars{display:grid;grid-template-columns:1.6fr 1fr;gap:9px}.pressure>span{display:flex;justify-content:space-between}.deadline-meter i{background:linear-gradient(90deg,#ed676d,#f2be74)}.deadline-meter.critical i{background:#f05b6a;animation:warning .65s infinite alternate}.drunk-meter i{background:linear-gradient(90deg,#e99a77,#e45d62)}@keyframes warning{to{opacity:.35}}
.hud-right{display:flex;flex-direction:column;align-items:flex-end;gap:7px}.location-banner{min-width:164px;text-align:right;text-shadow:1px 2px 0 #111527}.location-banner span{display:block;color:#fff0d1;font-size:9px;letter-spacing:2px;font-weight:900}.location-banner strong{display:block;color:var(--gold);font-size:13px;letter-spacing:1px;margin-top:3px}.map-frame{position:relative;background:#202b48db;border:2px solid #f4be75;box-shadow:4px 4px 0 #0b1427b0;padding:5px}.map-frame canvas{display:block;width:160px;height:100px;image-rendering:pixelated}.map-frame button{position:absolute;right:6px;bottom:6px;padding:4px 6px;background:#1a2744e8;border:1px solid #f5c271;color:#fff0cb;font-size:8px;font-weight:900;letter-spacing:1px}.top-buttons{display:flex;gap:5px}.top-buttons button{background:#1c2946dc;color:#f4e3c5;border:1px solid #b8a18c;padding:6px 8px;font-size:8px;font-weight:900;box-shadow:2px 2px 0 #0b1328}
.pressure-bars{grid-template-columns:1fr 1fr}.craving-pressure{grid-column:1/-1}.high-meter i{background:linear-gradient(90deg,#7cc8a7,#a9d98a)}.deadline-meter.paused i{background:linear-gradient(90deg,#89cda6,#d2dd91)}
.intro-scene{width:min(540px,92vw);padding:22px;background:#283047;border:4px solid #f0c083;box-shadow:0 14px 0 #10192b;text-align:left;color:#fff0d0}.intro-scene small{display:block;color:#f3bd87;font-size:10px;letter-spacing:2px;font-weight:900}.intro-scene h2{font-size:25px;margin:11px 0 5px;color:#ffe0a0}.intro-scene p{min-height:72px;font-size:16px;line-height:1.45;margin:0 0 18px}.intro-scene button{background:#edba79;border:3px solid #fff1c9;color:#283047;font-weight:900;padding:10px 14px;width:100%;text-align:center}.intro-room-art{height:88px;margin-bottom:15px;display:flex;align-items:flex-end;justify-content:center;gap:24px;border:3px solid #5b4d59;background:linear-gradient(#a2807a 65%,#bd9b7b 65%);box-shadow:inset 0 -10px #92735f}.intro-room-art span{display:grid;place-items:center;width:52px;height:63px;background:#705766;border:3px solid #2c3042;color:#ffd8b6;font-size:27px;box-shadow:5px 5px 0 #423b4a}.intro-room-art .intro-actor{width:42px;height:43px;background:#a15c61;color:#f6d57e}
.near-prompt,.toast{position:absolute;left:50%;transform:translateX(-50%);z-index:5;border:2px solid var(--gold);background:#1b2744ed;color:#fff0d1;box-shadow:4px 4px 0 #11172d99;text-align:center;font-size:11px;font-weight:900;line-height:1.35;pointer-events:none}.near-prompt{bottom:calc(101px + env(safe-area-inset-bottom));padding:9px 15px;white-space:nowrap;max-width:92%;overflow:hidden;text-overflow:ellipsis}.toast{top:calc(14px + env(safe-area-inset-top));padding:10px 14px;max-width:min(480px,70vw)}
.hud-bottom{position:absolute;bottom:calc(24px + env(safe-area-inset-bottom));left:calc(14px + env(safe-area-inset-left));right:calc(14px + env(safe-area-inset-right));display:flex;align-items:flex-end;justify-content:space-between;gap:16px;pointer-events:none}.hud-bottom>*{pointer-events:auto}.bottom-left{display:flex;flex-wrap:wrap;gap:5px;max-width:410px}.bottom-left span{background:#1b2844db;border:1px solid #bbb09d;color:#fff0d0;padding:6px 8px;font-size:8px;font-weight:900;box-shadow:2px 2px 0 #0d172a9c}.bottom-left .danger-chip{background:#663b50e8;border-color:#ed8e86;color:#ffc7b8}.quick-bag{display:flex;align-items:stretch;gap:5px}.quick-bag button{min-width:103px;background:#1b2846ed;color:var(--ink);border:2px solid #f2bd75;padding:6px 8px;display:flex;align-items:center;gap:6px;box-shadow:3px 3px 0 #0d1428b0;font-weight:900;font-size:10px;white-space:nowrap}.quick-bag button:hover:not(:disabled){background:#34425d}.quick-bag b{color:var(--gold)}.quick-bag small{font-size:8px;background:#d6aa73;color:#253047;padding:2px 4px;margin-left:auto}.item-glyph{font-size:20px;line-height:1;color:var(--gold)}.smoke-glyph{color:var(--mint)}.desktop-help{position:absolute;left:50%;bottom:calc(6px + env(safe-area-inset-bottom));transform:translateX(-50%);white-space:nowrap;background:#16213ad9;color:#e8dbbe;padding:4px 8px;font-size:8px;font-weight:900;letter-spacing:.5px;pointer-events:none}.desktop-help span{color:var(--gold)}
.touch-controls{display:none;position:absolute;left:calc(12px + env(safe-area-inset-left));right:calc(12px + env(safe-area-inset-right));bottom:calc(95px + env(safe-area-inset-bottom));justify-content:space-between;align-items:flex-end;pointer-events:none}.touch-controls>*{pointer-events:auto}.dpad{display:grid;grid-template-columns:repeat(3,44px);grid-template-rows:repeat(2,42px);gap:3px}.dpad button,.touch-actions button{border:2px solid #f2c07f;background:#1b2b48c9;color:#fff2d1;font-size:16px;font-weight:900;touch-action:none;box-shadow:3px 3px 0 #0a14269c}.dpad button.pressed,.touch-actions button:active{background:var(--gold);color:#1f2a45}.dpad [data-move=up]{grid-column:2}.dpad [data-move=left]{grid-row:2;grid-column:1}.dpad [data-move=down]{grid-row:2;grid-column:2}.dpad [data-move=right]{grid-row:2;grid-column:3}.touch-actions{display:flex;gap:5px}.touch-actions button{width:50px;height:50px}.touch-actions span{display:block;font-size:7px;letter-spacing:.4px}
.modal,.challenge-overlay,.start-overlay{position:absolute;inset:0;z-index:20;display:flex;align-items:center;justify-content:center;padding:calc(15px + env(safe-area-inset-top)) calc(15px + env(safe-area-inset-right)) calc(15px + env(safe-area-inset-bottom)) calc(15px + env(safe-area-inset-left));background:#0a1025bd;backdrop-filter:blur(2px);touch-action:auto}.modal-card{width:min(540px,100%);max-height:90vh;overflow:auto;background:#24314c;border:3px solid #f0bd74;box-shadow:8px 8px 0 #090f20}.modal-head{display:flex;justify-content:space-between;align-items:center;background:#e9ad6f;color:#22283a;padding:8px 13px;font-size:10px;font-weight:900;letter-spacing:1.1px}.modal-head button{border:2px solid #3b3440;background:#ffe0a6;color:#25283c;width:27px;height:27px;line-height:18px;font-size:19px}.modal-body{padding:18px}.modal-body h2{font-size:24px;line-height:1.15;letter-spacing:-1px;margin:0 0 9px}.modal-body>p{font-size:11px;line-height:1.6;color:#c9ced5;margin:0 0 15px}.modal-actions{display:flex;flex-direction:column;gap:8px}.modal-choice{width:100%;display:flex;align-items:center;justify-content:space-between;gap:12px;text-align:left;background:#35435e;color:#fff0d1;border:2px solid #71809a;padding:11px}.modal-choice:hover:not(:disabled){border-color:var(--gold);background:#465675}.modal-choice strong{font-size:12px}.modal-choice small{display:block;font-size:9px;color:#c2cad7;margin-top:5px;line-height:1.4}.modal-choice>span:last-child{font-size:11px;color:var(--gold);font-weight:900;white-space:nowrap}.modal-note{margin-top:12px;padding:10px;background:#1a253d;border-left:3px solid var(--gold);font-size:10px;line-height:1.5;color:#d0d2d7}.modal-map{display:block;width:100%;height:auto;image-rendering:pixelated;border:2px solid #101a31}.modal-link-row{display:flex;flex-wrap:wrap;gap:5px;margin-top:12px}.modal-link-row button{font-size:9px;padding:6px;background:#33425e;border:1px solid #a8a3a0;color:#fff0d1}.modal-victory{text-align:center;color:var(--gold);font-size:35px}.modal-result{display:flex;justify-content:space-between;border-top:1px solid #69758a;padding:8px 0;font-size:10px}.modal-result strong{color:var(--gold)}.journal-list{list-style:none;margin:0;padding:0;max-height:170px;overflow:auto}.journal-list li{border-top:1px solid #5a6579;padding:7px 0;font-size:10px;line-height:1.4}.journal-list small{color:var(--gold);display:block;font-size:8px}.journal-list p{margin:3px 0 0}.journal-possessions{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:12px}.journal-possessions span{border:1px solid #6b7891;padding:6px;font-size:9px;color:var(--gold)}
.challenge-overlay{z-index:25;background:#080e22e8}.challenge-content{width:min(700px,100%);max-height:95vh;overflow:auto}.search-game{background:#202b47;border:3px solid #f1bc76;box-shadow:8px 8px 0 #090e1c;padding:18px;color:var(--ink)}.search-game h2{margin:0 0 8px;font-size:21px}.search-game p{font-size:11px;line-height:1.5;color:#cbd1d9}.search-timer{font-size:26px;color:var(--gold);font-weight:900}.search-columns{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:14px 0}.search-zone{min-height:145px;background:#111c34;border:2px solid #72829b;padding:10px}.search-zone strong{font-size:10px;color:var(--gold)}.search-item{display:block;width:100%;margin-top:8px;background:#344560;border:2px solid #d4aa79;color:#fff0d2;padding:8px;text-align:left;font-size:11px;font-weight:900}.search-hidden-slot{display:inline-flex;align-items:center;justify-content:center;width:48px;height:44px;margin:8px 4px 0 0;background:#263850;border:2px dashed #bca87f;color:#bdbfc6;font-size:10px}.search-hidden-slot.filled{border-style:solid;background:#53735e;color:#e7f4d7}.search-finish{background:var(--gold);border:2px solid #161d32;padding:10px 14px;color:#1b2440;font-weight:900;width:100%}
.start-overlay{z-index:30;background:linear-gradient(#10172ab0,#10172ae6)}.start-card{width:min(580px,100%);background:#f1d6a8;color:#252b3d;border:4px solid #1d2a40;box-shadow:10px 10px 0 #070d1e}.start-ticket{display:flex;justify-content:space-between;background:#273650;color:#ffe4ad;padding:10px 14px;font-size:9px;letter-spacing:1px;font-weight:900}.start-copy{padding:25px 28px}.start-copy>span{font-size:10px;color:#905d68;font-weight:900;letter-spacing:2px}.start-copy h1{font-size:30px;line-height:1.1;margin:10px 0 12px;letter-spacing:-1.5px}.start-copy p{font-size:12px;line-height:1.65;color:#4c5361;margin:0 0 17px}.start-rules{display:flex;gap:6px;margin-bottom:18px}.start-rules span{border:2px solid #a98d83;color:#514a54;padding:6px;font-size:9px;font-weight:900}.start-copy button{width:100%;display:flex;justify-content:space-between;padding:15px;background:var(--gold);border:2px solid #202b41;color:#202b41;font-size:13px;font-weight:900;box-shadow:4px 4px 0 #26304d}.start-copy button:hover{transform:translate(-2px,-2px);box-shadow:6px 6px 0 #26304d}.start-copy small{display:block;text-align:center;font-size:9px;color:#555a64;line-height:1.5;margin-top:13px}
@media(max-width:800px){.hud-left{max-width:calc(100vw - 190px);width:310px}.map-frame canvas{width:118px;height:74px}.location-banner{min-width:130px}.hud-bottom{bottom:calc(14px + env(safe-area-inset-bottom));flex-direction:column-reverse;align-items:stretch}.quick-bag{justify-content:flex-end}.bottom-left{max-width:none}.desktop-help{display:none}.touch-controls{display:flex;bottom:calc(122px + env(safe-area-inset-bottom))}.near-prompt{bottom:calc(215px + env(safe-area-inset-bottom))}}
@media(max-width:600px){.hud-top{padding:calc(7px + env(safe-area-inset-top)) calc(7px + env(safe-area-inset-right)) 0 calc(7px + env(safe-area-inset-left));gap:5px}.hud-left{max-width:calc(100vw - 110px);width:225px;padding:6px 7px}.brand{gap:4px;padding-bottom:5px}.brand>span{font-size:19px}.brand small{font-size:6px;letter-spacing:.5px}.brand strong{font-size:9px;letter-spacing:.3px}.main-stats{gap:4px;padding:5px 0}.stat>span,.pressure>span{font-size:6px;letter-spacing:.3px}.stat strong{font-size:9px}.stat b,.pressure b{font-size:8px}.pressure-bars{gap:4px}.meter{height:6px}.location-banner{min-width:0;max-width:98px}.location-banner span{font-size:6px;letter-spacing:1px}.location-banner strong{font-size:8px}.map-frame{padding:2px}.map-frame canvas{width:88px;height:55px}.map-frame button{font-size:6px;padding:2px;right:3px;bottom:3px}.top-buttons{gap:3px}.top-buttons button{font-size:6px;padding:4px}.hud-bottom{left:calc(7px + env(safe-area-inset-left));right:calc(7px + env(safe-area-inset-right));bottom:calc(6px + env(safe-area-inset-bottom));gap:4px}.quick-bag{gap:3px}.quick-bag button{min-width:0;padding:4px 5px;font-size:8px;border-width:1px}.quick-bag small{display:none}.item-glyph{font-size:16px}.bottom-left{gap:3px}.bottom-left span{font-size:6px;padding:3px 4px}.touch-controls{left:calc(7px + env(safe-area-inset-left));right:calc(7px + env(safe-area-inset-right));bottom:calc(83px + env(safe-area-inset-bottom))}.dpad{grid-template-columns:repeat(3,35px);grid-template-rows:repeat(2,35px);gap:2px}.dpad button{font-size:13px}.touch-actions{gap:3px}.touch-actions button{width:38px;height:43px;font-size:12px}.touch-actions span{font-size:6px}.near-prompt{bottom:calc(163px + env(safe-area-inset-bottom));font-size:8px;padding:5px 8px}.toast{top:calc(124px + env(safe-area-inset-top));font-size:9px;max-width:88vw;padding:7px}.start-copy{padding:19px}.start-copy h1{font-size:23px}.start-copy p{font-size:10px}.start-copy button{font-size:10px}.start-ticket{font-size:7px}.modal-body{padding:13px}.modal-body h2{font-size:20px}.modal-choice{padding:8px}.modal-choice strong{font-size:10px}.modal-choice>span:last-child{font-size:9px}.search-game{padding:12px}.search-columns{gap:5px}.search-zone{padding:5px}}
.map-frame canvas{width:224px;height:144px}.objective-strip{max-width:224px;padding:6px 9px;background:#203047e6;border:1px solid #e2b675;color:#ffe0a4;font-size:9px;font-weight:900;letter-spacing:.7px;text-align:right;box-shadow:3px 3px 0 #0b1328}.objective-strip.urgent{background:#744057;border-color:#ff9b80;color:#fff0c5}
@media(max-width:800px){.map-frame canvas{width:160px;height:103px}.objective-strip{max-width:160px;font-size:8px}}
@media(max-width:600px){.hud-left{width:168px;max-width:calc(100vw - 148px)}.map-frame canvas{width:122px;height:78px}.objective-strip{max-width:122px;font-size:7px;padding:4px}.location-banner{max-width:122px}}
@media(pointer:coarse){.touch-controls{display:flex}.desktop-help{display:none}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}
.map-frame canvas{width:300px;height:193px}.objective-strip{max-width:300px}.map-legend{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:3px 7px;max-width:310px;padding:4px 6px;background:#17253ee9;border:1px solid #a48e73;box-shadow:3px 3px 0 #0b1328;color:#f5e3c0;font-size:8px;font-weight:900}.map-legend span{display:inline-flex;align-items:center;gap:3px}.map-legend i{display:inline-grid;place-items:center;font-style:normal;width:13px;height:13px;border:1px solid #172139;color:#172139;font-size:8px}.marker-player{background:#80e6f5}.marker-car{background:#f7ca6d}.marker-home{background:#9ee8a0}.marker-goal{background:#ff9a77}
.phone-shell{max-width:390px;margin:auto;padding:10px;border:6px solid #11192d;border-radius:20px;background:#e7d8b8;box-shadow:inset 0 0 0 3px #7f8e94,8px 9px 0 #0b1426;color:#26344a}.phone-status{display:flex;justify-content:space-between;border-bottom:2px solid #718088;padding:3px 5px 8px;font-size:9px;font-weight:900}.phone-app-title{display:flex;justify-content:space-between;align-items:center;margin:12px 0 6px;font-size:12px;font-weight:900;letter-spacing:.5px}.phone-app-title b{font-size:9px;color:#8d4d53}.phone-actions .modal-choice{background:#b2d4c5;border-color:#4e7979;color:#1c3440}.phone-actions .modal-choice small{color:#38545a}.phone-actions .modal-choice>span:last-child{color:#285b53}.phone-stops{max-height:min(38vh,320px);overflow-y:auto;padding-right:3px}.phone-stops .modal-choice{padding:7px;background:#faf0d7;border-color:#9d9b88;color:#26344a}.phone-stops .modal-choice small{color:#6a7072}.phone-stops .modal-choice>span:last-child{color:#925153}
@media(max-width:800px){.map-frame canvas{width:218px;height:140px}.objective-strip,.map-legend{max-width:218px}}
@media(max-width:600px){.hud-left{width:min(168px,calc(100vw - 172px))}.map-frame canvas{width:clamp(110px,38vw,145px);height:auto}.objective-strip,.map-legend{max-width:145px}.map-legend{font-size:6px;gap:2px 4px;padding:2px 3px}.map-legend i{width:10px;height:10px;font-size:6px}.touch-actions button{width:36px}}
