/* Interface preferences and collapsible Settings. */
.nav-settings{margin-top:16px}
.nav-settings>summary{padding:12px;min-height:44px;cursor:pointer;font-weight:750;color:var(--muted);border-radius:10px}
.nav-settings>summary:hover{background:var(--panel-soft);color:var(--text)}
.nav-settings>summary:focus-visible{outline:2px solid var(--purple);outline-offset:-2px}
.nav-settings[open]>summary{color:var(--text)}
.appearance-control{display:flex;align-items:center;gap:10px;padding:0 8px 12px;flex-shrink:0}
.appearance-control label{font-size:10px;margin:0;flex:1;color:var(--muted)}
.appearance-control select{width:112px;min-height:40px;padding:8px;font-size:11px}
.sidebar nav{min-height:0;flex:1}
.sidebar .language-switch,.sidebar .profile{flex-shrink:0}
.release-notes details{border-top:1px solid var(--line);margin-top:14px;padding-top:10px}
.release-notes summary{cursor:pointer;font-weight:750;padding:9px 0;min-height:44px}
.release-notes ul{padding-left:22px;line-height:1.75;overflow-wrap:anywhere}
.release-notes li{margin:7px 0;color:var(--text)}
:root[data-theme="dark"]{--bg:#14121c;--panel:#201d2a;--panel-soft:#282333;--line:#3b344b;--line-strong:#51465f;--text:#f1edf7;--muted:#bbb2ca;--purple:#bc94ff;--purple-dark:#ceb2ff;--purple-soft:#38274f;--green:#6ed4a6;--green-soft:#163a30;--red:#ff91a7;--red-soft:#472532;--amber:#efca78;--amber-soft:#3d3220;--shadow:0 12px 34px #0004}
html[data-theme="dark"] body{background:var(--bg)}
html[data-theme="dark"] :is(.sidebar,.login-card,.project-card,.gallery figure,.upload-gallery figure,.empty,.secondary,.menu-button,.action-bar,.mode-pill,.credits,.reference-strip a){background:var(--panel);color:var(--text);border-color:var(--line)}
html[data-theme="dark"] :is(input,select,textarea){background:var(--panel-soft);color:var(--text);border-color:var(--line-strong)}
html[data-theme="dark"] :is(label,.sidebar nav a,.hero-card p,.info-card p,.filter-row,.reference-strip span,.upload-gallery span,.gallery a,.manual-key summary,.security-grid ol,.narrow ol){color:var(--muted)}
html[data-theme="dark"] :is(.sidebar nav a:hover,.sidebar nav a.active,.language-switch button.active,.secondary:hover,.secondary.purple){background:var(--purple-soft);color:var(--purple-dark);border-color:var(--line-strong);box-shadow:none}
html[data-theme="dark"] :is(.hero-card,.video-hero,.api-hero,.info-card,.trash-head,.qr-setup){background:linear-gradient(125deg,#2d2341,var(--panel));border-color:var(--line)}
html[data-theme="dark"] .hero-card:after{opacity:.12}
html[data-theme="dark"] :is(.upload,.upload.featured,.upload:hover,.upload.has-file,.update-drop,.update-drop:hover,.update-drop.has-file,.lock,.workflow-steps span,.backup-status>div,.setup-key,.prompt-result textarea,.thumb){background:var(--panel-soft);border-color:var(--line-strong);color:var(--text)}
html[data-theme="dark"] :is(.upload>span,.section-icon,.type-icon,.workflow-steps b,.sidebar nav a em){background:var(--purple-soft);color:var(--purple-dark)}
html[data-theme="dark"] :is(.alert.success,.status.completed,.status.manual_complete,.badge.free,.recovery-box){background:var(--green-soft);color:var(--green);border-color:#2e6552}
html[data-theme="dark"] :is(.alert.error,.status.failed){background:var(--red-soft);color:var(--red);border-color:#6e3848}
html[data-theme="dark"] :is(.warning,.warning p){color:var(--amber);border-color:#68532d}
html[data-theme="dark"] :is(th,td){border-color:var(--line)}
html[data-theme="dark"] :is(.status,.mode-tag){background:var(--panel-soft);color:var(--muted)}
html[data-theme="dark"] .status.prompt_ready{background:var(--purple-soft);color:var(--purple-dark)}
html[data-theme="dark"] :is(.danger-button,.gallery-delete){background:var(--red-soft)!important;color:var(--red)!important;border-color:#6e3848!important}
html[data-theme="dark"] :is(.upload-preview,.upload-gallery img,.gallery img,.gallery video){background:var(--bg)}
html[data-theme="dark"] .totp-qr{background:#fff;color:#211d2d}
html[data-theme="dark"] .recovery-box code{background:var(--panel);color:var(--green);border-color:var(--line)}
html[data-theme="dark"] :is(.setup-key b,.credits b){color:var(--purple-dark)}
html[data-theme="dark"] ::placeholder{color:#a79bb8;opacity:1}

html[data-theme="dark"] :is(.quick-link,.studio-output-preview>div,.studio-hero-pills span,.studio-hero-art,.pose-preview span,.preset-save>form,.language-switch button,.section-editable){background:var(--panel);color:var(--text);border-color:var(--line)}
html[data-theme="dark"] :is(.studio-image-hero,.paired-hero,.campaign-hero,.studio-prompt-card header,.studio-prompt-card.back header,.pair-card>header){background:linear-gradient(125deg,#2d2341,var(--panel));border-color:var(--line)}
html[data-theme="dark"] :is(.studio-workflow-steps>div,.pair-card,.safety-note,.media-fallback,.preview-action,.cover-button,.pose-assign button,.tracker-status.pending,.type-pill,.pose-badge){background:var(--panel-soft);color:var(--muted);border-color:var(--line)}
html[data-theme="dark"] :is(.studio-image-hero p,.studio-output-preview span,.studio-workflow-steps span,.pair-card header p,.styling-accessories p,.styling-hint,.project-status-row>span){color:var(--muted)}
html[data-theme="dark"] :is(.safety-note b,.studio-workflow-steps strong){color:var(--text)}
html[data-theme="dark"] :is(.studio-prompt-card textarea,.pair-columns textarea){background:var(--panel-soft)!important;color:var(--text);border-color:var(--line)}
html[data-theme="dark"] :is(.quick-link>.icon:first-child,.studio-output-preview b,.studio-workflow-steps>div>b,.pose-preview b,.studio-prompt-card header em){background:var(--purple-soft);color:var(--purple-dark)}
html[data-theme="dark"] .project-card .thumb>img{background:var(--bg)}
html[data-theme="dark"] .project-progress{background:var(--line)}
html[data-theme="dark"] .pin-active{background:var(--purple-soft)!important;color:var(--purple-dark)!important;border-color:var(--line-strong)!important}
html[data-theme="dark"] :is(.cover-button.current,.tracker-status.ready){background:var(--green-soft);color:var(--green)}
html[data-theme="dark"] .language-switch button.active{background:var(--purple-soft);color:var(--purple-dark)}

/* Keep notes attached to their installation record in Update History. */
.update-history{min-width:0}
.update-history td{vertical-align:top}
.update-history td small{overflow-wrap:anywhere}
.update-history .update-record td{border-bottom:0}
.update-record-notes td{padding-top:0;padding-bottom:20px}
.history-changelog{margin-top:8px;border:1px solid var(--line);border-radius:10px;background:var(--panel-soft);padding:0 12px}
.history-changelog summary{min-height:44px;padding:11px 0;cursor:pointer;font-weight:700;color:var(--purple-dark)}
.history-changelog ul{padding-left:20px;margin:0 0 14px;line-height:1.7;overflow-wrap:anywhere}
.history-changelog li{margin:6px 0;color:var(--text)}
.history-changelog p{padding-bottom:12px}
@media(max-width:560px){.update-history{padding:16px}.update-history th,.update-history td{padding-left:6px;padding-right:6px}.update-history .status{white-space:normal}.update-history td:first-child{max-width:160px}}
