:root{font-family:system-ui,-apple-system,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-synthesis:none;-webkit-font-smoothing:antialiased;color:#334354;background:#fbfaf8;--paper:#fbfaf8;--sidebar:#f1f0ec;--hover:#e8e6e0;--line:#e4e1dc;--ink:#283a4a;--muted:#7d8989;--faded:#a6a7a3;--bubble:#f1f0ec;--panel:#fff;--rose:#b98183;--sage:#6b9981;--shadow:0 7px 25px rgba(37,40,39,.045),0 1px 2px rgba(40,40,40,.04);--font-serif:'Segoe UI',system-ui,-apple-system,'Helvetica Neue',Arial,sans-serif}
*{box-sizing:border-box}html,body{height:100%;margin:0}body{overflow:hidden;font-size:14px}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.55}button:focus-visible,select:focus-visible,input:focus-visible,textarea:focus-visible{outline:2px solid var(--rose);outline-offset:2px}.symbols{position:absolute;width:0;height:0;overflow:hidden}svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}[hidden]{display:none!important}
body[data-theme='pro']{--paper:#1f2326;--sidebar:#181d21;--hover:#30383d;--line:#343b3f;--ink:#edf0ed;--muted:#a8b3b8;--faded:#829095;--bubble:#2b3135;--panel:#242b2e;--rose:#d2a1a3;--sage:#90b3a0;--shadow:0 12px 40px rgba(0,0,0,.16)}
body[data-theme='rose']{--paper:#fff8fb;--sidebar:#fce9f2;--hover:#f8d9e7;--line:#f2d2e1;--ink:#4a2b3a;--muted:#9a7284;--faded:#c09bab;--bubble:#fceef5;--panel:#fffdfd;--rose:#d64f83;--sage:#7ba889;--shadow:0 7px 25px rgba(214,79,131,.07),0 1px 2px rgba(120,50,80,.05)}
body[data-theme='velvet']{--paper:#241722;--sidebar:#1d1119;--hover:#3a2434;--line:#452c40;--ink:#faeef5;--muted:#c4a3b8;--faded:#9d7f92;--bubble:#33202e;--panel:#2b1b27;--rose:#ef8fb8;--sage:#9dbfa8;--shadow:0 12px 40px rgba(0,0,0,.28)}
body[data-theme='sakura']{--paper:#fffaf8;--sidebar:#f6ecee;--hover:#ecdfe3;--line:#ecdde0;--ink:#4b3944;--muted:#947882;--faded:#ab9ca0;--bubble:#f7ecee;--panel:#fffefe;--rose:#be858f;--sage:#788d80}
body[data-theme='matcha']{--paper:#f8f9f2;--sidebar:#eaf0e4;--hover:#dfe8d9;--line:#d8e3d3;--ink:#354735;--muted:#758676;--faded:#9aa99a;--bubble:#eef2ea;--panel:#fefefa;--rose:#ae8980;--sage:#668c6a}
body[data-theme='indigo']{--paper:#f8f8fc;--sidebar:#eaeaf3;--hover:#dfdfed;--line:#dedeea;--ink:#30364e;--muted:#7b8197;--faded:#9c9eb0;--bubble:#ededf5;--panel:#fff;--rose:#b1839c;--sage:#7c84ae}
body[data-theme='midnight']{--paper:#161a24;--sidebar:#121722;--hover:#273044;--line:#30384a;--ink:#eef1f6;--muted:#a7b3ca;--faded:#7e8da4;--bubble:#252e40;--panel:#20283a;--rose:#cb9fb7;--sage:#88b4a3;--shadow:0 13px 28px rgba(0,0,0,.2)}
.app-shell{display:flex;width:100%;height:100dvh;background:var(--paper);color:var(--ink);overflow:hidden}.sidebar{width:250px;min-width:250px;padding:0 15px 19px;background:var(--sidebar);display:flex;flex-direction:column;transition:width .2s,min-width .2s;border-right:1px solid var(--line)}.brand{height:92px;display:flex;align-items:flex-start;padding:26px 11px 0;gap:10px}.brand-icon{width:37px;height:37px;object-fit:contain}.brand-name{font:23px/38px var(--font-serif);letter-spacing:-.7px;color:var(--ink)}.brand-collapse{margin:10px 0 0 auto;opacity:.8}.icon-button{display:inline-flex;align-items:center;justify-content:center;min-width:30px;width:30px;height:30px;border:0;border-radius:8px;color:var(--muted);background:transparent;padding:6px}.icon-button:hover{background:var(--hover)}.brand-collapse svg{width:14px;height:14px}.new-chat{display:flex;align-items:center;gap:11px;width:100%;height:52px;padding:0 12px;margin:6px 0 11px;background:transparent;border:0;color:var(--ink);text-align:left;font-weight:600}.new-chat:hover{background:var(--hover);border-radius:9px}.new-chat svg{width:19px;height:19px}.new-chat kbd{margin-left:auto;font:11px Arial, sans-serif;color:var(--faded);border:1px solid var(--line);padding:3px 6px;border-radius:5px}.primary-nav{display:flex;flex-direction:column;gap:4px}.nav-item{display:flex;align-items:center;gap:12px;text-align:left;padding:0 13px;height:39px;border:0;background:transparent;color:var(--ink);border-radius:10px;font-size:13.5px}.nav-item svg{width:19px;height:19px;color:var(--muted)}.nav-item.active{background:var(--hover);font-weight:600}.nav-item:hover:not(.active){background:color-mix(in srgb,var(--hover) 70%,transparent)}.side-rule{height:1px;background:var(--line);margin:25px 11px 23px}.recents-label{font-size:11px;color:var(--faded);font-weight:700;letter-spacing:1.6px;margin:0 13px 13px}.recent-list{overflow-y:auto;min-height:0;max-height:45vh;scrollbar-width:thin}.recent-item{width:100%;padding:11px 12px;border-radius:9px;background:transparent;border:0;text-align:left;color:var(--muted);font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.recent-item.active{background:var(--hover);color:var(--ink)}.recent-item:hover{background:var(--hover)}.empty-recents{font-size:12px;color:var(--faded);padding:4px 12px}.sidebar-spacer{flex:1}.local-state{display:flex;align-items:center;font-size:12px;gap:7px;color:var(--muted);padding:0 13px}.status-dot{display:inline-block;width:6px;height:6px;background:var(--sage);border-radius:50%;flex-shrink:0}.status-dot.offline{background:var(--rose)}.gpu-word{margin-left:auto;color:var(--faded);font-size:11px}.lower-rule{margin:16px 7px 11px}.profile-row{display:flex;align-items:center;gap:11px;padding:0 12px;font-size:12px;color:var(--muted);height:35px}.profile-row .icon-button{margin-left:auto}.avatar{display:flex;align-items:center;justify-content:center;border-radius:50%;width:30px;height:30px;background:color-mix(in srgb,var(--muted) 19%,var(--paper));color:var(--muted);font-family:var(--font-serif);font-size:14px}
.main-pane{flex:1;display:flex;min-width:0;flex-direction:column;position:relative}.topbar{height:72px;flex-shrink:0;display:flex;align-items:center;justify-content:space-between;padding:0 55px;gap:20px}.breadcrumb{display:flex;align-items:center;gap:15px;min-width:0;font-size:13px}.breadcrumb>span:first-child{color:var(--faded)}.breadcrumb strong{font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.crumb-separator{color:var(--faded)}.top-actions{display:flex;align-items:center;gap:16px;white-space:nowrap}.status-indicator{font-size:12px;color:var(--muted);display:flex;align-items:center;gap:8px}.top-divider{width:1px;height:26px;background:var(--line)}.model-top-select{display:flex;gap:8px;align-items:center;min-width:0;color:var(--ink);font-weight:600;font-size:12px}.model-top-select select{border:0;min-width:0;max-width:175px;background:transparent;color:inherit;appearance:none;text-overflow:ellipsis;cursor:pointer;font-size:12px;font-weight:600}.model-top-select svg{width:14px;height:14px;pointer-events:none;color:var(--muted)}
.chat-view{display:flex;flex:1;min-height:0;flex-direction:column}.thread{flex:1;min-height:0;overflow:auto;scrollbar-width:thin;scrollbar-color:var(--line) transparent;position:relative}.welcome{max-width:760px;position:relative;margin:auto;padding:0 0 2px;top:clamp(95px,27vh,265px)}.welcome-title{display:flex;align-items:center;gap:23px;margin-bottom:39px}.welcome-icon{width:58px;height:58px;object-fit:contain}.welcome-eyebrow{display:block;font-weight:700;color:var(--rose);letter-spacing:2.5px;font-size:11px;margin-bottom:7px}.welcome-eyebrow span{letter-spacing:0;margin-left:6px}.welcome h1{font:39px/1.12 var(--font-serif);color:var(--ink);font-weight:400;letter-spacing:-1.6px;margin:0}.welcome-composer-slot{height:147px}.welcome-hint{display:flex;justify-content:space-between;font-size:11px;color:var(--faded);margin-top:20px}.welcome-hint>span{display:flex;gap:7px;align-items:center}.composer-dock{display:flex;flex-shrink:0;align-items:end;justify-content:center;padding:12px 30px 18px}.composer-dock .composer{margin:0;max-width:760px}.composer{background:var(--panel);border:1px solid var(--line);border-radius:22px;box-shadow:var(--shadow);width:100%;padding:16px 16px 13px;display:flex;flex-direction:column}.composer textarea{color:var(--ink);background:transparent;border:0;outline:0;resize:none;width:100%;height:82px;padding:4px 7px;line-height:1.5;max-height:220px}.composer textarea::placeholder{color:var(--faded)}.composer-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:28px}.composer-left,.composer-right{display:flex;align-items:center;gap:7px}.composer .icon-button{width:28px;height:28px}.composer svg{width:18px;height:18px}.composer select{background:transparent;border:0;color:var(--muted);appearance:none;cursor:pointer;min-width:0;font-size:12px}.mode-control{padding:0 4px}.mode-control select{max-width:132px}.subtle-select{display:flex;align-items:center;gap:4px;color:var(--muted);padding:5px 3px;border-radius:7px}.subtle-select:hover{background:var(--bubble)}.subtle-select svg{width:16px;height:16px}.effort-choice select{max-width:123px}.send-button{border:0;background:var(--rose);color:white;display:flex;align-items:center;justify-content:center;border-radius:10px;width:34px;height:34px;margin-left:8px}.send-button svg{width:21px;height:21px;stroke-width:2}.send-button:hover{filter:brightness(.94)}.stop-button{background:var(--ink)}.composer:focus-within{border-color:color-mix(in srgb,var(--rose) 60%,var(--line))}.chat-view.has-messages .welcome{display:none}.messages{max-width:760px;margin:36px auto 0;padding:0 2px 35px;width:calc(100% - 38px)}.message{margin-bottom:41px}.message.user{display:flex;justify-content:flex-end}.user-bubble{max-width:74%;min-width:100px;border-radius:18px;background:var(--bubble);padding:16px 19px;white-space:pre-wrap;line-height:1.58;color:var(--ink)}.assistant-head{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:600;margin:5px 0 19px}.small-mark{width:24px;height:24px;object-fit:contain}.message-body{font-size:14px;line-height:1.76;color:var(--ink);overflow-wrap:anywhere}.message-body h1,.message-body h2,.message-body h3{font-family:var(--font-serif);font-weight:400;line-height:1.3;margin:23px 0 13px;color:var(--ink)}.message-body h2{font-size:24px}.message-body h3{font-size:20px}.message-body p{margin:0 0 17px}.message-body strong{font-weight:700}.message-body pre,.raw-panel{font:12px/1.6 Consolas,'SFMono-Regular',monospace;background:var(--bubble);border:1px solid var(--line);border-radius:12px;padding:16px 19px;overflow:auto;white-space:pre-wrap}.message-body code{font-family:Consolas,monospace;font-size:.91em}.message-body p code{background:var(--bubble);padding:2px 4px;border-radius:3px}.message-body ul{margin-top:6px;padding-left:22px}.message-body li{margin-bottom:4px}.message-metadata{color:var(--faded);font-size:11px;margin-top:16px;display:flex;gap:12px;align-items:center}.raw-toggle{border:0;background:transparent;text-decoration:underline;text-underline-offset:3px;color:var(--muted);padding:0}.stream-stats{font-size:12px;color:var(--muted);font-style:italic}.composer-dock[hidden]{display:none}.content-view{overflow:auto;flex:1}.content-inner{max-width:800px;padding:56px 30px 100px;margin:0 auto}.content-inner h1{font:35px/1.15 var(--font-serif);font-weight:400;letter-spacing:-1px;margin:0 0 14px}.content-lead{font-size:14px;color:var(--muted);line-height:1.65;margin:0 0 34px}.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:13px}.card{background:var(--panel);border:1px solid var(--line);padding:20px;border-radius:16px;line-height:1.5}.card h3{margin:0 0 5px;font-size:14px;font-weight:600}.card p{margin:5px 0;color:var(--muted);font-size:12px}.card small{font-size:11px;color:var(--faded)}.card button{margin-top:12px}.card .pill{font-size:10px}.form-row{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:14px 0}.action-btn{background:var(--ink);color:var(--panel);border:0;border-radius:9px;padding:10px 15px;font-size:12px;font-weight:600}.text-btn{background:transparent;border:1px solid var(--line);border-radius:9px;padding:9px 12px;color:var(--ink);font-size:12px}.text-btn:hover,.action-btn:hover{opacity:.88}.inline-input{border:1px solid var(--line);background:var(--panel);color:var(--ink);padding:10px;border-radius:9px;min-width:180px;max-width:100%}.list-row{border-bottom:1px solid var(--line);padding:14px 0;display:flex;align-items:center;justify-content:space-between;gap:13px;min-width:0}.list-row p{font-size:12px;line-height:1.5;color:var(--muted);margin:4px 0 0;overflow-wrap:anywhere}.list-row strong{font-size:13px;overflow-wrap:anywhere}.muted{color:var(--muted);font-size:12px}.pill{border-radius:20px;padding:5px 9px;color:var(--sage);background:color-mix(in srgb,var(--sage) 12%,var(--panel));display:inline-block;font-size:11px}.code-inline{font:12px Consolas,monospace;background:var(--bubble);padding:3px 6px;border-radius:5px;overflow-wrap:anywhere}
.companion-fab{position:fixed;right:20px;bottom:23px;z-index:12;width:48px;height:48px;border-radius:50%;background:var(--panel);border:1px solid var(--line);box-shadow:0 6px 25px #0002;padding:8px;display:none}.companion-fab img{width:100%;height:100%;object-fit:contain}.companion-fab:hover{transform:translateY(-2px)}.drawer{position:fixed;right:0;top:0;bottom:0;z-index:20;background:var(--panel);width:min(420px,100vw);border-left:1px solid var(--line);box-shadow:-8px 0 40px #0001;display:flex;flex-direction:column}.drawer-title{display:flex;justify-content:space-between;align-items:start;padding:27px 25px 18px;border-bottom:1px solid var(--line)}.drawer-title h2{font:26px var(--font-serif);font-weight:400;margin:8px 0 0}.drawer-kicker{font-size:10px;color:var(--rose);letter-spacing:2px;font-weight:700}.drawer-body{padding:22px 24px 30px;overflow-y:auto}.drawer-body h3{font-size:13px;margin:23px 0 10px}.drawer-body p{font-size:13px;line-height:1.7;color:var(--muted)}.drawer-body .form-row{margin:12px 0}.drawer-body select,.drawer-body input{min-width:0}.drawer-body label{font-size:12px;color:var(--muted);display:block;margin:12px 0 6px}.drawer-body .inline-input{width:100%}.drawer-body .action-btn{margin:5px 0}.drawer-body .theme-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}.theme-option{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;border:1px solid var(--line);border-radius:12px;background:var(--panel);padding:10px 3px;color:var(--ink);font-size:11px}.theme-swatch{display:block;border-radius:7px;border:1px solid #0001;width:62px;height:34px;background:linear-gradient(90deg,var(--sample-side) 30%,var(--sample-main) 30%)}.theme-option.selected{outline:2px solid var(--sage)}.drawer-events{padding:0;margin:0;list-style:none}.drawer-events li{padding:11px 0;border-bottom:1px solid var(--line);font-size:12px}.drawer-events li b{display:block;font-weight:600;margin-bottom:5px}.drawer-events li small{color:var(--faded);font-size:11px}.drawer-events pre{white-space:pre-wrap;overflow-wrap:anywhere;background:var(--bubble);padding:11px;border-radius:8px;font:11px/1.5 Consolas,monospace}.drawer-events details{margin-top:5px}.drawer-events summary{color:var(--sage);cursor:pointer;font-size:11px}.toast{position:fixed;z-index:50;left:50%;transform:translateX(-50%);bottom:24px;max-width:min(560px,92vw);padding:11px 17px;background:var(--ink);color:var(--panel);box-shadow:0 6px 25px #0002;border-radius:9px;font-size:12px;line-height:1.5}.janna-dialog{border:1px solid var(--line);background:var(--panel);color:var(--ink);border-radius:17px;width:min(450px,93vw);padding:27px;box-shadow:0 15px 75px #0003}.janna-dialog::backdrop{background:#16233280}.janna-dialog h2{font:28px var(--font-serif);font-weight:400;margin:0 0 13px}.janna-dialog p{line-height:1.6;color:var(--muted);font-size:13px}.janna-dialog label{font-size:12px;display:block;margin:20px 0 8px}.janna-dialog input{width:100%;background:var(--panel);color:var(--ink);border:1px solid var(--line);padding:11px;border-radius:8px}.dialog-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:18px}.pair-icon{width:58px;margin-bottom:13px}.full{width:100%;margin-top:17px}.pair-error{color:var(--rose)!important}.mobile-scrim{display:none}
@media(min-width:850px){.app-shell.companion-pinned .companion-fab{display:flex}}@media(max-width:1100px){.topbar{padding:0 28px}.welcome{width:calc(100% - 60px)}.welcome-title{gap:14px}.welcome h1{font-size:35px}.composer-dock{padding-left:20px;padding-right:20px}}@media(max-width:700px){.sidebar{position:fixed;z-index:30;left:-270px;top:0;bottom:0;box-shadow:6px 0 28px #0001;transition:left .2s}.sidebar.mobile-open{left:0}.mobile-scrim.visible{display:block;position:fixed;inset:0;background:#0005;z-index:29}.menu-toggle{display:inline-flex!important}.topbar{height:66px;padding:0 15px;gap:9px}.breadcrumb{gap:7px;flex:1;font-size:12px}.breadcrumb>span:first-child{display:none}.crumb-separator{display:none}.top-actions{gap:6px}.top-divider{display:none}.status-indicator{font-size:0;margin:0 2px}.model-top-select select{max-width:110px;font-size:11px}.top-actions>.icon-button{width:29px}.welcome{top:clamp(105px,22vh,190px);width:calc(100% - 37px)}.welcome-title{gap:13px;margin-bottom:30px}.welcome-icon{width:51px;height:51px}.welcome h1{font-size:30px;letter-spacing:-.8px}.welcome-hint{font-size:10px;gap:10px}.welcome-hint>span:last-child{display:none}.welcome-composer-slot{height:140px}.composer-dock{padding:0 12px max(13px,env(safe-area-inset-bottom))}.composer{padding:13px;border-radius:16px}.composer textarea{height:83px}.composer-right{gap:0}.subtle-select{gap:3px}.speed-choice select{max-width:70px}.effort-choice select{max-width:94px}.send-button{margin-left:5px}.messages{margin-top:25px}.message.user .user-bubble{max-width:90%;padding:13px 16px}.message{margin-bottom:29px}.content-inner{padding:40px 20px 80px}.companion-fab{display:flex;bottom:130px;right:14px;width:41px;height:41px}.drawer{width:100%}.drawer-title{padding:20px 23px 15px}.drawer-body{padding:18px 22px}.welcome h1{font-size:28px}}@media(min-width:701px){.menu-toggle{display:none!important}}@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
/* Keep the mobile send control visible even on narrow iPhones. */
@media(max-width:700px){.composer-toolbar{gap:0}.composer-left,.composer-right{gap:0;min-width:0}.composer-left{flex:0 1 auto}.composer-right{flex:0 0 auto;margin-left:auto}.composer-right .subtle-select{padding:5px 1px}.composer-left #connectionButton{display:none}.mode-control{padding:0}.mode-control select{max-width:84px;font-size:11px}.effort-choice select{max-width:69px;font-size:11px}.speed-choice select{max-width:54px;font-size:11px}.send-button{width:30px;height:30px;margin-left:3px;flex-shrink:0}.composer .icon-button{width:26px}.composer{padding:12px 13px}}

.toggle-setting{display:flex;align-items:flex-start;gap:10px;line-height:1.55;margin:12px 0;color:var(--text, #344047);font-size:13px}.toggle-setting input{margin-top:3px;accent-color:#b98083}
/* Additional restrained Japanese palettes. Only surface colors change;
   the owner's master artwork remains unaltered. */
body[data-theme='washi']{--paper:#fffdf7;--sidebar:#f3eee4;--hover:#eae4d6;--line:#e6e0d3;--ink:#41403b;--muted:#847f76;--faded:#9b998e;--bubble:#f2eee5;--panel:#fffef9;--rose:#b78983;--sage:#77927c}
body[data-theme='kintsugi']{--paper:#243038;--sidebar:#1b2529;--hover:#344149;--line:#45515a;--ink:#f5f1e7;--muted:#b8bbad;--faded:#9c9e91;--bubble:#344047;--panel:#29373e;--rose:#d1ac72;--sage:#c0ab75;--shadow:0 12px 32px #0002}
body[data-theme='ume']{--paper:#fff7f8;--sidebar:#f1e1e5;--hover:#edd7df;--line:#e7d7dc;--ink:#493c47;--muted:#907783;--faded:#a7929c;--bubble:#f5e9ec;--panel:#fffdfd;--rose:#be8294;--sage:#7a9281}
body[data-theme='yoru']{--paper:#182235;--sidebar:#131c29;--hover:#293952;--line:#34435b;--ink:#f4f5fb;--muted:#b2bdd0;--faded:#919db2;--bubble:#273448;--panel:#202c3c;--rose:#c5a2b2;--sage:#a2b8bf;--shadow:0 10px 28px #0003}
body[data-theme='kyoto']{--paper:#faf4e9;--sidebar:#ede4d7;--hover:#e5d9c9;--line:#e2d6c6;--ink:#403832;--muted:#87766b;--faded:#9d9184;--bubble:#eee6da;--panel:#fffaf0;--rose:#b98071;--sage:#819079}
body[data-theme='moss']{--paper:#324537;--sidebar:#26382f;--hover:#415749;--line:#506352;--ink:#f0f4e9;--muted:#c0d0ba;--faded:#94aa96;--bubble:#3d5343;--panel:#394c3d;--rose:#c7a392;--sage:#b0c69a;--shadow:0 10px 28px #0003}
body[data-theme='sora']{--paper:#f3faff;--sidebar:#d9eaf0;--hover:#cedfe7;--line:#dae5eb;--ink:#334c5c;--muted:#778d98;--faded:#98a5af;--bubble:#e9f2f8;--panel:#fff;--rose:#a688a1;--sage:#7397a0}
body[data-theme='akane']{--paper:#fff8f0;--sidebar:#f3dfd4;--hover:#ebd3c6;--line:#e9d8ce;--ink:#493b38;--muted:#947b72;--faded:#ad988c;--bubble:#f4eae2;--panel:#fffdf9;--rose:#ba736e;--sage:#89957e}
body[data-theme='zen']{--paper:#f8f7f3;--sidebar:#e8e6df;--hover:#dcdbd3;--line:#e1dfd7;--ink:#404847;--muted:#7d8886;--faded:#9a9f98;--bubble:#ecebe5;--panel:#fffefa;--rose:#ab8784;--sage:#7b9283}
/* Crop the ivory square to a clean circle on dark surfaces; never redraw the mark. */
body[data-theme='pro'] .brand-icon,body[data-theme='pro'] .small-mark,body[data-theme='pro'] .welcome-icon,
body[data-theme='midnight'] .brand-icon,body[data-theme='midnight'] .small-mark,body[data-theme='midnight'] .welcome-icon,
body[data-theme='kintsugi'] .brand-icon,body[data-theme='kintsugi'] .small-mark,body[data-theme='kintsugi'] .welcome-icon,
body[data-theme='yoru'] .brand-icon,body[data-theme='yoru'] .small-mark,body[data-theme='yoru'] .welcome-icon,
body[data-theme='moss'] .brand-icon,body[data-theme='moss'] .small-mark,body[data-theme='moss'] .welcome-icon{border-radius:50%;background:#faf7ed;object-fit:cover}
.recent-row{display:flex;align-items:center;gap:2px;min-width:0;position:relative}.recent-row>.recent-item{flex:1;min-width:0}.recent-delete{border:0;background:transparent;color:var(--faded);font-size:19px;width:24px;height:28px;padding:0;border-radius:5px;opacity:.5}.recent-delete:hover,.recent-delete:focus-visible{opacity:1;background:var(--hover);color:var(--ink)}
.model-top-select{position:relative}.model-native{position:absolute;width:1px;height:1px;margin:0;opacity:0;pointer-events:none}.model-menu-button{display:flex;align-items:center;gap:6px;max-width:min(260px,52vw);border:1px solid var(--line);background:var(--panel);color:var(--ink);border-radius:9px;padding:7px 8px 7px 10px;font-size:12px;font-weight:600}.model-menu-button span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.model-menu-button svg{width:14px;height:14px;color:var(--muted);flex-shrink:0}.model-menu-button[aria-expanded=true]{border-color:var(--sage)}.model-menu{position:absolute;top:calc(100% + 6px);right:0;z-index:40;width:min(320px,86vw);max-height:min(420px,70vh);overflow:auto;background:var(--panel);color:var(--ink);border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow);padding:6px}.model-menu-group{font-size:10px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--faded);padding:8px 10px 4px}.model-menu-item{display:flex;flex-direction:column;align-items:flex-start;gap:2px;width:100%;text-align:left;border:0;background:transparent;color:var(--ink);border-radius:8px;padding:8px 10px}.model-menu-item strong{font-size:13px;font-weight:650}.model-menu-item small{color:var(--muted);font-size:11px;font-weight:400;line-height:1.35}.model-menu-item[aria-selected=true]{background:var(--hover)}.model-menu-item:hover,.model-menu-item:focus-visible{background:var(--hover)}
.settings-tabs{display:flex;flex-wrap:wrap;gap:5px;padding-bottom:15px;margin-bottom:20px;border-bottom:1px solid var(--line)}.settings-tab{border:1px solid transparent;background:transparent;color:var(--muted);font-size:11px;padding:8px 10px;border-radius:8px}.settings-tab.active{background:var(--hover);color:var(--ink);border-color:var(--line);font-weight:600}.settings-row{display:flex;gap:14px;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line);padding:14px 0}.settings-row-description{flex:1;min-width:0}.settings-row-description strong{font-size:12px}.settings-row-description p{font-size:11px!important;line-height:1.5;margin:5px 0 0}.settings-row select{max-width:155px;width:145px}.settings-row select.settings-wide{max-width:220px;width:210px}.settings-row input[type=checkbox],.setting-check input{width:17px;height:17px;accent-color:var(--sage)}.settings-content>h3{font:19px var(--font-serif);margin:5px 0 12px}.settings-content>.text-btn,.settings-content>.action-btn{margin:12px 7px 0 0}
.research-console .inline-input{margin-top:10px}.research-source-list{display:grid;gap:10px;margin-top:18px}.research-result-title{display:block;font-size:13px}.research-source{padding:16px}.research-source p{font-size:12px}.research-status{display:flex;flex-wrap:wrap;gap:12px;align-items:center;font-size:12px}.research-status small{color:var(--faded)}.research-source-list a,.reference-link{color:var(--sage);text-decoration:none;overflow-wrap:anywhere}.research-source-list a:hover,.reference-link:hover{text-decoration:underline}.provider-details{margin-top:15px;color:var(--muted);font-size:11px}.provider-details summary{cursor:pointer}.provider-details p{font-size:11px;margin:6px 0}.source-references{margin:16px 0;font-size:12px;border-left:2px solid var(--sage);padding:3px 15px}.source-references summary{cursor:pointer;color:var(--muted)}.reference-row{display:flex;gap:4px;flex-direction:column;margin:11px 0}.reference-row small{color:var(--faded);line-height:1.5}.plugin-card .pill{margin:10px 0}.deploy-fields{display:grid;gap:8px;margin:12px 0}.deploy-fields>.inline-input{width:100%}

/* Janna Pro 1.1 — native-feeling model, knowledge and GitHub source surfaces. */
.janna-pro-hero{border:1px solid var(--line);padding:25px;display:flex;flex-direction:column;align-items:flex-start;gap:10px;margin-bottom:18px}
.janna-pro-hero h2,.knowledge-items h2{font:normal 30px/1.2 var(--font-serif);margin:0;color:var(--ink)}
.janna-pro-hero p{margin:0;line-height:1.6;max-width:600px}
.eyebrow{font-size:10px;font-weight:700;letter-spacing:1.5px;color:var(--sage)}
.knowledge-retrieval{margin-top:12px;display:block;line-height:1.9}
.knowledge-retrieval>.pill{display:inline-flex;margin:6px 5px 6px 0;white-space:normal}
.knowledge-retrieval .reference-link{font-size:12px}
.source-explorer{display:flex;flex-direction:column;gap:10px}
.source-explorer>.inline-input{width:100%;max-width:100%;margin:0}
.repository-results{margin:14px 0 0;max-width:100%;font-size:12px;overflow-wrap:anywhere}
.repository-results pre{max-width:100%;max-height:420px;overflow:auto;white-space:pre;line-height:1.55}
.repository-results .reference-row{display:flex;flex-direction:row;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);padding:5px}
/* On dark themes, keep the complete approved ivory artwork and its petals.
   Frame it rather than cropping the master image into a circle. */
body[data-theme='pro'] .brand-icon,body[data-theme='pro'] .small-mark,body[data-theme='pro'] .welcome-icon,
body[data-theme='midnight'] .brand-icon,body[data-theme='midnight'] .small-mark,body[data-theme='midnight'] .welcome-icon,
body[data-theme='kintsugi'] .brand-icon,body[data-theme='kintsugi'] .small-mark,body[data-theme='kintsugi'] .welcome-icon,
body[data-theme='yoru'] .brand-icon,body[data-theme='yoru'] .small-mark,body[data-theme='yoru'] .welcome-icon,
body[data-theme='moss'] .brand-icon,body[data-theme='moss'] .small-mark,body[data-theme='moss'] .welcome-icon{
  border-radius:10px;object-fit:contain;background:#faf7ee;border:1px solid #ede5da;
  box-shadow:0 1px 0 #ffffff14,0 2px 12px #0000002b;
}
/* Keep web research unobtrusive and native to Janna's reference composer. */
.research-toggle{border:0;background:transparent;color:var(--muted);font:500 11px var(--font-ui,Arial,sans-serif);line-height:1.3;padding:5px 7px;white-space:nowrap;border-radius:7px;cursor:pointer}
.research-toggle:hover,.research-toggle:focus-visible{background:var(--hover);color:var(--ink);outline-offset:2px}

/* First-run Janna Pro installer output: visible but not visually dominant. */
.setup-progress{max-height:240px;overflow:auto;margin-top:16px;padding:14px 16px;white-space:pre-wrap;overflow-wrap:anywhere;border:1px solid var(--line,#e2e5dd);border-radius:12px;background:var(--surface,#f4f4f0);font:11px/1.6 ui-monospace,SFMono-Regular,Consolas,monospace;color:inherit}

/* Dedicated generated-code workspace: restrained, readable, and integrated
   directly beside the conversation (not another navigation tab). */
.message-body a{color:var(--rose);text-decoration:underline;text-underline-offset:3px}.message-body a:focus-visible{outline:2px solid var(--rose);outline-offset:3px}
.code-block{overflow:hidden;border:1px solid var(--line);border-radius:12px;margin:18px 0 22px;background:var(--panel);min-width:0}
.code-block-header{height:42px;padding:0 14px;display:flex;align-items:center;gap:10px;background:var(--bubble);border-bottom:1px solid var(--line)}
.code-language{font-size:11px;font-weight:650;letter-spacing:.03em;color:var(--muted)}
.code-draft{font-size:10px;color:var(--rose)}
.code-block-actions{margin-left:auto;display:flex;align-items:center;gap:5px}
.code-action,.code-tool{border:1px solid transparent;border-radius:7px;background:transparent;padding:6px 9px;color:var(--muted);font-size:11px;line-height:1.2;font-weight:600;white-space:nowrap}
.code-action:hover,.code-action:focus-visible,.code-tool:hover,.code-tool:focus-visible{background:var(--hover);color:var(--ink);border-color:var(--line)}
.message-body .code-block pre{border:0;border-radius:0;background:var(--panel);margin:0;padding:15px 19px;max-height:460px;overflow:auto;white-space:pre;tab-size:2;overflow-wrap:normal;color:var(--ink)}
.message-body .code-block code{font:12px/1.6 ui-monospace,SFMono-Regular,Consolas,'Liberation Mono',monospace;white-space:pre;overflow-wrap:normal}
.code-workspace{width:clamp(350px,36vw,550px);flex:0 0 clamp(350px,36vw,550px);background:var(--panel);color:var(--ink);border-left:1px solid var(--line);min-width:0;display:flex;flex-direction:column;position:relative;z-index:6;box-shadow:-5px 0 28px #00000008}
.code-workspace-top{padding:23px 24px 17px;display:flex;gap:14px;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line)}
.code-kicker{font-size:10px;font-weight:700;letter-spacing:1.6px;color:var(--sage)}
.code-workspace-heading h2{font:normal 19px/1.4 var(--font-serif);font-weight:400;overflow-wrap:anywhere;margin:6px 0 0}
.code-workspace-tools{display:flex;flex-wrap:wrap;align-items:center;gap:3px;padding:11px 15px;border-bottom:1px solid var(--line)}
.code-workspace-tools .code-tool:first-child{color:var(--ink);border-color:var(--line);background:var(--bubble)}
.code-workspace-status{margin:0;min-height:40px;font-size:11px;line-height:1.55;color:var(--muted);padding:11px 22px;border-bottom:1px solid var(--line)}
.code-workspace-status[data-state='warning']{color:var(--rose)}
.code-workspace-status[data-state='good']{color:var(--sage)}
.code-workspace-body{flex:1;overflow:auto;min-height:0;display:flex;flex-direction:column}
.code-source-heading{display:flex;justify-content:space-between;gap:9px;align-items:center;padding:16px 21px 10px;font-size:10px;color:var(--faded)}
.code-source-heading span:first-child{font-weight:700;color:var(--muted)}
.code-workspace-source{font:12px/1.7 ui-monospace,SFMono-Regular,Consolas,monospace;flex:1;margin:0;border:0;background:transparent;padding:8px 21px 24px;white-space:pre;overflow:auto;tab-size:2;color:var(--ink)}
.code-workspace-source code{font:inherit}
.code-workspace-editor{resize:none;flex:1;min-height:240px;width:100%;border:0;outline:0;background:transparent;color:var(--ink);padding:15px 21px;font:12px/1.7 ui-monospace,SFMono-Regular,Consolas,monospace;tab-size:2}
.code-workspace-preview{background:#fff;width:100%;flex:1;min-height:240px;border:0}
.code-workspace-issues{padding:8px 21px 20px;max-height:200px;overflow:auto;border-top:1px solid var(--line)}
.code-issue{font-size:11px;line-height:1.65;color:var(--muted);overflow-wrap:anywhere}
.code-workspace-footnote{font-size:10px;line-height:1.6;color:var(--faded);padding:11px 22px;margin:0;border-top:1px solid var(--line)}
@media(max-width:1120px){.code-workspace{position:absolute;right:0;top:0;bottom:0;width:min(92vw,550px);flex:none;box-shadow:-17px 0 32px #0002}}
@media(max-width:700px){.code-workspace{width:100%;top:0;right:0;bottom:0;border-left:0;box-shadow:none;z-index:30}.code-workspace-tools{padding:10px 12px}.code-workspace-top{padding:20px 16px 12px}.code-workspace-footnote{padding:10px 15px}}

/* Luna — restrained companion surface; avoids an extra page or faux thinking. */
.companion-fab{display:flex;align-items:center;justify-content:center;width:66px;height:66px;padding:0;bottom:25px;right:22px;overflow:visible;background:transparent;border:0;box-shadow:none;filter:drop-shadow(0 7px 8px #0003)}
.companion-fab img{width:100%;height:100%;object-fit:contain;transform-origin:center 82%;will-change:transform;pointer-events:none}
.companion-fab:focus-visible{outline:2px solid var(--sage);outline-offset:3px}
.luna-presence{position:absolute;right:5px;bottom:4px;width:12px;height:12px;background:#74a683;border:2px solid var(--panel);border-radius:50%;box-shadow:0 1px 4px #0002}
.luna-idle img{animation:luna-breathe 5s ease-in-out infinite}
.luna-thinking img,.luna-checking img{animation:luna-think 1.2s ease-in-out infinite}
.luna-researching img{animation:luna-scout 1.45s ease-in-out infinite}
.luna-coding img,.luna-writing img{animation:luna-work .65s ease-in-out infinite}
.luna-done img{animation:luna-success .8s ease-out 2}
.luna-researching .luna-presence,.luna-thinking .luna-presence,.luna-coding .luna-presence{background:#d2b278;animation:luna-pulse 1.1s ease-in-out infinite}
@keyframes luna-breathe{0%,100%{transform:translateY(0) rotate(-1deg)}50%{transform:translateY(-4px) rotate(1deg)}}
@keyframes luna-think{0%,100%{transform:translateY(0) rotate(-3deg)}50%{transform:translateY(-5px) rotate(4deg)}}
@keyframes luna-scout{0%,100%{transform:translateX(0) rotate(0)}30%{transform:translateX(-3px) rotate(-6deg)}65%{transform:translateX(3px) rotate(5deg)}}
@keyframes luna-work{0%,100%{transform:translateY(0)}50%{transform:translateY(-6px) scale(1.035)}}
@keyframes luna-success{0%{transform:translateY(0) scale(1)}50%{transform:translateY(-9px) scale(1.1)}100%{transform:translateY(0) scale(1)}}
@keyframes luna-pulse{0%,100%{box-shadow:0 0 0 0 #d2b27866}55%{box-shadow:0 0 0 7px #d2b27800}}
.luna-hero{display:flex;align-items:center;padding-bottom:15px}.luna-hero h3{font:normal 28px/1.2 var(--font-serif);margin:5px 0 10px}.luna-hero small{font-size:10px;letter-spacing:1.3px;color:var(--rose);font-weight:700}.luna-hero p{font-size:12px;line-height:1.6;margin:0}
.luna-monitor{color:var(--sage);font-size:11px;border-bottom:1px solid var(--line);padding:9px 0 16px}
.luna-section-label{font-size:10px!important;font-weight:750;letter-spacing:1.25px;margin:23px 0 11px!important;color:var(--faded)!important}
.luna-people{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.luna-member{min-width:0;padding:9px 8px;min-height:74px;display:flex;align-items:center;gap:5px;overflow:hidden;background:var(--panel);border:1px solid var(--line);border-radius:11px;color:var(--ink);text-align:left;cursor:pointer}
.luna-member:hover{background:var(--hover)}.luna-member.selected{border-color:var(--sage);box-shadow:0 0 0 1px var(--sage) inset;background:var(--bubble)}
.luna-member img{width:58px;height:58px;object-fit:contain;flex-shrink:0}
.luna-member-copy{display:flex;flex-direction:column;gap:3px;min-width:0}.luna-member strong{font-size:12px}.luna-member small{font-size:10px;line-height:1.35;color:var(--muted)}
.luna-description{font-size:11px!important;line-height:1.6!important;padding:3px 2px}
.luna-ask,.luna-submit{border-radius:9px;background:var(--ink);color:var(--panel);padding:12px 15px;border:1px solid transparent;font-size:12px;font-weight:700;cursor:pointer}
.luna-ask:hover,.luna-submit:hover{opacity:.86}.luna-ask{width:100%;margin:8px 0 0}
.luna-builder{display:grid;gap:9px;border:1px solid var(--line);border-radius:13px;padding:15px 14px;background:var(--bubble)}
.luna-input{background:var(--panel)!important;color:var(--ink)!important;border:1px solid var(--line)!important;border-radius:8px;width:100%;min-height:37px;padding:9px;font-size:12px}
.luna-toggle{display:flex!important;align-items:flex-start;gap:9px;font-size:11px!important;line-height:1.4;margin:6px 0!important;color:var(--muted)!important}
.luna-toggle input{width:16px!important;min-width:16px!important;height:16px;margin:0;accent-color:var(--sage)}
.luna-builder label:has(input[type=time]){font-size:11px!important;margin:0!important}
.luna-builder label:has(input[type=time]) input{margin-top:5px}
.luna-task-list{display:grid;gap:9px}.luna-task{border:1px solid var(--line);border-radius:10px;padding:12px;display:grid;gap:11px}
.luna-task strong{display:block;font-size:12px;line-height:1.5}.luna-task small{display:block;color:var(--muted);font-size:10px;line-height:1.5}
.luna-task-actions{display:flex;gap:5px;flex-wrap:wrap}.luna-task-actions button{border-radius:7px;border:1px solid var(--line);padding:7px 9px;background:var(--panel);font-size:11px;color:var(--ink)}
.luna-task details,.luna-feed details{font-size:11px;color:var(--muted);overflow-wrap:anywhere}.luna-task summary,.luna-feed summary{cursor:pointer;font-size:11px;color:var(--sage);margin-top:7px}.luna-task details p,.luna-feed details p{white-space:pre-wrap;font-size:11px!important}
.luna-feed{padding:0 0 0 5px;list-style:none}.luna-feed li{display:flex;gap:11px;padding:11px 0;border-bottom:1px solid var(--line)}
.luna-feed-dot{flex:0 0 7px;height:7px;background:var(--sage);border-radius:50%;margin-top:5px}
.luna-feed strong{font-size:11px;line-height:1.5}.luna-feed small{display:block;font-size:10px;color:var(--faded);margin:4px 0}
.luna-legal{font-size:11px!important}.drawer-body .luna-section-label{display:block}
@media(max-width:700px){.companion-fab{width:61px;height:61px;right:10px;bottom:133px;z-index:13}.luna-member img{width:56px;height:56px}}
@media(prefers-reduced-motion:reduce){.companion-fab img,.luna-presence{animation:none!important;will-change:auto}}
/* Mic transcription is a user-triggered optional system/browser capability. */
#voiceMic.listening{color:var(--rose);background:var(--bubble);outline:1px solid var(--rose)}
#voiceMic.listening svg{animation:janna-mic-pulse 1.25s ease-in-out infinite}
@keyframes janna-mic-pulse{50%{opacity:.5;transform:scale(.9)}}
@media(prefers-reduced-motion:reduce){#voiceMic.listening svg{animation:none}}
/* A deliberate return to the stream; token arrival never forces a reader down. */
.jump-latest{position:absolute;right:28px;bottom:150px;border:1px solid currentColor;border-radius:18px;padding:9px 15px;background:var(--bg,#faf8f4);color:var(--text,#273b42);z-index:5;cursor:pointer}
.run-recovery{margin:20px;padding:16px;border:1px solid currentColor;border-radius:12px}

/* Observed run evidence shares the established theme tokens. */
.work-stream,.saved-activity{margin:18px 0 8px;border:1px solid var(--line);border-radius:12px;background:var(--panel);font-size:12px;overflow:hidden}
.work-stream-heading{width:100%;display:flex;align-items:center;gap:9px;border:0;padding:12px 14px;background:transparent;color:var(--ink);text-align:left;cursor:pointer}
.work-stream-title{flex:1;font-weight:500}.work-stream-clock{color:var(--muted);font-variant-numeric:tabular-nums}.work-stream-indicator{width:6px;height:6px;border-radius:50%;background:var(--rose)}
.work-stream-body{padding:0 14px 12px}.work-stream-list{list-style:none;padding:0;margin:0;display:grid;gap:10px}.work-stream-step{display:flex;gap:10px}.work-step-mark{width:4px;height:4px;margin-top:7px;background:var(--sage);border-radius:50%;flex-shrink:0}.work-step-content strong{display:block;font-weight:500;line-height:1.5}.work-step-content small,.work-stream-note{display:block;color:var(--muted);line-height:1.5}.work-stream-note{margin-top:12px;font-size:10px}.work-step-link{color:var(--sage)}
.saved-activity summary{padding:12px 14px;cursor:pointer;color:var(--muted)}.saved-activity>div{padding:0 14px 12px}.saved-activity-row{padding:9px 0;border-top:1px solid var(--line)}.saved-activity pre{white-space:pre-wrap;overflow-wrap:anywhere;max-height:260px;overflow:auto}
.queued-inputs{padding:14px;border:1px solid var(--line);border-radius:12px}.queued-input{display:flex;align-items:center;gap:8px;margin-top:8px}.queued-input textarea{flex:1;min-width:0;background:var(--panel);color:var(--ink);border:1px solid var(--line);padding:8px;border-radius:6px;resize:vertical}
.jump-latest{background:var(--panel);color:var(--ink)}
.sidebar-project-quick,.profile-open,.workspace-action{font:inherit;color:inherit;background:transparent;border:0;cursor:pointer;text-align:left}
.sidebar-project-quick{display:flex;align-items:center;gap:8px;margin-top:6px;padding:10px 12px;border-radius:9px;color:var(--muted)}.sidebar-project-quick:hover,.profile-open:hover,.workspace-action:hover{background:var(--hover)}
.sidebar-project-quick>svg{width:16px;height:16px;flex-shrink:0}.sidebar-project-quick>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sidebar-project-quick .tiny-chevron{width:10px;margin-left:auto}
.profile-open{display:flex;align-items:center;gap:10px;min-width:0;padding:4px;border-radius:8px}.profile-open>span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.workspace-action{padding:5px 7px;border-radius:5px}

/* Additional opt-in palettes. Text and accents are chosen for readable contrast. */
body[data-theme='beni']{--paper:#2e1d24;--sidebar:#24171c;--hover:#4d2c37;--line:#69434e;--ink:#fff0f0;--muted:#cfafb9;--faded:#bb9da7;--bubble:#402730;--panel:#37232b;--rose:#f0a1af;--sage:#a9c6aa;--shadow:0 12px 30px #0003;color-scheme:dark}
body[data-theme='shinku']{--paper:#251a1d;--sidebar:#1d1517;--hover:#43272c;--line:#654048;--ink:#fff2eb;--muted:#c9b0ac;--faded:#b79a97;--bubble:#38262a;--panel:#302124;--rose:#f19a8e;--sage:#b1c2a4;--shadow:0 12px 30px #0003;color-scheme:dark}
body[data-theme='shu']{--paper:#fff9f5;--sidebar:#f4e1da;--hover:#ead0c6;--line:#d7b5aa;--ink:#4b2925;--muted:#7c5149;--faded:#845c53;--bubble:#f5e6df;--panel:#fffdfb;--rose:#a13d30;--sage:#476a4e;color-scheme:light}
body[data-theme='botan']{--paper:#fcf7fc;--sidebar:#eee1ed;--hover:#e3cee1;--line:#cdb4cb;--ink:#443046;--muted:#725a75;--faded:#7a617c;--bubble:#f1e6f0;--panel:#fffaff;--rose:#8c477f;--sage:#496e64;color-scheme:light}
body[data-theme='tsuki']{--paper:#232830;--sidebar:#181c22;--hover:#35404c;--line:#505d6d;--ink:#f1f3f6;--muted:#b6c1d0;--faded:#a4b1c3;--bubble:#2c343f;--panel:#2b323c;--rose:#b8b6ed;--sage:#9cc9b6;--shadow:0 12px 30px #0003;color-scheme:dark}
body[data-theme='ruri']{--paper:#1e2e47;--sidebar:#152238;--hover:#304969;--line:#4d6685;--ink:#f2f5ff;--muted:#b4c7e3;--faded:#a4b8d6;--bubble:#273b58;--panel:#243650;--rose:#afc9ff;--sage:#9ecec3;--shadow:0 12px 30px #0003;color-scheme:dark}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}

.source-evidence{margin:18px 0;padding:12px 14px;border:1px solid var(--line);border-radius:10px;font-size:12px}.source-evidence summary{cursor:pointer;color:var(--muted)}.evidence-list{max-height:380px;overflow:auto;margin-top:12px}.evidence-item{padding:12px 0;border-top:1px solid var(--line)}.evidence-item p{line-height:1.6;margin:8px 0}.evidence-item small{overflow-wrap:anywhere}.evidence-item pre{white-space:pre-wrap}.luna-unread{position:absolute;right:4px;top:3px;background:var(--rose);color:var(--paper);border:2px solid var(--paper);border-radius:20px;padding:2px 5px;font:600 11px Arial}

body:is([data-theme="beni"],[data-theme="shinku"],[data-theme="tsuki"],[data-theme="ruri"]) :is(.brand-icon,.small-mark,.welcome-icon){border-radius:50%;background:#faf7ed;object-fit:contain}

body[data-scheme='dark'] :is(.brand-icon,.small-mark,.welcome-icon){
  border-radius:10px;object-fit:contain;background:#faf7ee;border:1px solid #ede5da;
  box-shadow:0 1px 0 #ffffff14,0 2px 12px #0000002b;
}
.drawer-body .theme-grid{grid-template-columns:repeat(auto-fill,minmax(96px,1fr))}


/* Further opt-in palettes. Same tokens, ivory mark unchanged. */
body[data-theme='asagi']{--paper:#f4fbfa;--sidebar:#d5ebe8;--hover:#c5e0dc;--line:#b7d4cf;--ink:#16383c;--muted:#3f6468;--faded:#5d7e81;--bubble:#e3f3f1;--panel:#fbfffe;--rose:#8d5d62;--sage:#2f6d66;color-scheme:light}
body[data-theme='fuji']{--paper:#fbf7fd;--sidebar:#efe6f4;--hover:#e2d4ec;--line:#d4c2e0;--ink:#3d3150;--muted:#65567a;--faded:#7e7090;--bubble:#f3eaf8;--panel:#fffbff;--rose:#8a4d78;--sage:#4d6a62;color-scheme:light}
body[data-theme='momiji']{--paper:#fff8f2;--sidebar:#f8e6d8;--hover:#f0d4c0;--line:#e4c4ac;--ink:#4a2e22;--muted:#7a5344;--faded:#947062;--bubble:#fbeede;--panel:#fffdfb;--rose:#a24b38;--sage:#5d6e48;color-scheme:light}
body[data-theme='yuzu']{--paper:#fffdf3;--sidebar:#f7f3d8;--hover:#efe8bc;--line:#e2d9a4;--ink:#3f3a1e;--muted:#6d6538;--faded:#857c52;--bubble:#f8f4de;--panel:#fffef8;--rose:#8d5a3a;--sage:#5a6b32;color-scheme:light}
body[data-theme='take']{--paper:#f6faf3;--sidebar:#e3edd9;--hover:#d2e2c4;--line:#c2d4b2;--ink:#243628;--muted:#4c6248;--faded:#667a60;--bubble:#eaf3e2;--panel:#fcfef9;--rose:#8a5a52;--sage:#3d6a40;color-scheme:light}
body[data-theme='mizu']{--paper:#f5f9fd;--sidebar:#dceaf5;--hover:#c9dced;--line:#b7d0e4;--ink:#1d3348;--muted:#4a6278;--faded:#64788c;--bubble:#e7f1f8;--panel:#fbfdff;--rose:#7d5878;--sage:#3a6a78;color-scheme:light}
body[data-theme='kinari']{--paper:#fbf8f2;--sidebar:#f3ecdf;--hover:#e7dcc8;--line:#d9ccb4;--ink:#3d3428;--muted:#6d5e4c;--faded:#857666;--bubble:#f6f0e4;--panel:#fffdf9;--rose:#8d5348;--sage:#5c6844;color-scheme:light}
body[data-theme='kohaku']{--paper:#fffaf1;--sidebar:#f8ead0;--hover:#f0dcb4;--line:#e4cc9a;--ink:#433318;--muted:#745c34;--faded:#8c7450;--bubble:#fbf1dc;--panel:#fffdf8;--rose:#9a4e32;--sage:#5e6830;color-scheme:light}
body[data-theme='murasaki']{--paper:#faf7fd;--sidebar:#ece4f6;--hover:#ddd0ee;--line:#cfc0e4;--ink:#3a2d4e;--muted:#64547a;--faded:#7c6e90;--bubble:#f1eaf8;--panel:#fffbff;--rose:#864878;--sage:#4a665c;color-scheme:light}
body[data-theme='toki']{--paper:#fff7f8;--sidebar:#f8e4e6;--hover:#f0d0d4;--line:#e4bcc2;--ink:#4a2c34;--muted:#7a5260;--faded:#946c78;--bubble:#fbecee;--panel:#fffdfd;--rose:#a24558;--sage:#5a6a52;color-scheme:light}
body[data-theme='moegi']{--paper:#f8fbea;--sidebar:#e7f0c8;--hover:#d7e6ae;--line:#c6d898;--ink:#2d3a16;--muted:#556438;--faded:#6e7c50;--bubble:#eef6d4;--panel:#fcfef6;--rose:#8a5538;--sage:#4a6828;color-scheme:light}
body[data-theme='gin']{--paper:#f7f8f8;--sidebar:#e6e8ea;--hover:#d4d8dc;--line:#c4c9ce;--ink:#2c3338;--muted:#565e66;--faded:#707880;--bubble:#eceef0;--panel:#fcfcfd;--rose:#7a5560;--sage:#4a6468;color-scheme:light}
body[data-theme='chawan']{--paper:#fbf6ee;--sidebar:#f0e6d4;--hover:#e4d4ba;--line:#d6c4a6;--ink:#3d3224;--muted:#6c5a44;--faded:#84725c;--bubble:#f4eadc;--panel:#fffdf8;--rose:#8a5344;--sage:#5a6440;color-scheme:light}
body[data-theme='yanagi']{--paper:#f5faf5;--sidebar:#e4eee4;--hover:#d2e2d2;--line:#c0d4c0;--ink:#243428;--muted:#4c624c;--faded:#667a66;--bubble:#eaf3ea;--panel:#fcfefc;--rose:#865858;--sage:#3c6844;color-scheme:light}
body[data-theme='wakatake']{--paper:#f7fbf3;--sidebar:#e8f0dc;--hover:#d6e4c4;--line:#c4d6ae;--ink:#2a3820;--muted:#526444;--faded:#6a7c5c;--bubble:#eef5e4;--panel:#fdfffa;--rose:#885648;--sage:#446830;color-scheme:light}
body[data-theme='usuzumi']{--paper:#f7f6f4;--sidebar:#e8e6e4;--hover:#d8d4d0;--line:#c8c2bc;--ink:#2e2c2a;--muted:#5c5854;--faded:#76726e;--bubble:#eeecea;--panel:#fcfbfa;--rose:#7a5550;--sage:#4e6458;color-scheme:light}
body[data-theme='ao']{--paper:#f4f8fd;--sidebar:#d9e6f6;--hover:#c6d8ee;--line:#b4c8e4;--ink:#1c3352;--muted:#465878;--faded:#607088;--bubble:#e6eef8;--panel:#fbfdff;--rose:#745878;--sage:#3a6474;color-scheme:light}
body[data-theme='enji']{--paper:#fff6f4;--sidebar:#f6e0dc;--hover:#eeccc6;--line:#e2b8b0;--ink:#4a2824;--muted:#7a5048;--faded:#946860;--bubble:#fbeae6;--panel:#fffdfc;--rose:#a13c34;--sage:#5a6848;color-scheme:light}
body[data-theme='suzu']{--paper:#f6f7f6;--sidebar:#e4e7e4;--hover:#d2d6d2;--line:#c0c6c0;--ink:#2a312c;--muted:#546058;--faded:#6e7a72;--bubble:#ebeeeb;--panel:#fcfdfc;--rose:#7a5854;--sage:#466458;color-scheme:light}
body[data-theme='kakishibu']{--paper:#fff7f1;--sidebar:#f6e3d4;--hover:#eed0b8;--line:#e2bea2;--ink:#4a301c;--muted:#7a583c;--faded:#947054;--bubble:#fbeede;--panel:#fffdfb;--rose:#9a442c;--sage:#5c6438;color-scheme:light}
body[data-theme='hanada']{--paper:#f3f9fc;--sidebar:#d7e8f2;--hover:#c4dbe8;--line:#b0cce0;--ink:#1c3a4a;--muted:#466274;--faded:#607888;--bubble:#e4f0f6;--panel:#fbfdfe;--rose:#74586e;--sage:#3a6870;color-scheme:light}
body[data-theme='kujaku']{--paper:#f2fbf7;--sidebar:#d7efe6;--hover:#c2e4d6;--line:#aed6c6;--ink:#16382e;--muted:#3e6456;--faded:#587c6e;--bubble:#e4f6ee;--panel:#fbfffd;--rose:#7a5560;--sage:#2c6a58;color-scheme:light}
body[data-theme='komugi']{--paper:#fdf8ee;--sidebar:#f4ead4;--hover:#ead8b8;--line:#dcc8a2;--ink:#3d3218;--muted:#6e5c34;--faded:#88744c;--bubble:#f7f0de;--panel:#fffdf8;--rose:#8d4e34;--sage:#5c682c;color-scheme:light}
body[data-theme='shirayuki']{--paper:#fbfcfd;--sidebar:#f4f6f8;--hover:#e4e8ee;--line:#d4dae2;--ink:#243040;--muted:#526070;--faded:#6c7a88;--bubble:#eef1f5;--panel:#ffffff;--rose:#745868;--sage:#3e6470;color-scheme:light}
body[data-theme='nuri']{--paper:#241c18;--sidebar:#1a1412;--hover:#3a2c26;--line:#564038;--ink:#f6efe8;--muted:#d4c4b6;--faded:#b8a898;--bubble:#322822;--panel:#2c221c;--rose:#e8a090;--sage:#b8c8a4;--shadow:0 12px 30px #0003;color-scheme:dark}
body[data-theme='tetsu']{--paper:#262b30;--sidebar:#1c2024;--hover:#363e46;--line:#4e5862;--ink:#eef1f4;--muted:#c4ced6;--faded:#a8b4be;--bubble:#30363e;--panel:#2a3036;--rose:#e0a8b0;--sage:#a8c8c0;--shadow:0 12px 30px #0003;color-scheme:dark}
body[data-theme='kurocha']{--paper:#2e241c;--sidebar:#241c16;--hover:#463628;--line:#64503c;--ink:#f6efe6;--muted:#d8c8b4;--faded:#bcae9a;--bubble:#3a2e24;--panel:#34281e;--rose:#e8a888;--sage:#c4c8a0;--shadow:0 12px 30px #0003;color-scheme:dark}
body[data-theme='nezumi']{--paper:#2c3034;--sidebar:#232528;--hover:#3e444a;--line:#565e66;--ink:#f2f3f4;--muted:#c8ced4;--faded:#aeb6be;--bubble:#363c42;--panel:#30363c;--rose:#e0b0b4;--sage:#b4c8bc;--shadow:0 12px 30px #0003;color-scheme:dark}
body[data-theme='fukamidori']{--paper:#1c3026;--sidebar:#14241c;--hover:#2c4638;--line:#446454;--ink:#eef6f0;--muted:#c4d8cc;--faded:#a8c0b0;--bubble:#24382e;--panel:#203228;--rose:#e0b0a4;--sage:#b8d8b0;--shadow:0 12px 30px #0003;color-scheme:dark}
body[data-theme='konpeki']{--paper:#17263c;--sidebar:#101c30;--hover:#283c58;--line:#405674;--ink:#eef3fb;--muted:#c4d2e6;--faded:#a8b8d0;--bubble:#20344e;--panel:#1c2e46;--rose:#c8c4f0;--sage:#a8d4cc;--shadow:0 12px 30px #0003;color-scheme:dark}
body[data-theme='budou']{--paper:#301e36;--sidebar:#241828;--hover:#463450;--line:#624868;--ink:#f7f0f8;--muted:#dcc8e4;--faded:#c0aecc;--bubble:#3c2a44;--panel:#36243e;--rose:#f0b0d0;--sage:#b8d0c0;--shadow:0 12px 30px #0003;color-scheme:dark}
body[data-theme='akatsuki']{--paper:#361f2a;--sidebar:#2a1820;--hover:#4e3040;--line:#6a4858;--ink:#fff0f4;--muted:#e4c8d2;--faded:#c8aeb8;--bubble:#442832;--panel:#3e2430;--rose:#f0a8b8;--sage:#c4d8c0;--shadow:0 12px 30px #0003;color-scheme:dark}
body[data-theme='roiro']{--paper:#1c1c1c;--sidebar:#141414;--hover:#303030;--line:#484848;--ink:#f3f3f3;--muted:#cccccc;--faded:#b0b0b0;--bubble:#282828;--panel:#242424;--rose:#e0a8a8;--sage:#b8d0b8;--shadow:0 12px 30px #0003;color-scheme:dark}
body[data-theme='kachi']{--paper:#1c2236;--sidebar:#141828;--hover:#2c3450;--line:#444c68;--ink:#eef0f8;--muted:#c8cce0;--faded:#aeb4cc;--bubble:#262c42;--panel:#222838;--rose:#c8c0f0;--sage:#b0d0c8;--shadow:0 12px 30px #0003;color-scheme:dark}
body[data-theme='miru']{--paper:#1c302a;--sidebar:#142420;--hover:#2c463e;--line:#446458;--ink:#eef6f2;--muted:#c4d8d0;--faded:#a8c0b8;--bubble:#243832;--panel:#20342e;--rose:#e0b4a8;--sage:#b4d8c4;--shadow:0 12px 30px #0003;color-scheme:dark}
body[data-theme='susutake']{--paper:#322e24;--sidebar:#26241c;--hover:#484434;--line:#645e4c;--ink:#f7f4ea;--muted:#ddd4c0;--faded:#c4bba6;--bubble:#3e382c;--panel:#383224;--rose:#e8c090;--sage:#c8d0a4;--shadow:0 12px 30px #0003;color-scheme:dark}
body[data-theme='namari']{--paper:#282e34;--sidebar:#1e2226;--hover:#3a424a;--line:#525c66;--ink:#eef2f5;--muted:#c8d2da;--faded:#aeb8c2;--bubble:#323840;--panel:#2c343c;--rose:#e0b0b8;--sage:#b0ccc4;--shadow:0 12px 30px #0003;color-scheme:dark}
body[data-theme='enkai']{--paper:#142830;--sidebar:#0e1c24;--hover:#243c48;--line:#3c5664;--ink:#e8f4f8;--muted:#c0d4de;--faded:#a4b8c4;--bubble:#1e3642;--panel:#1a303c;--rose:#c8c8f0;--sage:#a8d4d0;--shadow:0 12px 30px #0003;color-scheme:dark}
body[data-theme='karasuba']{--paper:#201c24;--sidebar:#16141a;--hover:#342e3c;--line:#4c4456;--ink:#f4f0f6;--muted:#d4ccdc;--faded:#b8b0c4;--bubble:#2c2834;--panel:#282430;--rose:#e8b0d0;--sage:#c0d4c4;--shadow:0 12px 30px #0003;color-scheme:dark}
body[data-theme='sumizome']{--paper:#1e2228;--sidebar:#16181c;--hover:#323842;--line:#4a5260;--ink:#eef1f5;--muted:#c8ced6;--faded:#aeb6c0;--bubble:#2a3038;--panel:#262c34;--rose:#d8b4c0;--sage:#b4d0c8;--shadow:0 12px 30px #0003;color-scheme:dark}
body[data-theme='benibana']{--paper:#38181c;--sidebar:#2a1214;--hover:#52282c;--line:#704044;--ink:#fff0f0;--muted:#e8c8c8;--faded:#ccb0b0;--bubble:#462226;--panel:#401e22;--rose:#f0a0a4;--sage:#c4d4b8;--shadow:0 12px 30px #0003;color-scheme:dark}
body[data-theme='yamabuki']{--paper:#362e18;--sidebar:#2a2414;--hover:#4e4224;--line:#6a5c38;--ink:#fbf6e8;--muted:#e4d8b8;--faded:#c8bc9c;--bubble:#443c22;--panel:#3e361e;--rose:#f0c888;--sage:#d0d4a4;--shadow:0 12px 30px #0003;color-scheme:dark}
body[data-theme='rikyunezu']{--paper:#262e26;--sidebar:#1c221c;--hover:#364236;--line:#4e5c4e;--ink:#f2f6f0;--muted:#c8d4c8;--faded:#aeb8ae;--bubble:#303830;--panel:#2c342c;--rose:#e0b8b0;--sage:#c0d8b4;--shadow:0 12px 30px #0003;color-scheme:dark}
body[data-theme='soba']{--paper:#342c22;--sidebar:#2a241c;--hover:#4a4032;--line:#665848;--ink:#f7f3ea;--muted:#ddd4c4;--faded:#c4baa8;--bubble:#403628;--panel:#3a3228;--rose:#e8b898;--sage:#d0c8a4;--shadow:0 12px 30px #0003;color-scheme:dark}

/* Sage Green: soft green surfaces with deep botanical text. */
body[data-theme='sage']{--paper:#eef2e9;--sidebar:#d8e2d3;--hover:#c8d6c1;--line:#bbcbb3;--ink:#25382c;--muted:#536b56;--faded:#6c806b;--bubble:#e1e9d9;--panel:#f6f8f1;--rose:#66825e;--sage:#426b4a;--shadow:0 10px 28px #30462c14}

/* One fixed phone shell; only content regions scroll. Pinch zoom stays enabled. */
html{overscroll-behavior:none}
.phone-layout{position:fixed;inset:0;overflow:hidden;overscroll-behavior:none;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.phone-layout .app-shell{height:var(--phone-height,100dvh);transform:translateY(var(--phone-top,0px));overflow:hidden}
.phone-layout .main-pane{min-height:0;padding-top:env(safe-area-inset-top);padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right)}
.phone-layout .topbar{height:58px;min-height:58px;padding:0 12px;gap:8px;border-bottom:1px solid var(--line);background:var(--paper)}
.phone-layout .breadcrumb{flex:1;min-width:0;gap:0}
.phone-layout :is(#workspaceAction,.crumb-separator){display:none}
.phone-layout .top-actions{gap:4px;flex:none}
.phone-layout .model-top-select select{max-width:110px;font-size:14px}
.phone-layout #conversationLabel{font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.phone-layout :is(.thread,.drawer-body,.content-view,.recent-list){min-height:0;overscroll-behavior:none;-webkit-overflow-scrolling:touch;scrollbar-width:none;overflow-x:hidden}
.phone-layout .thread{padding-bottom:8px;scroll-padding:16px}
.phone-layout .drawer-body{flex:1}
.phone-layout .composer-dock{flex:none;margin:0;padding:8px 10px max(10px,env(safe-area-inset-bottom));background:var(--paper);border-top:1px solid var(--line)}
.phone-layout.keyboard-open .composer-dock{padding-bottom:8px}
.phone-layout .composer{padding:8px;border-radius:16px;box-shadow:none}
.phone-layout .composer textarea{height:56px;min-height:48px;max-height:128px;font-size:16px;line-height:1.4;padding:4px 6px;overscroll-behavior:contain}
.phone-layout .composer-toolbar{gap:4px;min-height:44px;flex-wrap:nowrap}
.phone-layout .composer-left{min-width:0;gap:0}
.phone-layout .composer-right .subtle-select{display:none}
.phone-layout .composer-left #connectionButton{display:inline-flex}
.phone-layout :is(.icon-button,.send-button){min-width:44px;width:44px;height:44px;flex-shrink:0}
.phone-layout .research-toggle{min-height:44px;padding:0 6px}
.phone-layout .mode-control select{min-height:44px;font-size:16px;max-width:65px}
.phone-layout :is(input,textarea,select){font-size:16px}
.phone-layout :is(button,summary,a){touch-action:manipulation}
.phone-layout button{transition:background-color 80ms,color 80ms,transform 80ms}
.phone-layout button:active:not(:disabled){transform:scale(.97);background:var(--hover)}
.phone-layout :is(.action-btn,.text-btn,.nav-item,.recent-item){min-height:44px}
.phone-layout img{-webkit-user-drag:none}
.phone-layout .welcome{top:0;margin:0 auto;padding:24px 20px;max-width:100%}
.phone-layout .welcome-title{margin:16px 0 24px}
.phone-layout .drawer{top:0;bottom:auto;height:var(--phone-height,100dvh);padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom);max-width:100%}
.phone-layout .drawer-title{flex-shrink:0}
.phone-layout .sidebar{height:var(--phone-height,100dvh);top:0;padding-top:env(safe-area-inset-top);padding-bottom:max(16px,env(safe-area-inset-bottom));overscroll-behavior:none}
.phone-layout :is(.message-body,.card){overflow-wrap:anywhere;min-width:0}
.phone-layout pre{max-width:100%;overflow:auto;overscroll-behavior:contain}
.phone-layout dialog{max-height:calc(var(--phone-height,100dvh) - 32px);max-width:calc(100vw - 24px);overflow:auto;overscroll-behavior:contain}
.phone-layout .companion-fab{bottom:calc(160px + env(safe-area-inset-bottom));width:48px;height:48px}
.phone-layout.keyboard-open .companion-fab{display:none}
.phone-layout .sidebar{position:fixed;z-index:30;left:-270px;bottom:auto;box-shadow:6px 0 28px #0001;transition:left .2s}
.phone-layout .sidebar.mobile-open{left:0}
.phone-layout .mobile-scrim.visible{display:block;position:fixed;inset:0;background:#0005;z-index:29}
.phone-layout .menu-toggle{display:inline-flex!important}
.phone-layout :is(.top-divider,.status-indicator){display:none}
.phone-layout :is(.main-pane,.topbar,.composer-dock){transition:background-color 160ms ease,color 160ms ease}
.phone-layout .sidebar{left:0;transform:translateX(-105%);transition:transform 200ms cubic-bezier(.2,.8,.2,1)}
.phone-layout .sidebar.mobile-open{transform:translateX(0)}
.phone-layout .drawer:not([hidden]){animation:phone-panel-in 180ms cubic-bezier(.2,.8,.2,1)}
@keyframes phone-panel-in{from{opacity:0;transform:translateX(18px)}to{opacity:1;transform:translateX(0)}}

.phone-layout .code-workspace{width:100%;top:0;right:0;bottom:0;max-height:var(--phone-height,100dvh)}
.subtle-toggle{display:flex;align-items:center;gap:8px;margin:10px 0;font-size:12px;color:var(--muted)}#drawerBody textarea.inline-input{width:100%;max-width:100%;resize:vertical;min-height:84px}#drawerBody .card pre{max-height:320px;overflow:auto;font-size:11px;white-space:pre-wrap;overflow-wrap:anywhere}
.attachment-tray{display:flex;flex-wrap:wrap;gap:6px;padding:8px 12px 0}.attachment-chip{display:inline-flex;align-items:center;gap:6px;max-width:100%;border:1px solid var(--line);border-radius:8px;padding:4px 8px;font-size:11px;color:var(--muted)}.attachment-chip img{width:28px;height:28px;object-fit:cover;border-radius:4px}.attachment-note{margin-top:6px;font-size:11px;color:var(--muted)}.attachment-previews{display:flex;gap:6px;margin-top:6px}.attachment-preview{max-width:160px;max-height:120px;border-radius:8px;border:1px solid var(--line)}
body[data-theme='ember']{--paper:#fff6ea;--sidebar:#ffe3c2;--hover:#ffd5a3;--line:#f0c28c;--ink:#2b2a4c;--muted:#5a5470;--faded:#6f6880;--bubble:#ffeeda;--panel:#fffaf3;--rose:#c2410c;--sage:#1f4e8c;color-scheme:light}
body[data-theme='dusk']{--paper:#1c1d36;--sidebar:#15162a;--hover:#2b2c50;--line:#3a3b63;--ink:#eeeefb;--muted:#b3b4d6;--faded:#9a9bc4;--bubble:#25264a;--panel:#212243;--rose:#b79cf2;--sage:#8fb0e8;--shadow:0 12px 30px #0003;color-scheme:dark}
body[data-theme='slate']{--paper:#262c30;--sidebar:#1e2326;--hover:#343c41;--line:#454e54;--ink:#e9eef0;--muted:#b4bfc4;--faded:#9da9af;--bubble:#2e353a;--panel:#2b3237;--rose:#8fd0c8;--sage:#a9c0b0;--shadow:0 12px 30px #0003;color-scheme:dark}
body[data-theme='crimson']{--paper:#1c1619;--sidebar:#141013;--hover:#2e2227;--line:#43303a;--ink:#f3e9ea;--muted:#c7b0b4;--faded:#ad979b;--bubble:#251c20;--panel:#221a1e;--rose:#ef6f6c;--sage:#b3a0b8;--shadow:0 12px 30px #0003;color-scheme:dark}
body[data-theme='leaf']{--paper:#f5faf0;--sidebar:#dcebd2;--hover:#cfe2c2;--line:#b9d3a9;--ink:#233321;--muted:#4d6249;--faded:#5f7459;--bubble:#e9f2e2;--panel:#fbfdf8;--rose:#b4541a;--sage:#2f6b3a;color-scheme:light}
body[data-theme='lilac']{--paper:#faf8fe;--sidebar:#e9e5f5;--hover:#dcd6ee;--line:#cbc3e3;--ink:#2e2a4a;--muted:#5a5578;--faded:#6b668a;--bubble:#f0edf9;--panel:#fdfcff;--rose:#6d4fb0;--sage:#48658c;color-scheme:light}
body[data-theme='blaze']{--paper:#fff5ea;--sidebar:#ffe1c7;--hover:#ffd0a6;--line:#f0b988;--ink:#1f2c55;--muted:#4f5472;--faded:#64677f;--bubble:#ffeeda;--panel:#fffaf4;--rose:#c8400e;--sage:#1d4fa3;color-scheme:light}
body[data-theme='harbor']{--paper:#fff7ee;--sidebar:#fbe0d9;--hover:#f7cdc2;--line:#e9b8a9;--ink:#3a2323;--muted:#6b4a44;--faded:#7d5f57;--bubble:#fcece4;--panel:#fffbf6;--rose:#b91c1c;--sage:#7a5c10;color-scheme:light}
body[data-theme='violet']{--paper:#231a3d;--sidebar:#1b1430;--hover:#33275a;--line:#473873;--ink:#efeaff;--muted:#bdb2e6;--faded:#a69bd2;--bubble:#2b2149;--panel:#281f44;--rose:#8fe35f;--sage:#b9a4ff;--shadow:0 12px 30px #0003;color-scheme:dark}
body[data-theme='forest']{--paper:#f5f7f0;--sidebar:#dfe6dc;--hover:#d2dbcd;--line:#bfcab8;--ink:#2c3229;--muted:#575f52;--faded:#6a7264;--bubble:#ebf0e6;--panel:#fbfcf8;--rose:#47704a;--sage:#5a6d86;color-scheme:light}
body[data-theme='tide']{--paper:#18241f;--sidebar:#121c19;--hover:#25362f;--line:#344a41;--ink:#e9f2ed;--muted:#aec4b9;--faded:#97aea3;--bubble:#1f2e28;--panel:#1d2b25;--rose:#e0736a;--sage:#6fcf9f;--shadow:0 12px 30px #0003;color-scheme:dark}
body[data-theme='blossom']{--paper:#fff6f9;--sidebar:#fbe3ec;--hover:#f7d3e0;--line:#ecbccd;--ink:#3a2430;--muted:#6a4a58;--faded:#7d5c6a;--bubble:#fdedf3;--panel:#fffbfc;--rose:#b83268;--sage:#7a4f2a;color-scheme:light}
body[data-theme='azure']{--paper:#162236;--sidebar:#10192a;--hover:#233350;--line:#324665;--ink:#e9f3ff;--muted:#aac4e2;--faded:#94aed0;--bubble:#1d2c45;--panel:#1b2941;--rose:#7cc7ff;--sage:#c5d7ee;--shadow:0 12px 30px #0003;color-scheme:dark}
body[data-theme='moon']{--paper:#fff8fb;--sidebar:#fde6ef;--hover:#f9d6e5;--line:#efc0d5;--ink:#2f2a58;--muted:#5b5480;--faded:#6e688f;--bubble:#fef0f5;--panel:#fffcfd;--rose:#b52d7a;--sage:#7a5c10;color-scheme:light}
.work-stream-step small,.work-stream-step .work-step-link{display:none}.work-stream-step.open small{display:block}.work-stream-step.open .work-step-link{display:inline}.work-stream-step[class]{cursor:default}
.work-stream:not(.is-done) .work-stream-title{background:linear-gradient(90deg,var(--muted) 35%,var(--ink) 50%,var(--muted) 65%);background-size:220% 100%;-webkit-background-clip:text;background-clip:text;color:transparent;animation:janna-thinking 2.2s linear infinite}
@keyframes janna-thinking{from{background-position:120% 0}to{background-position:-120% 0}}
@media(prefers-reduced-motion:reduce){.work-stream:not(.is-done) .work-stream-title{animation:none;background:none;color:var(--muted)}}

/* === Phone no-overlap polish (2026-11-10, web edition feedback) ===
   Scoped to .phone-layout so the desktop app renders exactly as before.
   1. Toasts move to the top: the bottom toast covered the composer dock.
   2. The Luna companion FAB drops to the bottom corner on content views
      (Models, Projects) where there is no composer; page-end padding keeps
      the last card clear of it. In chat it keeps its composer clearance.
   3. Thread scroll clearance so the last message can scroll past the FAB.
   4. The desktop "Ctrl K" hint is hidden on phones. */
.phone-layout .toast{top:calc(64px + env(safe-area-inset-top));bottom:auto;animation:phone-toast-in 180ms cubic-bezier(.2,.8,.2,1)}
@keyframes phone-toast-in{from{opacity:0;transform:translate(-50%,-6px)}to{opacity:1;transform:translate(-50%,0)}}
.app-shell:has(.content-view:not([hidden])) .companion-fab{display:none}
.phone-layout .content-inner{padding-bottom:180px}
.phone-layout .thread{scroll-padding-bottom:130px}
.phone-layout .messages{padding-bottom:110px}
.phone-layout .new-chat kbd{display:none}

/* Profile drawer + template classes that shipped without rules */
.profile-hero{display:flex;align-items:center;gap:14px;margin:4px 0 14px;font-family:var(--font-serif);font-size:21px;color:var(--ink)}
.profile-mark{width:44px;height:44px;object-fit:contain;flex:0 0 auto}
.profile-current{font-size:13px;color:var(--muted);margin:0 0 4px}
.profile-choice{display:flex;width:100%;align-items:center;justify-content:center;padding:12px 15px;margin:0 0 9px;border:1px solid var(--line);border-radius:10px;background:var(--panel);color:var(--ink);font:inherit;font-size:13px;font-weight:600;cursor:pointer}
.profile-choice:hover{background:var(--hover)}
.discord-choice{background:#5865f2;border-color:#5865f2;color:#fff}
.discord-choice:hover{background:#4752c4}
.profile-upload{display:none}
.section-title{font-weight:700}
.code-open{border:1px solid var(--line);background:var(--panel);color:var(--accent-ink);border-radius:999px;padding:3px 10px;font-size:11px;font-weight:600;cursor:pointer}
.research-integrity-note{font-size:12px;color:var(--muted);line-height:1.55}

/* Luna pet — living companion animations (transform-only, theme-safe) */
.companion-fab{overflow:visible}
.companion-fab img{animation:lunaBob 3.2s ease-in-out infinite;transform-origin:50% 85%}
.companion-fab[data-mood="thinking"] img{animation:lunaThink 1.1s ease-in-out infinite}
.companion-fab[data-mood="busy"] img{animation:lunaBusy .8s ease-in-out infinite}
.companion-fab[data-mood="happy"] img{animation:lunaHappy .55s ease-in-out 2}
.companion-fab[data-mood="done"] img{animation:lunaHappy .55s ease-in-out 3}
.companion-fab[data-mood="sleep"] img{animation:lunaSleep 5s ease-in-out infinite;opacity:.75}
@keyframes lunaBob{0%,100%{transform:translateY(0) rotate(0deg) scale(1)}50%{transform:translateY(-3px) rotate(-2deg) scale(1.02)}}
@keyframes lunaThink{0%,100%{transform:rotate(-3deg)}50%{transform:rotate(3deg) translateY(-2px)}}
@keyframes lunaBusy{0%,100%{transform:translateY(0) scale(1)}50%{transform:translateY(-4px) scale(1.04)}}
@keyframes lunaHappy{0%,100%{transform:translateY(0) scale(1)}30%{transform:translateY(-9px) scale(1.07) rotate(-3deg)}60%{transform:translateY(0) scale(.97)}}
@keyframes lunaSleep{0%,100%{transform:rotate(0deg) scale(1)}50%{transform:rotate(2deg) scale(.98)}}
.luna-bubble{position:fixed;right:86px;bottom:96px;z-index:70;max-width:230px;display:flex;align-items:center;gap:7px;background:var(--panel);color:var(--ink);border:1px solid var(--line);border-radius:14px;padding:8px 10px;font-size:12.5px;line-height:1.35;box-shadow:0 10px 28px rgba(16,24,40,.18);opacity:0;transform:translateY(6px) scale(.96);pointer-events:none;transition:opacity .18s ease,transform .18s ease}
.luna-bubble.show{opacity:1;transform:none;pointer-events:auto}
.luna-bubble-btn{border:1px solid var(--line);background:var(--chip);color:var(--accent-ink);border-radius:999px;padding:3px 9px;font-size:11px;font-weight:700;cursor:pointer;white-space:nowrap}
.luna-spark{position:fixed;z-index:71;color:#e5a83c;font-size:15px;pointer-events:none;animation:lunaSpark 1s ease-out forwards}
@keyframes lunaSpark{0%{opacity:0;transform:translateY(4px) scale(.6)}25%{opacity:1}100%{opacity:0;transform:translateY(-34px) scale(1.15)}}
.luna-stage{display:flex;justify-content:center;padding:8px 0 2px}
.luna-stage-img{width:190px;height:auto;animation:lunaBob 3.2s ease-in-out infinite;transform-origin:50% 85%}
.luna-stage-img.luna-stage-happy{animation:lunaHappy .55s ease-in-out 3}
.luna-name{font-family:var(--font-serif);font-size:26px;margin:2px 0 6px;color:var(--ink)}
.luna-stats{font-size:13px;color:var(--muted);margin:10px 0}
.luna-pet-btn{margin:0 10px 10px 0}
/* Phone: pet + bubble sit above the composer dock */
.phone-layout .luna-bubble{top:auto;bottom:188px;right:14px}
::selection{background:color-mix(in srgb,var(--rose) 30%,transparent)}
.luna-bubble{border-color:color-mix(in srgb,var(--rose) 45%,var(--line))}
.send-button{border-radius:12px}
/* ChatGPT-style feminine layout (2026-11-10) */
.welcome{top:clamp(60px,19vh,210px)}
.welcome-title{flex-direction:column;align-items:center;text-align:center;gap:16px;margin-bottom:30px}
.welcome-icon{width:64px;height:64px}
.welcome h1{font-size:31px;font-weight:600;letter-spacing:-.8px}
.welcome-composer-slot{height:auto;min-height:120px}
.welcome-hint{justify-content:center;gap:20px;flex-wrap:wrap}
.composer{border-radius:28px;padding:15px 17px 11px;box-shadow:0 14px 44px color-mix(in srgb,var(--rose) 13%,transparent),0 2px 10px rgba(60,30,50,.05)}
.composer textarea{height:52px}
.send-button{border-radius:50%}
.user-bubble{background:color-mix(in srgb,var(--rose) 12%,var(--panel));border-radius:20px}
.new-chat{border-radius:999px}
.suggest-row{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin-top:18px}
.suggest-chip{border:1px solid var(--line);background:var(--panel);color:var(--muted);border-radius:999px;padding:9px 15px;font-size:12.5px;display:inline-flex;gap:7px;align-items:center;cursor:pointer;box-shadow:0 1px 4px rgba(60,30,50,.04)}
.suggest-chip span{color:var(--rose)}
.suggest-chip:hover{border-color:color-mix(in srgb,var(--rose) 55%,var(--line));color:var(--ink)}
.chat-view.has-messages .suggest-row{display:none}
/* ===== ChatGPT parity pass (2026-11-10): every surface mirrors ChatGPT's layout language, in Rose. ===== */
.welcome{top:clamp(52px,16vh,180px)}
.welcome-title{margin-bottom:26px}
.welcome h1{font-size:30px;font-weight:500;letter-spacing:-.4px}
.welcome-hint{margin-top:14px}
.ai-disclaimer{text-align:center;font-size:11px;color:var(--faded);padding:0 16px 10px;margin:0;background:var(--paper)}
.phone-layout .ai-disclaimer{padding-bottom:max(8px,env(safe-area-inset-bottom))}
.chat-view.has-messages + .ai-disclaimer{display:block}
/* Composer: ChatGPT capsule */
.composer{border-radius:32px;border-color:color-mix(in srgb,var(--line) 70%,var(--muted));box-shadow:0 10px 34px rgba(59,26,43,.10),0 1px 4px rgba(59,26,43,.06)}
.composer textarea{font-size:15px}
.send-button{width:36px;height:36px}
/* Messages: ChatGPT shows no name plate over assistant replies */
.assistant-head{display:none}
.message-body{font-size:15px}
/* Sidebar rows, ChatGPT spacing */
.primary-nav{gap:2px}
.nav-item{height:42px;border-radius:10px;font-size:14px}
.recent-item{font-size:13.5px;border-radius:10px;padding:10px 12px}
.new-chat{font-size:14px}
/* Settings & drawers: ChatGPT settings language — flat rows, hairlines, switch toggles */
.drawer{box-shadow:-12px 0 44px rgba(59,26,43,.10)}
.drawer-body h3{font-size:12px;text-transform:uppercase;letter-spacing:.08em;color:var(--faded);margin:26px 0 6px}
.drawer-body .list-row{padding:13px 0}
.drawer-body input[type='checkbox']{-webkit-appearance:none;appearance:none;width:46px;height:27px;border-radius:999px;background:color-mix(in srgb,var(--muted) 35%,var(--panel));position:relative;cursor:pointer;transition:background .18s;flex:none;vertical-align:middle}
.drawer-body input[type='checkbox']::after{content:'';position:absolute;top:3px;left:3px;width:21px;height:21px;border-radius:50%;background:#fff;box-shadow:0 1px 4px rgba(0,0,0,.25);transition:left .18s}
.drawer-body input[type='checkbox']:checked{background:var(--rose)}
.drawer-body input[type='checkbox']:checked::after{left:22px}
.toggle-setting{display:flex!important;align-items:center;justify-content:space-between;gap:14px;padding:11px 0;border-bottom:1px solid var(--line);font-size:13.5px!important;color:var(--ink)!important;margin:0!important}
.toggle-setting span{line-height:1.45}
.drawer-body .action-btn{border-radius:999px;padding:10px 18px}
.drawer-body .text-btn{border-radius:999px;padding:9px 16px}
.drawer-body .inline-input{border-radius:12px}
.theme-option{border-radius:16px}
.theme-option.selected{outline:2px solid var(--rose)}
/* Menus, dialogs, toasts */
.janna-dialog{border-radius:20px}
.toast{border-radius:999px;padding:10px 18px}
.model-menu{border-radius:18px!important;box-shadow:0 18px 50px rgba(59,26,43,.16)!important}
/* Content pages: flatter cards, ChatGPT list feel */
.card{box-shadow:none;border-radius:18px}
.pill{border-radius:999px}
/* ===== Rebuild to the studied chatgpt.com spec (2026-11-10) ===== */
/* Empty state vertically centred, like ChatGPT */
.chat-view:not(.has-messages) .thread{display:flex;flex-direction:column}
.chat-view:not(.has-messages) .welcome{margin:auto;top:0;width:100%}
/* Slim single-capsule composer */
.composer{padding:9px 10px;gap:2px}
.composer textarea{height:30px;min-height:30px;padding:3px 8px;font-size:16px;line-height:1.4}
.composer-toolbar{min-height:36px}
.composer .icon-button{width:34px;height:34px}
.composer.is-empty .send-button{background:color-mix(in srgb,var(--rose) 30%,var(--paper))}
/* The + menu (ChatGPT pattern, opens upward) */
.composer-menu{position:absolute;left:6px;bottom:calc(100% + 10px);width:min(320px,88vw);background:var(--panel);border:1px solid var(--line);border-radius:18px;box-shadow:0 18px 50px rgba(59,26,43,.18);padding:6px;z-index:46;display:flex;flex-direction:column;gap:1px}
.composer-menu[hidden]{display:none}
.menu-row{display:flex;align-items:center;gap:11px;width:100%;padding:10px;border:0;background:transparent;border-radius:12px;color:var(--ink);font-size:13.5px;text-align:left;cursor:pointer}
.menu-row:hover{background:var(--hover)}
.menu-row svg{width:18px;height:18px;color:var(--muted);flex:none}
.menu-row select{margin-left:auto;border:0;background:transparent;color:var(--muted);font-size:13px;max-width:130px;cursor:pointer}
.menu-state{margin-left:auto;color:var(--muted);font-size:12.5px}
.menu-divider{height:1px;background:var(--line);margin:5px 8px}
/* Response actions: exactly Copy + Share, ChatGPT-style */
.message-actions{display:flex;gap:2px;margin-top:10px}
.message-action{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border:0;border-radius:8px;background:transparent;color:var(--muted);cursor:pointer;padding:6px}
.message-action svg{width:17px;height:17px}
.message-action:hover{background:var(--hover);color:var(--ink)}
.user-actions{justify-content:flex-end;margin-top:5px;opacity:.6}
/* Code blocks: pale panel, lowercase language, round copy pill */
.code-block{border-radius:16px;background:var(--bubble)}
.code-block-header{background:transparent;border-bottom:0;height:38px;text-transform:lowercase}
.code-action{border-radius:999px;background:var(--panel);border:1px solid var(--line);padding:4px 11px}
.code-block pre{background:transparent;border:0;border-radius:0}
/* Model picker as plain text + chevron, like ChatGPT's header */
.model-menu-button{border:0;background:transparent;font-size:13.5px;padding:6px 6px;border-radius:8px}
.model-menu-button[aria-expanded=true]{border-color:transparent;background:var(--hover)}
/* One centred suggestion pill */
.suggest-row{justify-content:center}
.suggest-single{padding:10px 20px;font-size:13.5px;color:var(--ink)}
/* Settings as one stacked page */
.settings-content>h3{font-size:16px;font-weight:650;text-transform:none;letter-spacing:0;color:var(--ink);margin:26px 0 4px}
.settings-content .theme-grid{margin-top:10px}

.composer{position:relative}
.message.user{flex-direction:column;align-items:flex-end}
.message-action{border:0!important;background:transparent!important;box-shadow:none!important}

body:has(#drawer:not([hidden])) .luna-bubble{opacity:0!important;pointer-events:none!important}

/* Markdown tables (ChatGPT parity) */
.md-table-wrap{overflow-x:auto;margin:10px 0;border:1px solid var(--line);border-radius:12px;background:var(--card)}
.md-table{border-collapse:collapse;width:100%;font-size:.92em}
.md-table th,.md-table td{padding:8px 12px;text-align:left;border-bottom:1px solid var(--line);vertical-align:top}
.md-table thead th{font-weight:700;border-bottom:1.5px solid var(--line);white-space:nowrap}
.md-table tbody tr:last-child td{border-bottom:none}

/* Thinking activity chain (ChatGPT-style status chain) */
.activity-chain{margin:0 0 8px;font-size:13px;color:var(--muted)}
.activity-chain summary{cursor:pointer;font-weight:600;color:var(--muted);list-style:none}
.activity-chain summary::-webkit-details-marker{display:none}
.activity-chain summary::after{content:' ›';font-weight:400}
.activity-chain[open ] summary::after{content:' ⌄'}
.activity-steps{margin:6px 0 2px;padding:0 0 0 2px;list-style:none}
.activity-steps li{padding:2px 0 2px 16px;position:relative}
.activity-steps li::before{content:'';position:absolute;left:2px;top:9px;width:6px;height:6px;border-radius:50%;background:var(--accent)}
