:root{color-scheme:dark;--ink:#101820;--paper:#ebe2cf;--muted:#999f9e;--gold:#cbb17b;--red:#b74743}*{box-sizing:border-box}body{margin:0;background:var(--ink);color:var(--paper);font:15px/1.8 'Noto Serif JP',Georgia,serif}button,input{font:inherit}button,a{-webkit-tap-highlight-color:transparent}button{cursor:pointer;color:inherit;border:1px solid #ffffff26;background:#ffffff06;padding:10px 20px;transition:background .2s}button:hover{background:#ffffff14}button:focus-visible,a:focus-visible{outline:2px solid var(--gold);outline-offset:4px}button:disabled{opacity:.5;cursor:not-allowed}header{height:86px;border-bottom:1px solid #ffffff12;display:flex;justify-content:space-between;align-items:center;padding:0 6vw}.brand{text-decoration:none;color:var(--paper);font-size:31px;letter-spacing:.16em;font-weight:800;display:flex;align-items:center;gap:22px}.brand span{font-size:12px;font-weight:400;letter-spacing:.23em;border-left:1px solid #ffffff30;padding-left:22px}nav{display:flex;gap:15px}nav button{font-size:12px;border:0}nav button:last-child{border:1px solid #cbb17b70;color:var(--gold)}main{max-width:1800px;margin:auto}.hero{height:min(680px,72vw);min-height:510px;position:relative;background:#18222d url('/assets/keyart.webp') center/cover;overflow:hidden}.heroShade{position:absolute;inset:0;background:linear-gradient(90deg,#0d1722f0 0%,#0d1722a0 36%,transparent 73%),linear-gradient(0deg,#101820,transparent 30%)}.heroCopy{position:absolute;left:8%;top:12%;z-index:1}.eyebrow{font:11px/1.6 Arial,sans-serif;letter-spacing:.28em;color:var(--gold);margin:0 0 20px}h1{font-size:clamp(40px,4.4vw,71px);font-weight:600;letter-spacing:.13em;line-height:1.45;margin:0 0 22px}h1 em{font-style:normal;color:#dfc99e}.intro{color:#c5c8c7;letter-spacing:.12em;font-size:14px;margin-bottom:28px}.primary{background:var(--gold);color:#172027;border:1px solid var(--gold);font-weight:600;letter-spacing:.12em;padding:13px 30px}.primary:hover{background:#e3cea2}.primary span{margin-left:40px}.subtle{font-size:11px;color:var(--muted);line-height:1.9}.heroCaption{position:absolute;right:7%;bottom:13%;writing-mode:vertical-rl;letter-spacing:.25em;font-size:21px;text-shadow:0 2px 12px #000}.heroCaption small{font-size:10px;margin:18px 12px}.journeyHead{display:flex;justify-content:space-between;align-items:end;margin:30px 8% 28px}.journeyHead .eyebrow{margin:0 0 8px}h2{font-size:27px;font-weight:600;letter-spacing:.12em;margin:0 0 18px}.journeyHead h2{margin:0}.journeyHead>p{font-size:12px;color:var(--muted)}.stages{margin:0 8% 40px;display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.stage{text-align:left;min-height:175px;padding:24px;position:relative;overflow:hidden;background:linear-gradient(130deg,#28333b,#17232c);border-color:#ffffff1a}.stage:before{content:'山';font-size:135px;position:absolute;right:-5px;top:-38px;opacity:.035}.stage small{display:block;letter-spacing:.18em;color:var(--gold);font:10px Arial}.stage h3{margin:12px 0 6px;font-size:20px;letter-spacing:.1em}.stage p{color:#a3a9a8;font-size:11px;margin:0}.stage .stageState{position:absolute;right:20px;top:20px;font-size:11px;color:var(--gold)}.stage.locked{opacity:.55}.stage.clear{border-color:#cbb17b55}footer{border-top:1px solid #ffffff16;padding:25px 8% 35px;display:flex;justify-content:space-between;align-items:center}footer p{letter-spacing:.14em;font-size:12px}footer span{font-size:10px;color:var(--muted)}[hidden]{display:none!important}#play{padding:16px 4% 30px}.playTop{display:flex;justify-content:space-between;align-items:center;margin-bottom:13px}.playTop button{font-size:11px}.playTop span{letter-spacing:.12em;color:var(--gold)}.gameWrap{position:relative;max-width:1280px;margin:auto;border:1px solid #cbb17b40;background:#141f2b}canvas{width:100%;display:block;aspect-ratio:16/9;outline:0;touch-action:none}.gameMessage{position:absolute;inset:0;background:#0c1621cb;backdrop-filter:blur(5px);display:grid;place-items:center;text-align:center}.gameMessage>div{padding:20px;max-width:640px}.gameMessage h2{font-size:38px}.gameMessage p{white-space:pre-line;color:#c2c8c7}.gameMessage button{margin:6px}.controls{text-align:center;font:11px/1.8 Arial,sans-serif;color:#9aa6a9}.touch{display:flex;justify-content:space-between;gap:10px;margin:14px auto 0;max-width:1280px;user-select:none}.touch>div{display:flex;gap:7px}.touch button{touch-action:none;min-height:52px;min-width:56px;font-size:12px}.touch .jump{border-color:#cbb17b80;color:var(--gold)}.status{text-align:center;font-size:11px;color:var(--gold);min-height:20px}dialog{background:#19232d;color:var(--paper);border:1px solid #cbb17b60;width:min(520px,94vw);padding:40px;box-shadow:0 30px 100px #0009}dialog::backdrop{background:#070e17cc;backdrop-filter:blur(6px)}dialog .close{position:absolute;top:8px;right:10px;padding:0 10px;border:0;font-size:25px}.tabs{display:flex;margin:20px 0 25px;border-bottom:1px solid #ffffff26}.tabs button{flex:1;border:0;font-size:12px}.tabs .active{border-bottom:2px solid var(--gold);color:var(--gold)}label{display:block;font-size:13px;margin:16px 0}label span{font-size:10px;color:var(--muted);margin-left:5px}input{display:block;width:100%;background:#101922;border:1px solid #ffffff30;padding:11px;color:var(--paper);margin-top:7px;border-radius:0}label small{font-size:10px;color:var(--muted)}form .primary{width:100%}.error{font-size:12px;color:#f1a29b;min-height:20px}#helpDialog{width:min(790px,94vw)}.helpGrid{display:grid;grid-template-columns:1fr 1fr;gap:22px}.helpGrid b{color:var(--gold);font-weight:400}.helpGrid p{font-size:12px;color:#b4bdc0}#profile p{overflow-wrap:anywhere}@media(max-width:700px){header{height:69px;padding:0 5%}.brand{font-size:26px;gap:10px}.brand span{font-size:9px;padding-left:10px}nav{gap:0}nav button{padding:7px 9px;font-size:10px}.hero{min-height:560px;background-position:61% center}.heroShade{background:linear-gradient(90deg,#0d1722e0,#0d172255),linear-gradient(0deg,#101820,transparent 35%)}.heroCopy{left:7%;top:10%}h1{font-size:42px}.heroCaption{right:4%;bottom:8%;font-size:14px}.intro{font-size:12px}.journeyHead{margin:25px 6%}.journeyHead>p{display:none}.stages{grid-template-columns:1fr 1fr;margin:0 6% 25px;gap:10px}.stage{padding:17px;min-height:155px}.stage h3{font-size:16px}.stage p{font-size:10px}.stage .stageState{top:15px;right:12px;font-size:10px}footer{display:block}footer p{margin:0}#play{padding:10px 0}.playTop{padding:0 8px}.playTop span{font-size:12px}.playTop button{padding:6px 8px}.touch{padding:0 6px;gap:4px}.touch>div{gap:4px}.touch button{padding:7px;min-width:39px;font-size:10px;min-height:56px}.controls{padding:0 15px;font-size:10px}.gameMessage h2{font-size:25px}.gameMessage p{font-size:11px}.gameMessage .eyebrow{margin-bottom:8px}.gameMessage button{padding:6px 10px;font-size:11px}dialog{padding:30px 22px}.helpGrid{grid-template-columns:1fr;gap:4px}h2{font-size:23px}}@media(orientation:landscape) and (max-height:600px){body.playing header{display:none}body.playing #play{padding:0}body.playing .playTop{position:absolute;top:0;right:0;z-index:2;opacity:.5}body.playing .playTop span{display:none}body.playing .gameWrap{max-height:100dvh;border:0;width:calc(100dvh * 16 / 9);max-width:100vw}body.playing canvas{max-height:100dvh}body.playing .touch{position:fixed;bottom:8px;left:0;right:0;z-index:2;opacity:.6;margin:0;pointer-events:none}body.playing .touch button{pointer-events:auto;background:#111c29b0}body.playing .controls,body.playing .status{display:none}}

/* Opening title screen */
body.opening{overflow:hidden}body.opening>header,body.opening>main{display:none}.openingScreen{min-height:100svh;min-height:100dvh;position:relative;display:flex;align-items:center;isolation:isolate;background:#0e1722;overflow:hidden}.openingArt{position:absolute;inset:0;z-index:-2;background:url('/assets/keyart.webp') 65% center/cover no-repeat}.openingVeil{position:absolute;inset:0;z-index:-1;background:linear-gradient(90deg,#0a1423ed 0%,#0d1726a8 38%,#111b290f 76%),linear-gradient(0deg,#0b1424bf,transparent 30%)}.openingContent{padding:60px 8vw;position:relative;max-width:730px}.openingContent .eyebrow{margin-bottom:34px}.openingOverline{letter-spacing:.55em;font-size:14px;color:#dbc89e;margin:0 0 6px 6px}.openingContent #openingTitle{font-size:clamp(100px,15vw,190px);line-height:1.2;letter-spacing:.14em;margin:0;color:#eee2c9;font-weight:800;text-shadow:0 5px 25px #040c1bcc}.openingSubtitle{font-size:23px;letter-spacing:.65em;color:#d6bd88;margin:8px 0 22px 8px}.openingRule{height:1px;background:linear-gradient(90deg,#b99b62,transparent);width:270px;margin:24px 0}.openingStory{font-size:13px;letter-spacing:.18em;color:#c0c4c4;margin:22px 0 30px}.openingContent .primary{min-width:230px}.openingFoot{position:absolute;bottom:max(22px,env(safe-area-inset-bottom));left:8vw;font-size:11px;letter-spacing:.2em;color:#a8adb0}.openingScreen:before{content:'';position:absolute;inset:22px;border:1px solid #d0b47825;pointer-events:none}@media(max-width:700px){.openingScreen{align-items:flex-end}.openingArt{background-position:67% center}.openingVeil{background:linear-gradient(0deg,#081321fa 0%,#0d182bc4 30%,#0d172638 68%,#0d172640)}.openingContent{width:100%;padding:28px 9vw 112px}.openingContent .eyebrow{margin-bottom:18px;font-size:9px}.openingContent #openingTitle{font-size:105px}.openingOverline{font-size:11px}.openingSubtitle{font-size:17px}.openingRule{margin:17px 0}.openingStory{font-size:11px;margin:17px 0 23px}.openingContent .primary{width:100%}.openingFoot{left:9vw;bottom:max(34px,env(safe-area-inset-bottom));font-size:9px}.openingScreen:before{inset:13px}}@media(orientation:landscape) and (max-height:600px){.openingScreen{align-items:center}.openingContent{padding:25px 9vw 55px}.openingContent .eyebrow{margin-bottom:12px}.openingContent #openingTitle{font-size:84px}.openingSubtitle{font-size:15px;margin:0 0 10px}.openingRule{margin:10px 0}.openingStory{margin:10px 0 15px}.openingOverline{font-size:11px}.openingContent .primary{padding:8px 25px;width:auto}.openingFoot{bottom:15px}}

/* Mobile controls: suppress iOS selection/callouts and support simultaneous fingers. */
#play,#play *,canvas,.touch,.touch *{-webkit-user-select:none!important;user-select:none!important;-webkit-touch-callout:none!important}.touch,.touch *,#walkMode{touch-action:none;-webkit-tap-highlight-color:transparent}.mobileControlBar{max-width:1280px;margin:14px auto 10px;display:flex;align-items:center;gap:12px;padding:0 10px}.mobileControlBar button{min-height:44px;min-width:128px;font-size:13px;border-color:#cbb17b99}.mobileControlBar button.enabled{background:#cbb17b;color:#15202b}.mobileControlBar span,.touchHint{font-size:10px;color:#a8b1b4}.touch{padding:0 10px;gap:30px;align-items:stretch;margin-top:0}.touch>div{display:grid;grid-template-columns:repeat(2,minmax(64px,94px));gap:10px}.touch button{border-radius:14px;border:1px solid #87949c66;min-height:64px;min-width:0;padding:10px 12px;background:linear-gradient(#2c3b49,#1c2a36);font-size:14px;box-shadow:0 3px 0 #070f18;transition:none}.touch button.held{background:#bda36a;color:#101b26;box-shadow:inset 0 3px 7px #0004;transform:translateY(2px)}.directionPad [data-key=left],.directionPad [data-key=right]{font-size:27px;min-height:76px}.touch .crouch,.touch .jump{grid-column:1 / -1;min-height:58px}.touch .jump{border-color:#cbb17b;color:#e8cf96;background:linear-gradient(#514c3d,#33382f)}.touch .jump.held{background:#dac38e;color:#18212c}.touch .attack{border-color:#be6b62;background:linear-gradient(#603d43,#392c36)}.touch button span{display:block;font-size:9px;opacity:.7;margin-top:1px}.touchHint{text-align:center;margin:14px 8px 5px}@media(max-width:700px){.touch{gap:20px;padding:0 14px}.touch>div{width:calc((100% - 20px)/2);grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.touch button{font-size:14px;padding:8px 5px;min-height:66px}.touch .crouch{font-size:11px}.mobileControlBar{margin:14px 0 12px;padding:0 14px}.controls{display:none}.touchHint{font-size:10px;line-height:1.7}.touch .jump{font-size:15px;min-height:59px}}@media(orientation:landscape) and (max-height:600px){body.playing .mobileControlBar{position:fixed;bottom:156px;left:12px;z-index:4;margin:0;padding:0}body.playing .mobileControlBar span,body.playing .touchHint{display:none}body.playing .mobileControlBar button{min-height:35px;min-width:110px;padding:3px 10px;font-size:11px;background:#182635d9}body.playing .touch{padding:0 15px;opacity:.86;bottom:max(12px,env(safe-area-inset-bottom))}body.playing .touch>div{width:160px;grid-template-columns:repeat(2,1fr);gap:8px}body.playing .touch button{min-height:57px;background:#192a3bdf}body.playing .touch .crouch,body.playing .touch .jump{min-height:48px}body.playing .touch button.held{background:#cbb17b}}

.audioSettings{display:flex;align-items:center;justify-content:flex-end;gap:14px;margin:0 auto 8px;max-width:1280px;padding:0 12px;font-size:11px}.audioSettings button{padding:5px 12px;font-size:11px;min-height:36px}.audioSettings label{display:flex;align-items:center;gap:8px;margin:0;font-size:10px;color:#b8bcb9}.audioSettings input{width:100px;padding:0;margin:0;accent-color:#cbb17b;touch-action:auto}#storyDialog{width:min(780px,95vw);padding:32px;max-height:90dvh;overflow:auto}#storyDialog .eyebrow{margin-bottom:15px}.storyScene{display:flex;gap:22px;align-items:center;min-height:200px}.storyScene canvas{width:140px;height:175px;object-fit:contain;flex-shrink:0;aspect-ratio:auto}.storyScene h2{font-size:24px;color:#d5c096;margin-bottom:15px}.storyScene p{font-size:15px;line-height:2.1;min-height:92px}.storyButtons{display:flex;align-items:center;gap:10px;justify-content:flex-end;margin-top:18px}.storyButtons span{margin-right:auto;font-size:11px;color:#a5afae}.storyButtons button{font-size:12px;padding:10px 16px}@media(max-width:700px){#storyDialog{padding:24px 20px}.storyScene{gap:10px;align-items:flex-start}.storyScene canvas{width:90px;height:130px}.storyScene h2{font-size:20px}.storyScene p{font-size:13px;line-height:1.95}.storyButtons{gap:7px}.storyButtons button{padding:10px 11px;font-size:11px}.audioSettings{margin-top:5px}}@media(orientation:landscape) and (max-height:600px){body.playing .audioSettings{position:fixed;top:8px;left:9px;z-index:4;opacity:.65}body.playing .audioSettings label{display:none}.storyScene{min-height:120px}.storyScene canvas{height:120px;width:100px}.storyScene p{min-height:60px}#storyDialog{padding:18px 26px}}
/* Portraits use isolated transparent images, fit fully inside the dialogue. */
.storyScene canvas{width:150px;height:205px;aspect-ratio:17/23;align-self:center;object-fit:contain}.storyScene>div{min-width:0}.storyScene p{overflow-wrap:anywhere}@media(max-width:700px){.storyScene canvas{width:100px;height:145px}.storyScene{align-items:center;gap:14px}.storyScene p{min-height:110px}.storyButtons{flex-wrap:wrap}}@media(max-width:360px){.storyScene canvas{width:80px;height:125px}}

.openingArt{background-image:url('/assets/title-v3.webp')}.openingArt{background-position:72% center}.openingDescription{font-size:12px;color:#b7c2ca;margin:-12px 0 24px;letter-spacing:.07em}.openingGuide{display:inline-block;color:#d8c394;margin:14px 0 0 22px;font-size:12px;text-underline-offset:5px}nav a{color:#d8c394;text-decoration:none;padding:10px 12px;font-size:12px}footer a{color:#d8c394;margin-left:12px}@media(max-width:700px){.openingArt{background-position:78% center}.openingDescription{font-size:10px}.openingGuide{margin:15px 0 0}.openingContent{padding-bottom:95px}nav a{padding:7px 8px;font-size:10px}}

/* Direction lever, matching Edna's drag controls. */
.touch .directionPad{grid-template-columns:1fr;align-content:start}.moveStick{width:180px;height:180px;max-width:100%;position:relative;justify-self:center;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;border-radius:50%;border:2px solid #74818a;background:radial-gradient(circle,#111f2a 30%,#293b49 70%,#131f29);box-shadow:inset 0 4px 16px #0008,0 5px 0 #070f18;cursor:grab}.stickKnob{position:absolute;left:calc(50% - 28px);top:calc(50% - 28px);width:56px;height:56px;border-radius:50%;background:radial-gradient(circle at 35% 25%,#dfcb9a,#a98b53);border:2px solid #ead6a6;box-shadow:0 4px 10px #0009;pointer-events:none;will-change:transform}.moveStick>span:not(.stickKnob){position:absolute;font-size:11px;color:#c4c9c8;pointer-events:none}.stickUp{top:6px;left:0;width:100%;text-align:center}.stickDown{bottom:6px;left:0;width:100%;text-align:center}.stickLeft{left:10px;top:42%}.stickRight{right:10px;top:42%}.touch .directionPad .crouch{margin-top:8px}.touch .actionPad{align-content:center}@media(max-width:700px){.moveStick{width:min(180px,40vw);height:min(180px,40vw)}}@media(orientation:landscape) and (max-height:600px){body.playing .touch .directionPad{grid-template-columns:1fr}body.playing .moveStick{width:134px;height:134px}body.playing .directionPad .crouch{display:none}}

/* Mobile Safari: no game gestures, focus zoom, or off-screen controls. */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;touch-action:manipulation}body{overflow-x:hidden}body.playing{overscroll-behavior:none}#play{touch-action:none}#play button,#play input,.moveStick{touch-action:none}.moveStick{pointer-events:auto}input,select,textarea{font-size:16px!important}.phoneHud,.gameNotice{display:none}#play .touch>div{min-width:0}#play .touch{max-width:100%}
@media(max-width:700px){.phoneHud{display:block;font:600 15px/1.7 system-ui,sans-serif;padding:8px 12px;background:#1b2933;color:#f1e5cb;overflow-wrap:anywhere}.gameNotice{display:block;font:16px/1.65 system-ui,sans-serif;padding:10px 14px;margin:0;min-height:48px;color:#f1e4c7;background:#17232d}.playTop{flex-wrap:wrap;gap:8px}.playTop span{order:3;width:100%;font-size:16px;text-align:center;letter-spacing:.06em}.playTop button{font-size:15px;min-height:44px}.playTop #pauseBtn{margin-left:auto}.mobileControlBar{flex-wrap:wrap;gap:6px}.mobileControlBar button{font-size:16px}.mobileControlBar span,.touchHint{font-size:14px}.audioSettings button,.audioSettings label{font-size:15px}.audioSettings{gap:12px}.touch button,.touch .crouch{font-size:16px}.touch button span{font-size:12px}.moveStick>span:not(.stickKnob){font-size:14px}.gameMessage{position:fixed;z-index:30}.gameMessage h2{font-size:25px}.gameMessage p{font-size:16px}.gameMessage button{font-size:16px;min-height:46px}.storyScene p{font-size:16px}.storyButtons button{font-size:15px}.status{font-size:14px}.stage p,.subtle{font-size:14px}.stage small,.stage .stageState{font-size:12px}}
@media(orientation:landscape) and (max-height:600px){body.playing .moveStick{pointer-events:auto}body.playing .phoneHud,body.playing .gameNotice{display:none}}

#play{touch-action:pan-y}.touch,.touch *,#game{touch-action:none}
@media(max-width:700px){header{height:auto;min-height:70px;padding:12px 14px}.brand span{display:none}nav button,nav a.navGuide{font-size:14px;padding:8px}.touch button span{font-size:11px;white-space:nowrap}}
@media(orientation:landscape) and (max-height:600px){body.playing .phoneHud{display:block;position:fixed;top:46px;left:8px;z-index:5;padding:4px 9px;background:#10202cdd;color:#f1e5cb;font:600 14px/1.5 system-ui,sans-serif;pointer-events:none}body.playing .gameNotice{display:none}}

.touch .actionPad .jump{grid-column:auto;min-height:66px}.touch .burst{border-color:#819fa7;color:#d2ecee}.touch .actionPad{align-content:center}.touch .actionPad button{min-width:0;font-size:15px;padding-left:4px;padding-right:4px}.touch .actionPad .jump{font-size:16px}

/* Conversations remain anchored to the actors in the scene. */
.speechBubble{position:absolute;z-index:22;width:min(430px,calc(100% - 12px));max-height:calc(100% - 12px);padding:10px 14px;background:#fff4db;color:#252521;border:2px solid #ad9361;border-radius:14px;box-shadow:0 4px 18px #0006;display:flex;flex-direction:column;gap:5px;text-align:left;font:15px/1.5 system-ui,sans-serif;touch-action:pan-y}.speechBubble:after{content:'';position:absolute;bottom:-12px;left:var(--tail-left,50%);border:6px solid transparent;border-top-color:#ad9361}.speechBubble.narration:after{display:none}.speechBubble b{font-size:13px;color:#66512d}.speechBubble p{margin:0;overflow:auto;min-height:0}.speechButtons{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-shrink:0}.speechButtons span{margin-right:auto;font-size:11px;color:#6c6253}.speechButtons button{color:#342c20;background:#e6d4aa;border:1px solid #ab9160;border-radius:7px;padding:5px 12px;min-height:36px;font:14px/1.3 system-ui,sans-serif}.talkButton{position:absolute;right:12px;bottom:12px;z-index:9;background:#e4cc94;color:#20252a;border-radius:22px;min-height:44px;padding:6px 22px}.playOptions{max-width:1280px;margin:8px auto;display:flex;align-items:center;justify-content:space-between;gap:10px}.playOptions .audioSettings,.playOptions .mobileControlBar{margin:0}.playOptions .mobileControlBar span{display:none}
@media(max-width:900px),(pointer:coarse){
 body.playing{position:fixed;inset:0;overflow:hidden;height:var(--play-height,100dvh);overscroll-behavior:none}body.playing>header{display:none}body.playing main{height:100%;width:100%}body.playing #play{height:100%;width:100%;padding:max(5px,env(safe-area-inset-top)) 7px max(12px,env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:5px;overflow:hidden;touch-action:none}
 body.playing .playTop{flex:0 0 34px;display:flex;flex-wrap:nowrap;align-items:center;gap:5px;margin:0;min-height:34px}body.playing .playTop button{font:12px/1.2 system-ui,sans-serif;min-height:34px;padding:5px 8px;white-space:nowrap}body.playing .playTop span{order:0;width:auto;flex:1;min-width:0;font:12px/1.3 system-ui,sans-serif;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;letter-spacing:0}
 body.playing .phoneHud{position:static;display:block;flex:0 0 auto;min-height:28px;max-height:42px;padding:4px 7px;font:600 12px/1.4 system-ui,sans-serif;overflow:hidden;background:#1b2933}
 body.playing .gameWrap{flex:1 1 auto;width:100%;height:auto;min-height:80px;max-height:calc(100vw * 0.5625);max-width:none;display:flex;align-items:center;justify-content:center;overflow:hidden}body.playing #game{width:100%;height:100%;aspect-ratio:auto;object-fit:contain}
 body.playing .gameNotice{display:block;flex:0 0 35px;min-height:35px;max-height:35px;padding:2px 5px;margin:0;font:13px/1.3 system-ui,sans-serif;overflow:hidden;background:transparent}
 body.playing .playOptions{flex:0 0 32px;height:32px;width:100%;margin:0;gap:5px}body.playing .mobileControlBar{position:static;margin:0;padding:0;width:auto;flex:0 0 auto}body.playing .mobileControlBar button{font:12px/1.2 system-ui,sans-serif;min-width:0;min-height:30px;padding:3px 8px;white-space:nowrap}body.playing .mobileControlBar span{display:none}body.playing .audioSettings{margin:0;padding:0;display:flex;gap:5px;align-items:center;justify-content:flex-end;flex:1;min-width:0;height:32px}body.playing .audioSettings button{font:12px/1.2 system-ui,sans-serif;min-height:30px;padding:4px 7px;white-space:nowrap}body.playing .audioSettings label{display:flex;align-items:center;gap:3px;font:11px/1 system-ui,sans-serif;margin:0;white-space:nowrap}body.playing .audioSettings input{margin:0;width:70px;max-width:18vw;padding:0}
 body.playing .touch{position:static;flex:0 0 clamp(120px,calc(var(--play-height,100dvh) * .25),180px);height:clamp(120px,calc(var(--play-height,100dvh) * .25),180px);width:100%;max-width:none;margin: auto 0 0;padding:0 3px;display:flex;align-items:center;justify-content:space-between;gap:10px;opacity:1;background:none}body.playing .touch>div{width:auto;margin:0;gap:6px}body.playing .touch .directionPad{flex:0 0 43%;height:100%;display:flex;align-items:center;justify-content:center}body.playing .moveStick{position:relative;flex:none;width:min(40vw,calc(var(--play-height,100dvh) * .25),180px);height:min(40vw,calc(var(--play-height,100dvh) * .25),180px);aspect-ratio:1;border-width:2px;pointer-events:auto}body.playing .moveStick>span:not(.stickKnob){font:12px/1.2 system-ui,sans-serif}body.playing .stickKnob{width:32%;height:32%;left:34%;top:34%;border-width:2px}
 body.playing .touch .actionPad{flex:1;height:100%;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr;align-content:stretch;gap:7px}body.playing .touch .actionPad button{width:100%;height:100%;min-height:0!important;min-width:0;padding:4px;border-radius:13px;font:15px/1.2 system-ui,sans-serif}body.playing .touch .actionPad button span{display:none}body.playing .touch .crouch,body.playing .touchHint,body.playing .controls,body.playing .status{display:none}body.playing .touch .jump{grid-column:auto}body.playing .gameMessage{position:fixed;inset:0;z-index:30}
 .speechBubble{font-size:15px;padding:8px 11px;gap:3px}.speechButtons button{min-height:36px;padding:4px 10px}.talkButton{bottom:6px;right:6px;min-height:38px;padding:4px 16px}
}
@media(orientation:landscape) and (max-height:600px){
 body.playing #play{padding:0;gap:0;position:relative}body.playing .gameWrap{flex:none;position:absolute;inset:0;height:100%;max-height:none;width:100%;border:0}body.playing .playTop{position:absolute;top:max(3px,env(safe-area-inset-top));left:6px;right:6px;z-index:8;height:32px}body.playing .playTop span{background:#101820b0;padding:5px}body.playing .phoneHud{position:absolute;top:40px;left:8px;z-index:8;max-width:75%;min-height:0;padding:3px 6px;background:#101820bd;font-size:12px;pointer-events:none}body.playing .gameNotice{display:none}body.playing .playOptions{position:absolute;bottom:max(7px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);z-index:10;width:auto;max-width:45%;height:28px;gap:5px}body.playing .audioSettings label{display:none}body.playing .mobileControlBar button,body.playing .audioSettings button{font-size:11px;min-height:28px;padding:3px 6px;background:#182635df}body.playing .touch{position:absolute;bottom:max(10px,env(safe-area-inset-bottom));left:8px;right:8px;z-index:9;height:clamp(110px,33dvh,145px);width:auto;padding:0;margin:0;align-items:end;pointer-events:none}body.playing .touch .directionPad{flex:0 0 145px;pointer-events:auto}body.playing .moveStick{width:clamp(110px,33dvh,145px);height:clamp(110px,33dvh,145px);background:#1a2b39b0}body.playing .touch .actionPad{flex:0 0 180px;max-width:27vw;pointer-events:auto}body.playing .touch .actionPad button{background:#223541cc;font-size:14px}.speechBubble{max-width:390px;z-index:22}
}
#storyDialog.speechBubble{width:min(430px,calc(100% - 12px));max-height:calc(100% - 12px);padding:8px 12px;overflow:visible}
body.playing .playOptions .audioSettings{position:static!important;inset:auto!important;transform:none!important}
body.playing .gameWrap{margin:0 auto}
@media(max-width:900px),(pointer:coarse){body.playing .phoneHud{font-size:14px}body.playing .playTop span{font-size:13px}}
@media(orientation:landscape) and (max-height:600px){body.playing .touch{left:max(8px,env(safe-area-inset-left));right:max(8px,env(safe-area-inset-right))}body.playing .playTop{left:max(6px,env(safe-area-inset-left));right:max(6px,env(safe-area-inset-right))}}
/* Keep the thumb controls above Safari's floating bottom toolbar as well as the home indicator. */
@media(max-width:900px),(pointer:coarse){body.playing #play{padding-bottom:max(76px,calc(env(safe-area-inset-bottom) + 24px))}}
@media(orientation:portrait) and (max-height:570px){body.playing .gameNotice{display:none}}
@media(orientation:landscape) and (max-height:600px){body.playing #play{padding:0}body.playing .touch{bottom:max(48px,env(safe-area-inset-bottom))}body.playing .playOptions{bottom:max(48px,env(safe-area-inset-bottom))}}

.gameOverview{padding:36px 8%;border-top:1px solid #ffffff20}.gameOverview h2{font-size:24px}.gameOverview p{max-width:900px;color:#b9c4c9}.gameOverview a{color:#d4b87e}
/* Route and combat labels stay off the playfield. Touch tracking is owned by the controls. */
.touch,.directionPad,.actionPad,.moveStick{touch-action:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}.moveStick *{pointer-events:none}.moveStick{overscroll-behavior:contain}.stickKnob{will-change:transform;transition:none!important}
@media(min-width:901px) and (min-height:601px){body.playing .phoneHud{display:block;max-width:1280px;margin:0 auto 8px;padding:8px 14px;background:#1b2933;font:600 16px/1.5 system-ui,sans-serif}}
.openingContent #openingTitle rt{font-size:clamp(13px,1.7vw,22px)}.openingSubtitle rt{font-size:10px}.hero h1 rt{font-size:13px}
@media(orientation:portrait) and (max-height:650px) and (max-width:700px){.openingContent{padding:0 8vw 28px!important}.openingContent .eyebrow,.openingOverline,.openingRule,.openingDescription,.openingFoot{display:none}.openingContent #openingTitle{font-size:74px!important;line-height:1.2}.openingSubtitle{font-size:15px;margin:4px 0 12px}.openingStory{margin:12px 0;font-size:11px}.openingContent .primary{padding:10px 16px}.openingGuide{margin-top:12px}html[data-language=en] .openingContent #openingTitle,html[data-language=es] .openingContent #openingTitle{font-size:46px!important}}
/* New purpose-made title and journey artwork, with portrait compositions on phones. */
.openingArt{background-image:url('/assets/title-v4.webp');background-position:center center}.openingVeil{background:linear-gradient(90deg,#091323cf 0%,#09132366 42%,transparent 70%),linear-gradient(0deg,#09132388,transparent 25%)}.hero{background-image:url('/assets/home-v4.webp');background-position:center center}.heroShade{background:linear-gradient(90deg,#0d1722e8 0%,#0d1722a0 32%,#0d172233 53%,transparent 72%),linear-gradient(0deg,#101820,transparent 25%)}.heroCopy{max-width:49%}.hero h1{font-size:clamp(40px,4.4vw,71px)}.heroCaption{display:none}
@media(max-width:700px){.openingArt{background-image:url('/assets/title-mobile-v4.webp');background-position:center top}.openingVeil{background:linear-gradient(0deg,#081321f2 0%,#0d182ba8 26%,#0d17261a 61%,transparent 100%)}.hero{background-image:url('/assets/home-mobile-v4.webp');background-position:center top;height:auto;min-height:720px}.heroShade{background:linear-gradient(0deg,#101820 0%,#101820de 27%,#10182026 60%,transparent 100%)}.heroCopy{position:relative;max-width:none;left:auto;top:auto;padding:340px 7% 36px;width:100%}.heroCopy .eyebrow{margin-bottom:12px}.hero h1{font-size:40px;line-height:1.35;margin-bottom:15px;letter-spacing:.1em}.hero .intro{font-size:14px;letter-spacing:.05em;line-height:1.8;margin-bottom:20px}.hero .subtle{font-size:13px;line-height:1.7}.hero .primary{min-height:48px;width:100%;padding:11px 16px;font-size:16px}.hero .primary span{margin-left:15px}.hero h1 em{font-size:.8em;letter-spacing:.04em}html[data-language=hira] .hero h1 em{font-size:.68em}html[data-language=ruby] .heroCopy{padding-top:340px}.heroCopy .readingText{line-height:1.7}.heroCopy h1 .readingText{line-height:1.45}}
@media(orientation:landscape) and (max-height:600px){.openingArt{background-image:url('/assets/title-v4.webp');background-position:center center}.openingVeil{background:linear-gradient(90deg,#091323e0,#09132388 42%,transparent 76%)}.hero{background-image:url('/assets/home-v4.webp');min-height:540px}.heroCopy{position:absolute;max-width:49%;left:7%;top:10%;padding:0;width:auto}.hero h1{font-size:36px}.hero .intro{font-size:13px}}
body.playing .touch .actionPad button>.readingText,body.playing .mobileControlBar button>.readingText{display:inline!important;font:inherit!important;color:inherit!important;letter-spacing:inherit!important}
html[data-language=en] #openingTitle,html[data-language=es] #openingTitle{font-size:clamp(54px,16vw,100px);line-height:1.1;letter-spacing:.04em}html[data-language=hira] #openingTitle{font-size:clamp(64px,20vw,130px);letter-spacing:.05em}html[data-language=en] .openingSubtitle,html[data-language=es] .openingSubtitle{letter-spacing:.1em}html[data-language=en] .heroCaption,html[data-language=es] .heroCaption{writing-mode:horizontal-tb;max-width:70%;right:16px;bottom:18px;top:auto;font:12px/1.4 system-ui,sans-serif;letter-spacing:.05em}

/* Language choices remain reachable before and during play. */
.languageButton{position:fixed;right:max(12px,env(safe-area-inset-right));top:max(12px,env(safe-area-inset-top));z-index:40;min-width:68px;min-height:44px;padding:7px 12px;background:#182633ed;border:1px solid #bda772;border-radius:10px;font:16px/1.3 system-ui,sans-serif;color:#f0e4c9}body.playing>.languageButton{display:none}.playLanguageButton{flex:none!important;min-width:44px!important}#languageDialog{width:min(420px,calc(100vw - 28px));padding:25px;max-height:calc(100dvh - 40px);overflow:auto}#languageDialog h2{font:22px/1.5 system-ui,sans-serif}.languageChoices{display:grid;gap:10px}.languageChoices button{min-height:48px;text-align:left;font:18px/1.4 system-ui,sans-serif}.languageChoices button[aria-pressed=true]{border:2px solid #dac286;background:#50482d}.readingText ruby{ruby-align:center}.readingText rt{font-size:.55em;line-height:1.1;font-weight:400}.readingText{line-height:1.9}html[data-language=ruby] .speechBubble{line-height:1.9}html[data-language=ruby] .phoneHud{max-height:62px}html[data-language=ruby] .actionPad button{line-height:1.9}html[data-language=ruby] .playTop{min-height:42px}html[data-language=ruby] .gameNotice{line-height:1.85}html[data-language=en] .stage p,html[data-language=es] .stage p{line-height:1.6}.guideLanguageNote{font:14px/1.5 system-ui,sans-serif;color:#b7c5cb}html[data-language=ja] .guideLanguageNote,html[data-language=hira] .guideLanguageNote,html[data-language=ruby] .guideLanguageNote{display:none}@media(max-width:900px){.languageButton{top:7px;right:7px}.openingContent{padding-top:55px}body:not(.playing):not(.opening)>header{padding-top:58px}html[data-language=es] .speechBubble,html[data-language=en] .speechBubble{font-size:15px;overflow-wrap:anywhere}html[data-language=hira] .speechBubble{overflow-wrap:anywhere}html[data-language=ruby] .speechBubble p{overflow:auto}body.playing .phoneHud{overflow:auto;white-space:nowrap}body.playing .gameNotice{overflow:auto}body.playing .speechBubble{max-height:calc(100% - 8px)}html[data-language=ruby] body.playing .playTop span{line-height:2}html[data-language=ruby] body.playing .playTop{flex-basis:42px;height:42px}html[data-language=ruby] .speechButtons .readingText{line-height:1.6}}

/* Portrait play: full stage title, closer camera, controls next to the scene. */
@media(max-width:700px) and (orientation:portrait){
 body.playing #play{gap:4px;padding-top:max(4px,env(safe-area-inset-top));--control-size:clamp(112px,calc(var(--play-height,100dvh) * .17),136px)}
 body.playing .playTop{display:grid!important;grid-template-columns:minmax(0,1fr) auto auto;grid-template-rows:auto auto;gap:3px 5px;flex:0 0 auto!important;height:auto!important;min-height:0!important}
 body.playing #backBtn{grid-column:1;grid-row:1;justify-self:start}body.playing #playLanguageBtn{grid-column:2;grid-row:1}body.playing #pauseBtn{grid-column:3;grid-row:1}
 body.playing #stageName{grid-column:1 / -1;grid-row:2;display:block;width:100%;white-space:normal!important;overflow:visible!important;text-overflow:clip;overflow-wrap:anywhere;font:600 14px/1.4 system-ui,sans-serif;padding:2px 3px;min-height:24px;height:auto!important}
 body.playing #stageName .readingText{white-space:normal!important;line-height:inherit}
 html[data-language=ruby] body.playing #stageName{line-height:1.8}
 body.playing .phoneHud{font-size:13px;line-height:1.4;white-space:normal;min-height:26px;max-height:74px;padding:3px 7px;overflow:auto}
 body.playing .gameWrap{flex:0 1 auto;aspect-ratio:var(--scene-aspect,25 / 18);max-height:none;min-height:100px;height:auto;width:100%;margin:0 auto}
 body.playing .gameNotice{font-size:14px;line-height:1.3;flex:0 0 36px;min-height:36px;max-height:36px;padding:2px 4px}
 body.playing .touch{flex:0 0 var(--control-size);height:var(--control-size);margin:4px 0 0;gap:12px;padding:0 3px;align-items:stretch}
 body.playing .touch .directionPad{flex:0 0 40%;height:100%}
 body.playing .moveStick{width:min(35vw,var(--control-size));height:min(35vw,var(--control-size))}
 body.playing .touch .actionPad{gap:7px}
 body.playing .touch .actionPad button{font-size:16px;border-radius:12px;min-height:48px!important}
 body.playing .playOptions{flex:0 0 34px;height:34px}
 body.playing .mobileControlBar button,body.playing .audioSettings button{min-height:32px;font-size:13px}
}
@media(max-width:700px) and (orientation:portrait) and (max-height:640px){
 body.playing .gameNotice{display:none}body.playing .phoneHud{font-size:12px;min-height:24px;padding:2px 5px}
 body.playing #play{gap:3px}body.playing .touch{margin-top:3px}
}
