/* Shared controls keep the existing Boncom typography and layout. */
.theme-actions{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
#login-form .login-appearance{margin-bottom:0}
#login-form .login-appearance button{background:transparent;color:var(--text);border:1px solid var(--line);min-height:40px;font-size:12px;padding:6px 10px;margin:0}
.toolbar{align-items:end}.toolbar .review-control{min-width:150px;font-size:11px;gap:5px}.review-control select{width:100%;font-size:12px}
.toolbar>.check{align-self:center}.toolbar .manual{align-self:end}
.preview.preview-dark{background:#1c1c1e;color:#f2f2f2}
dialog{background:var(--panel);color:var(--text)}
:root[data-theme=dark]{--bg:#141216;--panel:#1d1a20;--text:#f5f0f4;--muted:#b8afb9;--line:#433b46;--accent:#7c3f59;--ok:#345a48;--bad:#e9928c;--brand-red:#ff746b;--brand-plum:#e1a9c2;--brand-teal:#9ec7c9;color-scheme:dark}
[data-theme=dark] button.ghost{background:transparent;color:var(--text);border-color:#655968}
[data-theme=dark] input,[data-theme=dark] select,[data-theme=dark] textarea{background:#28232c;color:var(--text);border-color:#665a69}
[data-theme=dark] input::placeholder,[data-theme=dark] textarea::placeholder{color:#aaa0ad}
[data-theme=dark] button.danger{background:#923d39;color:#fff}
[data-theme=dark] .toolbar .danger{background:transparent;color:#f3aaa4;border-color:#86524e}
[data-theme=dark] .error,[data-theme=dark] .reason{color:#f3aaa4}
[data-theme=dark] .handle input.needs{background:#3d242d;border-color:#e9928c}
[data-theme=dark] .topbar{border-color:var(--line)}
[data-theme=dark] .topbar #embed-btn{background:#f0e4eb;border-color:#f0e4eb;color:#281a22}
[data-theme=dark] #tabs button.active,[data-theme=dark] .layout-group h3,[data-theme=dark] .app-footer>span:first-child,[data-theme=dark] .app-footer strong{color:var(--text)}
[data-theme=dark] .thumb{background:#2b2630}
[data-theme=dark] .empty{background:#1b181e;border-color:#5c4f61}
[data-theme=dark] .layout-option{background:#2b2530;color:var(--text)}
[data-theme=dark] .layout-option:hover{background:#3c3040}
[data-theme=dark] .layout-option[aria-pressed=true]{background:#482b3b;border-color:var(--brand-plum);color:#ffe6f2}
[data-theme=dark] .layout-description{background:#35232f;color:#f8d8e7}
[data-theme=dark] [aria-pressed=true] .layout-thumb>span{background:#bc7e9c}
[data-theme=dark] [aria-pressed=true] .layout-thumb>span:nth-child(3n+1){background:#e4adc7}
[data-theme=dark] .preview-viewport{background:#110e14;border-color:var(--line)}
[data-theme=dark] .preview-devices button[aria-pressed=true]{background:#294749;border-color:#80a8ab;color:#e0f6f7}
[data-theme=dark] .preview.phone{box-shadow:0 0 0 5px #514456}
[data-theme=dark] textarea[readonly]{background:#28232e;color:#eee5f1}
[data-theme=dark] .toast{background:#eee4ed;color:#241927;border:1px solid #68526c}
[data-theme=dark] .toast.err{background:#8b3434;color:#fff}
[data-theme=dark] #login-form>button[type=submit]{background:#f0e4eb;color:#281a22}
[data-theme=dark] #login-form .login-appearance button{background:transparent;color:var(--text)}
@media(max-width:700px){.toolbar .review-control{flex:1;min-width:130px}.theme-actions{gap:4px}.topbar .theme-actions button{min-height:40px}.login-appearance{justify-content:flex-end}}

.theme-switch{position:relative;display:inline-flex;flex-direction:row;align-items:center;gap:10px;min-height:44px;font-size:12px;font-weight:500;cursor:pointer;white-space:nowrap}
.theme-switch input{position:absolute;width:44px;height:26px;right:0;opacity:0;cursor:pointer;margin:0}
.switch-track{width:44px;height:26px;border:1px solid var(--line);border-radius:999px;background:#c6c1c8;pointer-events:none;transition:background .15s}
.switch-track:after{content:'';display:block;width:20px;height:20px;margin:2px;border-radius:50%;background:white;box-shadow:0 1px 3px #0003;transition:transform .15s}
.theme-switch input:checked+.switch-track{background:var(--brand-plum);border-color:var(--brand-plum)}.theme-switch input:checked+.switch-track:after{transform:translateX(18px)}
.theme-switch input:focus-visible+.switch-track{outline:3px solid var(--brand-teal);outline-offset:3px}
