:root{color-scheme:dark;font:16px/1.5 "Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:#101820;color:#e8eff4;--line:#34434e;--muted:#a9bac5;--accent:#9eeacb}*{box-sizing:border-box}[hidden]{display:none!important}body{margin:0;min-height:100svh;background:radial-gradient(ellipse at 32% 14%,#192e33 0,transparent 46%),#101820}header{height:4.7rem;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 clamp(1.2rem,5vw,5rem);background:#101820db}.brand{font-weight:750;letter-spacing:-.08em;font-size:1.55rem}.brand-alt{font-size:1.2rem;letter-spacing:-.045em;font-weight:450;color:var(--muted)}#account,.tools,nav{display:flex;align-items:center;gap:1rem}#username,#status{font-size:.875rem;color:var(--muted)}main{max-width:52rem;margin:auto;padding:0 1.15rem}button,select,input,textarea{font:inherit}button,select{cursor:pointer}button:disabled,select:disabled{opacity:.55;cursor:default}.primary,.quiet,select{border-radius:.7rem;padding:.5rem 1rem}.primary{background:var(--accent);color:#152a24;font-weight:650;border:1px solid transparent}.quiet,select{border:1px solid var(--line);background:#192530;color:#e8eff4}.quiet:hover,select:hover{border-color:#738b99}input:focus-visible,textarea:focus-visible,button:focus-visible,select:focus-visible{outline:2px solid var(--accent);outline-offset:3px}h1{font-size:clamp(2rem,5vw,3rem);line-height:1.1;letter-spacing:-.065em;font-weight:550;margin:.9rem 0}#login{max-width:25rem;margin:clamp(3rem,12vh,8rem) auto 2rem}#login p{color:var(--muted)}.sigil{color:var(--accent);font:500 2rem/1 monospace}#credentials{display:grid;gap:.45rem;margin-top:2rem}#credentials label{font-size:.875rem}input,textarea{color:inherit;background:#18242e;border:1px solid var(--line);border-radius:.7rem;padding:.8rem}#login input{margin-bottom:.55rem}#login #login-error{color:#ffb5a7;min-height:1.3rem;margin:0}#chat{display:flex;flex-direction:column;min-height:calc(100svh - 4.7rem)}nav,.tools{justify-content:space-between}nav{margin:1rem 0}#empty{text-align:center;margin:auto;padding:4rem 0}#messages{display:grid;gap:1rem;padding:1rem 0}#messages:empty{display:none}.message{margin:0;overflow-wrap:anywhere;white-space:pre-wrap;padding:.85rem 1.1rem;border-radius:1rem;max-width:100%}.user{background:#22343c;justify-self:end}.assistant{justify-self:start}.speaker{display:block;color:var(--accent);font-size:.82rem;margin-bottom:.3rem}.user .speaker{color:var(--muted)}#composer{position:sticky;bottom:.6rem;margin:auto 0 1rem;background:#1a2934;border:1px solid #465762;border-radius:1.25rem;padding:.65rem;box-shadow:0 .4rem 1.5rem #09101560}textarea{width:100%;resize:vertical;min-height:3.3rem;max-height:28vh;background:transparent;border:0}.tools{padding:.15rem .25rem}.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}@media(max-width:480px){header{height:3.8rem}#chat{min-height:calc(100svh - 3.8rem)}nav{gap:.4rem}nav>*{font-size:.9rem}#username{display:none}}

dialog{background:#192730;color:#e8eff4;border:1px solid var(--line);border-radius:1rem;padding:1.6rem;max-width:min(28rem,90vw)}dialog::backdrop{background:#081017bb}dialog h2{margin-top:0}dialog a{color:var(--accent)}dialog pre{overflow:auto}#account{gap:.65rem}

/* The login scene and reading pane share one dark palette. */
:root{--accent:#d8c6ff;--line:#312d39;--muted:#a9a4b3;background:#070709;color:#f1eef6}
body{background:radial-gradient(ellipse at 18% 44%,#15101c 0,transparent 58%),#070709}
header{height:4.7rem;background:#09090bf0;border-color:#26232b}
.brand{font-family:"Space Grotesk","Inter",-apple-system,sans-serif;letter-spacing:-.08em}
.brand-alt{color:#aca5b6}
body:has(#login:not([hidden])) main{max-width:90rem;padding:0 clamp(1.1rem,4vw,4.2rem)}
#login{width:100%;max-width:none;min-height:calc(100svh - 4.7rem);margin:0 auto;display:grid;grid-template-columns:minmax(0,1.52fr) minmax(18rem,.85fr);gap:clamp(0rem,3vw,3rem);align-items:center}
#observatory{position:relative;isolation:isolate;width:100%;height:min(75vh,48rem);min-height:24rem;touch-action:pan-y}
#observatory canvas{display:block;width:100%;height:100%;position:absolute;inset:0;pointer-events:none}
.motion{position:absolute;bottom:7%;left:3%;z-index:2;display:grid;place-items:center;width:2.75rem;height:2.75rem;border-radius:50%;border:1px solid #49414f;background:#100e16b3;color:#d4cbdc;font-size:1.04rem;line-height:1}
.motion:hover{border-color:var(--accent);background:#292131}
.login-panel{width:100%;max-width:27rem;justify-self:center;padding:clamp(1.6rem,3.1vw,3rem);border:1px solid #35303c;border-radius:1.35rem;background:linear-gradient(145deg,#19161eee,#100f14f7 65%);box-shadow:0 1.4rem 5rem #0005,inset 0 1px 0 #ffffff08}
.lock-emblem{display:grid;place-items:center;width:2.65rem;height:2.65rem;margin-bottom:1.8rem;border:1px solid #514359;border-radius:.85rem;color:#dcc7fb;background:linear-gradient(145deg,#37293f,#201b27)}
.lock-emblem i{position:relative;display:block;width:.94rem;height:.74rem;border:1.5px solid currentColor;border-radius:.18rem}
.lock-emblem i:before{content:"";position:absolute;left:50%;bottom:.61rem;width:.44rem;height:.43rem;border:1.5px solid;border-bottom:0;border-radius:.4rem .4rem 0 0;transform:translateX(-50%)}
#login h1{font-size:clamp(2rem,3.55vw,3.35rem);letter-spacing:-.065em;font-weight:560;line-height:1.08;margin:0}
#login .login-copy{font-size:1rem;margin:.75rem 0 0;color:#b9b2c2}
#credentials{display:grid;gap:0;margin-top:1.8rem}
#credentials label{margin-bottom:.38rem;font-size:.92rem;font-weight:530;letter-spacing:-.01em}
#credentials input{height:2.9rem;margin:0 0 1.1rem;background:#0d0c10;border:1px solid #403a48;border-radius:.64rem;color:#f4eff7;font-size:1rem;padding:.65rem .8rem;width:100%;min-width:0}
#credentials input:hover{border-color:#64596d}
.password-field{position:relative}
.password-field input#pass{padding-right:3rem;margin-bottom:0}
#reveal{position:absolute;right:.12rem;top:.06rem;width:2.75rem;height:2.75rem;background:transparent;border:0;color:#aaa1b7;border-radius:.45rem;display:grid;place-items:center}
.eye{position:relative;display:block;width:1.08rem;height:.75rem;border:1.5px solid currentColor;border-radius:75% 15%;transform:rotate(45deg)}
.eye:after{content:"";position:absolute;inset:0;margin:auto;width:.28rem;height:.28rem;background:currentColor;border-radius:50%}
#reveal[aria-pressed=true] .eye:before{content:"";position:absolute;left:50%;top:-.3rem;height:1.3rem;width:1px;background:currentColor}
#credentials #login-error{min-height:0;margin:0;color:#ffa8a7;line-height:1.4}
#credentials #login-error:not(:empty){margin-top:.65rem}
#enter{width:100%;margin-top:1.4rem;min-height:2.95rem;font-weight:660;letter-spacing:-.015em;background:#ddd0fc;color:#201628;border:1px solid #eee3ff}
#enter:hover{background:#eee3ff}
nav select,.quiet{background:#19161e;border-color:#39333e}#composer,dialog{background:#18151e;border-color:#403948}textarea{background:transparent}.user{background:#282331}
#chat .sigil,.speaker,dialog a{color:var(--accent)}
@media(max-width:800px){
 #login{grid-template-columns:minmax(0,1.05fr) minmax(17rem,.92fr);gap:0}
 .login-panel{padding:1.6rem}#observatory{min-height:22rem}
}
@media(max-width:650px){
 header{height:3.65rem;padding:0 1.2rem}#chat{min-height:calc(100svh - 3.65rem)}
 body:has(#login:not([hidden])) main{padding:0 1.15rem 1rem}
 #login{display:flex;flex-direction:column;justify-content:center;min-height:calc(100svh - 4.65rem);gap:0}
 #observatory{height:clamp(11.5rem,32svh,17rem);min-height:0;width:min(100%,29rem);flex-shrink:0}
 .motion{bottom:4%;left:1%;width:2.75rem;height:2.75rem}
 .login-panel{max-width:25.5rem;padding:1.35rem 1.35rem 1.5rem;border-radius:1.1rem}
 .lock-emblem{display:none}#login h1{font-size:2.05rem}#login .login-copy{margin:.35rem 0 0}
 #credentials{margin-top:1.2rem}#credentials input{margin-bottom:.8rem}#enter{margin-top:1.1rem}
}
@media(max-height:520px) and (min-width:651px){#observatory{min-height:18rem}.login-panel{margin:.6rem 0;padding:1.2rem}.lock-emblem{display:none}#credentials{margin-top:.7rem}}

#password-rules{font-size:.875rem;line-height:1.45;margin:.65rem 0 0}
