/* ============================================================
   Лунный Ларец — статичные страницы: оформление заказа, «Спасибо», оферта и политика.
   Тот же стиль, что у React-витрины: пудрово-голубая гамма,
   стеклянные карточки, Prata + Manrope + Cormorant Infant.
   Логика страниц (js/checkout.js, js/success.js) не зависит от этих стилей.
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@600&family=Cormorant+Infant:ital,wght@0,500;1,400;1,500&family=Manrope:wght@400;500;600;700&family=Prata&display=swap');

:root {
  --ink: #43515a;
  --ink-strong: #3f4b53;
  --muted: #71808a;
  --soft: #8a9aa3;
  --line: #dbe7ec;
  --blue: #55798f;
  --blue-deep: #456a80;
  --blue-soft: #739bb4;
  --mist: #edf5f8;
  --plum: #795a70;
  --rose: #b04f78;
  --glass: rgba(255, 255, 255, .62);
  --font-display: "Prata", Georgia, serif;
  --font-accent: "Cormorant Infant", Georgia, serif;
  --font-sans: "Manrope", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  background:
    radial-gradient(ellipse 62% 30% at 18% 12%, rgba(255, 255, 255, .8) 0 30%, transparent 72%),
    radial-gradient(ellipse 58% 36% at 86% 38%, rgba(187, 225, 241, .8) 0 34%, transparent 74%),
    radial-gradient(ellipse 52% 26% at 40% 88%, rgba(255, 255, 255, .7) 0 28%, transparent 72%),
    linear-gradient(145deg, #cce5f0 0%, #e5f1f6 38%, #d8ebf3 72%, #c5e2ee 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { display: block; max-width: 100%; }
button, input, textarea { font: inherit; }

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

/* ---------- Шапка: плавающая панель, как на витрине ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 16px 0 0;
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 64px;
  padding: 0 12px 0 18px;
  border: 1px solid rgba(219, 231, 236, .9);
  border-radius: 22px;
  background: rgba(255, 254, 253, .9);
  box-shadow: 0 18px 48px -28px rgba(54, 75, 87, .34);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}
/* Логотип как на витрине: полумесяц со звёздочкой и «Лунный Ларец» одной засечкой */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 27px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .01em;
  color: #6f5568;
  text-decoration: none;
  white-space: nowrap;
}
.brand__mark { width: 26px; height: 26px; flex-shrink: 0; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  font-weight: 700;
  transition: transform .2s ease, background-color .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.btn--ghost {
  height: 40px;
  padding: 0 16px;
  border: 1px solid #cadce4;
  border-radius: 999px;
  background: rgba(255, 255, 255, .7);
  color: #52616a;
  font-size: 13px;
  font-weight: 600;
}
.btn--ghost:hover { border-color: #9fbdcb; background: #fff; }
.btn--ghost .short { display: none; }

/* Объёмная кнопка-«клавиша», как «Смотреть коллекцию» на витрине */
.btn--accent {
  position: relative;
  min-height: 52px;
  padding: 0 28px;
  border-radius: 999px;
  color: #fff;
  font-size: 15px;
  background: linear-gradient(180deg, #86adc3 0%, #6590a8 48%, #55798f 100%);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, .55),
    inset 0 -3px 6px rgba(35, 62, 78, .35),
    0 5px 0 #3a5b6e,
    0 18px 28px -12px rgba(38, 65, 79, .65);
  text-shadow: 0 1px 1px rgba(35, 62, 78, .45);
}
.btn--accent:hover { transform: translateY(-2px); box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, .55), inset 0 -3px 6px rgba(35, 62, 78, .35), 0 7px 0 #3a5b6e, 0 22px 32px -12px rgba(38, 65, 79, .7); }
.btn--accent:active { transform: translateY(4px); box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, .45), inset 0 -2px 4px rgba(35, 62, 78, .3), 0 1px 0 #3a5b6e, 0 8px 16px -10px rgba(38, 65, 79, .6); }
.btn--accent:disabled { cursor: progress; opacity: .7; transform: none; }
.btn--block { width: 100%; }
.btn:focus-visible,
input:focus-visible,
textarea:focus-visible { outline: 2px solid var(--blue-soft); outline-offset: 2px; }

/* Замок перед текстом кнопки оплаты — через CSS, потому что JS меняет textContent кнопки */
#payBtn::before {
  content: "";
  width: 16px;
  height: 16px;
  flex: none;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='11' width='16' height='10' rx='2.5'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='11' width='16' height='10' rx='2.5'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- Оформление ---------- */
.checkout { padding: 40px 0 72px; }
.eyebrow {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--blue);
}
.checkout__title {
  margin: 12px 0 32px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.4rem, 4.6vw, 4rem);
  line-height: .95;
  letter-spacing: -.04em;
  color: var(--ink-strong);
}
.checkout__title em {
  font-family: var(--font-accent);
  font-weight: 500;
  color: var(--plum);
}
.checkout__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 1fr);
  gap: 24px;
  align-items: start;
}

.panel {
  padding: 32px;
  border: 1px solid rgba(255, 255, 255, .75);
  border-radius: 32px;
  background: var(--glass);
  box-shadow: 0 28px 80px -48px rgba(55, 88, 108, .5);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}
.panel h2 {
  margin: 0 0 22px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 26px;
  letter-spacing: -.02em;
  color: var(--ink);
}
.summary { position: sticky; top: 104px; }

.field { margin-bottom: 16px; }
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.field > label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 600;
  color: #5d6b74;
}
.field > input,
.field > textarea,
.pw-field > input {
  width: 100%;
  height: 50px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .82);
  color: var(--ink);
  font-size: 15px;
  box-shadow: inset 0 1px 2px rgba(55, 88, 108, .06);
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.field textarea {
  height: auto;
  min-height: 96px;
  padding: 13px 16px;
  resize: vertical;
}
.field > input::placeholder,
.field > textarea::placeholder,
.pw-field > input::placeholder { color: #a3b1b9; }
.field > input:hover,
.field > textarea:hover,
.pw-field > input:hover { border-color: #c4d8e1; }
.field > input:focus,
.field > textarea:focus,
.pw-field > input:focus {
  outline: none;
  border-color: var(--blue-soft);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(115, 155, 180, .18);
}

/* Способы доставки — карточки с собственной радиокнопкой */
/* Службы доставки — ряд кнопок */
.free-badge { margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: #e7f4ec; color: #3f7a55; font-size: 11px; font-weight: 700; }
.services { display: flex; flex-wrap: wrap; gap: 6px; }
.services__opt {
  padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, .7);
  color: var(--ink); font: 600 13px/1.2 var(--font-sans); cursor: pointer; transition: border-color .15s, background .15s;
}
.services__opt:hover { border-color: #b9d0dc; background: #fff; }
.services__opt.is-active { border-color: var(--blue); background: var(--blue); color: #fff; }

/* Пункт выдачи без ключа API: ссылка на поиск на Яндекс Картах */
.pvz-link {
  display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 6px; padding: 12px 16px;
  border: 1.5px dashed #9fbdcb; border-radius: 14px; background: rgba(255, 255, 255, .7);
  color: var(--blue); font: 600 14px/1.3 var(--font-sans); text-decoration: none; transition: border-color .2s, background .2s;
}
.pvz-link::before { content: "📍"; }
.pvz-link::after { content: "↗"; }
.pvz-link:hover { border-color: var(--blue); background: #fff; }
.pvz-hint { margin: 0 2px 8px; font-size: 12px; color: var(--muted); }
.pvz-link[hidden], .pvz-hint[hidden], .pvz-box[hidden] { display: none; }

/* Пункт выдачи: небольшая карта в форме и список под ней */
.pvz-box { overflow: hidden; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.pvz-box__map { height: 260px; background: var(--mist); }
.pvz-box__bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.pvz-box__bar button { flex-shrink: 0; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--blue); font: 600 12px var(--font-sans); cursor: pointer; }
.pvz-box__bar button:hover { border-color: #9fbdcb; }
.pvz-list { max-height: 180px; margin: 0; padding: 0 6px 6px; overflow-y: auto; list-style: none; }
.pvz-list:empty { display: none; }
.pvz-list__item { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; cursor: pointer; }
.pvz-list__item:hover { background: #f5f9fb; }
.pvz-list__item.is-active { background: #eaf2f6; }
.pvz-list__text { display: grid; flex: 1; min-width: 0; gap: 1px; }
.pvz-list__addr { font-size: 13px; color: var(--ink); }
.pvz-list__hours { font-size: 11px; color: var(--muted); }
.pvz-list__pick { flex-shrink: 0; padding: 4px 10px; border: 0; border-radius: 999px; background: var(--mist); color: var(--blue); font: 600 12px var(--font-sans); cursor: pointer; }
.is-active .pvz-list__pick { background: var(--blue); color: #fff; }
@media (max-width: 640px) { .pvz-box__map { height: 220px; } }

/* ---------- Сводка заказа ---------- */
.summary__item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(219, 231, 236, .9);
}
.summary__item:first-child { padding-top: 0; }
.summary__item img {
  width: 64px;
  height: 64px;
  flex: none;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 16px;
  background: #fff;
  object-fit: contain;
  box-shadow: 0 12px 24px -18px rgba(38, 65, 79, .6);
}
.summary__info { flex: 1; min-width: 0; }
.summary__name { font-size: 15px; font-weight: 600; color: var(--ink); }
.summary__meta { margin-top: 2px; font-size: 12px; color: var(--soft); }
.summary__line { font-size: 15px; font-weight: 700; color: var(--ink); white-space: nowrap; }

.co-sum {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  font-size: 14px;
  color: var(--muted);
}
.co-sum:first-of-type { margin-top: 18px; }
.cart-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: -.02em;
  color: var(--ink-strong);
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  cursor: pointer;
}
.consent input {
  width: 18px;
  height: 18px;
  flex: none;
  margin: 1px 0 0;
  accent-color: var(--blue);
  cursor: pointer;
}
.consent a { color: var(--blue); text-decoration-color: rgba(85, 121, 143, .35); text-underline-offset: 2px; }
.consent a:hover { color: var(--blue-deep); }

/* Подарочная упаковка и открытка */
.gift { display: grid; gap: 8px; }
.gift__opt {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px;
  background: rgba(255, 255, 255, .7); cursor: pointer; transition: border-color .15s, background .15s;
}
.gift__opt:hover { border-color: #b9d0dc; background: #fff; }
.gift__opt:has(input:checked) { border-color: var(--blue-soft); background: #fff; box-shadow: 0 10px 24px -20px rgba(38, 65, 79, .7); }
.gift__opt input { width: 18px; height: 18px; flex: none; margin: 0; accent-color: var(--blue); cursor: pointer; }
.gift__text { display: grid; flex: 1; min-width: 0; font-size: 14px; color: var(--ink); }
.gift__text small { font-size: 12px; color: var(--soft); }
.gift__price { flex: none; font-size: 13px; font-weight: 700; color: var(--blue); white-space: nowrap; }
.gift__card { position: relative; }
.gift__card[hidden] { display: none; }
.gift__card textarea {
  width: 100%; min-height: 96px; padding: 12px 14px 26px; border: 1px solid var(--line); border-radius: 14px; resize: vertical;
  background: #fffdf8; color: var(--ink); font: 400 15px/1.5 var(--font-sans); outline: none;
}
.gift__card textarea:focus { border-color: var(--blue-soft); box-shadow: 0 0 0 4px rgba(115, 155, 180, .14); }
.gift__count { position: absolute; right: 12px; bottom: 8px; font-size: 11px; color: var(--soft); }

/* Промокод */
.promo { display: flex; gap: 6px; margin-top: 18px; }
.promo input {
  flex: 1; min-width: 0; height: 42px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px;
  background: rgba(255, 255, 255, .8); color: var(--ink); font: 600 14px/1 var(--font-sans); text-transform: uppercase; outline: none;
}
.promo input::placeholder { text-transform: none; font-weight: 400; color: #a3b1b9; }
.promo input:focus { border-color: var(--blue-soft); box-shadow: 0 0 0 4px rgba(115, 155, 180, .14); }
.promo button {
  height: 42px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: #fff;
  color: var(--blue); font: 700 13px/1 var(--font-sans); cursor: pointer; transition: border-color .15s, background .15s;
}
.promo button:hover { border-color: #b9d0dc; background: var(--mist); }
.promo button:disabled { opacity: .6; cursor: progress; }
.promo__msg { min-height: 0; margin: 6px 4px 0; font-size: 12px; color: var(--soft); }
.promo__msg:empty { display: none; }
.promo__msg.is-ok { color: #3f7a55; font-weight: 600; }
.promo__msg.is-bad { color: #a4535c; }
.co-sum[hidden] { display: none; }
.co-sum--discount span:last-child { color: var(--rose); font-weight: 700; }

.summary__note {
  display: flex;
  gap: 8px;
  margin: 16px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--soft);
}
.login-error {
  min-height: 1em;
  margin: 12px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--rose);
}

.empty {
  padding: 56px 24px;
  border: 1px solid rgba(255, 255, 255, .75);
  border-radius: 32px;
  background: var(--glass);
  text-align: center;
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--ink);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}
.empty a {
  display: block;
  width: fit-content;
  margin: 18px auto 0;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  color: var(--blue) !important;
}

/* ---------- Страница «Спасибо» ---------- */
.result-card {
  max-width: 560px;
  margin: 72px auto;
  padding: 44px 36px;
  border: 1px solid rgba(255, 255, 255, .75);
  border-radius: 36px;
  background: var(--glass);
  box-shadow: 0 28px 80px -48px rgba(55, 88, 108, .5);
  text-align: center;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}
.result-emoji {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  margin: 0 auto 22px;
  border-radius: 28px;
  font-size: 38px;
  background: linear-gradient(145deg, #f7fbfd, #e3f0f6 55%, #c7dfea);
  box-shadow: inset 0 2px 1px rgba(255, 255, 255, .95), inset 0 -8px 16px rgba(85, 121, 143, .18), 0 20px 34px -16px rgba(55, 88, 108, .55);
}
.result-card h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 2.8rem);
  line-height: 1;
  letter-spacing: -.035em;
  color: var(--ink-strong);
}
.result-card p { margin: 14px 0 0; color: var(--muted); }
.result-meta { margin-top: 12px; font-size: 13px; color: var(--soft); }
.result-actions { margin-top: 28px; }

/* ---------- Документы: оферта и политика ---------- */
html { scroll-behavior: smooth; }
.legal-page { padding: 36px 0 72px; }

.doc-switch {
  display: flex;
  width: fit-content;
  max-width: 100%;
  gap: 4px;
  margin-bottom: 28px;
  padding: 4px;
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 999px;
  background: rgba(255, 255, 255, .6);
  box-shadow: 0 14px 34px -26px rgba(55, 88, 108, .6);
  scrollbar-width: none;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.doc-switch a {
  flex: none;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: #5d6b74;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .2s ease, color .2s ease;
}
.doc-switch a:hover { color: var(--ink); background: rgba(255, 255, 255, .7); }
.doc-switch .short { display: none; }
.doc-switch a[aria-current="page"] {
  color: #fff;
  background: var(--blue);
  box-shadow: 0 10px 20px -12px rgba(44, 69, 82, .8);
}

.legal-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.legal-toc {
  position: sticky;
  top: 104px;
  padding: 22px 20px;
  border: 1px solid rgba(255, 255, 255, .75);
  border-radius: 26px;
  background: rgba(255, 255, 255, .5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.legal-toc summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  cursor: pointer;
}
.legal-toc summary::-webkit-details-marker { display: none; }
.legal-toc summary::after {
  content: "";
  width: 8px;
  height: 8px;
  margin-right: 4px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .2s ease;
}
.legal-toc[open] summary::after { transform: translateY(2px) rotate(-135deg); }
@media (min-width: 901px) {
  .legal-toc summary { pointer-events: none; }
  .legal-toc summary::after { display: none; }
}
.legal-toc ol {
  display: grid;
  gap: 2px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
}
.legal-toc li { counter-increment: toc; }
.legal-toc a {
  display: flex;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.35;
  color: #5d6b74;
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease;
}
.legal-toc a::before {
  content: counter(toc);
  min-width: 14px;
  font-weight: 700;
  color: var(--blue-soft);
}
.legal-toc a:hover { color: var(--ink); background: rgba(255, 255, 255, .8); }

.legal {
  padding: 44px 48px 48px;
  border: 1px solid rgba(255, 255, 255, .75);
  border-radius: 36px;
  background: var(--glass);
  box-shadow: 0 28px 80px -48px rgba(55, 88, 108, .5);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}
.legal h1 {
  max-width: 16ch;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.1rem, 4vw, 3.3rem);
  line-height: 1;
  letter-spacing: -.035em;
  color: var(--ink-strong);
}
.legal__upd {
  display: inline-flex;
  margin: 18px 0 8px !important;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--mist);
  font-size: 12px !important;
  font-weight: 600;
  color: var(--blue) !important;
}
.legal h2 {
  scroll-margin-top: 104px;
  margin: 36px 0 12px;
  padding-top: 28px;
  border-top: 1px solid rgba(219, 231, 236, .9);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 23px;
  line-height: 1.2;
  letter-spacing: -.015em;
  color: var(--ink);
}
.legal p,
.legal li {
  max-width: 72ch;
  font-size: 15px;
  line-height: 1.75;
  color: #5d6b74;
}
.legal p { margin: 0 0 12px; }
.legal ul { margin: 0 0 12px; padding-left: 0; list-style: none; }
.legal li { position: relative; padding-left: 20px; margin-bottom: 4px; }
.legal li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: .72em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue-soft);
}
.legal a { color: var(--blue); text-decoration-color: rgba(85, 121, 143, .35); text-underline-offset: 2px; }
.legal a:hover { color: var(--blue-deep); }
.legal strong { color: var(--ink); }

/* Подвал статичных страниц */
.site-footer {
  border-top: 1px solid rgba(255, 255, 255, .7);
  background: rgba(255, 255, 255, .55);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 28px;
  padding: 30px 0;
  font-size: 13px;
  color: var(--muted);
}
.site-footer__inner p { margin: 0; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer__links a { color: var(--muted); text-decoration: none; }
.site-footer__links a:hover { color: var(--blue-deep); }

@media (max-width: 900px) {
  .legal-layout { grid-template-columns: 1fr; }
  .legal-toc { position: static; }
  .legal-toc ol { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .legal-page { padding: 24px 0 56px; }
  .doc-switch { width: 100%; margin-bottom: 20px; }
  .doc-switch a { flex: 1 1 0; padding: 10px 12px; text-align: center; font-size: 13px; }
  .doc-switch .long { display: none; }
  .doc-switch .short { display: inline; }
  .legal-toc { padding: 16px 18px; border-radius: 22px; }
  .legal h1 { font-size: 1.8rem; hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; }
  .legal-toc ol { grid-template-columns: 1fr; }
  .legal { padding: 28px 20px 30px; border-radius: 28px; }
  .legal h2 { font-size: 20px; margin-top: 28px; padding-top: 22px; }
  .site-footer__inner { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---------- Плавающая кнопка связи (js/contact-fab.js) ---------- */
.contact-fab {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 30;
  display: grid;
  gap: 12px;
}
.fab {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  box-shadow: inset 0 2px 1px rgba(255, 255, 255, .45), inset 0 -6px 12px rgba(20, 40, 52, .25), 0 18px 34px -12px rgba(38, 65, 79, .75);
  transition: transform .2s ease;
}
.fab:hover { transform: translateY(-2px) scale(1.05) rotate(-6deg); }
.fab--tg { background: linear-gradient(145deg, #7aa3ba, #55798f 55%, #44657a); }
.fab--wa { background: linear-gradient(145deg, #5fd48e, #25b866 55%, #1d9653); }
.fab svg { width: 24px; height: 24px; }

/* ---------- Адаптив ---------- */
@media (max-width: 900px) {
  .checkout__grid { grid-template-columns: 1fr; }
  .summary { position: static; }
}
@media (max-width: 640px) {
  .header { padding-top: 12px; }
  .header__inner { height: 58px; padding: 0 8px 0 14px; border-radius: 20px; }
  .brand { font-size: 23px; }
  .brand__mark { width: 22px; height: 22px; }
  .btn--ghost { padding: 0 13px; }
  .btn--ghost .long { display: none; }
  .btn--ghost .short { display: inline; }
  .checkout { padding: 28px 0 56px; }
  .checkout__title { margin-bottom: 22px; }
  .panel { padding: 22px 18px; border-radius: 26px; }
  .panel h2 { font-size: 23px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .cart-total { font-size: 23px; }
  .result-card { margin: 40px auto; padding: 36px 22px; }
  .contact-fab { right: 16px; bottom: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .001ms !important; }
}
