/* Visitor appearance is independent of the administrator's brand settings. */
:root{color-scheme:light;--brand-accent:#bd583f}
:root[data-theme=dark]{color-scheme:dark;--paper:#151c1a;--white:#202a26;--ink:#e7ede9;--muted:#abb7b0;--line:#3c4942;--accent:color-mix(in srgb,var(--brand-accent) 55%,#ffd0b5);--pale:color-mix(in srgb,var(--brand-accent) 16%,#202a26);--green:#b0d2b3;--green-pale:#283e31;--green-light:#283e31;--blue:#9dccf4;--shadow:0 16px 42px #0003}
.theme-picker{position:relative;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:40px;height:40px;border:1px solid var(--line);border-radius:50%;background:var(--white);color:var(--ink);cursor:pointer}
.theme-picker:hover{background:var(--pale)}
.theme-picker:focus-within{outline:3px solid var(--accent);outline-offset:3px}
.theme-picker select{position:absolute;inset:0;width:100%;height:100%;appearance:none;-webkit-appearance:none;border:0;border-radius:inherit;background:transparent;color:transparent;cursor:pointer;font-size:16px}
.theme-picker select option{background:var(--white);color:var(--ink);font-size:14px}
.theme-picker svg{width:19px;height:19px;pointer-events:none}
.theme-picker-text,.theme-symbol-moon,.theme-symbol-system{display:none}
[data-theme=dark] .theme-symbol-sun{display:none}
[data-theme=dark] .theme-symbol-moon{display:inline-flex}
[data-theme-choice=system] .theme-symbol-sun,[data-theme-choice=system] .theme-symbol-moon{display:none}
[data-theme-choice=system] .theme-symbol-system{display:inline-flex}
.mobile-theme-control{display:none}

/* Main surfaces and controls */
html[data-theme=dark] :is(.room-card,.searchbox,.contact-card,.stat,.table-scroll,.panel,.empty,.sample-button,.account-confirm-person,.room-trash-summary,.paste-icon,.icon-button,.thumb-wrap button,.ai-source-item button){background:var(--white);border-color:var(--line)}
html[data-theme=dark] :is(.btn-outline:hover,.chip:not(.active):hover,.admin-sidebar button:hover,.view-switch button.active){background:#2c3831}
html[data-theme=dark] :is(.btn-primary,.btn-primary:hover){background:var(--brand-accent);color:var(--accent-ink,#fff)}
html[data-theme=dark] :is(.btn-green,.chip.active,#toast){color:var(--paper)}
html[data-theme=dark] :is(.step-row .active b,.badge-count){color:var(--paper)}
html[data-theme=dark] .preview-bar{background:#243229;color:#c1d0bf}
html[data-theme=dark] :is(.navlinks a,.hero-note,.search-field input,.search-field select,.specs,.help-card p,.detail-copy,.field,.ai-side p,.ai-side ul){color:var(--muted)}
html[data-theme=dark] .navlinks a.active{color:var(--accent)}
html[data-theme=dark] :is(.hero-tag,.image-caption,.room-tag,.heart){background:#202a26f2;color:var(--ink);border-color:var(--line)}
html[data-theme=dark] :is(.hero-tag .tiny-icon,.principle>.tiny-icon){background:var(--pale);color:var(--accent)}
html[data-theme=dark] :is(.card-bottom,.admin-table .actions){border-color:var(--line)}
html[data-theme=dark] :is(.help-card,.ai-side,.account-permissions){background:var(--green-pale)}
html[data-theme=dark] .help-card .btn{border-color:#607762}
html[data-theme=dark] :is(.line-house,.ai-side .pill){color:var(--green)}
html[data-theme=dark] .ai-side .pill{background:#202e24}
html[data-theme=dark] :is(.spec-tile,.admin-table th,.ai-result thead th,.editor-diff-heading,.editor-frame){background:#26312b}
html[data-theme=dark] :is(.field input,.field select,.field textarea){background:#18211d;color:var(--ink)}
html[data-theme=dark] :is(input,textarea)::placeholder{color:#9ba99f;opacity:1}
html[data-theme=dark] select option{background:#202a26;color:var(--ink)}
html[data-theme=dark] :is(.field input:disabled,.field textarea:disabled){background:#26312b;color:#a2ada6}
html[data-theme=dark] :is(.upload-zone,.image-paste-zone,.editor-example){background:#1a261f;border-color:#56674f}
html[data-theme=dark] :is(.upload-zone.dragging,.image-paste-zone:focus,.image-paste-zone.dragging,.editor-example:hover){background:#28392c;border-color:var(--accent)}
html[data-theme=dark] .image-paste-zone kbd{background:#202a26;border-color:#607058}
html[data-theme=dark] .photo-unavailable{background:#26312b;color:var(--muted)}

/* Notices and administrative status remain distinct in low light. */
html[data-theme=dark] :is(.note,.about-block .note,.demo-notice,.trash-note,.ai-warnings,.editor-preview-banner){background:#342e25;color:#e3cba9;border-color:#65533d}
html[data-theme=dark] .ai-status{color:#e3cba9}
html[data-theme=dark] :is(.pill.live,.editor-success){background:#283e31;color:#b0d2b3}
html[data-theme=dark] .pill.pending{background:#3d3220;color:#f0d29b}
html[data-theme=dark] .pill.hidden{background:#344039;color:#c4cec6}
html[data-theme=dark] .pill.deleted{background:#3d2c25;color:#f0c3a6}
html[data-theme=dark] :is(.editor-error,.actions .room-delete){background:#3d2724;color:#ffb6a2;border-color:#805044}
html[data-theme=dark] .actions .room-delete:hover{background:#53312a}
html[data-theme=dark] .account-revoke{color:#ffb6a2}
html[data-theme=dark] :is(button,a,input,select,textarea):focus-visible{outline-color:var(--accent)}
html[data-theme=dark] ::selection{background:#b96745;color:#fff}

@media(max-width:980px){.navlinks{display:none}.nav-actions{margin-left:auto}}
@media(max-width:760px){
 .nav>.brand,.nav>.brand>span{min-width:0}
 .nav>.brand strong{white-space:normal}
 .nav-actions{flex-shrink:0}
 .nav-actions .btn{white-space:nowrap}
 .nav-actions .theme-picker{display:none}
 .preview-bar{height:40px}
 .mobile-theme-control{display:flex;margin-left:auto}
 .mobile-theme-control .theme-picker{width:auto;height:32px;gap:7px;border:0;border-radius:7px;padding:0 9px;background:transparent}
 .mobile-theme-control .theme-picker-text{display:inline;font-size:11px;font-weight:600;letter-spacing:0}
 .mobile-theme-control .theme-picker svg{width:17px;height:17px}
}
@media(max-width:380px){
 .nav{gap:8px}.nav>.brand{gap:6px}.nav>.brand img{width:27px;height:27px}
 .nav>.brand strong{font-size:15px;max-width:94px}
 .nav-actions{gap:5px}.nav-actions .btn{font-size:9px;padding:8px 7px}
 .nav-actions .icon-button{width:28px;height:28px}
}
