:root {
  --bg: #FAF6F0;
  --surface: #FFFFFF;
  --surface-alt: #F6EEE7;
  --chip: #F1E6DD;
  --line: #E8DCD3;
  --line-strong: #D9C8BE;
  --ink: #2A1418;
  --ink-2: #3D2A2D;
  --muted: #5E4B48;
  --brand: #7A1F2B;
  --brand-dark: #4E1119;
  --brand-deep: #6B1A26;
  --gold: #D9B46A;
  --gold-text: #E3C27E;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Manrope', system-ui, sans-serif;
  --radius: 20px;
  --container: 1160px;
}

* { box-sizing: border-box; }

/* Атрибут hidden завжди ховає елемент, навіть якщо клас задає display */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.5;
}

a { color: var(--brand); }
a:hover { color: var(--brand-dark); }

img, svg { display: block; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Typography ---------- */
.h1, .h2, .h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
}
.h1 { font-size: clamp(40px, 6vw, 68px); line-height: 1.02; }
.h2 { font-size: clamp(34px, 4.5vw, 48px); line-height: 1.08; }
.h3 { font-size: 28px; line-height: 1.15; }

.eyebrow {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
}

.lead {
  margin: 0;
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
}

.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head .h2 { margin-bottom: 14px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  border-radius: 999px;
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid var(--brand);
  transition: background .15s, color .15s;
}
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn--ghost { background: transparent; color: var(--brand); }
.btn--ghost:hover { background: var(--brand); color: #fff; }
.btn--sm { min-height: 44px; padding: 0 20px; font-size: 15px; }
.btn__extra { margin-left: .3em; }
.btn--block { width: 100%; min-height: 56px; font-size: 18px; font-weight: 700; }

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 14px;
  padding-bottom: 14px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}
.logo:hover { color: var(--ink); }
.logo svg { flex: none; }
.logo__text {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  font-size: 15px;
  font-weight: 500;
}
.nav__link { color: var(--ink); text-decoration: none; }
.nav__link:hover { color: var(--brand); }

@media (max-width: 720px) {
  .nav__link { display: none; }
}

/* ---------- Hero ---------- */
/* Мобільний: спершу фото, потім текст. Десктоп: текст ліворуч, фото праворуч. */
.hero {
  display: grid;
  gap: 20px;
  padding-top: 16px;
  padding-bottom: 40px;
}
.hero__text {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.hero__lead { font-size: 17px; max-width: 520px; }
/* Галерея: слайди лежать один на одному і змінюються плавним проявом */
.hero__media {
  position: relative;
  border-radius: 28px;
  background: radial-gradient(circle at 50% 40%, #FFFFFF 0%, #F6EEE7 55%, #EADCD1 100%);
  border: 1px solid var(--line);
  overflow: hidden;
  touch-action: pan-y;
}
.gallery__track {
  display: grid;
  height: min(48vh, 400px);
  padding: 14px 14px 38px;
}
.gallery__slide {
  grid-area: 1 / 1;
  margin: 0;
  min-height: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity .6s ease;
  pointer-events: none;
}
.gallery__slide.is-active { opacity: 1; pointer-events: auto; }
.gallery__slide picture { display: contents; }
.gallery__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 12px 18px rgba(42, 20, 24, .22));
}
.gallery__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6px;
  display: flex;
  justify-content: center;
}
.gallery__dot {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.gallery__dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #CDB7AC;
  transition: width .3s, background .3s;
}
.gallery__dot[aria-current="true"]::before { width: 22px; background: var(--brand); }
.gallery__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .85);
  color: var(--brand);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.gallery__arrow:hover { background: #fff; }
.gallery__arrow--prev { left: 6px; }
.gallery__arrow--next { right: 6px; }
@media (max-width: 899px) {
  .gallery__arrow { width: 34px; height: 34px; background: rgba(255, 255, 255, .7); }
}
.gallery__dot:focus-visible, .gallery__arrow:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  .gallery__slide { transition: none; }
}
@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1.05fr 1fr;
    align-items: center;
    gap: 56px;
    padding-top: 56px;
    padding-bottom: 56px;
  }
  .hero__text { grid-column: 1; grid-row: 1; gap: 22px; }
  .hero__media { grid-column: 2; grid-row: 1; }
  .gallery__track { height: auto; aspect-ratio: 1 / 1; padding: 36px 56px 48px; }
  .gallery__arrow--prev { left: 14px; }
  .gallery__arrow--next { right: 14px; }
  .hero__lead { font-size: 19px; }
}
.occasion {
  align-self: flex-start;
  padding: 10px 14px 10px 38px;
  border-radius: 12px;
  background: #FFF4E0 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237A1F2B' stroke-width='1.8'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E") no-repeat 12px 12px / 18px;
  border: 1px solid #E9D3A8;
  color: #4A3510;
  font-size: 15px;
  line-height: 1.45;
}
.occasion b { color: var(--brand); }
.occasion--order { margin-top: 16px; }
/* Стара ціна окремим рядком над новою */
.price-block { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.price-top { display: flex; align-items: center; gap: 10px; }
.price-block .price, .price-block .order__price { line-height: 1.05; }
.price {
  font-family: var(--serif);
  font-size: 44px;
  font-weight: 700;
  color: var(--brand);
}
.price-old {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 600;
  color: var(--muted);
  text-decoration-thickness: 1.5px;
}
.price-badge {
  align-self: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.checks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px 20px;
  font-size: 15px;
  color: var(--ink-2);
  margin: 0;
  padding: 0;
  list-style: none;
}
.checks li { display: flex; gap: 10px; align-items: center; }

.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; padding-top: 6px; }

/* ---------- Trust strip ---------- */
.trust {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.trust__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  padding-top: 28px;
  padding-bottom: 28px;
}
.trust__item { display: flex; gap: 14px; align-items: center; }
.trust__title { font-weight: 700; }
.trust__sub { font-size: 14px; color: var(--muted); }

/* ---------- Audience ---------- */
.section { padding-top: 88px; padding-bottom: 40px; }
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.card__tag {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
}
.card__text { margin: 0; font-size: 16px; line-height: 1.6; color: var(--muted); }

/* ---------- Set ---------- */
.set {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  align-items: flex-start;
  padding-top: 72px;
  padding-bottom: 72px;
}
.set__intro { flex: 1 1 360px; }
.set__intro .h2 { margin-bottom: 14px; }
.set__intro .lead { margin-bottom: 20px; }
.about {
  margin: 0 0 8px;
  padding-left: 16px;
  border-left: 3px solid var(--gold);
  font-family: var(--serif);
  font-size: 22px;
  font-style: italic;
  line-height: 1.4;
  color: var(--ink-2);
}
.about__note { margin: 0 0 18px; padding-left: 19px; font-size: 13px; color: var(--muted); }
.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pill {
  padding: 8px 14px;
  background: var(--chip);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
}
.set__grid {
  flex: 1 1 480px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}
.set-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
}
.set-item__no {
  font-family: var(--serif);
  font-size: 40px;
  font-weight: 700;
  color: var(--brand);
  line-height: 1;
}
.set-item__title { font-weight: 700; font-size: 18px; margin: 10px 0 6px; }
.set-item__text { font-size: 15px; line-height: 1.55; color: var(--muted); }

/* ---------- Steps ---------- */
.steps { background: var(--brand-deep); color: #F7EDE3; }
.steps__inner { padding-top: 80px; padding-bottom: 80px; }
.steps .h2 { color: #fff; margin-bottom: 40px; }
.steps__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px;
}
.step {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid #A0525C;
  padding-top: 20px;
}
.step__no { font-family: var(--serif); font-size: 22px; color: var(--gold-text); }
.step__title { font-size: 19px; font-weight: 700; color: #fff; }
.step__text { font-size: 15px; line-height: 1.55; }

/* ---------- Registry ---------- */
.registry { padding-top: 88px; padding-bottom: 72px; }
.registry__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 28px;
}
.registry__head > div:first-child { max-width: 620px; }
.registry__head .h2 { margin-bottom: 14px; }
.registry__count { font-family: var(--serif); font-size: 22px; color: var(--muted); }
.registry__count b { font-size: 34px; color: var(--brand); }

.notice {
  background: #FFF4E0;
  border: 1px solid #E9D3A8;
  color: #5A4214;
  border-radius: 14px;
  padding: 14px 18px;
  font-size: 15px;
  margin-bottom: 20px;
}

.registry__tools {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}
.input {
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  font: inherit;
  font-size: 17px;
  background: var(--surface);
  color: var(--ink);
  width: 100%;
}
.input:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.input::placeholder { color: #9A8783; }
.registry__search { flex: 1 1 260px; min-height: 48px; font-size: 16px; width: auto; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
.chip[aria-pressed="true"] { background: var(--brand); color: #fff; border-color: var(--brand); }

.table-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow-x: auto;
}
.table { width: 100%; border-collapse: collapse; min-width: 680px; font-size: 15px; }
.table th {
  text-align: left;
  background: var(--surface-alt);
  padding: 14px 18px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.table td { padding: 14px 18px; border-top: 1px solid #EFE4DC; }
.table__no { font-family: var(--serif); font-size: 19px; font-weight: 700; color: var(--brand); }
.table__to { font-weight: 700; }
.table__muted { color: var(--muted); white-space: nowrap; }
.tag {
  padding: 5px 10px;
  background: var(--chip);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.tag--demo { font-family: var(--sans); font-size: 12px; background: #FFF4E0; color: #5A4214; border: 1px dashed #D9B97A; }
.is-demo .col-date { display: none; }
.is-demo .table tbody { opacity: .85; }
.table-empty { padding: 28px; text-align: center; color: var(--muted); }

/* На телефоні таблиця стає списком карток: усі поля видно без горизонтального скролу */
@media (max-width: 640px) {
  .table-wrap { overflow: visible; }
  .table { min-width: 0; }
  .table thead { display: none; }
  .table, .table tbody { display: block; }
  .table tr {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      "to   to   reason"
      "from from from"
      "no   city date";
    gap: 4px 12px;
    padding: 16px 18px;
    border-top: 1px solid #EFE4DC;
  }
  .table tr:first-child { border-top: 0; }
  .table td { display: block; padding: 0; border: 0; }
  .table .col-to { grid-area: to; font-size: 17px; }
  .table .col-reason { grid-area: reason; align-self: center; }
  .table .col-from { grid-area: from; color: var(--ink-2); }
  .table .col-no { grid-area: no; font-size: 15px; align-self: center; }
  .table .col-city { grid-area: city; font-size: 14px; align-self: center; }
  .table .col-date { grid-area: date; font-size: 14px; align-self: center; justify-self: end; }
}
.registry__foot { margin: 16px 0 0; font-size: 14px; color: var(--muted); }

/* ---------- FAQ ---------- */
.faq { padding-top: 16px; padding-bottom: 72px; }
.faq .h2 { margin-bottom: 28px; }
.faq__list { display: flex; flex-direction: column; gap: 12px; }
.faq__item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 22px;
}
.faq__item summary { cursor: pointer; font-weight: 700; font-size: 17px; }
.faq__item p { margin: 12px 0 0; font-size: 16px; line-height: 1.6; color: var(--muted); }

/* ---------- Order ---------- */
.order-wrap { padding: 72px 24px 16px; }
.order {
  max-width: var(--container);
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: clamp(28px, 5vw, 56px);
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  align-items: center;
}
.order__info { flex: 1 1 380px; }
.order__info .h2 { margin-bottom: 14px; }
.order__info .lead { margin-bottom: 18px; }
.order__price { font-family: var(--serif); font-size: 40px; font-weight: 700; color: var(--brand); }
.order__note { font-size: 15px; color: var(--muted); }
.order__form-wrap { flex: 1 1 380px; }

.form { display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 28px; }
.form__label { font-size: 14px; font-weight: 600; }
.form__hint { margin-top: -8px; font-size: 13px; color: var(--muted); }
.phone { position: relative; }
.phone__code {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  pointer-events: none;
}
.phone__input { padding-left: 54px; letter-spacing: .02em; }
.form__error { font-size: 14px; color: #A3182C; min-height: 20px; }
.form__legal { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.form .btn { margin-top: 6px; }
.form .btn[disabled] { opacity: .6; cursor: progress; }

.sent {
  background: var(--surface-alt);
  border-radius: 14px;
  padding: 18px 20px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-2);
}

/* ---------- Thanks modal ---------- */
.modal {
  width: min(440px, calc(100% - 32px));
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 60px rgba(42, 20, 24, .28);
}
.modal::backdrop { background: rgba(42, 20, 24, .55); }
.modal__box {
  padding: 32px 28px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}
.modal__title { margin: 0; font-family: var(--serif); font-size: 30px; font-weight: 600; line-height: 1.1; }
.modal__text { margin: 0; font-size: 16px; line-height: 1.55; color: var(--muted); }
.modal__list {
  margin: 0 0 8px;
  padding: 14px 18px 14px 34px;
  background: var(--surface-alt);
  border-radius: 14px;
  text-align: left;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-2);
  align-self: stretch;
}

/* ---------- Sticky buy bar (mobile) ---------- */
.buybar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: var(--bg);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px rgba(42, 20, 24, .08);
}
.buybar__price { display: flex; flex-direction: column; line-height: 1.15; }
.buybar__price .price-old { font-size: 16px; }
.buybar__price b { font-family: var(--serif); font-size: 26px; color: var(--brand); }
.buybar__price span { font-size: 13px; color: var(--muted); }
.buybar__btn { flex: 0 0 auto; min-width: 150px; }
@media (min-width: 721px) {
  .buybar { display: none; }
}
/* Мобільний: шапки немає, замість неї завжди видно нижню плашку */
@media (max-width: 720px) {
  .header { display: none; }
  .btn__extra { display: none; } /* на телефоні кнопка коротка: про оплату вже сказано над формою */
  .price-badge { font-size: 13px; padding: 3px 8px; }
  html { scroll-padding-top: 16px; }
  .footer { padding-bottom: 84px; }
}

/* ---------- Footer ---------- */
.footer { background: linear-gradient(180deg, #5A1520 0%, #3E0D15 100%); color: #E9D8CC; }
/* Смуга кольорів стрічки відзнаки */
.footer__ribbon {
  height: 16px;
  background: linear-gradient(180deg,
    #F3EBDD 0 3px, #8E2A38 3px 6px, #F3EBDD 6px 10px, #8E2A38 10px 13px, #F3EBDD 13px 16px);
}
.footer a { color: #F7EDE3; text-decoration: none; }
.footer a:hover { color: var(--gold-text); text-decoration: underline; }
.footer a[aria-current="page"] { color: var(--gold-text); }

.footer__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 32px;
  padding-top: 40px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(227, 194, 126, .25);
}
.footer__cta-title { font-family: var(--serif); font-size: clamp(26px, 3.4vw, 36px); font-weight: 600; line-height: 1.15; color: #fff; }
.footer__cta-sub { margin-top: 8px; font-size: 15px; color: #D9C3B6; }
.btn--gold { background: var(--gold); border-color: var(--gold); color: var(--brand-dark); }
.footer a.btn--gold { color: var(--brand-dark); text-decoration: none; }
.footer a.btn--gold:hover { background: var(--gold-text); border-color: var(--gold-text); color: var(--brand-dark); }

.footer__grid {
  display: grid;
  /* Телефон: «Про відзнаку» і «Покупцям» поруч, решта на всю ширину */
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  padding-top: 40px;
  padding-bottom: 36px;
}
.footer__logo { display: inline-flex; align-items: center; gap: 12px; }
.footer__logo:hover { text-decoration: none; }
.footer__medal {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: radial-gradient(circle at 50% 40%, #FFFFFF 0%, #F3E7DC 70%);
  display: grid;
  place-items: center;
  padding: 6px;
}
.footer__medal img { width: 100%; height: 100%; object-fit: contain; }
.footer__brand { font-family: var(--serif); font-size: 26px; font-weight: 700; color: #fff; }
.footer__about, .footer__col:last-child { grid-column: 1 / -1; }
.footer__about p { margin: 14px 0 0; font-size: 15px; line-height: 1.6; color: #D9C3B6; max-width: 320px; }
.footer__title {
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold-text);
}
.footer__col ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 15px; }
.footer__facts li { padding-left: 18px; position: relative; color: #E9D8CC; }
.footer__facts li::before { content: "✓"; position: absolute; left: 0; color: var(--gold-text); }
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 20px;
  padding-bottom: 24px;
  border-top: 1px solid rgba(227, 194, 126, .25);
  font-size: 13px;
  color: #BFA79A;
}
@media (min-width: 900px) {
  .footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; }
  .footer__about, .footer__col:last-child { grid-column: auto; }
}

/* ---------- 404 ---------- */
.page-404 { min-height: 100vh; display: flex; flex-direction: column; }
.page-404 .header { display: block; } /* на 404 шапку з логотипом показуємо і на телефоні */
.page-404 .footer { padding-bottom: 0; }
.nf {
  flex: 1;
  display: grid;
  align-items: center;
  justify-items: center;
  gap: 24px;
  padding-top: 40px;
  padding-bottom: 64px;
  text-align: center;
}
.nf__media {
  width: min(240px, 62vw);
  aspect-ratio: 1 / 1;
  border-radius: 999px;
  background: radial-gradient(circle at 50% 40%, #FFFFFF 0%, #F6EEE7 55%, #EADCD1 100%);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  padding: 26px;
}
.nf__media img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 10px 16px rgba(42, 20, 24, .2)); }
.nf__text { display: flex; flex-direction: column; align-items: center; gap: 16px; max-width: 560px; }
.nf__code {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: .3em;
  color: var(--brand);
}
.nf__title { font-size: clamp(38px, 6vw, 56px); }
.nf__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; padding-top: 8px; }
@media (min-width: 900px) {
  .nf { grid-template-columns: auto 1fr; justify-items: start; gap: 64px; text-align: left; max-width: 980px; }
  .nf__media { width: 320px; padding: 34px; }
  .nf__text { align-items: flex-start; }
  .nf__actions { justify-content: flex-start; }
}

/* ---------- Юридичні сторінки (політика конфіденційності) ---------- */
.page-legal .header { display: block; } /* шапку з логотипом показуємо і на телефоні */
.page-legal .footer { padding-bottom: 0; }
.legal {
  display: grid;
  gap: 28px;
  padding-top: 40px;
  padding-bottom: 80px;
}
.legal__title { font-size: clamp(36px, 5vw, 56px); }
.legal__date { margin: 10px 0 0; font-size: 15px; color: var(--muted); }
.legal__toc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px 22px;
}
.legal__toc-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 10px;
}
.legal__toc ol { margin: 0; padding-left: 22px; display: grid; gap: 6px; font-size: 15px; }
.legal__toc a { color: var(--ink-2); text-decoration: none; }
.legal__toc a:hover { color: var(--brand); text-decoration: underline; }
.legal__section { scroll-margin-top: 16px; } /* на десктопі шапку враховує scroll-padding у html */
@media (max-width: 720px) { .legal__section { scroll-margin-top: 80px; } } /* на телефоні шапка тут видима */
.legal__section + .legal__section { margin-top: 36px; padding-top: 32px; border-top: 1px solid var(--line); }
.legal__h2 { margin: 0 0 14px; font-family: var(--serif); font-size: 30px; font-weight: 600; line-height: 1.15; }
.legal__body p, .legal__body li { font-size: 17px; line-height: 1.7; color: var(--ink-2); }
.legal__body p { margin: 0 0 12px; }
.legal__body ul { margin: 0 0 12px; padding-left: 22px; display: grid; gap: 6px; }
.legal__body ol { margin: 0 0 12px; padding-left: 22px; display: grid; gap: 6px; }
.legal__body b { color: var(--ink); }
/* Заглушка: дані, які треба замінити перед запуском */
.todo { background: #FFF4E0; border-bottom: 1px dashed #C99A3E; padding: 0 3px; }
@media (min-width: 900px) {
  .legal { grid-template-columns: 280px 1fr; column-gap: 56px; row-gap: 32px; padding-top: 56px; }
  .legal__head { grid-column: 1 / -1; }
  .legal__toc { position: sticky; top: 96px; align-self: start; }
}

/* ---------- Зворотний зв'язок ---------- */
/* Підвал притиснутий до низу екрана, навіть коли контенту мало */
.page-contact { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.page-contact .contact { flex: 1 0 auto; width: 100%; }
.page-contact .header { display: block; }
.page-contact .footer { padding-bottom: 0; }
.contact {
  display: grid;
  gap: 28px;
  padding-top: 40px;
  padding-bottom: 80px;
}
.contact__info { display: flex; flex-direction: column; gap: 18px; }
.contact__title { font-size: clamp(36px, 5vw, 56px); }
.contact__topics {
  background: var(--surface-alt);
  border-radius: 18px;
  padding: 18px 22px;
}
.contact__topics-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 8px;
}
.contact__topics ul { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: 16px; line-height: 1.55; color: var(--ink-2); }
.contact__note { margin: 0; font-size: 15px; color: var(--muted); }
.contact__card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: clamp(22px, 4vw, 40px);
}
.textarea { min-height: 150px; padding: 12px 16px; line-height: 1.5; resize: vertical; }
.contact-done {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  padding: 24px 8px;
  outline: none;
}
.contact-done__title { font-family: var(--serif); font-size: 30px; font-weight: 600; line-height: 1.15; }
.contact-done__text { margin: 0 0 8px; font-size: 16px; color: var(--muted); }
@media (min-width: 900px) {
  .contact { grid-template-columns: 1fr 1.1fr; column-gap: 56px; align-items: start; padding-top: 56px; }
}

/* Вузькі телефони: логотип і кнопка в шапці вміщаються в один рядок */
@media (max-width: 400px) {
  .header__inner { flex-wrap: nowrap; gap: 10px; }
  .logo { gap: 8px; }
  .logo__text { font-size: 20px; }
  .header .btn--sm { padding: 0 14px; font-size: 14px; min-height: 40px; white-space: nowrap; }
}
@media (max-width: 400px) { .logo__text { white-space: nowrap; } }
@media (max-width: 340px) { .logo__text { font-size: 18px; } .logo svg { width: 26px; height: 30px; } }

/* ---------- Сторінка реєстру ---------- */
.page-registry { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.page-registry .header { display: block; }
.page-registry .registry { flex: 1 0 auto; width: 100%; padding-top: 40px; }
.page-registry .footer { padding-bottom: 0; }
.registry__title { font-size: clamp(36px, 5vw, 56px); margin-bottom: 14px; }
@media (min-width: 900px) { .page-registry .registry { padding-top: 56px; } }

/* Пагінація реєстру */
/* Відступ при прокрутці до таблиці. На десктопі шапку вже враховує scroll-padding (80px) у html,
   на телефоні там лише 16px, а шапка на цій сторінці видима — додаємо її висоту. */
.table-wrap { scroll-margin-top: 16px; }
@media (max-width: 720px) { .page-registry .table-wrap { scroll-margin-top: 72px; } }
.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  margin-top: 18px;
}
.pager__info { font-size: 14px; color: var(--muted); }
.pager__pages { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pager__btn {
  min-width: 44px;
  height: 44px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.pager__btn:hover:not([disabled]):not([aria-current]) { border-color: var(--brand); color: var(--brand); }
.pager__btn[aria-current="page"] { background: var(--brand); border-color: var(--brand); color: #fff; cursor: default; }
.pager__btn[disabled] { opacity: .4; cursor: default; }
.pager__btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.pager__gap { min-width: 20px; text-align: center; color: var(--muted); }
@media (max-width: 640px) {
  .pager { justify-content: center; }
  .pager__info { width: 100%; text-align: center; order: 2; }
  .pager__word { display: none; } /* на телефоні стрілки без слів */
  .pager__btn--nav { font-size: 20px; }
}

/* Анонс реєстру на головній */
.reg-teaser { padding-top: 72px; padding-bottom: 16px; }
.reg-teaser__card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 40px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: clamp(24px, 4vw, 44px);
}
.reg-teaser__card > div { flex: 1 1 420px; }
.reg-teaser__card .h2 { margin-bottom: 12px; }
