/* One continuous wallpaper across the entire workspace; gallery assets load on demand. */
header .heading{flex:1}#themeToggle{flex:none;border:1px solid var(--line);font-size:12px;min-height:36px}
#themeDialog{width:min(940px,calc(100vw - 32px));max-height:90dvh;padding:22px;border:1px solid var(--line);border-radius:20px;background:var(--bg);color:var(--text);box-shadow:0 24px 100px #0005}
#themeDialog::backdrop{background:#0008;backdrop-filter:blur(5px)}
.theme-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:16px}.theme-dialog-head h2{font-size:20px}.theme-dialog-head button{font-size:24px}
.theme-intro,#themeStatus{font-size:12px;color:var(--muted);margin:8px 0 16px}#themeStatus{min-height:20px;margin:8px 0 0}
#themePreview{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr);gap:20px;align-items:center;margin:14px 0 20px;padding:12px;border:1px solid var(--line);border-radius:14px}
#themePreviewImage{width:100%;aspect-ratio:16/9;object-fit:contain;border-radius:8px}#themePreviewName{font-size:18px;margin:0 0 8px}#themeCredit{font-size:12px;color:var(--muted);overflow-wrap:anywhere}#themeSource{font-size:12px;color:inherit}#themeApply{display:block;margin-top:16px;background:var(--text);color:var(--bg);padding:9px 16px}
#themeGrid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.theme-card{min-width:0;text-align:left;padding:5px;border:2px solid transparent;background:var(--side);border-radius:12px;white-space:normal}.theme-card img{display:block;width:100%;height:auto;aspect-ratio:16/10;object-fit:contain;border-radius:7px}.theme-card span{display:block;padding:7px 5px;font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.theme-card[aria-pressed=true]{border-color:var(--text)}
#themeDialog button:focus-visible,#themeToggle:focus-visible{outline:2px solid #789fda;outline-offset:3px}
html[data-wallpaper]{--bg:#161a20;--side:#20262e;--text:#f1f0eb;--muted:#bdc3cc;--line:#ffffff29;--hover:#ffffff18;--accent:#485366;--glass:#141820d9;--wash:#10141b52;--chrome:#10141b36;color-scheme:dark}
html[data-wallpaper=light]{--bg:#fbfaf7;--side:#eeeae4;--text:#252932;--muted:#565d68;--line:#29334629;--hover:#29334614;--accent:#394657;--glass:#fffdf5df;--wash:#fffdf55c;--chrome:#fffdf54d;color-scheme:light}
html[data-wallpaper] body{isolation:isolate;background-image:none}
html[data-wallpaper] body::before{content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;filter:brightness(var(--wallpaper-brightness,1));background-image:linear-gradient(var(--wash),var(--wash)),var(--wallpaper);background-size:cover;background-position:var(--wallpaper-position);background-repeat:no-repeat;background-attachment:fixed}
html[data-wallpaper] #sidebar,html[data-wallpaper] header{background:var(--chrome);backdrop-filter:none;border-color:var(--line)}
html[data-wallpaper] #messages{background:transparent}html[data-wallpaper] .composer-wrap{background:transparent}
html[data-wallpaper] :is(#composer,#panel,#contextMenu,#historyDialog,#editThreadDialog,#imageViewer,#toBottom,#devicePicker,#projectPicker,#search,.question-card,.claude-terminal,.body pre,.body code){background:var(--bg);color:var(--text);border-color:var(--line)}
html[data-wallpaper] .agentMessage{background:var(--glass);border-radius:16px;padding:16px 20px;backdrop-filter:blur(8px)}
html[data-wallpaper] :is(.userMessage,.question-option,.selected){background:var(--side);color:var(--text)}
html[data-wallpaper] :is(.label,.run-record,.thread-preview,.thread-project,.thread-heading,.thread-more,.project-empty,.section-label button,footer,.empty,.empty h2,.empty>div,.composer-note,#searchToggle,.brand #activityToggle,.hint){color:var(--muted)}
html[data-wallpaper] .body a{color:inherit;text-decoration:underline}html[data-wallpaper] textarea::placeholder{color:var(--muted)}
html[data-wallpaper] #auth{background:var(--glass);border-radius:20px}html[data-wallpaper] .question-option[aria-pressed=true]{outline:2px solid #789fda}
@media(max-width:760px){#themeToggle{min-height:40px;padding:6px 8px}#themeDialog{padding:16px;max-height:88dvh}#themeGrid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}#themePreview{grid-template-columns:1fr;gap:12px}#themePreviewImage{max-height:180px}#themeApply{margin-top:10px}html[data-wallpaper] #sidebar{background:var(--chrome);backdrop-filter:none}html[data-wallpaper] .agentMessage{padding:12px 14px}}

/* A consistent toolbar for knowledge, device actions and appearance. */
header{gap:12px}#headerActions{align-items:center;gap:8px;background:transparent}
#headerActions button,#themeToggle{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:36px;padding:7px 12px;border:1px solid var(--line);border-radius:10px;background:var(--bg);font-size:12px;line-height:20px;white-space:nowrap;text-decoration:none}
#headerActions button:hover,#themeToggle:hover{background:var(--hover)}
html[data-wallpaper] #headerActions button,html[data-wallpaper] #themeToggle{background:var(--chrome);backdrop-filter:none}
html[data-wallpaper] #devicePicker{background:var(--glass)}
.theme-filters{display:grid;grid-template-columns:auto minmax(120px,1fr) auto auto;align-items:center;gap:8px;margin:16px 0}
.theme-filters input,.theme-filters select{min-width:0;font-size:13px}.theme-filters button,.theme-pagination button,#themeReset,#themeRetry{border:1px solid var(--line);background:var(--side);min-height:38px}
.theme-pagination{display:flex;align-items:center;justify-content:center;gap:18px;margin:20px 0 0;font-size:12px;color:var(--muted)}
.theme-card{overflow:hidden}.theme-card small{display:block;padding:0 5px 6px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.theme-card img[hidden]+span{padding-top:50px}
@media(max-width:760px){.theme-filters{grid-template-columns:minmax(0,1fr) auto}.theme-filters input{grid-column:1/-1;grid-row:2;font-size:16px}.theme-filters button{grid-column:2;grid-row:3}.theme-filters select{font-size:12px}#headerActions.mobile-open{background:var(--bg);padding:8px;gap:6px}#headerActions button{justify-content:flex-start;width:100%;min-height:42px}header{gap:6px}#themeToggle{padding:6px 9px;min-height:40px}}
/* On a narrow screen the drawer overlays the workspace; hide its underlying text, not the wallpaper. */
@media(max-width:760px){html[data-wallpaper] #console.sidebar-open>article{visibility:hidden}}
html[data-wallpaper=dark] :is(#sidebar,header,.empty,.composer-note){text-shadow:0 1px 4px #0009}
html[data-wallpaper=light] :is(#sidebar,header,.empty,.composer-note){text-shadow:0 1px 4px #fff9}

/* Brightness affects the wallpaper layer only; foreground text remains unchanged. */
html[data-wallpaper]{--panel-rgb:20 24 32;--chrome:rgb(var(--panel-rgb) / var(--chrome-opacity,.25));--glass:rgb(var(--panel-rgb) / var(--content-opacity,.85))}
html[data-wallpaper=light]{--panel-rgb:255 253 245}
html[data-wallpaper] #composer,html[data-wallpaper] .userMessage{background:var(--glass)}
#themePreviewImage{filter:brightness(var(--wallpaper-brightness,1))}
.theme-adjustments{margin:16px 0;padding:14px 16px;border:1px solid var(--line);border-radius:14px;background:var(--side)}
.theme-adjustment-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.theme-adjustment-heading h3{font-size:14px;margin:0}.theme-adjustment-heading button{font-size:12px;border:1px solid var(--line)}
.theme-adjustment-sliders{display:grid;grid-template-columns:1fr 1fr;gap:24px}.theme-adjustment-sliders label{font-size:13px;margin:12px 0 6px}.theme-adjustment-sliders output{float:right;font-variant-numeric:tabular-nums;color:var(--muted)}
.theme-adjustment-sliders input[type=range]{display:block;width:100%;padding:0;border:0;min-height:32px;margin:6px 0 0;cursor:pointer;accent-color:#6994d0;background:transparent}
.theme-adjustments p{font-size:12px;color:var(--muted);margin:6px 0}.theme-adjustments small{display:block;line-height:1.6}
@media(max-width:520px){.theme-adjustment-sliders{grid-template-columns:1fr;gap:0}.theme-adjustments{padding:12px}}

.theme-quick{border:1px solid var(--line);background:var(--side);min-height:38px;margin:0 8px 0 0;padding:7px 12px}

.theme-rotation{display:flex;align-items:center;flex-wrap:wrap;gap:12px}.theme-rotation label{display:flex;align-items:center;gap:8px}.theme-rotation input[type=checkbox]{width:18px;height:18px}.theme-rotation small{flex-basis:100%;color:var(--muted)}
