/* Edge-to-edge game. Interface floats over the world, without a page frame. */
html,body{width:100%;height:100%;overflow:hidden;background:#121911}
.quest-main{position:fixed;inset:0;max-width:none;margin:0;padding:0}
.playfield{position:absolute;inset:0;height:100%;min-height:0;max-height:none;border:0;box-shadow:none;overflow:hidden;background:#141d16}
#gameCanvas{width:100%;height:100%;touch-action:none;outline:none}
.playfield:after{content:'';position:absolute;inset:0;pointer-events:none;z-index:1;background:linear-gradient(180deg,#08100b65,transparent 25%,transparent 72%,#070e0bdd)}
.masthead{position:fixed;z-index:10;inset:0 0 auto;width:100%;max-width:none;height:82px;padding:0 34px;margin:0;gap:24px;border:0;background:linear-gradient(#09130bdd,transparent);pointer-events:none}
.masthead>*{pointer-events:auto}.brand{min-width:0;gap:12px;font-size:12px;text-shadow:0 2px 12px #000}.brand img{width:26px;height:31px}.brand small{font-size:6px;letter-spacing:.15em;color:#c4ccb7}.masthead nav{gap:5px}.masthead nav button{font:600 11px 'DM Sans',sans-serif;letter-spacing:.08em;text-transform:uppercase;padding:10px 16px;color:#f5f0dd;border-radius:5px;background:#101a145e;backdrop-filter:blur(9px)}.masthead nav button:hover{background:#e8e0bd;color:#17261b}.motion{border:0;background:#101a145e;backdrop-filter:blur(9px);color:#d4dbc5;padding:10px 12px;border-radius:5px;font-size:10px}
.quest-hud{top:106px;left:34px;right:34px;z-index:4;gap:24px}.objective-panel{padding:0 0 0 15px;max-width:390px;background:none;box-shadow:none;border:0;border-left:2px solid #dce4b997;filter:drop-shadow(0 2px 8px #071009)}.objective-panel>span{font:9px 'Silkscreen',monospace;color:#dce7bd;letter-spacing:.04em;margin-bottom:10px}.objective-panel strong{font-size:22px;line-height:1.25;color:#fff7de;font-weight:600}.objective-panel small{font-size:12px;line-height:1.55;max-width:310px;color:#e1e5cd;text-shadow:0 1px 6px #000}
.inventory{border:0;box-shadow:none;background:#122117a8;backdrop-filter:blur(12px);border-radius:7px;padding:5px 8px;gap:8px;font-size:8px}.inventory img{width:35px;height:35px}.inventory button{border:0;border-left:1px solid #b3c19750;background:none;width:40px;height:36px;color:#e2e8cc}.inventory.pulse{animation:bag-pulse .6s ease-out}@keyframes bag-pulse{35%{background:#728353;transform:translateY(-5px)}}
.game-controls{position:fixed;z-index:8;left:34px;right:34px;bottom:max(22px,env(safe-area-inset-bottom));display:flex;gap:12px;align-items:center;padding:0;margin:0;pointer-events:none}.game-controls>*{pointer-events:auto}.desktop-controls{gap:18px;color:#e3e6d2;font-size:8px;text-shadow:0 2px 8px #000}.desktop-controls kbd{border:1px solid #c6d2a86b;border-radius:3px;padding:5px 7px;background:#101e15bb;color:#fff6d9;display:inline-block;margin-right:4px}.interact-button{margin-left:auto;padding:15px 20px;background:#e8e3cc;color:#213422;border:1px solid #fffae355;border-radius:5px;box-shadow:0 3px 20px #0004;font:600 12px 'DM Sans',sans-serif;letter-spacing:.02em;max-width:300px;min-height:44px}.interact-button:hover{background:#fff7df;transform:translateY(-2px)}.interact-button:disabled{opacity:.65;transform:none}.game-controls>#helpButton{border:1px solid #c4d0a34d;border-radius:5px;background:#112219a6;backdrop-filter:blur(8px);color:#e4ead4;height:44px;width:44px}
.quest-caption{position:fixed;z-index:5;left:36px;right:34px;bottom:82px;padding:0;border:0;max-width:540px;pointer-events:none}.quest-caption p{color:#d4ddc8;font-size:12px;line-height:1.6;text-shadow:0 2px 10px #000}.quest-caption>span{display:none}
.interaction-prompt{bottom:112px;z-index:5;border:1px solid #dbe7bc44;border-radius:6px;padding:11px 16px;background:#102116da;backdrop-filter:blur(12px);color:#f2f0d6;font-size:12px;box-shadow:0 4px 22px #0004}.game-toast{bottom:164px;border:0;border-radius:5px;background:#f0ead3ef;color:#273923;font-size:13px;box-shadow:0 5px 25px #0005;padding:12px 20px;z-index:6}
.intro-screen{z-index:7;padding-left:11%;background:linear-gradient(90deg,#0b170d99,transparent 90%)}.intro-sheet{background:#e9e3cff2;box-shadow:0 20px 90px #07110877;padding:40px 42px;width:400px;max-width:85%;border-radius:2px;transform:rotate(-1.5deg)}.intro-sheet h1{font-size:47px;line-height:1.02;font-weight:600;margin:20px 0}.intro-sheet p{font-size:15px}.intro-sheet button{font:600 13px 'DM Sans',sans-serif;border-radius:3px;min-height:46px}.intro-sheet>small{font-size:7px;color:#627254}
.machine-button{background:#142a1ee8;border:1px solid #d6e3b755;border-radius:5px;color:#ecf1d8;padding:13px 16px;font-size:12px;min-height:44px}.machine-button[hidden]{display:none}.machine-button:hover{background:#375036}.machine-button:disabled{opacity:.55}.printing-meter{position:absolute;z-index:6;left:50%;bottom:160px;transform:translateX(-50%);width:260px;padding:15px 19px;background:#122017e8;backdrop-filter:blur(14px);border:1px solid #d5ddb457;border-radius:5px;color:#eff1d9}.printing-meter[hidden]{display:none}.printing-meter span{display:block;font:8px 'Silkscreen',monospace;letter-spacing:.06em;margin-bottom:10px}.printing-meter progress{display:block;width:100%;height:4px;accent-color:#c7dfa2;border:0}.printing-meter progress::-webkit-progress-bar{background:#46503a}.printing-meter progress::-webkit-progress-value{background:#dce7b1}.printing-meter small{display:block;font-size:11px;color:#c1cbb0;margin-top:9px}
.note-dialog{border:1px solid #e5e1c099;border-radius:6px;padding:30px;box-shadow:0 24px 120px #000b}.note-top{font-size:8px}.note-dialog h2{font-size:30px}.note-action{font:600 13px 'DM Sans',sans-serif;border-radius:3px;padding:13px 18px}.note-choices button{border-radius:4px;padding:14px}.note-choices button:hover{transform:translateX(3px)}.note-dialog::backdrop,.app-dialog::backdrop{background:#07110cc4;backdrop-filter:blur(8px)}
@media(max-width:850px){.masthead{padding:0 22px;gap:12px}.masthead nav button{padding:9px 11px;font-size:10px}.quest-hud{left:24px;right:24px;top:100px}.objective-panel strong{font-size:19px}.objective-panel small{font-size:11px;max-width:270px}.desktop-controls{gap:10px;font-size:7px}.game-controls{left:24px;right:24px}.quest-caption{left:26px;max-width:440px}.machine-button{font-size:11px;padding:12px}.interact-button{font-size:11px}}
@media(max-width:600px){.masthead{height:99px;padding:12px 17px 8px;align-content:flex-start;gap:8px;background:linear-gradient(#07110cee,transparent)}.brand{font-size:10px;gap:9px}.brand small{font-size:5px}.brand img{width:23px;height:25px}.motion{font-size:9px;padding:7px 9px;margin-left:auto}.masthead nav{order:3;flex-basis:100%;margin:0;gap:5px;justify-content:space-between}.masthead nav button{font-size:9px;padding:8px 12px;background:#12211859}.quest-hud{top:115px;left:18px;right:16px;gap:10px}.objective-panel{padding-left:10px;max-width:calc(100% - 46px)}.objective-panel>span{font-size:7px;margin-bottom:7px}.objective-panel strong{font-size:18px}.objective-panel small{font-size:11px;line-height:1.5;max-width:230px}.inventory{padding:0;background:none;backdrop-filter:none}.inventory img,.inventory>span{display:none}.inventory button{border:1px solid #cbd6b455;border-radius:4px;background:#122217a1;width:34px;height:34px;margin:0;font-size:21px}.game-controls{left:14px;right:14px;bottom:max(18px,env(safe-area-inset-bottom));gap:8px;flex-wrap:wrap}.desktop-controls{display:none}.touch-controls{display:flex;gap:6px}.touch-controls button{width:44px;height:48px;border:1px solid #dce7ba55;border-radius:5px;background:#122217cd;backdrop-filter:blur(10px);color:#f0f1d8;font-size:20px;touch-action:none}.game-controls>#helpButton{display:none}.interact-button{font-size:11px;line-height:1.3;padding:9px 12px;min-width:0;max-width:calc(100% - 162px);height:48px;min-height:48px;flex:1}.machine-button{position:absolute;right:0;bottom:62px;font-size:11px;min-height:38px;padding:8px 12px}.quest-caption{display:none}.interaction-prompt{bottom:132px;max-width:90%;font-size:11px;white-space:normal;text-align:center}.game-toast{bottom:180px;max-width:88%;font-size:12px}.printing-meter{bottom:175px;max-width:85%}.intro-screen{padding:0;justify-content:center}.intro-sheet{width:320px;padding:29px 32px}.intro-sheet h1{font-size:39px}.intro-sheet p{font-size:14px}.intro-sheet>small{font-size:6px}.intro-sheet>span{font-size:6px}.note-dialog{padding:22px}.note-dialog h2{font-size:27px}}
@media(max-height:520px) and (min-width:601px){.masthead{height:60px}.quest-hud{top:78px}.objective-panel small{display:none}.objective-panel strong{font-size:17px}.quest-caption{display:none}.game-controls{bottom:15px}.intro-sheet{padding:20px 30px}.intro-sheet h1{font-size:32px;margin:12px 0}.intro-sheet p{font-size:12px;margin:7px 0}.intro-sheet button{margin:9px 0}.interaction-prompt{bottom:82px}.game-toast,.printing-meter{bottom:130px}}
@media(prefers-reduced-motion:reduce){.inventory.pulse{animation:none}.interact-button:hover,.note-choices button:hover{transform:none}}

.objective-panel{background:linear-gradient(90deg,#07110bd4,#07110b75);backdrop-filter:blur(8px);border-left:2px solid #dce4b997;border-radius:3px;padding:13px 17px;filter:none}.machine-button{display:none!important}@media(max-width:600px){.objective-panel{padding:11px 12px}}
.back-button{display:block;pointer-events:auto;margin-top:10px;padding:5px 0;border:0;background:transparent;color:#e4e9cd;font:11px 'DM Sans',sans-serif;text-align:left}.back-button:hover{color:#fff;text-decoration:underline}.back-button[hidden]{display:none}.jump-hint{position:absolute;z-index:6;transform:translate(-50%,-100%);width:225px;padding:12px 15px;background:#181e12ed;border:1px solid #e9d989bd;border-radius:5px;color:#fff4c8;text-align:center;box-shadow:0 5px 20px #0007;pointer-events:none}.jump-hint[hidden]{display:none}.jump-hint kbd{display:inline-block;border:1px solid #f9e9a2;background:#efe6bb;color:#23301a;border-radius:3px;padding:5px 12px;font:11px 'Silkscreen',monospace;margin-bottom:7px}.jump-hint span{display:block;font-size:13px;font-weight:600}.jump-hint small{display:block;margin-top:4px;color:#cfcead;font-size:10px}.touch-controls .jump-ready{background:#e9e0b5;color:#26351e;border-color:#fff6ce;box-shadow:0 0 16px #eadd9a55}@media(max-width:600px){.jump-hint{width:200px;padding:10px}.jump-hint kbd{font-size:10px}.back-button{font-size:10px;margin-top:8px}}
.room-arrival{position:absolute;z-index:5;pointer-events:none;top:34%;left:50%;transform:translateX(-50%);width:max-content;max-width:85%;text-align:center;padding:18px 35px;background:linear-gradient(90deg,transparent,#09120cdd 20%,#09120cdd 80%,transparent);color:#f7efd1;text-shadow:0 2px 10px #000}.room-arrival[hidden]{display:none}.room-arrival span{display:block;font:8px Silkscreen,monospace;letter-spacing:.25em;color:#c4d5a4}.room-arrival strong{display:block;font:600 clamp(22px,3.2vw,42px) "DM Sans",sans-serif;margin:7px 0}.room-arrival small{display:block;font-size:11px;color:#d0d9bd}.chapter-map{position:relative;gap:10px;padding-left:20px;border-left:1px solid #718159}.chapter-map button{position:relative;text-align:left}.chapter-map button:before{content:"";position:absolute;left:-26px;top:50%;width:9px;height:9px;background:#718159;border-radius:50%}.chapter-map button.current:before{background:#d5e99f;box-shadow:0 0 0 4px #71815955}
.discovery-card{position:absolute;z-index:6;right:34px;top:178px;width:300px;max-width:calc(100% - 36px);padding:18px 21px;background:#142217f2;border:1px solid #bfc99a77;border-radius:5px;color:#f1ebd0;pointer-events:none;box-shadow:0 8px 28px #0005}.discovery-card[hidden]{display:none}.discovery-card>span{font:7px Silkscreen,monospace;letter-spacing:.1em;color:#becda2}.discovery-card strong{display:block;font-size:19px;line-height:1.25;margin:10px 0}.discovery-card p{font-size:12px;line-height:1.6;margin:0 0 11px}.discovery-card small{font-size:10px;color:#b7c79e}@media(max-width:600px){.discovery-card{top:285px;left:18px;right:18px;width:auto;padding:14px 17px}.discovery-card strong{font-size:17px}.discovery-card p{font-size:11px}}

/* Remove the satchel / Blueprint overlay from the game scene. */
.quest-hud .inventory{display:none}

/* Compact discoveries leave the mechanisms visible while keeping readable copy. */
.discovery-card{top:100px;right:24px;width:258px;padding:12px 14px;box-shadow:0 4px 16px #0004}
.discovery-card>span,.discovery-card>small{display:none}
.discovery-card strong{font-size:15px;line-height:1.25;margin:0 0 7px}
.discovery-card p{font-size:12px;line-height:1.45;margin:0}
@media(max-width:600px){.discovery-card{top:244px;bottom:auto;left:14px;right:14px;width:auto;max-width:320px;padding:10px 12px}.discovery-card strong{font-size:14px;margin-bottom:5px}.discovery-card p{font-size:12px;line-height:1.4}}
@media(max-height:520px) and (min-width:601px){.discovery-card{top:76px;width:240px;padding:10px 12px}}

.note-dialog#draftDialog{width:min(500px,calc(100% - 24px));max-height:calc(100svh - 32px);padding:24px 44px 32px;border:0;border-radius:0;color:#29392a;background-color:#e8e0bd;background-image:repeating-linear-gradient(0deg,transparent 0 31px,#7d896b12 31px 32px);box-shadow:none;clip-path:polygon(8px 0,calc(100% - 16px) 0,calc(100% - 16px) 8px,calc(100% - 8px) 8px,calc(100% - 8px) 16px,100% 16px,100% calc(100% - 8px),calc(100% - 8px) calc(100% - 8px),calc(100% - 8px) 100%,8px 100%,8px calc(100% - 8px),0 calc(100% - 8px),0 8px,8px 8px);font-family:'Silkscreen',monospace}
#draftDialog::before,#draftDialog::after{content:'';position:absolute;top:24px;bottom:24px;width:8px;background:repeating-linear-gradient(to bottom,#354632 0 8px,transparent 8px 24px);pointer-events:none}
#draftDialog::before{left:12px}#draftDialog::after{right:12px}
#draftDialog .note-top{gap:12px;padding-bottom:12px;border-bottom:2px dashed #89906b;font:9px/1.6 'Silkscreen',monospace;color:#5f6d4b}
#draftDialog .note-top button{flex:0 0 40px;height:40px;border:2px solid #74815e;border-radius:0;background:#ded7b5;box-shadow:3px 3px 0 #a5a886;font:20px 'Silkscreen',monospace}
#draftDialog h2{margin:22px 0 24px;font:22px/1.5 'Silkscreen',monospace;letter-spacing:0}
#draftDialog #blueprintForm label{font:10px/1.6 'Silkscreen',monospace;color:#4c5c3e;margin:20px 0}
#draftDialog #blueprintForm input{min-height:48px;padding:10px 12px;border:2px solid #87916b;border-radius:0;background:#f0e8cb;box-shadow:inset 3px 3px 0 #d5cfac;color:#253725;font:16px/1.5 'Silkscreen',monospace;caret-color:#253725}
#draftDialog #blueprintForm input:focus{outline:2px solid #405736;outline-offset:3px}
#draftDialog #blueprintForm p{font:9px/1.9 'Silkscreen',monospace;color:#5d684b;border-top:2px dashed #a4aa83;padding-top:16px;margin:24px 0 18px}
#draftDialog .note-action{width:100%;margin-top:0;border:2px solid #1b2c1e;border-radius:0;padding:15px 10px;background:#30482f;box-shadow:4px 4px 0 #9da47d;font:11px/1.6 'Silkscreen',monospace;color:#f1e9ca}
#draftDialog .note-action:hover{background:#415d39}#draftDialog .note-action:active{transform:translate(2px,2px);box-shadow:2px 2px 0 #9da47d}
@media(max-width:600px){.note-dialog#draftDialog{padding:18px 32px 26px}#draftDialog::before{left:8px}#draftDialog::after{right:8px}#draftDialog .note-top{font-size:8px}#draftDialog h2{font-size:18px;margin:18px 0}#draftDialog #blueprintForm p{font-size:8px}#draftDialog .note-action{font-size:10px}}

/* Archive records are printed sheets, matching the pixel printing desk. */
.note-dialog#noteDialog{width:min(620px,calc(100% - 24px));max-height:calc(100svh - 32px);overflow-y:auto;padding:26px 48px 34px;border:0;border-radius:0;background-color:#e8e0bd;background-image:repeating-linear-gradient(0deg,transparent 0 31px,#7d896b12 31px 32px);color:#29392a;box-shadow:none;font-family:'Silkscreen',monospace;clip-path:polygon(8px 0,calc(100% - 24px) 0,calc(100% - 24px) 8px,calc(100% - 16px) 8px,calc(100% - 16px) 16px,calc(100% - 8px) 16px,calc(100% - 8px) 24px,100% 24px,100% calc(100% - 8px),calc(100% - 8px) calc(100% - 8px),calc(100% - 8px) 100%,8px 100%,8px calc(100% - 8px),0 calc(100% - 8px),0 8px,8px 8px);scrollbar-color:#87916b #e8e0bd;scrollbar-width:thin}
#noteDialog::before,#noteDialog::after{content:'';position:absolute;top:24px;bottom:24px;width:8px;background:repeating-linear-gradient(to bottom,#354632 0 8px,transparent 8px 24px);pointer-events:none}
#noteDialog::before{left:12px}#noteDialog::after{right:12px}
#noteDialog .note-top{gap:12px;padding-bottom:14px;border-bottom:2px dashed #89906b;font:9px/1.6 'Silkscreen',monospace;color:#5f6d4b}
#noteDialog .note-top button{flex:0 0 40px;height:40px;border:2px solid #74815e;border-radius:0;background:#ded7b5;box-shadow:3px 3px 0 #a5a886;color:#29392a;font:20px 'Silkscreen',monospace}
#noteDialog h2{margin:22px 0 18px;font:22px/1.5 'Silkscreen',monospace;letter-spacing:0;overflow-wrap:anywhere}
#noteDialog #noteBody{font:12px/1.95 'Silkscreen',monospace;letter-spacing:0;color:#3c4c34;overflow-wrap:anywhere}
#noteDialog #noteChoices:empty,#noteDialog #answerHint:empty{display:none}
#noteDialog .note-action{width:100%;margin-top:24px;padding:14px 16px;border:2px solid #1b2c1e;border-radius:0;background:#30482f;box-shadow:4px 4px 0 #9da47d;color:#f1e9ca;font:11px/1.7 'Silkscreen',monospace}
#noteDialog .note-action:hover{background:#415d39}#noteDialog .note-action:active{transform:translate(2px,2px);box-shadow:2px 2px 0 #9da47d}
#noteDialog button:focus-visible{outline:2px solid #405736;outline-offset:5px}
@media(max-width:600px){.note-dialog#noteDialog{padding:20px 32px 28px}#noteDialog::before{left:8px}#noteDialog::after{right:8px}#noteDialog .note-top{font-size:8px}#noteDialog h2{font-size:18px;margin:18px 0 14px}#noteDialog #noteBody{font-size:11px;line-height:1.85}#noteDialog .note-action{font-size:10px;padding:12px 8px}}
