/* ============================================================
   GLOSS — дизайн-система (тёмная, современная)
   ============================================================ */
:root {
  --bg: #06060a;
  --bg-soft: #0c0c14;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-2: rgba(255, 255, 255, 0.07);
  --surface-3: rgba(255, 255, 255, 0.1);
  --stroke: rgba(255, 255, 255, 0.09);
  --stroke-strong: rgba(255, 255, 255, 0.18);

  --text: #f5f6fa;
  --text-dim: #aab0bf;
  --text-secondary: #d3d8e4;
  --text-faint: #6a7080;

  --violet: #7c5cff;
  --cyan: #2ad9ff;
  --accent: linear-gradient(135deg, #7c5cff 0%, #2ad9ff 100%);
  --accent-soft: linear-gradient(135deg, rgba(124, 92, 255, 0.22), rgba(42, 217, 255, 0.16));

  --green: #34e0a1;
  --red: #ff5d73;
  --amber: #ffce4f;

  --radius-xs: 10px;
  --radius-sm: 14px;
  --radius: 18px;
  --radius-lg: 26px;

  --shadow: 0 18px 50px -22px rgba(0, 0, 0, 0.75);
  --shadow-glow: 0 16px 44px -12px rgba(124, 92, 255, 0.5);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --display: 'Space Grotesk', var(--font);

  --bar-h: 132px;
}

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

/* атрибут hidden должен скрывать даже у элементов с display:flex/grid */
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  scrollbar-width: none;       /* Firefox: скрыть полосу прокрутки */
  -ms-overflow-style: none;
  background: var(--bg);       /* фон под адресной строкой/overscroll — иначе снизу обрезается */
  min-height: 100%;
  overscroll-behavior: none;   /* убрать резиновый скролл/«дёрганье» там где не нужно */
}
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;               /* WebKit/Blink: убрать полосу прокрутки */
}

/* Нативные form-контролы не наследуют шрифт и цвет — задаём явно,
   иначе текст внутри <button> рендерится системным чёрным */
button,
input,
textarea,
select {
  font-family: inherit;
  color: inherit;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100dvh;
  overflow-x: hidden;
  overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Фоновые свечения */
body::before,
body::after {
  content: '';
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  pointer-events: none;
}
body::before {
  width: 460px;
  height: 460px;
  top: -160px;
  left: -120px;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.55), transparent 70%);
  animation: float1 16s ease-in-out infinite;
}
body::after {
  width: 420px;
  height: 420px;
  bottom: -160px;
  right: -120px;
  background: radial-gradient(circle, rgba(42, 217, 255, 0.4), transparent 70%);
  animation: float2 20s ease-in-out infinite;
}
@keyframes float1 {
  50% { transform: translate(60px, 80px) scale(1.1); }
}
@keyframes float2 {
  50% { transform: translate(-50px, -60px) scale(1.08); }
}

::selection { background: rgba(124, 92, 255, 0.4); }

/* ── Каркас приложения ──────────────────────────────────── */
.app {
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
}

.header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(14px + env(safe-area-inset-top)) 18px 14px;
  background: rgba(6, 6, 10, 0.72);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--stroke);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--text);
}
.brand__mark {
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 11px;
  box-shadow: var(--shadow-glow);
}
.brand__name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.04em;
  line-height: 1;
}
.brand__tag {
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.03em;
}

.header__actions { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 13px;
  border-radius: 11px;
  border: 1px solid var(--stroke);
  background: var(--surface);
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: 0.2s;
  text-decoration: none;
}
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn:hover { color: var(--text); border-color: var(--stroke-strong); background: var(--surface-2); }
.icon-btn--square { width: 38px; padding: 0; }
.icon-btn.is-hidden { display: none; }

/* «Мои записи» — выделенная акцентная кнопка с лёгким свечением */
.icon-btn--my {
  color: #fff;
  border-color: transparent;
  background: var(--accent);
  box-shadow: var(--shadow-glow);
}
.icon-btn--my:hover {
  color: #fff;
  border-color: transparent;
  background: var(--accent);
  box-shadow: 0 16px 40px -10px rgba(124, 92, 255, 0.7);
}
.icon-btn--my::after {
  content: '';
  position: absolute;
  top: 4px;
  right: 4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 2px var(--bg);
}
.icon-btn--my { position: relative; }

/* Переключатель языка */
.lang { position: relative; }
.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 11px;
  border-radius: 11px;
  border: 1px solid var(--stroke);
  background: var(--surface);
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  transition: 0.2s;
}
.lang-btn:hover { color: var(--text); border-color: var(--stroke-strong); background: var(--surface-2); }
.lang-btn svg { width: 17px; height: 17px; }
.lang-btn .chev { width: 13px; height: 13px; opacity: 0.7; transition: transform 0.2s; }
.lang.is-open .lang-btn .chev { transform: rotate(180deg); }
.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 176px;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid var(--stroke-strong);
  background: rgba(18, 18, 26, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 50;
  animation: stepIn 0.18s ease;
}
.lang.is-open .lang-menu { display: flex; }
.lang-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  text-align: left;
  transition: 0.15s;
}
.lang-opt:hover { background: var(--surface-2); color: var(--text); }
.lang-opt.is-active { color: var(--text); background: var(--accent-soft); }
.lang-opt .flag { font-size: 18px; line-height: 1; }
.lang-opt .nm { flex: 1; }
.lang-opt .tick { width: 16px; height: 16px; color: var(--violet); opacity: 0; flex: none; }
.lang-opt.is-active .tick { opacity: 1; }

/* ── Контент / шаги ─────────────────────────────────────── */
.main {
  flex: 1;
  padding: 18px 18px calc(var(--bar-h) + env(safe-area-inset-bottom) + 18px);
}
/* на главном экране (без нижней панели) — меньше нижнего отступа */
.app.is-home .main {
  padding-bottom: calc(env(safe-area-inset-bottom) + 26px);
}

/* ── Главный экран: разделы ─────────────────────────────── */
.home-hero { margin: 8px 2px 22px; }
.home-hero__title {
  font-family: var(--display);
  font-size: clamp(26px, 7vw, 32px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.home-hero__hint { color: var(--text-secondary); font-size: 15px; margin-top: 8px; }

.sections { display: flex; flex-direction: column; gap: 13px; }
.section-card {
  display: flex;
  align-items: center;
  gap: 15px;
  width: 100%;
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--stroke-strong);
  background: var(--surface-2);
  cursor: pointer;
  transition: transform 0.18s, border-color 0.2s, background 0.2s;
  text-align: left;
  font-family: var(--font);
  color: var(--text);
}
.section-card:hover:not(.is-locked) { background: var(--surface-3); border-color: var(--violet); }
.section-card:active:not(.is-locked) { transform: scale(0.99); }
.section-card__icon {
  width: 54px;
  height: 54px;
  flex: none;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px rgba(124, 92, 255, 0.4);
  color: var(--text);
}
.section-card__icon svg { width: 27px; height: 27px; }
.section-card__body { display: block; flex: 1; min-width: 0; }
.section-card__title { display: block; font-family: var(--display); font-weight: 700; font-size: 17.5px; }
.section-card__desc { display: block; font-size: 14px; color: var(--text-secondary); margin-top: 4px; line-height: 1.4; }
.section-card__desc:empty { display: none; }
.section-card__go { flex: none; color: var(--text-faint); display: flex; }
.section-card__go svg { width: 22px; height: 22px; }

.section-card.is-locked { cursor: not-allowed; opacity: 0.6; }
.section-card.is-locked .section-card__icon {
  background: var(--surface-3);
  box-shadow: none;
  color: var(--text-faint);
}
.section-card__soon {
  flex: none;
  font-size: 10.5px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ── Мои записи ─────────────────────────────────────────── */
.my-list { display: flex; flex-direction: column; gap: 12px; }
.my-card {
  padding: 16px 17px;
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  background: var(--surface);
  position: relative;
  transition: box-shadow 0.3s, border-color 0.3s;
}
/* подсветка записи, открытой из пуша (одноразовая вспышка, без остаточного свечения) */
.my-card.is-flash { animation: cardFlash 2.2s ease; }
@keyframes cardFlash {
  0%, 100% { box-shadow: 0 0 0 0 rgba(124, 92, 255, 0); }
  15%, 60% { box-shadow: 0 0 0 2px rgba(124, 92, 255, 0.6), var(--shadow-glow); }
}
.my-card::before {
  content: '';
  position: absolute;
  left: 0; top: 14px; bottom: 14px;
  width: 3px; border-radius: 3px;
  background: var(--text-faint);
}
.my-card--new::before { background: var(--amber); }
.my-card--confirmed::before { background: var(--cyan); }
.my-card--done::before { background: var(--green); }
.my-card--cancelled { opacity: 0.6; }
.my-card--cancelled::before { background: var(--red); }
.my-card--cancelled .my-card__service { text-decoration: line-through; }
.my-card__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.my-card__service { font-weight: 600; font-size: 15px; padding-left: 8px; }
.my-card__status {
  flex: none;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 7px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.my-card__meta { font-size: 13.5px; color: var(--text-secondary); margin-top: 7px; padding-left: 8px; line-height: 1.45; }
.my-card__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; padding-left: 8px; }
.my-card__price { font-family: var(--display); font-weight: 600; font-size: 16px; }
.my-card__cancel {
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: var(--surface-2);
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: 0.16s;
}
.my-card__cancel:hover { color: var(--red); border-color: rgba(255, 93, 115, 0.5); }
.st-new { background: rgba(255, 206, 79, 0.16); color: var(--amber); }
.st-confirmed { background: rgba(42, 217, 255, 0.16); color: var(--cyan); }
.st-done { background: rgba(52, 224, 161, 0.16); color: var(--green); }
.st-cancelled { background: rgba(255, 93, 115, 0.16); color: var(--red); }

.hero {
  margin: 6px 2px 20px;
}
.hero h1 {
  font-family: var(--display);
  font-size: clamp(26px, 7vw, 34px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.01em;
}
.hero h1 .grad {
  background: var(--accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p {
  margin-top: 8px;
  color: var(--text-dim);
  font-size: 14.5px;
}

/* Степпер */
.stepper {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 2px 18px;
}
.stepper__item {
  flex: 0 1 auto;
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.stepper__dot {
  width: 27px;
  height: 27px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12.5px;
  font-weight: 700;
  border: 1px solid var(--stroke-strong);
  color: var(--text-faint);
  background: var(--surface);
  transition: 0.3s;
}
.stepper__label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-faint);
  white-space: nowrap;
  transition: 0.3s;
}
.stepper__item.is-active .stepper__dot {
  background: var(--accent);
  border-color: transparent;
  color: #fff;
  box-shadow: var(--shadow-glow);
}
.stepper__item.is-active .stepper__label { color: var(--text); }
.stepper__item.is-done .stepper__dot {
  background: rgba(52, 224, 161, 0.16);
  border-color: rgba(52, 224, 161, 0.5);
  color: var(--green);
}
.stepper__line {
  flex: 1;
  height: 1.5px;
  background: var(--stroke);
  border-radius: 2px;
  min-width: 8px;
}

/* Шаги */
.step { display: none; animation: stepIn 0.4s cubic-bezier(0.22, 1, 0.36, 1); }
.step.is-active { display: block; }
@keyframes stepIn {
  from { opacity: 0; transform: translateY(10px); }
}

.step__title {
  font-family: var(--display);
  font-size: 21px;
  font-weight: 600;
  margin-bottom: 4px;
}
.step__hint {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 16px;
}

/* Чипы категорий */
.cat-row {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  padding: 2px 2px 12px;
  margin: 0 -2px 4px;
  scrollbar-width: none;
}
.cat-row::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  border-radius: 13px;
  border: 1px solid var(--stroke);
  background: var(--surface);
  color: var(--text-dim);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
  white-space: nowrap;
}
.chip svg { width: 17px; height: 17px; opacity: 0.85; }
.chip:hover { background: var(--surface-2); color: var(--text); }
.chip.is-active {
  color: var(--text);
  border-color: transparent;
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px rgba(124, 92, 255, 0.5);
}
.chip.is-active svg { opacity: 1; }

/* Карточка услуги */
.cards { display: flex; flex-direction: column; gap: 11px; }
.card-select {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 17px;
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  background: var(--surface);
  cursor: pointer;
  transition: transform 0.18s, border-color 0.2s, background 0.2s;
  overflow: hidden;
}
.card-select:hover { background: var(--surface-2); border-color: var(--stroke-strong); }
.card-select:active { transform: scale(0.99); }
.card-select.is-selected {
  border-color: transparent;
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1.5px var(--violet), var(--shadow-glow);
}
.card-select__body { flex: 1; min-width: 0; }
.card-select__title { font-weight: 600; font-size: 15.5px; }
.card-select__desc {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin-top: 4px;
}
.card-select__price {
  text-align: right;
  flex: none;
}
.card-select__amount {
  font-family: var(--display);
  font-weight: 600;
  font-size: 16px;
  white-space: nowrap;
}
.card-select__from { font-size: 11px; color: var(--text-faint); display: block; }
.card-select__check {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  display: none;
  place-items: center;
  box-shadow: var(--shadow-glow);
}
.card-select__check svg { width: 13px; height: 13px; }
.card-select.is-selected .card-select__check { display: grid; }
.card-select.is-selected .card-select__price { opacity: 0; }

/* Сегмент-контрол (тип кузова) */
.field-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-dim);
  margin: 22px 2px 10px;
  letter-spacing: 0.02em;
}
.segment {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}
.segment__opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 58px;
  padding: 10px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--stroke);
  background: var(--surface);
  cursor: pointer;
  text-align: center;
  transition: 0.18s;
}
.segment__opt:hover { background: var(--surface-2); }
.segment__opt.is-selected {
  border-color: transparent;
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1.5px var(--violet);
}
.segment__label { font-weight: 600; font-size: 14px; color: var(--text); line-height: 1.2; }
.segment__hint { font-size: 11.5px; color: var(--text-secondary); white-space: nowrap; line-height: 1.2; }
.segment__opt.is-selected .segment__hint { color: var(--text-dim); }
.segment--2 { grid-template-columns: repeat(2, 1fr); }

/* ── База «включено» (пена/вода/сушка) ──────────────────── */
.base-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0 6px;
  padding: 13px 15px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(52, 224, 161, 0.4);
  background: rgba(52, 224, 161, 0.08);
}
.base-note__l { display: flex; align-items: center; gap: 11px; min-width: 0; }
.base-note__dot {
  width: 26px; height: 26px; flex: none;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--green);
}
.base-note__dot svg { width: 15px; height: 15px; }
.base-note__t { font-weight: 700; font-size: 14.5px; }
.base-note__s { font-size: 12.5px; color: var(--text-secondary); margin-top: 1px; }
.base-note__p {
  flex: none;
  font-family: var(--display);
  font-weight: 700;
  font-size: 16px;
  display: flex; align-items: baseline; gap: 7px;
  white-space: nowrap;
}

/* ── Конструктор: позиция-переключатель ─────────────────── */
.ci {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 14px 15px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--stroke);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, transform 0.16s;
  text-align: left;
  font-family: var(--font);
  color: var(--text);
}
.ci:hover { background: var(--surface-2); border-color: var(--stroke-strong); }
.ci:active { transform: scale(0.99); }
.ci.is-selected {
  border-color: transparent;
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1.5px var(--violet);
}
.ci__check {
  width: 24px; height: 24px; flex: none;
  border-radius: 8px;
  border: 1.5px solid var(--stroke-strong);
  display: grid; place-items: center;
  transition: 0.16s;
}
.ci__check svg { width: 14px; height: 14px; opacity: 0; }
.ci.is-selected .ci__check { background: var(--accent); border-color: transparent; box-shadow: var(--shadow-glow); }
.ci.is-selected .ci__check svg { opacity: 1; }
.ci__body { flex: 1; min-width: 0; }
.ci__title {
  font-weight: 600; font-size: 15px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.ci__desc { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.ci__tag {
  font-size: 9.5px; font-weight: 700;
  padding: 2px 7px; border-radius: 6px;
  text-transform: uppercase; letter-spacing: 0.03em;
}
.ci__tag--gift { background: rgba(52, 224, 161, 0.16); color: var(--green); }
.ci__tag--prem { background: rgba(124, 92, 255, 0.18); color: #b9a6ff; }
.ci__price {
  flex: none;
  display: flex; flex-direction: column; align-items: flex-end; gap: 4px;
  white-space: nowrap;
}
.ci__prow { display: flex; align-items: baseline; gap: 7px; font-family: var(--display); font-weight: 700; font-size: 16px; }
.ci__old {
  font-family: var(--font); font-weight: 600; font-size: 12.5px;
  color: var(--text-faint); text-decoration: line-through;
}
.ci__now { color: var(--text); }
.ci__gift { font-family: var(--font); font-weight: 700; font-size: 13px; color: var(--green); }
/* Мелкая метка над/у цены: «премиум», «в подарок» */
.ci__plabel {
  font-family: var(--font);
  font-size: 9.5px; font-weight: 700;
  padding: 2px 7px; border-radius: 6px;
  text-transform: uppercase; letter-spacing: 0.03em;
}
.ci__plabel--prem { background: rgba(124, 92, 255, 0.18); color: #b9a6ff; }
.ci__plabel--gift { background: rgba(52, 224, 161, 0.16); color: var(--green); }

/* Выбор опций у конкретной позиции (материал, количество, размер) */
.ci-wrap { display: flex; flex-direction: column; }
.ci-opt { margin-top: 8px; }
.ci-opt__label {
  margin: 0 0 6px 2px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.ci-mat { display: flex; gap: 8px; margin-top: 8px; }
.ci-opt .ci-mat { margin-top: 0; }
.ci-mat__opt {
  flex: 1;
  padding: 9px 8px;
  border-radius: 11px;
  border: 1px solid var(--stroke);
  background: var(--surface);
  color: var(--text-dim);
  font-weight: 600;
  font-size: 13px;
  font-family: var(--font);
  cursor: pointer;
  transition: 0.16s;
}
.ci-mat__opt:hover { background: var(--surface-2); color: var(--text); }
.ci-mat__opt.is-active {
  color: var(--text);
  border-color: transparent;
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px rgba(124, 92, 255, 0.5);
}

/* старая цена в нижней панели + скидка в сводке */
.bar-old {
  font-family: var(--font); font-weight: 600; font-size: 14px;
  color: var(--text-faint); text-decoration: line-through;
}
.summary__save { color: var(--green) !important; }

/* ── Реферальная программа ──────────────────────────────── */
.referral {
  margin-bottom: 16px;
  padding: 17px 18px;
  border-radius: var(--radius);
  border: 1px solid rgba(124, 92, 255, 0.4);
  background: var(--accent-soft);
}
.referral__title { font-family: var(--display); font-weight: 700; font-size: 16px; }
.referral__sub { font-size: 13px; color: var(--text-secondary); margin-top: 3px; }
.referral__progress {
  height: 7px; border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden; margin: 13px 0 7px;
}
.referral__bar {
  height: 100%; border-radius: 4px;
  background: var(--accent);
  transition: width 0.4s ease;
}
.referral__bar.is-done { background: var(--green); box-shadow: 0 0 12px -2px var(--green); }
.referral__count { font-size: 12.5px; color: var(--text-secondary); }
.referral__count b { color: var(--green); }
.referral__done {
  margin-top: 10px;
  padding: 9px 13px;
  border-radius: var(--radius-sm);
  background: rgba(52, 224, 161, 0.15);
  border: 1px solid rgba(52, 224, 161, 0.5);
  color: var(--green);
  font-weight: 700;
  font-size: 13.5px;
}
.referral__code {
  display: flex; align-items: center; gap: 10px;
  margin-top: 14px;
}
.referral__code-val {
  flex: 1;
  font-family: var(--display); font-weight: 700; font-size: 19px;
  letter-spacing: 0.14em;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--stroke-strong);
  background: rgba(0, 0, 0, 0.25);
  text-align: center;
}
.referral__copy {
  flex: none;
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--accent);
  color: #fff;
  font-weight: 600; font-size: 13.5px; font-family: var(--font);
  cursor: pointer;
  box-shadow: var(--shadow-glow);
  transition: transform 0.16s;
}
.referral__copy:active { transform: scale(0.96); }

/* ── Аккаунт (необязательный) ───────────────────────────── */
.account { margin-bottom: 14px; }
.account__teaser {
  padding: 16px 17px;
  border-radius: var(--radius);
  border: 1px solid var(--stroke-strong);
  background: var(--surface-2);
}
.account__title { font-family: var(--display); font-weight: 700; font-size: 15.5px; }
.account__sub { font-size: 13px; color: var(--text-secondary); margin: 5px 0 13px; line-height: 1.45; }
.account__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  background: var(--surface);
}
.account__name { font-weight: 700; font-size: 15px; }
.account__phone { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.account__logout {
  flex: none;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: var(--surface-2);
  color: var(--text-dim);
  font-weight: 600;
  font-size: 13px;
  font-family: var(--font);
  cursor: pointer;
  transition: 0.16s;
}
.account__logout:hover { color: var(--red); border-color: rgba(255, 93, 115, 0.5); }
.account__perk {
  margin-top: 10px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  border: 1px solid rgba(124, 92, 255, 0.4);
  font-weight: 600;
  font-size: 13.5px;
}

/* Баннер «день рождения» в мастере */
.bday-banner {
  margin: 14px 0 4px;
  padding: 12px 15px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  border: 1px solid rgba(124, 92, 255, 0.45);
  font-weight: 700;
  font-size: 14px;
}

/* Лист входа / регистрации */
.auth-error {
  margin: 2px 0 12px;
  padding: 10px 13px;
  border-radius: 11px;
  background: rgba(255, 93, 115, 0.12);
  border: 1px solid rgba(255, 93, 115, 0.5);
  color: #ff8a99;
  font-size: 13px;
  font-weight: 600;
}
.auth-note { margin-top: 12px; text-align: center; font-size: 12.5px; color: var(--text-faint); }
/* Поле даты рождения — компактнее (нативный date по умолчанию слишком крупный) */
#authBday {
  padding: 9px 13px;
  font-size: 15px;
  min-height: 0;
  width: auto;
  min-width: 170px;
  -webkit-appearance: none;
  appearance: none;
}

/* Дни */
.date-row {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  padding: 2px 2px 14px;
  margin: 0 -2px;
  scrollbar-width: none;
}
.date-row::-webkit-scrollbar { display: none; }
.day {
  flex: none;
  width: 60px;
  padding: 12px 6px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--stroke-strong);
  background: var(--surface-2);
  text-align: center;
  cursor: pointer;
  transition: 0.18s;
}
.day:hover { background: var(--surface-3); border-color: var(--violet); }
.day__wd { font-size: 11px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.04em; }
.day__num { font-family: var(--display); font-weight: 600; font-size: 19px; margin-top: 3px; }
.day__mon { font-size: 10.5px; color: var(--text-faint); }
.day.is-selected {
  border-color: transparent;
  background: var(--accent);
  box-shadow: var(--shadow-glow);
}
.day.is-selected .day__wd,
.day.is-selected .day__mon { color: rgba(255, 255, 255, 0.85); }
.day.is-today::after {
  content: '';
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--cyan);
  margin: 4px auto 0;
}
.day.is-selected.is-today::after { background: #fff; }

/* Слоты времени */
.slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
  gap: 9px;
  margin-top: 6px;
}
.slot {
  padding: 13px 4px;
  border-radius: 12px;
  border: 1.5px solid var(--stroke-strong);
  background: var(--surface-2);
  color: var(--text);
  font-weight: 700;
  font-size: 14.5px;
  cursor: pointer;
  transition: 0.16s;
  font-family: var(--font);
}
.slot:hover:not(:disabled) { background: var(--surface-3); border-color: var(--violet); }

/* частично занято, но ещё можно записаться — жёлтым */
.slot--partial {
  border-color: rgba(255, 206, 79, 0.55);
  background: rgba(255, 206, 79, 0.1);
  color: var(--amber);
}
.slot--partial:hover:not(:disabled) { border-color: var(--amber); background: rgba(255, 206, 79, 0.18); }

/* выбранное время — максимально явно */
.slot.is-selected {
  border-color: #fff;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  box-shadow: var(--shadow-glow), 0 0 0 2px rgba(124, 92, 255, 0.55);
  transform: scale(1.06);
}

/* занятые / прошедшие — «убраны»: бледные, перечёркнутые, недоступные */
.slot--gone,
.slot:disabled {
  border: 1px dashed var(--stroke);
  background: transparent;
  color: var(--text-faint);
  opacity: 0.28;
  cursor: not-allowed;
  text-decoration: line-through;
  font-weight: 500;
  box-shadow: none;
  transform: none;
}

.empty-note {
  text-align: center;
  color: var(--text-dim);
  font-size: 13.5px;
  padding: 30px 16px;
  border: 1px dashed var(--stroke);
  border-radius: var(--radius);
  background: var(--surface);
}

/* Поля формы */
.field { margin-bottom: 14px; }
.field > label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-dim);
  margin: 0 2px 7px;
}
.field .opt { color: var(--text-faint); font-weight: 500; }
.input,
.textarea {
  width: 100%;
  padding: 14px 15px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--stroke);
  background: var(--surface);
  color: var(--text);
  font-size: 16px; /* 16px — чтобы iOS не зумил поле при фокусе */
  font-family: var(--font);
  transition: 0.18s;
}
.textarea { resize: vertical; min-height: 80px; }
.input::placeholder,
.textarea::placeholder { color: var(--text-faint); }
.input:focus,
.textarea:focus {
  outline: none;
  border-color: var(--violet);
  background: var(--surface-2);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.18);
}
.input.is-error { border-color: var(--red); box-shadow: 0 0 0 3px rgba(255, 93, 115, 0.16); }

/* Сводка */
.summary {
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  background: var(--surface);
  padding: 4px 16px;
  margin-top: 4px;
}
.summary__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--stroke);
}
.summary__row:last-child { border-bottom: none; }
.summary__row .k { color: var(--text-dim); flex: none; }
.summary__row .v { text-align: right; font-weight: 600; }
.summary__row.total .k { color: var(--text); font-weight: 600; }
.summary__row.total .v {
  font-family: var(--display);
  font-size: 21px;
  background: var(--accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ── Нижняя панель действий ─────────────────────────────── */
.actionbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 55%, transparent);
}
.actionbar__inner {
  max-width: 540px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 13px 15px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--stroke-strong);
  background: rgba(14, 14, 22, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}
.actionbar__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 4px;
  min-height: 24px;
}
.actionbar__cap { font-size: 12px; color: var(--text-faint); }
.actionbar__price {
  font-family: var(--display);
  font-weight: 600;
  font-size: 22px;
  line-height: 1;
  white-space: nowrap;
}
.actionbar__price.empty { color: var(--text-faint); font-size: 14px; font-weight: 500; font-family: var(--font); }
.actionbar__row { display: flex; gap: 10px; }
.actionbar__row .btn--primary { flex: 1; }

/* Кнопки */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: none;
  border-radius: 15px;
  font-family: var(--font);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.16s, box-shadow 0.2s, opacity 0.2s;
  white-space: nowrap;
  text-decoration: none;
}
.btn svg { width: 18px; height: 18px; }
.btn--primary {
  padding: 14px 22px;
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-glow);
}
.btn--primary:hover { box-shadow: 0 18px 50px -10px rgba(124, 92, 255, 0.6); }
.btn--primary:active { transform: scale(0.97); }
.btn--block { width: 100%; }
.btn--ghost {
  padding: 13px 20px;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--stroke);
}
.btn--ghost:hover { background: var(--surface-3); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.btn--back {
  width: 50px;
  height: 50px;
  flex: none;
  padding: 0;
  border-radius: 15px;
  background: var(--surface-2);
  border: 1px solid var(--stroke);
  color: var(--text-dim);
}
.btn--back svg { width: 20px; height: 20px; }
.btn--back.is-hidden { display: none; }

/* ── Экран успеха ───────────────────────────────────────── */
.success {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 36px 22px;
  animation: stepIn 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.success.is-active { display: flex; }
.success__badge {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  box-shadow: var(--shadow-glow);
  margin-bottom: 22px;
  position: relative;
}
.success__badge::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1.5px solid rgba(124, 92, 255, 0.3);
  animation: ping 1.8s ease-out infinite;
}
@keyframes ping {
  to { transform: scale(1.25); opacity: 0; }
}
.success__badge svg { width: 46px; height: 46px; color: var(--green); }
.success h2 { font-family: var(--display); font-size: 25px; font-weight: 700; }
.success p { color: var(--text-dim); margin-top: 8px; font-size: 14.5px; max-width: 320px; }
.success .summary { width: 100%; text-align: left; margin: 24px 0; }
.success__actions { display: flex; flex-direction: column; gap: 11px; width: 100%; }

/* ── Модалка / нижний лист ──────────────────────────────── */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;
  align-items: flex-end;
  justify-content: center;
  animation: fade 0.2s;
}
.sheet-backdrop.is-open { display: flex; }
@keyframes fade { from { opacity: 0; } }
.sheet {
  width: 100%;
  max-width: 540px;
  background: var(--bg-soft);
  border: 1px solid var(--stroke);
  border-bottom: none;
  border-radius: 24px 24px 0 0;
  padding: 10px 22px calc(26px + env(safe-area-inset-bottom));
  animation: sheetUp 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes sheetUp { from { transform: translateY(100%); } }
.sheet__grip {
  width: 42px;
  height: 4px;
  border-radius: 3px;
  background: var(--stroke-strong);
  margin: 6px auto 18px;
}
.sheet h3 { font-family: var(--display); font-size: 20px; margin-bottom: 14px; }
.sheet ol { margin: 0 0 22px; padding-left: 20px; color: var(--text-secondary); font-size: 14.5px; line-height: 1.85; }
.sheet ol b { color: var(--text); }
.sheet ol li { margin-bottom: 6px; }
.sheet .ios-share {
  display: inline-flex;
  width: 22px;
  height: 22px;
  vertical-align: -5px;
  color: var(--cyan);
}

/* Вкладки платформ в листе установки */
.install-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.install-tab {
  flex: 1;
  padding: 10px 8px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: var(--surface);
  color: var(--text-dim);
  font-weight: 600;
  font-size: 13.5px;
  font-family: var(--font);
  cursor: pointer;
  transition: 0.16s;
}
.install-tab:hover { background: var(--surface-2); color: var(--text); }
.install-tab.is-active {
  color: var(--text);
  border-color: transparent;
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px rgba(124, 92, 255, 0.5);
}
.install-title { font-weight: 700; font-size: 14px; color: var(--text-secondary); margin-bottom: 12px; }

/* ── Тост ───────────────────────────────────────────────── */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--bar-h) + 22px);
  transform: translate(-50%, 20px);
  z-index: 80;
  max-width: 90%;
  padding: 13px 18px;
  border-radius: 14px;
  background: rgba(20, 20, 30, 0.95);
  border: 1px solid var(--stroke-strong);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: 0.3s;
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }
.toast.is-error { border-color: rgba(255, 93, 115, 0.6); }

/* Плашка обновления приложения */
.update-bar {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 18px);
  transform: translateX(-50%);
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 11px;
  max-width: calc(100% - 24px);
  padding: 9px 9px 9px 15px;
  border-radius: 14px;
  background: rgba(20, 20, 30, 0.97);
  border: 1px solid var(--stroke-strong);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: fade 0.25s ease;
}
.update-bar svg { width: 18px; height: 18px; color: var(--cyan); flex: none; }
.update-bar span { font-size: 13.5px; font-weight: 600; color: var(--text); white-space: nowrap; }
.update-bar button {
  flex: none;
  min-width: 84px;
  height: 34px;
  padding: 0 14px;
  border-radius: 10px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  font-family: var(--font);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: var(--shadow-glow);
}
.update-bar button:active { transform: scale(0.96); }
.update-bar .spinner { width: 16px; height: 16px; }

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 9px; }
.skeleton {
  height: 42px;
  border-radius: var(--radius-xs);
  background: linear-gradient(90deg, var(--surface), var(--surface-2), var(--surface));
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

.footer {
  text-align: center;
  color: var(--text-faint);
  font-size: 12px;
  padding: 26px 18px 12px;
}
.footer a { color: var(--text-dim); }
