/* Theme tokens come from theme.js; no surface keeps a separate palette. */
html{background:var(--theme-page,#090f0d)}
body[data-theme]{
  --base:var(--theme-panel);--surface:var(--theme-popup);--text:var(--theme-text);--muted:var(--theme-muted);
  --button-tone:var(--theme-button);--popup-tone:var(--theme-popup);--field-tone:var(--theme-field);
  --field-hover:var(--theme-field-hover);--field-disabled:var(--theme-disabled);--title-tone:var(--theme-title);
  --icon-hover-tone:var(--theme-button-hover);--icon-active-tone:var(--theme-button-active);--icon-halo:var(--theme-halo);
  background-color:var(--theme-page);background-image:radial-gradient(ellipse at 50% 38%,var(--theme-page-glow) 0,transparent 70%);color:var(--theme-text);
}
html[data-theme] .remote-shell{background-color:var(--theme-panel);background-image:linear-gradient(var(--theme-panel-wash),var(--theme-panel-wash)),var(--texture);background-blend-mode:normal,luminosity;--rust-opacity:var(--theme-rust)}
html[data-theme] .remote-shell::after{background:linear-gradient(transparent,var(--theme-overlay))}
html[data-theme] .login-panel,html[data-theme] .vintage-dialog{
  background-color:var(--theme-popup);background-image:linear-gradient(var(--theme-popup-wash),var(--theme-popup-wash)),var(--leather);
  background-blend-mode:normal,luminosity;color:var(--theme-text);
}
.vintage-dialog::backdrop{background:var(--theme-backdrop)}
html[data-theme] input:not([type=checkbox]),html[data-theme] select{background-color:var(--theme-field);color:var(--theme-field-text)}
html[data-theme] input:not([type=checkbox]):hover:not(:disabled):not([readonly]),html[data-theme] select:hover:not(:disabled){background-color:var(--theme-field-hover)}
html[data-theme] input:not([type=checkbox]):disabled,html[data-theme] select:disabled{background-color:var(--theme-disabled);color:var(--theme-muted)}
html[data-theme] input:not([type=checkbox])[readonly]:not(:disabled){background-color:var(--theme-field);color:var(--theme-muted)}
html[data-theme] input::placeholder{color:var(--theme-muted)}
html[data-theme] select option,html[data-theme] select optgroup{background:var(--theme-field);color:var(--theme-text)}
html[data-theme] select option:checked{background:var(--theme-selected);color:var(--theme-text)}
html[data-theme] .primary,html[data-theme] .ghost,html[data-theme] .primary-button,html[data-theme] .secondary-button,html[data-theme] .small-button,html[data-theme] input[type=file]::file-selector-button{
  background-color:var(--theme-button);background-image:linear-gradient(var(--theme-button-wash),var(--theme-button-wash)),var(--leather);
  background-size:auto,420px 420px;background-blend-mode:normal,luminosity;color:var(--theme-text);text-shadow:none;
}
html[data-theme] .primary:hover:not(:disabled),html[data-theme] .ghost:hover:not(:disabled),html[data-theme] .primary-button:hover:not(:disabled),html[data-theme] .secondary-button:hover:not(:disabled),html[data-theme] .small-button:hover:not(:disabled){background-color:var(--theme-button-hover)}
.theme-choices{margin-bottom:16px}
html[data-theme] .theme-choice{background:var(--theme-field);color:var(--theme-muted)}
html[data-theme] .theme-choice.selected{background:var(--theme-selected);color:var(--theme-text)}
[data-app-theme=moss]{--swatch:#244a38}[data-app-theme=wine]{--swatch:#5c292a}[data-app-theme=ocean]{--swatch:#244052}[data-app-theme=amber]{--swatch:#644426}
html[data-theme] .switch-row input{background:var(--theme-field)}
html[data-theme] .switch-row input:checked{background:var(--theme-selected)}
html[data-theme] .switch-row input::before{background:var(--theme-muted)}
html[data-theme] .switch-row input:checked::before{background:var(--theme-text)}
html[data-theme] .check input,html[data-theme] #firmwareProgress{accent-color:var(--theme-accent)}
html[data-theme] .note,html[data-theme] .warning,html[data-theme] .history-list li{background:var(--theme-note);color:var(--theme-text)}
html[data-theme] .toast{background:var(--theme-popup);color:var(--theme-text)}
html[data-theme] .camera-media,html[data-theme] .camera-frame:fullscreen,html[data-theme] .camera-expanded{background-color:var(--theme-camera)}
html[data-theme] .camera-message{background:var(--theme-camera-overlay);color:#f5eee2}
html[data-theme] .camera-badge{background:var(--theme-camera-overlay)}
html[data-theme] .direction-button::before{background-color:var(--theme-button);background-image:linear-gradient(var(--theme-button-wash),var(--theme-button-wash)),var(--leather);background-size:auto,420px 420px}
html[data-theme] .plaque::before{background-color:var(--theme-title)}
html[data-theme] .connection,html[data-theme] .command-status,html[data-theme] .demo-note,html[data-theme] .device-meta,
html[data-theme] label,html[data-theme] legend,html[data-theme] .footer-button,html[data-theme] .hint,html[data-theme] .field-help,
html[data-theme] .history-empty,html[data-theme] .empty,html[data-theme] .session-actions,html[data-theme] .login-panel>p,
html[data-theme] .switch-row small,html[data-theme] .stats,html[data-theme] .history,html[data-theme] .event-detail,html[data-theme] .event-top time{color:var(--theme-muted);text-shadow:none}
html[data-theme] .login-panel h1,html[data-theme] .dialog-heading h2,html[data-theme] .dialog-body h3,html[data-theme] .stats strong{color:var(--theme-text)}
html[data-theme] .direction-label,html[data-theme] .command-countdown,html[data-theme] .door-position{color:var(--theme-label);text-shadow:none}
html[data-theme] .direction-icon{color:var(--theme-label);fill:currentColor;stroke:none;filter:none}
