/*
 * 1010! — стили.
 * Темы переключаются атрибутом data-theme на <html>.
 * Все размеры задаются CSS-переменными из layout() в game.js,
 * поэтому поле, фигуры и табло масштабируются под любой экран.
 */

* { box-sizing: border-box; }

html, body { height: 100%; }

/* ---------- темы ---------- */

:root,
[data-theme="light"] {
  --bg: #eef1f6;
  --fg: #1c2430;
  --chip-bg: rgba(28, 36, 48, .85);
  --chip-fg: #f8fafc;
  --cell-empty: rgba(28, 36, 48, .07);
  --cell-line: rgba(28, 36, 48, .10);
  --board-bg: rgba(255, 255, 255, .55);
  --board-border: rgba(28, 36, 48, .14);
  --slot-bg: rgba(255, 255, 255, .5);
  --accent: #3b82f6;
  --will-clear: #ffffff;
  --c-red: #ef4444;
  --c-orange: #f97316;
  --c-yellow: #eab308;
  --c-green: #22c55e;
  --c-blue: #3b82f6;
  --c-indigo: #6366f1;
  --c-violet: #a855f7;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #17191d;
  --fg: #e5e7eb;
  --chip-bg: rgba(0, 0, 0, .6);
  --chip-fg: #f8fafc;
  --cell-empty: rgba(255, 255, 255, .06);
  --cell-line: rgba(255, 255, 255, .09);
  --board-bg: rgba(255, 255, 255, .04);
  --board-border: rgba(255, 255, 255, .12);
  --slot-bg: rgba(255, 255, 255, .04);
  --accent: #3364ff;
  --will-clear: #ffffff;
  --c-red: #ff5733;
  --c-orange: #ffa600;
  --c-yellow: #ffd700;
  --c-green: #57ff33;
  --c-blue: #3364ff;
  --c-indigo: #8333ff;
  --c-violet: #ff33ff;
  color-scheme: dark;
}

[data-theme="neon"] {
  --bg: #000000;
  --fg: #e9d5ff;
  --chip-bg: rgba(158, 0, 255, .25);
  --chip-fg: #f5e8ff;
  --cell-empty: rgba(158, 0, 255, .10);
  --cell-line: rgba(255, 0, 255, .28);
  --board-bg: rgba(158, 0, 255, .06);
  --board-border: rgba(255, 0, 255, .35);
  --slot-bg: rgba(158, 0, 255, .08);
  --accent: #9d00ff;
  --will-clear: #ff7bff;
  --c-red: #ff00ff;
  --c-orange: #ff00cc;
  --c-yellow: #9900ff;
  --c-green: #cc00ff;
  --c-blue: #9d00ff;
  --c-indigo: #cc00ff;
  --c-violet: #6e0dd0;
  color-scheme: dark;
}

[data-theme="green"] {
  --bg: #e7f4e4;
  --fg: #16351d;
  --chip-bg: rgba(16, 46, 24, .85);
  --chip-fg: #f2fbf0;
  --cell-empty: rgba(16, 46, 24, .08);
  --cell-line: rgba(16, 46, 24, .13);
  --board-bg: rgba(255, 255, 255, .55);
  --board-border: rgba(16, 46, 24, .18);
  --slot-bg: rgba(255, 255, 255, .5);
  --accent: #2e7d32;
  --will-clear: #ffffff;
  --c-red: #43a047;
  --c-orange: #7cb342;
  --c-yellow: #c0ca33;
  --c-green: #2e7d32;
  --c-blue: #00897b;
  --c-indigo: #00695c;
  --c-violet: #1b5e20;
  color-scheme: light;
}

[data-theme="navy"] {
  --bg: #0a1930;
  --fg: #d9e6ff;
  --chip-bg: rgba(2, 10, 26, .72);
  --chip-fg: #e6efff;
  --cell-empty: rgba(217, 230, 255, .07);
  --cell-line: rgba(217, 230, 255, .11);
  --board-bg: rgba(255, 255, 255, .04);
  --board-border: rgba(217, 230, 255, .15);
  --slot-bg: rgba(255, 255, 255, .04);
  --accent: #4fa3ff;
  --will-clear: #ffffff;
  --c-red: #ff6b81;
  --c-orange: #ffa94d;
  --c-yellow: #ffe066;
  --c-green: #69db7c;
  --c-blue: #4dabf7;
  --c-indigo: #748ffc;
  --c-violet: #da77f2;
  color-scheme: dark;
}

[data-theme="mono"] {
  --bg: #f2f2f2;
  --fg: #1a1a1a;
  --chip-bg: rgba(26, 26, 26, .88);
  --chip-fg: #f5f5f5;
  --cell-empty: rgba(0, 0, 0, .07);
  --cell-line: rgba(0, 0, 0, .13);
  --board-bg: rgba(255, 255, 255, .6);
  --board-border: rgba(0, 0, 0, .2);
  --slot-bg: rgba(255, 255, 255, .55);
  --accent: #1a1a1a;
  --will-clear: #ffffff;
  --c-red: #212121;
  --c-orange: #3d3d3d;
  --c-yellow: #5a5a5a;
  --c-green: #787878;
  --c-blue: #969696;
  --c-indigo: #b5b5b5;
  --c-violet: #d4d4d4;
  color-scheme: light;
}

[data-theme="rainbow"] {
  --bg: #fff8ee;
  --fg: #33241a;
  --chip-bg: rgba(51, 36, 26, .85);
  --chip-fg: #fff6ea;
  --cell-empty: rgba(51, 36, 26, .07);
  --cell-line: rgba(51, 36, 26, .12);
  --board-bg: rgba(255, 255, 255, .6);
  --board-border: rgba(51, 36, 26, .16);
  --slot-bg: rgba(255, 255, 255, .55);
  --accent: #ff7043;
  --will-clear: #ffffff;
  --c-red: #ff5252;
  --c-orange: #ff9800;
  --c-yellow: #ffd600;
  --c-green: #66bb6a;
  --c-blue: #42a5f5;
  --c-indigo: #5c6bc0;
  --c-violet: #ab47bc;
  color-scheme: light;
}

/* радужная тема «психо»: JS после каждого хода рандомизирует ВСЕ цвета —
   палитру фигур, фон, кнопки, поле; CSS добавляет постоянное переливание */
[data-theme="rainbowshift"] {
  --bg: #fff8ee;
  --fg: #33241a;
  --chip-bg: rgba(51, 36, 26, .85);
  --chip-fg: #fff6ea;
  --cell-empty: rgba(51, 36, 26, .07);
  --cell-line: rgba(51, 36, 26, .12);
  --board-bg: rgba(255, 255, 255, .6);
  --board-border: rgba(51, 36, 26, .16);
  --slot-bg: rgba(255, 255, 255, .55);
  --accent: #ff7043;
  --will-clear: #ffffff;
  --c-red: #ff5252;
  --c-orange: #ff9800;
  --c-yellow: #ffd600;
  --c-green: #66bb6a;
  --c-blue: #42a5f5;
  --c-indigo: #5c6bc0;
  --c-violet: #ab47bc;
  color-scheme: dark;
}

/* ---------- база ---------- */

/* масштаб интерфейса. Базовое значение 1 — до запуска JS;
   дальше --ui непрерывно считает layout() в game.js:
   --ui = clamp(0.72…1.25, boardPx / 380) — панель растёт с полем
   и плавно жмётся, когда окно сужается.
   --hud-scale — итоговый масштаб HUD: --ui × --hud-fit (доп. сжатие,
   когда содержимое панели шире поля; --hud-fit считает layout()) */
:root {
  --ui: 1;
  --hud-fit: 1;
  --hud-scale: var(--ui, 1);
}

body {
  margin: 0;
  position: fixed;
  inset: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  transition: background .25s ease;
}

.app {
  height: 100%;
  position: relative;
  display: grid;
  grid-template-areas:
    "hud"
    "board"
    "tray";
  grid-template-rows: auto auto auto;
  justify-items: center;
  align-content: center;
  gap: 12px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  touch-action: none; /* никакой прокрутки/зума жестами во время игры */
}

/* телефон в горизонтали: поле слева на всю высоту, лоток справа,
   табло — компактная полупрозрачная плашка поверх левого верхнего угла */
.app.side {
  grid-template-areas: "board tray";
  grid-template-columns: auto auto;
  grid-template-rows: auto;
  align-items: center;
  justify-content: center;
  column-gap: 18px;
}

.app.side .hud {
  position: absolute;
  top: calc(10px + env(safe-area-inset-top));
  left: calc(12px + env(safe-area-inset-left));
  z-index: 20;
  width: auto;
  justify-content: flex-start;
}

/* ---------- табло ---------- */

.hud {
  grid-area: hud;
  /* ровно ширина поля (переменная считается в layout() в game.js) */
  width: var(--board-w, 100%);
  max-width: 100%;
  /* локальная шкала: --ui × --hud-fit (fit считает layout() по факту переполнения) */
  --hud-scale: calc(var(--ui, 1) * var(--hud-fit, 1));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(8px * var(--hud-scale, 1));
  /* один ряд всегда: вместо складывания в столбик содержимое сжимается */
  flex-wrap: nowrap;
  white-space: nowrap;
  min-width: 0;
}

.scores { display: flex; gap: calc(8px * var(--hud-scale, 1)); }

.chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: calc(74px * var(--hud-scale, 1));
  background: var(--chip-bg);
  color: var(--chip-fg);
  border-radius: 12px;
  padding: 6px calc(12px * var(--hud-scale, 1)) 7px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .15);
}

.chip-label {
  font-size: calc(10px * var(--hud-scale, 1));
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .7;
}

.chip-value {
  font-size: calc(20px * var(--hud-scale, 1));
  font-weight: 700;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.chip-value.bump { animation: bump .3s ease; }

.hud-buttons { display: flex; gap: calc(8px * var(--hud-scale, 1)); }

.btn {
  border: 0;
  cursor: pointer;
  font: inherit;
  font-size: calc(14px * var(--hud-scale, 1));
  font-weight: 600;
  color: var(--chip-fg);
  background: var(--chip-bg);
  padding: calc(10px * var(--hud-scale, 1)) calc(14px * var(--hud-scale, 1));
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .15);
  transition: transform .12s ease, filter .15s ease;
  touch-action: manipulation;
}

/* иконка-кнопки: квадрат, содержимое — иконка (auto/theme/reset/sound) */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: calc(38px * var(--hud-scale, 1));
  height: calc(38px * var(--hud-scale, 1));
  padding: 0;
  flex: 0 0 auto;
}

.icon-btn .ic {
  width: calc(20px * var(--hud-scale, 1));
  height: calc(20px * var(--hud-scale, 1));
  fill: currentColor;
  display: block;
  pointer-events: none;
}

/* звук: одна иконка, вид переключает класс muted */
.icon-btn .ic-off { display: none; }

.icon-btn.muted .ic-on { display: none; }

.icon-btn.muted .ic-off { display: block; }

/* auto: человек (вручную) ↔ робот (авто), вид переключает класс bot */
.icon-btn .ic-robot { display: none; }

.icon-btn.bot .ic-human { display: none; }

.icon-btn.bot .ic-robot { display: block; }

.btn:hover { filter: brightness(1.2); }
.btn:active { transform: scale(.94); }
.btn.primary { background: var(--accent); }
.btn.secondary {
  background: transparent;
  color: var(--fg);
  box-shadow: inset 0 0 0 1.5px var(--board-border);
}

/* включённый режим Auto */
.btn.active {
  background: var(--accent);
  animation: auto-pulse 1.6s ease-in-out infinite;
}

@keyframes auto-pulse {
  50% { filter: brightness(1.3); }
}

/* ---------- поле ---------- */

.board-wrap { grid-area: board; position: relative; }

.board {
  display: grid;
  grid-template-columns: repeat(10, var(--cell));
  grid-auto-rows: var(--cell);
  gap: var(--gap);
  padding: var(--board-pad);
  background: var(--board-bg);
  border: 1px solid var(--board-border);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
}

.cell {
  width: var(--cell);
  height: var(--cell);
  border-radius: calc(var(--cell) * .2);
  background: var(--cell-empty);
  box-shadow: inset 0 0 0 1px var(--cell-line);
}

/* цвета клеток — один класс на все виды элементов (поле, лоток, призрак) */
.c-red    { background-color: var(--c-red); }
.c-orange { background-color: var(--c-orange); }
.c-yellow { background-color: var(--c-yellow); }
.c-green  { background-color: var(--c-green); }
.c-blue   { background-color: var(--c-blue); }
.c-indigo { background-color: var(--c-indigo); }
.c-violet { background-color: var(--c-violet); }

.cell.filled {
  box-shadow:
    inset 0 calc(var(--cell) * -.09) 0 rgba(0, 0, 0, .22),
    inset 0 1px 0 rgba(255, 255, 255, .25);
}

.cell.preview {
  opacity: .5;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .55);
}

.cell.will-clear {
  box-shadow: inset 0 0 0 2px var(--will-clear);
  filter: brightness(1.25);
}

.cell.pop { animation: cell-pop .25s ease-out; }

.cell.clearing { animation: cell-out .3s ease-in forwards; }

/* чем больше линий сгорело за ход, тем эффектнее анимация:
   clear-fx2/3/4 вешаются на .board из animateClear */
.board.clear-fx2 .cell.clearing { animation: cell-out2 .45s ease-in forwards; }

.board.clear-fx3 .cell.clearing { animation: cell-out3 .6s ease-in forwards; }

.board.clear-fx4 .cell.clearing { animation: cell-out4 .78s ease-in forwards; }

.board.shake1 { animation: board-shake .38s ease-in-out; }

.board.shake2 { animation: board-shake2 .55s ease-in-out; }

@keyframes cell-out2 {
  0% { filter: brightness(1); }
  35% {
    filter: brightness(2.2);
    transform: scale(1.15);
    box-shadow: inset 0 0 0 2px var(--will-clear);
  }
  100% { transform: scale(0); opacity: 0; }
}

@keyframes cell-out3 {
  0% { filter: brightness(1); }
  20% {
    filter: brightness(2.6);
    transform: scale(1.22) translate(-2px, 1px);
    box-shadow: inset 0 0 0 2px var(--will-clear);
  }
  45% { filter: brightness(1.6); transform: scale(.92) translate(2px, -1px); }
  65% {
    filter: brightness(2.8);
    transform: scale(1.18) translate(-1px, -2px);
    box-shadow: inset 0 0 0 3px var(--will-clear);
  }
  100% { transform: scale(0) translate(0, 0); opacity: 0; }
}

@keyframes cell-out4 {
  0% { filter: brightness(1); }
  14% {
    filter: brightness(3);
    transform: scale(1.3) translate(-3px, 2px);
    box-shadow: inset 0 0 0 3px var(--will-clear);
  }
  30% { filter: brightness(1.8); transform: scale(1.02) translate(3px, -2px); }
  46% {
    filter: brightness(3.2);
    transform: scale(1.26) translate(2px, 2px);
    box-shadow: inset 0 0 0 4px var(--will-clear);
  }
  62% { filter: brightness(2); transform: scale(1.05) translate(-2px, -2px); }
  80% {
    filter: brightness(3.4);
    transform: scale(1.2) translate(0, 0);
    box-shadow: inset 0 0 0 4px var(--will-clear);
  }
  100% { transform: scale(0); opacity: 0; }
}

@keyframes board-shake {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-3px, 1px); }
  40% { transform: translate(3px, -1px); }
  60% { transform: translate(-2px, -1px); }
  80% { transform: translate(2px, 1px); }
}

@keyframes board-shake2 {
  0%, 100% { transform: translate(0, 0); }
  12% { transform: translate(-5px, 2px) rotate(-.4deg); }
  26% { transform: translate(5px, -2px) rotate(.4deg); }
  42% { transform: translate(-4px, -2px) rotate(-.3deg); }
  58% { transform: translate(4px, 2px) rotate(.3deg); }
  74% { transform: translate(-2px, 1px) rotate(-.15deg); }
  88% { transform: translate(2px, -1px) rotate(.15deg); }
}

/* ---------- лоток с фигурами ---------- */

.tray {
  grid-area: tray;
  display: flex;
  gap: 14px;
  /* ровно ширина поля, фигуры распределены по ней */
  width: var(--board-w, auto);
  max-width: 100%;
  justify-content: space-around;
}

.app.side .tray {
  flex-direction: column;
  gap: 12px;
  width: auto;
  justify-content: center;
}

.slot {
  width: var(--slot);
  height: var(--slot);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--slot-bg);
  border: 1px solid var(--board-border);
  touch-action: none; /* обязательно для перетаскивания пальцем */
}

.slot:not(.empty) { cursor: grab; }

.slot.empty .shape { display: none; }

.slot.lifted .shape { opacity: .25; }

.slot.deny .shape { animation: shake .3s ease; }

.shape {
  position: relative;
  /* клетки фигуры — Grid на переменных: при resize зазоры всегда совпадают с клетками;
     --tray-gap выставляет layout() (≥2px), чтобы клетки не слипались */
  display: grid;
  grid-template-columns: repeat(var(--shape-w, 1), var(--tray-cell));
  grid-auto-rows: var(--tray-cell);
  gap: var(--tray-gap, 2px);
}

.shape.appear { animation: pop-in .25s ease-out; }

.mini {
  position: static; /* позицию в фигуре даёт grid-column/-row */
  width: var(--tray-cell);
  height: var(--tray-cell);
  border-radius: calc(var(--tray-cell) * .22);
  box-shadow:
    inset 0 calc(var(--tray-cell) * -.1) 0 rgba(0, 0, 0, .22),
    inset 0 1px 0 rgba(255, 255, 255, .25);
}

/* ---------- перетаскивание ---------- */

#drag-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 70;
}

.ghost {
  position: fixed;
  left: 0;
  top: 0;
  will-change: transform;
}

.ghost-inner {
  position: relative;
  /* Grid на переменных поля: клетки призрака при resize «дышат» вместе с сеткой */
  display: grid;
  grid-template-columns: repeat(var(--shape-w, 1), var(--cell));
  grid-auto-rows: var(--cell);
  gap: var(--gap, 4px);
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .35));
  animation: grow .12s ease-out;
  transform-origin: 0 0;
}

.gcell {
  position: static; /* позицию в призраке даёт grid-column/-row */
  width: var(--cell);
  height: var(--cell);
  border-radius: calc(var(--cell) * .2);
  box-shadow:
    inset 0 calc(var(--cell) * -.09) 0 rgba(0, 0, 0, .22),
    inset 0 1px 0 rgba(255, 255, 255, .25);
}

/* всплывающие очки за линии — эффектнее при большем числе линий */
.float-score {
  position: absolute;
  left: 50%;
  top: 10px;
  transform: translateX(-50%);
  z-index: 5;
  font-weight: 800;
  font-size: clamp(20px, 5vmin, 30px);
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .45);
  pointer-events: none;
  animation: float-up .8s ease-out forwards;
}

.float-score.tier2 { font-size: clamp(26px, 6.5vmin, 40px); color: #ffe08a; }

.float-score.tier3 {
  font-size: clamp(32px, 8vmin, 50px);
  color: #ffd166;
  text-shadow: 0 0 18px rgba(255, 209, 102, .85), 0 2px 10px rgba(0, 0, 0, .45);
}

.float-score.tier4 {
  font-size: clamp(38px, 10vmin, 62px);
  color: #ff9f43;
  text-shadow:
    0 0 22px rgba(255, 159, 67, .95),
    0 0 44px rgba(255, 159, 67, .6),
    0 2px 10px rgba(0, 0, 0, .45);
}

.float-score.tier3, .float-score.tier4 { animation: float-up-big .95s ease-out forwards; }

@keyframes float-up-big {
  0% { opacity: 0; transform: translate(-50%, 14px) scale(.7); }
  18% { opacity: 1; transform: translate(-50%, 0) scale(1.12); }
  32% { transform: translate(-50%, -4px) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -64px) scale(1); }
}

/* тост «Updated» при первом запуске новой версии билда */
.update-toast {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 16px);
  z-index: 60;
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
}

.update-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- оверлей ---------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, .55);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.overlay[hidden] { display: none; }

.card {
  background: var(--bg);
  color: var(--fg);
  border-radius: 18px;
  padding: 26px 30px;
  text-align: center;
  min-width: min(320px, 86vw);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
  animation: pop-in .2s ease-out;
}

.card h1 { margin: 0 0 6px; font-size: 24px; }

.card p { margin: 0 0 18px; opacity: .75; font-size: 15px; }

.overlay-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
}

/* ---------- анимации ---------- */

@keyframes pop-in {
  from { transform: scale(.4); opacity: 0; }
}

@keyframes cell-pop {
  0% { transform: scale(.55); }
  60% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

@keyframes cell-out {
  to { transform: scale(0); opacity: 0; }
}

@keyframes shake {
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}

@keyframes bump {
  40% { transform: scale(1.28); }
}

@keyframes float-up {
  from { opacity: 1; transform: translate(-50%, 0); }
  to { opacity: 0; transform: translate(-50%, -52px); }
}

@keyframes grow {
  from { transform: scale(.6); }
}

/* ---------- маленькие экраны ---------- */

/* (отдельные правила не нужны: HUD ужимается непрерывно через --hud-scale,
   кнопки — квадратные иконки; --hud-fit дополнительно сжимает содержимое,
   когда панели встречаются по центру) */

/* ---------- радужная тема «психо» ---------- */

/* JS после каждого хода перебрасывает --c-*, --bg, --accent и т.д. —
   тут только постоянное переливание оттенков и всплески при сжигании */
[data-theme="rainbowshift"] .board { animation: hue-drift 4s linear infinite; }

[data-theme="rainbowshift"] .hud,
[data-theme="rainbowshift"] .tray { animation: hue-drift 6s linear infinite; }

[data-theme="rainbowshift"] .cell.clearing { animation: hue-burst .45s ease-out; }

[data-theme="rainbowshift"] .slot .shape { transition: filter .5s ease; }

@keyframes hue-drift {
  from { filter: hue-rotate(0deg); }
  to { filter: hue-rotate(360deg); }
}

@keyframes hue-burst {
  0% { filter: hue-rotate(0deg) brightness(1); transform: scale(1); }
  45% { filter: hue-rotate(120deg) brightness(1.8); transform: scale(1.12); }
  100% { filter: hue-rotate(240deg) brightness(1); transform: scale(1); }
}

/* уважение к reduced motion */
@media (prefers-reduced-motion: reduce) {
  [data-theme="rainbowshift"] .board,
  [data-theme="rainbowshift"] .hud,
  [data-theme="rainbowshift"] .tray { animation: none; }
}
