*{box-sizing:border-box}html,body{margin:0;min-height:100%}.fallen-page{background:#071722;color:#f5f0dd;min-height:100dvh;overflow-x:hidden}.fallen-page .navbar{display:none!important}.fallen-layout{width:100%;margin:0}.fallen-stage{position:relative;width:100%;height:100dvh;min-height:420px;overflow:hidden;background:#1e413a;isolation:isolate}#fallen-game{width:100%}#fallen-canvas{display:block;width:100%;height:100%;object-fit:cover;outline:none;image-rendering:auto}.fallen-hud{position:absolute;z-index:3;left:22px;right:22px;top:18px;display:flex;align-items:center;justify-content:space-between;gap:12px;pointer-events:none}.fallen-hud span{padding:12px 18px;background:#102b32c9;border:1px solid #d5c79a77;border-radius:10px;font-size:13px;letter-spacing:2px;font-weight:800;text-shadow:0 2px 4px #0009}.fallen-hud button{pointer-events:auto;background:#102b32df;border:1px solid #d5c79a99;border-radius:10px;padding:12px 17px;color:#fff5d7;cursor:pointer;font-weight:800;letter-spacing:.5px}#fallen-dialogue{position:absolute;z-index:4;bottom:25px;left:50%;transform:translateX(-50%);width:min(760px,calc(100% - 36px));padding:20px 26px;background:#102734f2;border:2px solid #d8c69b;border-radius:15px;box-shadow:0 12px 45px #000a}#fallen-dialogue strong{color:#f5d88d;font-size:18px}#fallen-dialogue p{margin:10px 0;color:#fff9ea;font-size:17px;line-height:1.55}#fallen-dialogue small{color:#abc2c9}.fallen-overlay{position:absolute;z-index:8;inset:0;display:grid;place-items:center;background:#071a26b9;backdrop-filter:blur(8px)}.fallen-overlay[hidden],#fallen-dialogue[hidden],#fallen-game[hidden],#fallen-gate[hidden]{display:none!important}.fallen-panel{width:min(440px,calc(100% - 32px));padding:32px;background:linear-gradient(155deg,#193b42,#0d2231);border:2px solid #cbb98c;border-radius:20px;box-shadow:0 25px 100px #000c;display:flex;flex-direction:column;gap:12px}.fallen-panel h1{margin:0;text-align:center;font-size:26px;letter-spacing:3px;color:#f4dfad}.fallen-panel p{text-align:center;margin:0 0 16px;color:#a9c5be}.fallen-panel button{padding:14px 18px;background:#25545a;color:#fff7e5;border:1px solid #8bb8a9;border-radius:10px;cursor:pointer;font-weight:700;font-size:15px}.fallen-panel button:hover,.fallen-hud button:hover{background:#34766c}.fallen-panel label{display:flex;justify-content:space-between;margin-top:8px;color:#d9e5d6}.fallen-panel input{accent-color:#e3c786}.fallen-panel small{text-align:center;color:#9eb9b4;margin-top:10px}.fallen-bar{position:absolute;z-index:3;bottom:12px;left:18px;right:18px;display:flex;align-items:center;gap:12px;pointer-events:none;font-size:12px;color:#e7f1dc;text-shadow:0 2px 6px #000}.fallen-bar #fallen-coords{margin-left:auto}.fallen-bar button{display:none}.fallen-help{display:none}.fallen-touch{display:none;position:absolute;z-index:5;left:18px;bottom:60px;flex-direction:column;align-items:center;gap:4px}.fallen-touch>div{display:flex;gap:5px}.fallen-touch button{min-width:60px;min-height:52px;touch-action:manipulation;background:#163c47bd;border:1px solid #c6d5b1;border-radius:12px;color:#fff;font-weight:800}@media(pointer:coarse){.fallen-touch{display:flex}}@media(max-width:650px){.fallen-hud{top:10px;left:10px;right:10px}.fallen-hud span{font-size:10px;padding:11px}.fallen-hud button{font-size:12px;padding:11px}.fallen-panel{padding:22px}#fallen-dialogue{bottom:15px;padding:12px 16px}#fallen-dialogue p{font-size:14px}.fallen-bar{display:none}}#fallen-gate{margin:25vh auto;max-width:600px;padding:25px;border:1px solid #335c58;background:#102c32;border-radius:12px}
/* Immersive 3D scene: only the Escape button floats above the world. */
.fallen-hud{justify-content:flex-end;z-index:6}.fallen-hud span{display:none}
#fallen-canvas{object-fit:fill;touch-action:none}
#fallen-dialogue{bottom:clamp(110px,16vh,190px);width:min(820px,calc(100% - 32px));padding:24px 30px;background:#102636f7;border:3px solid #e6d29c;box-shadow:0 15px 70px #000c;max-height:45vh;overflow-y:auto}
#fallen-dialogue strong{font-size:21px}#fallen-dialogue p{font-size:clamp(17px,2.1vw,23px);line-height:1.6}#fallen-dialogue small{font-size:14px;color:#e0cfa7}
.fallen-bar{display:none}
.fallen-panel{max-height:94dvh;overflow-y:auto}
@media(max-width:650px){#fallen-dialogue{bottom:clamp(90px,18vh,145px);padding:16px 20px;max-height:45vh}#fallen-dialogue p{font-size:17px}.fallen-touch{bottom:12px}.fallen-hud{right:12px}}

/* Crisp, deliberately low-resolution 2.5D presentation. */
#fallen-canvas{image-rendering:pixelated;image-rendering:crisp-edges}

/* Independent game document: no site header or inherited global navigation. */
html,body{width:100%;height:100%;overflow:hidden}
.fallen-page{position:fixed;inset:0;width:100vw;height:100dvh;overflow:hidden}
.fallen-layout,#fallen-game,.fallen-stage{width:100%;height:100dvh;margin:0;padding:0;min-height:0}
#fallen-canvas{width:100%;height:100%;image-rendering:pixelated}
.fallen-hud{top:12px;right:16px;left:auto}
.fallen-hud button{background:#193d43e8;border:2px solid #e6d49b;box-shadow:0 3px 0 #091c20;font-family:system-ui,sans-serif}

/* Map, interior and compact two-button HUD. */
.fallen-hud{gap:8px}.fallen-hud button{white-space:nowrap}
#fallen-map[hidden],#fallen-house[hidden]{display:none!important}
.fallen-map-panel{width:min(680px,calc(100vw - 24px));max-height:92dvh;overflow:auto}
#fallen-map-canvas{display:block;width:100%;height:auto;image-rendering:pixelated;border:3px solid #d5c49b;background:#416d4b}
.fallen-house-panel{width:min(520px,calc(100vw - 24px))}
.fallen-room-art{height:180px;display:flex;align-items:center;justify-content:space-around;background:repeating-linear-gradient(90deg,#a17a54 0 34px,#b38b60 34px 68px);border:12px solid #73533d;box-shadow:inset 0 12px #e1c69d,inset 0 -14px #634735;color:#d9e6cf;font-size:64px}
@media(max-width:650px){.fallen-hud button{padding:10px 12px;font-size:12px}.fallen-map-panel{padding:16px}}

/* A real, furnished bakery vignette, and a discoverable entrance prompt. */
#fallen-door-hint{position:absolute;z-index:5;bottom:clamp(80px,13vh,150px);left:50%;transform:translateX(-50%);padding:10px 20px;border:2px solid #dfc990;border-radius:9px;background:#16363be9;color:#fff0c6;font-weight:800;white-space:nowrap;box-shadow:0 6px 20px #0007}
#fallen-door-hint[hidden]{display:none}
.fallen-bakery-room{position:relative;height:240px;overflow:hidden;display:block;background:linear-gradient(#b78a61 0 63%,#8b6346 63% 100%);border:12px solid #73533d;box-shadow:inset 0 10px #e5cba1,inset 0 -10px #5d4031}
.bakery-window{position:absolute;left:12%;top:14%;width:26%;height:37%;border:9px solid #70503b;background:linear-gradient(135deg,#d9e8cc,#85b3aa);box-shadow:inset 0 0 0 3px #f3e5bb}
.bakery-window:after{content:'';position:absolute;left:47%;top:0;height:100%;width:7px;background:#70503b}
.bakery-oven{position:absolute;right:9%;top:16%;width:32%;height:59%;border:10px solid #b8a58b;border-radius:45% 45% 7px 7px;background:radial-gradient(ellipse at 50% 90%,#d49a5b 0 12%,#5e3b32 45%,#2b2d2b 75%);box-shadow:0 8px #5f4437}
.bakery-counter{position:absolute;bottom:17%;left:13%;width:53%;height:25%;display:flex;align-items:flex-start;justify-content:space-evenly;background:#8a5c3c;border:7px solid #5d3c2b;box-shadow:0 7px #4a3228;font-size:30px;color:#f0c987}
.bakery-rug{position:absolute;bottom:2%;right:10%;width:24%;height:10%;background:#a86f56;border:3px solid #e2bd89;transform:skewX(-12deg)}

#fallen-interior-label{position:absolute;z-index:5;top:72px;left:50%;transform:translateX(-50%);padding:10px 18px;background:#17343ce8;border:2px solid #d5bd83;border-radius:10px;font-weight:800;color:#f8e6b7;white-space:nowrap}#fallen-interior-label[hidden]{display:none}#fallen-dialogue{bottom:clamp(35px,7vh,90px)}@media(max-width:650px){#fallen-dialogue{bottom:clamp(20px,5vh,55px)}#fallen-interior-label{top:66px;font-size:11px;white-space:normal;text-align:center;width:80%}}

/* Admin preview wardrobe: all cosmetics selectable, with local persistent choices. */
.fallen-wardrobe-panel{width:min(510px,calc(100vw - 28px));max-height:90dvh;overflow:auto}
#fallen-wardrobe-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:6px 0 12px}
#fallen-wardrobe-grid label{display:flex;flex-direction:column;gap:7px;color:#f2e2b8;font-size:13px;font-weight:700}
#fallen-wardrobe-grid select{width:100%;padding:12px 9px;border:1px solid #cbb98c;border-radius:8px;background:#17343d;color:#fff7e5;font:inherit}
@media(max-width:500px){#fallen-wardrobe-grid{grid-template-columns:1fr}}

#fallen-pickup-hint{position:absolute;z-index:6;top:80px;left:50%;transform:translateX(-50%);background:#193d43ed;border:2px solid #e1c582;border-radius:9px;color:#fff0c8;padding:11px 16px;text-align:center;font-weight:700;max-width:85vw}#fallen-pickup-hint[hidden]{display:none}

/* Interactive wardrobe: visible, clickable selectors and live character on the left. */
.fallen-wardrobe-panel{width:min(900px,calc(100vw - 24px));max-height:94dvh;overflow:auto;position:relative;z-index:1}
.fallen-wardrobe-layout{display:grid;grid-template-columns:minmax(190px,.85fr) minmax(220px,1.15fr);gap:22px;align-items:start}
.fallen-wardrobe-avatar{display:flex;flex-direction:column;align-items:center;gap:9px;background:#b6a68b;border:3px solid #d9bd80;border-radius:12px;padding:12px;color:#263a3d}
.fallen-wardrobe-avatar h2{margin:0;font-size:16px;letter-spacing:2px;color:#273e43}
.fallen-wardrobe-avatar span{font-size:12px;font-weight:700}
#fallen-wardrobe-preview{display:block;width:min(100%,256px);height:auto;aspect-ratio:256/336;image-rendering:pixelated;border:2px solid #715e48;background:#c5b69a}
#fallen-wardrobe-grid{grid-template-columns:1fr;gap:12px}
#fallen-wardrobe-grid label{display:flex;flex-direction:column;align-items:stretch;justify-content:initial;gap:7px;margin:0}
#fallen-wardrobe-grid select{cursor:pointer;min-height:48px;pointer-events:auto}
#fallen-wardrobe[hidden]{display:none!important}
@media(max-width:600px){.fallen-wardrobe-layout{grid-template-columns:1fr}.fallen-wardrobe-avatar{max-width:310px;width:100%;margin:auto}.fallen-wardrobe-panel{padding:16px}}

/* Chapter One sits above the original fullscreen WebGL scene, never replaces it. */
#fallen-story-intro[hidden],#fallen-story-puzzle[hidden],#fallen-story-objective[hidden]{display:none!important}
.fallen-story-intro{z-index:15;background:#09141eea;backdrop-filter:none;padding:clamp(8px,2vh,24px)}
.fallen-story-cinematic{width:min(1060px,100%);max-height:98dvh;display:flex;flex-direction:column;align-items:stretch;background:#112b36;border:4px solid #e0c68e;box-shadow:0 20px 70px #000d;overflow-y:auto}
.fallen-story-cinematic h1{font:900 clamp(18px,2.4vw,32px) Georgia,serif;letter-spacing:3px;text-align:center;color:#f6d998;padding:12px;margin:0;background:#1c3540}
#fallen-story-art{width:100%;max-height:55dvh;aspect-ratio:16/9;object-fit:contain;image-rendering:pixelated;background:#2c4753;cursor:pointer}
.fallen-story-caption{padding:clamp(14px,2vw,28px);background:#0c2632;display:grid;grid-template-columns:1fr auto;gap:8px 24px;align-items:center}
.fallen-story-caption strong{color:#edcd87;font:800 clamp(17px,2vw,23px) Georgia,serif;grid-column:1/-1}
.fallen-story-caption p{color:#fff6e7;font:clamp(17px,2vw,22px)/1.55 Georgia,serif;margin:0;min-height:3em}
.fallen-story-caption button{grid-column:2;grid-row:2;background:#8a653a;color:#fff5de;border:2px solid #e6d091;padding:14px 24px;font-weight:800;cursor:pointer;border-radius:7px}
.fallen-story-caption small{grid-column:1/-1;color:#becbd0;letter-spacing:1px}
#fallen-story-puzzle{z-index:14;background:#071923e8}
.fallen-story-puzzle-panel{width:min(760px,calc(100vw - 20px));gap:13px;padding:clamp(16px,3vw,32px)}
.fallen-story-kicker{font-size:11px!important;letter-spacing:2px;color:#edcb84!important;margin:0!important}
#fallen-story-question{font:clamp(17px,2vw,22px)/1.5 Georgia,serif;color:#fff5df;text-align:left;margin:0}
#fallen-story-answers{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
#fallen-story-answers button{min-height:65px;text-align:left;font-family:Georgia,serif;font-size:17px;background:#294956;border:2px solid #8b9e99}
#fallen-story-feedback{min-height:44px;text-align:left;font-size:15px!important;color:#f5dda8!important;margin:0!important}
#fallen-story-hint{background:#846b43;border-color:#e3c98a}
#fallen-story-objective{position:absolute;z-index:5;top:72px;left:14px;max-width:min(540px,65vw);padding:9px 14px;background:#0a2633dd;border:2px solid #c7ae78;color:#fff0ca;border-radius:8px;font:600 13px/1.35 system-ui;pointer-events:none}
#fallen-story-hintcoins{position:absolute;z-index:5;bottom:14px;right:14px;padding:7px 12px;color:#ffe8ac;background:#0b2330dc;border:1px solid #b69c61;border-radius:7px;font-weight:700;font-size:12px}
#fallen-story-restart{position:absolute;z-index:5;right:14px;bottom:60px;background:#122b37e0;color:#f0ddae;border:1px solid #c8b17e;border-radius:6px;padding:7px 11px;cursor:pointer;font-size:12px}
@media(max-width:620px){.fallen-story-caption{grid-template-columns:1fr}.fallen-story-caption button{grid-column:1;grid-row:auto}.fallen-story-caption p{min-height:0}#fallen-story-answers{grid-template-columns:1fr}#fallen-story-objective{top:65px;font-size:11px;max-width:69vw}#fallen-story-restart{bottom:60px}}

/* Chapter One: keep illustrated cutscenes framed like the original fullscreen game. */
.fallen-story-caption{grid-template-columns:1fr auto auto;gap:8px 12px}
#fallen-story-intro-text{grid-column:1/-1}
#fallen-story-next{grid-column:1!important;grid-row:auto!important}
#fallen-story-skip,#fallen-story-sound{padding:12px 14px;border:1px solid #d6ba85;border-radius:7px;color:#ffe9b4;background:#28424a;font-weight:700;cursor:pointer}
#fallen-story-skip:hover,#fallen-story-sound:hover{background:#37565e}
#fallen-story-sound[aria-pressed="true"]{border-color:#98cbaa;background:#214f4a;color:#e2ffdb}
#fallen-story-interact{position:absolute;z-index:5;left:14px;top:125px;max-width:min(540px,65vw);padding:8px 12px;color:#e9dbb9;background:#102938e6;border:1px solid #baad8c;border-radius:8px;font:500 12px/1.4 system-ui;pointer-events:none}
#fallen-story-interact[hidden]{display:none!important}
#fallen-story-art{image-rendering:pixelated;object-fit:fill}
@media(max-width:650px){.fallen-story-caption{grid-template-columns:1fr 1fr}.fallen-story-caption p{grid-column:1/-1}.fallen-story-caption #fallen-story-next{grid-column:1/-1!important}.fallen-story-caption small{grid-column:1/-1}#fallen-story-interact{top:120px;max-width:78vw;font-size:10px}}

/* Temporary one-click PUZZLE checkpoint until the final puzzle design pass. */
#fallen-story-question[hidden],#fallen-story-answers[hidden],
#fallen-story-feedback[hidden],#fallen-story-hint[hidden],
#fallen-story-puzzle-close[hidden]{display:none!important}
#fallen-story-puzzle-continue{min-width:220px;align-self:center;background:#8b683e;border:2px solid #e0bc83;color:#fff7df;font:800 19px Georgia,serif;letter-spacing:.04em;padding:17px 32px;box-shadow:0 7px 0 #4c3628,0 15px 35px #0007}
#fallen-story-puzzle-continue:hover{background:#aa814c}
#fallen-story-puzzle-continue:focus-visible{outline:3px solid #fff0b2;outline-offset:3px}
#fallen-story-puzzle-name{font-size:clamp(27px,4vw,39px);letter-spacing:.12em}

/* The map is not available until Oliver finds the map item in a later chapter. */
#fallen-map-button[hidden]{display:none!important}

/* Chapter One: crisp illustrated comic panels, never pixelated gameplay captures. */
#fallen-story-art{image-rendering:auto!important;object-fit:contain;background:#292c3b}

/* Cloud save menus: accessible on both desktop and narrow displays. */
.fallen-save-overlay{z-index:35!important;background:#0c1721e9!important;display:flex;align-items:center;justify-content:center;padding:18px}
.fallen-save-panel{width:min(740px,100%);max-height:90dvh;overflow-y:auto;gap:14px}
.fallen-save-panel h1{font:800 clamp(25px,5vw,41px) Georgia,serif;letter-spacing:.11em}
.fallen-save-slots{display:grid;gap:12px;width:100%}
.fallen-slot-row{display:grid;grid-template-columns:minmax(0,1fr) repeat(3,auto);align-items:center;gap:10px;background:#20333c;border:1px solid #bba378;padding:14px;border-radius:9px}
.fallen-slot-row span{color:#f4e5c8;line-height:1.45;font-weight:600}
.fallen-slot-row button,.fallen-save-slots>button{padding:12px 16px;border:1px solid #e6c788;border-radius:7px;background:#775837;color:#fff5dd;font-weight:750;cursor:pointer}
.fallen-slot-row button:disabled{opacity:.4;cursor:not-allowed}
.fallen-slot-row button[aria-label^="Delete save"]{background:#593a38;border-color:#b98579}
#fallen-save-chooser{width:100%;border:1px solid #c4a67b;padding:12px;border-radius:8px;background:#1a3038}
#fallen-save-chooser[hidden],#fallen-start-menu[hidden]{display:none!important}
#fallen-save-status,#fallen-start-status{color:#ead6a4;min-height:1.4em}
@media(max-width:570px){.fallen-slot-row{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.fallen-slot-row span{grid-column:1/-1}.fallen-slot-row button{padding:11px 5px;font-size:12px}}

/* Only the approved first cutscene has its narration baked into the picture. */
#fallen-story-intro.fallen-first-approved .fallen-story-cinematic h1,
#fallen-story-intro.fallen-first-approved #fallen-story-intro-speaker,
#fallen-story-intro.fallen-first-approved #fallen-story-intro-text{display:none!important}
#fallen-story-intro.fallen-first-approved #fallen-story-art{
 width:min(100%,960px);aspect-ratio:4/3;max-height:70dvh;
 object-fit:contain;image-rendering:auto!important;align-self:center
}
#fallen-story-intro.fallen-first-approved .fallen-story-caption{padding:10px 18px;gap:8px}

/* Cutscene controls: three unique grid positions, no overlapping buttons.
   Previous .fallen-story-caption button selector forced every button into
   column 2 / row 2, making Sound physically cover Skip and blocking play. */
#fallen-story-intro .fallen-story-caption{
 display:grid!important;
 grid-template-columns:repeat(3,minmax(0,1fr))!important;
 column-gap:10px!important;
 row-gap:10px!important;
 align-items:stretch!important;
}
#fallen-story-intro .fallen-story-caption>:is(strong,p,small){
 grid-column:1/-1!important;
 grid-row:auto!important;
}
#fallen-story-intro .fallen-story-caption>button{
 grid-row:auto!important;
 min-width:0!important;
 width:100%!important;
 position:relative!important;
 cursor:pointer!important;
 text-align:center!important;
}
#fallen-story-intro #fallen-story-next{grid-column:1!important}
#fallen-story-intro #fallen-story-skip{grid-column:2!important}
#fallen-story-intro #fallen-story-sound{grid-column:3!important}
@media(max-width:620px){
 #fallen-story-intro .fallen-story-caption{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
 }
 #fallen-story-intro #fallen-story-next{grid-column:1!important}
 #fallen-story-intro #fallen-story-skip{grid-column:2!important}
 #fallen-story-intro #fallen-story-sound{grid-column:1/-1!important}
}

/* Preserve the approved second comic illustration's native 3:2 framing. */
#fallen-story-intro.fallen-second-approved #fallen-story-art{aspect-ratio:3/2!important;width:min(100%,960px)!important;height:auto!important;max-height:70dvh!important;object-fit:contain!important;image-rendering:auto!important}

/* Approved Edwin Enters panel includes its own title, character label and narration. */
#fallen-story-intro.fallen-edwin-approved .fallen-story-cinematic h1,
#fallen-story-intro.fallen-edwin-approved #fallen-story-intro-speaker,
#fallen-story-intro.fallen-edwin-approved #fallen-story-intro-text{display:none!important}
#fallen-story-intro.fallen-edwin-approved #fallen-story-art{
 aspect-ratio:3/2!important;width:min(100%,960px)!important;height:auto!important;
 max-height:70dvh!important;object-fit:contain!important;image-rendering:auto!important
}
#fallen-story-intro.fallen-edwin-approved .fallen-story-caption{padding:10px 18px;gap:8px}

/* Five original Fallen King intro PNGs: preserve artwork, captions, 1672×941 ratio. */
#fallen-story-intro.fallen-five-approved .fallen-story-cinematic h1,
#fallen-story-intro.fallen-five-approved #fallen-story-intro-speaker,
#fallen-story-intro.fallen-five-approved #fallen-story-intro-text{display:none!important}
#fallen-story-intro.fallen-five-approved.fallen-five-missing-asset #fallen-story-intro-text{display:block!important}
#fallen-story-intro.fallen-five-approved #fallen-story-art{
 width:min(100%,1050px)!important;max-width:100%!important;
 height:auto!important;aspect-ratio:1672/941!important;max-height:72dvh!important;
 object-fit:contain!important;image-rendering:auto!important;align-self:center;
}
#fallen-story-intro.fallen-five-approved .fallen-story-caption{padding:10px 18px;gap:8px}

/* Intro artwork already contains its English narration: controls only below the image. */
#fallen-story-intro.fallen-five-approved .fallen-story-caption>:is(strong,p,small){display:none!important}
#fallen-story-intro.fallen-five-approved .fallen-story-caption{grid-template-rows:auto!important}
