@charset "UTF-8";
/* честныймастер.рф — панель выбора дизайна (js/switcher.js). Общая для всех пяти тем:
   раскладка одна, а цвета, рамка и скругления берутся из палитры выбранной темы.
   Панель — полоса у нижнего края экрана, а не карточка поверх страницы: под ней ничего
   не просвечивает, а в конце страницы для неё оставлено место.
   Шире 1099 px — строка с пятью вариантами; уже — кнопка «Выбрать дизайн · N/5»,
   которая раскрывает список. */

.js .site-footer::after { content: ""; display: block; height: 60px; }

.dswitch {
  --sw-bg: #ffffff; --sw-ink: #0f1b2d; --sw-muted: #56647a;
  --sw-border: 1px solid #cfd9e8; --sw-radius: 16px; --sw-btn-radius: 10px;
  --sw-shadow: 0 -6px 24px rgba(15, 27, 45, .08);
  --sw-btn: #eef2f8; --sw-btn-hover: #dfe7f3; --sw-num: rgba(15, 27, 45, .09);
  --sw-on: #1257e0; --sw-on-ink: #ffffff; --sw-on-num: rgba(255, 255, 255, .22);
  --sw-focus: #1257e0;

  position: fixed; left: 0; right: 0; bottom: 0; z-index: 900;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--sw-bg); color: var(--sw-ink);
  border-top: var(--sw-border); box-shadow: var(--sw-shadow);
  font: 500 13px/1.25 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  letter-spacing: 0; text-transform: none; text-align: left;
}
html[data-style="2"] .dswitch {
  --sw-bg: #fcf6ea; --sw-ink: #2d2118; --sw-muted: #6b5848;
  --sw-border: 2px solid #2d2118; --sw-radius: 24px; --sw-btn-radius: 999px;
  --sw-shadow: none;
  --sw-btn: #f1e4cb; --sw-btn-hover: #e9d6b4; --sw-num: rgba(45, 33, 24, .1);
  --sw-on: #a8431f; --sw-on-ink: #fcf6ea; --sw-on-num: rgba(252, 246, 234, .22);
  --sw-focus: #983d1c;
}
html[data-style="3"] .dswitch {
  --sw-bg: #1a1d21; --sw-ink: #ebe8e2; --sw-muted: #a0a3a7;
  --sw-border: 1px solid #555c66; --sw-radius: 0px; --sw-btn-radius: 0px;
  --sw-shadow: 0 -10px 30px rgba(0, 0, 0, .45);
  --sw-btn: #262a30; --sw-btn-hover: #343940; --sw-num: rgba(235, 232, 226, .12);
  --sw-on: #ffc800; --sw-on-ink: #131518; --sw-on-num: rgba(19, 21, 24, .16);
  --sw-focus: #ffc800;
}
html[data-style="4"] .dswitch {
  --sw-bg: #fbf9f4; --sw-ink: #1b241f; --sw-muted: #666c65;
  --sw-border: 1px solid #1b241f; --sw-radius: 2px; --sw-btn-radius: 1px;
  --sw-shadow: 0 -6px 24px rgba(27, 36, 31, .06);
  --sw-btn: #efebe1; --sw-btn-hover: #e4dfd1; --sw-num: rgba(27, 36, 31, .08);
  --sw-on: #1f3b2f; --sw-on-ink: #f6f3ec; --sw-on-num: rgba(246, 243, 236, .18);
  --sw-focus: #957842;
}
html[data-style="5"] .dswitch {
  --sw-bg: #f1eee6; --sw-ink: #0d0d0d; --sw-muted: #45443f;
  --sw-border: 3px solid #0d0d0d; --sw-radius: 0px; --sw-btn-radius: 0px;
  --sw-shadow: none;
  --sw-btn: #e3dfd3; --sw-btn-hover: #d5d0c2; --sw-num: rgba(13, 13, 13, .1);
  --sw-on: #ff3b1f; --sw-on-ink: #0d0d0d; --sw-on-num: rgba(13, 13, 13, .14);
  --sw-focus: #0d0d0d;
}

.dswitch *, .dswitch *::before, .dswitch *::after { box-sizing: border-box; }
.dswitch__toggle, .dswitch__btn, .dswitch__close {
  margin: 0; padding: 0; border: 0; background: none; color: inherit; cursor: pointer;
  font: inherit; letter-spacing: 0; text-transform: none; -webkit-tap-highlight-color: transparent;
}
.dswitch__toggle:focus-visible, .dswitch__btn:focus-visible, .dswitch__close:focus-visible { outline: 2px solid var(--sw-focus); outline-offset: -3px; }

/* Свёрнутая панель (телефон, планшет) — одна кнопка во всю ширину. */
.dswitch__toggle {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 48px; padding: 0 16px;
  font-size: 15px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.dswitch__chevron { position: relative; flex: none; width: 12px; height: 12px; }
.dswitch__chevron::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 7px; height: 7px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: translate(-50%, -25%) rotate(-135deg);
}
.dswitch__close .dswitch__chevron::before { transform: translate(-50%, -75%) rotate(45deg); }

/* Раскрытая панель: заголовок, пять вариантов (на телефоне ещё кнопка сворачивания). */
.dswitch__panel {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  max-width: 1240px; margin: 0 auto; padding: 8px 16px;
}
.dswitch__head { white-space: nowrap; }
.dswitch__title { font-size: 13px; font-weight: 700; }
.dswitch__sub { margin-top: 2px; font-size: 11.5px; font-weight: 500; color: var(--sw-muted); }
.dswitch__list { display: flex; gap: 4px; }
.dswitch__btn {
  display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 12px 0 8px;
  border-radius: var(--sw-btn-radius); background: var(--sw-btn); white-space: nowrap;
  font-weight: 600; transition: background-color .15s ease, color .15s ease;
}
.dswitch__btn:hover { background: var(--sw-btn-hover); }
.dswitch__btn[aria-pressed="true"] { background: var(--sw-on); color: var(--sw-on-ink); }
.dswitch__num {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 20px; height: 20px; border-radius: 50%; background: var(--sw-num);
  font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums;
}
html[data-style="3"] .dswitch__num, html[data-style="4"] .dswitch__num, html[data-style="5"] .dswitch__num { border-radius: var(--sw-btn-radius); }
.dswitch__btn[aria-pressed="true"] .dswitch__num { background: var(--sw-on-num); }
.dswitch__close {
  display: none; align-items: center; justify-content: center; flex: none;
  width: 44px; height: 44px; border-radius: var(--sw-btn-radius); color: var(--sw-muted);
}
.dswitch__close:hover { background: var(--sw-btn); color: var(--sw-ink); }
.dswitch__status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Телефон и планшет: кнопка внизу, по нажатию — список из пяти вариантов. */
@media (max-width: 1099px) {
  .js .site-footer::after { height: 54px; }
  .dswitch.is-open { border-radius: var(--sw-radius) var(--sw-radius) 0 0; }
  .dswitch__panel {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px 8px;
    max-width: 480px; padding: 12px 12px 14px;
  }
  .dswitch__head { grid-column: 1; grid-row: 1; padding-left: 4px; white-space: normal; }
  .dswitch__title { font-size: 15px; }
  .dswitch__sub { font-size: 12.5px; }
  .dswitch__close { display: inline-flex; grid-column: 2; grid-row: 1; }
  .dswitch__list { grid-column: 1 / -1; grid-row: 2; flex-direction: column; gap: 6px; }
  .dswitch__btn { justify-content: flex-start; gap: 12px; min-height: 44px; padding: 0 14px 0 10px; font-size: 15px; }
  .dswitch__num { width: 26px; height: 26px; font-size: 13px; }
}
/* Открытое мобильное меню занимает экран целиком: панель на это время скрыта. */
@media (max-width: 900px) {
  .site-header.is-open ~ .dswitch { display: none; }
}

@media print {
  .dswitch { display: none; }
  .js .site-footer::after { content: none; }
}
