@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');
body.outdoors #vignette{box-shadow:none;background:linear-gradient(#152d3990,transparent 28%,transparent 68%,#17322480)}body.outdoors .objective{background:#1e3a3099;padding:14px 18px;border-radius:10px}body.outdoors .brand{filter:drop-shadow(0 2px 5px #183b37)}body.outdoors .progress i.done{background:#cbe6ae}

.book-choices{display:grid;grid-template-columns:repeat(8,1fr);gap:7px;margin:20px 0}.book-choices button{min-height:38px;border:1px solid #a7b3bf55;border-radius:5px;background:#39434f;color:#e5dbc2;font-size:14px}.book-choices button:hover{background:#62665e;border-color:#e6cf9b}.field-label{display:flex;gap:18px;align-items:center}.field-label select{flex:1;background:#131920;color:#e9e4d8;border:1px solid #ffffff35;padding:10px;border-radius:6px;font:inherit}.time-fields{display:flex;gap:12px;align-items:center;margin:18px 0}.time-fields label{flex:1;font-size:14px}.time-fields input{display:block;width:100%;padding:12px;margin-top:7px;background:#141b24;border:1px solid #ffffff35;border-radius:6px;color:#e6cf9b;font-size:24px}.progress{max-width:280px}.progress i{flex:1}#pocket-items{display:block;max-width:170px;font-size:12px;color:#e6cf9b;margin-top:9px}#interact small{display:block;font-size:9px;letter-spacing:.16em;margin:7px 0 0 35px;color:#adb9c3}#interact:disabled{display:none}dialog[open]{animation:reveal-dialog .22s ease-out}.slot.found{animation:found-item .4s ease-out}@keyframes reveal-dialog{from{opacity:0;transform:translateY(9px)}to{opacity:1;transform:translateY(0)}}@keyframes found-item{from{transform:scale(.86)}to{transform:scale(1)}}@media(prefers-reduced-motion:reduce){dialog[open],.slot.found{animation:none}}
:root{font-family:Manrope,Arial,sans-serif;color:#f2f3f1;background:#181c20;font-synthesis:none}*{box-sizing:border-box}body{margin:0;overflow:hidden}button{font:inherit;cursor:pointer;color:inherit}button:focus-visible,input:focus-visible{outline:2px solid #e9ce8e;outline-offset:4px}#game,canvas,#vignette{position:fixed;inset:0;width:100%;height:100%;display:block}#vignette{pointer-events:none;box-shadow:inset 0 0 180px #080b104f;background:linear-gradient(#10141980,transparent 25%,transparent 70%,#101419a6)}header{position:fixed;top:32px;left:36px;right:36px;display:flex;justify-content:space-between;align-items:center;pointer-events:none}.brand{display:flex;align-items:center;gap:14px}.room-icon{font-size:38px;color:#e6cf9b}.brand strong{font-size:16px;letter-spacing:.2em;font-weight:800}.brand small{display:block;margin-top:7px;font-size:10px;letter-spacing:.19em;color:#b9bec5}.top-actions{display:flex;gap:12px;align-items:center;pointer-events:auto}.top-actions button{background:#191e25aa;border:1px solid #ffffff25;border-radius:50%;width:42px;height:42px;font-size:19px}.top-actions button:hover{background:#46505c}#timer{font-variant-numeric:tabular-nums;font-size:14px;color:#d3d7dc;margin-right:12px}.objective{position:fixed;top:125px;left:38px;max-width:285px;pointer-events:none}.eyebrow{font-size:10px;letter-spacing:.22em;color:#b6bec6;font-weight:800}.objective p{font-size:15px;margin:10px 0 15px;line-height:1.6}.progress{display:flex;gap:6px}.progress i{display:block;height:3px;width:28px;background:#ffffff24;transition:background .5s}.progress i.done{background:#e4c580}#crosshair{position:fixed;top:50%;left:50%;width:5px;height:5px;border-radius:50%;background:#fff9;transform:translate(-50%,-50%);pointer-events:none;box-shadow:0 0 2px #000}#crosshair.active{width:12px;height:12px;background:transparent;border:2px solid #efd095}#interaction{position:fixed;bottom:25%;left:50%;transform:translateX(-50%);display:none;white-space:nowrap}#interact{border:1px solid #e8d1a355;background:#192027dc;border-radius:8px;padding:12px 18px;font-size:14px;box-shadow:0 8px 40px #0003}kbd{display:inline-block;border:1px solid #ffffff32;padding:4px 7px;border-radius:4px;font:10px Manrope,Arial,sans-serif;font-weight:700;margin-right:7px;color:#e4e8e9}#interact kbd{background:#e6cf9b;color:#25282d;border:0;font-size:14px}#toast{position:fixed;bottom:32%;left:50%;transform:translate(-50%,12px);opacity:0;transition:.25s;max-width:450px;text-align:center;background:#111921e8;padding:14px 22px;border:1px solid #ffffff20;border-radius:8px;font-size:14px;pointer-events:none}#toast.show{opacity:1;transform:translate(-50%,0)}footer{position:fixed;bottom:28px;left:38px;right:38px;display:flex;align-items:end;justify-content:space-between;pointer-events:none}.inventory .eyebrow{font-size:9px}#slots{display:flex;gap:8px;margin-top:10px}.slot{display:grid;place-items:center;width:43px;height:43px;border:1px dashed #ffffff32;border-radius:6px;color:#ffffff28;font-size:24px;background:#12181f55}.slot.found{border:1px solid #e6cf9b88;color:#e6cf9b;background:#34352ccc}.instructions{display:flex;gap:16px;color:#c2c7cd;font-size:11px;margin-bottom:12px}.view-label{color:#a9b0b7;font-size:9px;letter-spacing:.2em;margin-bottom:15px}dialog{width:min(440px,calc(100vw - 32px));border:1px solid #ffffff24;border-radius:16px;padding:30px;background:#20262deb;color:#f2f3f1;box-shadow:0 30px 140px #0009;backdrop-filter:blur(22px)}dialog::backdrop{background:#090e164d;backdrop-filter:blur(3px)}.modal-top{display:flex;align-items:center;justify-content:space-between}.tiny-square{height:7px;width:7px;background:#e6cf9b;transform:rotate(45deg)}h1{font-size:30px;letter-spacing:-.04em;margin:22px 0 14px;font-weight:600}#modal-body{color:#c3cbd2;font-size:15px;line-height:1.8}#modal-body p{margin:0 0 14px}.muted{font-size:12px;color:#96a2af}#modal-actions{display:flex;gap:10px;margin-top:25px;flex-wrap:wrap}#modal-actions button{border:0;background:#e6cf9b;color:#21252b;padding:13px 20px;border-radius:6px;font-size:14px;font-weight:800;flex:1}#modal-actions button.secondary{background:transparent;border:1px solid #ffffff30;color:#d9dee2}.code-input{width:100%;border:1px solid #ffffff35;background:#131920;color:#e6cf9b;border-radius:8px;font-size:32px;text-align:center;letter-spacing:.4em;padding:12px;font-family:inherit;margin-top:10px}.error{color:#ffb1a5;font-size:13px;min-height:24px;margin-top:8px}.note{border-left:2px solid #e6cf9b;padding:8px 0 8px 16px;color:#e7deca;font-style:italic}.code{font-size:32px;letter-spacing:.5em;color:#e6cf9b;text-align:center;margin:20px 0}#touch-controls{display:none;position:fixed;inset:auto 20px 25px;pointer-events:none;justify-content:space-between;align-items:end}#touch-controls>span{font-size:10px;max-width:100px;color:#cbd1d5}body.touch #touch-controls{display:flex}body.touch .instructions{display:none}body.touch footer{bottom:150px}body.touch #interaction{bottom:35%}body.touch canvas{touch-action:none}body.touch .view-label{display:none}@media(max-width:700px){header{top:20px;left:20px;right:20px}.brand strong{font-size:12px;letter-spacing:.12em}.brand small{font-size:8px}.room-icon{font-size:30px}.top-actions{gap:7px}.top-actions button{height:34px;width:34px}#timer{font-size:12px;margin-right:2px}.objective{left:22px;top:100px;max-width:230px}.objective p{font-size:13px}.instructions{display:none}footer{left:22px;right:22px}.view-label{font-size:8px}#toast{width:85%;font-size:13px}dialog{padding:25px}h1{font-size:27px}}

@media(max-width:400px){header{left:14px;right:14px}.brand{gap:8px}.brand strong{font-size:10px;letter-spacing:.05em}.brand small{font-size:7px;letter-spacing:.07em}.room-icon{font-size:24px}.top-actions{gap:5px}.top-actions button{width:31px;height:31px}.book-choices{gap:5px}}

#inventory-button{pointer-events:auto;text-align:left;display:block;border:1px solid #b9c8ce36;border-radius:9px;padding:11px 14px;background:#14202be3;min-width:132px;transition:background .18s,border-color .18s}#inventory-button:hover{background:#334451;border-color:#e6cf9b88}#inventory-button .eyebrow{color:#d7dfde}#inventory-button #slots{margin-top:7px}#inventory-button #pocket-items{max-width:200px;font-size:12px}.inventory-grid{display:grid;gap:8px;max-height:46vh;overflow-y:auto;padding:2px 3px 4px}.inventory-card{display:flex;align-items:center;gap:13px;text-align:left;width:100%;padding:13px 12px;border:1px solid #98b0bd38;border-radius:7px;background:#2a3845;color:#edf0e9}.inventory-card:hover{background:#435562;border-color:#ddc89799}.inventory-card>span:nth-child(2){flex:1}.inventory-card strong{font-size:14px;display:block;font-weight:600}.inventory-card small{font-size:12px;color:#c6b78e;display:block;min-height:3px;margin-top:3px}.item-icon{font-size:28px;color:#e6cf9b;width:35px;text-align:center}.inspect-icon{font-size:62px;color:#e6cf9b;text-align:center;padding:12px;margin:3px 0 20px;border:1px solid #bcc9c425;border-radius:9px;background:#15242e}.item-description{line-height:1.85;font-size:16px}.item-status{color:#e6cf9b!important;font-size:13px;border-top:1px solid #ffffff20;padding-top:13px}#modal:has(.inventory-grid){width:min(510px,calc(100vw - 32px))}@media(max-width:700px){#inventory-button{padding:9px 11px;min-width:120px}#inventory-button .slot{width:34px;height:34px}#inventory-button #pocket-items{font-size:11px}.inventory-card{padding:11px}}

#touch-controls{inset:auto max(20px,env(safe-area-inset-right)) max(20px,env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left));align-items:end}.stick-wrap{display:flex;flex-direction:column;align-items:center;gap:9px}.stick-wrap>span{font-size:9px;letter-spacing:.18em;color:#e3e9e4;text-shadow:0 1px 4px #000}.joystick{width:132px;height:132px;border:1px solid #e1e8e14d;border-radius:50%;background:radial-gradient(circle,#304a5150,#14202980);box-shadow:inset 0 0 0 15px #ffffff06,0 4px 22px #0002;position:relative;pointer-events:auto;touch-action:none;user-select:none;-webkit-user-select:none;overscroll-behavior:contain}.stick-knob{position:absolute;width:50px;height:50px;left:calc(50% - 25px);top:calc(50% - 25px);border-radius:50%;border:1px solid #e6cf9b90;background:radial-gradient(circle at 35% 30%,#d2c3a4c9,#6f786fd9);box-shadow:0 4px 12px #0005;pointer-events:none;transition:background .15s}.stick-guides{position:absolute;inset:0;display:grid;place-items:center;font-size:63px;font-weight:400;color:#ffffff18;pointer-events:none}.joystick.held{border-color:#e6cf9baa;background:#40554c80}.joystick.held .stick-knob{background:#e6cf9bdb}body.touch footer{bottom:190px}body.touch #interaction{bottom:39%}
@media(max-width:400px){.joystick{width:116px;height:116px}#touch-controls{left:17px;right:17px}body.touch footer{bottom:174px}}
@media(max-height:500px) and (orientation:landscape){.joystick{width:108px;height:108px}#touch-controls{bottom:max(12px,env(safe-area-inset-bottom));left:max(22px,env(safe-area-inset-left));right:max(22px,env(safe-area-inset-right))}.stick-wrap{gap:5px}body.touch footer{bottom:18px;left:calc(50% - 65px);right:auto}body.touch #inventory-button{padding:6px 10px}body.touch #inventory-button #slots{display:none}body.touch #inventory-button #pocket-items{max-width:135px;font-size:10px}body.touch .objective{top:85px;max-width:240px}body.touch #interaction{bottom:30%}body.touch #toast{bottom:43%;max-width:350px}}

#crystal-progress{display:flex;gap:12px;margin:0 0 14px}#crystal-progress[hidden]{display:none}#crystal-progress span{font-size:23px;color:#bdd8d04d;transition:color .3s,filter .3s}#crystal-progress .collected{color:#b2ffe5;filter:drop-shadow(0 0 5px #82ffce70)}

body.in-cave #vignette{background:linear-gradient(#0b151c99,transparent 28%,transparent 70%,#071118b3);box-shadow:inset 0 0 170px #08151a70}body.in-cave .objective{background:#192c32aa}body.in-cave .room-icon{color:#9dd7e0}

#loading{position:fixed;inset:0;z-index:100;background:#172329;display:grid;place-items:center;font-size:22px;color:#e6cf9b}#loading[hidden],#attack-button[hidden],#combat-status[hidden],#finish-actions[hidden]{display:none}.level-list{display:grid;gap:10px}.level-list button{padding:16px;background:#30414b;border:1px solid #c9d4ca40;border-radius:8px;text-align:left;font-size:17px}.level-list button b{color:#e6cf9b;margin-right:12px}.level-list small{float:right;font-size:12px}.level-list button:disabled{opacity:.38;cursor:not-allowed}#attack-button{position:fixed;right:30px;bottom:205px;background:#9d6534ed;border:1px solid #f4d29a;border-radius:40px;padding:18px 23px;font-size:17px;touch-action:none}#attack-button:active{background:#d49a5e}#combat-status{position:fixed;top:225px;left:38px;border-radius:8px;background:#15262ddb;padding:10px 15px;font-size:13px;color:#f3d5ad}#finish-actions{position:fixed;bottom:38px;left:50%;transform:translateX(-50%)}#new-game{background:#e6cf9b;color:#24353b;border:0;border-radius:8px;padding:16px 24px;font-weight:800}.celebrating footer,.celebrating #touch-controls,.celebrating #crosshair,.celebrating .progress{display:none!important}@media(max-height:500px) and (orientation:landscape){#attack-button{right:165px;bottom:30px;padding:14px}#combat-status{top:165px;left:22px}}@media(max-width:700px){#combat-status{top:205px;left:22px}}

#color-keys{display:flex;gap:12px;margin:-3px 0 9px}.color-key{font-size:25px;opacity:.22}.color-key.found{opacity:1;filter:drop-shadow(0 0 5px currentColor)}.color-key.green{color:#5ae392}.color-key.red{color:#ff5866}.color-key.blue{color:#63aeff}#weapon-switch{position:fixed;right:30px;bottom:275px;background:#174757ed;border:1px solid #a0e6e1;border-radius:24px;padding:13px 17px;font-size:15px;touch-action:none}#weapon-switch[hidden]{display:none}.inventory-card[data-item="color-green"] .item-icon{color:#5ae392}.inventory-card[data-item="color-red"] .item-icon{color:#ff5866}.inventory-card[data-item="color-blue"] .item-icon{color:#63aeff}#combat-status{top:255px}.in-market .objective{background:#143b48bb}.in-market #vignette{box-shadow:inset 0 0 120px #09222b88}@media(max-width:700px){#combat-status{top:239px}}@media(max-height:500px) and (orientation:landscape){#color-keys{position:fixed;top:61px;left:22px}.color-key{font-size:21px}#combat-status{top:175px;font-size:12px;padding:6px 10px}#weapon-switch{right:170px;bottom:87px;padding:10px 12px;font-size:13px}}

#damage-overlay{position:fixed;inset:0;pointer-events:none;z-index:3;opacity:0;background:radial-gradient(ellipse at center,rgba(211,0,0,.19) 10%,rgba(171,0,0,.50) 58%,#ab1010 100%)}#game canvas{transition:filter .18s ease-out}.in-cave #combat-status,.in-market #combat-status{border-left:3px solid #da9b89}

/* Compact HUD and touch-origin joysticks. */
:root{--hud-left:max(14px,env(safe-area-inset-left));--hud-top:max(12px,env(safe-area-inset-top))}
header{top:var(--hud-top);left:var(--hud-left);right:max(14px,env(safe-area-inset-right));z-index:8;gap:10px;align-items:start}
.hud-tools{display:flex;gap:7px;align-items:center;pointer-events:auto}
.hud-tools .hud-button,.hud-tools #inventory-button{display:flex;align-items:center;justify-content:center;gap:8px;position:relative;min-width:44px;height:44px;border:1px solid #afc3ca55;border-radius:10px;background:#152932ed;padding:0 13px;color:#e9eee5;text-align:center;font-size:21px;touch-action:manipulation}
.hud-tools .hud-label{font-size:13px;font-weight:700}.hud-tools .hud-button[aria-expanded=true],.hud-tools .hud-button[aria-pressed=true]{background:#426361;border-color:#d7c69e}
.hud-tools #inventory-button #slots,.hud-tools #inventory-button #pocket-items{display:none}
#pocket-count{position:absolute;right:-4px;top:-4px;min-width:17px;height:17px;line-height:17px;font-size:10px;border-radius:10px;background:#e6cf9b;color:#213239;font-weight:800}
#fullscreen[hidden],#objective-panel[hidden]{display:none!important}.top-actions{gap:6px}.top-actions button{width:44px;height:44px}
#objective-panel{top:calc(var(--hud-top) + 54px);left:var(--hud-left);z-index:7;width:min(320px,calc(100vw - 28px));max-width:none;max-height:calc(100dvh - 90px);overflow:auto;pointer-events:auto;padding:18px;border:1px solid #a8c3c64d;border-radius:12px;background:#182d35f5;box-shadow:0 12px 35px #0005}
#objective-panel .brand{margin:0 28px 20px 0;gap:9px}#objective-panel .brand strong{font-size:13px;letter-spacing:.08em}#objective-panel .brand small{font-size:9px;letter-spacing:.08em}#objective-panel .room-icon{font-size:26px}#objective-panel p{font-size:14px}#close-objective{position:absolute;right:8px;top:8px;width:36px;height:36px;border:0;border-radius:8px;background:#ffffff12;font-size:25px}#get-hint{padding:11px 16px;margin-top:18px;border:1px solid #e6cf9b70;border-radius:7px;background:#405953;font-size:14px;width:100%}#objective-panel #color-keys{position:static}
body.touch footer{display:none}#combat-status{top:calc(var(--hud-top) + 54px);left:var(--hud-left);margin:0;font-size:12px;z-index:2;padding:8px 11px}
body.touch #touch-controls{position:fixed;inset:0;display:block;z-index:4;pointer-events:none}.stick-wrap{display:contents}.stick-wrap>span{display:none}#touch-controls .joystick{position:fixed;transform:translate(-50%,-50%);pointer-events:none;margin:0}#touch-controls .joystick[hidden]{display:none!important}
#interaction,#attack-button,#weapon-switch{z-index:5}#toast{z-index:9}body.touch #interaction{bottom:30%}
@media(max-width:520px){.hud-tools .hud-label{display:none}.hud-tools .hud-button,.hud-tools #inventory-button{width:44px;min-width:44px;padding:0}.top-actions button{width:40px;height:44px}#timer{margin:0;font-size:12px}.hud-tools{gap:6px}.top-actions{gap:4px}}
@media(max-height:500px) and (orientation:landscape){#objective-panel{top:calc(var(--hud-top) + 51px);max-height:calc(100dvh - 78px)}#objective-panel .brand{margin-bottom:10px}#objective-panel p{margin:8px 0}#combat-status{top:calc(var(--hud-top) + 52px)}body.touch #interaction{bottom:22%}}

.hud-tools .desktop-shortcut{margin:0;padding:2px 5px;font-size:10px}body.touch .desktop-shortcut{display:none}
