
@font-face{font-family:BertCJK;src:url("assets/bert-v18-cjk.woff") format("woff");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:BertCJK;src:url("assets/bert-v18-cjk-medium.woff") format("woff");font-weight:500;font-style:normal;font-display:swap}
@font-face{font-family:BertCJK;src:url("assets/bert-v18-cjk-semibold.woff") format("woff");font-weight:600;font-style:normal;font-display:swap}
@font-face{font-family:BertCJK;src:url("assets/bert-v18-cjk-bold.woff") format("woff");font-weight:700;font-style:normal;font-display:swap}
:root{color-scheme:dark;--cream:#fff0ca;--gold:#efc87b;--muted:#a0b8ae;--ink:#0b2429}*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:#081b20}body{color:var(--cream);font-family:system-ui,-apple-system,"Microsoft YaHei","PingFang SC","BertCJK",sans-serif;overflow:hidden;background:radial-gradient(ellipse at 55% 15%,#183a3c 0,#081b20 75%)}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer;color:inherit}button:focus-visible,a:focus-visible{outline:2px solid #ffe0a1;outline-offset:4px}[hidden]{display:none!important}#shell{height:100dvh;display:flex;flex-direction:column;max-width:1780px;margin:auto;padding:10px 22px}.topbar{height:52px;min-height:52px;display:flex;justify-content:space-between;align-items:center;gap:16px}.brand{text-decoration:none;display:flex;align-items:center;gap:11px;color:#efd394;white-space:nowrap}.brand-crest{font:italic 31px Georgia,"BertCJK",serif;color:#efc87b}.brand b{font-size:16px;letter-spacing:3px;font-weight:650}.brand-season{font-size:10px;letter-spacing:2px;color:#8dab9e;margin-left:10px}.top-actions{display:flex;gap:5px;flex-shrink:0}.top-actions button{border:1px solid transparent;background:transparent;padding:7px 10px;border-radius:7px;font-size:11px;color:#c0cfbb;transition:background .16s,border-color .16s}.top-actions button:hover{background:#24494770;border-color:#c5ddb72a}.top-actions button[aria-pressed=true]{color:#eff8f5;border-color:#adc8c455}#pause{border-color:#bed3b62b!important}#stage{position:relative;container-type:inline-size;flex-shrink:0;width:min(100%,calc((100dvh - 112px)*1.77778));aspect-ratio:16/9;margin:auto;overflow:hidden;border:1px solid #dae9b925;border-radius:15px;background:#173a3a;box-shadow:0 20px 70px #0008}canvas{width:100%;height:100%;display:block;touch-action:none}#hud{position:absolute;left:3%;right:3%;top:3%;display:flex;justify-content:space-between;gap:20px;pointer-events:none;text-shadow:0 2px 10px #001017,0 0 20px #0009;transition:opacity .2s}#stage.has-menu #hud,#stage.has-menu #meter,#stage.has-menu #touch,#stage.has-menu #interact,#stage.has-menu #portrait{visibility:hidden}.quest{max-width:67%}#chapter{font:clamp(8px,.82cqw,11px) ui-monospace,"BertCJK",monospace;letter-spacing:2.5px;color:#f2d08a;display:block;margin-bottom:6px}#name{font-size:clamp(12px,1.65cqw,22px);font-weight:650;letter-spacing:1px}#objective{font-size:clamp(9px,.96cqw,13px);color:#d1ddd0;margin:6px 0;line-height:1.6;max-width:650px}.readouts{display:flex;gap:7px;align-items:flex-start;font-size:clamp(8px,.86cqw,12px);font-variant-numeric:tabular-nums;white-space:nowrap}.readouts span{padding:6px 9px;border:1px solid #dae8c926;background:#0c2c30b8;border-radius:7px;backdrop-filter:blur(4px)}#toast{position:absolute;top:28%;left:50%;transform:translateX(-50%);max-width:75%;width:max-content;background:#0b2c30e8;border:1px solid #e9d3994a;box-shadow:0 8px 30px #0004;padding:9px 16px;border-radius:8px;color:#f5e9cd;font-size:clamp(10px,1.08cqw,15px);line-height:1.6;opacity:0;transition:opacity .18s;pointer-events:none}#interact{position:absolute;bottom:19%;left:50%;transform:translateX(-50%);max-width:65%;font-size:clamp(9px,1.02cqw,14px);padding:7px 13px;border-radius:8px;background:#0b242ae8;border:1px solid #f1d59080;pointer-events:none;display:none;white-space:nowrap;box-shadow:0 5px 18px #0004}#meter{position:absolute;bottom:5%;left:3%;width:clamp(70px,7.4cqw,104px);height:5px;background:#ffffff23;border-radius:5px}#meter i{display:block;height:100%;background:#b5e6da;border-radius:5px;box-shadow:0 0 10px #90ddcd44}#meter span{position:absolute;top:9px;font-size:9px;letter-spacing:2px;color:#c0d6c1}
#dialogue{position:absolute;top:16%;left:21%;width:58%;display:flex;align-items:center;gap:10px;padding:11px 15px;background:linear-gradient(110deg,#0c292fe9,#123a3beb);border:1px solid #e5d6a44f;border-radius:11px;box-shadow:0 7px 25px #0004;backdrop-filter:blur(6px);pointer-events:none}#dialogue .dialogue-mark{font:35px Georgia,"BertCJK",serif;color:#e6c785;line-height:1;margin-top:10px}#dialogue>div{flex:1;min-width:0}#speaker{display:block;font-size:clamp(11px,1.02cqw,15px);font-weight:600;letter-spacing:.06em;color:#efd394;margin-bottom:4px}#line{font-size:clamp(11px,1.2cqw,17px);line-height:1.65;margin:0;color:#f5eed9}#dialogue[data-speaker=duck] #speaker{color:#e2baff}#dialogue[data-speaker=snail] #speaker{color:#c7d69f}#dialogueNext{pointer-events:auto;align-self:stretch;border:0;background:#f0deb90c;padding:0 9px;border-radius:5px;font:26px Georgia,"BertCJK",serif;color:#e5d7b8}#dialogueNext:hover{background:#f0deb92b}#skipStory{position:absolute;bottom:5%;right:3%;border:1px solid #cfdda13d;background:#092429bd;border-radius:7px;padding:7px 11px;font-size:10px;color:#d7dec0;z-index:4}
#letter{position:absolute;z-index:6;left:50%;top:49%;transform:translate(-50%,-50%) rotate(-1deg);width:clamp(250px,36cqw,460px);max-height:86%;overflow:auto;color:#493d2d;background:linear-gradient(120deg,#f8edcd,#e4d5ae);padding:34px 34px 25px;border:1px solid #ffeac2;box-shadow:0 24px 70px #0008,0 0 0 7px #bd9e6333;border-radius:3px;font-size:clamp(11px,1.16cqw,16px)}#letter p{line-height:1.9;margin:15px 0}.letter-greeting{font:italic 32px Georgia,"BertCJK",serif!important;color:#725640}.letter-stamp{float:right;font:9px ui-monospace,"BertCJK",monospace;letter-spacing:2px;padding:13px 7px;border:2px dotted #a8785a;color:#96624a;transform:rotate(9deg)}.letter-route{font-size:11px;line-height:1.7;padding:13px 0;border-top:1px solid #93774b44;border-bottom:1px solid #93774b44;margin:22px 0}#letter small{display:block;font-size:10px;line-height:1.8;color:#7f7259}#closeletter{margin-top:23px;width:100%;padding:11px;border:1px solid #82654666;border-radius:5px;background:#b5915b2b;color:#58442f;font-size:12px}
#overlay{position:absolute;inset:0;display:grid;place-items:center;background:#03151a7d;backdrop-filter:blur(3px);z-index:5}#overlay.hidden{display:none}#overlay[data-panel=menu]{display:block;background:transparent;backdrop-filter:none}#overlay[data-panel=menu]::before{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(90deg,#051d25f7 0,#0a2730e8 25%,#103238bd 42%,#12333526 60%,transparent 77%)}.menu-panel{position:relative;z-index:1;width:44%;height:100%;padding:2.8% 0 2% 4.4%;display:flex;flex-direction:column;justify-content:center;overflow:auto;scrollbar-width:thin;scrollbar-color:#c6c69444 transparent}.eyebrow{font-size:clamp(8px,.73cqw,10px);letter-spacing:2.8px;color:#c2caaf;margin:0 0 10px}.menu-panel h1{font-family:system-ui,"Microsoft YaHei","BertCJK",sans-serif;font-weight:850;font-size:clamp(30px,4.9cqw,66px);line-height:1.1;letter-spacing:.07em;margin:0;color:#ffdb83;text-shadow:0 3px 0 #664b2733,0 8px 25px #0007}.season-title{display:flex;align-items:center;gap:10px;font-size:clamp(10px,1.24cqw,18px);letter-spacing:.38em;color:#e8d6a3;margin:13px 0 0}.season-title span{width:20px;height:1px;background:#d4b46c80}.tagline{font-size:clamp(14px,1.9cqw,25px);font-weight:500;color:#f7f0d5;margin:13px 0 0;letter-spacing:.1em}.intro{font-size:clamp(11px,1.03cqw,14px);color:#bbcdbb;line-height:1.85;margin:16px 0}.menu-intro{margin:8px 0 13px;font-size:clamp(10px,1.03cqw,14px);line-height:1.65}.chapter-heading{display:flex;align-items:center;justify-content:space-between;padding-right:2px;color:#d9dab8;margin-bottom:9px;font-size:clamp(9px,.91cqw,12px);letter-spacing:.12em}.chapter-heading small{color:#8fab9b;font-size:clamp(8px,.72cqw,10px);letter-spacing:0}#levels{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-bottom:14px}.level{position:relative;border:1px solid #c5dbb630;background:#102e32b5;text-align:left;padding:9px 11px;border-radius:8px;transition:background .16s,border-color .16s,transform .16s}.level:hover{background:#275049cf;border-color:#d9d7a873;transform:translateY(-1px)}.level.selected{border-color:#e8c577;background:linear-gradient(115deg,#435b428c,#1c4647ce);box-shadow:inset 3px 0 #e8c577}.level.selected::after{content:"↗";position:absolute;right:10px;top:8px;font-size:13px;color:#e8c577}.level span{font-size:clamp(7px,.7cqw,10px);letter-spacing:.04em;color:#b2c39f;display:block;margin-bottom:4px}.level b{font-size:clamp(10px,1.05cqw,14px);font-weight:600;display:block;color:#eee6c8}.level small{display:block;font-size:clamp(7px,.68cqw,10px);line-height:1.55;color:#98b5a5;margin-top:4px}.primary{width:100%;border:1px solid #f3dda1a3;background:linear-gradient(110deg,#e6c786,#f2d595);color:#213a35;font-weight:750;padding:12px 17px;border-radius:8px;letter-spacing:1px;display:flex;align-items:center;justify-content:center;gap:18px;box-shadow:0 6px 20px #0003;font-size:clamp(11px,1.08cqw,15px);transition:background .16s,transform .16s}.primary:hover{background:#ffe0a2;transform:translateY(-1px)}#start{justify-content:space-between}#start b{font-size:20px;font-weight:400}.text-button{border:0;background:transparent;color:#bdc8ad;align-self:center;font-size:clamp(8px,.84cqw,12px);padding:10px 0 4px;letter-spacing:.06em}.text-button:hover{color:#ffe1a0}.text-button span{margin-left:6px}.keys{font-size:clamp(7px,.72cqw,10px);color:#87a895;line-height:1.8;margin:9px 0 0}.version{font-size:clamp(7px,.65cqw,9px);letter-spacing:.15em;color:#729787;margin:4px 0 0}
.card{width:540px;max-width:84%;max-height:88%;overflow:auto;padding:27px 32px;background:linear-gradient(135deg,#123d3ce8,#0b252ded);border:1px solid #d2dcb24f;border-radius:14px;box-shadow:0 20px 60px #0006}.card .eyebrow{margin-bottom:15px}.card h2{font-size:clamp(18px,2.04cqw,28px);margin:8px 0 18px;font-weight:600;letter-spacing:.04em}.card p{font-size:clamp(11px,1.08cqw,15px);line-height:1.85;color:#d0dbbf}.card .intro{color:#a5bdb0}.control-guide{margin:15px 0 18px}.control-guide>div{display:flex;gap:17px;border-bottom:1px solid #c5dbb620;padding:10px 0}.control-guide dt{width:38%;flex-shrink:0;font-size:11px}.control-guide dd{margin:0;font-size:12px;line-height:1.7;color:#c6d4b9}.help-note{color:#93b3a1!important}.journal-entries{max-height:270px;overflow:auto;margin-bottom:20px;padding-right:10px}.journal-entries p{border-left:2px solid #c7b77677;padding:5px 0 5px 14px}.journal-entries b{color:#ead391;font-size:10px;letter-spacing:1.5px}.map-reverse{position:relative;height:85px;border:1px solid #b89a62;background:#e3d1a5;overflow:hidden;margin:18px 0;color:#665238}.map-reverse i{position:absolute;left:8%;top:55%;width:80%;height:1px;background:#8c664b;transform:rotate(-9deg)}.map-reverse i:nth-child(2){top:40%;transform:rotate(7deg)}.map-reverse i:nth-child(3){top:71%;transform:rotate(3deg)}.map-reverse i:nth-child(4){left:15%;top:30%;transform:rotate(-17deg)}.map-reverse i:nth-child(5){top:60%;transform:rotate(12deg)}.map-reverse i:nth-child(6){top:20%;transform:rotate(-2deg)}.map-reverse i:nth-child(7){top:51%;transform:rotate(20deg)}.map-reverse span{position:absolute;right:8%;top:35%;padding:4px;background:#e3d1a5;font:18px Georgia,"BertCJK",serif}.epilogue-speaker{font-size:10px!important;letter-spacing:2px;color:#e7c586!important;margin-bottom:4px}.epilogue-line{font-size:18px!important;color:#f7ebd0!important;min-height:65px}
#touch{position:absolute;inset:0;pointer-events:none;display:none;align-items:flex-end;justify-content:space-between;padding:3.2%;z-index:3}#touch>div{display:flex;gap:12px}#touch button{width:58px;height:58px;border:1px solid #e0eed289;background:#102f3bb0;backdrop-filter:blur(4px);border-radius:50%;font-size:28px;font-weight:500;pointer-events:auto;touch-action:none;user-select:none;box-shadow:inset 0 1px 1px #fff2,0 6px 14px #0003}#touch .action-controls button:last-child{width:66px;height:66px;background:#cfb371bf;color:#14333c;font-size:29px;border-color:#f6d79c}#touch button:active{background:#6b916eaa}#portrait{display:none}
#loader{position:absolute;inset:0;z-index:20;display:flex;flex-direction:column;align-items:center;justify-content:center;background:radial-gradient(ellipse at 50% 45%,#274846,#0b2429 70%);transition:opacity .3s}#loader.ready{opacity:0;pointer-events:none}.loader-crest{font:italic 70px Georgia,"BertCJK",serif;color:#e8c680;margin-bottom:12px;animation:loader-breathe 1.7s ease-in-out infinite}#loader strong{font-weight:500;font-size:18px;letter-spacing:3px;color:#edd9a9}#loader span{font-size:11px;color:#a7beb0;margin-top:13px;letter-spacing:1px}#loader i{height:2px;width:90px;background:#d5c09166;margin-top:24px;overflow:hidden;position:relative}#loader i::after{content:"";position:absolute;inset:0;background:#eed697;transform:translateX(-100%);animation:loader-line 1.5s ease-in-out infinite}footer{display:flex;justify-content:space-between;align-items:center;height:38px;min-height:38px;color:#789c8b;font-size:10px;letter-spacing:.3px;gap:15px}kbd{font:9px system-ui,"BertCJK";padding:2px 4px;border:1px solid #44675666;border-radius:4px;color:#c2ceae;margin:0 2px;white-space:nowrap}@keyframes loader-breathe{50%{transform:translateY(-4px);opacity:.68}}@keyframes loader-line{100%{transform:translateX(100%)}}body.reduced-motion *,body.reduced-motion *::before,body.reduced-motion *::after{animation:none!important;transition:none!important}#shell:fullscreen{padding:7px 12px;background:#081b20;max-width:none}#shell:fullscreen #stage{width:min(100%,calc((100dvh - 100px)*1.77778))}
@media(pointer:coarse){#touch{display:flex}#meter{left:45%;bottom:5%}.topbar{height:39px;min-height:39px}.brand-season{display:none}.brand b{font-size:13px;letter-spacing:2px}.brand-crest{font-size:25px}.top-actions{gap:1px}.top-actions button{padding:6px 7px;font-size:10px}footer{display:none}#shell{padding:3px 7px}#stage{width:min(100%,calc((100dvh - 48px)*1.77778));border-radius:9px}.menu-panel{padding-top:3%;padding-left:4%;width:46%}.menu-panel h1{font-size:5cqw}.menu-intro{margin:8px 0 11px}.tagline{margin-top:8px}.season-title{margin-top:8px}.chapter-heading{margin-bottom:6px}#levels{gap:5px;margin-bottom:9px}.level{padding:7px 8px}.primary{padding:9px 12px}.version{display:none}.card{padding:20px 26px}#dialogue{padding:8px 10px;left:17%;width:66%}#skipStory{bottom:auto;top:11%;right:3%}#toast{padding:7px 11px}}
@media(max-height:610px){.topbar{height:39px;min-height:39px}footer{height:27px;min-height:27px}#stage{width:min(100%,calc((100dvh - 86px)*1.77778))}.menu-panel{padding-top:3%;padding-bottom:2%;width:44%}.eyebrow{margin-bottom:6px}.menu-intro{margin:8px 0 12px}.season-title{margin-top:8px}.tagline{margin-top:9px}.keys{margin-top:5px}.version{display:none}.card{padding:18px 25px}.card h2{margin-bottom:12px}.card p{margin:10px 0}.control-guide>div{padding:7px 0}.journal-entries{max-height:190px}.primary{padding:9px 13px}.level{padding:7px 9px}#levels{gap:5px;margin-bottom:10px}#touch button{width:47px;height:47px}#touch .action-controls button:last-child{width:54px;height:54px}}
@media(orientation:portrait){#shell{padding:8px;overflow:auto;min-height:100dvh}.topbar{height:auto;min-height:58px;flex-wrap:wrap;gap:4px;padding:0 3px 7px}.brand-season{display:none}.top-actions{width:100%;justify-content:space-between}.top-actions button{padding:5px 7px;font-size:10px}#stage{width:100%;margin:0 auto;min-height:0;border-radius:10px}.menu-panel{width:51%;padding:3% 0 2% 3.4%;justify-content:flex-start}.menu-panel h1{font-size:5.3cqw;letter-spacing:.05em}.eyebrow{font-size:1.4cqw;letter-spacing:.12em;margin-bottom:4px}.season-title{font-size:2cqw;margin-top:5px;gap:6px}.season-title span{width:10px}.tagline{font-size:2.8cqw;margin-top:6px}.menu-intro{font-size:1.8cqw;line-height:1.65;margin:6px 0 8px}.chapter-heading{font-size:1.6cqw;margin-bottom:4px}.chapter-heading small{font-size:1.35cqw}#levels{gap:4px;margin-bottom:6px}.level{padding:4px 5px;border-radius:5px}.level span{font-size:1.25cqw;margin-bottom:2px}.level b{font-size:1.7cqw}.level small{font-size:1.15cqw;line-height:1.4;margin-top:2px}.level.selected::after{right:5px;top:4px;font-size:8px}.primary{font-size:1.9cqw;padding:6px 8px;border-radius:5px;letter-spacing:.02em}#start b{font-size:13px}.text-button{font-size:1.45cqw;padding:5px 0 2px}.keys{font-size:1.25cqw;margin-top:3px}.card{max-width:94%;max-height:94%;padding:14px}.card h2{font-size:16px;margin-bottom:10px}.card p{font-size:10px;line-height:1.65}.card .primary{font-size:11px}.control-guide{margin:7px 0}.control-guide>div{padding:6px 0}.control-guide dt{width:35%;font-size:9px}.control-guide dd{font-size:9px}.control-guide kbd{font-size:7px}.card .help-note{display:none}.journal-entries{max-height:110px}.epilogue-line{font-size:13px!important;min-height:35px}.map-reverse{height:46px;margin:9px 0}#hud{left:3%;right:3%;top:3%}.quest{max-width:65%}#chapter{font-size:6px;margin-bottom:3px;letter-spacing:1px}#name{font-size:9px}#objective{font-size:6px;margin:3px 0}.readouts{gap:3px;font-size:6px}.readouts span{padding:3px 4px;border-radius:4px}#dialogue{left:14%;width:72%;top:18%;padding:5px 7px;gap:5px;border-radius:6px}#dialogue .dialogue-mark{font-size:18px;margin-top:7px}#speaker{font-size:6px;margin-bottom:2px;letter-spacing:.5px}#line{font-size:8px;line-height:1.5}#dialogueNext{font-size:17px;padding:0 5px}#toast{top:35%;font-size:7px;padding:4px 7px;max-width:90%}#interact{bottom:21%;font-size:7px;padding:4px 7px;max-width:75%}#touch{padding:3%;gap:5px}#touch>div{gap:8px}#touch button{width:34px;height:34px;font-size:21px}#touch .action-controls button:last-child{width:39px;height:39px;font-size:22px}#meter{width:45px;height:3px;bottom:5%}#meter span{font-size:6px;top:5px;letter-spacing:.5px}#skipStory{font-size:7px;padding:4px 6px;top:12%}#portrait{display:block;position:absolute;bottom:2%;right:3%;font-size:6px;color:#c1d0b0;text-align:right;pointer-events:none;opacity:.9}#portrait small{display:block;font-size:5px;margin-top:2px}#letter{width:72%;padding:15px 18px;font-size:10px;max-height:92%}.letter-greeting{font-size:21px!important}.letter-stamp{font-size:6px;padding:7px 5px}.letter-route{font-size:7px;margin:10px 0;padding:7px 0}#letter p{margin:7px 0}#letter small{font-size:7px}#closeletter{margin-top:10px;font-size:8px;padding:6px}#loader strong{font-size:12px}.loader-crest{font-size:42px;margin-bottom:7px}#loader span{font-size:8px;margin-top:8px}footer{display:none}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto}.loader-crest,#loader i::after{animation:none}.level,.primary,#loader,#hud,#toast{transition:none}}

/* Reset block box alignment inherited from modal panels, keeping the hero visible. */
#overlay[data-panel="menu"]{place-items:normal;justify-items:normal;align-items:normal}
.menu-panel{position:absolute;left:0;top:0;margin:0}

/* V4: the character leads the interface, with warmer book-like Chinese type. */
.brand-portrait{width:39px;height:39px;flex:none;border-radius:50%;border:1px solid #dccf9d66;box-shadow:0 2px 12px #0004;animation:portrait-breath 5s ease-in-out infinite}
.brand b{font-family:"STKaiti","KaiTi","Kaiti SC","FandolKai","BertCJK",serif;font-size:19px;letter-spacing:2px;font-weight:600}
.brand-season{letter-spacing:1px}.top-actions{gap:3px}.top-actions button{padding:7px 9px}
.menu-panel{padding-top:2.4%;padding-bottom:2.4%;width:44%}
.menu-letter{font:italic clamp(14px,1.55cqw,22px) Georgia,"BertCJK",serif;letter-spacing:.04em;color:#e0d5b3;margin-bottom:10px}
.menu-panel h1{font-family:"STKaiti","KaiTi","Kaiti SC","FandolKai","Songti SC","BertCJK",serif;font-size:clamp(33px,5.25cqw,71px);font-weight:600;letter-spacing:.075em;line-height:1.08;color:#f7d48e;text-shadow:0 2px 0 #392a20aa,0 7px 24px #06141199;transform:rotate(-1deg);transform-origin:left center}
.season-title{font-family:"Songti SC","STSong","FandolSong","BertCJK",serif;letter-spacing:.24em;font-size:clamp(11px,1.4cqw,19px);margin-top:11px;color:#e9dab8}
.tagline{font-family:"STKaiti","KaiTi","Kaiti SC","FandolKai","BertCJK",serif;font-size:clamp(16px,2.02cqw,28px);letter-spacing:.04em;margin-top:12px;color:#f3edd9}
.menu-intro{font-size:clamp(11px,1.08cqw,15px);line-height:1.85;margin:12px 0 17px;color:#c4d0bd;letter-spacing:.03em}.menu-intro em{font-style:normal;color:#ead6aa}
.chapter-heading{letter-spacing:.05em}.route-button{padding:3px 0 3px 7px;border:0;background:transparent;font-size:clamp(8px,.75cqw,11px);color:#b8c7a5;letter-spacing:.02em}.route-button:hover{color:#efd392;text-decoration:underline;text-underline-offset:3px}
.level{background:#113236ac}.level b{letter-spacing:.03em}.level small{letter-spacing:0}.primary{letter-spacing:.05em;border-radius:7px}.keys{letter-spacing:0;color:#a0b6a2}
#dialogue{top:15.5%;left:20%;width:60%;padding:10px 14px;gap:12px;background:linear-gradient(100deg,#082b31f2,#173f40ed);border-color:#dbc88c79;box-shadow:0 8px 23px #0005}
#dialoguePortrait{width:45px;height:45px;flex-shrink:0;border-radius:50%;border:1px solid #ceb77c55}
#speaker{font-size:clamp(9px,.94cqw,13px);letter-spacing:.06em;margin-bottom:4px;color:#f4d593}
#line{font-size:clamp(12px,1.35cqw,19px);line-height:1.7;letter-spacing:.015em;color:#fff4df}
#dialogueNext{min-width:28px;background:#eadba40e}#toast{top:29.5%;font-size:clamp(10px,1.14cqw,16px)}
.loader-character{width:clamp(86px,13cqw,165px);position:relative;margin-bottom:20px;animation:bert-wait 3.2s ease-in-out infinite}.loader-character::after{content:"";position:absolute;left:17%;right:17%;bottom:-1px;height:8px;border-radius:50%;background:#0003;filter:blur(3px)}#bertLoading{width:100%;height:auto;display:block;position:relative;z-index:1}#loader strong{font-family:"STKaiti","KaiTi","Kaiti SC","FandolKai","BertCJK",serif;font-size:22px;letter-spacing:.08em;color:#ecd6a7}#loader span{font-size:12px;letter-spacing:.03em}
.season-roadmap{display:grid;gap:10px}.season-act{padding:12px;border:1px solid #c7dbb52a;border-radius:8px;background:#12373799}.season-act h3{color:#e8cc91;font-size:15px;margin:0 0 7px}.season-act p{margin:6px 0}.season-act small{color:#abc4b0;line-height:1.6}.season-planned{opacity:.72}
@keyframes portrait-breath{50%{transform:translateY(-1px) rotate(-2deg)}}@keyframes bert-wait{50%{transform:translateY(-5px) rotate(-1deg)}}
@media(pointer:coarse){.brand-portrait{width:30px;height:30px}.brand b{font-size:16px}.top-actions button{padding:6px 6px;font-size:10px}.top-actions{gap:1px}.menu-panel{padding-top:2%;padding-bottom:2%;width:45%}.menu-letter{font-size:1.65cqw;margin-bottom:6px}.menu-panel h1{font-size:5.3cqw}.tagline{margin-top:8px}.menu-intro{font-size:1.12cqw;margin:8px 0 11px;line-height:1.7}#dialogue{left:16%;width:68%;padding:8px 10px;gap:9px}#dialoguePortrait{width:35px;height:35px}#line{font-size:clamp(11px,1.55cqw,17px);line-height:1.6}#speaker{font-size:9px;margin-bottom:2px}#toast{top:32%;font-size:10px}.route-button{font-size:1cqw}}
@media(max-height:610px) and (orientation:landscape){.menu-panel{padding-top:2%;padding-bottom:1.5%}.menu-letter{margin-bottom:4px;font-size:1.5cqw}.menu-panel h1{font-size:4.8cqw}.season-title{margin-top:6px;font-size:1.3cqw}.tagline{margin-top:7px;font-size:1.9cqw}.menu-intro{margin:7px 0 10px;font-size:1cqw;line-height:1.7}.chapter-heading{margin-bottom:5px}.level{padding:6px 8px}.level span{margin-bottom:3px}.level small{margin-top:3px}.primary{padding:8px 12px}.text-button{padding-top:7px}.keys{margin-top:4px}.brand-portrait{width:30px;height:30px}.top-actions button{padding:5px 7px}}
@media(orientation:portrait){.brand-portrait{width:31px;height:31px}.brand b{font-size:18px}.top-actions{overflow-x:auto;justify-content:space-between;gap:2px}.top-actions button{flex-shrink:0;font-size:9px;padding:5px 5px}.menu-panel{width:52%;padding:2.8% 0 2% 3.4%}.menu-letter{font-size:2.45cqw;margin-bottom:4px}.menu-panel h1{font-size:6cqw;line-height:1.05;letter-spacing:.03em}.season-title{font-size:2.25cqw;margin-top:4px;letter-spacing:.17em}.tagline{font-size:3.05cqw;margin-top:5px;letter-spacing:.015em}.menu-intro{font-size:2.05cqw;line-height:1.6;margin:6px 0 7px;letter-spacing:0}.chapter-heading{font-size:1.75cqw;margin-bottom:3px}.route-button{font-size:1.5cqw;padding:1px 0 1px 3px}.level b{font-size:1.9cqw}.level small{font-size:1.25cqw}.level span{font-size:1.35cqw}.primary{font-size:2cqw;padding:6px 8px}.text-button{font-size:1.55cqw;padding-top:5px}.keys{font-size:1.3cqw;margin-top:3px}#dialogue{left:7%;width:86%;top:17%;padding:6px 8px;gap:7px}#dialoguePortrait{width:29px;height:29px}#line{font-size:10px;line-height:1.65}#speaker{font-size:8px;margin-bottom:1px}#dialogueNext{font-size:21px;min-width:23px;padding:0 5px}#toast{top:auto;bottom:31%;font-size:8px;padding:5px 8px;max-width:85%}.loader-character{width:90px;margin-bottom:10px}#loader strong{font-size:16px}#loader span{font-size:9px}.control-guide>div{padding:5px 0}.control-guide dd{line-height:1.5}.help-note{display:none}.season-act{padding:7px}.season-act h3{font-size:12px}.season-act p{font-size:9px}}

/* Portrait title pages use the phone's height. Gameplay uses a closer
 * 600-by-720 world viewport, with the same scale on both canvas axes. */
@media(pointer:coarse) and (orientation:landscape){#stage{width:min(100%,calc((100dvh - 48px)*1.77778))}.menu-panel{padding-top:1.8%;padding-bottom:1.5%}}
@media(orientation:portrait){#stage.has-menu{height:calc(100dvh - 95px);max-height:760px;aspect-ratio:auto;background:linear-gradient(#102e35ed,#173b39ba),var(--bert-forest-background,linear-gradient(145deg,#315d5c,#143b45)) center/cover}#stage.has-menu #game{position:absolute;left:0;bottom:0;width:100%;height:auto;aspect-ratio:16/9}#overlay[data-panel=menu]::before{background:linear-gradient(180deg,#09272feb 0,#123234e8 47%,#173b393b 76%,transparent 100%)}.menu-panel{width:100%;height:100%;padding:6% 7% 3%;justify-content:flex-start}.menu-letter{font-size:4.5cqw;margin-bottom:10px}.menu-panel h1{font-size:10.6cqw;line-height:1.15;letter-spacing:.08em}.season-title{font-size:4.15cqw;margin-top:9px;letter-spacing:.2em}.tagline{font-size:5.65cqw;margin-top:13px}.menu-intro{font-size:3.3cqw;line-height:1.8;margin:14px 0 18px}.chapter-heading{font-size:3.1cqw;margin-bottom:8px}.route-button{font-size:2.65cqw;padding:3px 0 3px 5px}#levels{gap:7px;margin-bottom:13px}.level{padding:8px 10px;border-radius:7px}.level span{font-size:2.35cqw;margin-bottom:4px}.level b{font-size:3.45cqw}.level small{font-size:2.35cqw;line-height:1.6;margin-top:4px}.level.selected::after{right:8px;top:7px;font-size:12px}.primary{font-size:3.45cqw;padding:11px 13px}.text-button{font-size:2.65cqw;padding-top:9px}.keys{font-size:2.05cqw;margin-top:9px}.card .primary{font-size:11px}#loader .loader-character{width:130px}#stage.has-panel #game{position:static}#shell:fullscreen #stage.has-menu{height:calc(100dvh - 95px);width:100%}}
@media(orientation:portrait) and (max-height:690px){.menu-panel{padding-top:4%}.menu-letter{margin-bottom:6px;font-size:3.8cqw}.menu-panel h1{font-size:9cqw}.season-title{margin-top:5px;font-size:3.6cqw}.tagline{margin-top:8px;font-size:5cqw}.menu-intro{margin:9px 0 12px;font-size:3.05cqw;line-height:1.7}.chapter-heading{margin-bottom:5px}.level{padding:6px 8px}.level small{font-size:2.1cqw;margin-top:3px}.level span{font-size:2.1cqw;margin-bottom:3px}.primary{padding:9px 11px}.keys{margin-top:5px}.text-button{padding-top:6px}}

.menu-secondary{display:flex;align-items:center;justify-content:space-between;gap:8px}.menu-secondary .text-button{align-self:auto}#voiceSamples{position:absolute;right:4%;top:9%;z-index:8;width:clamp(250px,34cqw,440px);max-height:80%;overflow:auto;padding:20px;background:linear-gradient(125deg,#193a3bf5,#102b35f5);border:1px solid #dac8947a;border-radius:12px;box-shadow:0 14px 45px #0007;backdrop-filter:blur(10px)}#voiceSamples h3,#voiceSamples h2{font-size:18px;letter-spacing:.06em;color:#f3d499;margin:0 0 10px}#voiceSamples p{font-size:12px;line-height:1.65;color:#bfd0bd;margin:8px 0}#voiceSamples button{font-size:11px;line-height:1.5;margin:4px 4px 4px 0;padding:8px 11px;border:1px solid #a7c5b849;border-radius:6px;background:#27524dab;color:#f0e1b9}#voiceSamples button:hover{background:#527153d9;border-color:#e0d49a}#voiceSamples .voice-person{padding:9px 0;border-bottom:1px solid #baceb721}#voiceSamples .voice-person:last-child{border:0}
@media(orientation:portrait){#voiceSamples{width:88%;right:6%;top:9%;max-height:76%;padding:15px}#voiceSamples h3,#voiceSamples h2{font-size:16px}#voiceSamples button{font-size:11px;padding:8px 10px}.menu-secondary .text-button{font-size:2.65cqw}}
@media(pointer:coarse) and (orientation:landscape) and (max-height:480px){.menu-panel{justify-content:flex-start;padding-top:3%;padding-bottom:2%}.menu-letter,.tagline{display:none}.season-title{font-size:10px;margin-top:5px}.menu-intro{font-size:10px;line-height:1.5;margin:8px 0 10px}.menu-secondary .text-button{font-size:8px}.keys{display:none}}
@media(orientation:portrait){#stage.has-panel{height:calc(100dvh - 95px);max-height:760px;aspect-ratio:auto;background:#11363a}#stage.has-panel #game{position:absolute;left:0;bottom:0;width:100%;height:auto;aspect-ratio:16/9}#stage.has-panel .card{max-height:91%;width:90%;max-width:90%;padding:22px}#stage.has-panel .card h2{font-size:22px;line-height:1.45}#stage.has-panel .card p{font-size:13px;line-height:1.8}#stage.has-panel .card .eyebrow{font-size:9px;line-height:1.5}#stage.has-panel .control-guide dd{font-size:11px;line-height:1.65}#stage.has-panel .control-guide dt{font-size:10px}#stage.has-panel .control-guide>div{padding:9px 0}#stage.has-panel .journal-entries{max-height:calc(100dvh - 290px)}#stage.has-panel .card .primary{font-size:13px;padding:12px}#stage.has-panel .epilogue-line{font-size:18px!important;min-height:50px}}

/* Final mobile sizing: readable overlays and finger-sized live controls. */
@media(pointer:coarse){#touch button{min-width:44px;min-height:44px}#touch .action-controls button:last-child{min-width:50px;min-height:50px}.top-actions button{min-width:44px;min-height:44px}#dialogueNext{min-width:44px;min-height:44px}#skipStory,#closeletter,#voiceSamples button,.primary,.text-button,.route-button{min-height:44px}#voiceSamples{overscroll-behavior:contain;-webkit-overflow-scrolling:touch}#voiceSamples button,#speaker,#line,#toast,#interact{font-size:12px}#chapter,.readouts,#meter span{font-size:10px}#objective{font-size:12px}#name{font-size:14px}}
@media(pointer:coarse) and (orientation:landscape) and (max-height:480px){.menu-intro{display:none}.menu-secondary .text-button{font-size:10px}.menu-panel{padding-top:3%;padding-bottom:2%}}
@media(orientation:portrait){
 #shell{height:100dvh;padding:8px;gap:8px}.topbar{min-height:83px;padding:0 3px;gap:7px;align-content:flex-start}.top-actions{gap:2px}.top-actions button{min-width:44px;min-height:44px;padding:6px 3px;font-size:10px}
 #stage:not(.has-menu):not(.has-panel){width:100%;height:auto;max-height:none;aspect-ratio:5/6;margin:0 auto}
 #stage:not(.has-menu):not(.has-panel) #game{position:static;width:100%;height:100%;aspect-ratio:5/6}
 #stage.has-menu,#stage.has-panel,#shell:fullscreen #stage.has-menu{height:calc(100dvh - 107px);max-height:760px}
 #stage.has-panel[data-viewport=portrait] #game{height:auto;aspect-ratio:5/6}
 #hud{top:3%;left:3%;right:3%;gap:8px;flex-wrap:wrap}.quest{max-width:100%;width:100%}#chapter{font-size:10px;letter-spacing:1px;margin-bottom:4px}#name{font-size:14px}#objective{font-size:12px;line-height:1.5;margin:4px 0;max-width:100%}.readouts{gap:5px;font-size:10px}.readouts span{padding:4px 6px}
 #dialogue{top:28%;left:4%;width:92%;padding:9px 10px;gap:8px}#dialoguePortrait{width:34px;height:34px}#speaker{font-size:12px;margin-bottom:3px}#line{font-size:13px;line-height:1.65}#dialogueNext{font-size:26px;min-width:44px;min-height:44px;padding:0 8px}
 #toast{top:auto;bottom:30%;font-size:12px;line-height:1.6;padding:8px 11px;max-width:92%}#interact{bottom:20%;font-size:12px;padding:7px 10px;max-width:94%;white-space:normal;text-align:center}
 #touch{padding:4%;gap:8px}#touch>div{gap:9px}#touch button{width:48px;height:48px;font-size:26px}#touch .action-controls button:last-child{width:54px;height:54px;font-size:28px}
 #meter{left:43%;bottom:7%;width:58px;height:4px}#meter span{font-size:10px;top:7px;letter-spacing:1px}#portrait{display:none}#skipStory{font-size:12px;min-height:44px;padding:9px 11px;top:21%;right:3%}
 #letter{width:89%;padding:20px 22px;font-size:13px;max-height:90%}.letter-stamp{font-size:10px;letter-spacing:1px}.letter-route,#letter small{font-size:12px}#closeletter{font-size:13px;min-height:44px;padding:11px}
 #stage.has-panel .control-guide dt,#stage.has-panel .control-guide dd,#stage.has-panel .control-guide kbd,#stage.has-panel .card .eyebrow,.journal-entries b{font-size:12px}.season-act h3,.season-act p,.season-act small{font-size:12px}
 #voiceSamples{max-height:86%;top:6%;overflow:auto}#voiceSamples button{font-size:12px;min-height:44px}
 .menu-intro{font-size:max(12px,3.3cqw)}.chapter-heading{font-size:max(12px,3.1cqw)}.route-button,.menu-secondary .text-button,.text-button{font-size:12px}.keys{font-size:10px}.level span,.level small{font-size:10px}.level b{font-size:13px}.level{min-height:76px}.primary{font-size:13px;min-height:44px}.menu-secondary{flex-wrap:wrap;gap:0 8px}.menu-panel{padding-bottom:14px}
 #shell:fullscreen #stage:not(.has-menu):not(.has-panel){width:100%;aspect-ratio:5/6}
}

/* V5 · a readable pocket book, rather than reusing the last result panel. */
.top-actions{overflow-x:auto;scrollbar-width:none}.top-actions::-webkit-scrollbar{display:none}
.menu-secondary{flex-wrap:wrap;justify-content:flex-start;gap:0 16px}.menu-secondary .text-button{white-space:nowrap}
#guide{position:absolute;inset:0;z-index:14;display:grid;place-items:center;background:linear-gradient(125deg,#071b23f0,#143e3be8);backdrop-filter:blur(8px);padding:3%;color:#eee8d4}
.guide-book{width:min(870px,100%);height:100%;max-height:650px;display:flex;flex-direction:column;background:linear-gradient(115deg,#183a3d,#122f35 70%);border:1px solid #c5ac7269;border-radius:13px;box-shadow:0 20px 60px #0008;overflow:hidden}
.guide-heading{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:19px 26px 13px;border-bottom:1px solid #c8b58126;background:#d4c69608}.guide-heading .eyebrow{font-size:10px;letter-spacing:1.5px;margin:0 0 6px;color:#b8ba9c}.guide-heading h2{font-family:"STKaiti","KaiTi","FandolKai","BertCJK",serif;font-size:25px;font-weight:600;line-height:1.4;letter-spacing:.025em;margin:0;color:#f0d7a3}
.guide-close{width:40px;height:40px;flex:none;font:27px Georgia,"BertCJK",serif;border:1px solid #cab07c52;background:#273f36;border-radius:50%;color:#e8d6a6}.guide-close:hover{background:#445647}
.guide-tabs{display:flex;gap:7px;padding:10px 26px;border-bottom:1px solid #c8b58126}.guide-tabs button{flex:1;border:1px solid transparent;border-radius:6px;padding:9px 10px;background:transparent;color:#bccbbb;font-size:13px;line-height:1.5;white-space:nowrap}.guide-tabs button.active{border-color:#d2b37b74;background:#856e3635;color:#f4ddb4}.guide-tabs button:hover{background:#cfb68118}
.guide-content{min-height:0;flex:1;overflow:auto;padding:19px 26px 24px;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#7f997c #17383a;outline-offset:-4px}.guide-content p{font-size:13px;line-height:1.85;color:#c8d1c1;margin:8px 0}.guide-content h3{font-size:16px;line-height:1.65;color:#efdfb6;margin:0 0 8px;font-weight:600}.guide-lead{padding-bottom:7px}.guide-lead>span{display:block;color:#b4bb98;font-size:10px;letter-spacing:1.2px;margin-bottom:5px}.guide-lead h3{font-size:18px;font-family:"STKaiti","KaiTi","FandolKai","BertCJK",serif}.guide-lead p{margin-top:7px}
.guide-progress{list-style:none;padding:0;margin:10px 0 21px;display:grid;grid-template-columns:1fr 1fr;gap:8px}.guide-step{padding:10px 12px;background:#071e2355;border:1px solid #a3b69b24;border-radius:7px;display:flex;align-items:flex-start;gap:8px}.guide-step>span{font-size:16px;color:#94b292;line-height:1.5}.guide-step b{font-size:12px;display:block;font-weight:600;color:#c5ccbb}.guide-step small{font-size:11px;line-height:1.75;display:block;margin-top:3px;color:#9db2a4}.guide-step.is-done{border-color:#b8cf9555;background:#6a89581b}.guide-step.is-done b,.guide-step.is-done>span{color:#d6e0b3}
.guide-section{padding:17px 0;border-top:1px solid #b8c69a26}.guide-section h3{margin:0 0 10px}.guide-section ol{font-size:13px;line-height:1.85;padding-left:22px;margin:8px 0}.guide-section ol>li{padding:3px 0 4px 3px}.guide-rule{background:#ceae6820;border-left:2px solid #d6b16d;padding:10px 13px!important;margin:13px 0 0!important;color:#e3d8b7!important}.guide-rule b{display:block;font-size:10px;font-weight:500;letter-spacing:1.4px;color:#e5c382;margin-bottom:2px}
.guide-content details{border:1px solid #a9c1a12d;border-radius:6px;margin:7px 0;overflow:hidden}.guide-content summary{padding:11px 13px;font-size:12px;cursor:pointer;color:#d4d8ba;line-height:1.6}.guide-content details>p{padding:0 13px 11px;margin:0}.guide-content details[open]{background:#09313677}.guide-controls{margin-top:10px!important}.guide-controls dl{margin:4px 13px 12px}.guide-controls dl>div{display:grid;grid-template-columns:170px 1fr;gap:14px;padding:9px 0;border-bottom:1px solid #baceaa1c;line-height:1.7;font-size:12px}.guide-controls dt{color:#e2d5ad}.guide-controls dd{margin:0;color:#bfcbbd}
.guide-footer{height:auto!important;min-height:0!important;display:flex!important;align-items:center;justify-content:space-between;gap:16px;padding:12px 26px;background:#0b242c9e;border-top:1px solid #c8b58126}.guide-footer p{font-size:11px;line-height:1.6;letter-spacing:0;color:#a6b9a8;margin:0}.guide-footer .primary{width:auto;font-size:12px;padding:10px 17px;white-space:nowrap;margin:0;letter-spacing:.02em}
.guide-section-heading{display:flex;justify-content:space-between;gap:10px;align-items:center}.guide-section-heading>small{font-size:10px;color:#91aa99}.guide-log{list-style:none!important;padding:0!important;margin:8px 0!important}.guide-log li{padding:11px 12px!important;margin:7px 0;background:#0b242b55;border-left:2px solid #8ea888;border-radius:0 5px 5px 0}.guide-log li>div{display:flex;align-items:center;justify-content:space-between;gap:8px}.guide-log b{font-size:11px;color:#dec998}.guide-log small{font-size:10px;color:#88a998}.guide-log p{margin:5px 0 1px;font-size:13px;color:#dadcc8}.guide-empty,.guide-note{font-size:11px!important;color:#93ad9d!important;line-height:1.8!important}.guide-archive summary span{float:right;font-size:10px;color:#8ba593}.guide-archive .guide-log{padding:0 12px 9px!important}.guide-findings{list-style:none;padding:0;display:grid;grid-template-columns:1fr 1fr;gap:8px}.guide-findings li{padding:11px 12px;background:#b09b5614;border:1px solid #bdc79326;border-radius:6px}.guide-findings b{font-size:12px;color:#d8cda9}.guide-findings p{font-size:11px;margin:6px 0 0}.guide-findings .unfound{opacity:.8}
.guide-characters{display:grid;grid-template-columns:1fr 1fr 1fr;gap:10px;margin:13px 0 22px}.guide-characters article{position:relative;padding:15px;background:#08232a66;border:1px solid #9db39836;border-radius:9px}.guide-characters h3{font-size:14px;margin:6px 0 5px}.guide-characters h3 small{font-size:10px;font-weight:400;color:#93b2b0}.guide-characters p{font-size:11px;line-height:1.85}.guide-characters blockquote{font-family:"STKaiti","KaiTi","FandolKai","BertCJK",serif;margin:12px 0 0;font-size:14px;color:#e6d2a5;line-height:1.6}.guide-character-mark{display:grid;place-items:center;width:34px;height:34px;border:1px solid #adc8b53f;border-radius:50%;font:20px "STKaiti","KaiTi","BertCJK",serif}.bird-mark{color:#afd4d5;background:#507a7b30}.duck-mark{color:#e6c79a;background:#8b6f462d}.turtle-mark{color:#b4ca9b;background:#65794b2c}.guide-story-route{list-style:none;padding:0!important;display:grid;grid-template-columns:1fr 1fr;gap:9px}.guide-story-route li{padding:13px!important;border:1px solid #a9b89b25;border-radius:7px;background:#123339}.guide-story-route li.current{border-color:#dfbd7580}.guide-story-route b{font-size:12px;color:#e1d3ad}.guide-story-route p{font-size:11px;margin:6px 0 0}.guide-volume{display:flex;align-items:center;gap:14px;font-size:12px;color:#c5d2c2;margin-top:12px}.guide-volume input{flex:1;min-width:80px;accent-color:#dbc58b}.guide-volume output{font-size:11px;min-width:35px;text-align:right}
#stage.has-guide #touch,#stage.has-guide #interact,#stage.has-guide #hud,#stage.has-guide #meter{visibility:hidden}
/* Compact banter leaves the route visible; the unabridged line stays in the book. */
#dialogue[data-compact="true"],#dialogue[data-layout="compact"]{top:auto;bottom:8%;left:22%;width:56%;padding:7px 10px;gap:8px;box-shadow:0 3px 15px #0004;background:#0b292edb;border-radius:8px}
#dialogue[data-compact="true"] #dialoguePortrait,#dialogue[data-layout="compact"] #dialoguePortrait{width:28px;height:28px}
#dialogue[data-compact="true"] #speaker,#dialogue[data-layout="compact"] #speaker{display:none}
#dialogue[data-compact="true"] #line,#dialogue[data-layout="compact"] #line{font-size:12px;line-height:1.55;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
#dialogue[data-compact="true"] #dialogueNext,#dialogue[data-layout="compact"] #dialogueNext{font-size:22px;min-height:28px}
@media(pointer:coarse){.guide-tabs button,.guide-close,.guide-content summary,.guide-footer .primary{min-height:44px}.guide-close{min-width:44px}.guide-volume input{min-height:44px}.top-actions button{white-space:nowrap}.menu-secondary{gap:0 12px}}
@media(orientation:landscape) and (max-height:610px){#guide{padding:1.5%}.guide-heading{padding:10px 18px 7px}.guide-heading h2{font-size:19px}.guide-heading .eyebrow{font-size:9px;margin-bottom:3px}.guide-tabs{padding:5px 18px;gap:5px}.guide-tabs button{font-size:11px;padding:5px 8px}.guide-content{padding:12px 18px 15px}.guide-footer{padding:7px 18px}.guide-footer .primary{font-size:11px;padding:7px 12px}.guide-lead h3{font-size:16px}.guide-progress{margin-bottom:12px}.guide-section{padding:12px 0}.guide-section h3{font-size:14px}.guide-characters{gap:8px}.guide-characters article{padding:12px}.menu-secondary .text-button{font-size:10px}.guide-footer p{font-size:10px}}
@media(orientation:portrait){#guide{padding:3%;backdrop-filter:blur(6px)}.guide-book{max-height:none;border-radius:9px}.guide-heading{padding:15px 15px 11px;gap:9px}.guide-heading h2{font-size:20px;line-height:1.4}.guide-heading .eyebrow{font-size:9px;line-height:1.5;letter-spacing:.5px}.guide-tabs{padding:8px 12px;gap:3px}.guide-tabs button{font-size:12px;padding:9px 5px;min-height:44px}.guide-content{padding:15px 15px 20px}.guide-lead h3{font-size:17px}.guide-content p{font-size:13px}.guide-content h3{font-size:15px}.guide-progress{grid-template-columns:1fr;gap:7px;margin:9px 0 17px}.guide-step{padding:10px 11px}.guide-step b{font-size:12px}.guide-step small{font-size:12px;line-height:1.65}.guide-section ol{font-size:13px;line-height:1.8}.guide-content summary{font-size:12px;padding:12px;min-height:44px}.guide-controls dl>div{grid-template-columns:1fr;gap:3px;font-size:12px}.guide-footer{padding:10px 14px;gap:9px}.guide-footer p{font-size:10px;max-width:40%}.guide-footer .primary{font-size:12px;padding:11px 12px;min-height:44px}.guide-findings,.guide-story-route,.guide-characters{grid-template-columns:1fr}.guide-characters article{padding:14px 15px}.guide-characters p,.guide-story-route p,.guide-findings p{font-size:12px}.guide-log p{font-size:13px}.guide-characters h3{font-size:15px}.guide-log small{font-size:10px}.guide-note{font-size:12px!important}.guide-volume{font-size:12px;gap:9px}
 #dialogue[data-compact="true"],#dialogue[data-layout="compact"]{bottom:20%;left:4%;width:92%;padding:6px 9px}#dialogue[data-compact="true"] #line,#dialogue[data-layout="compact"] #line{font-size:12px;line-height:1.6}#dialogue[data-compact="true"] #dialogueNext,#dialogue[data-layout="compact"] #dialogueNext{min-height:44px;min-width:44px}
}

.guide-recovery{display:flex;flex-wrap:wrap;gap:8px;margin:0 13px 13px}.guide-recovery button{padding:10px 12px;min-height:44px;border:1px solid #b2bf9249;border-radius:6px;background:#49654d46;color:#e0d8b7;font-size:12px;line-height:1.5}.guide-recovery button:hover{background:#77865259}

/* Final readability review: banter sits below the HUD, above the live route. */
#dialogue[data-compact="true"],#dialogue[data-layout="compact"]{top:24%;bottom:auto}
.guide-first-action{background:#b3975123;border-left:2px solid #d4b678;padding:8px 11px;margin:8px 0 5px!important;color:#f1e1ba!important;font-size:13px!important;line-height:1.7!important}.guide-first-action b{display:block;font-size:10px;font-weight:500;letter-spacing:1px;color:#d8be84;margin-bottom:2px}
@media(orientation:landscape){.guide-progress{margin:8px 0 13px;gap:6px}.guide-step{padding:8px 10px}.guide-step small{line-height:1.6}.guide-heading{padding-top:14px;padding-bottom:10px}.guide-content{padding-top:14px}.guide-lead{padding-bottom:2px}.guide-section{padding-top:13px}.guide-lead h3{font-size:17px}}
@media(orientation:portrait){#dialogue[data-compact="true"],#dialogue[data-layout="compact"]{top:25%;bottom:auto}.guide-first-action{padding:8px 10px;margin-bottom:5px!important}}


/* V7 · one uninterrupted scene. The HUD, subtitles and keys are transparent
   lettering inside that scene; only intentionally opened books have panels. */
#shell,#shell:fullscreen,#shell.expanded{height:100dvh;max-width:none;width:100%;padding:0;gap:0;overflow:hidden;display:flex;align-items:center;justify-content:center;background:#071a20}
#stage,#stage.is-play-layout,#stage.has-panel,#stage.has-menu,#shell:fullscreen #stage{flex:none;margin:auto;max-height:none;min-height:0;aspect-ratio:auto;border:0;border-radius:0;box-shadow:none;display:block;background:#143439}
#sceneViewport{position:absolute;inset:0;overflow:hidden}
#sceneViewport #game,#stage.is-play-layout #sceneViewport #game,#stage.has-panel #sceneViewport #game{position:absolute;inset:0;width:100%;height:100%;aspect-ratio:auto;transform:none}
#sceneViewport .topbar{position:absolute;top:clamp(8px,1.8cqw,24px);left:2.8%;right:2.8%;z-index:8;height:auto;min-height:0;padding:0;gap:12px;flex-wrap:nowrap;justify-content:flex-end;pointer-events:none}
#sceneViewport .topbar>*{pointer-events:auto}
#stage.is-play-layout .brand{display:none}
#stage.has-menu .topbar{justify-content:space-between;z-index:8}
#sceneViewport .brand-portrait{width:34px;height:34px;border:0;box-shadow:none}
#sceneViewport .brand b{font-size:17px}
#sceneViewport .brand-season{font-size:10px}
#sceneViewport .top-actions{overflow:visible;gap:7px;width:auto;flex-shrink:0;align-items:center;justify-content:flex-end}
#sceneViewport .top-actions>button,#sceneViewport #settings>summary{display:flex;align-items:center;justify-content:center;border:0!important;border-radius:0;background:none;box-shadow:none;padding:5px 4px;font-size:12px;line-height:1.55;letter-spacing:.03em;color:#eee6cb;min-height:32px;min-width:32px;text-shadow:none}
#sceneViewport .top-actions>button:hover,#sceneViewport #settings>summary:hover{color:#ffe2a6;background:none}
#settings{position:relative;pointer-events:auto}
#settings>summary{cursor:pointer;list-style:none;user-select:none;display:flex;align-items:center;justify-content:center}
#settings>summary::-webkit-details-marker{display:none}
#settings>summary::after{content:' ⌄';font-size:11px}
#settings[open]>summary::after{content:' ⌃'}
.settings-menu{position:absolute;top:calc(100% + 8px);right:0;z-index:9;width:166px;padding:9px;display:grid;grid-template-columns:1fr 1fr;gap:3px;background:#102e34f2;border:1px solid #cfc39655;box-shadow:0 7px 25px #0005;border-radius:8px}
#sceneViewport .settings-menu button{padding:9px 4px;min-height:40px;border:0;border-radius:4px;background:transparent;font-size:12px;color:#d4dfcf;white-space:nowrap}
#sceneViewport .settings-menu button:hover{background:#607a582b;color:#ffe2a6}
#sceneViewport .settings-menu button[aria-pressed=true]{color:#eff8f5}
#sceneViewport #hud{position:absolute;top:2.8%;left:3%;right:auto;display:block;width:calc(100% - 250px);max-width:760px;z-index:2;gap:0;opacity:1;pointer-events:none;text-shadow:0 1px 2px rgba(0,19,25,.38);transition:none}
#sceneViewport .quest{width:100%;max-width:100%}
#sceneViewport #chapter{display:block;margin:0 0 4px;font-size:clamp(10px,.86cqw,12px);line-height:1.3;letter-spacing:.06em;color:#efd298}
#sceneViewport #name{display:block;font-size:clamp(16px,1.52cqw,21px);line-height:1.3;font-weight:650;letter-spacing:.05em}
#sceneViewport #objective{margin:5px 0 0;font-size:clamp(11px,.97cqw,14px);line-height:1.5;max-width:680px;color:#e0e8d8}
#sceneViewport .readouts{display:flex;gap:14px;font-size:clamp(10px,.82cqw,12px);line-height:1.4;margin-top:6px;white-space:nowrap}
#sceneViewport .readouts span{padding:0;border:0;border-radius:0;background:none;backdrop-filter:none;box-shadow:none;color:#d0dfcf}
#sceneViewport #dialogue,#sceneViewport #dialogue[data-compact],#sceneViewport #dialogue[data-layout]{position:absolute;top:auto;bottom:48px;left:14%;width:72%;max-width:1000px;padding:8px 18px;margin:0;gap:6px;display:flex;align-items:center;border:0;border-radius:18px;background:linear-gradient(180deg,rgba(12,26,28,.30),rgba(12,26,28,.18))!important;box-shadow:0 10px 24px rgba(0,0,0,.08);backdrop-filter:blur(1.6px);filter:none;z-index:3;pointer-events:none;text-align:center;text-shadow:0 1px 2px rgba(0,19,25,.42)}
#sceneViewport #dialoguePortrait,#sceneViewport .dialogue-mark{display:none!important}
#sceneViewport #dialogue>.subtitle-copy{display:block;flex:1;min-width:0;line-height:1.65}
#sceneViewport #speaker,#sceneViewport #dialogue[data-compact] #speaker,#sceneViewport #dialogue[data-layout] #speaker{display:inline;font-size:clamp(15px,1.36cqw,20px);font-weight:600;line-height:inherit;letter-spacing:0;margin:0;color:#f2d9a9}
#sceneViewport .subtitle-colon{font-size:clamp(15px,1.36cqw,20px);color:#f2d9a9;letter-spacing:0}
#sceneViewport #line,#sceneViewport #dialogue[data-compact] #line,#sceneViewport #dialogue[data-layout] #line{display:inline;overflow:visible;-webkit-line-clamp:unset;font-size:clamp(15px,1.36cqw,20px);font-weight:500;line-height:inherit;margin:0;letter-spacing:.025em;color:#fff4df;white-space:normal;word-break:normal}
#sceneViewport #dialogue[data-speaker=duck] #speaker{color:#efd2db}
#sceneViewport #dialogue[data-speaker=snail] #speaker{color:#d5e4b5}
#sceneViewport #dialogueNext,#sceneViewport #dialogue[data-compact] #dialogueNext,#sceneViewport #dialogue[data-layout] #dialogueNext{flex:none;align-self:center;pointer-events:auto;min-width:36px;width:36px;min-height:36px;height:36px;padding:0;background:none!important;border:0;border-radius:0;box-shadow:none;color:#ead5a8;font:25px Georgia,"BertCJK",serif;line-height:1;text-shadow:inherit}
#sceneViewport #dialogueNext:hover{color:#fff3d1}
#sceneViewport #toast,#sceneViewport #interact{position:absolute;inset:auto;left:16%;width:68%;max-width:none;transform:none;margin:0;padding:0;border:0;border-radius:0;background:none!important;box-shadow:none;backdrop-filter:none;filter:none;z-index:3;pointer-events:none;white-space:normal;text-align:center;line-height:1.65;font-size:clamp(12px,1.07cqw,16px);text-shadow:0 1px 2px rgba(0,19,25,.42);color:#ffedc8;transition:opacity .15s}
#sceneViewport #toast{top:27%}
#sceneViewport #interact{bottom:103px;color:#f5d99d}
#sceneViewport #skipStory{position:absolute;inset:auto;bottom:13px;right:3%;z-index:4;padding:5px 0;min-height:32px;font-size:11px;background:none;border:0;border-radius:0;box-shadow:none;color:#ebddba;text-shadow:0 1px 2px rgba(0,19,25,.42)}
#sceneViewport #keyHints{position:absolute;left:18%;right:18%;bottom:12px;z-index:2;text-align:center;font-size:clamp(10px,.9cqw,13px);line-height:1.4;letter-spacing:.025em;color:#ccdbc9;text-shadow:0 1px 2px rgba(0,19,25,.42);pointer-events:none;background:none;border:0}
#sceneViewport #meter{left:3%;bottom:20px;width:70px;z-index:2;height:3px}
#sceneViewport #meter span{display:none}
#sceneViewport #touch{padding:0 3% 31px;z-index:3}
#stage.has-menu #hud,#stage.has-menu #dialogue,#stage.has-menu #toast,#stage.has-menu #interact,#stage.has-menu #keyHints,#stage.has-menu #meter,#stage.has-menu #touch,#stage.has-menu #skipStory{visibility:hidden}
#stage.has-guide #hud,#stage.has-guide #dialogue,#stage.has-guide #toast,#stage.has-guide #interact,#stage.has-guide #keyHints,#stage.has-guide #meter,#stage.has-guide #touch,#stage.has-guide #skipStory,#stage.has-panel #hud,#stage.has-panel #dialogue,#stage.has-panel #toast,#stage.has-panel #interact,#stage.has-panel #keyHints,#stage.has-panel #meter,#stage.has-panel #touch,#stage.has-panel #skipStory{visibility:hidden}
#stage.has-letter #dialogue,#stage.has-letter #toast,#stage.has-letter #interact,#stage.has-letter #keyHints,#stage.has-letter #touch,#stage.has-letter #skipStory{visibility:hidden}
#letter{z-index:10}
#letter:focus{outline:2px solid #dbc590;outline-offset:4px}
#stage.has-menu .menu-panel{padding-top:5.7%;padding-bottom:2.5%}
#stage.has-menu #voiceSamples{top:12%}
@media(pointer:coarse){
 #sceneViewport .top-actions{gap:2px}
 #sceneViewport .top-actions>button,#sceneViewport #settings>summary{font-size:11px;min-height:44px;min-width:40px;padding:4px 2px}
 #sceneViewport .settings-menu button{min-height:44px}
 #sceneViewport #dialogueNext,#sceneViewport #dialogue[data-compact] #dialogueNext{min-width:44px;width:44px;min-height:44px;height:44px}
 #sceneViewport #dialogue,#sceneViewport #dialogue[data-compact],#sceneViewport #dialogue[data-layout]{bottom:97px;left:8%;width:84%}
 #sceneViewport #keyHints{left:3%;right:3%;bottom:8px;font-size:10px}
 #sceneViewport #meter{left:calc(50% - 25px);bottom:43px;width:50px}
 #sceneViewport #touch>div{gap:10px}
 #sceneViewport #touch button{width:49px;height:49px;min-width:44px;min-height:44px}
 #sceneViewport #touch .action-controls button:last-child{width:55px;height:55px}
 #sceneViewport #skipStory{right:3%;bottom:98px;font-size:11px;min-height:44px}
}
@media(orientation:portrait){
 #stage.has-menu #sceneViewport #game{inset:auto 0 0;width:100%;height:auto;aspect-ratio:16/9}
 #sceneViewport .topbar{top:8px;left:3%;right:3%;min-height:0;align-content:normal}
 #stage.has-menu .brand b{font-size:15px}
 #stage.has-menu .brand-portrait{width:29px;height:29px}
 #stage.has-menu .brand-season{display:none}
 #sceneViewport #hud{top:12px;left:3%;right:3%;width:94%;max-width:none}
 #sceneViewport #chapter{width:calc(100% - 180px);font-size:9px;line-height:1.5;margin-bottom:5px}
 #sceneViewport #name{width:calc(100% - 180px);font-size:15px}
 #sceneViewport #objective{font-size:11px;line-height:1.5;margin-top:7px;max-width:100%}
 #sceneViewport .readouts{font-size:10px;margin-top:5px;gap:13px}
 #sceneViewport #dialogue,#sceneViewport #dialogue[data-compact],#sceneViewport #dialogue[data-layout]{left:4%;width:92%}
 #sceneViewport #speaker,#sceneViewport .subtitle-colon,#sceneViewport #line,#sceneViewport #dialogue[data-compact] #line,#sceneViewport #dialogue[data-compact] #speaker{font-size:14px;line-height:1.6}
 #sceneViewport #toast,#sceneViewport #interact{left:5%;width:90%;font-size:12px;line-height:1.6}
 #stage.has-menu .menu-panel{padding:63px 7% 18px}
 #stage.has-menu .menu-letter{margin-bottom:7px}
 #stage.has-menu #voiceSamples{top:10%}
 #sceneViewport #skipStory{bottom:95px}
 #stage.has-panel #sceneViewport #game{inset:0;aspect-ratio:auto;height:100%;width:100%}
}
@media(orientation:landscape) and (max-height:500px){
 #sceneViewport .topbar{top:5px;right:2.5%}
 #sceneViewport #hud{top:9px;left:2.5%;width:calc(100% - 205px)}
 #sceneViewport #chapter{font-size:9px;margin-bottom:3px}
 #sceneViewport #name{font-size:15px}
 #sceneViewport #objective{font-size:11px;margin-top:4px;line-height:1.4}
 #sceneViewport .readouts{font-size:9px;margin-top:4px}
 #sceneViewport #dialogue,#sceneViewport #dialogue[data-compact],#sceneViewport #dialogue[data-layout]{bottom:93px}
 #sceneViewport #line,#sceneViewport #speaker,#sceneViewport .subtitle-colon,#sceneViewport #dialogue[data-compact] #line,#sceneViewport #dialogue[data-compact] #speaker{font-size:14px}
 #stage.has-menu .menu-panel{padding-top:6%;padding-bottom:2%}
 #stage.has-menu .brand b{font-size:15px}
 #stage.has-menu .brand-portrait{width:28px;height:28px}
 #stage.has-menu .brand-season{display:none}
}

/* At a close-up mechanism, its live mathematical goal takes priority over
   the longer route description. The complete objective remains in the book. */
#stage.has-dense-math #sceneViewport #objective,#stage.has-dense-math #sceneViewport .readouts{display:none}
#stage.has-dense-math #sceneViewport #hud{width:calc(100% - 205px)}
@media(orientation:portrait){#stage.has-dense-math #sceneViewport #hud{width:94%}}
/* Keep the restored bridge and postal formula labels above the touch row.
   The full key legend wraps in the free space between the two hand groups. */
@media(orientation:portrait) and (pointer:coarse){
 #sceneViewport #touch{padding-bottom:7px}
 #sceneViewport #keyHints{left:calc(3% + 112px);right:calc(3% + 118px);bottom:8px;line-height:1.4}
}
@media(orientation:portrait) and (pointer:coarse) and (max-width:360px){
 #sceneViewport #touch>div{gap:8px}
 #sceneViewport #touch button{width:44px;height:44px}
 #sceneViewport #touch .action-controls button:last-child{width:50px;height:50px}
 #sceneViewport #keyHints{left:calc(3% + 100px);right:calc(3% + 106px)}
}

.settings-menu{max-height:min(72dvh,420px);overflow-y:auto}#saveStatus{grid-column:1/-1;color:#d9d7b0;font-size:11px;line-height:1.6;white-space:normal;overflow-wrap:anywhere}#saveStatus:empty{display:none}

#challengeCodeLabel{grid-column:1/-1;font-size:11px;color:#d9d7b0;padding:5px 3px}#challengeCode{width:100%;min-height:40px;margin-top:4px;padding:5px;border:1px solid #b4c7a54d;border-radius:4px;background:#102e34;color:#e8dcbb;box-sizing:border-box;font-size:12px}@media(pointer:coarse){#challengeCode{min-height:44px}}

/* Season touch controls: feather-like inlay, unchanged generous hit rectangles. */
#sceneViewport #touch button{position:relative;isolation:isolate;overflow:visible;background:linear-gradient(145deg,#244c59e8,#102e39d9);border-color:#d9e5c6a3;box-shadow:inset 0 1px 0 #f4edcf30,0 3px 10px #071c2940;touch-action:none;user-select:none;-webkit-user-select:none}
#sceneViewport #touch button::before{content:"";position:absolute;inset:7px 9px;z-index:-1;pointer-events:none;border-radius:75% 22% 70% 28%;transform:rotate(-24deg);border:1px solid #e9d39870;background:linear-gradient(120deg,#bededa2b 0 48%,#edcf9366 49% 51%,#c1d6cf17 52%);opacity:.7}
#sceneViewport #touch button[data-key="act"]{font-size:14px;font-weight:650;letter-spacing:0;line-height:1.1;text-shadow:0 1px 3px #061920}
#sceneViewport #touch button:active{background:linear-gradient(145deg,#3b6970ee,#204754ed);border-color:#ffe1a4}
@supports(padding:max(1px,2px)){
 #sceneViewport #touch{padding-left:max(3%,env(safe-area-inset-left,0px));padding-right:max(3%,env(safe-area-inset-right,0px));padding-bottom:max(7px,calc(env(safe-area-inset-bottom,0px) + 7px))}
 #sceneViewport .topbar{right:max(2.5%,env(safe-area-inset-right,0px));top:max(5px,env(safe-area-inset-top,0px))}
 #sceneViewport #hud{left:max(2.5%,env(safe-area-inset-left,0px));top:max(9px,env(safe-area-inset-top,0px))}
}


/* V8: a title scene, not a scrollable catalogue. The map is opened on demand. */
html,body{width:100%;height:100%;min-height:0;overscroll-behavior:none}
#shell,#stage{overscroll-behavior:none}
#overlay[data-panel="menu"]::before{background:linear-gradient(90deg,#071f29e8 0%,#0b2934b8 29%,#123c4533 48%,transparent 69%)}
#stage.has-menu .menu-panel,.menu-panel.season-expanded{position:absolute;inset:0 auto 0 0;width:43%;height:100%;padding:13% 0 8% 5.8%;justify-content:space-between;overflow:visible;scrollbar-width:none;gap:18px}
#stage.has-menu .menu-title{flex:none}
#stage.has-menu .menu-letter{display:block;font-size:clamp(16px,1.65cqw,23px);margin:0 0 15px;color:#d7e8de;letter-spacing:.04em}
#stage.has-menu .menu-panel h1{font-family:"STKaiti","KaiTi","Kaiti SC","FandolKai","BertCJK",serif;font-size:clamp(40px,6cqw,82px);line-height:1.13;letter-spacing:.08em;margin:0;color:#ffe3a7;text-shadow:0 2px 0 #67432a40,0 5px 22px #071b2759;transform:rotate(-1deg)}
#stage.has-menu .season-title{font-size:clamp(13px,1.5cqw,20px);margin:13px 0 0;line-height:1.5;color:#f2e2bf;letter-spacing:.24em;gap:12px}
#stage.has-menu .season-title span{width:24px;background:#e5c78990}
#stage.has-menu .tagline{display:block;font-size:clamp(17px,2.15cqw,29px);margin:19px 0 0;line-height:1.4;letter-spacing:.04em;color:#fff4d8}
.menu-departure{width:100%;max-width:430px;flex:none}
.menu-hook{font-size:clamp(12px,1.08cqw,15px);line-height:1.6;letter-spacing:.03em;color:#c8e0d4;margin:0 0 15px;text-shadow:0 1px 5px #0b202c}
#start{min-height:50px;padding:13px 20px;font-size:clamp(14px,1.25cqw,17px);letter-spacing:.06em;border:1px solid #ffe1a991;border-radius:9px;background:linear-gradient(120deg,#ecc682,#ffe3a7);box-shadow:0 8px 26px #07192540;flex:none}
#start b{font-size:24px}
.journey-status{display:block;font-size:clamp(11px,.9cqw,13px);line-height:1.5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:10px 0 0;color:#c3dacc;letter-spacing:.02em}
#stage.has-menu .menu-secondary{display:flex;justify-content:flex-start;align-items:center;gap:25px;flex-wrap:nowrap;margin-top:4px}
#stage.has-menu .menu-secondary .text-button{font-size:clamp(12px,1cqw,14px);letter-spacing:.03em;min-height:40px;padding:5px 0;color:#f0dfb7;white-space:nowrap}
#stage.has-menu .keys{font-size:clamp(10px,.8cqw,12px);color:#a9c3b7;line-height:1.5;margin:2px 0 0}
#stage.has-menu .brand{visibility:hidden}
#stage.has-menu #journal,#stage.has-menu #help,#stage.has-menu #pause{display:none}
#menuFullscreen{display:none}
#stage.has-menu #menuFullscreen{display:block}
#stage.has-menu .topbar{justify-content:flex-end}
#stage.has-menu .top-actions{gap:20px}
#sceneViewport #menuFullscreen,#sceneViewport #settingsToggle{font-size:12px;letter-spacing:.06em;color:#e9f1d9;text-shadow:0 1px 4px #102b37}
#chapterMap{position:absolute;inset:0;z-index:12;display:grid;place-items:center;padding:4%;background:#06242eb0;backdrop-filter:blur(8px)}
.map-book{position:relative;display:flex;flex-direction:column;width:min(840px,100%);max-height:100%;padding:26px 30px 19px;background:linear-gradient(135deg,#1d4444f5,#112f38fa);border:1px solid #d5dbb759;border-radius:16px;box-shadow:0 18px 70px #04192370;overflow:visible}
.map-book::before{content:"";position:absolute;inset:10px;border:1px solid #d5dbb713;pointer-events:none;border-radius:10px}
.map-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;flex:none}
.map-heading .eyebrow{font-size:11px;letter-spacing:.16em;margin:0 0 8px;color:#aecac1}
.map-heading h2{font-size:clamp(18px,2.1cqw,28px);font-family:"STKaiti","KaiTi","Kaiti SC","BertCJK",serif;letter-spacing:.06em;line-height:1.35;font-weight:500;margin:0;color:#f3ddb0}
.map-heading .guide-close{width:44px;height:44px;flex:none;min-height:44px;min-width:44px;background:transparent;border:1px solid #cfddbf29;border-radius:50%;color:#e7e5c9;font-size:28px;padding:0;line-height:1}
.map-act{margin:17px 0 14px;flex:none}
#mapActLabel{font-size:clamp(14px,1.5cqw,19px);font-weight:550;line-height:1.3;color:#ffe4a8;letter-spacing:.03em}
#mapDescription{font-size:12px;line-height:1.55;color:#bfd4c4;margin:5px 0 0;max-width:95%}
#chapterMap #levels{min-height:0;max-height:none;display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:0;overflow:visible;padding:0;flex:none}
#chapterMap .level{position:relative;min-height:95px;padding:15px 17px;overflow:hidden;display:flex;flex-direction:column;justify-content:center;background:#1a424644;border:1px solid #b7d0b72a;border-radius:10px;box-shadow:none;transform:none;transition:background .16s,border-color .16s}
#chapterMap .level:hover{background:#38625570;border-color:#e7d5a47a;transform:none}
#chapterMap .level.selected{background:#56705745;border-color:#f0d293a6;box-shadow:inset 3px 0 #edcd8b}
#chapterMap .level span{font-size:10px;color:#a9c8b8;line-height:1.35;letter-spacing:.08em;margin:0 0 6px}
#chapterMap .level b{font-size:clamp(14px,1.32cqw,18px);font-weight:600;line-height:1.35;letter-spacing:.04em;color:#f8ecd0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-right:13px}
#chapterMap .level small{font-size:11px;color:#bfd2bc;line-height:1.5;margin:6px 0 0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
#chapterMap .level.selected::after{top:17px;right:14px;font-size:18px;color:#f4d48e}
#chapterMap .level-record{display:none!important}
.map-footer{display:flex;align-items:center;justify-content:space-between;height:auto;min-height:44px;gap:16px;margin-top:15px;color:#abcabb;letter-spacing:.02em}
.map-pager{display:flex;align-items:center;gap:11px;flex:none}
.map-pager button{width:44px;height:44px;padding:0;border:1px solid #cddcc738;background:transparent;border-radius:50%;font:27px Georgia,"BertCJK",serif;line-height:1;color:#e6d9ae}
.map-pager button:hover{background:#c4d6a51a;border-color:#f0d79b77}
.map-pager button:disabled{opacity:.3;cursor:default}
#mapPage{font-size:12px;letter-spacing:.08em;font-variant-numeric:tabular-nums;min-width:57px;text-align:center}
#mapProgress{font-size:11px;line-height:1.5;flex:1;text-align:center}
.map-footer .text-button{padding:3px 0;min-height:44px;font-size:12px;color:#e3d5b0;white-space:nowrap}
.map-note{font-size:10px;line-height:1.5;color:#9fbfb0;text-align:center;margin:8px 0 0}
#stage.has-map #sceneViewport .topbar{visibility:hidden}
#stage.has-map #overlay{visibility:hidden}
#stage.has-map #touch,#stage.has-map #hud,#stage.has-map #dialogue,#stage.has-map #interact,#stage.has-map #toast{visibility:hidden}
#sceneViewport #touch>div{gap:11px}
#sceneViewport #touch button{font-family:system-ui,"Microsoft YaHei","BertCJK",sans-serif;color:#f4eed9;box-shadow:inset 0 1px 0 #f9efc42b,0 4px 16px #05192542}
#sceneViewport #touch button[data-key="left"],#sceneViewport #touch button[data-key="right"]{font-size:34px;line-height:1}
#sceneViewport #touch button[data-key="act"]{width:64px;border-radius:27px;font-size:13px;padding:0 5px;white-space:nowrap}
#sceneViewport #touch button[data-key="jump"]{width:72px;height:58px;border-radius:50%;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:2px;background:linear-gradient(135deg,#f5dc9ddd,#c9ac6cdd);color:#173f45;text-shadow:none;border-color:#ffefc8ab;padding:0}
#sceneViewport #touch button[data-key="jump"]::before{opacity:.25}
#sceneViewport #touch button[data-key="jump"] span{font-size:14px;font-weight:750;line-height:1.15}
#sceneViewport #touch button[data-key="jump"] small{font-size:9px;line-height:1.2;letter-spacing:.02em}
#sceneViewport #touch button.is-held{filter:brightness(1.18);box-shadow:inset 0 0 0 2px #ffedb599,0 0 20px #efdc9c36;transform:translateY(1px)}
#sceneViewport #touch button[data-key="act"].is-idle{opacity:.58}
#sceneViewport #touch button[data-key="act"].is-ready{border-color:#ffe2a3;box-shadow:inset 0 1px 0 #ffe7ae45,0 0 16px #f8dd8b38}
@media(orientation:landscape) and (max-height:550px){
 #stage.has-menu .menu-panel{padding:10% 0 6% 5.8%;gap:12px;width:44%}
 #stage.has-menu .menu-letter{font-size:15px;margin-bottom:8px}
 #stage.has-menu .menu-panel h1{font-size:5.8cqw}
 #stage.has-menu .season-title{font-size:12px;margin-top:7px}
 #stage.has-menu .tagline{font-size:17px;margin-top:12px}
 .menu-hook{font-size:11px;line-height:1.4;margin-bottom:8px}
 #start{min-height:44px;padding:9px 15px;font-size:13px}
 .journey-status{font-size:10px;margin-top:7px}
 #stage.has-menu .menu-secondary{gap:24px;margin-top:1px}
 #stage.has-menu .menu-secondary .text-button{font-size:11px;min-height:36px;padding:3px 0}
 #stage.has-menu .keys{display:none}
 #chapterMap{padding:3%}
 .map-book{padding:16px 20px 12px;border-radius:12px}
 .map-heading .eyebrow{font-size:9px;margin-bottom:4px}
 .map-heading h2{font-size:20px}
 .map-act{margin:7px 0 9px}
 #mapActLabel{font-size:14px}
 #mapDescription{font-size:11px;margin-top:3px}
 #chapterMap #levels{gap:8px}
 #chapterMap .level{min-height:70px;padding:9px 13px}
 #chapterMap .level span{font-size:9px;margin-bottom:3px}
 #chapterMap .level b{font-size:13px}
 #chapterMap .level small{font-size:10px;margin-top:3px;-webkit-line-clamp:1}
 #chapterMap .level.selected::after{top:9px;right:10px;font-size:16px}
 .map-footer{margin-top:8px;gap:10px}
 .map-note{margin-top:3px;font-size:9px}
}
@media(orientation:portrait){
 #stage.has-menu{background:linear-gradient(180deg,#082a35aa,#123b4445 68%,#16444144),var(--bert-forest-background,linear-gradient(145deg,#315d5c,#143b45)) center/cover}
 #overlay[data-panel="menu"]::before{background:linear-gradient(180deg,#06273252 0%,#092f3766 29%,#0b35413b 64%,transparent 85%)}
 #stage.has-menu .menu-panel,.menu-panel.season-expanded{width:100%;padding:clamp(76px,12dvh,110px) 8% 35%;justify-content:flex-start;gap:clamp(42px,8dvh,78px);overflow:visible}
 #stage.has-menu .menu-letter{font-size:21px;margin-bottom:12px}
 #stage.has-menu .menu-panel h1{font-size:clamp(43px,12.5cqw,67px);letter-spacing:.08em}
 #stage.has-menu .season-title{font-size:16px;margin-top:14px;gap:10px}
 #stage.has-menu .tagline{font-size:22px;margin-top:24px;line-height:1.45}
 .menu-departure{max-width:430px}
 .menu-hook{font-size:12px;line-height:1.5;margin-bottom:14px}
 #start{min-height:52px;padding:14px 19px;font-size:15px}
 .journey-status{font-size:11px;margin-top:10px}
 #stage.has-menu .menu-secondary{gap:32px;margin-top:8px}
 #stage.has-menu .menu-secondary .text-button{font-size:12px;min-height:44px;padding:5px 0}
 #stage.has-menu .keys{display:none}
 #chapterMap{padding:5%}
 .map-book{width:100%;padding:22px 17px 16px;border-radius:13px}
 .map-heading{gap:8px}
 .map-heading .eyebrow{font-size:9px;letter-spacing:.08em;line-height:1.4;margin-bottom:7px}
 .map-heading h2{font-size:21px;line-height:1.4;max-width:240px}
 .map-heading .guide-close{width:40px;height:44px}
 .map-act{margin:18px 0 16px}
 #mapActLabel{font-size:15px}
 #mapDescription{font-size:12px;line-height:1.6;margin-top:7px}
 #chapterMap #levels{gap:10px;grid-template-columns:1fr}
 #chapterMap .level{min-height:76px;padding:12px 15px}
 #chapterMap .level span{font-size:10px;margin-bottom:4px}
 #chapterMap .level b{font-size:15px}
 #chapterMap .level small{font-size:11px;line-height:1.4;margin-top:5px;-webkit-line-clamp:1}
 #chapterMap .level.selected::after{top:13px;right:13px}
 .map-footer{display:flex;flex-wrap:wrap;gap:6px 10px;margin-top:13px}
 .map-pager{gap:10px}
 #mapProgress{font-size:10px;text-align:right;flex:1}
 .map-footer .text-button{width:100%;text-align:center;font-size:12px;min-height:38px;padding:4px 0}
 .map-note{font-size:10px;line-height:1.55;margin-top:3px}
 #sceneViewport #touch{padding-left:3%;padding-right:3%}
 #sceneViewport #touch>div{gap:9px}
 #sceneViewport #touch button[data-key="act"]{width:60px;font-size:12px}
 #sceneViewport #touch button[data-key="jump"]{width:66px;height:56px}
 #sceneViewport #keyHints{left:calc(3% + 108px);right:calc(3% + 142px);font-size:9px;bottom:13px;line-height:1.45}
}
@media(orientation:portrait) and (max-height:690px){
 #stage.has-menu .menu-panel{padding-top:74px;gap:34px}
 #stage.has-menu .menu-letter{font-size:18px;margin-bottom:10px}
 #stage.has-menu .menu-panel h1{font-size:12cqw}
 #stage.has-menu .season-title{font-size:14px;margin-top:10px}
 #stage.has-menu .tagline{font-size:19px;margin-top:17px}
 .map-book{padding:15px 15px 10px}
 .map-act{margin:11px 0 10px}
 #mapDescription{margin-top:4px;font-size:11px}
 #chapterMap .level{min-height:67px;padding:9px 13px}
 #chapterMap .level small{font-size:10px}
 #chapterMap #levels{gap:7px}
 .map-footer{margin-top:8px;gap:2px 8px}
 .map-footer .text-button{min-height:36px}
 .map-note{font-size:9px;margin-top:2px}
}
@media(orientation:landscape) and (max-height:350px){
 #stage.has-menu .menu-panel{padding-top:10%;padding-bottom:4%;gap:10px}
 #stage.has-menu .menu-letter{display:none}
 #stage.has-menu .tagline{margin-top:8px;font-size:14px}
 .menu-hook{display:none}
 .journey-status{margin-top:5px}
 #chapterMap{padding:2%}
 .map-book{padding:11px 16px 8px}
 .map-heading h2{font-size:17px}
 .map-heading .eyebrow{display:none}
 .map-heading .guide-close{width:36px;height:36px;min-width:36px;min-height:36px}
 .map-act{margin:2px 0 6px}
 #mapDescription{display:none}
 #chapterMap .level{min-height:59px;padding:7px 11px}
 #chapterMap .level span{margin-bottom:2px}
 #chapterMap .level small{margin-top:2px}
 .map-footer{margin-top:5px}
 .map-note{display:none}
}

/* The small identity is already in the hero title; do not reserve an invisible toolbar slot. */
#stage.has-menu .brand{display:none}
@media(pointer:coarse){#sceneViewport #keyHints{display:none}}
@media(orientation:portrait) and (max-height:690px){
 .menu-hook{display:none}
 .map-heading h2{font-size:18px;line-height:1.35}
 #chapterMap #levels{grid-template-columns:1fr 1fr}
 #chapterMap .level{min-height:96px;padding:10px 11px}
 #chapterMap .level b{font-size:13px}
 #chapterMap .level small{-webkit-line-clamp:2}
}

#sceneViewport .settings-menu{width:230px;max-height:min(var(--settings-limit,420px),calc(100dvh - 74px));padding:10px;gap:4px;border-color:#c8d7b650;scrollbar-width:thin;scrollbar-color:#a8c3ac66 transparent;overscroll-behavior:contain}
#sceneViewport #challengeCodeLabel{line-height:1.5;font-size:11px}
#sceneViewport #challengeCode{min-height:44px;font-size:12px;padding:8px}
#sceneViewport #hintStep{color:#f0d294}

/* Travel weather shares the quiet readout row. */
#environment{color:#c9d4b7;white-space:nowrap;letter-spacing:.01em}#environment:empty{display:none}@media(max-width:480px){#environment{font-size:9px}.readouts{flex-wrap:wrap;row-gap:3px}}

/* V9: starting the journey and choosing a chapter are distinct, visible actions. */
#stage.has-menu .menu-panel{padding-top:9%;padding-bottom:5%}
#stage.has-menu .menu-hook{display:block;font-size:clamp(11px,1.06cqw,14px);line-height:1.55;margin:0 0 13px;color:#dae6d2}
.menu-hook .tower-name{white-space:nowrap;font-family:Georgia,"BertCJK",serif;font-size:.95em;letter-spacing:0;color:#efdfbb}
#stage.has-menu .menu-secondary{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:4px;margin-top:10px}
#stage.has-menu #openMap{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;min-height:46px;padding:10px 17px;border:1px solid #e8cc928c;border-radius:8px;background:linear-gradient(110deg,#3a5e5680,#193e465e);box-shadow:inset 0 1px 0 #fff0bd0f,0 3px 14px #0b26352e;color:#f5e5bd;font-size:clamp(13px,1.1cqw,15px);font-weight:550;line-height:1.3;letter-spacing:.025em;cursor:pointer;transition:background .16s,border-color .16s}
#stage.has-menu #openMap:hover,#stage.has-menu #openMap:focus-visible{border-color:#ffe6ad;background:linear-gradient(110deg,#4e75649c,#28515a7d)}
#stage.has-menu #openMap[aria-expanded=true]{border-color:#ffe6ad}
#stage.has-menu #openMap b{font-size:22px;line-height:1;font-weight:400;color:#efd39a}
#stage.has-menu #storyEntry{align-self:flex-start;min-height:44px;padding:5px 0;font-size:clamp(11px,.97cqw,13px);color:#c8d5c1;line-height:1.4}
@media(orientation:landscape) and (max-height:550px){
 #stage.has-menu .menu-panel{padding-top:7%;padding-bottom:3%;gap:8px}
 #stage.has-menu .menu-letter{font-size:13px;margin-bottom:6px}
 #stage.has-menu .menu-panel h1{font-size:5.6cqw}
 #stage.has-menu .season-title{margin-top:6px}
 #stage.has-menu .tagline{margin-top:9px}
 #stage.has-menu .menu-hook{font-size:11px;line-height:1.4;margin-bottom:6px}
 .journey-status{margin-top:6px}
 #stage.has-menu .menu-secondary{margin-top:8px;gap:3px}
 #stage.has-menu #openMap{min-height:44px;padding:9px 13px;font-size:12px}
 #stage.has-menu #storyEntry{font-size:11px;min-height:44px}
}
@media(orientation:portrait){
 #stage.has-menu .menu-panel{padding-top:clamp(74px,10dvh,100px);padding-bottom:35%;gap:32px}
 #stage.has-menu .tagline{margin-top:20px}
 #stage.has-menu .menu-hook{font-size:12px;line-height:1.5;margin-bottom:12px}
 #stage.has-menu .menu-secondary{gap:4px;margin-top:9px}
 #stage.has-menu #openMap{min-height:48px;padding:11px 15px;font-size:13px}
 #stage.has-menu #storyEntry{font-size:12px;min-height:44px}
}
@media(orientation:portrait) and (max-height:690px){
 #stage.has-menu .menu-panel{padding-top:max(58px,9dvh);gap:22px}
 #stage.has-menu .menu-letter{margin-bottom:8px}
 #stage.has-menu .menu-panel h1{font-size:11.8cqw}
 #stage.has-menu .season-title{margin-top:9px}
 #stage.has-menu .tagline{margin-top:14px}
 #stage.has-menu .menu-hook{font-size:11px;line-height:1.5;margin-bottom:9px}
 #start{min-height:48px;padding-top:11px;padding-bottom:11px}
 .journey-status{font-size:10px;margin-top:7px}
 #stage.has-menu .menu-secondary{gap:3px;margin-top:7px}
 #stage.has-menu #openMap{min-height:44px;padding:9px 13px;font-size:12px}
 #stage.has-menu #storyEntry{min-height:44px;font-size:11px}
}
@media(orientation:landscape) and (max-height:350px){
 #stage.has-menu .menu-panel{padding-top:6%;padding-bottom:2%;gap:6px}
 #stage.has-menu .menu-letter{display:none}
 #stage.has-menu .tagline{margin-top:7px}
 #stage.has-menu .menu-hook{font-size:10px;line-height:1.35;margin-bottom:5px}
 #stage.has-menu .menu-secondary{margin-top:5px;gap:2px}
 #stage.has-menu #openMap{min-height:44px;padding:9px 12px;font-size:11px}
 #stage.has-menu #openMap b{font-size:20px}
 #stage.has-menu #storyEntry{min-height:44px;font-size:10px}
}

#stage.has-menu .menu-letter{line-height:1.2}
#stage.has-menu #start{line-height:1.3}

/* V10: switches are equal; advanced journey tools open only when requested. */
#sceneViewport .settings-menu{display:block;width:min(276px,calc(100cqw - 24px));padding:10px;overflow-y:auto;background:#102a30f5}
.settings-switches,.settings-play,.challenge-actions,.save-actions{display:grid;grid-template-columns:1fr 1fr;gap:5px}
#sceneViewport .settings-menu button{min-height:44px;padding:10px 8px;white-space:normal;line-height:1.35;color:#e9f0ed;text-align:left;border:1px solid #b5d1c51e;background:#37545022;border-radius:5px}
#sceneViewport .settings-menu .setting-switch{display:flex;align-items:center;justify-content:space-between;gap:10px;color:#edf6f3;border-color:#d0e2d328;background:#4c75622b}
#sceneViewport .setting-switch::after{content:'';width:8px;height:8px;flex:none;border:1px solid #e8f4ef;border-radius:50%;background:#e8f4ef}
#sceneViewport .setting-switch[aria-pressed=false]::after,#sceneViewport .setting-switch[data-state=unavailable]::after{background:transparent;border-color:#9cafaa}
#sceneViewport .setting-switch[aria-pressed=false],#sceneViewport .setting-switch[data-state=unavailable]{color:#b7c8c2;border-color:#b5d1c51e;background:#37545022}
#sceneViewport .settings-menu button:hover{background:#65816b35;color:#f5faf7}
#sceneViewport .settings-menu button:disabled{opacity:.45;cursor:default}
.settings-fold{margin:8px 0 0;border-top:1px solid #bbd2bd2b}
.settings-fold>summary{min-height:44px;padding:12px 7px;cursor:pointer;font-size:12px;line-height:1.5;color:#d9e8dd}
.journey-tools{padding:0 4px 9px}
#sceneViewport #challengeExplain{margin:0 0 9px;font-size:11px;line-height:1.65;color:#b5cbbf}
#sceneViewport #challengeCodeLabel{display:block;font-size:12px;color:#e1eddf;letter-spacing:0;line-height:1.5;margin:0 0 5px}
#sceneViewport #challengeCode{width:100%;min-height:44px;background:#071e27b0;border:1px solid #a6c5b94d;border-radius:5px;padding:9px;color:#f0f6ed;font-size:12px;line-height:1.5;margin-bottom:7px}
#sceneViewport #challengeCode::placeholder{color:#a4bbb1;font:11px system-ui,"BertCJK",sans-serif}
#sceneViewport #challengeStatus,#saveStatus{display:block;font-size:11px;line-height:1.7;color:#dce9dd;margin:6px 1px 0;white-space:normal;overflow-wrap:anywhere}
#sceneViewport #challengeStatus:empty,#saveStatus:empty{display:none}
.save-actions{border-top:1px solid #bbd2bd24;margin-top:10px;padding-top:8px}
.settings-play{margin-top:7px}
#sceneViewport #hintStep{color:#e9f0ed}
#sceneViewport .readouts{display:none}
#sceneViewport #hud{width:calc(100% - 270px);max-width:620px}
#sceneViewport #chapter{color:#c9dbc9;letter-spacing:.03em;margin-bottom:3px}
#sceneViewport #objective{font-size:clamp(11px,1cqw,14px);line-height:1.5;max-width:560px}
.guide-travel-details{margin-top:9px!important}
.guide-session-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;padding:3px 13px 12px;margin:0}
.guide-session-stats div{display:flex;flex-direction:column;gap:3px;border-top:1px solid #bcd0ab25;padding:8px 0 0}
.guide-session-stats dt{font-size:10px;color:#9eb8aa}.guide-session-stats dd{margin:0;font-size:13px;color:#dce9d9;font-variant-numeric:tabular-nums}
.guide-duck-status{font-size:12px!important;color:#d5e5d1!important}
.guide-duck-rules{font-size:12px;line-height:1.8;margin:0 13px 12px;padding-left:17px;color:#c3d3c4}.guide-duck-rules li{padding:3px 0}.guide-duck-rules b{color:#e8e7ce;font-weight:550}
@media(pointer:coarse){
 #sceneViewport #journal{display:none}
 #stage.is-play-layout #menuFullscreen{display:none}
 #sceneViewport .top-actions{gap:1px}
 #sceneViewport .top-actions>button,#sceneViewport #settings>summary{min-width:44px;min-height:44px;padding:5px 3px}
 #sceneViewport #help{min-width:52px}
 #sceneViewport #hud{width:calc(94% - 156px);max-width:480px;top:12px;left:3%}
 #sceneViewport #chapter{font-size:9px;line-height:1.4}
 #sceneViewport #name{width:100%;font-size:15px;line-height:1.4;letter-spacing:.02em}
 #sceneViewport #objective{font-size:11px;line-height:1.5;margin-top:4px;max-width:100%}
}
@media(orientation:portrait){
 #stage.is-play-layout #sceneViewport #hud{top:12px;width:calc(94% - 156px);left:3%;right:auto}
 #sceneViewport #chapter,#sceneViewport #name{width:100%}
 #stage.has-menu .menu-hook{line-height:1.6}
 #sceneViewport .settings-menu{width:min(276px,calc(100cqw - 24px))}
}
@media(orientation:landscape) and (max-height:500px){
 #sceneViewport #hud{top:9px;max-width:420px}
 #sceneViewport #chapter{font-size:9px;margin-bottom:2px}
 #sceneViewport #name{font-size:14px}
 #sceneViewport #objective{font-size:11px;margin-top:3px}
 #sceneViewport .settings-menu{padding:7px}
 .settings-fold{margin-top:5px}.settings-play{margin-top:5px}
}

/* A small desktop window uses the same three tools as a phone. */
#stage.has-compact-hud #journal,#stage.has-compact-hud.is-play-layout #menuFullscreen{display:none}
#stage.has-compact-hud .top-actions>button,#stage.has-compact-hud #settings>summary{min-width:44px;min-height:44px;padding:5px 3px}
#stage.has-compact-hud #help{min-width:52px}
#stage.has-compact-hud #hud{width:calc(94% - 156px);max-width:480px}

/* Regular type has open counters. Scenery labels keep a light shadow;
 * the temporary conversation subtitle has a separate, translucent scrim. */
#stage.is-play-layout #sceneViewport #hud,
#stage.is-play-layout #sceneViewport #chapter,
#stage.is-play-layout #sceneViewport #name,
#stage.is-play-layout #sceneViewport #objective,
#stage.is-play-layout #sceneViewport .readouts,
#stage.is-play-layout #sceneViewport #dialogue,
#stage.is-play-layout #sceneViewport #speaker,
#stage.is-play-layout #sceneViewport #line,
#stage.is-play-layout #sceneViewport .subtitle-colon,
#stage.is-play-layout #sceneViewport #toast,
#stage.is-play-layout #sceneViewport #interact,
#stage.is-play-layout #sceneViewport #keyHints,
#stage.is-play-layout #sceneViewport #skipStory,
#stage.is-play-layout #sceneViewport .top-actions>button,
#stage.is-play-layout #sceneViewport #settings>summary,
#stage.is-play-layout #sceneViewport #touch button,
#stage.is-play-layout #sceneViewport #touch button span{
 font-weight:400;
 text-shadow:0 .7px 1.7px rgba(18,37,32,.55);
 -webkit-text-stroke:0;
}
#stage.is-play-layout #sceneViewport #chapter{color:#dac395}
#stage.is-play-layout #sceneViewport #name{color:#dbe0d9}
#stage.is-play-layout #sceneViewport #objective{color:#cbd7c8}
#stage.is-play-layout #sceneViewport .readouts span{color:#c5d4c9;font-weight:400}
#stage.is-play-layout #sceneViewport #speaker,
#stage.is-play-layout #sceneViewport .subtitle-colon{color:#c3d6da}
#stage.is-play-layout #sceneViewport #dialogue[data-speaker=duck] #speaker{color:#d5b9a4}
#stage.is-play-layout #sceneViewport #dialogue[data-speaker=snail] #speaker{color:#c5d6c4}
#stage.is-play-layout #sceneViewport #line,
#stage.is-play-layout #sceneViewport #toast{color:#dbe0d9}
#stage.is-play-layout #sceneViewport #interact{color:#dac395}
#stage.is-play-layout #sceneViewport #keyHints,
#stage.is-play-layout #sceneViewport #skipStory{color:#c5d4c9}
#stage.is-play-layout #sceneViewport .top-actions>button,
#stage.is-play-layout #sceneViewport #settings>summary{color:#d2dacf}

/* V13 reading surface. These are book controls, never backgrounds for scene labels. */
.roadbook-actions{display:flex;flex-wrap:wrap;gap:8px;margin:13px 0}
.roadbook-actions button{min-height:44px;padding:9px 13px;border:1px solid #aec5b23d;border-radius:6px;background:transparent;color:#cbdcd1;font:400 12px/1.5 BertCJK,sans-serif}
.roadbook-actions button:hover{border-color:#c6d7c680;background:#7d9b8810}.roadbook-actions button:disabled{opacity:.45;cursor:default}
.roadbook-status{display:block;font-size:12px;line-height:1.6;color:#afc7b9;min-height:1.6em;margin-bottom:8px}
.roadbook-nickname{display:flex;align-items:center;flex-wrap:wrap;gap:7px;font-size:13px;line-height:1.8;color:#c8d6cb}
.roadbook-nickname input{width:min(190px,50%);min-height:44px;border:0;border-bottom:1px solid #afc8b45c;border-radius:0;background:transparent;color:#dce7de;font:400 13px BertCJK,sans-serif;padding:7px}
.roadbook-question-form label{display:block;margin:14px 0;font-size:13px;line-height:1.8;color:#d0ddd1}
.roadbook-question-form textarea{display:block;width:100%;margin-top:6px;padding:12px;resize:vertical;min-height:92px;max-height:240px;background:#091d231f;border:1px solid #9db79c35;border-radius:5px;color:#d3ded5;font:400 13px/1.9 BertCJK,sans-serif;box-sizing:border-box}
.roadbook-question-archive{padding:8px 13px;border-bottom:1px solid #9cb8a826}.roadbook-question-archive p{white-space:pre-wrap}
.roadbook-edition{padding:14px 0;margin:9px 0;border-bottom:1px solid #adc3ad29}.roadbook-edition small{display:block;color:#a1b9ad;font-size:10px;line-height:1.7;overflow-wrap:anywhere}
.roadbook-novel{font-family:BertCJK,"Noto Serif CJK SC",serif;max-width:650px;margin:18px auto 8px}
.roadbook-novel>section{margin:25px 0 37px}.guide-content .roadbook-novel p{font-size:14px;line-height:2.15;font-weight:400;color:#c9d6ce;margin:13px 0;text-align:justify;letter-spacing:.02em}
.roadbook-novel h3{font-weight:400!important;letter-spacing:.06em}.guide-content .roadbook-novel .roadbook-act{font-size:11px;color:#99b6a7;margin-bottom:10px;letter-spacing:.1em}
.roadbook-ducknote{font-size:12px;line-height:1.9;color:#a4bfad;border-left:1px solid #a9bf9638;padding:7px 13px;margin:15px 0;font-style:italic}.roadbook-ducknote small{display:block;font-size:10px;font-style:normal;color:#8da799;margin-top:5px}
.roadbook-notes-toggle{display:flex;align-items:center;gap:9px;color:#a5c1ae;font-size:12px;min-height:44px}.roadbook-notes-toggle input{width:18px;height:18px;accent-color:#8dae9a}
.roadbook-facts pre{white-space:pre-wrap;overflow-wrap:anywhere;font:400 11px/1.8 BertCJK,monospace;color:#a6bdae;padding:0 13px 13px;margin:0}
.roadbook-identity p{font-size:11px;overflow-wrap:anywhere}.roadbook-ending{padding-top:15px;border-top:1px solid #a1c1a82a}
.roadbook-versions{display:flex;gap:9px;align-items:center;flex-wrap:wrap;margin:12px 0;font-size:12px;color:#a2bcac}.roadbook-versions select{min-height:44px;max-width:100%;padding:8px;background:#15343a;color:#c9d8cb;border:1px solid #aec5b23d;border-radius:5px;font:400 12px BertCJK,sans-serif}
@media(orientation:portrait){.guide-tabs{flex-wrap:wrap}.guide-tabs button{flex:1 1 40%;font-size:12px!important;min-height:44px}.guide-content .roadbook-novel p{font-size:13px;line-height:2}.roadbook-actions{gap:6px}.roadbook-actions button{flex:1 1 40%}.roadbook-nickname input{width:145px}.roadbook-novel>section{margin-bottom:28px}}

/* Four pocket-book tabs keep one row within a phone width. */
@media(max-width:520px){.guide-tabs{padding:9px 12px;gap:2px}.guide-tabs button{padding:8px 3px;font-size:12px;min-width:0}.journey-status{max-width:24em;font-size:12px;line-height:1.65}.menu-hook{font-size:clamp(15px,4.1vw,19px)}}

.roadbook-author-text p{padding:0 16px;margin:10px 0!important;font-size:13px!important;line-height:2!important;font-weight:400!important}.roadbook-author-text summary{font-size:13px!important;letter-spacing:.04em}.roadbook-author-signature{text-align:right;margin-bottom:18px!important;color:#9eb7a8!important}
.roadbook-habits table{width:calc(100% - 26px);margin:0 13px 13px;border-collapse:collapse;font-size:12px;line-height:1.8;color:#bdcec2}.roadbook-habits th,.roadbook-habits td{text-align:left;padding:10px 8px;vertical-align:top;border-bottom:1px solid #a5bda826;font-weight:400}.roadbook-habits th{color:#d1dfd3}.roadbook-habits td:first-child{width:30%}
.roadbook-about-credit{font-size:12px!important;color:#a9c1af!important;margin-top:24px!important}.roadbook-about-credit button{font:22px/1 Georgia,serif;min-width:44px;min-height:44px;background:transparent;border:0;color:#b8caa0;vertical-align:middle}
@media(max-width:520px){.guide-tabs{flex-wrap:nowrap}.guide-tabs button{flex:1 1 0;font-size:11.5px!important}}

/* V14: stories are a first-class destination; scene lettering stays quiet. */
#sceneViewport #storyBook{white-space:nowrap;letter-spacing:.02em}
#stage.has-menu #storyBook{display:none}
.journey-copy{font-size:clamp(11px,.92cqw,13px);font-weight:400;line-height:1.8;color:#c3d2c8;margin:10px 0 0;max-width:27em}
#stage.has-menu .menu-literary-links{display:flex;align-items:center;justify-content:space-between;gap:14px;min-height:44px}
#stage.has-menu .menu-literary-links .text-button{align-self:auto;font-size:clamp(11px,.97cqw,13px);font-weight:400;min-height:44px;white-space:nowrap;padding:5px 0;color:#c8d5c1}
#stage.has-menu #menuProgress{margin-top:4px;font-size:11px;color:#a9c3b7}
@media(pointer:coarse) and (orientation:landscape) and (max-height:550px){.journey-copy{font-size:10px;line-height:1.5;margin-top:5px;max-width:29em}#stage.has-menu #menuProgress{margin-top:3px;font-size:10px}#stage.has-menu .menu-literary-links{gap:12px}#stage.has-menu .menu-literary-links .text-button{font-size:10px}}
@media(orientation:portrait){.journey-copy{font-size:12px;line-height:1.8;max-width:25em}#stage.has-menu .menu-literary-links .text-button{font-size:12px}#sceneViewport #storyBook{font-size:11px}}

/* V14: the novel is a first-class reading surface, without a paper texture. */
#guide.is-story .guide-tabs,#guide.is-bookcase .guide-tabs{display:none}
#guide.is-story .guide-book,#guide.is-bookcase .guide-book{max-width:960px;max-height:760px;background:#e9eee8;border-color:#b7c6b8;color:#354d45}
#guide.is-story .guide-heading,#guide.is-bookcase .guide-heading{border-bottom:1px solid #cbd5cb}
#guide.is-story .guide-heading h2,#guide.is-bookcase .guide-heading h2{font-weight:400;color:#35564a}
#guide.is-story .eyebrow,#guide.is-bookcase .eyebrow{color:#6c8173}
#guide.is-story .guide-close,#guide.is-bookcase .guide-close{color:#3b594c;border-color:#afc1b3;background:transparent}
#guide.is-story .guide-content,#guide.is-bookcase .guide-content{padding:24px 36px;color:#405a4e}
#guide.is-story .guide-content p,#guide.is-bookcase .guide-content p{color:#405a4e;font-weight:400}
.story-cover{text-align:center;padding:12px 0 25px;border-bottom:1px solid #c8d3c8}
.guide-content .story-cover h3{font-size:clamp(25px,4vw,36px);font-weight:400;letter-spacing:.12em;margin:10px 0 18px;color:#2f5143}
.story-kicker{font-size:12px!important;letter-spacing:.08em;color:#6b8373!important}
.story-credit,.story-companion,.story-origin,.story-written-to{font-size:13px!important;line-height:1.9!important;margin:5px 0!important}
.story-written-to{color:#6e7f68!important}.story-main-actions,.story-export-actions,.story-library-actions{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0 10px}
#guide.is-story button,#guide.is-bookcase button,.story-file-button{font-weight:400;font-size:13px;line-height:1.6;min-height:44px;padding:9px 14px;border:1px solid #b7c8b9;border-radius:7px;background:transparent;color:#365548;cursor:pointer}
#guide.is-story button:hover,#guide.is-bookcase button:hover{background:#dce5db}#guide.is-story button:disabled,#guide.is-bookcase button:disabled{opacity:.42;cursor:default}
#guide.is-story .story-primary,#guide.is-bookcase .story-primary{background:#d3e1d2;border-color:#92ad96;color:#284e3c}
.story-export-actions button{font-size:12px!important;padding:6px 11px!important;min-height:36px!important}
#guide.is-story input,#guide.is-story select{font:400 13px BertCJK,sans-serif;background:#f3f5ef;color:#3c5649;border:1px solid #b5c7b6;border-radius:5px;padding:8px;min-width:0;max-width:100%}
.story-name-settings{margin:14px 0}.story-name-settings summary{background:transparent!important;color:#536f5d;font-weight:400}.story-name-settings label{display:flex;align-items:center;gap:10px}.story-name-settings p,.story-archive-note{font-size:12px!important;line-height:1.85!important}
.story-reader-controls{display:grid;grid-template-columns:1fr 1.4fr;gap:15px;border-top:1px solid #cbd5cb;padding-top:19px;margin-top:17px}.story-reader-controls label{display:flex;flex-direction:column;gap:7px;font-size:12px}.story-reader-controls select{width:100%}
.story-page-turn{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:15px 0}.story-page-turn span{font-size:12px;color:#d8caac;background:#0a212655;border:1px solid #cbb3832a;border-radius:999px;padding:5px 12px}
#guide.is-story .story-novel{max-width:680px;margin:24px auto}#guide.is-story .story-novel h3{font-size:23px;color:#35564a;font-weight:400;letter-spacing:.04em;margin:18px 0}
#guide.is-story .story-novel p{font-size:16px;line-height:2.15;letter-spacing:.025em;color:#3e5348;font-weight:400;margin:18px 0;text-align:justify}
#guide.is-story .story-novel .roadbook-act{font-size:12px;letter-spacing:.1em;color:#75856e;margin-bottom:8px}
#guide.is-story .story-novel .roadbook-ending{color:#627661;border-top:1px solid #cad5c7;padding-top:19px}
#guide.is-story .roadbook-author-text{color:#536b5b;border-color:#c4d2c5}#guide.is-story .roadbook-author-text summary{background:transparent;color:#536b5b;font-weight:400}#guide.is-story .roadbook-ducknote{color:#66765c;border-color:#aabb99;background:transparent}
#guide.is-story .roadbook-notes-toggle{color:#5b7360;font-size:12px}.story-reading-extras{display:flex;flex-wrap:wrap;gap:7px;border-top:1px solid #cad5c8;margin-top:22px;padding-top:15px}
#guide.is-story .roadbook-status,#guide.is-bookcase .roadbook-status{display:block;min-height:1.7em;color:#58725a;font-size:12px;line-height:1.7}
#guide.is-story .guide-footer,#guide.is-bookcase .guide-footer{border-top:1px solid #c6d3c6;background:transparent}#guide.is-story .guide-footer p,#guide.is-bookcase .guide-footer p{color:#637b65}
.story-library-head h3{font-weight:400;font-size:25px;color:#38594a;margin:8px 0}.story-library-head p{font-size:13px;line-height:1.85}.story-shelf{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin-top:20px}.story-shelf-card{border:1px solid #c5d1c2;border-radius:8px;padding:23px 21px;background:transparent}.story-shelf-card h3{font-weight:400;font-size:24px;color:#355447;margin:8px 0 13px}.story-shelf-label{font-size:11px!important;color:#71856b!important;letter-spacing:.08em}.story-shelf-card p{font-size:13px;line-height:1.9}.story-shelf-ending{min-height:3.6em}.story-shelf-card small{display:block;color:#71836c;font-size:11px;margin-top:10px}.story-file-button{position:relative;display:inline-flex;align-items:center}.story-file-button input{position:absolute;inset:0;width:100%;opacity:0;cursor:pointer}
@media(max-width:600px){#guide.is-story .guide-content,#guide.is-bookcase .guide-content{padding:17px 18px}#guide.is-story .guide-book,#guide.is-bookcase .guide-book{max-height:none}.story-cover{padding:5px 0 18px}.story-main-actions button{flex:1 1 43%;font-size:12px!important;padding:9px 8px!important}.story-export-actions button{flex:1 1 43%}.story-reader-controls{grid-template-columns:1fr;gap:10px}.story-shelf{grid-template-columns:1fr;gap:14px}.story-shelf-card{padding:19px}.story-library-actions{gap:7px}.story-library-actions>*{flex:1 1 43%}#guide.is-story .story-novel p{font-size:15px;line-height:2.05}#guide.is-story .story-novel h3{font-size:21px}.story-origin{font-size:11px!important}.story-reading-extras button{font-size:12px!important}}
@media(orientation:landscape) and (max-height:610px){#guide.is-story .guide-heading,#guide.is-bookcase .guide-heading{padding:10px 19px}#guide.is-story .guide-content,#guide.is-bookcase .guide-content{padding:16px 25px}.story-cover{padding:4px 0 14px}.story-main-actions{margin-top:11px}.story-main-actions button{min-height:36px!important;padding:6px 11px!important}.story-cover h3{font-size:27px!important}}

@media(pointer:coarse){#guide.is-story button,#guide.is-bookcase button,.story-file-button,.story-export-actions button{min-height:44px!important}}

.arrival-closing{display:grid;grid-template-columns:auto 1fr auto;gap:6px 10px;align-items:start;margin:16px 0;color:#c5d6ca;background:none;border:0;font-size:14px;line-height:1.8;font-weight:400}
.arrival-closing span,.card .arrival-closing p{font-weight:400;font-size:14px;line-height:1.8;margin:0;color:#c5d6ca}
.arrival-closing button{font-weight:400;font-size:20px;min-width:44px;min-height:44px;background:transparent;border:0;padding:0;color:#becfc0}
@media(max-width:520px){.arrival-closing{grid-template-columns:1fr auto;gap:3px 9px}.arrival-closing span{grid-column:1; font-size:12px}.arrival-closing p{grid-column:1}.arrival-closing button{grid-column:2;grid-row:1 / 3}}

/* V14.1: keep the cover copy in complete, light phrases. */
#stage.has-menu .menu-hook,#stage.has-menu .journey-copy{display:flex;flex-wrap:wrap;align-items:baseline;max-width:none;column-gap:0;row-gap:0;font-weight:400}
#stage.has-menu .menu-phrase{display:block;white-space:nowrap}
@media(orientation:portrait){#stage.has-menu .menu-hook{font-size:15px;line-height:1.6}#stage.has-menu .journey-copy{font-size:12px;line-height:1.8}}
/* V14.1: optional story editing stays inside the book, never over the forest. */
.story-ai-panel{margin:1.4rem 0 2rem;padding:1rem 0;border-top:1px solid rgba(181,207,186,.18);border-bottom:1px solid rgba(181,207,186,.18)}
.story-ai-panel summary{cursor:pointer;font-weight:500;line-height:1.7}
.story-ai-note{font-size:.86rem;line-height:1.8;color:#607665;max-width:58em}
.story-ai-config{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(10rem,1fr);gap:.8rem;margin:1rem 0}
.story-ai-config label,.story-ai-editions>label{display:grid;gap:.35rem;font-size:.88rem;min-width:0}
.story-ai-config input,.story-ai-config select,.story-ai-editions select,.story-ai-panel textarea{box-sizing:border-box;width:100%;min-width:0;border:1px solid rgba(190,210,194,.28);border-radius:8px;background:#f3f5ef;color:#3c5649;padding:.65rem .75rem;font-family:inherit;font-size:.9rem;font-weight:400;line-height:1.6}
.story-ai-panel textarea{resize:vertical;margin:.75rem 0;white-space:pre-wrap;overflow-wrap:anywhere;font-family:inherit}
.story-ai-buttons{display:flex;flex-wrap:wrap;align-items:center;gap:.55rem;margin:.9rem 0}
.story-ai-editions{display:grid;gap:.4rem;margin-top:.65rem}
.story-ai-reading{font-size:1rem;line-height:2;max-width:48em;margin:1.5rem auto}
.story-ai-reading h3{font-weight:500;line-height:1.7;margin:1.7rem 0 .9rem}
.story-ai-reading p{margin:1.15rem 0}
.story-ai-edition-label{font-size:.8rem;color:#607665;letter-spacing:.04em}
.story-ai-manual{margin:1rem 0}.story-ai-shelf{margin-top:2rem}
.story-ai-panel [hidden],.story-novel[hidden],.story-reader-controls[hidden],.story-page-turn[hidden]{display:none!important}
@media(max-width:560px){.story-ai-config{grid-template-columns:1fr}.story-ai-buttons{gap:.45rem}.story-ai-buttons button,.story-ai-buttons .story-file-button{font-size:.82rem;padding:.6rem .7rem}.story-ai-reading{font-size:.95rem;line-height:1.95}.story-ai-panel{margin-top:1rem}}

#guide.is-story .story-ai-panel summary{color:#35564a;background:transparent;font-weight:400}
#guide.is-story .story-ai-panel details{border-color:#c7d1c8}
#guide.is-story .story-ai-panel details[open]{background:transparent}
#guide.is-story .story-ai-reading h3{color:#35564a;font-weight:400}
#guide.is-story .story-ai-panel textarea{background:#f3f5ef;color:#3c5649}

/* V14.2: transient speech has a light, soft-edged forest scrim.
 * Physical signs and nearby mechanism labels retain their original bare type. */
#stage.is-play-layout #sceneViewport #dialogue,
#stage.is-play-layout #sceneViewport #dialogue[data-compact],
#stage.is-play-layout #sceneViewport #dialogue[data-layout]{justify-content:center;gap:5px}
#stage.is-play-layout #sceneViewport #dialogue>.subtitle-copy{
 flex:0 1 auto;max-width:calc(100% - 49px);min-width:0;padding:7px 16px;
 border:0;border-radius:12px;
 background:linear-gradient(90deg,rgba(9,28,27,0),rgba(9,28,27,.40) 14px,rgba(9,28,27,.44) 50%,rgba(9,28,27,.40) calc(100% - 14px),rgba(9,28,27,0));
 box-shadow:0 3px 17px rgba(8,24,21,.10);text-align:center;
}
#stage.is-play-layout #sceneViewport #toast{
 left:50%;width:max-content;max-width:88%;transform:translateX(-50%);
 padding:6px 16px;border:0;border-radius:12px;
 background:linear-gradient(90deg,rgba(9,28,27,0),rgba(9,28,27,.37) 14px,rgba(9,28,27,.42) 50%,rgba(9,28,27,.37) calc(100% - 14px),rgba(9,28,27,0))!important;
 box-shadow:0 3px 17px rgba(8,24,21,.08);
}
@media(pointer:coarse){
 #stage.is-play-layout #sceneViewport #dialogue>.subtitle-copy{padding:6px 13px}
}
@media(orientation:portrait){
 #stage.is-play-layout #sceneViewport #dialogue>.subtitle-copy{padding:6px 12px;max-width:calc(100% - 49px)}
 #stage.is-play-layout #sceneViewport #toast{max-width:90%;padding:6px 14px}
}
#stage.is-play-layout #sceneViewport:has(#dialogue:not([hidden])) #interact{visibility:hidden}
#guideBack{
 flex:0 0 auto;min-height:40px;padding:7px 10px;background:transparent;
 border:0;border-radius:6px;color:#d0dbc9;font-size:12px;font-weight:400;white-space:nowrap;
}
#guideBack:hover{background:rgba(137,165,134,.10)}
#guide.is-story #guideBack,#guide.is-bookcase #guideBack{color:#526e5d}
.guide-footer:has(#guideBack:not([hidden])){flex-wrap:wrap;gap:7px 12px}
.guide-footer:has(#guideBack:not([hidden])) #guideFootnote{flex:1 1 100%;max-width:none}
.guide-footer:has(#guideBack:not([hidden])) #guideContinue{margin-left:auto}
@media(pointer:coarse){#guideBack{min-height:44px}}
@media(orientation:portrait){
 .guide-footer:has(#guideBack:not([hidden])) #guideContinue{white-space:normal;max-width:calc(100% - 99px);font-size:11px;line-height:1.5}
 #guideBack{font-size:11px;padding:7px 5px}
 #stage.is-play-layout #sceneViewport #skipStory{top:96px;bottom:auto;right:3%}
}


/* V14.4 · refined forest interface. Lanes are measured in script-17. */
#shell, #shell:fullscreen, #shell:-webkit-full-screen, #shell.expanded{
 width:100%;height:100dvh;min-height:100svh;margin:0;background:#102a24;
}
#stage #sceneViewport #dialogue, #stage #sceneViewport #dialogue[data-compact],
#stage #sceneViewport #dialogue[data-layout]{align-items:center;gap:6px;pointer-events:none;max-height:none}
#stage #sceneViewport #dialogue>.subtitle-copy{
 padding:9px 17px;border-radius:18px;max-width:calc(100% - 50px);background:linear-gradient(90deg,rgba(8,25,22,0),rgba(8,25,22,.50) 18px,rgba(8,25,22,.54) 50%,rgba(8,25,22,.50) calc(100% - 18px),rgba(8,25,22,0));
}
#stage #sceneViewport #line,#stage #sceneViewport #speaker,
#stage #sceneViewport #dialogue[data-compact] #line,#stage #sceneViewport #dialogue[data-compact] #speaker{
 font:400 17px/1.75 BertCJK,"Microsoft YaHei",sans-serif;color:#f0f0df;white-space:normal;overflow-wrap:anywhere;word-break:normal;
}
#stage #sceneViewport #speaker{color:#e2d39f!important;font-size:14px!important}
#stage #sceneViewport #dialogueNext{pointer-events:auto;width:44px;height:44px;min-width:44px;min-height:44px;flex:0 0 44px;border:1px solid #c7d2aa60;border-radius:60% 36% 54% 34%;background:#173b30b8;color:#f0e4bc;font-size:26px}
#stage.is-play-layout #sceneViewport #toast{font:400 14px/1.75 BertCJK,sans-serif;color:#f3edda;padding:8px 16px;background:linear-gradient(90deg,rgba(8,26,21,0),rgba(8,26,21,.51) 18px,rgba(8,26,21,.51) calc(100% - 18px),rgba(8,26,21,0))!important;white-space:normal;overflow-wrap:anywhere}
#stage.is-play-layout #sceneViewport #interact{visibility:visible!important;font:400 13px/1.6 BertCJK,sans-serif;color:#f3e2b3;background:linear-gradient(90deg,transparent,#112e25ba 18px,#112e25ba calc(100% - 18px),transparent);border:0;border-radius:12px;padding:5px 12px;pointer-events:none}
#stage.is-play-layout #sceneViewport #hud{padding:7px 12px 10px;border-radius:0 0 20px 0;background:linear-gradient(105deg,rgba(8,27,22,.50),rgba(8,27,22,.32) 72%,transparent);max-width:min(620px,calc(100% - 270px));}
#stage.is-play-layout #sceneViewport #chapter{font-size:11px;color:#e6d6a9;line-height:1.5}
#stage.is-play-layout #sceneViewport #name{font-size:17px;color:#f0eedc;line-height:1.6}
#stage.is-play-layout #sceneViewport #objective{font-size:13px;line-height:1.7;color:#dfebd7;max-width:100%;margin-top:3px}
#sceneViewport .topbar{border-radius:0 0 0 18px;background:linear-gradient(265deg,rgba(7,26,23,.46),transparent);padding:0 4px 4px 8px}
#sceneViewport .top-actions>button,#sceneViewport #settings>summary{font-size:13px;color:#edf0dc;min-height:44px}
#fullscreenStatus{display:block;margin:10px 0;padding:8px 10px;border-left:2px solid #c9b47a;color:#dbe8d1;font:400 12px/1.7 BertCJK,sans-serif;white-space:normal}
#fullscreenStatus[hidden]{display:none}
#stage #sceneViewport #touch button{border-radius:58% 34% 55% 38%;background:linear-gradient(145deg,#385948eb,#193b2edc);border:1px solid #d8d3aa9e;color:#f4eacb;box-shadow:inset 0 1px 0 #efe5ba35,0 3px 13px #09231d50}
#stage #sceneViewport #touch button[data-key=jump]{border-radius:61% 34% 59% 40%;background:linear-gradient(135deg,#536b43ee,#294b37ed);color:#f6edcd;border-color:#e1d29ba8}
#stage #sceneViewport #touch button[data-key=jump]::before{opacity:.66}
#stage #sceneViewport #touch button[data-key=jump] span{font-weight:500}
#stage #sceneViewport #touch button.is-held{background:linear-gradient(135deg,#6d7e4ceb,#405d39ed);transform:translateY(1px);filter:brightness(1.08)}
#stage #sceneViewport #touch button[data-key=act].is-idle{opacity:.76}
#stage #sceneViewport #touch button[data-key=act].is-ready{border-color:#ead299;box-shadow:inset 0 0 0 1px #e0cb8780,0 2px 12px #d7c88530}
#stage #sceneViewport #skipStory{min-height:36px;padding:4px 12px;border:1px solid #dce0b550;border-radius:18px;background:#173b30a8;color:#eee7c9}
body[data-text-size=large] #stage #sceneViewport #line,
body[data-text-size=large] #stage #sceneViewport #dialogue[data-compact] #line{font-size:20px;line-height:1.75}
body[data-text-size=large] #stage #sceneViewport #toast{font-size:16px}
body[data-text-size=large] #guide .guide-content p{font-size:16px!important;line-height:1.9!important}
@media(pointer:coarse),(max-width:900px){
 #stage #sceneViewport #line,#stage #sceneViewport #dialogue[data-compact] #line{font-size:15px;line-height:1.7}
 #stage #sceneViewport #speaker{font-size:12px!important}
 #stage #sceneViewport #dialogue>.subtitle-copy{padding:6px 13px}
 #stage.is-play-layout #sceneViewport #name{font-size:15px}
 #stage.is-play-layout #sceneViewport #objective{font-size:12px}
 #stage.is-play-layout #sceneViewport #toast{font-size:13px;padding:6px 14px}
 #stage #sceneViewport #touch button{min-width:48px;min-height:48px}
 body[data-text-size=large] #stage #sceneViewport #line,body[data-text-size=large] #stage #sceneViewport #dialogue[data-compact] #line{font-size:17px}
}
@media(orientation:portrait){
 #stage.is-play-layout #sceneViewport #hud{top:55px;left:3%;width:94%;max-width:94%;padding:6px 10px 8px;box-sizing:border-box}
 #stage.is-play-layout #sceneViewport .topbar{top:max(4px,env(safe-area-inset-top,0px));right:3%;left:auto;width:auto;max-width:94%}
 #stage #sceneViewport #toast{font-size:13px}
 #stage #sceneViewport #dialogueNext{align-self:center}
 #stage #sceneViewport #keyHints{display:none}
 #guide .guide-heading h2{font-size:19px}
 #guide .guide-tabs{gap:2px}
 #guide .guide-content{padding:15px}
}
@media(orientation:landscape) and (max-height:450px){
 #stage.is-play-layout #sceneViewport #hud{top:5px;left:max(2%,env(safe-area-inset-left,0px));max-width:calc(100% - 275px);padding:4px 10px 6px}
 #stage.is-play-layout #sceneViewport #chapter{font-size:10px}
 #stage.is-play-layout #sceneViewport #name{font-size:14px;line-height:1.4}
 #stage.is-play-layout #sceneViewport #objective{font-size:12px;line-height:1.55}
 #stage #sceneViewport #line,#stage #sceneViewport #dialogue[data-compact] #line{font-size:14px;line-height:1.6}
 #stage #sceneViewport #touch button{min-height:48px}
 #stage #sceneViewport #keyHints{display:none}
}

/* Portrait title is drawn at the true viewport aspect. No flat upper slab,
   stretched actors, external background request or unreadable image seam. */
@media(orientation:portrait){
 #stage.has-menu #sceneViewport #game{inset:0;width:100%;height:100%;aspect-ratio:auto}
 #stage.has-menu #overlay[data-panel=menu]::before{background:linear-gradient(180deg,#092b26c4 0%,#143b30bd 34%,#153b3090 68%,#143b3030 100%)}
 #stage.has-menu .menu-panel{padding-bottom:4%}
}

/* Final bright-cloud/forest review: supersede the older transparent !important
   action background. Contrast must survive sky, pale stone and dappled leaves. */
#stage.is-play-layout #sceneViewport #dialogue>.subtitle-copy{
 background:linear-gradient(90deg,rgba(8,25,22,0),rgba(8,25,22,.68) 18px,rgba(8,25,22,.70) 50%,rgba(8,25,22,.68) calc(100% - 18px),rgba(8,25,22,0));
}
#stage.is-play-layout #sceneViewport #toast{
 background:linear-gradient(90deg,rgba(8,26,21,0),rgba(8,26,21,.68) 18px,rgba(8,26,21,.68) calc(100% - 18px),rgba(8,26,21,0))!important;
}
#stage.is-play-layout #sceneViewport #interact{
 background:linear-gradient(90deg,rgba(17,46,37,0),rgba(17,46,37,.84) 14px,rgba(17,46,37,.84) calc(100% - 14px),rgba(17,46,37,0))!important;
 color:#faf0ce;text-shadow:0 1px 2px rgba(8,24,19,.65);padding:6px 16px;
}


/* V14.5 final presentation contract: one light scrim, one type scale, one forest book. */
:root{--caption-size:17px;--forest-paper:#182f30;--forest-panel:#213b3b;--forest-text:#e5e7d7;--forest-muted:#b2c7b8;--forest-gold:#e5d2a2;--forest-rule:#a9bea23d;--scrim-alpha:.38}
#sceneViewport .topbar,#stage.is-play-layout #sceneViewport .topbar{background:none!important;box-shadow:none!important;border:0;padding:0;backdrop-filter:none;filter:none}
#stage.is-play-layout #sceneViewport #hud{background:none!important;border:0;box-shadow:none!important;padding:5px 0;text-shadow:none!important}
#sceneViewport .top-actions{align-items:center!important;gap:5px;}
#sceneViewport .top-actions>button,#sceneViewport #settings>summary{display:inline-flex!important;align-items:center;justify-content:center;box-sizing:border-box;block-size:44px;min-height:44px;padding:0 5px!important;line-height:1!important;font:400 13px/1 BertCJK,"Microsoft YaHei",sans-serif!important;letter-spacing:0;background:none!important;text-shadow:none!important;box-shadow:none!important;color:var(--ui-ink,#edeedb)!important}
#sceneViewport #settings{height:44px;align-self:center;margin:0}
#sceneViewport #settings>summary::after{font:inherit;font-size:11px;line-height:1;margin-left:4px;display:inline-block}
#sceneViewport .top-actions>button:hover,#sceneViewport #settings>summary:hover{color:var(--ui-ink,#fff0bf)!important;text-decoration:underline;text-underline-offset:5px}
#stage #sceneViewport #hud :is(#chapter,#name,#objective){color:var(--ui-ink,#eee8cc)!important;text-shadow:none!important}
#stage #sceneViewport #dialogue,#stage #sceneViewport #dialogue[data-compact],#stage #sceneViewport #dialogue[data-layout]{background:none!important;padding:0!important;box-shadow:none!important;filter:none!important;backdrop-filter:none!important;border:0!important;justify-content:center;text-shadow:none!important;gap:5px}
#stage #sceneViewport #dialogue>.subtitle-copy{border:0!important;box-shadow:none!important;backdrop-filter:none!important;border-radius:14px;padding:8px 16px!important;background:linear-gradient(90deg,rgba(10,29,26,0),rgba(10,29,26,var(--scrim-alpha)) 16px,rgba(10,29,26,var(--scrim-alpha)) calc(100% - 16px),rgba(10,29,26,0))!important;flex:0 1 auto;max-width:calc(100% - 49px);font-size:var(--caption-size);line-height:1.75}
#stage #sceneViewport #dialogue :is(#speaker,#line,.subtitle-colon),#stage #sceneViewport #dialogue[data-compact] :is(#speaker,#line,.subtitle-colon),#stage #sceneViewport #dialogue[data-layout] :is(#speaker,#line,.subtitle-colon){display:inline!important;font:400 var(--caption-size)/1.75 BertCJK,"Microsoft YaHei",sans-serif!important;letter-spacing:0!important;color:#f4efdc!important;vertical-align:baseline;text-shadow:0 .7px 1.2px rgba(9,25,22,.4)!important;margin:0}
#stage #sceneViewport #dialogue #speaker{color:#e9d9b2!important}
#stage #sceneViewport #dialogueNext{background:rgba(19,46,37,.30)!important;border:1px solid #dfdbb05c!important;border-radius:60% 36% 54% 34%;text-shadow:none!important;box-shadow:none;min-width:44px;min-height:44px}
#stage.is-play-layout #sceneViewport :is(#toast,#interact){background:linear-gradient(90deg,rgba(10,29,26,0),rgba(10,29,26,var(--scrim-alpha)) 14px,rgba(10,29,26,var(--scrim-alpha)) calc(100% - 14px),rgba(10,29,26,0))!important;box-shadow:none!important;backdrop-filter:none;filter:none;text-shadow:0 .7px 1.2px rgba(9,25,22,.4)!important;border:0;padding:6px 14px!important;color:#f4efdc;font-weight:400}
#stage #sceneViewport #keyHints{background:none!important;text-shadow:0 .7px 1px rgba(9,25,22,.28)!important}
body[data-text-size=large]{--caption-size:20px}
#guide,#guide.is-story,#guide.is-bookcase{color-scheme:dark;background:rgba(7,22,21,.52)}
#guide .guide-book,#guide.is-story .guide-book,#guide.is-bookcase .guide-book{color:var(--forest-text);background:linear-gradient(145deg,#233d3d,#172d2e);border:1px solid #bcc49b69;box-shadow:0 18px 65px #00140e4d}
#guide :is(.guide-heading,.guide-tabs,.guide-footer){background:none!important;border-color:var(--forest-rule)!important}
#guide :is(.guide-heading h2,.guide-content h3),#guide.is-story :is(.guide-heading h2,.guide-content h3),#guide.is-bookcase :is(.guide-heading h2,.guide-content h3){color:var(--forest-gold)!important}
#guide .guide-tabs,#guide.is-story .guide-tabs,#guide.is-bookcase .guide-tabs{display:flex;gap:5px}
#guide .guide-tabs button,#guide.is-story .guide-tabs button,#guide.is-bookcase .guide-tabs button{color:var(--forest-muted)!important;background:none!important;border:1px solid transparent!important;min-height:44px;border-radius:8px;padding:9px 8px;font:400 13px/1.5 BertCJK,sans-serif}
#guide .guide-tabs button.active,#guide.is-story .guide-tabs button.active,#guide.is-bookcase .guide-tabs button.active{color:var(--forest-gold)!important;border-color:#dac18a70!important;background:#d6bb7720!important}
#guide .guide-content,#guide.is-story .guide-content,#guide.is-bookcase .guide-content{background:none!important;color:var(--forest-text)!important;scrollbar-color:#8a9c7c #1a3231}
#guide.is-story .guide-content p,#guide.is-bookcase .guide-content p,#guide.is-story .story-novel p{color:var(--forest-text)!important}
#guide.is-story :is(.story-kicker,.story-credit,.story-origin,.story-written-to,.story-companion,.story-shelf-label,.story-archive-note,.story-ai-note,.story-ai-edition-label),#guide.is-bookcase :is(p,small),#guide .story-page-turn span{color:var(--forest-muted)!important}
#guide.is-story button,#guide.is-bookcase button,#guide :is(.story-file-button,.roadbook-more){background:rgba(155,179,144,.045);color:var(--forest-text)!important;border-color:var(--forest-rule);min-height:44px}
#guide.is-story button:hover,#guide.is-bookcase button:hover{background:#bacb9e16}
#guide :is(.story-primary,#guideContinue),#guide.is-story :is(.story-primary,#guideContinue),#guide.is-bookcase :is(.story-primary,#guideContinue){background:#d9c797!important;color:#253e32!important;border-color:#decea2!important}
#guide :is(.story-cover,.story-shelf-card,.story-name-settings,.story-ai-panel,.story-page-turn,.story-reader-controls,.story-novel section){background:none!important;border-color:var(--forest-rule)!important}
#guide.is-story :is(input,select,textarea),#guide.is-bookcase :is(input,select,textarea){background:#152d2d!important;color:var(--forest-text)!important;border-color:#abc19d50!important;accent-color:#d4c58d}
#guide :is(.story-page-turn span,.story-reader-controls label,.story-name-settings label,.roadbook-status,.story-reading-extras,.story-ai-panel summary){color:var(--forest-muted)!important;background:none!important}
#guide .story-page-turn span{border:0!important;font-variant-numeric:tabular-nums;font-size:13px}
#guide .story-page-turn button{min-width:80px}
#guide.is-story .guide-footer p,#guide.is-bookcase .guide-footer p{color:var(--forest-muted)!important}
#guide .guide-log pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;color:#c5d1bc;margin:10px}
#guide .guide-log small{color:#a6baa9;font-size:12px}
#guide .roadbook-more{width:100%;border:1px solid var(--forest-rule);border-radius:8px;padding:10px;margin:14px 0}
#arrivalClosing{background:none!important;border:0!important;color:var(--forest-text);padding:8px 0}
#arrivalClosingSpeaker,#arrivalClosingLine{display:inline;font:400 var(--caption-size)/1.8 BertCJK,sans-serif;color:var(--forest-text)}
#arrivalClosingSpeaker::after{content:'： '}
@media(pointer:coarse),(max-width:900px){:root{--caption-size:15px}body[data-text-size=large]{--caption-size:18px}#sceneViewport .top-actions{gap:1px}#sceneViewport .top-actions>button,#sceneViewport #settings>summary{font-size:12px!important;padding:0 3px!important}#stage #sceneViewport #dialogue>.subtitle-copy{padding:6px 12px!important}}
@media(orientation:portrait){#guide .guide-tabs,#guide.is-story .guide-tabs,#guide.is-bookcase .guide-tabs{flex-wrap:wrap}#guide .guide-tabs button,#guide.is-story .guide-tabs button,#guide.is-bookcase .guide-tabs button{flex:1 1 43%;font-size:12px!important;padding:6px 4px!important}#guide :is(.guide-heading,.guide-footer){padding:10px 15px}#guide .guide-heading .eyebrow{font-size:10px}#guide .guide-content{padding:16px 18px!important}.story-reader-controls{grid-template-columns:1fr}}
@media(orientation:landscape) and (max-height:450px){:root{--caption-size:14px}body[data-text-size=large]{--caption-size:16px}#guide .guide-tabs button{padding:4px 6px!important}#guide .guide-heading{padding:8px 18px!important}#guide .guide-footer{padding:6px 18px!important}}

/* Reading first: exports and model options stay available without preceding the story. */
#guide.is-story .story-tools{border:1px solid var(--forest-rule);border-radius:8px;margin:10px 0;background:none;color:var(--forest-text)}
#guide.is-story .story-tools>summary{min-height:44px;color:var(--forest-muted);padding:10px 12px;line-height:1.6}
#guide.is-story .story-tools>div,#guide.is-story .story-tools>.story-name-settings{margin:10px 12px}
#guide.is-story .story-tools .story-name-settings{border-color:var(--forest-rule)}
#guide.is-story .story-cover{padding:6px 0 15px}
#guide.is-story .story-cover h3{margin:8px 0 10px!important}
#guide.is-story .story-ai-panel{margin-top:24px;padding-top:16px}
#guide.is-story :is(.story-name-settings summary,.roadbook-author-text summary,.roadbook-notes-toggle,.roadbook-ducknote,.story-ai-config label){color:var(--forest-muted)!important}
#guide.is-story .roadbook-status:empty{display:none}
#guide.is-story .story-main-actions{margin:12px 0 8px}
#recordClearDialog{background:#203937!important;color:#e5e7d7!important;border-color:#a6b39680!important;box-shadow:0 16px 65px #03161080}
#recordClearDialog .record-clear-actions{background:#203937!important}
#recordClearDialog button{background:#2b4540!important;border-color:#8da58380!important;color:#e4e6d2!important}
#recordClearDialog #recordClearConfirm{background:#d5c297!important;color:#243b31!important}

/* V14.6 · a single adaptive mist behind each message, never a full-width black strip. */
:root{--scrim-alpha:.22;--caption-rgb:10,29,26;--caption-ink:#f4efdc;--caption-name:#f4efdc;--caption-shadow:rgba(9,25,22,.34)}
#stage #sceneViewport #dialogue>.subtitle-copy{background:linear-gradient(90deg,rgba(var(--caption-rgb),0),rgba(var(--caption-rgb),var(--scrim-alpha)) 16px,rgba(var(--caption-rgb),var(--scrim-alpha)) calc(100% - 16px),rgba(var(--caption-rgb),0))!important;transition:background-color .2s,color .2s}
#stage #sceneViewport #dialogue :is(#speaker,#line,.subtitle-colon),#stage #sceneViewport #dialogue[data-compact] :is(#speaker,#line,.subtitle-colon),#stage #sceneViewport #dialogue[data-layout] :is(#speaker,#line,.subtitle-colon){color:var(--caption-ink)!important;text-shadow:0 .65px 1px var(--caption-shadow)!important}
#stage #sceneViewport #dialogue #speaker{color:var(--caption-name)!important}
#stage.is-play-layout #sceneViewport :is(#toast,#interact){background:linear-gradient(90deg,rgba(var(--caption-rgb),0),rgba(var(--caption-rgb),var(--scrim-alpha)) 14px,rgba(var(--caption-rgb),var(--scrim-alpha)) calc(100% - 14px),rgba(var(--caption-rgb),0))!important;color:var(--caption-ink)!important;text-shadow:0 .65px 1px var(--caption-shadow)!important}
#stage #sceneViewport #dialogueNext{color:var(--caption-ink)!important;background:rgba(var(--caption-rgb),.18)!important;border-color:rgba(var(--caption-rgb),.26)!important}
#guide.is-story .story-cover h3{font-size:clamp(21px,2.4vw,31px)!important;line-height:1.7!important;letter-spacing:.03em;overflow-wrap:anywhere}
#guide .story-shelf-card h3{font-size:clamp(20px,2vw,25px);line-height:1.7}
#guide .roadbook-novel.story-novel p{line-height:2.1!important;margin-bottom:1.2em}
#guide .roadbook-author-text{margin-top:1.5rem}
#guide .roadbook-author-text summary{min-height:44px}
@media(prefers-reduced-motion:reduce){#stage #sceneViewport #dialogue>.subtitle-copy{transition:none}}

/* V14.7: the end-card paragraph rule must not shrink only the speech body. */
#stage #arrivalClosing :is(#arrivalClosingSpeaker,#arrivalClosingLine){font:400 var(--caption-size)/1.8 BertCJK,"Microsoft YaHei",sans-serif!important;letter-spacing:0!important;vertical-align:baseline;color:var(--forest-text)}

/* V18.2.1 · Real medium/semibold faces keep small counters open.
 * Contrast comes from the measured local scrim, never a heavy outline. */
:root{--scrim-alpha:.64;--caption-rgb:8,24,22;--caption-ink:#fff9e7;--caption-name:#fff9e7;--caption-shadow:rgba(3,14,12,.38);--caption-size:18px}
html,body{overscroll-behavior:none;width:100%;height:100%;overflow:hidden}
#shell,#shell:fullscreen,#shell.expanded{height:var(--bert-viewport-height,100dvh);min-height:0}
#stage #sceneViewport #dialogue :is(#speaker,#line,.subtitle-colon),#stage #sceneViewport #dialogue[data-compact] :is(#speaker,#line,.subtitle-colon),#stage #sceneViewport #dialogue[data-layout] :is(#speaker,#line,.subtitle-colon){font-weight:500!important;font-size:var(--caption-size)!important;line-height:1.72!important;color:var(--caption-ink)!important;font-synthesis:none;text-shadow:0 .5px .7px var(--caption-shadow)!important;-webkit-text-stroke:0}
#stage #sceneViewport #dialogue>.subtitle-copy{padding:8px 20px!important;max-width:calc(100% - 56px);border-radius:18px;line-height:1.72;backdrop-filter:none!important;-webkit-backdrop-filter:none}
#stage.is-play-layout #sceneViewport :is(#toast,#interact){font-family:BertCJK,"Microsoft YaHei",sans-serif;font-weight:600!important;line-height:1.72!important;font-size:clamp(14px,1.15cqw,17px)!important;white-space:normal;overflow-wrap:anywhere;padding:7px 18px!important;border-radius:14px;font-synthesis:none;text-shadow:0 .5px .7px var(--caption-shadow)!important;-webkit-text-stroke:0;backdrop-filter:none!important;-webkit-backdrop-filter:none}
#stage #sceneViewport #dialogueNext{touch-action:manipulation;user-select:none;-webkit-user-select:none;min-width:48px!important;min-height:48px!important;border-radius:50%;font-weight:600;background:rgba(var(--caption-rgb),.50)!important;box-shadow:0 2px 8px #10201955!important;color:var(--caption-ink)!important}
#stage #sceneViewport #hud :is(#chapter,#name,#objective),#sceneViewport .top-actions>button,#sceneViewport #settings>summary{font-family:BertCJK,"Microsoft YaHei",sans-serif;font-weight:500!important;font-synthesis:none;text-shadow:0 .5px .8px #071b1788!important}
#stage #sceneViewport #hud [data-ink-tone=dark],#sceneViewport .top-actions>[data-ink-tone=dark],#sceneViewport #settings>[data-ink-tone=dark]{text-shadow:0 .5px .8px #fffbe899!important}
#sceneViewport #touch button{touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;min-width:48px;min-height:48px}
#sceneViewport #touch{padding-left:max(3%,calc(env(safe-area-inset-left) + 12px));padding-right:max(3%,calc(env(safe-area-inset-right) + 12px));padding-bottom:max(23px,calc(env(safe-area-inset-bottom) + 12px))}
#sceneViewport .topbar{top:max(8px,env(safe-area-inset-top));left:max(2.8%,calc(env(safe-area-inset-left) + 8px));right:max(2.8%,calc(env(safe-area-inset-right) + 8px))}
#sceneViewport #hud{left:max(3%,calc(env(safe-area-inset-left) + 8px));top:max(12px,calc(env(safe-area-inset-top) + 6px))}
.guide-content,.settings-menu,.card,.menu-panel,.map-book{overscroll-behavior:contain;-webkit-overflow-scrolling:touch;touch-action:pan-y}
#guide input,#guide textarea,.settings-menu input[type=text]{font-size:16px!important}
.ambience-volume{display:grid;gap:7px;padding:8px 4px;font-size:12px;grid-column:1/-1}.ambience-volume input{width:100%;min-height:28px;accent-color:#d6c28a}
#guide .story-creator{font-size:12px!important;line-height:1.6;color:var(--forest-muted)!important;margin:4px 0 14px}.story-credit{font-weight:700}
@media(pointer:coarse),(max-width:900px){:root{--caption-size:16px}#stage #sceneViewport #dialogue>.subtitle-copy{padding:7px 16px!important}#sceneViewport #touch button{min-width:50px;min-height:50px}body[data-text-size=large]{--caption-size:19px}}
@media(orientation:landscape) and (max-height:450px){:root{--caption-size:15px}#stage.is-play-layout #sceneViewport :is(#toast,#interact){font-size:14px!important}#stage #sceneViewport #dialogue>.subtitle-copy{padding:5px 15px!important}body[data-text-size=large]{--caption-size:17px}}

/* Speaker and stage name are the only stronger accents in the play HUD. */
#stage #sceneViewport #dialogue #speaker,#stage #sceneViewport #dialogue[data-compact] #speaker,#stage #sceneViewport #dialogue[data-layout] #speaker,#stage #sceneViewport #hud #name{font-weight:600!important}
#stage #arrivalClosing :is(#arrivalClosingSpeaker,#arrivalClosingLine){font-weight:500!important;font-synthesis:none;-webkit-text-stroke:0;text-shadow:none!important}
#stage #arrivalClosing #arrivalClosingSpeaker{font-weight:600!important}

/* V18.3 · A quiet local mist, feathered in both axes. Only this decorative
 * layer is masked; type and focus outlines remain sharp. The opaque centre
 * retains the alpha selected by the canvas contrast sampler. */
#stage #sceneViewport #dialogue,
#stage #sceneViewport #dialogue[data-compact],
#stage #sceneViewport #dialogue[data-layout],
#stage.is-play-layout #sceneViewport :is(#toast,#interact){
 isolation:isolate;overflow:visible;background:none!important;border:0!important;box-shadow:none!important;
 --caption-feather-x:24px;--caption-feather-y:12px;
}
#stage #sceneViewport #dialogue::before,
#stage.is-play-layout #sceneViewport :is(#toast,#interact)::before{
 content:"";position:absolute;z-index:-1;pointer-events:none;
 inset:calc(0px - var(--caption-feather-y)) calc(0px - var(--caption-feather-x));
 background:rgba(var(--caption-rgb),var(--scrim-alpha));
 border:0;border-radius:0;box-shadow:none;filter:none;
 --caption-mask-x:linear-gradient(90deg,transparent 0,rgba(0,0,0,.12) 6px,rgba(0,0,0,.5) 12px,rgba(0,0,0,.88) 18px,#000 24px,#000 calc(100% - 24px),rgba(0,0,0,.88) calc(100% - 18px),rgba(0,0,0,.5) calc(100% - 12px),rgba(0,0,0,.12) calc(100% - 6px),transparent 100%);
 --caption-mask-y:linear-gradient(180deg,transparent 0,rgba(0,0,0,.12) 3px,rgba(0,0,0,.5) 6px,rgba(0,0,0,.88) 9px,#000 12px,#000 calc(100% - 12px),rgba(0,0,0,.88) calc(100% - 9px),rgba(0,0,0,.5) calc(100% - 6px),rgba(0,0,0,.12) calc(100% - 3px),transparent 100%);
 -webkit-mask-image:var(--caption-mask-x),var(--caption-mask-y);
 -webkit-mask-composite:source-in;
 mask-image:var(--caption-mask-x),var(--caption-mask-y);mask-composite:intersect;
}
#stage #sceneViewport #dialogue>.subtitle-copy{background:none!important;border-radius:0;transition:none}
/* The continue control belongs to the same mist. Old compact/layout rules
 * must not resurrect its separate rectangular panel. Its hit area stays 48px. */
#stage #sceneViewport #dialogueNext,
#stage #sceneViewport #dialogue[data-compact] #dialogueNext,
#stage #sceneViewport #dialogue[data-layout] #dialogueNext{
 background:none!important;border:0!important;box-shadow:none!important;
 min-width:48px!important;min-height:48px!important;border-radius:50%;
 color:var(--caption-ink)!important;text-shadow:0 .5px .7px var(--caption-shadow)!important;
}
#stage #sceneViewport #dialogueNext:focus-visible{outline:2px solid var(--caption-ink);outline-offset:-5px}
@media(pointer:coarse),(max-width:900px){
 #stage #sceneViewport #dialogue,
 #stage #sceneViewport #dialogue[data-compact],
 #stage #sceneViewport #dialogue[data-layout],
 #stage.is-play-layout #sceneViewport :is(#toast,#interact){--caption-feather-x:16px;--caption-feather-y:10px}
 #stage #sceneViewport #dialogue::before,
 #stage.is-play-layout #sceneViewport :is(#toast,#interact)::before{
  --caption-mask-x:linear-gradient(90deg,transparent 0,rgba(0,0,0,.12) 4px,rgba(0,0,0,.5) 8px,rgba(0,0,0,.88) 12px,#000 16px,#000 calc(100% - 16px),rgba(0,0,0,.88) calc(100% - 12px),rgba(0,0,0,.5) calc(100% - 8px),rgba(0,0,0,.12) calc(100% - 4px),transparent 100%);
  --caption-mask-y:linear-gradient(180deg,transparent 0,rgba(0,0,0,.12) 2.5px,rgba(0,0,0,.5) 5px,rgba(0,0,0,.88) 7.5px,#000 10px,#000 calc(100% - 10px),rgba(0,0,0,.88) calc(100% - 7.5px),rgba(0,0,0,.5) calc(100% - 5px),rgba(0,0,0,.12) calc(100% - 2.5px),transparent 100%);
 }
}

/* V18.7 · scene first. Entry names pass through once; nearby mechanisms keep
 * the short actionable clues. Clear scenery carries ink without any panel. */
:root{--scrim-alpha:.12;--caption-rgb:12,30,25;--caption-ink:#fff9e7;--caption-shadow:rgba(10,24,18,.66);--caption-shadow-stack:0 .6px 1.1px rgba(10,24,18,.66),0 0 2px rgba(10,24,18,.66)}
#stage.is-play-layout #sceneViewport #hud{isolation:isolate;--hud-scrim-alpha:.10;--hud-rgb:12,30,25;--hud-shadow:0 .6px 1.1px rgba(10,24,18,.66);transition:opacity .8s ease;max-width:calc(100% - 210px);padding:5px 0!important}
#stage.is-play-layout #sceneViewport #hud :is(#chapter,#objective,.readouts){display:none!important}
#stage.is-play-layout #sceneViewport #hud #name{font-size:16px!important;line-height:1.5;letter-spacing:.025em;font-weight:500!important;text-shadow:var(--hud-shadow)!important}
#stage.is-play-layout #sceneViewport #hud[data-arrival-heading="show"]{opacity:1!important}
#stage.is-play-layout #sceneViewport #hud[data-arrival-heading="fading"]{opacity:0!important}
#stage.is-play-layout #sceneViewport #hud[data-arrival-heading="quiet"]{opacity:0!important;visibility:hidden!important}
#stage #sceneViewport .top-actions{position:relative;isolation:isolate;--hud-scrim-alpha:.10;--hud-rgb:12,30,25;--hud-shadow:0 .6px 1.1px rgba(10,24,18,.66)}
#stage.is-play-layout #sceneViewport #hud::before,#stage #sceneViewport .top-actions::before{
 content:"";position:absolute;z-index:-1;pointer-events:none;left:-30px;top:-18px;
 width:calc(var(--hud-copy-width,100%) + 60px);height:calc(100% + 36px);
 background:rgba(var(--hud-rgb),var(--hud-scrim-alpha));border:0;border-radius:0;box-shadow:none;filter:none;transition:background-color .45s ease;
 --hud-mask-x:linear-gradient(90deg,transparent,rgba(0,0,0,.035) 9px,rgba(0,0,0,.30) 20px,#000 30px,#000 calc(100% - 30px),rgba(0,0,0,.30) calc(100% - 20px),rgba(0,0,0,.035) calc(100% - 9px),transparent);
 --hud-mask-y:linear-gradient(180deg,transparent,rgba(0,0,0,.035) 5px,rgba(0,0,0,.30) 12px,#000 18px,#000 calc(100% - 18px),rgba(0,0,0,.30) calc(100% - 12px),rgba(0,0,0,.035) calc(100% - 5px),transparent);
 -webkit-mask-image:var(--hud-mask-x),var(--hud-mask-y);-webkit-mask-composite:source-in;mask-image:var(--hud-mask-x),var(--hud-mask-y);mask-composite:intersect;
}
#stage.has-menu #sceneViewport .top-actions::before,#stage.has-panel #sceneViewport .top-actions::before,#stage.has-guide #sceneViewport .top-actions::before{content:none}
#stage #sceneViewport .top-actions>button,#stage #sceneViewport #settings>summary{color:var(--ui-ink,#fff9e7)!important;text-shadow:var(--hud-shadow)!important;transition:color .3s ease}
#stage #sceneViewport #dialogue,#stage #sceneViewport #dialogue[data-compact],#stage #sceneViewport #dialogue[data-layout],#stage.is-play-layout #sceneViewport :is(#toast,#interact){--caption-feather-x:36px;--caption-feather-y:22px}
#stage #sceneViewport #dialogue::before,#stage.is-play-layout #sceneViewport :is(#toast,#interact)::before{
 transition:background-color .45s ease;
 --caption-mask-x:linear-gradient(90deg,transparent,rgba(0,0,0,.035) 11px,rgba(0,0,0,.30) 24px,#000 36px,#000 calc(100% - 36px),rgba(0,0,0,.30) calc(100% - 24px),rgba(0,0,0,.035) calc(100% - 11px),transparent);
 --caption-mask-y:linear-gradient(180deg,transparent,rgba(0,0,0,.035) 6px,rgba(0,0,0,.30) 14px,#000 22px,#000 calc(100% - 22px),rgba(0,0,0,.30) calc(100% - 14px),rgba(0,0,0,.035) calc(100% - 6px),transparent);
}
#stage #sceneViewport #dialogue :is(#speaker,#line,.subtitle-colon),#stage #sceneViewport #dialogue[data-compact] :is(#speaker,#line,.subtitle-colon),#stage #sceneViewport #dialogue[data-layout] :is(#speaker,#line,.subtitle-colon),#stage.is-play-layout #sceneViewport :is(#toast,#interact){text-shadow:var(--caption-shadow-stack)!important;transition:color .3s ease}
@media(prefers-reduced-motion:reduce){#stage #sceneViewport #hud,#stage #sceneViewport #hud::before,#stage #sceneViewport .top-actions::before,#stage #sceneViewport #dialogue::before,#stage.is-play-layout #sceneViewport :is(#toast,#interact)::before{transition:none}}

/* V18.11: the tool drawer returns to a quiet row of fold titles. */
#sceneViewport .settings-menu .settings-tidy{position:sticky;top:-9px;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:44px;padding:5px 2px;background:#102e34;color:#d9e8dd;font-size:13px}
#sceneViewport .settings-menu #settingsFoldReset{min-height:44px;padding:8px;font-size:13px;flex:none;white-space:nowrap;background:transparent;border-color:transparent;color:#d5d8b9}
#sceneViewport .settings-fold>summary{display:flex;align-items:center;justify-content:space-between;list-style:none;font-size:14px;user-select:none;-webkit-tap-highlight-color:transparent}
#sceneViewport .settings-fold>summary::-webkit-details-marker{display:none}
#sceneViewport .settings-fold>summary::after{content:'＋';font-size:17px;line-height:1;margin-left:10px;color:#bcd0ba}
#sceneViewport .settings-fold[open]>summary::after{content:'－'}
#sceneViewport .settings-fold:not([open])>:not(summary){display:none!important}
#sceneViewport .settings-menu output:empty{display:none!important}
#sceneViewport .settings-menu .bert-notice-dismiss{min-height:44px;display:block;width:auto;padding:7px 9px;font-size:12px;background:transparent;border:0;text-decoration:underline;text-underline-offset:3px;color:#c5d5c5}
.bert-notice-dismiss[hidden]{display:none!important}
#sceneViewport .settings-menu output[data-notice-kind=important]{color:#f2ddab;padding-left:8px;border-left:2px solid #bdad7b;line-height:1.75}
#sceneViewport .settings-menu .player-entry p{margin:6px 3px 10px;font-size:12px;line-height:1.7;color:#b6c9bb}

/* Long optional reading has a quiet way back to its title. */
#guideContent .reader-fold-close{display:block;margin:12px 0 4px auto;min-height:44px;max-width:100%;padding:8px 10px;border:0;background:transparent;color:var(--forest-muted,#b9cdbb);font:inherit;font-size:13px;line-height:1.65;text-decoration:underline;text-underline-offset:4px;cursor:pointer}
#guideContent .bert-notice-dismiss{display:block;min-height:44px;padding:8px 10px;font:inherit;font-size:13px;border:0;background:transparent;color:var(--forest-muted,#b9cdbb);text-decoration:underline;text-underline-offset:4px;cursor:pointer}
#guideContent .reader-fold-close:focus-visible,#guideContent .bert-notice-dismiss:focus-visible{outline:2px solid #ad985a;outline-offset:3px}
#guideContent output[data-notice-kind=important]{color:var(--forest-text,#e6ddba);border-left:2px solid #a69768;padding-left:10px}
