:root{--guide-ink:#314b50;--guide-muted:#6c8182;--guide-paper:#f8faf3f5}
body #caption{bottom:auto;top:146px;left:232px;max-width:65%;color:#fff}
body #caption h1{font-size:28px;margin-bottom:4px}body #sceneKicker{font-size:9px}.caption-row>span{display:none}
body #scenes{max-height:calc(100vh - 170px)}
body .version-badge{bottom:15px;font-size:9px}body #lighting{bottom:18px}
.guide-ribbon{position:absolute;right:30px;top:150px;display:flex;align-items:center;gap:8px;background:#f6faf0e8;border:1px solid #ffffff90;border-radius:24px;padding:7px 11px;color:var(--guide-ink);font-size:10px;z-index:5;box-shadow:0 5px 20px #253c4820}
.guide-dot{width:5px;height:5px;border-radius:50%;background:#759d8b;box-shadow:0 0 0 3px #759d8b22}.guide-ribbon button{font-size:10px;color:#69847b;border-left:1px solid #6d877b30;padding-left:10px}
.guide-dialogue{position:absolute;left:230px;bottom:70px;width:min(620px,calc(100% - 580px));min-width:320px;padding:22px 26px 13px;background:var(--guide-paper);border:1px solid #fff;border-radius:9px;box-shadow:0 12px 44px #193c4733;backdrop-filter:blur(16px);z-index:6;color:var(--guide-ink)}
.guide-dialogue:before{content:'';position:absolute;left:0;top:23px;bottom:23px;width:3px;background:#8bb2ac;border-radius:3px}
.guide-heading{display:flex;align-items:center;justify-content:space-between;gap:15px}.guide-name{font:600 24px 'Songti SC',serif;letter-spacing:.15em}.guide-kana{font:9px Georgia,serif;letter-spacing:.23em;color:#8b9c9c;margin-left:14px}#guidePlace{font-size:10px;color:#7d9290;padding:5px 9px;background:#e3ece680;border-radius:4px;white-space:nowrap}
#guideText{min-height:74px;font-size:14px;line-height:1.9;letter-spacing:.025em;margin:15px 0 13px}#guideText:after{content:'·';margin-left:5px;color:#9daea7}
.guide-actions{display:flex;gap:6px;flex-wrap:wrap;padding-top:9px;border-top:1px solid #8ba59625}.guide-actions button{padding:8px 11px;font-size:11px;border-radius:4px;background:#e9efea;transition:background .16s}.guide-actions #guideMore{background:#3e7168;color:#fff}.guide-actions button:hover{background:#d7e5da}.guide-actions #guideMore:hover{background:#315f57}#guideNext{max-width:230px;text-align:left}.guide-actions #guideOptions{margin-left:auto;background:transparent;color:#788d84;padding-left:3px;padding-right:3px}
.guide-footnote{display:flex;justify-content:space-between;gap:10px;font-size:9px;color:#96a39b;margin-top:13px}.guide-footnote a{color:#69897f;text-decoration:none}
#guideSettings{border-top:1px solid #8ba59625;padding-top:12px;margin-top:12px;display:flex;gap:10px;align-items:center;flex-wrap:wrap;font-size:11px}#guideSettings[hidden]{display:none}#guideSettings button{padding:5px 7px;border:1px solid #c2d3c9;border-radius:4px;font-size:10px}#guideSettings label{display:flex;align-items:center;gap:5px}#guideSettings input{accent-color:#3e7168}#guideSettings [aria-pressed=true]{background:#3e7168;color:#fff}#guideSettings button:disabled{opacity:.5;cursor:default}
#guideRecall{position:absolute;bottom:90px;right:28px;background:var(--guide-paper);padding:13px 18px;border:1px solid white;border-radius:24px;z-index:7;box-shadow:0 6px 20px #193c4733}.guide-collapsed .guide-dialogue,.guide-collapsed .guide-ribbon{display:none}
#guideSourceDialog{max-width:540px;max-height:85vh;overflow:auto;width:calc(100% - 40px);border:1px solid #e2eadb;border-radius:12px;padding:35px 32px;background:#f5f7ed;color:#36564e;box-shadow:0 10px 70px #213d4944;font-size:13px;line-height:1.9}#guideSourceDialog::backdrop{background:#153b4c66;backdrop-filter:blur(5px)}#guideSourceDialog small{font:9px Georgia,serif;letter-spacing:.22em;color:#91a69b}#guideSourceDialog h2{font:25px 'Songti SC',serif;margin:12px 0 22px}#guideSourceDialog a{color:#386e63;text-decoration:none;font-size:11px}.guide-modal-close{position:absolute;top:12px;right:18px;font-size:27px}.guide-sources{display:grid;gap:6px;background:#e8eee4;padding:16px;border-radius:5px}.guide-technical{font-size:11px;color:#7c8f85;border-top:1px solid #cfdacc;padding-top:15px}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
.nav-hidden .guide-dialogue{left:28px;width:min(640px,calc(100% - 420px))}
.compare-open .guide-dialogue{left:28px;width:calc(64% - 56px);min-width:0;bottom:70px}.compare-open .guide-ribbon{display:none}
@media(min-width:1600px){.guide-dialogue{left:260px;bottom:100px;width:640px}#guideText{font-size:16px;min-height:86px}.guide-ribbon{right:6%}}
@media(max-width:1100px){.guide-dialogue{left:184px;bottom:77px;width:calc(100% - 480px);padding:17px 20px 12px}#guideText{font-size:13px}.guide-actions{gap:4px}.guide-actions button{font-size:10px;padding:7px 9px}.guide-ribbon{right:18px;top:155px}body #caption{left:185px;top:145px}.nav-hidden .guide-dialogue{width:calc(100% - 350px)}}
@media(max-width:900px){body #caption{left:22px;top:190px}body #caption h1{font-size:23px}body #sceneKicker{display:none}.guide-dialogue,.nav-hidden .guide-dialogue{left:20px;bottom:65px;width:calc(100% - 330px);min-width:300px}.guide-ribbon{top:187px;right:16px}body #scenes{max-height:unset}body.nav-hidden #caption{top:130px}.nav-hidden .guide-ribbon{top:122px}#scenes::-webkit-scrollbar{height:3px}.guide-dialogue #guideText{min-height:96px}.guide-footnote{font-size:8px}}
@media(max-width:640px){header{top:14px;left:12px;right:12px}.brand>span{font-size:22px}.header-actions{gap:4px}.header-actions button{font-size:9px;padding:9px 7px}#captureButton{display:none}#scenes{top:68px}body #sceneActions{top:116px;gap:4px}body #sceneActions button{padding:6px 8px;font-size:9px}body #caption{top:182px;left:16px;max-width:55%}body #caption h1{font-size:22px}.caption-row{display:none}.guide-ribbon{top:184px;right:12px;font-size:9px;padding:6px 8px;gap:6px}.guide-ribbon button{font-size:9px}.guide-dialogue,.nav-hidden .guide-dialogue,.compare-open .guide-dialogue{left:12px;right:12px;bottom:59px;width:auto;min-width:0;padding:15px 17px 11px;border-radius:8px;background:#f8faf3f2}.guide-name{font-size:21px}.guide-kana{font-size:8px}.guide-dialogue #guideText{min-height:70px;font-size:12px;line-height:1.9;margin:11px 0 10px}.guide-footnote{margin-top:10px;font-size:8px}.guide-actions button{font-size:10px;padding:7px 8px}.guide-actions #guideNext{max-width:175px}#guidePlace{font-size:9px}#guideSourceDialog{padding:27px 23px}.version-badge{max-width:calc(100% - 150px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}body #lighting{bottom:14px;right:12px}body .version-badge{left:12px;bottom:18px}#guideSettings{font-size:10px}.nav-hidden #sceneActions{top:70px}.compare-open #compare{z-index:12}.compare-open .guide-dialogue{display:none}}
@media(max-height:650px) and (min-width:641px){.guide-dialogue{bottom:52px;padding-top:12px}.guide-dialogue #guideText{min-height:60px;font-size:12px;margin-top:10px;margin-bottom:8px}.guide-ribbon{top:130px}.guide-name{font-size:21px}body #caption{top:140px}#scenes{max-height:calc(100vh - 185px)}}

@media(max-width:640px){.guide-ribbon{left:16px;right:auto;top:243px}.nav-hidden .guide-ribbon{top:184px}}

/* Keep movement settings clear of the companion dialogue and recall button. */
.guide-navigation{top:198px;bottom:auto;right:28px;z-index:10}.guide-navigation .navigation-options{top:calc(100% + 8px);bottom:auto}
@media(max-width:640px){.guide-navigation{top:224px;right:12px}.guide-navigation .navigation-options{max-height:calc(100dvh - 295px)}}
#guideExpressionPanel{margin-top:12px;padding-top:12px;border-top:1px solid #8ba59630}#guideExpressionPanel[hidden]{display:none}.expression-heading{display:flex;justify-content:space-between;align-items:center;font-size:10px;color:#758d83;margin-bottom:8px}.expression-heading button{font-size:10px;border:1px solid #b7ccc0;padding:5px 9px;border-radius:4px;color:#376b5c}.expression-buttons{display:flex;gap:5px;flex-wrap:wrap}.expression-buttons button{font-size:10px;padding:7px 9px;background:#e6eee7;border-radius:15px}.expression-buttons button[aria-pressed=true]{background:#4a7767;color:white}#guideCloseup[aria-pressed=true]{background:#4a7767;color:white}#ginkaGuide[data-closeup=true] .guide-ribbon{top:86px;right:24px}@media(max-width:640px){.expression-buttons button{font-size:9px;padding:6px 8px}#ginkaGuide[data-closeup=true] .guide-ribbon{top:184px;left:16px;right:auto}}
.guide-memory-context{display:flex;justify-content:flex-end;font-size:9px;color:#819188;line-height:1.5}#guideMemoryProgress{white-space:nowrap}#ginkaGuide #guideText{max-height:176px;overflow:auto;scrollbar-width:thin;margin-top:12px}.guide-dialogue{max-height:calc(100dvh - 175px);overflow:auto;scrollbar-width:thin}
#guideMemoryDialog{width:min(720px,calc(100vw - 32px));max-height:84dvh;overflow:auto;box-sizing:border-box;border:1px solid #e2eadb;border-radius:12px;padding:32px;background:#f5f7ed;color:#36564e;font-size:13px;line-height:1.8;box-shadow:0 10px 70px #213d4944}#guideMemoryDialog::backdrop{background:#153b4c88;backdrop-filter:blur(5px)}#guideMemoryDialog small{font:10px Georgia,serif;letter-spacing:.2em;color:#80938a}#guideMemoryDialog h2{font:24px 'Songti SC',serif}#guideMemoryDialog h3{font-size:14px;margin:20px 0 8px}#guideMemoryNote{background:#e8eee4;padding:12px 16px;border-radius:6px}#guideMemoryDialog a{color:#386e63;font-size:12px;text-decoration:none}.memory-source-gallery{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px}.memory-source-gallery img{width:100%;height:auto;display:block;border-radius:4px}
@media(max-width:640px){#ginkaGuide #guideText{max-height:126px}.guide-memory-context{font-size:8px}.guide-dialogue{max-height:calc(100dvh - 210px)}#guideMemoryDialog{padding:24px 18px}.memory-source-gallery{grid-template-columns:1fr}}

/* The whole generated head portrait stays clear of the navigation controls. */
.guide-navigation{top:105px;right:28px}.guide-ribbon{top:132px;right:30px}
#ginkaGuide[data-closeup=true] .guide-ribbon{top:132px;right:30px}
@media(max-width:740px){.guide-navigation{top:107px;right:16px}.guide-ribbon,.nav-hidden .guide-ribbon,#ginkaGuide[data-closeup=true] .guide-ribbon{top:182px;left:16px;right:auto}}

/* Game dialogue layout: transparent head portrait beside the lower-left text. */
.guide-conversation-row{position:absolute;left:24px;right:24px;bottom:70px;max-width:1040px;display:flex;align-items:center;gap:16px;pointer-events:none;z-index:6}
#ginkaGuide .guide-portrait-slot{flex:0 0 clamp(150px,20vw,240px);aspect-ratio:1;pointer-events:none}
#ginkaGuide[data-closeup=true] .guide-portrait-slot{flex-basis:clamp(170px,23vw,270px)}
#ginkaGuide .guide-dialogue{position:relative;left:auto;right:auto;bottom:auto;width:auto;min-width:0;flex:1;pointer-events:auto;max-height:calc(100dvh - 190px)}
.guide-collapsed .guide-conversation-row,.compare-open #ginkaGuide .guide-conversation-row{display:none}
@media(max-width:740px){.guide-conversation-row{left:16px;right:16px;gap:12px}}
@media(max-width:640px){.guide-conversation-row{left:12px;right:12px;bottom:59px;gap:8px}#ginkaGuide .guide-portrait-slot{flex-basis:clamp(100px,22vw,140px)}#ginkaGuide[data-closeup=true] .guide-portrait-slot{flex-basis:clamp(112px,25vw,156px)}#ginkaGuide .guide-dialogue{padding:14px 14px 11px;max-height:calc(100dvh - 200px)}.guide-actions #guideOptions{margin-left:0}#guidePlace{max-width:110px;overflow:hidden;text-overflow:ellipsis}.guide-kana{margin-left:6px}}
@media(max-width:420px){.guide-conversation-row{gap:4px;left:6px;right:8px}#ginkaGuide .guide-portrait-slot{flex-basis:90px}#ginkaGuide[data-closeup=true] .guide-portrait-slot{flex-basis:104px}#ginkaGuide .guide-dialogue{padding:12px 10px 10px}.guide-kana{display:none}.guide-heading{gap:6px}.guide-footnote{flex-wrap:wrap}}
