:root {
  /* Переопределяются через JS значениями темы из API (backend/database.py get_theme).
     Значения ниже — просто безопасный дефолт на случай, пока тема не загрузилась. */
  --bg: #fafafa;
  --surface: #ffffff;
  --text: #1a1a1a;
  --hint: #767676;
  --primary: #e1251b;
  --primary-text: #ffffff;
  --danger: #d92d20;
  --success: #12805c;
  --radius: 16px;
  --radius-sm: calc(var(--radius) * 0.6);
  --radius-lg: calc(var(--radius) * 1.3);

  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.04), 0 6px 16px rgba(0, 0, 0, 0.06);
  --shadow-btn: 0 10px 20px -8px color-mix(in srgb, var(--primary) 60%, transparent);

  /* Заливка кнопок: по умолчанию цвет, JS подставляет градиент, если задан второй цвет. */
  --primary-fill: var(--primary);
  --card-border: 1px solid rgba(0, 0, 0, 0.04);
  --font-main: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Стиль карточек (data-cards на <html>, ставится из темы) */
:root[data-cards="flat"] {
  --shadow-card: none;
  --card-border: 1px solid transparent;
}

:root[data-cards="outline"] {
  --shadow-card: none;
  --card-border: 1px solid color-mix(in srgb, var(--text) 18%, transparent);
}

/* Шрифт (data-font на <html>) */
:root[data-font="serif"] { --font-main: Georgia, "Times New Roman", "Noto Serif", serif; }
:root[data-font="rounded"] { --font-main: ui-rounded, "SF Pro Rounded", "Nunito", "Trebuchet MS", "Segoe UI", sans-serif; }

button, input, textarea, select {
  font-family: inherit;
}

/* Фон-градиент или картинка живут на отдельном фиксированном слое — так не «прыгает» на iOS */
#page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  font-family: var(--font-main);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* ===== Шапка бренда ===== */
#brand-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

#brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--primary-fill);
  color: var(--primary-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  flex-shrink: 0;
}

.brand-logo {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  object-fit: cover;
  flex-shrink: 0;
}

#brand-name {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#app {
  padding: 20px 16px;
  padding-bottom: 110px;
  max-width: 560px;
  margin: 0 auto;
}

h1 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 4px 0 2px;
}

.screen-subtitle {
  color: var(--hint);
  font-size: 14px;
  margin: 0 0 18px;
}

.screen.hidden {
  display: none;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.list.horizontal {
  flex-direction: row;
  overflow-x: auto;
  gap: 10px;
  padding: 2px 2px 10px;
  scrollbar-width: none;
}

.list.horizontal::-webkit-scrollbar {
  display: none;
}

.list.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

/* ===== Карточки позиций (меню) ===== */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: var(--card-border);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.card:active {
  transform: scale(0.98);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.card-thumb {
  width: 68px;
  height: 68px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: color-mix(in srgb, var(--hint) 15%, transparent);
}

.card-body {
  flex: 1;
  min-width: 0;
}

.card .desc {
  color: var(--hint);
  font-size: 13px;
  line-height: 1.35;
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card .title {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.card .meta {
  color: var(--hint);
  font-size: 13px;
  margin-top: 4px;
}

.chev {
  display: flex;
  color: var(--hint);
}

.chev .icon {
  width: 20px;
  height: 20px;
}

.card .price-tag {
  flex-shrink: 0;
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  color: var(--primary);
  font-weight: 800;
  font-size: 14px;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

/* ===== Даты ===== */
.pill {
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  min-width: 68px;
  font-size: 15px;
  font-weight: 700;
  box-shadow: var(--shadow-card);
  border: var(--card-border);
  transition: transform 0.12s ease;
}

.pill:active {
  transform: scale(0.96);
}

.pill.selected,
.card.selected {
  background: var(--primary-fill);
  color: var(--primary-text);
  box-shadow: var(--shadow-btn);
  border-color: transparent;
}

.pill.selected .weekday {
  color: inherit;
}

.pill .weekday {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--hint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

/* ===== Слоты времени ===== */
.slot {
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 13px 0;
  text-align: center;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  box-shadow: var(--shadow-card);
  border: var(--card-border);
  transition: transform 0.12s ease;
}

.slot:active {
  transform: scale(0.96);
}

.slot.selected {
  background: var(--primary-fill);
  color: var(--primary-text);
  box-shadow: var(--shadow-btn);
  border-color: transparent;
}

/* ===== Карточка сводки/заказа ===== */
.summary-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
  border: var(--card-border);
}

.summary-card .row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 15px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.summary-card .row:last-child {
  border-bottom: none;
  font-weight: 800;
  font-size: 16px;
}

.summary-card .row .label {
  color: var(--hint);
  font-weight: 500;
}

.hint {
  color: var(--hint);
  font-size: 13px;
  margin-top: 12px;
}

.hidden {
  display: none !important;
}

.icon {
  width: 1.2em;
  height: 1.2em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -0.22em;
  flex-shrink: 0;
}

/* Кнопки и подписи с иконкой слева */
.back-btn,
.add-btn,
.order-meta,
.order-comment {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.add-btn {
  display: flex;
  justify-content: center;
}

.order-meta,
.order-comment {
  display: flex;
}

.order-meta .icon,
.order-comment .icon {
  width: 14px;
  height: 14px;
  color: var(--hint);
}

.success-badge {
  width: 68px;
  height: 68px;
  margin: 8px auto 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-fill);
  color: var(--primary-text);
  box-shadow: var(--shadow-btn);
}

.success-badge .icon {
  width: 34px;
  height: 34px;
  stroke-width: 2.4;
}

.tile {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  color: var(--primary);
}

.tile .icon {
  width: 22px;
  height: 22px;
}

.edit-mark {
  color: var(--hint);
  display: flex;
}

/* Уведомления и подтверждение — вместо системных окон браузера */
.toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%);
  max-width: min(90vw, 420px);
  padding: 12px 18px;
  border-radius: 14px;
  background: rgba(24, 24, 27, 0.94);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  z-index: 200;
  animation: toast-in 0.18s ease-out;
}

@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 210;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-card {
  width: 100%;
  max-width: 340px;
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius-lg);
  padding: 22px 20px 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}

.modal-card p {
  margin: 0 0 18px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  white-space: pre-line;
}

.modal-actions {
  display: flex;
  gap: 10px;
}

.modal-btn {
  flex: 1;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: var(--card-border);
  background: color-mix(in srgb, var(--hint) 12%, transparent);
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.modal-btn.danger {
  background: var(--danger);
  border-color: transparent;
  color: #fff;
}

#screen-done h1 {
  text-align: center;
}

#screen-done .hint {
  text-align: center;
}

/* ===== Переключатель клиент/админ ===== */
.mode-switch {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  background: var(--surface);
  padding: 4px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
}

.mode-tab {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: calc(var(--radius-sm) - 4px);
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.mode-tab.active {
  background: var(--primary-fill);
  color: var(--primary-text);
}

/* ===== Кнопка назад ===== */
.back-btn {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 15px;
  font-weight: 700;
  padding: 0 0 14px;
  cursor: pointer;
}

/* ===== Поля форм ===== */
.field-block {
  margin-bottom: 18px;
}

.field-block label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--hint);
  margin-bottom: 6px;
}

.field-block input[type="text"],
.field-block input[type="tel"],
.field-block input[type="number"],
.field-block textarea,
.field-block select {
  width: 100%;
  padding: 13px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
}

.field-block select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23767676'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 10.94l3.71-3.71a.75.75 0 111.06 1.06l-4.24 4.25a.75.75 0 01-1.06 0L5.21 8.29a.75.75 0 01.02-1.08z' clip-rule='evenodd'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
  padding-right: 40px;
}

.field-block input:focus,
.field-block textarea:focus,
.field-block select:focus {
  outline: 2px solid color-mix(in srgb, var(--primary) 40%, transparent);
  outline-offset: 1px;
}

.field-block input::placeholder,
.field-block textarea::placeholder {
  color: var(--hint);
  opacity: 1;
}

.field-block textarea {
  min-height: 72px;
  resize: vertical;
}

/* ===== Количество ===== */
.qty-control {
  display: flex;
  align-items: center;
  gap: 18px;
}

.qty-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: var(--surface);
  box-shadow: var(--shadow-card);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}

#qty-value {
  font-size: 17px;
  font-weight: 800;
  min-width: 20px;
  text-align: center;
}

/* ===== Кнопки действий ===== */
.primary-btn {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--primary-fill);
  color: var(--primary-text);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
  cursor: pointer;
  margin-top: 8px;
  box-shadow: var(--shadow-btn);
  transition: transform 0.12s ease;
}

.primary-btn:active {
  transform: scale(0.98);
}

.danger-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--danger) 10%, transparent);
  color: var(--danger);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 10px;
}

.add-btn {
  width: 100%;
  padding: 13px;
  border: 1.5px dashed color-mix(in srgb, var(--hint) 60%, transparent);
  border-radius: var(--radius-sm);
  background: none;
  color: var(--primary);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 14px;
  margin-top: 8px;
}

/* ===== Плавающая кнопка-подтверждение (фолбэк вне Telegram) ===== */
.mainbutton-fallback {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  max-width: 528px;
  margin: 0 auto;
  padding: 16px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--primary-fill);
  color: var(--primary-text);
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 28px -6px color-mix(in srgb, var(--primary) 55%, transparent);
  z-index: 100;
}

/* ===== Тип позиции (переключатель) ===== */
.type-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.type-btn {
  flex: 1;
  padding: 11px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.type-btn.active {
  background: var(--primary-fill);
  color: var(--primary-text);
  border-color: transparent;
}

/* ===== Админ-табы ===== */
.admin-tabs {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  gap: 6px;
  margin-bottom: 18px;
  background: var(--surface);
  padding: 4px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
}

.admin-tab {
  flex: 1 0 auto;
  white-space: nowrap;
  padding: 10px 12px;
  border: none;
  border-radius: calc(var(--radius-sm) - 4px);
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.admin-tab.active {
  background: var(--primary-fill);
  color: var(--primary-text);
}

/* ===== Фильтр статусов заявок ===== */
.filter-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin-bottom: 14px;
  scrollbar-width: none;
}

.filter-row::-webkit-scrollbar {
  display: none;
}

.filter-pill {
  padding: 9px 15px;
  border-radius: 20px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.filter-pill.active {
  background: var(--primary-fill);
  color: var(--primary-text);
  border-color: transparent;
}

/* ===== Карточка заявки в админке ===== */
.order-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 15px;
  box-shadow: var(--shadow-card);
  border: var(--card-border);
}

.order-card .order-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
  gap: 10px;
}

.order-card .order-title {
  font-weight: 700;
  font-size: 15px;
}

.order-card .order-meta {
  color: var(--hint);
  font-size: 13px;
  margin-top: 2px;
}

.order-card .order-comment {
  margin-top: 8px;
  padding: 9px 11px;
  background: color-mix(in srgb, var(--hint) 12%, transparent);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-style: italic;
}

.status-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

.status-new { background: #ffe8a3; color: #6b4e00; }
.status-confirmed { background: color-mix(in srgb, var(--primary) 18%, transparent); color: var(--primary); }
.status-done { background: color-mix(in srgb, var(--success) 18%, transparent); color: var(--success); }
.status-cancelled { background: color-mix(in srgb, var(--hint) 18%, transparent); color: var(--hint); }

.order-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.order-actions button {
  flex: 1;
  padding: 9px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.btn-confirm { background: var(--primary-fill); color: var(--primary-text); }
.btn-done { background: var(--success); color: #fff; }
.btn-cancel { background: var(--danger); color: #fff; }

/* ===== Карточка позиции в админ-списке ===== */
.service-admin-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 15px;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  border: var(--card-border);
}

.service-admin-card .title {
  font-weight: 700;
  font-size: 15px;
}

.service-admin-card .badge-type {
  font-size: 11px;
  color: var(--hint);
  margin-top: 3px;
  font-weight: 600;
}

.service-admin-card.inactive {
  opacity: 0.5;
}

/* ===== Описание и фото позиции, телефон и согласие ===== */
.details-photo {
  display: block;
  width: 100%;
  max-height: 230px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-bottom: 12px;
}

.service-desc {
  color: var(--hint);
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 14px;
  white-space: pre-line;
}

.field-block .consent-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 12px 0 0;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  cursor: pointer;
}

.consent-row input[type="checkbox"],
.check-inline input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--primary);
}

.consent-row a {
  color: var(--primary);
}

.field-block .check-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  margin-bottom: 10px;
}

.photo-picker .photo-preview {
  display: block;
  width: 100%;
  max-height: 190px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
}

.photo-picker .photo-preview.logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  background: color-mix(in srgb, var(--hint) 12%, transparent);
}

.photo-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.photo-actions .add-btn {
  flex: 1;
}

.link-btn {
  background: none;
  border: none;
  color: var(--danger);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  padding: 8px 0;
  white-space: nowrap;
}

.admin-thumb {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  margin-right: 12px;
  flex-shrink: 0;
}

.saved-themes {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.saved-theme-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  border: var(--card-border);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}

.saved-theme-row .dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex-shrink: 0;
}

.saved-theme-row .name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.saved-theme-row .link-btn {
  padding: 2px 4px;
  font-size: 16px;
}

.save-theme-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ===== Мастер первого запуска ===== */
.empty-state {
  text-align: center;
  padding: 26px 12px;
  font-size: 15px;
}

.wizard-preview {
  margin-top: 16px;
}

.wizard-preview .summary-card .row {
  gap: 12px;
}

.wizard-preview .summary-card .row span:last-child {
  white-space: nowrap;
  font-weight: 700;
}

h1.center,
p.center {
  text-align: center;
}

.link-btn.neutral {
  display: block;
  margin: 8px auto 0;
  color: var(--hint);
}

#wizard-niches .card.selected .meta {
  color: inherit;
  opacity: 0.85;
}

/* ===== Мои записи ===== */
.my-bookings-link {
  margin-bottom: 14px;
}

.section-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--hint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 6px 2px 8px;
}

.order-card.past {
  opacity: 0.75;
}

/* ===== Мастера: переключатель и список услуг ===== */
.toggle-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 14px 15px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-card);
  border: var(--card-border);
  cursor: pointer;
}

.toggle-row input[type="checkbox"],
.check-list input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  flex-shrink: 0;
  accent-color: var(--primary);
}

.toggle-row b {
  display: block;
  font-size: 15px;
}

.toggle-row small {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--hint);
}

.check-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}

.check-list label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 12px 14px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}

/* ===== Экран «Оформление» ===== */
.theme-intro {
  margin-top: -4px;
}

.preset-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 20px;
  scrollbar-width: none;
}

.preset-row::-webkit-scrollbar {
  display: none;
}

.preset-swatch {
  flex-shrink: 0;
  width: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  font: inherit;
}

.preset-swatch .dot {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.06);
  box-shadow: var(--shadow-card);
}

.preset-swatch span:last-child {
  font-size: 11px;
  font-weight: 600;
  color: var(--hint);
  text-align: center;
}

.theme-preview {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-card);
  border: var(--card-border);
  margin-bottom: 22px;
}

.theme-preview-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
}

.theme-preview-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
}

.theme-preview-meta {
  font-size: 13px;
  color: var(--hint);
  margin-top: 3px;
}

.theme-preview-btn {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--primary-fill);
  color: var(--primary-text);
  font-size: 15px;
  font-weight: 800;
  cursor: default;
}

.theme-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 14px;
  margin-bottom: 6px;
}

.color-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  box-shadow: var(--shadow-card);
  border: var(--card-border);
}

.color-field span:first-child {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.25;
}

.color-input-wrap {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(0, 0, 0, 0.08);
}

.color-input-wrap input[type="color"] {
  width: 46px;
  height: 46px;
  margin: -6px;
  border: none;
  padding: 0;
  cursor: pointer;
  background: none;
}

.radius-slider {
  width: 100%;
  accent-color: var(--primary);
}

@media (max-width: 380px) {
  .theme-field-grid {
    grid-template-columns: 1fr;
  }
}
