@font-face{font-family:game;src:url('assets/ui/noto-sc-regular.woff2')}@font-face{font-family:playful;src:url('assets/ui/kuaile.woff2')}*{box-sizing:border-box}html,body{width:100%;max-width:none;margin:0;padding:0;height:100%;overflow:hidden}body{background:#0d0f1c;color:#fff8ee;font:15px/1.6 game,'PingFang SC',sans-serif;display:grid;place-items:center}body:before{content:'';position:fixed;inset:-30px;background:linear-gradient(#10121bc9,#0b0e18e8),url('assets/cover-poster-v2.webp') center/cover;filter:blur(25px)}button,input{font:inherit}button{cursor:pointer;color:inherit;-webkit-tap-highlight-color:transparent}button:focus-visible{outline:2px solid #ffce85;outline-offset:3px}[hidden]{display:none!important}#stage{position:relative;isolation:isolate;width:min(100vw,56.25dvh);height:100dvh;overflow:hidden;background:#0d0f1c;--dock:88px}#film,#still,.shade{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.shade{pointer-events:none;background:linear-gradient(#060b1233,transparent 45%,#080c1688)}header{position:absolute;right:5%;top:max(18px,env(safe-area-inset-top));z-index:12}header button{border:1px solid #ffe8cb77;border-radius:25px;padding:6px 15px;background:#0d0f1c90;font-family:playful;font-size:18px}#stats{position:absolute;top:60px;left:6%;display:grid;gap:8px;z-index:3}#stats span{border:1px solid #ffe8cb88;background:#10162288;border-radius:20px;padding:0 12px;color:#ebc18b}#stats b{color:white;font-family:playful;font-size:20px;font-weight:400}.primary,#options button{border:1px solid #efcd9c;color:#302d2a;background:linear-gradient(#fff8f0,#fff1e0);border-radius:12px;padding:13px 18px;font-weight:600}.subtle{border:1px solid #ffe8cb66;background:#10162266;border-radius:10px;padding:10px 16px}.eyebrow{color:#e6c28c;letter-spacing:3px;font-size:12px}#landing{position:absolute;inset:0;padding:10% 9%;background:linear-gradient(#080b1666,transparent 45%,#080b16 96%)}#landing h1{font-family:serif;font-size:clamp(55px,11dvh,108px);font-weight:900;line-height:1.03;letter-spacing:8px;margin:15px 0;color:#f5dbb1;text-shadow:0 4px 18px #000}#landing h1 em{font-style:normal;color:#fff1d8}#landing .tagline{margin-top:22px;font-size:17px;letter-spacing:3px;text-shadow:0 2px 8px #000}.boot{position:absolute;bottom:13%;left:17%;right:17%;display:grid;gap:10px}#landing small{position:absolute;bottom:5%;left:5%;right:5%;text-align:center;font-size:10px;color:#ddd}#choice{position:absolute;left:0;right:0;bottom:calc(var(--dock) + 25px);z-index:5}.question{background:linear-gradient(90deg,transparent,#0d0f1ccc 15%,#0d0f1ccc 85%,transparent);padding:22px 8% 12px;text-align:center;position:relative}.question>span{position:absolute;top:-15px;left:8%;background:#fff4e4;color:#292929;padding:4px 14px;clip-path:polygon(8% 0,92% 0,100% 50%,92% 100%,8% 100%,0 50%);font-size:13px}.question h2{font-size:18px;font-weight:500;margin:8px 0}#options{padding:8px 14%;display:grid;gap:10px}#options button{display:flex;align-items:center;gap:14px;text-align:left;font-size:16px;padding:12px 18px}#options button:after{content:'◈';margin-left:auto;color:#f6c27f;font-size:25px}#toolbar{position:absolute;z-index:10;bottom:0;left:0;right:0;height:var(--dock);display:flex;justify-content:space-around;background:linear-gradient(#292c37bb,#10131ddd);border:1px solid #ffe8cbaa;border-radius:17px 17px 0 0;padding:12px 5px max(8px,env(safe-area-inset-bottom))}#toolbar button{border:0;background:none;padding:0;display:grid;justify-items:center;gap:4px;font-size:12px}#toolbar i{width:39px;height:39px;border:1px solid #ffe8cb;border-radius:50%;display:grid;place-items:center}#toolbar img{width:21px;height:21px}#transport{position:absolute;bottom:calc(var(--dock) + 8px);left:5%;right:5%;padding:6px 12px;background:#0d0f1cbb;border-radius:12px;z-index:4;font-size:11px}#transport>div{display:flex;justify-content:space-between;align-items:center}#skip{border:0;background:none;font-size:11px}#seek{width:100%;height:20px;accent-color:#f8d6a6;display:block}#play{position:absolute;z-index:15;top:46%;left:18%;right:18%}#load{position:absolute;top:55%;left:10%;right:10%;text-align:center;font-size:13px;z-index:15}#ending{position:absolute;inset:0;z-index:4;background:#0c111be8;padding:15% 9% calc(var(--dock) + 15px);overflow:auto;display:flex;flex-direction:column;justify-content:center}#ending h2{font:28px/1.4 serif;margin:5px 0 20px}#endText{white-space:pre-line;line-height:2;font-size:15px;min-height:130px}.endMark{letter-spacing:8px;color:#e6c28c;text-align:center;margin:20px 0}#endActions{display:grid;gap:9px}#gameplay{position:absolute;inset:0 0 var(--dock);z-index:5;overflow:hidden;background:#101522}#canvas{width:100%;height:100%;display:block;touch-action:none}.gameTop{position:absolute;left:6%;right:6%;top:30px;pointer-events:none;text-shadow:0 2px 8px #000}.gameTop p{margin:4px 0}.gameTop h2{font-size:26px;margin:3px 0}.gameTop #gameTag{font-size:11px;letter-spacing:3px;color:#e4c38d}.gameTop #gameGoal{font-size:12px;color:#ddd}.gameTop progress{width:100%;height:8px;accent-color:#f0c98e}#gameScore{font:18px playful;margin-top:6px}#gameBottom{position:absolute;bottom:16px;left:6%;right:6%;text-align:center}#gameFeedback{font-size:14px;text-shadow:0 2px 8px #000;min-height:24px}#gameControls{display:flex;gap:9px;justify-content:center}#gameControls button{border:1px solid #ffe0b0;background:#152337cc;border-radius:15px;padding:14px 18px;touch-action:none;font-size:16px}#gameControls .hold{background:#fff1dc;color:#282828;min-width:140px}#gameIntro{position:absolute;inset:0;background:#0b101cd9;display:grid;place-items:center;padding:10%}#gameIntro>div{padding:24px;border:1px solid #e1c09266;border-radius:18px;background:#1a202b}#gameIntro h2{font:30px serif}#introText{white-space:pre-line;color:#ddd;font-size:14px}#gameIntro button{width:100%;margin-top:15px}#toast{position:absolute;top:27%;left:10%;right:10%;z-index:20;background:#121722e8;border:1px solid #e8c796;border-radius:12px;padding:16px;text-align:center}dialog{color:#fff4df;background:#151b27;border:1px solid #e4c69b;border-radius:18px;width:85%;max-height:80%;padding:24px}dialog::backdrop{background:#0009}dialog button{width:100%;margin-top:12px}#dialogBody{max-height:50dvh;overflow:auto;font-size:14px}#dialogBody p{border-bottom:1px solid #ffffff20;padding-bottom:8px}body[data-mode=landing] #toolbar,body[data-mode=landing] #stats,body[data-mode=game] #stats,body[data-mode=end] #stats{display:none}.immersive #toolbar{display:none}.immersive{--dock:0px!important}@media(max-height:700px){#stage{--dock:72px}#toolbar{padding:7px 4px}#toolbar i{width:32px;height:32px}#options{gap:7px}#options button{padding:8px 13px;font-size:14px}#ending{padding-top:10%}#endText{font-size:13px}.gameTop{top:20px}.gameTop h2{font-size:22px}}
#landing{background:linear-gradient(#080b1655,transparent 42%,#080b16ed 66%,#080b16 80%)}

/* Cover art and action placement follow Figma 18:2222, 393 × 852. */
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
body[data-mode=landing] header{display:none}
body[data-mode=landing] .shade{background:linear-gradient(180deg,transparent 54%,rgba(13,15,28,.5) 100%)}
body[data-mode=landing] #still{object-fit:fill}
#landing{padding:0;background:none}
#landing .boot{top:75.82%;bottom:auto;left:15.78%;right:15.52%;gap:12px}
#landing #start{height:clamp(42px,5.4dvh,58px);padding:0;border:0;border-radius:12px;background:transparent url('assets/ui/cover-button.svg') center/100% 100% no-repeat;font-size:16px;font-weight:500}
#landing #resume{border:0;background:none;padding:0;text-decoration:underline;font-size:12px}
#landing small{bottom:auto;top:87.4%;left:10.7%;right:10.7%;font-size:10px;line-height:16px}
body[data-mode=landing] #stage{width:min(100vw,46.1268dvh)}

/* Fade the frozen video's burned-in subtitle below the choice area. */
body[data-node="settlementChoice"] #still{-webkit-mask-image:linear-gradient(to bottom,#000 52%,transparent 72%);mask-image:linear-gradient(to bottom,#000 52%,transparent 72%)}
/* Rebuilt chapters stay inside the inherited portrait player. */
body[data-node=chase] #gameControls{justify-content:space-between}
body[data-node=chase] #gameControls button,body[data-node=rescue2] #gameControls button{width:62px;height:62px;border-radius:50%;padding:0;font-size:26px;background:#122432dd}
body[data-node=searchPhone] #gameBottom{pointer-events:none}
body[data-node=fingerprint] #gameBottom{bottom:8px}
body[data-mode=game] .gameTop{right:22%;top:18px}
body[data-mode=game] .gameTop h2{font-size:clamp(17px,2.5dvh,26px)}
body[data-mode=game] #gameScore{font-size:clamp(13px,2dvh,18px)}
#gameControls #rbConfirm{color:#fff2db;background:#253c46;min-width:180px}
body[data-node=searchPhone] #gameGoal{font-size:11px}

/* Readable counters across the rebuilt mini-games. */
body[data-mode=game] #gameScore{font-family:game,sans-serif;font-weight:600;line-height:1.5}
/* Chase-only layout; keep the shared drama shell intact. */
.chase-refined .gameTop{top:22px!important;left:6%!important;right:22%!important;pointer-events:none}
.chase-refined #gameTag{font-size:10px;letter-spacing:3px;color:#d9b986}
.chase-refined #gameTitle{font-size:clamp(20px,3.1vh,30px);margin:9px 0}
.chase-refined #gameGoal{font-size:11px;opacity:.75}
.chase-refined #gameScore{display:flex;align-items:baseline;gap:4px;font-size:12px;font-weight:500}
.chase-refined #gameScore b{font-size:27px;font-variant-numeric:tabular-nums}
.chase-refined #gameScore small{font-size:10px;opacity:.7}
.chase-refined #gameScore span{margin-left:auto;font-size:11px;white-space:nowrap}
.chase-refined #gameScore i{margin:0 4px;font-style:normal;opacity:.4}
.chase-refined #gameFeedback{font-size:12px;background:#101b22bc;border:1px solid #d9b98635;border-radius:8px;padding:10px 8px;text-align:center}
.chase-refined #gameControls{display:flex;justify-content:space-between;align-items:center;min-height:68px}
.chase-touch-hint{display:flex;align-items:center;gap:9px;color:#fff9;font-size:10px;text-shadow:0 1px 4px #000}
.chase-refined #chaseBrake{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;margin-left:auto;width:66px;height:66px;min-height:0;padding:5px;border-radius:50%;background:#111d26bd;border:1.5px solid #e3c99e;color:#f6e3c3;touch-action:none;box-shadow:0 4px 20px #0004}
.chase-refined #chaseBrake small{font-size:9px;letter-spacing:2px}
.chase-refined #chaseBrake.held{background:#d3b17d;color:#17232c;transform:scale(.94)}
/* Machined brake control: large touch target, inset face, amber pressure response. */
.chase-refined #chaseBrake{position:relative;width:78px;height:86px;border:0;border-radius:0;padding:0;gap:5px;background:transparent;box-shadow:none;overflow:visible;color:#eef2f1;transition:transform .12s ease}
.chase-refined #chaseBrake .brake-face{position:relative;display:grid;place-items:center;box-sizing:border-box;width:68px;height:68px;border-radius:50%;border:1px solid #abb6b8b0;background:radial-gradient(ellipse at 30% 15%,#5b676ed9 0%,#28343bee 44%,#111d26f5 78%);box-shadow:0 5px 14px #0006,inset 0 1px 2px #fff5,inset 0 -3px 6px #0008;transition:background .12s,box-shadow .12s}
.chase-refined #chaseBrake .brake-face:before{content:'';position:absolute;inset:5px;border:1px solid #b9c5c323;border-radius:50%;pointer-events:none}
.chase-refined #chaseBrake svg{filter:drop-shadow(0 1px 2px #0008)}
.chase-refined #chaseBrake small{font-size:10px;letter-spacing:1px;font-weight:500;color:#e6ddd0;text-shadow:0 2px 4px #000}
.chase-refined #chaseBrake.held{background:transparent;color:#ffe2a7;transform:translateY(2px)}
.chase-refined #chaseBrake.held .brake-face{border-color:#eebd77;background:radial-gradient(ellipse at 40% 25%,#695438,#2c2926 70%);box-shadow:0 0 17px #ffbc5440,inset 0 2px 8px #000b,inset 0 0 0 2px #e7b36840}
body[data-node=chase] #gameControls #chaseBrake{width:78px;height:89px;border-radius:0;background:transparent;flex:0 0 78px;padding:0}
body[data-node=chase] #chaseBrake .brake-face{flex:0 0 68px;min-height:68px;aspect-ratio:1}
.chase-refined #gameBottom,.chase-refined #gameControls,.chase-refined #gameFeedback{pointer-events:none}
.chase-refined #gameControls #chaseBrake{pointer-events:auto}
.chase-refined #chaseBrake svg,.chase-refined #chaseBrake small,.chase-refined #chaseBrake .brake-face{pointer-events:none}
