.landing-legal{position:absolute;top:84.7%;left:20px;right:20px;text-align:center;font-size:12px;line-height:16px}.landing-legal p{margin:0}.landing-legal p+p{margin-top:7px;font-size:11px}.policy-link{padding:0;border:0;background:none;color:#e9d7b2;font-size:inherit;line-height:inherit;text-decoration:underline;text-underline-offset:2px}
#bootLoading{position:absolute;top:69.72%;left:50%;transform:translateX(-50%);width:309px;max-width:calc(100% - 60px);height:100px;padding:15px 18px;display:flex;flex-direction:column;gap:11px;justify-content:center;border-radius:12px}.boot-label{display:flex;justify-content:center;gap:22px;line-height:24px;font-size:16px;white-space:nowrap}#bootLoading p{color:#f2dbab;font-size:13px;line-height:16px;margin:0;text-align:center;white-space:nowrap}#bootLoading p span{color:white}
progress{display:block;width:100%;height:8px;appearance:none;border:0;border-radius:99px;background:#ffffff33;overflow:hidden}progress::-webkit-progress-bar{background:#ffffff33;border-radius:99px}progress::-webkit-progress-value{background:linear-gradient(90deg,#ffdcb0,#ffedd6 51%,white);border-radius:99px}progress::-moz-progress-bar{background:linear-gradient(90deg,#ffdcb0,#ffedd6 51%,white);border-radius:99px}
#privacy{background:none;border:0;box-shadow:none;overflow:visible;padding:0;width:348px;max-width:calc(100vw - 40px);max-height:calc(100dvh - 28px)}#privacy::backdrop{background:#0d0f1c18;backdrop-filter:none}.privacy-sheet{position:relative;padding:32px 20px 42px;overflow:hidden}.privacy-sheet h2{font-size:24px;line-height:35px;margin:0 0 22px}.privacy-row{display:flex;gap:10px;align-items:flex-start;margin-bottom:18px;min-height:44px}.privacy-icon{width:36px;height:36px;flex:none;display:grid;place-items:center}.privacy-row h3{font-size:16px;font-weight:500;line-height:21px;margin:0 0 7px}.privacy-row p{font-size:12px;line-height:17px;text-align:left;margin:0}.privacy-glow{position:absolute;left:50%;transform:translateX(-50%);pointer-events:none}.privacy-glow.top{top:-4px}.privacy-glow.bottom{bottom:-4px}.agreement{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;font-size:12px;line-height:18px;margin:22px -8px 0;gap:0}.agreement label{display:flex;align-items:center;gap:5px;position:relative;cursor:pointer}.agreement input{position:absolute;left:0;width:18px;height:18px;opacity:0}.check-mark{border:1.18px solid white;width:15px;height:15px;border-radius:50%;display:grid;place-items:center;position:relative}.check-mark img{position:absolute;display:none}#policyAgree:checked+.check-mark img{display:block}#policyAgree:focus-visible+.check-mark{outline:2px solid #face99;outline-offset:3px}#acceptPolicy{display:flex;gap:6px;align-items:center;justify-content:center;width:186px;min-height:32px;padding:2px 12px;margin:24px auto 0}#acceptPolicy img{transform:rotate(90deg)}#closePrivacy{display:grid;place-items:center;position:relative;width:32.4px;height:32.4px;border:.482px solid #fdeedc;border-radius:50%;padding:0;margin:38px auto 0;background:#0d0f1cb3}#closePrivacy img{position:absolute}#policyDetails{max-height:255px;overflow:auto;font-size:13px;line-height:22px}#policyDetails h3{font-size:15px}#policyDetails p{text-align:left;font-size:13px}.privacy-sheet:has(#policyDetails:not([hidden])) .agreement{margin-top:12px}
#history{position:fixed;inset:0;margin:auto;width:393px;max-width:100vw;height:100dvh;max-height:852px;padding:0;border:1px solid #ffffff47;border-radius:0;overflow:hidden;background:#0d0f1c;isolation:isolate}#history::backdrop{background:#080a1280;backdrop-filter:none}.journal-backdrop{position:absolute;inset:-10px;background:linear-gradient(#0d0f1c99,#0d0f1ca6),var(--cover-image) center/cover;filter:blur(6px);z-index:-1}.journal-top{position:relative;margin:51px 35px 32px;height:34px;display:grid;place-items:center}.journal-top h2{font-size:20px;line-height:26px;margin:0;font-weight:400}.journal-top button{position:absolute;left:0;top:0;border:0;padding:0;background:none;width:34px;height:34px;display:grid;place-items:center}.journal-content{padding:0 16px;overflow:auto;max-height:calc(100% - 135px)}.chapter-card{min-height:70px;border:.5px solid #ffe8cb33;border-radius:16px;background:var(--panel-fill);display:flex;align-items:center;gap:10px;padding:7px 14px}.chapter-avatar{width:56px;height:56px;position:relative;flex:none}.chapter-avatar>img:first-child{position:absolute;inset:0}.chapter-thumb{position:absolute;left:3.394px;top:3px;width:49.212px;height:49.212px;border-radius:50%;object-fit:cover;object-position:center 40%}.chapter-copy{flex:1;min-width:0}.chapter-copy h3{font-weight:400;font-size:15px;line-height:22px;margin:0;color:#ffffffd9}.chapter-copy p{font-size:12px;line-height:18px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;text-align:left;margin:4px 0 0;color:#ffffffd9}#chapterStatus{font-size:12px;line-height:18px;flex:none;width:56px;text-align:center}#replayChapter{display:flex;align-items:center;justify-content:center;gap:4px;width:67px;min-height:30px;padding:2px 5px;margin:0;flex:none}.chapter-progress{padding:18px 18px 8px}.chapter-progress>div{display:flex;justify-content:space-between;gap:12px;font-size:12px;line-height:18px;margin-bottom:10px;color:#ffe8cb}.journal-note{font-size:12px;color:#fff9;text-align:center}#continueChapter{width:270px;max-width:100%;margin:28px auto 0}
@media(min-width:600px){#history{height:calc(100dvh - 48px);border-radius:24px}}@media(max-height:640px){#bootLoading{top:67%;padding:8px 6px;gap:7px}.boot-label{font-size:14px;gap:10px}#bootLoading p{font-size:11px} .boot{top:74%}.landing-legal{top:87%}.privacy-sheet{padding:20px 16px 24px}.privacy-sheet h2{margin-bottom:16px}.privacy-row{margin-bottom:12px}.privacy-row h3{font-size:14px;margin-bottom:3px}.privacy-row p{font-size:11px}.agreement{font-size:10px;margin-top:12px}#acceptPolicy{margin-top:16px}#closePrivacy{margin-top:18px}#policyDetails{max-height:220px}.journal-top{margin-top:28px}.chapter-card{padding:7px 10px;gap:7px}.chapter-copy h3{font-size:13px}.chapter-copy p{font-size:11px}#chapterStatus{font-size:11px;width:44px}}
.check-mark,.check-mark img{pointer-events:none}.agreement input{margin:0;z-index:1;cursor:pointer}#stage:has(#privacy[open])  .boot,#stage:has(#privacy[open]) .landing-legal,#stage:has(#privacy[open]) #bootLoading{visibility:hidden}#privacy{transform:translateY(20px)}#chapterStage{max-width:58%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media(max-height:640px){#privacy{transform:none}}
#sectionList{display:grid;gap:14px;padding:0 0 4px}.journal-top{margin-bottom:16px}.journal-content{max-height:calc(100% - 112px);padding-bottom:28px}.journal-note{margin:0 0 16px}.chapter-card{padding:7px 14px}.chapter-card.current{border-color:#ffe8cb}.chapter-card.locked{border-color:#ffe8cb1a}.chapter-card.locked>*{opacity:.4}.section-status{width:62px;flex:none;font-size:12px;line-height:18px;text-align:center;display:flex;flex-direction:column;align-items:center;gap:3px}.replay-section.primary{width:67px;min-height:30px;margin:0;padding:2px 5px;flex:none;display:flex;justify-content:center;align-items:center;gap:4px}.chapter-copy h3{font-size:15px;white-space:nowrap}.chapter-copy p{font-size:12px}.chapter-thumb{z-index:-0}.chapter-avatar>img:first-child{z-index:1;pointer-events:none}
.journal-backdrop{inset:0}
#stage{--edge:#ffe8cb99;--panel-fill:radial-gradient(ellipse at 50% 0%,#4c4439dd,#0d0f1cf0);--cover-image:url('assets/cover-poster-v2.webp');--dock:clamp(80px,13.6dvh,116px)}
.ink-panel{background:var(--panel-fill);border:.6px solid var(--edge);border-radius:16px}
#stats span{display:flex;align-items:center;gap:6px;padding:1px 9px}#stats img{width:19px;height:19px}#stats{gap:7px}#stats b{font-size:20px}
#toolbar{padding:clamp(12px,2.7dvh,24px) 8px 12px;background:radial-gradient(ellipse at top,#49434bcc,#0d0f1cdd)}#toolbar i{width:clamp(32px,5.2dvh,44px);height:clamp(32px,5.2dvh,44px)}#toolbar button{font-size:13px}#toolbar img{width:20px;height:20px}
.question{background:radial-gradient(ellipse,#0d0f1ce8,transparent 75%);padding:24px 8% 18px}.question:before{content:'';position:absolute;top:0;right:5%;width:170px;height:10px;background:url('assets/ui/panel-glow-wide.svg') center/contain no-repeat}
#options{padding:12px 12%;gap:12px}#options button{min-height:48px;border-radius:8px;border:1.5px solid #ffd7a7;background:linear-gradient(#fff8f0,#ffe8cc);font-weight:500}
#ending{inset:auto 6%;top:50%;transform:translateY(-50%);max-height:88%;padding:24px 22px;display:block;background:var(--panel-fill);border:.6px solid var(--edge);border-radius:16px;text-align:center}#ending h2{font:500 24px/1.4 game;margin:10px 0}.ending-divider{display:block;max-width:90%;margin:16px auto}#endText{font-size:14px;line-height:1.9;min-height:120px}.endMark{margin:15px 0}.summary-stats{display:grid;grid-template-columns:repeat(3,1fr);margin:18px 0;gap:0}.stat-summary{display:grid;justify-items:center;gap:5px}.stat-summary+.stat-summary{border-left:1px solid #ffffff20}.stat-summary img{width:22px;height:22px}.stat-summary small{font-size:11px}.stat-summary strong{font-size:22px;font-family:playful;font-weight:400}body[data-mode=end] #toolbar{display:none}
dialog{position:fixed;margin:auto;width:348px;max-width:calc(min(100vw,56.25dvh) - 32px);max-height:88dvh;border:.6px solid var(--edge);background:var(--panel-fill);padding:26px;border-radius:16px}dialog h2{text-align:center;font-size:24px;font-weight:500;margin:0 0 20px}dialog p{text-align:center;font-size:13px}dialog::backdrop{background:#0d0f1c66;backdrop-filter:blur(4px)}dialog button{margin-top:12px}dialog .subtle{display:block;width:100%;background:none;border:0;font-size:14px;padding:7px}dialog .primary:disabled{opacity:.4;cursor:not-allowed}.policy-link{width:auto;margin:0}#privacy{max-width:calc(min(100vw,56.25dvh) - 32px);transform:none}#privacy .privacy-sheet{background:radial-gradient(ellipse at top,#3d3325e8,#15151be8)}#privacy button.policy-link{margin:0;width:auto}#privacySummary p{border:0}#closePrivacy{margin-top:24px}#stage:has(#privacy[open]) .boot,#stage:has(#privacy[open]) .landing-legal{visibility:hidden}.landing-legal{font-size:11px;top:86.5%}#bootLoading{max-width:calc(100% - 40px)}
#history{width:min(100vw,56.25dvh);max-width:100vw;height:100dvh;max-height:100dvh;border:0;border-radius:0}.journal-top button{margin:0}.chapter-card button{margin:0}.journal-content{height:calc(100% - 125px)}#continueChapter{display:block}#shareLink{width:100%;padding:12px;border:1px solid #ffe8cb55;border-radius:8px;background:#0d0f1c;color:#fff;font-size:12px}#shareDialog label{font-size:13px}
#exitImmersive{position:absolute;z-index:15;bottom:18px;right:18px;border:.5px solid #ffe8cb;border-radius:20px;background:#0d0f1caa;padding:8px 14px;font-size:12px}#load{background:var(--panel-fill);border:.5px solid var(--edge);border-radius:16px;padding:24px 12px}#play{z-index:16}#settings button,#settings h2{font-family:playful}#settings button{font-size:17px}#settings p{color:#fff9}
@media(max-height:700px){.privacy-sheet{padding:20px 16px}.privacy-row{margin-bottom:12px}.privacy-sheet h2{margin-bottom:14px}#closePrivacy{margin-top:14px}#ending{padding:18px}#endText{font-size:12px}.summary-stats{margin:12px 0}.landing-legal{font-size:10px}}
.fp-combat .gameTop{top:20px;right:18%;left:6%}.fp-combat .gameTop h2{font-size:23px}.fp-combat #gameBottom{bottom:14px;left:6%;right:6%}.fp-combat #gameFeedback{background:#111a;border-radius:9px;padding:8px;min-height:40px;font-size:12px}.fp-combat #gameControls{justify-content:space-between;align-items:end;height:112px}.fp-combat #joystick{position:relative;width:100px;height:100px;border:2px solid #fff6;background:#161e2c88;border-radius:50%;touch-action:none;display:grid;place-items:center}.fp-combat #joystick span{width:45px;height:45px;background:#fff3d9a8;border:1px solid #ffebc7;border-radius:50%;pointer-events:none}.fp-actions{display:flex;align-items:end;gap:8px}.fp-combat .fp-actions button{border-radius:50%;width:64px;height:64px;padding:0;background:#101b2cd9;font-size:15px}.fp-combat .fp-actions #fpPunch{background:#f8dec0;color:#232428;width:76px;height:76px}.fp-combat .fp-actions #fpMount{border-radius:14px;width:100px}.fp-combat #gameIntro{z-index:4}
.fp-combat .fp-actions button{flex-shrink:0;white-space:nowrap}.fp-combat .fp-actions{gap:5px}.fp-combat #joystick{flex-shrink:0}.fp-combat .gameTop #gameScore{font-size:16px}.fp-combat .gameTop #meter{height:7px}
#world3d{position:absolute;inset:0;width:100%;height:100%;touch-action:none}#world3d.dead{filter:grayscale(1) contrast(1.3)}#crimeHud{position:absolute;inset:0;pointer-events:none}#crimeHud.hurt{box-shadow:inset 0 0 55px #e22a}#wanted{position:absolute;top:140px;right:6%;font-size:18px;letter-spacing:3px;color:#eee7ca;text-shadow:0 2px 4px #000}#radar{position:absolute;right:5%;top:175px;width:76px;height:76px;border:2px solid #b5b0a0;border-radius:50%;background:#181d20aa}.reticle{position:absolute;top:46%;left:50%;font-size:32px;line-height:1;color:#fff;text-shadow:0 1px 3px #000}#wasted{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:center;align-items:center;background:#0006;gap:18px;padding:25px;text-align:center}#wasted strong{color:#b72c30;letter-spacing:12px;font-size:65px;font-weight:900;text-shadow:2px 2px #000}#wasted span{font-size:14px;color:#ddd}.fp-combat .gameTop{pointer-events:none;z-index:1}.fp-combat #gameBottom{z-index:2}.fp-combat #gameIntro{z-index:3}

/* Combat controls are icon-only, with names retained for assistive input. */
body[data-mode="game"] #toolbar button>span{display:none}
body[data-mode="game"] #toolbar{align-items:center}
.fp-combat #gameControls .fp-actions button{width:66px;height:66px;min-width:0;border-radius:50%;padding:14px;background:#18232ed9;border:2px solid #f1d2a5;box-shadow:0 4px 16px #0006;color:#fff0d6;display:grid;place-items:center}
.fp-combat #gameControls .fp-actions #fpPunch{width:78px;height:78px;background:#f0d5ae;color:#292b30}
.fp-combat #gameControls .fp-actions button svg{width:100%;height:100%;pointer-events:none}
.fp-combat #gameControls .fp-actions button:active{transform:scale(.9);background:#d4ac78}
body[data-mode="game"] header button{font-size:0;width:44px;height:44px;padding:10px}
body[data-mode="game"] header button:after{content:'☰';font:24px/1 sans-serif}
#storyScene{position:absolute;inset:0;overflow:hidden}#storyCanvas{width:100%;height:100%;touch-action:none;display:block}
.story-game .gameTop{top:22px;left:6%;right:18%;pointer-events:none}.story-game .gameTop h2{font-size:23px}.story-game #gameGoal{font-size:12px}
.story-game #gameBottom{left:6%;right:6%;bottom:18px}.story-game #gameFeedback{font-size:12px;background:#07121bd9;padding:9px;border-radius:8px;min-height:34px}
.story-game #gameControls{display:flex;justify-content:space-between;gap:12px}.story-game #gameControls button{width:64px;height:64px;min-width:0;border:1px solid #eed4ae;border-radius:50%;background:#132535db;color:#fbe7c8;font:32px sans-serif;touch-action:none;padding:14px}
.story-game #gameControls button svg{width:100%;height:100%}#storyBadge{position:absolute;top:25%;left:10%;right:10%;padding:9px;background:#091523d9;border:1px solid #bda58288;border-radius:6px;text-align:center;font-size:14px;pointer-events:none}
#pointChoices{position:absolute;bottom:18%;left:8%;right:8%;display:grid;grid-template-columns:1fr 1fr;gap:8px}#pointChoices button{padding:12px 5px;border:1px solid #ccb28d;border-radius:8px;background:#12202eec;color:#ffe6be;font-size:13px}
@media(max-height:700px){.story-game .gameTop{top:14px}.story-game .gameTop h2{font-size:19px}.story-game #gameControls button{width:52px;height:52px}.story-game #gameFeedback{padding:5px;font-size:11px}}
#storyBadge{top:21%}#pointChoices{bottom:12%}
.door-game #gameControls{justify-content:space-between;align-items:end;height:112px}
.door-game #joystick{position:relative;flex-shrink:0;width:100px;height:100px;border:2px solid #fff6;background:#161e2c88;border-radius:50%;touch-action:none;display:grid;place-items:center}
.door-game #joystick span{width:45px;height:45px;background:#fff3d9a8;border:1px solid #ffebc7;border-radius:50%;pointer-events:none}
.door-game #gameControls .fp-actions{display:flex;align-items:end;gap:5px}
.door-game #gameControls .fp-actions button{width:66px;height:66px;border-radius:50%;padding:14px;background:#18232ed9;border:2px solid #f1d2a5;box-shadow:0 4px 16px #0006;color:#fff0d6;display:grid;place-items:center}
.door-game #gameControls .fp-actions #fpPunch{width:78px;height:78px;background:#f0d5ae;color:#292b30}
.door-game #gameControls .fp-actions button:active{transform:scale(.9);background:#d4ac78}

/* Keep the hosting platform's comment launcher clear of mobile playback controls. */
@media(max-width:600px){#cf-comment-trigger{display:none!important}}

/* Local story-to-fight bridge retains the original portrait shell and toolbar. */
#storyFight{position:absolute;inset:42px 0 var(--dock);width:100%;height:calc(100% - var(--dock) - 42px);border:0;z-index:8;background:#090e12;animation:story-fade-in .55s ease-out}
body[data-node=restaurantFight] header{z-index:12;top:8px}
body[data-node=q1] #still{object-fit:cover;object-position:center top}
@keyframes story-fade-in{from{opacity:0}to{opacity:1}}

body[data-node=q1] .question h2{font-family:game,"PingFang SC",sans-serif;font-size:clamp(19px,2.4dvh,25px);line-height:1.6;font-weight:400;letter-spacing:0}
body[data-node=q1] #options button{min-height:78px;text-align:left}
body[data-node=q1] #options strong{display:block;font-size:17px;font-weight:500}
body[data-node=q1] #options small{display:block;margin-top:6px;font-size:12px;color:#77634f;line-height:1.5}

@font-face{font-family:StorySans;src:url('assets/ui/story-sans.woff2') format('woff2');font-weight:400;font-display:swap}
body[data-node=q1] #choice{font-family:StorySans,"PingFang SC",sans-serif}
body[data-node=q1] .question h2,body[data-node=q1] #options button{font-family:inherit}
/* Standalone debug navigation; preserve the normal story button. */
#landing #debugEntry{padding:5px 8px;font-size:12px;border:1px solid #e4c69b88;border-radius:8px;background:#151b27d9;color:#fff0d5}
#debugChapters{box-sizing:border-box;width:min(88vw,410px);max-height:85dvh;overflow:auto;padding:20px}
#debugChapters h2{font-size:19px;margin:0 0 8px}
#debugChapters p{font-size:12px;color:#c8c4bc;margin:0 0 12px}
#debugChapterList{display:grid;gap:8px}
#debugChapterList button{margin:0;padding:10px 12px;min-height:40px;font-size:14px;text-align:left}

#landing #debugEntry{position:absolute;top:18px;right:16px;z-index:3;width:auto;margin:0}
