/* Главная, разделы служб, карта (views/hotel.js) — в облике «Бутик» (theme.css).
   .home-* — главная, .sec-* — раздел службы, .map-* — карта. Общие компоненты (.card, .list, .chip, .qty, .steps,
   .accordion …) оформлены в app.css и theme.css; здесь — только их место на этих экранах.
   Цвета — только токены: тёмная тема и цвет отеля работают сами. Линии вместо плашек: блоки разделены тонкой
   чертой (--line), крупные цифры и заголовки — антиквой (--font-display). */

/* ================================================================
   Главная
   ================================================================ */

.home-head { margin: 12px 0 28px; }
.home-head h1 { margin: 12px 0 0; font-size: 2.5rem; line-height: 1.1; overflow-wrap: anywhere; }
.home-head .lead { margin-top: 10px; }

/* ---------- Проживание: крупный номер, даты, отметки дней, строки Wi-Fi и карты гостя ---------- */
.home-stay { border-top: 1px solid var(--line); }
/* Номер не переносится посреди числа: кегль уменьшается по ширине экрана, а если и так не помещается
   («A-1205»), сведения встают под номер (flex-wrap). */
.home-stay-main {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 22px; padding: 22px 0; border-bottom: 1px solid var(--line);
}
.home-stay-big { flex: none; display: grid; justify-items: start; max-width: 100%; }
.home-k {
  font-size: .6875rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--muted);
}
.home-room {
  margin-top: 8px; font-family: var(--font-display); font-size: clamp(3.25rem, 17vw, 6rem); font-weight: 400; line-height: .9;
  letter-spacing: -.01em; font-variant-numeric: lining-nums; white-space: nowrap;
}
.home-room.is-text { font-size: 2rem; line-height: 1.1; white-space: normal; overflow-wrap: break-word; hyphens: auto; }
.home-unit { margin-top: 4px; color: var(--muted); font-size: .9375rem; }
.home-stay-info { flex: 1 1 128px; min-width: 0; display: grid; gap: 4px; padding-bottom: 4px; }
.home-stay-type { color: var(--muted); font-size: .9375rem; line-height: 1.4; }
.home-stay-dates { font-size: .9375rem; font-weight: 500; }
/* Отметка на каждый день проживания: прожитые — акцентом. */
.home-days { display: flex; gap: 4px; margin-top: 12px; }
.home-days > span { flex: 1 1 0; height: 2px; background: var(--line-strong); }
.home-days > span.is-on { background: var(--accent-text); }
.home-days-bar { position: relative; flex: 1 1 auto; height: 2px; background: var(--line-strong); }
.home-days-bar > span { position: absolute; inset: 0 auto 0 0; background: var(--accent-text); }
.home-day { margin-top: 6px; color: var(--muted); font-size: .8125rem; line-height: 1.4; }

/* Строки «подпись — значение — действие» под тонкой чертой: Wi-Fi, пароль, карта гостя, сведения брони. */
.home-rows { margin: 0; }
.home-loyalty-box { display: block; }
.home-row {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; margin: 0; padding: 10px 0;
  border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; color: var(--text);
  font: inherit; font-weight: 400; text-align: left; text-decoration: none; white-space: normal; cursor: pointer;
}
div.home-row, dl .home-row { cursor: default; }
.home-row:hover { background: none; text-decoration: none; }
.home-row:active { transform: none; }
.home-row:focus-visible { outline-offset: -2px; }
.home-row-k { flex: none; width: 96px; color: var(--muted); font-size: .8125rem; }
.home-row-v { flex: 1 1 auto; min-width: 0; margin: 0; font-size: 1rem; font-weight: 500; overflow-wrap: anywhere; }
/* Счёт номера: почему «на номер» нельзя («внесите депозит на ресепшн») — заметно, но не тревогой. */
.home-rc-warn { color: var(--warn); font-size: .9375rem; }
.home-row-act {
  flex: none; color: var(--accent-text); font-size: .8125rem; text-decoration: underline;
  text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); text-underline-offset: 4px;
}
.home-row-chev { flex: none; color: var(--muted); transition: transform .15s var(--ease), color .15s; }
a.home-row:hover .home-row-chev { color: var(--text); transform: translateX(2px); }
a.home-row:hover .home-row-v, button.home-row:hover .home-row-act { color: var(--accent-text); }

/* Приветствие отеля до заезда — цитатой антиквой. */
.home-welcome {
  margin: 24px 0 0; padding: 0 0 0 18px; font-family: var(--font-display); font-size: 1.125rem; line-height: 1.55;
  color: var(--text-2); white-space: pre-line; background: linear-gradient(var(--accent), var(--accent)) no-repeat left top / 1px 100%;
}

/* После выезда: благодарность и анкета */
.home-bye { display: grid; justify-items: center; gap: 10px; padding: 28px 0 8px; border-top: 1px solid var(--line); text-align: center; }
.home-bye-mark {
  width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--accent); color: var(--accent-text);
}
.home-bye h2 { margin: 6px 0 0; font-size: 1.75rem; }
.home-bye p { max-width: 40ch; margin: 0; color: var(--text-2); }
.home-bye-btn { margin-top: 8px; }
.home-bye .home-rows { justify-self: stretch; text-align: left; }
/* Строки под кнопкой анкеты (стоимость, бонусы, карта гостя) — с чертой сверху у первой видимой группы. Список
   «Бонусы» без сумм проживания скрыт, пока прогноза нет (hidden): тогда черта — у карты гостя. */
.home-bye > .home-money:not([hidden]), .home-bye > .home-rows:has(> :not([hidden])) { margin-top: 14px; border-top: 1px solid var(--line); }
.home-bye > .home-money:not([hidden]) + .home-rows { margin-top: 0; border-top: 0; }
.home-links { margin-top: 20px; border-top: 1px solid var(--line); }

/* Бронь отменена и запасной вид */
.home-cancelled { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: start; gap: 8px; padding: 20px; }
.home-cancelled .btn { max-width: 100%; white-space: normal; text-align: center; }
.home-cancelled h2 { margin: 4px 0 0; font-family: var(--font-display); font-size: 1.375rem; font-weight: 400; }
.home-cancelled p { margin: 0 0 4px; color: var(--text-2); }
.home-cancelled-icon {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line-strong); color: var(--info);
}
.home-plain { display: grid; gap: 4px; }
.home-plain .home-label { color: var(--muted); font-size: .8125rem; }

/* ---------- Быстрые действия: плитки тонкой рамкой, 2×2 (от 560 px — в ряд по 4) ---------- */
.home-quick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 32px; }
@media (min-width: 560px) { .home-quick { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.home-quick-tile {
  min-height: 92px; display: flex; flex-direction: column; justify-content: space-between; gap: 12px; padding: 16px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-xs); background: var(--surface);
  color: var(--text); font-size: .9375rem; font-weight: 500; line-height: 1.25; text-decoration: none;
  transition: border-color .15s, background-color .15s;
}
.home-quick-tile .icon { color: var(--accent-text); stroke-width: 1.35; }
.home-quick-tile:hover { border-color: var(--text); text-decoration: none; }
.home-quick-tile:active { background: var(--surface-2); }

/* ---------- Активные заказы и ближайшие записи ---------- */
.home-more { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 4px; }
/* Колонка карточек не растёт по самой длинной строке шагов — иначе на 320 px карточка вылезает в поле. */
.home-activity-list { grid-template-columns: minmax(0, 1fr); }
.home-order { display: grid; gap: 14px; }
.home-order-head { display: flex; align-items: center; gap: 12px; }
.home-order-head > .grow { display: grid; gap: 2px; }
.home-order-title { font-weight: 600; line-height: 1.3; }
.home-order-sub { font-size: .875rem; color: var(--muted); line-height: 1.35; }
.home-order-sum { flex: none; align-self: flex-start; padding-top: 2px; font-family: var(--font-display); font-size: 1.125rem; font-weight: 400; }
.home-order-items { margin: 0; color: var(--text-2); font-size: .9375rem; }
.home-order .steps { margin: 2px 0 0; }
.home-appts { padding: 0 16px; }
.home-when {
  flex: none; width: 72px; display: grid; justify-items: start; padding: 2px 0; line-height: 1.2;
}
.home-when > span { font-size: .6875rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.home-when > strong { font-family: var(--font-display); font-size: 1.375rem; font-weight: 400; }
.home-chev { flex: none; color: var(--muted); transition: transform .15s var(--ease), color .15s; }
a.list-item:hover .home-chev, a.home-event:hover .home-chev { color: var(--text); transform: translateX(2px); }

/* ---------- Сегодня в отеле: строки афиши ---------- */
.home-events { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.home-events > li { border-bottom: 1px solid var(--line); }
.home-event { display: flex; align-items: center; gap: 16px; min-height: 76px; padding: 12px 0; color: var(--text); text-decoration: none; }
a.home-event:hover { text-decoration: none; }
a.home-event:hover .home-event-title { color: var(--accent-text); }
.home-event-time { flex: none; width: 82px; display: grid; line-height: 1.15; }
.home-event-time > strong { font-family: var(--font-display); font-size: 1.625rem; font-weight: 400; }
.home-event-time > span { margin-top: 4px; font-size: .8125rem; color: var(--muted); }
.home-event-body { flex: 1 1 auto; min-width: 0; display: grid; gap: 2px; }
.home-event-title { font-weight: 500; line-height: 1.3; }
.home-event-dept { font-size: .8125rem; color: var(--muted); }
.home-event-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }

/* ---------- Службы: оглавление с номерами ---------- */
.home-index { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.home-index > li { border-bottom: 1px solid var(--line); }
.home-index-row { display: flex; align-items: center; gap: 14px; min-height: 70px; padding: 12px 0; color: var(--text); text-decoration: none; }
.home-index-row:hover { text-decoration: none; }
.home-index-num { flex: none; width: 26px; font-size: .75rem; font-weight: 500; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.home-index-body { flex: 1 1 auto; min-width: 0; display: grid; gap: 3px; }
.home-index-title { font-family: var(--font-display); font-size: 1.3125rem; line-height: 1.15; transition: color .15s; }
.home-index-sub { font-size: .8125rem; color: var(--muted); line-height: 1.35; }
.home-index-go { flex: none; color: var(--muted); transition: transform .15s var(--ease), color .15s; }
.home-index-row:hover .home-index-title { color: var(--accent-text); }
.home-index-row:hover .home-index-go { color: var(--text); transform: translateX(3px); }

/* ---------- Акции ---------- */
.home-promos > .card.home-promo { width: min(300px, 84vw); display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.home-promos.is-single > .card.home-promo { width: 100%; }
.home-promo-img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--surface-2); }
.home-promo-body { flex: 1 1 auto; display: flex; flex-direction: column; gap: 8px; padding: 18px; }
.home-promo-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.home-promo-until { font-size: .8125rem; color: var(--muted); }
.home-promo-title { margin: 0; font-family: var(--font-display); font-size: 1.375rem; font-weight: 400; line-height: 1.2; }
.home-promo-text { margin: 0; color: var(--text-2); font-size: .9375rem; white-space: pre-line; }
.home-code {
  width: 100%; justify-content: flex-start; gap: 10px; min-height: 48px; margin-top: 4px; padding: 6px 12px;
  border: 1px dashed var(--accent); border-radius: var(--radius-xs); background: transparent; color: var(--text); font-weight: 500;
}
.home-code:hover { background: var(--accent-soft); }
.home-code-k { font-size: .6875rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.home-code-v {
  flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; text-align: left;
  font-size: 1.0625rem; font-weight: 600; letter-spacing: .08em; font-variant-numeric: tabular-nums;
}
.home-promo-link { display: inline-flex; align-items: center; gap: 4px; min-height: var(--tap); margin-top: auto; font-weight: 500; }

/* ---------- Ресепшн ---------- */
.home-desk { display: grid; justify-items: center; gap: 10px; padding-top: 28px; border-top: 1px solid var(--line); text-align: center; }
.home-desk-title {
  margin: 0; font-family: var(--font); font-size: .6875rem; font-weight: 500; letter-spacing: .24em;
  text-transform: uppercase; color: var(--muted);
}
.home-desk-phone { font-family: var(--font-display); font-size: 1.875rem; line-height: 1.2; color: var(--text); text-decoration: none; }
.home-desk-phone:hover { color: var(--accent-text); text-decoration: none; }
.home-desk-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 10px; width: 100%; margin-top: 8px; }
.home-desk-actions .btn { min-height: 50px; }
.home-desk-help { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); color: var(--muted); font-size: .875rem; }
.home-desk-help:hover { color: var(--text); }

/* ================================================================
   Раздел службы
   ================================================================ */

/* ---------- Шапка по центру и сведения строкой через точку ---------- */
.sec-head { display: grid; justify-items: center; gap: 0; margin: 16px 0 0; text-align: center; }
.sec-head .eyebrow { line-height: 1.6; letter-spacing: .18em; }
.sec-head h1 { margin: 10px 0 0; font-size: clamp(2rem, 11vw, 2.75rem); line-height: 1.05; overflow-wrap: anywhere; }
.sec-head .lead { max-width: 46ch; margin: 12px 0 0; }
.chips.sec-facts { justify-content: center; gap: 0; margin-top: 12px; }
.chip.sec-fact {
  min-height: var(--tap); max-width: 100%; padding: 0 6px; border: 0; background: none; color: var(--text-2);
  font-size: .875rem; font-weight: 400; cursor: pointer;
}
.chip.sec-fact:hover { background: none; color: var(--text); }
.chip.sec-fact:hover > span { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--line-strong); }
.sec-fact + .sec-fact::before { content: "·"; margin-right: 6px; color: var(--muted); }
.sec-fact > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sec-fact .icon { display: none; }
.sec-fact.is-open::after, .sec-fact.is-closed::after { order: -1; content: ""; width: 6px; height: 6px; margin-right: 2px; border-radius: 50%; }
.sec-fact.is-open::after { background: var(--ok); }
.sec-fact.is-closed::after { background: var(--warn); }
.sec-note { margin-top: 20px; }

/* ---------- «Об отеле» ---------- */
.sec-welcome { margin: 0 0 12px; }
.sec-list-card { padding: 0 16px; }
.list-item.sec-row-btn {
  width: 100%; justify-content: flex-start; padding: 12px 0; border: 0; border-radius: 0; background: none; color: inherit;
  font-size: 1rem; font-weight: 400; line-height: 1.5; text-align: left; white-space: normal; letter-spacing: 0;
}
.list-item.sec-row-btn:hover { background: none; }
.list-item.sec-row-btn:hover .li-title { color: var(--accent-text); }
.list-item.sec-row-btn:active { transform: none; }
.list-item.sec-row-btn:focus-visible { outline-offset: -2px; border-radius: var(--radius-xs); }
.sec-row-btn .li-sub { overflow-wrap: anywhere; }
.sec-end { flex: none; color: var(--muted); }

/* ---------- Расписание и афиша ---------- */
.chips.sec-days {
  flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 12px; padding: 2px 16px;
}
.sec-days::-webkit-scrollbar { display: none; }
.sec-days .chip { flex: none; min-height: var(--tap); }
.sec-events-card { padding: 0 16px; }
.sec-event { display: flex; align-items: flex-start; gap: 14px; padding: 14px 0; }
.sec-event-time { flex: none; width: 64px; display: grid; line-height: 1.15; padding-top: 1px; }
.sec-event-time > strong { font-family: var(--font-display); font-size: 1.375rem; font-weight: 400; }
.sec-event-time > span { margin-top: 2px; font-size: .75rem; color: var(--muted); }
.sec-event-body { flex: 1 1 auto; min-width: 0; display: grid; gap: 4px; }
.sec-event-title { font-weight: 500; line-height: 1.3; }
.sec-event-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.sec-event-desc { font-size: .875rem; color: var(--text-2); white-space: pre-line; }
.sec-event .sec-btn { align-self: center; }
.sec-event.is-past .sec-event-time > strong,
.sec-event.is-past .sec-event-title { color: var(--muted); }

/* ---------- Каталог: липкие категории — текстом с чертой под выбранной ---------- */
.sec-cats {
  position: sticky; top: calc(var(--appbar-h) + var(--safe-t)); z-index: 20;
  display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
  margin: 24px -16px 0; padding: 0 16px;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: saturate(1.2) blur(14px); backdrop-filter: saturate(1.2) blur(14px);
  border-bottom: 1px solid var(--line);
}
.sec-cats::-webkit-scrollbar { display: none; }
.sec-cats .chip {
  flex: none; min-width: var(--tap); min-height: var(--tap); margin-bottom: -1px; padding: 0; border: 0;
  border-bottom: 1px solid transparent; border-radius: 0; background: none; color: var(--muted); font-size: .9375rem; cursor: pointer;
}
/* По центру, пока вкладки помещаются; при переполнении автополя обнуляются и строка прокручивается с начала
   (justify-content: center в старых WebView уводил первые вкладки за левый край). */
.sec-cats > :first-child { margin-left: auto; }
.sec-cats > :last-child { margin-right: auto; }
.sec-cats .chip:hover { background: none; color: var(--text); }
.sec-cats .chip.active { background: none; color: var(--text); border-bottom-color: var(--text); }
.sec-cats + .sec-cat { margin-top: 28px; }
/* Прокрутка к категории: заголовок встаёт под верхнюю панель и строку категорий, а не под них. */
.sec-cat { scroll-margin-top: calc(var(--appbar-h) + var(--safe-t) + 60px); }
.sec-cat > h2 { margin-bottom: 4px; }
.sec-cat > h2:focus { outline: none; }
.sec-faq, .sec-info { scroll-margin-top: calc(var(--appbar-h) + var(--safe-t) + 12px); }

/* ---------- Позиции: как в печатном меню ---------- */
.sec-items { border: 0; background: none; }
.sec-item { position: relative; display: flex; gap: 14px; padding: 18px 0; }
.sec-item + .sec-item { border-top: 1px solid var(--line); }
.sec-item-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
/* Не помещаются в строку название, отточие и цена (длинное название, метка «Входит в стоимость») —
   отточие с ценой переносится на следующую строку, а не наезжает на название. */
.sec-item-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.sec-item-title { flex: 0 1 auto; min-width: 0; margin: 0; font-size: 1.0625rem; font-weight: 500; line-height: 1.3; overflow-wrap: anywhere; }
.sec-leader { flex: 1 1 16px; min-width: 16px; border-bottom: 1px dotted var(--line-strong); transform: translateY(-4px); }
/* Название — кнопка «подробнее»; её ::after растянут на всю позицию: касание по ней открывает карточку,
   а кнопки действия лежат выше (z-index) и работают сами. */
.sec-open {
  display: inline; min-height: 0; padding: 0; border: 0; border-radius: 0; background: none; color: inherit;
  font: inherit; letter-spacing: 0; text-align: left; white-space: normal; cursor: pointer;
}
.sec-open:hover { background: none; }
.sec-open:active { transform: none; }
.sec-open::after { content: ""; position: absolute; inset: 0; }
.sec-open:focus-visible { outline: none; }
.sec-open:focus-visible::after { outline: 2px solid var(--focus-ring, var(--accent-text)); outline-offset: 2px; border-radius: var(--radius-xs); }
@media (hover: hover) { .sec-item:hover .sec-item-title { color: var(--accent-text); } }
.sec-item-desc { margin: 0; color: var(--muted); font-family: var(--font-display); font-size: .9375rem; line-height: 1.5; }
.sec-item-meta { display: inline-flex; align-items: center; gap: 4px; font-size: .8125rem; color: var(--muted); }
.sec-item-foot { display: flex; justify-content: flex-end; min-height: var(--tap); margin-top: 2px; }
.sec-act { position: relative; z-index: 1; display: flex; align-items: center; }
.sec-price { flex: none; font-weight: 500; color: var(--text); white-space: nowrap; }
.sec-price.is-soft { font-size: .875rem; font-weight: 400; color: var(--muted); }
.sec-item-head .tag { flex: none; }
.sec-thumb { align-self: flex-start; width: 84px; height: 84px; }
.sec-btn { padding: 0 18px; }
.sec-later { font-size: .8125rem; color: var(--muted); white-space: nowrap; }
.tag.sec-off { background: var(--surface-2); color: var(--text-2); }
.sec-item.is-off .sec-item-title, .sec-item.is-off .sec-price { color: var(--muted); }
.sec-item.is-off .sec-thumb { filter: grayscale(1); opacity: .55; }

/* «Добавить» текстом с плюсом; счётчик — тонкой рамкой. Область касания — не меньше 44 px. */
.sec-ctl { display: flex; }
.sec-add {
  min-height: var(--tap); padding: 0 2px; gap: 6px; border: 0; background: none; color: var(--accent-text);
  font-size: .9375rem; font-weight: 500; letter-spacing: .01em;
}
.sec-add:hover { background: none; color: var(--text); }
.sec-add:hover span { text-decoration: underline; text-underline-offset: 4px; }
.sec-qty .icon-btn { width: 40px; height: 40px; }
.sec-qty .icon-btn::after { content: ""; position: absolute; inset: -2px; }
.sec-qty .qty-value { min-width: 28px; }

/* ---------- Пусто, сведения, частые вопросы ---------- */
.sec-empty { display: grid; justify-items: center; padding: 8px 16px 20px; }
.sec-empty .empty-state { padding-bottom: 8px; }
.sec-acc { padding: 0 16px; }
.sec-acc summary { min-height: var(--tap); }
.sec-sum { display: inline-flex; align-items: center; gap: 12px; }
.sec-sum .icon { color: var(--accent-text); }
.sec-text { margin: 0; color: var(--text-2); white-space: pre-line; }
.kv.sec-kv { gap: 8px 16px; }
.sec-pay { display: flex; flex-wrap: wrap; gap: 6px; }
.sec-phones .list-item { min-height: var(--tap); padding: 10px 0; }
.sec-phones .sec-end { color: var(--accent-text); }

/* ---------- Карточка позиции и заявка (шторка) ---------- */
.sec-detail-photo {
  display: block; width: 100%; max-height: 280px; aspect-ratio: 4 / 3; object-fit: cover;
  margin: 0 0 16px; border-radius: var(--radius-xs); background: var(--surface-2);
}
.sec-detail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sec-detail-meta .sec-price { font-family: var(--font-display); font-size: 1.5rem; font-weight: 400; }
.sec-req-sum { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.sec-req .callout a { font-weight: 600; white-space: nowrap; }
@media (max-width: 480px) {
  .sec-req .sheet-actions > * { flex: 1 1 0; }
}

/* ================================================================
   Карта
   ================================================================ */

/* Рамка схемы — двойная черта, как у печатного плана. Схема по умолчанию (.is-plan, assets/map.svg) — вертикальная
   4:5: на широком экране её ширину ограничиваем, иначе она выше окна. */
.map-frame {
  padding: 5px; border: 1px solid var(--line-strong); border-radius: var(--radius-lg); background: var(--surface);
  scroll-margin-top: calc(var(--appbar-h) + var(--safe-t) + 12px);
}
.map-frame.is-plan { max-width: 540px; margin-inline: auto; }
.map-canvas { position: relative; border-radius: 2px; }
.map-img, .map-plan, .map-plan > svg { display: block; width: 100%; height: auto; border-radius: 2px; }
.map-img { background: var(--surface-2); }
.map-broken { margin: 0; border-radius: inherit; }

/* Цвета схемы по умолчанию. Светлые — в самом map.svg (запасные значения var()), здесь — тёмные. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .map-plan {
    --map-ground: #1d1b18; --map-lawn: #23271f; --map-lawn-2: #2d3426; --map-road: #2a2722; --map-path: #34302a;
    --map-path-edge: #2a2621; --map-shadow: rgb(0 0 0 / 34%); --map-roof: #3a352d; --map-roof-2: #2e2a24;
    --map-wall: #a39a8b; --map-water: #22403d; --map-water-edge: #35605a; --map-water-line: #3d6a64;
    --map-tree: #36422c; --map-tree-line: #4f5d40; --map-tree-hi: #42503a; --map-court: #5a4130;
    --map-court-line: #a8957c; --map-sand: #39321f; --map-sand-dot: #524830; --map-sea: #1a2a28;
    --map-sea-2: #142120; --map-wave: #34504c; --map-umbrella: #4a443a; --map-umbrella-2: #6b5a3e;
    --map-thatch: #5c4d33; --map-flower: #b07b5a; --map-ink: #b8af9f; --map-needle: #c8a46b; --map-sea-ink: #7d9c96;
  }
}
:root[data-theme="dark"] .map-plan {
  --map-ground: #1d1b18; --map-lawn: #23271f; --map-lawn-2: #2d3426; --map-road: #2a2722; --map-path: #34302a;
  --map-path-edge: #2a2621; --map-shadow: rgb(0 0 0 / 34%); --map-roof: #3a352d; --map-roof-2: #2e2a24;
  --map-wall: #a39a8b; --map-water: #22403d; --map-water-edge: #35605a; --map-water-line: #3d6a64;
  --map-tree: #36422c; --map-tree-line: #4f5d40; --map-tree-hi: #42503a; --map-court: #5a4130;
  --map-court-line: #a8957c; --map-sand: #39321f; --map-sand-dot: #524830; --map-sea: #1a2a28;
  --map-sea-2: #142120; --map-wave: #34504c; --map-umbrella: #4a443a; --map-umbrella-2: #6b5a3e;
  --map-thatch: #5c4d33; --map-flower: #b07b5a; --map-ink: #b8af9f; --map-needle: #c8a46b; --map-sea-ink: #7d9c96;
}
/* Светлая схема отеля (картинка) в тёмной теме не слепит. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .map-img { filter: brightness(.86) saturate(.9); }
}
:root[data-theme="dark"] .map-img { filter: brightness(.86) saturate(.9); }

/* Цвет точки — цвет службы, притушенный тушью (светлая тема) или бумагой (тёмная): различает точки и не спорит
   с приглушённой схемой. Тот же цвет у значков в списке мест и в описании (.map-key). */
.map-pin, .map-key { --pin: var(--dept); --pin-ink: #fff; }
@supports (color: color-mix(in srgb, red, blue)) {
  .map-pin, .map-key { --pin: color-mix(in srgb, var(--dept) 60%, #1c1a17); --pin-ink: #fbf9f4; }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .map-pin, :root:not([data-theme="light"]) .map-key { --pin: color-mix(in srgb, var(--dept) 55%, #cfc5b4); --pin-ink: #13120f; }
  }
  :root[data-theme="dark"] .map-pin, :root[data-theme="dark"] .map-key { --pin: color-mix(in srgb, var(--dept) 55%, #cfc5b4); --pin-ink: #13120f; }
}

/* Значок — кнопка 44×44 с видимым кружком 30 px в кольце цвета карточки; координаты — центр значка. */
.map-pin {
  position: absolute; z-index: 1; width: var(--tap); height: var(--tap); min-height: 0; padding: 0;
  margin: calc(var(--tap) / -2) 0 0 calc(var(--tap) / -2);
  display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--pin-ink);
}
.map-pin:hover, .map-pin:active { background: transparent; transform: none; }
.map-pin-dot {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--pin); color: var(--pin-ink); border: 2px solid var(--surface);
  box-shadow: 0 1px 2px rgb(28 26 23 / 28%), 0 3px 8px rgb(28 26 23 / 14%);
  transition: transform .15s var(--ease), opacity .15s, box-shadow .15s;
}
.map-pin-dot .icon { width: 16px; height: 16px; stroke-width: 1.7; }
.map-pin:hover .map-pin-dot { transform: scale(1.1); }
.map-pin:focus-visible { outline: none; }
.map-pin:focus-visible .map-pin-dot { outline: 2px solid var(--focus-ring, var(--accent-text)); outline-offset: 3px; }
.map-pin.is-active { z-index: 3; }
.map-pin.is-active .map-pin-dot {
  transform: scale(1.2);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--pin) 28%, transparent), 0 3px 8px rgb(28 26 23 / 20%);
}
/* Выбрано место — остальные точки отступают. */
.map-canvas:has(.map-pin.is-active) .map-pin:not(.is-active):not(:hover):not(:focus-visible) .map-pin-dot { opacity: .62; }

/* Подпись над значком — плашкой тушью с хвостиком к точке. */
.map-pin-label {
  position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%);
  display: none; width: max-content; max-width: 180px; padding: 7px 11px 8px; border-radius: var(--radius-xs);
  background: var(--inverse); color: var(--inverse-ink); box-shadow: var(--shadow-lg);
  font-size: .8125rem; font-weight: 500; line-height: 1.3; letter-spacing: 0; text-align: left; white-space: normal;
  pointer-events: none;
}
.map-pin-label::after {
  content: ""; position: absolute; top: 100%; left: 50%; margin-left: -5px;
  border: 5px solid transparent; border-top-color: var(--inverse);
}
.map-pin-label small { display: block; margin-top: 1px; font-size: .75rem; font-weight: 400; opacity: .78; }
.map-pin.is-active .map-pin-label { display: block; }
@media (hover: hover) {
  .map-pin:hover { z-index: 4; }
  .map-pin:hover .map-pin-label { display: block; }
}
/* У края схемы подпись разворачивается внутрь; хвостик остаётся над точкой (центр кнопки — 22 px от края). */
.map-pin.at-left .map-pin-label { left: 4px; transform: none; }
.map-pin.at-left .map-pin-label::after { left: 18px; }
.map-pin.at-right .map-pin-label { left: auto; right: 4px; transform: none; }
.map-pin.at-right .map-pin-label::after { left: auto; right: 13px; margin-left: 0; }
.map-pin.at-top .map-pin-label { bottom: auto; top: calc(100% + 4px); }
.map-pin.at-top .map-pin-label::after { top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: var(--inverse); }

/* Подсказка и описание выбранного места под схемой */
.map-info { margin-top: 14px; }
.map-hint {
  display: flex; align-items: center; gap: 10px; margin: 0; padding: 12px 0; border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line); color: var(--text-2); font-size: .9375rem;
}
.map-hint .icon { flex: none; color: var(--accent-text); }
.map-card { display: grid; gap: 10px; animation: pop-in .2s var(--ease); }
.map-card-head { display: flex; align-items: center; gap: 12px; }
.map-card-head > .grow { display: grid; min-width: 0; }
.map-card-head .icon-btn { margin: -6px -6px -6px 0; color: var(--muted); }
.map-card-title { font-family: var(--font-display); font-size: 1.25rem; font-weight: 400; line-height: 1.25; }
.map-card-sub { font-size: .875rem; color: var(--muted); }
.map-card-row { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--text-2); }
.map-card-row .icon { color: var(--muted); }
.map-card-text { margin: 0; color: var(--text-2); white-space: pre-line; }

/* Значок места в списке и в описании — кружок цвета точки на схеме. */
.map-key {
  width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 50%;
  background: var(--pin); color: var(--pin-ink);
}
.map-card .map-key { width: 40px; height: 40px; }

/* Список мест по службам: подпись службы между чертами, места строками через тонкую черту. */
.map-places > h2 { margin: 0 0 18px; }
.map-group + .map-group { margin-top: 22px; }
.map-group-title { margin-bottom: 2px; }
.map-list { margin: 0; padding: 0; list-style: none; }
.map-list > li + li { border-top: 1px solid var(--line); }
.list-item.map-item {
  width: 100%; justify-content: flex-start; padding: 12px 0; border: 0; border-radius: 0; background: none; color: inherit;
  font-size: 1rem; font-weight: 400; line-height: 1.5; text-align: left; white-space: normal; letter-spacing: 0;
}
.list-item.map-item:hover { background: none; }
.list-item.map-item:hover .li-title { color: var(--accent-text); }
.list-item.map-item:active { transform: none; }
.list-item.map-item:focus-visible { outline-offset: -2px; border-radius: var(--radius-xs); }
.map-item .li-title { font-weight: 500; }
.map-item-pin { flex: none; color: var(--muted); }
/* Выбранное место: мягкий фон акцента чуть шире строки и акцентная метка. */
.list-item.map-item.is-active { width: calc(100% + 20px); margin: 0 -10px; padding: 12px 10px; background: var(--accent-soft); }
.list-item.map-item.is-active .li-title, .map-item.is-active .map-item-pin { color: var(--accent-text); }
.map-item.is-active .li-sub { color: var(--text-2); } /* --muted на мягком фоне акцента — ниже 4.5:1 при тёмном цвете отеля */
.map-empty { margin-top: 16px; }
