/* ============================================================
   theme.css — палитра Happy Decoder для тёмной и светлой темы.
   Тёмная — дефолт (:root). Светлая — html[data-theme="light"].
   Подключается на всех страницах; выбор применяет theme.js.
   ============================================================ */

:root{
  /* поверхности */
  --bg:#0c0c0c;
  --panel:#111;
  --panel-2:#0a0a0a;
  --panel-3:#1a1a1a;
  --border-soft:#1a1a1a;
  --line:#333;
  --line2:#222;
  /* нейтральный текст */
  --fg:#e0e0e0;
  --fg-2:#a0a0a0;
  --fg-3:#888;
  --dim:#666;
  --muted:#555;
  --muted2:#444;
  /* акценты */
  --green:#00ff41;
  --orange:#ff6600;
  --cyan:#00ccff;
  --magenta:#ff00ff;
  --amber:#f59e0b;
  --amber-hi:#fbbf24;
  --red:#ff0000;
  --warn:#ff9900;
  /* тинты / полупрозрачные */
  --green-dim:#00ff4150;
  --green-ph:#00ff4160;
  --green-soft:#00ff4140;
  --green-tint:#00ff4110;
  --orange-dim:#ff660070;
  --orange-soft:#ff660040;
  --cyan-soft:#00ccff30;
  --cyan-dim:#00ccff60;
  --magenta-soft:#ff00ff30;
  --amber-dim:#f59e0b60;
  --amber-tint:rgba(245,158,11,.08);
  --warn-soft:#ff990030;
  --red-soft:#ff000040;
  --json-fg:#a7f3d0;
  /* спец-поверхности */
  --warn-bg:#1a1400;
  --red-bg:#1a0000;
  --on-accent:#fff;
  /* мета */
  color-scheme:dark;
}

html[data-theme="light"]{
  /* «бумажный терминал»: тёплый off-white фон, затемнённые читаемые акценты */
  --bg:#f4f1e8;
  --panel:#eae5d6;
  --panel-2:#e7e1cf;
  --panel-3:#e6e0cf;
  --border-soft:#d5ccb2;
  --line:#b0a684;
  --line2:#d3cbb0;
  --fg:#1a1914;
  --fg-2:#34322a;
  --fg-3:#403c31;
  --dim:#524d3d;
  --muted:#5c5644;
  --muted2:#6f6851;
  --green:#0a7d2c;
  --orange:#c04a00;
  --cyan:#0369a1;
  --magenta:#a21caf;
  --amber:#b45309;
  --amber-hi:#d97706;
  --red:#d12626;
  --warn:#b45309;
  --green-dim:#3f7a4c;
  --green-ph:#6b8f74;
  --green-soft:rgba(10,125,44,.45);
  --green-tint:rgba(10,125,44,.10);
  --orange-dim:#c56a3a;
  --orange-soft:rgba(192,74,0,.40);
  --cyan-soft:rgba(3,105,161,.20);
  --cyan-dim:#4a90b8;
  --magenta-soft:rgba(162,28,175,.25);
  --amber-dim:#a06a2f;
  --amber-tint:rgba(180,83,9,.10);
  --warn-soft:rgba(180,83,9,.30);
  --red-soft:rgba(209,38,38,.40);
  --json-fg:#15803d;
  --warn-bg:#f6ecd2;
  --red-bg:#f7dede;
  --on-accent:#fff;
  color-scheme:light;
}

/* ---- переключатель темы (фикс. угол сверху-справа, общий на всех страницах) ---- */
.theme-toggle{
  position:fixed;top:10px;right:10px;z-index:900;
  width:34px;height:34px;
  display:flex;align-items:center;justify-content:center;
  background:var(--panel);color:var(--fg-2);
  border:1px solid var(--line);border-radius:6px;
  cursor:pointer;font-size:16px;line-height:1;font-family:inherit;padding:0;
  transition:color .15s,border-color .15s,background .15s;
  -webkit-tap-highlight-color:transparent;
}
.theme-toggle:hover{color:var(--cyan);border-color:var(--cyan)}
.theme-toggle:focus-visible{outline:2px solid var(--cyan);outline-offset:2px}
@media(max-width:600px){
  .theme-toggle{width:30px;height:30px;font-size:14px;top:8px;right:8px}
}
