/* Котята ищут дом - частный приют. Дизайн-токены и стили. */

:root {
  --bg: #FAF3EA;
  --paper: #FFFDF8;
  --ink: #35281C;
  --ink-soft: #77685A;
  --terra: #C25B33;
  --terra-deep: #8F3E1E;
  --terra-soft: #F6E2D4;
  --honey-deep: #7E5A10;
  --honey-soft: #F6EAD0;
  --stone-deep: #5A544B;
  --stone-soft: #ECE7DD;
  --line: #EBDFCE;
  --radius-lg: 20px;
  --radius: 14px;
  --shadow-card: 0 1px 2px rgba(53, 40, 28, 0.05), 0 8px 20px rgba(53, 40, 28, 0.09);
  --shadow-lift: 0 2px 4px rgba(53, 40, 28, 0.06), 0 14px 30px rgba(53, 40, 28, 0.14);
  --font-display: "Podkova", Georgia, serif;
  --font-text: "Nunito", system-ui, sans-serif;
  --nav-h: 60px;
}

@media (max-width: 719px) {
  :root { --nav-h: 54px; }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
}

img { display: block; max-width: 100%; }

img[hidden] { display: none; }

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

/* десктоп: пустота по бокам ровно вдвое больше исходной (~110px на 1920) */
@media (min-width: 1200px) {
  .wrap { width: min(1760px, 100% - 11.5vw); }
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Видео-фон ---------- */

.video-bg {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 100vh;
  /* большой вьюпорт: слой не дёргается при скрытии/показе адресной строки - нет резкого «зума» фона */
  height: 100lvh;
  z-index: -1;
  background: url("assets/video/poster.jpg") center / cover no-repeat var(--bg);
}

.video-bg video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* экономный режим: видео не грузим (шлюз в app.js), постер остаётся */
@media (prefers-reduced-data: reduce) {
  .video-bg video { display: none; }
}

/* ---------- Шапка (текст поверх видео-фона) ---------- */

/* ---------- Шапка: стеклянные карточки лесенкой поверх видео ---------- */

.hero {
  position: relative;
  padding: 56px 0 16px;
}

/* каждый блок - самостоятельный экран: следующие появляются только при пролистывании */
.hero-stack {
  display: flex;
  flex-direction: column;
  gap: clamp(480px, 68vh, 940px);
}

/* «объёмное стекло»: полупрозрачная карта с размывом фона */
.glass {
  background: rgba(255, 253, 248, 0.55);
  -webkit-backdrop-filter: blur(14px) saturate(1.35);
  backdrop-filter: blur(14px) saturate(1.35);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 24px;
  box-shadow: 0 8px 32px rgba(53, 40, 28, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.hero-card {
  padding: 36px 42px 32px;
  display: flex;
  flex-direction: column;
  min-height: 450px;
}

/* три одинаковые карточки: внешним краем встают в одну линию с остальным контентом,
   внутренняя граница практически доходит до центра */
.hero-card--a,
.hero-card--c {
  width: calc(50% - 48px);
  align-self: flex-start;
}

.hero-card--b {
  width: calc(50% - 48px);
  align-self: flex-end;
}

/* единый заголовок всех трёх карточек: один размер, вес и цвет */
.hero-title {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.9rem, 1.3vw + 1.45rem, 2.5rem);
  line-height: 1.12;
  color: var(--ink);
}

.hero-quote {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.6rem;
  line-height: 1.35;
  color: var(--ink);
}

/* появление карточек при пролистывании */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.16, 0.84, 0.28, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

@media (max-width: 899px) {
  .hero { padding-top: 30px; }
  .hero-stack { gap: 19vh; }
  .hero-card { padding: 26px 22px 24px; min-height: 376px; }
  .hero-card--a, .hero-card--b, .hero-card--c {
    width: auto;
    margin-left: 0;
    margin-right: 0;
    align-self: stretch;
  }
}

/* ---------- Фото-полоса перед каталогом ---------- */

.hero-photo {
  /* отступ от третьего блока равен расстоянию между блоками */
  padding: clamp(480px, 68vh, 940px) 0 32px;
}

.hero-photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 1;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}

@media (min-width: 900px) {
  .hero-photo img { aspect-ratio: 9 / 2; }
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--terra);
}

.hero h1 {
  /* h1 первой карточки - тот же вид, что у h2 остальных (единый .hero-title) */
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.9rem, 1.3vw + 1.45rem, 2.5rem);
  line-height: 1.12;
  color: var(--ink);
}

.squiggle { display: block; margin: 10px 0 12px; }

.lead {
  margin: 0;
  max-width: 34em;
  font-size: 1.12rem;
  color: var(--ink-soft);
}

/* минимальный зазор до плашки: когда контент выше мин-высоты карточки,
   auto-маржин плашки сжимается в ноль - зазор держит этот отступ */
.hero-card .lead { margin-bottom: 24px; }

.count-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: auto 0 0;
  padding: 13px 26px;
  border-radius: 999px;
  background: var(--terra-soft);
  color: var(--terra-deep);
  font-weight: 800;
  font-size: 1.08rem;
}

.count-chip svg { width: 20px; height: 20px; flex: 0 0 auto; }

/* ---------- Стена карточек ---------- */

.grid {
  list-style: none;
  margin: 64px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px 12px;
}

@media (min-width: 720px) {
  .grid { grid-template-columns: repeat(3, 1fr); gap: 26px 18px; }
}

@media (min-width: 1080px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
}

/* li растягивает карточку на всю высоту ряда - карточки одинаковые */
.grid > li { display: flex; }

.card {
  display: block;
  flex: 1 1 auto;
  position: relative;
  width: 100%;
  padding: 10px 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: left;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.card:hover,
.card:focus-visible {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
}

.card:focus-visible {
  outline: 3px solid var(--terra);
  outline-offset: 2px;
}

.ph {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(100deg, #F1E6D6 40%, #F8F0E4 50%, #F1E6D6 60%);
  background-size: 220% 100%;
  animation: shimmer 1.4s linear infinite;
}

.ph img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.ph img.loaded { opacity: 1; }

.ph--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: none;
  background: var(--terra-soft);
}

.ph--empty svg { width: 44%; height: auto; color: var(--terra); opacity: 0.55; }

@keyframes shimmer {
  from { background-position: 120% 0; }
  to { background-position: -120% 0; }
}

.k-body { display: block; padding: 12px 4px 0; }

.k-name {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  line-height: 1.15;
}

.k-meta {
  display: block;
  margin-top: 2px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-soft);
}

.k-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  /* ровно две строки (line-height 1.55): одна высота у всех карточек ряда */
  height: 3.1em;
  margin: 6px 0 10px;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

/* ---------- Статус-бейджи ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.badge::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.badge--seek { background: var(--terra-soft); color: var(--terra-deep); }
.badge--booked { background: var(--honey-soft); color: var(--honey-deep); }
.badge--adopted { background: var(--stone-soft); color: var(--stone-deep); }

/* Пристроен - карточка приглушена */
.card--adopted .ph img { filter: grayscale(0.45); opacity: 0.75; }
.card--adopted .ph img.loaded { opacity: 0.75; }
.card--adopted .k-name { color: var(--ink-soft); }

/* ---------- Контакты ---------- */

.contacts { margin: 56px 0 0; }

.contacts-box {
  padding: 26px 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow-card);
}

.contacts h2 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.7rem;
}

.contacts-note { margin: 0 0 18px; color: var(--ink-soft); font-size: 0.95rem; }

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.contact-list a,
.contact-list .contact-plain {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--bg);
  font-weight: 700;
  text-decoration: none;
  color: var(--ink);
  transition: background 0.15s ease;
}

.contact-list a:hover { background: var(--terra-soft); }

.contact-list a:focus-visible {
  outline: 3px solid var(--terra);
  outline-offset: 2px;
}

.contact-list svg { flex: none; width: 22px; height: 22px; color: var(--terra); }

.contact-hint {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.placeholder-note {
  margin: 14px 0 0;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

/* ---------- Подвал: монотонный фон, контакты ---------- */

.site-footer {
  position: relative;
  z-index: 1;
  margin-top: 56px;
  padding: 30px 0 34px;
  background: var(--bg);
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.site-footer .wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: space-between;
  align-items: center;
}

.footer-contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  align-items: center;
  font-weight: 700;
}

.footer-contacts a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--terra-deep);
  text-decoration: none;
}

.footer-contacts a:hover { text-decoration: underline; }

.footer-contacts svg {
  width: 15px;
  height: 15px;
  color: var(--terra);
}

.footer-legal {
  margin: 0;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.site-footer a { color: var(--terra-deep); }

/* ---------- Модальное окно ---------- */

.modal { position: fixed; inset: 0; z-index: 50; }
.modal[hidden] { display: none; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(43, 30, 20, 0.55);
  animation: fade-in 0.2s ease;
}

.modal-sheet {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  max-height: 92dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--paper);
  border: 1px solid var(--line);
  border-bottom: none;
  border-radius: 26px 26px 0 0;
  box-shadow: 0 -12px 60px rgba(53, 40, 28, 0.32);
  animation: sheet-up 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.sheet-handle {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: center;
  padding: 10px 0 4px;
  background: var(--paper);
}

.sheet-handle::before {
  content: "";
  width: 44px; height: 5px;
  border-radius: 999px;
  background: var(--line);
}

.modal-close {
  position: absolute;
  top: 14px; right: 14px;
  z-index: 3;
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(53, 40, 28, 0.55);
  color: #FFF7EC;
  cursor: pointer;
}

.modal-close svg { width: 20px; height: 20px; }

.modal-close:hover { background: rgba(53, 40, 28, 0.75); }

.modal-close:focus-visible {
  outline: 3px solid #FFF7EC;
  outline-offset: 2px;
}

.m-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.gallery { position: relative; background: #37281B; }

.g-frame {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  max-height: 46dvh;
}

.g-frame img,
.g-frame .g-empty {
  width: 100%;
  height: 100%;
  max-height: 46dvh;
  object-fit: contain;
}

.g-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #D8C6B2;
  font-weight: 700;
}

.g-empty svg { width: 64px; height: 64px; opacity: 0.6; }

/* стрелки галереи - тёмное стекло: читается и на светлых, и на тёмных фото */
.g-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px; height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: rgba(43, 30, 20, 0.45);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #FFF7EC;
  cursor: pointer;
  box-shadow: 0 2px 14px rgba(43, 30, 20, 0.35);
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.g-arrow:hover {
  background: rgba(43, 30, 20, 0.68);
  box-shadow: 0 4px 20px rgba(43, 30, 20, 0.45);
}

.g-arrow:focus-visible {
  outline: 3px solid var(--terra);
  outline-offset: 2px;
}

.g-arrow svg { width: 22px; height: 22px; }

.g-arrow--prev { left: 12px; }
.g-arrow--next { right: 12px; }
.g-arrow[hidden] { display: none; }

.g-counter {
  position: absolute;
  left: 14px; bottom: 12px;
  padding: 4px 12px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  background: rgba(43, 30, 20, 0.6);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #FFF7EC;
  font-size: 0.8rem;
  font-weight: 800;
}

.m-info { padding: 20px 22px 28px; }

.m-info h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.9rem, 4.5vw, 2.4rem);
  line-height: 1.08;
}

.m-meta {
  margin: 6px 0 12px;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.m-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.m-status { margin: 0 0 14px; }

.m-desc {
  margin: 0 0 18px;
  font-size: 1rem;
  line-height: 1.62;
  color: var(--ink-soft);
}

.m-loc {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.m-loc svg { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--terra); }

.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 20px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(180deg, #D06A40 0%, #C25B33 55%, #A84A26 100%);
  color: #FFF7EC;
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(194, 91, 51, 0.36), inset 0 1px 0 rgba(255, 247, 236, 0.28);
  transition: box-shadow 0.16s ease, transform 0.16s ease, filter 0.16s ease;
}

.cta:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
  box-shadow: 0 10px 26px rgba(194, 91, 51, 0.44), inset 0 1px 0 rgba(255, 247, 236, 0.28);
}

.cta:active { transform: translateY(0); }

.cta:focus-visible {
  outline: 3px solid var(--terra-deep);
  outline-offset: 3px;
}

.cta svg { width: 20px; height: 20px; }

@keyframes sheet-up {
  from { transform: translateY(6%); opacity: 0.6; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---------- Десктоп: модалка по центру, две колонки ---------- */

@media (min-width: 880px) {
  .modal-sheet {
    left: 50%; right: auto; bottom: auto; top: 50%;
    transform: translate(-50%, -50%);
    width: min(980px, calc(100% - 48px));
    max-height: calc(100dvh - 64px);
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: 0 30px 90px rgba(53, 40, 28, 0.4);
    animation: pop-in 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
  }

  .sheet-handle { display: none; }

  .m-layout {
    grid-template-columns: 1.15fr 1fr;
    align-items: stretch;
  }

  .g-frame { min-height: 420px; max-height: calc(100dvh - 128px); }
  .g-frame img, .g-frame .g-empty { max-height: calc(100dvh - 128px); height: 100%; }
  .m-info { padding: 30px 30px 34px; overflow-y: auto; }

  @keyframes pop-in {
    from { transform: translate(-50%, calc(-50% + 14px)); opacity: 0.5; }
    to { transform: translate(-50%, -50%); opacity: 1; }
  }
}

/* ---------- Доступность и движение ---------- */

:focus-visible { outline: 3px solid var(--terra); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body.modal-open { overflow: hidden; }

/* ---------- Навбар ---------- */

.navbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(250, 243, 234, 0.86);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.navbar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--nav-h);
}

.brand {
  display: inline-flex;
  flex-direction: column;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.1;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.brand-wave {
  width: 100%;
  height: 7px;
  margin-top: 3px;
}

.brand:focus-visible {
  outline: 3px solid var(--terra);
  outline-offset: 2px;
  border-radius: 6px;
}

.nav-links {
  display: flex;
  gap: 2px;
  margin-left: auto;
}

.nav-links a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-links a:hover { background: var(--terra-soft); color: var(--terra-deep); }

.nav-links a:focus-visible {
  outline: 3px solid var(--terra);
  outline-offset: 2px;
}

.nav-links a[aria-current="page"] {
  background: var(--terra-soft);
  color: var(--terra-deep);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links + .nav-actions { margin-left: 0; }
.nav-actions:first-child { margin-left: auto; }

.nav-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-icon:hover { background: var(--terra-soft); color: var(--terra-deep); }

.nav-icon:focus-visible {
  outline: 3px solid var(--terra);
  outline-offset: 2px;
}

.nav-icon svg { width: 21px; height: 21px; }

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-left: 4px;
  padding: 8px 18px;
  border: none;
  border-radius: 999px;
  background: var(--terra);
  color: #FFF7EC;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, transform 0.15s ease;
}

.nav-cta:hover { background: var(--terra-deep); transform: translateY(-1px); }

.nav-cta:focus-visible {
  outline: 3px solid var(--terra-deep);
  outline-offset: 2px;
}

.nav-burger { display: none; }

.nav-drawer {
  border-top: 1px solid var(--line);
  padding: 8px 0 12px;
}

.nav-drawer[hidden] { display: none; }

.nav-drawer a,
.nav-drawer .nav-cta {
  display: flex;
  align-items: center;
  min-height: 48px;
  margin: 4px 0 0;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  color: var(--ink);
}

.nav-drawer a:hover { background: var(--terra-soft); }

.nav-drawer .nav-cta {
  background: var(--terra);
  color: #FFF7EC;
  border: none;
  cursor: pointer;
  font-family: inherit;
  justify-content: center;
}

@media (max-width: 899px) {
  .nav-links { display: none; }
  /* компактный мобильный ряд: иконки + бургер прижаты вправо, CTA в бургер-меню */
  .nav-actions .nav-cta { display: none; }
  .nav-links + .nav-actions { margin-left: auto; }
  .nav-burger {
    display: flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
  }
  .nav-burger:hover { background: var(--terra-soft); }
  .nav-burger svg { width: 22px; height: 22px; }
}

@media (min-width: 900px) {
  .nav-drawer { display: none; }
}

/* ---------- Панель фильтров (index) ---------- */

.filter-bar {
  position: sticky;
  top: calc(var(--nav-h) + 8px);
  z-index: 30;
  width: fit-content;
  min-width: min(320px, 100% - 24px);
  max-width: calc(100% - 24px);
  margin: 32px 0 0;
  padding: 7px 12px;
  background: rgba(255, 253, 248, 0.78);
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
  backdrop-filter: blur(12px) saturate(1.3);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-card);
}

/* плашка поиска: овальная кнопка «Фильтр» слева + поиск по имени */
.searchbar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filters-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 18px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: linear-gradient(180deg, #FFFFFF 0%, #FFF8EE 100%);
  font-family: inherit;
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.filters-btn svg { width: 16px; height: 16px; color: var(--terra); }

.filters-btn:hover {
  border-color: var(--terra);
  color: var(--terra-deep);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(194, 91, 51, 0.18);
}

.filters-btn:focus-visible {
  outline: 3px solid var(--terra);
  outline-offset: 2px;
}

/* счётчик выбранных значений фильтров */
.filters-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--terra);
  color: #FFF7EC;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
}

/* display:inline-flex перебивает [hidden] из UA-стилей - восстанавливаем */
.filters-badge[hidden] { display: none; }

.search-input {
  flex: 0 1 auto;
  width: min(420px, calc(100vw - 220px));
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 18px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  background: linear-gradient(180deg, #FFFFFF 0%, #FFF8EE 100%);
  transition: border-color 0.15s ease;
}

.search-input:focus-within { border-color: var(--terra); }

.search-input svg { width: 17px; height: 17px; color: var(--ink-soft); flex: 0 0 auto; }

.search-input input {
  width: 100%;
  border: none;
  background: none;
  outline: none;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
}

.search-input input::placeholder { color: var(--ink-soft); opacity: 0.75; }

@media (max-width: 899px) {
  /* плашка выше на 1/5 и шириной ровно в каталог */
  .filter-bar { width: 100%; max-width: none; margin-inline: auto; margin-top: 13px; padding: 6px 10px; }
  .searchbar { width: 100%; gap: 8px; }
  .filters-btn { min-height: 34px; padding: 0 14px; gap: 6px; font-size: 0.8rem; }
  .filters-btn svg { width: 14px; height: 14px; }
  .filters-badge { min-width: 16px; height: 16px; font-size: 0.64rem; }
  .search-input { flex: 1 1 auto; width: auto; min-height: 34px; padding: 0 14px; gap: 8px; }
  .search-input svg { width: 14px; height: 14px; }
  .search-input input { font-size: 0.85rem; }

  /* отступ «третий блок -> фото» равен расстоянию между блоками (19vh) */
  .hero-photo { padding: 19vh 0 16px; }

  /* фото в 1.5 раза ниже */
  .hero-photo img { aspect-ratio: 3 / 1; }

  /* «фото -> фильтр» = «фильтр -> каталог» (29px, на треть меньше) */
  .grid { margin-top: 29px; }

  /* чуть мельче шрифт + выше карточки: оранжевая плашка не впритык к тексту.
     ВАЖНО: эти оверрайды живут здесь, ПОСЛЕ базовых .hero h1/.hero-title/.lead/.count-chip -
     ранние медиа-блоки молча перебиваются базой (правило css-media-override-after-base) */
  .hero-title,
  .hero h1 { font-size: clamp(1.35rem, 5.5vw, 1.55rem); margin-bottom: 10px; }
  .lead { font-size: 1.02rem; }
  .count-chip { margin: auto 0 0; padding: 10px 20px; font-size: 0.95rem; }
  .count-chip svg { width: 17px; height: 17px; }
}

.chip {
  min-height: 36px;
  padding: 5px 13px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.chip:hover { border-color: var(--terra); color: var(--terra-deep); }

.chip:focus-visible {
  outline: 3px solid var(--terra);
  outline-offset: 2px;
}

.chip[aria-pressed="true"] {
  background: var(--terra);
  border-color: var(--terra);
  color: #FFF7EC;
}

/* ---------- Окно фильтров ---------- */

.filter-reset {
  min-height: 40px;
  padding: 0 4px;
  border: none;
  background: none;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--terra-deep);
  text-decoration: underline;
  cursor: pointer;
  white-space: nowrap;
}

.filter-reset:focus-visible {
  outline: 3px solid var(--terra);
  outline-offset: 2px;
}

.modal-sheet--filters {
  padding: 0 0 18px;
}

/* десктоп: окно фильтров уже и центрировано (базовый .modal-sheet на десктопе 980px) */
@media (min-width: 880px) {
  .modal-sheet--filters { width: min(640px, calc(100vw - 48px)); }
}

.fm-body { padding: 22px 22px 0; }

.fm-body h2 {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
}

.fm-group { margin: 0 0 18px; }

.fm-label {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--terra);
}

.fm-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.fm-chips .chip { min-height: 40px; }

.fm-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

/* меню «Аккаунт» в навбаре админки */
.adm-account-nav { position: relative; }

.adm-account-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 6px 14px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: linear-gradient(180deg, #FFFFFF 0%, #FFF8EE 100%);
  font-family: inherit;
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.adm-account-btn svg { width: 15px; height: 15px; color: var(--terra); }
.adm-account-btn .adm-account-caret { width: 10px; height: 10px; color: var(--ink-soft); transition: transform 0.15s ease; }

.adm-account-btn:hover { border-color: var(--terra); color: var(--terra-deep); }
.adm-account-btn[aria-expanded="true"] { border-color: var(--terra); background: var(--terra-soft); }
.adm-account-btn[aria-expanded="true"] .adm-account-caret { transform: rotate(180deg); }

.adm-account-drop {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 60;
  display: flex;
  flex-direction: column;
  min-width: 230px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow-lift);
}

/* display:flex перебивает [hidden] из UA-стилей - восстанавливаем */
.adm-account-drop[hidden] { display: none; }

.adm-account-drop a,
.adm-account-drop button {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 10px;
  background: none;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--ink);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.adm-account-drop a:hover,
.adm-account-drop button:hover { background: var(--terra-soft); color: var(--terra-deep); }

.adm-account-drop button { color: #B3261E; }
.adm-account-drop button:hover { background: #FBEAE7; color: #B3261E; }

.adm-team-filter-bar { margin: 14px 0 10px; }

.adm-team-form-title {
  margin: 20px 0 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--terra-deep);
}

@media (max-width: 719px) {
  .adm-account-btn { min-height: 38px; padding: 5px 12px; font-size: 0.85rem; }
}

.grid-empty {
  margin: 26px 0 0;
  padding: 26px 22px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  color: var(--ink-soft);
  font-weight: 700;
  text-align: center;
}

/* ---------- Сердечко на карточке ---------- */

.heart {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 253, 248, 0.88);
  color: var(--terra);
  cursor: pointer;
  box-shadow: var(--shadow-card);
  transition: transform 0.15s ease;
}

.heart:hover { transform: scale(1.08); }

.heart svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Тост ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 90;
  transform: translateX(-50%) translateY(10px);
  max-width: min(92vw, 520px);
  padding: 13px 22px;
  border-radius: 999px;
  background: var(--ink);
  color: #FFF7EC;
  font-weight: 700;
  font-size: 0.92rem;
  text-align: center;
  box-shadow: var(--shadow-lift);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- Контактная форма и профиль ---------- */

.modal--top { z-index: 60; }

.modal-sheet--narrow { padding-bottom: 26px; }

.c-contacts { padding: 22px 22px 0; }

.c-contact {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 800;
  font-size: 1rem;
}

.c-contact svg { width: 20px; height: 20px; color: var(--terra); flex: 0 0 auto; }

.c-contact:hover { color: var(--terra-deep); }

.c-contacts + .c-form {
  margin-top: 14px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.c-form, .p-body { padding: 22px 22px 0; }

.c-form h2, .p-body h2, .c-contacts h2 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.7rem;
}

.c-note, .p-greet {
  margin: 0 0 18px;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.field {
  display: block;
  margin: 0 0 14px;
}

.field > span {
  display: block;
  margin-bottom: 6px;
  font-weight: 800;
  font-size: 0.85rem;
}

.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  font: inherit;
  color: var(--ink);
  resize: vertical;
}

.field input:focus-visible,
.field textarea:focus-visible {
  outline: 3px solid var(--terra);
  outline-offset: 1px;
  border-color: var(--terra);
}

.field input.is-invalid { border-color: #B3261E; }

.field-error {
  display: none;
  margin-top: 5px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #B3261E;
}

/* .field > span { display:block } имеет специфичность (0,1,1) и перебивает .field-error (0,1,0):
   ошибка становилась видна всегда. Повышаем специфичность обоих состояний. */
.field .field-error { display: none; }

.field .field-error.is-visible,
.field-error.is-visible { display: block; }

.c-form .cta {
  width: 100%;
  margin-top: 4px;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.c-demo-note {
  margin: 12px 0 0;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.p-counters {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 0 0 18px;
}

.p-counter {
  padding: 16px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #FFFFFF 0%, #FAF3EA 100%);
  text-align: center;
}

.p-counter strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.55rem;
  color: var(--terra-deep);
}

.p-counter span {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-soft);
}

/* плитка-счётчик - кнопка: тап включает фильтр каталога, поэтому курсор и hover */
button.p-counter {
  font: inherit;
  cursor: pointer;
  transition: border-color 0.16s ease, background-color 0.16s ease;
}

button.p-counter:hover {
  border-color: var(--terra);
  background: var(--terra-soft);
}

button.p-counter:focus-visible {
  outline: 3px solid var(--terra);
  outline-offset: 1px;
}

.p-list {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: grid;
  gap: 8px;
}

.p-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 48px;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--bg);
  font-weight: 700;
  cursor: default;
}

.p-soon {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-soft);
  text-align: right;
}

.cta--ghost {
  background: var(--paper);
  border: 2px solid var(--terra);
  color: var(--terra-deep);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 2px 8px rgba(194, 91, 51, 0.1);
}

.cta--ghost:hover {
  background: var(--terra-soft);
  transform: translateY(-2px);
  filter: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 6px 16px rgba(194, 91, 51, 0.18);
}

button.cta {
  font-family: inherit;
  cursor: pointer;
}

.p-body .cta--ghost {
  width: 100%;
}

/* ---------- Действия в модалке карточки ---------- */

.m-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 0 0 16px;
}

/* кнопки в карточке не переносятся на вторую строку */
.m-actions .cta {
  font-size: 0.95rem;
  padding: 12px 14px;
  white-space: nowrap;
}

/* заявка отправлена: та же кнопка, тот же размер - активная «Отменить заявку» в красном тоне */
.m-actions .cta.is-cancel {
  border-color: rgba(179, 38, 30, 0.45);
  color: #B3261E;
}

.m-actions .cta.is-cancel:hover {
  border-color: #B3261E;
  color: #B3261E;
  background: #FBEDEC;
}

@media (min-width: 880px) {
  .m-actions { grid-template-columns: 1fr 1fr; }
  .c-form, .p-body { padding: 26px 28px 0; }
  .modal-sheet--narrow {
    width: min(480px, calc(100% - 48px));
  }
}

/* ---------- Внутренние страницы ---------- */

.page { padding: 30px 0 0; }

.page-box {
  max-width: 720px;
  padding: 30px 26px 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow-card);
}

.page-box h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.9rem, 6vw, 2.7rem);
  line-height: 1.1;
}

.page-box .squiggle { margin: 12px 0 16px; }

.page-box p { margin: 0 0 14px; }

.page-box h2 {
  margin: 22px 0 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
}

.page-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  margin-top: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--terra);
  color: #FFF7EC;
  font-weight: 800;
  text-decoration: none;
  transition: background 0.15s ease;
}

.page-back:hover { background: var(--terra-deep); }

.page-back svg { width: 18px; height: 18px; }

/* ---------- Футер: ссылки на страницы ---------- */

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
}

.footer-nav a {
  color: var(--terra-deep);
  font-weight: 700;
  text-decoration: none;
}

.footer-nav a:hover { text-decoration: underline; }

/* ---------- Страница «О нас»: светлый фотоальбом ---------- */

body.page--about {
  background: #FAF6EF;
}

/* шапка-обложка как на референсе: полноэкранное фото, тёмная вуаль,
   белый капс-заголовок по центру, кредит фотографа, стрелка вниз */
.about-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: url("assets/photos/cover.jpg") center / cover no-repeat;
}

.about-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(23, 16, 10, 0.48);
}

.about-hero-inner {
  position: relative;
  z-index: 1;
  padding: 0 24px;
  text-align: center;
  transform: translateY(5vh);
}

.ah-title {
  margin: 0 auto;
  max-width: 26em;
  color: #FFFFFF;
  font-family: "Oswald", sans-serif;
  font-weight: 300;
  font-size: clamp(1.5rem, 3.8vw, 3.4rem);
  line-height: 1.12;
  letter-spacing: 0.015em;
  text-transform: uppercase;
}

.ah-arrow {
  position: absolute;
  bottom: 26px;
  left: 50%;
  z-index: 1;
  transform: translateX(-50%);
  display: flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #FFFFFF;
  animation: ah-bounce 2.2s ease-in-out infinite;
}

.ah-arrow svg { width: 22px; height: 22px; }

.ah-arrow:focus-visible { outline: 3px solid #FFFFFF; outline-offset: 2px; }

@keyframes ah-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(7px); }
}

@media (prefers-reduced-motion: reduce) {
  .ah-arrow { animation: none; }
}

/* текст «о нас» в стеклянной карточке на всю ширину контента, как блоки главной */
.about-intro {
  padding: 40px 0 10px;
  text-align: center;
}

.about-intro .about-intro-box {
  padding: 38px 44px 32px;
}

.about-intro p {
  max-width: 62ch;
  margin: 0 auto 18px;
  color: var(--ink);
  font-size: 1.2rem;
  line-height: 1.7;
}

.about-intro .eyebrow { margin-bottom: 14px; }

/* метка сверху, волна под ней по центру */
.about-intro-head {
  margin: 0 0 14px;
}

.about-intro-head .squiggle { display: block; margin: 0 auto; }

.about-intro-head .eyebrow { margin: 0 0 4px; text-align: center; max-width: none; }

.about-intro .placeholder-note { font-size: 0.85rem; }

.about-intro .page-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  min-height: 48px;
  padding: 0 26px;
  border: none;
  border-radius: 999px;
  background: var(--terra);
  color: #FFF7EC;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(194, 91, 51, 0.3);
  transition: background 0.15s ease, transform 0.15s ease;
}

.about-intro .page-back:hover { background: var(--terra-deep); }

@media (max-width: 719px) {
  .about-intro .about-intro-box { padding: 26px 18px 24px; }
  .about-intro p { font-size: 1.08rem; }
}

/* стена фото как на референсе: JS раскладывает по flex-колонкам (см. app.js);
   CSS-мульиколонки не справляются с 115 фото - балансировщик Chromium падает в одну колонку */
.wall {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.wall-col {
  flex: 1 1 0;
  min-width: 0;
}

.wall-col img {
  display: block;
  position: relative;
  width: 100%;
  height: auto;
  margin: 0 0 12px;
  border-radius: 10px;
  transition: transform 0.35s ease;
  will-change: transform;
}

/* ховер-зум как на референсе: фото чуть вырастает над соседями */
.wall-col img:hover,
.wall-col img:focus-visible {
  transform: scale(1.05);
  z-index: 2;
}

@media (min-width: 880px) {
  .wall { gap: 16px; }
  .wall-col img { margin-bottom: 16px; border-radius: 14px; }
}

/* ---------- Админ-панель (мок) ---------- */

.adm { padding: 26px 0 40px; }

.adm-head h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
}

.adm-demo-note {
  margin: 10px 0 0;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--honey-soft);
  color: var(--honey-deep);
  font-weight: 700;
  font-size: 0.9rem;
}

.adm-section {
  /* якоря (#team): sticky-навбар не накрывает заголовок при переходе по ссылке */
  scroll-margin-top: calc(var(--nav-h) + 16px);
  margin: 30px 0 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow-card);
}

.adm-section h2 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 1.4rem;
}

.adm-cards-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
}

.adm-cards-head h2 { margin: 0; }

.adm-requests { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }

.adm-request {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

.adm-request p { margin: 2px 0; }

.adm-request-head a { color: var(--terra-deep); font-weight: 800; text-decoration: none; }

.adm-request-pet { font-weight: 800; color: var(--terra-deep); font-size: 0.92rem; }
.adm-request-pet-link {

  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-weight: 800;
  color: var(--terra);
  text-decoration: underline;
  cursor: pointer;
}

.adm-request-pet-link:hover { color: var(--terra-deep); }

.adm-request-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.adm-request-msg { color: var(--ink-soft); }

.adm-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }

.adm-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

.adm-card-photo {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 12px;
  flex: 0 0 auto;
}

.adm-card-photo.is-empty { background: var(--stone-soft); }

.adm-card-info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }

.adm-card-meta { font-size: 0.85rem; color: var(--ink-soft); }

.adm-card-status {
  min-height: 36px;
  padding: 0 10px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: #FFFFFF;
  font-family: inherit;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  flex: 0 0 auto;
}

.adm-card-btn {
  min-height: 36px;
  padding: 0 14px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: #FFFFFF;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--ink);
  cursor: pointer;
  flex: 0 0 auto;
}

.adm-card-btn:hover { border-color: var(--terra); color: var(--terra-deep); }

.adm-card-btn--danger { border-color: rgba(179, 38, 30, 0.35); color: #B3261E; }

.adm-card-btn--danger:hover { border-color: #B3261E; background: #FBEDEC; color: #B3261E; }

.adm-editor { background: var(--terra-soft); border-color: var(--terra); }

.adm-editor[hidden] { display: none; }

.adm-form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 14px; }

.adm-form-actions { display: flex; gap: 12px; margin-top: 6px; }

.adm-account { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }

.adm-acc-form {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

.adm-acc-form h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.adm-acc-form .cta--ghost { margin-top: auto; }

@media (max-width: 899px) {
  .adm-form-grid { grid-template-columns: 1fr 1fr; }
  .adm-account { grid-template-columns: 1fr; }
  .adm-card { flex-wrap: wrap; }
}

@media (max-width: 519px) {
  .adm-form-grid { grid-template-columns: 1fr; }
}
/* ---------- Админка: кастомный селект, фото-ряды, видео, команда ---------- */

.adm-select { position: relative; }

.adm-select-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  font: inherit;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
}

.adm-select-btn:focus-visible { outline: 3px solid var(--terra); outline-offset: 2px; }

.adm-select-caret { width: 14px; height: 14px; flex: 0 0 auto; color: var(--ink-soft); transition: transform 0.15s ease; }
.adm-select.open .adm-select-caret { transform: rotate(180deg); }

.adm-select-drop {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow-lift);
}

.adm-select-drop[hidden] { display: none; }

.adm-select-drop button {
  text-align: left;
  padding: 9px 12px;
  border: none;
  border-radius: 10px;
  background: none;
  font: inherit;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
}

.adm-select-drop button:hover { background: var(--terra-soft); color: var(--terra-deep); }
.adm-select-drop button[aria-pressed="true"] { background: var(--terra); color: #FFF7EC; }

.adm-select-btn:disabled { opacity: 0.55; cursor: not-allowed; }

.adm-age-row { display: flex; gap: 10px; }
.adm-age-row input { flex: 1; min-width: 0; }

.adm-photo-rows { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.adm-photo-rows:empty { margin-bottom: 0; }

.adm-photo-row { position: relative; width: 86px; height: 86px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.adm-photo-row img { width: 100%; height: 100%; object-fit: cover; }

.adm-photo-row button {
  position: absolute;
  top: 4px; right: 4px;
  width: 24px; height: 24px;
  border: none;
  border-radius: 50%;
  background: rgba(53, 40, 28, 0.65);
  color: #FFF7EC;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.adm-add-photo {
  min-height: 40px;
  padding: 0 16px;
  border: 1.5px dashed var(--line);
  border-radius: var(--radius);
  background: none;
  font: inherit;
  font-weight: 800;
  color: var(--terra-deep);
  cursor: pointer;
}

.adm-add-photo:hover { border-color: var(--terra); }

.adm-video-prev { width: 100%; max-width: 320px; margin-top: 10px; border-radius: var(--radius); border: 1px solid var(--line); }

/* команда: адаптивные карточки вместо таблицы (на мобиле таблица ломалась) */
.adm-team-list { display: grid; gap: 12px; margin-bottom: 18px; }

.adm-person {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.adm-person-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.adm-person-name { font-weight: 800; }
.adm-person-email { color: var(--ink-soft); font-size: 0.92rem; word-break: break-all; }
.adm-person-act { display: flex; gap: 14px; margin-top: 4px; }

.adm-role-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 800; white-space: nowrap; }
.adm-role-badge--admin { background: var(--terra-soft); color: var(--terra-deep); }
.adm-role-badge--disp { background: var(--stone-soft); color: var(--stone-deep); }

.adm-team-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: end; }
.adm-team-form .cta { min-height: 44px; }
.adm-team-form .cta--ghost { justify-self: start; }
@media (max-width: 719px) { .adm-team-form { grid-template-columns: 1fr; } }

.adm-row-btn {
  min-height: 32px;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--terra-deep);
  text-decoration: underline;
  cursor: pointer;
  white-space: nowrap;
}

.adm-row-btn--danger { color: #B3261E; }

.adm-row-btn:focus-visible { outline: 3px solid var(--terra); outline-offset: 2px; }

/* ---------- Админка: теги особенностей в редакторе карточек ---------- */

.adm-traits {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.adm-traits-list { display: flex; flex-wrap: wrap; gap: 6px; }
.adm-traits-list:empty { display: none; }

.adm-trait-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--terra-soft);
  color: var(--terra-deep);
  font-weight: 700;
  font-size: 0.9rem;
}

.adm-trait-chip button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.adm-trait-chip button:hover { background: var(--terra); color: var(--paper); }
.adm-trait-chip button:focus-visible { outline: 3px solid var(--terra); outline-offset: 2px; }

.adm-traits input {
  flex: 1 1 200px;
  min-height: 36px;
  border: none;
  background: transparent;
  font: inherit;
  color: var(--ink);
}

.adm-traits input:focus { outline: none; }

/* ---------- Админка: брони ---------- */

.adm-booking-status {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.85rem;
}

.adm-booking-status--pending { background: #FFF3D6; color: #8A6A1F; }
.adm-booking-status--confirmed { background: #E3F2E4; color: #2E6B34; }
.adm-booking-status--cancelled,
.adm-booking-status--rejected { background: #FBEAE7; color: #B3261E; }

.adm-booking-act { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }

/* кабинет: кнопки столбцом друг под другом */
.p-actions { display: grid; gap: 10px; margin-top: 4px; }

/* grid не перебивает [hidden], но .cta задаёт display:flex на самой кнопке - восстанавливаем */
.p-actions .cta[hidden] { display: none; }
.p-actions .cta { margin: 0; }

/* кабинет: три счётчика-плитки в ряд, инлайн-статус входа, секции и брони */
.p-counters--3 { grid-template-columns: repeat(3, 1fr); }
.p-send-note {
  margin: 10px 0 0;
  font-size: 0.8rem;
  font-weight: 800;
  color: #2E7D32;
}
.p-sec-title {
  margin: 18px 0 10px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--ink);
}
.p-item-main { display: grid; gap: 2px; min-width: 0; }
.p-item-main strong { font-weight: 800; }
.p-item-sub { font-size: 0.75rem; font-weight: 700; color: var(--ink-soft); }
.p-item-right { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.p-status { font-size: 0.75rem; font-weight: 800; white-space: nowrap; }
.p-status--pending { color: var(--terra-deep); }
.p-status--confirmed { color: #2E7D32; }
.p-status--cancelled { color: var(--ink-soft); }
.p-item-cancel {
  min-height: 32px;
  padding: 4px 10px;
  border: none;
  border-radius: 8px;
  background: none;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 800;
  color: #B3261E;
  cursor: pointer;
  white-space: nowrap;
}
.p-item-cancel:hover { background: #F7E5E3; }
.p-item-cancel:focus-visible { outline: 3px solid var(--terra); outline-offset: 1px; }
.p-item.is-busy { opacity: 0.55; pointer-events: none; }

/* фильтры/навбар: счётчик избранного на nav-fav и активное состояние тоггла */
.nav-icon--fav { position: relative; }
.nav-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--terra);
  color: #FFF7EC;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
}
.nav-icon--fav.is-active { background: var(--terra-soft); color: var(--terra-deep); }

/* ---------- Админка: секционная навигация + поиск/фильтр карточек ---------- */

.adm-nav-site {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-soft);
  text-decoration: none;
  white-space: nowrap;
}

.adm-nav-site:hover { color: var(--terra-deep); }

.adm-nav-site:focus-visible {
  outline: 3px solid var(--terra);
  outline-offset: 2px;
}

/* в админке плашка поиска не липкая - просто бар над списком */
.adm .filter-bar {
  position: static;
  margin: 18px 0 22px;
}

.adm-cards-empty {
  margin: 18px 0 0;
  padding: 22px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink-soft);
  font-weight: 700;
  text-align: center;
}

/* ---------- Админка: мобильный дизайн-пас ---------- */

@media (max-width: 719px) {
  /* секционная навигация: пилюли в прокручиваемую строку вместо скрытых ссылок */
  .adm-body .navbar-row { flex-wrap: wrap; row-gap: 10px; padding-bottom: 10px; }
  .adm-body .nav-links {
    display: flex;
    flex: 1 1 100%;
    order: 3;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .adm-body .nav-links::-webkit-scrollbar { display: none; }
  .adm-body .nav-links a {
    flex: 0 0 auto;
    padding: 8px 16px;
    border: 1.5px solid var(--line);
    border-radius: 999px;
    background: #FFFFFF;
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--ink);
    text-decoration: none;
    white-space: nowrap;
  }
  .adm-body .nav-links a:active { border-color: var(--terra); color: var(--terra-deep); }

  /* тач-цели от 44px */
  .adm .filters-btn { min-height: 44px; }
  .adm-account-btn { min-height: 44px; }

  /* карточка животного: вертикальная компоновка */
  .adm-card { flex-wrap: wrap; row-gap: 12px; padding: 12px 14px; }
  .adm-card-info { flex: 1 1 calc(100% - 78px); }
  .adm-card-status { order: 3; flex: 1 1 100%; min-height: 44px; }
  .adm-card-btn { order: 4; flex: 1 1 40%; min-height: 44px; }

  /* шапка секции карточек: заголовок, под ним кнопка на всю ширину */
  .adm-cards-head { flex-direction: column; align-items: stretch; gap: 10px; }
  .adm-cards-head .cta { width: 100%; min-height: 48px; }

  /* формы: основные кнопки в столбик на всю ширину */
  .adm-form-actions { flex-direction: column; }
  .adm-form-actions .cta { width: 100%; min-height: 48px; }
  .adm-team-form .cta--ghost { width: 100%; min-height: 44px; justify-self: stretch; }
  .adm-acc-form .cta--ghost { width: 100%; min-height: 48px; }
}
/* ---------- Заслон прямого входа в админку ---------- */

html.adm-gated > body { overflow: hidden; }

.adm-gate {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--bg);
}

.adm-gate-box {
  width: min(360px, 100%);
  padding: 30px 28px 26px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: var(--shadow-card);
  text-align: center;
}

.adm-gate-box h1 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.6rem;
}

.adm-gate-box p { margin: 0 0 14px; color: var(--ink-soft); font-size: 0.95rem; }

.adm-gate-box input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: #FFFFFF;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  text-align: center;
  outline: none;
}

.adm-gate-box input:focus-visible { border-color: var(--terra); }

.adm-gate-error { color: #B3261E; font-weight: 700; font-size: 0.9rem; }

.adm-gate-box .cta { width: 100%; min-height: 48px; margin-top: 10px; }
/* подтверждение сохранения в настройках аккаунта админки */
.adm-saved-note {
  display: inline-block;
  margin: 0 0 14px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--terra-soft);
  color: var(--terra-deep);
  font-weight: 800;
  font-size: 0.95rem;
}

.adm-saved-note[hidden] { display: none; }
/* админка: валидация форм + подписи возраста */
/* специфичность выше .field > span - ошибки админ-форм не видны до сабмита */
label.field .adm-field-error,
.adm-field-error {
  display: none;
  margin-top: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #B3261E;
}

label.field .adm-field-error.is-visible,
.adm-field-error.is-visible { display: block; }

.field.has-error input,
.field.has-error .adm-select-btn { border-color: #B3261E; }

.adm-age-unit { display: flex; align-items: center; gap: 6px; flex: 1 1 0; }
.adm-age-unit input { min-width: 0; width: 100%; }
.adm-age-unit-label { font-size: 0.82rem; font-weight: 700; color: var(--ink-soft); white-space: nowrap; }