/* Темы оформления (features/theme.js). Тема = настроение фона + акцент. Дефолт
   «Тёмная» — без data-theme (tokens.css нетронут). Кастомный акцент ставится инлайном
   на <html> и перебивает акцент темы. Подключается перед responsive.css. */

/* ---------- Сакура: тёплая розовая ---------- */
html[data-theme="sakura"] {
  --bg: #140a0e; --bg-rgb: 20, 10, 14;
  --surface-1: #1c1016; --surface-1-rgb: 28, 16, 22;
  --surface-2: #261620; --surface-3: #311c2a;
  --accent: #FF5D8F; --accent-hi: #FF7DA6; --accent-deep: #D93E70;
  --accent-soft: #FFB3C9; --accent-tint: rgba(255, 93, 143, 0.15); --accent-glow: rgba(255, 93, 143, 0.4);
  --on-accent: #ffffff;
}
/* ---------- Неон: кибер-мята ---------- */
html[data-theme="neon"] {
  --bg: #06100f; --bg-rgb: 6, 16, 15;
  --surface-1: #0c1716; --surface-1-rgb: 12, 23, 22;
  --surface-2: #12201e; --surface-3: #1a2b28;
  --accent: #24E0C7; --accent-hi: #4DEBD6; --accent-deep: #12B39F;
  --accent-soft: #93F1E5; --accent-tint: rgba(36, 224, 199, 0.15); --accent-glow: rgba(36, 224, 199, 0.4);
  --on-accent: #04211d;
}
/* ---------- Космос: глубокий фиолет ---------- */
html[data-theme="cosmos"] {
  --bg: #0a0816; --bg-rgb: 10, 8, 22;
  --surface-1: #120f22; --surface-1-rgb: 18, 15, 34;
  --surface-2: #191530; --surface-3: #221c40;
  --accent: #8B7BFF; --accent-hi: #A99DFF; --accent-deep: #6A58E0;
  --accent-soft: #C6BEFF; --accent-tint: rgba(139, 123, 255, 0.15); --accent-glow: rgba(139, 123, 255, 0.4);
  --on-accent: #ffffff;
}
/* Синий хиро-глоу главной жёстко задан в base.css — на цветных темах убираем,
   чтобы не спорил с акцентом (strands-канвас остаётся, фон берёт var(--bg)). */
html[data-theme] #screen-home { background: transparent; }

/* ---------- шторка выбора темы/акцента ---------- */
.themepick { padding: 4px 18px calc(var(--safe-b) + 20px); }
.themepick__label { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--t4); margin: 14px 2px 10px; }
.themegrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.themecard {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  padding: 10px; border-radius: 14px; text-align: left; cursor: pointer;
  background: var(--surface-1); border: 1.5px solid transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: transform var(--dur-press) var(--ease), border-color 0.2s var(--ease);
}
.themecard:active { transform: scale(0.97); }
.themecard--on { border-color: var(--accent); }
.themecard__prev { width: 100%; height: 56px; border-radius: 10px; margin-bottom: 8px; display: grid; place-items: center; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); }
.themecard__dot { width: 22px; height: 22px; border-radius: 50%; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4); }
.themecard__name { font-size: 14px; font-weight: 700; }
.themecard__desc { font-size: 11px; font-weight: 500; color: var(--t3); }

.accentrow { display: flex; flex-wrap: wrap; gap: 12px; }
.accentdot { width: 34px; height: 34px; border-radius: 50%; background: var(--dot); position: relative; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14); transition: transform var(--dur-press) var(--ease); cursor: pointer; }
.accentdot:active { transform: scale(0.9); }
.accentdot--on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--dot); }

.themepick__note { margin-top: 18px; font-size: 12px; font-weight: 500; color: var(--t4); line-height: 1.5; }

@media (prefers-reduced-motion: reduce) { .themecard, .accentdot { transition: none; } }
