/* Each world has a quiet reading plane and a distinct control hierarchy. */
:root[data-theme=light]{color-scheme:light}
:root[data-theme=dark]{color-scheme:dark}
:root[data-theme=cyber]{color-scheme:dark;--bg:#10151f;--side:#171e2b;--text:#e7f2f4;--muted:#a7b7c5;--line:#38495c;--surface:#202c3c;--hover:#304258;--accent:#f4e34a;--invert:#17180e;--danger:#ff8f9b;--link:#6adeec;--control:#75899e;--heading:#f4e34a;--wash:#163240;--shadow:0 12px 40px #0005}
:root[data-theme=mars]{color-scheme:dark;--bg:#1b1920;--side:#29222a;--text:#f5e9df;--muted:#c4b2a6;--line:#50414a;--surface:#332a31;--hover:#49363a;--accent:#f6ad78;--invert:#2a1912;--danger:#ff9696;--link:#9bcce4;--control:#a18a7e;--heading:#f6ad78;--wash:#3d2525;--shadow:0 12px 40px #0004}
:root[data-theme=hawaii]{color-scheme:light;--bg:#fffaf0;--side:#e7f1e8;--text:#253d39;--muted:#526a61;--line:#c2d4c7;--surface:#edf3e6;--hover:#d2e6d9;--accent:#086f6c;--invert:#fffaf0;--danger:#a52f34;--link:#08667a;--control:#719183;--heading:#176a64;--wash:#d7eeef;--shadow:0 12px 40px #174e3210}
:root[data-theme=warhammer]{color-scheme:dark;--bg:#191c1c;--side:#202625;--text:#edeadf;--muted:#b7b5a5;--line:#414b43;--surface:#29312c;--hover:#3b4537;--accent:#d9bc70;--invert:#242014;--danger:#f49691;--link:#b6d4c3;--control:#929681;--heading:#d9bc70;--wash:#33282a;--shadow:0 12px 40px #0006}
:root:is([data-theme=cyber],[data-theme=mars],[data-theme=hawaii],[data-theme=warhammer]) header{background:linear-gradient(115deg,var(--wash),var(--bg) 90%);border-bottom:1px solid var(--line)}
:root:is([data-theme=cyber],[data-theme=mars],[data-theme=hawaii],[data-theme=warhammer]) #sidebar{background:linear-gradient(160deg,var(--wash),var(--side) 280px);border-right:1px solid var(--line)}
:root:is([data-theme=cyber],[data-theme=mars],[data-theme=hawaii],[data-theme=warhammer]) :is(#welcome h1,.answer h2,.answer h3,.brand-lockup,#model-button){color:var(--heading)}
:root:is([data-theme=cyber],[data-theme=mars],[data-theme=hawaii],[data-theme=warhammer]) .primary-nav{background:var(--accent);color:var(--invert);font-weight:600}
:root:is([data-theme=cyber],[data-theme=mars],[data-theme=hawaii],[data-theme=warhammer]) .nav.active{background:var(--hover);box-shadow:inset 3px 0 var(--accent);font-weight:600}
:root:is([data-theme=cyber],[data-theme=mars],[data-theme=hawaii],[data-theme=warhammer]) :is(.avatar,header .icon){color:var(--link)}
:root:is([data-theme=cyber],[data-theme=mars],[data-theme=hawaii],[data-theme=warhammer]) .answer a{color:var(--link)}
:root:is([data-theme=cyber],[data-theme=mars],[data-theme=hawaii],[data-theme=warhammer]) :is(.outline,.suggestions button,.row .buttons button){border:1px solid var(--control);color:var(--text);background:var(--surface)}
:root:is([data-theme=cyber],[data-theme=mars],[data-theme=hawaii],[data-theme=warhammer]) .row .buttons button.solid{background:var(--accent);color:var(--invert)}
:root:is([data-theme=cyber],[data-theme=mars],[data-theme=hawaii],[data-theme=warhammer]) .row .buttons .danger{color:var(--danger)}
:root:is([data-theme=cyber],[data-theme=mars],[data-theme=hawaii],[data-theme=warhammer]) .composer{background:var(--surface);border-color:var(--control)}
:root:is([data-theme=cyber],[data-theme=mars],[data-theme=hawaii],[data-theme=warhammer]) .composer:focus-within{border-color:var(--link);box-shadow:0 0 0 2px var(--wash)}
:root:is([data-theme=cyber],[data-theme=mars],[data-theme=hawaii],[data-theme=warhammer]) .composer-tools .subtle{border:1px solid var(--control);color:var(--text)}
:root:is([data-theme=cyber],[data-theme=mars],[data-theme=hawaii],[data-theme=warhammer]) .composer-tools .icon{color:var(--link);background:var(--hover)}
:root:is([data-theme=cyber],[data-theme=mars],[data-theme=hawaii],[data-theme=warhammer]) .send{width:40px;height:40px}
:root:is([data-theme=cyber],[data-theme=mars],[data-theme=hawaii],[data-theme=warhammer]) .send:disabled{background:var(--hover);color:var(--muted);opacity:1}
:root:is([data-theme=cyber],[data-theme=mars],[data-theme=hawaii],[data-theme=warhammer]) .appearance-row select{color:var(--text);background-color:var(--surface);border:1px solid var(--control);border-radius:8px;min-height:42px;width:154px;padding:8px 25px 8px 10px;background-position:right 7px center}
:root:is([data-theme=cyber],[data-theme=mars],[data-theme=hawaii],[data-theme=warhammer]) :is(.approval,#notice-banner){border:1px solid var(--accent);background:var(--surface);color:var(--text)}
:root:is([data-theme=cyber],[data-theme=mars],[data-theme=hawaii],[data-theme=warhammer]) #queue{border:1px solid var(--control);background:var(--surface)}
:root:is([data-theme=cyber],[data-theme=mars],[data-theme=hawaii],[data-theme=warhammer]) :is(#pending,.connection.offline){color:var(--accent)}
:root:is([data-theme=cyber],[data-theme=mars],[data-theme=hawaii],[data-theme=warhammer]) .message-actions{opacity:1}
:root:is([data-theme=cyber],[data-theme=mars],[data-theme=hawaii],[data-theme=warhammer]) :is(.code-block,th){background:var(--side)}
:root:is([data-theme=cyber],[data-theme=mars],[data-theme=hawaii],[data-theme=warhammer]) :is(button,a,input,textarea,select):focus-visible{outline:2px solid var(--link);outline-offset:3px}
:root[data-theme=cyber] :is(.primary-nav,.suggestions button,.solid,.outline){border-radius:5px}
:root[data-theme=cyber] #model-button{letter-spacing:.4px}
:root[data-theme=mars] .bubble{border-left:2px solid #b16646}
:root[data-theme=hawaii] .bubble{background:#f7e5d5}
:root[data-theme=hawaii] .suggestions svg{color:#a04c2a}
:root[data-theme=warhammer] :is(.primary-nav,.suggestions button,.solid,.outline){border-radius:6px}
:root[data-theme=warhammer] header{border-bottom:1px solid #8b773e}
/* Pixel artwork remains outside the text reading plane. */
.brand-lockup>i{width:32px;height:32px;border-radius:9px;background:var(--theme-icon) center/cover;box-shadow:0 0 0 1px var(--line)}
.brand-lockup>i svg{visibility:hidden}
.account-card>.avatar{background:var(--theme-icon) center/cover;color:transparent;border-radius:12px;width:52px;height:52px}
#welcome::before{content:'';display:block;width:72px;height:72px;margin:0 auto 24px;border-radius:18px;background:var(--theme-icon) center/cover;box-shadow:0 4px 16px #0002}
@media(max-width:800px){#welcome{margin-top:clamp(38px,9vh,80px)}#welcome::before{width:64px;height:64px;margin-bottom:20px}.composer-tools>div{gap:4px}}

/* ChatGPT Classic: neutral paper, quiet chrome and a clear conversation hierarchy. */
:root[data-theme=classic]{color-scheme:light;--bg:#fff;--side:#f9f9f9;--text:#0d0d0d;--muted:#666;--line:#e5e5e5;--surface:#f4f4f4;--hover:#ececec;--accent:#0d0d0d;--invert:#fff;--danger:#b42318;--shadow:0 8px 36px #00000010}
:root[data-theme=classic] body{font-family:Roboto,-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans SC","Microsoft YaHei",sans-serif;letter-spacing:0}
:root[data-theme=classic] svg{stroke-width:1.8}
:root[data-theme=classic] header{background:#fff;border:0;height:72px;padding:12px 24px}
:root[data-theme=classic] #model-button{font-size:18px;font-weight:600;letter-spacing:-.25px;gap:6px}
:root[data-theme=classic] #model-button small{background:transparent;padding:0 3px;font-size:11px}
:root[data-theme=classic] .header-labels{gap:3px}
:root[data-theme=classic] .header-labels #header-title{color:var(--muted);font-size:11px}
:root[data-theme=classic] .connection.online{background:#747474}
:root[data-theme=classic] #sidebar{background:var(--side);border-right:1px solid #efefef;padding:16px 12px}
:root[data-theme=classic] .side-head{padding:5px 10px 20px}
:root[data-theme=classic] .brand-lockup{font-size:17px;letter-spacing:-.2px;gap:10px}
:root[data-theme=classic] .brand-lockup>i{width:28px;height:28px;border-radius:8px;box-shadow:none}
:root[data-theme=classic] .nav{border:0;border-radius:12px;min-height:46px;font-size:14px;background:transparent}
:root[data-theme=classic] .nav:hover,:root[data-theme=classic] .nav.active{background:var(--hover);box-shadow:none}
:root[data-theme=classic] .primary-nav{font-weight:600}
:root[data-theme=classic] .side-label{font-size:12px;font-weight:500;color:#666}
:root[data-theme=classic] .search{background:#efefef;border-radius:12px;margin:0 2px 12px;padding:11px}
:root[data-theme=classic] .side-bottom{background:var(--side)}
:root[data-theme=classic] #welcome{margin-top:clamp(80px,21vh,210px)}
:root[data-theme=classic] #welcome::before{display:none}
:root[data-theme=classic] #welcome .eyebrow{font-size:12px;margin-bottom:14px}
:root[data-theme=classic] #welcome h1{font-size:30px;font-weight:600;line-height:1.4;letter-spacing:-.65px}
:root[data-theme=classic] #welcome p{font-size:14px;color:var(--muted);margin-top:12px}
:root[data-theme=classic] .suggestions{margin-top:28px;gap:8px}
:root[data-theme=classic] .suggestions button{border:1px solid var(--line);background:#fff;border-radius:24px;padding:12px 16px;min-height:44px;color:#484848;box-shadow:none}
:root[data-theme=classic] .suggestions button:hover{background:var(--surface)}
:root[data-theme=classic] .message{font-size:16px;line-height:1.8;margin:26px 0 32px}
:root[data-theme=classic] .answer{line-height:1.8;letter-spacing:0}
:root[data-theme=classic] .answer p{margin-bottom:16px}
:root[data-theme=classic] .answer h2{font-size:21px;font-weight:600;margin-top:28px}
:root[data-theme=classic] .answer h3{font-size:18px;font-weight:600}
:root[data-theme=classic] .answer a{color:#215cca;text-decoration-thickness:1px;text-underline-offset:3px}
:root[data-theme=classic] .bubble{background:#f4f4f4;border:0;border-radius:24px;padding:12px 18px;line-height:1.7;box-shadow:none}
:root[data-theme=classic] .message-actions{opacity:1;color:#676767;margin-top:8px}
:root[data-theme=classic] .message-actions button{min-width:40px;min-height:40px;border-radius:50%}
:root[data-theme=classic] .code-block{border:1px solid var(--line);background:#f9f9f9;border-radius:16px}
:root[data-theme=classic] .code-head{background:#f3f3f3}
:root[data-theme=classic] .table-wrap{border-radius:12px}
:root[data-theme=classic] footer{background:linear-gradient(#ffffff00,#fff 14px);padding:12px 24px 10px}
:root[data-theme=classic] .composer{background:#fff;border:1px solid #dedede;border-radius:28px;padding:15px 12px 10px;box-shadow:0 2px 8px #00000005}
:root[data-theme=classic] .composer:focus-within{border-color:#aaa;box-shadow:0 2px 8px #00000007}
:root[data-theme=classic] textarea#prompt{font-size:16px;line-height:1.6;padding:1px 8px;min-height:34px}
:root[data-theme=classic] textarea#prompt::placeholder{color:#777}
:root[data-theme=classic] .composer-tools{margin-top:10px;gap:4px;flex-wrap:wrap}
:root[data-theme=classic] .composer-tools>div:first-child{gap:2px}
:root[data-theme=classic] .composer-send-tools{margin-left:auto;gap:4px}
:root[data-theme=classic] .composer-tools .icon{width:40px;height:40px;color:#222;background:transparent}
:root[data-theme=classic] .composer-tools .icon:hover{background:#f1f1f1}
:root[data-theme=classic] .composer-tools .subtle{border:0;border-radius:20px;color:#525252;min-height:40px;padding:8px 7px;font-size:11px}
:root[data-theme=classic] .composer-tools .subtle span{font-size:11px}
:root[data-theme=classic] #permission-button.full-access{background:#ededed;color:#111}
:root[data-theme=classic] #voice-button{width:40px;height:40px}
:root[data-theme=classic] #voice-button.recording{background:#0d0d0d;color:#fff}
:root[data-theme=classic] .send{width:40px;height:40px;background:#0d0d0d;color:#fff;box-shadow:none;border-radius:50%}
:root[data-theme=classic] .send.enqueue{width:auto;min-width:54px;border-radius:22px}
:root[data-theme=classic] #send:disabled{background:#e6e6e6;color:#8c8c8c;opacity:1}
:root[data-theme=classic] .footnote{font-size:10px;color:#777;padding-top:10px}
:root[data-theme=classic] :is(.upload-card,.voice-panel,#queue,.approval,#notice-banner){border:1px solid var(--line);border-radius:20px;background:#f9f9f9;box-shadow:none}
:root[data-theme=classic] .upload-card{background:#fff}
:root[data-theme=classic] :is(.upload-copy>span,.voice-bottom small){font-size:11px}
:root[data-theme=classic] .upload-card.failed .upload-copy>span{color:var(--danger)}
:root[data-theme=classic] .upload-card .icon{min-width:32px;min-height:36px}
:root[data-theme=classic] .solid{background:#0d0d0d;color:#fff;border-radius:24px;min-height:44px;box-shadow:none}
:root[data-theme=classic] .outline{border:1px solid #d7d7d7;background:#fff;border-radius:24px;min-height:42px;color:var(--text)}
:root[data-theme=classic] dialog{background:#fff;border:1px solid #ececec;border-radius:24px;box-shadow:0 18px 60px #00000018}
:root[data-theme=classic] dialog::backdrop{background:#0005;backdrop-filter:blur(2px)}
:root[data-theme=classic] .modal-head h2{font-weight:600;font-size:20px;letter-spacing:-.2px}
:root[data-theme=classic] .modal-head .icon{width:40px;height:40px;background:#f4f4f4}
:root[data-theme=classic] .settings-row{min-height:60px;border-color:#ededed}
:root[data-theme=classic] .settings-row strong{font-size:14px}
:root[data-theme=classic] .appearance-row select{width:182px;color:var(--text);min-height:44px;background-position:right 4px center}
:root[data-theme=classic] :is(button,a,input,textarea,select):focus-visible{outline:2px solid #555;outline-offset:3px}
@media(max-width:800px){
 :root[data-theme=classic] header{height:68px;padding:10px 12px;gap:9px}
 :root[data-theme=classic] #model-button{font-size:16px}
 :root[data-theme=classic] .scroll-area{padding:0 20px}
 :root[data-theme=classic] #welcome{margin-top:clamp(70px,19vh,160px)}
 :root[data-theme=classic] #welcome h1{font-size:27px}
 :root[data-theme=classic] .user-content{max-width:92%}
 :root[data-theme=classic] footer{padding:10px 10px max(10px,env(safe-area-inset-bottom))}
 :root[data-theme=classic] .composer{border-radius:26px;padding:13px 9px 8px}
 :root[data-theme=classic] .composer-tools .subtle{padding:7px 5px;font-size:10px}
 :root[data-theme=classic] .composer-tools .subtle span{font-size:10px}
 :root[data-theme=classic] .composer-tools .icon,:root[data-theme=classic] #voice-button,:root[data-theme=classic] .send{width:38px;height:40px}
 :root[data-theme=classic] .send.enqueue{width:auto;min-width:48px}
 :root[data-theme=classic] dialog:not(#login){border-radius:28px 28px 0 0;padding:22px 20px max(24px,env(safe-area-inset-bottom))}
 :root[data-theme=classic] #modal.media-modal[open]{padding:18px 16px max(20px,env(safe-area-inset-bottom))}
}
