/* One semantic palette for the Mini App and the server panel. */
:root {
  color-scheme: light;
  --bg:#f6f4ee; --card:#fffefa; --surface:#eeeee6; --text:#252d2a;
  --muted:#5b655f; --line:#dbdfd5; --input-line:#7b8980;
  --accent:#365c50; --on-accent:#ffffff; --accent-soft:#e6ede6;
  --focus:#925807; --shadow:0 4px 20px #20322008;
  --success-bg:#e3eee3; --success-text:#255738;
  --warning-bg:#fff0cb; --warning-text:#6e4b05;
  --danger-bg:#f8e5e0; --danger-text:#8a3429;
  --unavailable-bg:#e5e8e2; --unavailable-text:#576257;
  --selected-bg:#365c50; --selected-text:#ffffff;
}
:root[data-theme="dark"] {
  color-scheme:dark;
  --bg:#141918; --card:#1d2421; --surface:#28322c; --text:#f1f2e9;
  --muted:#b0b9af; --line:#39463d; --input-line:#758477;
  --accent:#c6d8bf; --on-accent:#1d3025; --accent-soft:#2b3c2f;
  --focus:#f1ca83; --shadow:0 4px 20px #00000018;
  --success-bg:#25392d; --success-text:#c7e3cf;
  --warning-bg:#3b321c; --warning-text:#efd18c;
  --danger-bg:#3c2725; --danger-text:#f0b6a9;
  --unavailable-bg:#262c29; --unavailable-text:#a7b0a7;
  --selected-bg:#c6d8bf; --selected-text:#1d3025;
}
html {background:var(--bg);color:var(--text)}
body {background:var(--bg);color:var(--text)}
.theme-startup {display:none}
:root[data-theme-loading] {background:#626a66}
:root[data-theme-loading] body {visibility:hidden}
:root[data-theme-loading] .theme-startup {
  visibility:visible;display:grid;place-items:center;position:fixed;inset:0;
  z-index:10000;margin:0;padding:1rem;background:#626a66;color:#fff;text-align:center;
}
button,input,select,textarea {font:inherit}
button,input,select,textarea,a,summary { -webkit-tap-highlight-color:transparent }
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,a:focus-visible,summary:focus-visible {outline:3px solid var(--focus);outline-offset:3px}
.theme-control {display:flex;align-items:center;gap:9px;flex-wrap:wrap;font-size:12px;color:var(--muted)}
.theme-control .theme-toggle {position:relative;display:inline-block;flex:0 0 44px;width:44px;min-height:26px;height:26px;padding:0;margin:0;border:1px solid var(--input-line);border-radius:20px;background:var(--surface);cursor:pointer}
.theme-toggle::after {content:'';position:absolute;left:3px;top:3px;width:18px;height:18px;border-radius:50%;background:var(--text);transition:transform .18s}
.theme-toggle[aria-checked="true"]::after {transform:translateX(18px)}
.theme-toggle:disabled {opacity:.5;cursor:wait}
.theme-status {font-size:12px;color:var(--muted);margin:0;flex-basis:100%;line-height:1.5}
.theme-status:empty {display:none}
.theme-control button.theme-retry {font:inherit;padding:4px 8px;margin:0;min-height:30px;background:var(--card);color:var(--accent);border:1px solid var(--line)}
@media(prefers-reduced-motion:reduce) {*,*::before,*::after {transition:none!important;animation:none!important;scroll-behavior:auto!important}}
