/* ============================================================
   Apartico — design tokens + base + utilities
   Токены из дизайн-handoff: две темы через :root / [data-theme="dark"]
   ============================================================ */

:root {
  --bg: #DCD5E0;
  --wrap: #EBE6EF;
  --card: #FFFFFF;
  --card2: #F6F1F8;
  --ink: #241F2B;
  --soft: #6C6676;
  --mute: #9E92AA;
  --line: #E4DCE8;
  --chip: #F6E8F3;
  --chipink: #B01E7E;
  --acc: #B01E7E;
  --acc2: #6E2C86;
  --deep: linear-gradient(135deg, #3A2145 0%, #241528 100%);
  --deepink: #F6EEF4;
  --deepsoft: #C6B4CE;
  --heroover: linear-gradient(90deg, rgba(28,16,34,.72), rgba(28,16,34,.10));
  --shadow: 0 26px 60px -24px rgba(40,20,50,.4);
  --grad: linear-gradient(135deg, #C71381 0%, #5A2C84 120%);
  --gold: #E7A23B;
  --danger: #C2456B;
  --danger-bg: rgba(194,69,107,.10);
  --logoL: block;
  --logoD: none;
}

[data-theme="dark"] {
  --bg: #171220;
  --wrap: #221B2C;
  --card: #2F2739;
  --card2: #2A2333;
  --ink: #F3EFF6;
  --soft: #B7AEC2;
  --mute: #8B8098;
  --line: rgba(255,255,255,.10);
  --chip: rgba(226,79,166,.16);
  --chipink: #F0A9D2;
  --acc: #E24FA6;
  --acc2: #B57BD6;
  --deep: linear-gradient(135deg, #140D1C 0%, #0E0914 100%);
  --deepink: #F6EEF4;
  --deepsoft: #C1B2CB;
  --heroover: linear-gradient(90deg, rgba(10,6,14,.80), rgba(10,6,14,.18));
  --shadow: 0 26px 60px -24px rgba(0,0,0,.6);
  --grad: linear-gradient(135deg, #E24FA6 0%, #8E5BC7 120%);
  --gold: #E7A23B;
  --danger: #E8759A;
  --danger-bg: rgba(232,117,154,.14);
  --logoL: none;
  --logoD: block;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Nunito Sans', sans-serif;
  transition: background .4s ease, color .4s ease;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
::selection { background: #C71381; color: #fff; }

/* Page shell */
.ap-page { min-height: 100vh; min-height: 100dvh; padding: 30px 26px 30px; } /* dvh — реальная высота экрана на мобильных, 100vh там больше видимой области */
.ap-shell {
  max-width: 1360px;
  margin: 0 auto;
  border-radius: 32px;
  overflow: hidden;
  background: var(--wrap);
  color: var(--ink);
  box-shadow: 0 30px 80px -30px rgba(40,20,50,.4);
  transition: background .4s ease, color .4s ease;
}
.ap-container { max-width: 1360px; margin: 0 auto; }

/* Logo swap by theme */
.ap-logo-l { display: var(--logoL); }
.ap-logo-d { display: var(--logoD); }

/* Reveal on scroll */
[data-reveal] { opacity: 0; transform: translateY(24px); }
[data-reveal].is-in { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}

/* Hover utilities (замена style-hover из прототипа) */
.ap-lift { transition: transform .3s cubic-bezier(.2,.7,.2,1), box-shadow .3s ease; }
@media (hover: hover) { .ap-lift:hover { transform: translateY(-5px); } }
.ap-lift-2 { transition: transform .2s ease, box-shadow .25s ease; }
@media (hover: hover) { .ap-lift-2:hover { transform: translateY(-2px); } }
@media (hover: hover) { .ap-card-hover:hover { box-shadow: var(--shadow); } }
.ap-bright { transition: filter .25s ease; }
@media (hover: hover) { .ap-bright:hover { filter: brightness(1.12); } }
@media (hover: hover) { .ap-cta:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -10px rgba(40,20,50,.6); } }

/* Date input in booking widget */
.ap-date {
  -webkit-appearance: none; appearance: none; background: transparent; border: none; outline: none;
  color: var(--ink); font-family: 'Nunito Sans', sans-serif; font-size: 16px; font-weight: 800; padding: 0; cursor: pointer;
}
.ap-date::-webkit-calendar-picker-indicator { opacity: 0; position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; }

/* Menu links */
.ap-menu a { transition: background .2s ease, color .2s ease; }

/* Theme toggle (одна кнопка в шапке) */
.ap-theme-toggle {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); font-size: 15px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  padding: 0; transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
@media (hover: hover) { .ap-theme-toggle:hover { transform: translateY(-2px); border-color: var(--acc); } }

/* TravelLine контейнеры */
.ap-tl { width: 100%; }
/* Страница брони: модуль во всю ширину контента. Форму поиска придерживаем,
   иначе TL растягивает её в длинную полосу; выдача номеров при этом широкая. */
.ap-tl-wrap #tl-search-form-header { max-width: 680px; }
.ap-tl-wrap #tl-booking-form { width: 100%; }
.ap-booking-tl { min-height: 76px; }
#tl-booking-form { margin-top: 18px; }

/* Бургер (мобильное меню) */
.ap-burger {
  display: none; width: 44px; height: 44px; flex-shrink: 0;
  border: 1px solid var(--line); background: var(--card); border-radius: 12px;
  cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 0;
}
.ap-burger span { display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .25s ease, opacity .2s ease; }
.ap-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.ap-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.ap-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.ap-mobile-menu { display: none; background: var(--card2); border-top: 1px solid var(--line); }
.ap-mobile-menu nav { display: flex; flex-direction: column; padding: 6px 20px; }
.ap-mobile-menu nav a { padding: 15px 6px; font-size: 17px; font-weight: 700; color: var(--ink); border-bottom: 1px solid var(--line); }
.ap-mobile-menu nav a:last-child { border-bottom: none; }
.ap-mobile-contacts { padding: 12px 20px 22px; display: flex; flex-direction: column; gap: 12px; }
.ap-mobile-phone { font-size: 20px; font-weight: 800; color: var(--ink); }
.ap-mobile-cabinet { text-align: center; background: var(--grad); color: #fff; font-weight: 800; padding: 15px; border-radius: 100px; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1100px) {
  .ap-grid-4 { grid-template-columns: repeat(2, 1fr) !important; }
  .ap-grid-6 { grid-template-columns: repeat(3, 1fr) !important; }
  .ap-uk { grid-template-columns: 1fr !important; }
}
@media (max-width: 900px) {
  .ap-page { padding: 12px 10px 12px; }
  .ap-shell { border-radius: 22px; }
  .ap-menu { display: none !important; }
  .ap-hide-mobile { display: none !important; }
  .ap-burger { display: flex !important; }
  .ap-mobile-menu.is-open { display: block; }
  .ap-utilbar { padding: 8px 16px !important; }
  .ap-header { padding: 16px !important; }
  .ap-grid-3 { grid-template-columns: 1fr !important; }
  .ap-feature { grid-template-columns: 1fr !important; }
  .ap-hero { height: auto !important; min-height: 0 !important; display: block !important; }
  /* Контент выше + запас снизу: бар брони (margin-top:-52px) наезжает на пустоту, а не на текст. */
  .ap-hero-content { padding: 34px 22px 92px !important; }
  .ap-hero-title { font-size: 38px !important; }
  .ap-h2 { font-size: 30px !important; }
  .ap-section { padding-left: 20px !important; padding-right: 20px !important; }
  /* booking-бар: на мобиле складываем в колонку, кнопка на всю ширину */
  .ap-booking {
    position: static !important; left: auto !important; right: auto !important; bottom: auto !important;
    margin: 18px 12px 14px !important;
    flex-direction: column !important; align-items: stretch !important; gap: 2px !important; padding: 10px !important;
  }
  .ap-booking > div[style*="width:1px"] { display: none !important; }
  .ap-booking > div[style*="flex:"] { padding: 12px 16px !important; }
  .ap-booking #ap-guests-toggle { padding: 12px 16px !important; }
  .ap-booking [data-search] { padding: 16px !important; text-align: center; margin-top: 6px; }
  .ap-booking .ap-date { font-size: 17px; }
  /* Safari на iOS неверно берёт ширину контейнера для absolute внутри растянутого
     flex-элемента: попап схлопывался до ширины поля «Гости», а счётчики вылезали наружу.
     Поэтому ширину задаём от вьюпорта, а не от родителя. */
  #ap-guests-pop { left: 12px !important; right: auto !important; width: min(320px, calc(100vw - 76px)); min-width: 0 !important; }
  .ap-cta-title { font-size: 32px !important; }
  /* sticky-бар брони: на мобиле — лого + компактная кнопка справа, средний текст скрыт */
  #ap-sticky { padding: 8px 10px !important; }
  #ap-sticky > div { padding: 8px 10px !important; gap: 8px !important; }
  #ap-sticky > div > div[style*="flex:1"] { display: none !important; }
  #ap-sticky > div > .ap-bright { margin-left: auto; padding: 11px 22px !important; font-size: 14px !important; }
  .ap-footer-grid { grid-template-columns: 1fr 1fr !important; }
}
@media (max-width: 560px) {
  .ap-grid-4, .ap-grid-6 { grid-template-columns: 1fr !important; }
  .ap-gallery { grid-template-columns: 1fr !important; height: auto !important; }
  .ap-gallery > div { height: 220px; }
  .ap-footer-grid { grid-template-columns: 1fr !important; }
}

/* ============================================================
   Мобилка: full-bleed «веб-приложение» — убираем внешнюю рамку-оболочку,
   контент край-в-край, узкие боковые поля, поддержка чёлки (safe-area).
   ============================================================ */
@media (max-width: 640px) {
  /* Внешняя рамка (скруглённая оболочка + поля страницы) — убрать */
  .ap-page { padding: 0 0 env(safe-area-inset-bottom) !important; }
  .ap-shell { border-radius: 0 !important; box-shadow: none !important; }
  /* Боковые поля секций — комфортные, как у хиро главной (было 14px — текст липнул к краю). */
  .ap-section { padding-left: 20px !important; padding-right: 20px !important; }
  /* Верхняя утилити-полоса и шапка — под чёлку */
  .ap-utilbar { padding: calc(8px + env(safe-area-inset-top)) 14px 8px !important; }
  .ap-header { padding: 14px !important; }
  /* Слоган: каждая смысловая единица — своей строкой */
  .ap-utilbar-tag > span { display: block; line-height: 1.55; }
  .ap-utilbar-tag .ap-ub-dot { display: none; }
  /* Липкий бар брони — над жест-баром телефона */
  #ap-sticky { padding-bottom: calc(8px + env(safe-area-inset-bottom)) !important; }
  /* Боковые поля контентных блоков к краю */
  .ap-article { padding: 24px 16px !important; }
  .ap-obj-split { padding: 22px 14px !important; }
}
/* Standalone (установлено как приложение): чуть плотнее и без лишних теней */
@media (display-mode: standalone) {
  .ap-shell { box-shadow: none !important; }
}

/* ============================================================
   Шаблон объекта (single-object)
   ============================================================ */
@media (max-width: 900px) {
  .ap-obj-split { grid-template-columns: 1fr !important; padding: 24px 18px !important; gap: 28px !important; }
  .ap-obj-booking { position: static !important; }
  .ap-obj-gallery { grid-template-rows: 180px 180px !important; }
  .ap-amenities { grid-template-columns: 1fr !important; }
}
@media (max-width: 560px) {
  /* Большое фото сверху на всю ширину, ниже ровная сетка 2×2 — чтобы тайлы не «гуляли». */
  .ap-obj-gallery { grid-template-columns: 1fr 1fr !important; grid-template-rows: auto !important; gap: 8px !important; }
  .ap-obj-gallery .ap-gal-main { grid-row: auto !important; grid-column: 1 / -1 !important; height: 240px !important; }
  .ap-obj-gallery .ap-gal-tile { height: 140px !important; }
  .ap-gal-badge { top: 16px !important; left: 16px !important; }
}

/* ============================================================
   Каталог (listing)
   ============================================================ */
.ap-select {
  appearance: none; -webkit-appearance: none; background: transparent; border: none; outline: none;
  font-family: 'Nunito Sans', sans-serif; cursor: pointer; padding: 0 18px 0 0; color: var(--ink);
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%239E92AA' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right center;
}
.ap-select option { color: #241F2B; }
@media (max-width: 900px) {
  .ap-filter { flex-direction: column; align-items: stretch !important; }
  .ap-filter > div[style*="width:1px"] { display: none; }
  .ap-filter label { justify-content: space-between; }
  .ap-filter button { width: 100%; }
}

/* ============================================================
   Лендинг УК (landing)
   ============================================================ */
@media (max-width: 900px) {
  /* Без центрирования: контент героя на узком экране выше min-height, и при
     align-items:center он вылезает за нижний край, а overflow:hidden его срезает.
     Растягиваем — блок растёт по содержимому, отступы даёт он сам. */
  .ap-ld-hero { min-height: 380px !important; }
  /* Вертикальные отступы обязательны: на узком экране заголовок и абзац перестают
     помещаться в min-height героя, и при padding:0 текст упирается в края карточки. */
  .ap-ld-hero-content { padding: 32px 24px !important; }
  .ap-ld-hero-content h1 { font-size: 34px !important; }
  .ap-ld-stats { grid-template-columns: 1fr 1fr !important; padding: 28px 24px !important; gap: 24px 16px !important; }
  .ap-ld-form { grid-template-columns: 1fr !important; padding: 28px 22px !important; gap: 24px !important; }
  .ap-grid-2 { grid-template-columns: 1fr !important; }
}
@media (max-width: 560px) {
  .ap-ld-stats { grid-template-columns: 1fr !important; }
}

/* ============================================================
   Контентная страница (content)
   ============================================================ */
@media (max-width: 900px) {
  .ap-ct-cards { grid-template-columns: 1fr !important; }
  .ap-ct-req { grid-template-columns: 1fr !important; }
  .ap-article { padding: 28px 22px !important; }
}

/* ============================================================
   Меню-дропдауны (категории → здания)
   ============================================================ */
.ap-menu-item { position: relative; }
.ap-menu-item > a { transition: background .2s ease, color .2s ease; }
.ap-dropdown {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%) translateY(8px);
  min-width: 240px; background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow); padding: 14px 8px 8px; opacity: 0; visibility: hidden;
  transition: opacity .2s ease, transform .2s ease; z-index: 700;
}
.ap-menu-item:hover .ap-dropdown { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.ap-dropdown a { display: block; padding: 10px 16px; border-radius: 10px; color: var(--ink); font-weight: 600; white-space: nowrap; font-size: 14px; }
.ap-dropdown a:hover { background: var(--chip); color: var(--chipink); }
.ap-dropdown-all { color: var(--acc) !important; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 12px !important; }

/* Мобильное меню: категории/здания */
.ap-mobile-cat { font-size: 17px; font-weight: 800; color: var(--ink); }
.ap-mobile-sub { font-size: 15px !important; font-weight: 600 !important; color: var(--soft) !important; padding-left: 24px !important; }

/* ============================================================
   Каталог с сайдбаром (multi-фильтры)
   ============================================================ */
.ap-check { display: flex; align-items: center; gap: 10px; padding: 7px 6px; cursor: pointer; border-radius: 8px; transition: background .15s ease; }
@media (hover: hover) { .ap-check:hover { background: var(--wrap); } }
.ap-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.ap-check-box { width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--line); flex-shrink: 0; position: relative; transition: background .15s ease, border-color .15s ease; }
.ap-check input:checked + .ap-check-box { background: var(--grad); border-color: transparent; }
.ap-check input:checked + .ap-check-box::after { content: ''; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.ap-check input:focus-visible + .ap-check-box { outline: 2px solid var(--acc); outline-offset: 2px; }
.ap-check-lbl { font-size: 14px; font-weight: 600; color: var(--ink); }
@media (max-width: 900px) {
  .ap-catalog { grid-template-columns: 1fr !important; padding-left: 16px !important; padding-right: 16px !important; }
  .ap-catalog-side { position: static !important; }
}

/* ============================================================
   Лайтбокс галереи объекта
   ============================================================ */
.ap-obj-gallery { position: relative; }
.ap-obj-gallery .ap-gal-tile { cursor: zoom-in; }
@media (hover: hover) { .ap-obj-gallery .ap-gal-tile:hover .ap-gal-hint { background: rgba(20,10,26,.18) !important; } }
.ap-gal-badge { height: auto !important; z-index: 5; }
.ap-lb { position: fixed; inset: 0; z-index: 900; background: rgba(12,6,18,.92); display: none; align-items: center; justify-content: center; padding: 40px; opacity: 0; transition: opacity .2s ease; backdrop-filter: blur(4px); }
.ap-lb.is-open { display: flex; opacity: 1; }
.ap-lb-stage { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.ap-lb-viewport { width: min(92vw, 1000px); height: 74vh; overflow: hidden; border-radius: 16px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.7); touch-action: pan-y; }
.ap-lb-track { display: flex; width: 300%; height: 100%; will-change: transform; }
.ap-lb-slide { flex: 0 0 33.3333%; height: 100%; display: flex; align-items: center; justify-content: center; }
.ap-lb-slide img { max-width: 100%; max-height: 100%; object-fit: contain; -webkit-user-drag: none; user-select: none; }
.ap-lb-count { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: rgba(255,255,255,.7); letter-spacing: .06em; }
.ap-lb-thumbs { display: flex; gap: 8px; max-width: min(92vw, 1000px); overflow-x: auto; padding: 2px 2px 4px; scrollbar-width: thin; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; }
.ap-lb-thumbs::-webkit-scrollbar { height: 6px; }
.ap-lb-thumbs::-webkit-scrollbar-thumb { background: rgba(255,255,255,.25); border-radius: 100px; }
.ap-lb-thumb { flex: 0 0 auto; width: 84px; height: 56px; border-radius: 8px; overflow: hidden; cursor: pointer; opacity: .48; border: 2px solid transparent; padding: 0; background: none; transition: opacity .15s, border-color .15s; }
.ap-lb-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; -webkit-user-drag: none; }
@media (hover: hover) { .ap-lb-thumb:hover { opacity: .8; } }
.ap-lb-thumb.is-active { opacity: 1; border-color: var(--acc, #B01E7E); }
@media (max-width: 700px) { .ap-lb-thumbs { display: none; } }
.ap-lb-close { position: absolute; top: 22px; right: 26px; width: 46px; height: 46px; border-radius: 50%; border: none; background: rgba(255,255,255,.12); color: #fff; font-size: 30px; line-height: 1; cursor: pointer; transition: background .15s; }
@media (hover: hover) { .ap-lb-close:hover { background: rgba(255,255,255,.24); } }
.ap-lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 54px; height: 54px; border-radius: 50%; border: none; background: rgba(255,255,255,.12); color: #fff; font-size: 30px; line-height: 1; cursor: pointer; z-index: 2; transition: background .15s; }
@media (hover: hover) { .ap-lb-nav:hover { background: rgba(255,255,255,.28); } }
.ap-lb-prev { left: 26px; }
.ap-lb-next { right: 26px; }
@media (max-width: 700px) {
  .ap-lb { padding: 12px; }
  .ap-lb-nav { top: auto; bottom: calc(20px + env(safe-area-inset-bottom)); transform: none; }
  .ap-lb-prev { left: 24px; }
  .ap-lb-next { right: 24px; }
}

/* Ручка изменения высоты карты поиска (тянуть вверх/вниз) */
.ap-map-resize { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); z-index: 5; width: 58px; height: 26px; padding: 0; border: none; border-radius: 100px; background: var(--card); box-shadow: 0 6px 18px -6px rgba(40,20,50,.5); cursor: ns-resize; display: flex; align-items: center; justify-content: center; touch-action: none; }
.ap-map-resize span { display: block; width: 24px; height: 4px; border-radius: 100px; background: var(--mute); transition: background .15s; }
.ap-map-resize:hover span, .ap-map-resize:active span { background: var(--acc); }

/* Ночной режим Яндекс-карт: инвертируем только тайлы (ground-pane), пины/кластеры/балуны
   лежат в других слоях и остаются в родных цветах. Переключается вместе с темой сайта. */
[class*="ymaps-"][class*="-ground-pane"] { transition: filter .2s ease; }
:root[data-theme="dark"] [class*="ymaps-"][class*="-ground-pane"] { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.95); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) [class*="ymaps-"][class*="-ground-pane"] { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.95); }
}

/* Фирменный бар бронирования (виджет TravelLine инлайн) */
.ap-tl-bar .ap-tl { min-height: 76px; }
@media (max-width: 900px) {
  .ap-tl-bar { flex-direction: column !important; align-items: stretch !important; gap: 12px !important; padding: 16px !important; }
  .ap-tl-bar-label { text-align: center; }
}

/* ============================================================
   Лендинг «Маркетинговое сопровождение» — блоки боли/фото/услуги
   ============================================================ */
/* журнальный разворот: фото-панель + карточки болей */
.ap-mk-spread { display: grid; grid-template-columns: 0.82fr 1.18fr; gap: 18px; align-items: stretch; }
.ap-mk-photo { position: relative; border-radius: 24px; overflow: hidden; min-height: 460px; display: flex; }
.ap-mk-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 6s ease; }
@media (hover: hover) { .ap-mk-photo:hover img { transform: scale(1.06); } }
.ap-mk-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(28,15,36,.55) 0%, rgba(28,15,36,.92) 78%); }
.ap-mk-photo-in { position: relative; z-index: 2; margin-top: auto; padding: 30px 30px 32px; }
.ap-mk-eyebrow { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.ap-mk-photo-in h2 { font-family: 'Rubik', sans-serif; font-size: 34px; font-weight: 600; line-height: 1.1; margin: 12px 0 0; color: #F6EEF4; text-wrap: balance; }
.ap-mk-photo-in p { font-size: 15px; line-height: 1.6; color: #E4D8E6; margin: 13px 0 0; }
.ap-mk-badge { display: inline-block; margin-top: 18px; font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: .06em; color: #fff; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.28); backdrop-filter: blur(6px); padding: 8px 14px; border-radius: 100px; }
.ap-mk-pains { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ap-mk-pain { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px 20px 18px; display: flex; flex-direction: column; transition: transform .3s cubic-bezier(.2,.7,.2,1), box-shadow .3s, border-color .3s; }
@media (hover: hover) { .ap-mk-pain:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -22px rgba(40,20,50,.55); border-color: transparent; } }
.ap-mk-ic-danger { width: 42px; height: 42px; border-radius: 12px; background: var(--danger-bg); color: var(--danger); display: flex; align-items: center; justify-content: center; transition: transform .3s; }
@media (hover: hover) { .ap-mk-pain:hover .ap-mk-ic-danger { transform: scale(1.08) rotate(-4deg); } }
.ap-mk-pain h3 { font-family: 'Rubik', sans-serif; font-size: 17px; font-weight: 600; margin: 15px 0 0; color: var(--ink); line-height: 1.25; }
.ap-mk-pain p { font-size: 13px; line-height: 1.55; color: var(--soft); margin: 7px 0 0; }
.ap-mk-fix { font-size: 12px; color: var(--soft); margin-top: auto; padding-top: 13px; }
.ap-mk-fix b { color: var(--acc); font-weight: 700; }
.ap-mk-fix .arr { color: var(--acc); font-weight: 800; margin-right: 3px; }
/* фото-бенто объектов */
.ap-mk-gal { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 212px; gap: 12px; margin-top: 22px; }
.ap-mk-gt { position: relative; margin: 0; border-radius: 18px; overflow: hidden; }
.ap-mk-gt-big { grid-column: span 2; }
.ap-mk-gt img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease; }
@media (hover: hover) { .ap-mk-gt:hover img { transform: scale(1.06); } }
.ap-mk-gt::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(20,10,26,.74), rgba(20,10,26,0) 58%); }
.ap-mk-gt-tag { position: absolute; top: 11px; left: 11px; z-index: 2; background: rgba(255,255,255,.92); color: #241F2B; font-size: 10.5px; font-weight: 700; padding: 4px 10px; border-radius: 100px; }
.ap-mk-gt figcaption { position: absolute; left: 14px; bottom: 12px; z-index: 2; color: #fff; display: flex; flex-direction: column; }
.ap-mk-gt figcaption b { font-family: 'Rubik', sans-serif; font-size: 15px; font-weight: 600; }
.ap-mk-gt figcaption span { font-size: 11.5px; color: #E9DEE8; margin-top: 2px; }
/* услуги с иконками + акцентная карточка */
.ap-mk-svc { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 26px 24px; transition: transform .3s cubic-bezier(.2,.7,.2,1), box-shadow .3s; overflow: hidden; }
@media (hover: hover) { .ap-mk-svc:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -22px rgba(40,20,50,.55); } }
.ap-mk-ic { width: 46px; height: 46px; border-radius: 13px; background: var(--chip); color: var(--chipink); display: flex; align-items: center; justify-content: center; transition: transform .3s; }
@media (hover: hover) { .ap-mk-svc:hover .ap-mk-ic { transform: scale(1.08) rotate(-4deg); } }
.ap-mk-svc h3 { font-family: 'Rubik', sans-serif; font-size: 19px; font-weight: 600; margin: 16px 0 0; color: var(--ink); }
.ap-mk-svc p { font-size: 13px; line-height: 1.55; color: var(--soft); margin: 8px 0 0; }
.ap-mk-svc.ap-mk-hot { background: var(--grad); border-color: transparent; }
.ap-mk-svc.ap-mk-hot h3 { color: #fff; }
.ap-mk-svc.ap-mk-hot p { color: rgba(255,255,255,.86); }
.ap-mk-svc.ap-mk-hot .ap-mk-ic { background: rgba(255,255,255,.2); color: #fff; }
.ap-mk-tag { position: absolute; top: 16px; right: 16px; font-family: 'JetBrains Mono', monospace; font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: #fff; background: rgba(255,255,255,.22); padding: 4px 9px; border-radius: 100px; }
@media (max-width: 920px) {
  .ap-mk-spread { grid-template-columns: 1fr; }
  .ap-mk-photo { min-height: 340px; }
  .ap-mk-pains { grid-template-columns: 1fr; }
  .ap-mk-gal { grid-template-columns: 1fr 1fr; grid-auto-rows: 180px; }
  .ap-mk-gt-big { grid-column: span 2; }
}

/* ============================================================
   Хаб «Собственникам» (/owners) — две услуги как фото-ворота
   ============================================================ */
.ap-ow-gates { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 26px; }
.ap-ow-gate { position: relative; display: flex; min-height: 384px; border-radius: 24px; overflow: hidden; color: #fff; text-decoration: none; }
.ap-ow-gate img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .7s ease; }
@media (hover: hover) { .ap-ow-gate:hover img { transform: scale(1.06); } }
.ap-ow-gate::after { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(28,15,36,.42) 0%, rgba(28,15,36,.9) 82%); }
.ap-ow-gate-in { position: relative; z-index: 2; margin-top: auto; padding: 32px 32px 30px; display: flex; flex-direction: column; }
.ap-ow-gate-ic { width: 52px; height: 52px; border-radius: 15px; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.28); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; color: #fff; }
.ap-ow-gate-t { font-family: 'Rubik', sans-serif; font-size: 26px; font-weight: 600; margin-top: 18px; }
.ap-ow-gate-d { font-size: 14.5px; line-height: 1.6; color: #E9DEE8; margin-top: 10px; max-width: 440px; }
.ap-ow-gate-points { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 16px; }
.ap-ow-gate-points span { font-size: 13px; color: #F0E7F0; display: inline-flex; align-items: center; gap: 6px; }
.ap-ow-gate-points b { color: var(--gold); font-weight: 800; }
.ap-ow-gate-cta { display: inline-flex; align-items: center; gap: 7px; margin-top: 22px; background: #fff; color: #2A1830; font-size: 14px; font-weight: 800; padding: 12px 22px; border-radius: 100px; align-self: flex-start; transition: gap .2s ease; }
@media (hover: hover) { .ap-ow-gate:hover .ap-ow-gate-cta { gap: 13px; } }
.ap-ow-case img { transition: transform .6s ease; }
@media (hover: hover) { .ap-ow-case:hover img { transform: scale(1.06); } }
@media (max-width: 900px) {
  .ap-ow-gates { grid-template-columns: 1fr; }
  .ap-ow-gate { min-height: 320px; }
}

/* ============================================================
   Юридическая статья (политика/оферта) — единая ширина контента.
   Импортированный текст мог нести узкие inline-обёртки — растягиваем
   его на всю ширину карточки-статьи, чтобы оферта не «сжималась».
   ============================================================ */
.ap-article > * { max-width: 100% !important; }
.ap-article table { width: 100%; border-collapse: collapse; }
.ap-article img { max-width: 100%; height: auto; }

/* ============================================================
   Блок «Забота о каждом госте» (главная) — карточки с графикой
   ============================================================ */
.ap-care-card { position: relative; overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 30px; transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s, border-color .35s; }
/* декоративный блик в углу — «графика», усиливается на ховере */
.ap-care-card::after { content: ""; position: absolute; top: -46px; right: -46px; width: 140px; height: 140px; border-radius: 50%; background: radial-gradient(circle, rgba(176,30,126,.16), transparent 70%); opacity: .55; transform: scale(1); transition: opacity .4s ease, transform .6s cubic-bezier(.2,.7,.2,1); pointer-events: none; }
@media (hover: hover) { .ap-care-card:hover { transform: translateY(-6px); box-shadow: 0 24px 46px -22px rgba(40,20,50,.5); border-color: transparent; } }
@media (hover: hover) { .ap-care-card:hover::after { opacity: 1; transform: scale(1.2); } }
.ap-care-ic { position: relative; z-index: 1; width: 48px; height: 48px; border-radius: 14px; background: var(--chip); color: var(--chipink); display: flex; align-items: center; justify-content: center; transition: transform .35s cubic-bezier(.2,.7,.2,1); }
/* мягкое свечение под иконкой */
.ap-care-ic::before { content: ""; position: absolute; inset: -7px; border-radius: 18px; background: var(--chipink); opacity: .13; filter: blur(11px); z-index: -1; transition: opacity .35s ease; }
@media (hover: hover) { .ap-care-card:hover .ap-care-ic { transform: scale(1.1) rotate(-5deg); } }
@media (hover: hover) { .ap-care-card:hover .ap-care-ic::before { opacity: .28; } }
.ap-care-t { position: relative; z-index: 1; font-family: 'Rubik', sans-serif; font-size: 22px; font-weight: 600; margin-top: 18px; color: var(--ink); }
.ap-care-d { position: relative; z-index: 1; font-size: 14px; color: var(--soft); margin-top: 8px; line-height: 1.6; }
/* акцентная карточка (первая — «Без комиссии») */
.ap-care-hot { background: var(--grad); border-color: transparent; box-shadow: 0 18px 40px -20px rgba(176,30,126,.5); }
.ap-care-hot .ap-care-t { color: #fff; }
.ap-care-hot .ap-care-d { color: rgba(255,255,255,.9); }
.ap-care-hot .ap-care-ic { background: rgba(255,255,255,.2); color: #fff; }
.ap-care-hot .ap-care-ic::before { background: #fff; opacity: .18; }
.ap-care-hot::after { background: radial-gradient(circle, rgba(255,255,255,.24), transparent 70%); }
@media (hover: hover) { .ap-care-hot:hover { box-shadow: 0 26px 52px -20px rgba(176,30,126,.6); } }

/* ============================================================
   Контакты — карточки-ссылки с иконками и графикой
   ============================================================ */
.ap-ct-card { position: relative; overflow: hidden; display: block; text-decoration: none; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 26px 28px; transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s, border-color .35s; }
.ap-ct-card::after { content: ""; position: absolute; top: -46px; right: -46px; width: 130px; height: 130px; border-radius: 50%; background: radial-gradient(circle, rgba(176,30,126,.14), transparent 70%); opacity: .5; transition: opacity .4s ease, transform .6s cubic-bezier(.2,.7,.2,1); pointer-events: none; }
@media (hover: hover) { .ap-ct-card:hover { transform: translateY(-5px); box-shadow: 0 22px 44px -22px rgba(40,20,50,.5); border-color: transparent; } }
@media (hover: hover) { .ap-ct-card:hover::after { opacity: 1; transform: scale(1.2); } }
.ap-ct-ic { position: relative; z-index: 1; width: 46px; height: 46px; border-radius: 13px; background: var(--chip); color: var(--chipink); display: flex; align-items: center; justify-content: center; transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.ap-ct-ic::before { content: ""; position: absolute; inset: -6px; border-radius: 17px; background: var(--chipink); opacity: .12; filter: blur(10px); z-index: -1; transition: opacity .35s ease; }
@media (hover: hover) { .ap-ct-card:hover .ap-ct-ic { transform: scale(1.1) rotate(-5deg); } }
@media (hover: hover) { .ap-ct-card:hover .ap-ct-ic::before { opacity: .26; } }
.ap-ct-label { position: relative; z-index: 1; font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); margin-top: 16px; }
.ap-ct-val { position: relative; z-index: 1; font-family: 'Rubik', sans-serif; font-size: 22px; font-weight: 600; color: var(--ink); margin-top: 7px; transition: color .25s ease; word-break: break-word; }
@media (hover: hover) { .ap-ct-card:hover .ap-ct-val { color: var(--acc); } }
.ap-ct-sub { position: relative; z-index: 1; font-size: 13.5px; color: var(--soft); margin-top: 5px; }
.ap-ct-soc { transition: filter .15s ease, transform .2s ease; }
@media (hover: hover) { .ap-ct-soc:hover { filter: brightness(1.08); transform: translateY(-2px); } }

/* ============================================================
   Отзывы — вкладки по аккаунтам (Квартиры + отели)
   ============================================================ */
.ap-rv-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }
.ap-rv-tab { font-family: 'Nunito Sans', sans-serif; font-size: 14px; font-weight: 700; color: var(--soft); background: var(--card); border: 1px solid var(--line); border-radius: 100px; padding: 9px 18px; cursor: pointer; transition: all .2s ease; }
@media (hover: hover) { .ap-rv-tab:hover { color: var(--ink); border-color: transparent; box-shadow: 0 10px 24px -14px rgba(40,20,50,.45); } }
.ap-rv-tab.on { background: var(--grad); color: #fff; border-color: transparent; }
.ap-rv-stack { position: relative; }
.ap-rv-panel { position: absolute; top: 0; left: 0; width: 100%; opacity: 0; pointer-events: none; transition: opacity .25s ease; }
.ap-rv-panel.on { position: relative; opacity: 1; pointer-events: auto; }

/* ============================================================
   FAQ — аккордеон (AEO: вопрос → короткий ответ)
   ============================================================ */
.ap-faq-item { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; transition: border-color .25s ease, box-shadow .25s ease; }
.ap-faq-item[open] { border-color: transparent; box-shadow: 0 16px 36px -22px rgba(40,20,50,.45); }
.ap-faq-item summary { list-style: none; cursor: pointer; padding: 20px 24px; font-family: 'Rubik', sans-serif; font-size: 17px; font-weight: 600; color: var(--ink); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.ap-faq-item summary::-webkit-details-marker { display: none; }
.ap-faq-item summary::after { content: "+"; font-family: 'Rubik', sans-serif; font-size: 24px; font-weight: 400; color: var(--acc); line-height: 1; flex-shrink: 0; transition: transform .3s cubic-bezier(.2,.7,.2,1); }
.ap-faq-item[open] summary::after { transform: rotate(45deg); }
.ap-faq-a { padding: 0 24px 22px; font-size: 14.5px; line-height: 1.65; color: var(--soft); max-width: 720px; }

/* ============================================================
   Cookie-уведомление — ненавязчивая плашка снизу
   ============================================================ */
.ap-cookie { position: fixed; left: 20px; bottom: 20px; z-index: 700; max-width: 410px; display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; box-shadow: var(--shadow); transform: translateY(24px); opacity: 0; pointer-events: none; transition: opacity .45s ease, transform .45s cubic-bezier(.2,.8,.2,1); }
.ap-cookie.is-in { transform: none; opacity: 1; pointer-events: auto; }
.ap-cookie-txt { font-size: 13px; line-height: 1.5; color: var(--soft); }
.ap-cookie-txt a { color: var(--acc); font-weight: 600; }
.ap-cookie-btn { flex-shrink: 0; background: var(--grad); color: #fff; border: 0; border-radius: 100px; padding: 11px 22px; font-size: 14px; font-weight: 800; cursor: pointer; font-family: inherit; transition: filter .15s; }
@media (hover: hover) { .ap-cookie-btn:hover { filter: brightness(1.08); } }
@media (max-width: 560px) {
  .ap-cookie { left: 12px; right: 12px; bottom: 12px; max-width: none; flex-direction: column; align-items: stretch; text-align: center; }
  .ap-cookie-btn { width: 100%; }
}

/* ---------- Телефон: кастомная выпадашка кода страны (флэт, в теме) ---------- */
.ap-cc { position: relative; flex: 0 0 auto; }
.ap-cc-btn { display: flex; align-items: center; gap: 7px; height: 100%; background: var(--wrap); border: 1px solid var(--line); border-radius: 12px; padding: 0 12px 0 14px; font-size: 15px; line-height: 1; color: var(--ink); cursor: pointer; white-space: nowrap; font-family: inherit; transition: border-color .15s; }
@media (hover: hover) { .ap-cc-btn:hover, .ap-cc-btn[aria-expanded="true"] { border-color: var(--acc); } }
.ap-cc-flag { font-size: 17px; line-height: 1; }
.ap-cc-code { font-variant-numeric: tabular-nums; }
.ap-cc-car { display: inline-flex; color: var(--mute); margin-left: 1px; }
.ap-cc-panel { position: absolute; z-index: 60; top: calc(100% + 6px); left: 0; width: 272px; max-width: 78vw; max-height: 290px; display: none; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 34px rgba(0, 0, 0, .22); overflow: hidden; }
.ap-cc-panel.open { display: flex; }
.ap-cc-search { margin: 8px; padding: 11px 13px; background: var(--wrap); border: 1px solid var(--line); border-radius: 10px; font-size: 14px; color: var(--ink); outline: none; font-family: inherit; }
.ap-cc-search:focus { border-color: var(--acc); }
.ap-cc-list { overflow-y: auto; overscroll-behavior: contain; padding: 0 6px 6px; }
.ap-cc-opt { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 9px; cursor: pointer; font-size: 14px; color: var(--ink); }
@media (hover: hover) { .ap-cc-opt:hover, .ap-cc-opt.sel { background: var(--wrap); } }
.ap-cc-oname { flex: 1 1 auto; color: var(--soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-cc-ocode { color: var(--mute); font-variant-numeric: tabular-nums; }
.ap-cc-opt.sel .ap-cc-ocode { color: var(--acc); }

/* ---------- «Что рядом»: метро, вокзалы, аэропорт, достопримечательности ---------- */
.ap-near { margin-top: 18px; }
.ap-near-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.ap-near-title { font-size: 13px; font-weight: 800; color: var(--soft); }
.ap-near-note { font-family: 'JetBrains Mono', monospace; font-size: 10.5px; color: var(--mute); }
.ap-near-cols { display: grid; grid-template-columns: 2.2fr .9fr; gap: 22px 34px; align-items: start; }
.ap-near-main { min-width: 0; }
.ap-near-side { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
/* «Что вокруг» — длинный список в две колонки.
   display:block обязателен: многоколоночная вёрстка не действует на flex-контейнер. */
.ap-near-main .ap-near-list { display: block; columns: 2; column-gap: 34px; }
.ap-near-main .ap-near-item { break-inside: avoid; margin-bottom: 7px; }
.ap-near-cat { font-size: 12px; font-weight: 800; letter-spacing: .02em; color: var(--mute); text-transform: uppercase; margin-bottom: 9px; }
.ap-near-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.ap-near-item { display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--ink); line-height: 1.35; }
.ap-near-item svg { color: var(--acc); opacity: .85; }
/* Знак метро — официальный синий #204982; на тёмном фоне светлее, иначе тонет. */
.ap-near-item.is-metro svg { color: #204982; opacity: 1; }
:root[data-theme="dark"] .ap-near-item.is-metro svg { color: #6E9BD8; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ap-near-item.is-metro svg { color: #6E9BD8; } }
.ap-near-name { flex: 1 1 auto; min-width: 0; }
.ap-near-km { flex: 0 0 auto; color: var(--mute); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 1100px) { .ap-near-cols { grid-template-columns: 1fr; } .ap-near-side { flex-direction: row; flex-wrap: wrap; gap: 22px 32px; } .ap-near-side .ap-near-col { flex: 1 1 190px; } }
@media (max-width: 620px) { .ap-near-main .ap-near-list { columns: 1; } .ap-near-side { flex-direction: column; gap: 18px; } }

/* ---------- Всплывашка «Спасибо» после заявки ---------- */
.ap-modal-ov { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(20, 16, 26, .55); opacity: 0; transition: opacity .2s; }
.ap-modal-ov.show { opacity: 1; }
.ap-modal { width: 100%; max-width: 400px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 32px 28px 26px; text-align: center; box-shadow: 0 24px 60px rgba(0, 0, 0, .3); transform: translateY(8px) scale(.98); transition: transform .2s; }
.ap-modal-ov.show .ap-modal { transform: none; }
.ap-modal-ic { width: 60px; height: 60px; margin: 0 auto 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--chip); color: var(--acc); }
.ap-modal.err .ap-modal-ic { background: rgba(200, 40, 80, .14); color: #d33a63; }
.ap-modal-msg { font-size: 17px; font-weight: 600; line-height: 1.5; color: var(--ink); }
.ap-modal-ok { margin-top: 22px; width: 100%; background: var(--grad); color: #fff; border: 0; border-radius: 12px; padding: 15px 0; font-size: 16px; font-weight: 800; cursor: pointer; font-family: inherit; transition: filter .15s; }
@media (hover: hover) { .ap-modal-ok:hover { filter: brightness(1.08); } }

/* ---------- Живое фото в выдаче ----------
   При наведении карточка «дышит»: снимок медленно наезжает, а если у объекта есть
   ещё фото — они мягко сменяют друг друга. Смысл не только в оживлении: за пару секунд
   гость успевает увидеть жильё целиком, а не одно превью. Пока курсор не на карточке,
   ничего не двигается; при prefers-reduced-motion — не двигается вовсе. */
.ap-ph { position: absolute; inset: 0; }
.ap-ph img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.001); transform-origin: 50% 52%;
  transition: opacity .6s ease, transform .6s ease;
}
.ap-ph img.on { opacity: 1; }
/* Наезд включается только под курсором и длится дольше показа кадра — движение
   читается как плавное, без «доезда» и рывка в конце. */
.ap-live:hover .ap-ph img.on { transform: scale(1.07); transition: opacity .6s ease, transform 5.5s ease-out; }

@media (prefers-reduced-motion: reduce) {
  .ap-live:hover .ap-ph img.on { transform: none; transition: opacity .3s ease; }
}
/* Раньше на тач-экранах лишние кадры прятались через display:none — тогда ленты
   пальцем не было, и так экономился трафик. Теперь листание есть, а display:none
   ломал его дважды: скрытый кадр не показывался и, главное, браузер вообще не
   качает картинку у скрытого элемента — свайп молча вставал. Трафик держим иначе:
   у кадров со второго нет адреса, он подставляется только перед показом. */

/* Карточка каталога: фото занимает свой блок, слои ложатся поверх. */
.ap-live .ap-ph { position: absolute; inset: 0; }

/* Таймлайн просмотра: отрезок на кадр, текущий наливается за время показа.
   На кромке заливки — точка, она мягко пульсирует: замедляется к затуханию
   и ровно так же разгоняется обратно (ease-in-out в обе стороны). */
.ap-ph-bar {
  position: absolute; left: 12px; right: 12px; bottom: 11px; z-index: 2;
  display: flex; gap: 5px; pointer-events: none;
  opacity: 0; transform: translateY(4px);
  transition: opacity .35s ease, transform .35s ease;
  filter: drop-shadow(0 1px 3px rgba(20, 10, 26, .5));
}
@media (hover: hover) { .ap-live:hover .ap-ph-bar { opacity: 1; transform: none; } }
/* На тач-устройствах полоска видна всегда: она единственная подсказка, что фото
   можно листать. И сама область фото не должна перехватывать вертикальный жест —
   pan-y отдаёт прокрутку странице, горизонталь остаётся нам. */
@media (hover: none) {
  .ap-live .ap-ph-bar { opacity: 1; transform: none; }
  /* Пока следующий кадр качается, старый остаётся на экране — полоска чуть гаснет,
     чтобы было видно: жест принят, идёт загрузка. */
  .ap-live .ap-ph.ap-ph-wait .ap-ph-bar { opacity: .5; }
  .ap-live .ap-ph.multi { touch-action: pan-y; }
}
.ap-ph-seg { position: relative; flex: 1 1 0; height: 3px; border-radius: 100px; background: rgba(255, 255, 255, .32); }
.ap-ph-seg b { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 100px; background: #fff; }
.ap-ph-seg.now b::after {
  content: ''; position: absolute; right: -3px; top: 50%;
  width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, .22);
  animation: ap-ph-pulse 1.5s cubic-bezier(.45, 0, .55, 1) infinite;
}
@keyframes ap-ph-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .3; transform: scale(.68); }
}
@media (prefers-reduced-motion: reduce) {
  .ap-ph-seg.now b::after { animation: none; opacity: 1; }
}

/* ==========================================================================
   Отзывчивость на курсор
   --------------------------------------------------------------------------
   Правило одно: отклик на подход быстрый, возврат — медленнее. Так элемент
   кажется живым, а не дёрганым: базовая длительность .26s (уход), в :hover
   она сокращается до .14s (приход).

   Двигаем через отдельные свойства translate/scale, а не transform: у части
   блоков transform уже занят инлайном (появление при скролле), и правило из
   таблицы стилей туда не достаёт. Отдельные свойства складываются с ним,
   а не спорят.
   ========================================================================== */
:root { --ap-ease: cubic-bezier(.2, .7, .2, 1); }

/* Кликабельное выглядит кликабельным. В теме много «кнопок» на div-ах —
   перечисляем их по data-атрибутам, чтобы курсор не терялся. */
a[href], button, select, summary, label[for], [role="button"],
[data-search], [data-scrolltop], [data-preset], [data-kind], [data-amenity],
[data-sort], [data-guest], [data-kid], [data-date-field], [data-theme-icon],
#ap-guests-toggle, .ap-s-card, .ap-s-chip, .ap-datefield { cursor: pointer; }
button[disabled], [aria-disabled="true"] { cursor: not-allowed; }

/* Общий набор «нажимаемого». */
.ap-bright, .ap-s-chip, .ap-theme-toggle, .ap-burger, .ap-modal-ok,
[data-search], [data-scrolltop], [data-sort], [data-guest], [data-kid] {
  transition:
    translate .26s var(--ap-ease), scale .26s var(--ap-ease),
    filter .26s ease, background-color .26s ease,
    border-color .26s ease, color .26s ease, box-shadow .26s ease;
}

@media (hover: hover) {
  /* Главные кнопки: приподнимаются и подсвечиваются фирменным свечением —
     тень не серая, а в цвет акцента, иначе кнопка выглядит наклейкой. */
  .ap-bright:hover, [data-search]:hover, .ap-modal-ok:hover {
    translate: 0 -2px;
    box-shadow: 0 16px 30px -14px rgba(176, 30, 126, .75);
    transition-duration: .14s;
  }
  /* Чипы фильтров и сортировка — легче: подъём на пиксель. */
  .ap-s-chip:hover, [data-sort]:hover { translate: 0 -1px; transition-duration: .14s; }
  /* Круглые счётчики гостей: подрастают и окрашиваются в акцент. */
  [data-guest]:hover, [data-kid]:hover {
    scale: 1.09; border-color: var(--acc); color: var(--acc); transition-duration: .14s;
  }
  /* Поля даты и гостей — подложка, чтобы было видно, что поле живое. */
  .ap-datefield:hover, #ap-guests-toggle:hover { background: var(--chip); border-radius: 14px; transition-duration: .14s; }
  /* Ссылки в подвале и меню. В подвале фон тёмный и акцент на нём глухой —
     там ведём к белому, а подчёркивание выезжает слева, а не появляется целиком. */
  .ap-menu a:hover { color: var(--acc); }
  .ap-footer-grid a { transition: color .22s ease; background-image: linear-gradient(var(--acc), var(--acc)); background-size: 0 1px; background-position: 0 100%; background-repeat: no-repeat; }
  .ap-footer-grid a:hover { color: #fff; background-size: 100% 1px; transition: color .16s ease, background-size .28s var(--ap-ease); }
}

/* Тач: гасим серый прямоугольник, который iOS рисует поверх любого тапа. Он вылезает
   углами из скруглённых карточек и читается как дефект вёрстки. Свой отклик — ниже. */
a, button, [role="button"], .ap-s-card, .ap-s-chip, .ap-datefield,
#ap-guests-toggle, [data-guest], [data-kid], [data-sort], .ap-cmb-btn {
  -webkit-tap-highlight-color: transparent;
}

/* Нажатие. Ради него всё и затевалось: без отклика на клик интерфейс
   кажется картинкой. Уходим вниз и внутрь, быстро — это тактильный момент. */
.ap-bright:active, .ap-s-chip:active, .ap-theme-toggle:active, .ap-burger:active,
.ap-modal-ok:active, [data-search]:active, [data-scrolltop]:active,
[data-sort]:active, [data-guest]:active, [data-kid]:active {
  scale: .96; translate: 0 0; transition-duration: .06s;
}
.ap-s-card:active { transform: translateY(-1px); transition-duration: .06s; }

/* Тач-отклик. На телефоне человек узнаёт результат только ПОСЛЕ касания — курсор
   ничего не подсказывает заранее. Поэтому нажатие должно отвечать сразу и всему,
   что вообще нажимается: карточкам, плиткам, вкладкам, пунктам списков. */
.ap-mk-pain:active, .ap-mk-svc:active, .ap-mk-gt:active,
.ap-care-card:active, .ap-ct-card:active, .ap-lift:active, .ap-lift-2:active,
.ap-cta:active, .ap-cookie-btn:active, .ap-cc-btn:active, .ap-cmb-btn:active,
.ap-rv-tab:active, .ap-ct-soc:active, .ap-lb-thumb:active {
  scale: .975; transition-duration: .06s;
}
/* Списки и пункты не «сжимаются» — им идёт подсветка подложкой. */
.ap-s-dd-item:active, .ap-cc-opt:active, .ap-check:active,
.ap-mobile-menu nav a:active, .ap-dropdown a:active {
  background: var(--chip); transition-duration: .06s;
}
/* Кнопки-стрелки лайтбокса и закрытие — заметнее, палец их не «наводит». */
.ap-lb-nav:active, .ap-lb-close:active { background: rgba(255, 255, 255, .34); scale: .94; transition-duration: .06s; }
/* Ссылки в подвале: на десктопе подчёркивание выезжает по наведению, на телефоне
   его не увидеть — даём короткую подсветку акцентом. */
.ap-footer-grid a:active, .ap-menu a:active { color: var(--acc); }

/* Связка: несколько номеров рядом на большую компанию. Карточка та же, но с
   акцентной рамкой и раскладкой по номерам — гость должен сразу видеть, из чего
   складывается цена, иначе сумма выглядит завышенной. */
.ap-cmb-head {
  grid-column: 1 / -1; background: var(--card); border-radius: 18px;
  padding: 15px 18px; font-size: 13.5px; line-height: 1.5; color: var(--soft);
  border: 1.5px solid var(--acc);
}
.ap-cmb { border: 1.5px solid var(--acc); cursor: default; }
.ap-cmb .ap-cmb-badge {
  position: absolute; left: 11px; top: 11px; z-index: 2;
  background: var(--grad); color: #fff; font-size: 11px; font-weight: 800;
  padding: 5px 11px; border-radius: 100px; letter-spacing: .01em;
}
.ap-cmb-list {
  margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px;
  display: flex; flex-direction: column; gap: 4px;
}
.ap-cmb-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  font-size: 12.5px; color: var(--soft);
}
.ap-cmb-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-cmb-row b { color: var(--ink); font-weight: 700; white-space: nowrap; }
.ap-cmb-btn {
  flex: none; font-size: 13px; font-weight: 800; color: #fff; background: var(--grad);
  padding: 9px 15px; border-radius: 11px; text-decoration: none; white-space: nowrap;
  transition: scale .2s var(--ap-ease);
}
@media (hover: hover) { .ap-cmb-btn:hover { scale: 1.03; } }
.ap-cmb-btn:active { scale: .96; transition-duration: .06s; }

/* Зоны попадания. Apple и Google просят не меньше 44×44: палец не курсор, он
   попадает грубее и без прицела. Увеличиваем ТОЛЬКО на сенсорных устройствах —
   на десктопе раскладка фильтров остаётся ровно такой, как нарисована. */
@media (pointer: coarse) {
  .ap-theme-toggle { width: 44px; height: 44px; }
  .ap-s-chip { padding: 12px 17px !important; }
  .ap-s-dd-item { padding: 13px 10px !important; }
  .ap-s-dd-btn { padding: 12px 17px !important; }
  .ap-s-sort button { padding: 11px 14px !important; }
  /* Круглые счётчики гостей: размер задан в разметке, поэтому перебиваем явно. */
  [data-guest], [data-kid] { width: 44px !important; height: 44px !important; }
  /* Миниатюры в лайтбоксе — по высоте уже почти норма, добираем до 44 по низу. */
  .ap-lb-thumb { height: 60px; }
  .ap-cc-opt { padding-top: 12px; padding-bottom: 12px; }
}

/* Клавиатура. Курсора нет, а понимать, где ты, нужно так же. */
a[href]:focus-visible, button:focus-visible, select:focus-visible,
input:focus-visible, textarea:focus-visible, [role="button"]:focus-visible,
.ap-s-chip:focus-visible, .ap-s-card:focus-visible {
  outline: 2px solid var(--acc); outline-offset: 3px; border-radius: 12px;
}

/* Поля ввода: рамка отзывается на курсор, на фокусе — акцент с мягким кольцом. */
.ap-lead input, .ap-lead textarea, .ap-lead select {
  transition: border-color .2s ease, box-shadow .2s ease;
}
@media (hover: hover) { .ap-lead input:hover, .ap-lead textarea:hover { border-color: var(--soft); } }
.ap-lead input:focus, .ap-lead textarea:focus {
  border-color: var(--acc); box-shadow: 0 0 0 3px rgba(176, 30, 126, .14); outline: none;
}

@media (prefers-reduced-motion: reduce) {
  .ap-bright, .ap-s-chip, .ap-theme-toggle, .ap-burger, .ap-modal-ok,
  [data-search], [data-scrolltop], [data-sort], [data-guest], [data-kid] {
    translate: none !important; scale: none !important;
  }
}

/* ---------- Отклик на страницах для собственников ----------
   Здесь всё было статикой: кнопки в героях — просто ссылки с инлайновым стилем,
   карточки услуг поднимались при наведении, хотя никуда не ведут. Разводим:
   что кликабельно — отзывается движением, что нет — только светом. */
.ap-cta-solid, .ap-cta-ghost {
  display: inline-block; text-decoration: none;
  transition: translate .26s var(--ap-ease), scale .26s var(--ap-ease),
              box-shadow .26s ease, background-color .26s ease, border-color .26s ease;
}
@media (hover: hover) {
  .ap-cta-solid:hover { translate: 0 -2px; box-shadow: 0 16px 34px -14px rgba(0, 0, 0, .55); transition-duration: .14s; }
  .ap-cta-ghost:hover { translate: 0 -2px; background: rgba(255, 255, 255, .24) !important; border-color: rgba(255, 255, 255, .7) !important; transition-duration: .14s; }
}
.ap-cta-solid:active, .ap-cta-ghost:active { scale: .96; translate: 0 0; transition-duration: .06s; }

/* Кликабельные плитки «Собственникам»: подъём, тень и та же просадка при нажатии. */
.ap-ow-gate, .ap-ow-case {
  transition: translate .3s var(--ap-ease), box-shadow .3s ease;
}
@media (hover: hover) {
  .ap-ow-gate:hover, .ap-ow-case:hover { translate: 0 -4px; box-shadow: 0 26px 46px -26px rgba(28, 15, 36, .8); transition-duration: .18s; }
}
.ap-ow-gate:active, .ap-ow-case:active { scale: .99; translate: 0 -1px; transition-duration: .08s; }

/* Карточки услуг — не ссылки. Раньше они приподнимались, обещая клик, которого нет.
   Теперь отзываются только светом: подложка чуть выше, мягкая тень. */
.ap-lift:not(a) { transition: box-shadow .3s ease, background-color .3s ease; }
@media (hover: hover) { .ap-lift:not(a):hover { translate: none; transform: none; box-shadow: var(--shadow); } }
@media (hover: hover) {
  a.ap-lift:hover { box-shadow: var(--shadow); }
}
a.ap-lift:active { transform: translateY(-1px); transition-duration: .08s; }

/* Напоминание о правах на фото — маленькое, в углу, само уходит. */
.ap-rights-toast {
  position: fixed; left: 20px; bottom: 20px; z-index: 900; max-width: 320px;
  background: rgba(28, 18, 36, .94); color: #F3EBF3; border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 14px; padding: 12px 16px; font-size: 12.5px; line-height: 1.5;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .7);
  opacity: 0; transform: translateY(10px); pointer-events: none;
  transition: opacity .3s ease, transform .3s var(--ap-ease);
}
.ap-rights-toast.show { opacity: 1; transform: none; }
/* Фото из карточек и галерей не утаскиваются мышкой (случайный drag — частая история). */
.ap-ph img, .ap-gal-tile img, .ap-lb img { -webkit-user-drag: none; user-select: none; }
@media (max-width: 620px) { .ap-rights-toast { left: 12px; right: 12px; max-width: none; bottom: 12px; } }

/* ── Скелет модуля бронирования ─────────────────────────────────────────────
   Модуль TravelLine — iframe с чужого домена: пока он поднимается, на его месте
   белое пятно (на холодном кеше — больше четырёх секунд). Держим iframe
   прозрачным и показываем скелет формы, пока не придёт load. */
.ap-tl-shell { position: relative; border-radius: 18px; overflow: hidden; background: var(--card); min-height: 900px; }
.ap-tl-shell iframe { display: block; width: 100%; min-height: 900px; border: 0; background: transparent; }
.ap-tl-shell.on iframe { background: #fff; }
/* Убираем скелет через visibility, а не только opacity: прозрачность едет анимацией,
   а анимации во вкладке без фокуса могут не проигрываться — модуль остался бы невидимым. */
.ap-tl-shell.on .ap-tl-skel { opacity: 0; visibility: hidden; pointer-events: none; }

.ap-tl-skel { position: absolute; inset: 0; z-index: 2; background: var(--card); padding: 26px 24px; transition: opacity .25s ease; }
.ap-tl-skel-head { display: flex; gap: 12px; align-items: center; margin-bottom: 26px; }
.ap-tl-skel-rows { display: flex; flex-direction: column; gap: 16px; }
.ap-tl-skel-row {
  display: grid; grid-template-columns: 120px 1fr 96px; grid-template-rows: auto auto;
  gap: 8px 16px; align-items: center;
  padding: 16px; border: 1px solid var(--line); border-radius: 14px;
}
.ap-tl-skel-note { margin-top: 22px; text-align: center; color: var(--mute); font-size: 14px; }

.ap-sk { display: block; border-radius: 7px; background: var(--wrap); }
.ap-sk-t { width: 190px; height: 26px; }
.ap-sk-b { width: 120px; height: 26px; border-radius: 100px; }
.ap-sk-img { grid-row: 1 / 3; width: 120px; height: 84px; border-radius: 10px; }
.ap-sk-l1 { width: min(58%, 320px); height: 15px; }
.ap-sk-l2 { grid-column: 2; width: min(38%, 210px); height: 13px; }
.ap-sk-p { grid-column: 3; grid-row: 1 / 3; width: 96px; height: 34px; border-radius: 100px; }

/* Мерцание — только там, где движение уместно: на медленной сети оно и объясняет ожидание. */
@media (prefers-reduced-motion: no-preference) {
  .ap-sk { animation: apSkPulse 1.5s ease-in-out infinite; }
  .ap-tl-skel-row:nth-child(2) .ap-sk { animation-delay: .12s; }
  .ap-tl-skel-row:nth-child(3) .ap-sk { animation-delay: .24s; }
}
@keyframes apSkPulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

@media (max-width: 620px) {
  .ap-tl-shell, .ap-tl-shell iframe { min-height: 760px; }
  .ap-tl-skel { padding: 18px 14px; }
  .ap-tl-skel-row { grid-template-columns: 78px 1fr; padding: 12px; }
  .ap-sk-img { width: 78px; height: 62px; }
  .ap-sk-p { grid-column: 2; grid-row: auto; width: 84px; height: 30px; }
}

/* ── Отзывы с Яндекс.Карт ───────────────────────────────────────────────────
   Виджет — чужой iframe, внутрь не дотянуться. Поэтому оформляем оправу:
   вкладки и карточку делаем своими, а содержимое оставляем как есть. */
.ap-yrv-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.ap-yrv-tab {
  font-family: 'Nunito Sans', sans-serif; font-size: 14px; font-weight: 700;
  color: var(--soft); background: var(--card); border: 1px solid var(--line);
  border-radius: 100px; padding: 9px 18px; cursor: pointer; transition: all .2s ease;
}
@media (hover: hover) { .ap-yrv-tab:hover { color: var(--ink); border-color: transparent; box-shadow: 0 10px 24px -14px rgba(40,20,50,.45); } }
.ap-yrv-tab:active { transform: scale(.97); }
.ap-yrv-tab.on { background: var(--grad); color: #fff; border-color: transparent; }

.ap-yrv-stack { position: relative; }
.ap-yrv-panel { position: absolute; top: 0; left: 0; width: 100%; opacity: 0; pointer-events: none; }
.ap-yrv-panel.on { position: relative; opacity: 1; pointer-events: auto; }

.ap-yrv-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-bottom: 10px; }
.ap-yrv-addr { font-size: 14px; color: var(--soft); }
.ap-yrv-link { font-size: 14px; font-weight: 700; color: var(--acc); text-decoration: none; }
@media (hover: hover) { .ap-yrv-link:hover { text-decoration: underline; } }

/* 690px — своя ширина вёрстки Яндекса. Рамку шире делать нечем: виджет не тянется,
   справа остаётся пустая полоса его фона. */
.ap-yrv-frame {
  position: relative; height: 760px; max-width: 690px; overflow: hidden;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
}
.ap-yrv-frame iframe { display: block; width: 100%; height: 100%; border: 0; opacity: 0; transition: opacity .25s ease; }
.ap-yrv-frame.on iframe { opacity: 1; }
.ap-yrv-load {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--mute); font-size: 14px;
}
.ap-yrv-frame.on .ap-yrv-load { opacity: 0; visibility: hidden; }

/* Виджет Яндекса всегда светлый. В тёмной теме белая простыня на тёмном фоне режет
   глаз, поэтому чуть приглушаем её и убираем приглушение при наведении. */
:root[data-theme="dark"] .ap-yrv-frame iframe { filter: brightness(.92); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ap-yrv-frame iframe { filter: brightness(.92); } }
@media (hover: hover) { .ap-yrv-frame:hover iframe { filter: none; } }

@media (max-width: 620px) {
  .ap-yrv-frame { height: 620px; border-radius: 14px; }
}

/* ── Виджет отзывов TravelLine: срезаем шапку ───────────────────────────────
   Наверху виджета — название аккаунта в TL («Квартиры») и синяя кнопка брони.
   Гостю имя аккаунта ничего не говорит, а кнопка уводит в чужой стиль и дублирует
   нашу же бронь. Виджет на чужом домене, внутрь не дотянуться, поэтому сдвигаем
   его вверх внутри рамки с overflow:hidden.

   112px — высота шапки, снятая с боевой страницы по пикселям (серый отступ виджета
   34px + сама шапка 74px + разделитель). Значение одно и вынесено в переменную:
   если TravelLine поменяет вёрстку, править здесь. Признак, что съехало, —
   либо полоска синей кнопки сверху, либо срезанный заголовок «Общий рейтинг». */
.ap-rv-crop { --ap-rv-cut: 112px; overflow: hidden; }
.ap-rv-crop > .tl-container { margin-top: calc(var(--ap-rv-cut) * -1); }
