/* V6: R2 flat reading surfaces; R3 readable text and redundant focus states. */
@media(max-width:380px){.game-brand .brand-emblem{display:none!important}.game-brand h1{font-size:18px!important}.hud-top{gap:8px!important}.hud-button#history{padding:8px!important;gap:5px!important}}
:root{--safe:clamp(16px,3vw,48px);--text:#eee9dc;--gold:#cfb681;--body-size:16px;--secondary-size:14px;--serif:'Songti SC','SimSun',Georgia,serif}html[data-text-size=large]{--body-size:20px;--secondary-size:17px}body{font-size:var(--body-size);background:#151512}button{min-height:44px;transition:background 150ms,border-color 150ms}button:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid #fff1ca;outline-offset:3px}button:disabled{cursor:not-allowed}h1,h2,h3,p,span,button,blockquote{overflow-wrap:anywhere}button,section,div{min-width:0}.hud-top{top:24px;gap:20px}.game-brand h1{font-size:25px!important;letter-spacing:.06em}.game-brand small{font-size:14px;letter-spacing:.24em}.game-brand .brand-emblem{width:38px;height:44px}.chapter-hud{position:relative;left:auto;top:auto;transform:none;font:16px 'Microsoft YaHei',sans-serif;max-width:35%;white-space:normal;gap:8px;text-align:center}.chapter-hud #location-tag{white-space:normal;overflow:visible}.chapter-hud:before,.chapter-hud:after{display:none}.hud-tools{border:0;border-image:none;background:#171713e8;padding:0;gap:4px;box-shadow:none}.hud-button{width:44px;height:44px;padding:10px;border:1px solid #77705c55;border-radius:0}.hud-button#history{width:auto;display:flex;gap:8px;align-items:center;font-size:14px}.hud-button svg{width:20px;height:20px;flex-shrink:0}.quest-hud{top:125px;max-width:32%}.quest-hud strong{font-size:18px}.quest-type,.quest-hud>span,.identity-hud small{font-size:14px}.identity-hud{top:125px;max-width:30%}.identity-hud #character-tag{font-size:16px;max-width:230px}.identity-portrait{width:48px;height:48px;border:1px solid #b9a374;box-shadow:none}.dialogue-hud{left:50%;right:auto;transform:translateX(-50%);bottom:58px;width:calc(100% - 2 * var(--safe));max-width:1120px;max-height:55dvh;overflow:auto;padding:20px 24px;border:1px solid #86775a60;border-image:none;background:#171713f5;backdrop-filter:none;box-shadow:0 8px 24px #0005}.dialogue-top{height:auto;position:static;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap}.speaker{position:static;transform:none;background:none;padding:0;font:var(--secondary-size) 'Microsoft YaHei',sans-serif;letter-spacing:1px;white-space:normal}.speaker:before,.speaker:after{display:none}.dialogue-tools{position:static;gap:8px}.subtle-button{font-size:var(--secondary-size);padding:8px}.narration-row{margin:8px 0 0;text-align:left}.narration-row h2,.has-story .narration-row h2{font-size:26px;letter-spacing:.02em;line-height:1.4}.narration-row p,.has-story .narration-row p{font:var(--body-size)/1.7 'Microsoft YaHei',sans-serif;max-width:none;max-height:none;min-height:0;overflow:visible;color:#ded8c8}.question-line h3{font-size:var(--body-size);white-space:normal}.choice-grid{margin-top:16px;gap:12px;grid-template-columns:repeat(4,minmax(0,1fr))}#choices{display:contents}.choice,.custom-choice,.choice:first-child:not(.custom-choice){min-height:100px;padding:16px 14px 14px 38px;border:1px solid #87775570;border-image:none;background:#25241e;box-shadow:none;filter:none;transform:none;overflow:visible}.choice:before,.choice:after,.choice-symbol{display:none}.choice:hover:not(:disabled),.choice:focus-visible{background:#353024;box-shadow:none;filter:none;transform:none;border-color:#d4bb86}.choice-key{left:10px;top:16px;width:auto;height:auto;border:0;background:none;font-size:14px}.choice-title{font:600 var(--body-size)/1.5 'Microsoft YaHei',sans-serif;max-width:100%;color:#f0e8d5}.choice-hint,.custom-choice .choice-tail{font:var(--secondary-size)/1.55 'Microsoft YaHei',sans-serif;color:#bfb7a3;display:block;max-width:none;max-height:none;overflow:visible;-webkit-line-clamp:unset}.choice-tail{display:none}.chapter-result{display:block;font-size:var(--secondary-size);text-align:left;max-height:none;overflow:visible}.bottom-hud{font-size:14px;bottom:16px;gap:10px}.controls-help{display:none!important}.game-dialog,.error-panel{border:1px solid #87795c;border-image:none;padding:28px;background:linear-gradient(#191916ed,#191916ed),url('./assets/ui-charcoal-v6.png') center/cover;box-shadow:0 16px 60px #0008;backdrop-filter:none;transform:none}.game-dialog{width:min(520px,calc(100vw - 32px));max-height:calc(100dvh - 32px)}.game-dialog h2{font-size:26px;margin-right:28px}.game-dialog p,.game-dialog label:not(.toggle),.game-dialog select,.game-dialog textarea,.menu-description,.toggle,.toggle small,.error-panel p{font-size:var(--body-size);line-height:1.65}.game-dialog textarea{max-height:40vh}.micro-label,.input-help,.custom-footer>span,.text-action,.config-status{font-size:var(--secondary-size)}.close{width:44px;height:44px}.primary,.secondary{font-size:var(--body-size);border-radius:0;background:#302a1e;box-shadow:none;color:#efe2c3;letter-spacing:0}.primary{background:#cbb27d;color:#19160f}.text-action{min-height:44px}.config-status{display:none}.generation-hud,.preview-ready .generation-hud{bottom:70px;width:min(620px,calc(100% - 32px));padding:16px 20px;border:1px solid #87795c;border-image:none;background:#191916f2;box-shadow:none;backdrop-filter:none;gap:14px}.generation-hud h2,.preview-ready .generation-hud h2{font:18px 'Microsoft YaHei',sans-serif;margin:4px 0}.generation-hud p,.preview-ready .generation-hud p{font-size:14px;line-height:1.5}.generation-hud .micro-label,.generation-track{display:none}.ink-orbit{width:34px;height:34px}.ink-orbit span{font-size:26px}#elapsed,.preview-ready .generation-hud #elapsed{font-size:14px}.error-panel{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);max-height:80dvh;overflow:auto}.ending-panel{position:absolute;bottom:60px;left:50%;transform:translateX(-50%);width:min(720px,calc(100% - 32px));max-height:60vh;overflow:auto;padding:32px;background:linear-gradient(#161611ee,#161611ee),url('./assets/ui-ending-v6.png') center/cover;border:1px solid #8b7b5d}.ending-panel h2{font-size:30px}.ending-panel p,.ending-panel blockquote{font-size:var(--body-size);line-height:1.7}.ending-panel blockquote{margin:16px 0;padding-left:16px;border-left:2px solid #b3a17b;color:#bfb6a2}.ending-panel>div{display:flex;gap:12px}.ending-panel .secondary{margin:0}.game.busy .dialogue-hud,.game.playing .dialogue-hud{transform:translateX(-50%);visibility:hidden}.toast{font-size:14px}.touch-controls button{width:44px;height:44px}.world-prompt{font-size:14px;min-height:44px}
@media(max-width:1099px){.hud-top{flex-wrap:wrap}.chapter-hud{order:3;width:100%;max-width:none;justify-content:center}.quest-hud,.identity-hud{top:160px}.choice-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.game-brand h1{font-size:23px!important}}
@media(max-width:767px),(max-height:600px){html,body{height:auto;min-height:100%;overflow-x:hidden;overflow-y:auto}.game{height:auto;min-height:100dvh;overflow:visible;padding-top:360px;padding-bottom:24px}.world-stage{height:360px;bottom:auto}.hud-top{top:12px;left:16px;right:16px;gap:10px}.game-brand small{display:none}.game-brand h1{font-size:20px!important}.game-brand .brand-emblem{width:25px;height:32px}.hud-button#sound,.hud-button#fullscreen,.chapter-hud,.quest-hud,.identity-hud{display:none}.dialogue-hud{position:relative;left:auto;right:auto;bottom:auto;transform:none;width:calc(100% - 24px);max-height:none;margin:0 12px;padding:18px 16px}.game.busy .dialogue-hud,.game.playing .dialogue-hud{display:none;transform:none}.narration-row h2,.has-story .narration-row h2{font-size:23px}.choice-grid{grid-template-columns:1fr}.choice{min-height:86px}.bottom-hud{position:relative;left:auto;right:auto;bottom:auto;flex-wrap:wrap;margin:16px;font-size:14px}.generation-hud,.preview-ready .generation-hud{position:relative;left:auto;bottom:auto;transform:none;width:calc(100% - 24px);margin:0 12px}.ending-panel{position:relative;left:auto;bottom:auto;transform:none;margin:0 12px;width:calc(100% - 24px);max-height:none;padding:24px 18px}.ending-panel>div{flex-direction:column}.speaker,.subtle-button,.question-line h3,.chapter-result{font-size:var(--secondary-size)}.show-dialogue{position:relative;left:auto;bottom:auto;transform:none;margin:12px}.touch-controls{top:290px}.world-prompt{top:265px}.game-dialog{padding:24px 18px}.custom-footer{flex-wrap:wrap}.game.playing .world-stage>video{object-fit:contain}}

/* V7 presentation pass: material, hierarchy and movement rather than slide-like boxes. */
:root{--ink:#0c0d0c;--ink-soft:#171813;--paper:#e8dfc7;--muted:#9c9179;--line:rgb(222 204 162 / .24);--gold-bright:#dcc18a;--panel-shadow:0 24px 80px rgb(0 0 0 / .52)}
.bottom-hud{display:none!important}
.dialogue-hud{max-width:1240px;padding:clamp(22px,3vw,42px) clamp(24px,4vw,64px) clamp(20px,2vw,30px);border:0;border-top:1px solid var(--line);background:linear-gradient(180deg,rgb(8 9 8 / .72),rgb(11 12 10 / .96) 32%,rgb(12 13 11 / .98)),url('./assets/ui-charcoal-v6.png') center/cover;box-shadow:var(--panel-shadow);isolation:isolate}
.dialogue-hud::before{content:'';position:absolute;inset:0;pointer-events:none;z-index:-1;background:radial-gradient(ellipse 35% 95% at 4% 12%,rgb(207 177 112 / .13),transparent 75%),radial-gradient(ellipse 42% 82% at 100% 100%,rgb(123 100 56 / .12),transparent 75%)}
.dialogue-top{border-bottom:1px solid rgb(235 218 180 / .1);padding-bottom:12px}.speaker{color:var(--gold-bright);font-family:var(--serif);letter-spacing:.12em}.speaker-mark{color:#f0d084}.subtle-button{color:var(--muted);border:0;border-bottom:1px solid transparent}.subtle-button:hover{color:var(--paper);border-color:var(--gold-bright)}
.narration-row{max-width:850px;margin:18px auto 0;text-align:center}.narration-row h2,.has-story .narration-row h2{font-size:clamp(28px,2.4vw,42px);letter-spacing:.055em;color:var(--paper);text-wrap:balance}.narration-row p,.has-story .narration-row p{max-width:680px;margin-inline:auto;color:#c9c2b0;text-wrap:balance}.question-line{margin:24px auto 16px}.question-line h3{color:#b9aa8a;font-family:var(--serif);letter-spacing:.04em}
.choice-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:1px;background:rgb(223 202 156 / .18);border:1px solid rgb(223 202 156 / .18);margin-top:18px}.choice,.custom-choice,.choice:first-child:not(.custom-choice){min-height:116px;padding:20px 24px 18px 58px;border:0;background:linear-gradient(120deg,rgb(24 25 20 / .98),rgb(15 16 14 / .98));transition:background 180ms ease,color 180ms ease,box-shadow 180ms ease;position:relative}.choice::before{display:block;inset:auto auto 16px 18px;width:18px;height:1px;border:0;background:rgb(223 195 132 / .5)}.choice:hover:not(:disabled),.choice:focus-visible{transform:none;border:0;background:linear-gradient(120deg,rgb(54 48 33 / .98),rgb(24 24 18 / .98));box-shadow:inset 4px 0 var(--gold-bright);filter:none}.choice-key{left:24px;top:21px;color:#d7bb78;font:14px var(--serif)}.choice-title{font:500 clamp(18px,1.45vw,24px)/1.3 var(--serif);color:#f0e5c9;letter-spacing:.045em}.choice-hint,.custom-choice .choice-tail{color:#a89e89;margin-top:8px;line-height:1.55}.custom-choice .choice-tail{color:#d0b677}.custom-choice{background:linear-gradient(120deg,rgb(36 31 20 / .98),rgb(16 16 13 / .98))}
.game-dialog,.error-panel{width:min(640px,calc(100vw - 40px));padding:clamp(26px,4vw,54px);border:1px solid rgb(225 203 157 / .36);background:linear-gradient(135deg,rgb(13 14 12 / .98),rgb(23 22 17 / .98)),url('./assets/ui-charcoal-v6.png') center/cover;box-shadow:0 32px 110px rgb(0 0 0 / .72)}.game-dialog::before{content:'';position:absolute;inset:18px;pointer-events:none;border:1px solid rgb(220 198 148 / .1)}.game-dialog>*{position:relative}.game-dialog h2{font-size:clamp(29px,4vw,42px);letter-spacing:.06em}.game-dialog .menu-description{color:#9c927e;max-width:38rem}.game-dialog label:not(.toggle){margin-top:24px;color:#d8c49a}.game-dialog select,.game-dialog textarea{border:1px solid rgb(223 198 147 / .32);background:rgb(6 7 6 / .5);padding:14px 16px}.game-dialog textarea:focus{border-color:var(--gold-bright);box-shadow:0 0 0 3px rgb(213 185 120 / .15)}.close{top:22px;right:22px;border:1px solid rgb(227 206 161 / .25);background:rgb(14 15 13 / .55);color:#d9c083}.close:hover{background:rgb(65 55 34)}.game-dialog .secondary,.game-dialog .primary{min-height:52px;justify-content:space-between;padding-inline:18px}.game-dialog .secondary{background:transparent;border-width:0 0 1px;border-color:rgb(225 204 163 / .22);text-align:left}.game-dialog .secondary:hover{background:rgb(224 200 145 / .08);border-color:var(--gold-bright)}.game-dialog .primary{background:linear-gradient(90deg,#c5a96d,#e0c88f);color:#18140c;border:0}.text-action{color:#c9ad73;text-decoration:none}.text-action:hover{color:#f1d79e}
.history-dialog{width:min(1180px,calc(100vw - 40px))!important}.tree-chapters{gap:0;border-bottom:1px solid rgb(220 198 155 / .2)}.tree-chapters button{border:0;border-bottom:2px solid transparent;background:transparent;color:var(--muted)}.tree-chapters [aria-pressed=true]{border-color:var(--gold-bright);background:transparent;color:var(--paper)}.tree-body{gap:34px}.tree-viewport{padding:16px;background:rgb(4 5 4 / .28)}.branch-node{border:1px solid rgb(220 198 155 / .22);background:rgb(22 23 19 / .96)}.branch-node[aria-pressed=true]{border-color:var(--gold-bright);background:rgb(58 49 32 / .95)}.tree-detail{border-left-color:rgb(220 198 155 / .2)}
@media(max-width:767px),(max-height:600px){.dialogue-hud{padding:22px 18px 18px;border-top-color:rgb(223 201 157 / .25);background:linear-gradient(180deg,rgb(9 10 8 / .94),rgb(12 13 10 / .98)),url('./assets/ui-charcoal-v6.png') center/cover}.dialogue-top{padding-bottom:10px}.narration-row{margin-top:18px;text-align:left}.narration-row p{margin-inline:0}.question-line{margin:20px 0 14px;text-align:left}.question-line h3{text-align:left;max-width:none}.choice-grid{grid-template-columns:1fr}.choice,.custom-choice,.choice:first-child:not(.custom-choice){min-height:96px;padding:17px 20px 16px 50px}.choice-key{left:20px;top:18px}.game-dialog,.error-panel{width:calc(100vw - 24px);padding:30px 24px}.game-dialog::before{inset:12px}.game-dialog h2{font-size:29px}.history-dialog{width:calc(100vw - 24px)!important}.tree-detail{border-left:0}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition-duration:0ms!important;animation-duration:0ms!important}}

/* V8: purpose-built game drawers. Avoid the generic centered-document modal. */
.game-dialog{border:0;background:rgb(12 13 11 / .98);box-shadow:0 36px 120px rgb(0 0 0 / .75);overflow:auto}.game-dialog::before{display:none}.menu-hero{display:flex;flex-direction:column;gap:12px}.menu-hero .micro-label{color:#c7a95d;letter-spacing:.24em}.menu-hero h2{margin:0;color:#f3e7c9;line-height:1.08}.menu-hero p{margin:0;color:#a79d87;line-height:1.7}.menu-dialog{width:min(860px,calc(100vw - 40px));padding:0;display:grid;grid-template-columns:minmax(240px,.78fr) minmax(360px,1.22fr);gap:0;background:linear-gradient(135deg,rgb(17 18 14 / .99),rgb(7 8 7 / .99)),url('./assets/ui-charcoal-v6.png') center/cover}.menu-dialog .menu-hero{grid-column:1;grid-row:1/4;min-height:510px;padding:58px 42px 42px;border-right:1px solid rgb(224 198 138 / .16);justify-content:flex-end;background:radial-gradient(circle at 40% 16%,rgb(200 166 92 / .16),transparent 34%)}.menu-dialog .menu-hero h2{font-size:clamp(34px,4vw,54px)}.menu-group{grid-column:2;padding:34px 42px 0}.menu-kicker,.compact-settings>label{display:block;margin:0 0 10px;color:#8d8065;font-size:13px;letter-spacing:.18em}.menu-dialog .secondary{width:100%;min-height:55px;display:flex;align-items:center;justify-content:space-between;padding:0 0;border:0;border-bottom:1px solid rgb(222 201 158 / .18);font:500 17px/1.2 var(--serif);color:#e4dac1}.menu-dialog .secondary b{font:400 20px/1 sans-serif;color:#d6b86e;transition:transform 180ms ease}.menu-dialog .secondary:hover{padding-left:10px;background:transparent;color:#fff1cd}.menu-dialog .secondary:hover b{transform:translateX(5px)}.compact-settings{display:grid;grid-template-columns:1fr 1fr;gap:10px 14px;padding-top:24px}.compact-settings>label{margin:0;align-self:end}.compact-settings select{width:100%;min-height:46px;margin:0;border:0;border-bottom:1px solid rgb(222 201 158 / .26);background:transparent;color:#e8dfca}.compact-settings .toggle{grid-column:1/-1;margin-top:8px;padding:13px 0;border-top:1px solid rgb(222 201 158 / .12)}.compact-settings .toggle small{display:block;margin:6px 0 0;color:#877d69}.menu-actions{grid-column:2;align-self:end;padding:28px 42px 36px;display:grid;grid-template-columns:1fr auto;gap:12px}.menu-actions .primary{grid-column:1/-1;width:100%;min-height:56px;display:flex;justify-content:space-between;align-items:center;padding:0 20px;font:600 18px var(--serif)}.menu-actions .secondary{width:auto;border:0;min-height:44px;font:14px var(--serif);color:#9f9279}.menu-actions .text-action{justify-self:end;align-self:center;min-height:44px}.menu-dialog .close{z-index:2;top:18px;left:18px;right:auto;border:0;background:transparent;font-size:25px;color:#c4ab72}.menu-dialog .close:hover{background:transparent;color:#fff0c8}
.custom-dialog{width:min(760px,calc(100vw - 40px));padding:clamp(34px,5vw,70px);background:linear-gradient(135deg,rgb(10 11 9 / .98),rgb(17 16 12 / .98)),url('./assets/ui-charcoal-v6.png') center/cover}.custom-dialog .menu-hero{max-width:520px;margin-bottom:42px}.custom-dialog .menu-hero h2{font-size:clamp(34px,4.8vw,56px)}.custom-dialog form{display:grid;grid-template-columns:1fr;gap:12px}.custom-dialog label{font:500 18px var(--serif)!important;color:#e9d8ab!important}.custom-dialog textarea{min-height:150px;resize:vertical;padding:20px!important;font:18px/1.65 var(--serif)!important;background:rgb(5 6 5 / .54)!important}.custom-dialog .custom-footer{display:grid;grid-template-columns:1fr auto auto;align-items:center;gap:18px;margin-top:8px}.custom-dialog .custom-footer .primary{display:flex;align-items:center;gap:28px;min-height:56px;padding:0 20px}.custom-dialog .input-help{margin:0;color:#8d836f}.custom-dialog .close{border:0;background:transparent}.custom-dialog .close:hover{background:transparent}
.history-dialog{width:min(1240px,calc(100vw - 40px))!important;min-height:min(760px,calc(100dvh - 60px));padding:0;background:linear-gradient(160deg,rgb(12 13 11 / .99),rgb(20 19 14 / .99))}.history-dialog>.menu-hero{padding:46px 56px 26px;border-bottom:1px solid rgb(224 198 138 / .15)}.history-dialog>.menu-hero h2{font-size:clamp(34px,4vw,54px)}.history-dialog .close{right:38px;top:42px;border:0;background:transparent}.history-dialog .close:hover{background:transparent}.history-dialog #tree{padding:0 56px 46px}.tree-chapters{margin:0 -56px 28px;padding:0 56px;background:rgb(3 4 3 / .32);border-bottom:1px solid rgb(224 198 138 / .12)}.tree-chapters button{min-height:58px;padding:0 18px;font-family:var(--serif)}.tree-body{grid-template-columns:minmax(0,1.45fr) minmax(280px,.55fr);gap:0;border-top:1px solid rgb(224 198 138 / .12)}.tree-viewport{min-height:370px;max-height:52vh;padding:28px;background:radial-gradient(ellipse at 10% 0,rgb(191 156 82 / .11),transparent 48%),rgb(3 4 3 / .3)}.tree-detail{padding:30px 0 30px 34px;margin:0 0 0 34px;border-left:1px solid rgb(224 198 138 / .18)}.tree-detail h3{font:500 28px/1.25 var(--serif);color:#eee1c3}.tree-detail h4{font-size:12px;letter-spacing:.18em}.tree-detail p{color:#b6ad99}.tree-detail .secondary{margin-top:22px}.branch-node{width:218px;min-height:100px;border:1px solid rgb(222 198 143 / .22);background:linear-gradient(135deg,rgb(34 32 24 / .96),rgb(15 16 13 / .97));padding:14px 16px}.branch-node::after{content:'';position:absolute;right:13px;bottom:13px;width:16px;height:1px;background:#c8a85c}.branch-node[aria-pressed=true]{border-color:#e3c47f;background:linear-gradient(135deg,rgb(82 65 33 / .98),rgb(31 29 20 / .98));box-shadow:0 10px 32px rgb(0 0 0 / .28)}.tree-body.tree-solo{display:block}.tree-body.tree-solo .tree-viewport{min-height:0;max-height:none;padding:0;background:transparent;overflow:visible}.tree-body.tree-solo .tree-canvas{width:100%!important;height:auto!important;min-height:170px;display:flex;align-items:center;justify-content:center}.tree-body.tree-solo .tree-lines{display:none}.tree-body.tree-solo .branch-node{position:relative;inset:auto!important;width:min(540px,100%);min-height:130px;padding:26px}.tree-body.tree-solo .tree-detail{max-width:540px;margin:0 auto;padding:24px 0;border:0;border-top:1px solid rgb(224 198 138 / .18)}
@media(max-width:767px),(max-height:600px){.menu-dialog{display:block;width:calc(100vw - 24px);padding:0}.menu-dialog .menu-hero{display:block;min-height:0;padding:70px 28px 28px;border-right:0;border-bottom:1px solid rgb(224 198 138 / .15)}.menu-group{padding:24px 28px 0}.compact-settings{display:grid}.menu-actions{padding:28px;display:grid}.custom-dialog{padding:62px 28px 32px}.custom-dialog .menu-hero{margin-bottom:28px}.custom-dialog .custom-footer{grid-template-columns:1fr auto}.custom-dialog .input-help{display:none}.custom-dialog .custom-footer .primary{grid-column:1/-1;justify-content:space-between}.history-dialog{width:calc(100vw - 16px)!important;min-height:calc(100dvh - 16px)}.history-dialog>.menu-hero{padding:60px 24px 24px}.history-dialog #tree{padding:0 24px 30px}.tree-chapters{margin:0 -24px 20px;padding:0 24px;overflow:auto;flex-wrap:nowrap}.tree-chapters button{white-space:nowrap}.tree-viewport{min-height:0;padding:0;background:transparent;overflow:visible}.tree-canvas{display:grid!important;width:100%!important;height:auto!important;gap:10px}.tree-lines{display:none}.branch-node{position:relative!important;inset:auto!important;width:100%;min-height:86px}.tree-detail{margin:24px 0 0;padding:24px 0 0;border-left:0;border-top:1px solid rgb(224 198 138 / .18)}}
/* Native dialogs are display:none until opened; this guard prevents a closed menu becoming page content. */
dialog.menu-dialog:not([open]){display:none!important}
dialog.menu-dialog[open]{display:grid}
@media(max-width:767px),(max-height:600px){dialog.menu-dialog[open]{display:block}}
