/* ═══════════════════════════════════════════════════════
   REPAIR-CALC.CSS v3.5
   Калькулятор ремонта — понятный, для всех
   Тёмная тема, фиолетовые акценты
   ═══════════════════════════════════════════════════════ */

/* ── ГЛОБАЛЬНАЯ ЗАЩИТА ОТ ГОРИЗОНТАЛЬНОГО СКРОЛЛА ──────── */
/* Все дочерние элементы calc не могут растянуть страницу   */
[class^="rc-"], [class^="sm-"] {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
}

/* ── Сброс для всех кнопок-карточек (iOS tap fix) ──────── */
.rc-type-btn,.rc-room-btn,.rc-mat-btn,.rc-opt-btn,
.rc-urg-btn,.rc-visit-btn,.rc-hint-btn,.rc-btn-order,
.rc-btn-wa,.rc-dim-btn,.rc-btn-add,.rc-room-remove {
  font-family: inherit;
  border: none;
  outline: none;
  background: none;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  box-sizing: border-box;
}

/* ── Загрузка ──────────────────────────────────────────── */
.rc-loading {
  text-align: center;
  padding: 4rem 1rem;
  color: rgba(255,255,255,0.5);
}
.rc-loading-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  animation: rc-pulse 1.2s ease-in-out infinite;
}
@keyframes rc-pulse {
  0%,100% { opacity:0.5; transform: scale(1); }
  50%      { opacity:1;   transform: scale(1.1); }
}

/* ── Основная сетка ────────────────────────────────────── */
.rc-calculator {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 1050px) { .rc-calculator { grid-template-columns: 1fr; } }

/* ── Вводный баннер ────────────────────────────────────── */
.rc-intro-banner {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: linear-gradient(135deg, hsla(var(--accent-h),70%,50%,0.18), hsla(var(--accent-h),70%,33%,0.12));
  border: 1px solid hsla(var(--accent-h),70%,50%,0.35);
  border-radius: 14px;
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.2rem;
}
.rc-intro-icon { font-size: 2rem; flex-shrink: 0; margin-top: 2px; }
.rc-intro-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #e8d8ff;
  margin-bottom: 0.3rem;
}
.rc-intro-sub {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.5;
}

/* ── Секция (1 шаг) ────────────────────────────────────── */
.rc-section {
  background: rgba(255,255,255,0.04);
  border: 1px solid hsla(var(--accent-h),70%,50%,0.22);
  border-radius: 16px;
  padding: 1.3rem 1.4rem;
  margin-bottom: 1rem;
}
.rc-section:hover { border-color: hsla(var(--accent-h),70%,50%,0.4); }

.rc-section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
}

/* Бейдж «Шаг N» */
.rc-step-badge {
  flex-shrink: 0;
  padding: 0.2rem 0.65rem;
  background: var(--grad-btn);
  color: #fff;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.rc-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: #f0e8ff;
  margin: 0;
}

.rc-section-explain {
  font-size: 0.83rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.5;
  margin: 0.3rem 0 0.9rem 0;
}

/* ── Кнопка-подсказка ──────────────────────────────────── */
.rc-hint-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.42rem 0.9rem;
  background: rgba(250,204,21,0.12);
  border: 1px solid rgba(250,204,21,0.35);
  border-radius: 20px;
  color: #fde68a;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
  transition: background 0.2s, border-color 0.2s;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.rc-hint-btn:hover {
  background: rgba(250,204,21,0.22);
  border-color: rgba(250,204,21,0.6);
  color: #fef08a;
}

/* ── Шаг 1: Виды ремонта ────────────────────────────────── */
.rc-types-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.65rem;
}
.rc-type-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.25rem;
  padding: 1rem 0.6rem;
  background: hsla(var(--accent-h),70%,50%,0.08);
  border: 2px solid hsla(var(--accent-h),70%,50%,0.22);
  border-radius: 14px;
  transition: all 0.2s;
}
.rc-type-btn:hover { border-color: hsla(var(--accent-h),70%,50%,0.5); background: hsla(var(--accent-h),70%,50%,0.15); }
.rc-type-btn.rc-active {
  background: linear-gradient(135deg, hsla(var(--accent-h),70%,50%,0.4), hsla(var(--accent-h),70%,33%,0.35));
  border-color: var(--acc);
  box-shadow: 0 0 0 3px hsla(var(--accent-h),70%,50%,0.25);
}
.rc-type-icon  { font-size: 1.7rem; }
.rc-type-name  { font-size: 0.85rem; font-weight: 700; color: #e8d8ff; }
.rc-type-price { font-size: 0.75rem; font-weight: 600; color: #a78bfa; }
.rc-type-days  { font-size: 0.72rem; color: rgba(255,255,255,0.45); }
.rc-type-desc  { font-size: 0.7rem; color: rgba(255,255,255,0.4); margin-top: 0.1rem; }

/* ── Шаг 2: Площадь ─────────────────────────────────────── */
.rc-area-block { margin-top: 0.5rem; }
.rc-area-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.rc-dim-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: hsla(var(--accent-h),70%,50%,0.2);
  border: 2px solid hsla(var(--accent-h),70%,50%,0.4);
  color: #c084fc;
  font-size: 1rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
  touch-action: manipulation;
  cursor: pointer;
}
.rc-dim-btn:hover { background: hsla(var(--accent-h),70%,50%,0.35); border-color: var(--acc); }
.rc-area-display {
  display: flex; align-items: center; gap: 0.4rem;
  background: rgba(255,255,255,0.06);
  border: 2px solid hsla(var(--accent-h),70%,50%,0.35);
  border-radius: 12px;
  padding: 0.5rem 1rem;
}
.rc-area-input {
  width: 70px;
  background: transparent;
  border: none;
  color: #f0f0f0;
  font-size: 1.6rem;
  font-weight: 700;
  text-align: center;
  outline: none;
  font-family: inherit;
  -moz-appearance: textfield;
}
.rc-area-input::-webkit-inner-spin-button,
.rc-area-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.rc-area-unit { font-size: 1rem; color: rgba(255,255,255,0.5); font-weight: 600; }

.rc-area-range {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  height: 6px;
  border-radius: 3px;
  background: hsla(var(--accent-h),70%,50%,0.2);
  outline: none;
  margin-bottom: 0.75rem;
  touch-action: none;
  cursor: pointer;
}
.rc-area-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--acc), var(--acc2));
  cursor: pointer;
  box-shadow: 0 2px 8px hsla(var(--accent-h),70%,50%,0.5);
}
.rc-area-range::-moz-range-thumb {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--acc), var(--acc2));
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 8px hsla(var(--accent-h),70%,50%,0.5);
}

.rc-area-labels {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.3rem;
  text-align: center;
}
.rc-area-labels span {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.4);
  line-height: 1.4;
}

/* ── Шаг 3: Тип объекта ─────────────────────────────────── */
.rc-rooms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.55rem;
}
.rc-room-btn {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 0.2rem;
  padding: 0.85rem 0.5rem;
  background: hsla(var(--accent-h),70%,50%,0.07);
  border: 2px solid hsla(var(--accent-h),70%,50%,0.2);
  border-radius: 12px;
  transition: all 0.2s;
}
.rc-room-btn:hover { border-color: hsla(var(--accent-h),70%,50%,0.45); background: hsla(var(--accent-h),70%,50%,0.14); }
.rc-room-btn.rc-active {
  background: linear-gradient(135deg, hsla(var(--accent-h),70%,50%,0.38), hsla(var(--accent-h),70%,33%,0.3));
  border-color: var(--acc);
  box-shadow: 0 0 0 3px hsla(var(--accent-h),70%,50%,0.22);
}
.rc-room-icon { font-size: 1.6rem; }
.rc-room-name { font-size: 0.82rem; font-weight: 700; color: #e8d8ff; }
.rc-room-desc { font-size: 0.68rem; color: rgba(255,255,255,0.38); }

/* ── Шаг 4: Материалы ───────────────────────────────────── */
.rc-mats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.55rem;
}
.rc-mat-btn {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 0.2rem;
  padding: 0.9rem 0.6rem;
  background: hsla(var(--accent-h),70%,50%,0.07);
  border: 2px solid hsla(var(--accent-h),70%,50%,0.2);
  border-radius: 12px;
  transition: all 0.2s;
}
.rc-mat-btn:hover { border-color: hsla(var(--accent-h),70%,50%,0.45); background: hsla(var(--accent-h),70%,50%,0.14); }
.rc-mat-btn.rc-active {
  background: linear-gradient(135deg, hsla(var(--accent-h),70%,50%,0.38), hsla(var(--accent-h),70%,33%,0.3));
  border-color: var(--acc);
  box-shadow: 0 0 0 3px hsla(var(--accent-h),70%,50%,0.22);
}
.rc-mat-icon  { font-size: 1.5rem; }
.rc-mat-name  { font-size: 0.85rem; font-weight: 700; color: #e8d8ff; }
.rc-mat-desc  { font-size: 0.7rem; color: rgba(255,255,255,0.45); line-height: 1.3; }

/* ── Бейджи коэффициентов (общие) ──────────────────────── */
.rc-coef-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
  margin-top: 0.15rem;
}
.rc-coef-base { background: rgba(74,222,128,0.15); color: #4ade80; }
.rc-coef-up   { background: rgba(251,146,60,0.15); color: #fb923c; }
.rc-free      { color: #4ade80; font-weight: 700; }

/* ── Шаг 5: Опции ───────────────────────────────────────── */
.rc-opts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 0.65rem;
}
.rc-opt-btn {
  display: flex; flex-direction: column;
  gap: 0.3rem;
  padding: 0.85rem 0.9rem;
  background: rgba(76,175,80,0.06);
  border: 2px solid rgba(76,175,80,0.18);
  border-radius: 12px;
  text-align: left;
  transition: all 0.2s;
  min-width: 0;
  overflow: hidden;
  word-break: break-word;
  overflow-wrap: break-word;
}
.rc-opt-btn:hover { border-color: rgba(76,175,80,0.4); background: rgba(76,175,80,0.12); }
.rc-opt-btn.rc-opt-active {
  background: rgba(76,175,80,0.18);
  border-color: #4caf50;
  box-shadow: 0 0 0 3px rgba(76,175,80,0.2);
}
.rc-opt-top   { display: flex; align-items: center; gap: 0.4rem; }
.rc-opt-check { font-size: 1rem; flex-shrink: 0; }
.rc-opt-icon  { font-size: 1.1rem; flex-shrink: 0; }
.rc-opt-name  { font-size: 0.82rem; font-weight: 700; color: #a7f3d0; flex: 1; min-width: 0; word-break: break-word; overflow-wrap: break-word; }
.rc-opt-price { font-size: 0.78rem; font-weight: 600; color: #4ade80; }
.rc-opt-desc  { font-size: 0.7rem; color: rgba(255,255,255,0.45); margin: 0; line-height: 1.3; }

/* ── Шаг 6: Срочность ───────────────────────────────────── */
.rc-urg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.6rem;
}
.rc-urg-btn {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 0.3rem;
  padding: 0.9rem 0.6rem;
  background: hsla(var(--accent-h),70%,50%,0.07);
  border: 2px solid hsla(var(--accent-h),70%,50%,0.2);
  border-radius: 12px;
  transition: all 0.2s;
}
.rc-urg-btn:hover { border-color: hsla(var(--accent-h),70%,50%,0.45); background: hsla(var(--accent-h),70%,50%,0.14); }
.rc-urg-btn.rc-active {
  background: linear-gradient(135deg, hsla(var(--accent-h),70%,50%,0.38), hsla(var(--accent-h),70%,33%,0.3));
  border-color: var(--acc);
  box-shadow: 0 0 0 3px hsla(var(--accent-h),70%,50%,0.22);
}
.rc-urg-name  { font-size: 0.88rem; font-weight: 700; color: #e8d8ff; }
.rc-urg-badge { font-size: 0.7rem; font-weight: 700; padding: 0.15rem 0.5rem; border-radius: 20px; }
.rc-urg-desc  { font-size: 0.72rem; color: rgba(255,255,255,0.45); line-height: 1.3; }

/* ── Шаг 7: Выезд мастера ───────────────────────────────── */
.rc-visit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.6rem;
}
.rc-visit-btn {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 0.3rem;
  padding: 0.9rem 0.6rem;
  background: hsla(var(--accent-h),70%,50%,0.07);
  border: 2px solid hsla(var(--accent-h),70%,50%,0.2);
  border-radius: 12px;
  transition: all 0.2s;
}
.rc-visit-btn:hover { border-color: hsla(var(--accent-h),70%,50%,0.45); background: hsla(var(--accent-h),70%,50%,0.14); }
.rc-visit-btn.rc-active {
  background: linear-gradient(135deg, hsla(var(--accent-h),70%,50%,0.38), hsla(var(--accent-h),70%,33%,0.3));
  border-color: var(--acc);
  box-shadow: 0 0 0 3px hsla(var(--accent-h),70%,50%,0.22);
}
.rc-visit-name  { font-size: 0.85rem; font-weight: 700; color: #e8d8ff; }
.rc-visit-price { font-size: 0.8rem; font-weight: 700; }
.rc-visit-desc  { font-size: 0.7rem; color: rgba(255,255,255,0.4); line-height: 1.3; }

/* ══════════════════════════════════════════════════════════
   ПРАВАЯ ПАНЕЛЬ — СМЕТА
   ══════════════════════════════════════════════════════════ */

.rc-right { display: flex; flex-direction: column; gap: 1rem; }

/* Пустое состояние */
.rc-result-empty {
  text-align: center;
  padding: 3rem 1rem;
  background: rgba(255,255,255,0.03);
  border: 1px dashed hsla(var(--accent-h),70%,50%,0.3);
  border-radius: 16px;
}
.rc-result-empty-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.rc-result-empty-text { color: rgba(255,255,255,0.45); font-size: 0.9rem; line-height: 1.6; }

/* Карточка сметы */
.rc-result-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid hsla(var(--accent-h),70%,50%,0.3);
  border-radius: 16px;
  overflow: hidden;
  position: sticky;
  top: 80px;
}
@media (max-width: 1050px) { .rc-result-card { position: static; } }

.rc-result-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, hsla(var(--accent-h),70%,50%,0.25), hsla(var(--accent-h),70%,33%,0.2));
  border-bottom: 1px solid hsla(var(--accent-h),70%,50%,0.25);
}
.rc-result-icon  { font-size: 1.3rem; }
.rc-result-title { font-size: 1rem; font-weight: 700; color: #e8d8ff; }

/* Блок формулы */
.rc-formula-block {
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.rc-formula-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(192,132,252,0.7);
  margin-bottom: 0.6rem;
}
.rc-formula-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.3rem 0;
  font-size: 0.83rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.rc-formula-row:last-child { border-bottom: none; }
.rc-f-label { color: rgba(255,255,255,0.6); }
.rc-f-val   { font-weight: 600; color: #c084fc; }

.rc-formula-coef .rc-f-label { color: rgba(251,146,60,0.8); }
.rc-formula-coef .rc-f-val   { color: #fb923c; }

.rc-formula-subtotal {
  background: hsla(var(--accent-h),70%,50%,0.1);
  border-radius: 6px;
  padding: 0.35rem 0.5rem;
  margin-top: 0.35rem;
}
.rc-formula-subtotal .rc-f-label { color: #e8d8ff; font-weight: 600; }
.rc-formula-subtotal .rc-f-val   { color: #e8d8ff; font-weight: 700; font-size: 0.92rem; }

/* Доп.работы / выезд / срочность */
.rc-res-block {
  padding: 0.6rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.rc-res-block-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(74,222,128,0.7);
  margin-bottom: 0.45rem;
}
.rc-res-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  padding: 0.22rem 0;
  color: rgba(255,255,255,0.7);
}
.rc-res-option { color: rgba(167,243,208,0.85); }
.rc-res-plus   { font-weight: 600; color: #4ade80; }
.rc-res-subtotal {
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: 0.3rem;
  padding-top: 0.4rem;
  font-weight: 600;
  color: #a7f3d0;
}

.rc-res-free-visit {
  padding: 0.55rem 1.25rem;
  font-size: 0.83rem;
  color: #4ade80;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* Итоговый блок */
.rc-result-total-block {
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, hsla(var(--accent-h),70%,50%,0.2), hsla(var(--accent-h),70%,33%,0.15));
  border-top: 1px solid hsla(var(--accent-h),70%,50%,0.35);
  text-align: center;
}
.rc-result-total-label {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.3rem;
}
.rc-result-total-sum {
  font-size: 2rem;
  font-weight: 800;
  color: #4ade80;
  line-height: 1.1;
}
.rc-result-days {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
  margin-top: 0.35rem;
}

/* Примечание */
.rc-result-note {
  padding: 0.6rem 1.25rem;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
  line-height: 1.4;
  border-top: 1px solid rgba(255,255,255,0.05);
}

/* Кнопки действий */
.rc-result-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.9rem 1.25rem 1.25rem;
}
.rc-btn-order {
  display: block;
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  background: var(--grad-btn);
  color: #fff;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: filter 0.2s;
  box-shadow: 0 4px 15px hsla(var(--accent-h),70%,50%,0.4);
}
.rc-btn-order:hover { filter: brightness(1.12); }

.rc-btn-wa {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  padding: 0.7rem 1rem;
  border-radius: 12px;
  background: rgba(37,211,102,0.15);
  border: 1px solid rgba(37,211,102,0.4);
  color: #4ade80;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}
.rc-btn-wa:hover { background: rgba(37,211,102,0.25); }

/* ── Карточка «Как мы работаем» ─────────────────────────── */
.rc-how-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid hsla(var(--accent-h),70%,50%,0.18);
  border-radius: 16px;
  padding: 1.2rem 1.25rem;
}
.rc-how-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #c084fc;
  margin-bottom: 1rem;
}
.rc-how-steps { display: flex; flex-direction: column; gap: 0.7rem; }
.rc-how-step {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.82rem;
}
.rc-how-num {
  flex-shrink: 0;
  width: 22px; height: 22px;
  background: var(--grad-btn);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  margin-top: 1px;
}
.rc-how-step strong { display: block; color: #e8d8ff; margin-bottom: 0.1rem; }
.rc-how-step span   { color: rgba(255,255,255,0.5); line-height: 1.4; }

/* ══════════════════════════════════════════════════════════
   МОДАЛЬНОЕ ОКНО ПОДСКАЗКИ
   ══════════════════════════════════════════════════════════ */
.rc-hint-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: rc-fade-in 0.2s ease;
}
@keyframes rc-fade-in { from { opacity:0; } to { opacity:1; } }

.rc-hint-modal {
  background: linear-gradient(145deg, #1e1230, #160d28);
  border: 1px solid hsla(var(--accent-h),70%,50%,0.5);
  border-radius: 20px;
  padding: 1.5rem;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 40px hsla(var(--accent-h),70%,50%,0.2);
  animation: rc-slide-up 0.25s ease;
}
@keyframes rc-slide-up { from { transform: translateY(20px); opacity:0; } to { transform:none; opacity:1; } }

.rc-hint-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.rc-hint-title {
  font-size: 1rem;
  font-weight: 700;
  color: #e8d8ff;
  line-height: 1.4;
}
.rc-hint-close-x {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 0.8rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
  touch-action: manipulation;
  font-family: inherit;
}
.rc-hint-close-x:hover { background: rgba(255,255,255,0.16); color: #fff; }

.rc-hint-body {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.78);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}
.rc-hint-bullet { color: #c084fc; margin-right: 0.1rem; }

.rc-hint-close {
  width: 100%;
  padding: 0.7rem 1rem;
  border-radius: 12px;
  background: var(--grad-btn);
  border: none;
  color: #fff;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.2s;
}
.rc-hint-close:hover { filter: brightness(1.12); }

/* ══════════════════════════════════════════════════════════
   ТАБЫ КАЛЬКУЛЯТОРА
   ══════════════════════════════════════════════════════════ */
.rc-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid hsla(var(--accent-h),70%,50%,0.25);
  border-radius: 12px;
  padding: 0.35rem;
}
.rc-tab {
  flex: 1;
  padding: 0.65rem 1rem;
  border-radius: 9px;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.5);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.rc-tab:hover { color: var(--acc2); background: hsla(var(--accent-h),70%,50%,0.12); }
.rc-tab.active {
  background: var(--grad-btn);
  color: #fff;
  box-shadow: 0 3px 12px hsla(var(--accent-h),70%,50%,0.4);
}
.rc-tab-panel { 
  animation: rc-fade-in 0.25s ease; 
  display: none;
}
.rc-tab-panel.active {
  display: block;
}

/* ══════════════════════════════════════════════════════════
   ДЕТАЛЬНАЯ СМЕТА ПО КОМНАТАМ (вкладка 2)
   ══════════════════════════════════════════════════════════ */
.rc-smeta-wrap {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 960px) { .rc-smeta-wrap { grid-template-columns: 1fr; } }

.rc-smeta-rooms-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.rc-btn-add {
  padding: 0.45rem 1rem;
  border-radius: 8px;
  background: var(--grad-btn);
  color: #fff;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: 0 2px 10px hsla(var(--accent-h),70%,50%,0.35);
  transition: filter 0.2s;
  border: none;
}
.rc-btn-add:hover { filter: brightness(1.15); }

/* Карточка комнаты */
.rc-room-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid hsla(var(--accent-h),70%,50%,0.25);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  margin-bottom: 0.85rem;
  transition: border-color 0.2s;
}
.rc-room-card:hover { border-color: hsla(var(--accent-h),70%,50%,0.5); }
.rc-room-header {
  display: flex; align-items: center; gap: 0.5rem;
  margin-bottom: 0.65rem;
}
.rc-room-icon { font-size: 1.3rem; flex-shrink: 0; }
.rc-room-name-input {
  flex: 1;
  background: transparent;
  border: none;
  border-bottom: 1px solid hsla(var(--accent-h),70%,50%,0.3);
  color: #f0f0f0;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.15rem 0.3rem;
  outline: none;
  transition: border-color 0.15s;
}
.rc-room-name-input:focus { border-bottom-color: var(--acc); }
.rc-room-remove {
  background: none;
  border: none;
  color: #f87171;
  font-size: 1rem;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 6px;
  transition: background 0.15s;
  touch-action: manipulation;
}
.rc-room-remove:hover { background: rgba(248,113,113,0.15); }
.rc-room-type-row { margin-bottom: 0.75rem; }
.rc-room-type-sel {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid hsla(var(--accent-h),70%,50%,0.25);
  border-radius: 8px;
  color: #e0d0ff;
  font-family: inherit;
  font-size: 0.88rem;
  padding: 0.45rem 0.7rem;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
}
.rc-dims {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-bottom: 0.65rem;
}
@media (max-width: 480px) { .rc-dims { grid-template-columns: 1fr; } }
.rc-dim-group { display: flex; flex-direction: column; gap: 0.2rem; }
.rc-dim-group label { font-size: 0.76rem; color: rgba(160,160,176,0.8); font-weight: 500; }
.rc-hint-lbl {
  display: inline-block;
  width: 14px; height: 14px;
  line-height: 14px; text-align: center;
  border-radius: 50%;
  background: hsla(var(--accent-h),70%,50%,0.3);
  color: #c084fc;
  font-size: 0.6rem;
  cursor: help;
  vertical-align: middle;
}
.rc-dim-input {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid hsla(var(--accent-h),70%,50%,0.22);
  border-radius: 8px;
  color: #f0f0f0;
  font-family: inherit;
  font-size: 0.88rem;
  padding: 0.45rem 0.7rem;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s;
  -webkit-appearance: none;
}
.rc-dim-input:focus { border-color: var(--acc); }
.rc-dim-input.error { border-color: #f87171; }
.rc-room-areas { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.3rem; }
.rc-area-badge {
  font-size: 0.74rem; padding: 0.18rem 0.6rem;
  border-radius: 20px;
  background: hsla(var(--accent-h),70%,50%,0.1);
  border: 1px solid hsla(var(--accent-h),70%,50%,0.25);
  color: rgba(192,132,252,0.6);
  font-weight: 500; transition: all 0.2s;
}
.rc-area-badge.filled { background: hsla(var(--accent-h),70%,50%,0.22); border-color: hsla(var(--accent-h),70%,50%,0.5); color: var(--acc2); }
.rc-room-error { font-size: 0.74rem; color: #f87171; margin-top: 0.25rem; min-height: 0.9rem; }

/* Правая часть сметы */
.rc-smeta-right { display: flex; flex-direction: column; gap: 1rem; }
.rc-smeta-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid hsla(var(--accent-h),70%,50%,0.22);
  border-radius: 12px;
  overflow: hidden;
  position: sticky; top: 80px;
}
@media (max-width: 960px) { .rc-smeta-card { position: static; } }
.rc-smeta-card-title {
  padding: 0.8rem 1rem;
  font-weight: 700; font-size: 0.9rem;
  background: hsla(var(--accent-h),70%,50%,0.1);
  border-bottom: 1px solid hsla(var(--accent-h),70%,50%,0.2);
  display: flex; align-items: center; gap: 0.5rem;
}
.rc-print-btn {
  margin-left: auto; padding: 0.3rem 0.7rem;
  border-radius: 7px; border: 1px solid hsla(var(--accent-h),70%,50%,0.4);
  background: transparent; color: #c084fc;
  font-family: inherit; font-size: 0.78rem; font-weight: 600;
  cursor: pointer; touch-action: manipulation; transition: background 0.15s;
}
.rc-print-btn:hover { background: hsla(var(--accent-h),70%,50%,0.2); }

/* Таблицы сметы */
.rc-area-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; display: block; padding: 0.75rem; }
.rc-area-table table { width: 100%; border-collapse: collapse; }
.rc-area-table th { font-size: 0.72rem; color: rgba(160,160,176,0.7); font-weight: 500; padding: 0.25rem 0.4rem; text-align: left; border-bottom: 1px solid hsla(var(--accent-h),70%,50%,0.18); }
.rc-area-table td { padding: 0.32rem 0.4rem; border-bottom: 1px solid rgba(255,255,255,0.04); }
.rc-area-table tfoot td { font-weight: 700; color: var(--acc2); border-top: 1px solid hsla(var(--accent-h),70%,50%,0.3) !important; border-bottom: none; }
.rc-area-table th.rc-num, .rc-area-table td.rc-num { text-align: right; }

.rc-est-section { margin-bottom: 1rem; }
.rc-est-title { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--acc); padding: 0.5rem 0.75rem 0.3rem; border-bottom: 1px solid hsla(var(--accent-h),70%,50%,0.2); }
.rc-est-table-wrap { overflow-x: auto; }
.rc-est-table { width: 100%; border-collapse: collapse; font-size: 0.78rem; }
.rc-est-table th { font-size: 0.7rem; color: rgba(160,160,176,0.65); font-weight: 500; padding: 0.25rem 0.4rem; text-align: left; border-bottom: 1px solid hsla(var(--accent-h),70%,50%,0.15); white-space: nowrap; }
.rc-est-table td { padding: 0.3rem 0.4rem; border-bottom: 1px solid rgba(255,255,255,0.03); vertical-align: top; }
.rc-est-table th.rc-num, .rc-est-table td.rc-num { text-align: right; }
.rc-est-table td.rc-price-cell { text-align:right; font-weight:600; color:var(--acc2); white-space:nowrap; }
.rc-est-table td.rc-cat-cell  { font-size:0.68rem; color:rgba(160,160,176,0.55); }

.rc-totals { margin: 0.5rem 0.75rem 0.75rem; background: hsla(var(--accent-h),70%,50%,0.08); border: 1px solid hsla(var(--accent-h),70%,50%,0.25); border-radius: 10px; padding: 0.75rem 1rem; }
.rc-total-row { display: flex; justify-content: space-between; font-size: 0.85rem; padding: 0.25rem 0; color: rgba(255,255,255,0.7); }
.rc-total-row span:last-child { font-weight:600; color:var(--acc2); }
.rc-grand { display:flex; justify-content:space-between; font-size:1rem; font-weight:700; border-top:1px solid hsla(var(--accent-h),70%,50%,0.35); margin-top:0.4rem; padding-top:0.5rem; }
.rc-grand span:first-child { color:#f0f0f0; }
.rc-grand span:last-child  { color:#4ade80; font-size:1.05rem; }
.rc-print-btn-full { width:100%; margin-top:0.75rem; padding:0.6rem 1rem; border:1px solid hsla(var(--accent-h),70%,50%,0.4); border-radius:9px; background:hsla(var(--accent-h),70%,50%,0.12); color:var(--acc2); font-family:inherit; font-size:0.85rem; font-weight:600; cursor:pointer; touch-action:manipulation; transition:background 0.2s; }
.rc-print-btn-full:hover { background:hsla(var(--accent-h),70%,50%,0.25); }

.rc-num { text-align: right; font-variant-numeric: tabular-nums; }
.rc-empty-hint { text-align: center; padding: 1.5rem 1rem; color: rgba(160,160,176,0.5); font-size: 0.85rem; }

/* ══════════════════════════════════════════════════════════
   ГЛОБАЛЬНАЯ ЗАЩИТА ОТ ГОРИЗОНТАЛЬНОГО СКРОЛЛА
   (работает на ВСЕХ экранах, в т.ч. реальных телефонах)
   ══════════════════════════════════════════════════════════ */
.rc-calculator,
.rc-left,
.rc-right,
.rc-section,
.rc-result-card,
.rc-smeta-wrap,
.rc-smeta-left,
.rc-smeta-right,
.rc-smeta-card,
.sm-app,
.sm-left,
.sm-right,
.sm-estimate-panel,
.sm-room-card,
#repair-calc-root,
#sm-smeta-root {
  max-width: 100%;
  box-sizing: border-box;
  min-width: 0;
}

/* Таблицы сметы — только горизонтальный скролл внутри */
.rc-est-table-wrap,
.rc-area-table {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

.rc-est-table,
.rc-area-table table {
  min-width: 320px; /* минимум, не меньше */
}

/* Длинный текст в ячейках — перенос */
.rc-est-table td,
.rc-est-table th {
  word-break: break-word;
  overflow-wrap: break-word;
}

/* ══════════════════════════════════════════════════════════
   МОБИЛЬНАЯ АДАПТАЦИЯ (≤600px)
   ══════════════════════════════════════════════════════════ */
@media (max-width: 600px) {
  /* Сброс двухколоночного layout */
  .rc-calculator   { grid-template-columns: 1fr !important; }
  .rc-smeta-wrap   { grid-template-columns: 1fr !important; }
  .sm-app          { grid-template-columns: 1fr !important; }

  /* Сетки карточек — 2 столбца */
  .rc-types-grid  { grid-template-columns: repeat(2, 1fr); }
  .rc-rooms-grid  { grid-template-columns: repeat(2, 1fr); }
  .rc-mats-grid   { grid-template-columns: repeat(2, 1fr); }
  .rc-urg-grid    { grid-template-columns: repeat(2, 1fr); }
  .rc-visit-grid  { grid-template-columns: 1fr; }

  /* Типы ремонта — текст не вылезает */
  .rc-type-name  { font-size: 0.78rem; word-break: break-word; overflow-wrap: break-word; }
  .rc-type-price { font-size: 0.7rem; }
  .rc-type-btn   { padding: 0.75rem 0.4rem; min-width: 0; overflow: hidden; }
  .rc-type-icon  { font-size: 1.4rem; }

  /* Помещения — текст не вылезает */
  .rc-room-name  { font-size: 0.75rem; word-break: break-word; overflow-wrap: break-word; }
  .rc-room-btn   { padding: 0.65rem 0.4rem; min-width: 0; overflow: hidden; }

  /* Материалы — текст не вылезает */
  .rc-mat-name   { font-size: 0.75rem; word-break: break-word; overflow-wrap: break-word; }
  .rc-mat-btn    { padding: 0.65rem 0.5rem; min-width: 0; overflow: hidden; }
  .rc-section     { padding: 0.9rem; }
  .rc-intro-banner { flex-direction: column; gap: 0.6rem; }
  .rc-area-labels { grid-template-columns: repeat(2, 1fr); }

  /* Опции — компактная карточка на мобиле */
  .rc-opts-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
  .rc-opt-btn {
    flex-direction: column !important;
    text-align: left !important;
    gap: 0.3rem;
    padding: 0.6rem 0.65rem;
    min-width: 0;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }
  .rc-opt-top {
    display: flex;
    align-items: flex-start;
    gap: 0.3rem;
    flex-wrap: nowrap;
  }
  .rc-opt-icon  { font-size: 1rem; flex-shrink: 0; }
  .rc-opt-check { font-size: 0.9rem; flex-shrink: 0; }
  .rc-opt-name  {
    font-size: 0.75rem;
    line-height: 1.25;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    min-width: 0;
  }
  .rc-opt-price { font-size: 0.73rem; }
  .rc-opt-desc  { font-size: 0.67rem; display: block; }

  /* Выезд — горизонтальная строка */
  .rc-visit-btn {
    flex-direction: row !important;
    text-align: left !important;
    gap: 0.5rem;
    padding: 0.65rem 0.75rem;
  }

  /* Вкладки — меньше padding */
  .rc-tabs { gap: 0.3rem; }
  .rc-tab  { font-size: 0.82rem; padding: 0.6rem 0.75rem; flex: 1; text-align: center; }

  /* Кнопки заказа */
  .rc-btn-order { width: 100%; font-size: 0.88rem; }
  .rc-btn-wa    { width: 100%; }

  /* Правая панель — статическая */
  .rc-result-card { position: static !important; }
  .rc-smeta-card  { position: static !important; }
  .sm-estimate-panel { position: static !important; max-height: none !important; }

  /* Скрыть лишний текст в карточках */
  .rc-type-days { display: none; }
  .rc-type-desc { display: none; }
  .rc-urg-desc  { display: none; }
}

/* ══════════════════════════════════════════════════════════
   МАЛЫЕ ЭКРАНЫ (≤430px) — реальные телефоны
   ══════════════════════════════════════════════════════════ */
@media (max-width: 430px) {
  /* Убираем любые горизонтальные отступы */
  #repair-calc-root,
  #sm-smeta-root {
    padding: 0;
    overflow-x: hidden;
    max-width: 100%;
    width: 100%;
  }

  /* Глобальная защита всех карточек от переполнения */
  .rc-type-btn, .rc-room-btn, .rc-mat-btn,
  .rc-opt-btn, .rc-urg-btn, .rc-visit-btn {
    max-width: 100%;
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
  }

  /* Сетки — ширина 100% */
  .rc-types-grid, .rc-rooms-grid, .rc-mats-grid,
  .rc-urg-grid, .rc-opts-grid, .rc-visit-grid {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .rc-section {
    padding: 0.75rem;
    border-radius: 10px;
    margin-bottom: 0.75rem;
  }
  .rc-section-title { font-size: 0.88rem; }

  /* Карточки — 2 столбца, компактные */
  .rc-types-grid,
  .rc-rooms-grid,
  .rc-mats-grid,
  .rc-urg-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.4rem;
  }

  .rc-type-btn,
  .rc-room-btn,
  .rc-mat-btn {
    padding: 0.6rem 0.3rem;
  }
  .rc-type-icon,
  .rc-room-icon,
  .rc-mat-icon  { font-size: 1.3rem; }
  .rc-type-name,
  .rc-room-name,
  .rc-mat-name  { font-size: 0.75rem; }
  .rc-type-price { font-size: 0.68rem; }
  .rc-urg-name   { font-size: 0.77rem; }
  .rc-urg-badge  { font-size: 0.62rem; padding: 0.1rem 0.4rem; }

  /* Площадь */
  .rc-area-input  { width: 55px; font-size: 1.3rem; }
  .rc-dim-btn     { width: 38px; height: 38px; font-size: 0.9rem; }
  .rc-area-labels { grid-template-columns: repeat(2, 1fr); gap: 0.2rem; }
  .rc-area-label  { font-size: 0.7rem; padding: 0.3rem 0.2rem; }

  /* Результирующая панель */
  .rc-result-header  { padding: 0.75rem 0.9rem; }
  .rc-formula-block  { padding: 0.6rem 0.9rem; }
  .rc-formula-row    { font-size: 0.78rem; }
  .rc-totals-block   { padding: 0.6rem 0.9rem; }
  .rc-total-main     { font-size: 1.3rem; }
  .rc-btn-order      { font-size: 0.85rem; padding: 0.7rem 0.9rem; }
  .rc-btn-wa         { font-size: 0.8rem;  padding: 0.6rem 0.7rem; }

  /* Конструктор сметы */
  .sm-room-card      { padding: 0.85rem; border-radius: 12px; }
  .sm-room-card-header { gap: 0.5rem; }
  .sm-room-icon      { font-size: 1.3rem; }
  .sm-room-name-input { font-size: 0.9rem; }
  .sm-sliders-wrap   { gap: 0.65rem; }
  .sm-slider-label   { font-size: 0.72rem; }
  .sm-section-btn    { padding: 0.6rem 0.75rem; }
  .sm-sec-label      { font-size: 0.82rem; }
  .sm-items-grid     { grid-template-columns: 1fr; gap: 0.35rem; }
  .sm-item-name      { font-size: 0.8rem; }
  .sm-item-price     { font-size: 0.78rem; }
  .sm-estimate-header { padding: 0.75rem 0.9rem; }
  .sm-estimate-title  { font-size: 0.88rem; }
  .sm-btn-add-room   { font-size: 0.88rem; padding: 0.85rem; }

  /* Таблица сметы — уменьшить шрифт */
  .rc-est-table th   { font-size: 0.65rem; padding: 0.2rem 0.3rem; }
  .rc-est-table td   { font-size: 0.72rem; padding: 0.25rem 0.3rem; }
  .rc-total-row      { font-size: 0.8rem; }
  .rc-grand          { font-size: 0.95rem; }

  /* Вкладки — уравнять ширину */
  .rc-tabs { display: flex; width: 100%; }
  .rc-tab  { flex: 1; font-size: 0.78rem; padding: 0.55rem 0.5rem; }
}

/* ══════════════════════════════════════════════════════════
   ПЕЧАТЬ
   ══════════════════════════════════════════════════════════ */
@media print {
  .sp-hero, header, footer, .rc-tabs, .rc-smeta-left,
  .sp-steps, .sp-features-grid, #tab-quick, .rc-intro-banner { display: none !important; }
  #tab-detail, .rc-smeta-wrap { display: block !important; }
  .rc-smeta-wrap  { grid-template-columns: 1fr; }
  .rc-smeta-right { position: static; }
  body, .rc-smeta-card, .rc-totals { background: #fff !important; color: #000 !important; border-color: #ddd !important; }
  .rc-smeta-card-title { color: #000 !important; background: #f5f5f5 !important; }
  .rc-price-cell, .rc-grand span { color: #000 !important; }
}

/* ══════════════════════════════════════════════════════════
   КОНСТРУКТОР СМЕТЫ — SM-* v1.0
   ══════════════════════════════════════════════════════════ */

/* ── Загрузка ─────────────────────────────────────────── */
.sm-loading {
  display: flex; flex-direction: column; align-items: center;
  padding: 4rem 1rem; color: rgba(255,255,255,0.55); gap: 0.75rem;
}
.sm-loading-icon { font-size: 2.5rem; animation: rc-pulse 1.2s ease-in-out infinite; }

/* ── Основной layout ─────────────────────────────────── */
.sm-app {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 1080px) { .sm-app { grid-template-columns: 1fr; } }

/* ── Верхний баннер-подсказка ─────────────────────────── */
.sm-top-hint {
  display: flex; gap: 1rem; align-items: flex-start;
  background: hsla(var(--accent-h),70%,50%,0.12);
  border: 1px solid hsla(var(--accent-h),70%,50%,0.3);
  border-radius: 12px; padding: 1rem 1.2rem; margin-bottom: 1.5rem;
}
.sm-top-hint-icon { font-size: 1.6rem; flex-shrink: 0; }
.sm-top-hint-text { font-size: 0.88rem; color: rgba(255,255,255,0.82); line-height: 1.55; }
.sm-top-hint-text strong { color: #e0d0ff; }

/* ── Кнопка добавить комнату ───────────────────────────── */
.sm-btn-add-room {
  width: 100%; padding: 1rem; border: 2px dashed hsla(var(--accent-h),70%,50%,0.5);
  border-radius: 12px; background: hsla(var(--accent-h),70%,50%,0.07);
  color: #c084fc; font-size: 1rem; font-weight: 600;
  font-family: inherit; cursor: pointer; transition: all 0.2s;
  margin-top: 1rem;
}
.sm-btn-add-room:hover {
  border-color: var(--acc); background: hsla(var(--accent-h),70%,50%,0.14);
  transform: translateY(-1px);
}

/* ── Карточка комнаты ────────────────────────────────── */
.sm-room-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid hsla(var(--accent-h),70%,50%,0.25);
  border-radius: 14px; padding: 1.25rem; margin-bottom: 1rem;
  transition: border-color 0.2s;
}
.sm-room-card:hover { border-color: hsla(var(--accent-h),70%,50%,0.5); }

.sm-room-card-header {
  display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem;
}
.sm-room-card-title {
  display: flex; align-items: center; gap: 0.6rem; flex: 1; min-width: 0;
}
.sm-room-icon { font-size: 1.5rem; flex-shrink: 0; }
.sm-room-name-input {
  flex: 1; background: none; border: none; border-bottom: 1px solid hsla(var(--accent-h),70%,50%,0.3);
  color: #e0d0ff; font-size: 1rem; font-weight: 600; font-family: inherit;
  padding: 0.2rem 0.3rem; outline: none; min-width: 0;
}
.sm-room-name-input:focus { border-bottom-color: var(--acc); }
.sm-room-remove-btn {
  background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.2);
  border-radius: 8px; padding: 0.4rem 0.6rem; cursor: pointer;
  font-size: 1rem; color: #f87171; transition: all 0.15s; flex-shrink: 0;
}
.sm-room-remove-btn:hover { background: rgba(239,68,68,0.22); }

/* ── Подсказка к размерам ────────────────────────────── */
.sm-dims-hint { margin-bottom: 0.6rem; }
.sm-hint-btn {
  background: hsla(var(--accent-h),70%,50%,0.18); border: 1px solid hsla(var(--accent-h),70%,50%,0.35);
  border-radius: 20px; padding: 0.3rem 0.9rem; cursor: pointer;
  font-size: 0.8rem; font-weight: 600; color: var(--acc2); font-family: inherit;
  transition: all 0.15s;
}
.sm-hint-btn:hover { background: hsla(var(--accent-h),70%,50%,0.32); }

/* ── Ошибка размеров ────────────────────────────────── */
.sm-dim-error { font-size: 0.78rem; color: #f87171; min-height: 1.2em; margin-bottom: 0.4rem; }

/* ── Ползунки размеров (детальная смета) ─────────────── */
.sm-sliders-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1rem;
}
.sm-slider-row {
  display: block;
  width: 100%;
}
.sm-slider-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
}
.sm-slider-label {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.6);
  font-weight: 600;
}
.sm-slider-val {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--acc);
  min-width: 48px;
  text-align: right;
}

/* Слайдер внутри карточки комнаты (детальная смета) */
.sm-sliders-wrap .rc-area-range {
  display: block !important;
  width: 100% !important;
  height: 6px !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  background: hsla(var(--accent-h,270),70%,50%,0.25) !important;
  border-radius: 4px !important;
  outline: none !important;
  cursor: pointer !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
}
.sm-sliders-wrap .rc-area-range::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 4px;
  background: hsla(var(--accent-h,270),70%,50%,0.25);
}
.sm-sliders-wrap .rc-area-range::-webkit-slider-thumb {
  -webkit-appearance: none !important;
  width: 22px !important;
  height: 22px !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, hsl(var(--accent-h,270),70%,58%), hsl(var(--accent-h,270),70%,72%)) !important;
  cursor: pointer !important;
  box-shadow: 0 2px 10px hsla(var(--accent-h,270),70%,50%,0.55) !important;
  margin-top: -8px !important;
  border: none !important;
}
.sm-sliders-wrap .rc-area-range::-moz-range-track {
  height: 6px;
  border-radius: 4px;
  background: hsla(var(--accent-h,270),70%,50%,0.25);
}
.sm-sliders-wrap .rc-area-range::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, hsl(var(--accent-h,270),70%,58%), hsl(var(--accent-h,270),70%,72%));
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 10px hsla(var(--accent-h,270),70%,50%,0.55);
}

/* Универсальный фолбэк — любой range input внутри карточки комнаты */
.sm-room-card input[type="range"] {
  display: block !important;
  width: 100% !important;
  height: 6px !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  background: hsla(270,70%,50%,0.25) !important;
  border-radius: 4px !important;
  outline: none !important;
  cursor: pointer !important;
  border: none !important;
  margin: 0 0 2px 0 !important;
  padding: 0 !important;
}
.sm-room-card input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 4px;
  background: hsla(270,70%,50%,0.25);
}
.sm-room-card input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none !important;
  width: 22px !important;
  height: 22px !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg,hsl(270,70%,58%),hsl(270,70%,72%)) !important;
  cursor: pointer !important;
  border: none !important;
  box-shadow: 0 2px 10px hsla(270,70%,50%,0.5) !important;
  margin-top: -8px !important;
}
.sm-room-card input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: 4px;
  background: hsla(270,70%,50%,0.25);
}
.sm-room-card input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg,hsl(270,70%,58%),hsl(270,70%,72%));
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 10px hsla(270,70%,50%,0.5);
}

/* ── Выбор типа ремонта ─────────────────────────────── */
.sm-repair-type-selector {
  margin: 1rem 0 0.75rem;
  padding: 0.85rem 1rem;
  background: rgba(var(--acc-rgb),0.08);
  border: 1px solid rgba(var(--acc-rgb),0.2);
  border-radius: 10px;
}
.sm-repair-type-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  margin-bottom: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.sm-repair-type-btns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}
.sm-repair-type-btn {
  font-family: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.65rem 0.5rem;
  background: rgba(255,255,255,0.03);
  border: 1.5px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: rgba(255,255,255,0.65);
  cursor: pointer;
  transition: all 0.2s;
}
.sm-repair-type-btn:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(var(--acc-rgb),0.4);
  color: rgba(255,255,255,0.85);
}
.sm-repair-type-btn.active {
  background: rgba(var(--acc-rgb),0.15);
  border-color: var(--acc);
  color: var(--acc2);
  box-shadow: 0 0 12px rgba(var(--acc-rgb),0.3);
}
.sm-rt-icon {
  font-size: 1.5rem;
}
.sm-rt-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
}

/* ── Значки площадей ────────────────────────────────── */
.sm-areas-row {
  display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem;
}
.sm-area-badge {
  background: rgba(255,255,255,0.05); border: 1px solid hsla(var(--accent-h),70%,50%,0.2);
  border-radius: 20px; padding: 0.3rem 0.8rem; font-size: 0.8rem;
  color: rgba(255,255,255,0.5); transition: all 0.2s;
}
.sm-area-badge.filled {
  background: hsla(var(--accent-h),70%,50%,0.15); border-color: hsla(var(--accent-h),70%,50%,0.45);
  color: var(--acc2); font-weight: 600;
}

/* ── Кнопки секций (пол / стены / потолок / …) ────────── */
.sm-sections { display: flex; flex-direction: column; gap: 0.5rem; }
.sm-section-row { display: flex; gap: 0.5rem; align-items: center; }
.sm-section-btn {
  flex: 1; display: flex; align-items: center; gap: 0.75rem;
  background: rgba(255,255,255,0.04); border: 1px solid hsla(var(--accent-h),70%,50%,0.2);
  border-radius: 10px; padding: 0.7rem 1rem; cursor: pointer;
  font-family: inherit; transition: all 0.2s; text-align: left; color: #e0d0ff;
  min-width: 0;
}
.sm-section-btn:hover {
  background: hsla(var(--accent-h),70%,50%,0.12); border-color: hsla(var(--accent-h),70%,50%,0.45);
}
.sm-section-btn.has-items {
  background: hsla(var(--accent-h),70%,50%,0.1); border-color: hsla(var(--accent-h),70%,50%,0.45);
}
.sm-sec-icon { font-size: 1.1rem; flex-shrink: 0; }
.sm-sec-label { font-size: 0.88rem; font-weight: 600; flex: 1; }
.sm-sec-add { font-size: 0.78rem; color: var(--acc); }
.sm-sec-count {
  font-size: 0.75rem; color: #c084fc; background: hsla(var(--accent-h),70%,50%,0.2);
  border-radius: 12px; padding: 0.15rem 0.5rem; flex-shrink: 0;
}
.sm-sec-clear-btn {
  background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.2);
  border-radius: 8px; padding: 0.45rem 0.6rem; cursor: pointer;
  font-size: 0.85rem; color: #f87171; transition: all 0.15s; flex-shrink: 0;
}
.sm-sec-clear-btn:hover { background: rgba(239,68,68,0.22); }

.sm-room-subtotal {
  margin-top: 0.75rem; padding-top: 0.6rem; font-size: 0.85rem;
  border-top: 1px solid hsla(var(--accent-h),70%,50%,0.15);
  color: rgba(255,255,255,0.6); text-align: right;
}
.sm-room-subtotal strong { color: var(--acc2); }

/* ── ПАНЕЛЬ СМЕТЫ (правая колонка) ────────────────────── */
.sm-estimate-panel {
  background: rgba(255,255,255,0.03);
  border: 1px solid hsla(var(--accent-h),70%,50%,0.22);
  border-radius: 16px; overflow: hidden;
  position: sticky; top: 80px; max-height: calc(100vh - 100px);
  display: flex; flex-direction: column;
}
@media (max-width: 1080px) {
  .sm-estimate-panel {
    position: static !important;
    max-height: none !important;
    overflow: visible !important;
    display: block !important;
  }
  #sm-estimate-body {
    flex: none !important;
    overflow: visible !important;
    max-height: none !important;
    height: auto !important;
    min-height: 0 !important;
    padding-bottom: 120px !important;
  }
  #sm-estimate-footer {
    position: static !important;
    padding-bottom: 40px !important;
  }
}

.sm-estimate-header {
  padding: 1rem 1.25rem; background: hsla(var(--accent-h),70%,50%,0.12);
  border-bottom: 1px solid hsla(var(--accent-h),70%,50%,0.2);
  flex-shrink: 0;
}
.sm-estimate-title { font-size: 1rem; font-weight: 700; color: #e0d0ff; }
.sm-estimate-sub {
  font-size: 0.82rem; color: rgba(192,132,252,0.8); margin-top: 0.2rem;
}

.sm-estimate-empty {
  padding: 3rem 1.5rem; text-align: center;
  color: rgba(255,255,255,0.35); font-size: 0.9rem; line-height: 1.6;
}

#sm-estimate-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.5rem;
  padding-bottom: 2rem;
  scrollbar-width: thin;
  scrollbar-color: hsla(var(--accent-h),70%,50%,0.3) transparent;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

/* ── Строки сметы ───────────────────────────────────── */
.sm-est-room {
  border-bottom: 1px solid hsla(var(--accent-h),70%,50%,0.12); margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
}
.sm-est-room:last-child { border-bottom: none; }
.sm-est-room-title {
  font-size: 0.88rem; font-weight: 700; color: #e0d0ff;
  padding: 0.4rem 0.5rem; display: flex; align-items: center; gap: 0.4rem;
}
.sm-est-room-area {
  font-size: 0.72rem; color: rgba(192,132,252,0.7);
  background: hsla(var(--accent-h),70%,50%,0.12); border-radius: 10px;
  padding: 0.1rem 0.5rem;
}
.sm-est-empty-room {
  padding: 0.5rem; font-size: 0.78rem; color: rgba(255,255,255,0.3);
  font-style: italic;
}
.sm-est-section { margin-bottom: 0.4rem; }
.sm-est-sec-title {
  font-size: 0.75rem; font-weight: 700; color: rgba(192,132,252,0.75);
  padding: 0.25rem 0.5rem; text-transform: uppercase; letter-spacing: 0.04em;
}
.sm-est-table { width: 100%; border-collapse: collapse; font-size: 0.75rem; }
.sm-est-table th {
  padding: 0.2rem 0.4rem; color: rgba(255,255,255,0.4); font-weight: 600;
  text-align: left; border-bottom: 1px solid hsla(var(--accent-h),70%,50%,0.12);
}
.sm-est-table td {
  padding: 0.2rem 0.4rem; color: rgba(255,255,255,0.75);
  border-bottom: 1px solid rgba(255,255,255,0.04); vertical-align: top;
}
.sm-est-num { text-align: right; }
.sm-est-sum { color: var(--acc2) !important; font-weight: 600; }
.sm-est-room-total {
  text-align: right; font-size: 0.8rem; color: rgba(255,255,255,0.55);
  padding: 0.3rem 0.5rem;
}
.sm-est-room-total strong { color: var(--acc2); }

/* ── Итоговый блок ───────────────────────────────────── */
#sm-estimate-footer { padding: 1rem; border-top: 1px solid hsla(var(--accent-h),70%,50%,0.2); flex-shrink: 0; }
.sm-total-block {
  background: hsla(var(--accent-h),70%,50%,0.1); border: 1px solid hsla(var(--accent-h),70%,50%,0.25);
  border-radius: 10px; padding: 0.75rem 1rem; margin-bottom: 1rem;
}
.sm-total-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.85rem; color: rgba(255,255,255,0.7); padding: 0.25rem 0;
}
.sm-total-row.sm-grand {
  border-top: 1px solid hsla(var(--accent-h),70%,50%,0.25); margin-top: 0.4rem;
  padding-top: 0.6rem; font-size: 1rem; font-weight: 700; color: #e0d0ff;
}
.sm-total-row.sm-grand span:last-child { color: var(--acc2); font-size: 1.1rem; }

.sm-action-btns {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem;
}
.sm-btn-print {
  grid-column: 1 / -1; background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15); border-radius: 8px;
  padding: 0.65rem; cursor: pointer; font-size: 0.85rem; font-weight: 600;
  color: #e0d0ff; font-family: inherit; transition: all 0.15s;
}
.sm-btn-print:hover { background: rgba(255,255,255,0.14); }
.sm-btn-wa {
  background: linear-gradient(135deg, #25D366, #128C7E);
  border-radius: 8px; padding: 0.65rem; text-align: center;
  font-size: 0.85rem; font-weight: 600; color: #fff; text-decoration: none;
  transition: opacity 0.15s;
}
.sm-btn-wa:hover { opacity: 0.88; }
.sm-btn-order {
  background: var(--grad-btn);
  border: none; border-radius: 8px; padding: 0.65rem; cursor: pointer;
  font-size: 0.85rem; font-weight: 600; color: #fff; font-family: inherit;
  transition: opacity 0.15s;
}
.sm-btn-order:hover { opacity: 0.88; }

/* ── МОДАЛЬНЫЕ ОКНА ──────────────────────────────────── */
.sm-modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.72); z-index: 9000;
  align-items: center; justify-content: center; padding: 1rem;
}
.sm-modal-overlay.active { display: flex; }

.sm-modal {
  background: #1a1025; border: 1px solid hsla(var(--accent-h),70%,50%,0.35);
  border-radius: 16px; width: 100%; max-width: 780px;
  max-height: 92vh; display: flex; flex-direction: column;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
}
.sm-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.25rem; border-bottom: 1px solid hsla(var(--accent-h),70%,50%,0.2);
  flex-shrink: 0;
}
.sm-modal-title { font-size: 1rem; font-weight: 700; color: #e0d0ff; }
.sm-modal-close {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px; padding: 0.35rem 0.65rem; cursor: pointer;
  font-size: 1rem; color: rgba(255,255,255,0.7); transition: all 0.15s;
}
.sm-modal-close:hover { background: rgba(239,68,68,0.2); color: #f87171; }

.sm-modal-body {
  flex: 1; overflow-y: auto; overflow-x: hidden; padding: 1.25rem;
  scrollbar-width: thin; scrollbar-color: hsla(var(--accent-h),70%,50%,0.3) transparent;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

/* ── Сетка типов помещений ───────────────────────────── */
.sm-room-type-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.75rem; margin-bottom: 1.25rem;
}
.sm-room-type-btn {
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  background: rgba(255,255,255,0.04); border: 1px solid hsla(var(--accent-h),70%,50%,0.2);
  border-radius: 12px; padding: 1rem 0.75rem; cursor: pointer;
  font-family: inherit; transition: all 0.2s; text-align: center;
}
.sm-room-type-btn:hover {
  background: hsla(var(--accent-h),70%,50%,0.14); border-color: hsla(var(--accent-h),70%,50%,0.5);
  transform: translateY(-2px);
}
.sm-room-type-icon { font-size: 2rem; }
.sm-room-type-label { font-size: 0.82rem; color: #c0a0e0; font-weight: 600; }

/* ── Своё название ──────────────────────────────────── */
.sm-custom-room {
  border-top: 1px solid hsla(var(--accent-h),70%,50%,0.2); padding-top: 1rem;
}
.sm-custom-room-label {
  display: block; font-size: 0.85rem; color: rgba(255,255,255,0.55);
  margin-bottom: 0.5rem;
}
.sm-custom-room-row { display: flex; gap: 0.5rem; }
.sm-custom-room-input {
  flex: 1; background: rgba(255,255,255,0.06); border: 1px solid hsla(var(--accent-h),70%,50%,0.25);
  border-radius: 8px; padding: 0.6rem 0.9rem; color: #e0d0ff;
  font-size: 0.9rem; font-family: inherit; outline: none;
}
.sm-custom-room-input:focus { border-color: var(--acc); }

/* ── Кнопки основные ────────────────────────────────── */
.sm-btn-primary {
  background: var(--grad-btn);
  border: none; border-radius: 8px; padding: 0.65rem 1.25rem;
  cursor: pointer; font-size: 0.9rem; font-weight: 700; color: #fff;
  font-family: inherit; transition: opacity 0.15s;
}
.sm-btn-primary:hover { opacity: 0.88; }

/* ── Вторичная кнопка ───────────────────────────────── */
.sm-btn-secondary {
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px; padding: 0.65rem 1.25rem; cursor: pointer;
  font-size: 0.9rem; font-weight: 600; color: rgba(255,255,255,0.7);
  font-family: inherit; transition: all 0.15s;
}
.sm-btn-secondary:hover { background: rgba(255,255,255,0.13); color: #fff; }

/* ── Блок подсказки в модале ─────────────────────────── */
.sm-hint-block {
  display: flex; gap: 0.75rem; align-items: flex-start;
  background: hsla(var(--accent-h),70%,50%,0.1); border: 1px solid hsla(var(--accent-h),70%,50%,0.25);
  border-radius: 10px; padding: 0.85rem 1rem; margin-bottom: 1.25rem;
  font-size: 0.85rem; color: rgba(255,255,255,0.78); line-height: 1.55;
}
.sm-hint-block strong { color: #e0d0ff; }
.sm-hint-icon { font-size: 1.3rem; flex-shrink: 0; }

/* ── Группы позиций ─────────────────────────────────── */
.sm-items-group { margin-bottom: 1.5rem; }
.sm-items-group-title {
  font-size: 0.78rem; font-weight: 700; color: #c084fc;
  text-transform: uppercase; letter-spacing: 0.05em;
  margin-bottom: 0.75rem; padding-bottom: 0.35rem;
  border-bottom: 1px solid hsla(var(--accent-h),70%,50%,0.2);
}
.sm-items-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.65rem;
}
@media (max-width: 600px) { .sm-items-grid { grid-template-columns: 1fr; } }

/* ── Блок «Ваши позиции» ─────────────────────────────── */
.sm-items-block { margin-bottom: 1.2rem; }
.sm-items-block-title {
  font-size: 0.82rem; font-weight: 700;
  margin-bottom: 1rem; padding: 0.5rem 0.75rem;
  border-radius: 8px;
}
/* Ваши данные — зелёный акцент */
.sm-items-block--yours .sm-items-block-title {
  background: rgba(37,211,102,0.1);
  border: 1px solid rgba(37,211,102,0.3);
  color: #4ade80;
}
/* Демо-прайс — серый приглушённый */
.sm-items-block--demo .sm-items-block-title {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.45);
}
/* Демо-карточки чуть приглушены */
.sm-items-block--demo .sm-item-card {
  opacity: 0.75;
}
.sm-items-block--demo .sm-item-card:hover,
.sm-items-block--demo .sm-item-card.selected {
  opacity: 1;
}

/* ── Карточка позиции — glassmorphism стиль ─────────── */
.sm-item-card {
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid hsla(var(--accent-h),70%,50%,0.2);
  border-radius: 16px;
  padding: 0;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(.4,0,.2,1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3), 0 1px 0 hsla(var(--accent-h),70%,80%,0.06) inset;
}
.sm-item-card:hover {
  background: hsla(var(--accent-h),70%,50%,0.08);
  border-color: hsla(var(--accent-h),70%,50%,0.45);
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 0 1px hsla(var(--accent-h),70%,50%,0.2);
}
.sm-item-card.selected {
  background: hsla(var(--accent-h),70%,50%,0.14);
  border-color: hsla(var(--accent-h),70%,55%,0.7);
  box-shadow: 0 0 0 2px hsla(var(--accent-h),70%,50%,0.35), 0 8px 32px rgba(0,0,0,0.4);
  transform: translateY(-2px);
}

/* Фото/видео блок сверху карточки */
.sm-item-media {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
  border-radius: 16px 16px 0 0;
  background: linear-gradient(135deg, hsla(var(--accent-h),60%,20%,0.5), hsla(var(--accent-h),40%,10%,0.8));
}
.sm-item-media-placeholder {
  width: 100%;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  background: linear-gradient(135deg, hsla(var(--accent-h),60%,15%,0.6), hsla(var(--accent-h),40%,8%,0.9));
  border-radius: 16px 16px 0 0;
}

/* Контент карточки */
.sm-item-body {
  padding: 0.85rem;
}

.sm-item-check {
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
  display: block;
}
.sm-item-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.4rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
}
.sm-item-price-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: baseline;
  margin-bottom: 0.5rem;
}
.sm-item-price {
  font-size: 1rem;
  font-weight: 800;
  color: var(--acc);
}
.sm-item-qty {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.4;
}
.sm-item-qty strong {
  color: var(--acc2);
  font-weight: 700;
}
/* Итого — крупно */
.sm-item-total {
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  background: hsla(var(--accent-h),70%,50%,0.15);
  border-radius: 8px;
  padding: 0.4rem 0.7rem;
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.sm-item-total-label { font-size: 0.72rem; font-weight: 500; color: rgba(255,255,255,0.5); }
.sm-item-total-val { color: var(--acc); }

.sm-item-desc {
  font-size: 0.76rem;
  color: rgba(255,255,255,0.45);
  line-height: 1.45;
  margin-bottom: 0.4rem;
}
/* Подсказка — иконка ? */
.sm-item-hint {
  font-size: 0.76rem;
  color: hsla(var(--accent-h),70%,75%,0.85);
  line-height: 1.4;
  background: hsla(var(--accent-h),70%,50%,0.08);
  border: 1px solid hsla(var(--accent-h),70%,50%,0.15);
  border-radius: 8px;
  padding: 0.4rem 0.6rem;
  display: flex;
  gap: 0.35rem;
  align-items: flex-start;
  margin-bottom: 0.4rem;
}
.sm-item-hint-icon { flex-shrink: 0; font-size: 0.9rem; }

/* Кнопка выбора внизу карточки */
.sm-item-select-btn {
  display: block;
  width: 100%;
  padding: 0.6rem;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 0 0 16px 16px;
  border: none;
  border-top: 1px solid hsla(var(--accent-h),70%,50%,0.15);
  background: hsla(var(--accent-h),70%,50%,0.08);
  color: var(--acc);
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.02em;
  pointer-events: none;
}
.sm-item-card.selected .sm-item-select-btn {
  background: hsla(var(--accent-h),70%,50%,0.25);
  color: #fff;
}

/* ── Расходники на карточке в модале ─────────────────── */
.sm-item-cons {
  margin-top: 0.5rem;
  background: rgba(251,191,36,0.06);
  border: 1px solid rgba(251,191,36,0.18);
  border-radius: 7px;
  padding: 0.45rem 0.6rem;
  font-size: 0.74rem;
  pointer-events: none;   /* клик не мешает выбору карточки */
}
.sm-item-cons-title {
  color: rgba(251,191,36,0.75);
  font-weight: 600;
  margin-bottom: 0.3rem;
  font-size: 0.72rem;
  letter-spacing: 0.01em;
}
.sm-item-cons-row {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  padding: 0.12rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  flex-wrap: wrap;
}
.sm-item-cons-row:last-child { border-bottom: none; }
.sm-item-cons-name {
  color: rgba(255,255,255,0.7);
  flex: 1 1 120px;
}
.sm-item-cons-qty {
  color: rgba(251,191,36,0.8);
  white-space: nowrap;
  font-weight: 500;
}
.sm-item-cons-hint {
  cursor: help;
  font-size: 0.8rem;
  opacity: 0.6;
}
.sm-item-cons-hint:hover { opacity: 1; }
.sm-item-cons-total {
  margin-top: 0.3rem;
  padding-top: 0.3rem;
  border-top: 1px solid rgba(251,191,36,0.2);
  font-size: 0.76rem;
  color: rgba(251,191,36,0.9);
  text-align: right;
  font-weight: 500;
}

/* ── Работа в карточке материала ─────────────────────── */
.sm-item-work {
  margin-top: 0.5rem;
  background: hsla(var(--accent-h),70%,50%,0.07);
  border: 1px solid hsla(var(--accent-h),70%,50%,0.2);
  border-radius: 7px;
  padding: 0.45rem 0.6rem;
  font-size: 0.74rem;
  pointer-events: none;
}
.sm-item-work-title {
  color: var(--acc2);
  font-weight: 600;
  margin-bottom: 0.3rem;
  font-size: 0.72rem;
  letter-spacing: 0.01em;
}
.sm-item-work-row {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  padding: 0.12rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  flex-wrap: wrap;
}
.sm-item-work-row:last-child { border-bottom: none; }
.sm-item-work-name {
  color: rgba(255,255,255,0.7);
  flex: 1 1 120px;
}
.sm-item-work-price {
  color: var(--acc2);
  white-space: nowrap;
  font-weight: 500;
}

/* ── Работа в таблице итоговой сметы ─────────────────── */
.sm-est-work-row td {
  background: hsla(var(--accent-h),70%,50%,0.05);
  font-size: 0.82rem;
  color: rgba(255,255,255,0.75);
  padding-top: 0.3rem;
  padding-bottom: 0.3rem;
}
.sm-est-work-name {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding-left: 1.4rem !important;
}
.sm-est-work-sum {
  color: var(--acc2) !important;
  font-weight: 700 !important;
}

/* ── Расходники в таблице итоговой сметы ─────────────── */
.sm-est-cons-row td {
  background: rgba(251,191,36,0.04);
  font-size: 0.82rem;
  color: rgba(255,255,255,0.7);
  padding-top: 0.3rem;
  padding-bottom: 0.3rem;
}
.sm-est-cons-name {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding-left: 1.8rem !important;
}
.sm-est-cons-icon { font-size: 0.85rem; flex-shrink: 0; }
.sm-est-cons-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: rgba(251,191,36,0.15);
  color: rgba(251,191,36,0.8);
  font-size: 0.65rem;
  font-weight: 700;
  cursor: help;
  flex-shrink: 0;
}
.sm-est-cons-sum { color: rgba(251,191,36,0.85) !important; font-weight: 600; }
.sm-est-cons-badge {
  font-size: 0.75rem;
  background: rgba(251,191,36,0.1);
  border: 1px solid rgba(251,191,36,0.2);
  color: rgba(251,191,36,0.75);
  padding: 0.15rem 0.6rem;
  border-radius: 20px;
  margin-left: 0.5rem;
  white-space: nowrap;
}

/* ── Кнопка отключения расходника ─────────────────────── */
.sm-cons-toggle-btn {
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  margin-left: 0.5rem;
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: 4px;
  background: rgba(239,68,68,0.1);
  color: #f87171;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}
.sm-cons-toggle-btn:hover {
  background: rgba(239,68,68,0.2);
  border-color: rgba(239,68,68,0.5);
}

/* ── Отключённые расходники ──────────────────────────── */
.sm-est-cons-row.sm-est-cons-disabled td {
  opacity: 0.4;
  text-decoration: line-through;
}
.sm-est-cons-disabled .sm-cons-toggle-btn {
  border-color: rgba(34,197,94,0.3);
  background: rgba(34,197,94,0.1);
  color: #4ade80;
  text-decoration: none !important;
}
.sm-est-cons-disabled .sm-cons-toggle-btn:hover {
  border-color: rgba(34,197,94,0.5);
  background: rgba(34,197,94,0.2);
}
.sm-est-cons-sum-disabled {
  text-decoration: line-through;
  opacity: 0.5;
}

.sm-empty { padding: 2rem; text-align: center; color: rgba(255,255,255,0.35); }

/* ── Футер модала ────────────────────────────────────── */
.sm-modal-footer {
  padding-top: 1rem; border-top: 1px solid hsla(var(--accent-h),70%,50%,0.15);
  margin-top: 1rem; display: flex; justify-content: flex-end; gap: 0.5rem;
}

/* ═══════════════════════════════════════════════════════════
   СТЕНЫ — Блок «Работа → Варианты материала»
   ═══════════════════════════════════════════════════════════ */

/* Блок одной работы */
.sm-work-block {
  background: hsla(var(--accent-h),60%,15%,0.5);
  border: 1px solid hsla(var(--accent-h),70%,50%,0.2);
  border-radius: 14px;
  padding: 1rem 1.1rem 1.1rem;
  margin-bottom: 1.2rem;
}

.sm-work-block-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.3rem;
}

.sm-work-block-name {
  font-size: 1rem;
  font-weight: 700;
  color: #e8d8ff;
}

.sm-work-block-price {
  font-size: 0.82rem;
  color: #a78bfa;
  font-weight: 600;
}

.sm-work-block-desc {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 0.8rem;
  line-height: 1.4;
}

/* Сетка вариантов (Эконом / Стандарт / Премиум) */
.sm-work-variants {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.7rem;
}

/* Карточка одного варианта */
.sm-variant-card {
  position: relative;
  background: hsla(var(--accent-h),50%,12%,0.7);
  border: 2px solid hsla(var(--accent-h),60%,50%,0.2);
  border-radius: 12px;
  padding: 0.85rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}

.sm-variant-card:hover {
  border-color: hsla(var(--accent-h),80%,60%,0.5);
  background: hsla(var(--accent-h),50%,18%,0.7);
  transform: translateY(-2px);
}

.sm-variant-card.selected {
  border-color: hsl(var(--accent-h),80%,60%);
  background: hsla(var(--accent-h),70%,20%,0.9);
  box-shadow: 0 0 0 3px hsla(var(--accent-h),80%,60%,0.25);
}

/* Бейдж «рекомендуем» */
.sm-variant-card.recommended {
  border-color: hsla(40,90%,55%,0.5);
}
.sm-variant-rec-badge {
  position: absolute;
  top: -10px; right: 10px;
  background: linear-gradient(90deg,#f59e0b,#f97316);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Шапка карточки варианта */
.sm-variant-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.sm-variant-icon {
  font-size: 1.2rem;
}

.sm-variant-class {
  font-size: 0.88rem;
  font-weight: 700;
  color: #d4b8ff;
  flex: 1;
}

.sm-variant-check {
  font-size: 1rem;
}

/* Название материала */
.sm-variant-mat-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #f0e8ff;
  margin-bottom: 0.3rem;
  line-height: 1.3;
}

/* Поставщик */
.sm-variant-supplier {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.45);
  margin-bottom: 0.5rem;
}

/* Цены внутри варианта */
.sm-variant-prices {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-top: 0.4rem;
}

.sm-variant-price-row {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.6);
}

.sm-variant-price-row strong {
  color: #a78bfa;
}

/* Итоговая строка */
.sm-variant-total {
  margin-top: 0.5rem;
  padding-top: 0.4rem;
  border-top: 1px solid hsla(var(--accent-h),70%,50%,0.2);
  font-size: 0.85rem;
  font-weight: 700;
  color: #e8d8ff;
}

.sm-variant-total strong {
  color: hsl(var(--accent-h),80%,70%);
  font-size: 0.95rem;
}

/* Адаптив */
@media (max-width: 500px) {
  .sm-work-variants {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════════════════
   СТЕНЫ v2 — список строк (sw-*)
   ═══════════════════════════════════════════════════════════ */

/* Подсказка сверху */
.sw-hint {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 0.4rem;
  background: hsla(var(--accent-h),70%,50%,0.08);
  border-radius: 10px; padding: 0.7rem 1rem;
  margin-bottom: 1rem; font-size: 0.85rem;
}
.sw-hint-area  { color: #e8d8ff; }
.sw-hint-note  { color: rgba(255,255,255,0.45); font-size: 0.78rem; }

/* Блок одной работы */
.sw-work-block {
  margin-bottom: 1.2rem;
  border: 1px solid hsla(var(--accent-h),70%,50%,0.15);
  border-radius: 12px; overflow: hidden;
}

/* ── Блок solo-работ (работы без материалов: Запил, Укладка и т.п.) ── */
.sw-solo-works-block {
  margin: 1rem 0 0.5rem;
  border: 1px solid hsla(var(--accent-h),70%,50%,0.2);
  border-radius: 12px; overflow: hidden;
}
.sw-solo-works-title {
  padding: 0.6rem 1rem;
  font-size: 0.9rem; font-weight: 700; color: #e8d8ff;
  background: hsla(var(--accent-h),60%,18%,0.6);
}
.sw-solo-works-grid {
  display: flex; flex-direction: column; gap: 0;
}
.sw-solo-card {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid hsla(var(--accent-h),70%,50%,0.12);
  background: hsla(var(--accent-h),40%,10%,0.4);
  transition: background 0.15s;
}
.sw-solo-card:first-child { border-top: none; }
.sw-solo-card:hover { background: hsla(var(--accent-h),40%,14%,0.55); }
.sw-solo-card--on  { background: hsla(var(--accent-h),70%,18%,0.55) !important; }
.sw-solo-card-icon { font-size: 1.4rem; flex-shrink: 0; }
.sw-solo-card-body { flex: 1; min-width: 0; }
.sw-solo-name  { font-size: 0.95rem; font-weight: 600; color: #f0e8ff; margin-bottom: 0.15rem; }
.sw-solo-price { font-size: 0.82rem; color: #a78bfa; }
.sw-solo-total { font-size: 0.78rem; color: rgba(255,255,255,0.45); margin-top: 0.1rem; }
.sw-solo-desc  { font-size: 0.76rem; color: rgba(255,255,255,0.4); margin-top: 0.15rem; }
.sw-solo-actions {
  display: flex; flex-direction: column; gap: 0.4rem;
  align-items: flex-end; flex-shrink: 0;
}
@media (max-width: 480px) {
  .sw-solo-card { flex-wrap: wrap; }
  .sw-solo-actions { flex-direction: row; align-items: center; width: 100%; }
}

/* Заголовок работы */
.sw-work-title {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 0.4rem;
  background: hsla(var(--accent-h),60%,18%,0.6);
  padding: 0.65rem 1rem;
}
.sw-work-name  { font-size: 0.95rem; font-weight: 700; color: #e8d8ff; }
.sw-work-labor { font-size: 0.8rem;  font-weight: 600; color: #a78bfa; }
.sw-work-desc  {
  font-size: 0.76rem; color: rgba(255,255,255,0.45);
  padding: 0.35rem 1rem 0; line-height: 1.4;
  background: hsla(var(--accent-h),60%,18%,0.4);
}

/* Список материалов */
.sw-mats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.65rem;
  padding: 0.65rem;
  align-items: stretch;
}

/* ── Карточка одного материала ── */
.sw-mat-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-radius: 10px;
  border: 2px solid hsla(var(--accent-h),70%,50%,0.18);
  background: hsla(var(--accent-h),40%,10%,0.55);
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
  overflow: hidden;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  /* Одинаковая высота карточек в строке */
  align-self: stretch;
}
.sw-mat-card:hover  { border-color: hsla(var(--accent-h),70%,55%,0.4); background: hsla(var(--accent-h),40%,14%,0.6); }
.sw-mat-card:active { transform: scale(0.98); }
.sw-mat-card.selected {
  border-color: #a78bfa;
  background: hsla(var(--accent-h),70%,20%,0.5);
  box-shadow: 0 0 0 3px hsla(var(--accent-h),70%,60%,0.18);
}

/* Фото карточки */
.sw-card-img {
  width: 100%;
  height: 120px;
  overflow: hidden;
  background: hsla(var(--accent-h),30%,8%,0.5);
  flex-shrink: 0;
}
/* Нет фото — placeholder того же размера с иконкой */
.sw-card-img--no-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  background: hsla(var(--accent-h),30%,10%,0.4);
}
.sw-card-img--no-photo::after {
  content: '🪟';
  font-size: 2rem;
  opacity: 0.35;
}
.sw-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.3s ease;
}
.sw-mat-card:hover .sw-card-img img {
  transform: scale(1.04);
}

/* Шапка: метка варианта слева, галочка справа */
.sw-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.75rem 0.3rem;
  background: hsla(var(--accent-h),50%,8%,0.4);
}

/* Галочка выбора */
.sw-card-check {
  font-size: 1.15rem;
  flex-shrink: 0;
  transition: transform 0.15s;
}
.sw-card-check--on { transform: scale(1.1); }

/* Тело карточки: название + поставщик */
.sw-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.5rem 0.75rem 0.35rem;
  flex: 1;
}

/* Метка варианта */
.sw-mat-var {
  font-size: 0.63rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
  width: fit-content;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.sw-mat-var--eco  { background: hsla(120,50%,30%,0.4); color: #86efac; }
.sw-mat-var--std  { background: hsla(var(--accent-h),70%,35%,0.4); color: #c4b5fd; }
.sw-mat-var--prem { background: hsla(40,80%,35%,0.4); color: #fcd34d; }

.sw-mat-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #f0e8ff;
  line-height: 1.35;
  word-break: break-word;
}
.sw-mat-sup {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.35);
}

/* Блок цены */
.sw-card-price {
  padding: 0 0.75rem 0.4rem;
}
.sw-mat-price { font-size: 0.78rem; color: rgba(255,255,255,0.4); }
.sw-mat-total {
  font-size: 1rem;
  font-weight: 700;
  color: #a78bfa;
  white-space: nowrap;
}
.sw-mat-total small { font-size: 0.68rem; font-weight: 400; color: rgba(255,255,255,0.35); margin-left: 3px; }

/* Кнопки: выбрать + подробнее — одинаковые 50/50 */
.sw-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid hsla(var(--accent-h),70%,50%,0.12);
}

/* Кнопка «Выбрать» / «✅ Выбрано» */
.sw-select-btn {
  padding: 0.6rem 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  border-right: 1px solid hsla(var(--accent-h),70%,50%,0.12);
  background: hsla(var(--accent-h),60%,22%,0.5);
  color: #c4b5fd;
  text-align: center;
  transition: background 0.15s, color 0.15s;
  -webkit-tap-highlight-color: transparent;
  line-height: 1.2;
}
.sw-select-btn:hover  { background: hsla(var(--accent-h),60%,30%,0.6); }
.sw-select-btn:active { background: hsla(var(--accent-h),60%,35%,0.7); }
.sw-select-btn--on {
  background: hsla(var(--accent-h),70%,25%,0.7);
  color: #e8d8ff;
}
.sw-select-btn--on:hover {
  background: hsla(0,60%,28%,0.5);
  color: #fca5a5;
}

/* Кнопка «Подробнее ▾» — такая же ширина */
.sw-detail-btn {
  padding: 0.6rem 0.5rem;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: hsla(var(--accent-h),40%,15%,0.4);
  color: rgba(255,255,255,0.5);
  text-align: center;
  transition: background 0.15s, color 0.15s;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}
.sw-detail-btn:hover,
.sw-detail-btn:active { background: hsla(var(--accent-h),60%,25%,0.5); color: #c4b5fd; }

/* ── Раскрывающийся блок детального расчёта ── */
.sw-detail {
  border-top: 1px solid hsla(var(--accent-h),70%,50%,0.12);
  background: hsla(var(--accent-h),50%,6%,0.8);
  padding: 0.7rem 0.8rem 0.75rem;
}

/* Строка расчёта */
.sw-detail-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.1rem 0.4rem;
  font-size: 0.77rem;
  color: rgba(255,255,255,0.55);
  padding: 0.28rem 0;
  border-bottom: 1px solid hsla(var(--accent-h),70%,50%,0.06);
  align-items: baseline;
}
.sw-detail-row > span { display: block; }
.sw-detail-row > span:last-child:not(:first-child) {
  color: #a78bfa;
  font-weight: 600;
  padding-left: 0.5rem;
}
.sw-detail-row:last-of-type { border-bottom: none; }
.sw-detail-row strong       { color: #a78bfa; }
.sw-detail-row--cons        { color: rgba(255,255,255,0.38); font-size: 0.72rem; }

/* Заголовок блока расходников */
.sw-cons-header {
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0.5rem;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid hsla(var(--accent-h),70%,50%,0.1);
}

/* Название расходника */
.sw-detail-row--consname {
  margin-top: 0.3rem;
  padding-bottom: 0.05rem;
}
.sw-dr-consname {
  font-size: 0.77rem;
  font-weight: 500;
  color: rgba(200,185,255,0.75) !important;
}

/* Строка расчёта расходника */
.sw-detail-row--consline {
  padding-left: 1rem;
  color: rgba(255,255,255,0.45);
  font-size: 0.73rem;
  padding-top: 0;
  padding-bottom: 0.15rem;
  border-bottom: none;
}
.sw-detail-row--consline strong {
  color: rgba(167,139,250,0.85);
}

.sw-detail-total {
  margin-top: 0.6rem;
  padding-top: 0.5rem;
  border-top: 1px solid hsla(var(--accent-h),70%,50%,0.2);
  font-size: 0.88rem;
  font-weight: 700;
  color: #e8d8ff;
  text-align: right;
}
.sw-detail-total strong {
  color: hsl(var(--accent-h),80%,70%);
  font-size: 1.02rem;
}

/* Строка с названием материала — всегда на всю ширину */
.sw-detail-row--mat {
  grid-template-columns: 1fr;
  padding-bottom: 0.1rem;
  border-bottom: none;
}
.sw-dr-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: #c4b5fd;
  word-break: break-word;
}

/* Строка расчёта — формула + итог */
.sw-detail-row--calc {
  grid-template-columns: 1fr auto;
  gap: 0.3rem 0.6rem;
  padding-top: 0;
  font-size: 0.77rem;
  color: rgba(255,255,255,0.5);
  padding-left: 0.8rem;
}


/* ── Popup подсказки ── */
#sm-cat-hint-popup {
  position: absolute;
  z-index: 99999;
  width: 290px;
  background: #1e1535;
  border: 1px solid rgba(167,139,250,0.35);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.55);
  animation: sm-hint-in 0.15s ease;
}
@keyframes sm-hint-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.sm-cat-hint-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #c4b5fd;
  margin-bottom: 0.5rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(167,139,250,0.2);
}
.sm-cat-hint-body {
  font-size: 0.77rem;
  color: rgba(255,255,255,0.75);
  line-height: 1.55;
}
.sm-cat-hint-body b {
  color: #e2d9ff;
}

/* ── Адаптив iPad (601px – 1024px) ── */
@media (min-width: 601px) and (max-width: 1024px) {
  /* Модальное окно на весь экран без боковых отступов */
  .sm-modal {
    max-width: 100%;
    width: 100%;
    max-height: 96vh;
    border-radius: 12px;
  }
  .sm-modal-overlay { padding: 0.5rem; }

  /* Карточки — 2 колонки на iPad, достаточно места для деталей */
  .sw-mats {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    padding: 0.75rem;
  }

  /* Детальный расчёт — уже глобально однострочный */
  .sw-detail-row { font-size: 0.78rem; }

  /* Название материала чуть крупнее для читаемости */
  .sw-mat-name  { font-size: 0.92rem; }
  .sw-mat-total { font-size: 1rem; }

  /* Кнопки Выбрать / Подробнее — крупнее для пальца */
  .sw-select-btn { padding: 0.75rem 0.5rem; font-size: 0.86rem; }
  .sw-detail-btn { padding: 0.75rem 0.5rem; font-size: 0.86rem; }

  /* Заголовок работы */
  .sw-work-name  { font-size: 0.95rem; }
  .sw-work-labor { font-size: 0.82rem; }

  /* Конструктор — одна колонка, правая панель уходит вниз */
  .sm-app {
    grid-template-columns: 1fr !important;
  }

  /* Правая панель сметы — статичная, не sticky */
  .sm-estimate-panel {
    position: static !important;
    max-height: 400px !important;
  }

  /* Общий контейнер не выходит за экран */
  .rc-calculator,
  .rc-smeta-wrap,
  .sm-app {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
  }
}

/* ── Адаптив ≤600px (телефон) ── */
@media (max-width: 600px) {
  .sw-mats { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; padding: 0.5rem; }
  .sw-mat-card { border-radius: 8px; }
  .sw-card-img { height: 90px; }
  .sw-mat-name { font-size: 0.8rem; }
  .sw-mat-total { font-size: 0.88rem; }
  .sw-work-name  { font-size: 0.88rem; }
  .sw-work-labor { font-size: 0.76rem; }
  .sw-work-title { flex-direction: column; align-items: flex-start; gap: 0.2rem; }
  .sw-card-head { padding: 0.35rem 0.5rem 0.25rem; }
  .sw-card-body { padding: 0.4rem 0.5rem 0.3rem; }
  .sw-card-price { padding: 0 0.5rem 0.35rem; }
}

/* ── Адаптив ≤400px (маленький телефон) ── */
@media (max-width: 400px) {
  .sw-mats { grid-template-columns: repeat(2, 1fr); padding: 0.4rem; gap: 0.4rem; }
  .sw-card-img { height: 75px; }
  .sw-card-head  { padding: 0.3rem 0.45rem 0.2rem; }
  .sw-card-body  { padding: 0.35rem 0.45rem 0.25rem; }
  .sw-card-price { padding: 0 0.45rem 0.3rem; }
  .sw-select-btn { font-size: 0.72rem; padding: 0.45rem 0.4rem; }
  .sw-detail-btn { width: 36px; font-size: 0.68rem; }
  .sw-detail     { padding: 0.6rem 0.6rem 0.65rem; }
  .sw-detail-row { font-size: 0.72rem; grid-template-columns: 1fr; gap: 0.1rem; }
  .sw-detail-total { font-size: 0.82rem; }
}

/* ── Большая подсказка ───────────────────────────────── */
.sm-hint-full {
  display: flex; gap: 1rem; align-items: flex-start;
  background: hsla(var(--accent-h),70%,50%,0.08); border-radius: 10px; padding: 1rem;
  margin-bottom: 1rem;
}
.sm-hint-full-icon { font-size: 2rem; flex-shrink: 0; }
.sm-hint-full-text {
  font-size: 0.9rem; color: rgba(255,255,255,0.8); line-height: 1.65;
}

/* ── Печать сметы ────────────────────────────────────── */
@media print {
  .sm-constructor, .sm-modal-overlay, .sm-btn-add-room,
  .rc-tabs, header, footer, .sp-hero,
  .sp-steps, .sp-section:not(#calculator) { display: none !important; }
  .sm-app { grid-template-columns: 1fr !important; }
  .sm-estimate-panel { position: static !important; max-height: none !important; border: none !important; }
  .sm-estimate-panel, #sm-estimate-body, #sm-estimate-footer { overflow: visible !important; }
  .sm-est-table td, .sm-est-table th { color: #000 !important; }
  .sm-total-block { background: #f5f5f5 !important; }
  .sm-est-room-title, .sm-estimate-title { color: #000 !important; }
}

/* ══════════════════════════════════════════════════════════
   ОПРОСНИК СОСТОЯНИЯ ЗОНЫ
   ══════════════════════════════════════════════════════════ */

.sm-survey-card {
  background: hsl(var(--bg-h),15%,12%);
  border-radius: 20px;
  max-width: 600px;
  width: 92%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 12px 40px rgba(0,0,0,0.6);
}

.sm-survey-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid hsla(var(--accent-h),70%,50%,0.2);
}

.sm-survey-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0;
}

.sm-survey-body {
  padding: 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sm-survey-option {
  display: flex;
  gap: 1.2rem;
  align-items: center;
  background: hsla(var(--accent-h),70%,50%,0.05);
  border: 2px solid hsla(var(--accent-h),70%,50%,0.15);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.sm-survey-option:hover {
  transform: translateY(-2px);
  border-color: hsla(var(--accent-h),70%,50%,0.5);
  background: hsla(var(--accent-h),70%,50%,0.1);
  box-shadow: 0 8px 24px rgba(var(--acc-rgb),0.25);
}

.sm-survey-opt-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.sm-survey-opt-text {
  flex: 1;
}

.sm-survey-opt-label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.sm-survey-opt-desc {
  font-size: 0.85rem;
  color: var(--text2);
  line-height: 1.4;
}

.sm-survey-hint {
  background: hsla(45,100%,60%,0.12);
  border-left: 3px solid hsla(45,100%,60%,0.5);
  border-radius: 6px;
  padding: 0.8rem 1rem;
  font-size: 0.85rem;
  color: hsla(45,100%,70%,0.95);
  line-height: 1.5;
  margin-top: -0.5rem;
  margin-bottom: 0.25rem;
}

/* ══════════════════════════════════════════════════════════
   ЧЕРНОВЫЕ РАБОТЫ: КАРТОЧКИ ВОПРОСОВ
   ══════════════════════════════════════════════════════════ */

.sm-rough-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.sm-rough-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.25s;
}

.sm-rough-card:hover {
  border-color: var(--acc);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.sm-rough-photo {
  width: 100%;
  height: 140px;
  background-size: cover;
  background-position: center;
  background-color: var(--bg3);
}

.sm-rough-no-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  opacity: 0.3;
}

.sm-rough-content {
  padding: 1rem;
}

.sm-rough-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text1);
  margin-bottom: 0.5rem;
}

.sm-rough-desc {
  font-size: 0.85rem;
  color: var(--text2);
  line-height: 1.4;
  margin-bottom: 0.75rem;
}

.sm-rough-price {
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
  font-size: 0.85rem;
}

.sm-rough-price-work {
  color: var(--text2);
  margin-bottom: 0.25rem;
}

.sm-rough-price-cons {
  color: var(--text2);
  margin-bottom: 0.5rem;
}

.sm-rough-price-total {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--acc2);
}

.sm-rough-price-free {
  font-size: 1rem;
  font-weight: 600;
  color: #4ade80;
  text-align: center;
  padding: 0.5rem 0;
}

/* ══════════════════════════════════════════════════════════
   КАТЕГОРИИ ПОЛА — 3-уровневый выбор
   ══════════════════════════════════════════════════════════ */

/* Сетка кнопок категорий (Уровень 1) */
.sw-cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  padding: 0.75rem 1rem 1rem;
}
@media (min-width: 480px) {
  .sw-cat-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 700px) {
  .sw-cat-grid { grid-template-columns: repeat(4, 1fr); }
}

/* Кнопка одной категории */
.sw-cat-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.9rem 0.5rem 0.75rem;
  background: hsla(var(--accent-h),60%,18%,0.55);
  border: 1px solid hsla(var(--accent-h),70%,50%,0.25);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: inherit;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.sw-cat-btn:hover,
.sw-cat-btn:active {
  background: hsla(var(--accent-h),65%,24%,0.75);
  border-color: hsla(var(--accent-h),70%,55%,0.5);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px hsla(var(--accent-h),70%,40%,0.2);
}
.sw-cat-emoji {
  font-size: 1.8rem;
  line-height: 1;
}
.sw-cat-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #e0d0ff;
  line-height: 1.2;
}
.sw-cat-count {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.45);
}

/* Заголовок выбранной категории (Уровень 2) */
.sw-cat-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #c084fc;
  padding: 0.5rem 1rem 0.75rem;
  border-bottom: 1px solid hsla(var(--accent-h),70%,50%,0.15);
  margin-bottom: 0.25rem;
}

/* Строка с кнопкой «← Назад» и площадью */
.sw-hint--back {
  justify-content: flex-start;
  gap: 0.75rem;
}
.sw-back-btn {
  background: hsla(var(--accent-h),60%,25%,0.5);
  border: 1px solid hsla(var(--accent-h),70%,50%,0.3);
  border-radius: 8px;
  color: #e0d0ff;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.sw-back-btn:hover,
.sw-back-btn:active {
  background: hsla(var(--accent-h),60%,32%,0.65);
}

/* Пустой список */
.sw-empty {
  text-align: center;
  color: rgba(255,255,255,0.4);
  font-size: 0.85rem;
  padding: 2rem 1rem;
}

.sm-rough-hint {
  background: hsla(45,100%,60%,0.12);
  border-left: 3px solid hsla(45,100%,60%,0.5);
  border-radius: 6px;
  padding: 0.8rem 1rem;
  font-size: 0.85rem;
  color: hsla(45,100%,70%,0.95);
  line-height: 1.5;
  margin-top: 0.5rem;
}

/* ══════════════════════════════════════════════════════════
   МОБИЛЬНЫЕ ИСПРАВЛЕНИЯ — repair.html
   ══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* Общий контейнер не выходит за экран */
  .rc-calculator,
  .rc-smeta-wrap,
  .sm-app {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
  }

  /* Карточки типа ремонта — 2 колонки */
  .rc-types-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Карточки помещений — 2 колонки */
  .rc-rooms-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Карточки материалов — 2 колонки */
  .rc-mats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Опции — 1 колонка на мобильном */
  .rc-opts-grid {
    grid-template-columns: 1fr !important;
  }

  /* Срочность и выезд — 2 колонки */
  .rc-urg-grid,
  .rc-visit-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Карточки не обрезаются */
  .rc-room-btn,
  .rc-mat-btn,
  .rc-urg-btn,
  .rc-visit-btn,
  .rc-opt-btn {
    min-width: 0 !important;
    word-break: break-word;
  }

  /* Текст в карточках чуть меньше */
  .rc-room-name, .rc-mat-name, .rc-urg-name,
  .rc-visit-name, .rc-mat-desc, .rc-room-desc {
    font-size: 0.75rem !important;
  }

  /* Иконки чуть меньше */
  .rc-room-icon, .rc-mat-icon { font-size: 1.3rem !important; }

  /* Смета правая панель — под калькулятором */
  .rc-calculator {
    grid-template-columns: 1fr !important;
  }

  /* Смета по комнатам тоже в одну колонку */
  .rc-smeta-wrap {
    grid-template-columns: 1fr !important;
  }

  /* Конструктор сметы — одна колонка */
  .sm-app {
    grid-template-columns: 1fr !important;
  }

  /* Панель сметы конструктора — не sticky */
  .sm-estimate-panel {
    position: static !important;
    max-height: 400px !important;
  }

  /* Метки площади — 2 колонки вместо 4 */
  .rc-area-labels {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Паддинги блоков поменьше */
  .rc-formula-block,
  .rc-result-header {
    padding: 0.75rem 1rem !important;
  }

  .rc-formula-row {
    font-size: 0.78rem !important;
  }

  /* Опросник состояния */
  .sm-survey-card {
    width: 96%;
    max-width: 100%;
  }
  .sm-survey-header {
    padding: 1rem 1.2rem;
  }
  .sm-survey-title {
    font-size: 1.1rem;
  }
  .sm-survey-body {
    padding: 1rem 1.2rem;
  }
  .sm-survey-option {
    padding: 0.85rem 1rem;
    gap: 0.8rem;
  }
  .sm-survey-opt-icon {
    font-size: 1.5rem;
  }
  .sm-survey-opt-label {
    font-size: 0.9rem;
  }
  .sm-survey-opt-desc {
    font-size: 0.8rem;
  }
  .sm-survey-hint {
    font-size: 0.8rem;
    padding: 0.7rem 0.85rem;
  }
}

/* ══════════════════════════════════════════════════════════
   КАРТОЧКИ ПОЗИЦИЙ — компактный вид (2 кнопки)
   ══════════════════════════════════════════════════════════ */

/* Грид — 2 колонки на мобиле, 3 на десктопе */
.sm-items-grid {
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 0.7rem;
}
@media (max-width: 520px) {
  .sm-items-grid { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
}

/* Враппер медиа — кликабелен для детального просмотра */
.sm-item-media-wrap {
  position: relative;
  cursor: pointer;
}
.sm-item-media-wrap:hover .sm-item-media { opacity: 0.85; }
.sm-item-media-wrap:hover .sm-item-media-placeholder { opacity: 0.85; }

/* Бейдж типа поверх медиа */
.sm-item-type-badge {
  position: absolute;
  top: 7px; left: 7px;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  pointer-events: none;
  max-width: calc(100% - 14px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Основная карточка — тело кликает на детали */
.sm-item-body {
  padding: 0.65rem 0.75rem 0.4rem;
  cursor: pointer;
}

/* Краткий итог работы */
.sm-item-work-brief {
  font-size: 0.72rem;
  color: var(--acc2);
  margin-top: 0.2rem;
  opacity: 0.85;
}
/* Краткий итог расходников */
.sm-item-cons-brief {
  font-size: 0.72rem;
  color: rgba(251,191,36,0.8);
  margin-top: 0.15rem;
}
/* Ссылка "Подробнее" */
.sm-item-detail-link {
  font-size: 0.7rem;
  color: hsla(var(--accent-h),70%,70%,0.8);
  margin-top: 0.35rem;
  letter-spacing: 0.02em;
}

/* Кнопка "В смету" — теперь кликабельная (pointer-events: auto) */
.sm-item-select-btn {
  pointer-events: auto !important;
  cursor: pointer;
}
.sm-item-select-btn:hover {
  background: hsla(var(--accent-h),70%,50%,0.2);
  color: #fff;
}
.sm-item-card.selected .sm-item-select-btn:hover {
  background: hsla(var(--accent-h),70%,50%,0.4);
}

/* ══════════════════════════════════════════════════════════
   ДЕТАЛЬНЫЙ ПРОСМОТР — оверлей поверх модала
   ══════════════════════════════════════════════════════════ */
#sm-detail-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
}
#sm-detail-overlay.visible {
  display: flex;
}

.sm-detail-overlay-inner {
  position: relative;
  width: 100%;
  max-width: 480px;
  background: var(--bg2, #0d0d2b);
  border: 1px solid hsla(var(--accent-h),70%,50%,0.35);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,0.7), 0 0 0 1px hsla(var(--accent-h),70%,80%,0.06) inset;
  max-height: 92vh;
  overflow-y: auto;
  scroll-behavior: smooth;
}
.sm-detail-overlay-inner::-webkit-scrollbar { width: 4px; }
.sm-detail-overlay-inner::-webkit-scrollbar-track { background: transparent; }
.sm-detail-overlay-inner::-webkit-scrollbar-thumb { background: hsla(var(--accent-h),70%,50%,0.3); border-radius: 4px; }

.sm-detail-overlay-close {
  position: sticky;
  top: 10px; right: 10px;
  float: right;
  margin: 10px 10px 0 0;
  z-index: 2;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  width: 34px; height: 34px;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.sm-detail-overlay-close:hover { background: rgba(255,255,255,0.2); }

.sm-detail-overlay-content { padding: 0; }

/* Детальный просмотр — внутренние блоки */
.sm-detail-wrap { padding-bottom: 1rem; }

/* Фото */
.sm-detail-photo-wrap {
  width: 100%;
  max-height: 260px;
  overflow: hidden;
  background: linear-gradient(135deg, hsla(var(--accent-h),60%,15%,0.8), hsla(var(--accent-h),40%,8%,0.9));
}
.sm-detail-photo-wrap img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
}

/* Видео */
.sm-detail-video-wrap {
  width: 100%;
  background: #000;
}
.sm-detail-video-wrap iframe {
  width: 100%;
  height: 220px;
  display: block;
}

/* Заглушка без фото */
.sm-detail-no-photo {
  width: 100%;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  background: linear-gradient(135deg, hsla(var(--accent-h),60%,15%,0.6), hsla(var(--accent-h),40%,8%,0.9));
}

/* Шапка */
.sm-detail-header {
  padding: 1rem 1.1rem 0.6rem;
}
.sm-detail-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--acc2);
  background: hsla(var(--accent-h),70%,50%,0.12);
  border: 1px solid hsla(var(--accent-h),70%,50%,0.25);
  border-radius: 20px;
  padding: 2px 10px;
  margin-bottom: 0.5rem;
}
.sm-detail-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 0.4rem;
}
.sm-detail-price-big {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--acc);
}
.sm-detail-unit {
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255,255,255,0.45);
}
.sm-detail-work-price {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--acc2);
  margin-top: 0.3rem;
  opacity: 0.9;
}

/* Блок расчётов */
.sm-detail-calc-block {
  margin: 0 1.1rem 0.8rem;
  background: hsla(var(--accent-h),70%,50%,0.07);
  border: 1px solid hsla(var(--accent-h),70%,50%,0.18);
  border-radius: 12px;
  overflow: hidden;
}
.sm-detail-calc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.85rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.65);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.sm-detail-calc-row:last-child { border-bottom: none; }
.sm-detail-calc-row span:last-child { color: #fff; text-align: right; }
.sm-detail-calc-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 0.85rem;
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  background: hsla(var(--accent-h),70%,50%,0.18);
  border-top: 1px solid hsla(var(--accent-h),70%,50%,0.3);
}
.sm-detail-calc-total span:last-child { color: var(--acc); }
.sm-detail-no-area {
  margin: 0 1.1rem 0.8rem;
  padding: 0.65rem 0.85rem;
  background: rgba(251,191,36,0.06);
  border: 1px solid rgba(251,191,36,0.18);
  border-radius: 10px;
  font-size: 0.8rem;
  color: rgba(251,191,36,0.8);
}

/* Секции описания, подсказки */
.sm-detail-section {
  margin: 0 1.1rem 0.8rem;
  background: rgba(255,255,255,0.03);
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
}
.sm-detail-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.4);
  margin-bottom: 0.4rem;
}
.sm-detail-desc {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.75);
  line-height: 1.55;
}
.sm-detail-hint {
  font-size: 0.85rem;
  color: hsla(var(--accent-h),70%,75%,0.9);
  line-height: 1.55;
}

/* Расходники в детальном */
.sm-detail-cons {
  margin: 0 1.1rem 0.8rem;
  background: rgba(251,191,36,0.04);
  border: 1px solid rgba(251,191,36,0.15);
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  font-size: 0.82rem;
}
.sm-detail-cons .sm-detail-section-title { color: rgba(251,191,36,0.6); }
.sm-detail-note {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.35);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  margin-left: 0.3rem;
}
.sm-detail-cons-row {
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.sm-detail-cons-row:last-child { border-bottom: none; }
.sm-cons-nonorm {
  font-size: 0.75rem;
  cursor: help;
  opacity: 0.7;
}
.sm-detail-cons-name {
  display: block;
  color: rgba(255,255,255,0.75);
  margin-bottom: 0.15rem;
  font-weight: 500;
}
.sm-detail-cons-calc {
  display: block;
  color: rgba(251,191,36,0.8);
  font-size: 0.78rem;
}
.sm-detail-cons-hint {
  font-size: 0.74rem;
  color: hsla(var(--accent-h),70%,70%,0.7);
  margin-top: 0.15rem;
}
.sm-detail-cons-total {
  margin-top: 0.5rem;
  padding-top: 0.4rem;
  border-top: 1px solid rgba(251,191,36,0.2);
  font-size: 0.82rem;
  color: rgba(251,191,36,0.9);
  text-align: right;
}

/* ── Пикер плинтуса ─────────────────────────────────────────── */
.sm-cons-plinth-row { background: rgba(139,92,246,0.06); border-radius: 10px; }
.sm-cons-base { font-size: 0.72rem; color: rgba(255,255,255,0.4); }
.sm-plinth-picker-wrap { margin-top: 0.6rem; }
.sm-plinth-picker-title {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 0.5rem;
}
.sm-plinth-picker-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}
.sm-plinth-opt {
  background: rgba(255,255,255,0.05);
  border: 1.5px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 0.5rem;
  cursor: pointer;
  transition: all 0.18s;
  position: relative;
  text-align: center;
}
.sm-plinth-opt:hover { border-color: rgba(139,92,246,0.5); background: rgba(139,92,246,0.1); }
.sm-plinth-opt--active {
  border-color: var(--acc);
  background: rgba(139,92,246,0.2);
  box-shadow: 0 0 0 2px rgba(139,92,246,0.25);
}
.sm-plinth-opt-photo {
  width: 100%;
  height: 60px;
  object-fit: cover;
  border-radius: 7px;
  margin-bottom: 0.3rem;
}
.sm-plinth-opt-name  { font-size: 0.72rem; font-weight: 600; color: #e8d8ff; margin-bottom: 0.15rem; }
.sm-plinth-opt-price { font-size: 0.7rem;  color: rgba(255,255,255,0.5); }
.sm-plinth-opt-total { font-size: 0.72rem; font-weight: 700; color: #a78bfa; margin-top: 0.1rem; }
.sm-plinth-opt-check {
  position: absolute; top: 4px; right: 6px;
  font-size: 0.75rem;
}

/* Кнопки действий */
.sm-detail-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0 1.1rem 1rem;
}
.sm-detail-add-btn {
  width: 100%;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, hsla(var(--accent-h),70%,40%,1), hsla(var(--accent-h),70%,55%,1));
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 20px hsla(var(--accent-h),70%,50%,0.35);
}
.sm-detail-add-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px hsla(var(--accent-h),70%,50%,0.5);
}
.sm-detail-add-btn.added {
  background: linear-gradient(135deg, #16a34a, #22c55e);
  box-shadow: 0 4px 20px rgba(34,197,94,0.35);
}
.sm-detail-back-btn {
  width: 100%;
  padding: 0.7rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.6);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.sm-detail-back-btn:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

/* ══════════════════════════════════════════════════════════
   BUILD-CALC-UI v2.0 — Стили строительного калькулятора
   ══════════════════════════════════════════════════════════ */

/* Заблокированная секция (следующий шаг) */
.rc-section-locked {
  opacity: 0.5;
  pointer-events: none;
  background: rgba(255,255,255,0.015);
  border-color: rgba(255,255,255,0.06) !important;
}
.rc-section-locked .rc-section-header {
  padding-bottom: 0;
}

/* Обёртка карточки типа дома с кнопкой Подробнее */
.bc-type-card-wrap {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.bc-type-card-wrap .rc-type-btn {
  border-radius: 12px 12px 0 0 !important;
  border-bottom: none !important;
  margin-bottom: 0 !important;
}
.bc-type-info-btn {
  display: block;
  width: 100%;
  padding: 6px 10px;
  font-size: 0.72rem;
  color: #a78bfa;
  background: rgba(167,139,250,0.08);
  border: 1px solid rgba(167,139,250,0.2);
  border-top: none;
  border-radius: 0 0 12px 12px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
  letter-spacing: 0.02em;
}
.bc-type-info-btn:hover {
  background: rgba(167,139,250,0.18);
  color: #c4b5fd;
}
.bc-type-card-wrap .rc-type-btn.rc-active + .bc-type-info-btn {
  border-color: rgba(167,139,250,0.5);
  background: rgba(167,139,250,0.12);
  color: #c4b5fd;
}

/* Кнопка "Что входит?" внутри карточки */
.bc-included-hint {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.72rem;
  color: #4ade80;
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(74,222,128,0.1);
  border: 1px solid rgba(74,222,128,0.25);
  transition: all 0.2s;
  white-space: nowrap;
}
.bc-included-hint:hover { background: rgba(74,222,128,0.2); }

/* Прогресс-бар сметы */
.bc-progress-bar {
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
  margin: 0.75rem 1.25rem 0.5rem;
  overflow: hidden;
}
.bc-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--acc), #4ade80);
  border-radius: 4px;
  transition: width 0.4s ease;
}
.bc-progress-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.6rem;
  padding: 0 1.25rem 0.75rem;
}
.bc-ps {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.3);
  display: flex; align-items: center; gap: 3px;
}
.bc-ps.done { color: #4ade80; }

/* Поле метров забора */
.bc-fence-meters {
  margin-top: 1.25rem;
  padding-top: 1.1rem;
  border-top: 1px solid hsla(var(--accent-h),70%,50%,0.2);
}
.bc-fence-meters .rc-form-label {
  display: block;
  margin-bottom: 0.6rem;
}

/* ── Кровля: тип + угол ──────────────────────────────── */
.bc-roof-sub {
  font-size: 0.82rem;
  font-weight: 700;
  color: #a78bfa;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 1.1rem 0 0.55rem;
}
.bc-shape-grid {
  grid-template-columns: repeat(3, 1fr) !important;
}
.bc-angles-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.bc-angle-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.6rem 0.4rem;
  background: hsla(var(--accent-h),70%,50%,0.08);
  border: 2px solid hsla(var(--accent-h),70%,50%,0.2);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.18s;
  font-family: inherit;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.bc-angle-btn:hover {
  border-color: hsla(var(--accent-h),70%,50%,0.5);
  background: hsla(var(--accent-h),70%,50%,0.15);
}
.bc-angle-btn.rc-active {
  background: linear-gradient(135deg, hsla(var(--accent-h),70%,50%,0.4), hsla(var(--accent-h),70%,33%,0.35));
  border-color: var(--acc);
  box-shadow: 0 0 0 3px hsla(var(--accent-h),70%,50%,0.25);
}
.bc-angle-deg {
  font-size: 1.1rem;
  font-weight: 800;
  color: #e8d8ff;
}
.bc-angle-desc {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.5);
}
.bc-roof-area-info {
  margin: 0.85rem 0 0.25rem;
  padding: 0.65rem 0.9rem;
  background: hsla(var(--accent-h),70%,50%,0.1);
  border: 1px solid hsla(var(--accent-h),70%,50%,0.25);
  border-radius: 8px;
  font-size: 0.88rem;
  color: #c0c0d8;
}
.bc-roof-area-info strong { color: #e8d8ff; font-weight: 700; }
.bc-roof-coef { font-size: 0.78rem; color: #a78bfa; margin-left: 0.4rem; }

@media (max-width: 500px) {
  .bc-angles-grid { grid-template-columns: repeat(4, 1fr); gap: 0.35rem; }
  .bc-shape-grid  { grid-template-columns: repeat(3, 1fr) !important; }
  .bc-angle-deg   { font-size: 0.95rem; }
}

.bc-fence-total {
  margin-top: 0.75rem;
  padding: 0.7rem 1rem;
  background: rgba(74,222,128,0.1);
  border: 1px solid rgba(74,222,128,0.3);
  border-radius: 10px;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
}
.bc-fence-total strong { color: #4ade80; font-size: 1.1rem; }
.bc-fence-hint {
  margin-top: 0.6rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.3);
  font-style: italic;
}

/* ── Демо-плашка ─────────────────────────────────────────────────────────── */
.bc-demo-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  margin-top: 0.4rem;
  padding: 0.15rem 0.5rem;
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: 4px;
  font-size: 0.7rem;
  color: #fbbf24;
  font-weight: 600;
  letter-spacing: 0.03em;
  pointer-events: none;
  white-space: nowrap;
}
/* Карточка-демо: чуть притушенная рамка */
.bc-demo-card {
  border-color: rgba(251, 191, 36, 0.2) !important;
  opacity: 0.88;
}
.bc-demo-card:hover {
  border-color: rgba(251, 191, 36, 0.5) !important;
  opacity: 1;
}

/* Основная сетка (алиас для rc-calculator) */
.rc-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 1050px) { .rc-layout { grid-template-columns: 1fr; } }

/* Размеры дома — сетка полей */
.bc-dims-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-top: 0.75rem;
}
.bc-dim-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Сводка размеров */
.bc-dims-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  margin-top: 1rem;
  padding: 0.85rem 1.1rem;
  background: hsla(var(--accent-h),70%,50%,0.1);
  border: 1px solid hsla(var(--accent-h),70%,50%,0.3);
  border-radius: 10px;
  font-size: 0.88rem;
  color: #c084fc;
}
.bc-dims-summary span { display: flex; gap: 0.35rem; align-items: center; }
.bc-dims-summary strong { color: #e8d8ff; font-weight: 700; }

/* ── Смета (правая колонка) ── */
.rc-smeta-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid hsla(var(--accent-h),70%,50%,0.3);
  border-radius: 16px;
  overflow: hidden;
  position: sticky;
  top: 80px;
}
@media (max-width: 1050px) { .rc-smeta-card { position: static; } }

.rc-smeta-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, hsla(var(--accent-h),70%,50%,0.25), hsla(var(--accent-h),70%,33%,0.2));
  border-bottom: 1px solid hsla(var(--accent-h),70%,50%,0.25);
}
.rc-smeta-title { font-size: 1rem; font-weight: 700; color: #e8d8ff; }
.rc-smeta-badge {
  font-size: 0.72rem; font-weight: 700;
  background: hsla(var(--accent-h),70%,50%,0.25);
  border: 1px solid hsla(var(--accent-h),70%,50%,0.4);
  color: #c084fc; padding: 3px 10px; border-radius: 20px;
}
.rc-smeta-info {
  padding: 0.65rem 1.25rem;
  font-size: 0.8rem; color: rgba(255,255,255,0.45);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* Строки сметы */
.rc-smeta-lines { padding: 0.75rem 1.25rem; display: flex; flex-direction: column; gap: 0.5rem; max-height: 340px; overflow-y: auto; }
.rc-smeta-lines::-webkit-scrollbar { width: 4px; }
.rc-smeta-lines::-webkit-scrollbar-thumb { background: hsla(var(--accent-h),70%,50%,0.4); border-radius: 4px; }

.rc-smeta-empty { padding: 1.5rem; text-align: center; color: rgba(255,255,255,0.35); font-size: 0.85rem; line-height: 1.6; }

.rc-smeta-line {
  display: grid;
  grid-template-columns: 1.5rem 1fr auto auto;
  gap: 0.4rem;
  align-items: baseline;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 0.82rem;
}
.rc-smeta-line:last-child { border-bottom: none; }
.rc-smeta-line-icon { font-size: 0.9rem; }
.rc-smeta-line-name { color: rgba(255,255,255,0.75); }
.rc-smeta-line-qty { color: rgba(255,255,255,0.35); font-size: 0.75rem; text-align: right; }
.rc-smeta-line-price { color: #c084fc; font-weight: 700; text-align: right; white-space: nowrap; }

/* Итог */
.rc-smeta-total {
  padding: 1rem 1.25rem;
  border-top: 1px solid hsla(var(--accent-h),70%,50%,0.3);
  background: hsla(var(--accent-h),70%,50%,0.08);
}
.rc-smeta-total-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.95rem; font-weight: 600; color: rgba(255,255,255,0.9);
  margin-bottom: 0.35rem;
}
.rc-smeta-total-val { font-size: 1.4rem; font-weight: 800; color: #c084fc; }
.rc-smeta-per-m2 { font-size: 0.78rem; color: rgba(255,255,255,0.4); margin-bottom: 0.75rem; }
.rc-smeta-note { font-size: 0.72rem; color: rgba(255,255,255,0.3); line-height: 1.5; margin-bottom: 0.75rem; }

/* Кнопка заказа */
.rc-order-btn {
  display: block; width: 100%;
  padding: 0.9rem 1.5rem;
  background: var(--grad-btn);
  color: #fff; border: none; border-radius: 10px;
  font-family: inherit; font-size: 0.95rem; font-weight: 700;
  cursor: pointer; transition: all 0.25s;
  box-shadow: 0 4px 15px hsla(var(--accent-h),70%,50%,0.35);
}
.rc-order-btn:hover { filter: brightness(1.12); transform: translateY(-2px); }

/* Прогресс заполнения */
.rc-smeta-progress {
  padding: 0.85rem 1.25rem;
  display: flex; flex-wrap: wrap; gap: 0.5rem;
}
.rc-progress-item {
  font-size: 0.78rem; color: rgba(255,255,255,0.35);
  display: flex; align-items: center; gap: 0.3rem;
}
.rc-progress-item.done { color: #4ade80; }

/* Инпут в модале */
.rc-modal-input {
  width: 100%; padding: 0.85rem 1rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid hsla(var(--accent-h),70%,50%,0.35);
  border-radius: 10px; color: #f0f0f0;
  font-family: inherit; font-size: 0.9rem; outline: none;
  transition: border-color 0.2s;
}
.rc-modal-input:focus { border-color: var(--acc); }
.rc-modal-input::placeholder { color: rgba(255,255,255,0.25); }

/* Мобильная адаптация build-calc */
@media (max-width: 768px) {
  .rc-layout { grid-template-columns: 1fr !important; }
  .bc-dims-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .rc-smeta-card { position: static !important; }
  .rc-smeta-lines { max-height: 280px; }
}
}

/* ══════════════════════════════════════════════════════════
   REPAIR-QUIZ — Опросник перед сметой
   ══════════════════════════════════════════════════════════ */

/* Обёртка */
.rq-wrap {
  background: rgba(255,255,255,0.03);
  border: 1px solid hsla(var(--accent-h),70%,50%,0.22);
  border-radius: 20px;
  padding: 2rem 1.5rem 1.5rem;
  max-width: 700px;
  margin: 0 auto;
  animation: rqFadeIn 0.35s ease;
}
@keyframes rqFadeIn {
  from { opacity:0; transform: translateY(14px); }
  to   { opacity:1; transform: translateY(0); }
}

/* Прогресс-бар */
.rq-progress {
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
  margin-bottom: 0.5rem;
  overflow: hidden;
}
.rq-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, hsl(var(--accent-h),70%,50%), hsl(var(--accent-h),70%,70%));
  border-radius: 4px;
  transition: width 0.5s ease;
}
.rq-step-label {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.35);
  text-align: right;
  margin-bottom: 1.5rem;
  letter-spacing: 0.06em;
}

/* Заголовок шага */
.rq-header { text-align: center; margin-bottom: 1.75rem; }
.rq-emoji  { font-size: 2.4rem; margin-bottom: 0.5rem; }
.rq-title  {
  font-size: 1.25rem; font-weight: 800;
  color: #f1f5f9; margin: 0 0 0.4rem;
  line-height: 1.3;
}
.rq-hint {
  font-size: 0.85rem; color: rgba(255,255,255,0.45);
  margin: 0;
}

/* Сетка карточек */
.rq-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
@media (max-width: 500px) {
  .rq-cards { grid-template-columns: 1fr; }
}

.rq-card {
  background: rgba(255,255,255,0.04);
  border: 1.5px solid hsla(var(--accent-h),70%,50%,0.2);
  border-radius: 14px;
  padding: 1rem 1rem 0.85rem;
  cursor: pointer;
  transition: all 0.22s;
  text-align: left;
}
.rq-card:hover {
  border-color: hsla(var(--accent-h),70%,50%,0.55);
  background: hsla(var(--accent-h),70%,50%,0.08);
  transform: translateY(-2px);
}
.rq-card--active {
  border-color: hsl(var(--accent-h),70%,60%) !important;
  background: hsla(var(--accent-h),70%,50%,0.18) !important;
  box-shadow: 0 0 0 3px hsla(var(--accent-h),70%,50%,0.2);
}
.rq-card-emoji { font-size: 1.6rem; margin-bottom: 0.4rem; }
.rq-card-label {
  font-size: 0.95rem; font-weight: 700;
  color: #e0d0ff; margin-bottom: 0.25rem;
}
.rq-card-desc {
  font-size: 0.78rem; color: rgba(255,255,255,0.45);
  line-height: 1.4;
}

/* Блок площади */
.rq-area-wrap { margin-bottom: 1rem; }
.rq-area-presets {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  margin-bottom: 1rem;
}
.rq-preset {
  padding: 0.45rem 0.9rem;
  border-radius: 20px;
  border: 1px solid hsla(var(--accent-h),70%,50%,0.3);
  background: rgba(255,255,255,0.04);
  color: #c4b5fd; font-size: 0.82rem; font-weight: 600;
  cursor: pointer; transition: all 0.18s; font-family: inherit;
}
.rq-preset:hover,
.rq-preset--active {
  background: hsla(var(--accent-h),70%,50%,0.2);
  border-color: hsl(var(--accent-h),70%,60%);
  color: #fff;
}
.rq-area-input-row {
  display: flex; align-items: center; gap: 0.6rem;
  margin-bottom: 1rem;
}
.rq-area-inp {
  flex: 1; max-width: 180px;
  padding: 0.65rem 0.9rem;
  border-radius: 10px;
  border: 1.5px solid hsla(var(--accent-h),70%,50%,0.3);
  background: rgba(255,255,255,0.05);
  color: #f1f5f9; font-size: 1rem; font-family: inherit;
  outline: none; transition: border 0.2s;
}
.rq-area-inp:focus { border-color: hsl(var(--accent-h),70%,60%); }
.rq-area-unit {
  font-size: 0.9rem; color: rgba(255,255,255,0.4);
}

/* Превью цены */
.rq-price-preview {
  background: hsla(var(--accent-h),70%,50%,0.1);
  border: 1px solid hsla(var(--accent-h),70%,50%,0.3);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  text-align: center;
  margin-top: 0.5rem;
}
.rq-price-label {
  font-size: 0.78rem; color: rgba(255,255,255,0.45);
  margin-bottom: 0.3rem; text-transform: uppercase; letter-spacing: 0.06em;
}
.rq-price-range {
  font-size: 1.4rem; font-weight: 800;
  color: hsl(var(--accent-h),70%,72%);
  margin-bottom: 0.25rem;
}
.rq-price-note {
  font-size: 0.75rem; color: rgba(255,255,255,0.35);
}

/* Навигация */
.rq-nav {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid hsla(var(--accent-h),70%,50%,0.12);
}
.rq-btn-back {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px; padding: 0.6rem 1.1rem;
  color: rgba(255,255,255,0.6); font-size: 0.88rem;
  font-family: inherit; cursor: pointer; transition: all 0.18s;
}
.rq-btn-back:hover {
  background: rgba(255,255,255,0.1); color: #fff;
}
.rq-btn-primary {
  background: var(--grad-btn);
  border: none; border-radius: 10px;
  padding: 0.65rem 1.4rem;
  color: #fff; font-size: 0.9rem; font-weight: 700;
  font-family: inherit; cursor: pointer; transition: all 0.2s;
  box-shadow: 0 4px 18px hsla(var(--accent-h),70%,50%,0.35);
}
.rq-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px hsla(var(--accent-h),70%,50%,0.5);
}
.rq-btn-lg { padding: 0.8rem 1.8rem; font-size: 1rem; }
.rq-btn-ghost {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px; padding: 0.65rem 1.1rem;
  color: rgba(255,255,255,0.5); font-size: 0.85rem;
  font-family: inherit; cursor: pointer; transition: all 0.18s;
}
.rq-btn-ghost:hover {
  border-color: rgba(255,255,255,0.3); color: #fff;
}
.rq-skip {
  font-size: 0.8rem; color: rgba(255,255,255,0.3);
  cursor: pointer; text-decoration: underline;
  text-decoration-style: dotted;
  transition: color 0.18s;
}
.rq-skip:hover { color: rgba(255,255,255,0.6); }

/* Финальный экран */
.rq-result {
  text-align: center; padding: 0.5rem 0;
  animation: rqFadeIn 0.35s ease;
}
.rq-result-icon { font-size: 3rem; margin-bottom: 0.75rem; }
.rq-result-title {
  font-size: 1.35rem; font-weight: 800;
  color: #f1f5f9; margin: 0 0 0.4rem;
}
.rq-result-sub {
  font-size: 0.88rem; color: rgba(255,255,255,0.45);
  margin: 0 0 1.25rem;
}
.rq-tags {
  display: flex; flex-wrap: wrap;
  justify-content: center; gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.rq-tag {
  background: hsla(var(--accent-h),70%,50%,0.15);
  border: 1px solid hsla(var(--accent-h),70%,50%,0.3);
  border-radius: 20px; padding: 0.3rem 0.85rem;
  font-size: 0.82rem; color: #c4b5fd; font-weight: 600;
}
.rq-result-actions {
  display: flex; flex-direction: column;
  align-items: center; gap: 0.75rem;
  margin-top: 1.5rem;
}

/* Срочный баннер */
.rq-urgent {
  display: flex; align-items: center;
  gap: 0.75rem; flex-wrap: wrap;
  background: rgba(37,211,102,0.1);
  border: 1px solid rgba(37,211,102,0.3);
  border-radius: 12px; padding: 0.85rem 1rem;
  font-size: 0.85rem; color: rgba(255,255,255,0.8);
  line-height: 1.5;
}
.rq-urgent-icon { font-size: 1.4rem; flex-shrink: 0; }
.rq-btn-wa {
  margin-left: auto;
  background: #25D366;
  border-radius: 8px; padding: 0.5rem 1rem;
  color: #fff; font-weight: 700; font-size: 0.82rem;
  white-space: nowrap; text-decoration: none;
  transition: opacity 0.18s;
}
.rq-btn-wa:hover { opacity: 0.85; }

/* Контейнер квиза в секции */
.rq-section {
  margin-bottom: 2rem;
}
.rq-section-header {
  text-align: center; margin-bottom: 1.5rem;
}
.rq-section-badge {
  display: inline-block;
  background: hsla(var(--accent-h),70%,50%,0.15);
  border: 1px solid hsla(var(--accent-h),70%,50%,0.3);
  border-radius: 20px; padding: 0.3rem 1rem;
  font-size: 0.75rem; font-weight: 700;
  color: hsl(var(--accent-h),70%,70%);
  letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.rq-section-title {
  font-size: 1.1rem; font-weight: 700;
  color: #e0d0ff; margin: 0 0 0.3rem;
}
.rq-section-sub {
  font-size: 0.82rem; color: rgba(255,255,255,0.4);
  margin: 0;
}
