:root {
  --bg: #FBF8F3;
  --surface: #FFFFFF;
  --surface-2: #F4EFE7;
  --ink: #1E2A2D;
  --ink-2: #5A676C;
  --line: #E7DFD3;
  --brand: #2E7A6A;
  --brand-hover: #256557;
  --brand-ink: #FFFFFF;
  --brand-soft: #E2EFEA;
  --accent: #D9704F;
  --accent-soft: #FBE6DC;
  --warn-bg: #FFF5E4;
  --warn-line: #F0D3A0;
  --warn-ink: #8A5A12;
  --danger: #B93A26;
  --shadow: 0 1px 2px rgba(30, 42, 45, .05), 0 10px 30px rgba(30, 42, 45, .08);
  --radius: 20px;
  --radius-sm: 12px;
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Lora', Georgia, 'Times New Roman', serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131A1C;
    --surface: #1B2427;
    --surface-2: #182023;
    --ink: #EDF2F1;
    --ink-2: #A5B3B5;
    --line: #2C393D;
    --brand: #62C2AC;
    --brand-hover: #7FD0BD;
    --brand-ink: #0D1B18;
    --brand-soft: #1E3530;
    --accent: #EFA084;
    --accent-soft: #3A2A24;
    --warn-bg: #2E2616;
    --warn-line: #5A4722;
    --warn-ink: #F0C97E;
    --danger: #FF8A73;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--brand); }
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 5.4vw, 4rem); }
h2 { font-size: clamp(1.85rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
.muted { color: var(--ink-2); }

.container { width: min(1160px, 100% - 32px); margin-inline: auto; }

:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 50%, transparent); outline-offset: 2px; }

/* ---------- Кнопки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  padding: .95em 1.6em;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font: 600 1rem/1.2 var(--font);
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s, transform .2s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: var(--brand-hover); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-sm { padding: .6em 1.15em; font-size: .93rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .6; cursor: progress; }

/* ---------- Шапка ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); margin-right: auto; }
.logo-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--brand);
  color: var(--brand-ink);
  font: 600 1rem/1 var(--font-display);
  letter-spacing: .02em;
}
.logo-text { display: flex; flex-direction: column; line-height: 1.2; }
.logo-text strong { font-size: 1rem; }
.logo-text small { font-size: .8rem; color: var(--ink-2); }
.nav { display: flex; gap: 22px; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: .95rem; font-weight: 500; }
.nav a:hover { color: var(--brand); }

/* ---------- Первый экран ---------- */

.hero { position: relative; overflow: hidden; padding: clamp(40px, 7vw, 96px) 0 clamp(56px, 8vw, 104px); }
.hero::before {
  content: '';
  position: absolute;
  inset: -20% -10% auto auto;
  width: 60vw;
  height: 60vw;
  max-width: 760px;
  max-height: 760px;
  background: radial-gradient(closest-side, var(--brand-soft), transparent);
  opacity: .8;
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}
.eyebrow {
  margin: 0 0 1rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
}
.hero-role { font-size: 1.25rem; font-weight: 600; color: var(--brand); margin-bottom: 1.25rem; }
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 2rem 0 2.75rem; }
.hero-facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 16px clamp(24px, 4vw, 48px); }
.hero-facts strong { display: block; font: 600 1.9rem/1 var(--font-display); color: var(--ink); margin-bottom: 6px; }
.hero-facts span { font-size: .9rem; color: var(--ink-2); }

.hero-visual { position: relative; justify-self: center; width: min(400px, 100%); }
.portrait {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 5;
  border-radius: 220px 220px 28px 28px;
  overflow: hidden;
  background: linear-gradient(160deg, var(--brand-soft) 0%, var(--accent-soft) 100%);
}
.portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; z-index: 1; }
.portrait-initials { font: 600 clamp(4.5rem, 11vw, 7.5rem)/1 var(--font-display); color: var(--brand); opacity: .45; }
.float-card {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 250px;
  padding: 12px 16px;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.3;
}
.float-card-a { left: -36px; top: 58%; }
.float-card-b { right: -24px; bottom: -22px; }

.icon-dot {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--brand-soft);
  color: var(--brand);
}
.icon-dot.accent { background: var(--accent-soft); color: var(--accent); }
.icon-dot.big { width: 50px; height: 50px; border-radius: 14px; }

/* ---------- Секции ---------- */

.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-alt { background: var(--surface-2); }
.section-brand { background: linear-gradient(180deg, var(--brand-soft), var(--bg)); }
.section-head { max-width: 680px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head p:not(.eyebrow) { color: var(--ink-2); font-size: 1.08rem; }

.check-list, .dot-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.check-list li { position: relative; padding-left: 34px; }
.check-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .2em;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--brand-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232E7A6A' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5 10 16.5 18 8'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.dot-list li { position: relative; padding-left: 22px; }
.dot-list li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: .65em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

/* Обо мне */
.about-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.about-text p:not(.eyebrow) { font-size: 1.08rem; }
.about-card {
  padding: clamp(24px, 4vw, 36px);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.timeline, .exp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.timeline li, .exp-list li { display: grid; grid-template-columns: 56px 1fr; gap: 14px; }
.exp-list li { grid-template-columns: 96px 1fr; }
.tl-year, .exp-years { font: 600 1rem/1.5 var(--font-display); color: var(--brand); white-space: nowrap; }
.timeline strong, .exp-list strong { display: block; font-weight: 600; line-height: 1.4; }
.timeline span:not(.tl-year), .exp-list div > span { display: block; font-size: .92rem; color: var(--ink-2); line-height: 1.45; margin-top: 2px; }

.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.badges span, .tag-list li {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: .85rem;
  font-weight: 600;
}

.experience {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: clamp(32px, 6vw, 80px);
  margin-top: clamp(40px, 6vw, 72px);
  padding-top: clamp(32px, 5vw, 56px);
  border-top: 1px solid var(--line);
}
.experience h3, .card-title { margin-bottom: 20px; }
.card-title { font-size: 1.35rem; }

.about-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.about-facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.about-facts li {
  padding: 20px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.about-facts strong { display: block; font: 600 1.1rem/1.3 var(--font-display); color: var(--brand); }
.about-facts span { display: block; margin-top: 4px; font-size: .9rem; color: var(--ink-2); }

/* Отдельные страницы: обо мне, публикации */
.page-top { padding-top: clamp(40px, 6vw, 72px); }
.page-title { font-size: clamp(2.2rem, 4.5vw, 3.2rem); }
.page-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(40px, 6vw, 64px); }
.nav a[aria-current] { color: var(--brand); }
.tag-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tag-list li { background: var(--surface); color: var(--ink); font-weight: 500; border: 1px solid var(--line); }

/* Услуги */
.services-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.service-card {
  padding: clamp(24px, 4vw, 40px);
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}
.service-head { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.service-head h3 { margin: 0; }

/* Шаги */
.steps { list-style: none; margin: 0 0 40px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.step-card { padding: 28px 24px; border-radius: var(--radius); background: var(--surface); }
.step-card h3 { font-size: 1.15rem; }
.step-card p { margin: 0; color: var(--ink-2); font-size: .98rem; }
.step-index {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--brand-ink);
  font: 600 1.05rem/1 var(--font-display);
}

.notice {
  display: flex;
  gap: 16px;
  padding: 20px 24px;
  border-radius: var(--radius-sm);
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  font-size: .98rem;
}
.notice-icon { flex: none; color: var(--warn-ink); margin-top: 2px; }
.notice a { color: inherit; font-weight: 700; }

/* Отзывы */
.rating-row { display: flex; flex-wrap: wrap; gap: 12px; margin: -16px 0 32px; }
.rating-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  transition: border-color .15s;
}
.rating-badge:hover { border-color: var(--brand); }
.rating-badge strong { font: 600 1.6rem/1 var(--font-display); color: var(--brand); }
.rating-badge strong::after { content: ' ★'; font-size: 1rem; color: #E7A93C; }
.rating-badge span { font-size: .82rem; color: var(--ink-2); line-height: 1.3; }
.reviews-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.review-card {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}
.review-card blockquote { position: relative; flex: 1; margin: 0 0 20px; padding-top: 28px; font-size: 1rem; line-height: 1.6; }
.review-card blockquote::before {
  content: '“';
  position: absolute;
  top: -14px;
  left: -2px;
  font: 600 3.6rem/1 var(--font-display);
  color: var(--accent);
  opacity: .6;
}
.review-card figcaption strong { display: block; }
.review-card figcaption span { font-size: .85rem; color: var(--ink-2); }
.review-card figcaption a { color: inherit; }

/* Публикации */
.pub-list { list-style: none; margin: 0; padding: 0; display: grid; border-top: 1px solid var(--line); }
.pub-list li { display: grid; grid-template-columns: 80px 1fr; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.pub-year { font: 600 1.15rem/1.5 var(--font-display); color: var(--ink-2); }
.pub-list a { font-weight: 600; font-size: 1.05rem; color: var(--ink); text-decoration-color: color-mix(in srgb, var(--brand) 40%, transparent); text-underline-offset: 3px; }
.pub-list a:hover { color: var(--brand); }
.pub-list div > span { display: block; margin-top: 4px; font-size: .92rem; color: var(--ink-2); }
.pub-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

/* Цены */
.prices-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.price-card {
  display: flex;
  flex-direction: column;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}
.price-card h3 { font-size: 1.2rem; }
.price-card p { color: var(--ink-2); font-size: .97rem; flex: 1; }
.price-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 8px 0 20px; }
.price-value { font: 600 1.7rem/1 var(--font-display); }
.price-duration { font-size: .9rem; color: var(--ink-2); }
.price-skeleton { min-height: 240px; background: var(--surface-2); border-color: transparent; }

/* ---------- Запись ---------- */

.booking-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
.booking-grid > * { min-width: 0; }
.booking-intro { position: sticky; top: 100px; }
.booking-intro > p:not(.eyebrow) { color: var(--ink-2); font-size: 1.08rem; margin-bottom: 28px; }
.booking-card {
  padding: clamp(20px, 4vw, 36px);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.form-step { border: 0; margin: 0 0 32px; padding: 0; min-width: 0; }
.form-step legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 10px;
  padding: 0;
  margin-bottom: 16px;
  font-weight: 700;
  font-size: 1.05rem;
}
.legend-note { font-weight: 500; font-size: .85rem; color: var(--ink-2); }
.step-num {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: .9rem;
}

/* Скрытые радиокнопки со стилизованной подписью */
.option-card, .chip { position: relative; display: block; cursor: pointer; }
.option-card input, .chip input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }

.service-options { display: grid; gap: 10px; }
.option-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  transition: border-color .15s, background-color .15s;
}
.option-card:hover .option-body { border-color: color-mix(in srgb, var(--brand) 50%, var(--line)); }
.option-card input:checked + .option-body { border-color: var(--brand); background: var(--brand-soft); }
.option-card input:focus-visible + .option-body,
.chip input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--brand) 50%, transparent); outline-offset: 2px; }
.option-title { font-weight: 600; }
.option-sub { display: block; font-size: .85rem; color: var(--ink-2); font-weight: 500; }
.option-price { flex: none; font-weight: 700; white-space: nowrap; }

.date-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding: 2px 2px 8px;
  margin: -2px -2px 8px;
  scrollbar-width: thin;
}
.date-strip .chip { flex: none; scroll-snap-align: start; }
.chip > span {
  display: block;
  padding: 10px 12px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  text-align: center;
  line-height: 1.25;
  transition: border-color .15s, background-color .15s, color .15s;
}
.date-strip .chip > span { min-width: 66px; }
.chip-weekday, .chip-month { display: block; font-size: .75rem; color: var(--ink-2); text-transform: lowercase; }
.chip-day { display: block; font-size: 1.25rem; font-weight: 700; }
.chip:hover > span { border-color: color-mix(in srgb, var(--brand) 50%, var(--line)); }
.chip input:checked + span { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.chip input:checked + span .chip-weekday,
.chip input:checked + span .chip-month { color: inherit; opacity: .85; }
.chip input:disabled + span { opacity: .4; text-decoration: line-through; cursor: not-allowed; border-style: dashed; }
.chip input:disabled + span:hover { border-color: var(--line); }

.time-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.time-grid .chip > span { font-weight: 600; }
.slots-empty { grid-column: 1 / -1; margin: 0; color: var(--ink-2); font-size: .95rem; }

.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; margin-bottom: 18px; }
.field { display: grid; gap: 6px; }
.field > span { font-size: .88rem; font-weight: 600; color: var(--ink-2); }
.field em { font-style: normal; font-weight: 500; }
.field-wide { grid-column: 1 / -1; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--ink);
  font: 500 1rem/1.4 var(--font);
  transition: border-color .15s;
}
.field textarea { resize: vertical; min-height: 88px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); }
.field input::placeholder, .field textarea::placeholder { color: color-mix(in srgb, var(--ink-2) 65%, transparent); }
.field .invalid { border-color: var(--danger); }

.consent { display: flex; align-items: flex-start; gap: 10px; font-size: .9rem; color: var(--ink-2); cursor: pointer; }
.consent input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--brand); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.booking-summary {
  margin-bottom: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--surface-2);
  font-size: .95rem;
}
.booking-summary strong { display: block; }
.booking-summary .muted { font-size: .9rem; }
.form-error { margin: 0 0 14px; color: var(--danger); font-weight: 600; font-size: .95rem; }
.form-error:empty { display: none; }

.booking-success { text-align: center; padding-block: clamp(40px, 6vw, 64px); }
.booking-success p { max-width: 30em; margin-inline: auto; }
.success-icon {
  display: inline-grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
}

.attach-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 9px 14px;
  border: 1.5px dashed var(--line);
  border-radius: 12px;
  color: var(--brand);
  font-size: .92rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s;
}
.attach-btn:hover { border-color: var(--brand); }
.attach-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.attach-btn:focus-within { outline: 3px solid color-mix(in srgb, var(--brand) 50%, transparent); outline-offset: 2px; }
.file-names { font-size: .85rem; color: var(--ink-2); overflow-wrap: anywhere; }
.file-names:empty { display: none; }

.success-link {
  margin: 24px auto;
  padding: 18px 20px;
  max-width: 34em;
  border-radius: 14px;
  background: var(--brand-soft);
  text-align: left;
}
.success-link p { margin: 0 0 8px; font-size: .95rem; }
.success-link a:not(.btn) { display: block; font-weight: 600; overflow-wrap: anywhere; margin-bottom: 14px; }
.success-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Переписка (страница пациента и админка) ---------- */

.thread { display: flex; flex-direction: column; gap: 12px; margin: 8px 0 20px; }
.msg {
  max-width: min(80%, 560px);
  padding: 12px 16px;
  border-radius: 16px 16px 16px 4px;
  background: var(--surface-2);
  align-self: flex-start;
}
.msg.mine { align-self: flex-end; border-radius: 16px 16px 4px 16px; background: var(--brand-soft); }
.msg-meta { font-size: .8rem; color: var(--ink-2); margin-bottom: 4px; }
.msg-meta strong { color: var(--ink); font-weight: 600; }
.msg-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .97rem; }
.msg-files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.msg-image img { width: 112px; height: 112px; object-fit: cover; border-radius: 10px; background: var(--line); }
.msg-file {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--surface);
  font-size: .88rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.msg-file::before { content: 'PDF'; font-size: .7rem; padding: 2px 5px; border-radius: 4px; background: var(--accent-soft); color: var(--accent); }

.composer { display: grid; gap: 10px; }
.composer textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--ink);
  font: 500 1rem/1.5 var(--font);
  resize: vertical;
}
.composer textarea:focus { outline: none; border-color: var(--brand); }
.composer-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.composer-row .btn { margin-left: auto; }
.composer-hint { margin: 0; font-size: .85rem; color: var(--ink-2); }
.composer-hint:empty { display: none; }
.closed-note, .thread-closed {
  margin: 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: .95rem;
}
.thread-closed { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }

/* Страница консультации */
.consult-main { max-width: 760px; padding: 32px 0 80px; display: grid; gap: 20px; }
.consult-card { padding: clamp(20px, 4vw, 32px); border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); }
.consult-card h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin-bottom: .3em; }
.consult-card h2 { font-size: 1.3rem; }
.consult-when { color: var(--ink-2); margin-bottom: 14px; }
.consult-when::first-letter { text-transform: uppercase; }
.status-pill {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: .88rem;
  font-weight: 700;
}
.status-pill[data-status="confirmed"], .status-pill[data-status="done"] { background: var(--brand-soft); color: var(--brand); }
.status-pill[data-status="cancelled"] { background: var(--surface-2); color: var(--ink-2); }
.consult-video { margin-top: 20px; }
.consult-note { margin: 20px 0 0; font-size: .88rem; color: var(--ink-2); }
.thread-empty { color: var(--ink-2); font-size: .95rem; }

/* ---------- Вопросы ---------- */

.faq-wrap { max-width: 860px; }
.faq { display: grid; gap: 12px; }
.faq details { border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  font-weight: 600;
  font-size: 1.05rem;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 1.3rem;
  font-weight: 500;
  transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0; padding: 0 24px 22px; color: var(--ink-2); }

/* ---------- Контакты и подвал ---------- */

.contacts-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; max-width: 760px; }
.contact-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 22px;
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  border: 1px solid transparent;
  transition: border-color .15s;
  overflow-wrap: anywhere;
}
.contact-card:hover { border-color: var(--brand); }
.contact-card small { display: block; font-size: .8rem; color: var(--ink-2); font-weight: 500; }

.site-footer { padding: 36px 0 48px; border-top: 1px solid var(--line); font-size: .9rem; color: var(--ink-2); }
.footer-inner p { margin: 0 0 6px; }
.footer-warning { font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--ink); }

/* ---------- Админка ---------- */

.admin-main { padding: 40px 0 80px; }
.admin-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-bottom: 24px; }
.admin-toolbar h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0 auto 0 0; }
.admin-toolbar label { display: flex; align-items: center; gap: 8px; font-size: .95rem; color: var(--ink-2); }
.admin-toolbar input[type="checkbox"] { accent-color: var(--brand); width: 18px; height: 18px; }
.admin-list { display: grid; gap: 14px; }
.admin-item {
  display: grid;
  grid-template-columns: 170px 1fr auto;
  gap: 8px 24px;
  padding: 20px 24px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.admin-item.is-cancelled { opacity: .55; }
.admin-when strong { display: block; font: 600 1.35rem/1.2 var(--font-display); }
.admin-when span { color: var(--ink-2); font-size: .9rem; }
.admin-info p { margin: 0 0 4px; }
.admin-info .muted { font-size: .92rem; }
.admin-complaint { margin-top: 8px !important; padding: 10px 14px; border-radius: 10px; background: var(--surface-2); font-size: .95rem; white-space: pre-wrap; }
.admin-item select {
  align-self: start;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font: 600 .9rem var(--font);
}
.status-new { border-left: 4px solid var(--accent); }
.status-confirmed { border-left: 4px solid var(--brand); }
.admin-empty { padding: 48px 24px; text-align: center; color: var(--ink-2); background: var(--surface); border-radius: 16px; }
.admin-login { max-width: 420px; display: grid; gap: 12px; }
.admin-thread { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 4px; }
.thread-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: 600 .95rem var(--font);
  cursor: pointer;
}
.badge-accent, .badge-muted, .badge-dot {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
}
.badge-accent { background: var(--accent-soft); color: var(--accent); }
.badge-accent:empty { display: none; }
.badge-muted { background: var(--surface-2); color: var(--ink-2); }
.badge-dot { background: var(--brand); color: var(--brand-ink); }
.thread-panel { margin-top: 12px; }
.thread-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.video-form { display: flex; flex: 1; min-width: 260px; gap: 8px; }
.video-form input {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
  font: 500 .92rem var(--font);
}
.close-check { display: flex; align-items: center; gap: 6px; font-size: .9rem; color: var(--ink-2); cursor: pointer; }
.close-check input { accent-color: var(--brand); width: 16px; height: 16px; }

.admin-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface-2); }
.admin-tabs[hidden] { display: none; }
.admin-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--ink-2);
  font: 600 .93rem var(--font);
  cursor: pointer;
}
.admin-tabs button[aria-current] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.admin-tabs .badge-accent { padding: 1px 8px; }
.admin-login h1 { font-size: 2rem; }

/* Расписание */
.sched-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 16px; font-size: .9rem; }
.sched-legend .slot { cursor: default; }
.sched-days { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; margin-bottom: 40px; }
.sched-day { padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.sched-day.is-closed { background: var(--surface-2); }
.sched-day-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.sched-day-head strong::first-letter { text-transform: uppercase; }
.sched-day-head strong { display: inline-block; }
.sched-slots { display: flex; flex-wrap: wrap; gap: 6px; }
.slot-wrap { position: relative; display: inline-flex; }
.slot {
  padding: 5px 10px;
  border-radius: 8px;
  border: 1.5px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font: 600 .88rem var(--font);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.slot:disabled { cursor: default; }
.slot-free { border-color: color-mix(in srgb, var(--brand) 55%, var(--line)); }
.slot-free:hover { background: var(--brand-soft); }
.slot-booked { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.slot-busy { background: repeating-linear-gradient(135deg, var(--surface-2) 0 6px, var(--bg) 6px 12px); color: var(--ink-2); }
.slot-blocked { color: var(--ink-2); text-decoration: line-through; border-style: dashed; }
.slot-past { opacity: .45; }
.slot-remove {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--ink-2);
  color: var(--surface);
  font: 700 .75rem/18px var(--font);
  cursor: pointer;
}
.slot-add { display: flex; gap: 6px; margin-top: 10px; }
.slot-add input, .weekly-row input, .feed-row input, .closed-form input {
  min-width: 0;
  padding: 6px 10px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font: 500 .9rem var(--font);
}
.sched-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: start; }
.sched-card { display: grid; gap: 12px; padding: 22px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.sched-card h2 { font-size: 1.35rem; margin: 0; }
.sched-card h3 { font-size: 1.05rem; margin: 12px 0 0; }
.sched-card p { margin: 0; font-size: .92rem; }
.sched-card .btn { justify-self: start; }
.weekly-rows { display: grid; gap: 8px; }
.weekly-row { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 10px; font-size: .92rem; }
.closed-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.closed-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: .95rem; }
.closed-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; }
.closed-form .field input { padding: 8px 10px; }
.ics-form { display: grid; gap: 10px; }
.ics-form .field input { padding: 8px 10px; }
.ics-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ics-status { font-weight: 600; }
.ics-status.is-ok { color: var(--brand); }
.ics-status.is-error { color: var(--danger); }
.ics-help summary { cursor: pointer; font-weight: 600; font-size: .92rem; }
.ics-help p { margin-top: 8px; }
.feed-row { display: flex; gap: 8px; }
.feed-row input { flex: 1; font-size: .8rem; }

/* ---------- Адаптив ---------- */

@media (max-width: 1020px) {
  .nav { display: none; }
  .steps, .prices-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .hero-grid, .about-grid, .booking-grid { grid-template-columns: 1fr; }
  .hero-visual { width: min(340px, 86%); margin-top: 8px; }
  .float-card-a { left: -24px; }
  .float-card-b { right: -16px; }
  .booking-intro { position: static; }
  .reviews-grid, .experience { grid-template-columns: 1fr; }
  .contacts-grid { grid-template-columns: 1fr; }
  .admin-item { grid-template-columns: 1fr; }
  .sched-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  body { font-size: 16px; }
  .services-grid, .steps, .prices-grid { grid-template-columns: 1fr; }
  .fields { grid-template-columns: 1fr; }
  .logo-text small { display: none; }
  .hero-facts { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 12px 28px; }
  .hero-facts strong { font-size: 1.5rem; }
  .hero-facts span { display: block; font-size: .8rem; line-height: 1.3; }
  .hero-visual { width: min(270px, 76%); }
  .float-card { font-size: .8rem; padding: 10px 12px; max-width: 200px; }
  .float-card .icon-dot { width: 32px; height: 32px; }
  .float-card-a { left: -12px; }
  .float-card-b { right: -8px; }
  .option-body { flex-direction: column; align-items: flex-start; gap: 4px; }
  .pub-list li { grid-template-columns: 1fr; gap: 2px; }
  .msg { max-width: 92%; }
  .composer-row .btn { margin-left: 0; width: 100%; }
  .exp-list li { grid-template-columns: 1fr; gap: 2px; }
  .notice { flex-direction: column; gap: 8px; padding: 18px; }
  .about-facts li { padding: 14px; }
  .about-facts strong { font-size: 1rem; }

  .section { padding: 48px 0; }
  .section-head { margin-bottom: 24px; }

  /* Карточки листаются вбок, следующая выглядывает справа */
  .steps, .reviews-grid, .prices-grid, .services-grid {
    display: flex;
    gap: 12px;
    margin-inline: -16px;
    padding: 4px 16px 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 16px;
    scrollbar-width: none;
  }
  .steps::-webkit-scrollbar, .reviews-grid::-webkit-scrollbar,
  .prices-grid::-webkit-scrollbar, .services-grid::-webkit-scrollbar { display: none; }
  .steps > *, .reviews-grid > *, .prices-grid > *, .services-grid > * { flex: 0 0 82%; scroll-snap-align: start; }
  .steps { margin-bottom: 28px; }
  .step-card { padding: 22px 20px; }

  /* Админка на телефоне */
  .header-inner { flex-wrap: wrap; gap: 10px 16px; padding-block: 8px; }
  .admin-tabs button { padding: 7px 12px; }
  .weekly-row { grid-template-columns: 1fr; gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
