/* Общий мобильный каркас внутренних страниц (цены, врачи): панель поиска, нижняя кнопка записи, шторка. */
.subpage { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
.subpage .topbar { height: 56px; padding: 0 16px; }
.subpage .brand-logo { width: 32px; height: 32px; }
.subpage-back { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; color: var(--green); font-weight: 700; font-size: 0.9rem; text-decoration: none; }

.subpage-main { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.subpage-title { margin: 18px 0 12px; font-family: Georgia, serif; font-weight: 500; font-size: 1.75rem; line-height: 1.1; letter-spacing: -0.02em; color: var(--green); }

/* Панель: город, поиск, фильтры — прилипает под шапкой. */
.toolbar { position: sticky; top: 56px; z-index: 15; display: grid; gap: 10px; margin: 0 -16px; padding: 10px 16px 10px; background: rgba(246, 247, 242, 0.94); backdrop-filter: blur(14px); transition: box-shadow .2s; }
.toolbar.is-stuck { box-shadow: 0 8px 18px -12px rgba(16, 63, 54, 0.35); }
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); padding: 3px; border-radius: 14px; background: rgba(16, 63, 54, 0.07); }
.segmented button { min-height: 38px; border: 0; border-radius: 11px; color: var(--green); background: none; font: inherit; font-size: 0.9rem; font-weight: 700; cursor: pointer; }
.segmented button.is-active { color: var(--white); background: var(--green); box-shadow: 0 2px 8px rgba(16, 63, 54, 0.25); }
.search { position: relative; display: flex; align-items: center; }
.search svg { position: absolute; left: 13px; width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.search input { width: 100%; height: 44px; padding: 0 14px 0 40px; border: 1px solid var(--line); border-radius: 12px; outline: 0; color: var(--ink); background: var(--white); font: inherit; font-size: 16px; -webkit-appearance: none; appearance: none; }
.search input:focus { border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(31, 102, 86, 0.12); }

/* Горизонтальные фильтры с затуханием по краю — видно, что ряд листается. */
.chips { display: flex; gap: 6px; margin: 0 -16px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; scroll-padding-inline: 16px; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
.chips.is-scrolled { -webkit-mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 28px), transparent); }
.chips.at-end { -webkit-mask-image: none; mask-image: none; }
.chips.is-scrolled.at-end { -webkit-mask-image: linear-gradient(90deg, transparent, #000 28px); mask-image: linear-gradient(90deg, transparent, #000 28px); }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--green); background: var(--white); font: inherit; font-size: 0.82rem; font-weight: 650; white-space: nowrap; cursor: pointer; scroll-snap-align: start; }
.chip small { color: var(--muted); font-weight: 600; }
.chip.is-active { color: var(--white); border-color: var(--green-2); background: var(--green-2); }
.chip.is-active small { color: rgba(255, 255, 255, 0.75); }
select.chip { padding-right: 28px; background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='%23103f36' stroke-width='2.4'/%3E%3C/svg%3E") no-repeat right 9px center / 13px; -webkit-appearance: none; appearance: none; }
select.chip.is-active { background-color: var(--green-2); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='%23fff' stroke-width='2.4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; background-size: 13px; }

.result-count { margin: 12px 0 8px; color: var(--muted); font-size: 0.8rem; }
.empty { padding: 32px 12px; color: var(--muted); text-align: center; }
.empty button { margin-top: 10px; min-height: 38px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; color: var(--green); background: var(--white); font: inherit; font-weight: 700; }
.fineprint { margin: 18px 0 0; color: var(--muted); font-size: 0.78rem; }
.fineprint a { color: var(--green); font-weight: 700; }

/* Нижняя панель записи — всегда под большим пальцем. */
.bottom-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; display: flex; gap: 8px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(255, 255, 255, 0.96); backdrop-filter: blur(14px); }
.bottom-bar a { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; border-radius: 14px; font-weight: 750; text-decoration: none; }
.bottom-bar .primary { flex: 1; color: var(--white); background: var(--green); }
.bottom-bar .wa { flex: none; width: 56px; color: var(--white); background: #25a864; }
.bottom-bar svg { width: 22px; height: 22px; }
.bottom-bar .primary svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (min-width: 761px) { .bottom-bar { left: 50%; right: auto; width: 520px; bottom: 16px; transform: translateX(-50%); border: 1px solid var(--line); border-radius: 20px; padding-bottom: 10px; box-shadow: var(--shadow); } }

/* Нижний таббар (mobile-tabbar.js): панель записи встаёт над ним, чтобы кнопки остались видны и нажимаемы. */
@media (max-width: 760px) {
  .has-mobile-tabbar .subpage { padding-bottom: calc(var(--tabbar-h) + 87px); }
  .has-mobile-tabbar .directory-page { padding-bottom: calc(var(--tabbar-h) + 16px); }
  .has-mobile-tabbar .bottom-bar { bottom: var(--tabbar-h); padding-bottom: 10px; }
}
