/* ==========================================================================
   ТРИ ВАРИАНТА ЦВЕТА для сравнения. Меняются только цвета: вёрстка, тексты и фото одинаковые.
   В каждом варианте пара из аватарки (фон + логотип) стоит в шапке и футере.
   Остальное — служебные цвета, подобранные под пару, чтобы текст и кнопки читались.
   Когда вариант выбран: перенести его значения в tokens.css, а themes.css, theme.js,
   palette.js и varyantlar.html удалить.
   ========================================================================== */

/* 1. Песок и шоколад — D4C9BC + 59270E */
[data-theme="1"] {
  --color-header: #D4C9BC;      /* фон аватарки, как подписан */
  --color-logo: #59270E;        /* логотип аватарки */
  --color-footer: #D4C9BC;
  --color-on-footer: #59270E;
  --color-logo-footer: #59270E;
  --color-on-header: #59270E;
  --color-header-muted: #59270E;
  --color-header-line: #C3B6A6;

  --color-primary: #59270E;
  --color-primary-hover: #743A1B;
  --color-accent: #59270E;
  --color-blush: #E8DCCC;       /* фон аватарки, как залит на картинке */
  --color-bg: #FFFFFF;
  --color-ink: #2E1A10;
  --color-muted: #6E4F3C;
  --color-line: #E4DACD;
  --color-deep: #59270E;
  --color-on-dark: #E8DCCC;
  --color-logo-page: #59270E;
  --footer-dim: 1;
  --shade: 46, 22, 9;
  --shade-story: 46, 22, 9;
  --shade-mirror: 46, 22, 9;
  --mirror-frame: linear-gradient(145deg, #fcfaf7 0%, #d8cdbf 32%, #faf7f3 50%, #bfb1a0 74%, #f1ece5 100%);
}

/* 2. Пыльная роза — 816A6B + F2F1EE */
[data-theme="2"] {
  --color-header: #816A6B;
  --color-logo: #F2F1EE;
  --color-footer: #816A6B;
  --color-on-footer: #FFFFFF;   /* F2F1EE даёт 4.4:1, для мелкого текста мало; белый 5:1 */
  --color-logo-footer: #F2F1EE;
  --color-on-header: #FFFFFF;
  --color-header-muted: #FFFFFF;
  --color-header-line: #816A6B;
  --color-count: #F2F1EE;
  --color-on-count: #4F3E40;

  --color-primary: #816A6B;
  --color-primary-hover: #6A5455;
  --color-accent: #6A5455;      /* 816A6B чуть темнее, чтобы читался как текст */
  --color-blush: #E4DFDC;
  --color-bg: #F2F1EE;
  --color-ink: #33282A;
  --color-muted: #645153;
  --color-line: #D8D2CF;
  --color-deep: #4F3E40;
  --color-on-dark: #F2F1EE;
  --color-bar: #4F3E40;
  --color-block: #4F3E40;
  --color-logo-page: #816A6B;
  --footer-dim: 1;
  --shade: 38, 29, 30;
  --shade-story: 38, 29, 30;
  --shade-mirror: 38, 29, 30;
  --mirror-frame: linear-gradient(145deg, #fbfafa 0%, #d3cbca 32%, #f8f6f5 50%, #b5a9a9 74%, #eeebea 100%);
}

/* 3. Серебро — B5B9BF + FFFFFF */
[data-theme="3"] {
  --color-header: #B5B9BF;
  --color-logo: #FFFFFF;
  --color-footer: #B5B9BF;
  --color-on-footer: #1E2125;   /* белый на серебре 1.97:1, текст пришлось сделать графитовым */
  --color-logo-footer: #FFFFFF;
  --color-on-header: #1E2125;
  --color-header-muted: #1E2125;
  --color-header-line: #B5B9BF;
  --color-count: #1E2125;

  --color-primary: #2B2F36;
  --color-primary-hover: #454B54;
  --color-accent: #2B2F36;
  --color-blush: #E6E8EB;
  --color-bg: #FFFFFF;
  --color-ink: #1E2125;
  --color-muted: #5C626A;
  --color-line: #DADDE1;
  --color-deep: #2B2F36;
  --color-on-dark: #FFFFFF;
  --color-logo-page: #1E2125;
  --footer-dim: 1;
  --shade: 24, 27, 32;
  --shade-story: 24, 27, 32;
  --shade-mirror: 24, 27, 32;
  --mirror-frame: linear-gradient(145deg, #ffffff 0%, #c9cdd2 32%, #fafbfb 50%, #a9aeb5 74%, #eef0f2 100%);
}

/* ---------- Плавающая карточка с цветами (только прототип) ----------
   Карточка намеренно нейтральная и не берёт цвета сайта, чтобы не мешать их оценивать. */
.placeholder-note { right: auto; left: 12px; }
.cp { position: fixed; right: 20px; top: 50%; z-index: 50; transform: translateY(-50%); color: #16181B; font: 14px/1.35 var(--font-body); --cp-line: #DDE1E5; }
.cp :focus-visible { outline: 2px solid #16181B; outline-offset: 2px; }
.cp__fab { display: grid; place-items: center; width: 52px; height: 52px; padding: 6px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 6px 22px rgba(0,0,0,.22); }
.cp__fab span { width: 100%; height: 100%; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.14); }
.cp__card { display: none; grid-template-columns: minmax(0, 1fr); width: 292px; max-height: calc(100vh - 24px); overflow-y: auto; padding: 14px; border-radius: 18px; background: #fff; box-shadow: 0 14px 44px rgba(0,0,0,.24); }
.cp.is-open .cp__fab { display: none; }
.cp.is-open .cp__card { display: grid; gap: 10px; }
.cp button { font: inherit; color: inherit; }
.cp__head { display: flex; justify-content: space-between; align-items: center; }
.cp__head strong { font-size: 16px; font-weight: 600; }
.cp__close { display: grid; place-items: center; width: 34px; height: 34px; margin: -4px -6px -4px 0; border: 0; border-radius: 50%; background: none; }
.cp__close:hover { background: #F0F2F4; }
.cp__row { display: flex; align-items: center; gap: 8px; padding: 5px; border: 2px solid var(--cp-line); border-radius: 12px; }
.cp__row.is-active { border-color: #16181B; }
.cp__pick { flex: 1; display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 0 4px; border: 0; background: none; text-align: left; font-weight: 600 !important; }
.cp__chip { width: 30px; height: 30px; border-radius: 8px; flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.16); }
.cp__hex { width: 92px; height: 34px; padding: 0 8px; border: 0; border-radius: 8px; background: #F0F2F4; color: inherit; font: inherit; font-variant-numeric: tabular-nums; text-transform: uppercase; }
.cp__hex[aria-invalid="true"] { box-shadow: inset 0 0 0 2px #C62828; }
.cp__sv { position: relative; height: 132px; border-radius: 12px; cursor: crosshair; touch-action: none; background: linear-gradient(0deg, #000, transparent), linear-gradient(90deg, #fff, hsl(var(--h) 100% 50%)); }
.cp__sv i { position: absolute; left: var(--x); top: var(--y); width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; background: var(--c); border: 3px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.45); pointer-events: none; }
.cp__hue { -webkit-appearance: none; appearance: none; width: 100%; height: 16px; margin: 2px 0; border-radius: 999px; background: linear-gradient(90deg, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00); cursor: pointer; }
.cp__hue::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 3px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.45), 0 1px 4px rgba(0,0,0,.3); }
.cp__hue::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.45); }
.cp__note { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.cp__note::before { content: ""; width: 9px; height: 9px; border-radius: 50%; flex: none; background: #2E7D32; }
.cp__note[data-level="mid"]::before { background: #E09600; }
.cp__note[data-level="bad"]::before { background: #C62828; }
.cp__tools, .cp__foot { display: flex; gap: 8px; }
.cp__tools button, .cp__foot button { flex: 1 1 auto; min-height: 38px; padding: 0 10px; border: 1px solid var(--cp-line); border-radius: 10px; background: #fff; font-size: 13.5px; white-space: nowrap; }
.cp__tools button:hover, .cp__foot button:hover { background: #F0F2F4; }
.cp .cp__copy { background: #16181B; border-color: #16181B; color: #fff; font-weight: 600; }
.cp .cp__copy:hover { background: #33373C; }
.cp__presets { display: flex; align-items: center; gap: 4px; }
.cp__presets button { width: 38px; height: 38px; padding: 4px; border: 2px solid transparent; border-radius: 50%; background: none; }
.cp__presets button[aria-pressed="true"] { border-color: #16181B; }
.cp__presets span { display: block; width: 100%; height: 100%; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.16); }
.cp__presets a { margin-left: auto; color: inherit; font-size: 13.5px; text-underline-offset: 3px; }
@media (max-width: 600px) {
  .cp { right: 12px; }
  .cp.is-open { top: auto; right: 8px; left: 8px; bottom: 8px; transform: none; }
  .cp__card { width: auto; max-width: 420px; margin-left: auto; max-height: 72vh; }
  .cp__sv { height: 104px; }
}
