
:root{--ink:#073d33;--ink-deep:#062f29;--green:#087958;--green-dark:#056346;--muted:#728983;--line:#b8d1c8;--line-light:#dce7e2;--paper:#f8fbf9;--pale:#eaf4ed;--background:#f8fbf9;--foreground:#073d33;--font-sans:"PingFang SC","Microsoft YaHei",Arial,sans-serif;--font-serif:"Songti SC","STSong","Noto Serif CJK SC","SimSun",serif;--radius:3px;color-scheme:light}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:var(--paper);color:var(--ink);font-family:var(--font-sans);font-size:14px;-webkit-font-smoothing:antialiased}body{overflow-x:hidden}button,input,textarea{font:inherit}button,a,input,textarea{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.42}a{color:inherit;text-decoration:none}button{color:inherit}button:not(.button){background:none;border:0}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible{outline:2px solid var(--green);outline-offset:5px}img{display:block;max-width:100%}svg{flex-shrink:0}p,h1,h2,h3{margin:0}button,a{touch-action:manipulation}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.skip-link{opacity:0;pointer-events:none;position:fixed;z-index:99;top:-70px;left:20px;padding:12px 18px;background:var(--ink);color:white}.skip-link:focus{top:10px;opacity:1;pointer-events:auto}.site{min-height:100svh;display:flex;flex-direction:column;background:linear-gradient(135deg,transparent 42%,#deebe325 42.05%,transparent 42.1%),var(--paper)}.site-header{height:100px;flex-shrink:0;border-bottom:1px solid #6c9e8f;display:flex;align-items:center;justify-content:space-between;padding:0 3.2%;position:relative;z-index:5;background:linear-gradient(45deg,transparent calc(26% - 1px),#b8d1c860 26%,transparent calc(26% + 1px)),linear-gradient(135deg,transparent calc(66% - 1px),#b8d1c860 66%,transparent calc(66% + 1px)),#f9fcfaee}.site-header:before{content:"";position:absolute;top:0;bottom:0;left:20.3%;width:1px;background:var(--line)}.wordmark{font-family:Georgia,"Times New Roman",serif;font-size:49px;letter-spacing:-2.2px;font-weight:600;line-height:1;padding:0;z-index:1}.site-header nav{display:flex;gap:44px;height:100%;align-items:stretch}.nav-link{position:relative;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:5px;min-width:60px;padding:0 5px;font-weight:600}.nav-link>span{font-size:19px;letter-spacing:2px}.nav-link small{font-size:9px;letter-spacing:2.8px}.nav-link:after{content:"";position:absolute;width:0;height:4px;background:var(--green);bottom:18px;left:50%;transform:translateX(-50%);transition:width .2s}.nav-link.active:after,.nav-link:hover:after{width:54px}.main-content{flex:1;min-width:0}.eyebrow{font-size:10px;font-weight:500;letter-spacing:2px;color:#638578;line-height:1.5}.site-footer{height:35px;border-top:1px solid #8daf9f;padding:0 2.5%;display:flex;align-items:center;gap:24px;color:#718b81;font-size:9px;letter-spacing:2px;background:#f8fbf8;z-index:4;flex-shrink:0}.site-footer>span:nth-child(2){letter-spacing:1.5px;font-size:8px}.site-footer button{margin-left:auto;display:flex;align-items:center;gap:8px;font-size:9px;letter-spacing:1px;padding:5px 0}.button{border:1px solid #87b3a1;border-radius:2px;padding:13px 23px;display:inline-flex;align-items:center;justify-content:center;gap:18px;background:transparent;min-height:45px;line-height:1.3;transition:background .16s,border-color .16s,transform .16s}.button:hover:not(:disabled){background:#e8f2eb;border-color:var(--green)}.button.primary{background:var(--green);border-color:var(--green);color:#fff}.button.primary:hover:not(:disabled){background:var(--green-dark)}.button.quiet{background:#ffffff80}.text-button{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:5px 0;font-size:12px;color:var(--green);line-height:1.5}.text-button:hover:not(:disabled){color:var(--ink-deep);text-decoration:underline;text-underline-offset:4px}.icon-button{display:grid;place-items:center;width:34px;height:34px;border-radius:50%}.icon-button:hover{background:var(--pale)}.fine-rule{display:block;width:45px;height:1px;background:#9dbdad}

.hero{height:calc(100svh - 135px);min-height:590px;max-height:1050px;position:relative;isolation:isolate;overflow:hidden;background:#f5faf7}.hero-grid{position:absolute;inset:0;z-index:-2;background-image:linear-gradient(90deg,#6d9e8a28 1px,transparent 1px),linear-gradient(#6d9e8a28 1px,transparent 1px),linear-gradient(135deg,transparent calc(50% - .5px),#97b9a940 50%,transparent calc(50% + .5px));background-size:calc((100vw - 70px) / 5) 100%,100% 192px,440px 440px;background-position:35px 0,0 77px,-140px -120px}.hero-grid:after{content:"";position:absolute;inset:0;background-image:radial-gradient(#366f5b24 .6px,transparent .7px);background-size:6px 6px;mask-image:linear-gradient(130deg,transparent 5%,#000 27%,transparent 42%,transparent 70%,#000)}.hero-ghost{position:absolute;left:7%;top:-21%;height:180%;width:73%;object-fit:cover;object-position:50% 0;filter:grayscale(1);opacity:.105;z-index:-1;pointer-events:none;transform:rotate(-1deg);mix-blend-mode:multiply}.hero-character{position:absolute;right:7.2%;bottom:-7%;height:110%;width:auto;max-width:52%;object-fit:contain;object-position:center bottom;z-index:2;pointer-events:none;filter:drop-shadow(0 12px 20px #194b3020)}.hero-outline{position:absolute;left:1.3%;bottom:-53px;font-family:Arial,Helvetica,sans-serif;font-size:clamp(135px,19.4vw,330px);font-weight:800;letter-spacing:-13px;white-space:nowrap;color:transparent;-webkit-text-stroke:1px #6b9d8e;line-height:1;z-index:0;opacity:.8;user-select:none}.hero-copy{position:absolute;left:5.2%;top:28%;width:49%;z-index:3}.hero-copy>.eyebrow{font-size:9px;color:#638779;letter-spacing:2.4px;margin-bottom:20px;display:block}.hero h1{font-family:var(--font-serif);font-size:clamp(65px,6.8vw,116px);font-weight:700;letter-spacing:7px;line-height:1.15;color:#002f27}.hero-roman{font-size:22px;letter-spacing:11px;margin:12px 0 0 3px;font-weight:400}.hero-intro{margin-top:32px;line-height:1.9;font-size:14px;color:#355f51}.hero-intro>span{font-size:11px;color:#6d897e;letter-spacing:1px}.hero-actions{display:flex;gap:13px;margin-top:24px}.hero-actions .button{min-width:148px;font-size:13px;padding:12px 20px;min-height:44px}.hero-disclaimer{font-size:9px;letter-spacing:.7px;color:#6b877d;margin-top:15px}.hero-coordinate{position:absolute;right:2.6%;top:28px;display:flex;gap:9px;writing-mode:vertical-rl;font-size:8px;letter-spacing:2.5px;color:#64897c}.hero-coordinate span:last-child{color:#9ab2a7}.cross{position:absolute;width:17px;height:17px;z-index:1}.cross:before,.cross:after{content:"";position:absolute;background:#4c8e76}.cross:before{height:1px;width:17px;left:0;top:8px}.cross:after{width:1px;height:17px;top:0;left:8px}.cross-a{left:26px;top:69px}.cross-b{right:8%;top:45%}.cross-c{left:20%;bottom:24%}

.chat-layout{max-width:1800px;margin:0 auto;display:grid;grid-template-columns:minmax(0,2.16fr) minmax(300px,1fr);min-height:calc(100svh - 135px);padding:0 2.4%;position:relative}.chat-layout:before{content:"";position:absolute;left:2.4%;top:0;bottom:0;width:1px;background:#cadbd1}.conversation{padding:28px 29px 0;display:flex;flex-direction:column;min-width:0;min-height:calc(100svh - 135px);border-right:1px solid #82ad99;position:relative;background:linear-gradient(135deg,transparent 80%,#e5eee650 80.05%,transparent 80.15%)}.chat-heading{display:flex;align-items:center;justify-content:space-between;gap:18px;padding-bottom:22px;border-bottom:1px solid var(--line);position:relative}.chat-heading:after{content:"+";position:absolute;left:-34px;bottom:-7px;font-size:18px;color:#5c927b;font-weight:300}.chat-heading h1{font-family:var(--font-serif);font-size:29px;letter-spacing:2px;font-weight:650;line-height:1.4;margin-top:5px}.chat-heading .eyebrow{font-size:8px;letter-spacing:1.6px}.session-tools{display:flex;gap:8px;align-self:flex-end;padding-bottom:3px;flex-shrink:0}.small-button{display:inline-flex;align-items:center;justify-content:center;gap:7px;font-size:12px!important;padding:9px 11px!important;border:1px solid #74a48f!important;border-radius:3px;background:#ffffff30!important;line-height:1.3;white-space:nowrap}.small-button:hover:not(:disabled){background:var(--pale)!important}.conversation-toolbar{display:flex;justify-content:space-between;align-items:center;padding:12px 0 7px;gap:10px}.conversation-toolbar>div{display:flex;gap:21px;align-items:center}.conversation-toolbar .text-button{font-size:10px;color:#648878;letter-spacing:.1px}.count{font-size:9px;min-width:14px;text-align:center;background:#e7efe8;line-height:14px;border-radius:2px}.service-strip{display:flex;align-items:flex-start;gap:7px;font-size:10px;line-height:1.6;color:#71867d;padding:4px 0 13px}.service-strip .text-button{font-size:9px;padding:0;white-space:nowrap}.service-dot{width:5px;height:5px;background:#9dac9f;border-radius:50%;margin-top:5px;flex-shrink:0}.service-dot.available{background:var(--green)}.messages{flex:1;min-height:300px;padding:19px 2px 25px;overflow-wrap:anywhere}.message{display:flex;gap:16px;margin-bottom:29px;align-items:flex-start}.avatar{width:57px;height:62px;flex-shrink:0;border:1px solid #719580;border-radius:3px;position:relative;overflow:hidden;background:linear-gradient(140deg,#f2f6ef,#d4e0d2);margin-top:4px}.avatar img{width:160%;max-width:none;position:absolute;left:-30%;top:-5%}.doctor-avatar{display:grid;place-items:center;background:#284d41;color:#e2eee4}.doctor-avatar:before{content:"";position:absolute;inset:5px;border:1px solid #b3c9bd40}.doctor-avatar span{font-family:var(--font-serif);font-size:26px;font-weight:300}.message-content{max-width:calc(100% - 73px);min-width:0}.message-name{font-size:13px;letter-spacing:.6px;margin-bottom:7px;display:flex;align-items:center;gap:11px;font-weight:550}.opening-label{font-size:8px;letter-spacing:.3px;color:#8a9c90;font-weight:400}.message-bubble{border:1px solid #bdd2c7;border-radius:4px;background:#ffffffc9;padding:13px 18px;line-height:1.85;font-size:16px;color:#163b31;position:relative;white-space:pre-wrap}.message-bubble:before{content:"";position:absolute;left:-6px;top:16px;width:10px;height:10px;background:#fdfefd;border-left:1px solid #bdd2c7;border-bottom:1px solid #bdd2c7;transform:rotate(45deg)}.message-bubble .action-text{font-size:13px;line-height:1.8;color:#87968e;margin-bottom:5px}.user-message{flex-direction:row-reverse;margin:4px 0 29px}.user-message .message-name{justify-content:flex-end}.user-message .message-bubble{background:#eaf3ec;border-color:#a9c8b7}.user-message .message-bubble:before{left:auto;right:-6px;background:#eaf3ec;border-left:0;border-right:1px solid #a9c8b7;border-bottom:0;border-top:1px solid #a9c8b7}.message-references{display:flex;flex-wrap:wrap;gap:6px 14px;padding:10px 1px 0}.message-references a{display:inline-flex;align-items:center;gap:3px;font-size:11px;color:var(--green)}.message-references a:hover{text-decoration:underline;text-underline-offset:3px}.opening-hint{margin:52px 0 0 73px;max-width:350px;color:#91a297;font-size:11px;line-height:1.8}.opening-hint .fine-rule{margin-bottom:14px;width:26px;background:#ceddd2}.opening-hint .text-button{font-size:10px;margin-top:11px;color:#7a9787}.reply-pending{display:flex;align-items:center;gap:4px;margin:0 0 20px 74px;color:#6e8a7b}.reply-pending>span{width:4px;height:4px;border-radius:50%;background:#71917f;animation:pulse 1.4s infinite}.reply-pending>span:nth-child(2){animation-delay:.2s}.reply-pending>span:nth-child(3){animation-delay:.4s}.reply-pending p{font-size:10px;margin-left:6px}.composer-area{padding:16px 0 13px;border-top:1px solid var(--line-light);position:relative}.composer-area:before{content:"+";position:absolute;left:-34px;top:-12px;color:#5c927b;font-size:18px;font-weight:300}.composer{display:flex;align-items:flex-end;gap:12px}.composer textarea{resize:vertical;width:100%;min-height:91px;max-height:200px;display:block;background:#ffffffdb;border:1px solid #83ad98;border-radius:1px;color:var(--ink);padding:14px 17px;font-size:14px;line-height:1.7}.composer textarea::placeholder{color:#8a9c92}.composer textarea:focus{outline-offset:2px}.send-button{min-width:111px;padding:12px 19px;min-height:45px;font-size:16px;gap:14px}.composer-meta{display:flex;justify-content:space-between;gap:10px;line-height:1.6;color:#71897c;font-size:9px;padding-top:8px}.composer-meta>span:first-child{display:flex;gap:4px;align-items:center}.chat-privacy{color:#8a9e91;font-size:8px;line-height:1.5;margin-top:7px;letter-spacing:.2px}.character-state{padding:33px 0 22px 25px;min-width:0;position:relative;display:flex;flex-direction:column;overflow:hidden}.state-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:29px}.state-heading h2{font-family:var(--font-serif);font-size:25px;letter-spacing:1.5px;font-weight:650}.state-heading>span{font-size:9px;color:#8a9c91;white-space:nowrap}.state-cards{display:flex;flex-direction:column;gap:13px;position:relative;z-index:1}.state-card{border:1px solid #a9c6b7;border-radius:2px;padding:16px 16px 17px;background:linear-gradient(125deg,#f8fbf8bd,#eff6ef90);min-height:91px}.state-card h3{font-size:12px;font-weight:550;color:#227757;display:flex;gap:8px;align-items:center;margin-bottom:11px;letter-spacing:.5px}.state-card p{font-size:16px;line-height:1.7;overflow-wrap:anywhere;color:#1e4436}.state-note{font-size:9px;display:block;margin-top:6px;color:#8a9e90}.action-card{min-height:113px}.action-card p{font-size:14px}.state-footnote{display:flex;gap:7px;color:#7e9686;font-size:9px;line-height:1.8;margin-top:20px;position:relative;z-index:2}.state-footnote svg{margin-top:2px}.state-source{align-self:flex-start;font-size:10px;margin-top:12px}.state-portrait{position:relative;flex:1;min-height:170px;margin-top:12px;overflow:hidden;opacity:.3;mask-image:linear-gradient(#000 70%,transparent)}.state-portrait img{position:absolute;width:200px;max-width:80%;right:7%;top:0;filter:grayscale(.5)}.state-portrait>span{position:absolute;font-family:Georgia,serif;font-size:40px;left:0;bottom:20px;letter-spacing:5px;color:#5d8b71;opacity:.55;writing-mode:vertical-rl}.portrait-toggle{display:none}.state-collapsed{grid-template-columns:1fr;max-width:1200px}.state-collapsed .conversation{border-right:1px solid #cadbd1}.chat-error{display:flex;align-items:flex-start;gap:9px;border:1px solid #c9b59b;background:#fcf9f1;padding:12px;margin-bottom:12px;font-size:12px;line-height:1.6;color:#785b30}.chat-error>svg{margin-top:2px}.chat-error>div{flex:1}.chat-error span{display:block;font-size:10px;color:#8a795e;margin-top:5px}.chat-error .text-button{font-size:12px;white-space:nowrap;color:#785b30}.quota-notice{font-size:11px;padding:9px 12px;background:#f2f0e8;border-left:2px solid #b3a582;margin-bottom:12px;color:#827450}

.archive-page,.about-page{max-width:1440px;margin:0 auto;padding:52px 5% 50px}.page-heading{display:flex;justify-content:space-between;align-items:flex-end;gap:30px;margin-bottom:36px}.page-heading h1{font-family:var(--font-serif);font-size:45px;line-height:1.35;letter-spacing:3px;margin-top:13px;font-weight:650}.page-heading>div>p{font-size:13px;line-height:1.8;color:#809387;letter-spacing:1px;margin-top:14px}.archive-stamp{display:flex;align-items:center;gap:15px;color:#749380;position:relative;bottom:3px;padding-left:20px;border-left:1px solid var(--line)}.archive-stamp>span{font-size:12px;letter-spacing:1px;line-height:1.5}.archive-stamp small{display:block;font-size:8px;letter-spacing:1.4px;margin-top:6px}.archive-controls{display:flex;justify-content:space-between;gap:15px;align-items:center;border-bottom:1px solid #a6c4b5;padding-bottom:14px}.category-tabs{display:flex;gap:5px;flex-wrap:wrap}.category-tabs button{padding:9px 15px;border-radius:2px;font-size:12px;white-space:nowrap;color:#688774}.category-tabs button.selected{background:#e2eee5;color:#08603f}.category-tabs button:hover{background:#edf4ed}.archive-search{display:flex;align-items:center;gap:9px;border:1px solid #bad0c0;background:#ffffff80;padding:8px 11px;min-width:243px;color:#70917d;border-radius:2px}.archive-search input{width:100%;border:0;background:transparent;outline:none;font-size:11px;color:var(--ink)}.archive-search input::placeholder{color:#8ca193}.archive-search button{padding:0;display:flex}.archive-disclaimer{display:flex;align-items:flex-start;gap:7px;font-size:10px;line-height:1.6;color:#819787;padding:16px 0 24px}.archive-disclaimer>svg{margin-top:1px}.archive-disclaimer p{flex:1}.archive-disclaimer>span{white-space:nowrap;color:#789481;margin-left:15px}.archive-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;align-items:start}.archive-card{background:#ffffffa8;border:1px solid #c4d7c9;padding:23px 22px 0;position:relative;scroll-margin-top:25px;transition:border-color .2s,box-shadow .2s}.archive-card:before{content:"";width:7px;height:7px;border-top:1px solid #6a9b7f;border-left:1px solid #6a9b7f;position:absolute;left:-1px;top:-1px}.archive-card.linked{border-color:var(--green);box-shadow:0 0 0 3px #dcebe1}.archive-card-top{display:flex;justify-content:space-between;align-items:center;color:#78927e;font-size:9px;letter-spacing:.7px;gap:10px}.entry-number{font-size:8px;letter-spacing:1px;color:#9bad9d}.archive-card h2{font-family:var(--font-serif);font-size:23px;line-height:1.4;margin:18px 0 11px;letter-spacing:1px;font-weight:650}.archive-card h2 a:hover{color:var(--green)}.entry-summary{color:#748978;font-size:11px;line-height:1.9;min-height:62px}.entry-tags{display:flex;flex-wrap:wrap;gap:6px;margin:14px 0 20px}.source-tag,.spoiler-tag{font-size:8px;display:inline-flex;align-items:center;gap:4px;line-height:1.4;padding:3px 6px;background:#edf4ed;color:#70957c}.community{background:#f1f2ea;color:#899276}.spoiler-tag{background:#f5f0e5;color:#9c8b60}.entry-expand{border-top:1px solid #e0e9e1!important;width:100%;display:flex;justify-content:space-between;align-items:center;color:#5e876b;padding:13px 0!important;font-size:10px}.entry-expand svg{transition:transform .2s}.entry-expand .turned{transform:rotate(180deg)}.entry-details{padding:7px 0 17px;font-size:11px}.entry-details dl{margin:0 0 23px;display:flex;flex-direction:column;gap:9px}.entry-details dl>div{display:grid;grid-template-columns:76px 1fr;gap:8px;line-height:1.7}.entry-details dt{color:#8b9e8c}.entry-details dd{margin:0;color:#42694c;overflow-wrap:anywhere}.entry-details h3{font-size:9px;color:#72917a;font-weight:500;letter-spacing:1px;margin-bottom:12px}.entry-details ul{padding:0;margin:0;list-style:none}.entry-details li{margin:0 0 14px;line-height:1.7}.source-type{display:inline-block;font-size:8px;color:#76927d;background:#edf3ed;padding:1px 4px;margin-right:6px;vertical-align:middle}.entry-details li>a{display:inline;color:#317e51;text-decoration:underline;text-decoration-color:#c6d9c7;text-underline-offset:3px}.entry-details li>a svg{display:inline-block;vertical-align:middle;margin-left:5px;transform:rotate(-35deg)}.entry-details li>p{font-size:9px;color:#8b9a88;margin-top:5px}.entry-details-footer{display:flex;justify-content:space-between;gap:10px;align-items:center;border-top:1px solid #e2ebe1;padding-top:12px;margin-top:17px}.entry-details-footer>span{font-size:8px;color:#95a48f}.entry-details-footer .text-button{font-size:10px}.source-listen{display:inline-flex;align-items:center;gap:7px;border:1px solid #bbd1bd;padding:8px 11px;color:#487c51;font-size:10px;margin:6px 0}.archive-bottom{margin-top:44px;display:flex;align-items:center;gap:16px;flex-wrap:wrap;font-size:10px;color:#819984}.archive-bottom .text-button{margin-left:auto;font-size:10px}.empty-state{text-align:center;padding:65px 20px;display:flex;flex-direction:column;align-items:center;color:#82a08c}.empty-state h2{font-family:var(--font-serif);color:var(--ink);font-size:24px;margin-top:21px;font-weight:500}.empty-state p{font-size:12px;margin:12px 0 22px;line-height:1.8}.empty-state .button{font-size:12px}.about-page{max-width:1180px;padding-top:62px}.about-page .page-heading{align-items:center;margin-bottom:56px}.about-page .page-heading h1{font-size:40px;line-height:1.55}.about-mark{font-family:Georgia,serif;font-size:147px;line-height:1;color:transparent;-webkit-text-stroke:1px #a9c7ae;margin-right:7%;font-style:italic}.about-grid{display:grid;grid-template-columns:1fr 1fr;gap:44px 65px}.about-grid article{border-top:1px solid #b4cfb9;padding-top:21px}.section-index{font-size:9px;letter-spacing:1.4px;color:#94aa94}.about-grid h2{font-family:var(--font-serif);font-size:25px;line-height:1.5;letter-spacing:1px;font-weight:600;margin:15px 0 18px}.about-grid p{font-size:12px;line-height:2;color:#718b73;margin-bottom:12px}.about-bottom{margin-top:55px;padding-top:31px;border-top:1px solid #d1e0d0;display:flex;justify-content:space-between;align-items:center;gap:20px}.about-bottom>p{font-family:var(--font-serif);font-size:18px;color:#739379;letter-spacing:1px}.about-bottom .button{font-size:12px}

.dialog{padding:0;border:1px solid #9cbea6;background:#fafcf8;color:var(--ink);width:min(460px,calc(100vw - 32px));max-height:calc(100svh - 48px);overflow-y:auto;margin:auto;box-shadow:0 22px 90px #113e242d;border-radius:3px}.dialog::backdrop{background:#163f3038;backdrop-filter:blur(5px)}.dialog-wide{width:min(680px,calc(100vw - 32px))}.dialog-body{padding:29px 31px}.dialog-top{display:flex;align-items:center;justify-content:space-between;gap:20px}.dialog-top h2{font-family:var(--font-serif);font-size:28px;letter-spacing:2px;font-weight:600}.dialog-description{font-size:12px;color:#79917a;line-height:1.9;margin:15px 0 24px}.scene-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.scene-card{display:flex;flex-direction:column;align-items:flex-start;text-align:left;padding:20px 18px!important;border:1px solid #c6d8c5!important;border-radius:3px;background:#ffffff70!important;color:#729577;position:relative}.scene-card.selected{border-color:#468b5e!important;background:#eaf4e8!important;box-shadow:inset 0 0 0 1px #44885a}.scene-title{font-size:14px;letter-spacing:.5px;color:#244e32;margin-top:15px}.scene-description{font-size:10px;color:#81957d;line-height:1.7;margin-top:8px}.scene-time{font-size:9px;color:#90a18a;display:flex;align-items:center;justify-content:space-between;width:100%;margin-top:20px}.scene-time>span{color:#648d67}.custom-fields{padding-top:22px;display:flex;flex-direction:column;gap:14px}.custom-fields label{display:flex;flex-direction:column;gap:8px;font-size:11px;color:#5f805f}.custom-fields input,.custom-fields textarea{background:white;border:1px solid #b5ceb3;border-radius:2px;color:var(--ink);padding:10px 12px;font-size:12px;width:100%;line-height:1.8}.custom-fields textarea{min-height:90px;resize:vertical}.custom-fields p{font-size:9px;color:#8a9f83}.dialog-actions{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-top:24px}.dialog-actions>span{font-size:9px;color:#90a18a}.dialog-actions .button{font-size:12px}.form-error{font-size:11px;color:#a05d35;margin-top:15px}.confirm-actions{display:flex;justify-content:flex-end;gap:12px;margin-top:26px}.confirm-actions .button{font-size:12px;min-height:39px;padding:10px 18px}.danger-button{background:#8a4f40;color:white;border-color:#8a4f40}.danger-button:hover:not(:disabled){background:#743d31;border-color:#743d31}.history-list{display:flex;flex-direction:column;gap:9px;max-height:360px;overflow-y:auto;padding:2px}.history-item{display:flex;align-items:center;justify-content:space-between;gap:10px;border:1px solid #d4e1cf!important;padding:14px 15px!important;text-align:left;background:#ffffff80!important;border-radius:2px}.history-item.selected{border-color:#8cb38b!important;background:#eff6ec!important}.history-item>span:first-child{display:flex;flex-direction:column;gap:7px;min-width:0}.history-item strong{font-size:13px;font-weight:500}.history-item small{font-size:10px;color:#8b9e84;overflow-wrap:anywhere}.history-item>span:last-child{display:flex;align-items:center;gap:13px}.history-item time{font-size:9px;color:#8fa187;white-space:nowrap}.history-actions{display:flex;justify-content:space-between;gap:15px;border-top:1px solid #dce6d6;padding-top:16px;margin-top:23px}.history-actions .text-button{font-size:10px;color:#82957b}.history-actions .danger{color:#996a4c}.history-empty{font-size:12px;color:#8c9e83;text-align:center;padding:35px 10px}.storage-alert{display:flex;align-items:center;gap:9px;padding:11px 4%;background:#f5efdf;border-bottom:1px solid #d4c3a3;font-size:11px;color:#826946;line-height:1.7}.storage-alert>span{flex:1}.storage-alert button{text-decoration:underline;white-space:nowrap;padding:3px 0;font-size:10px}.toast{position:fixed;bottom:54px;left:50%;transform:translateX(-50%);width:max-content;max-width:calc(100vw - 36px);z-index:30;background:#fafff7;border:1px solid #8eaf88;box-shadow:0 8px 35px #20432120;padding:13px 16px;display:flex;align-items:center;gap:12px;color:#456c40;font-size:12px;line-height:1.7;border-radius:3px}.toast>span{flex:1}.toast button{display:flex;padding:4px}.page-chat .main-content{display:flex;flex-direction:column}.page-chat .chat-layout{width:100%;flex:1}@keyframes pulse{0%,80%,100%{opacity:.35}40%{opacity:1}}

@media(min-width:1500px){.hero-copy{top:29%}.hero-character{right:8%;height:112%}.hero h1{font-size:110px}.hero-roman{font-size:25px}.chat-heading h1{font-size:32px}.message-bubble{font-size:18px}.message-bubble .action-text{font-size:15px}.chat-layout{grid-template-columns:minmax(0,2.16fr) minmax(350px,1fr)}.state-card p{font-size:19px}.state-card h3{font-size:14px}.action-card p{font-size:17px}}
@media(max-width:1150px){.site-header nav{gap:24px}.hero-copy{left:5%;top:25%}.hero-character{right:1%;height:106%;max-width:56%}.hero-intro{font-size:12px}.hero-actions .button{min-width:136px}.chat-layout{padding:0 2%;grid-template-columns:minmax(0,1.8fr) minmax(270px,1fr)}.conversation{padding-left:20px;padding-right:20px}.chat-heading{align-items:flex-start;flex-direction:column;gap:15px;padding-bottom:17px}.chat-heading h1{font-size:27px}.session-tools{align-self:flex-start}.chat-heading:after,.composer-area:before{left:-25px}.character-state{padding-left:20px;padding-top:33px}.state-heading h2{font-size:21px}.state-heading{margin-bottom:25px}.state-card{padding:15px 13px}.message{gap:12px}.avatar{width:45px;height:51px}.message-content{max-width:calc(100% - 57px)}.message-bubble{font-size:14px;padding:12px 14px}.message-bubble .action-text{font-size:12px}.opening-hint{margin-left:58px}.archive-grid{gap:16px;grid-template-columns:repeat(2,minmax(0,1fr))}.archive-controls{flex-wrap:wrap}.archive-search{margin-left:auto;min-width:240px}.archive-card{padding:22px 23px 0}.about-grid{gap:36px 40px}.state-collapsed{grid-template-columns:1fr}.state-collapsed .chat-heading{flex-direction:row}.state-collapsed .session-tools{align-self:flex-end}}
@media(max-width:799px){.site-header{height:82px;padding:0 5%;}.site-header:before{left:31%}.wordmark{font-size:38px;letter-spacing:-1.8px}.site-header nav{gap:18px}.nav-link{min-width:43px;padding:0 1px}.nav-link>span{font-size:15px;letter-spacing:1px}.nav-link small{font-size:7px;letter-spacing:1.4px}.nav-link:after{bottom:12px;height:3px}.nav-link.active:after,.nav-link:hover:after{width:36px}.site-footer{height:34px;letter-spacing:1px;padding:0 4%}.site-footer>span:nth-child(2){display:none}.hero{height:calc(100svh - 116px);min-height:620px;max-height:none}.hero-copy{left:6%;top:11%;width:64%}.hero-copy>.eyebrow{font-size:7px;letter-spacing:1.1px;margin-bottom:15px}.hero h1{font-size:73px;letter-spacing:4px}.hero-roman{font-size:17px;letter-spacing:8px;margin-top:9px}.hero-intro{margin-top:24px;font-size:11px;max-width:270px}.hero-intro>span{font-size:9px}.hero-character{height:79%;max-width:77%;right:-9%;bottom:-9%;opacity:1}.hero-ghost{left:-16%;width:110%;top:-4%;height:139%;opacity:.09}.hero-outline{font-size:25vw;bottom:17%;left:1%;letter-spacing:-8px}.hero-actions{flex-direction:column;align-items:flex-start;margin-top:21px;gap:10px}.hero-actions .button{font-size:11px;min-width:137px;min-height:39px;padding:10px 14px;gap:13px}.hero-disclaimer{font-size:8px;line-height:1.9;width:170px;margin-top:15px;color:#6f8c7a}.hero-coordinate{right:5%;top:19px;font-size:7px;letter-spacing:2px}.cross-a{left:14px;top:48px}.cross-c{left:20%;bottom:15%}.hero-grid{background-size:155px 100%,100% 160px,350px 350px;background-position:20px 0,0 57px,-140px -40px}.chat-layout,.chat-layout.state-collapsed{display:flex;flex-direction:column;padding:0 4%;min-height:calc(100svh - 116px)}.chat-layout:before{left:4%}.conversation{order:1;min-height:calc(100svh - 116px);padding:24px 17px 0;border-right:1px solid #cadbd1}.chat-heading,.state-collapsed .chat-heading{flex-direction:row;align-items:center;padding-bottom:20px;gap:10px}.chat-heading h1{font-size:25px;letter-spacing:1px}.chat-heading .eyebrow{font-size:7px;letter-spacing:1.3px}.session-tools,.state-collapsed .session-tools{gap:7px;align-self:center}.session-tools .small-button{padding:8px!important;min-width:31px;min-height:31px}.session-tools .small-button>span{display:none}.conversation-toolbar>div{gap:16px}.conversation-toolbar .text-button{font-size:9px}.service-strip{font-size:9px;line-height:1.7;padding-top:6px}.messages{padding-top:19px;min-height:250px}.message{gap:10px;margin-bottom:24px}.avatar{width:43px;height:48px}.message-content{max-width:calc(100% - 53px)}.message-name{font-size:12px;margin-bottom:6px}.message-bubble{font-size:14px;padding:11px 13px;line-height:1.85}.message-bubble .action-text{font-size:11px}.opening-label{font-size:7px}.opening-hint{margin:35px 0 0 54px;font-size:10px}.composer-area{padding-top:13px;padding-bottom:12px}.composer textarea{min-height:86px;max-height:170px;font-size:13px;padding:11px 12px;resize:none}.composer{gap:8px}.send-button{min-width:76px;min-height:43px;padding:11px 13px;font-size:13px;gap:9px}.send-button svg{width:14px}.composer-meta{font-size:8px;gap:5px}.desktop-only{display:none}.chat-privacy{font-size:7px;line-height:1.7}.character-state{order:0;border:1px solid #afc9b8;margin:15px 0 0;padding:17px 17px 13px;background:#f1f7ef}.state-heading{margin:0 0 15px}.state-heading h2{font-size:21px}.state-cards{display:grid;grid-template-columns:1fr 1fr;gap:10px}.state-card{min-height:auto;padding:12px}.state-card h3{font-size:10px;gap:6px;margin-bottom:7px}.state-card h3 svg{width:13px;height:13px}.state-card p{font-size:12px}.state-note{font-size:8px;line-height:1.6;margin-top:5px}.action-card{grid-column:1/-1}.action-card p{font-size:12px}.state-footnote{font-size:8px;margin-top:13px}.state-source{font-size:9px;margin-top:7px}.state-portrait{display:none;min-height:190px;margin-top:7px;opacity:.55}.state-portrait.portrait-open{display:block}.state-portrait img{width:230px;right:calc(50% - 115px)}.state-portrait>span{left:20px;bottom:10px}.portrait-toggle{display:inline-flex;align-self:flex-start;margin-top:13px;font-size:10px}.chat-heading:after,.composer-area:before{left:-22px}.archive-page,.about-page{padding:35px 6% 35px}.page-heading{margin-bottom:26px;gap:15px}.page-heading h1{font-size:37px;letter-spacing:2px;margin-top:10px}.page-heading>div>p{font-size:11px;margin-top:10px;letter-spacing:.5px}.archive-stamp{gap:9px;padding-left:12px}.archive-stamp svg{width:20px}.archive-stamp>span{font-size:10px}.archive-stamp small{font-size:6px;letter-spacing:.6px}.category-tabs{gap:2px}.category-tabs button{padding:8px 10px;font-size:11px}.archive-controls{gap:13px;padding-bottom:15px}.archive-search{width:100%;padding:10px 12px}.archive-disclaimer{font-size:9px;padding:15px 0 20px}.archive-disclaimer>span{display:none}.archive-grid{gap:14px}.archive-card{padding:21px 20px 0}.archive-card h2{font-size:23px;margin-top:14px}.archive-bottom{margin-top:30px;gap:12px;font-size:9px;line-height:1.8}.archive-bottom .fine-rule{display:none}.archive-bottom .text-button{margin-left:0;font-size:9px}.about-page .page-heading h1{font-size:30px;letter-spacing:1px}.about-page .page-heading{margin-bottom:38px}.about-mark{font-size:100px;margin-right:0}.about-grid{gap:28px 27px}.about-grid h2{font-size:22px;margin:12px 0 14px}.about-grid p{font-size:11px}.section-index{font-size:8px;letter-spacing:1px}.about-bottom{margin-top:35px;align-items:flex-start;flex-direction:column;gap:21px}.about-bottom>p{font-size:16px;line-height:1.8}.dialog-body{padding:23px}.dialog-top h2{font-size:25px}.dialog-description{font-size:11px;margin-bottom:20px}.scene-card{padding:17px 14px!important}.scene-title{font-size:13px}.scene-description{font-size:9px}.scene-time{font-size:8px;margin-top:17px}.dialog-actions{gap:10px}.dialog-actions .button{font-size:11px;padding:12px 16px}.history-item{padding:12px!important}.history-item strong{font-size:12px}.history-item small{font-size:9px}.history-item time{font-size:8px}.history-item>span:last-child{gap:5px}.toast{bottom:46px;font-size:11px;padding:12px 14px;gap:8px}.storage-alert{font-size:10px;align-items:flex-start}.storage-alert>svg{margin-top:3px}.storage-alert button{font-size:9px}.chat-error{font-size:11px;padding:10px}.chat-error span{font-size:9px}}
@media(max-width:520px){.site-header{height:76px;padding:0 5%}.wordmark{font-size:34px}.site-header nav{gap:14px}.nav-link{min-width:35px}.nav-link>span{font-size:13px;letter-spacing:.7px}.nav-link small{font-size:6px;letter-spacing:1px}.nav-link.active:after,.nav-link:hover:after{width:30px}.nav-link:after{bottom:10px}.hero{height:calc(100svh - 110px);min-height:610px}.hero-copy{top:10%;width:76%}.hero-copy>.eyebrow{font-size:6px;letter-spacing:1.25px}.hero h1{font-size:65px}.hero-roman{font-size:16px;letter-spacing:7px}.hero-intro{margin-top:22px;max-width:190px;line-height:1.9;font-size:10px}.hero-intro>span{font-size:8px}.hero-character{height:77%;max-width:87%;right:-19%;bottom:-7%}.hero-outline{bottom:16%;font-size:30vw;left:-2%;letter-spacing:-6px}.hero-ghost{width:130%;left:-29%;height:140%;opacity:.09}.hero-actions .button{min-width:129px;font-size:10px;min-height:37px;padding:9px 13px}.hero-disclaimer{font-size:7px;width:142px;line-height:1.9}.hero-coordinate{right:5%;font-size:6px;top:17px}.site-footer{font-size:8px;gap:10px}.site-footer button{font-size:8px}.chat-layout,.chat-layout.state-collapsed,.conversation{min-height:calc(100svh - 110px)}.conversation{padding-left:13px;padding-right:13px;padding-top:22px}.chat-heading h1{font-size:23px}.chat-heading{padding-bottom:18px}.chat-heading .eyebrow{font-size:6px;letter-spacing:.8px}.session-tools{gap:4px}.session-tools .small-button{min-width:28px;min-height:28px;padding:6px!important}.small-button svg{width:13px}.conversation-toolbar>div{gap:11px}.conversation-toolbar .text-button{font-size:8px;gap:4px}.conversation-toolbar svg{width:13px}.conversation-toolbar .count{font-size:7px;min-width:12px;line-height:12px}.conversation-toolbar .state-toggle>span{font-size:8px}.service-strip{font-size:8px;gap:6px;padding-bottom:7px}.messages{padding-top:20px;min-height:270px}.message{gap:9px}.avatar{width:36px;height:42px;margin-top:3px}.doctor-avatar span{font-size:22px}.message-content{max-width:calc(100% - 45px)}.message-name{font-size:11px;gap:7px}.opening-label{font-size:6px}.message-bubble{font-size:13px;padding:10px 12px;line-height:1.9}.message-bubble .action-text{font-size:10px;line-height:1.85}.message-bubble:before{width:8px;height:8px;left:-5px}.user-message .message-bubble:before{right:-5px}.opening-hint{margin-left:45px;font-size:9px;margin-top:33px}.opening-hint .text-button{font-size:9px}.composer{gap:7px}.composer textarea{min-height:86px;font-size:12px;padding:10px}.send-button{min-width:65px;min-height:39px;padding:9px 11px;font-size:12px;gap:6px}.send-button svg{width:12px}.composer-meta{font-size:7px}.composer-meta svg{width:10px}.chat-privacy{font-size:6px;margin-top:6px}.chat-heading:after,.composer-area:before{left:-18px}.archive-grid{grid-template-columns:1fr}.archive-stamp{display:none}.page-heading h1{font-size:35px}.archive-page,.about-page{padding:32px 6%}.category-tabs{gap:3px}.category-tabs button{padding:7px 10px;font-size:10px}.archive-card{padding:24px 23px 0}.entry-summary{min-height:auto;font-size:12px}.entry-expand{font-size:11px;padding:15px 0!important}.archive-card h2{font-size:25px}.archive-card-top{font-size:10px}.entry-tags{margin-bottom:19px}.source-tag,.spoiler-tag{font-size:9px}.entry-details{font-size:12px}.entry-details li>p{font-size:10px}.entry-details-footer>span{font-size:9px}.entry-details-footer .text-button{font-size:11px}.about-grid{grid-template-columns:1fr;gap:30px}.about-mark{display:none}.about-page .page-heading h1{font-size:31px;line-height:1.5}.about-page .page-heading>div>p{font-size:10px}.about-grid h2{font-size:25px}.about-grid p{font-size:12px;line-height:2}.section-index{font-size:9px}.dialog-body{padding:21px}.dialog-top h2{font-size:24px}.scene-grid{gap:9px}.scene-card{padding:16px 12px!important}.scene-title{font-size:12px}.scene-description{font-size:9px}.scene-time{font-size:8px}.scene-card>svg{width:21px}.dialog-actions>span{font-size:8px}.dialog-actions .button{padding:11px 13px}.history-actions .text-button{font-size:9px}.confirm-actions .button{font-size:11px}.state-card{padding:11px}.state-card h3{font-size:9px}.state-card p{font-size:11px}.action-card p{font-size:11px}.chat-error{gap:7px;font-size:10px}.chat-error>svg{width:14px}.chat-error .text-button{font-size:10px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* Keep the compact mobile send control on one line. */
.composer textarea{min-width:0}
.send-button{white-space:nowrap;flex-shrink:0}
@media(max-width:799px){.send-button{min-width:80px;padding-left:12px;padding-right:12px}}

/* The wordmark was removed; keep the shared navigation anchored right. */
.site-header { justify-content: flex-end; }
.site-header::before { content: none; }
@media (max-width: 799px) { .site-header nav { width: 100%; justify-content: space-between; } }
/* Existing palette, centralized without changing rendered colors. */
:root {
  --accent: #c5e827;
  --accent-rgb: 197 232 39;
  --charcoal: #363832;
  --charcoal-rgb: 54 56 50;
  --charcoal-deep: #282a26;
  --charcoal-deep-rgb: 40 42 38;
  --glass: #f5f7f4;
  --glass-rgb: 245 247 244;
  --iris: #6378d8;
  --iris-rgb: 99 120 216;
  --alert: #e05a47;
  --alert-rgb: 224 90 71;
}

/* Batch 4 reuses the same roles in the redesigned surfaces. Opting in keeps
   the protected home illustration and not-yet-redesigned image cards intact. */
.editorial-surface,
.site .font-attribution,
.site .site-header {
  --paper: #f3f4ef;
  --ink: #1b201c;
  --muted: #646c64;
  --line: #cfd4ca;
  --accent: #c8de3e;
  --accent-rgb: 200 222 62;
  --accent-ink: #29330a;
  --charcoal: #30352d;
  --charcoal-rgb: 48 53 45;
}
/* Official operator composition, measured against ak.hypergryph.com/#operator.
   Both PNGs share a 100vh stage at 60vw / 30vh; their authored anchors differ. */
.page-home {
  --home-header: clamp(76px, 14.074svh, 110px);
  --home-footer: 35px;
  position: relative;
  isolation: isolate;
  min-height: 560px;
  height: 100svh;
  overflow: clip;
  background: #f7faf8;
}
.page-home .site-header { height: var(--home-header); padding: 0 7.7%; background: #f7faf8ed; border-color: #99b7ab80; }
.page-home .site-header::before, .page-home .site-header::after { content: none; }
.page-home .site-header nav { gap: clamp(28px, 3.6vw, 64px); }
.page-home .nav-link { min-width: 60px; gap: 5px; }
.page-home .nav-link > span { font-size: 19px; font-weight: 700; letter-spacing: 2px; }
.page-home .nav-link small { font-size: 9px; font-weight: 700; letter-spacing: 2.5px; }
.page-home .nav-link::after { bottom: 19px; height: 4px; }
.page-home .nav-link.active::after, .page-home .nav-link:hover::after { width: 48px; }
.page-home .hero { position: static; isolation: auto; height: calc(100svh - var(--home-header) - var(--home-footer)); min-height: 0; max-height: none; overflow: visible; background: transparent; }
.page-home .interactive-hero { --art-x: 0px; --art-y: 0px; }
.page-home .hero-grid { inset: 0; z-index: -1; background: none; pointer-events: none; }
.page-home .hero-grid::after { content: none; }
.page-home .hero-grid svg { display: block; width: 100%; height: 100%; }
.page-home .hero-backdrop { position: absolute; inset: 0 0 45svh; overflow: hidden; z-index: -2; pointer-events: none; opacity: .12; transition: opacity 600ms ease; }
.page-home .hero-backdrop img { position: absolute; width: 450svh; height: 450svh; max-width: none; left: calc(43% - 225svh); top: -25svh; filter: grayscale(1); }
.page-home .elite-phase-2 .hero-backdrop { opacity: 0; }
.page-home .hero-copy { position: absolute; left: 7.7%; top: 35.8svh; width: auto; z-index: 4; }
.page-home .hero h1 { font-size: clamp(52px, 4.35vw, 84px); font-weight: 900; letter-spacing: 3px; line-height: 1.12; color: #002f27; }
.page-home .hero-roman { margin: 10px 0 0 3px; font-size: clamp(15px, 1.25vw, 23px); font-weight: 500; letter-spacing: .34em; line-height: 1.2; color: #153b33; }
.page-home .hero-outline { position: absolute; left: 1.1%; bottom: 16.67svh; font-size: clamp(150px, 21vw, 430px); font-weight: 800; letter-spacing: -.035em; line-height: .8; -webkit-text-stroke: 1px #316f623b; color: transparent; opacity: 1; z-index: 1; pointer-events: none; }
.page-home .hero-art-stage { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
/* The cover's completion callback fires after its fade. Only the live root
   participates: inert page copies must never inherit an opening wait state. */
[data-site-root].page-home .hero[data-hero-entered="false"] .hero-art-stage { opacity: 0; transform: translate3d(52px, 0, 0); }
[data-site-root].page-home .hero[data-hero-entered="true"] .hero-art-stage { animation: operator-arrive 1.25s cubic-bezier(.16, 1, .3, 1) both; }
/* cloneVisual freezes a mid-animation transform inline; show the art's final
   stage in the copy without changing its inner official illustration anchors. */
.page-transition .hero-art-stage { opacity: 1 !important; transform: none !important; }
.page-home .hero-art-parallax { position: absolute; inset: 0; transform: translate3d(var(--art-x), var(--art-y), 0); transition: transform 900ms cubic-bezier(.16, 1, .3, 1); }
.page-home .hero-art-layer { position: absolute; width: 100svh; height: 100svh; left: 60%; top: 30svh; opacity: 0; transform: translate3d(34px, 8px, 0); transition: opacity 600ms ease, transform 950ms cubic-bezier(.16, 1, .3, 1); }
.page-home .hero-art-layer.is-active { opacity: 1; transform: translate3d(0, 0, 0); }
.page-home .hero-official-art { display: block; width: 100%; height: 100%; max-width: none; object-fit: contain; user-select: none; }
.page-home .hero-art-e1 .hero-official-art { transform-origin: 50.7812% 27.3438%; transform: translate(-39.0625%, -5.85938%) scale(1.3); }
.page-home .hero-art-e2 .hero-official-art { transform-origin: 52.7344% 66.0156%; transform: translate(-43.75%, -36.9141%) scale(1.3); }
.page-home .elite-switcher { position: absolute; right: 7.7%; bottom: 16.67svh; display: flex; flex-direction: column; gap: 0; z-index: 8; }
.page-home .elite-switch { display: grid; place-items: center; width: 58px; height: clamp(44px, 6svh, 58px); padding: 10px 13px; border: 0; border-left: 4px solid #adbbb3; border-radius: 0; background: #f7faf8c7; color: #8b9d94; cursor: pointer; transition: color 200ms, border-color 200ms, background-color 200ms; }
.page-home .elite-switch svg { width: 32px; height: 28px; }
.page-home .elite-switch { position: relative; }
.page-home .elite-label {
  position: absolute; right: calc(100% + 12px); top: 50%; transform: translateY(-50%);
  padding: 1px 4px; font: 700 10px/12px var(--font-english); font-synthesis: none;
  white-space: nowrap; color: inherit; background: inherit; pointer-events: none;
}
.page-home .elite-switch:hover { color: #245d4d; background: #edf7f0ef; }
.page-home .elite-switch[aria-pressed="true"] { color: #057456; border-left-color: #0a8665; background: #edf7f0e8; }
.page-home .elite-switch:focus-visible { outline: 2px solid #087354; outline-offset: 4px; }
.page-home .hero-art-error { position: absolute; right: 7.7%; bottom: 31svh; z-index: 8; padding: 10px 15px; background: #f7faf8e8; color: #315b4c; font-size: 13px; }
.page-home .hero-art-error a { text-decoration: underline; margin-left: 8px; }
.page-home .hero-art-error .text-button { margin-left: 8px; color: inherit; min-height: 44px; }
.page-home .hero-official-art[data-art-state="failed"] { opacity: 0; }
.page-home .site-footer { height: var(--home-footer); padding: 0 3.2%; background: #f7faf8df; border-color: #91b5a850; color: #779187; font-size: 9px; letter-spacing: 2px; z-index: 4; }
.page-home .site-footer > span:nth-child(2), .page-home .site-footer > button { display: none; }
.page-home .home-spoiler { font-size: 9px; letter-spacing: 1px; }
@keyframes operator-arrive { from { opacity: 0; transform: translate3d(52px, 0, 0); } to { opacity: 1; transform: translate3d(0, 0, 0); } }
@media (max-width: 799px) {
  .page-home { --home-header: 76px; --home-footer: 34px; }
  .page-home .site-header { padding: 0 5%; background: #f7faf8ed; }
  .page-home .site-header nav { width: 100%; gap: 12px; justify-content: space-between; }
  .page-home .nav-link { min-width: 35px; gap: 5px; padding: 0; }
  .page-home .nav-link > span { font-size: 13px; letter-spacing: .7px; }
  .page-home .nav-link small { font-size: 6px; letter-spacing: 1px; }
  .page-home .nav-link::after { bottom: 12px; height: 3px; }
  .page-home .nav-link.active::after, .page-home .nav-link:hover::after { width: 30px; }
  .page-home .hero-art-layer { width: 90svh; height: 90svh; left: 30.6%; top: 24svh; }
  .page-home .hero-art-e1 { left: calc(30.6% + clamp(14px, 5vw, 24px)); }
  .page-home .hero-art-e2 { left: calc(30.6% + clamp(16px, 5vw, 22px)); top: calc(24svh + 28px); }
  .page-home .hero-copy { left: 5%; top: 55.5svh; padding: 13px 18px 14px 0; background: linear-gradient(90deg,#f7faf8ed 50%,#f7faf800); min-width: 230px; }
  .page-home .hero h1 { font-size: clamp(42px, 11vw, 66px); letter-spacing: 2px; }
  .page-home .hero-roman { font-size: 13px; letter-spacing: .32em; margin-top: 6px; }
  .page-home .hero-backdrop img { width: 200svh; height: 200svh; left: calc(16% - 100svh); top: -12svh; }
  .page-home .hero-outline { left: 1%; bottom: 16.67svh; font-size: 37vw; letter-spacing: -.04em; }
  .page-home .elite-switcher { right: 0; bottom: 35svh; }
  .page-home .elite-switch { width: 44px; height: 44px; border-left-width: 3px; padding: 10px 8px; }
  .page-home .elite-switch svg { width: 27px; height: 24px; }
  .page-home .hero-art-error { right: 5%; bottom: 17svh; max-width: 85%; }
  .page-home .site-footer { padding: 0 5%; font-size: 8px; letter-spacing: 1px; }
  .page-home .home-spoiler { font-size: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .page-home .hero-art-stage { animation: none !important; opacity: 1 !important; transform: none !important; }
  .page-home .hero-art-parallax { transform: none; transition: none; }
  .page-home .hero-art-layer { transform: none; transition: none; }
  .page-home .hero-backdrop, .page-home .elite-switch { transition: none; }
}
/* The supplied conversation reference, with the existing session controls. */
/* Keep the reserved document scrollbar gutter continuous with the right panel. */
html:has(.page-chat) { background: var(--charcoal); }
.page-chat {
  --chat-header: clamp(82px, 11.05svh, 112px);
  --chat-footer: clamp(34px, 4.46svh, 48px);
  position: relative;
  isolation: isolate;
  height: 100svh;
  min-height: 700px;
  overflow: clip;
  background: #f7fbfa;
}
.page-chat::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(45deg, transparent 8%, #a4c6bb33 8.04%, transparent 8.1%),
    linear-gradient(135deg, transparent 78%, #b7d1c733 78.04%, transparent 78.1%),
    radial-gradient(#93b6aa26 .6px, transparent .8px);
  background-size: 100% 100%, 100% 100%, 7px 7px;
  mask-image: linear-gradient(120deg, #000, transparent 22%, transparent 70%, #000);
}
.page-chat .site-header {
  height: var(--chat-header);
  padding: 0 2.4%;
  background: linear-gradient(45deg, transparent calc(26% - 1px), #b8d1c860 26%, transparent calc(26% + 1px)),
    linear-gradient(135deg, transparent calc(66% - 1px), #b8d1c860 66%, transparent calc(66% + 1px));
  border-color: #88afa2;
}
.page-chat .site-header::before { background: #a9c5bb80; }
.page-chat .site-header::after { content: ""; position: absolute; left: 16%; top: 0; bottom: 0; border-left: 1px solid #a9c5bb70; }
.page-chat .wordmark { font-size: 54px; font-weight: 500; letter-spacing: -2.5px; color: #002f27; }
.page-chat .site-header nav { gap: clamp(32px, 3.75vw, 80px); }
.page-chat .nav-link { min-width: 60px; gap: 5px; }
.page-chat .nav-link > span { font-size: 22px; font-weight: 700; letter-spacing: 2px; }
.page-chat .nav-link small { font-size: 10px; font-weight: 700; letter-spacing: 3px; }
.page-chat .nav-link::after { bottom: 20px; height: 5px; }
.page-chat .nav-link.active::after, .page-chat .nav-link:hover::after { width: 62px; }
.page-chat .main-content { min-height: 0; display: flex; flex-direction: column; }
.page-chat .chat-layout {
  width: 100%;
  height: 100%;
  flex: 1;
  min-height: 0;
  max-width: none;
  padding: 0 0 0 2.4%;
  grid-template-columns: minmax(0, 2.26fr) minmax(340px, 1fr);
}
.page-chat .conversation {
  min-height: 0;
  height: 100%;
  padding: 32px 40px 0 28px;
  border-color: #95b9ae;
  background: none;
}
.page-chat .conversation::after { content: ""; position: absolute; top: 0; bottom: 0; right: 19px; border-left: 1px solid #cadbd166; pointer-events: none; }
.page-chat .chat-heading { height: 88px; flex-shrink: 0; padding: 0 0 29px; align-items: flex-start; gap: 22px; }
.page-chat .chat-heading > div:first-child { min-width: 0; flex: 1; }
.page-chat .chat-heading .eyebrow { display: none; }
.page-chat .chat-heading h1 { font-size: 40px; font-weight: 750; letter-spacing: 2px; line-height: 1.4; margin: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.page-chat .chat-heading::after { left: -35px; }
.page-chat .session-tools { gap: 11px; padding: 0; margin-top: 18px; align-self: flex-start; }
.page-chat .session-tools .small-button { padding: 9px 22px !important; min-height: 44px; min-width: 132px; font-size: 20px !important; border-color: #559687 !important; background: #ffffff26 !important; }
.page-chat .session-tools .small-button:nth-child(2) { min-width: 98px; }
.page-chat .session-tools .small-button svg { display: none; }
.page-chat .conversation-toolbar { flex-shrink: 0; min-height: 30px; padding: 4px 0; }
.page-chat .conversation-toolbar .text-button { font-size: 12px; color: #517a68; padding: 2px 0; }
.page-chat .conversation-toolbar .count { font-size: 10px; line-height: 16px; min-width: 16px; }
.page-chat .messages { min-height: 0; padding: 4px 5px 15px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #b7cdc3 transparent; overscroll-behavior: contain; }
.page-chat .messages:focus-visible, .page-chat .character-state:focus-visible { outline: 2px solid #4c9078; outline-offset: -2px; }
.page-chat .message { gap: 22px; margin-bottom: 24px; }
.page-chat .reference-avatar { --avatar-size: 84px; width: var(--avatar-size); height: calc(var(--avatar-size) * 1.025); margin-top: 4px; border: 1px solid #58897c; border-radius: 3px; background: #ecf3ef; }
.page-chat .reference-avatar img { height: auto; max-width: none; }
/* Frame the original 2048px artwork instead of enlarging the reference screenshot. */
.page-chat .kaltsit-avatar img { width: 553.514%; left: -213.514%; top: calc((var(--avatar-size) - 2px) * -.22973); }
.page-chat .doctor-avatar::before { content: none; }
.page-chat .doctor-avatar img { width: calc(var(--avatar-scale,20.390244) * 100%); left: calc(var(--avatar-left,-12.439024) * 100%); top: calc((var(--avatar-size) - 2px) * var(--avatar-top,-4.9634146)); }
.page-chat .message-content { max-width: calc(100% - 106px); }
.page-chat .message-name { font-size: 20px; line-height: 1.3; margin-bottom: 6px; letter-spacing: .3px; font-weight: 500; }
.page-chat .opening-label { font-size: 10px; }
.page-chat .message-bubble { font-size: 22px; line-height: 1.65; padding: 13px 20px; border-radius: 5px; background: #ffffffbb; border-color: #bdd3cf; color: #102c30; }
.page-chat .message-bubble::before { width: 11px; height: 11px; left: -6px; top: 18px; background: #fcfefd; border-color: #bdd3cf; }
.page-chat .message-bubble .action-text { font-size: 19px; line-height: 1.65; color: #627d87; margin-bottom: 5px; }
.page-chat .user-message { margin-top: 4px; }
.page-chat .user-message .message-bubble { background: #e9f3ee; border-color: #a8c8bf; }
.page-chat .user-message .message-bubble::before { right: -6px; left: auto; background: #e9f3ee; border-color: #a8c8bf; }
.page-chat .message-references { gap: 7px 18px; padding-top: 14px; }
.page-chat .message-references a { font-size: 16px; gap: 5px; }
.page-chat .message-references svg { width: 16px; height: 16px; }
.page-chat .opening-hint { margin: 36px 0 0 106px; font-size: 13px; }
.page-chat .opening-hint .text-button { font-size: 12px; }
.page-chat .reply-pending { margin-left: 106px; flex-wrap: wrap; }
.page-chat .reply-pending p, .page-chat .reply-pending .text-button { font-size: 13px; }
.page-chat .composer-area { flex-shrink: 0; padding: 14px 0 6px; background: #f7fbfaf0; }
.page-chat .composer-area::before { left: -35px; }
.page-chat .composer { gap: 14px; }
.page-chat .composer textarea { min-height: 117px; max-height: 220px; padding: 15px 23px; font-size: 20px; line-height: 1.65; background: #ffffffd9; border-color: #75a79b; }
.page-chat .composer textarea::placeholder { color: #8b9ca7; }
.page-chat .send-button { min-width: 151px; min-height: 60px; font-size: 24px; gap: 15px; padding: 12px 22px; background: #00785a; border-color: #00785a; }
.page-chat .send-button svg { width: 20px; height: 20px; }
.page-chat .composer-meta { font-size: 12px; line-height: 1.4; padding-top: 7px; color: #67848a; }
.page-chat .composer-meta svg { width: 13px; height: 13px; }
.page-chat .composer-notes { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 3px 14px; margin-top: 4px; }
.page-chat .service-strip { flex-shrink: 0; padding: 0; gap: 5px; font-size: 10px; line-height: 1.5; color: #647e71; }
.page-chat .service-dot { margin-top: 4px; width: 4px; height: 4px; }
.page-chat .service-strip .text-button { font-size: 10px; }
.page-chat .chat-privacy { flex: 1; min-width: 220px; font-size: 10px; line-height: 1.5; margin: 0; color: #738a7e; }
/* Keep the desktop gutter inside the state panel so its background reaches the edge. */
.page-chat .character-state { min-height: 0; padding: 34px 1.9vw 20px 30px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #b7cdc3 transparent; }
.page-chat .state-heading { flex-shrink: 0; margin-bottom: 44px; gap: 12px; align-items: center; }
.page-chat .state-heading h2 { font-size: 32px; font-weight: 700; line-height: 1.3; letter-spacing: 1.5px; }
.page-chat .state-heading > span { font-size: 12px; color: #8497a1; }
.page-chat .state-cards { gap: 18px; }
.page-chat .state-card { min-height: 110px; padding: 18px 20px; border-color: #9fc3b8; border-radius: 2px; background: linear-gradient(120deg, #f3f9f6c9, #edf6f080); }
.page-chat .state-card h3 { font-size: 18px; line-height: 1.4; margin-bottom: 10px; color: #087753; letter-spacing: .5px; }
.page-chat .state-card h3 svg { display: none; }
.page-chat .state-card p { font-size: 23px; line-height: 1.5; color: #143239; }
.page-chat .state-note { font-size: 11px; line-height: 1.6; margin-top: 7px; }
.page-chat .action-card p { font-size: 21px; line-height: 1.7; }
.page-chat .state-footnote { order: 2; flex-shrink: 0; font-size: 12px; line-height: 1.8; margin-top: 20px; }
.page-chat .chat-layout.state-collapsed { grid-template-columns: 1fr; max-width: 1340px; padding-right: 2.4%; }
.page-chat .state-collapsed .conversation { padding-right: 28px; }
.page-chat .state-collapsed .conversation::after { display: none; }
.page-chat .site-footer { height: var(--chat-footer); padding: 0 2.4%; background: #f7fbfa; border-color: #85afa1; color: #91a2a0; font-size: 10px; letter-spacing: 2px; }
.page-chat .site-footer > span:nth-child(2) { display: none; }
.page-chat .site-footer button { font-size: 10px; }
.page-chat .chat-error { font-size: 14px; }
.page-chat .chat-error span { font-size: 11px; }
.page-chat .quota-notice { font-size: 13px; }

/* Compact desktop composer; multiline drafts scroll inside the input. */
@media (min-width: 800px) {
  .page-chat .composer { align-items: stretch; }
  .page-chat .composer textarea {
    height: 64px;
    min-height: 64px;
    max-height: 64px;
    padding-top: 12px;
    padding-bottom: 12px;
    resize: none;
    overflow-y: auto;
  }
  .page-chat .composer .send-button { height: 64px; min-height: 64px; margin: 0; }
}

@media (max-width: 1399px) and (min-width: 800px) {
  .page-chat .site-header nav { gap: 32px; }
  .page-chat .chat-layout { grid-template-columns: minmax(0, 2fr) minmax(290px, 1fr); }
  .page-chat .conversation { padding: 26px 27px 0 23px; }
  .page-chat .conversation::after { right: 10px; }
  .page-chat .chat-heading { height: 83px; gap: 14px; padding-bottom: 22px; flex-direction: row; }
  .page-chat .chat-heading h1 { font-size: 30px; }
  .page-chat .session-tools { gap: 7px; margin-top: 7px; }
  .page-chat .session-tools .small-button { min-width: 0; font-size: 15px !important; padding: 9px 12px !important; min-height: 40px; }
  .page-chat .session-tools .small-button:nth-child(2) { min-width: 64px; }
  .page-chat .reference-avatar { --avatar-size: 64px; }
  .page-chat .message { gap: 18px; }
  .page-chat .message-content { max-width: calc(100% - 82px); }
  .page-chat .message-name { font-size: 16px; }
  .page-chat .message-bubble { font-size: 18px; padding: 12px 16px; }
  .page-chat .message-bubble .action-text { font-size: 15px; }
  .page-chat .message-references a { font-size: 12px; }
  .page-chat .opening-hint, .page-chat .reply-pending { margin-left: 82px; }
  .page-chat .character-state { padding: 29px 2.4vw 18px 23px; }
  .page-chat .state-heading { margin-bottom: 38px; flex-wrap: wrap; gap: 5px; }
  .page-chat .state-heading h2 { font-size: 27px; }
  .page-chat .state-heading > span { font-size: 10px; }
  .page-chat .state-card { padding: 16px; min-height: 100px; }
  .page-chat .state-card h3 { font-size: 15px; }
  .page-chat .state-card p { font-size: 19px; }
  .page-chat .action-card p { font-size: 17px; }
  .page-chat .state-footnote { font-size: 10px; }
  .page-chat .composer textarea { font-size: 16px; min-height: 64px; padding: 12px 16px; }
  .page-chat .send-button { min-width: 110px; min-height: 51px; font-size: 20px; }
  .page-chat .composer-meta { font-size: 10px; }
  .page-chat .composer-notes { gap: 3px; }
  .page-chat .chat-heading::after, .page-chat .composer-area::before { left: -30px; }
}
@media (max-width: 1050px) and (min-width: 800px) {
  .page-chat .chat-heading { flex-wrap: wrap; height: 108px; gap: 8px; }
  .page-chat .chat-heading > div:first-child { flex-basis: 100%; }
  .page-chat .session-tools { margin-top: 0; }
  .page-chat .chat-layout { grid-template-columns: minmax(0, 1.8fr) minmax(270px, 1fr); }
  .page-chat .state-heading h2 { font-size: 24px; }
  .page-chat .state-heading { margin-bottom: 52px; }
  .page-chat .state-collapsed .chat-heading { height: 83px; }
  .page-chat .state-collapsed .chat-heading > div:first-child { flex-basis: 0; }
}
@media (max-width: 799px) {
  .page-chat { --chat-header: 82px; --chat-footer: 36px; height: auto; min-height: 100svh; overflow: visible; }
  .page-chat .site-header { padding: 0 5%; }
  .page-chat .site-header::before { left: 31%; }
  .page-chat .site-header::after { display: none; }
  .page-chat .wordmark { font-size: 38px; letter-spacing: -1.8px; }
  .page-chat .site-header nav { gap: 18px; }
  .page-chat .nav-link { min-width: 43px; }
  .page-chat .nav-link > span { font-size: 15px; letter-spacing: 1px; }
  .page-chat .nav-link small { font-size: 7px; letter-spacing: 1.4px; }
  .page-chat .nav-link::after { bottom: 12px; height: 3px; }
  .page-chat .nav-link.active::after, .page-chat .nav-link:hover::after { width: 36px; }
  .page-chat .main-content { display: block; }
  .page-chat .chat-layout, .page-chat .chat-layout.state-collapsed { display: flex; height: auto; min-height: calc(100svh - 118px); padding: 0 4%; }
  .page-chat .conversation, .page-chat .state-collapsed .conversation { height: auto; min-height: calc(100svh - 118px); padding: 26px 17px 0; }
  .page-chat .conversation::after { display: none; }
  .page-chat .chat-heading, .page-chat .state-collapsed .chat-heading { height: auto; min-height: 62px; padding-bottom: 18px; align-items: center; gap: 12px; flex-wrap: wrap; }
  .page-chat .chat-heading h1 { font-size: 28px; letter-spacing: 1px; }
  .page-chat .session-tools, .page-chat .state-collapsed .session-tools { gap: 7px; margin-top: 0; align-self: center; }
  .page-chat .session-tools .small-button, .page-chat .session-tools .small-button:nth-child(2) { min-width: 36px; min-height: 36px; padding: 8px !important; }
  .page-chat .session-tools .small-button svg { display: block; width: 16px; height: 16px; }
  .page-chat .session-tools .small-button > span { display: none; }
  .page-chat .conversation-toolbar { min-height: 40px; padding: 6px 0; }
  .page-chat .conversation-toolbar .text-button { font-size: 11px; min-height: 32px; }
  .page-chat .conversation-toolbar > div { gap: 15px; }
  .page-chat .messages { min-height: 260px; overflow: visible; padding: 16px 0 10px; }
  .page-chat .message { gap: 12px; margin-bottom: 25px; }
  .page-chat .reference-avatar { --avatar-size: 48px; }
  .page-chat .message-content { max-width: calc(100% - 60px); }
  .page-chat .message-name { font-size: 14px; margin-bottom: 6px; }
  .page-chat .opening-label { font-size: 9px; }
  .page-chat .message-bubble { font-size: 16px; padding: 11px 14px; line-height: 1.8; }
  .page-chat .message-bubble .action-text { font-size: 13px; line-height: 1.8; }
  .page-chat .message-references { gap: 8px 12px; padding-top: 10px; }
  .page-chat .message-references a { font-size: 12px; }
  .page-chat .message-references svg { width: 12px; height: 12px; }
  .page-chat .opening-hint { margin-left: 60px; font-size: 12px; }
  .page-chat .reply-pending { margin-left: 60px; }
  .page-chat .reply-pending p, .page-chat .reply-pending .text-button { font-size: 12px; }
  .page-chat .composer-area { padding: 13px 0 14px; }
  .page-chat .composer { gap: 10px; }
  .page-chat .composer textarea { min-height: 104px; max-height: 180px; padding: 12px 13px; font-size: 16px; resize: none; }
  .page-chat .send-button { min-width: 82px; min-height: 48px; padding: 10px 12px; font-size: 17px; gap: 8px; }
  .page-chat .send-button svg { width: 15px; height: 15px; }
  .page-chat .composer-meta { font-size: 10px; gap: 8px; padding-top: 8px; flex-wrap: wrap; }
  .page-chat .composer-notes { gap: 5px; margin-top: 7px; }
  .page-chat .service-strip, .page-chat .service-strip .text-button, .page-chat .chat-privacy { font-size: 10px; line-height: 1.6; }
  .page-chat .chat-privacy { flex-basis: 100%; min-width: 0; }
  .page-chat .character-state { min-height: 0; padding: 20px 17px 17px; overflow: visible; }
  .page-chat .state-heading { gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
  .page-chat .state-heading h2 { font-size: 25px; }
  .page-chat .state-heading > span { font-size: 10px; }
  .page-chat .state-cards { gap: 12px; }
  .page-chat .state-card { min-height: 0; padding: 13px; }
  .page-chat .state-card h3 { font-size: 13px; margin-bottom: 8px; }
  .page-chat .state-card p { font-size: 15px; line-height: 1.6; }
  .page-chat .state-note { font-size: 10px; }
  .page-chat .state-footnote { font-size: 11px; margin-top: 15px; }
  .page-chat .chat-heading::after, .page-chat .composer-area::before { left: -24px; }
  .page-chat .site-footer { padding: 0 4%; font-size: 8px; letter-spacing: 1px; }
  .page-chat .site-footer button { font-size: 8px; }
  .page-chat .chat-error { font-size: 12px; }
  .page-chat .chat-error span { font-size: 10px; }
}
@media (max-width: 520px) {
  .page-chat { --chat-header: 76px; --chat-footer: 34px; }
  .page-chat .wordmark { font-size: 34px; }
  .page-chat .site-header nav { gap: 14px; }
  .page-chat .nav-link { min-width: 35px; }
  .page-chat .nav-link > span { font-size: 13px; letter-spacing: .7px; }
  .page-chat .nav-link small { font-size: 6px; letter-spacing: 1px; }
  .page-chat .nav-link::after { bottom: 10px; }
  .page-chat .nav-link.active::after, .page-chat .nav-link:hover::after { width: 30px; }
  .page-chat .chat-layout, .page-chat .chat-layout.state-collapsed, .page-chat .conversation, .page-chat .state-collapsed .conversation { min-height: calc(100svh - 110px); }
  .page-chat .conversation, .page-chat .state-collapsed .conversation { padding-left: 13px; padding-right: 13px; }
  .page-chat .chat-heading h1 { font-size: 24px; }
  .page-chat .session-tools { gap: 5px; }
  .page-chat .session-tools .small-button, .page-chat .session-tools .small-button:nth-child(2) { min-width: 32px; min-height: 34px; padding: 7px !important; }
  .page-chat .conversation-toolbar > div { gap: 11px; }
  .page-chat .conversation-toolbar .text-button { font-size: 10px; }
  .page-chat .conversation-toolbar .state-toggle > span { font-size: 10px; }
  .page-chat .message { gap: 10px; }
  .page-chat .reference-avatar { --avatar-size: 40px; }
  .page-chat .message-content { max-width: calc(100% - 50px); }
  .page-chat .message-bubble { font-size: 15px; padding: 10px 12px; }
  .page-chat .message-bubble .action-text { font-size: 12px; }
  .page-chat .message-name { font-size: 13px; }
  .page-chat .opening-hint, .page-chat .reply-pending { margin-left: 50px; }
  .page-chat .composer { gap: 8px; }
  .page-chat .send-button { min-width: 74px; font-size: 16px; }
  .page-chat .composer-meta { font-size: 9px; }
  .page-chat .chat-heading::after, .page-chat .composer-area::before { left: -20px; }
}
/* Kal'tsit / public records: a light, spatial archive. */
.page-archive { background: #f5f8f5; }
.page-archive .site-header { background-color: #f7faf7; }
.page-archive .main-content { display: flex; }
.archive-experience {
  --archive-green: #12644e;
  --archive-ink: #123d32;
  --archive-muted: #70887c;
  --archive-line: #c2d4c9;
  position: relative; isolation: isolate; width: 100%; min-width: 0;
  min-height: calc(100svh - 135px); padding: 30px 3.2% 0;
  color: var(--archive-ink); background: #f5f8f5;
  display: flex; flex-direction: column; outline: none;
}
.archive-experience::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(120deg, transparent 46%, #d3e1d433 46.1%, transparent 46.2%), radial-gradient(#afc6b74d .6px, transparent .7px); background-size: 100% 100%, 8px 8px; mask-image: linear-gradient(135deg, #000, transparent 38%, transparent 70%, #000); }
.archive-experience button, .archive-experience a, .archive-experience input { -webkit-tap-highlight-color: transparent; }
.archive-experience button:focus-visible, .archive-experience a:focus-visible, .archive-experience input:focus-visible, .archive-experience canvas:focus-visible { outline: 2px solid #267b5d; outline-offset: 4px; }
.archive-topline { display: flex; align-items: center; justify-content: space-between; gap: 28px; min-height: 76px; margin-bottom: 27px; }
.archive-identity { display: flex; align-items: center; gap: 18px; }
.archive-mark { width: 58px; height: 58px; stroke: #347b60; stroke-width: 1.3; flex-shrink: 0; }
.archive-mark-fine { stroke-width: .6; opacity: .5; }
.archive-overline { display: block; font-size: 9px; letter-spacing: 2.4px; color: #6e8c7b; margin-bottom: 8px; }
.archive-identity h1 { font-family: var(--font-serif); font-weight: 600; font-size: 35px; line-height: 1.1; letter-spacing: 3px; }
.archive-identity h1 > span { font-size: 23px; font-weight: 400; color: #708c7d; border-left: 1px solid #bed0c3; padding-left: 19px; margin-left: 18px; letter-spacing: 2px; }
.archive-top-controls { display: flex; align-items: center; gap: 12px; }
.archive-query { display: flex; gap: 10px; align-items: center; width: 290px; min-height: 43px; border-bottom: 1px solid #91af9c; color: #6d8e7b; }
.archive-query input { border: 0; background: transparent; outline: none; width: 100%; min-width: 0; font-size: 12px; padding: 11px 0; color: var(--archive-ink); }
.archive-query input::placeholder { color: #79907f; }
.archive-query button { display: grid; place-items: center; padding: 4px; }
.archive-query kbd { font-family: inherit; border: 1px solid #c9d7cb; color: #8ca28f; font-size: 10px; padding: 1px 4px; margin-right: 5px; }
.archive-control { display: flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid #bbcfbf !important; min-height: 39px; padding: 10px 12px; font-size: 11px; white-space: nowrap; }
.archive-control b { font-weight: 500; color: #74927e; font-size: 10px; margin-left: 2px; }
.archive-control:hover, .archive-control.selected { background: #e3eee4 !important; border-color: #7ca58e !important; }
.archive-categories { display: grid; grid-template-columns: .95fr repeat(5, 1fr); border-top: 1px solid var(--archive-line); border-bottom: 1px solid var(--archive-line); }
.archive-categories button { text-align: left; padding: 13px 22px; position: relative; border-right: 1px solid #d9e3da !important; min-height: 62px; }
.archive-categories button:last-child { border-right: 0 !important; }
.archive-categories button > span { display: flex; align-items: baseline; font-size: 13px; gap: 11px; letter-spacing: 1px; }
.archive-categories button i { font-style: normal; font-size: 9px; color: #93aa97; }
.archive-categories small { font-size: 8px; letter-spacing: 1.4px; display: block; color: #91a492; margin-top: 5px; }
.archive-categories button.selected { background: #e6efe6 !important; }
.archive-categories button.selected::after { content: ""; position: absolute; bottom: -1px; left: 22px; right: 22px; height: 2px; background: #307852; }
.archive-categories button:hover { background: #edf3ec !important; }
.archive-workspace { flex: 1; min-height: 520px; display: grid; grid-template-columns: minmax(0, 1fr) 338px; border-bottom: 1px solid var(--archive-line); }
.archive-stage { min-width: 0; min-height: 520px; position: relative; overflow: hidden; background: radial-gradient(ellipse at 50% 75%, #dfebe066, #f4f8f400 65%); }
.archive-canvas-host { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 520px; touch-action: none; }
.archive-canvas-host canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.archive-stage-label { position: absolute; top: 22px; left: 24px; display: flex; align-items: center; gap: 8px; font-size: 10px; letter-spacing: 1px; pointer-events: none; color: #52755f; z-index: 1; }
.archive-status-dot { width: 4px; height: 4px; background: #4c8e65; display: inline-block; border-radius: 50%; flex-shrink: 0; }
.archive-stage-code { margin-left: 9px; padding-left: 12px; border-left: 1px solid #bbcdbd; font-size: 8px; letter-spacing: 1.6px; color: #809885; }
.archive-watermark { position: absolute; left: 23px; bottom: 66px; font-family: Georgia, serif; font-size: clamp(38px,5vw,74px); letter-spacing: -3px; color: #376a4814; line-height: 1; pointer-events: none; z-index: 0; }
.archive-watermark small { display: block; font-family: var(--font-sans); font-size: 8px; letter-spacing: 4px; color: #64856c66; margin-top: 10px; margin-left: 3px; }
.archive-stage-hint { position: absolute; left: 24px; bottom: 24px; display: flex; align-items: center; gap: 8px; color: #607d68; font-size: 10px; pointer-events: none; }
.archive-loading { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); display: flex; flex-direction: column; align-items: center; gap: 14px; font-size: 12px; color: #6d8973; text-align: center; background: #f5f8f5e8; padding: 26px 35px; border: 1px solid #d0ddcf; z-index: 3; white-space: nowrap; }
.archive-loading > span { width: 23px; height: 23px; border: 1px solid #c4d5c5; border-top-color: #4e865c; border-radius: 50%; animation: archive-spin 1.2s linear infinite; }
.archive-loading button { font-size: 11px; color: #376d48; border-bottom: 1px solid #c2d4c1 !important; padding: 3px; }
.archive-dossier { display: flex; flex-direction: column; border-left: 1px solid var(--archive-line); padding: 23px 0 22px 28px; min-width: 0; background: linear-gradient(90deg,#f5f8f5b3, #f5f8f5); }
.archive-dossier-top { display: flex; justify-content: space-between; align-items: center; font-size: 8px; letter-spacing: 2px; color: #799580; }
.archive-dossier-top button { padding: 5px; display: grid; place-items: center; color: #4a7d59; }
.archive-dossier-top button:hover { background: #e4eee4 !important; }
.archive-number { display: flex; align-items: baseline; font-family: Georgia, serif; font-size: 34px; margin: 12px 0 24px; letter-spacing: -1.5px; gap: 4px; position: relative; overflow: hidden; }
.archive-number > span:first-child { color: #829a86; font-size: 23px; letter-spacing: -1px; }
.archive-number b { font-family: var(--font-sans); font-weight: 350; font-size: 54px; line-height: 1; letter-spacing: -3px; animation: archive-number-in .45s cubic-bezier(.2,.7,.2,1); }
.archive-number-corner { margin-left: auto; font-family: var(--font-sans); font-size: 20px; color: #7ea087; }
.archive-dossier-type { display: flex; justify-content: space-between; border-top: 1px solid #c9d9ca; padding-top: 12px; font-size: 10px; color: #738e79; }
.archive-dossier-type > span:last-child { font-size: 9px; color: #8fa28e; }
.archive-dossier h2 { font-family: var(--font-serif); font-size: 28px; font-weight: 550; line-height: 1.5; letter-spacing: 1px; margin: 15px 0 12px; animation: archive-fade-in .5s ease both; outline: none; }
.archive-summary { font-size: 12px; line-height: 1.9; color: #687f70; }
.archive-dossier-content { flex: 1; min-height: 0; padding-top: 24px; }
.archive-preview-note { padding-top: 13px; }
.archive-mini-rule { width: 26px; height: 1px; background: #a4bea7; display: block; margin-bottom: 15px; }
.archive-preview-note p { font-family: var(--font-serif); font-size: 16px; letter-spacing: 1px; line-height: 1.9; color: #71917a; }
.archive-preview-note small { display: block; font-size: 9px; margin-top: 15px; color: #8fa48f; }
.archive-dossier-actions { margin-top: 24px; }
.archive-solid { display: inline-flex; align-items: center; justify-content: space-between; gap: 25px; min-height: 46px; padding: 12px 18px; background: var(--archive-green) !important; color: #fff; font-size: 13px; letter-spacing: 1px; border: 1px solid var(--archive-green) !important; }
.archive-solid:hover:not(:disabled) { background: #0a4e3b !important; }
.archive-dossier-actions > .archive-solid { width: 100%; }
.archive-dossier-actions > div { display: flex; justify-content: space-between; margin-top: 12px; gap: 10px; }
.archive-text-button { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: #4f785c; padding: 5px 0; }
.archive-text-button:hover { text-decoration: underline; text-underline-offset: 4px; }
.archive-facts { animation: archive-fade-in .6s ease both; }
.archive-facts dl { margin: 0; }
.archive-facts dl > div { display: grid; grid-template-columns: 70px 1fr; gap: 15px; padding: 9px 0; border-bottom: 1px solid #dae4d9; font-size: 12px; line-height: 1.7; }
.archive-facts dt { color: #839987; font-size: 10px; }
.archive-facts dd { margin: 0; color: #43634e; }
.archive-sources { padding-top: 22px; }
.archive-sources h3 { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 500; margin-bottom: 13px; }
.archive-sources > div { margin-bottom: 13px; line-height: 1.6; }
.archive-sources > div > span { display: inline-block; font-size: 8px; border: 1px solid #c4d2c2; color: #799078; padding: 0 4px; margin-right: 7px; vertical-align: middle; }
.archive-sources > div > span.is-official { background: #e1eee2; border-color: #b3cbb8; color: #3f7851; }
.archive-sources a { display: inline; font-size: 11px; color: #3d7054; }
.archive-sources a svg { display: inline; margin-left: 3px; vertical-align: middle; }
.archive-sources a:hover { text-decoration: underline; text-underline-offset: 3px; }
.archive-sources > div > p { font-size: 10px; color: #7f917e; margin-top: 5px; line-height: 1.7; }
.archive-checked { font-size: 9px; color: #8c9f89; display: flex; justify-content: space-between; padding-top: 7px; }
.archive-audio-link { margin-top: 15px; display: inline-flex; align-items: center; gap: 8px; font-size: 11px; color: #4d7f57; }
.archive-spoiler { padding: 18px; border: 1px solid #c6d4bf; background: #ebf1e7; color: #6b7b56; text-align: center; }
.archive-spoiler svg { margin: 0 auto 10px; }
.archive-spoiler p { font-size: 12px; line-height: 1.8; }
.archive-outline { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #91af8f !important; padding: 9px 12px; font-size: 11px; margin-top: 15px; }
.archive-outline:hover { background: #dfeadc !important; }
.archive-view-controls { position: absolute; right: 16px; top: 20px; display: flex; align-items: center; gap: 2px; border: 1px solid #bbcdbb; background: #f9fbf5d9; backdrop-filter: blur(12px); padding: 3px; z-index: 2; }
.archive-view-controls button { width: 31px; height: 30px; display: grid; place-items: center; color: #4a7454; }
.archive-view-controls button:hover { background: #dfeadd !important; }
.archive-view-controls > span { height: 16px; border-left: 1px solid #d0dccb; margin: 0 2px; }
.archive-part-picker { position: absolute; left: 24px; right: 24px; bottom: 21px; z-index: 2; pointer-events: none; }
.archive-part-picker button { pointer-events: auto; }
.assembly-button { display: inline-flex; gap: 8px; align-items: center; min-height: 37px; padding: 9px 13px; border: 1px solid #8daa8c !important; font-size: 11px; background: #f6faf1d9 !important; backdrop-filter: blur(8px); }
.assembly-button:hover, .assembly-button.selected { background: #dfeadd !important; }
.archive-part-picker > p { color: #6c876d; font-size: 9px; margin-top: 11px; }
.archive-part-list { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.archive-part-list button { display: flex; align-items: center; gap: 5px; padding: 7px 9px; border: 1px solid #becfba !important; background: #f8fbf4e6 !important; font-size: 10px; }
.archive-part-list button small { font-size: 8px; color: #92a58a; }
.archive-part-list button.selected { color: #fff; background: #3c7351 !important; border-color: #3c7351 !important; }
.archive-part-list button.selected small { color: #c4dac5; }
.archive-browse-bar { min-height: 101px; display: flex; align-items: stretch; gap: 23px; border-bottom: 1px solid var(--archive-line); padding: 17px 0; }
.archive-count { flex-shrink: 0; width: 115px; align-self: center; }
.archive-count > small { display: block; font-size: 8px; color: #7d9781; letter-spacing: 1.4px; margin-bottom: 7px; }
.archive-count > span { display: flex; align-items: baseline; gap: 12px; }
.archive-count b { font-size: 31px; font-weight: 350; line-height: 1; animation: archive-number-in .4s ease; }
.archive-count i { font-size: 11px; font-style: normal; color: #91a88f; }
.archive-title-rail { position: relative; display: flex; min-width: 0; flex: 1; gap: 0; overflow-x: auto; scrollbar-width: thin; scrollbar-color: #bccfbb transparent; padding-bottom: 5px; }
.archive-title-rail button { flex: 0 0 163px; text-align: left; padding: 11px 15px; border-left: 1px solid #d8e2d3 !important; min-width: 0; transition: background .2s; }
.archive-title-rail button > small { font-size: 8px; color: #91a58c; letter-spacing: 1px; display: flex; align-items: center; gap: 7px; margin-bottom: 7px; }
.archive-title-rail button > span { display: block; color: #647f64; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.archive-title-rail button.selected { background: #e5eee0 !important; border-left-color: #578653 !important; }
.archive-title-rail button.selected > span { color: #244e34; }
.archive-title-rail button:hover { background: #ecf2e7 !important; }
.archive-cycle-controls { flex-shrink: 0; display: flex; align-items: center; gap: 18px; padding-left: 4px; }
.archive-cycle-controls > div { display: flex; align-items: center; gap: 6px; }
.archive-cycle-controls > div:first-child { border-right: 1px solid #d3dfce; padding-right: 18px; }
.archive-cycle-controls button { width: 29px; height: 35px; display: grid; place-items: center; }
.archive-cycle-controls button:hover { background: #e3edde !important; }
.archive-cycle-controls span { font-size: 9px; color: #82977a; white-space: nowrap; letter-spacing: 1px; }
.archive-bottomline { display: flex; justify-content: space-between; align-items: center; min-height: 37px; gap: 20px; font-size: 9px; color: #7c907c; }
.archive-bottomline > span { display: flex; align-items: center; gap: 7px; }
.archive-bottomline > div { display: flex; gap: 23px; }
.archive-bottomline button { display: flex; align-items: center; gap: 7px; font-size: 9px; padding: 6px 0; color: #74906f; }
.archive-bottomline button:hover { color: #315f39; }
.archive-help { position: absolute; right: 3.2%; bottom: 40px; width: min(380px,90%); z-index: 8; background: #fbfdf6; border: 1px solid #b1c7a6; box-shadow: 0 12px 30px #22442110; padding: 24px; }
.archive-help h3 { font-size: 16px; margin-bottom: 15px; }
.archive-help p { font-size: 11px; line-height: 1.9; color: #6c8166; margin-top: 10px; }
.archive-help > a { display: flex; align-items: center; gap: 6px; font-size: 10px; color: #4f7b46; margin-top: 14px; }
.archive-help-close { position: absolute; right: 12px; top: 12px; display: grid; place-items: center; width: 26px; height: 26px; }
.archive-notice { position: fixed; left: 50%; bottom: 54px; transform: translateX(-50%); z-index: 30; display: flex; align-items: center; gap: 9px; max-width: 90vw; padding: 13px 19px; border: 1px solid #a7c09d; background: #f5faef; box-shadow: 0 4px 25px #22442112; font-size: 12px; color: #3d6a35; }
.archive-empty { position: absolute; z-index: 3; inset: 70px 25px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #f4f8f1ef; text-align: center; padding: 25px; }
.archive-empty h2 { font-family: var(--font-serif); font-size: 23px; margin-top: 20px; }
.archive-empty p { font-size: 12px; color: #7a8e70; margin: 15px 0 24px; line-height: 1.8; }
.archive-reading-list { padding: 65px 26px 25px 0; max-height: 600px; min-height: 520px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #bdd0b6 transparent; }
.archive-reading-row { display: flex; align-items: center; gap: 20px; width: 100%; text-align: left; padding: 21px 20px; border-bottom: 1px solid #d3dfcd !important; }
.archive-reading-row > span { font-size: 10px; letter-spacing: .5px; color: #8a9d80; white-space: nowrap; }
.archive-reading-row > div { flex: 1; }
.archive-reading-row h3 { font-family: var(--font-serif); font-size: 23px; font-weight: 500; margin-top: 5px; }
.archive-reading-row small { font-size: 9px; color: #869c7b; }
.archive-reading-row p { font-size: 11px; color: #768b6e; margin-top: 7px; line-height: 1.8; }
.archive-reading-row.selected, .archive-reading-row:hover { background: #e8f0e2 !important; }
.archive-fallback-note { font-size: 12px; line-height: 1.8; color: #78916e; padding: 0 20px 15px; }
.archive-intro { position: fixed; inset: 0; width: 100vw; height: 100svh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #f7faf5; color: #1b4e39; z-index: 100; overflow: hidden; }
.archive-intro[open] { display: grid; place-items: center; }
.archive-intro::backdrop { background: #f7faf5; }
.archive-intro-grid { position: absolute; inset: 4%; border: 1px solid #d2dfcc; pointer-events: none; background-image: linear-gradient(90deg,transparent calc(50% - .5px),#bdcfb633 50%,transparent calc(50% + .5px)),linear-gradient(0deg,transparent calc(50% - .5px),#bdcfb633 50%,transparent calc(50% + .5px)); }
.archive-intro-grid::after { content: ""; position: absolute; left: 15%; right: 15%; height: 1px; background: #b8d0b8; top: 50%; animation: archive-scan 3.4s ease-in-out both; opacity: .45; }
.archive-intro-corner { position: absolute; top: 8%; left: 8%; font-size: 10px; letter-spacing: 2px; color: #8ba180; }
.archive-intro-skip { position: absolute; top: 7%; right: 8%; display: flex; gap: 10px; align-items: center; font-size: 12px; color: #66835c; padding: 10px; }
.archive-intro-center { text-align: center; width: min(430px,80%); position: relative; }
.archive-intro-center .archive-mark { width: 110px; height: 110px; margin: 0 auto 32px; }
.archive-mark.is-drawing { stroke-dasharray: 400; stroke-dashoffset: 400; animation: archive-draw 2.5s ease forwards; }
.archive-intro-typing { height: 18px; font-size: 9px; letter-spacing: 2.5px; color: #8da180; }
.archive-intro-typing i { width: 1px; height: 10px; background: #719168; display: inline-block; margin-left: 4px; vertical-align: middle; animation: archive-blink .7s steps(2) infinite; }
.archive-intro h2 { font-family: var(--font-serif); font-weight: 500; font-size: 37px; letter-spacing: 4px; margin: 18px 0 35px; }
.archive-intro-progress { height: 2px; background: #dae5d4; width: 100%; }
.archive-intro-progress > span { display: block; height: 100%; background: #5a8a56; transition: width .8s; }
.archive-intro-status { font-size: 10px; text-align: left; color: #79936e; margin-top: 12px; display: flex; justify-content: space-between; }
.archive-intro-footnote { position: absolute; bottom: 8%; width: 100%; text-align: center; font-size: 10px; letter-spacing: 1.5px; color: #8c9e82; }
@keyframes archive-draw { to { stroke-dashoffset: 0; } }
@keyframes archive-scan { 0% { transform: translateY(-140px); opacity: 0; } 30% { opacity: .7; } 100% { transform: translateY(150px); opacity: 0; } }
@keyframes archive-blink { to { opacity: 0; } }
@keyframes archive-spin { to { transform: rotate(360deg); } }
@keyframes archive-number-in { from { transform: translateY(65%); opacity: .1; } to { transform: translateY(0); opacity: 1; } }
@keyframes archive-fade-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.motion-reduced *, .motion-reduced *::before, .motion-reduced *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
@media (min-width: 1500px) {
  .archive-workspace { grid-template-columns: minmax(0,1fr) 365px; min-height: max(540px,calc(100svh - 390px)); }
  .archive-dossier { padding-left: 32px; }
  .archive-dossier h2 { font-size: 31px; }
  .archive-summary { font-size: 13px; }
  .archive-dossier-content { max-height: 420px; overflow-y: auto; scrollbar-width: thin; padding-right: 5px; }
}
@media (max-width: 1100px) {
  .archive-experience { padding: 24px 3% 0; }
  .archive-topline { gap: 15px; margin-bottom: 20px; }
  .archive-identity { gap: 12px; }
  .archive-mark { width: 45px; height: 45px; }
  .archive-overline { font-size: 7px; letter-spacing: 1.7px; }
  .archive-identity h1 { font-size: 29px; }
  .archive-identity h1 > span { font-size: 18px; margin-left: 10px; padding-left: 10px; }
  .archive-query { width: 200px; }
  .archive-control { padding: 9px; }
  .archive-control.view-switch > span { display: none; }
  .archive-workspace { grid-template-columns: minmax(0,1fr) 300px; }
  .archive-categories button { padding: 13px 12px; }
  .archive-categories button.selected::after { left: 12px; right: 12px; }
  .archive-categories small { font-size: 7px; letter-spacing: .8px; }
  .archive-categories button > span { gap: 6px; font-size: 12px; }
  .archive-dossier { padding-left: 22px; }
  .archive-dossier h2 { font-size: 25px; }
  .archive-number b { font-size: 45px; }
  .archive-view-controls { top: 54px; left: 20px; right: auto; }
  .archive-cycle-controls { gap: 9px; }
  .archive-cycle-controls > div:first-child { padding-right: 9px; }
  .archive-count { width: 100px; }
  .archive-browse-bar { gap: 14px; }
}
@media (max-width: 799px) {
  .page-archive .main-content { display: block; }
  .archive-experience { padding: 23px 4% 0; min-height: calc(100svh - 116px); }
  .archive-topline { flex-wrap: wrap; gap: 20px; margin-bottom: 19px; }
  .archive-identity { gap: 12px; }
  .archive-identity .archive-mark { width: 46px; height: 46px; }
  .archive-overline { font-size: 7px; letter-spacing: 1.6px; margin-bottom: 7px; }
  .archive-identity h1 { font-size: 29px; }
  .archive-identity h1 > span { font-size: 19px; margin-left: 13px; padding-left: 13px; }
  .archive-top-controls { width: 100%; gap: 10px; }
  .archive-query { width: auto; flex: 1; min-width: 0; }
  .archive-query input { font-size: 14px; }
  .archive-query kbd { display: none; }
  .archive-control { min-height: 39px; }
  .archive-categories { overflow-x: auto; display: flex; scrollbar-width: none; }
  .archive-categories button { flex: 0 0 auto; min-width: 95px; min-height: 62px; padding: 12px; }
  .archive-categories button > span { font-size: 12px; gap: 6px; }
  .archive-categories small { font-size: 7px; letter-spacing: .8px; }
  .archive-categories button.selected::after { left: 12px; right: 12px; }
  .archive-workspace { display: flex; flex-direction: column; min-height: 0; }
  .archive-stage { min-height: 420px; height: 420px; flex: 0 0 auto; margin-left: -4.35%; margin-right: -4.35%; border-bottom: 1px solid var(--archive-line); }
  .archive-canvas-host { min-height: 420px; }
  .archive-stage-label { top: 18px; left: 5.5%; font-size: 9px; }
  .archive-stage-code { font-size: 7px; }
  .archive-stage-hint { left: 5.5%; bottom: 20px; font-size: 9px; }
  .archive-watermark { left: 5.5%; font-size: 51px; bottom: 60px; }
  .archive-watermark small { font-size: 7px; letter-spacing: 3px; }
  .archive-dossier { border-left: 0; padding: 24px 6px; }
  .archive-dossier-top { font-size: 9px; }
  .archive-number { margin: 9px 0 21px; }
  .archive-number b { font-size: 45px; }
  .archive-number > span:first-child { font-size: 24px; }
  .archive-dossier h2 { font-size: 29px; }
  .archive-summary { font-size: 13px; }
  .archive-dossier-content { padding-top: 18px; }
  .archive-preview-note { display: none; }
  .archive-dossier-actions { margin-top: 22px; }
  .archive-solid { min-height: 47px; font-size: 14px; }
  .archive-dossier-type { font-size: 11px; }
  .archive-dossier-type > span:last-child { font-size: 10px; }
  .archive-facts dl > div { font-size: 13px; grid-template-columns: 75px 1fr; padding: 11px 0; }
  .archive-facts dt { font-size: 11px; }
  .archive-sources h3 { font-size: 12px; }
  .archive-sources a { font-size: 12px; }
  .archive-sources > div > p { font-size: 11px; }
  .archive-text-button { font-size: 12px; min-height: 35px; }
  .archive-view-controls { left: auto; right: 5%; top: 49px; }
  .archive-view-controls button { width: 29px; height: 31px; }
  .archive-part-picker { left: 5.5%; right: 5.5%; bottom: 16px; }
  .archive-part-list { gap: 5px; }
  .archive-part-list button { font-size: 9px; padding: 7px 8px; }
  .archive-part-picker > p { font-size: 8px; }
  .archive-browse-bar { flex-wrap: wrap; gap: 13px; padding: 17px 0 12px; }
  .archive-count { order: 1; width: auto; flex: 1; }
  .archive-count > span { gap: 12px; }
  .archive-count b { font-size: 26px; }
  .archive-count small { font-size: 7px; margin-bottom: 5px; }
  .archive-title-rail { order: 3; flex: 0 0 100%; }
  .archive-title-rail button { flex-basis: 157px; padding: 12px 14px; }
  .archive-cycle-controls { order: 2; gap: 12px; }
  .archive-cycle-controls button { width: 35px; height: 37px; }
  .archive-bottomline { flex-direction: column; align-items: flex-start; gap: 8px; padding: 13px 0; font-size: 8px; }
  .archive-bottomline > div { width: 100%; justify-content: space-between; gap: 12px; }
  .archive-bottomline button { font-size: 10px; min-height: 30px; }
  .archive-reading-list { min-height: 420px; max-height: 420px; padding: 58px 5% 15px; }
  .archive-reading-row { padding: 16px 10px; gap: 12px; }
  .archive-reading-row > span { font-size: 9px; }
  .archive-reading-row h3 { font-size: 22px; }
  .archive-reading-row p { font-size: 11px; }
  .archive-empty { inset: 55px 4% 10px; padding: 20px; }
  .archive-help { bottom: 100px; right: 4%; width: 92%; }
  .archive-help p { font-size: 12px; }
  .archive-intro h2 { font-size: 27px; letter-spacing: 2px; }
  .archive-intro-typing { font-size: 7px; letter-spacing: 1px; }
  .archive-intro-corner { font-size: 7px; letter-spacing: 1px; }
  .archive-intro-skip { font-size: 10px; right: 5%; }
  .archive-intro-footnote { font-size: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .archive-experience *, .archive-experience *::before, .archive-experience *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
.archive-dossier-empty { padding: 70px 20px; color: #6a826b; }
.archive-dossier-empty p { font-size: 13px; line-height: 1.9; }
.resource-library,.resource-manager{--library-accent:#176650;max-width:1500px;margin:auto;padding:54px 6% 34px;color:#173e33}.library-heading,.manager-heading{display:flex;justify-content:space-between;align-items:flex-end;gap:24px;margin-bottom:36px}.library-heading h1,.manager-heading h1{font-family:var(--font-serif);font-size:54px;letter-spacing:5px;line-height:1.25;margin:13px 0 16px}.library-heading p,.manager-heading p{color:#667e73;font-size:14px;letter-spacing:.5px;line-height:1.8}.library-heading-side{display:flex;flex-direction:column;align-items:flex-end;gap:21px}.library-count{display:flex;align-items:baseline;gap:12px;color:#778b80;font-size:11px;white-space:nowrap}.library-count b{font-family:Georgia,serif;font-size:42px;font-weight:400;color:var(--library-accent)}.library-featured{display:grid;grid-template-columns:1fr 1fr;gap:24px;margin:30px 0 56px}.ep-card{display:grid;grid-template-columns:45% 1fr;border:1px solid #c6d5cc;background:#fff;overflow:hidden;position:relative}.ep-card .resource-cover{width:100%;min-width:0;height:100%;min-height:270px;aspect-ratio:auto}.resource-cover{position:relative;overflow:hidden;background:#e7eee7;flex-shrink:0;aspect-ratio:1}.resource-cover img{width:100%;height:100%;object-fit:cover}.resource-cover-fallback{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:20px;background:radial-gradient(circle at 65% 20%,#d5e4cc,transparent 70%),#e4ece3;color:#769481}.resource-cover-fallback span{font-size:9px;letter-spacing:4px}.ep-card-body{display:flex;flex-direction:column;align-items:flex-start;padding:25px 22px 23px;min-width:0}.resource-index{font-size:8px;letter-spacing:1.1px;color:#779083}.ep-card h2{font-family:Georgia,var(--font-serif),serif;font-size:32px;letter-spacing:-.6px;font-weight:400;line-height:1.2;margin:20px 0 13px;overflow-wrap:anywhere}.ep-card p{font-size:12px;line-height:1.9;color:#657b6e;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.ep-meta{font-size:8px;color:#7b8c82;margin-top:15px;display:flex;flex-wrap:wrap;gap:6px 12px}.ep-actions{display:flex;justify-content:space-between;align-items:center;width:100%;margin-top:auto;padding-top:22px}.resource-play{display:inline-flex;align-items:center;gap:9px;background:var(--library-accent)!important;color:#fff;border:1px solid var(--library-accent)!important;padding:10px 16px!important;font-size:12px;min-height:38px;border-radius:2px;white-space:nowrap}.resource-play:hover{filter:brightness(.9)}.resource-source{padding:10px;color:#749184}.library-section-heading{display:flex;justify-content:space-between;align-items:flex-end;gap:24px}.library-section-heading h2{font-family:var(--font-serif);font-size:26px;letter-spacing:2px;margin-top:10px;font-weight:600}.library-section-heading h2 span{font-family:Georgia,serif;font-size:15px;font-weight:400;color:#81968a;margin-left:14px;letter-spacing:0}.library-search{display:flex;align-items:center;gap:10px;border-bottom:1px solid #b9cfc2;padding:12px 0;color:#789383;width:280px}.library-search input{background:none;border:0;width:100%;outline:none;font-size:12px;color:#234a3c;min-width:0}.library-search button{display:grid;place-items:center;padding:0}.library-categories{display:flex;flex-wrap:wrap;gap:7px;margin:22px 0 6px;border-bottom:1px solid #c6d7cc;padding-bottom:17px}.library-categories button{padding:8px 12px!important;font-size:11px;color:#6c8275;border:1px solid transparent!important}.library-categories button.active{background:#e4eee7;border-color:#ceddd3!important;color:var(--library-accent)}.library-categories small{margin-left:8px;opacity:.65;font-size:9px}.resource-item{display:flex;align-items:center;gap:24px;border-bottom:1px solid #d7e1d9;padding:25px 0}.resource-row-index{font-family:Georgia,serif;color:#94a59a;font-size:13px}.resource-item .resource-cover{width:100px;height:100px}.resource-item-info{min-width:0;flex:1}.resource-category{display:flex;align-items:center;gap:6px;font-size:9px;color:var(--library-accent);letter-spacing:1px}.resource-item h3{font-size:20px;font-family:Georgia,var(--font-serif),serif;font-weight:500;margin:8px 0;line-height:1.4}.resource-item-info>p{font-size:11px;color:#6d8276;line-height:1.9;max-width:650px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.resource-details{display:flex;flex-wrap:wrap;gap:12px;font-size:9px;color:#90a095;margin-top:12px}.resource-item-actions{display:flex;align-items:flex-end;flex-direction:column;gap:14px;min-width:105px}.resource-item-actions>a:not(.resource-play){display:inline-flex;align-items:center;gap:6px;font-size:10px;color:#698674}.resource-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:24px;padding-top:20px}.resource-grid .resource-item{display:flex;flex-direction:column;align-items:stretch;border:1px solid #cedbd2;padding:0;gap:0;background:#fff}.resource-grid .resource-row-index{display:none}.resource-grid .resource-cover{width:100%;height:auto;aspect-ratio:16/10}.resource-grid .resource-item-info{padding:20px 20px 0}.resource-grid .resource-item-actions{flex-direction:row;align-items:center;justify-content:space-between;padding:20px}.library-footnote{border-top:1px solid #aec8b8;display:flex;gap:17px;align-items:center;color:#617b6c;padding-top:27px;margin-top:42px}.library-footnote>p{font-size:12px;line-height:1.7}.library-footnote small{display:block;font-size:9px;color:#8a9c90;margin-top:5px}.library-footnote>span{margin-left:auto;text-align:right;font-size:8px;letter-spacing:1.6px;line-height:1.8;color:#8a9d91}.library-empty{display:flex;flex-direction:column;align-items:center;gap:15px;padding:60px 22px;color:#6c8776;text-align:center}.library-empty h3{color:#254b38;font-size:20px}.library-empty p{font-size:12px}.library-alert{background:#faf2e4;border:1px solid #ddc9a5;color:#755e3a;padding:16px 20px;margin-bottom:22px;font-size:12px;line-height:1.9}.library-alert button{text-decoration:underline;margin-left:12px}.library-alert span{display:block}.library-player{width:min(620px,92vw);max-height:90svh;overflow:auto;border:1px solid #b6c9bb;background:#f7faf6;color:#183d2e;padding:25px 32px;text-align:center}.library-player::backdrop{background:#163c2e60;backdrop-filter:blur(5px)}.player-top{display:flex;justify-content:space-between;align-items:center;font-size:11px;color:#6e8979;margin-bottom:25px}.player-top button{display:grid;place-items:center;padding:5px}.player-cover{max-width:200px;margin:0 auto 24px}.library-player h2{font-family:Georgia,var(--font-serif),serif;font-size:30px;font-weight:400}.library-player>p{font-size:11px;color:#73917d;margin:12px 0 20px}.library-player audio,.library-player video{display:block;width:100%;margin:20px 0}.library-player video{max-height:300px;background:#111}.player-note{display:block;font-size:9px;color:#94a396;margin-top:20px}.library-error{color:#9e513b!important;line-height:1.8}.manager-heading{margin-bottom:25px}.manager-heading .eyebrow{display:block;margin-top:25px}.manager-heading h1{font-size:42px}.manager-save{display:flex;align-items:center;gap:20px}.manager-save>span{font-size:11px;color:#6b8273}.manager-save .button{gap:10px}.manager-notice{border:1px solid #d0ded3;background:#eff5ef;display:flex;justify-content:space-between;align-items:center;gap:15px;padding:12px 17px;font-size:11px;color:#668172}.manager-notice a{display:flex;gap:6px;align-items:center;color:#286c50}.manager-tabs{display:flex;gap:24px;margin:25px 0 0;border-bottom:1px solid #b5cabb}.manager-tabs button{display:flex;gap:8px;align-items:center;padding:15px 2px!important;border-bottom:3px solid transparent!important;font-size:13px}.manager-tabs button.active{border-bottom-color:#236e4e!important;color:#236e4e}.manager-tabs small{font-size:10px;padding:2px 6px;background:#e6eee7}.manager-workspace{display:grid;grid-template-columns:310px minmax(0,1fr);border:1px solid #d0ddd3;border-top:0;background:#fff;min-height:650px}.manager-list{background:#f1f5f0;border-right:1px solid #d0ddd3}.manager-list-top{padding:20px}.manager-list-top label{display:flex;gap:8px;align-items:center;border-bottom:1px solid #b8cbbb;padding:0 0 10px;color:#7f9585}.manager-list-top input{min-width:0;width:100%;background:none;border:0;outline:none;font-size:12px}.manager-list-top .button{width:100%;margin-top:18px;padding:9px;min-height:36px;font-size:12px;gap:8px}.manager-resource-list{max-height:800px;overflow-y:auto}.manager-resource-list>button{width:100%;display:flex;align-items:center;text-align:left;gap:12px;padding:16px 18px!important;border-top:1px solid #dbe4db!important;border-left:3px solid transparent!important}.manager-resource-list>button.active{background:#fff;border-left-color:#26744e!important}.manager-resource-list .resource-cover{width:44px;height:44px}.manager-resource-list .resource-cover-fallback span{display:none}.manager-resource-list .resource-cover-fallback svg{width:24px}.manager-resource-list button>span{min-width:0;flex:1}.manager-resource-list b{font-size:12px;font-weight:500;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.manager-resource-list small{display:block;font-size:9px;color:#7f9384;margin-top:6px}.manager-resource-list button>svg{color:#739480}.manager-edit{padding:30px 32px}.manager-edit-top{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:25px}.manager-edit-top h2{font-family:Georgia,var(--font-serif),serif;font-size:26px;font-weight:400;margin-top:9px;line-height:1.3;overflow-wrap:anywhere}.manager-edit-top>div:last-child{display:flex;gap:5px}.manager-edit-top button{display:grid;place-items:center;width:30px;height:32px}.delete-resource{color:#af6656}.resource-form{display:grid;grid-template-columns:1fr 1fr;gap:22px 20px}.resource-form label{display:flex;flex-direction:column;gap:9px;font-size:11px;color:#607e6b;min-width:0}.resource-form .full{grid-column:1/-1}.resource-form input,.resource-form textarea,.resource-form select{font:inherit;font-size:13px;min-width:0;width:100%;border:1px solid #c9d7cd;border-radius:2px;padding:11px 12px;background:#fcfdfb;color:#254a36;outline-offset:2px;line-height:1.5}.resource-form textarea{min-height:100px;resize:vertical}.resource-form input:focus,.resource-form textarea:focus,.resource-form select:focus{border-color:#4c8c65;background:#fff;outline:1px solid #4c8c65}.resource-form small{font-size:10px;color:#9aa89b;line-height:1.7}.resource-form .resource-featured-check{display:flex;flex-direction:row;align-items:center;gap:10px}.resource-featured-check input{width:16px;height:16px;accent-color:#236e4e}.manager-form-footer{display:flex;align-items:center;justify-content:space-between;gap:20px;border-top:1px solid #d9e3da;padding-top:25px;margin-top:30px}.manager-form-footer>span{font-size:10px;color:#859b89}.manager-form-footer .button{gap:10px;font-size:12px}.manager-delete-confirm{background:#fff4ef;padding:18px;border:1px solid #e7c2b5;margin-bottom:25px;font-size:12px;line-height:1.9;color:#9b5542}.manager-delete-confirm button{padding:8px 15px!important;border:1px solid #d1a492!important;margin:12px 10px 0 0}.manager-success{display:flex;align-items:center;gap:10px;padding:15px;background:#e8f2e9;color:#38754d;font-size:12px;margin:15px 0}.manager-success button{margin-left:auto;text-decoration:underline}.manager-appearance{display:grid;grid-template-columns:1fr 1.5fr;gap:60px;border:1px solid #d0ddd3;border-top:0;background:#fff;padding:42px}.manager-appearance h2{font-family:var(--font-serif);font-size:25px;margin:15px 0}.manager-appearance p{font-size:12px;color:#7b9081;line-height:1.9}.manager-appearance .resource-form{grid-template-columns:1fr}.theme-input{display:flex;gap:15px;align-items:center}.theme-input input[type=color]{width:60px;height:42px;padding:3px}.theme-input code{font-size:13px;color:#5f7967}
@media(max-width:1100px){.ep-card{grid-template-columns:1fr}.ep-card .resource-cover{height:auto;min-height:0;aspect-ratio:16/10}.ep-card-body{padding:22px}.ep-card h2{margin-top:14px}.resource-grid{grid-template-columns:repeat(2,1fr)}.manager-workspace{grid-template-columns:245px minmax(0,1fr)}.manager-edit{padding:24px}.resource-form{gap:20px 14px}.manager-heading h1{font-size:36px}.manager-appearance{gap:30px;padding:30px}.manager-save{flex-direction:column;align-items:flex-end;gap:10px}}
@media(max-width:760px){.resource-library,.resource-manager{padding:32px 5% 28px}.library-heading{align-items:flex-start;margin-bottom:24px;gap:14px}.library-heading h1{font-size:40px;letter-spacing:3px;margin:11px 0 15px}.library-heading p{font-size:12px}.library-heading-side{gap:16px;padding-top:15px}.library-count{font-size:9px;flex-direction:column;gap:6px}.library-count b{font-size:30px}.library-heading-side .text-button{font-size:10px;white-space:nowrap}.library-featured{gap:15px;margin:25px 0 35px}.ep-card-body{padding:18px 14px}.ep-card h2{font-size:28px}.resource-index{font-size:7px;letter-spacing:.5px}.ep-card p{font-size:10px;-webkit-line-clamp:3}.ep-meta{font-size:8px}.ep-actions{padding-top:20px}.resource-play{font-size:11px;padding:9px 13px!important;gap:7px;min-height:34px}.library-section-heading{align-items:flex-start;flex-direction:column;gap:12px}.library-search{width:100%}.library-section-heading h2{font-size:25px}.library-categories{gap:3px;margin-top:16px}.library-categories button{font-size:10px;padding:8px 10px!important}.resource-item{gap:13px;padding:23px 0;flex-wrap:wrap}.resource-row-index{display:none}.resource-item .resource-cover{width:68px;height:68px;align-self:flex-start}.resource-item h3{font-size:17px}.resource-item-info>p{font-size:10px}.resource-category{font-size:8px}.resource-details{font-size:8px;gap:7px}.resource-item-actions{flex-direction:row;align-items:center;justify-content:space-between;width:100%;padding-left:81px;gap:12px}.library-footnote{gap:12px;align-items:flex-start;margin-top:30px}.library-footnote>span{display:none}.library-footnote>p{font-size:11px}.library-footnote small{font-size:8px}.resource-grid{gap:14px}.resource-grid .resource-cover{width:100%;height:auto}.resource-grid .resource-item-info{padding:15px}.resource-grid .resource-item-actions{padding:0 15px 18px;gap:10px;align-items:flex-start;flex-direction:column}.manager-heading{align-items:flex-start;gap:10px}.manager-heading h1{font-size:31px;letter-spacing:2px}.manager-heading p{font-size:11px}.manager-save .button{padding:11px 15px;min-height:40px;font-size:11px}.manager-save>span{font-size:9px}.manager-save{padding-top:40px;flex-shrink:0}.manager-notice{font-size:10px;padding:12px;align-items:flex-start}.manager-notice a{white-space:nowrap}.manager-workspace{grid-template-columns:1fr}.manager-list{border-right:0;border-bottom:1px solid #c9dacb}.manager-list-top{padding:16px;display:flex;gap:15px}.manager-list-top label{flex:1;min-width:0}.manager-list-top .button{width:auto;margin:0;white-space:nowrap}.manager-resource-list{max-height:240px}.manager-resource-list>button{padding:12px 16px!important}.manager-resource-list .resource-cover{width:34px;height:34px}.manager-edit{padding:24px 18px}.resource-form{gap:20px 14px}.manager-edit-top h2{font-size:23px}.manager-appearance{grid-template-columns:1fr;padding:25px;gap:30px}.manager-form-footer{gap:12px}.manager-form-footer>span{max-width:140px;line-height:1.8}.manager-form-footer .button{font-size:11px;white-space:nowrap}.library-player{padding:20px}.player-cover{max-width:155px}.library-player h2{font-size:25px}}
/* Five primary destinations remain readable on narrow screens. */
@media(max-width:640px){.site .site-header{height:76px;padding:0 5%;flex-wrap:nowrap;align-content:center;gap:0}.site .site-header .wordmark{font-size:32px}.site .site-header nav{height:100%;width:100%;justify-content:space-between;gap:8px}.site .site-header .nav-link{min-width:42px;gap:4px;padding:0 4px}.site .site-header .nav-link>span{font-size:14px;letter-spacing:1px}.site .site-header .nav-link small{font-size:6px;letter-spacing:1.5px}.site .site-header .nav-link:after{bottom:12px;height:3px}.site .site-header .nav-link.active:after,.site .site-header .nav-link:hover:after{width:36px}.page-home{--home-header:76px}.page-chat{--chat-header:76px}.site-footer>span:nth-child(2){display:none}}
@media(max-width:420px){.library-featured{gap:11px}.ep-card h2{font-size:25px}.ep-card p{-webkit-line-clamp:2}.ep-meta{display:none}.ep-actions{padding-top:18px}.resource-form{grid-template-columns:1fr}.resource-grid{grid-template-columns:1fr}.library-heading-side .text-button{gap:5px}.library-heading-side .text-button svg:last-child{display:none}}

.resource-unavailable{font-size:11px;color:#7e9184}.library-player:not([open]){display:none}

.manager-fields{padding:0;margin:0;border:0;min-width:0}.manager-fields:disabled{opacity:.72}

.manager-leave-overlay{position:fixed;inset:0;z-index:1100;background:#163c2e66;backdrop-filter:blur(4px);display:grid;place-items:center;padding:20px}.manager-leave-dialog{max-width:470px;background:#f7faf6;border:1px solid #aac5b3;padding:30px;box-shadow:0 18px 80px #173e3325}.manager-leave-dialog h2{font-family:var(--font-serif);font-size:27px;margin-bottom:16px}.manager-leave-dialog p{font-size:13px;line-height:1.9;color:#65806d}.manager-leave-dialog>div{display:flex;gap:12px;flex-wrap:wrap;justify-content:flex-end;margin-top:24px}.manager-leave-dialog .button{font-size:12px}

.manager-leave-dialog{width:min(470px,90vw);margin:auto;color:#173e33}.manager-leave-dialog:not([open]){display:none}.manager-leave-dialog::backdrop{background:#163c2e66;backdrop-filter:blur(4px)}

/* Owner authentication stays within the resource-library visual namespace. */
.manager-access{max-width:740px;padding:36px;border:1px solid #cbd2c8;border-left:3px solid var(--accent);background:rgb(var(--glass-rgb) / .85);color:var(--charcoal-deep);backdrop-filter:blur(12px)}
.manager-access>svg{color:#526048;margin-bottom:18px}.manager-access h2{font-size:24px;line-height:1.45;margin:0 0 14px}.manager-access p{max-width:580px;font-size:13px;line-height:1.9;color:#5f685b}.manager-access-actions{display:flex;align-items:center;flex-wrap:wrap;gap:14px;margin-top:26px}.manager-access-actions .button{gap:9px;font-size:12px;min-height:44px}.manager-access-actions .text-button{font-size:12px}
.manager-account{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:10px 17px;min-width:0}.manager-account>span{max-width:240px;overflow-wrap:anywhere}.library-loading{min-height:300px}.library-loading h1{font-size:42px;margin:18px 0}.library-loading p{font-size:14px;color:#5f685b}
.manager-account .manager-signout{appearance:none;border:0;padding:0;background:transparent;color:inherit;font:inherit;text-decoration:underline;text-underline-offset:3px;cursor:pointer}.manager-account .manager-signout:disabled{opacity:.55;cursor:wait}.manager-account .manager-signout:focus-visible{outline:2px solid #526048;outline-offset:4px}.manager-access .manager-auth-feedback{padding:10px 12px;border-left:2px solid #72813f;background:rgb(var(--accent-rgb) / .09)}
@media(max-width:760px){.manager-access{padding:24px 20px}.manager-access h2{font-size:21px}.manager-notice{flex-wrap:wrap}.manager-account{justify-content:flex-start;gap:10px 15px}.manager-access-actions{gap:12px}.manager-access-actions .button{padding:12px 15px}}

/* The same inline form resumes an expired session without replacing its draft. */
.admin-login{width:100%;max-width:520px;min-width:0;margin-top:24px;padding-top:22px;border-top:1px solid #c3c8bf;color:var(--charcoal-deep)}
.admin-login-heading{display:flex;align-items:center;gap:8px;margin-bottom:18px;font-size:12px;color:#46513e}
.admin-login-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 16px}
.admin-login-fields label{display:flex;flex-direction:column;gap:8px;min-width:0;font-size:12px;line-height:1.6;color:#46513e}
.resource-manager .admin-login input{display:block;width:100%;min-width:0;min-height:44px;padding:11px 12px;border:1px solid #a7afa0;background:var(--glass);color:#1e201d;color-scheme:light;font:inherit;font-size:14px;line-height:1.5;letter-spacing:normal;box-shadow:inset 0 1px 2px rgb(var(--charcoal-rgb) / 0.050980392)}
.resource-manager .admin-login input::placeholder{color:#65705e;opacity:1}
.resource-manager .admin-login input:focus{background:#fff;border-color:var(--iris);outline:2px solid #3447a1;outline-offset:2px}
.admin-login input:disabled{opacity:.6}
.admin-login-verification{grid-column:1/-1;min-width:0}
.admin-login-code-label{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;margin-bottom:8px}
.resource-manager .admin-login-mode{padding:5px 0;font-size:11px;line-height:1.6;color:#3447a1;text-decoration:underline;text-underline-offset:3px}
.admin-login-verification small{display:block;margin-top:8px;font-size:11px;line-height:1.7;color:#5f685b}
.resource-manager .admin-login-error{margin-top:16px;padding:10px 12px;border-left:2px solid #a1392b;background:#a1392b09;color:#8b3025;font-size:12px;line-height:1.8;overflow-wrap:anywhere}
.resource-manager .admin-login-status{margin-top:12px;color:#46513e;font-size:12px;line-height:1.8;overflow-wrap:anywhere}
.admin-login-status:empty{display:none}
.resource-manager .admin-login-submit{margin-top:20px;gap:12px;min-height:44px;font-size:12px}
.manager-reauth{margin:0 0 22px;padding:22px 26px;border:1px solid #c3c8bf;border-left:3px solid var(--accent);background:rgb(var(--glass-rgb) / .85)}
.manager-reauth .admin-login{margin-top:0;padding-top:0;border-top:0}
@media(max-width:520px){.admin-login-fields{grid-template-columns:minmax(0,1fr)}.admin-login{max-width:none}.resource-manager .admin-login input{font-size:16px}.resource-manager .admin-login-submit{width:100%}.manager-reauth{padding:20px 16px}}

/* Official image and merchandise records share the library's existing controls. */
.resource-library .resource-cover.image .resource-cover-fallback,
.resource-manager .resource-cover.image .resource-cover-fallback{background:linear-gradient(145deg,#e9eeef,#d8e1e3);color:#63727b}
.resource-library .resource-cover.merch .resource-cover-fallback,
.resource-manager .resource-cover.merch .resource-cover-fallback{background:linear-gradient(145deg,#eceee4,#dbe1cb);color:#69794c}
.library-pagination{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:16px;margin:26px 0 8px;font-size:11px;color:#4f584b}
.library-pagination .button{min-height:40px;gap:8px;font-size:12px}
.manager-import-tools{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:20px 0 0;padding:20px;background:rgb(var(--glass-rgb) / .85);border:1px solid #cbd2c8;border-left:3px solid var(--accent);color:var(--charcoal-deep)}
.manager-import-tools strong,.manager-import-preview strong{font-size:13px;line-height:1.6}
.manager-import-tools p,.manager-import-preview p{font-size:11px;color:#4f584b;line-height:1.8;margin:5px 0 0}
.manager-import-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.manager-import-actions .button,.manager-import-preview .button{font-size:11px;gap:7px;min-height:40px;padding:9px 12px;white-space:nowrap}
.manager-import-file{display:none}
.manager-import-preview{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:20px;margin-top:12px;background:#edf3dd;border:1px solid #a7ba65;color:var(--charcoal-deep)}
.manager-import-preview>div{min-width:0}
.manager-import-preview strong{overflow-wrap:anywhere}
.manager-import-preview small{display:block;color:#4f584b;font-size:10px;line-height:1.8;margin-top:6px}
.manager-import-preview>div:last-child{display:flex;gap:8px;flex-wrap:wrap;flex-shrink:0}
.manager-list-pagination{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:15px 18px;color:#dbe2d4;font-size:10px;border-top:1px solid #ffffff2e}
.manager-list-pagination .text-button{color:var(--accent);font-size:11px;gap:6px}
.manager-list-empty{font-size:12px;color:#dbe2d4;padding:20px;text-align:center}
@media(max-width:1100px){.manager-import-tools,.manager-import-preview{align-items:flex-start;flex-direction:column}.manager-import-actions{justify-content:flex-start}}
@media(max-width:760px){.manager-import-tools,.manager-import-preview{padding:16px;gap:14px}.manager-import-actions{width:100%}.manager-import-actions .button{flex:1;min-width:132px;justify-content:center}.manager-import-preview>div:last-child{width:100%}.manager-import-preview .button{flex:1;justify-content:center}.library-pagination{gap:12px}.resource-item-info{overflow-wrap:anywhere}}

/* Public official images are shown in full, with a separate accessible viewer. */
.resource-library .resource-cover:is(.image,.merch) img,
.resource-manager .resource-cover:is(.image,.merch) img{object-fit:contain}
.resource-library .resource-cover:is(.image,.merch){background:#e9ede8}
.resource-library .resource-rows .resource-item:is(.resource-type-image,.resource-type-merch) .resource-cover{width:160px;height:130px;aspect-ratio:auto}
.resource-library .resource-grid .resource-item:is(.resource-type-image,.resource-type-merch) .resource-cover{width:100%;height:auto;aspect-ratio:16/11}
.resource-library .resource-cover-button{display:block;position:relative;width:100%;height:100%;padding:0!important;margin:0;border:0!important;background:transparent!important;box-shadow:none!important;cursor:zoom-in;color:var(--glass);overflow:hidden}
.resource-library .resource-cover-button::before,.resource-library .resource-cover-button::after{content:none!important}
.resource-library .resource-cover-button img{display:block;width:100%;height:100%}
.resource-library .resource-cover-button:focus-visible{outline:3px solid var(--iris);outline-offset:-3px}
.resource-cover-hint{position:absolute;right:6px;bottom:6px;display:flex;align-items:center;gap:5px;padding:5px 7px;background:rgb(var(--charcoal-deep-rgb) / 0.874509804);color:var(--glass);font-size:9px;line-height:1.2;pointer-events:none;transition:background-color .18s ease,color .18s ease}
.resource-cover-button:hover .resource-cover-hint,.resource-cover-button:focus-visible .resource-cover-hint{background:var(--accent);color:var(--charcoal-deep)}
.library-image-dialog{width:min(1120px,94vw);max-width:94vw;max-height:92svh;margin:auto;padding:0;border:1px solid #ffffffcc;border-bottom:3px solid var(--accent);background:#edf0eb;color:var(--charcoal-deep);box-shadow:2px 0 rgb(var(--iris-rgb) / 0.501960784),-2px 0 rgb(var(--accent-rgb) / 0.501960784);overflow:hidden}
.library-image-dialog:not([open]){display:none}
.library-image-dialog[open]{display:flex;flex-direction:column}
.library-image-dialog::backdrop{background:#22261fd9;backdrop-filter:blur(8px)}
.library-image-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding:18px 22px;border-bottom:1px solid #c4cbbf;flex-shrink:0}
.library-image-heading>div{min-width:0}
.library-image-heading span{font-family:var(--font-mono);font-size:10px;letter-spacing:.08em;color:#536047}
.resource-library .library-image-heading h2{font-size:20px;font-weight:600;line-height:1.5;margin:5px 0;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.library-image-heading p{font-size:11px;color:#5a6354;line-height:1.6}
.resource-library .library-image-close{display:grid;place-items:center;width:40px;height:40px;padding:0!important;flex-shrink:0;color:var(--charcoal-deep);background:#fff!important;border:1px solid #a7afa0!important}
.library-image-canvas{min-height:0;overflow:auto;overscroll-behavior:contain;max-height:68svh;background:#dfe4dd;scrollbar-gutter:stable;flex:1 1 auto}
.library-image-canvas>img{display:block;width:auto;max-width:100%;height:auto;margin:0 auto;object-fit:contain}
.library-image-description{margin:0;padding:18px 22px;font-size:12px;line-height:1.9;white-space:pre-line;overflow-wrap:anywhere;color:#46513e;background:#f1f4ed}
.library-image-footer{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:14px 22px;border-top:1px solid #c4cbbf;flex-shrink:0}
.library-image-footer>span{font-size:10px;color:#5a6354;line-height:1.7}
.library-image-footer .text-button{font-size:12px;white-space:nowrap;gap:7px;color:#3447a1}
.library-image-error{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:13px;min-height:260px;padding:30px 20px;text-align:center;color:#536047}
.library-image-error p{font-size:17px}.library-image-error span{font-size:12px}.library-image-error .button{font-size:12px;margin-top:8px}
@media(max-width:760px){.resource-library .resource-rows .resource-item:is(.resource-type-image,.resource-type-merch) .resource-cover{width:92px;height:100px}.resource-library .resource-rows .resource-item:is(.resource-type-image,.resource-type-merch) .resource-item-actions{padding-left:0}.library-image-heading{gap:12px;padding:14px}.resource-library .library-image-heading h2{font-size:16px;-webkit-line-clamp:2}.library-image-heading p{font-size:10px}.library-image-footer{align-items:flex-start;padding:12px 14px;gap:12px}.library-image-footer>span{font-size:9px}.library-image-description{padding:15px;font-size:11px}.library-image-dialog{width:96vw;max-width:96vw;max-height:94svh}.library-image-canvas{max-height:68svh}}
@media(prefers-reduced-motion:reduce){.resource-cover-hint{transition:none}}

/* Display a reviewed product viewport without altering the source photograph. */
.resource-focused-image{display:block;width:100%;height:100%;overflow:hidden}
.resource-library .resource-cover-button>.resource-focused-image,.resource-manager .resource-cover>.resource-focused-image{width:100%;height:100%}
.library-image-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:8px 16px;padding:10px 22px;border-bottom:1px solid #c4cbbf;background:var(--glass);flex-shrink:0;color:var(--charcoal-deep)}
.library-image-toolbar>div{display:flex;gap:5px;flex-wrap:wrap}
.resource-library .library-image-toolbar button{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:34px;padding:6px 9px!important;background:#fff!important;border:1px solid #a7afa0!important;color:var(--charcoal-deep)!important;font-size:11px;line-height:1.4}
.resource-library .library-image-toolbar button[aria-pressed=true]{background:var(--accent)!important;border-color:#859d1a!important}
.resource-library .library-image-toolbar button::before,.resource-library .library-image-toolbar button::after{content:none!important}
.library-image-toolbar button:focus-visible{outline:2px solid var(--iris);outline-offset:2px}
.library-image-toolbar button:disabled{opacity:.4;cursor:default}
.library-image-toolbar>span{font-size:10px;margin-left:auto;font-variant-numeric:tabular-nums;color:#536047}
.library-image-stage{display:block;margin:0 auto;max-width:none;flex:none;min-height:1px}
.library-image-stage>img{display:block;width:100%;height:auto;max-width:none;object-fit:contain}
.library-image-stage>.resource-focused-image{display:block;width:100%;height:100%}
.library-image-detail-note{padding:8px 22px;font-size:10px;line-height:1.6;color:#536047;border-top:1px solid #c4cbbf;background:var(--glass);flex-shrink:0}
.library-image-canvas:focus-visible{outline:2px solid var(--iris);outline-offset:-2px}
@media(max-width:760px){.library-image-toolbar{padding:8px 12px;gap:7px}.library-image-toolbar>span{width:100%;margin:0}.resource-library .library-image-toolbar button{min-height:36px;font-size:10px;padding:6px 8px!important}.library-image-detail-note{padding:8px 14px;font-size:9px}}
/* Character introduction: open paper, restrained type and original artwork. */
.character-profile { --profile-ink:#153f35; --profile-muted:#637e72; --profile-line:#cbd9d0; width:100%; color:var(--profile-ink); background:#f9fbf8; }
.character-profile button, .character-profile a { transition:background .18s,color .18s; }
.character-profile button:focus-visible,.character-profile a:focus-visible,.character-profile input:focus-visible { outline:2px solid #087958; outline-offset:4px; }
.profile-hero { min-height:650px; height:min(760px,calc(100svh - 100px)); position:relative; overflow:hidden; isolation:isolate; padding:30px 6.5% 110px; border-bottom:1px solid var(--profile-line); background:#f3f7f1; }
.profile-hero-overline { position:relative; display:flex; justify-content:space-between; z-index:2; font-size:9px; letter-spacing:2.2px; color:#557868; }
.profile-hero-copy { position:relative; width:47%; max-width:580px; padding-top:48px; z-index:2; }
.profile-kicker { display:flex; align-items:center; gap:10px; font-size:12px; letter-spacing:3px; margin-bottom:23px; }
.profile-kicker>span { width:18px; height:1px; background:#3f775e; }
.profile-hero h1 { font:600 clamp(60px,6.6vw,105px)/1.15 var(--font-serif); letter-spacing:9px; }
.profile-roman { font:400 16px/1.5 Georgia,serif; letter-spacing:7px; margin:13px 0 24px 3px; }
.profile-intro { padding-left:2px; }
.profile-intro h2 { font:400 clamp(22px,2.1vw,29px)/1.65 var(--font-serif); letter-spacing:1px; }
.profile-intro>p { max-width:365px; font-size:12px; line-height:2; color:var(--profile-muted); margin-top:13px; }
.profile-start { display:flex; gap:28px; align-items:center; border-bottom:1px solid #749881!important; font-size:12px; padding:12px 0!important; margin-top:18px; }
.profile-start:hover { color:#0a815a; }
.profile-editorial-note { font-size:9px; color:#708577; letter-spacing:.7px; margin-top:17px; }
.profile-hero-art { position:absolute; top:0; bottom:0; left:47%; right:0; z-index:0; background:linear-gradient(120deg,#e7eee4,#eaf2e9 70%,#dce9dc); overflow:hidden; }
.profile-hero-art:before { content:""; position:absolute; width:1px; background:#afc3b4; top:0; bottom:0; left:45%; transform:rotate(30deg); }
.profile-hero-art:after { content:""; position:absolute; inset:0; background:linear-gradient(90deg,#f3f7f1,transparent 22%); pointer-events:none; }
.profile-art-ring { position:absolute; width:480px; height:480px; border:1px solid #c8d8c8; border-radius:50%; top:19%; left:9%; }
.profile-art-word { position:absolute; font:400 440px/1 Georgia,serif; color:#64866e12; left:10%; top:8%; }
.profile-hero-art>img { position:absolute; max-width:none; width:1100px; height:1100px; object-fit:contain; left:50%; top:-46px; transform:translateX(-50%); filter:drop-shadow(10px 18px 22px #25422e13); }
.profile-art-caption { position:absolute; right:22px; bottom:115px; writing-mode:vertical-rl; font-size:8px; letter-spacing:2.6px; color:#6c8974; }
.profile-hero-meta { position:absolute; bottom:0; left:6.5%; right:6.5%; height:88px; z-index:3; display:flex; align-items:center; gap:55px; border-top:1px solid #aabfab; background:#f1f6efee; padding:0 24px; backdrop-filter:blur(8px); }
.profile-hero-meta>span { display:flex; flex-direction:column; gap:5px; font-size:9px; color:#6a8071; letter-spacing:1px; }
.profile-hero-meta b { font-family:var(--font-serif); font-size:20px; font-weight:500; color:var(--profile-ink); }
.profile-hero-meta b small { font:11px var(--font-sans); }
.profile-hero-meta>button { margin-left:auto; display:flex; align-items:center; gap:25px; font-size:11px; padding:12px 0; }
.profile-chapters { display:flex; justify-content:space-between; align-items:center; gap:18px; padding:0 6.5%; min-height:76px; border-bottom:1px solid var(--profile-line); background:#fdfefb; }
.profile-chapters button { display:flex; align-items:center; gap:12px; font-size:12px; min-height:58px; padding:0; white-space:nowrap; }
.profile-chapters button small { color:#8b9e90; font-family:Georgia,serif; font-size:11px; }
.profile-chapters button:hover { color:#079565; }

.profile-body { max-width:1440px; margin:auto; padding:0 6.5%; }
.profile-section { display:grid; grid-template-columns:27% minmax(0,1fr); gap:6%; padding:83px 0; border-bottom:1px solid var(--profile-line); scroll-margin-top:22px; }
.profile-section-label>span { font-size:9px; letter-spacing:2.5px; color:#6d8c75; }
.profile-section-label h2 { font:500 clamp(25px,2.7vw,36px)/1.5 var(--font-serif); letter-spacing:1px; margin:19px 0 18px; }
.profile-section-label>p { font-size:11px; color:#798c7d; line-height:1.9; }
.profile-section-content { min-width:0; }
.profile-lead { font:400 24px/1.7 var(--font-serif); margin:0 0 25px; letter-spacing:.4px; }
.profile-prose-columns { display:grid; grid-template-columns:1fr 1fr; gap:35px; }
.profile-prose-columns p { font-size:13px; line-height:2.05; color:#5b7564; }
.profile-source-note { display:flex; flex-wrap:wrap; gap:8px 17px; align-items:center; font-size:10px; color:#587763; padding:20px 0 0; }
.profile-source-note>span { color:#8b9a8e; }
.profile-source-note button { display:flex; align-items:center; gap:3px; padding:2px 0; border-bottom:1px solid #d2dfd1!important; }
.profile-fact-caption { font-size:10px; color:#78906e; margin-top:30px; margin-bottom:10px; letter-spacing:1px; }
.profile-fact-table { display:grid; grid-template-columns:1fr 1fr; gap:0 30px; margin:0; border-top:1px solid var(--profile-line); }
.profile-fact-table>div { display:flex; gap:20px; padding:15px 0; border-bottom:1px solid #dce5da; font-size:12px; }
.profile-fact-table dt { width:70px; flex-shrink:0; color:#7a8c7d; }
.profile-fact-table dd { margin:0; color:#2f5940; }
.profile-story-feature { display:grid; grid-template-columns:41% 1fr; background:#eaf0e5; min-height:285px; }
.profile-story-feature>img { width:100%; height:100%; object-fit:cover; object-position:43% center; }
.profile-story-feature>div { padding:28px 26px; }
.profile-story-feature small,.profile-story-row small { font-size:9px; letter-spacing:1.6px; color:#749076; }
.profile-story-feature h3 { font:500 24px/1.55 var(--font-serif); margin:17px 0 12px; }
.profile-story-feature p { font-size:11px; line-height:1.9; color:#6f836d; }
.profile-read { display:inline-flex; align-items:center; justify-content:space-between; gap:18px; font-size:11px; padding:7px 0!important; border-bottom:1px solid #aec3ac!important; min-height:35px; }
.profile-read:hover { color:#079565; }
.profile-story-feature .profile-read { margin-top:20px; }
.profile-story-row { display:flex; align-items:center; gap:24px; padding:27px 0; border-bottom:1px solid #d1dfd0; }
.profile-story-row>span { font:16px Georgia,serif; color:#8fa48b; }
.profile-story-row>div { flex:1; }
.profile-story-row h3 { font:500 23px/1.5 var(--font-serif); margin:3px 0; }
.profile-story-row p { color:#74876f; font-size:11px; line-height:1.8; }
.profile-story-row .profile-read { white-space:nowrap; }
.profile-art-study { display:grid; grid-template-columns:58% 1fr; min-height:360px; background:#eef3e9; border:1px solid #d7e1d2; }
.profile-art-stage { min-height:360px; position:relative; overflow:hidden; }
.profile-art-stage>span { position:absolute; font:200px Georgia,serif; color:#58765310; top:80px; left:10px; }
.profile-art-stage img { position:absolute; width:540px; height:540px; max-width:none; left:50%; top:-3px; transform:translateX(-50%); object-fit:contain; }
.profile-art-study.e2 .profile-art-stage img { width:540px; height:540px; top:-25px; }
.profile-art-description { padding:58px 22px 32px 0; align-self:center; }
.profile-art-description>small { font-size:8px; letter-spacing:1.5px; color:#79916f; }
.profile-art-description h3 { font:500 26px/1.5 var(--font-serif); margin:13px 0; }
.profile-art-description>p { font-size:11px; line-height:1.9; color:#70836b; }
.profile-art-switch { display:flex; gap:9px; margin:27px 0 18px; }
.profile-art-switch button { display:flex; align-items:center; gap:8px; font-size:9px; min-height:37px; padding:8px 10px; border:1px solid #b6c8ac!important; color:#7d9173; }
.profile-art-switch button span { font-size:12px; }
.profile-art-switch button[aria-pressed=true] { color:#1c5f3e; background:#dce9d5; border-color:#76996c!important; }
.profile-outfits { display:grid; grid-template-columns:1fr 1fr; gap:25px; margin-top:21px; }
.profile-outfits>button { position:relative; text-align:left; border-bottom:1px solid #b4c9ae!important; padding:16px 0; }
.profile-outfits small { font-size:8px; letter-spacing:2px; color:#8a9f80; }
.profile-outfits h3 { font:500 25px/1.5 var(--font-serif); margin:5px 0 8px; }
.profile-outfits p { color:#7b8e72; font-size:10px; }
.profile-outfits svg { position:absolute; right:2px; top:40%; color:#63835b; }
.profile-combat { display:grid; grid-template-columns:1fr 1fr; gap:35px; padding-bottom:35px; border-bottom:1px solid var(--profile-line); }
.profile-combat-title { border-right:1px solid var(--profile-line); padding-right:20px; }
.profile-combat-title>span,.profile-voice span { font-size:9px; letter-spacing:1.5px; color:#7f9576; }
.profile-combat h3 { font:500 25px/1.5 var(--font-serif); margin:9px 0 10px; }
.profile-combat h3 small { font:10px var(--font-sans); color:#789254; vertical-align:middle; margin-left:5px; letter-spacing:1px; }
.profile-combat p { font-size:11px; color:#73896b; line-height:1.9; }
.profile-combat .profile-read { margin-top:14px; }
.profile-inline-links { display:flex; flex-wrap:wrap; gap:4px 17px; }
.profile-voice { display:grid; grid-template-columns:1.2fr 1fr; gap:35px; padding:36px 0; }
.profile-voice h3 { font:500 28px/1.6 var(--font-serif); margin:10px 0; }
.profile-voice p { color:#73896b; font-size:11px; line-height:1.8; }
.profile-voice .profile-read { margin-top:13px; }
.profile-cv { padding:11px 0 0 10px; }
.profile-cv p { display:flex; justify-content:space-between; padding:10px 0; border-bottom:1px solid #dee6d8; }
.profile-cv strong { font-size:14px; font-weight:400; color:#385b35; }
.profile-library-link { display:flex; align-items:center; justify-content:space-between; padding:25px 28px; background:#e2ecdc; }
.profile-library-link:hover { background:#d6e5cf; }
.profile-library-link small { font-size:8px; letter-spacing:2px; color:#6e8b61; }
.profile-library-link p { font:500 26px var(--font-serif); margin:12px 0; }
.profile-library-link span { font-size:11px; color:#5e7e54; line-height:1.8; }
.profile-search-row { display:flex; gap:20px; align-items:center; }
.profile-search-row>label { flex:1; min-width:0; display:flex; align-items:center; gap:10px; border-bottom:1px solid #9cb395; }
.profile-search-row input { width:100%; min-width:0; background:none; border:0; padding:12px 0; font-size:12px; color:#28563c; }
.profile-search-row>button { display:flex; align-items:center; gap:7px; font-size:11px; min-height:40px; padding:6px 10px; }
.profile-search-row>button[aria-pressed=true] { background:#e2eddc; }
.profile-filters { display:flex; gap:5px 16px; flex-wrap:wrap; padding:18px 0; }
.profile-filters button { padding:7px 0; font-size:10px; color:#78916d; }
.profile-filters button[aria-pressed=true] { color:#185d3b; box-shadow:0 1px #185d3b; }
.profile-record-list>button { width:100%; display:flex; align-items:center; gap:22px; text-align:left; border-top:1px solid #dce4d6!important; padding:18px 3px; }
.profile-record-list>button:hover { background:#edf3e8; }
.profile-record-list>button>span { font:9px Georgia,serif; letter-spacing:.5px; color:#8b9f7e; }
.profile-record-list h3 { font:500 17px/1.5 var(--font-serif); }
.profile-record-list p { font-size:9px; color:#86997a; margin-top:5px; }
.profile-record-list>button>svg { margin-left:auto; color:#81a06d; }
.profile-results-count { font-size:9px; color:#84947a; padding-top:20px; border-top:1px solid #dce4d6; }
.profile-no-results { padding:25px 0; font-size:12px; }
.profile-no-results button { margin-top:14px; text-decoration:underline; }
.profile-endnote { max-width:1440px; margin:auto; padding:33px 6.5% 45px; display:flex; flex-wrap:wrap; gap:12px 24px; align-items:center; }
.profile-endnote>span { font-size:8px; letter-spacing:1.2px; color:#688260; }
.profile-endnote>p { font-size:9px; color:#839079; }
.profile-endnote>button { margin-left:auto; font-size:10px; padding:6px 0; }
.profile-notice { position:fixed; bottom:35px; left:50%; transform:translateX(-50%); z-index:20; background:#164e38; color:#fff; font-size:12px; padding:13px 25px; max-width:90vw; box-shadow:0 5px 30px #164e3820; }
.profile-dialog { width:min(720px,calc(100vw - 32px)); max-height:88svh; padding:0; border:1px solid #a8bd9f; background:#fafcf7; color:#234c35; margin:auto; overscroll-behavior:contain; }
.profile-dialog::backdrop { background:#0b241d73; backdrop-filter:blur(5px); }
.profile-dialog>article { padding:25px 35px; }
.profile-dialog header { display:flex; justify-content:space-between; align-items:center; font-size:9px; letter-spacing:1.5px; color:#79916b; }
.profile-dialog header button { padding:8px; display:grid; place-items:center; }
.profile-dialog h2 { font:500 31px/1.5 var(--font-serif); margin:16px 0; }
.profile-dialog-summary { font-size:13px; line-height:1.9; color:#6d8360; }
.profile-dialog dl { margin:25px 0; border-top:1px solid #d4dfcc; }
.profile-dialog dl>div { display:grid; grid-template-columns:115px 1fr; gap:22px; font-size:12px; line-height:1.8; padding:14px 0; border-bottom:1px solid #e1e8db; }
.profile-dialog dt { color:#7d9271; }.profile-dialog dd { margin:0; }
.profile-dialog-sources { background:#eef3e8; padding:20px; }
.profile-dialog-sources>h3 { font-size:14px; font-weight:500; }
.profile-dialog-sources p { font-size:10px; color:#7d9070; line-height:1.8; margin-top:6px; }
.profile-dialog-sources>div { padding-top:18px; }
.profile-dialog-sources small { font-size:9px; color:#7f9273; display:block; margin-bottom:5px; }
.profile-dialog-sources a { font-size:12px; text-decoration:underline; text-underline-offset:3px; display:inline-flex; gap:8px; align-items:center; }
.profile-dialog-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:25px; }
.profile-dialog-actions button { display:flex; align-items:center; gap:8px; border:1px solid #aec29e!important; padding:12px; font-size:11px; }
.profile-dialog-actions button:first-child { background:#256545; border-color:#256545!important; color:white; margin-right:auto; }
.profile-dialog footer { font-size:9px; color:#8b9b7f; margin-top:25px; }
.profile-dialog-notice { margin-top:16px; font-size:11px; line-height:1.8; color:#286746; }
.profile-spoiler { text-align:center; padding:30px 0; }
.profile-spoiler>svg { margin:auto; color:#819971; }.profile-spoiler h3 { font:500 23px var(--font-serif); margin:20px 0; }.profile-spoiler p { font-size:12px; line-height:1.9; color:#718562; }
.profile-spoiler button { display:flex; align-items:center; gap:18px; background:#286746; color:#fff; font-size:12px; padding:13px 25px; margin:25px auto 0; }
@media(min-width:1700px){.profile-hero-art>img{width:1250px;height:1250px;top:-65px}.profile-hero-copy{padding-top:62px}}
@media(max-width:1050px){.profile-hero{padding-left:5%;padding-right:5%;height:690px}.profile-hero-copy{width:49%}.profile-hero-art{left:46%}.profile-hero-art>img{width:1020px;height:1020px;top:5px}.profile-hero-meta{left:5%;right:5%}.profile-body{padding:0 5%}.profile-section{grid-template-columns:25% minmax(0,1fr);gap:5%;padding:65px 0}.profile-section-label h2{font-size:28px}.profile-prose-columns{gap:22px}.profile-chapters{padding:0 5%;gap:10px}.profile-chapters button{font-size:11px;gap:7px}.profile-story-feature{grid-template-columns:38% 1fr}.profile-story-feature>div{padding:23px 20px}.profile-story-feature h3{font-size:21px}.profile-art-stage img{width:480px;height:480px;top:22px}.profile-art-study.e2 .profile-art-stage img{width:480px;height:480px;top:0}.profile-art-description{padding-right:18px}.profile-art-description h3{font-size:23px}}
@media(max-width:760px){.profile-hero{height:650px;padding:23px 6% 100px;min-height:0}.profile-hero-overline{font-size:8px;letter-spacing:1px}.profile-hero-copy{padding-top:43px;width:55%}.profile-hero h1{font-size:61px;letter-spacing:4px}.profile-roman{font-size:12px;letter-spacing:5px}.profile-kicker{font-size:10px;letter-spacing:1.4px}.profile-intro h2{font-size:23px}.profile-intro>p{font-size:11px;max-width:260px}.profile-hero-art{left:42%;opacity:.93}.profile-hero-art>img{width:900px;height:900px;top:24px;left:58%}.profile-editorial-note{max-width:180px;line-height:1.7}.profile-hero-meta{gap:32px;height:79px;left:6%;right:6%;padding:0 14px}.profile-hero-meta b{font-size:17px}.profile-hero-meta>button{font-size:10px;gap:9px}.profile-art-caption{right:12px;font-size:7px}.profile-chapters{justify-content:flex-start;overflow:auto;padding:0 6%;gap:25px;min-height:64px}.profile-chapters button{min-height:63px;flex-shrink:0}.profile-section{grid-template-columns:1fr;gap:30px;padding:50px 0}.profile-body{padding:0 7%}.profile-section-label h2{font-size:29px;line-height:1.4;margin:14px 0 9px}.profile-section-label h2 br{display:none}.profile-section-label>p br{display:none}.profile-lead{font-size:24px}.profile-story-feature{grid-template-columns:40% 1fr}.profile-hero-meta>span{font-size:8px}.profile-art-study{grid-template-columns:56% 1fr}.profile-section-label>p{font-size:10px}.profile-art-stage img{top:15px}.profile-outfits{gap:22px}.profile-combat{gap:25px}.profile-voice{gap:20px}.profile-endnote{padding:25px 7% 35px}.profile-endnote>span{width:100%}.profile-endnote>p{max-width:75%;line-height:1.8}.profile-endnote>button{white-space:nowrap}.profile-dialog>article{padding:20px 23px}.profile-dialog h2{font-size:26px}.profile-dialog dl>div{grid-template-columns:87px 1fr;gap:14px}.profile-notice{bottom:18px}}
@media(max-width:480px){.profile-hero{height:650px;padding-top:21px}.profile-hero-overline span:last-child{font-size:7px;letter-spacing:.6px}.profile-hero-copy{width:65%;padding-top:39px}.profile-hero h1{font-size:55px}.profile-kicker{font-size:9px;margin-bottom:19px}.profile-roman{margin-top:10px;margin-bottom:26px;font-size:11px;letter-spacing:5px}.profile-intro h2{font-size:21px;line-height:1.6}.profile-intro>p{font-size:10px;width:185px;line-height:1.9}.profile-hero-art{left:40%}.profile-hero-art>img{width:760px;height:760px;top:90px;left:70%}.profile-hero-art:after{background:linear-gradient(90deg,#f3f7f1,transparent 44%)}.profile-hero-art:before{left:67%}.profile-art-word{font-size:300px;left:0;top:30%}.profile-art-ring{width:350px;height:350px;top:28%;left:0}.profile-art-caption{display:none}.profile-start{font-size:11px;gap:27px;margin-top:16px}.profile-editorial-note{font-size:8px;max-width:165px}.profile-hero-meta{gap:19px;padding:0 9px;height:76px}.profile-hero-meta b{font-size:16px;white-space:nowrap}.profile-hero-meta>button{font-size:9px;gap:5px}.profile-hero-meta>button svg{width:13px}.profile-chapters{gap:22px}.profile-prose-columns{grid-template-columns:1fr;gap:15px}.profile-prose-columns p{font-size:12px}.profile-lead{font-size:22px}.profile-fact-table{gap:0 15px}.profile-fact-table>div{gap:10px;font-size:11px;flex-direction:column;padding:12px 0}.profile-fact-table dt{font-size:10px}.profile-story-feature{grid-template-columns:1fr}.profile-story-feature>img{height:180px;object-position:center 45%}.profile-story-feature>div{padding:23px}.profile-story-feature h3{font-size:24px}.profile-story-feature h3 br{display:none}.profile-story-feature .profile-read{margin-top:14px}.profile-story-row{gap:14px;flex-wrap:wrap}.profile-story-row>div{flex-basis:70%}.profile-story-row>.profile-read{margin-left:32px}.profile-art-study{grid-template-columns:1fr}.profile-art-stage{height:300px;min-height:300px}.profile-art-stage img{width:470px;height:470px;top:-2px}.profile-art-study.e2 .profile-art-stage img{width:470px;height:470px;top:-43px}.profile-art-description{padding:23px 25px;border-top:1px solid #d7e1d2}.profile-art-description h3{font-size:26px;margin:9px 0}.profile-art-switch{margin:20px 0 12px}.profile-outfits p{font-size:9px}.profile-combat{grid-template-columns:1fr;gap:28px;padding-bottom:30px}.profile-combat-title{border:0;padding:0}.profile-combat h3{font-size:26px}.profile-voice{grid-template-columns:1fr;gap:10px}.profile-voice h3{font-size:28px}.profile-cv{padding-left:0}.profile-cv p{padding:13px 0}.profile-library-link{padding:23px 21px;gap:20px}.profile-library-link p{font-size:24px}.profile-library-link span{font-size:10px}.profile-search-row{gap:8px}.profile-search-row input{font-size:11px}.profile-search-row>button{padding:8px 4px;font-size:10px}.profile-filters{gap:4px 18px}.profile-record-list>button{gap:15px}.profile-record-list h3{font-size:16px}.profile-record-list>button>span{font-size:8px}.profile-endnote>p{max-width:70%}.profile-dialog{width:calc(100vw - 24px);max-height:90svh}.profile-dialog>article{padding:18px}.profile-dialog h2{font-size:25px}.profile-dialog-actions{gap:8px}.profile-dialog-actions button{font-size:10px;padding:10px 8px}.profile-dialog-actions button:first-child{margin-right:0}.profile-dialog-sources{padding:16px}.profile-dialog dl>div{font-size:11px;grid-template-columns:78px 1fr;gap:12px}}
.profile-art-study.e2 .profile-art-stage img { width:100%; height:100%; top:0; object-fit:contain; padding:8px; }
@media(prefers-reduced-motion:reduce){.character-profile *{scroll-behavior:auto!important;transition:none!important}}
/* Terra / Remnant: optical archive corridor. Visual-only override layer.
   Existing component geometry, navigation, handlers and state remain untouched. */
:root {
  --terra-bg: #d8dbd6; --terra-panel: rgb(var(--glass-rgb) / .78); --terra-leather: var(--charcoal);
  --terra-text: #1e201d; --terra-muted: #566052; --terra-dim: #69715f;
  --terra-line: #c3c8bf; --terra-mint: var(--accent); --terra-gold: var(--accent);
  --paper-ink: #1e201d; --paper-muted: #596052; --terra-wax: var(--alert);
  --remnant-lime: var(--accent); --remnant-blue: var(--iris); --remnant-board: var(--charcoal);
  --font-display: 'Inter', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-serif: 'Noto Serif SC', 'Songti SC', Georgia, serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
  --font-sans: var(--font-display);
  --ink: var(--terra-text); --ink-deep: var(--terra-text); --muted: var(--terra-muted);
  --green: #516318; --green-dark: #3e4e10; --line: var(--terra-line); --line-light: #b5bdb266;
  --paper: var(--terra-bg); --pale: #e8efcd; --background: var(--terra-bg); --foreground: var(--terra-text);
  --radius: 0; color-scheme: light;
}
*, *::before, *::after { border-radius: 0; }
html, body { color: var(--terra-text); background: var(--terra-bg); }
::selection { color: #1e201d; background: rgb(var(--accent-rgb) / 0.8); }
.site, .page-home, .page-chat {
  position: relative; isolation: isolate; color: var(--terra-text); background-color: var(--terra-bg);
  background-image: radial-gradient(ellipse at 103% 34%, #5b6ee11f, transparent 52%),
    radial-gradient(ellipse at 0 12%, #f4f6f2, transparent 68%),
    repeating-linear-gradient(0deg, #ffffff00 0 5px, #2b2d2f09 5px 6px, #fff2 6px 7px),
    linear-gradient(108deg,#f4f6f2 0%,#d8dbd6 60%,#b7bcb4 86%,#2b2d2f 100%);
  background-attachment: fixed;
}
/* Receding guide rails are painted behind the interface, never hit targets. */
.site::before, .page-chat::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  opacity: .55; filter: none; mask-image: none;
  background: linear-gradient(166deg,transparent 0 37.8%,rgb(var(--accent-rgb) / 0.650980392) 37.85% 38.02%,transparent 38.08% 38.5%,#fff9 38.55% 38.64%,transparent 38.7%),
    linear-gradient(18deg,transparent 0 66%,#fff9 66.08% 66.18%,transparent 66.25%),
    linear-gradient(99deg,transparent 0 85%,rgb(var(--iris-rgb) / 0.133333333) 85.1% 85.3%,transparent 85.4%);
}
h1, h2, h3, .message-name, .scene-title { font-family: var(--font-display); color: var(--terra-text); }
button, .button, .resource-play, .text-button { font-family: var(--font-display); font-weight: 600; }
button { color: inherit; }
time, code, dt, .eyebrow, [class$='-index'], [class$='-tag'], .hero-roman,
.state-note, .composer-meta, .section-index, .count, .opening-label, .scene-time, .history-item small {
  font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .08em;
}
.site .site-header, .page-home .site-header, .page-chat .site-header {
  background: repeating-linear-gradient(0deg,#ffffff00 0 4px,#ffffff03 4px 5px),rgb(var(--charcoal-rgb) / 0.960784314);
  border-color: var(--accent); backdrop-filter: blur(12px);
  box-shadow: inset 0 -2px var(--accent),0 2px #ffffffb3,0 10px 28px rgb(var(--charcoal-deep-rgb) / 0.070588235);
}
.site .site-header::before { content: none; }
.site .site-header::after {
  content: 'SECTOR // 00-KAL' / ''; position: absolute; left: 3.2%; top: 50%; bottom: auto;
  transform: translateY(-50%); border: 0; color: #eaece8;
  font: 10px var(--font-mono); letter-spacing: .14em; pointer-events: none;
  background: linear-gradient(var(--alert),var(--alert)) 0 0/5px 5px no-repeat,
    linear-gradient(var(--accent),var(--accent)) 9px 0/5px 5px no-repeat,
    linear-gradient(#eaece8,#eaece8) 18px 0/5px 5px no-repeat;
  padding-top: 15px;
}
.site .nav-link { color: #eaece8; isolation: isolate; }
.site .nav-link > span { font-family: var(--font-display); }
.site .nav-link small { color: #b8beb1; font-family: var(--font-mono); letter-spacing: .12em; }
.site .nav-link::before {
  content: ''; position: absolute; inset: 13px -8px; z-index: -1; pointer-events: none;
  background: #ffffff05; border: 1px solid #ffffff12; clip-path: none;
  transition: background .22s ease,border-color .22s ease;
}
.site .nav-link.active { color: var(--accent); }
.site .nav-link.active::before { background: rgb(var(--accent-rgb) / 0.054901961); border-color: rgb(var(--accent-rgb) / 0.333333333); }
.site .nav-link:hover:not(.active)::before { background: #ffffff0e; border-color: #ffffff45; }
.site .nav-link.active small { color: #eaece8; }
.site .nav-link::after { background: var(--accent); box-shadow: 0 0 12px rgb(var(--accent-rgb) / 0.250980392); }
.page-chat .nav-link::after { bottom: 10px; height: 3px; }
.site .site-footer { color: #bfc6b7; background: rgb(var(--charcoal-rgb) / 0.949019608); border-color: #ffffff7a; font-family: var(--font-mono); }
.site .site-footer button { color: #eaece8; }
.eyebrow, .section-index { color: #5e6d32; }
.fine-rule { background: #9bad54; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid #728920; outline-offset: 3px;
}
/* Inset structural stripe preserves original border widths and button geometry.
   A background-size transition keeps text and icons above the moving light. */
.site .button, .dialog .button, .site .small-button, .site .session-tools .small-button, .resource-play {
  color: #f4f6f2; border: 1px solid #ffffffb3 !important;
  background: linear-gradient(90deg,var(--accent),var(--accent)) left top / 0% 100% no-repeat var(--charcoal-deep) !important;
  box-shadow: inset 4px 0 var(--accent),0 2px 7px rgb(var(--charcoal-deep-rgb) / 0.125490196);
  transition: background-size .22s ease,color .22s ease,box-shadow .22s ease;
}
.site .button::before, .dialog .button::before, .site .small-button::before, .resource-play::before { content: none; }
.site .button:hover:not(:disabled), .dialog .button:hover:not(:disabled),
.site .small-button:hover:not(:disabled), .site .session-tools .small-button:hover:not(:disabled), .resource-play:hover {
  color: #1e201d; background-size: 100% 100% !important;
  box-shadow: inset 4px 0 var(--accent),2px 0 rgb(var(--iris-rgb) / 0.360784314),0 4px 12px rgb(var(--charcoal-deep-rgb) / 0.141176471);
}
.site .danger-button, .dialog .danger-button { box-shadow: inset 4px 0 var(--alert),0 2px 7px rgb(var(--charcoal-deep-rgb) / 0.125490196); }
.site .text-button, .dialog .text-button { color: #475b17; }
.site .text-button:hover, .dialog .text-button:hover { color: #1e201d; }
.site .icon-button:hover, .dialog .icon-button:hover { background: rgb(var(--accent-rgb) / 0.207843137); }
.site .skip-link { background: var(--accent); color: #1e201d; }
/* Keep the previous E1 decorative portrait and the official E1/E2 anchors. */
.page-home .hero-backdrop { inset: -2svh auto auto 3%; width: 100%; height: 100%; opacity: .23; mix-blend-mode: multiply; }
.page-home .hero-backdrop img {
  position: static; width: 100%; height: 100%; max-width: none; object-fit: fill;
  filter: grayscale(1) contrast(.9); opacity: .85;
}
.page-home .elite-phase-2 .hero-backdrop { opacity: 0; }
.page-home .hero-grid { opacity: .65; }
.page-home .hero-grid svg { filter: grayscale(.9); opacity: .24; }
.page-home .hero-grid::before {
  content: ''; position: absolute; inset: 12% 0 4% 72%; pointer-events: none;
  background: repeating-linear-gradient(0deg,#f4f6f233 0 12px,rgb(var(--charcoal-rgb) / 0.160784314) 13px 14px,#ffffff66 15px 16px);
  transform: perspective(620px) rotateY(-30deg); transform-origin: right center;
  border-inline: 1px solid #fff9; box-shadow: 2px 0 rgb(var(--iris-rgb) / 0.4),-2px 0 rgb(var(--accent-rgb) / 0.4);
  mask-image: linear-gradient(90deg,transparent,#000 35%);
}
.page-home .hero-grid::after {
  content: ''; position: absolute; inset: 58% -8% auto -8%; height: 2px;
  transform: rotate(-9deg); transform-origin: center; pointer-events: none;
  background: var(--accent); box-shadow: 0 7px #fff9,0 0 12px rgb(var(--accent-rgb) / 0.258823529);
}
.page-home .hero h1 { font-family: var(--font-display); color: #1e201d; text-shadow: 0 2px 20px #f4f6f285; }
.page-home .hero-roman { color: #3d4735; font-family: var(--font-mono); font-style: normal; }
.page-home .hero-copy::before {
  content: 'SECTOR // 00-KAL' / ''; position: absolute; top: -31px; left: 3px;
  font: 10px var(--font-mono); letter-spacing: .12em; color: #4c573c; pointer-events: none;
}
.page-home .hero-copy::after {
  content: 'RHODES ISLAND  /  REMNANT ARCHIVE' / ''; position: absolute; bottom: -37px; left: 3px;
  white-space: nowrap; font: 8px var(--font-mono); letter-spacing: .12em; color: #59624d; pointer-events: none;
}
.page-home .hero-outline { -webkit-text-stroke-color: rgb(var(--charcoal-rgb) / 0.207843137); }
.page-home .elite-switch { background: rgb(var(--charcoal-rgb) / 0.929411765); border-left-color: rgb(var(--accent-rgb) / 0.333333333); color: #eaece8; box-shadow: 2px 0 rgb(var(--iris-rgb) / 0.301960784); }
.page-home .elite-switch:hover, .page-home .elite-switch[aria-pressed=true] { background: var(--accent); color: var(--charcoal-deep); border-left-color: #f4f6f2; }
.page-home .hero-art-error { background: #f4f6f2f0; color: var(--charcoal); }
/* Conversation panels preserve scroll containers and responsive placement. */
.page-chat .conversation { background: #f4f6f259; border-color: #ffffffb3; }
.page-chat .character-state {
  background: repeating-linear-gradient(0deg,transparent 0 5px,#ffffff03 5px 6px),rgb(var(--charcoal-rgb) / 0.929411765);
  border-color: #ffffffb3; box-shadow: -2px 0 rgb(var(--accent-rgb) / 0.501960784);
}
.chat-layout::before { background: #ffffffb3; }
.page-chat .conversation::after { border-color: #fff8; }
.page-chat .chat-heading { border-color: #89937b70; }
.page-chat .chat-heading::after, .page-chat .composer-area::before { color: #859b30; }
.page-chat .chat-heading h1 { font-family: var(--font-display); color: #1e201d; }
.page-chat .state-heading h2 { font-family: var(--font-display); color: #f4f6f2; }
.page-chat .conversation-toolbar .text-button { color: #4f5f35; }
.count { background: var(--accent); color: var(--charcoal-deep); }
.page-chat .message-name { color: var(--charcoal-deep); }
.page-chat .opening-label { color: #5c6753; }
.page-chat .message-bubble {
  background: rgb(var(--glass-rgb) / .88); color: #1e201d; border-color: #ffffffcc;
  border-radius: 0; backdrop-filter: blur(12px);
  box-shadow: inset 0 -3px var(--accent),2px 0 rgb(var(--iris-rgb) / 0.301960784),0 8px 20px rgb(var(--charcoal-deep-rgb) / 0.062745098);
}
.page-chat .message-bubble::before { background: var(--glass); border-color: #fff; }
.page-chat .message-bubble .action-text { color: #626c59; font-family: var(--font-serif); font-style: italic; }
.page-chat .user-message .message-bubble { background: #e8edddf0; border-color: #fff; box-shadow: inset 0 -3px var(--charcoal),2px 0 rgb(var(--iris-rgb) / 0.2); }
.page-chat .user-message .message-bubble::before { background: #e8eddd; border-color: #fff; }
.page-chat .reference-avatar { background: #eaece8; border-color: #fff; border-radius: 0; box-shadow: 0 3px var(--accent); }
.page-chat .message-references a { color: #475b17; }
.page-chat .opening-hint, .page-chat .reply-pending { color: #59694d; }
.page-chat .opening-hint .fine-rule { background: #9bb32c; }
.page-chat .opening-hint .text-button { color: #475b17; }
.page-chat .composer-area { background: #dfe3d9e8; border-color: #fff9; backdrop-filter: blur(12px); }
.page-chat .composer textarea, .custom-fields input, .custom-fields textarea {
  background: rgb(var(--glass-rgb) / 0.874509804); color: #1e201d; border-color: #ffffffcc; caret-color: #576d17;
  color-scheme: light; box-shadow: inset 3px 0 var(--accent),2px 0 rgb(var(--iris-rgb) / 0.219607843);
}
.page-chat .composer textarea::placeholder { color: #626d58; }
.page-chat .composer-meta, .page-chat .service-strip, .page-chat .chat-privacy { color: #59644e; }
.page-chat .service-dot.available { background: #718c12; }
.page-chat .state-heading > span { color: #bdc4b5; }
.page-chat .messages, .page-chat .character-state, .history-list { scrollbar-color: #84916b6b transparent; }
/* Floating instrument panels: high-key glass, prism edge, vent holes, light rail. */
.page-chat .state-card, .scene-card, .history-item {
  position: relative; isolation: isolate; border: 1px solid #ffffffcc !important;
  background: rgb(var(--glass-rgb) / .88) !important; border-radius: 0; clip-path: none;
  color: #1e201d; backdrop-filter: blur(12px);
  box-shadow: inset 3px 0 var(--charcoal),2px 0 rgb(var(--iris-rgb) / 0.501960784),-2px 0 rgb(var(--accent-rgb) / 0.501960784),0 8px 20px rgb(var(--charcoal-deep-rgb) / 0.078431373);
  transition: background .22s ease,box-shadow .22s ease;
}
.page-chat .state-card::before, .scene-card::before, .history-item::before {
  content: ''; position: absolute; inset: auto 0 0; height: 3px; pointer-events: none;
  background: var(--accent); transform: scaleX(.14); transform-origin: center;
  transition: transform .22s ease,box-shadow .22s ease;
}
.page-chat .state-card::after, .scene-card::after, .history-item::after {
  content: ''; position: absolute; right: 10px; top: 10px; width: 9px; height: 22px;
  background: radial-gradient(circle,rgb(var(--charcoal-rgb) / 0.376470588) 0 1px,transparent 1.5px) 0 0/5px 5px;
  pointer-events: none; z-index: -1; opacity: .5;
}
.page-chat .state-card h3 { color: #4d5b2b; font-family: var(--font-display); }
.page-chat .state-card p { color: #1e201d; }
.page-chat .state-note { color: #59634e; }
.page-chat .state-footnote, .state-portrait>span { color: #c1c9b7; }
.page-chat .character-state > .text-button { color: #e5edcd; }
.page-chat .character-state > .text-button:hover { color: var(--accent); }
.scene-card { color: #50641c; }
.scene-card.selected, .history-item.selected {
  background: #eef4d9 !important; border-color: #9bb52a !important;
  box-shadow: inset 3px 0 var(--accent),2px 0 rgb(var(--iris-rgb) / 0.360784314),0 6px 18px rgb(var(--charcoal-deep-rgb) / 0.078431373);
}
.scene-card.selected::before, .history-item.selected::before { transform: scaleX(1); }
.scene-description, .scene-time, .history-item small, .history-item time { color: #59634e; }
.scene-title, .history-item strong { color: #1e201d; }
.scene-time>span { color: #50641c; }
.scene-card:focus-visible, .history-item:focus-visible { outline: 2px solid #728920; outline-offset: -3px; }
.dialog {
  color: #1e201d; background: rgb(var(--glass-rgb) / 0.949019608); border-color: #fff; border-radius: 0;
  box-shadow: 2px 0 rgb(var(--iris-rgb) / 0.501960784),-2px 0 rgb(var(--accent-rgb) / 0.501960784),inset 0 3px var(--accent),0 22px 70px rgb(var(--charcoal-deep-rgb) / 0.301960784);
  backdrop-filter: blur(12px); color-scheme: light;
}
.dialog::backdrop { background: rgb(var(--charcoal-deep-rgb) / 0.501960784); backdrop-filter: blur(6px); }
.dialog-top h2, .dialog .icon-button { color: #1e201d; }
.dialog-top h2 { font-family: var(--font-display); }
.dialog-description { color: #59634e; font-family: var(--font-display); font-style: normal; box-shadow: -3px 0 var(--accent); background: linear-gradient(90deg,rgb(var(--accent-rgb) / 0.062745098),transparent); }
.custom-fields label, .custom-fields p, .dialog-actions>span, .history-actions .text-button, .history-empty { color: #59634e; }
.history-actions { border-color: #a8b09f70; }
.history-actions .danger, .form-error { color: #a13325; }
.chat-error, .quota-notice, .storage-alert { color: #7e3126; background: #fff0eae8; border-color: rgb(var(--alert-rgb) / 0.501960784); }
.chat-error span, .chat-error .text-button { color: #7e3126; }
.toast { color: #1e201d; background: #f4f6f2f0; border-color: #fff; border-radius: 0; box-shadow: inset 3px 0 var(--accent),2px 0 rgb(var(--iris-rgb) / 0.4),0 8px 30px rgb(var(--charcoal-deep-rgb) / 0.188235294); }
.empty-state { color: #59634e; }
/* Purely decorative index labels occupy the existing header whitespace. */
.page-chat .chat-heading::before {
  content: 'CONVERSATION // INDEX-8942' / ''; position: absolute; left: 0; bottom: 6px; pointer-events: none;
  font: 8px var(--font-mono); letter-spacing: .12em; color: #606e4b;
}
.page-chat .state-heading { position: relative; }
.page-chat .state-heading::after {
  content: 'OBSERVATION // LIVE RECORD' / ''; position: absolute; left: 0; bottom: -15px; pointer-events: none;
  font: 8px var(--font-mono); letter-spacing: .12em; color: #bdc7ac;
}
.page-chat .state-card h3 { position: relative; }
.page-chat .state-card h3::after {
  content: 'LOCATION' / ''; position: absolute; right: 5px; top: 3px; pointer-events: none;
  font: 7px var(--font-mono); letter-spacing: .1em; color: #697855;
}
.page-chat .state-card:nth-child(2) h3::after { content: 'SCENE TIME' / ''; }
.page-chat .state-card:nth-child(3) h3::after { content: 'OBSERVATION' / ''; }
@media (hover: hover) {
  .page-chat .state-card:hover, .scene-card:hover, .history-item:hover {
    background: #fcfef9f5 !important; box-shadow: inset 3px 0 var(--accent),3px 0 rgb(var(--iris-rgb) / 0.501960784),-2px 0 rgb(var(--accent-rgb) / 0.501960784),0 10px 24px rgb(var(--charcoal-deep-rgb) / 0.125490196);
  }
  .page-chat .state-card:hover::before, .scene-card:hover::before, .history-item:hover::before { transform: scaleX(1); box-shadow: 0 0 10px rgb(var(--accent-rgb) / 0.501960784); }
}
@media (max-width: 1100px) { .site .site-header::after { content: '00-KAL' / ''; font-size: 9px; } }
@media (max-width: 799px) {
  .site .site-header::after { content: none; }
  .site .nav-link::before { inset: 11px -4px; }
  .page-home .hero-copy { background: linear-gradient(90deg,#f4f6f2ee 50%,#f4f6f200); }
  .page-home .hero-copy::before { top: -16px; font-size: 7px; }
  .page-home .hero-copy::after { bottom: -12px; font-size: 6px; }
  .page-home .hero-backdrop { inset: 0; opacity: .25; }
  .page-home .hero-backdrop img { object-fit: cover; object-position: 43% center; }
  .page-home .hero-grid::before { left: 63%; opacity: .65; }
  .page-chat .character-state { background: rgb(var(--charcoal-rgb) / 0.960784314); }
  .page-chat .chat-heading::before { bottom: 3px; font-size: 7px; }
  .page-chat .state-heading::after { bottom: -10px; font-size: 7px; }
  .page-chat .state-card h3::after { top: -8px; font-size: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .site .button, .dialog .button, .site .small-button, .resource-play,
  .site .nav-link::before, .page-chat .state-card, .scene-card, .history-item,
  .page-chat .state-card::before, .scene-card::before, .history-item::before { transition: none; }
}
/* Remnant archive: appearance only. Existing dimensions, responsive layouts,
   component structure, events and owner-managed resource data stay intact. */
.character-profile {
  --profile-ink: #1e201d;
  --profile-muted: #4f584b;
  --profile-line: #c3c8bf;
  --content-accent: #3447a1;
  color: var(--profile-ink);
  background: transparent;
}
.resource-library,
.resource-manager {
  --library-accent: var(--accent);
  /* The inline owner setting wins; its derived ink remains readable on glass. */
  --library-paper-accent: color-mix(in srgb, var(--library-accent) 24%, #1e201d 76%);
  --library-dark-accent: color-mix(in srgb, var(--library-accent) 40%, var(--glass) 60%);
  --content-accent: #3447a1;
  color: #1e201d;
  background: transparent;
}
.about-page { --content-accent: #3447a1; color: #1e201d; }
:is(.character-profile, .resource-library, .resource-manager, .about-page)
:is(h1, h2, h3, .profile-lead, .profile-library-link p) {
  color: #1e201d;
  font-family: var(--font-display, 'Inter', 'Noto Sans SC', sans-serif);
}
:is(.character-profile, .resource-library, .resource-manager, .about-page)
:is(button, .text-button, .resource-play, label, dt) {
  font-family: var(--font-display, 'Inter', 'Noto Sans SC', sans-serif);
  text-transform: none;
  letter-spacing: .03em;
}
:is(.profile-hero-overline, .profile-roman, .profile-section-label > span,
.profile-art-caption, .profile-art-description > small, .profile-outfits small,
.profile-story-feature small, .profile-story-row small, .profile-combat-title > span,
.profile-endnote > span, .resource-index, .resource-row-index, .resource-details,
.ep-meta, .library-count b, .library-footnote > span, .section-index, .eyebrow,
.profile-record-list > button > span, .profile-dialog header > span,
.profile-dialog footer, time, .theme-input code) {
  font-family: var(--font-mono, 'JetBrains Mono', Consolas, monospace);
  letter-spacing: .08em;
}
:is(.character-profile, .resource-library, .resource-manager, .about-page),
:is(.character-profile, .resource-library, .resource-manager, .about-page) *,
:is(.profile-dialog, .library-player, .manager-leave-dialog) { border-radius: 0; }
:is(.character-profile, .resource-library, .resource-manager, .about-page)
:is(button, a, input, select, textarea):focus-visible {
  outline: 2px solid var(--content-accent, #3447a1);
  outline-offset: 3px;
}

/* The portrait, chapter rail and metadata keep their original anchors. */
.profile-hero {
  background: radial-gradient(ellipse at 70% 0, #fff, transparent 70%), #d8dbd6;
  border-color: #c3c8bf;
  box-shadow: inset 0 1px #fff, inset 0 -1px rgb(var(--iris-rgb) / 0.2);
}
.profile-hero-overline,
.profile-kicker,
.profile-section-label > span,
.profile-art-description > small,
.profile-combat-title > span,
.profile-voice span,
.profile-endnote > span { color: #4f584b; }
.profile-kicker > span { background: var(--accent); box-shadow: 2px 0 var(--iris); }
.profile-roman { color: #1e201d; }
.profile-editorial-note,
.profile-art-caption,
.profile-section-label > p,
.profile-prose-columns p,
.profile-story-row p,
.profile-outfits p,
.profile-combat p,
.profile-voice p,
.profile-record-list p,
.profile-endnote > p { color: #4f584b; }
.profile-hero-art {
  background: repeating-linear-gradient(0deg, #ffffff22 0 1px, transparent 1px 7px),
    radial-gradient(ellipse at 75% 45%, #fff, #d8dbd6 75%);
}
.profile-hero-art::before { background: rgb(var(--iris-rgb) / 0.301960784); }
.profile-hero-art::after { background: linear-gradient(90deg, #d8dbd6, transparent 44%); }
.profile-art-ring { border-color: #ffffff99; box-shadow: 1px 0 rgb(var(--iris-rgb) / 0.168627451); }
.profile-art-word { color: #4f584b0b; font-family: var(--font-display, 'Inter', sans-serif); }
.profile-hero-art > img { filter: drop-shadow(10px 18px 22px rgb(var(--charcoal-rgb) / 0.141176471)); }
.profile-hero-meta {
  --content-accent: var(--accent);
  border-color: #ffffff80;
  background: var(--charcoal);
  box-shadow: inset 0 1px #ffffff40, inset 0 -2px var(--accent);
  backdrop-filter: blur(12px);
  color: var(--glass);
}
.profile-hero-meta > span { color: #c7cec0; }
.profile-hero-meta b,
.profile-hero-meta b small { color: #fff; font-family: var(--font-display, 'Inter', 'Noto Sans SC', sans-serif); }
.profile-hero-meta > button { color: var(--glass); }
.profile-fact-table dd { color: #1e201d; }
.profile-chapters {
  --content-accent: var(--accent);
  background: var(--charcoal);
  border-color: #ffffff66;
  color: var(--glass);
  box-shadow: inset 0 1px #ffffff40, 0 2px rgb(var(--iris-rgb) / 0.2);
  backdrop-filter: blur(12px);
}
.profile-chapters button { color: var(--glass); }
.profile-chapters button small { color: var(--accent); }
.profile-chapters button:hover { color: var(--accent); }
.profile-fact-caption,
.profile-story-row > span,
.profile-outfits small,
.profile-record-list > button > span,
.profile-results-count { color: #4f584b; }
.profile-read:hover,
.profile-start:hover,
.profile-source-note button:hover,
.profile-endnote > button:hover { color: #3447a1; }
.profile-start,
.profile-read,
.profile-source-note button,
.profile-outfits > button { border-color: #a7afa0 !important; }
.profile-source-note { color: #46513e; }
.profile-source-note > span,
.profile-fact-table dt { color: #4f584b; }
.profile-fact-table,
.profile-fact-table > div,
.profile-story-row,
.profile-combat,
.profile-combat-title,
.profile-cv p,
.profile-record-list > button,
.profile-results-count { border-color: #c3c8bf !important; }
.profile-cv strong { color: #1e201d; }
.profile-combat h3 small { color: #4f584b; }
.profile-art-description { border-color: #c3c8bf; }
.profile-art-switch button {
  color: #4f584b;
  border-color: #bcc3b6 !important;
  background: rgb(var(--glass-rgb) / 0.8);
}
.profile-art-switch button[aria-pressed=true] {
  color: #1e201d;
  background: var(--accent);
  border-color: #a0bd20 !important;
  box-shadow: 2px 2px rgb(var(--iris-rgb) / 0.2);
}
.profile-outfits svg,
.profile-record-list > button > svg { color: #46513e; }
.profile-search-row > label { border-color: #a7afa0; color: #46513e; }
.profile-search-row input { color: #1e201d; }
.profile-search-row input::placeholder { color: #4f584b; opacity: 1; }
.profile-search-row > button[aria-pressed=true] { color: #1e201d; background: var(--accent); }
.profile-filters button { color: #4f584b; }
.profile-filters button[aria-pressed=true] { color: #1e201d; box-shadow: 0 2px #8aa012; }
.profile-notice {
  color: #fff;
  background: rgb(var(--charcoal-rgb) / 0.960784314);
  box-shadow: inset 3px 0 var(--accent), 0 5px 30px rgb(var(--charcoal-rgb) / 0.2), 2px 2px rgb(var(--iris-rgb) / 0.301960784);
}
.profile-intro > p,
.profile-lead,
.library-heading p,
.manager-heading p,
.about-bottom > p {
  color: #4f584b;
  font-family: var(--font-display, 'Inter', 'Noto Sans SC', sans-serif);
  font-style: normal;
  background: linear-gradient(90deg, rgb(var(--accent-rgb) / 0.070588235), transparent 85%);
  box-shadow: -3px 0 var(--accent);
}

/* Glass sheets: white highlight, structural edges and an optical light sweep.
   The two small perforation columns are decorative and cannot intercept input. */
.profile-story-feature,
.profile-art-study,
.profile-library-link,
.ep-card,
:is(.resource-grid, .resource-rows) .resource-item,
.about-grid article {
  --content-accent: #3447a1;
  position: relative;
  isolation: isolate;
  border-color: #ffffffb3;
  background-color: rgb(var(--glass-rgb) / .78);
  background-image: linear-gradient(90deg, #ffffff08, #ffffffe6),
    repeating-linear-gradient(0deg, rgb(var(--charcoal-rgb) / 0.015686275) 0 1px, transparent 1px 6px);
  background-size: 0 100%, 100% 100%;
  background-repeat: no-repeat;
  color: #1e201d;
  clip-path: none;
  backdrop-filter: blur(12px);
  box-shadow: inset 1px 0 #8d9685, inset 0 -1px #8d9685,
    inset 0 1px #fff, 3px 3px 14px rgb(var(--iris-rgb) / 0.047058824);
  transition: background-size .32s ease, background-color .32s ease,
    border-color .32s ease, box-shadow .32s ease;
}
:is(.profile-story-feature, .profile-art-study, .profile-library-link, .ep-card,
:is(.resource-grid, .resource-rows) .resource-item, .about-grid article)::before {
  content: '';
  position: absolute;
  z-index: 3;
  inset: 0;
  background: linear-gradient(var(--accent), var(--accent)) left top/20px 3px no-repeat,
    linear-gradient(rgb(var(--iris-rgb) / 0.501960784), rgb(var(--iris-rgb) / 0.501960784)) right bottom/34px 1px no-repeat;
  pointer-events: none;
}
:is(.profile-story-feature, .profile-art-study, .profile-library-link, .ep-card,
:is(.resource-grid, .resource-rows) .resource-item, .about-grid article)::after {
  content: '';
  position: absolute;
  z-index: 2;
  top: 8px;
  right: 8px;
  width: 12px;
  height: 24px;
  background: radial-gradient(circle, #737d6980 1px, transparent 1.5px) 0 0/6px 6px;
  pointer-events: none;
}
:is(.profile-story-feature, .profile-art-study, .profile-library-link, .ep-card,
:is(.resource-grid, .resource-rows) .resource-item) :is(h2, h3, .profile-library-link p) { color: #1e201d; }
.profile-library-link p { color: #1e201d; }
.profile-story-feature p,
.profile-art-description > p,
.profile-library-link span,
.ep-card p,
:is(.resource-grid, .resource-rows) .resource-item-info > p { color: #4f584b; }
.profile-story-feature small,
.profile-art-description > small,
.profile-library-link small,
.ep-card .resource-index,
.ep-card .ep-meta,
:is(.resource-grid, .resource-rows) .resource-details { color: #4f584b; }
.profile-art-stage > span { color: #4f584b0b; font-family: var(--font-display, 'Inter', sans-serif); }
.profile-story-feature .profile-read,
.profile-art-study .profile-read { color: #46513e; border-color: #a7afa0 !important; }
.profile-library-link:hover { color: #1e201d; }
:is(.profile-story-feature, .profile-art-study, .profile-library-link, .ep-card,
:is(.resource-grid, .resource-rows) .resource-item):focus-within { border-color: var(--iris); }
@media (hover: hover) {
  :is(.profile-story-feature, .profile-art-study, .profile-library-link, .ep-card,
  :is(.resource-grid, .resource-rows) .resource-item, .about-grid article):hover {
    transform: none;
    background-color: rgba(250, 252, 248, .96);
    background-image: linear-gradient(90deg, #ffffff08, #ffffffe6),
      repeating-linear-gradient(0deg, rgb(var(--charcoal-rgb) / 0.015686275) 0 1px, transparent 1px 6px);
    background-size: 100% 100%, 100% 100%;
    border-color: #fff;
    box-shadow: inset 1px 0 var(--accent), inset 0 -1px var(--accent),
      inset 0 1px #fff, 3px 3px 0 rgb(var(--iris-rgb) / 0.301960784), -2px 0 0 rgb(var(--accent-rgb) / 0.301960784), 0 7px 22px rgb(var(--iris-rgb) / 0.101960784);
  }
}

/* Compact rows keep every hit target and existing gutter unchanged. */
.character-profile .profile-record-list > button,
.resource-manager .manager-resource-list > button {
  --content-accent: #3447a1;
  color: #1e201d;
  background: rgb(var(--glass-rgb) / .78);
  border-top-color: #ffffffb3 !important;
  box-shadow: inset 1px 0 #a7afa0, inset 0 -1px #c3c8bf;
  backdrop-filter: blur(12px);
  transition: background-color .25s ease, box-shadow .25s ease;
}
.character-profile .profile-record-list > button:hover,
.resource-manager .manager-resource-list > button:hover {
  background: #fafff0;
  box-shadow: inset 3px 0 var(--accent), inset 0 -1px rgb(var(--iris-rgb) / 0.501960784);
}
.character-profile .profile-record-list > button h3 { color: #1e201d; }
.character-profile .profile-record-list > button p,
.character-profile .profile-record-list > button > span,
.resource-manager .manager-resource-list small { color: #4f584b; }
.character-profile .profile-record-list > button > svg,
.resource-manager .manager-resource-list button > svg { color: #46513e; }
.resource-manager .manager-resource-list > button.active {
  background: #edf3d8;
  border-left-color: var(--accent) !important;
  box-shadow: inset 0 -1px var(--iris), inset 0 1px #fff;
}
.profile-section,
.library-footnote,
.about-bottom { position: relative; border-color: #b8c0ae; }
.profile-section::after,
.library-footnote::after,
.about-bottom::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: -1px;
  width: 72px;
  height: 2px;
  background: linear-gradient(90deg, var(--alert) 0 20%, var(--accent) 20% 65%, #fff 65% 85%, var(--iris) 85%);
  pointer-events: none;
}
.library-footnote::after,
.about-bottom::after { top: -1px; bottom: auto; }

/* Editable resource colors survive as readable catalog ink, not fixed chrome. */
.library-heading p,
.manager-heading p,
.resource-item-info > p,
.library-footnote,
.library-empty,
.manager-save > span { color: #4f584b; }
.library-count,
.resource-index,
.ep-meta,
.resource-details,
.library-footnote small,
.library-footnote > span,
.resource-unavailable,
.resource-row-index { color: #4f584b; }
.library-count b,
.library-section-heading h2 span {
  font-family: var(--font-mono, 'JetBrains Mono', Consolas, monospace);
  color: var(--library-paper-accent);
}
.resource-cover { background: #d8dbd6; }
.resource-cover-fallback {
  color: var(--accent);
  background: repeating-linear-gradient(0deg, #ffffff05 0 1px, transparent 1px 6px), var(--charcoal);
}
.resource-cover-fallback span { font-family: var(--font-mono, 'JetBrains Mono', Consolas, monospace); }
.resource-source,
.resource-category,
.resource-item-actions > a:not(.resource-play),
.library-heading-side .text-button { color: var(--library-paper-accent); }
.resource-category { text-shadow: 1px 0 rgb(var(--accent-rgb) / 0.101960784); }
/* Primary player buttons inherit the shared remnant button fill in terra.css. */
.resource-play:hover { filter: none; }
.library-search { color: #46513e; border-color: #a7afa0; }
.library-search input { color: #1e201d; }
.library-search input::placeholder { color: #4f584b; opacity: 1; }
.library-categories { border-color: #c3c8bf; }
.library-categories button { color: #4f584b; }
.library-categories button.active {
  background: var(--accent);
  border-color: #a0bd20 !important;
  color: #1e201d;
  box-shadow: 2px 2px rgb(var(--iris-rgb) / 0.2);
}
.resource-item { border-color: #c3c8bf; }
.library-empty h3 { color: #1e201d; }
.library-alert { background: #f6f9eacc; border-color: #a7ba65; color: #46513e; }
.library-error { color: #a1392b !important; }

/* Owner workspace: dark structural housing, silver editing surfaces. */
.manager-notice,
.manager-workspace,
.manager-appearance {
  border-color: #ffffff80;
  background: var(--charcoal);
  backdrop-filter: blur(12px);
  box-shadow: inset 0 1px #ffffff40, 1px 1px rgb(var(--iris-rgb) / 0.301960784);
}
.manager-notice,
.manager-appearance { --content-accent: var(--accent); color: var(--glass); }
.manager-notice a { color: var(--accent); }
.manager-appearance > div > p { color: #c7cec0; }
.resource-manager .manager-appearance h2 { color: var(--glass); }
.manager-appearance .eyebrow { color: var(--accent); }
.manager-tabs { border-color: #a7afa0; }
.manager-tabs button { color: #4f584b; }
.manager-tabs button.active { color: #1e201d; border-bottom-color: #8aa012 !important; }
.manager-tabs small { background: #e6edcf; color: #46513e; }
.manager-list { --content-accent: var(--accent); background: var(--charcoal); border-color: #ffffff4d; }
.manager-list-top label { color: var(--accent); border-color: #a7afa0; }
.manager-list-top input { color: var(--glass); }
.manager-list-top input::placeholder { color: #c7cec0; opacity: 1; }
.manager-edit {
  --content-accent: #3447a1;
  background: rgb(var(--glass-rgb) / .78);
  color: #1e201d;
  backdrop-filter: blur(12px);
  box-shadow: inset 1px 0 #fff, inset 0 1px #fff, inset 0 -1px #a7afa0;
}
.manager-edit .manager-edit-top h2,
.manager-edit .library-empty h3 { color: #1e201d; }
.manager-edit .eyebrow { color: #4f584b; }
.manager-edit-top button { color: #46513e; }
.manager-edit-top .delete-resource { color: #a1392b; }
.manager-edit-top button:disabled { color: #8b9485; }
.manager-edit .library-empty { color: #4f584b; }
.manager-appearance .resource-form { --content-accent: var(--accent); color: var(--glass); }
.resource-form label { color: #46513e; }
.manager-appearance .resource-form label { color: var(--glass); }
.resource-form input,
.resource-form textarea,
.resource-form select {
  border-color: #a7afa0;
  background: var(--glass);
  color: #1e201d;
  color-scheme: light;
  font-family: var(--font-display, 'Inter', 'Noto Sans SC', sans-serif);
  letter-spacing: normal;
  text-transform: none;
  box-shadow: inset 0 1px 2px rgb(var(--charcoal-rgb) / 0.050980392);
}
.resource-form input::placeholder,
.resource-form textarea::placeholder { color: #4f584b; opacity: 1; }
.resource-form input:focus,
.resource-form textarea:focus,
.resource-form select:focus {
  background: #fff;
  border-color: var(--iris);
  outline-color: #3447a1;
}
.resource-form input[type=date],
.resource-form input[type=url],
.theme-input code { font-family: var(--font-mono, 'JetBrains Mono', Consolas, monospace); }
.resource-form small,
.manager-form-footer > span { color: #4f584b; }
.manager-appearance .resource-form small { color: #c7cec0; }
.resource-featured-check input { accent-color: #46513e; }
.manager-form-footer { border-color: #a7afa0; }
.manager-delete-confirm { color: #a1392b; background: rgb(var(--alert-rgb) / 0.070588235); border-color: rgb(var(--alert-rgb) / 0.501960784); }
.manager-delete-confirm button { border-color: #a1392b80 !important; color: #a1392b; }
.manager-success { color: #e7f5b4; background: var(--charcoal); box-shadow: inset 3px 0 var(--accent); }
.theme-input code { color: var(--accent); }

/* Native dialogs retain their media sizing, focus rings and close controls. */
.profile-dialog,
.library-player,
.manager-leave-dialog {
  --content-accent: #3447a1;
  border-color: #ffffffb3;
  background: rgb(var(--glass-rgb) / .78);
  color: #1e201d;
  backdrop-filter: blur(12px);
  box-shadow: inset 1px 0 #a7afa0, inset 0 -1px #a7afa0,
    inset 0 1px #fff, 3px 3px rgb(var(--iris-rgb) / 0.301960784), 0 22px 90px rgb(var(--charcoal-rgb) / 0.250980392);
  color-scheme: light;
}
.profile-dialog::backdrop,
.library-player::backdrop,
.manager-leave-dialog::backdrop { background: rgb(var(--charcoal-rgb) / 0.501960784); backdrop-filter: blur(12px); }
.profile-dialog header,
.profile-dialog dt,
.profile-dialog-sources p,
.profile-dialog-sources small,
.profile-dialog footer,
.player-top,
.player-note,
.library-player > p,
.manager-leave-dialog p,
.profile-spoiler p { color: #4f584b; }
.character-profile .profile-dialog h2,
.character-profile .profile-dialog h3,
.resource-library .library-player h2,
.resource-manager .manager-leave-dialog h2 {
  color: #1e201d;
  font-family: var(--font-display, 'Inter', 'Noto Sans SC', sans-serif);
}
.profile-dialog-summary {
  color: #4f584b;
  font-family: var(--font-display, 'Inter', 'Noto Sans SC', sans-serif);
  font-style: normal;
  background: linear-gradient(90deg, rgb(var(--accent-rgb) / 0.070588235), transparent 85%);
  box-shadow: -3px 0 var(--accent);
}
.profile-dialog button,
.library-player button,
.manager-leave-dialog button { color: #1e201d; }
.profile-dialog dl,
.profile-dialog dl > div { border-color: #b8c0ae; }
.profile-dialog-sources { background: rgb(var(--glass-rgb) / 0.6); box-shadow: inset 1px 0 #a7afa0, inset 0 1px #fff; }
.profile-dialog-sources a,
.profile-dialog-notice,
.profile-spoiler > svg { color: #3447a1; }
.profile-dialog-actions button { border-color: #a7afa0 !important; }
.profile-dialog-actions button:first-child,
.profile-spoiler button {
  background: linear-gradient(var(--accent), var(--accent)) left/0 100% no-repeat var(--charcoal);
  color: #fff;
  box-shadow: inset 4px 0 var(--accent), inset 0 1px #ffffff40;
  border-color: var(--charcoal) !important;
  transition: background-size .25s ease, color .25s ease;
}
.profile-dialog-actions button:hover,
.profile-spoiler button:hover { background-color: var(--accent); color: #1e201d; }
.profile-dialog-actions button:first-child:hover,
.profile-spoiler button:hover { background-size: 100% 100%; background-color: var(--charcoal); }
.profile-dialog header,
.profile-dialog footer,
.player-note { font-family: var(--font-mono, 'JetBrains Mono', Consolas, monospace); letter-spacing: .08em; }
.library-player .text-button { color: var(--library-paper-accent); }
.manager-leave-overlay { background: rgb(var(--charcoal-rgb) / 0.501960784); }

.about-page .page-heading > div > p,
.about-grid p { color: #4f584b; }
.about-grid article { min-width: 0; padding: 24px; }
.about-mark { color: transparent; -webkit-text-stroke: 1px #a7afa080; font-family: var(--font-display, 'Inter', sans-serif); }
.about-page .section-index { color: #4f584b; }
.about-grid a { color: #3447a1; text-decoration-color: rgb(var(--iris-rgb) / 0.501960784); }

@media (prefers-reduced-motion: reduce) {
  :is(.profile-story-feature, .profile-art-study, .profile-library-link, .ep-card,
  :is(.resource-grid, .resource-rows) .resource-item, .about-grid article),
  .character-profile .profile-record-list > button,
  .resource-manager .manager-resource-list > button,
  .profile-dialog-actions button,
  .profile-spoiler button { transition: none; }
}
/* About-only bento layout. Native details and document reading order stay intact. */
.about-page {
  max-width: 1400px;
  padding: clamp(30px, 4vw, 52px) clamp(20px, 4vw, 56px) 52px;
}
.about-page .about-heading { margin-bottom: 30px; align-items: center; }
.about-page .about-heading h1 { margin-top: 10px; font-size: clamp(28px, 3vw, 38px); line-height: 1.35; letter-spacing: .03em; }
.about-page .about-heading > div > p { margin-top: 10px; font-size: 13px; }
.about-page .about-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}
.about-page .about-grid > .about-card {
  min-width: 0;
  padding: clamp(22px, 2.4vw, 32px);
  border: 1px solid #ffffffb3;
  overflow-wrap: anywhere;
}
.about-page .about-purpose { grid-column: 1 / span 8; grid-row: 1; }
.about-page .about-contact { grid-column: 9 / span 4; grid-row: 1; }
.about-page .about-rights { grid-column: 1 / span 5; grid-row: 2; }
.about-page .about-updates { grid-column: 6 / span 7; grid-row: 2; }
.about-page .about-plans { grid-column: 1 / -1; grid-row: 3; }
.about-page .about-grid h2 { margin: 15px 0 20px; font-size: clamp(21px, 2vw, 25px); line-height: 1.45; letter-spacing: .02em; }
.about-page .about-grid p { font-size: 14px; line-height: 1.95; margin-bottom: 14px; }
.about-page .about-grid p:last-child { margin-bottom: 0; }
.about-page .about-grid a { text-underline-offset: 4px; }
.about-page .about-grid .section-index { display: block; font-size: 9px; line-height: 1.65; letter-spacing: .08em; }

.about-page .about-grid > .about-purpose {
  background-color: rgba(246, 248, 242, .92);
  background-image: radial-gradient(ellipse at 100% 90%, rgb(var(--accent-rgb) / 0.125490196), transparent 65%);
  background-size: 100% 100%;
}
.about-page .about-purpose > :not(.about-purpose-mark) { position: relative; z-index: 1; }
.about-page .about-purpose .about-purpose-lead {
  max-width: 720px;
  margin: 25px 0 24px;
  color: var(--charcoal-deep);
  font-size: clamp(23px, 2.25vw, 31px);
  font-weight: 550;
  line-height: 1.65;
  letter-spacing: .015em;
}
.about-page .about-purpose-mark {
  position: absolute;
  right: 24px;
  bottom: 13px;
  font-family: Georgia, serif;
  font-style: italic;
  font-size: clamp(145px, 20vw, 240px);
  line-height: 1;
  color: rgb(var(--charcoal-rgb) / 0.031372549);
  pointer-events: none;
  user-select: none;
}

/* The global glass hover must not turn this dark contact panel white. */
.about-page .about-grid > .about-contact,
.about-page .about-grid > .about-contact:hover {
  --content-accent: var(--accent);
  color: #f4f6f2;
  background-color: var(--charcoal);
  background-image: radial-gradient(ellipse at 100% 0, rgb(var(--accent-rgb) / 0.070588235), transparent 70%),
    repeating-linear-gradient(0deg, #ffffff03 0 1px, transparent 1px 6px);
  background-size: 100% 100%, 100% 100%;
  border-color: #62695a;
  box-shadow: inset 0 3px var(--accent), 3px 3px 14px rgb(var(--charcoal-deep-rgb) / 0.101960784);
}
.about-page .about-contact h2 { color: #f4f6f2; }
.about-page .about-contact .section-index { color: var(--accent); }
.about-page .about-contact p { color: #d5dacf; }
.about-page .about-grid .about-email {
  display: inline-block;
  max-width: 100%;
  margin: 6px 0 20px;
  padding: 9px 0;
  border-bottom: 2px solid var(--accent);
  color: #f4f6f2;
  font-family: var(--font-mono, monospace);
  font-size: clamp(16px, 1.55vw, 22px);
  line-height: 1.5;
  overflow-wrap: anywhere;
  text-decoration: none;
}
.about-page .about-grid .about-email:hover { color: var(--accent); border-bottom-color: #f4f6f2; }
.about-page .about-grid .about-email:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }

.about-page .about-data-note { margin-top: 18px; padding-top: 14px; border-top: 1px solid rgb(var(--charcoal-rgb) / 0.149019608); }
.about-page .about-data-note summary { cursor: pointer; font-size: 13px; line-height: 1.7; color: var(--charcoal); padding: 7px 0; }
.about-page .about-data-note[open] summary { margin-bottom: 12px; }
.about-page .about-data-note summary:focus-visible { outline: 2px solid #3447a1; outline-offset: 4px; }
.about-page .about-update-date { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-bottom: 19px; font-size: 11px; }
.about-page .about-update-date time { font-family: var(--font-mono, monospace); letter-spacing: .08em; color: #4f584b; }
.about-page .about-update-date span { background: var(--charcoal); color: #eaece8; padding: 3px 7px; }
.about-page .about-update-list { padding-left: 17px; margin: 0; color: #4f584b; font-size: 14px; line-height: 1.9; }
.about-page .about-update-list li + li { margin-top: 14px; }
.about-page .about-update-list li::marker { color: #3b7a67; }
.about-page .about-plan-list { list-style: none; padding: 0; margin: 23px 0 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 23px; }
.about-page .about-plan-list li { min-width: 0; padding-left: 14px; border-left: 2px solid #b4cf22; }
.about-page .about-plan-list h3 { margin: 0 0 8px; font-size: 15px; font-weight: 600; line-height: 1.5; }
.about-page .about-plan-list p { margin: 0; }

/* Desktop reading grid: a broad journal and an independent rights card.
   Expanded native details grow the document, never an inner scroll area. */
@media (min-width: 1101px) {
  .about-page { max-width: 1480px; margin-inline: auto; }
  .about-page .about-grid { gap: 24px; align-items: start; }
  .about-page .about-grid > .about-card { padding: 28px; }
  .about-page .about-purpose,
  .about-page .about-contact { align-self: stretch; }
  .about-page .about-grid h2 { margin-top: 13px; margin-bottom: 18px; }
  .about-page .about-grid p { line-height: 1.85; }
  .about-page .about-purpose .about-purpose-lead { margin-top: 22px; margin-bottom: 20px; font-size: clamp(25px, 2.1vw, 30px); }
  .about-page .about-updates > .about-update-date { margin-bottom: 22px; }
  .about-page .about-updates > .about-update-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 28px;
    padding-left: 18px;
    font-size: 13px;
    line-height: 1.85;
  }
  .about-page .about-updates > .about-update-list > li { min-width: 0; padding-right: 3px; }
  .about-page .about-updates > .about-update-list > li + li { margin-top: 0; }
  .about-page .about-updates > .about-data-note { margin-top: 12px; padding-top: 8px; }
  .about-page .about-updates > .about-data-note summary { padding-block: 5px; font-size: 12px; line-height: 1.6; }
  .about-page .about-updates > .about-data-note .about-update-list { font-size: 13px; line-height: 1.85; }
  .about-page .about-grid > .about-plans {
    display: grid;
    grid-template-columns: minmax(200px, .85fr) minmax(0, 2.6fr);
    gap: 32px;
    align-items: start;
  }
  .about-page .about-plans-intro { min-width: 0; }
  .about-page .about-plan-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin-top: 5px; }
  .about-page .about-plan-list li { padding-left: 15px; }
  .about-page .about-plan-list h3 { margin-bottom: 10px; }
  .about-page .about-plan-list p { font-size: 13px; }
}

@media (max-width: 1100px) {
  .about-page .about-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .about-page .about-grid > .about-card { grid-column: auto; grid-row: auto; }
  .about-page .about-grid > .about-purpose { grid-column: 1 / -1; }
  .about-page .about-grid .about-email { font-size: clamp(17px, 2.35vw, 22px); }
}
@media (max-width: 700px) {
  .about-page { padding: 28px 20px 36px; }
  .about-page .about-heading { margin-bottom: 23px; }
  .about-page .about-heading h1 { font-size: 29px; }
  .about-page .about-heading > div > p { font-size: 12px; }
  .about-page .about-grid { grid-template-columns: minmax(0, 1fr); gap: 17px; }
  .about-page .about-grid > .about-card { grid-column: auto; grid-row: auto; padding: 22px; }
  .about-page .about-purpose .about-purpose-lead { margin: 20px 0; font-size: 23px; }
  .about-page .about-grid .about-email { font-size: clamp(17px, 5.3vw, 23px); }
  .about-page .about-plan-list { gap: 20px; }
}
/* Personnel dossier: isolated from legacy profile and all other site pages. */
.personnel-page {
  --personnel-ink:#252923; --personnel-muted:#626b5f; --personnel-line:#c3c9be;
  --personnel-quiet:#626e56;
  --personnel-lime:var(--accent); --personnel-glass:rgb(var(--glass-rgb) / 0.874509804); --personnel-dark:var(--charcoal);
  --personnel-fade-duration:650ms; --personnel-fade-easing:cubic-bezier(.45,0,.55,1);
  width:100%; min-width:0; max-width:1680px; margin:0 auto; padding:34px 3.2% 45px;
  color:var(--personnel-ink); font-family:var(--font-display,sans-serif);
}
.personnel-page *, .personnel-image-dialog * { box-sizing:border-box; }
.personnel-page :is(button,input,select,a):focus-visible, .personnel-image-dialog button:focus-visible { outline:2px solid #5364b4; outline-offset:3px; }
.personnel-page button { font-weight:500; }
.personnel-page button,.personnel-page a { transition:background .2s,color .2s,border-color .2s,box-shadow .2s; }
.personnel-page-heading { display:flex; align-items:end; justify-content:space-between; padding-bottom:24px; gap:20px; }
.personnel-overline { font:9px var(--font-mono,monospace); letter-spacing:.17em; color:#68705f; }
.personnel-page-heading h1 { display:flex; align-items:baseline; gap:20px; margin-top:10px; font-size:29px; line-height:1.25; letter-spacing:.04em; font-weight:650; }
.personnel-page-heading h1 span { font:10px var(--font-mono,monospace); color:#78806f; letter-spacing:.14em; }
.personnel-page-heading>p { display:flex; align-items:center; gap:9px; font-size:10px; color:#59614f; padding-bottom:3px; }
.personnel-page-heading>p>span { width:5px; height:5px; background:#718522; }
.personnel-page-heading>p small { font:9px var(--font-mono,monospace); letter-spacing:.05em; margin-left:10px; color:#6e7666; }
.personnel-layout { display:grid; grid-template-columns:minmax(250px,29%) minmax(0,1fr); align-items:start; gap:25px; }
.personnel-identity { position:sticky; top:24px; min-width:0; color:#eaece8; background:var(--personnel-dark); border:1px solid #ffffffb3; box-shadow:-3px 0 var(--accent),2px 0 rgb(var(--iris-rgb) / 0.278431373),0 15px 35px #262b2013; }
.personnel-version-switch { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); padding:9px 12px 5px; gap:10px; }
.personnel-version-switch button { position:relative; display:flex; flex-direction:column; align-items:flex-start; justify-content:center; gap:3px; min-width:0; height:52px; padding:7px 9px; color:#eaece8; background:transparent; border:0!important; white-space:nowrap; text-align:left; cursor:pointer; transition:color .3s ease; }
.personnel-version-english { font:500 10px/1.2 'Arial Narrow','Helvetica Neue Condensed',Impact,sans-serif; font-stretch:condensed; letter-spacing:.05em; color:inherit; }
.personnel-version-name { font-size:14px; font-weight:600; line-height:1.25; letter-spacing:.025em; color:inherit; }
.personnel-version-switch button::before,.personnel-version-switch button::after { content:none; }
.personnel-version-switch button[aria-pressed=true] { color:var(--accent); }
.personnel-version-switch button:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
@media(hover:hover) {
  .personnel-version-switch button:hover { color:var(--accent); }
}
.personnel-name { padding:23px 23px 17px; position:relative; z-index:1; border-bottom:1px solid #ffffff12; }
.personnel-identity-label { display:block; font:8px var(--font-mono,monospace); letter-spacing:.17em; color:var(--accent); }
.personnel-name h2 { margin-top:11px; color:#f4f6f2; font-size:clamp(24px,2.3vw,36px); letter-spacing:.05em; line-height:1.35; }
.personnel-name>p { color:#c3cbb8; font:11px var(--font-mono,monospace); margin-top:7px; letter-spacing:.18em; }
.personnel-subtitle { display:block; color:#b1b9a9; font-size:10px; line-height:1.6; margin-top:15px; }
.personnel-portrait-toggle { display:none; }
.personnel-portrait { height:clamp(245px,29vw,405px); position:relative; overflow:hidden; background:repeating-linear-gradient(0deg,#ffffff00 0 5px,#ffffff09 5px 6px),linear-gradient(130deg,#e9ede4,#ced5c7 60%,#a8b49c); isolation:isolate; }
.personnel-portrait::before { content:''; position:absolute; height:1px; background:var(--accent); top:55%; left:-20%; width:140%; transform:rotate(-18deg); z-index:-1; box-shadow:0 7px #fff9; }
.personnel-portrait::after { content:''; position:absolute; inset:auto 0 0; height:50px; background:linear-gradient(transparent,rgb(var(--charcoal-rgb) / 0.419607843)); pointer-events:none; }
.personnel-portrait img { width:auto; max-width:none; height:236%; position:absolute; top:-6%; left:50%; transform:translateX(-50.7%); z-index:0; filter:drop-shadow(0 12px 10px #1b271c20); }
.personnel-portrait :is(img,.personnel-portrait-number,.personnel-portrait-caption) { opacity:0; transition:opacity var(--personnel-fade-duration) var(--personnel-fade-easing); pointer-events:none; }
.personnel-portrait :is(img,.personnel-portrait-number,.personnel-portrait-caption).is-visible { opacity:1; }
/* Match the original portrait's eye line and head scale across responsive crops. */
.personnel-portrait img[data-version="esperanta"] { height:380%; top:-115.5%; transform:translateX(-54.4%); }
.personnel-portrait-error { position:absolute; inset:40% 20px auto; z-index:1; color:#4e5845; font-size:12px; line-height:1.8; text-align:center; }
.personnel-portrait-cross { position:absolute; top:13px; left:14px; color:#738267; font:15px var(--font-mono,monospace); }
.personnel-portrait-number { position:absolute; left:12px; top:18%; font:500 clamp(90px,13vw,170px)/1 var(--font-display,sans-serif); letter-spacing:-.08em; color:#ffffff66; z-index:-1; }
.personnel-portrait-caption { position:absolute; right:13px; bottom:11px; z-index:1; color:#f4f6f2; font:7px var(--font-mono,monospace); letter-spacing:.1em; text-shadow:0 0 1px #000,0 0 1px #000,0 0 1px #000,0 1px 2px #000; }
.personnel-identity-facts { margin:0; padding:8px 23px 12px; }
.personnel-identity-facts>div { display:flex; justify-content:space-between; gap:16px; padding:11px 0; border-bottom:1px solid #ffffff14; font-size:11px; line-height:1.5; }
.personnel-identity-facts dt { color:#aab49c; letter-spacing:.06em; font-family:inherit; flex-shrink:0; }
.personnel-identity-facts dd { margin:0; text-align:right; color:#eef1e9; overflow-wrap:anywhere; }
.personnel-identity-foot { padding:8px 23px 21px; display:flex; gap:11px; align-items:center; }
.personnel-identity-foot>span { color:var(--accent); font-size:25px; font-family:Georgia,serif; }
.personnel-identity-foot p { font-size:11px; color:#d5dbce; line-height:1.8; }
.personnel-identity-foot small { font-size:9px; color:#9ca68f; }
.personnel-workspace { min-width:0; }
.personnel-version-fade { position:relative; min-width:0; isolation:isolate; }
.personnel-version-live,.personnel-version-frame { position:relative; min-width:0; }
.personnel-version-ghost { position:absolute; inset:0; z-index:1; overflow:hidden; pointer-events:none; }
.personnel-version-live.is-fading { animation:personnel-content-in var(--personnel-fade-duration) var(--personnel-fade-easing) both; will-change:opacity; }
.personnel-version-ghost.is-fading { animation:personnel-content-out var(--personnel-fade-duration) var(--personnel-fade-easing) both; will-change:opacity; }
.personnel-version-ghost *,.personnel-version-ghost *::before,.personnel-version-ghost *::after { animation:none!important; transition:none!important; pointer-events:none!important; }
@keyframes personnel-content-in { from { opacity:0; } to { opacity:1; } }
@keyframes personnel-content-out { from { opacity:1; } to { opacity:0; } }
.personnel-controls { position:relative; z-index:4; padding:8px 0 10px; margin-top:-8px; margin-bottom:-10px; background:#dde2d6e8; backdrop-filter:blur(12px); }
.personnel-tabs { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); min-height:67px; background:var(--charcoal); border:1px solid #ffffffb3; box-shadow:0 2px rgb(var(--iris-rgb) / 0.211764706); }
.personnel-tabs button { position:relative; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:12px 4px; gap:7px; color:#e1e6d8; min-width:0; }
.personnel-tabs button+button { border-left:1px solid #ffffff15!important; }
.personnel-tabs button span { font-size:clamp(10px,1vw,13px); font-weight:600; white-space:nowrap; }
.personnel-tabs button small { color:#9ca58f; font:7px var(--font-mono,monospace); letter-spacing:.06em; white-space:nowrap; }
.personnel-tabs button::after { content:''; position:absolute; height:3px; background:var(--accent); inset:auto 15px 0; transform:scaleX(0); transition:transform .2s ease; }
.personnel-tabs button[aria-selected=true] { background:rgb(var(--accent-rgb) / 0.070588235); color:#d0ee50; }
.personnel-tabs button[aria-selected=true] small { color:#dce5cb; }
.personnel-tabs button[aria-selected=true]::after { transform:scaleX(1); }
.personnel-tabs button:hover { background:#ffffff0d; }
.personnel-section-heading { display:flex; justify-content:space-between; align-items:center; gap:15px; padding:20px 0 14px; scroll-margin-top:80px; }
.personnel-section-heading>div { display:flex; align-items:center; gap:11px; min-width:0; }
.personnel-section-number { display:grid; place-items:center; width:26px; height:26px; background:var(--accent); border:1px solid #ecf7b3; color:#465a10; font:10px var(--font-mono,monospace); }
.personnel-section-heading h2 { font-size:16px; font-weight:600; white-space:nowrap; }
.personnel-section-heading>div>span:last-child:not(:first-child) { font:8px var(--font-mono,monospace); color:#6f7863; letter-spacing:.06em; }
.personnel-section-heading>span { display:flex; align-items:center; gap:12px; flex-shrink:0; color:#667059; font-size:10px; }
.personnel-section-heading>span button { display:inline-flex; align-items:center; gap:5px; padding:3px 0; border-bottom:1px solid #87966e!important; font-size:10px; }
.personnel-content { display:block; min-width:0; }
.personnel-stream { display:flex; flex-direction:column; gap:22px; width:100%; }
.personnel-stream .personnel-reader { width:100%; }
.personnel-stream .personnel-reader.is-linked { border-left-color:var(--accent); }
.personnel-stream-continuation { position:relative; padding:25px 0 9px; text-align:center; }
.personnel-stream-sentinel { height:1px; pointer-events:none; }
.personnel-stream-more { display:inline-flex; align-items:center; justify-content:center; gap:22px; min-height:42px; padding:10px 22px; color:#eaece8!important; background:var(--charcoal)!important; border-left:3px solid var(--accent)!important; font-size:12px; }
.personnel-stream-more:hover { color:#252923!important; background:var(--accent)!important; }
.personnel-stream-continuation p { color:var(--personnel-quiet); font-size:10px; line-height:1.8; margin-top:12px; }
.personnel-stream-end { display:flex; justify-content:center; align-items:center; gap:14px; padding:25px 0 3px; color:var(--personnel-quiet); font-size:10px; }
.personnel-stream-end>span { color:#8fa74e; }
.personnel-reader { min-width:0; background:var(--personnel-glass); backdrop-filter:blur(12px); border:1px solid #ffffffeb; border-bottom:3px solid var(--accent); padding:24px 26px 22px; box-shadow:2px 0 rgb(var(--iris-rgb) / 0.207843137),0 13px 30px rgb(var(--charcoal-rgb) / 0.035294118); scroll-margin-top:88px; }
.personnel-reader:focus { outline:none; }
.personnel-reader:focus-visible { outline:2px solid var(--iris); outline-offset:3px; }
/* A single dossier sheet, with the original record anchors kept as subsections. */
.personnel-basic-sheet { gap:0; background:var(--personnel-glass); border:1px solid #ffffffeb; border-bottom:3px solid var(--accent); box-shadow:2px 0 rgb(var(--iris-rgb) / 0.207843137),0 13px 30px rgb(var(--charcoal-rgb) / 0.035294118); backdrop-filter:blur(12px); }
.personnel-basic-sheet>.personnel-reader { position:relative; border:0; background:transparent; box-shadow:none; backdrop-filter:none; }
.personnel-basic-sheet>.personnel-reader+.personnel-reader { padding-top:12px; }
.personnel-basic-sheet>.personnel-reader.is-linked { box-shadow:inset 3px 0 var(--accent); }
.personnel-basic-sheet .personnel-reader-heading { border:0; padding-bottom:0; margin-bottom:18px; }
.personnel-basic-sheet .personnel-reader:not(:first-child) .personnel-reader-heading h3 { font-size:20px; }
.personnel-basic-sheet .personnel-facts,.personnel-basic-sheet .personnel-facts>div { border:0; }
.personnel-basic-sheet .personnel-facts { margin-bottom:16px; }
.personnel-basic-sheet .personnel-facts>div { padding:7px 0; }
.personnel-basic-sheet .personnel-prose { margin-bottom:8px; }
.personnel-reader-heading { border-bottom:1px solid #cbd1c4; padding-bottom:19px; margin-bottom:20px; }
.personnel-reader-meta { display:flex; align-items:center; justify-content:space-between; gap:10px; color:var(--personnel-quiet); font:8px var(--font-mono,monospace); letter-spacing:.06em; }
.personnel-reader-heading h3 { font-size:24px; font-weight:600; letter-spacing:.02em; line-height:1.45; margin-top:11px; overflow-wrap:anywhere; }
.personnel-reader-heading h3 a { color:inherit; text-decoration:none; text-underline-offset:5px; text-decoration-thickness:1px; }
.personnel-reader-heading h3 a:hover { text-decoration:underline; text-decoration-color:#93a75d; }
.personnel-reader-heading>p { color:var(--personnel-quiet); font-size:10px; line-height:1.8; margin-top:7px; }
.personnel-reader-heading>p span { padding:0 4px; color:var(--personnel-quiet); }
.personnel-facts { margin:0 0 22px; border-top:1px solid #dae0d2; }
.personnel-facts>div { display:grid; grid-template-columns:94px minmax(0,1fr); gap:13px; border-bottom:1px solid #dbe0d4; padding:12px 0; line-height:1.8; }
.personnel-facts dt { color:var(--personnel-quiet); font-family:var(--font-display,sans-serif); letter-spacing:.02em; font-size:10px; text-transform:none; }
.personnel-facts dd { margin:0; color:#343d2c; font-size:12px; white-space:pre-wrap; overflow-wrap:anywhere; }
.personnel-facts dd>span { display:block; margin-bottom:5px; }
.personnel-facts dd>span:last-child { margin-bottom:0; }
.personnel-facts.is-basic { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); column-gap:23px; }
.personnel-facts.is-basic>div { display:block; padding:12px 0; }
.personnel-facts.is-basic dt { margin-bottom:3px; font-size:9px; }
.personnel-facts.is-basic dd { font-size:13px; }
.personnel-prose { font-size:13px; line-height:2.05; color:#48523c; white-space:pre-wrap; overflow-wrap:anywhere; margin-bottom:25px; }
.personnel-prose.is-transcript { font-family:var(--font-serif,serif); font-size:16px; line-height:2; padding:17px 0 16px 18px; border-left:2px solid #b5c58c; }
.personnel-empty { min-height:250px; padding:35px 14px; text-align:center; background:rgb(var(--glass-rgb) / 0.568627451); border:1px solid #fff9; color:#7c8b68; }
.personnel-empty>svg { margin:0 auto; }
.personnel-empty h3 { font-size:13px; font-weight:500; margin:15px 0 12px; color:#5d7048; }
.personnel-empty p { font-size:10px; line-height:1.8; }
.personnel-empty button { display:inline-flex; align-items:center; gap:5px; margin-top:17px; font-size:10px; color:#586f37; border-bottom:1px solid #aabf8d!important; padding:4px 0; }
.personnel-workspace-footer { display:flex; justify-content:space-between; align-items:center; gap:14px; padding-top:22px; color:var(--personnel-quiet); }
.personnel-workspace-footer>span { font:7px var(--font-mono,monospace); letter-spacing:.1em; }
.personnel-workspace-footer a { display:inline-flex; align-items:center; gap:10px; font-size:10px; color:#586d3a; padding:5px 0; border-bottom:1px solid #afbf98; }
.personnel-audio { min-width:0; margin-bottom:22px; }
.personnel-audio-caption { margin-bottom:8px; color:var(--personnel-quiet); font-size:9px; line-height:1.6; letter-spacing:.04em; }
.personnel-audio-controls { display:flex; flex-wrap:wrap; align-items:center; gap:12px 26px; min-width:0; }
.personnel-audio-player { display:flex; align-items:center; flex:0 1 250px; width:250px; max-width:100%; min-width:0; height:48px; padding:2px 8px 2px 4px; background:#fff; border-left:2px solid var(--accent); box-shadow:inset 0 0 0 1px #dce1d6; }
.personnel-audio-play { display:grid; place-items:center; flex:0 0 44px; width:44px; height:44px; padding:4px; background:#fff!important; color:#4e5a43!important; }
.personnel-audio-play svg { display:block; width:36px; height:36px; }
.personnel-audio-play circle { opacity:.75; transition:opacity .2s; }
.personnel-audio-play:hover,.personnel-audio-play[aria-pressed=true] { color:var(--charcoal-deep)!important; }
.personnel-audio-play:hover circle,.personnel-audio-play[aria-pressed=true] circle { opacity:1; }
.personnel-audio-language { display:flex; flex-direction:column; justify-content:center; align-self:stretch; flex:1; min-width:0; gap:4px; padding-left:7px; }
.personnel-audio-language>span:first-child { font:600 7px/1 var(--font-mono,monospace); letter-spacing:.08em; color:#59634d; white-space:nowrap; }
.personnel-audio-select-wrap { display:block; position:relative; min-width:0; }
.personnel-audio-select-wrap select { display:block; width:100%; max-width:100%; min-width:0; height:22px; padding:2px 21px 2px 8px; border:0; border-left:2px solid var(--accent); border-radius:0; appearance:none; -webkit-appearance:none; background:#fff; color:var(--charcoal-deep); font:11px/1.4 var(--font-display,sans-serif); cursor:pointer; }
.personnel-audio-select-wrap select:hover { background:#f4f6f0; }
.personnel-audio-select-wrap option { color:var(--charcoal-deep); background:#fff; }
.personnel-audio-select-arrow { position:absolute; top:50%; right:5px; transform:translateY(-50%); color:#59634d; pointer-events:none; }
.personnel-audio-waveform { display:flex; align-items:flex-end; justify-content:space-between; flex:0 1 140px; width:140px; min-width:64px; height:24px; }
.personnel-audio-waveform>span { flex:0 0 2px; width:2px; height:3px; background:#7d8b6d; transform-origin:50% 100%; }
.personnel-audio.is-playing .personnel-audio-waveform>span { height:24px; background:linear-gradient(0deg,#647447,var(--accent) 65%,#f4f8e9); animation:personnel-audio-pulse .9s ease-in-out infinite; }
.personnel-audio.is-playing .personnel-audio-waveform>span:nth-child(3n) { animation-duration:.73s; }
.personnel-audio.is-playing .personnel-audio-waveform>span:nth-child(4n) { animation-duration:1.07s; }
.personnel-audio.is-playing .personnel-audio-waveform>span:nth-child(6n+1) { animation-delay:-.12s; }
.personnel-audio.is-playing .personnel-audio-waveform>span:nth-child(6n+2) { animation-delay:-.39s; }
.personnel-audio.is-playing .personnel-audio-waveform>span:nth-child(6n+3) { animation-delay:-.65s; }
.personnel-audio.is-playing .personnel-audio-waveform>span:nth-child(6n+4) { animation-delay:-.23s; }
.personnel-audio.is-playing .personnel-audio-waveform>span:nth-child(6n+5) { animation-delay:-.51s; }
.personnel-audio.is-playing .personnel-audio-waveform>span:nth-child(6n) { animation-delay:-.81s; }
@keyframes personnel-audio-pulse { 0%,100% { transform:scaleY(.125); } 25% { transform:scaleY(.45); } 50% { transform:scaleY(1); } 75% { transform:scaleY(.3); } }
.personnel-audio-text-only { font-size:10px; line-height:1.8; margin-top:12px; color:#6f7e60; }
.personnel-media-error { color:#9c543c; font-size:11px; line-height:1.8; margin-top:12px; }
.personnel-combat-gallery { display:flex; flex-wrap:wrap; align-items:start; gap:16px; margin:0 0 24px; }
.personnel-combat-image { flex:0 1 150px; min-width:0; margin:0; }
.personnel-combat-image>button { display:flex; align-items:center; justify-content:center; position:relative; width:100%; height:142px; padding:18px; border:1px solid #cbd4c1!important; background:linear-gradient(135deg,#edf1e7,#dce3d3)!important; }
.personnel-combat-image>button:hover { border-color:#9aaf54!important; box-shadow:inset 0 -2px var(--accent); }
.personnel-combat-image>button:disabled { cursor:default; }
.personnel-combat-image img { display:block; min-width:0; min-height:0; width:100%; height:100%; object-fit:contain; }
.personnel-combat-image button>span { display:grid; place-items:center; position:absolute; right:5px; bottom:5px; width:23px; height:23px; background:rgb(var(--charcoal-rgb) / 0.850980392); color:#eaf0df; }
.personnel-combat-image figcaption { padding:9px 0 0; font-size:11px; line-height:1.7; color:#536442; overflow-wrap:anywhere; }
.personnel-combat-image figcaption strong { display:block; font-weight:500; }
.personnel-combat-image figcaption a { display:inline-flex; align-items:center; gap:5px; margin-top:3px; color:var(--personnel-quiet); font-size:9px; text-decoration:underline; text-underline-offset:3px; }
.personnel-combat-image.is-module,.personnel-combat-image.is-summon { flex-basis:100%; }
.personnel-combat-image.is-module>button,.personnel-combat-image.is-summon>button { height:280px; padding:22px; }
.personnel-combat-image.is-portrait { flex-basis:200px; }
.personnel-combat-image.is-portrait>button { height:220px; padding:0; }
.personnel-art-preview { margin:0 0 24px; }
.personnel-art-preview>button { width:100%; position:relative; display:block; background:radial-gradient(ellipse at 50% 40%,#fcfff7,#dce4d0 80%)!important; border:1px solid #d7e1ca!important; }
.personnel-art-preview>button>img { width:100%; height:min(450px,55svh); min-height:240px; object-fit:contain; }
.personnel-art-preview.is-animated>.personnel-animation-expand { display:flex; align-items:center; justify-content:center; gap:7px; padding:10px 14px; min-height:38px; margin-top:8px; background:var(--charcoal)!important; border-left:3px solid var(--accent)!important; color:#eaece8; font-size:11px; }
.personnel-art-preview figcaption small { display:block; margin-top:3px; font-size:9px; color:var(--personnel-quiet); }
.personnel-art-preview>button>span { display:flex; align-items:center; gap:6px; position:absolute; right:12px; bottom:11px; padding:7px 10px; background:rgb(var(--charcoal-rgb) / 0.866666667); color:#eff6df; font-size:10px; }
.personnel-art-preview figcaption { font-size:9px; color:var(--personnel-quiet); line-height:1.8; margin-top:9px; }
.personnel-notice { position:fixed; bottom:50px; left:50%; transform:translateX(-50%); z-index:45; max-width:calc(100vw - 32px); width:max-content; display:flex; align-items:center; gap:12px; padding:14px 18px; background:#f4f7ed; box-shadow:-3px 0 var(--accent),0 8px 28px #28301d33; border:1px solid #a9be8a; font-size:12px; line-height:1.6; color:#526b35; }
.personnel-notice button { display:grid; place-items:center; padding:3px; }
.personnel-image-dialog { position:fixed; inset:0; padding:18px; margin:auto; width:min(1050px,calc(100vw - 32px)); max-height:calc(100svh - 32px); border:1px solid #f6fff1; border-bottom:3px solid var(--accent); background:#e5ebdf; color:var(--charcoal); box-shadow:2px 0 rgb(var(--iris-rgb) / 0.458823529),0 25px 90px #0a100b70; overflow:auto; }
.personnel-image-dialog::backdrop { background:#242b20bb; backdrop-filter:blur(8px); }
.personnel-image-dialog header { display:flex; justify-content:space-between; align-items:center; gap:20px; }
.personnel-image-dialog h2 { font-size:15px; font-weight:500; }
.personnel-image-dialog header button { display:grid; place-items:center; width:34px; height:34px; padding:0; color:#576c3e; }
.personnel-image-dialog>img { display:block; width:100%; height:calc(100svh - 165px); min-height:160px; object-fit:contain; }
.personnel-image-dialog>p { text-align:center; color:#6d7d5b; font-size:11px; line-height:1.8; padding-top:8px; }
@media(min-width:1600px) {
  .personnel-layout { gap:33px; }
  .personnel-reader { padding:30px 35px; }
  .personnel-prose { font-size:14px; }
}
@media(max-width:1100px) and (min-width:800px) {
  .personnel-page { padding-inline:2.4%; }
  .personnel-layout { grid-template-columns:245px minmax(0,1fr); gap:17px; }
  .personnel-version-switch { padding-inline:7px; gap:5px; }
  .personnel-version-switch button { padding-inline:7px; }
  .personnel-name { padding:20px 19px 15px; }
  .personnel-name h2 { font-size:25px; }
  .personnel-reader { padding:20px 18px; }
  .personnel-reader-heading h3 { font-size:21px; }
  .personnel-facts:not(.is-basic)>div { display:block; }
  .personnel-facts:not(.is-basic) dt { margin-bottom:4px; }
  .personnel-section-heading>div>span:last-child:not(:first-child) { display:none; }
}
@media(max-width:799px) {
  .personnel-page { padding:22px 5% 30px; }
  .personnel-page-heading { padding-bottom:20px; align-items:center; }
  .personnel-overline { font-size:7px; letter-spacing:.09em; }
  .personnel-page-heading h1 { margin-top:8px; font-size:23px; gap:12px; }
  .personnel-page-heading h1 span { font-size:8px; }
  .personnel-page-heading>p { font-size:0; gap:5px; align-self:end; padding-bottom:5px; }
  .personnel-page-heading>p>span { width:4px; height:4px; }
  .personnel-page-heading>p small { font-size:7px; margin-left:0; white-space:nowrap; }
  .personnel-layout { display:flex; flex-direction:column; gap:22px; }
  .personnel-identity { position:static; width:100%; display:grid; grid-template-columns:minmax(0,1fr) auto; }
  .personnel-version-switch { grid-column:1/-1; }
  .personnel-name { padding:17px 17px 14px; border-bottom:0; }
  .personnel-identity-label { font-size:7px; }
  .personnel-name h2 { font-size:24px; margin-top:6px; }
  .personnel-name>p { font-size:8px; margin-top:5px; letter-spacing:.13em; }
  .personnel-subtitle { font-size:9px; margin-top:9px; }
  .personnel-portrait-toggle { display:flex; align-items:center; align-self:start; gap:5px; margin:17px 13px 0 0; padding:7px 0; color:var(--accent)!important; font-size:9px; border-bottom:1px solid rgb(var(--accent-rgb) / 0.31372549)!important; }
  .personnel-portrait-toggle>svg:first-child { display:none; }
  .personnel-portrait-toggle[aria-expanded=true]>svg:last-child { transform:rotate(180deg); }
  .personnel-portrait { display:none; grid-column:1/-1; height:350px; }
  .personnel-portrait.is-open { display:block; }
  .personnel-portrait-number { font-size:150px; }
  .personnel-facts-fade { grid-column:1/-1; }
  .personnel-identity-facts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); padding:0 17px 14px; gap:0 20px; }
  .personnel-identity-facts>div { font-size:9px; padding:8px 0; gap:6px; }
  .personnel-identity-facts>div:nth-child(n+3) { display:none; }
  .personnel-identity-foot { display:none; }
  .personnel-workspace { width:100%; }
  .personnel-tabs { display:flex; overflow-x:auto; min-height:61px; scrollbar-width:thin; scrollbar-color:#78885b var(--charcoal); scroll-snap-type:x proximity; }
  .personnel-tabs button { flex:0 0 90px; min-height:59px; padding:10px 7px; scroll-snap-align:start; }
  .personnel-tabs button span { font-size:11px; }
  .personnel-tabs button small { font-size:6px; }
  .personnel-section-heading { padding:18px 0 12px; gap:8px; }
  .personnel-section-heading>div { gap:8px; }
  .personnel-section-heading h2 { font-size:15px; }
  .personnel-section-heading>div>span:last-child:not(:first-child) { display:none; }
  .personnel-section-heading>span { gap:8px; font-size:9px; }
  .personnel-content { display:block; }
  .personnel-stream { gap:16px; }
  .personnel-basic-sheet { gap:0; }
  .personnel-combat-gallery { gap:12px; }
  .personnel-combat-image { flex-basis:calc((100% - 12px)/2); }
  .personnel-combat-image.is-module>button,.personnel-combat-image.is-summon>button { height:230px; padding:16px; }
  .personnel-reader { width:100%; padding:21px 20px; }
  .personnel-reader-heading { padding-bottom:17px; margin-bottom:18px; }
  .personnel-reader-heading h3 { font-size:24px; }
  .personnel-reader-meta { font-size:7px; }
  .personnel-prose { font-size:13px; line-height:2; }
  .personnel-facts:not(.is-basic)>div { grid-template-columns:80px minmax(0,1fr); gap:12px; }
  .personnel-facts.is-basic { column-gap:17px; }
  .personnel-facts.is-basic dd { font-size:12px; }
  .personnel-workspace-footer { flex-wrap:wrap; gap:9px; padding-top:18px; }
  .personnel-workspace-footer>span { font-size:6px; }
  .personnel-workspace-footer a { font-size:9px; }
  .personnel-empty { width:100%; min-height:210px; }
  .personnel-notice { font-size:11px; padding:12px 14px; gap:9px; }
  .personnel-image-dialog { padding:12px; width:calc(100vw - 20px); }
}
@media(max-width:480px) {
  .personnel-audio-controls { gap:12px 10px; }
  .personnel-audio-player { flex:1 1 195px; width:auto; }
  .personnel-audio-waveform { flex-basis:90px; width:90px; }
}
@media(max-width:360px) {
  .personnel-page { padding-inline:4%; }
  .personnel-page-heading>p { display:none; }
  .personnel-name { padding-left:14px; }
  .personnel-name h2 { font-size:21px; }
  .personnel-portrait-toggle { margin-right:10px; font-size:8px; }
  .personnel-identity-facts { padding-inline:14px; gap:0 12px; }
  .personnel-reader { padding:19px 15px; }
  .personnel-audio-controls { gap:10px 10px; }
  .personnel-audio-player { flex-basis:172px; }
  .personnel-audio-language { padding-left:4px; }
  .personnel-audio-waveform { flex-basis:64px; width:64px; }
}
@media(prefers-reduced-motion:reduce) {
  .personnel-page *,.personnel-page *::before,.personnel-page *::after { scroll-behavior:auto!important; transition:none!important; animation:none!important; }
  .personnel-audio.is-playing .personnel-audio-waveform>span { height:3px; transform:none; }
}
/* Local Spine player; keep selectors isolated from other site images and controls. */
.personnel-animation { position:relative; width:100%; min-width:0; border:1px solid #d7e1ca; background:#e6ecdf; }
.personnel-animation-stage { position:relative; height:min(450px,55svh); min-height:240px; overflow:hidden; background:radial-gradient(ellipse at 50% 40%,#fcfff7,#dce4d0 80%); }
.personnel-animation-stage.has-scene { background:#e3e6e2; }
.personnel-animation .personnel-animation-background { position:absolute; top:50%; left:50%; width:var(--personnel-scene-size,100%); height:var(--personnel-scene-size,100%); max-width:none; transform:translate(-50%,-50%); object-fit:contain; opacity:0; pointer-events:none; }
.personnel-animation[data-animation-state="playing"] .personnel-animation-background,
.personnel-animation[data-animation-state="paused"] .personnel-animation-background { opacity:1; }
.personnel-animation .personnel-animation-background-error { margin:0; padding:7px 12px; color:#76532a; background:#fff7e8; font-size:11px; line-height:1.7; }
.personnel-animation .personnel-animation-poster,
.personnel-animation .personnel-animation-canvas { position:absolute; inset:0; display:block; width:100%; height:100%; min-height:0; object-fit:contain; }
.personnel-animation .personnel-animation-canvas { opacity:0; pointer-events:none; }
.personnel-animation[data-animation-state="playing"] .personnel-animation-canvas,
.personnel-animation[data-animation-state="paused"] .personnel-animation-canvas { opacity:1; }
.personnel-animation[data-animation-state="playing"] .personnel-animation-poster,
.personnel-animation[data-animation-state="paused"] .personnel-animation-poster { visibility:hidden; }
.personnel-animation-label { position:absolute; top:12px; left:12px; padding:5px 7px; border-left:2px solid var(--accent); background:rgb(var(--charcoal-rgb) / 0.788235294); color:#f3f6eb; font:9px/1.3 monospace; letter-spacing:.08em; pointer-events:none; }
.personnel-animation-controls { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:46px; padding:7px 12px; border-top:1px solid #cdd5c3; background:#eff3e9; }
.personnel-animation .personnel-animation-controls>p { margin:0; color:#5c6556; font-size:11px; line-height:1.7; }
.personnel-animation .personnel-animation-controls>button { display:inline-flex; align-items:center; justify-content:center; gap:7px; flex:0 0 auto; position:relative; min-height:36px; padding:7px 12px; border:1px solid #3c4335; border-left:3px solid var(--accent); border-radius:0; background:var(--charcoal); color:#f2f6e8; font-size:11px; line-height:1.3; cursor:pointer; }
.personnel-animation .personnel-animation-controls>button>span { display:inline; position:static; padding:0; background:none; color:inherit; font-size:12px; }
.personnel-animation .personnel-animation-controls>button::before,
.personnel-animation .personnel-animation-controls>button::after { content:none!important; }
.personnel-animation .personnel-animation-controls>button:hover { background:var(--accent); color:var(--charcoal-deep); }
.personnel-animation .personnel-animation-controls>button:focus-visible { outline:3px solid var(--iris); outline-offset:3px; }
.personnel-animation.is-expanded .personnel-animation-stage { height:min(72svh,850px); min-height:240px; }
@media (max-width:540px) {
  .personnel-animation-stage { height:min(420px,58svh); }
  .personnel-animation-controls { gap:7px; padding:7px 9px; }
  .personnel-animation .personnel-animation-controls>p { font-size:10px; }
  .personnel-animation.is-expanded .personnel-animation-stage { height:65svh; min-height:220px; }
}
/* Complementary page reveal: content stays fixed; only its visible width changes.
   The outgoing visual has no duplicate React mounts, events or media playback. */
.page-transition {
  position: fixed;
  inset: 0;
  z-index: 100;
  overflow: hidden;
  clip-path: inset(var(--transition-top, 0px) 0 0);
  pointer-events: none;
  isolation: isolate;
  contain: strict;
}
.page-transition-visual,
.page-transition-frame,
.page-transition-frozen {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.page-transition-visual { will-change: clip-path; }
.page-transition-frozen { clip-path: inset(var(--transition-top, 0px) 0 0); }
.page-transition .site-header { visibility: hidden; }
.page-transition *, .page-transition *::before, .page-transition *::after {
  pointer-events: none !important;
  animation: none !important;
  transition: none !important;
}
@media (prefers-reduced-motion: reduce) { .page-transition { display: none; } }
/* Original Novecento Wide / Bender binaries; see docs/typography.md.
   The numeral-only face keeps mixed Chinese text in Noto Sans SC. */
:root {
  --font-display: 'Bender Numerals', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-sans: var(--font-display);
  /* Legacy theme selectors keep their geometry while using the same Arknights font system. */
  --font-serif: var(--font-display);
  --font-english: 'Bender Numerals', 'Novecento Wide', 'Noto Sans SC', sans-serif;
  --font-mono: 'Bender', 'Noto Sans SC', sans-serif;
}

body { font-weight: 400; }

/* Light Chinese display type against firm, wide uppercase English. */
.page-home .hero h1 { font-weight: 350; }
.personnel-page-heading h1,
.personnel-name h2,
.resource-library .library-heading h1,
.resource-manager .manager-heading h1,
.about-page h1,
.page-chat .chat-heading h1 { font-weight: 400; }

.page-chat .state-heading h2,
.resource-library .library-section-heading h2,
.personnel-reader h3 { font-weight: 500; }

.site .site-header .nav-link > span { font-weight: 500; }
/* The inert transition copy deliberately drops data-site-root. Use shared
   structural classes so outgoing headings keep exactly the same fonts. */
.site .main-content :is(h1, h2, h3),
.site .dialog :is(h1, h2, h3),
.site .eyebrow,
.personnel-overline,
.personnel-page-heading h1 span,
.site .site-header .nav-link small,
.personnel-version-english,
.personnel-tabs button small,
.personnel-name > p,
.page-home .hero-roman,
.page-home .hero-outline {
  font-family: var(--font-english);
  font-stretch: normal;
  font-synthesis: none;
}
.site .site-header .nav-link small,
.personnel-version-english,
.personnel-tabs button small { font-weight: 700; }
.page-home .hero-roman { font-weight: 700; letter-spacing: .2em; }
.page-home .hero-outline { font-weight: 700; }

/* Numerical indices retain proportional UI geometry, with aligned digits. */
.library-count b,
.resource-row-index,
.personnel-section-number,
.personnel-portrait-number,
.personnel-reader-meta,
.scene-time,
time,
.count {
  font-family: var(--font-mono);
  font-variant-numeric: lining-nums tabular-nums;
}
.personnel-animation-label { font-family: var(--font-mono); }

/* Never shrink full Chinese names or change navigation hit areas. */
.personnel-version-name { font-family: var(--font-display); }

/* Legacy decorative labels must not reintroduce Georgia or a system serif. */
.wordmark, .archive-watermark, .profile-roman, .profile-art-word,
.profile-art-stage > span, .about-mark, .resource-library .ep-card h2 {
  font-family: var(--font-english);
  font-synthesis: none;
}
.archive-number, .profile-chapters button small, .profile-story-row > span,
.profile-record-list > button > span, .library-section-heading h2 span,
.library-count b, .personnel-identity-foot > span {
  font-family: var(--font-mono);
}
/* Phone layout density: reclaim space, without scaling the interface or
   changing desktop geometry, navigation state, or scroll containers. */
@media (max-width: 799px) {
  .site {
    --site-header-height: 60px;
    --nav-gutter: 12px;
  }
  .site .site-header nav { height: 48px; gap: 6px; }
  .site .site-header .nav-link { gap: 3px; padding: 5px 2px 6px; }
  .site .site-header .nav-link > span { font-size: 13px; }
  .site .site-header .nav-link small { font-size: 7px; letter-spacing: .06em; }
  .site .site-footer { padding-inline: 12px; min-height: 30px; gap: 8px; }

  .page-home { --home-footer: 30px; }
  .page-home .hero-copy { padding: 10px 12px 10px 0; }
  .page-home .elite-switcher { right: 12px; }

  .page-chat { --chat-footer: 30px; }
  .page-chat .chat-layout,
  .page-chat .chat-layout.state-collapsed {
    padding: 0 12px;
    min-height: calc(100svh - var(--site-header-height) - var(--chat-footer));
  }
  .page-chat .chat-layout::before { left: 12px; }
  .page-chat .conversation,
  .page-chat .state-collapsed .conversation {
    padding: 12px 0 0;
    min-height: calc(100svh - var(--site-header-height) - var(--chat-footer));
    border-inline: 0;
  }
  .page-chat .chat-heading,
  .page-chat .state-collapsed .chat-heading {
    min-height: 52px;
    padding-bottom: 8px;
    gap: 8px;
    flex-wrap: nowrap;
  }
  .page-chat .chat-heading h1 { font-size: 22px; letter-spacing: 0; }
  .page-chat .chat-heading::before { content: none; }
  .page-chat .chat-heading::after,
  .page-chat .composer-area::before { content: none; }
  .page-chat .session-tools,
  .page-chat .state-collapsed .session-tools { gap: 4px; flex-shrink: 0; }
  .page-chat .session-tools .small-button,
  .page-chat .session-tools .small-button:nth-child(2) {
    width: 40px;
    min-width: 40px;
    min-height: 44px;
    padding: 10px !important;
  }
  .page-chat .conversation-toolbar { padding: 0; min-height: 44px; gap: 6px; }
  .page-chat .conversation-toolbar > div { gap: 10px; }
  .page-chat .conversation-toolbar .text-button,
  .page-chat .conversation-toolbar .state-toggle > span { font-size: 11px; }
  .page-chat .conversation-toolbar .text-button { min-height: 44px; gap: 4px; }
  .page-chat .messages { min-height: 0; padding: 8px 0; }
  .page-chat .message { gap: 8px; margin-bottom: 16px; }
  .page-chat .reference-avatar { --avatar-size: 34px; margin-top: 1px; }
  .page-chat .message-content { max-width: calc(100% - 42px); }
  .page-chat .message-name { font-size: 12px; margin-bottom: 4px; }
  .page-chat .message-bubble { font-size: 15px; line-height: 1.65; padding: 9px 11px; }
  .page-chat .message-bubble .action-text { font-size: 14px; line-height: 1.65; margin-bottom: 5px; }
  .page-chat .message-references { padding-top: 4px; gap: 0 12px; }
  .page-chat .message-references a { min-height: 40px; font-size: 11px; line-height: 1.5; }
  .page-chat .opening-hint { margin: 16px 0 4px 42px; gap: 8px; }
  .page-chat .opening-hint .text-button { min-height: 44px; }
  .page-chat .reply-pending { margin-left: 42px; }
  .page-chat .composer-area { padding: 9px 0 10px; }
  /* Keep both controls in one equal-height row, including the longer busy labels. */
  .page-chat .composer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 88px;
    align-items: stretch;
    gap: 8px;
  }
  /* 16px inputs avoid the automatic zoom in mobile Safari. */
  .page-chat .composer textarea { min-width: 0; height: 48px; min-height: 48px; max-height: 160px; margin: 0; padding: 10px; font-size: 16px; line-height: 1.5; }
  .page-chat .send-button { width: 100%; min-width: 0; height: 100%; min-height: 48px; margin: 0; padding: 10px; font-size: 15px; gap: 6px; }
  .page-chat .composer-meta { padding-top: 5px; font-size: 10px; }
  .page-chat .composer-notes { gap: 3px; margin-top: 5px; }
  .page-chat .service-strip,
  .page-chat .chat-privacy { font-size: 11px; line-height: 1.55; }
  .page-chat .character-state { margin: 10px 0 0; padding: 12px; }
  .page-chat .state-heading { margin-bottom: 10px; gap: 4px 10px; }
  .page-chat .state-heading h2 { font-size: 20px; }
  .page-chat .state-heading::after { content: none; }
  .page-chat .state-cards { gap: 8px; }
  .page-chat .state-card { padding: 10px; }
  .page-chat .state-card h3 { font-size: 12px; margin-bottom: 5px; }
  .page-chat .state-card h3::after { content: none; }
  .page-chat .state-card p { font-size: 14px; line-height: 1.55; }
  .page-chat .state-footnote { margin-top: 8px; font-size: 10px; }

  .site .dialog-body { padding: 18px 16px; }
  .site .dialog-top { margin-bottom: 12px; }
  .site .dialog-top h2 { font-size: 24px; }
  .site .dialog-description { margin-bottom: 14px; font-size: 12px; }
  .site .scene-card { padding: 13px 12px !important; }
  .site .scene-title { font-size: 14px; }
  .site .scene-description { font-size: 12px; }
  .site .scene-time { margin-top: 10px; font-size: 10px; }
  .site .dialog-actions .button { min-height: 44px; }
  .site .custom-fields input,
  .site .custom-fields textarea { font-size: 16px; }
}

@media (max-width: 359px) {
  .site { --nav-gutter: 10px; }
  .site .site-header nav { gap: 4px; }
  .site .site-header .nav-link > span { font-size: 12px; }
  .page-chat .chat-layout,
  .page-chat .chat-layout.state-collapsed { padding-inline: 10px; }
  .page-chat .chat-layout::before { left: 10px; }
  .page-chat .chat-heading h1 { font-size: 20px; }
  .page-chat .conversation-toolbar > div { gap: 6px; }
  .page-chat .conversation-toolbar .text-button,
  .page-chat .conversation-toolbar .state-toggle > span { font-size: 10px; }
}
/* Phone reading density. Public library/about only; desktop and owner data
   remain unchanged. Existing previews and descriptions keep their behavior. */
@media (max-width: 799px) {
  .resource-library,
  .about-page {
    padding: 20px 12px 28px;
  }
  .resource-library { padding-top: 12px; }

  .resource-library .library-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px 8px;
    align-items: center;
    margin-bottom: 8px;
  }
  .resource-library .library-heading > div:first-child { display: contents; }
  .resource-library .library-heading .eyebrow {
    display: none;
  }
  .resource-library .library-heading h1 {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    margin: 0;
    font-size: 26px;
    letter-spacing: .04em;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
  }
  .resource-library .library-heading p {
    grid-column: 1 / -1;
    grid-row: 2;
    margin: 2px 0 0;
    padding-left: 6px;
    font-size: 12px;
    line-height: 1.45;
    letter-spacing: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
  }
  .resource-library .library-heading-side {
    grid-column: 2;
    grid-row: 1;
    flex-direction: row;
    align-items: center;
    padding: 0;
    gap: 8px;
  }
  .resource-library .library-count {
    flex-direction: row;
    align-items: baseline;
    gap: 3px;
    font-size: 9px;
    letter-spacing: 0;
  }
  .resource-library .library-count b { font-size: 20px; line-height: 1; }
  .resource-library .library-heading-side .text-button {
    min-height: 40px;
    font-size: 10px;
    gap: 4px;
    white-space: nowrap;
  }
  .resource-library .library-heading-side .text-button svg { width: 13px; height: 13px; }
  .resource-library .library-heading-side .text-button svg:last-child { display: none; }

  .resource-library .library-featured {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 16px 0 22px;
  }
  .resource-library .ep-card { grid-template-columns: minmax(0, 1fr); }
  .resource-library .ep-card .resource-cover {
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 12 / 5;
  }
  .resource-library .ep-card-body { padding: 9px 8px 8px; }
  .resource-library .ep-card .resource-index { font-size: 9px; line-height: 1.5; letter-spacing: .02em; }
  .resource-library .ep-card h2 { font-size: 22px; line-height: 1.25; margin: 7px 0; }
  .resource-library .ep-card p { font-size: 12px; line-height: 1.5; -webkit-line-clamp: 1; }
  .resource-library .ep-meta {
    display: flex;
    margin-top: 5px;
    gap: 4px 8px;
    font-size: 10px;
    line-height: 1.4;
    letter-spacing: .02em;
  }
  .resource-library .ep-actions { padding-top: 6px; gap: 4px; }
  .resource-library .resource-play {
    min-height: 40px;
    padding: 8px 10px !important;
    gap: 6px;
    font-size: 12px;
  }
  .resource-library .resource-source {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 40px;
    min-height: 40px;
    padding: 8px;
  }

  .resource-library .library-section-heading {
    display: grid;
    grid-template-columns: minmax(110px, .8fr) minmax(150px, 1fr);
    align-items: end;
    gap: 8px;
  }
  .resource-library .library-section-heading .eyebrow { display: none; }
  .resource-library .library-section-heading h2 { margin-top: 0; font-size: 18px; line-height: 1.35; letter-spacing: 0; }
  .resource-library .library-section-heading h2 span { font-size: 13px; margin-left: 6px; }
  .resource-library .library-search { width: 100%; min-width: 0; min-height: 40px; padding: 4px 0; gap: 6px; }
  .resource-library .library-search > svg { flex-shrink: 0; }
  .resource-library .library-search input { font-size: 16px; }
  .resource-library .library-search input::placeholder { font-size: 12px; }
  .resource-library .library-search button { min-width: 40px; min-height: 40px; margin: -5px 0; }
  .resource-library .library-categories {
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    gap: 5px;
    padding: 2px 1px 8px;
    margin: 12px 0 0;
    scrollbar-width: thin;
    scrollbar-color: #8b957e transparent;
  }
  .resource-library .library-categories button {
    flex-shrink: 0;
    min-height: 44px;
    padding: 8px 10px !important;
    font-size: 12px;
    white-space: nowrap;
  }
  .resource-library .library-categories small { font-size: 10px; margin-left: 5px; }

  .resource-library .resource-rows { display: grid; gap: 6px; padding-top: 6px; }
  .resource-library .resource-rows .resource-item {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    align-items: start;
    column-gap: 8px;
    row-gap: 4px;
    padding: 8px;
  }
  .resource-library .resource-rows .resource-item .resource-cover,
  .resource-library .resource-rows .resource-item:is(.resource-type-image, .resource-type-merch) .resource-cover {
    grid-column: 1;
    grid-row: 1 / span 2;
    width: 64px;
    height: 76px;
    aspect-ratio: auto;
  }
  .resource-library .resource-rows .resource-item-info { grid-column: 2; }
  .resource-library .resource-item h3 { margin: 4px 0; font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .resource-library .resource-category { font-size: 10px; letter-spacing: .02em; }
  .resource-library .resource-item-info > p { font-size: 12px; line-height: 1.5; -webkit-line-clamp: 1; }
  .resource-library .resource-details { margin-top: 4px; gap: 1px 6px; font-size: 10px; line-height: 1.4; letter-spacing: 0; }
  .resource-library .resource-details > span { overflow-wrap: anywhere; }
  .resource-library .resource-details > span:first-child { flex-basis: 100%; min-width: 0; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .resource-library .resource-rows .resource-item-actions {
    grid-column: 2;
    width: auto;
    min-width: 0;
    padding: 0;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 8px;
  }
  .resource-library .resource-item-actions > a:not(.resource-play) {
    min-height: 40px;
    font-size: 11px;
    line-height: 1.5;
  }

  .resource-library .resource-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding-top: 6px;
    align-items: start;
  }
  .resource-library .resource-grid .resource-item { min-width: 0; }
  .resource-library .resource-grid .resource-item .resource-cover,
  .resource-library .resource-grid .resource-item:is(.resource-type-image, .resource-type-merch) .resource-cover { width: 100%; height: auto; aspect-ratio: 3 / 2; }
  .resource-library .resource-grid .resource-item-info { width: 100%; max-width: 100%; padding: 8px 8px 0; }
  .resource-library .resource-grid .resource-item h3 { font-size: 14px; }
  .resource-library .resource-grid .resource-item-actions {
    padding: 6px 8px 8px;
    min-width: 0;
    gap: 4px;
    align-items: stretch;
  }
  .resource-library .resource-grid .resource-play { width: 100%; justify-content: center; white-space: normal; }
  .resource-library .resource-cover-hint { right: 4px; bottom: 4px; font-size: 10px; padding: 5px; gap: 3px; }
  .resource-library .resource-rows .resource-cover-hint { right: 3px; bottom: 3px; font-size: 9px; padding: 3px; gap: 2px; }
  .resource-library .resource-rows .resource-cover-hint svg { display: none; }
  .resource-library .resource-rows .resource-cover-fallback { gap: 4px; }
  .resource-library .resource-rows .resource-cover-fallback svg { width: 24px; height: 24px; }
  .resource-library .resource-rows .resource-cover-fallback span { font-size: 8px; letter-spacing: 0; }
  .resource-library .library-pagination { padding-top: 16px; gap: 12px; }
  .resource-library .library-pagination .button { min-height: 44px; }
  .resource-library .library-footnote { margin-top: 24px; padding-top: 16px; gap: 10px; }
  .resource-library .library-footnote > svg { flex-shrink: 0; }
  .resource-library .library-footnote > p { font-size: 12px; }
  .resource-library .library-footnote small { font-size: 10px; line-height: 1.65; }
  .resource-library .library-empty { padding: 36px 14px; }
  .resource-library .library-empty .text-button { min-height: 44px; }

  .resource-library .library-image-heading { padding: 10px 12px; gap: 10px; }
  .resource-library .library-image-heading h2 { margin: 3px 0; font-size: 15px; }
  .resource-library .library-image-close { width: 44px; height: 44px; }
  .resource-library .library-image-toolbar { padding: 6px 10px; gap: 6px; }
  .resource-library .library-image-toolbar button { min-height: 40px; font-size: 11px; }
  .resource-library .library-image-footer { padding: 8px 12px; gap: 10px; align-items: center; }
  .resource-library .library-image-footer .text-button { min-height: 44px; }
  .resource-library .library-player { padding: 16px; }
  .resource-library .player-top { margin-bottom: 12px; }
  .resource-library .player-top button { min-width: 44px; min-height: 44px; }
  .resource-library .player-cover { max-width: 132px; margin-bottom: 16px; }
  .resource-library .library-player > .text-button { min-height: 44px; }

  .about-page .about-heading { margin-bottom: 16px; gap: 12px; }
  .about-page .about-heading h1 { margin-top: 6px; font-size: 28px; line-height: 1.35; }
  .about-page .about-heading > div > p { margin-top: 6px; font-size: 12px; line-height: 1.65; letter-spacing: 0; }
  .about-page .about-grid { gap: 12px; }
  .about-page .about-grid > .about-card { padding: 16px; }
  .about-page .about-grid .section-index { font-size: 10px; line-height: 1.4; letter-spacing: .04em; }
  .about-page .about-grid h2 { margin: 8px 0 12px; font-size: 21px; line-height: 1.4; }
  .about-page .about-grid p { margin-bottom: 10px; font-size: 14px; line-height: 1.8; }
  .about-page .about-purpose .about-purpose-lead { margin: 12px 0; font-size: 21px; line-height: 1.6; }
  .about-page .about-purpose-mark { right: 12px; bottom: 8px; font-size: 140px; }
  .about-page .about-grid .about-email { min-height: 44px; margin: 0 0 12px; padding: 8px 0; font-size: 20px; }
  .about-page .about-data-note { margin-top: 12px; padding-top: 6px; }
  .about-page .about-data-note summary { min-height: 44px; padding: 10px 0; font-size: 14px; }
  .about-page .about-data-note[open] summary { margin-bottom: 6px; }
  .about-page .about-update-date { margin-bottom: 12px; }
  .about-page .about-update-list { font-size: 14px; line-height: 1.8; }
  .about-page .about-update-list li + li { margin-top: 8px; }
  .about-page .about-plan-list { margin-top: 14px; gap: 14px; }
  .about-page .about-plan-list li { padding-left: 10px; }
  .about-page .about-plan-list h3 { margin-bottom: 4px; }
}

/* A two-column gallery would squeeze Chinese titles below a comfortable
   measure at 320px. Keep its thumbnail, text and actions compact instead. */
@media (max-width: 359px) {
  .resource-library .library-section-heading { grid-template-columns: minmax(105px, .8fr) minmax(140px, 1fr); gap: 8px; }
  .resource-library .library-section-heading h2 { font-size: 18px; }
  .resource-library .resource-grid { grid-template-columns: minmax(0, 1fr); }
  .resource-library .resource-grid .resource-item {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 4px 8px;
    padding: 8px;
  }
  .resource-library .resource-grid .resource-item .resource-cover,
  .resource-library .resource-grid .resource-item:is(.resource-type-image, .resource-type-merch) .resource-cover {
    grid-column: 1;
    grid-row: 1 / span 2;
    width: 64px;
    height: 80px;
    aspect-ratio: auto;
  }
  .resource-library .resource-grid .resource-item-info { grid-column: 2; padding: 0; }
  .resource-library .resource-grid .resource-item h3 { font-size: 15px; }
  .resource-library .resource-grid .resource-item-actions { grid-column: 2; padding: 0; }
  .resource-library .resource-grid .resource-play { width: auto; align-self: start; }
  .resource-library .resource-grid .resource-cover-hint { right: 3px; bottom: 3px; font-size: 9px; padding: 3px; gap: 2px; }
  .resource-library .resource-grid .resource-cover-hint svg { display: none; }
  .resource-library .resource-grid .resource-cover-fallback { gap: 4px; }
  .resource-library .resource-grid .resource-cover-fallback svg { width: 24px; height: 24px; }
  .resource-library .resource-grid .resource-cover-fallback span { font-size: 8px; letter-spacing: 0; }
  .resource-library .ep-card-body { padding: 8px; }
  .resource-library .ep-card h2 { font-size: 18px; }
  .resource-library .ep-actions { flex-wrap: wrap; }
}
/* Mobile reading density only. Imported after the shared theme/typography.
   Keep the existing document flow, portrait toggle and 650ms version fade. */
@media (max-width: 799px) {
  .personnel-page {
    padding: 15px 12px 24px;
  }
  .personnel-page .personnel-page-heading {
    padding-bottom: 12px;
    gap: 10px;
  }
  .personnel-page .personnel-page-heading h1 {
    margin-top: 4px;
    font-size: 22px;
    gap: 9px;
  }
  .personnel-page .personnel-layout { gap: 12px; }
  .personnel-page .personnel-identity { grid-template-columns: minmax(0, 1fr) auto; }
  .personnel-page .personnel-version-switch {
    padding: 3px 9px 0;
    gap: 8px;
  }
  .personnel-page .personnel-version-switch button {
    min-height: 44px;
    height: 46px;
    padding: 5px 4px;
    gap: 2px;
  }
  .personnel-page .personnel-version-name { font-size: 13px; }
  .personnel-page .personnel-version-english { font-size: 8px; }
  .personnel-page .personnel-name { padding: 10px 12px 8px; }
  .personnel-page .personnel-identity-label { font-size: 7px; }
  .personnel-page .personnel-name h2 {
    margin-top: 3px;
    font-size: 22px;
    line-height: 1.25;
    letter-spacing: .01em;
  }
  .personnel-page .personnel-name > p {
    margin-top: 3px;
    font-size: 8px;
    letter-spacing: .08em;
  }
  .personnel-page .personnel-subtitle {
    margin-top: 5px;
    font-size: 11px;
    line-height: 1.45;
  }
  .personnel-page .personnel-portrait-toggle {
    min-height: 44px;
    margin: 6px 9px 0 0;
    padding: 7px 3px;
    gap: 3px;
    font-size: 11px;
  }
  .personnel-page .personnel-portrait { height: clamp(240px, 66vw, 290px); }
  .personnel-page .personnel-portrait-number { font-size: 120px; }
  .personnel-page .personnel-identity-facts {
    padding: 0 12px 7px;
    column-gap: 12px;
  }
  .personnel-page .personnel-identity-facts > div { padding: 5px 0; font-size: 11px; }
  .personnel-page .personnel-identity-facts dt { font-size: 10px; }
  .personnel-page .personnel-controls {
    padding: 0;
    margin: 0;
    position: relative;
  }
  .personnel-page .personnel-tabs {
    min-height: 50px;
    scroll-padding-inline: 3px;
  }
  .personnel-page .personnel-tabs button {
    flex-basis: 91px;
    min-height: 48px;
    padding: 7px 6px;
    gap: 4px;
  }
  .personnel-page .personnel-tabs button span { font-size: 13px; }
  .personnel-page .personnel-tabs button small { font-size: 7px; }
  .personnel-page .personnel-section-heading { padding: 12px 0 9px; }
  .personnel-page .personnel-section-number { width: 23px; height: 23px; }
  .personnel-page .personnel-section-heading h2 { font-size: 15px; }
  .personnel-page .personnel-section-heading > span { font-size: 11px; }
  .personnel-page .personnel-stream { gap: 12px; }
  .personnel-page .personnel-basic-sheet { gap: 0; }
  .personnel-page .personnel-reader { padding: 14px; }
  .personnel-page .personnel-reader-heading {
    padding-bottom: 10px;
    margin-bottom: 12px;
  }
  .personnel-page .personnel-reader-meta { font-size: 9px; line-height: 1.4; }
  .personnel-page .personnel-reader-heading h3 {
    margin-top: 5px;
    font-size: 20px;
    line-height: 1.35;
  }
  .personnel-page .personnel-reader-heading > p {
    margin-top: 4px;
    font-size: 11px;
    line-height: 1.6;
  }
  .personnel-page .personnel-basic-sheet .personnel-reader-heading {
    padding-bottom: 0;
    margin-bottom: 10px;
  }
  .personnel-page .personnel-basic-sheet > .personnel-reader + .personnel-reader { padding-top: 7px; }
  .personnel-page .personnel-basic-sheet .personnel-reader:not(:first-child) .personnel-reader-heading h3 { font-size: 18px; }
  .personnel-page .personnel-facts { margin-bottom: 14px; }
  .personnel-page .personnel-facts > div { padding: 7px 0; line-height: 1.65; }
  .personnel-page .personnel-facts dt { font-size: 11px; }
  .personnel-page .personnel-facts dd { font-size: 14px; }
  .personnel-page .personnel-facts.is-basic { column-gap: 14px; }
  .personnel-page .personnel-facts.is-basic > div { padding: 5px 0; }
  .personnel-page .personnel-facts.is-basic dt { font-size: 11px; margin-bottom: 2px; }
  .personnel-page .personnel-facts.is-basic dd { font-size: 14px; }
  .personnel-page .personnel-facts:not(.is-basic) > div { grid-template-columns: 70px minmax(0, 1fr); gap: 10px; }
  .personnel-page .personnel-prose {
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 12px;
  }
  .personnel-page .personnel-prose.is-transcript {
    font-size: 15px;
    line-height: 1.8;
    padding: 8px 0 8px 12px;
    margin-bottom: 0;
  }
  .personnel-page .personnel-audio { margin-bottom: 12px; }
  .personnel-page .personnel-audio-caption { margin-bottom: 6px; font-size: 11px; }
  .personnel-page .personnel-audio-controls { gap: 8px; }
  .personnel-page .personnel-audio-player { flex: 1 1 176px; width: auto; height: 48px; }
  .personnel-page .personnel-audio-language { padding-left: 4px; gap: 0; }
  /* The selectable language retains its accessible name. Drop only the
     repeated English ornament so the actual select has a full touch target. */
  .personnel-page .personnel-audio-language > span:first-child { display: none; }
  .personnel-page .personnel-audio-select-wrap select {
    height: 44px;
    padding-left: 6px;
    font-size: 16px;
  }
  .personnel-page .personnel-audio-waveform { flex: 0 0 64px; width: 64px; }
  .personnel-page .personnel-audio-text-only,
  .personnel-page .personnel-media-error { font-size: 12px; margin-top: 8px; }
  .personnel-page .personnel-combat-gallery { gap: 10px; margin-bottom: 14px; }
  .personnel-page .personnel-combat-image:not(.is-module):not(.is-summon) { flex-basis: calc((100% - 10px) / 2); }
  .personnel-page .personnel-combat-image > button { height: 116px; padding: 12px; }
  .personnel-page .personnel-combat-image.is-module > button,
  .personnel-page .personnel-combat-image.is-summon > button { height: 205px; padding: 12px; }
  .personnel-page .personnel-combat-image.is-portrait > button { height: 180px; padding: 0; }
  .personnel-page .personnel-combat-image figcaption { padding-top: 6px; font-size: 12px; line-height: 1.55; }
  .personnel-page .personnel-combat-image figcaption a { min-height: 44px; margin-top: 0; font-size: 11px; }
  .personnel-page .personnel-art-preview { margin-bottom: 14px; }
  .personnel-page .personnel-art-preview > button > img,
  .personnel-page .personnel-animation-stage { height: clamp(240px, 76vw, 340px); min-height: 240px; }
  .personnel-page .personnel-animation-controls { padding: 4px 8px; gap: 8px; }
  .personnel-page .personnel-animation .personnel-animation-controls > button { min-height: 44px; font-size: 12px; }
  .personnel-page .personnel-art-preview.is-animated > .personnel-animation-expand { min-height: 44px; margin-top: 5px; font-size: 12px; }
  .personnel-page .personnel-art-preview figcaption { font-size: 11px; margin-top: 6px; line-height: 1.6; }
  .personnel-page .personnel-stream-continuation { padding: 16px 0 6px; }
  .personnel-page .personnel-stream-more { min-height: 44px; }
  .personnel-page .personnel-stream-continuation p { margin-top: 8px; font-size: 11px; }
  .personnel-page .personnel-stream-end { padding: 16px 0 0; font-size: 11px; }
  .personnel-page .personnel-workspace-footer { padding-top: 10px; gap: 4px 10px; }
  .personnel-page .personnel-workspace-footer a { min-height: 44px; font-size: 12px; }
  .personnel-page .personnel-empty { min-height: 160px; padding: 24px 12px; }
  .personnel-page .personnel-empty p { font-size: 13px; }
  .personnel-page .personnel-notice { padding: 4px 10px; }
  .personnel-page .personnel-notice button { flex: 0 0 44px; width: 44px; height: 44px; }
  .personnel-image-dialog header { gap: 10px; }
  .personnel-image-dialog header button { flex: 0 0 44px; width: 44px; height: 44px; }
  .personnel-image-dialog .personnel-animation-controls > button { min-height: 44px; }
}

@media (max-width: 359px) {
  .personnel-page .personnel-name h2 { font-size: 20px; }
  .personnel-page .personnel-portrait-toggle { margin-right: 6px; padding-inline: 1px; font-size: 10px; }
  .personnel-page .personnel-identity-facts { column-gap: 8px; }
  .personnel-page .personnel-identity-facts > div { gap: 4px; font-size: 10px; }
  .personnel-page .personnel-identity-facts dt { font-size: 9px; }
  .personnel-page .personnel-facts:not(.is-basic) > div { grid-template-columns: 62px minmax(0, 1fr); gap: 8px; }
  .personnel-page .personnel-audio-waveform { display: none; }
}
/* Two levels of browsing; persisted resource categories remain owner editable. */
.resource-library .library-filter-panel { margin: 16px 0 20px; }
.resource-library .library-type-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}
.resource-library .library-type-tabs button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 0;
  min-height: 58px;
  padding: 12px 16px;
  border: 1px solid #c3c8bf;
  background: rgb(var(--glass-rgb) / 0.780392157);
  color: #4f584b;
  font-size: 14px;
  white-space: nowrap;
  transition: background-color 180ms, color 180ms, border-color 180ms;
}
.resource-library .library-type-tabs button::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 3px;
  background: transparent;
}
.resource-library .library-type-tabs button[aria-pressed="true"] {
  background: var(--charcoal);
  border-color: var(--charcoal);
  color: var(--glass);
}
.resource-library .library-type-tabs button[aria-pressed="true"]::after { background: var(--accent); }
.resource-library .library-type-tabs small,
.resource-library .library-subcategories small,
.resource-library .library-filter-summary b { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.resource-library .library-type-tabs small { color: #65715b; font-size: 12px; }
.resource-library .library-type-tabs button[aria-pressed="true"] small { color: var(--accent); }
.resource-library .library-subcategory-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 0 6px;
  border-bottom: 1px solid #c3c8bf;
}
.resource-library .library-filter-label { flex-shrink: 0; color: #66705e; font-size: 12px; line-height: 44px; }
.resource-library .library-subcategories { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.resource-library .library-subcategories button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid transparent;
  color: #4f584b;
  font-size: 12px;
  white-space: nowrap;
  transition: background-color 180ms, border-color 180ms;
}
.resource-library .library-subcategories button[aria-pressed="true"] { background: var(--accent); border-color: #a0bd20; color: #1e201d; }
.resource-library .library-subcategories small { font-size: 10px; }
.resource-library .library-filter-summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; }
.resource-library .library-filter-summary p { font-size: 12px; line-height: 1.7; color: #4f584b; overflow-wrap: anywhere; }
.resource-library .library-filter-summary p > span { display: inline-block; margin-left: 12px; }
.resource-library .library-filter-summary b { color: var(--charcoal-deep); }
.resource-library .library-filter-summary button { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 4px; flex-shrink: 0; color: #4f584b; font-size: 11px; }
.resource-library .library-filter-panel + .library-featured { margin-top: 0; }
.resource-library :is(.library-type-tabs, .library-subcategories, .library-filter-summary) button:focus-visible { outline: 2px solid #3b7a67; outline-offset: -3px; }
@media (hover: hover) {
  .resource-library .library-type-tabs button:not([aria-pressed="true"]):hover { background: #e3e9d8; border-color: #8b957e; color: var(--charcoal-deep); }
  .resource-library .library-subcategories button:not([aria-pressed="true"]):hover { background: #e4e9dd; border-color: #b2bba5; }
  .resource-library .library-filter-summary button:hover { color: #1e201d; text-decoration: underline; }
}
@media (max-width: 799px) {
  .resource-library .library-filter-panel { margin: 6px 0 4px; }
  .resource-library .library-type-tabs { gap: 4px; }
  .resource-library .library-type-tabs button { flex-direction: column; gap: 2px; min-height: 48px; padding: 6px 2px; font-size: 12px; }
  .resource-library .library-type-tabs button > svg { display: none; }
  .resource-library .library-type-tabs button::after { left: 7px; right: 7px; height: 2px; }
  .resource-library .library-type-tabs small { font-size: 11px; line-height: 1.3; }
  .resource-library .library-subcategory-row { gap: 6px; padding: 6px 0; }
  .resource-library .library-filter-label { font-size: 10px; line-height: 36px; }
  .resource-library .library-subcategories { flex: 1; flex-wrap: wrap; gap: 4px; overflow: visible; padding: 0; }
  .resource-library .library-subcategories button { min-width: 0; max-width: 100%; min-height: 36px; padding: 6px 8px; font-size: 12px; line-height: 1.5; gap: 4px; white-space: normal; overflow-wrap: anywhere; text-align: left; }
  .resource-library .library-subcategories small { flex-shrink: 0; white-space: nowrap; }
  .resource-library .library-filter-summary { min-height: 36px; }
  .resource-library .library-filter-summary button { min-height: 36px; }
  .resource-library .library-filter-summary p { font-size: 11px; }
  .resource-library .library-filter-summary p > span { margin-left: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .resource-library .library-type-tabs button,
  .resource-library .library-subcategories button { transition: none; }
}

@media (max-width: 799px) { .resource-library .library-type-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* Historical records only. A continuous archive rail, independent of chronology scale. */
.history-timeline,.history-detail-dialog {
  --history-ink:var(--charcoal-deep); --history-muted:#697063; --history-line:#bcc4b5;
  --history-lime:var(--accent); --history-dark:var(--charcoal); --history-paper:var(--glass);
  color:var(--history-ink); font-family:var(--font-display,var(--font-sans,sans-serif));
  min-width:0; font-size:13px; line-height:1.7;
}
.history-timeline *,.history-detail-dialog * { box-sizing:border-box; }
.history-timeline :is(button,input,select,a):focus-visible,.history-detail-dialog :is(button,a):focus-visible { outline:2px solid var(--iris); outline-offset:3px; }
.history-timeline:focus:not(:focus-visible),.history-stage-heading:focus:not(:focus-visible) { outline:none; }
.history-timeline { padding-top:4px; scroll-margin-top:22px; }
.history-heading { position:relative; display:flex; align-items:center; justify-content:space-between; gap:22px; padding:25px 27px 26px; color:#f4f6f2; background:linear-gradient(105deg,#2d302a 65%,#41463a); border:1px solid #ffffffb3; border-bottom:3px solid var(--history-lime); isolation:isolate; overflow:hidden; }
.history-heading::before { content:""; position:absolute; right:0; top:0; bottom:0; width:28%; background:repeating-linear-gradient(0deg,transparent 0 7px,#ffffff09 7px 8px); z-index:-1; pointer-events:none; }
.history-heading::after { content:""; position:absolute; right:0; top:0; width:45px; height:3px; background:var(--accent); pointer-events:none; }
.history-heading>div { flex:1; min-width:0; }
.history-overline { display:block; font:9px/1.6 var(--font-english,var(--font-mono,monospace)); letter-spacing:.12em; color:#aeb8a1; }
.personnel-page .history-timeline .history-heading h2 { display:flex; align-items:center; gap:20px; color:#f4f6f2; font-size:31px; font-weight:500; letter-spacing:.12em; line-height:1.4; margin:8px 0 7px; }
.history-heading-rule { display:block; height:1px; width:48px; max-width:12%; background:#b4c28c; }
.history-heading p { margin:0; color:#c1c9b6; font-size:11px; line-height:1.8; }
.history-total { display:flex; flex-direction:column; align-items:flex-end; flex-shrink:0; min-width:64px; padding-left:23px; border-left:1px solid #ffffff21; }
.history-total b { display:block; font:48px/1 var(--font-mono,monospace); font-variant-numeric:tabular-nums; color:var(--history-lime); letter-spacing:-.04em; }
.history-total>span { margin-top:7px; font-size:9px; color:#b7c0ac; letter-spacing:.1em; }
.history-stage-note { display:flex; align-items:flex-start; gap:7px; margin:13px 1px 16px; color:#68705e; font-size:10px; line-height:1.9; }
.history-stage-note>span { flex-shrink:0; color:#6f7c4f; font-size:13px; line-height:1.4; }
.history-stage-nav { display:flex; gap:6px; flex-wrap:wrap; padding:13px 0 5px; }
.history-stage-nav button { display:flex; align-items:center; gap:14px; min-height:36px; padding:7px 11px; font-size:11px; color:#e7ecdf; background:var(--history-dark); border-bottom:2px solid #8a9770!important; transition:background .18s,border-color .18s; }
.history-stage-nav button small { color:#afbf95; font:10px var(--font-mono,monospace); }
.history-stage-nav button:hover { background:#505647; border-bottom-color:var(--accent)!important; }
/* A single uninterrupted spine. Tick marks are visual indexing, never a date scale. */
.history-axis { --history-axis-gap:43px; --history-axis-x:11px; position:relative; padding:5px 0 10px var(--history-axis-gap); margin-top:20px; isolation:isolate; }
.history-axis::before { content:""; position:absolute; left:var(--history-axis-x); top:7px; bottom:5px; width:1px; background:#86947a; z-index:-1; }
.history-axis::after { content:""; position:absolute; left:calc(var(--history-axis-x) - 3px); bottom:0; width:7px; height:7px; background:#48553b; transform:rotate(45deg); }
.history-stage { position:relative; padding-bottom:34px; }
.history-stage:last-child { padding-bottom:4px; }
.history-stage::before { content:""; position:absolute; top:9px; bottom:0; left:calc(var(--history-axis-x) - var(--history-axis-gap)); width:7px; background:repeating-linear-gradient(to bottom,#8b977940 0 1px,transparent 1px 13px); pointer-events:none; z-index:-1; }
.history-stage-heading { display:flex; align-items:center; gap:18px; position:relative; padding:0 0 15px; margin-bottom:15px; border-bottom:1px solid #aab69c; scroll-margin-top:30px; }
.history-stage-point { position:absolute; width:13px; height:13px; left:calc(var(--history-axis-x) - var(--history-axis-gap) - 6px); top:14px; border:3px solid #404b34; background:var(--history-lime); box-shadow:0 0 0 5px #dce2d4; transform:rotate(45deg); }
.history-stage-heading>div { min-width:0; flex:1; }
.history-stage-heading h3 { margin:0; font:500 32px/1.25 var(--font-english,var(--font-display,sans-serif)); color:#333d2c; letter-spacing:.035em; overflow-wrap:anywhere; }
.history-stage-heading p { margin:7px 0 0; font-size:11px; color:#4d5a40; line-height:1.7; }
.history-stage-heading small { display:block; margin-top:5px; color:#748067; font-size:10px; line-height:1.8; }
.history-stage-count { display:flex; flex-direction:column; align-items:flex-end; justify-content:center; gap:4px; align-self:flex-start; padding-top:4px; min-width:41px; flex-shrink:0; }
.history-stage-count b { font:28px/1.1 var(--font-mono,monospace); font-variant-numeric:tabular-nums; color:#82916b; }
.history-stage-count>span { font-size:8px; letter-spacing:.08em; color:#7a866d; }
.history-stage-events { display:grid; gap:16px; }
.history-event { position:relative; min-width:0; }
.history-event-point { position:absolute; left:calc(var(--history-axis-x) - var(--history-axis-gap) - 4px); top:27px; width:9px; height:9px; border:2px solid #81906d; background:#f0f4e9; box-shadow:0 0 0 4px #dde3d5; }
.history-event::before { content:""; position:absolute; left:calc(var(--history-axis-x) - var(--history-axis-gap) + 5px); top:31px; width:calc(var(--history-axis-gap) - var(--history-axis-x) - 5px); height:1px; background:#a3af94; }
.history-timeline button.history-event-card { position:relative; display:block; width:100%; text-align:left; padding:17px 22px 0; color:var(--history-ink); background:linear-gradient(110deg,#fcfdfaeb,#f1f4ecdb); border:1px solid #ffffffed; border-bottom:2px solid #aebc9d; box-shadow:0 5px 13px #323b2708; transition:background .18s,border-color .18s,box-shadow .18s; cursor:pointer; }
.history-event-card::after { content:""; position:absolute; right:0; top:0; width:12px; height:12px; border-top:2px solid #899e68; border-right:2px solid #899e68; pointer-events:none; }
.history-event-card:hover { background:#fff!important; border-bottom-color:#b1cc34!important; box-shadow:2px 0 rgb(var(--iris-rgb) / 0.2),-2px 0 rgb(var(--accent-rgb) / 0.439215686),0 5px 15px #323b2710!important; }
.history-event-top { display:flex; align-items:center; flex-wrap:wrap; gap:8px; justify-content:space-between; }
.history-event-code { font:10px/1.5 var(--font-mono,monospace); color:#657254; letter-spacing:.11em; overflow-wrap:anywhere; }
.history-evidence { display:inline-flex; font:9px/1.5 var(--font-display,var(--font-sans,sans-serif)); background:#e1e7d8; color:#4b5b3d; padding:3px 7px; border-left:2px solid #95a47f; white-space:normal; }
.history-evidence.is-demo { background:#ece6d8; border-color:#b4a276; color:#716142; }
.history-evidence.is-pending { background:#f1e5df; border-color:#b3836c; color:#82563e; }
.history-evidence.is-explicit { background:#e5edce; border-color:#97b118; color:#53642f; }
.history-evidence.is-inferred { background:#e3e7ee; border-color:#8190b5; color:#586581; }
.history-event-time { display:flex; align-items:baseline; flex-wrap:wrap; gap:3px 11px; margin-top:14px; color:#52633f; font-size:12px; line-height:1.8; }
.history-event-time>span { font-weight:550; }
.history-event-time small { font-size:9px; color:#7a846f; font-weight:400; }
.history-event-card h4 { margin:4px 0 11px; font-size:20px; font-weight:550; line-height:1.5; letter-spacing:.015em; overflow-wrap:anywhere; }
.history-event-summary { display:block; font-size:12px; font-weight:400; line-height:1.95; color:#59624f; overflow-wrap:anywhere; }
.history-event-people { display:flex; align-items:baseline; flex-wrap:wrap; gap:4px 7px; padding:12px 0 15px; color:#536148; font-size:9px; font-weight:400; line-height:1.7; overflow-wrap:anywhere; }
.history-people-label { color:#879178; margin-right:3px; }
.history-person-tag { border:1px solid #c7d0bc; padding:1px 6px; background:#e7eddf61; }
.history-event-bottom { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 0; border-top:1px solid #d3dbca; }
.history-event-sources { display:flex; align-items:center; flex-wrap:wrap; gap:4px 8px; min-width:0; color:#76836a; font-size:9px; font-weight:400; overflow-wrap:anywhere; }
.history-event-sources>span+span::before { content:"/"; margin-right:8px; color:inherit; }
.history-event-open { display:inline-flex; align-items:center; gap:10px; font-size:10px; font-weight:550; color:#43542f; white-space:nowrap; flex-shrink:0; }
.history-event-open svg { box-sizing:content-box; padding:5px; background:#e0e8d1; transition:background .18s; }
.history-event-card:hover .history-event-open svg { background:var(--accent); }
.history-stage-empty { padding:10px 0 15px; color:#7b876d; font-size:11px; }
.history-footer { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:17px 0 7px; border-top:1px solid #bec9b1; margin-top:19px; }
.history-footer>span { font:8px/1.7 var(--font-english,var(--font-mono,monospace)); color:#738362; letter-spacing:.06em; }
.history-footer button { min-height:38px; display:flex; align-items:center; gap:8px; font-size:11px; color:#3c5126; padding:7px 10px; background:#f3f6ed; white-space:nowrap; }
.history-footer button:hover { background:var(--history-lime); }
.history-notice,.history-load-error,.history-missing { padding:15px; border:1px solid #c3c9b6; background:#f5f7f0; margin:14px 0; font-size:11px; color:#57654b; }
.history-notice { display:flex; gap:12px; align-items:center; }
.history-notice button { margin-left:auto; flex-shrink:0; padding:6px; }
.history-load-error button,.history-missing button { display:inline-flex; align-items:center; gap:9px; margin-top:10px; padding:7px 10px; background:var(--charcoal); color:#edf1e7; border-left:2px solid var(--accent)!important; }
.history-missing h3 { font-size:15px; margin-bottom:6px; }
.history-empty { padding:35px 16px; color:#687758; background:rgb(var(--glass-rgb) / 0.650980392); border:1px solid #fff; margin-top:16px; font-size:12px; text-align:center; }

/* Native modal keeps its body and focus separate from the complete background axis. */
.history-detail-dialog { position:fixed; inset:0 0 0 auto; width:min(680px,75vw); height:100dvh; max-width:100vw; max-height:100dvh; margin:0; padding:0; border:0; border-left:3px solid var(--history-lime); background:#f3f5ef; box-shadow:-2px 0 rgb(var(--iris-rgb) / 0.466666667),-18px 0 60px #1d241f33; overflow:hidden; }
.history-detail-dialog[open] { display:flex; flex-direction:column; }
.history-detail-dialog::backdrop { background:#20271f70; backdrop-filter:blur(2px); }
.history-detail-dialog :is(button,a) { transition:background .18s,color .18s; }
.history-detail-header { display:flex; align-items:flex-start; gap:20px; padding:27px 30px; color:#f2f6ec; background:linear-gradient(105deg,#30332c,#414638); border-bottom:3px solid var(--history-lime); flex-shrink:0; }
.history-detail-header>div { flex:1; min-width:0; }
.history-detail-header>div>span { display:block; font:9px/1.6 var(--font-mono,monospace); letter-spacing:.1em; color:#b8c4a5; overflow-wrap:anywhere; }
.history-detail-header b { padding:0 5px; color:#7f8c6c; font-weight:400; }
.history-detail-dialog .history-detail-header h2 { margin:12px 0 0; color:#f2f6ec; font-size:27px; line-height:1.5; font-weight:500; overflow-wrap:anywhere; }
.history-detail-dialog button.history-detail-close { flex-shrink:0; width:39px; height:39px; padding:7px; display:grid; place-items:center; border:1px solid #dce7cd50; color:#eaf0e1; background:#ffffff09; }
.history-detail-dialog button.history-detail-close:hover { background:var(--accent); color:var(--charcoal-deep); }
.history-detail-body { overflow-y:auto; overscroll-behavior:contain; flex:1; min-height:0; scrollbar-gutter:stable; padding:24px 30px 35px; }
.history-detail-content { overflow-wrap:anywhere; }
.history-detail-notice { margin:0 0 15px; font-size:11px; line-height:1.85; padding:11px 13px; color:#766140; border-left:2px solid #bfa66c; background:#ece6d9; }
.history-detail-facts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 22px; margin:0 0 22px; }
.history-detail-facts>div { min-width:0; padding:12px 0; border-bottom:1px solid #d1dac6; font-size:12px; line-height:1.9; }
.history-detail-facts dt { color:#7b876f; font-size:10px; margin-bottom:5px; }
.history-detail-facts dd { margin:0; color:#45513a; white-space:pre-wrap; }
.history-detail-facts .history-detail-date { grid-column:1/-1; padding-top:0; }
.history-detail-date dd { color:#414e32; font-size:23px; line-height:1.5; font-weight:500; }
.history-detail-facts .history-detail-people { grid-column:1/-1; }
.history-detail-summary { padding:15px 17px; background:linear-gradient(110deg,#e7eddb,#edf1e5); border-left:3px solid #afc755; font-size:13px; line-height:2; color:#536045; }
.history-detail-summary p { margin:0; white-space:pre-wrap; }
.history-detail-summary p+p { margin-top:11px; }
.history-detail-section { margin-top:28px; }
.history-detail-section h3 { margin:0 0 14px; font-size:17px; line-height:1.55; font-weight:550; color:#34442b; display:flex; align-items:center; gap:10px; }
.history-detail-section h3::before { content:""; width:6px; height:6px; border:1px solid #8da449; background:var(--accent); transform:rotate(45deg); flex-shrink:0; }
.history-detail-section h3::after { content:""; height:1px; background:#d2dbc6; flex:1; margin-left:4px; }
.history-detail-section p { margin:0 0 12px; font-size:13px; line-height:2.05; color:#4f5c42; white-space:pre-wrap; }
.history-detail-section .history-detail-empty { color:#808b72; font-size:11px; }
.history-detail-evidence ol { list-style:none; counter-reset:history-source; margin:0; padding:0; }
.history-detail-evidence li { position:relative; padding:16px 17px 16px 43px; background:#ffffffb5; border:1px solid #d1d9c7; margin-top:10px; counter-increment:history-source; }
.history-detail-evidence li::before { content:counter(history-source,decimal-leading-zero); position:absolute; left:13px; top:18px; font:11px var(--font-mono,monospace); color:#86966b; }
.history-source-type { font-size:9px; background:#e4ebd9; color:#697954; padding:3px 6px; display:inline-block; }
.history-detail-evidence h4 { margin:8px 0 6px; font-size:13px; font-weight:550; line-height:1.7; color:#425234; }
.history-detail-evidence p { font-size:11px; margin:5px 0; line-height:1.9; }
.history-detail-evidence .history-source-locator { color:#71815f; }
.history-detail-evidence a { display:inline-flex; align-items:center; gap:9px; color:#3f592b; border-bottom:1px solid #acbc92; padding:4px 0; margin-top:8px; font-size:11px; }
.history-detail-evidence a:hover { color:#5869ab; }
.history-related { display:grid; gap:17px; }
.history-related h4 { margin:0 0 8px; font-size:10px; font-weight:400; color:#7b896c; }
.history-related a,.history-resource-links a { display:flex; align-items:center; justify-content:space-between; gap:16px; border:1px solid #c3d0b2; padding:12px 13px; background:#f9fbf6; color:#435936; font-size:12px; margin-top:6px; }
.history-related a>span,.history-resource-links a>span { min-width:0; }
.history-related a small { display:block; font:9px/1.7 var(--font-mono,monospace); color:#7c8c69; margin-bottom:3px; }
.history-related a:hover,.history-resource-links a:hover { background:#e6edcf; }
.history-resource-links a small { display:block; font:9px/1.7 var(--font-mono,monospace); color:#7c8c69; margin-top:4px; overflow-wrap:anywhere; }
.history-detail-footer { flex-shrink:0; display:flex; align-items:center; justify-content:space-between; gap:15px; padding:13px 26px max(13px,env(safe-area-inset-bottom)); border-top:1px solid #c6d0bb; background:#e5ebdc; }
.history-detail-footer>span { font:8px/1.7 var(--font-english,var(--font-mono,monospace)); letter-spacing:.04em; color:#7c8b6d; }
.history-detail-footer button { display:flex; align-items:center; justify-content:center; gap:12px; background:var(--charcoal); color:#f1f6e9; font-size:11px; padding:9px 12px; border-left:2px solid var(--accent)!important; white-space:nowrap; min-height:38px; }
.history-detail-footer button:hover { background:var(--accent); color:var(--charcoal-deep); }
@media(max-width:700px) {
  .history-heading { padding:18px 17px; gap:12px; }
  .personnel-page .history-timeline .history-heading h2 { font-size:26px; margin:6px 0; gap:12px; }
  .history-overline { font-size:7px; letter-spacing:.06em; }
  .history-heading p { font-size:10px; }
  .history-total { padding-left:13px; min-width:48px; }
  .history-total b { font-size:36px; }
  .history-total>span { font-size:8px; letter-spacing:0; }
  .history-stage-note { margin:10px 0 12px; font-size:9px; }
  .history-stage-nav { gap:5px; padding-top:11px; }
  .history-stage-nav button { min-height:34px; font-size:10px; padding:6px 9px; gap:7px; }
  .history-axis { --history-axis-gap:27px; --history-axis-x:6px; margin-top:16px; }
  .history-stage { padding-bottom:27px; }
  .history-stage-heading { padding-bottom:12px; margin-bottom:12px; gap:12px; }
  .history-stage-heading h3 { font-size:26px; }
  .history-stage-heading p { font-size:10px; margin-top:5px; }
  .history-stage-heading small { font-size:9px; line-height:1.8; }
  .history-stage-point { width:11px; height:11px; left:calc(var(--history-axis-x) - var(--history-axis-gap) - 5px); top:10px; box-shadow:0 0 0 4px #dce2d4; }
  .history-stage-count { min-width:35px; padding-top:2px; }
  .history-stage-count b { font-size:24px; }
  .history-stage-count>span { font-size:8px; }
  .history-stage-events { gap:13px; }
  .history-event-point { top:23px; }
  .history-event::before { top:27px; }
  .history-timeline button.history-event-card { padding:13px 14px 0; }
  .history-event-top { gap:5px; }
  .history-event-code { font-size:9px; }
  .history-evidence { font-size:8px; padding:3px 5px; }
  .history-event-time { margin-top:11px; font-size:11px; gap:2px 7px; }
  .history-event-time small { font-size:9px; }
  .history-event-card h4 { font-size:17px; margin:4px 0 9px; }
  .history-event-summary { font-size:12px; line-height:1.9; }
  .history-event-people { padding:10px 0 12px; font-size:9px; gap:4px 5px; }
  .history-person-tag { padding:1px 5px; }
  .history-event-bottom { gap:8px; padding:8px 0; }
  .history-event-open { font-size:10px; gap:6px; }
  .history-event-open svg { padding:4px; }
  .history-event-sources { font-size:8px; gap:3px 5px; }
  .history-event-sources>span+span::before { margin-right:5px; }
  .history-footer>span { font-size:7px; }
  .history-detail-dialog { inset:0; width:100vw; max-width:100vw; border-left:0; border-top:3px solid var(--history-lime); }
  .history-detail-header { padding:18px 17px; gap:13px; }
  .history-detail-dialog .history-detail-header h2 { font-size:22px; margin-top:10px; }
  .history-detail-header>div>span { font-size:8px; }
  .history-detail-body { padding:18px 17px 26px; }
  .history-detail-facts { gap:0 15px; margin-bottom:18px; }
  .history-detail-facts>div { padding:10px 0; font-size:11px; }
  .history-detail-facts dt { font-size:9px; margin-bottom:4px; }
  .history-detail-date dd { font-size:21px; }
  .history-detail-summary { padding:12px 13px; font-size:12px; }
  .history-detail-section { margin-top:24px; }
  .history-detail-section h3 { font-size:16px; }
  .history-detail-evidence li { padding:14px 13px 14px 37px; }
  .history-detail-evidence li::before { left:11px; top:16px; font-size:10px; }
  .history-detail-footer { padding:11px 15px max(11px,env(safe-area-inset-bottom)); gap:10px; }
  .history-detail-footer>span { font-size:7px; }
}
@media(max-width:350px) {
  .history-heading { padding:15px 12px; }
  .personnel-page .history-timeline .history-heading h2 { font-size:24px; letter-spacing:.06em; }
  .history-heading-rule { display:none; }
  .history-overline { font-size:6px; }
  .history-total { min-width:42px; padding-left:10px; }
  .history-total b { font-size:31px; }
  .history-axis { --history-axis-gap:23px; --history-axis-x:5px; }
  .history-stage-heading h3 { font-size:23px; }
  .history-stage-count { min-width:29px; }
  .history-stage-count b { font-size:22px; }
  .history-timeline button.history-event-card { padding:12px 11px 0; }
  .history-event-card h4 { font-size:16px; }
  .history-event-bottom { align-items:center; }
  .history-detail-body { padding-left:14px; padding-right:14px; }
  .history-detail-header { padding:15px 14px; }
  .history-detail-dialog .history-detail-header h2 { font-size:20px; }
  .history-detail-footer>span { max-width:120px; }
}
@media(prefers-reduced-motion:reduce) {
  .history-timeline *,.history-detail-dialog * { transition:none!important; animation:none!important; scroll-behavior:auto!important; }
}
/* Second story-scroll study. All selectors stay within the personnel history view. */
.history-story-v2 { --story-ink:#2d342c; --story-muted:#737e6b; --story-paper:#edf1e8; --story-rail:128px; --story-gap:29px; --story-content:calc(var(--story-rail) + var(--story-gap)); font-family:var(--font-display); font-synthesis:none; }
.history-story-v2 .history-story-cover { position:relative; min-height:440px; overflow:hidden; isolation:isolate; padding:21px 29px 0; color:#f1f4ed; background:#292f2b; border:1px solid #eff5e9; border-bottom:3px solid var(--accent); }
.history-story-cover .history-cover-image { position:absolute; z-index:-2; inset:0; width:100%; height:100%; object-fit:cover; object-position:70% center; }
.history-story-v2 .history-story-cover::before { content:""; position:absolute; z-index:-1; inset:0; background:linear-gradient(90deg,#1b2525f5 0%,#1b2525b8 37%,#1e28251a 72%),linear-gradient(0deg,#1c2828e0,transparent 28%); pointer-events:none; }
.history-story-v2 .history-story-cover-index { display:flex; justify-content:space-between; gap:15px; font:700 8px/1.7 var(--font-english); letter-spacing:.11em; color:#d0d9cd; border-bottom:1px solid #e9f0df3a; padding-bottom:13px; }
.history-story-v2 .history-story-cover-index>span:last-child { font-family:var(--font-display); font-weight:500; }
.history-story-v2 .history-story-cover-main { padding:30px 0 28px; position:relative; width:70%; }
.history-story-v2 .history-overline { font:700 8px/1.6 var(--font-english); letter-spacing:.16em; color:#c4d4b3; }
.personnel-page .history-story-v2 .history-story-cover h2 { margin:13px 0 17px; color:#f5f6ef; font:400 clamp(34px,3.7vw,56px)/1.24 var(--font-english); letter-spacing:.1em; }
.history-story-v2 .history-story-cover h2 strong { font-weight:550; }
.history-story-v2 .history-story-cover h2 i { font-style:normal; color:var(--accent); margin-left:5px; }
.history-story-v2 .history-story-cover-main p { font-size:11px; line-height:2; margin:0; color:#f5f6ef; text-shadow:0 0 #13201a,0 0 #13201a,0 0 #13201a,0 0 #13201a,0 1px 9px #13201a; }
.history-story-v2 button.history-story-start { display:flex; align-items:center; gap:30px; margin:22px 0 0; min-height:36px; padding:0 0 6px; font-size:11px; color:#dcebbd; background:none; border:0!important; border-bottom:1px solid #c4dca287!important; }
.history-story-v2 button.history-story-start:hover { color:var(--accent); }
.history-story-v2 button.history-story-start:disabled { opacity:.4; cursor:wait; }
.history-cover-caption { position:absolute; right:17px; bottom:68px; writing-mode:vertical-rl; display:flex; align-items:center; gap:12px; font-size:8px; color:#cbd6c2; text-shadow:0 1px 5px #000; letter-spacing:.08em; }
.history-cover-caption>span+span { font:6px var(--font-english); opacity:.65; }
.history-story-v2 .history-story-cover-bottom { position:relative; display:flex; justify-content:space-between; align-items:center; gap:15px; padding:12px 0 14px; border-top:1px solid #ecf4e734; color:#cad5bf; font-size:9px; letter-spacing:.06em; }
.history-story-v2 .history-story-cover-bottom b { font:25px/1 var(--font-mono); color:var(--accent); padding-right:6px; }
.history-story-overview { margin:24px 0; padding:20px 23px 13px; background:#eff3e9e8; border:1px solid #ffffffb3; backdrop-filter:blur(8px); }
.history-story-overview>header { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:17px; }
.history-story-overview>header span { font:700 8px/1.6 var(--font-english); letter-spacing:.12em; color:var(--personnel-quiet); }
.personnel-page .history-story-overview h3 { margin:5px 0 0; font-size:25px; font-weight:450; color:#36422e; letter-spacing:.06em; }
.history-story-overview>header p { font-size:10px; line-height:1.9; color:var(--personnel-quiet); text-align:right; margin:0; }
.history-story-overview>nav { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 20px; }
.history-story-overview nav button { position:relative; display:flex; align-items:center; text-align:left; gap:13px; padding:15px 0; min-width:0; color:#35412d; background:none; border:0!important; border-top:1px solid #b5bfa8!important; }
.history-story-overview nav button:hover { color:#596f24; }
.history-story-overview nav button:hover .history-overview-number { color:#8fa631; }
.history-overview-number { flex-shrink:0; min-width:27px; font:26px/1 var(--font-mono); color:var(--personnel-quiet); transition:color .18s; }
.history-overview-copy { min-width:0; flex:1; display:flex; flex-direction:column; gap:4px; }
.history-overview-copy b { font-size:13px; line-height:1.5; font-weight:550; }
.history-overview-copy small { font-size:9px; color:var(--personnel-quiet); line-height:1.7; }
.history-overview-count { display:flex; flex-direction:column; gap:3px; align-items:center; color:var(--personnel-quiet); font:16px/1 var(--font-mono); }
.history-overview-count small { font:7px/1.5 var(--font-display); color:var(--personnel-quiet); }
.history-story-overview nav button>svg { flex-shrink:0; color:#9aaa82; }
.history-story-overview nav .is-unplaced { grid-column:1/-1; padding:11px 0; }
.history-story-overview .is-unplaced .history-overview-copy { flex-direction:row; align-items:baseline; gap:14px; }
.history-story-overview .is-unplaced .history-overview-copy b { font-size:11px; color:var(--personnel-quiet); }
.history-story-overview .is-unplaced .history-overview-number { font-size:17px; }
.history-story-overview .is-unplaced .history-overview-count { flex-direction:row; align-items:baseline; }
.history-story-v2 .history-story-note { margin:7px 0 0; color:var(--personnel-quiet); font-size:9px; line-height:1.9; }
.history-story-v2 .history-story-nav { position:sticky; top:10px; z-index:12; display:flex; align-items:center; gap:16px; padding:10px 12px; margin-bottom:29px; background:#eaf0e4ed; border:1px solid #fff; border-bottom:1px solid #a6b496; backdrop-filter:blur(16px); box-shadow:0 5px 20px #26351d0b; }
.history-story-nav-current { min-width:96px; flex:1; display:flex; flex-direction:column; gap:2px; }
.history-story-nav-current small { font:700 7px/1.5 var(--font-english); color:var(--personnel-quiet); letter-spacing:.12em; }
.history-story-nav-current b { font-size:11px; color:#48583c; font-weight:500; }
.history-story-v2 .history-story-nav>div { display:flex; gap:4px; align-items:center; }
.history-story-v2 .history-story-nav>div button { position:relative; display:grid; place-items:center; padding:6px; height:35px; width:35px; color:var(--personnel-quiet); font:13px/1 var(--font-mono); background:none; border:0!important; border-bottom:2px solid transparent!important; }
.history-story-v2 .history-story-nav>div button:hover { color:#4f632d; background:#e0e8d5; }
.history-story-v2 .history-story-nav>div button[aria-current=location] { color:#405122; border-bottom-color:#a6c72b!important; background:#e0e8d5; }
.history-story-v2 .history-next-chapter { display:grid; place-items:center; flex-shrink:0; width:35px; min-height:35px; color:#7c8c69; background:none; border-left:1px solid #bac6ad!important; }
.history-story-v2 .history-next-chapter:hover { color:#405122; background:#dae6c8; }
/* The manual chronology is a single spine; left-hand coordinates are never a proportional scale. */
.history-story-v2 .history-axis { --history-axis-gap:0px; --history-axis-x:calc(var(--story-rail) + 13px); position:relative; padding:6px 0 0; margin-top:0; background:#edf2e6a6; }
.history-story-v2 .history-axis::before { top:8px; bottom:10px; z-index:0; background:#a2b195; }
.history-story-v2 .history-axis::after { z-index:1; }
.history-story-v2 .history-stage { padding-bottom:49px; }
.history-story-v2 .history-stage::before { display:none; }
.history-story-v2 .history-stage:last-child { padding-bottom:0; }
.history-story-v2 .history-story-chapter-heading { display:grid; grid-template-columns:var(--story-rail) minmax(0,1fr); align-items:start; gap:var(--story-gap); padding:0 0 25px; margin:0 0 5px; border-bottom:0; scroll-margin-top:90px; }
.history-story-chapter-number { display:block; text-align:right; font:72px/.95 var(--font-mono); color:#8c9c7e; padding-right:14px; opacity:.65; letter-spacing:-.05em; }
.history-story-chapter-english { display:block; margin:1px 0 7px; font:700 8px/1.6 var(--font-english); letter-spacing:.13em; color:var(--personnel-quiet); }
.personnel-page .history-story-v2 .history-story-chapter-heading h3 { margin:0; font:500 29px/1.4 var(--font-english); letter-spacing:.06em; color:#313e2b; }
.history-story-v2 .history-story-chapter-heading p { margin:12px 0 0; font-size:12px; color:var(--personnel-quiet); line-height:2; }
.history-story-chapter-meta { display:block; margin-top:11px; color:var(--personnel-quiet); font:400 8px/1.8 var(--font-mono); }
.history-story-v2 .history-stage-point { left:calc(var(--history-axis-x) - 5px); top:8px; width:11px; height:11px; border:2px solid #788c53; background:var(--accent); box-shadow:0 0 0 4px #e5eadf; z-index:1; }
.history-story-v2 .history-stage-events { display:block; }
.history-story-v2 .history-event { position:relative; display:grid; grid-template-columns:var(--story-rail) minmax(0,1fr); align-items:start; gap:var(--story-gap); margin:0 0 5px; padding:0; }
.history-story-v2 .history-event::before { left:calc(var(--history-axis-x) + 4px); width:12px; top:28px; background:#b0bba5; }
.history-story-v2 .history-event-point { left:calc(var(--history-axis-x) - 3px); top:25px; width:7px; height:7px; background:#eaf0e3; border:1px solid #93a77b; box-shadow:0 0 0 3px #e5eadf; z-index:1; }
.history-story-v2 .is-key-moment .history-event-point,.history-story-v2 .is-scene .history-event-point { background:var(--accent); border-color:#718843; width:9px; height:9px; left:calc(var(--history-axis-x) - 4px); top:24px; }
.history-event-coordinate { position:relative; z-index:1; padding:20px 14px 0 0; text-align:right; min-width:0; }
.history-event-coordinate>b { display:block; font:500 12px/1.5 var(--font-display); color:var(--personnel-quiet); letter-spacing:.02em; }
.history-event-coordinate>b.is-year { font:31px/1.1 var(--font-mono); color:var(--personnel-quiet); letter-spacing:-.025em; }
.history-event-coordinate>span { display:block; margin-top:6px; color:var(--personnel-quiet); font-size:9px; line-height:1.85; overflow-wrap:anywhere; }
.history-event-coordinate>small { display:block; margin-top:6px; font-size:8px; line-height:1.8; color:var(--personnel-quiet); }
.history-story-v2 button.history-event-card { display:block; position:relative; grid-column:2; width:100%; text-align:left; color:#303a2b; padding:0; background:#f4f6f0a3; border:0; border-bottom:1px solid #acbba055; box-shadow:none; transition:background .25s,box-shadow .25s; scroll-margin:90px 0 25px; }
.history-story-v2 .history-event-card::before,.history-story-v2 .history-event-card::after { content:none; }
.history-story-v2 .history-event-card:hover { background:#fbfcf9e8!important; box-shadow:2px 0 rgb(var(--iris-rgb) / 0.145098039)!important; border-bottom-color:#9db85f!important; }
.history-event-card-copy { display:block; padding:19px 19px 0; }
.history-story-v2 .history-event-top { flex-wrap:wrap; gap:8px; }
.history-story-v2 .history-event-code { color:var(--personnel-quiet); font:9px/1.7 var(--font-mono); letter-spacing:.08em; }
.history-story-v2 .history-event-code em { margin-left:10px; font-style:normal; font:8px/1.7 var(--font-display); color:var(--personnel-quiet); letter-spacing:.04em; }
.history-story-v2 .history-evidence { font-size:8px; background:#e5ecdb; color:#4c5e3b; border-left:1px solid #a3b48c; padding:2px 5px; }
.history-story-v2 .history-evidence.is-inferred { background:#e7ebef; color:#4c5d75; border-color:#9faec5; }
.history-story-v2 .history-evidence.is-demo { background:#ece5d8; color:#645132; border-color:#bbac8c; }
.history-story-v2 .history-evidence.is-pending { background:#efe4dd; color:#6c4e3b; border-color:#cbb092; }
.history-story-v2 .history-event-card h4 { font:500 18px/1.65 var(--font-english); margin:8px 0 9px; color:inherit; letter-spacing:.02em; }
.history-story-v2 .history-event-summary { font-size:12px; line-height:2; color:var(--personnel-quiet); }
.history-story-v2 .history-event-people { padding:11px 0 12px; gap:3px 7px; color:var(--personnel-quiet); font-size:9px; }
.history-story-v2 .history-people-label { color:var(--personnel-quiet); margin-right:2px; }
.history-story-v2 .history-person-tag { border:0; padding:0; background:none; }
.history-story-v2 .history-person-tag+.history-person-tag::before { content:"/"; color:inherit; margin-right:7px; }
.history-story-v2 .history-event-bottom { border-top:1px solid #acbba030; padding:9px 0; }
.history-story-v2 .history-event-sources { font-size:8px; color:var(--personnel-quiet); }
.history-story-v2 .history-event-open { font-size:9px; color:var(--personnel-quiet); gap:10px; }
.history-story-v2 .history-event-open svg { padding:3px; background:none; }
.history-story-v2 .history-event-card:hover .history-event-open svg { background:var(--accent); color:#42512a; }
.history-story-v2 .is-key-moment { margin-top:14px; margin-bottom:20px; }
.history-story-v2 .is-key-moment button.history-event-card { background:#fbfcf7ed; box-shadow:0 8px 25px #394e1e07; border-bottom:1px solid #b0c692; }
.history-story-v2 .is-key-moment .history-event-card-copy { padding:22px 24px 0; }
.history-story-v2 .is-key-moment h4 { font-size:25px; line-height:1.6; font-weight:450; margin-top:13px; }
.history-story-v2 .is-key-moment .history-event-summary { font-size:13px; line-height:2.05; color:#637258; }
.history-story-v2 .is-key-moment .history-event-bottom { padding:11px 0; }
.history-story-v2 .is-key-moment .history-event-open svg { padding:5px; background:#dce7c8; }
.history-story-v2 .is-dark button.history-event-card { background:#30392ded!important; color:#edf2e5; border-bottom:2px solid #adc936; }
.history-story-v2 .is-dark .history-event-card-copy { padding:25px 26px 0; }
.history-story-v2 .is-dark .history-event-summary { color:#b9c6ad; }
.history-story-v2 .is-dark .history-event-code,.history-story-v2 .is-dark .history-event-code em { color:#c4d1bb; }
.history-story-v2 .is-dark .history-event-people { color:#c4d1bb; }
.history-story-v2 .is-dark :is(.history-people-label,.history-event-sources) { color:#c4d1bb; }
.history-story-v2 .is-dark .history-event-bottom { border-top-color:#e7f1d322; }
.history-story-v2 .is-dark .history-event-open { color:#c2d59f; }
.history-story-v2 .is-dark .history-event-open svg { background:#bfdc48; color:#3c4a23; }
.history-story-v2 .is-scene { margin-top:14px; margin-bottom:24px; }
.history-story-v2 .is-scene button.history-event-card { background:#f5f8efeb; border-bottom:1px solid #acbe94; }
.history-event-scene { position:relative; display:block; overflow:hidden; background:#27312c; }
.history-event-scene img { display:block; width:100%; height:auto; aspect-ratio:16/9; object-fit:cover; transition:transform 1s ease; }
.history-event-card:hover .history-event-scene img { transform:scale(1.025); }
.history-event-scene>span { position:absolute; bottom:0; left:0; right:0; padding:22px 15px 8px; font-size:8px; color:#e4ecd9; background:linear-gradient(transparent,#13201d99); text-shadow:0 0 #17231d,0 0 #17231d,0 0 #17231d,0 0 #17231d,0 1px 4px #17231d; }
.history-story-v2 .history-story-illustration { margin:0 0 25px var(--story-content); border:0; background:#354133; }
.history-story-illustration img { display:block; width:100%; height:auto; aspect-ratio:16/9; object-fit:cover; object-position:center; }
.history-story-illustration figcaption { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:9px 12px; font-size:8px; line-height:1.8; color:#bdcbb0; }
.history-story-illustration figcaption a { display:flex; align-items:center; flex-shrink:0; gap:6px; color:#d4e4bb; font-size:9px; }
.history-story-illustration figcaption a:hover { color:var(--accent); }
.history-story-v2 .history-story-vignette { margin-top:16px; margin-bottom:28px; }
.history-story-vignette figcaption>span { min-width:0; }
.history-story-vignette figcaption b { display:block; font-weight:500; font-size:10px; color:#e5eddc; }
.history-story-vignette figcaption small { display:block; margin-top:4px; font-size:8px; line-height:1.8; color:#b2c3a4; }
.history-story-vignette.is-recollection { position:relative; }
.history-story-vignette.is-recollection figcaption { padding:13px 15px; border-left:2px solid var(--accent); }
.history-story-v2 .history-ep { margin-left:var(--story-content); }
.history-story-v2 .is-unplaced .history-stage-point { background:#e8eee0; }
.history-story-v2 .history-story-ending { margin-top:35px; padding:25px 0 22px var(--story-content); border:0; border-top:1px solid #aab99b; }
.history-story-ending>div>span { font:700 8px/1.6 var(--font-english); color:var(--personnel-quiet); letter-spacing:.12em; }
.history-story-ending p { color:#4b5c3d; font-size:27px; font-weight:400; letter-spacing:.08em; margin:12px 0 6px; }
.history-story-ending small { color:var(--personnel-quiet); font-size:10px; }
.history-story-v2 .history-story-ending>button { min-height:42px; padding:8px 10px; font-size:10px; }
@media(min-width:1500px) {
  .history-story-v2 { --story-rail:154px; --story-gap:36px; }
  .history-story-v2 .history-story-cover { min-height:480px; }
  .history-story-v2 .history-story-cover-main { padding-top:42px; }
  .history-story-v2 .history-story-cover h2 { font-size:62px; }
  .history-story-overview>nav { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .history-story-v2 .history-event-summary { font-size:13px; }
}
@media(max-width:1000px) and (min-width:701px) {
  .history-story-v2 { --story-rail:90px; --story-gap:24px; }
  .history-story-nav-current { min-width:75px; }
  .history-story-v2 .history-story-nav { gap:7px; padding:8px; }
  .history-story-v2 .history-story-nav>div { gap:1px; }
  .history-story-v2 .history-story-nav>div button { width:29px; height:34px; }
  .history-story-overview nav button { gap:8px; }
  .history-story-overview>nav { gap:0 12px; }
  .history-overview-copy b { font-size:11px; }
  .history-overview-copy small { font-size:8px; }
  .history-overview-count { display:none; }
  .history-story-v2 .is-key-moment h4 { font-size:22px; }
}
@media(max-width:700px) {
  .history-story-v2 { --story-rail:0px; --story-gap:24px; }
  .history-story-v2 .history-story-cover { min-height:344px; padding:13px 17px 0; }
  .history-story-v2 .history-story-cover::before { background:linear-gradient(90deg,#1b2525d9,#1b252580 52%,#1e282533),linear-gradient(0deg,#1c2828f0,transparent 45%); }
  .history-story-cover .history-cover-image { object-position:64% center; }
  .history-story-v2 .history-story-cover-index { font-size:6px; letter-spacing:.04em; padding-bottom:10px; }
  .history-story-v2 .history-story-cover-main { width:100%; padding:22px 0 21px; }
  .history-story-v2 .history-overline { font-size:6px; }
  .personnel-page .history-story-v2 .history-story-cover h2 { font-size:35px; line-height:1.25; margin:11px 0 13px; }
  .history-story-v2 .history-story-cover-main p { font-size:10px; line-height:1.9; }
  .history-story-v2 button.history-story-start { font-size:10px; margin-top:16px; gap:24px; }
  .history-cover-caption { right:8px; bottom:62px; font-size:6px; }
  .history-cover-caption>span+span { display:none; }
  .history-story-v2 .history-story-cover-bottom { font-size:8px; padding:10px 0; }
  .history-story-v2 .history-story-cover-bottom b { font-size:21px; }
  .history-story-overview { margin:17px 0; padding:14px 13px 10px; }
  .history-story-overview>header { margin-bottom:12px; gap:12px; }
  .history-story-overview>header span { font-size:6px; }
  .personnel-page .history-story-overview h3 { font-size:22px; }
  .history-story-overview>header p { font-size:8px; line-height:1.85; }
  .history-story-overview>nav { gap:0 13px; }
  .history-story-overview nav button { padding:12px 0; gap:8px; }
  .history-overview-number { font-size:22px; min-width:23px; }
  .history-overview-copy { gap:3px; }
  .history-overview-copy b { font-size:11px; }
  .history-overview-copy small { font-size:8px; line-height:1.6; }
  .history-overview-count { display:none; }
  .history-story-overview nav button>svg { display:none; }
  .history-story-overview .is-unplaced .history-overview-copy { gap:10px; }
  .history-story-overview .is-unplaced .history-overview-copy b { font-size:10px; }
  .history-story-overview .is-unplaced .history-overview-number { font-size:15px; }
  .history-story-v2 .history-story-note { font-size:8px; margin-top:4px; line-height:1.9; }
  .history-story-v2 .history-story-nav { position:static; padding:8px 9px; gap:7px; margin-bottom:24px; }
  .history-story-nav-current { min-width:68px; }
  .history-story-nav-current small { font-size:6px; }
  .history-story-nav-current b { font-size:9px; }
  .history-story-v2 .history-story-nav>div { gap:1px; }
  .history-story-v2 .history-story-nav>div button { width:27px; height:34px; font-size:11px; padding:3px; }
  .history-story-v2 .history-next-chapter { width:25px; min-height:34px; }
  .history-story-v2 .history-axis { --history-axis-x:7px; }
  .history-story-v2 .history-stage { padding-bottom:35px; }
  .history-story-v2 .history-story-chapter-heading { margin:0 0 14px; padding:0 0 0 25px; grid-template-columns:43px minmax(0,1fr); gap:11px; scroll-margin-top:18px; }
  .history-story-chapter-number { font-size:42px; padding:0; text-align:left; }
  .history-story-chapter-english { font-size:6px; margin-bottom:5px; }
  .personnel-page .history-story-v2 .history-story-chapter-heading h3 { font-size:22px; letter-spacing:.025em; }
  .history-story-v2 .history-story-chapter-heading p { font-size:11px; line-height:1.9; margin-top:9px; }
  .history-story-chapter-meta { font-size:7px; margin-top:9px; }
  .history-story-v2 .history-stage-point { left:2px; top:8px; }
  .history-story-v2 .history-event { display:block; padding-left:25px; margin-bottom:10px; }
  .history-event-coordinate { display:flex; align-items:baseline; flex-wrap:wrap; gap:3px 8px; text-align:left; padding:12px 0 9px; }
  .history-event-coordinate>b { font-size:10px; color:var(--personnel-quiet); }
  .history-event-coordinate>b.is-year { font-size:23px; }
  .history-event-coordinate>span { margin:0; font-size:9px; max-width:100%; }
  .history-event-coordinate>small { font-size:8px; margin:0; }
  .history-story-v2 .history-event-point { left:4px; top:21px; }
  .history-story-v2 .is-key-moment .history-event-point,.history-story-v2 .is-scene .history-event-point { left:3px; top:20px; }
  .history-story-v2 .history-event::before { left:11px; top:24px; width:14px; }
  .history-story-v2 .history-event-card { scroll-margin-top:20px; }
  .history-event-card-copy { padding:12px 13px 0; }
  .history-story-v2 .history-event-code { font-size:8px; }
  .history-story-v2 .history-event-code em { font-size:7px; margin-left:8px; }
  .history-story-v2 .history-evidence { font-size:7px; padding:2px 4px; }
  .history-story-v2 .history-event-card h4 { font-size:17px; margin:7px 0 9px; line-height:1.65; }
  .history-story-v2 .history-event-summary { font-size:12px; line-height:1.95; }
  .history-story-v2 .history-event-people { font-size:8px; padding:9px 0; gap:3px 5px; }
  .history-story-v2 .history-person-tag+.history-person-tag::before { margin-right:5px; }
  .history-story-v2 .history-event-bottom { padding:7px 0; }
  .history-story-v2 .history-event-sources { font-size:7px; }
  .history-story-v2 .history-event-open { font-size:9px; gap:5px; }
  .history-story-v2 .is-key-moment { margin-top:12px; margin-bottom:18px; }
  .history-story-v2 .is-key-moment .history-event-card-copy { padding:16px 15px 0; }
  .history-story-v2 .is-key-moment h4 { font-size:21px; line-height:1.55; margin-top:10px; }
  .history-story-v2 .is-key-moment .history-event-summary { font-size:12px; line-height:2; }
  .history-story-v2 .is-key-moment .history-event-bottom { padding:9px 0; }
  .history-story-v2 .is-dark .history-event-card-copy { padding:18px 17px 0; }
  .history-story-v2 .history-story-illustration { margin:0 0 17px 25px; }
  .history-story-v2 .history-ep { margin-left:25px; }
  .history-story-vignette figcaption b { font-size:9px; }
  .history-story-vignette figcaption small { font-size:7px; }
  .history-story-illustration figcaption { flex-wrap:wrap; gap:5px 10px; font-size:7px; padding:8px 10px; }
  .history-story-illustration figcaption a { font-size:8px; }
  .history-event-scene>span { font-size:7px; padding:18px 10px 7px; }
  .history-story-v2 .history-story-ending { margin-top:23px; padding:22px 0 12px 25px; gap:8px; }
  .history-story-ending p { font-size:21px; }
  .history-story-ending>div>span { font-size:6px; }
  .history-story-ending small { font-size:8px; }
  .history-story-v2 .history-story-ending>button { font-size:9px; padding:6px; }
}
@media(max-width:350px) {
  .history-story-v2 .history-story-cover { min-height:324px; padding-left:14px; padding-right:14px; }
  .personnel-page .history-story-v2 .history-story-cover h2 { font-size:32px; }
  .history-story-v2 .history-story-cover-main p { font-size:9px; }
  .history-overview-copy b { font-size:10px; }
  .history-overview-number { font-size:19px; min-width:20px; }
  .history-overview-copy small { font-size:7px; }
  .history-story-overview .is-unplaced .history-overview-copy { gap:6px; }
  .history-story-overview .is-unplaced .history-overview-copy small { font-size:7px; }
  .history-story-v2 .history-story-nav { gap:4px; padding:6px; }
  .history-story-nav-current { min-width:55px; }
  .history-story-nav-current b { font-size:8px; }
  .history-story-v2 .history-story-nav>div button { width:23px; font-size:10px; }
  .history-story-v2 .history-next-chapter { width:21px; }
  .history-story-v2 .history-story-chapter-heading { grid-template-columns:34px minmax(0,1fr); gap:9px; }
  .history-story-chapter-number { font-size:34px; }
  .personnel-page .history-story-v2 .history-story-chapter-heading h3 { font-size:20px; }
  .history-story-v2 .is-key-moment h4 { font-size:19px; }
}
@media(prefers-reduced-motion:reduce) {
  .history-story-v2 * { animation:none!important; transition:none!important; scroll-behavior:auto!important; }
  .history-story-v2 .history-event-card:hover .history-event-scene img { transform:none; }
}
/* Musical interludes in the story scroll. No rules escape this component. */
.history-ep {
  --ep-ink:var(--charcoal-deep); --ep-muted:var(--personnel-quiet,#626e56); --ep-lime:var(--accent);
  position:relative; display:grid; grid-template-columns:minmax(144px,40%) minmax(0,1fr);
  gap:0; min-width:0; margin:26px 0 4px; overflow:hidden;
  border:1px solid #fff; border-bottom:2px solid #879776;
  background:linear-gradient(110deg,#f8faf5f5,#e9eee4e8); color:var(--ep-ink);
  box-shadow:0 8px 22px #26332510;
  font-family:var(--font-display,"Noto Sans SC",sans-serif); font-synthesis:none;
}
.history-ep * { box-sizing:border-box; }
.history-ep::after { content:""; position:absolute; top:0; right:0; width:52px; height:2px; background:var(--ep-lime); pointer-events:none; }
.history-ep-cover { min-width:0; position:relative; align-self:stretch; display:flex; align-items:center; background:#262e28; overflow:hidden; }
.history-ep-cover img { display:block; width:100%; height:auto; object-fit:contain; }
.history-ep-cover-label { position:absolute; bottom:10px; left:10px; max-width:calc(100% - 20px); padding:4px 6px; background:#20251fca; color:#f3f6eb; font:700 6px/1.6 var(--font-english,"Novecento Wide",sans-serif); letter-spacing:.11em; }
.history-ep-cover-fallback { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px; color:#d1ddbc; font:700 14px var(--font-english,"Novecento Wide",sans-serif); }
.history-ep-body { min-width:0; padding:22px 25px 17px; align-self:center; }
.history-ep-kicker { display:block; color:var(--ep-muted); font:700 8px/1.8 var(--font-english,"Novecento Wide",sans-serif); letter-spacing:.12em; }
.history-ep-kicker>i { font-style:normal; color:var(--ep-muted); margin:0 7px; }
.history-ep-kicker>span { font-family:var(--font-display,"Noto Sans SC",sans-serif); font-weight:400; letter-spacing:.06em; }
.history-ep .history-ep-body h4 { margin:7px 0 8px; color:#303a2b; font:700 clamp(23px,2.4vw,32px)/1.2 var(--font-english,"Novecento Wide",sans-serif); letter-spacing:.025em; overflow-wrap:anywhere; }
.history-ep-description { margin:0; color:var(--ep-muted); font-size:11px; line-height:1.85; overflow-wrap:anywhere; }
.history-ep-controls { display:flex; align-items:center; flex-wrap:wrap; gap:10px 16px; margin-top:17px; }
.history-ep button.history-ep-play { display:inline-flex; align-items:center; justify-content:center; gap:9px; min-height:39px; padding:8px 15px; border:1px solid #3d4b32; border-left:3px solid var(--ep-lime); border-radius:0; background:#30362c; color:#f4f7ee; font:500 11px/1.5 var(--font-display,"Noto Sans SC",sans-serif); cursor:pointer; transition:background .18s,color .18s; }
.history-ep button.history-ep-play::before,.history-ep button.history-ep-play::after { content:none; }
.history-ep button.history-ep-play:hover,.history-ep.is-playing button.history-ep-play { color:#26301d; background:var(--ep-lime); border-color:#a7c52b; }
.history-ep-status { min-width:0; display:flex; flex-direction:column; gap:3px; font-size:10px; line-height:1.6; color:var(--ep-muted); }
.history-ep-status time { font:11px/1.4 var(--font-mono,"Bender",monospace); font-variant-numeric:tabular-nums; letter-spacing:.07em; color:#526046; }
.history-ep-status time i { font-style:normal; padding:0 4px; color:var(--ep-muted); }
.history-ep-progress { height:2px; background:#cfd8c5; margin:15px 0 11px; overflow:hidden; }
.history-ep-progress>span { display:block; height:100%; max-width:100%; background:#74931d; transition:width .2s linear; }
.history-ep.is-playing .history-ep-progress>span { background:#8fae19; }
.history-ep .history-ep-error { margin:0 0 11px; font-size:10px; line-height:1.8; color:#8a4b39; }
.history-ep-links { display:flex; align-items:center; flex-wrap:wrap; gap:7px 17px; }
.history-ep .history-ep-links button,.history-ep .history-ep-links a { display:inline-flex; align-items:center; gap:4px; padding:0; min-height:24px; border:0; border-radius:0; color:var(--ep-muted); background:transparent; box-shadow:none; font:400 9px/1.6 var(--font-display,"Noto Sans SC",sans-serif); text-decoration:none; cursor:pointer; transition:color .18s; }
.history-ep .history-ep-links button::before,.history-ep .history-ep-links button::after { content:none; }
.history-ep .history-ep-links button:hover,.history-ep .history-ep-links a:hover { color:#26391d; text-decoration:underline; text-underline-offset:3px; }
.history-ep :is(button,a):focus-visible { outline:2px solid var(--iris); outline-offset:4px; }
.history-ep-audio { display:none; }
@media(max-width:700px) {
  .history-ep { grid-template-columns:minmax(0,1fr); margin-top:20px; }
  .history-ep-cover { height:177px; justify-content:center; }
  .history-ep-cover img { width:100%; height:100%; object-position:center; }
  .history-ep-cover-label { left:6px; bottom:7px; max-width:calc(100% - 12px); padding:3px 4px; font-size:5px; }
  .history-ep-body { padding:15px 14px 12px; }
  .history-ep-kicker { font-size:6px; letter-spacing:.08em; }
  .history-ep-kicker>i { margin:0 4px; }
  .history-ep .history-ep-body h4 { font-size:23px; margin:6px 0; }
  .history-ep-description { font-size:10px; line-height:1.75; }
  .history-ep-controls { margin-top:12px; gap:7px 10px; }
  .history-ep button.history-ep-play { min-height:36px; padding:7px 11px; font-size:10px; gap:6px; }
  .history-ep-status { font-size:9px; }
  .history-ep-status time { font-size:10px; }
  .history-ep-progress { margin:11px 0 7px; }
  .history-ep-links { gap:4px 11px; }
  .history-ep .history-ep-links button,.history-ep .history-ep-links a { font-size:8px; }
}
@media(max-width:380px) {
  .history-ep-cover { height:145px; }
  .history-ep-body { padding:13px 10px 10px; }
  .history-ep-kicker { font-size:5px; letter-spacing:.03em; }
  .history-ep-kicker>i { margin:0 3px; }
  .history-ep .history-ep-body h4 { font-size:21px; }
  .history-ep-cover-label { font-size:4px; letter-spacing:.02em; }
}
@media(prefers-reduced-motion:reduce) {
  .history-ep * { transition:none!important; animation:none!important; }
}
/* Narrative event reading. Scoped to the shared detail component, including editor preview. */
.history-detail-dialog.history-detail-story-dialog {
  width:min(790px,78vw);
  border-left-width:2px;
  background:#f3f5f1;
  box-shadow:-2px 0 rgb(var(--iris-rgb) / 0.270588235),-24px 0 80px #18211d4d;
  font-family:var(--font-display);
  font-synthesis:none;
}
.history-detail-dialog.history-detail-story-dialog::backdrop { background:#1e242c80; backdrop-filter:blur(3px); }
.history-detail-story-dialog .history-detail-header {
  position:relative;
  padding:31px 37px 28px;
  background:linear-gradient(115deg,#252b2b,#3c4340);
  border-bottom:0;
  isolation:isolate;
}
.history-detail-story-dialog .history-detail-header::before {
  content:""; position:absolute; inset:0; z-index:-1; pointer-events:none;
  background:linear-gradient(135deg,transparent 75%,#e6eddb08 75.1%,transparent 75.3%),repeating-linear-gradient(0deg,transparent 0 10px,#e8eee706 10px 11px);
}
.history-detail-story-dialog .history-detail-header::after { content:""; position:absolute; left:37px; bottom:0; width:72px; height:3px; background:var(--accent); }
.history-detail-story-dialog .history-detail-header>div>span { color:#bfc8bd; font:700 10px/1.7 var(--font-english,var(--font-mono,monospace)); letter-spacing:.1em; }
.history-detail-story-dialog .history-detail-record-code { font-family:var(--font-mono); font-weight:400; }
.history-detail-story-dialog .history-detail-header h2 { max-width:610px; margin:17px 0 0; font-family:var(--font-english); font-size:clamp(24px,2.2vw,33px); font-weight:500; letter-spacing:.025em; line-height:1.55; color:#f4f7f2; }
.history-detail-story-dialog .history-reading-header-caption { margin:12px 0 0; color:#a9b5aa; font-size:10px; letter-spacing:.1em; }
.history-detail-story-dialog button.history-detail-close { background:#edf2e90b; border-color:#e0e6dc38; width:37px; height:37px; }
.history-detail-story-dialog .history-detail-body { padding:0 37px 38px; background:linear-gradient(90deg,#e4e9df45 0,transparent 90px),#f3f5f1; scrollbar-color:#adb6a7 #edf0e8; }
.history-detail-content.history-detail-story { --history-reading-line:#cbd2c7; color:#353d36; font-family:var(--font-display); font-synthesis:none; }
.history-detail-story .history-detail-notice { margin:19px 0 0; }
.history-detail-story .history-reading-artwork { margin:25px 0 0; }
.history-detail-story .history-reading-artwork img { display:block; width:100%; height:auto; object-fit:contain; background:#303833; border:1px solid #d5ddce; }
.history-detail-story .history-reading-artwork figcaption { display:flex; align-items:flex-start; justify-content:space-between; gap:15px; margin-top:9px; color:#6d7a65; font-size:10px; line-height:1.8; }
.history-detail-story .history-reading-artwork figcaption>span { min-width:0; }
.history-detail-story .history-reading-artwork figcaption small { display:block; margin-top:2px; color:#919b87; font-size:9px; }
.history-detail-story .history-reading-artwork figcaption a { display:inline-flex; align-items:center; gap:5px; flex-shrink:0; color:#536946; border-bottom:1px solid #b4c19f; padding-bottom:2px; font-size:9px; }
.history-detail-story .history-reading-artwork figcaption a:hover { color:#5869ab; }
.history-detail-story .history-reading-coordinate { padding:25px 0 21px; border-bottom:1px solid var(--history-reading-line); }
.history-detail-story .history-reading-kicker { display:block; font:700 9px/1.6 var(--font-english,var(--font-mono,monospace)); color:#7e897b; letter-spacing:.11em; }
.history-detail-story .history-reading-kicker-cn { font-family:var(--font-display); font-weight:400; letter-spacing:.05em; }
.history-detail-story .history-reading-kicker i { font-style:normal; color:#a8b49d; padding:0 5px; }
.history-detail-story .history-detail-facts { grid-template-columns:repeat(2,minmax(0,1fr)); margin:11px 0 0; gap:11px 23px; }
.history-detail-story .history-detail-facts>div { padding:0; border:0; }
.history-detail-story .history-detail-facts .history-detail-date { margin:0 0 4px; }
.history-detail-story .history-detail-date dd { font:500 24px/1.55 var(--font-display,var(--font-sans,sans-serif)); color:#323c32; letter-spacing:.025em; }
.history-detail-story .history-detail-facts dt { margin:0 0 3px; color:#85907e; font-size:9px; }
.history-detail-story .history-detail-facts dd { color:#53604c; font-size:11px; line-height:1.8; }
.history-detail-story .history-detail-facts .history-detail-date dd { font-size:24px; color:#323c32; }
.history-detail-story .history-reading-sr-only { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.history-detail-story .history-reading-intro { padding:25px 0 30px; border-bottom:1px solid var(--history-reading-line); }
.history-detail-story .history-detail-summary { padding:0; margin-top:13px; background:none; border:0; font-size:15px; line-height:2.1; color:#3c4838; }
.history-detail-story .history-detail-summary p { font-weight:500; }
.history-detail-story .history-detail-summary p+p { margin-top:13px; }
.history-detail-story .history-reading-narrative { padding:3px 0 6px; }
.history-detail-story .history-reading-section { margin-top:30px; }
.history-detail-story .history-reading-section-heading { display:flex; align-items:flex-start; gap:16px; margin-bottom:13px; }
.history-detail-story .history-reading-section-number { flex-shrink:0; font:25px/1.3 var(--font-mono,monospace); color:#aab5a1; padding-top:6px; }
.history-detail-story .history-reading-section-heading>div { min-width:0; }
.history-detail-story .history-reading-section-heading small { display:block; font:700 8px/1.6 var(--font-english,var(--font-mono,monospace)); color:#88967f; letter-spacing:.14em; }
.history-detail-story .history-reading-section-heading h3 { display:block; margin:1px 0 0; color:#333e31; font-size:19px; font-weight:550; line-height:1.6; letter-spacing:.04em; }
.history-detail-story .history-reading-section h3::before,.history-detail-story .history-reading-section h3::after { content:none; }
.history-detail-story .history-reading-prose { padding-left:43px; }
.history-detail-story .history-reading-prose p { font-size:13px; line-height:2.15; color:#535e4e; margin-bottom:15px; }
.history-detail-story .history-reading-prose p:last-child { margin-bottom:0; }
.history-detail-story .history-reading-support-heading { display:flex; align-items:baseline; gap:10px; flex-wrap:wrap; margin-bottom:14px; }
.history-detail-story .history-reading-support-heading>span { font:700 8px/1.8 var(--font-english,var(--font-mono,monospace)); color:#85917c; letter-spacing:.09em; }
.history-detail-story .history-reading-support-heading h3 { display:block; font-size:15px; margin:0; letter-spacing:.04em; color:#45513d; }
.history-detail-story .history-reading-support-heading h3::before,.history-detail-story .history-reading-support-heading h3::after { content:none; }
.history-detail-story .history-reading-support-heading>small { margin-left:auto; color:#8b957f; font-size:9px; }
.history-detail-story .history-reading-people { padding-top:24px; border-top:1px solid var(--history-reading-line); }
.history-detail-story .history-reading-people ul { list-style:none; display:flex; flex-wrap:wrap; gap:7px; margin:0; padding:0; }
.history-detail-story .history-reading-people li { padding:5px 10px; border:1px solid #c8d1bf; color:#55634b; background:#e7ecdf8c; font-size:11px; line-height:1.7; }
.history-detail-story .history-reading-connections { padding:21px; background:#333b36; border-top:2px solid #b8ce56; }
.history-detail-story .history-reading-connections .history-reading-support-heading>span { color:#9ba88e; }
.history-detail-story .history-reading-connections .history-reading-support-heading h3 { color:#edf2e9; }
.history-detail-story .history-related { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.history-detail-story .history-related-group { min-width:0; }
.history-detail-story .history-related h4 { color:#a0af94; font-size:10px; }
.history-detail-story .history-related a { margin-top:7px; min-height:81px; padding:11px 12px; color:#eef3e8; background:#e4edda09; border-color:#b1c1a133; font-size:12px; line-height:1.8; }
.history-detail-story .history-related a svg { flex-shrink:0; color:var(--accent); }
.history-detail-story .history-related a small { color:#a0b38e; font-size:8px; letter-spacing:.08em; }
.history-detail-story .history-related a:hover { background:rgb(var(--accent-rgb) / 0.109803922); border-color:#b7cf72; }
.history-detail-story .history-reading-evidence { margin-top:28px; padding-top:22px; border-top:1px solid var(--history-reading-line); }
.history-detail-story .history-reading-evidence>p { font-size:11px; line-height:1.9; color:#7b8870; }
.history-detail-story .history-reading-evidence li { margin-top:9px; padding:14px 15px 14px 43px; background:#f8faf5c7; border-color:#d5dccf; }
.history-detail-story .history-reading-evidence h4 { color:#4d5b43; font-size:12px; }
.history-detail-story .history-reading-evidence p { font-size:11px; color:#7a876e; line-height:1.95; }
.history-detail-story .history-reading-evidence a { font-size:10px; border-color:#aebd9c; }
.history-detail-story .history-reading-resources { border-top:1px solid var(--history-reading-line); padding-top:22px; }
.history-detail-story .history-resource-links a { border-color:#d0d8c7; background:#e9eedf; color:#4b5a3f; }
.history-detail-story .history-resource-links a:hover { background:#dce8b8; }
.history-detail-story-dialog .history-detail-footer { background:#e6ebdf; padding:13px 30px max(13px,env(safe-area-inset-bottom)); border-color:#cbd4c1; }
@media(max-width:700px) {
  .history-detail-dialog.history-detail-story-dialog { inset:0; width:100vw; max-width:100vw; border-left:0; border-top-width:2px; }
  .history-detail-story-dialog .history-detail-header { padding:20px 19px 18px; gap:12px; }
  .history-detail-story-dialog .history-detail-header::after { left:19px; width:48px; }
  .history-detail-story-dialog .history-detail-header>div>span { font-size:8px; letter-spacing:.07em; }
  .history-detail-story-dialog .history-detail-header h2 { font-size:22px; line-height:1.55; margin-top:10px; }
  .history-detail-story-dialog .history-reading-header-caption { font-size:9px; margin-top:8px; }
  .history-detail-story-dialog button.history-detail-close { width:33px; height:33px; }
  .history-detail-story-dialog .history-detail-body { padding:0 19px 29px; }
  .history-detail-story .history-reading-artwork { margin-top:20px; }
  .history-detail-story .history-reading-artwork figcaption { font-size:9px; gap:10px; }
  .history-detail-story .history-reading-artwork figcaption small { font-size:8px; }
  .history-detail-story .history-reading-coordinate { padding:21px 0 19px; }
  .history-detail-story .history-reading-kicker { font-size:8px; }
  .history-detail-story .history-detail-facts { gap:10px 15px; }
  .history-detail-story .history-detail-facts .history-detail-date dd { font-size:21px; }
  .history-detail-story .history-detail-facts dd { font-size:10px; }
  .history-detail-story .history-reading-intro { padding:22px 0 25px; }
  .history-detail-story .history-detail-summary { font-size:13px; line-height:2.05; margin-top:10px; }
  .history-detail-story .history-reading-section { margin-top:24px; }
  .history-detail-story .history-reading-section-heading { gap:12px; margin-bottom:10px; }
  .history-detail-story .history-reading-section-number { font-size:21px; padding-top:6px; }
  .history-detail-story .history-reading-section-heading h3 { font-size:17px; }
  .history-detail-story .history-reading-prose { padding-left:0; }
  .history-detail-story .history-reading-prose p { font-size:12px; line-height:2.1; margin-bottom:13px; }
  .history-detail-story .history-reading-support-heading { gap:7px; }
  .history-detail-story .history-reading-support-heading>span { font-size:7px; }
  .history-detail-story .history-reading-support-heading h3 { font-size:14px; }
  .history-detail-story .history-reading-connections { padding:17px 14px; }
  .history-detail-story .history-related { gap:10px; }
  .history-detail-story .history-related a { padding:10px; font-size:11px; gap:8px; }
  .history-detail-story .history-related a svg { width:13px; }
  .history-detail-story .history-reading-evidence li { padding:13px 12px 13px 36px; }
  .history-detail-story-dialog .history-detail-footer { padding:11px 17px max(11px,env(safe-area-inset-bottom)); }
}
@media(max-width:350px) {
  .history-detail-story-dialog .history-detail-header { padding:17px 15px 17px; }
  .history-detail-story-dialog .history-detail-header::after { left:15px; }
  .history-detail-story-dialog .history-detail-header h2 { font-size:20px; }
  .history-detail-story-dialog .history-detail-body { padding:0 15px 25px; }
  .history-detail-story .history-reading-connections { padding:16px 12px; }
  .history-detail-story .history-related { grid-template-columns:1fr; gap:15px; }
  .history-detail-story .history-related a { min-height:65px; }
  .history-detail-story-dialog .history-detail-footer { padding-left:14px; padding-right:14px; }
}
@media(prefers-reduced-motion:reduce) {
  .history-detail-dialog.history-detail-story-dialog * { transition:none!important; animation:none!important; scroll-behavior:auto!important; }
}
.history-manager {
  --hm-ink: #242720;
  --hm-muted: #646b60;
  --hm-line: #b9c0b4;
  --hm-accent: var(--accent);
  max-width: 1440px;
  min-width: 0;
  margin: 0 auto;
  padding: 38px clamp(14px, 3vw, 46px) 64px;
  color: var(--hm-ink);
}
.history-manager *, .history-manager *::before, .history-manager *::after { box-sizing: border-box; }
.history-manager h1, .history-manager h2, .history-manager h3, .history-manager p { margin: 0; }
.history-manager h1 { margin: 8px 0; font-size: clamp(25px, 3vw, 38px); color: var(--hm-ink); }
.history-manager h2 { font-size: 20px; line-height: 1.5; color: var(--hm-ink); overflow-wrap: anywhere; }
.history-manager h3 { font-size: 16px; line-height: 1.5; color: var(--hm-ink); }
.history-manager p { line-height: 1.75; }
.history-manager .hm-eyebrow { font: 12px var(--font-mono, monospace); letter-spacing: .1em; color: #687259; }
.history-manager .hm-heading, .history-manager .hm-edit-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.history-manager .hm-heading > div:first-child, .history-manager .hm-edit-heading > div:first-child { min-width: 0; }
.history-manager .hm-heading p { color: var(--hm-muted); font-size: 14px; }
.history-manager .hm-save { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 10px; flex-shrink: 0; font-size: 12px; }
.history-manager button, .history-manager input, .history-manager textarea, .history-manager select { font: inherit; border-radius: 0; }
.history-manager button { cursor: pointer; }
.history-manager button:disabled { cursor: not-allowed; opacity: .45; }
.history-manager .hm-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 38px; padding: 8px 12px; border: 1px solid #697061;
  background: #30352c; color: #f4f6f0; font-size: 12px; line-height: 1.5;
  transition: background .16s ease, color .16s ease, border-color .16s ease;
  white-space: normal; text-align: center;
}
.history-manager .hm-button::before, .history-manager .hm-button::after { display: none; }
.history-manager .hm-button:not(:disabled):hover { color: #20251a; background: #d9e6af; border-color: #95ad48; }
.history-manager .hm-button.hm-primary { background: var(--accent); color: #21261a; border-color: #a4c41b; font-weight: 700; }
.history-manager .hm-button.hm-primary:not(:disabled):hover { background: #dcf572; }
.history-manager .hm-button.hm-danger { border-color: #bc8880; background: #fff7f2; color: #853e32; }
.history-manager :is(button, a, input, select, textarea):focus-visible { outline: 3px solid #567333; outline-offset: 3px; }
.history-manager .hm-session { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin: 24px 0 18px; padding: 12px 15px; border-left: 3px solid var(--hm-accent); background: #363b32; color: #edf0e8; font-size: 12px; }
.history-manager .hm-session > div { display: flex; gap: 18px; align-items: center; }
.history-manager .hm-session a, .history-manager .hm-session button { padding: 0; border: 0; background: none; color: #d4ec92; text-decoration: underline; text-underline-offset: 3px; }
.history-manager .hm-alert { padding: 14px 16px; margin: 14px 0; border: 1px solid #cbad9c; border-left: 3px solid #a46b4a; background: #fff4e8; color: #68391f; font-size: 13px; overflow-wrap: anywhere; }
.history-manager .hm-alert p + p { margin-top: 6px; }
.history-manager .hm-notice { margin: 14px 0; padding: 12px 16px; border: 1px solid #a8bc7d; border-left: 3px solid #84a335; background: #ecf3db; color: #3e531e; font-size: 13px; }
.history-manager .hm-access { max-width: 760px; padding: 25px; margin: 20px 0; border: 1px solid var(--hm-line); background: #f5f7f2; }
.history-manager .hm-access > .hm-button { margin-top: 18px; }
.history-manager .hm-access .admin-login { margin: 16px 0; }
.history-manager .hm-tools { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 10px 0 20px; }
.history-manager .hm-tabs, .history-manager .hm-tools-actions, .history-manager .hm-icon-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.history-manager .hm-tabs > button { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 10px 14px; border: 1px solid #b5bdae; color: #4d5645; background: #eef1e9; font-size: 14px; }
.history-manager .hm-tabs > button[aria-pressed="true"] { background: #333a2d; border-color: #333a2d; color: #eff3e8; box-shadow: inset 0 -2px var(--accent); }
.history-manager .hm-tabs small { font-size: 11px; opacity: .8; }
.history-manager .hm-fields { min-width: 0; margin: 0; padding: 0; border: 0; }
.history-manager .hm-workspace { display: grid; grid-template-columns: minmax(210px, 280px) minmax(0, 1fr); gap: 22px; align-items: start; }
.history-manager .hm-list { min-width: 0; padding: 18px; border: 1px solid #686f60; background: #363b32; color: #edf0e8; }
.history-manager label { display: grid; align-content: start; gap: 7px; font-size: 13px; line-height: 1.5; min-width: 0; }
.history-manager :is(input:not([type="checkbox"]), textarea, select) { display: block; width: 100%; min-width: 0; min-height: 40px; padding: 10px 11px; border: 1px solid #b8c0ae; background: #fff; color: #252c20; box-shadow: none; font-size: 14px; line-height: 1.6; }
.history-manager input[readonly] { background: #e7ece0; color: #536048; font-family: var(--font-mono, monospace); font-size: 11px; }
.history-manager textarea { resize: vertical; min-height: 88px; }
.history-manager label > small, .history-manager .hm-hint { color: #697260; font-size: 11px; line-height: 1.6; }
.history-manager .hm-list .hm-add { width: 100%; margin: 12px 0 16px; background: var(--accent); color: #29311d; border-color: var(--accent); }
.history-manager .hm-event-list { display: grid; gap: 7px; max-height: 650px; overflow: auto; overscroll-behavior: contain; padding-right: 3px; }
.history-manager .hm-event-list > button { display: grid; gap: 6px; min-width: 0; padding: 12px; border: 1px solid #606952; background: #3d4435; color: #e5ebdc; text-align: left; overflow-wrap: anywhere; }
.history-manager .hm-event-list > button:hover { border-color: #bdcc9e; }
.history-manager .hm-event-list > button[aria-pressed="true"] { background: #eff3e9; color: #28331c; border-color: #d5e5af; box-shadow: inset 3px 0 var(--accent); }
.history-manager .hm-event-list small, .history-manager .hm-event-list span { font-size: 11px; opacity: .8; }
.history-manager .hm-event-list strong { font-size: 14px; line-height: 1.5; }
.history-manager .hm-editor, .history-manager .hm-stage-settings { min-width: 0; padding: 24px; border: 1px solid #c4ccbb; border-bottom: 3px solid var(--accent); background: rgb(var(--glass-rgb) / .94); }
.history-manager .hm-edit-heading { margin-bottom: 20px; align-items: center; }
.history-manager .hm-icon-actions { flex-shrink: 0; }
.history-manager .hm-icon-actions > .hm-button { min-height: 35px; padding: 7px 10px; }
.history-manager .hm-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 18px; }
.history-manager .hm-full { grid-column: 1 / -1; }
.history-manager .hm-section { padding: 20px 0 0; border-top: 1px solid #c5cdbb; }
.history-manager .hm-section > h3 { margin-bottom: 10px; }
.history-manager .hm-section > p { font-size: 12px; color: #6c735f; margin-bottom: 14px; }
.history-manager .hm-inline { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.history-manager .hm-source { margin: 15px 0; padding: 16px; border: 1px solid #c2cbb6; background: #e9eee3; }
.history-manager .hm-source .hm-edit-heading { margin-bottom: 14px; }
.history-manager .hm-checkbox { display: flex; align-items: flex-start; gap: 9px; padding: 8px 0; line-height: 1.6; }
.history-manager .hm-checkbox input { width: 17px; height: 17px; margin: 3px 0 0; flex-shrink: 0; accent-color: #607d29; }
.history-manager .hm-checkbox span { min-width: 0; overflow-wrap: anywhere; font-size: 13px; }
.history-manager .hm-checkbox small { display: block; color: #697260; font-size: 11px; }
.history-manager .hm-relations { min-width: 0; }
.history-manager .hm-relations h3 { margin-bottom: 10px; }
.history-manager .hm-relations h3 small { font-size: 11px; color: #6c765f; font-weight: 400; }
.history-manager .hm-choice-list { max-height: 240px; overflow: auto; overscroll-behavior: contain; padding: 8px 12px; margin-top: 8px; border: 1px solid #c7d0bd; background: #edf1e8; }
.history-manager .hm-choice-list > p { color: #6c765f; font-size: 12px; }
.history-manager .hm-empty { padding: 60px 0; text-align: center; }
.history-manager .hm-empty p { margin-top: 12px; color: #67735b; }
.history-manager .hm-stage { padding: 22px; margin-top: 20px; border: 1px solid #b7c3a6; background: #f3f6ee; }
.history-manager .hm-stage > .hm-hint { margin-top: 14px; }
.history-manager .hm-unassigned { background: #e7ecdf; }
.history-manager .hm-unassigned p { margin-top: 8px; font-size: 13px; color: #606c51; }
.history-manager .hm-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 24px; font-size: 12px; color: #606c51; }
.history-manager .hm-confirm { max-width: min(520px, calc(100vw - 28px)); width: 520px; padding: 26px; border: 1px solid #b4c49a; border-bottom: 3px solid var(--accent); background: #f2f5eb; color: #2c3522; }
.history-manager .hm-confirm::backdrop { background: rgb(22 28 17 / .66); }
.history-manager .hm-confirm h2 { margin: 0 0 12px; font-size: 22px; }
.history-manager .hm-confirm p { font-size: 14px; line-height: 1.8; }
.history-manager .hm-confirm > div { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 22px; }
@media (max-width: 1050px) {
  .history-manager .hm-workspace { grid-template-columns: minmax(190px, 230px) minmax(0, 1fr); gap: 14px; }
  .history-manager .hm-editor, .history-manager .hm-stage-settings { padding: 18px; }
  .history-manager .hm-edit-heading { flex-wrap: wrap; }
}
@media (max-width: 760px) {
  .history-manager { padding: 22px 12px 42px; }
  .history-manager .hm-heading { display: block; }
  .history-manager .hm-heading p { font-size: 12px; }
  .history-manager .hm-save { margin-top: 14px; justify-content: space-between; }
  .history-manager .hm-session { margin: 18px 0 12px; padding: 10px 12px; }
  .history-manager .hm-tools { gap: 12px; }
  .history-manager .hm-tools-actions { width: 100%; }
  .history-manager .hm-workspace { display: block; }
  .history-manager .hm-list { margin-bottom: 14px; padding: 13px; }
  .history-manager .hm-event-list { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 255px; gap: 6px; }
  .history-manager .hm-event-list > button { padding: 9px; }
  .history-manager .hm-event-list strong { font-size: 12px; }
  .history-manager .hm-editor, .history-manager .hm-stage-settings, .history-manager .hm-access { padding: 15px; }
  .history-manager .hm-form { grid-template-columns: minmax(0, 1fr); gap: 15px; }
  .history-manager .hm-icon-actions { width: 100%; }
  .history-manager .hm-button { min-height: 40px; }
  .history-manager .hm-stage { padding: 13px; }
  .history-manager .hm-source { padding: 12px; }
  .history-manager .hm-choice-list { max-height: 210px; }
  .history-manager .hm-heading h1 { font-size: 27px; }
}
@media (prefers-reduced-motion: reduce) {
  .history-manager *, .history-manager *::before, .history-manager *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
.personnel-dossier-views {display:flex;gap:8px;flex-wrap:wrap;margin:16px 0 20px}
.personnel-dossier-views button {display:flex;align-items:center;gap:10px;min-height:40px;padding:9px 16px;background:var(--charcoal);color:#eaece8;border:1px solid #585c53;font-size:13px;cursor:pointer}
.personnel-dossier-views button span {font-family:var(--font-display,"Novecento Wide"),sans-serif;font-size:10px;letter-spacing:.08em;opacity:.7}
.personnel-dossier-views button[aria-pressed=true] {background:#eaece8;color:var(--charcoal-deep);border-bottom:3px solid var(--accent)}
.personnel-dossier-views button:focus-visible,.admin-workspace-nav a:focus-visible {outline:2px solid var(--iris);outline-offset:3px}
.admin-workspace-nav {display:flex;flex-wrap:wrap;gap:8px;max-width:1440px;margin:24px auto 0;padding:0 32px}
.admin-workspace-nav a {display:flex;align-items:center;gap:12px;min-height:42px;padding:10px 20px;background:var(--charcoal);color:#eaece8;border-bottom:3px solid transparent;text-decoration:none}
.admin-workspace-nav a[aria-current=page] {border-color:var(--accent);color:var(--accent)}
.admin-workspace-nav small {font-family:var(--font-display,"Novecento Wide"),sans-serif;font-size:10px;letter-spacing:.08em}
.resource-library .resource-item.is-linked-resource {outline:2px solid #749018;outline-offset:4px;scroll-margin:30px}
@media(max-width:599px){.personnel-dossier-views {gap:6px;margin:12px 0}.personnel-dossier-views button {flex:1;padding:9px 7px;justify-content:center;gap:6px;font-size:12px}.personnel-dossier-views button span{font-size:9px}.admin-workspace-nav {margin-top:12px;padding:0 14px}.admin-workspace-nav a {flex:1;justify-content:center;padding:9px 8px;font-size:13px}}
/* Three archive subviews and owner modules retain readable, wrapped labels. */
.personnel-dossier-views button {flex-wrap:wrap;justify-content:center}
.admin-workspace-nav a {flex-wrap:wrap}
@media(max-width:599px){.personnel-dossier-views button {flex:1 1 100px;flex-direction:column;gap:3px}.admin-workspace-nav a {flex:1 1 110px;gap:4px 8px}.admin-workspace-nav small{font-size:9px}}
/* 遗尘拾录 reader and editor preview share one isolated namespace. */
.page-knowledge > .main-content > .knowledge-reader { width:calc(100% - 2 * var(--nav-gutter)); max-width:1160px; margin:32px auto 48px; }
.page-knowledge .knowledge-article { max-width:960px; margin-inline:auto; }
@media(max-width:799px) {
 .page-knowledge > .main-content > .knowledge-reader { margin-block:16px 28px; }
}
.knowledge-reader { --kn-ink:#292f26; --kn-muted:#66715c; --kn-paper:#f3f5eedf; --kn-line:#c8d0bd; --kn-lime:var(--accent); color:var(--kn-ink); font-family:var(--font-display,sans-serif); font-synthesis:none; width:100%; min-width:0; scroll-margin-top:24px; }
.knowledge-reader *, .knowledge-image-dialog * { box-sizing:border-box; }
.knowledge-reader :is(h2,h3,h4,p,figure,blockquote) { margin:0; }
.knowledge-reader :is(button,a):focus-visible,.knowledge-image-dialog button:focus-visible { outline:2px solid var(--iris); outline-offset:4px; }
.knowledge-reader:focus:not(:focus-visible),.knowledge-reader :is(h2,li):focus:not(:focus-visible) { outline:none; }
.knowledge-reader :is(button,a) { touch-action:manipulation; }
.knowledge-cover { position:relative; overflow:hidden; padding:22px 27px 17px; background:repeating-linear-gradient(0deg,transparent 0 5px,#f4f6ed04 5px 6px),linear-gradient(115deg,#30362c,#424c36); color:#eff3e9; border:1px solid #ffffffbd; border-left:3px solid var(--kn-lime); box-shadow:2px 0 rgb(var(--iris-rgb) / 0.231372549); }
.knowledge-cover::before { content:''; position:absolute; inset:0; background:linear-gradient(123deg,transparent 73%,rgb(var(--accent-rgb) / 0.050980392) 73% 73.2%,transparent 73.2% 79%,rgb(var(--accent-rgb) / 0.043137255) 79% 79.1%,transparent 79.1%); pointer-events:none; }
.knowledge-cover-top { display:flex; justify-content:space-between; gap:12px; border-bottom:1px solid #eff3e925; padding-bottom:13px; color:#bbc8ac; font:700 9px/1.6 var(--font-english,sans-serif); letter-spacing:.1em; }
.knowledge-cover-title { position:relative; display:flex; align-items:center; justify-content:space-between; gap:18px; padding:30px 0 26px; }
.knowledge-kicker { color:#b2c097; font:700 9px/1.6 var(--font-english,sans-serif); letter-spacing:.13em; }
.knowledge-reader .knowledge-cover h2 { color:#f3f5ed; font:400 clamp(28px,3.2vw,42px)/1.4 var(--font-english,sans-serif); letter-spacing:.13em; margin:9px 0 7px; }
.knowledge-cover h2>span { color:var(--kn-lime); margin-left:4px; }
.knowledge-cover-title p { color:#c1ccb5; font-size:12px; line-height:1.8; letter-spacing:.04em; }
.knowledge-cover-mark { color:rgb(var(--accent-rgb) / 0.368627451); font:110px/.8 var(--font-display,sans-serif); flex:0 0 auto; margin-right:6px; transform:rotate(12deg); }
.knowledge-cover-bottom { position:relative; display:flex; align-items:center; justify-content:space-between; gap:10px; padding-top:14px; border-top:1px solid #eff3e920; font-size:11px; color:#bdc9b1; }
.knowledge-cover-bottom b { font:25px/1 var(--font-mono,sans-serif); color:var(--kn-lime); margin-right:6px; }
.knowledge-list-heading { display:flex; justify-content:space-between; align-items:baseline; gap:12px; padding:28px 1px 15px; }
.knowledge-reader .knowledge-list-heading h3 { font:500 15px/1.5 var(--font-english,sans-serif); letter-spacing:.04em; color:#3c4830; }
.knowledge-list-heading>span { font:700 9px/1.6 var(--font-english,sans-serif); color:#7c886d; letter-spacing:.08em; text-align:right; }
.knowledge-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; align-items:stretch; }
.knowledge-grid.is-single { grid-template-columns:minmax(0,1fr); }
.knowledge-grid.is-single .knowledge-card { display:grid; grid-template-columns:minmax(0,1.05fr) minmax(0,1fr); }
.knowledge-grid.is-single .knowledge-card-image { aspect-ratio:auto; min-height:260px; }
.knowledge-card { display:flex; flex-direction:column; min-width:0; border:1px solid #ffffffed; border-bottom:3px solid #909f74; background:var(--kn-paper); box-shadow:2px 0 rgb(var(--iris-rgb) / 0.133333333),0 10px 25px #252e2008; transition:background .2s,border-color .2s,box-shadow .2s; }
.knowledge-card-image { position:relative; min-width:0; aspect-ratio:16/10; overflow:hidden; background:repeating-linear-gradient(0deg,transparent 0 5px,#8c9b760d 5px 6px),linear-gradient(135deg,#d4dccb,#f1f4eb); }
.knowledge-card-image>img { display:block; width:100%; height:100%; object-fit:cover; object-position:center; transition:filter .22s; }
.knowledge-card-number { position:absolute; top:11px; left:12px; background:#30372be8; border-left:2px solid var(--kn-lime); padding:4px 8px; color:#f0f4e9; font:15px/1.2 var(--font-mono,sans-serif); }
.knowledge-card-text { display:flex; flex-direction:column; flex:1; min-width:0; padding:19px 19px 13px; }
.knowledge-card-meta { display:flex; flex-wrap:wrap; gap:5px 10px; color:#7a856d; font-size:11px; line-height:1.6; }
.knowledge-card-meta>span:first-child { padding:1px 5px; background:#dce8bf; color:#526735; }
.knowledge-reader .knowledge-card h3 { font:500 19px/1.6 var(--font-english,sans-serif); color:#2f3c25; margin:10px 0 9px; letter-spacing:.025em; overflow-wrap:anywhere; }
.knowledge-card-text>p { font-size:13px; line-height:1.95; color:#67715b; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:3; overflow:hidden; margin-bottom:20px; }
.knowledge-card-bottom { display:flex; flex-wrap:wrap; justify-content:space-between; gap:7px 10px; padding-top:11px; margin-top:auto; border-top:1px solid #cad3bf; font-size:11px; color:#7a876b; }
.knowledge-card-bottom>span:last-child { display:flex; align-items:center; gap:9px; color:#4c632f; font-size:11px; }
.knowledge-list-footer { display:flex; flex-wrap:wrap; align-items:center; gap:12px; border-top:1px solid var(--kn-line); padding:22px 0 10px; margin-top:33px; color:#78896a; }
.knowledge-list-footer>span:first-child { color:#7d9a3f; }
.knowledge-list-footer p { font-size:12px; line-height:1.8; }
.knowledge-list-footer>span:last-child { margin-left:auto; font:700 9px/1.6 var(--font-english,sans-serif); letter-spacing:.09em; }
.knowledge-article { max-width:850px; margin:0 auto; min-width:0; background:var(--kn-paper); border:1px solid #ffffffed; box-shadow:2px 0 rgb(var(--iris-rgb) / 0.168627451); padding:0 clamp(20px,3vw,38px); }
.knowledge-breadcrumb { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:17px 0; border-bottom:1px solid #c6cebc; }
.knowledge-breadcrumb a,.knowledge-article-footer a { display:inline-flex; min-height:36px; align-items:center; gap:8px; font-size:12px; color:#5d743d; }
.knowledge-breadcrumb>span,.knowledge-article-footer>span { font:700 9px/1.6 var(--font-english,sans-serif); letter-spacing:.08em; color:#869178; }
.knowledge-article-header { padding:29px 0 23px; }
.knowledge-article-meta { display:flex; flex-wrap:wrap; gap:7px 11px; font-size:11px; color:#7b886d; line-height:1.8; }
.knowledge-article-meta>span:first-child { background:#dce8bf; padding:1px 7px; color:#526735; }
.knowledge-reader .knowledge-article-header h2 { font:400 clamp(24px,2.6vw,34px)/1.5 var(--font-english,sans-serif); letter-spacing:.025em; color:#263321; margin:15px 0 17px; overflow-wrap:anywhere; }
.knowledge-article-header>p { color:#637354; font-size:14px; line-height:1.95; }
.knowledge-article-coordinate { display:flex; flex-wrap:wrap; justify-content:space-between; gap:7px 12px; padding-top:19px; margin-top:21px; border-top:1px solid #cbd3c0; font-size:11px; color:#859175; line-height:1.7; }
.knowledge-article-coordinate>span:first-child { font:700 9px/1.8 var(--font-english,sans-serif); letter-spacing:.08em; }
.knowledge-article-coordinate time { margin-left:6px; color:#657954; }
.knowledge-article-cover { margin:0 calc(-1 * clamp(20px,3vw,38px)) 5px!important; background:#e0e6d8; }
.knowledge-article-cover .knowledge-image-button { aspect-ratio:16/10; max-height:460px; }
.knowledge-article-cover img { width:100%; height:100%; max-height:none; }
.knowledge-image-button { display:block; position:relative; width:100%; min-width:0; padding:0!important; border:0; background:#e1e7d8!important; overflow:hidden; cursor:zoom-in; }
.knowledge-image-button img { display:block; width:100%; max-width:100%; height:auto; object-fit:contain; }
.knowledge-article-cover .knowledge-image-button img { width:100%; height:100%; object-fit:contain; }
.knowledge-image-enlarge { position:absolute; right:10px; bottom:10px; display:flex; align-items:center; gap:6px; padding:6px 8px; color:#eff4e8; background:#30372be8; border-left:2px solid var(--kn-lime); font-size:11px; line-height:1.5; pointer-events:none; }
.knowledge-image-unavailable { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px; padding:35px 16px; min-height:180px; background:#dce4d4; color:#758467; font-size:11px; text-align:center; }
.knowledge-image-unavailable small { font-size:11px; color:#859379; line-height:1.8; }
.knowledge-image-unavailable.is-cover { width:100%; height:100%; min-height:0; }
.knowledge-prose { padding:11px 0 0; min-width:0; }
.knowledge-section-heading { position:relative; display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:29px 0 17px!important; padding-bottom:12px; border-bottom:1px solid #c7d0bb; }
.knowledge-section-heading>span:first-child { color:#839e45; font-size:16px; }
.knowledge-reader .knowledge-section-heading h3 { color:#36452c; font:500 20px/1.6 var(--font-english,sans-serif); letter-spacing:.025em; flex:1 1 180px; }
.knowledge-paragraph { margin:0 0 19px; }
.knowledge-paragraph p { font-size:15px; line-height:1.95; color:#49583e; white-space:pre-wrap; overflow-wrap:anywhere; margin:0 0 12px; }
.knowledge-prose blockquote { position:relative; background:linear-gradient(110deg,#e4eacb99,#f1f4e9); border-left:3px solid #829c47; padding:23px 23px 19px; margin:24px 0; }
.knowledge-prose blockquote>p { position:relative; color:#4a5e36; font:400 15px/2 var(--font-english,sans-serif); white-space:pre-wrap; overflow-wrap:anywhere; }
.knowledge-quote-mark { position:absolute; right:15px; top:4px; color:#a7b88b66; font:75px/1 var(--font-english,sans-serif); pointer-events:none; }
.knowledge-figure { margin:25px 0 28px!important; min-width:0; }
.knowledge-figure>.knowledge-image-button { aspect-ratio:4/3; max-height:650px; border:1px solid #fff!important; box-shadow:2px 0 rgb(var(--iris-rgb) / 0.168627451),-2px 0 #b8d45e40; }
.knowledge-figure .knowledge-image-button img { width:100%; height:100%; max-height:none; object-fit:contain; }
.knowledge-figure figcaption { display:flex; flex-wrap:wrap; align-items:start; gap:6px 15px; margin-top:10px; color:#7b886c; font-size:12px; line-height:1.8; }
.knowledge-figure figcaption>span:first-child:not(.knowledge-source-markers) { flex:1 1 180px; }
.knowledge-source-markers { display:inline-flex; flex-wrap:wrap; gap:5px; padding-top:4px; }
.knowledge-reader button.knowledge-source-marker { display:inline-flex; align-items:center; gap:5px; min-height:30px; background:#e5ebdc; color:#73865e; border:1px solid #cfd9c2; padding:4px 7px; font-size:11px; line-height:1.6; }
.knowledge-source-marker b { color:#526c34; font:10px/1.3 var(--font-mono,sans-serif); }
.knowledge-reader button.knowledge-source-marker.is-creator,.knowledge-reader button.knowledge-source-marker.is-analysis { background:#ecebdd; border-color:#d8d2bb; color:#8a7854; }
.knowledge-reader button.knowledge-source-marker.is-literature { background:#e3e8e9; border-color:#cbd3d5; color:#6d7c84; }
.knowledge-sources { padding:26px 0 22px; margin-top:34px; border-top:3px solid #859c53; }
.knowledge-sources>header { display:flex; flex-wrap:wrap; align-items:end; justify-content:space-between; gap:10px; margin-bottom:15px; }
.knowledge-sources>header>div>span,.knowledge-related>header>span { color:#7b8e68; font:700 9px/1.6 var(--font-english,sans-serif); letter-spacing:.09em; }
.knowledge-reader .knowledge-sources h3,.knowledge-reader .knowledge-related h3 { font:500 19px/1.7 var(--font-english,sans-serif); color:#3b4e2c; margin:5px 0 0; }
.knowledge-sources>header>span { font:10px/1.7 var(--font-mono,sans-serif); color:#859578; }
.knowledge-evidence-note { color:#7a856c; font-size:12px; line-height:1.95; margin:0 0 20px!important; }
.knowledge-sources ol { list-style:none; padding:0; margin:0; }
.knowledge-sources li { display:flex; gap:13px; padding:18px 0; border-top:1px solid #d0d8c5; scroll-margin-top:30px; }
.knowledge-sources li>div { flex:1; min-width:0; }
.knowledge-source-number { color:#a1ae90; font:23px/1.4 var(--font-mono,sans-serif); min-width:29px; }
.knowledge-source-meta { display:flex; flex-wrap:wrap; align-items:center; gap:10px; font-size:11px; line-height:1.7; color:#879578; }
.knowledge-source-kind { display:inline-block; color:#5f7544; padding:1px 6px; background:#dfe8cf; }
.knowledge-source-kind.is-literature { background:#dfe6e7; color:#637a86; }
.knowledge-source-kind.is-creator,.knowledge-source-kind.is-analysis { background:#ece7d5; color:#8e7954; }
.knowledge-reader .knowledge-sources h4 { font:500 13px/1.9 var(--font-english,sans-serif); color:#435635; margin:7px 0 4px; overflow-wrap:anywhere; }
.knowledge-sources li p { font-size:12px; color:#7b886b; line-height:1.9; white-space:pre-wrap; overflow-wrap:anywhere; margin:3px 0; }
.knowledge-sources li .knowledge-source-author { color:#5f7350; }
.knowledge-sources li a { display:inline-flex; min-height:36px; align-items:center; gap:7px; font-size:12px; color:#657f40; border-bottom:1px solid #b5c49f; padding:3px 0; margin-top:7px; }
.knowledge-related { padding:22px 0 29px; border-top:1px solid var(--kn-line); }
.knowledge-related>div { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,190px),1fr)); gap:17px; padding-top:15px; }
.knowledge-related-group h4 { display:flex; flex-wrap:wrap; align-items:center; gap:8px; font-size:12px; color:#7b8b69; font-weight:500; margin:0 0 9px!important; }
.knowledge-related-group h4 span { font:700 9px/1.6 var(--font-english,sans-serif); letter-spacing:.08em; color:#8a977a; }
.knowledge-related-group a { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 11px; border:1px solid #d1dac4; border-left:2px solid #91a66b; background:#e6ecdd; color:#5c753f; margin:7px 0; font-size:11px; }
.knowledge-related-group a>span { min-width:0; }
.knowledge-related-group small { display:block; color:#8b9a7c; font:9px/1.7 var(--font-mono,sans-serif); overflow-wrap:anywhere; margin-top:5px; }
.knowledge-article-footer { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:12px; padding:19px 0; border-top:1px solid var(--kn-line); }
.knowledge-preview-notice,.knowledge-status { color:#6d7d55; border-left:3px solid #a6bf63; background:#edf2df; padding:10px 13px; margin:0 0 15px!important; font-size:11px; line-height:1.8; }
.knowledge-load-error { border-left:3px solid #c7a26b; background:#f2eadb; color:#8a704a; padding:15px 17px; margin-bottom:18px; }
.knowledge-load-error p { font-size:12px; line-height:1.9; }
.knowledge-load-error button { display:inline-flex; align-items:center; gap:8px; min-height:36px; color:#7c693f; font-size:12px; margin-top:10px; padding:6px 0; border-bottom:1px solid #baa477!important; }
.knowledge-loading,.knowledge-empty { display:flex; flex-direction:column; align-items:center; justify-content:center; padding:55px 20px; min-height:240px; color:#7a8e65; border:1px solid #f9fcf4c4; background:#f1f5eab3; text-align:center; }
.knowledge-loading p { font-size:12px; margin-top:16px; }
.knowledge-empty h2,.knowledge-empty h3 { font-size:19px; color:#5c7047; margin:15px 0 10px!important; }
.knowledge-empty p,.knowledge-empty-hint { color:#7b8c6a; font-size:12px; line-height:1.9; }
.knowledge-empty a { display:inline-flex; align-items:center; gap:8px; font-size:11px; color:#5b733b; border-bottom:1px solid #a1b77d; margin-top:20px; padding:8px 0; }
.knowledge-image-dialog { position:fixed; width:min(1150px,calc(100vw - 36px)); max-height:calc(100svh - 36px); padding:0; border:1px solid #fafdf5e0; border-bottom:3px solid var(--accent); background:#edf2e7; color:#343e2c; box-shadow:2px 0 rgb(var(--iris-rgb) / 0.290196078),0 25px 100px #10180b7d; overflow:auto; margin:auto; font-family:var(--font-display,sans-serif); }
.knowledge-image-dialog::backdrop { background:#1a2118b8; backdrop-filter:blur(7px); }
.knowledge-image-dialog>header { position:sticky; top:0; z-index:1; display:flex; align-items:center; justify-content:space-between; gap:15px; padding:15px 21px; background:#323a2f; color:#f3f5ec; border-bottom:2px solid var(--accent); }
.knowledge-image-dialog>header span { color:#afbfa0; font:700 9px/1.6 var(--font-english,sans-serif); letter-spacing:.12em; }
.knowledge-image-dialog h2 { margin:6px 0 0; color:#edf2e6; font:500 15px/1.7 var(--font-english,sans-serif); overflow-wrap:anywhere; }
.knowledge-image-dialog>header button { display:grid; place-items:center; flex:0 0 auto; width:40px; height:40px; padding:8px; border:1px solid #e4ebd63b; background:#ffffff0b; color:#f3f6eb; cursor:pointer; }
.knowledge-image-dialog-body { display:flex; justify-content:center; min-height:150px; padding:15px; background:repeating-linear-gradient(0deg,transparent 0 6px,#667b4508 6px 7px),#e3eadb; }
.knowledge-image-dialog-body>img { display:block; max-width:100%; max-height:none; width:auto; height:auto; object-fit:contain; }
.knowledge-image-dialog>p { margin:0; padding:15px 22px 19px; font-size:12px; line-height:1.9; color:#728360; }
@media(hover:hover) {
  .knowledge-card:hover { background:#f7faf0; border-bottom-color:var(--kn-lime); box-shadow:2px 0 rgb(var(--iris-rgb) / 0.31372549),-2px 0 rgb(var(--accent-rgb) / 0.4),0 10px 25px #252e2012; }
  .knowledge-card:hover .knowledge-card-image>img { filter:brightness(1.04); }
  .knowledge-reader :is(.knowledge-breadcrumb,.knowledge-article-footer,.knowledge-sources) a:hover { color:#314c1d; }
  .knowledge-related-group a:hover { background:#dce9c9; border-color:#a5b685; }
  .knowledge-reader button.knowledge-source-marker:hover { background:#e0eabf; border-color:#9aaf73; color:#4c682d; }
  .knowledge-image-dialog>header button:hover { color:var(--accent); border-color:var(--accent); }
}
@media(max-width:1100px) and (min-width:851px) {
  .knowledge-grid { gap:13px; }
  .knowledge-card-text { padding:15px 13px 11px; }
  .knowledge-reader .knowledge-card h3 { font-size:17px; }
  .knowledge-cover { padding:18px 21px 15px; }
  .knowledge-cover-top>span:last-child { display:none; }
}
@media(max-width:599px) {
  .knowledge-cover { padding:16px 16px 13px; }
  .knowledge-cover-top { font-size:9px; letter-spacing:.07em; padding-bottom:10px; }
  .knowledge-cover-top>span:last-child { display:none; }
  .knowledge-cover-title { padding:23px 0 20px; gap:8px; }
  .knowledge-kicker { font-size:9px; letter-spacing:.06em; }
  .knowledge-reader .knowledge-cover h2 { font-size:30px; letter-spacing:.08em; margin:8px 0 6px; }
  .knowledge-cover-title p { font-size:12px; }
  .knowledge-cover-mark { font-size:65px; margin-right:0; }
  .knowledge-cover-bottom { padding-top:12px; font-size:10px; }
  .knowledge-cover-bottom b { font-size:22px; }
  .knowledge-list-heading { padding-top:23px; gap:8px; }
  .knowledge-reader .knowledge-list-heading h3 { font-size:14px; }
  .knowledge-list-heading>span { font-size:9px; max-width:115px; }
  .knowledge-grid { grid-template-columns:minmax(0,1fr); gap:18px; }
  .knowledge-grid.is-single .knowledge-card { display:flex; }
  .knowledge-grid.is-single .knowledge-card-image { aspect-ratio:16/9; min-height:0; }
  .knowledge-card-image { aspect-ratio:16/9; }
  .knowledge-card-text { padding:16px 17px 12px; }
  .knowledge-reader .knowledge-card h3 { font-size:18px; line-height:1.65; margin:8px 0; }
  .knowledge-card-text>p { font-size:12px; line-height:1.9; -webkit-line-clamp:3; margin-bottom:16px; }
  .knowledge-list-footer { gap:8px; padding-top:17px; margin-top:25px; }
  .knowledge-list-footer p { font-size:11px; }
  .knowledge-list-footer>span:last-child { width:100%; text-align:right; }
  .knowledge-article { padding:0 17px; }
  .knowledge-breadcrumb { padding:14px 0; }
  .knowledge-breadcrumb>span { font-size:9px; }
  .knowledge-article-header { padding:22px 0 19px; }
  .knowledge-article-meta { font-size:10px; }
  .knowledge-reader .knowledge-article-header h2 { font-size:25px; line-height:1.55; margin:13px 0; }
  .knowledge-article-header>p { font-size:13px; line-height:1.95; }
  .knowledge-article-coordinate { margin-top:16px; padding-top:14px; font-size:10px; }
  .knowledge-article-coordinate>span:first-child { font-size:9px; }
  .knowledge-article-cover { margin-left:-17px!important; margin-right:-17px!important; }
  .knowledge-article-cover .knowledge-image-button { max-height:350px; }
  .knowledge-section-heading { margin-top:24px!important; margin-bottom:15px!important; gap:7px; }
  .knowledge-reader .knowledge-section-heading h3 { font-size:18px; }
  .knowledge-section-heading .knowledge-source-markers { margin-left:23px; }
  .knowledge-paragraph p { font-size:14px; line-height:1.95; }
  .knowledge-prose blockquote { margin:20px 0; padding:19px 16px 16px; }
  .knowledge-prose blockquote>p { font-size:14px; line-height:1.95; }
  .knowledge-figure { margin:21px 0!important; }
  .knowledge-figure figcaption { font-size:11px; gap:5px; }
  .knowledge-sources { margin-top:27px; padding-top:21px; }
  .knowledge-source-number { font-size:21px; min-width:23px; }
  .knowledge-sources li { gap:10px; }
  .knowledge-evidence-note { font-size:11px; }
  .knowledge-reader button.knowledge-source-marker { font-size:10px; min-height:32px; }
  .knowledge-sources li p { font-size:11px; }
  .knowledge-image-dialog { width:calc(100vw - 18px); max-height:calc(100svh - 18px); }
  .knowledge-image-dialog>header { padding:12px 13px; }
  .knowledge-image-dialog h2 { font-size:13px; }
  .knowledge-image-dialog-body { padding:7px; }
  .knowledge-image-dialog>p { font-size:10px; padding:12px 14px 15px; }
}
@media(max-width:359px) {
  .knowledge-cover-top>span:last-child { display:none; }
  .knowledge-cover-title { padding:22px 0 18px; }
  .knowledge-kicker { font-size:9px; letter-spacing:.02em; }
  .knowledge-cover-mark { font-size:48px; }
  .knowledge-article { padding:0 13px; }
  .knowledge-article-cover { margin-left:-13px!important; margin-right:-13px!important; }
  .knowledge-reader .knowledge-article-header h2 { font-size:23px; }
  .knowledge-source-marker span { max-width:100%; }
}
@media(prefers-reduced-motion:reduce) {
  .knowledge-reader *, .knowledge-reader *::before, .knowledge-reader *::after, .knowledge-image-dialog * { scroll-behavior:auto!important; animation:none!important; transition:none!important; }
}
.knowledge-manager {
  --km-ink: #242720;
  --km-muted: #646b60;
  --km-line: #b9c0b4;
  --km-accent: var(--accent);
  max-width: 1440px;
  min-width: 0;
  margin: 0 auto;
  padding: 38px clamp(14px, 3vw, 46px) 64px;
  color: var(--km-ink);
}
.knowledge-manager *, .knowledge-manager *::before, .knowledge-manager *::after { box-sizing: border-box; }
.knowledge-manager h1, .knowledge-manager h2, .knowledge-manager h3, .knowledge-manager p { margin: 0; }
.knowledge-manager h1 { margin: 8px 0; font-size: clamp(25px, 3vw, 38px); color: var(--km-ink); }
.knowledge-manager h2 { font-size: 20px; line-height: 1.5; color: var(--km-ink); overflow-wrap: anywhere; }
.knowledge-manager h3 { font-size: 16px; line-height: 1.5; color: var(--km-ink); }
.knowledge-manager p { line-height: 1.75; }
.knowledge-manager .km-eyebrow { font: 700 11px/1.6 var(--font-english, sans-serif); letter-spacing: .08em; color: #687259; }
.knowledge-manager .km-heading, .knowledge-manager .km-edit-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.knowledge-manager .km-heading > div:first-child, .knowledge-manager .km-edit-heading > div:first-child { min-width: 0; }
.knowledge-manager .km-heading p { color: var(--km-muted); font-size: 14px; }
.knowledge-manager .km-save { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 10px; flex-shrink: 0; font-size: 12px; }
.knowledge-manager button, .knowledge-manager input, .knowledge-manager textarea, .knowledge-manager select { font: inherit; border-radius: 0; }
.knowledge-manager button { cursor: pointer; }
.knowledge-manager button:disabled { cursor: not-allowed; opacity: .45; }
.knowledge-manager .km-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 38px; padding: 8px 12px; border: 1px solid #697061;
  background: #30352c; color: #f4f6f0; font-size: 12px; line-height: 1.5;
  transition: background .16s ease, color .16s ease, border-color .16s ease;
  white-space: normal; text-align: center;
}
.knowledge-manager .km-button::before, .knowledge-manager .km-button::after { display: none; }
.knowledge-manager .km-button:not(:disabled):hover { color: #20251a; background: #d9e6af; border-color: #95ad48; }
.knowledge-manager .km-button.km-primary { background: var(--accent); color: #21261a; border-color: #a4c41b; font-weight: 700; }
.knowledge-manager .km-button.km-primary:not(:disabled):hover { background: #dcf572; }
.knowledge-manager .km-button.km-danger { border-color: #bc8880; background: #fff7f2; color: #853e32; }
.knowledge-manager :is(button, a, input, select, textarea):focus-visible { outline: 3px solid #567333; outline-offset: 3px; }
.knowledge-manager .km-session { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin: 24px 0 18px; padding: 12px 15px; border-left: 3px solid var(--km-accent); background: #363b32; color: #edf0e8; font-size: 12px; }
.knowledge-manager .km-session > div { display: flex; gap: 18px; align-items: center; }
.knowledge-manager .km-session a, .knowledge-manager .km-session button { padding: 0; border: 0; background: none; color: #d4ec92; text-decoration: underline; text-underline-offset: 3px; }
.knowledge-manager .km-alert { padding: 14px 16px; margin: 14px 0; border: 1px solid #cbad9c; border-left: 3px solid #a46b4a; background: #fff4e8; color: #68391f; font-size: 13px; overflow-wrap: anywhere; }
.knowledge-manager .km-alert p + p { margin-top: 6px; }
.knowledge-manager .km-notice { margin: 14px 0; padding: 12px 16px; border: 1px solid #a8bc7d; border-left: 3px solid #84a335; background: #ecf3db; color: #3e531e; font-size: 13px; }
.knowledge-manager .km-access { max-width: 760px; padding: 25px; margin: 20px 0; border: 1px solid var(--km-line); background: #f5f7f2; }
.knowledge-manager .km-access > .km-button { margin-top: 18px; }
.knowledge-manager .km-access .admin-login { margin: 16px 0; }
.knowledge-manager .km-tools { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 10px 0 20px; }
.knowledge-manager .km-tabs, .knowledge-manager .km-tools-actions, .knowledge-manager .km-icon-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.knowledge-manager .km-tabs > button { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 10px 14px; border: 1px solid #b5bdae; color: #4d5645; background: #eef1e9; font-size: 14px; }
.knowledge-manager .km-tabs > button[aria-pressed="true"] { background: #333a2d; border-color: #333a2d; color: #eff3e8; box-shadow: inset 0 -2px var(--accent); }
.knowledge-manager .km-tabs small { font-size: 11px; opacity: .8; }
.knowledge-manager .km-fields { min-width: 0; margin: 0; padding: 0; border: 0; }
.knowledge-manager .km-workspace { display: grid; grid-template-columns: minmax(210px, 280px) minmax(0, 1fr); gap: 22px; align-items: start; }
.knowledge-manager .km-list { min-width: 0; padding: 18px; border: 1px solid #686f60; background: #363b32; color: #edf0e8; }
.knowledge-manager label { display: grid; align-content: start; gap: 7px; font-size: 13px; line-height: 1.5; min-width: 0; }
.knowledge-manager :is(input:not([type="checkbox"]), textarea, select) { display: block; width: 100%; min-width: 0; min-height: 40px; padding: 10px 11px; border: 1px solid #b8c0ae; background: #fff; color: #252c20; box-shadow: none; font-size: 14px; line-height: 1.6; }
.knowledge-manager input[readonly] { background: #e7ece0; color: #536048; font-family: var(--font-mono, monospace); font-size: 11px; }
.knowledge-manager textarea { resize: vertical; min-height: 88px; }
.knowledge-manager label > small, .knowledge-manager .km-hint { color: #697260; font-size: 11px; line-height: 1.6; }
.knowledge-manager .km-list .km-add { width: 100%; margin: 12px 0 16px; background: var(--accent); color: #29311d; border-color: var(--accent); }
.knowledge-manager .km-article-list { display: grid; gap: 7px; max-height: 650px; overflow: auto; overscroll-behavior: contain; padding-right: 3px; }
.knowledge-manager .km-article-list > button { display: grid; gap: 6px; min-width: 0; padding: 12px; border: 1px solid #606952; background: #3d4435; color: #e5ebdc; text-align: left; overflow-wrap: anywhere; }
.knowledge-manager .km-article-list > button:hover { border-color: #bdcc9e; }
.knowledge-manager .km-article-list > button[aria-pressed="true"] { background: #eff3e9; color: #28331c; border-color: #d5e5af; box-shadow: inset 3px 0 var(--accent); }
.knowledge-manager .km-article-list small, .knowledge-manager .km-article-list span { font-size: 11px; opacity: .8; }
.knowledge-manager .km-article-list strong { font-size: 14px; line-height: 1.5; }
.knowledge-manager .km-editor, .knowledge-manager .km-stage-settings { min-width: 0; padding: 24px; border: 1px solid #c4ccbb; border-bottom: 3px solid var(--accent); background: rgb(var(--glass-rgb) / .94); }
.knowledge-manager .km-edit-heading { margin-bottom: 20px; align-items: center; }
.knowledge-manager .km-icon-actions { flex-shrink: 0; }
.knowledge-manager .km-icon-actions > .km-button { min-height: 35px; padding: 7px 10px; }
.knowledge-manager .km-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 18px; }
.knowledge-manager .km-full { grid-column: 1 / -1; }
.knowledge-manager .km-section { padding: 20px 0 0; border-top: 1px solid #c5cdbb; }
.knowledge-manager .km-section > h3 { margin-bottom: 10px; }
.knowledge-manager .km-section > p { font-size: 12px; color: #6c735f; margin-bottom: 14px; }
.knowledge-manager .km-inline { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.knowledge-manager .km-source { margin: 15px 0; padding: 16px; border: 1px solid #c2cbb6; background: #e9eee3; }
.knowledge-manager .km-source .km-edit-heading { margin-bottom: 14px; }
.knowledge-manager .km-checkbox { display: flex; align-items: flex-start; gap: 9px; padding: 8px 0; line-height: 1.6; }
.knowledge-manager .km-checkbox input { width: 17px; height: 17px; margin: 3px 0 0; flex-shrink: 0; accent-color: #607d29; }
.knowledge-manager .km-checkbox span { min-width: 0; overflow-wrap: anywhere; font-size: 13px; }
.knowledge-manager .km-checkbox small { display: block; color: #697260; font-size: 11px; }
.knowledge-manager .km-relations { min-width: 0; }
.knowledge-manager .km-relations h3 { margin-bottom: 10px; }
.knowledge-manager .km-relations h3 small { font-size: 11px; color: #6c765f; font-weight: 400; }
.knowledge-manager .km-choice-list { max-height: 240px; overflow: auto; overscroll-behavior: contain; padding: 8px 12px; margin-top: 8px; border: 1px solid #c7d0bd; background: #edf1e8; }
.knowledge-manager .km-choice-list > p { color: #6c765f; font-size: 12px; }
.knowledge-manager .km-empty { padding: 60px 0; text-align: center; }
.knowledge-manager .km-empty p { margin-top: 12px; color: #67735b; }
.knowledge-manager .km-stage { padding: 22px; margin-top: 20px; border: 1px solid #b7c3a6; background: #f3f6ee; }
.knowledge-manager .km-stage > .km-hint { margin-top: 14px; }
.knowledge-manager .km-unassigned { background: #e7ecdf; }
.knowledge-manager .km-unassigned p { margin-top: 8px; font-size: 13px; color: #606c51; }
.knowledge-manager .km-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 24px; font-size: 12px; color: #606c51; }
.knowledge-manager .km-confirm { max-width: min(520px, calc(100vw - 28px)); width: 520px; padding: 26px; border: 1px solid #b4c49a; border-bottom: 3px solid var(--accent); background: #f2f5eb; color: #2c3522; }
.knowledge-manager .km-confirm::backdrop { background: rgb(22 28 17 / .66); }
.knowledge-manager .km-confirm h2 { margin: 0 0 12px; font-size: 22px; }
.knowledge-manager .km-confirm p { font-size: 14px; line-height: 1.8; }
.knowledge-manager .km-confirm > div { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 22px; }
@media (max-width: 1050px) {
  .knowledge-manager .km-workspace { grid-template-columns: minmax(190px, 230px) minmax(0, 1fr); gap: 14px; }
  .knowledge-manager .km-editor, .knowledge-manager .km-stage-settings { padding: 18px; }
  .knowledge-manager .km-edit-heading { flex-wrap: wrap; }
}
@media (max-width: 760px) {
  .knowledge-manager { padding: 22px 12px 42px; }
  .knowledge-manager .km-heading { display: block; }
  .knowledge-manager .km-heading p { font-size: 12px; }
  .knowledge-manager .km-save { margin-top: 14px; justify-content: space-between; }
  .knowledge-manager .km-session { margin: 18px 0 12px; padding: 10px 12px; }
  .knowledge-manager .km-tools { gap: 12px; }
  .knowledge-manager .km-tools-actions { width: 100%; }
  .knowledge-manager .km-workspace { display: block; }
  .knowledge-manager .km-list { margin-bottom: 14px; padding: 13px; }
  .knowledge-manager .km-article-list { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 255px; gap: 6px; }
  .knowledge-manager .km-article-list > button { padding: 9px; }
  .knowledge-manager .km-article-list strong { font-size: 12px; }
  .knowledge-manager .km-editor, .knowledge-manager .km-stage-settings, .knowledge-manager .km-access { padding: 15px; }
  .knowledge-manager .km-form { grid-template-columns: minmax(0, 1fr); gap: 15px; }
  .knowledge-manager .km-icon-actions { width: 100%; }
  .knowledge-manager .km-button { min-height: 40px; }
  .knowledge-manager .km-stage { padding: 13px; }
  .knowledge-manager .km-source { padding: 12px; }
  .knowledge-manager .km-choice-list { max-height: 210px; }
  .knowledge-manager .km-heading h1 { font-size: 27px; }
}
@media (prefers-reduced-motion: reduce) {
  .knowledge-manager *, .knowledge-manager *::before, .knowledge-manager *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

.knowledge-manager .km-source h4, .knowledge-manager .km-content-block h4, .knowledge-manager .km-relations h4 { margin: 0; color: var(--km-ink); font-size: 13px; line-height: 1.6; }
.knowledge-manager h3 small, .knowledge-manager h4 small { font-size: 11px; font-weight: 400; color: var(--km-muted); }
.knowledge-manager .km-tools > div, .knowledge-manager .km-actions { display:flex;flex-wrap:wrap;gap:7px; }
.knowledge-manager .km-content-block { margin: 14px 0; padding: 16px; border: 1px solid #bfc7b6; background: #edf1e7; min-width: 0; }
.knowledge-manager .km-content-block > label + .km-citation, .knowledge-manager .km-content-block > .km-relations { margin-top: 14px; }
.knowledge-manager .km-source { background: #f4f6ed; }
.knowledge-manager .km-add-blocks { display:flex;flex-wrap:wrap;gap:7px;margin-top:14px; }
.knowledge-manager .km-image-field { display:grid;gap:10px;min-width:0; }
.knowledge-manager .km-image-field details { padding:10px 12px;border:1px solid #c1c9b6;background:#e8ede0; }
.knowledge-manager .km-image-field summary { cursor:pointer;font-size:12px;color:#4b5940; }
.knowledge-manager .km-image-field details[open] > label { margin-top:12px; }
.knowledge-manager .km-image-preview { display:block;max-width:100%;width:220px;height:140px;object-fit:contain;border:1px solid #bac5ab;background:repeating-conic-gradient(#e3e8dc 0 25%,#f3f6ef 0 50%) 50% / 16px 16px; }
.knowledge-manager .km-media-error, .knowledge-manager .km-directory-error { font-size:12px;color:#855243;line-height:1.7; }
.knowledge-manager .km-directory-error .km-button { display:block;margin-top:8px; }
.knowledge-manager .km-version-choice { font-size:13px; }
.knowledge-manager .km-relations-grid { display:grid;gap:16px;grid-template-columns:repeat(2,minmax(0,1fr)); }
.knowledge-manager .km-relations-grid > * { min-width:0; }
.knowledge-manager .km-relations-grid > :last-child { grid-column:1/-1; }
.knowledge-manager .km-relations-compact .km-choice-list { max-height:140px; }
.knowledge-manager .km-empty-hint { margin:12px 0;font-size:12px;color:var(--km-muted); }
.knowledge-manager .km-list-empty { font-size:12px;color:#d3dac7; }
.knowledge-manager .km-empty .km-button { margin-top:16px; }
.knowledge-manager .km-preview { width:min(1060px,calc(100vw - 36px));max-width:1060px;height:min(920px,calc(100dvh - 36px));max-height:calc(100dvh - 36px);padding:0;border:1px solid #b8c4a5;background:#e9eee4;color:#283023;overflow:hidden; }
.knowledge-manager .km-preview::backdrop { background:rgb(19 25 17 / .72); }
.knowledge-manager .km-preview > header { display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 20px;border-bottom:2px solid var(--accent);background:#363b32;color:#f2f4ef; }
.knowledge-manager .km-preview > header h2 { color:#f2f4ef;font-size:17px;margin-top:3px; }
.knowledge-manager .km-preview > header .km-eyebrow { color:#cbd5bb; }
.knowledge-manager .km-preview-body { height:calc(100% - 82px);overflow:auto;overscroll-behavior:contain; }
.knowledge-manager .km-preview-body .knowledge-reader { padding:20px; }
@media(max-width:760px) {
 .knowledge-manager .km-content-block { padding:12px; }
 .knowledge-manager .km-actions { width:100%; }
 .knowledge-manager .km-tools > div { width:100%; }
 .knowledge-manager .km-relations-grid { grid-template-columns:minmax(0,1fr); }
 .knowledge-manager .km-preview { width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;border:0; }
 .knowledge-manager .km-preview > header { padding:12px 14px; }
 .knowledge-manager .km-preview-body .knowledge-reader { padding:12px; }
 .knowledge-manager .km-heading .km-eyebrow { font-size:10px;letter-spacing:.05em; }
 .knowledge-manager .km-source .km-edit-heading { gap:8px; }
 .knowledge-manager .km-form { gap:13px; }
}
/* Loading geometry follows the official viewport-scaled desktop/portrait composition. */
.site-opening {
  --opening-unit: min(.833333333vw, 1.481481481svh);
  --opening-row-height: calc(6px + 1.95 * var(--opening-unit));
  position: fixed; inset: 0; z-index: 1000; isolation: isolate; overflow: hidden;
  background: #272727; color: #a4a4a4; opacity: 1; pointer-events: auto;
  font-family: var(--font-display); font-synthesis: none;
  transition: opacity var(--opening-fade, 400ms) ease; -webkit-font-smoothing: antialiased;
}
.site-opening *, .site-opening *::before, .site-opening *::after { box-sizing: border-box; }
.site-opening.is-leaving { opacity: 0; }
.site-opening-rule { position: absolute; display: block; pointer-events: none; background: #fff; opacity: .3; }
.site-opening-rule-horizontal { top: calc(6.625 * var(--opening-unit)); left: 0; right: 0; height: 1px; }
.site-opening-rule-vertical { top: 0; bottom: 0; right: calc(6.625 * var(--opening-unit)); width: 1px; }
.site-opening-logo {
  position: absolute; display: block; left: 50%;
  top: calc(50% - 6.0625 * var(--opening-unit) - var(--opening-row-height) / 2);
  width: calc(21 * var(--opening-unit)); height: auto;
  transform: translate(-50%, -50%); color: #a4a4a4; opacity: .95;
  transition: opacity var(--opening-fade, 400ms) ease; overflow: visible;
}
.site-opening.is-leaving .site-opening-logo { opacity: 0; }
.site-opening-bottom {
  position: absolute;
  top: calc(50% + 17.78125 * var(--opening-unit) - var(--opening-row-height) / 2);
  left: calc(50% - 48.5625 * var(--opening-unit));
  width: calc(97.125 * var(--opening-unit));
  display: grid; grid-template-columns: calc(28.625 * var(--opening-unit)) minmax(0, 1fr);
  align-items: end; gap: 0;
}
.site-opening-copyright { align-self: end; font-size: clamp(8px, calc(1.05 * var(--opening-unit)), 13px); line-height: 1.2; color: #a4a4a4; white-space: nowrap; }
.site-opening-loading { position: relative; min-width: 0; }
.site-opening-track { position: relative; height: 6px; width: 100%; border-inline: 6px solid #a4a4a4; background: linear-gradient(#a4a4a4, #a4a4a4) center / 100% 2px no-repeat; overflow: hidden; }
.site-opening-track > span { display: block; width: 100%; height: 100%; background: #18d1ff; transform-origin: left center; transition: transform 180ms ease-out; }
.site-opening-loading-caption { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: calc(.75 * var(--opening-unit)); font: 700 max(8px, var(--opening-unit))/1.2 var(--font-english); color: #a4a4a4; }
.site-opening-percentage { font-family: var(--font-mono); white-space: nowrap; }
.site-opening-percentage > i { margin-right: 8px; font-style: normal; letter-spacing: -3px; }
.site-opening-address { white-space: nowrap; font-size: max(7px, calc(.9 * var(--opening-unit))); }
.site-opening-address > i { display: inline-block; margin: 0 calc(1.25 * var(--opening-unit)); font-style: normal; }
/* Exceptional feedback sits above the bar, leaving the reference's lower edge uncluttered. */
.site-opening-feedback { position: absolute; left: 0; right: 0; bottom: calc(100% + 14px); display: flex; align-items: center; justify-content: space-between; gap: 8px 20px; flex-wrap: wrap; visibility: hidden; }
.site-opening-feedback.is-visible { visibility: visible; }
.site-opening-status { flex: 1 1 200px; margin: 0; color: #a7a7a7; font: 11px/1.6 var(--font-display); overflow-wrap: anywhere; }
.site-opening-status.has-error { color: #d6bf97; }
.site-opening-retry { flex: 0 0 auto; min-height: 44px; padding: 0 12px; border: 1px solid #666; border-radius: 0; background: transparent; color: #ddd; font: 11px/1.5 var(--font-display); cursor: pointer; }
.site-opening-retry span { margin-left: 8px; font-family: var(--font-english); font-size: 9px; font-weight: 700; }
.site-opening-retry::before, .site-opening-retry::after { display: none; }
.site-opening-retry:hover { border-color: #18d1ff; color: #18d1ff; }
.site-opening-retry:focus-visible { outline: 2px solid #18d1ff; outline-offset: 3px; }
@media(orientation:portrait) {
 .site-opening { --opening-unit: min(2.133333333vw, 1.1994003svh); }
 .site-opening-rule { display: none; }
 .site-opening-logo { width: calc(24 * var(--opening-unit)); top: calc(50% - 6.0625 * var(--opening-unit)); }
 .site-opening-bottom { top: auto; bottom: 16.191904048%; left: calc(50% - 20.9375 * var(--opening-unit)); width: calc(41.875 * var(--opening-unit)); display: block; }
 .site-opening-copyright { position: fixed; left: calc(2 * var(--opening-unit)); bottom: calc(3 * var(--opening-unit)); font-size: clamp(8px, calc(1.25 * var(--opening-unit)), 11px); }
 .site-opening-track { height: 3px; border-inline-width: 3px; background-size: 100% 1px; }
 .site-opening-loading-caption { margin-top: calc(.5 * var(--opening-unit)); gap: 6px; font-size: max(8px, calc(1.25 * var(--opening-unit))); }
 .site-opening-address { font-size: max(7px, calc(1.05 * var(--opening-unit))); }
 .site-opening-address > i { margin-inline: calc(.65 * var(--opening-unit)); }
 .site-opening-feedback { gap: 8px; bottom: calc(100% + 12px); }
 .site-opening-status { font-size: 11px; }
}
@media(max-height:400px) and (orientation:landscape) {
 .site-opening-loading-caption { gap: 6px; }
 .site-opening-address > i { margin-inline: 5px; }
 .site-opening-feedback { bottom: calc(100% + 8px); gap: 5px; }
 .site-opening-status { font-size: 10px; }
}
@media(prefers-reduced-motion:reduce) {
 .site-opening, .site-opening-logo, .site-opening-track > span { transition: none; }
}
/* Audio/video dialogs occupy the browser viewport; native media controls stay inside it. */
.site .media-player-dialog {
  position:fixed; inset:0; width:100vw; max-width:100vw;
  height:100vh; max-height:100vh; height:100dvh; max-height:100dvh;
  margin:0; padding:0; border:0; border-radius:0;
  overflow:hidden; overscroll-behavior:contain; text-align:left;
  background:#edf0e9; color:var(--charcoal-deep); color-scheme:light;
  box-shadow:none; backdrop-filter:none; clip-path:none; transform:none;
  font-family:var(--font-display); font-synthesis:none;
}
.site .media-player-dialog[open] { display:block; }
.site .media-player-dialog::backdrop { background:#20251f; backdrop-filter:none; }
.media-player-dialog *, .media-player-dialog *::before, .media-player-dialog *::after { box-sizing:border-box; }
.media-player-shell { display:grid; grid-template-rows:auto minmax(0,1fr) auto; height:100%; min-width:0; }
.media-player-header {
  display:flex; align-items:center; justify-content:space-between; gap:16px;
  padding:max(12px,env(safe-area-inset-top)) max(20px,env(safe-area-inset-right)) 12px max(20px,env(safe-area-inset-left));
  border-bottom:2px solid var(--accent); background:#f3f5ef; min-width:0;
}
.media-player-header>div { min-width:0; }
.media-player-header>div>span { color:#68715f; font:700 9px/1.4 var(--font-english); letter-spacing:.1em; }
.media-player-header i { font-style:normal; color:#a7b093; padding:0 6px; }
.media-player-dialog .media-player-header h2 {
  margin:4px 0; color:var(--charcoal-deep); max-height:3.9em; overflow:auto; overflow-wrap:anywhere;
  font:500 clamp(18px,2.1vw,28px)/1.3 var(--font-english);
}
.media-player-header p { margin:0; color:#66715e; font-size:10px; line-height:1.5; overflow-wrap:anywhere; }
.media-player-dialog .media-player-close {
  flex:none; display:flex; align-items:center; justify-content:center; gap:10px;
  min-width:82px; min-height:44px; padding:8px 12px; margin:0;
  border:1px solid var(--charcoal-deep); border-left:4px solid var(--accent); border-radius:0;
  background:var(--charcoal-deep); color:#f4f6ef; font:500 12px/1.4 var(--font-display);
}
.media-player-dialog .media-player-close::before,.media-player-dialog .media-player-close::after { content:none; }
.media-player-dialog .media-player-close:hover { background:var(--accent); color:var(--charcoal-deep); }
.media-player-dialog :is(button,a,audio,video):focus-visible { outline:2px solid var(--iris); outline-offset:-3px; }
.media-player-content {
  min-width:0; min-height:0; overflow:auto; overscroll-behavior:contain;
  padding-inline:env(safe-area-inset-left) env(safe-area-inset-right);
}
.media-player-dialog.is-video .media-player-content { background:#101410; }
.media-player-stage { min-width:0; min-height:0; width:100%; }
.media-player-dialog.is-video .media-player-stage { display:grid; height:100%; grid-template-rows:minmax(0,1fr); }
.media-player-dialog.is-video.has-audio .media-player-stage { grid-template-rows:minmax(0,1fr) auto; gap:8px; }
.media-player-dialog .media-player-stage video {
  display:block; width:100%; height:100%; min-width:0; min-height:0; max-width:100%; max-height:none;
  margin:0; background:#101410; object-fit:contain; color-scheme:dark;
}
.media-player-dialog .media-player-stage audio {
  display:block; width:100%; max-width:620px; height:54px; min-height:54px; margin:0 auto;
}
.media-player-tracks { display:flex; justify-content:center; flex-wrap:wrap; gap:6px; max-height:90px; overflow:auto; padding:4px 8px; }
.media-player-tracks button { min-height:36px; padding:5px 10px; border:1px solid #9baa92; background:#f3f5ef; color:#344b38; font:500 11px/1.3 var(--font-display); cursor:pointer; }
.media-player-tracks button[aria-pressed="true"] { border-color:#344b38; background:#344b38; color:#f3f5ef; }
.media-player-dialog.is-audio .media-player-content {
  display:grid; grid-template-rows:minmax(0,1fr) auto;
  overflow:hidden; background:#101410;
}
.media-player-artwork { width:100%; height:100%; min-width:0; min-height:0; }
.media-player-artwork .resource-cover { width:100%; height:100%; aspect-ratio:auto; background:#101410; }
.media-player-artwork .resource-cover img { object-fit:contain; }
.media-player-dialog.is-audio .media-player-stage {
  min-height:70px; padding:8px max(12px,env(safe-area-inset-right)) 8px max(12px,env(safe-area-inset-left));
  background:#edf0e9;
}
.media-player-footer {
  min-width:0; max-height:26dvh; overflow:auto;
  padding:10px max(20px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left));
  border-top:1px solid #cbd3c1; background:#f3f5ef;
}
.media-player-footer>div { display:flex; align-items:center; justify-content:space-between; gap:12px 24px; }
.media-player-footer>div>p { margin:0; color:#6a755f; font-size:10px; line-height:1.6; }
.media-player-footer a { display:inline-flex; align-items:center; justify-content:center; flex:none; gap:8px; min-height:44px; color:#3b5541; font-size:12px; text-underline-offset:4px; }
.media-player-dialog .media-player-error { margin:0 0 8px; color:#8e432f; font-size:12px; line-height:1.6; overflow-wrap:anywhere; }
.media-player-stage>.media-player-error { padding:20px; }
@media(max-width:599px) {
  .media-player-header { gap:10px; padding-inline:max(12px,env(safe-area-inset-left)) max(12px,env(safe-area-inset-right)); }
  .media-player-dialog .media-player-header h2 { font-size:19px; }
  .media-player-header>div>span { font-size:8px; }
  .media-player-dialog .media-player-close { min-width:72px; gap:7px; padding:8px; }
  .media-player-footer { padding-inline:max(12px,env(safe-area-inset-left)) max(12px,env(safe-area-inset-right)); }
  .media-player-footer>div { gap:8px 12px; }
  .media-player-footer>div>p { font-size:9px; }
  .media-player-footer a { font-size:11px; }
}
@media(max-height:480px) and (min-aspect-ratio:1/1) {
  .media-player-header { padding-block:max(6px,env(safe-area-inset-top)) 6px; }
  .media-player-dialog .media-player-header h2 { font-size:17px; margin-block:2px; max-height:2.6em; }
  .media-player-header p { display:none; }
  .media-player-footer { padding-block:4px max(4px,env(safe-area-inset-bottom)); }
  .media-player-dialog.is-audio .media-player-stage { min-height:62px; padding-block:4px; }
}
@media(prefers-reduced-motion:reduce) {
  .media-player-dialog, .media-player-dialog * { transition:none!important; animation:none!important; }
}
.media-player-dialog .media-player-stage iframe {
  display:block; width:100%; height:100%; min-height:240px; border:0;
  background:#101410;
}
/* Shared geometry overrides the older per-page themes. Scrolling and routing
   stay with the existing document / page-transition implementation. */
html { scrollbar-gutter: stable; }

.site {
  --site-header-height: 56px;
  --nav-gutter: 28px;
}
/* Home artwork uses the original canvas height even though its shared header
   and attribution row change. The controls and illustration stay anchored. */
.site.page-home { --home-header: 96px; --home-footer: 35px; }
.site.page-chat { --chat-header: var(--site-header-height); }

.site .site-header {
  height: var(--site-header-height);
  min-height: var(--site-header-height);
  padding: 0 var(--nav-gutter);
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  border: 0;
  background: var(--charcoal);
  box-shadow: none;
}
.site .site-header::before,
.site .site-header::after { content: none; }

.site .site-header nav {
  display: flex;
  width: auto;
  max-width: 100%;
  height: 100%;
  gap: 6px;
  align-items: stretch;
  justify-content: flex-start;
}
.site .site-header .nav-link {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 44px;
  height: 100%;
  flex: 0 0 auto;
  margin: 0;
  padding: 0 14px;
  gap: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #c9cfbf;
  box-shadow: none;
  white-space: nowrap;
  text-align: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color .18s ease;
}
.site .site-header .nav-link > span {
  position: relative;
  font: 500 15px/1.4 var(--font-sans);
  letter-spacing: 0;
  text-indent: 0;
}
.site .site-header .nav-link::before,
.site .site-header .nav-link::after { content: none; }
.site .site-header .nav-link[aria-current="page"] { color: #fff; }
.site .site-header .nav-link[aria-current="page"] > span::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -5px;
  height: 3px;
  background: var(--accent);
  pointer-events: none;
}
.site .site-header .nav-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -4px;
}
@media (hover: hover) {
  .site .site-header .nav-link:hover { color: #fff; }
}
@media (max-width: 799px) {
  .site {
    --site-header-height: 48px;
    --nav-gutter: clamp(2px, calc((100vw - 320px) / 5), 14px);
  }
  .site.page-home { --home-header: 60px; --home-footer: 34px; }
  .site .site-header nav {
    width: 100%;
    gap: 0;
    justify-content: space-between;
  }
  .site .site-header .nav-link { padding: 0; }
  .site .site-header .nav-link > span { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .site .site-header .nav-link { transition: none; }
}
.history-row { display: flex; align-items: stretch; gap: 8px; min-width: 0; }
.history-backup-actions, .backup-file, .backup-selection { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 12px 0; }
.history-backup-actions .button, .backup-restore button, .backup-entry { min-height: 44px; }
.backup-file > span, .backup-summary { font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.backup-entries { margin: 16px 0; padding: 0; border: 0; min-width: 0; }
.backup-entries legend { padding: 8px 0; font-size: 14px; }
.backup-entry { display: flex; align-items: flex-start; gap: 12px; border-top: 1px solid #899a8355; padding: 12px 0; cursor: pointer; }
.backup-entry > input { flex-shrink: 0; width: 20px; height: 20px; margin: 2px 0 0; accent-color: #267453; }
.backup-entry > span { display: block; min-width: 0; overflow-wrap: anywhere; }
.backup-entry strong, .backup-entry small, .backup-draft-preview { display: block; line-height: 1.7; }
.backup-entry small { font-size: 12px; color: #56664d; }
.backup-draft-preview { white-space: pre-wrap; font-size: 12px; margin-top: 4px; }
.backup-restore :focus-visible { outline: 2px solid #267453; outline-offset: 3px; }
.page-chat .messages, .page-chat .messages-content { overflow-anchor: none; }
.page-chat .messages-content { display: flow-root; }
.chat-jump-latest { position: relative; height: 0; flex: 0 0 0; z-index: 4; }
.chat-jump-latest button { position: absolute; right: 12px; bottom: 12px; display: flex; align-items: center; gap: 7px; min-height: 44px; padding: 9px 14px; border: 1px solid #558774; border-radius: 3px; background: #f7fbfa; color: #244c3b; font: inherit; font-size: 13px; cursor: pointer; box-shadow: 0 2px 8px #173e3114; }
.chat-jump-latest button:focus-visible { outline: 2px solid #267453; outline-offset: 3px; }
.chat-reading-warning { flex: 0 0 auto; margin: 4px 0; color: #704d1b; font-size: 12px; }
@media (max-width: 799px) {
  .chat-jump-latest { position: fixed; right: 16px; bottom: max(18px, env(safe-area-inset-bottom)); z-index: 25; }
  .chat-jump-latest button { right: 0; bottom: 0; white-space: nowrap; }
}
.history-row .history-item { flex: 1; min-width: 0; }
.history-row .history-item > span:first-child { min-width: 0; }
.history-row .history-item strong { overflow-wrap: anywhere; }
.history-rename { flex: 0 0 auto; min-width: 64px; min-height: 44px; padding: 8px; border: 1px solid #78856b66; font: inherit; font-size: 12px; color: inherit; background: transparent; cursor: pointer; }
.history-draft-badge { display: inline-block; margin: 4px 0 4px 8px; padding: 2px 6px; color: #244c32; background: #e2efbd; font-size: 11px; white-space: nowrap; vertical-align: middle; }
.rename-label { display: block; margin-bottom: 8px; font-size: 14px; }
.rename-input { display: block; box-sizing: border-box; width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #899a83; color: #243e2d; background: #f8fbf7; font: inherit; margin-bottom: 12px; }
.draft-conflict { margin: 12px clamp(16px, 4vw, 54px); padding: 16px; color: #283c2b; background: #f4f7e9; border: 1px solid #879c70; overflow-wrap: anywhere; }
.draft-conflict p { margin: 8px 0; font-size: 13px; }
.draft-conflict summary { min-height: 44px; display: list-item; align-content: center; cursor: pointer; }
.draft-conflict-texts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 12px 0; }
.draft-conflict-texts label { display: block; font-size: 13px; }
.draft-conflict-texts textarea { display: block; box-sizing: border-box; width: 100%; min-height: 80px; margin-top: 6px; padding: 10px; border: 1px solid #a4b199; color: #263c2a; background: white; font: inherit; resize: vertical; }
.draft-conflict-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.draft-conflict-actions .small-button { min-height: 44px; padding: 8px 12px; }
.history-rename:focus-visible, .rename-input:focus-visible, .draft-conflict :focus-visible { outline: 2px solid #267453; outline-offset: 3px; }
@media (max-width: 599px) {
  .history-row { gap: 5px; }
  .history-rename { min-width: 54px; padding: 5px; font-size: 11px; }
  .history-draft-badge { display: table; margin-left: 0; }
  .draft-conflict-texts { grid-template-columns: 1fr; }
}
.chat-message-actions { display:flex; align-items:flex-start; flex-wrap:wrap; gap:8px; margin-top:5px; }
.message-more { font-size:12px; color:#426956; }
.message-more summary { min-height:44px; padding:10px 8px; cursor:pointer; list-style:none; }
.message-action-menu { display:flex; flex-wrap:wrap; gap:6px; padding:6px; background:#f5faf7; border:1px solid #c7d9cc; }
.message-action-menu button, .outbox-recovery button { display:inline-flex; align-items:center; gap:6px; min-height:44px; padding:7px 10px; font:inherit; border:1px solid #a9c8b8; background:#fff; color:#244c3b; border-radius:3px; }
.chat-usage { color:#60776b; font-size:11px; margin-top:4px; }
.chat-usage > summary { cursor:pointer; min-height:44px; display:flex; align-items:center; width:fit-content; padding:6px 0; }
.chat-usage > summary::after { content:'＋'; margin-left:8px; }
.chat-usage[open] > summary::after { content:'−'; }
.chat-usage[open] .composer-notes { max-height:min(36dvh,300px); overflow:auto; }
.voice-settings { border:0; border-top:1px solid #c7d9cc; margin:10px 0; padding:8px 0 0; min-width:0; }
.voice-settings legend { font-size:12px; color:#244c3b; padding-right:8px; }
.voice-settings label { display:flex; align-items:center; gap:8px; min-height:44px; cursor:pointer; font-size:12px; }
.voice-settings input { width:18px; height:18px; accent-color:#267453; flex:none; }
.voice-settings input:focus-visible { outline:2px solid #267453; outline-offset:3px; }
.voice-settings p { line-height:1.7; margin:4px 0; }
.chat-availability { font-size:12px; line-height:1.6; color:#76561e; margin:4px 0; }
.outbox-recovery { border:1px solid #9bb8a8; background:#f3f8ee; color:#244535; padding:12px; margin-bottom:10px; font-size:13px; max-height:min(35dvh,260px); overflow:auto; }
.outbox-recovery > p { white-space:pre-wrap; overflow-wrap:anywhere; max-height:130px; overflow:auto; margin:8px 0; }
.outbox-recovery > div { display:flex; flex-wrap:wrap; gap:6px; }
.outbox-recovery small { display:block; margin-top:8px; line-height:1.6; }
.edit-message-input { display:block; width:100%; padding:12px; border:1px solid #92b2a0; font:inherit; background:#f8fbf8; color:#244535; resize:vertical; }
.chat-message-actions :focus-visible, .chat-usage summary:focus-visible, .outbox-recovery button:focus-visible { outline:2px solid #267453; outline-offset:2px; }
.chat-message-actions button:disabled, .outbox-recovery button:disabled { opacity:.55; cursor:not-allowed; }
@media (max-width:799px) { .message-more { font-size:11px; } .message-action-menu { gap:4px; } .chat-usage { font-size:11px; } }
.message-voice{display:inline-flex;align-items:center;flex-wrap:wrap;gap:5px 8px;max-width:100%}
.voice-button{display:inline-flex;gap:9px;align-items:center;justify-content:center;min-height:44px;min-width:105px;padding:7px 12px;border:1px solid #26745345;border-radius:3px;background:#edf5ef;color:#267453;font-size:12px;font-variant-numeric:tabular-nums;cursor:pointer}
.voice-button:hover:not(:disabled),.voice-button.is-playing{background:#dcecdf;border-color:#267453}
.voice-button:disabled{opacity:.5;cursor:default}.voice-disclosure{font-size:10px;color:#657b70;letter-spacing:.03em}
.voice-error{font-size:12px;line-height:1.6;flex-basis:100%;color:#885034;overflow-wrap:anywhere}
.voice-button:focus-visible{outline:2px solid #267453;outline-offset:3px}
/* Keep the established hover transitions; append only the press fade. */
.site .button, .dialog .button, .site .small-button,
.site .session-tools .small-button, .resource-play {
  transition: background-size .22s ease, color .22s ease, box-shadow .22s ease, opacity .1s ease;
}
:where(.text-button, .icon-button) { transition: opacity .1s ease; }
:where(.button, .small-button, .text-button, .icon-button, .resource-play)[data-pressed="true"]:not(:disabled):not([aria-disabled="true"]) { opacity: .94; }

/* These existing content layers have no transform of their own. The enclosing
   control, focus outline and hit rectangle never move. Pseudo-elements retain
   their independent selected/hover rails. */
:where(.site .nav-link) > span:not(.sr-only),
:where(.elite-switch) > svg,
:where(.session-tools .small-button, .state-toggle) > :is(span, svg):not(.sr-only),
:where(.icon-button) > svg,
:where(.scene-card, .history-item) > :is(span, svg):not(.sr-only) {
  transition: transform .1s ease, opacity .1s ease;
}
:where(.site .nav-link)[data-pressed="true"]:not(:disabled):not([aria-disabled="true"]) > span:not(.sr-only),
:where(.elite-switch)[data-pressed="true"]:not(:disabled):not([aria-disabled="true"]) > svg,
:where(.session-tools .small-button, .state-toggle)[data-pressed="true"]:not(:disabled):not([aria-disabled="true"]) > :is(span, svg):not(.sr-only),
:where(.icon-button)[data-pressed="true"]:not(:disabled):not([aria-disabled="true"]) > svg,
:where(.scene-card, .history-item)[data-pressed="true"]:not(:disabled):not([aria-disabled="true"]) > :is(span, svg):not(.sr-only) {
  transform: translateY(1px);
  opacity: .94;
}
/* These controls already wrap their complete visible content. Fade the layers
   once rather than fading both the outer button and its children. */
:where(.session-tools .small-button, .state-toggle, .icon-button)[data-pressed="true"]:not(:disabled):not([aria-disabled="true"]) { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  :where(.site .nav-link) > span:not(.sr-only),
  :where(.elite-switch) > svg,
  :where(.session-tools .small-button, .state-toggle) > :is(span, svg):not(.sr-only),
  :where(.icon-button) > svg,
  :where(.scene-card, .history-item) > :is(span, svg):not(.sr-only) { transform: none !important; transition: none !important; }
}
/* Raise only information that was below the existing reading floor. Larger
   body text, input text, decorative indices and status notices keep their sizes. */
@media (min-width: 800px) {
  .page-chat .chat-privacy, .page-chat .service-strip,
  .page-chat .service-strip .text-button, .page-chat .voice-disclosure,
  .page-chat .scene-description, .page-chat .scene-time, .page-chat .opening-label,
  .page-chat .history-item small, .page-chat .history-item time,
  .page-chat .dialog-actions > span, .page-chat .outbox-recovery small { font-size: 11px; }
}
@media (max-width: 799px) {
  .page-chat .history-item small, .page-chat .history-item time,
  .page-chat .dialog-actions > span, .page-chat .opening-label { font-size: 10px; }
}
@media (min-width: 800px) and (max-width: 1399px) {
  .page-chat .composer-meta, .page-chat .state-heading > span,
  .page-chat .state-footnote { font-size: 11px; }
  .page-chat .composer-meta { line-height: 14px; }
}
/* The later page PRs opt into these shared reading styles individually. */
.editorial-surface {
  --font-serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-sans);
  font-style: normal;
}
.site .editorial-surface .editorial-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-style: normal;
  font-synthesis: weight;
  line-height: 1.45;
  letter-spacing: 0;
}
.editorial-highlight {
  background: linear-gradient(transparent 60%, var(--accent) 60%, var(--accent) 90%, transparent 90%);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.editorial-header { padding: 28px 0 24px; }
.editorial-header h1 { margin: 0; font-size: clamp(26px, 3vw, 36px); }
.editorial-header-info { margin: 10px 0 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.editorial-breadcrumb { margin-bottom: 10px; font-size: 13px; line-height: 1.7; }
.editorial-breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: 0 10px; list-style: none; margin: 0; padding: 0; }
.editorial-breadcrumb li { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.editorial-breadcrumb a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: underline; text-underline-offset: 4px; }
.editorial-quote { margin: 20px 0 0; padding: 14px 0 0; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.8; }
.editorial-quote blockquote { margin: 0; white-space: pre-line; }
.editorial-quote figcaption { margin-top: 6px; color: var(--muted); font-size: 12px; }
.editorial-quote a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: underline; text-underline-offset: 4px; }
.editorial-surface :is(a, button):focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.about-page .about-update-date .editorial-pending { background: var(--accent); color: var(--accent-ink); padding: 2px 5px; font: 500 12px/1.5 var(--font-sans); }
/* This attribution moves before the About layout is redesigned in PR 6. */
.about-fonts { grid-column: 1 / -1; padding: 24px; }
.about-fonts h2 { margin: 0 0 10px; font-size: 23px; }
.about-fonts p { font-size: 14px; line-height: 1.8; }
.about-fonts .font-credit { display: inline-flex; align-items: center; min-height: 44px; text-decoration: underline; text-underline-offset: 4px; }
.site .site-footer.font-attribution {
  height: 44px;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  background: var(--paper);
  color: var(--muted);
  justify-content: flex-end;
  letter-spacing: 0;
}
.site .font-attribution .font-credit {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font: 400 11px/1.5 var(--font-sans);
  text-decoration: underline;
  text-underline-offset: 3px;
}
@media (max-width: 799px) {
  .editorial-header { padding: 22px 0 20px; }
}
/* The protected identity / artwork card keeps its original styles and tokens. */
.site.page-archive { background: #f3f4ef; }
.site.page-archive::before { content: none; }
.site .main-content .story-entry-heading h3, .site .main-content .story-work h3, .site .main-content .story-legend h3 { font-family: var(--font-serif); font-synthesis: weight; }
.personnel-page > .editorial-header { padding-top: 0; }
.personnel-page .personnel-workspace { min-width: 0; }
.personnel-page .personnel-controls { position: relative; background: transparent; backdrop-filter: none; margin: 0; padding: 0; }
.personnel-page .personnel-tabs { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 4px; min-height: 44px; overflow: visible; background: transparent; border: 0; box-shadow: none; }
.personnel-page .personnel-tabs button {
  min-width: 44px;
  min-height: 44px;
  height: auto;
  padding: 6px 3px 8px;
  gap: 3px;
  color: var(--muted);
  border: 0 !important;
  background: transparent;
}
.personnel-page .personnel-tabs button span {
  position: relative;
  font: 500 13px/1.5 var(--font-sans);
  white-space: nowrap;
}
.personnel-page .personnel-tabs button small {
  color: var(--muted);
  font: 400 11px/1 var(--font-mono);
}
.personnel-tabs small::before { content: attr(data-number); }
.personnel-page .personnel-tabs button::after { content: none; }
.personnel-page .personnel-tabs button[aria-selected=true] {
  color: var(--ink);
  background: transparent;
}
.personnel-page .personnel-tabs button span::after {
  content: "";
  position: absolute;
  inset: auto 0 -4px;
  height: 1px;
  pointer-events: none;
}
.personnel-page .personnel-tabs button:hover span::after { background: var(--line); }
.personnel-page .personnel-tabs button[aria-selected=true] span::after { height: 3px; background: var(--accent); }
.personnel-workspace #personnel-section-title::before {
  content: var(--directory-number) / "";
  margin-inline-end: .65em;
  color: var(--muted);
  font: 400 13px/1 var(--font-mono);
  vertical-align: middle;
}
.personnel-page .personnel-workspace :is(a,button):focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.personnel-page .personnel-section-heading h2 { font-family: var(--font-serif); font-size: 23px; }
.personnel-page .personnel-workspace-footer { justify-content: flex-end; }
.personnel-page .personnel-workspace-footer a { min-height: 44px; font: 13px/1.6 var(--font-sans); color: var(--ink); }
.personnel-page .story-stream { display: block; }
.story-legend { padding: 4px 0 20px; border-bottom: 1px solid var(--line); }
.story-legend h3 { margin: 0 0 10px; font: 600 19px/1.5 var(--font-serif); }
.story-legend ol { margin: 0; padding-left: 1.7em; list-style-type: cjk-ideographic; }
.story-legend li { margin: 7px 0; color: var(--muted); font: 13px/1.75 var(--font-sans); }
.story-legend strong { font-weight: 500; color: var(--ink); }
.story-work { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 28px 0 0; padding: 0 0 9px; border-bottom: 1px solid var(--ink); }
.story-work h3 { font: 600 23px/1.5 var(--font-serif); }
.story-work > span { color: var(--muted); font: 13px/1.5 var(--font-sans); white-space: nowrap; }
.story-entry { padding: 18px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 24px; }
.story-entry:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.story-entry-heading { display: flex; align-items: baseline; gap: 12px; justify-content: space-between; }
.story-entry-heading h3 { font: 600 19px/1.65 var(--font-serif); }
.story-entry-heading h3 a { display: inline-block; min-height: 44px; }
.story-entry-heading h3 span { font: 400 13px/1.6 var(--font-sans); color: var(--muted); }
.story-entry-number { font: 12px/1.6 var(--font-sans); color: var(--muted); white-space: nowrap; }
.story-relation { font: 13px/1.6 var(--font-sans); color: var(--muted); margin: 2px 0 6px; }
.story-summary { font: 14px/1.8 var(--font-sans); margin: 0 0 8px; }
.story-locator { font: 12px/1.8 var(--font-sans); color: var(--muted); overflow-wrap: anywhere; }
.story-file { display: inline; overflow-wrap: anywhere; }
.editorial-surface button.editorial-reference, .editorial-surface a.editorial-reference { display: inline-flex; justify-content: center; align-items: center; min-width: 44px; min-height: 44px; margin: 1px; padding: 4px; font: 500 13px/1.5 var(--font-sans); color: var(--ink); border: 0; border-bottom: 1px solid var(--line); background: transparent; text-decoration: none; }
.editorial-surface .editorial-reference[aria-pressed=true] { background: var(--accent); color: var(--accent-ink); }
.story-local-note { margin-top: 8px; font: 13px/1.75 var(--font-sans); color: var(--muted); }
.story-copy-notice { margin-top: 10px; padding: 10px 0; border-top: 1px solid var(--line); font: 13px/1.75 var(--font-sans); overflow-wrap: anywhere; user-select: text; }
.personnel-page .story-stream .personnel-reader { background: none; border: 0; border-bottom: 1px solid var(--line); padding: 18px 0; box-shadow: none; backdrop-filter: none; }
.personnel-page .story-stream .personnel-reader-meta { display: none; }
.personnel-page .story-stream .personnel-reader-heading h3 { font: 600 20px/1.6 var(--font-serif); }
.personnel-page .story-stream .personnel-reader-heading { padding: 0; border: 0; margin: 0 0 12px; }
.personnel-page .story-stream .personnel-facts { margin: 0 0 10px; border: 0; }
.personnel-page .story-stream .personnel-facts > div { padding: 4px 0; border: 0; }
.personnel-page .story-stream .personnel-prose { margin-bottom: 0; font-family: var(--font-sans); }
@media (max-width: 799px) {
  .personnel-page .personnel-tabs { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .personnel-page .personnel-tabs button { width: auto; flex-basis: auto; }
  .story-work h3 { font-size: 21px; }
  .story-entry-heading h3 { font-size: 18px; }
  .story-entry-number { font-size: 11px; }
}
.site.page-knowledge { background: #f3f4ef; }
.site.page-knowledge::before { content: none; }
.site .knowledge-reader.editorial-surface { --kn-ink:var(--ink); --kn-muted:var(--muted); --kn-paper:var(--paper); --kn-line:var(--line); color:var(--ink); }
.site .main-content .knowledge-reader :is(h1,h2,h3) { font-family:var(--font-serif); font-synthesis:weight; font-style:normal; letter-spacing:0; }
.knowledge-reader .knowledge-card { background:transparent; border-color:transparent; border-bottom-color:var(--line); box-shadow:none; }
.knowledge-reader .knowledge-card-meta > span:first-child { background:none; padding:0; color:var(--muted); }
.knowledge-reader .knowledge-card-text > p { display:block; -webkit-line-clamp:unset; overflow:visible; color:var(--ink); }
.knowledge-reader .knowledge-card-bottom { color:var(--muted); font-size:12px; }
.knowledge-reader .knowledge-card-bottom > span:last-child { color:var(--muted); }
.knowledge-reader .knowledge-article { background:var(--paper); border-color:transparent; box-shadow:none; }
.knowledge-reader .knowledge-article-header { padding-top:8px; }
.knowledge-reader .knowledge-breadcrumb { padding:4px 0; }
.knowledge-reader .knowledge-breadcrumb a,.knowledge-reader .knowledge-article-footer a { min-height:44px; color:var(--ink); }
.knowledge-reader .knowledge-article-header > .editorial-header { padding:20px 0 12px; }
.knowledge-reader .knowledge-article-header > p { color:var(--muted); font:14px/1.9 var(--font-sans); }
.knowledge-reader .knowledge-section-heading { display:block; border-color:var(--ink); padding-bottom:8px; }
.knowledge-reader .knowledge-section-heading h3 { font-size:23px; color:var(--ink); }
.knowledge-reader .knowledge-paragraph p { color:var(--ink); font-family:var(--font-sans); font-style:normal; }
.knowledge-reader .knowledge-paragraph.is-analysis { background:rgb(var(--accent-rgb) / .22); padding:10px 14px; }
.knowledge-reader .knowledge-source-markers { display:inline; margin:0 0 0 3px; line-height:1; vertical-align:super; }
.knowledge-reader .knowledge-source-marker { display:inline-flex; align-items:center; justify-content:center; min-width:44px; min-height:44px; padding:0 3px; background:none; border:0; color:var(--muted); font:500 12px/1.4 var(--font-sans); text-decoration:underline; text-underline-offset:3px; }
.knowledge-reader .knowledge-source-marker span { padding:1px 3px; }
.knowledge-reader .knowledge-source-marker.is-analysis span { color:var(--accent-ink); background:var(--accent); }
.knowledge-reader .knowledge-source-marker:hover { color:var(--ink); background:none; }
.knowledge-reader .knowledge-prose blockquote { padding:16px 0; border:0; border-block:1px solid var(--line); background:none; font-style:normal; }
.knowledge-reader .knowledge-prose blockquote p { font-family:var(--font-sans); font-style:normal; }
.knowledge-quote-lines { list-style:none; padding:0; margin:0; }
.knowledge-quote-lines li { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:18px; padding:3px 0; color:var(--ink); font:14px/1.8 var(--font-sans); }
.knowledge-quote-lines .quote-line-number { color:var(--muted); font:12px/1.8 var(--font-sans); }
.knowledge-reader .knowledge-sources { background:none; border:0; border-top:1px solid var(--ink); padding-inline:0; }
.knowledge-reader .knowledge-sources > header { border:0; }
.knowledge-reader .knowledge-sources > header > span { font:13px/1.5 var(--font-sans); color:var(--muted); }
.knowledge-reader .knowledge-sources ol > li { background:none; border:0; border-bottom:1px solid var(--line); padding:18px 0; }
.knowledge-reader .knowledge-source-kind { background:none; border:0; color:var(--muted); }
.knowledge-reader .knowledge-source-kind.is-analysis { background:var(--accent); color:var(--accent-ink); }
.knowledge-reader .knowledge-sources a { display:inline-flex; min-height:44px; align-items:center; text-decoration:underline; text-underline-offset:4px; }
.knowledge-source-returns { display:flex; flex-wrap:wrap; gap:0 12px; }
.knowledge-reader .knowledge-related { background:none; border:0; border-top:1px solid var(--line); padding-inline:0; }
.knowledge-reader .knowledge-related-group { background:none; border:0; }
.knowledge-reader .knowledge-related-group a { min-height:44px; }
.knowledge-reader .knowledge-article-footer { border-color:var(--line); }
.knowledge-reader :is(a,button):focus-visible { outline:2px solid var(--ink); outline-offset:3px; }
@media(max-width:799px) {
  .knowledge-reader .knowledge-section-heading h3 { font-size:20px; }
  .knowledge-quote-lines li { font-size:13px; gap:10px; }
}

/* Keep the original image canvas independent of the new navigation gutter. */
.page-knowledge > .main-content > .knowledge-reader { width:calc(100% - 2 * clamp(20px,3.2vw,64px)); }
@media(max-width:799px) { .page-knowledge > .main-content > .knowledge-reader { width:calc(100% - 20px); } }
@media(max-width:599px) { .page-knowledge > .main-content > .knowledge-reader { width:calc(100% - 16px); } }
@media(max-width:359px) { .page-knowledge > .main-content > .knowledge-reader { width:calc(100% - 8px); } }
/* The log owns scrolling on both desktop and mobile; header and input remain in flow. */
html:has(.page-chat) { background: #f3f4ef; }
.site.page-chat { height: 100dvh; min-height: 0; display: flex; flex-direction: column; overflow: hidden; background: #f3f4ef; }
.page-chat .site-header, .page-chat .font-attribution { flex-shrink: 0; }
.site.page-chat .main-content { flex: 1; min-height: 0; overflow: hidden; }
.page-chat::before, .page-chat .chat-layout::before, .page-chat .conversation::after,
.page-chat .chat-heading::before, .page-chat .chat-heading::after, .page-chat .composer-area::before,
.page-chat .message-bubble::before, .page-chat .state-heading::after,
.page-chat .state-card::before, .page-chat .state-card::after, .page-chat .state-card h3::after,
.page-chat .scene-card::before, .page-chat .scene-card::after,
.page-chat .history-item::before, .page-chat .history-item::after { content: none; }
.page-chat .chat-layout, .page-chat .chat-layout.state-collapsed {
  height: 100%; min-height: 0; width: 100%; max-width: 1400px; margin: 0 auto; padding: 0 28px;
  display: grid; grid-template-columns: minmax(0, 1fr) 300px;
}
.page-chat .chat-layout.state-collapsed { grid-template-columns: minmax(0, 1fr); }
.page-chat .conversation, .page-chat .state-collapsed .conversation {
  display: flex; flex-direction: column; height: 100%; min-height: 0; padding: 16px 24px 0 0;
  border: 0; background: var(--paper);
}
.page-chat .state-collapsed .conversation { padding-right: 0; }
.page-chat .chat-heading, .page-chat .state-collapsed .chat-heading {
  display: block; flex-shrink: 0; height: auto; min-height: 0; padding: 0; border: 0;
}
.site .main-content .chat-heading h1 { font-family: var(--font-serif); font-size: 28px; line-height: 1.45; font-weight: 600; letter-spacing: 0; white-space: normal; overflow-wrap: anywhere; color: var(--ink); }
.chat-disclaimer { margin: 4px 0 8px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.chat-scene-record { display: grid; grid-template-columns: 1fr 1fr; margin: 0; border-top: 1px solid var(--line); }
.chat-scene-record > div { padding: 6px 0; min-width: 0; }
.chat-scene-record > div + div { border-left: 1px solid var(--line); padding-left: 12px; }
.chat-scene-record dt { color: var(--muted); font-size: 11px; }
.chat-scene-record dd { margin: 2px 0 0; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.page-chat .conversation-toolbar { display: flex; align-items: center; justify-content: flex-start; flex-shrink: 0; min-height: 44px; padding: 0; gap: 20px; border-bottom: 1px solid var(--ink); }
.page-chat .conversation-toolbar .text-button { min-height: 44px; padding: 6px 0; font-size: 13px; color: var(--ink); gap: 5px; }
.page-chat .conversation-toolbar .count { background: none; color: inherit; font: inherit; padding: 0; }
.chat-record-menu { position: relative; margin-left: auto; font-size: 13px; }
.chat-record-menu summary { min-width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 5px; cursor: pointer; list-style: none; }
.chat-record-menu summary::-webkit-details-marker { display: none; }
.chat-record-menu summary::after { content: "▾"; }
.chat-record-menu > div { position: absolute; right: 0; top: 100%; z-index: 12; min-width: 150px; padding: 5px 10px; border: 1px solid var(--line); background: var(--paper); }
.chat-record-menu button { display: block; width: 100%; min-height: 44px; padding: 6px; border: 0; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.chat-record-menu button:disabled { opacity: .45; cursor: default; }
.chat-record-menu .small-button > span { transition: transform .1s ease, opacity .1s ease; }
.chat-record-menu .small-button[data-pressed="true"]:not(:disabled) { opacity: 1; }
.chat-record-menu .small-button[data-pressed="true"]:not(:disabled) > span { display: inline-block; transform: translateY(1px); opacity: .94; }
@media (prefers-reduced-motion: reduce) { .chat-record-menu .small-button > span { transform: none !important; transition: none !important; } }
.chat-record-menu summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.page-chat .messages { flex: 1 1 0; min-height: 0; overflow-y: auto; padding: 0 4px; overscroll-behavior: contain; background: repeating-linear-gradient(to bottom, transparent 0 27px, #1b201c09 27px 28px); }
.site .main-content .chat-scene-title { display: flex; align-items: center; gap: 12px; margin: 0; padding: 16px 0 4px; font-family: var(--font-serif); font-size: 16px; font-weight: 600; color: var(--ink); }
.chat-scene-title::after { content: ""; flex: 1; min-width: 16px; border-top: 1px solid var(--ink); }
.page-chat .message { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 14px; padding: 18px 0; margin: 0; border-bottom: 1px solid var(--line); }
/* Preserve the supplied avatar geometry, crop, border and original accent. */
.page-chat .reference-avatar { --accent: #c5e827; grid-row: 1; grid-column: 1; }
.page-chat .message-content { display: contents; max-width: none; }
.page-chat .message-name { grid-row: 1; grid-column: 2; align-self: center; margin: 0; font-size: 14px; font-weight: 600; color: var(--ink); }
.page-chat .message-name .opening-label { margin-left: 8px; color: var(--muted); font-weight: 400; }
.page-chat .message-bubble { grid-column: 1 / -1; padding: 8px 0 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; backdrop-filter: none; color: var(--ink); font-size: 16px; line-height: 1.8; }
.page-chat .message-bubble .action-text { font-family: var(--font-sans); font-style: normal; font-size: 13px; line-height: 1.75; color: var(--muted); margin-bottom: 5px; }
.page-chat .message .chat-message-actions, .page-chat .message .message-references, .page-chat .incomplete-reply .message-content > .text-button { grid-column: 1 / -1; }
.page-chat .user-message { grid-template-columns: minmax(0, 1fr) auto; }
.page-chat .user-message .reference-avatar { grid-column: 2; }
.page-chat .user-message .message-name { grid-column: 1; text-align: right; }
.page-chat .user-message .message-bubble { justify-self: end; max-width: 86%; margin-top: 8px; padding: 8px 12px; background: #e7eae2; border: 0; box-shadow: none; }
.page-chat .user-message .chat-message-actions { justify-self: end; }
.page-chat .message-references { gap: 0 16px; padding-top: 0; }
.page-chat .message-references a { display: inline-flex; align-items: center; min-height: 44px; font-size: 12px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.page-chat .chat-message-actions > button, .page-chat .chat-message-actions summary, .page-chat .incomplete-reply .text-button { min-height: 44px; color: var(--muted); }
.chat-stream-cursor { display: inline-block; width: .45em; height: 1em; margin-left: 3px; vertical-align: -.12em; background: var(--accent); }
@media (prefers-reduced-motion: no-preference) { .chat-stream-cursor { animation: chat-cursor-blink 1s steps(2) infinite; } }
@keyframes chat-cursor-blink { 50% { opacity: 0; } }
.page-chat .reply-pending { margin: 0; padding: 0; gap: 10px; color: var(--muted); }
.page-chat .reply-pending .text-button { min-height: 44px; }
.page-chat .opening-hint { margin: 14px 0; color: var(--muted); }
.page-chat .opening-hint .fine-rule { background: var(--line); }
.page-chat .chat-jump-latest { position: static; display: flex; justify-content: flex-end; flex: 0 0 auto; height: auto; padding: 0; }
.page-chat .chat-jump-latest button { position: static; min-height: 44px; margin: 0; padding: 6px 10px; border: 0; background: none; box-shadow: none; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.page-chat .composer-area { padding: 8px 0 0; border-top: 1px solid var(--ink); background: var(--paper); backdrop-filter: none; }
.page-chat .outbox-recovery { border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); margin-bottom: 8px; padding: 4px 0 8px; max-height: min(28dvh, 240px); overflow: auto; }
.page-chat .outbox-recovery > p { margin: 5px 0; padding-left: 10px; border-left: 1px solid var(--line); max-height: 52px; }
.page-chat .outbox-recovery > div { gap: 0 12px; }
.page-chat .outbox-recovery button { border: 0; border-radius: 2px; padding: 6px 0; background: none; color: var(--ink); font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.page-chat .outbox-recovery .outbox-retry { padding: 6px 10px; background: var(--ink); color: var(--paper); text-decoration: none; }
.page-chat .outbox-recovery small { margin-top: 5px; color: var(--muted); }
.page-chat .composer { display: grid; grid-template-columns: minmax(0, 1fr) 88px; gap: 8px; }
.page-chat .composer textarea { min-width: 0; height: 48px; min-height: 48px; max-height: 48px; padding: 10px; font: 16px/1.5 var(--font-sans); background: #fff; border: 1px solid var(--line); border-radius: 2px; box-shadow: none; resize: none; }
.page-chat .composer .send-button { width: 100%; min-width: 0; min-height: 48px; height: 48px; padding: 8px; font-size: 14px; background: var(--ink); border-color: var(--ink); color: var(--paper); box-shadow: none; }
.page-chat .composer-meta { padding-top: 5px; color: var(--muted); font-size: 11px; }
.page-chat .chat-usage { margin: 0; max-height: min(25dvh, 180px); overflow: auto; }
.page-chat .chat-usage summary { display: flex; align-items: center; min-height: 44px; padding: 0; color: var(--muted); }
.page-chat .chat-privacy, .page-chat .service-strip { color: var(--muted); }
.page-chat .chat-error { max-height: 70px; overflow: auto; margin: 0 0 8px; padding: 6px; font-size: 12px; }
.page-chat .character-state { margin: 0; padding: 20px; background: var(--paper); box-shadow: none; border-left: 1px solid var(--line); overflow-y: auto; }
.site .main-content .state-heading h2 { color: var(--ink); font: 600 22px/1.5 var(--font-serif); }
.page-chat .state-heading { flex-wrap: wrap; margin-bottom: 20px; }
.page-chat .state-heading > span { color: var(--muted); }
.page-chat .state-card { padding: 12px 0; min-height: 0; border: 0 !important; border-bottom: 1px solid var(--line) !important; background: none !important; box-shadow: none; backdrop-filter: none; }
.site .main-content .state-card h3 { font: 600 16px/1.5 var(--font-serif); color: var(--ink); }
.page-chat .state-card p { font: 400 15px/1.7 var(--font-sans); color: var(--ink); }
.page-chat .state-footnote, .page-chat .state-note { color: var(--muted); }
.page-chat .character-state .state-card h3::after { content: none; }
.page-chat .scene-card, .page-chat .history-item { background: #f3f4ef !important; border: 1px solid #cfd4ca !important; box-shadow: none; backdrop-filter: none; }
.page-chat .scene-card.selected, .page-chat .history-item.selected { background: #e7eae2 !important; border-color: #1b201c !important; }
@media (max-width: 799px) {
  .page-chat .chat-layout, .page-chat .chat-layout.state-collapsed { display: flex; position: relative; height: 100%; min-height: 0; padding: 0 12px; }
  .page-chat .conversation, .page-chat .state-collapsed .conversation { width: 100%; height: 100%; min-height: 0; padding: 10px 0 0; }
  .site .main-content .chat-heading h1 { font-size: 22px; }
  .page-chat .conversation-toolbar { gap: 15px; }
  .page-chat .conversation-toolbar .text-button, .page-chat .conversation-toolbar .state-toggle > span { font-size: 12px; }
  .chat-scene-record dd { font-size: 12px; }
  .page-chat .message { gap: 0 8px; padding: 12px 0; }
  .page-chat .message-bubble { font-size: 15px; }
  .page-chat .message-name { font-size: 13px; }
  .page-chat .character-state { position: absolute; z-index: 8; left: 12px; right: 12px; top: 170px; max-height: calc(100% - 180px); padding: 16px; border: 1px solid var(--line); }
  .page-chat .composer-meta { font-size: 10px; }
}
@media (max-height: 650px) {
  .page-chat .chat-scene-record > div { padding: 2px 0; }
  .page-chat .chat-disclaimer { margin: 2px 0; }
  .page-chat .outbox-recovery { max-height: 100px; }
  .page-chat .chat-error { max-height: 45px; }
  .page-chat .composer-meta { padding-top: 2px; }
}
.site .resource-library.editorial-surface { max-width: 1260px; padding: 28px 28px 36px; color: var(--ink); background: var(--paper); }
.site.page-library { background: #f3f4ef; }
.site.page-library::before, .site.page-library::after { content: none; }
.resource-library.editorial-surface::before, .resource-library.editorial-surface::after,
.resource-library.editorial-surface .resource-item::before, .resource-library.editorial-surface .resource-item::after,
.resource-library.editorial-surface .library-footnote::after,
.resource-library.editorial-surface .library-section-heading::before, .resource-library.editorial-surface .library-section-heading::after { content: none; }
.resource-library.editorial-surface .editorial-header { padding-top: 0; }
.resource-library.editorial-surface .library-section-heading { display: flex; justify-content: flex-start; margin: 0 0 8px; padding: 0; border: 0; }
.resource-library.editorial-surface .library-search { width: min(100%, 440px); min-height: 44px; background: transparent; border: 1px solid var(--line); box-shadow: none; }
.resource-library.editorial-surface .library-search input { font: 16px/1.5 var(--font-sans); }
.resource-library.editorial-surface .library-search button { min-width: 44px; min-height: 44px; }
.resource-library.editorial-surface .library-type-tabs { display: flex; justify-content: flex-start; gap: 18px; border-bottom: 1px solid var(--line); }
.resource-library.editorial-surface .library-type-tabs button { flex-direction: row; gap: 6px; min-width: 44px; min-height: 44px; padding: 6px 0; border: 0; background: none; color: var(--ink); font: 13px/1.5 var(--font-sans); }
.resource-library.editorial-surface .library-type-tabs small { color: var(--muted); font: 12px/1.5 var(--font-sans); }
.resource-library.editorial-surface .library-type-tabs button::after { left: 0; right: 0; height: 3px; }
.resource-library.editorial-surface .library-type-tabs button[aria-pressed="true"] { color: var(--ink); background: none; }
.resource-library.editorial-surface .library-type-tabs button[aria-pressed="true"] small { color: var(--muted); }
.resource-library.editorial-surface .library-subcategories button { min-height: 44px; color: var(--ink); }
.resource-library.editorial-surface .library-subcategories button[aria-pressed="true"] { background: var(--accent); border-color: transparent; }
.resource-library.editorial-surface .library-filter-summary { color: var(--muted); }
.library-group { margin: 12px 0 32px; }
.library-group-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid var(--ink); padding: 12px 0 8px; }
.site .main-content .library-group-heading h2 { margin: 0; font: 600 24px/1.5 var(--font-serif); color: var(--ink); }
.library-group-heading h2 small { margin-left: 6px; font: 13px/1.5 var(--font-sans); color: var(--muted); }
.library-group-heading .text-button { min-height: 44px; font-size: 12px; color: var(--ink); }
.resource-library.editorial-surface .resource-item { border: 0 !important; border-bottom: 1px solid var(--line) !important; border-radius: 0; background: none !important; box-shadow: none; backdrop-filter: none; scroll-margin-top: 16px; }
.resource-library.editorial-surface .resource-rows { gap: 0; padding: 0; }
.resource-library.editorial-surface .resource-rows .resource-item { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 12px 20px; padding: 18px 0; }
.resource-library.editorial-surface .resource-rows .resource-item-info { grid-column: 2; padding: 0; }
.resource-library.editorial-surface .resource-rows .resource-item-actions { grid-column: 2; padding: 0; flex-direction: row; align-items: center; justify-content: flex-start; }
.site .main-content .resource-library.editorial-surface .resource-item h3 { font-family: var(--font-serif); font-size: 22px; line-height: 1.5; font-weight: 600; letter-spacing: 0; text-transform: none; display: block; overflow: visible; color: var(--ink); margin: 4px 0 8px; }
.resource-library.editorial-surface .resource-item-info > p { display: block; overflow: visible; font: 14px/1.8 var(--font-sans); color: var(--muted); margin: 0 0 8px; }
.resource-library.editorial-surface .resource-category, .resource-library.editorial-surface .resource-details { font: 12px/1.65 var(--font-sans); color: var(--muted); }
.resource-library.editorial-surface .resource-item-actions { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.resource-library.editorial-surface button.resource-play { display: inline-flex; align-items: center; min-height: 44px; background: var(--ink); color: var(--paper); border: 0; box-shadow: none; padding: 8px 14px; font: 13px/1.5 var(--font-sans); }
.resource-library.editorial-surface .resource-item-actions a { display: inline-flex; align-items: center; min-height: 44px; background: none; border: 0; box-shadow: none; padding: 0; color: var(--muted); font: 12px/1.5 var(--font-sans); text-decoration: underline; text-underline-offset: 4px; }
.site .resource-library.editorial-surface a.resource-play { background: none !important; border: 0 !important; box-shadow: none; color: var(--muted); }
.site .resource-library.editorial-surface button.resource-play { background: var(--ink) !important; border: 0 !important; box-shadow: none; }
.resource-timepoints { display: flex; flex-wrap: wrap; gap: 0 12px; }
.resource-timepoints:empty { display: none; }
.resource-timepoints > :is(a, span) { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font: 12px/1.6 var(--font-sans); color: var(--muted); }
.resource-timepoints a { text-decoration: underline; text-underline-offset: 4px; }
.resource-timepoints a:hover, .resource-timepoints a:focus-visible { background: var(--accent); color: var(--accent-ink); }
.resource-timepoints time { white-space: nowrap; font-variant-numeric: tabular-nums; }
.resource-library.editorial-surface .resource-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.resource-library.editorial-surface .resource-grid .resource-item { display: flex; flex-direction: column; padding: 0 0 12px; min-width: 0; gap: 0; }
.resource-library.editorial-surface .resource-grid .resource-item .resource-cover { width: 100%; height: auto; aspect-ratio: 16 / 11; }
.resource-library.editorial-surface .resource-grid .resource-item-info { padding: 10px 0 0; width: 100%; }
.resource-library.editorial-surface .resource-grid .resource-item-actions { padding: 0; margin-top: auto; }
.resource-library.editorial-surface .resource-grid .resource-item h3 { font-size: 18px; }
.resource-library.editorial-surface .resource-grid .resource-play { width: auto; justify-content: flex-start; }
.resource-library.editorial-surface .library-pagination .library-load-more { min-height: 44px; padding: 8px 12px; background: transparent; border: 1px solid var(--line); color: var(--ink); box-shadow: none; }
.resource-library.editorial-surface .library-footnote { border-color: var(--line); color: var(--muted); }
.resource-library.editorial-surface .library-footnote small { color: var(--muted); }
@media (max-width: 799px) {
  .site .resource-library.editorial-surface { padding: 22px 12px 28px; }
  .resource-library.editorial-surface .library-type-tabs { justify-content: space-between; gap: 5px; }
  .resource-library.editorial-surface .library-type-tabs button { gap: 3px; font-size: 12px; }
  .resource-library.editorial-surface .library-type-tabs small { font-size: 11px; }
  .resource-library.editorial-surface .resource-rows .resource-item { gap: 8px 12px; padding: 14px 0; }
  .site .main-content .resource-library.editorial-surface .resource-item h3 { font-size: 18px; }
  .resource-library.editorial-surface .resource-item-info > p { font-size: 13px; }
  .resource-library.editorial-surface .resource-grid { gap: 10px; }
  .resource-library.editorial-surface .resource-grid .resource-item .resource-cover { aspect-ratio: 3 / 2; }
  .site .main-content .resource-library.editorial-surface .resource-grid .resource-item h3 { font-size: 14px; line-height: 1.6; }
  .resource-library.editorial-surface .resource-grid .resource-item-info > p { font-size: 12px; }
  .resource-library.editorial-surface .resource-grid .resource-category, .resource-library.editorial-surface .resource-grid .resource-details { font-size: 11px; overflow-wrap: anywhere; }
}
.site.page-about { background: #f3f4ef; }
.site.page-about::before, .site.page-about::after { content: none; }
.site .about-page.editorial-surface { max-width: 900px; margin: auto; padding: 36px 28px 48px; color: var(--ink); }
.about-page.editorial-surface .editorial-header { padding: 0 0 12px; }
.about-toc { display: flex; flex-wrap: wrap; gap: 0 18px; margin-bottom: 20px; }
.about-toc a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: 13px; color: var(--muted); text-decoration: none; }
.about-toc a span { font-size: 11px; }
.about-toc a[aria-current="location"] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 3px; text-underline-offset: 5px; }
.about-page.editorial-surface .about-grid { display: block; }
.site .about-page.editorial-surface .about-grid > :is(article, section),
.site .about-page.editorial-surface .about-grid > :is(article, section):hover {
  margin: 0 0 28px; padding: 0; border: 0 !important; background: none !important; box-shadow: none; backdrop-filter: none; transform: none; color: var(--ink);
}
.site .about-page.editorial-surface .about-grid > :is(article, section)::before,
.site .about-page.editorial-surface .about-grid > :is(article, section)::after { content: none; }
.site .main-content .about-page.editorial-surface h2 { margin: 0 0 14px; padding: 0 0 8px; border-bottom: 1px solid var(--ink); font: 600 23px/1.5 var(--font-serif); color: var(--ink); letter-spacing: 0; scroll-margin-top: 16px; }
.site .main-content .about-page.editorial-surface h3 { font: 600 17px/1.6 var(--font-serif); color: var(--ink); letter-spacing: 0; }
.site .about-page.editorial-surface .about-grid p { margin: 12px 0 0; font: 400 14px/1.9 var(--font-sans); color: var(--ink); letter-spacing: 0; }
.site .about-page.editorial-surface .about-purpose .about-purpose-lead { margin: 14px 0 0; font: 600 16.5px/1.8 var(--font-sans); max-width: none; }
.site .about-page.editorial-surface .about-grid a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; }
/* Links inside running text stay inline: a 44px inline-flex box stretches its line and cannot wrap. Standalone links keep the 44px target. */
.site .about-page.editorial-surface .about-grid p a { display: inline; min-height: 0; }
.site .about-page.editorial-surface .about-email { margin: 8px 0 0; padding: 0; border: 0; font: 600 16px/1.5 var(--font-sans); }
.about-page.editorial-surface .about-data-note { margin-top: 12px; padding: 0; border-top: 1px solid var(--line); }
.about-page.editorial-surface .about-data-note summary { min-height: 44px; padding: 10px 0; font: 400 13px/1.8 var(--font-sans); color: var(--ink); cursor: pointer; }
.about-page.editorial-surface .about-data-note[open] summary { margin-bottom: 8px; }
.about-page.editorial-surface .about-update-date { display: flex; align-items: baseline; gap: 8px 12px; margin: 20px 0 6px; font: 600 15px/1.7 var(--font-sans); }
.about-page.editorial-surface .about-update-date span { background: none; color: var(--ink); padding: 0; }
.about-page.editorial-surface .about-update-date time { color: var(--muted); font: 400 12px/1.7 var(--font-sans); letter-spacing: 0; }
.about-page.editorial-surface .about-update-date .editorial-pending { background: var(--accent); color: var(--accent-ink); padding: 1px 5px; font: 400 12px/1.7 var(--font-sans); }
.site .about-page.editorial-surface .about-update-list { display: block; list-style: disc outside; padding-left: 21px; margin: 0 0 16px; color: var(--ink); font: 400 13.5px/1.8 var(--font-sans); }
.about-page.editorial-surface .about-update-list li { margin: 4px 0; }
.about-page.editorial-surface .about-update-list li::marker { color: var(--muted); }
.about-page.editorial-surface .about-updates > .about-data-note { margin: 0; border-bottom: 0; }
.about-page.editorial-surface .about-older-update summary time { margin-right: 12px; color: var(--muted); font: inherit; }
.about-page.editorial-surface .about-plan-list { display: block; margin: 14px 0 0; padding: 0; }
.about-page.editorial-surface .about-plan-list li { padding: 0; margin: 16px 0 0; border: 0; }
.about-page.editorial-surface .about-plan-list h3 { margin: 0; }
.about-page.editorial-surface .about-plan-list p { margin-top: 4px; }
@media (max-width: 799px) {
  .site .about-page.editorial-surface { padding: 24px 16px 32px; }
  .about-toc { gap: 0 14px; margin-bottom: 18px; }
  .about-toc a { font-size: 12px; }
  .site .main-content .about-page.editorial-surface h2 { font-size: 20px; }
}
/* Account access is separate from the six public sections. */
.site .account-entry{margin-left:auto;display:flex;align-items:center;justify-content:center;gap:5px;min-width:44px;min-height:44px;max-width:160px;padding:0 8px;color:#eaece8;font:500 13px/1.4 var(--font-sans);white-space:nowrap}
.account-entry [data-account-name]{overflow:hidden;text-overflow:ellipsis;min-width:0}
.account-entry:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
.account-nav-avatar{position:relative;display:block;flex:0 0 20px;width:20px;height:20px;overflow:hidden;border:1px solid #9bac9b;border-radius:50%}
.account-nav-avatar[hidden]{display:none}
.account-nav-avatar img{width:100%;height:100%;object-fit:cover}
.account-card .account-remember{display:flex;align-items:center;gap:.6rem}
.account-card .account-remember input{width:20px;min-height:20px;margin:0}
.account-password .button{min-height:44px}
.chat-account-link{text-decoration:underline}
@media(max-width:799px){.site .site-header{--nav-gutter:6px;gap:4px}.site .site-header nav{flex:1;min-width:0;width:auto;gap:2px}.site .site-header .nav-link{min-width:32px}.site .site-header .nav-link>span{font-size:12px}.site .account-entry{flex:0 1 auto;max-width:64px;padding:0 2px;font-size:12px}.account-nav-avatar{flex-basis:16px;width:16px;height:16px}html[lang=en] .site .site-header .nav-link>span{font-size:11px}}

.account-information{margin:1rem 0}.account-information dt{font-weight:600;margin-top:.8rem}.account-information dd{margin:.3rem 0;overflow-wrap:anywhere}.account-card h2{font-family:var(--font-serif);font-size:1.3rem;margin:1rem 0}.account-card form{min-width:0}

/* Account crops use the same square frame and original doctor crop. */
.account-avatar-preview,[data-account-avatar]{position:relative;overflow:hidden;display:inline-block;flex-shrink:0;background:#d9ded6}
.account-avatar-preview{width:64px;height:64px;border:1px solid #839080;vertical-align:middle;margin:8px}
.account-avatar-preview img,[data-account-avatar] img{position:absolute!important;width:calc(var(--avatar-scale,20.390244) * 100%)!important;max-width:none!important;height:auto!important;left:calc(var(--avatar-left,-12.439024) * 100%);top:calc(var(--avatar-top,-4.9634146) * (var(--avatar-frame,62px)));object-fit:contain}
[data-account-avatar]{--avatar-frame:20px}
.account-avatar-preview.avatar-square img,[data-account-avatar].avatar-square img,.page-chat .doctor-avatar.avatar-square img,.account-avatar-preview.avatar-upload img,[data-account-avatar].avatar-upload img,.page-chat .doctor-avatar.avatar-upload img{width:100%!important;height:100%!important;left:0;top:0;object-fit:cover;object-position:center}
.avatar-options{display:flex;flex-wrap:wrap;gap:8px}.avatar-choice{display:flex;flex-direction:column;align-items:center;border:1px solid #839080;padding:6px;min-width:104px;min-height:44px;background:transparent;font:inherit}.avatar-choice[aria-pressed=true]{outline:2px solid #576b32;outline-offset:1px}
.avatar-crop{display:block;width:min(256px,100%);height:auto;aspect-ratio:1;margin:16px 0}.account-avatar-settings{margin:24px 0}.account-avatar-settings input[type=file]{max-width:100%;min-width:0}.account-avatar-settings input[type=range]{min-height:44px;padding:0}
[data-account-avatar]{--avatar-frame:18px}
@media(max-width:799px){[data-account-avatar]{--avatar-frame:14px}}

/* Account review: identity first, local editing, separate security actions. */
.account-profile-card .account-avatar-settings{margin:24px 0 0}
.account-identity{display:flex;align-items:flex-start;gap:24px}
.account-portrait-actions{display:flex;flex-direction:column;align-items:center;flex:0 0 104px}
.account-portrait-actions .account-avatar-preview{width:80px;height:80px;--avatar-frame:78px;margin:0 0 4px}
.account-identity-copy{flex:1;min-width:0}
.account-name-row{display:flex;align-items:center;justify-content:space-between;gap:12px}
.account-name-row strong{font-size:22px;line-height:1.4;overflow-wrap:anywhere}
.account-card .account-email{margin:2px 0 8px;overflow-wrap:anywhere}
.account-verified{font-size:12px;color:#3f5944;border:1px solid #a1b19b;padding:3px 8px}
.account-card .account-registered{font-size:12px;margin-top:12px}
.account-card .button.account-quiet{background:transparent!important;color:var(--ink)!important;border:1px solid transparent!important;box-shadow:none!important;min-height:44px;padding:8px 10px;font-size:13px;white-space:nowrap}
.account-card .button.account-quiet:hover{border-color:#839080!important;background:#ffffff45!important}
.account-card .button.account-quiet::before{display:none}
.account-section-heading{display:flex;justify-content:space-between;align-items:center;gap:16px}
.account-card .account-section-heading h2{margin:0}
.account-card .account-section-heading p{margin:6px 0 0;font-size:13px}
.account-quota-block,.account-security,.account-danger{border-top:1px solid #adb5a8;margin-top:28px;padding-top:24px}
.account-quota-row{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-top:12px}
.account-quota-row [data-account-quota]{font-size:28px;font-variant-numeric:tabular-nums;font-weight:600;letter-spacing:1px}
.account-card .account-danger h2{font-family:inherit;font-size:15px;font-weight:600}
.account-card .button.account-danger-link{color:#8b3530!important}
.account-card .button.account-danger-button{background:#8b3530!important;color:white!important;box-shadow:none!important}
.account-avatar-editor,.account-inline-editor{border:1px solid #aeb7a8;padding:20px;margin-top:20px;background:#ffffff20}
.account-avatar-editor .avatar-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.account-avatar-editor .avatar-choice{min-width:0;min-height:88px;justify-content:center;padding:4px}
.account-avatar-editor .account-avatar-preview{margin:4px}
.account-file-control{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.account-card .account-upload-button{position:relative;display:inline-flex;align-items:center;justify-content:center;min-height:44px;overflow:hidden;cursor:pointer}
.account-card .account-upload-button input[type=file]{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
.account-upload-button:focus-within{outline:2px solid #576b32;outline-offset:3px}
.account-file-control>.account-note{min-width:0;overflow-wrap:anywhere}
.account-profile-card .account-footer-actions{border-top:1px solid #adb5a8;padding-top:20px;margin-top:24px;justify-content:space-between}
.account-profile-card .account-footer-actions .button{background:transparent!important;color:var(--ink)!important;box-shadow:none!important;border:1px solid transparent!important;padding:8px 10px;font-size:13px;min-height:44px}
@media(max-width:480px){.account-identity{gap:12px}.account-portrait-actions{flex-basis:80px}.account-portrait-actions .account-avatar-preview{width:64px;height:64px;--avatar-frame:62px}.account-name-row{flex-wrap:wrap;gap:0}.account-name-row strong{font-size:20px}.account-name-row .account-quiet{padding:4px 0!important}.account-identity-copy .account-email{font-size:13px}.account-avatar-editor{padding:14px}.account-avatar-editor .avatar-options{grid-template-columns:repeat(2,minmax(0,1fr))}.account-section-heading{gap:8px}.account-quota-row [data-account-quota]{font-size:25px}.account-quota-row .button{padding:10px 14px}.account-section-heading .account-note{max-width:190px}}

.editorial-header .editorial-quote {
  margin: 16px 0 0;
  padding-top: 12px;
  font: 400 15px/1.65 var(--font-sans);
}
.editorial-header .editorial-quote figcaption {
  margin-top: 0;
  color: var(--muted);
  font: 400 12px/1.5 var(--font-sans);
}

.editorial-header-ruled { position: relative; isolation: isolate; overflow: clip; }
.editorial-heading-rule {
  position: absolute;
  z-index: -1;
  pointer-events: none;
  right: -4px;
  top: 21px;
  width: clamp(48px, 14%, 150px);
  height: 2px;
  background: var(--accent);
  transform: rotate(-9deg);
  box-shadow: 0 7px rgb(var(--glass-rgb) / .6);
}

/* Interface text and pictures are not selectable: navigation, buttons, tabs, labels, portraits and
   display titles such as the home page's 凯尔希, so a click or long press there does not highlight
   them. Reading text (dialogue, records, notes, page titles) stays selectable. */
.site-header, .site-footer, .skip-link, .sr-only,
.site button, .site summary, .site [role="tab"], .site img, .site svg,
.page-home .hero,
.page-chat .conversation-toolbar, .page-chat .message .avatar, .page-chat .message-name, .page-chat .chat-message-actions,
.page-chat .character-state .kx-portrait, .page-chat .state-now h3, .page-chat .composer-meta > span,
.personnel-identity, .personnel-controls, .personnel-tabs, .personnel-reader-meta, .personnel-reader-heading > p, .personnel-stream-end,
.history-story-cover,
.library-type-tabs, .library-filter-summary, .resource-cover, .resource-item-actions,
.knowledge-card-image, .about-toc { -webkit-user-select: none; user-select: none; }
.site input, .site textarea, .site [contenteditable="true"] { -webkit-user-select: text; user-select: text; }

/* Seven top-level sections (岁月长卷 joined 2026-11): on the narrowest phones the row scrolls sideways instead of running under the sign-in link. */
@media (max-width:359px){.site-header nav{min-width:0;overflow-x:auto;scrollbar-width:none;justify-content:flex-start}.site-header nav::-webkit-scrollbar{display:none}.site-header .nav-link{flex:0 0 auto}}
