/* Production: the same study, in warm graphite and dusk. */
@font-face{font-family:InquirySerif;src:url('../source-serif-4.woff2') format('woff2');font-weight:200 900;font-display:swap}
:root{color-scheme:dark;--ground:#2d2631;--paper:#39313d;--ink:#f6eddf;--muted:#cfc0cc;--red:#efbc9c;--line:#746374}
body{background:var(--ground)}
a,button,input,textarea{caret-color:var(--red)}
::selection{background:#efbc9c;color:#302732}
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible{outline:2px solid var(--red);outline-offset:4px}
header{height:94px}.brand{font-size:16px;gap:11px}.brand img{mix-blend-mode:normal}
.entry-links{gap:25px}.entry-links button{font-size:13px;min-height:44px;line-height:1.25}
.entry-links #read-equivalent{display:none}
.entry-links #replay-opening{color:var(--muted)}
.ground-plan{opacity:.75}.ground-plan path{stroke:var(--line)}
.ground-plan .outer-floor{fill:#51445533;stroke:#766779}.ground-plan .role-floor{fill:#7d6d8433;stroke:#9b879c}.ground-plan .private-floor{fill:#b5a4b53d;stroke:#b09cb0}.ground-plan .outer-second,.ground-plan .role-second,.ground-plan .private-second{stroke:#8d7a90}
body[data-figure] .person img,.ai-model-object>img,.peer-study{filter:grayscale(1) invert(1);mix-blend-mode:screen}
.private-scratch,.role-label,.role-action,.need-bubble{color:var(--muted)}
.role-frame,.room-object,.room-object i{border-color:var(--line)}
.table-one,.table-two{background:#544659}.private-life{color:var(--muted)}
.world-question{top:172px;width:min(335px,29vw)}
.encounter-title{font:400 clamp(46px,5.5vw,78px)/1.02 InquirySerif,Georgia,serif;letter-spacing:-.035em;margin:0 0 18px;text-wrap:balance}
.encounter-title em{font-weight:350;color:var(--red)}
.world-question>.encounter-intro{font-size:16px;line-height:1.5;max-width:29ch;color:var(--ink);margin:0 0 24px}
body:not([data-context="person"]) .encounter-title,body:not([data-beat="0"]) .encounter-title,body:not([data-context="person"]) .encounter-intro,body:not([data-beat="0"]) .encounter-intro{display:none}
.world-question #question-text{font:450 32px/1.12 Hand,cursive;color:var(--red)}
.world-question small{font-size:12px;line-height:1.45;min-height:36px;display:flex;align-items:center}
.world-question>#question-note{font-size:14px;line-height:1.5;max-width:35ch;color:var(--muted)}
.guide-control button{font-size:12px;min-height:44px}.guide-control #guide-play{min-height:44px;min-width:44px}
.scene-actions{position:absolute;z-index:23;left:3.5vw;width:min(335px,29vw);display:flex;flex-wrap:wrap;gap:3px 20px}
.scene-actions button{min-height:44px;padding:9px 0;font-size:14px;line-height:1.35;text-align:left;color:var(--red);text-decoration:underline;text-underline-offset:5px;text-decoration-thickness:1px}
.scene-actions button:hover{text-decoration-thickness:2px}
body.opening-active .scene-actions,body[data-side="ai"] .scene-actions,body.lab-open .scene-actions{display:none}
.figure-choices{display:none}.scene-controls{padding-top:0}.scene-controls>button{min-height:44px}
#opening-title{font-family:InquirySerif,Georgia,serif;font-weight:400;font-size:clamp(40px,5vw,72px);letter-spacing:-.03em}
#opening-description{font-size:17px;line-height:1.6;color:var(--ink)}
#opening-copy{max-height:calc(100dvh - 320px);overflow-y:auto;pointer-events:auto;padding-right:8px}
#opening-chapters button{font-size:13px}.opening-scope{color:var(--muted);font-size:12px}
#inquiry-nav{background:var(--ground);border-color:var(--line)}#inquiry-nav button{font-size:14px;min-height:48px}
.scene-controls small{font-size:12px}.scene-controls>button>span{font-size:16px}
.view-tools{background:var(--ground)}.view-tools button{border:0;border-bottom:1px solid var(--line)}
.people-finder button{font-size:14px;min-height:44px;padding:10px 0;color:var(--red);text-underline-offset:5px}
.recipient-response{background:var(--paper);border-color:var(--line);box-shadow:0 18px 60px #130e184d}
.recipient-response p{font-size:15px;line-height:1.55}.recipient-response h2{font:400 clamp(26px,2.7vw,37px)/1.15 InquirySerif,Georgia,serif}
#recipient-actions button{min-height:44px;font-size:14px;line-height:1.5}
#ai-question{font-family:InquirySerif,Georgia,serif;font-weight:400;letter-spacing:-.025em}
.ai-ground path{stroke:var(--line)}.ai-ground .ai-table-edge{fill:#84718c18}.ai-ground .ai-agent-floor{fill:#a28ba225}
.ai-agent-envelope .agent-wall{border-color:var(--line);background:#6f5b7520}.ai-part{color:var(--ink)}
#ai-caption p,#ai-inspection p{font-size:14px;line-height:1.5}
#ai-inspection,#ai-caption details[open]{background:var(--ground)}
/* Reading is a warm page inside the darker study, with its own legible ink. */
dialog,#character-picker{color-scheme:light;--ground:#f2ede4;--paper:#f7f2e9;--ink:#302d31;--muted:#625863;--red:#914936;--line:#c5b8bd;background:var(--paper);color:var(--ink)}
dialog::backdrop{background:#150f1db8;backdrop-filter:blur(5px)}
dialog h2,dialog h3,dialog h4{font-family:InquirySerif,Georgia,serif;font-weight:450}
#reading-dialog{max-width:1260px}#reading-dialog .reading-header{background:var(--paper)}
.reading-tabs button{min-height:44px;font-size:14px}.reading-tabs{gap:25px}
.reading-layout p{font-size:16px;line-height:1.75}.reading-layout .lead{font-size:23px;line-height:1.45}.reading-layout .scope{font-size:13px;line-height:1.6}
.library-heading{display:grid;grid-template-columns:1fr 1.25fr;gap:14px 45px}.library-heading>p{margin:0;max-width:49ch}.library-heading>p:last-child{grid-column:2;font-size:12px}
.library-heading h3{font-size:38px}.shelf-work strong{font-family:InquirySerif,Georgia,serif;font-size:25px;font-weight:450;line-height:1.2}
.shelf-question{font-family:Human,Arial,sans-serif;font-size:15px;line-height:1.5;margin:12px 0 18px;color:var(--muted)}
.shelf-work small{font-size:13px}.shelf-open{font-size:14px;min-height:36px;padding-top:8px}
#library-full-reading a{font-size:16px;min-height:44px;display:flex;align-items:center}.library-modes button{min-height:48px}
.library-back{min-height:44px;font-size:14px}.library-work-heading h3{font-size:38px}
.library-text{max-width:68ch}.library-text>p{font-size:17px;line-height:1.75}.library-text a{min-height:44px}
#character-picker .person img{filter:none;mix-blend-mode:normal}
.lab-intro h1,.lab-invitation h2,.lab-evidence h2{font-family:InquirySerif,Georgia,serif;font-weight:400;letter-spacing:-.025em}
.lab-intro>p{font-size:18px;line-height:1.65}.lab-intro .lab-north{font-size:15px;line-height:1.6}
.lab-team-detail{background:transparent}.lab-submit{color:var(--ink)}.lab-submit svg path{stroke:var(--red)}
@media(max-width:900px){.entry-links{gap:17px}.entry-links button{font-size:12px}.world-question,.scene-actions{width:32vw}.encounter-title{font-size:54px}.reading-tabs{gap:20px}}
@media(max-width:600px){
 body:not(.opening-active) header{height:104px;padding:10px 18px}.brand{font-size:14px;gap:9px}.brand img{width:33px;height:33px}
 body:not(.opening-active) .entry-links{grid-template-rows:40px 40px;gap:0 12px;max-width:calc(100vw - 123px)}
 body:not(.opening-active) .entry-links #choose-character,body:not(.opening-active) .entry-links #turn-model,body:not(.opening-active) .entry-links [data-open="books"]{font-size:12px;min-height:40px}
 body:not(.opening-active) .entry-links #replay-opening{top:55px;left:18px;max-width:106px;font-size:11px;min-height:44px}
 body:not(.opening-active) .guide-control{top:104px;left:18px;right:18px;gap:18px}
 body:not(.opening-active) .world-question{top:159px;left:20px;right:20px;width:auto}
 .encounter-title{font-size:clamp(36px,10.7vw,47px);line-height:1.04;margin:0 0 9px;text-wrap:nowrap}
 .world-question>.encounter-intro{font-size:14px;line-height:1.45;max-width:34ch;margin:0 0 16px}
 body:not(.opening-active) .world-question #question-text{font-size:27px;line-height:1.06}
 .world-question>#question-note{display:none}.world-question small{font-size:12px;min-height:36px}
 .scene-actions{left:20px;right:20px;width:auto;gap:0 18px}.scene-actions button{font-size:14px;min-height:44px}
 #world #give-form,#world .role-action{display:none}
 #scene-controls.scene-controls{height:112px;padding:0 18px 44px;gap:9px}
 #scene-controls>button[data-context]{min-height:63px;font-size:13px;padding:8px 0}#scene-controls>button>span{font-size:14px}#scene-controls>button small{font-size:11px;line-height:1.3}
 #scene-controls .next-view{font-size:13px;right:18px;min-height:44px}#scene-controls .guide-back{font-size:12px;left:18px;min-height:44px}
 body:not(.opening-active) #viewport{bottom:calc(160px + env(safe-area-inset-bottom))}
 #inquiry-nav button{font-size:13px}.people-finder{left:20px;right:20px}.people-finder button{font-size:13px;min-height:44px}
 .recipient-response{left:18px;right:18px;width:auto;top:160px;bottom:58px;max-height:none;padding:22px;overflow:auto;touch-action:pan-y}
 #opening-copy{left:22px;right:22px;top:112px;width:auto;max-height:calc(100dvh - 320px)}
 #opening-title{font-size:38px;line-height:1.04;margin-bottom:14px}#opening-description{font-size:15px;line-height:1.55;max-width:36ch}
 #opening-chapters button{font-size:12px;min-height:44px}.opening-bottom{bottom:15px}.opening-scope{font-size:11px}
 #skip-opening{top:63px;font-size:12px;min-height:44px}.opening-actions{gap:20px}#opening-next{font-size:15px}
 #reading-dialog{padding:0 20px 35px}#reading-dialog .reading-header{padding-top:16px;gap:18px;align-items:start}
 #reading-dialog .reading-header h2{font-size:26px;line-height:1.15}#reading-dialog .close-sheet{font-size:12px;min-height:44px;max-width:115px;text-align:right}
 .reading-tabs{gap:22px;padding-bottom:3px}.reading-tabs button{font-size:13px;white-space:nowrap}
 .library-heading{grid-template-columns:1fr;gap:12px;margin-bottom:30px}.library-heading h3{font-size:34px}.library-heading>p:last-child{grid-column:1}.library-heading>p{font-size:15px;line-height:1.6}
 .reading-layout p{font-size:16px;line-height:1.65}.reading-layout .lead{font-size:22px}.shelf-work strong{font-size:25px}.shelf-question{font-size:15px;line-height:1.5}
 .library-work-heading{display:block}.library-work-heading h3{font-size:32px}.library-work-heading #library-full-reading{margin-top:15px;max-width:none}
 .library-modes{gap:22px;margin-top:20px}.library-modes button{font-size:13px;line-height:1.35}.library-text>p{font-size:16px}
 .lab-intro>p{font-size:16px;line-height:1.6}.lab-intro .lab-north{font-size:14px}
}
@media(max-width:600px) and (max-height:710px){
 .world-question>.encounter-intro{display:none}.encounter-title{font-size:36px;margin-bottom:8px}
 #opening-copy{top:108px;max-height:calc(100dvh - 285px)}#opening-title{font-size:31px}#opening-description{font-size:14px;line-height:1.45}.opening-scope{display:none}
}
@media(prefers-reduced-motion:reduce){#world,#ai-world,#study-platform,.contribution{transition:none!important}}
/* Keep the paper’s navigation findable without a sideways search. */
#reading-dialog .reading-header{display:grid;grid-template-columns:1fr auto;align-items:center;gap:20px;min-height:80px}
#reading-dialog .reading-header h2{font:450 30px/1.1 InquirySerif,Georgia,serif;max-width:none;margin:0}
#reading-dialog .reading-header>.sound-control{display:none}
#reading-dialog .reading-header>.close-sheet{min-height:44px;padding:8px 0;font-size:14px;max-width:none}
.role-frame:before,.role-frame:after{color:var(--red)}
@media(max-width:600px){
 #reading-dialog .reading-header{padding-top:6px;min-height:72px;gap:14px}
 #reading-dialog .reading-header h2{font-size:27px}
 #reading-dialog .reading-header>.close-sheet{font-size:13px}
 .reading-tabs{flex-wrap:wrap;gap:0 20px;overflow:visible;position:relative}
 .reading-tabs button{min-height:40px;font-size:13px}
}
/* Expanded explanations stay in flow; they must not cover the switches they explain. */
#ai-trace-detail[open]{position:relative;left:auto;bottom:auto;max-height:28dvh;overflow:auto;padding:16px;background:var(--paper);box-shadow:none}
.ai-model-controls label{min-height:44px;font-size:13px}.ai-model-controls input{width:18px;height:18px}
#ai-trace{min-height:44px;font-size:14px}
#ai-caption details[open]{max-height:38dvh;overflow:auto;touch-action:pan-y;padding:12px}
#reading-dialog .reading-tabs{top:86px}
@media(max-width:600px){#reading-dialog .reading-header{padding:8px 0!important;min-height:68px!important}#reading-dialog .reading-tabs{top:68px;padding:0;position:sticky}.ai-model-controls{gap:0 18px}.ai-model-controls label{font-size:13px}#ai-trace-detail[open]{max-height:24dvh}.role-frame:before{opacity:1}}

body:not(.scene-ready) #world,body:not(.scene-ready) #ai-world{transition:none!important}
@media(max-width:600px){body:has(#ai-trace-detail[open]) #ai-screen-labels{display:none}}
body:not(.scene-ready) #study-platform{transition:none!important}
@media(min-width:901px){.scene-actions{display:none}}
@media(max-width:380px){#scene-controls>button>span{font-size:12px}}
@media(max-width:600px) and (max-height:710px){#scene-controls.scene-controls{height:88px}#scene-controls>button small{display:none}#scene-controls>button[data-context]{min-height:42px}body:not(.opening-active) #viewport{bottom:calc(136px + env(safe-area-inset-bottom))}}
