/* ---------- routes catalogue: page-only pieces on the social.css tokens ---------- */
:root { --theme-paper: #2b3326; }
:root[data-theme="dark"] { --theme-paper: #1c231a; }
.cat > .wrap { width: 100%; max-width: 1520px; padding-inline: var(--edge); }
.page.cat { padding-bottom: 0; }
.sec { margin-top: 96px; }

.cat-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 40px; }
.cat-head h1 { font-size: var(--fs-h1); line-height: var(--lh-h1); letter-spacing: var(--ls-display); }
.finder { display: flex; flex: 1 1 560px; align-items: center; gap: 8px; max-width: 760px; min-height: 60px; padding: 8px 8px 8px 20px; border: 1px solid var(--field-edge); border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); }
.finder:focus-within { border-color: var(--focus); }
.finder > .icon { color: var(--quiet); }
.finder input { flex: 1; min-width: 0; height: 46px; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: var(--fs-body); }
.finder input::placeholder { color: var(--quiet); }
.finder .btn { min-height: 48px; padding: 0 24px; }
.near { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--bg-soft); color: var(--ink-2); font-size: var(--fs-button); font-weight: var(--fw-button); white-space: nowrap; transition: background-color 160ms, color 160ms; }
.near:hover { background: var(--line); color: var(--ink); }
.near .icon { width: 18px; height: 18px; }
.near[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.queries { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.queries .chip { min-height: 44px; padding: 0 16px; }
.cat-body { margin-top: 32px; }

/* «Недавно проверили»: one slim strip after the first row of results */
.rstrip { grid-column: 1 / -1; display: grid; gap: 12px; padding: 20px 20px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg-soft); }
.rstrip__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rstrip__head h3 { font-size: var(--fs-h4); font-weight: var(--fw-title); line-height: var(--lh-h4); }
.rstrip__head .more { font-size: var(--fs-small); }
.rstrip__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.rcheck { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px 16px; border-radius: var(--r); background: var(--surface); }
a.rcheck:hover b { text-decoration: underline; text-decoration-color: var(--orange); text-underline-offset: 3px; }
.rcheck__body { display: grid; gap: 4px; min-width: 0; }
.rcheck b { font-size: var(--fs-small); font-weight: var(--fw-button); line-height: var(--lh-small); }
.rcheck__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; color: var(--quiet); font-size: var(--fs-caption); }
.rcheck__pics { display: flex; gap: 4px; margin-left: auto; }
.rcheck__pics img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; }

/* filters: the common groups open, the rest folded */
.fpanel { position: sticky; top: 84px; max-height: calc(100vh - 68px - 32px); overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; padding: 0 20px 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
/* Desktop applies zoom to the document, but viewport units remain unscaled.
   Compensate so the panel fills the space below the header at any height. */
@supports (zoom: .9) {
    @media (min-width: 1024px) {
        .fpanel { max-height: calc(100dvh / .9 - 84px - 16px); }
    }
}
.fpanel__head { position: relative; z-index: 2; display: flex; align-items: center; gap: 12px; margin: 0 -20px 4px; padding: 0 20px; border-bottom: 1px solid var(--line); background: var(--surface); }
.fpanel__title { margin-right: auto; font: var(--fw-title) var(--fs-h4)/var(--lh-h4) var(--font-display); letter-spacing: var(--ls-heading); }
.fpanel__title:focus { outline: none; }
.fpanel__close, .fpanel__foot { display: none; }
.linkbtn { display: inline-flex; align-items: center; min-height: 44px; padding: 0; border: 0; background: none; color: var(--link); font-size: var(--fs-button); font-weight: var(--fw-button); }
.linkbtn:hover { text-decoration: underline; }
.linkbtn[disabled] { color: var(--quiet); text-decoration: none; cursor: default; }
.fgroup { min-width: 0; margin: 0; padding: 12px 0; border: 0; border-top: 1px solid var(--line); }
.fpanel .check-row { min-height: 32px; }
.fpanel .opt span { padding: 0 12px; }
.fpanel .opts { gap: 8px 4px; }
.kmrow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin-bottom: 8px; }
.kmrow label { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 12px; border: 1px solid var(--field-edge); border-radius: 12px; color: var(--quiet); font-size: var(--fs-small); }
.kmrow label:focus-within { border-color: var(--focus); box-shadow: 0 0 0 3px var(--orange-a-18); }
.kmrow input { width: 100%; min-width: 0; height: 46px; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: var(--fs-body); font-weight: var(--fw-button); font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.kmrow input::-webkit-outer-spin-button, .kmrow input::-webkit-inner-spin-button { margin: 0; -webkit-appearance: none; }
#routes-filter > .fgroup:first-child { border-top: 0; }
.fgroup legend { float: left; width: 100%; }
.fgroup legend + * { clear: both; }
.fgroup legend, .fgroup .fg-title { display: block; margin-bottom: 8px; padding: 0; font: var(--fw-title) var(--fs-body)/var(--lh-h4) var(--font-display); letter-spacing: var(--ls-heading); }
details.fgroup summary { display: flex; align-items: center; gap: 8px; font: var(--fw-title) var(--fs-body)/var(--lh-h4) var(--font-display); letter-spacing: var(--ls-heading); list-style: none; cursor: pointer; }
details.fgroup summary::-webkit-details-marker { display: none; }
details.fgroup summary .icon { width: 18px; height: 18px; margin-left: auto; color: var(--quiet); transition: transform 200ms; }
details.fgroup summary .count-badge { background: var(--ink); color: var(--bg); }
details.fgroup[open] summary { margin-bottom: 12px; }
details.fgroup summary { min-height: 24px; }
details.fgroup[open] summary .icon { transform: rotate(180deg); }
.check-row .icon { width: 18px; height: 18px; color: var(--quiet); }
.check-row:hover { color: var(--ink); }
.fdot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.tone-ok { color: var(--ok); }
.tone-warn { color: var(--warn); }
.tone-none { color: var(--quiet); }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { position: relative; display: inline-flex; }
.opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.opt span { display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); color: var(--ink-2); font-size: var(--fs-small); font-weight: var(--fw-button); white-space: nowrap; transition: background-color 160ms, border-color 160ms, color 160ms; }
.opt:hover span { border-color: var(--ink); color: var(--ink); }
.opt input:checked + span { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.opt input:focus-visible + span { outline: 2px solid var(--orange); outline-offset: 2px; }
.range { position: relative; height: 30px; margin: 2px 2px 4px; }
.range__track, .range__fill { position: absolute; top: 13px; height: 4px; border-radius: 999px; }
.range__track { left: 0; right: 0; background: var(--line-2); }
.range__fill { background: var(--cta); }
.range input { position: absolute; inset: 0; width: 100%; height: 30px; margin: 0; background: none; pointer-events: none; -webkit-appearance: none; appearance: none; }
.range input::-webkit-slider-runnable-track { height: 30px; background: transparent; }
.range input::-moz-range-track { height: 30px; background: transparent; }
.range input::-webkit-slider-thumb { width: 22px; height: 22px; margin-top: 4px; border: 2px solid var(--cta); border-radius: 50%; background: var(--surface); box-shadow: var(--shadow); cursor: grab; pointer-events: auto; -webkit-appearance: none; appearance: none; }
.range input::-moz-range-thumb { width: 18px; height: 18px; border: 2px solid var(--cta); border-radius: 50%; background: var(--surface); box-shadow: var(--shadow); cursor: grab; pointer-events: auto; }
.range input:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--orange); outline-offset: 2px; }
.range input:focus-visible::-moz-range-thumb { outline: 2px solid var(--orange); outline-offset: 2px; }

/* results */
.layout--filters { gap: 40px; }
@media (min-width: 1024px) { .layout--filters { grid-template-columns: 300px minmax(0, 1fr); } }
.results { min-width: 0; }
.rhead { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'found tools' 'src sort'; align-items: center; gap: 12px 20px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.rhead h2 { grid-area: found; font-size: var(--fs-h3); line-height: var(--lh-h3); }
.rsrc { grid-area: src; justify-self: start; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.rsrc::-webkit-scrollbar { display: none; }
.rsrc b { font-weight: var(--fw-heading); font-variant-numeric: tabular-nums; }
.rtools { grid-area: tools; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.rsel { grid-area: sort; display: flex; gap: 8px; justify-self: end; min-width: 0; }
.rsel .sortbox { min-width: 0; }
.rsel #route-catalog-region { max-width: 240px; text-overflow: ellipsis; }
.sortbox .select { width: auto; min-height: 38px; padding-left: 16px; border-radius: 999px; font-size: var(--fs-small); font-weight: var(--fw-button); }
.viewseg button { padding: 0 12px; }
.rsrc :is(button, a), .viewseg button { min-height: 44px; }
.viewseg .icon { width: 18px; height: 18px; }
.fopen { display: none; }
.fopen .count-badge { min-width: 20px; height: 20px; background: var(--cta); color: var(--on-accent); font-size: var(--fs-caption-tight); }
.afilters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.afilter { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 0 8px 0 12px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--bg-soft); color: var(--ink); font-size: var(--fs-small); font-weight: var(--fw-button); }
.afilter:hover { border-color: var(--ink); }
.afilter .icon { width: 16px; height: 16px; color: var(--quiet); }

/* route cards: photo, title, distance and ascent, status */
.rgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-flow: row dense; gap: 40px 24px; margin-top: 24px; }
.rgrid.is-list { grid-template-columns: minmax(0, 1fr); gap: 16px; }
.more-row { display: flex; justify-content: center; margin-top: 44px; }
.rempty { margin-top: 28px; padding: 56px 24px; }
.rempty b { color: var(--ink); font-size: var(--fs-body); font-weight: var(--fw-button); }
.rempty__chips { justify-content: center; margin-top: 4px; }
.rempty__help { min-height: 44px; color: var(--link); font-size: var(--fs-small); font-weight: var(--fw-button); }
.rempty__help:hover { text-decoration: underline; }
.rempty .icon { width: 28px; height: 28px; }
.rempty__help .icon { width: 18px; height: 18px; color: currentColor; }
.rempty__chips .icon { width: 16px; height: 16px; color: var(--quiet); }
.pager { align-items: center; margin-top: 44px; }
.pager :is(button, a, [aria-current="page"], [aria-disabled]), .pager .pager__gap { display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); color: var(--ink-2); font-size: var(--fs-button); font-weight: var(--fw-button); white-space: nowrap; }
.pager :is(button, a, [aria-current="page"], [aria-disabled]):hover { border-color: var(--ink); color: var(--ink); }
.pager :is(button, a, [aria-current="page"], [aria-disabled])[aria-current="page"] { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.pager :is(button, a, [aria-current="page"], [aria-disabled])[disabled], .pager [aria-disabled] { border-color: var(--line); color: var(--quiet); cursor: default; }
.pager .pager__gap { border-color: transparent; background: none; }
.pager .pager__next { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.pager .icon { width: 17px; height: 17px; }

/* themes */
.themes-sec h2 { margin-bottom: 28px; }
.themes { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 24px; }
.theme { position: relative; display: grid; align-content: end; min-height: 260px; padding: 20px; overflow: hidden; border: 0; border-radius: var(--r); background: var(--theme-paper); color: var(--on-accent); transition: box-shadow 200ms; text-align: left; isolation: isolate; }
.theme img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.theme::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, var(--scrim-72) 0%, var(--scrim-00) 55%); transition: opacity 200ms; }
.theme:hover { box-shadow: var(--shadow-lg); }
.theme:hover::before { opacity: 0.85; }
.theme b { font: var(--fw-title) var(--fs-h4)/var(--lh-h4) var(--font-display); letter-spacing: var(--ls-heading); }
.theme[aria-current="true"] { outline: 3px solid var(--focus); outline-offset: 3px; }
.ai-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; margin-top: 96px; padding: 28px 32px; border-radius: var(--r-lg); background: var(--orange-soft); }
.ai-cta b { font: var(--fw-title) var(--fs-h4)/var(--lh-h4) var(--font-display); letter-spacing: var(--ls-heading); }

/* toast after an action */
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 95; max-width: calc(100% - 32px); padding: 12px 20px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: var(--fs-small); font-weight: var(--fw-ui); box-shadow: var(--shadow-lg); opacity: 0; transform: translate(-50%, 12px); transition: opacity 200ms, transform 200ms var(--ease-out); pointer-events: none; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

@media (pointer: coarse) {
    .linkbtn, .afilter, .opt span, details.fgroup summary, .sortbox .select, .rcheck, .ftr a, .crumbs a, .crumbs span { min-height: 44px; }
    .linkbtn, .crumbs span { display: inline-flex; align-items: center; }
    .ftr a { align-items: center; }
    .viewseg button { min-width: 44px; justify-content: center; }
    .rsrc :is(button, a):first-child { padding-inline: 12px; }
    .ftr a { display: flex !important; justify-content: flex-start; }
    .range, .range input { height: 44px; }
    .range__track, .range__fill { top: 20px; }
    .range input::-webkit-slider-runnable-track { height: 44px; }
    .range input::-webkit-slider-thumb { width: 28px; height: 28px; margin-top: 8px; }
    .range input::-moz-range-thumb { width: 24px; height: 24px; }
}
@media (max-width: 767px) { .toast { bottom: calc(80px + env(safe-area-inset-bottom)); } }

/* calm pass: one primary (search), everything else quiet text */
.queries { gap: 4px 20px; margin-top: 8px; }
.queries .chip { min-height: 44px; padding: 0; border: 0; border-radius: 0; background: none; color: var(--copy); box-shadow: inset 0 -2px 0 transparent; }
.queries .chip:hover { color: var(--ink); }
.queries .chip[aria-pressed="true"] { background: none; color: var(--ink); box-shadow: inset 0 -2px 0 var(--orange); }
.near { background: none; color: var(--copy); }
.near[aria-pressed="true"] { background: none; color: var(--ink); box-shadow: inset 0 -2px 0 var(--orange); border-radius: 0; }
.rsrc { padding: 0; border-radius: 0; background: none; gap: 20px; }
.rsrc :is(button, a) { min-height: 44px; padding: 0; border-radius: 0; background: none; box-shadow: none; color: var(--copy); }
.rsrc :is([aria-pressed="true"], [aria-current="page"]) { background: none; box-shadow: none; color: var(--ink); border-bottom: 2px solid var(--orange); }
.viewseg { padding: 0; background: none; }
.viewseg button { color: var(--quiet); }
.viewseg [aria-pressed="true"] { background: none; box-shadow: none; color: var(--ink); }
.rtools .rmap { min-height: 44px; }
.rsel .select { border-color: var(--field-edge); }
.more-row .more { min-height: 44px; padding-inline: 16px; border: 0; background: none; font-family: var(--font-text); cursor: pointer; }
.more-row .more:focus-visible { outline: 2px solid var(--orange); outline-offset: 4px; border-radius: var(--r-sm); }
.ai-cta { padding: 24px 0 0; border-top: 1px solid var(--line); border-radius: 0; background: none; }
@media (max-width: 1180px) {
    .rgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rstrip__list { grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .rhead { grid-template-areas: 'found tools' 'src src' 'sort sort'; }
    .rsel { justify-self: start; }
    .themes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1023px) {
    .fopen { display: inline-flex; }
    .fpanel { position: fixed; inset: 0; z-index: 80; display: none; flex-direction: column; max-height: none; overflow: hidden; padding: 0; border: 0; border-radius: 0; }
    .fpanel.is-open { display: flex; }
    .fpanel__head { flex: none; margin: 0; padding: 8px 20px; }
    .fpanel #routes-filter { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0 20px 24px; }
    .fpanel__close { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line-2); border-radius: 50%; background: var(--surface); color: var(--ink); }
    .fpanel__foot { flex: none; display: flex; gap: 12px; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }
    .fpanel__foot .btn { flex: 1; }
    body.is-locked { overflow: hidden; }
}
@media (max-width: 767px) {
    .sec, .ai-cta { margin-top: 56px; }
    .cat-head { gap: 16px; }
    .finder { display: grid; flex-basis: 100%; grid-template-columns: 24px minmax(0, 1fr) minmax(0, 1fr); gap: 8px; padding: 8px; border-radius: 22px; }
    .finder > .icon { margin-left: 8px; }
    .finder input { grid-column: 2 / -1; }
    .finder .near, .finder .btn { grid-row: 2; min-width: 0; padding: 0 12px; }
    .finder .near { grid-column: 1 / span 2; }
    .finder .btn { grid-column: 3; }
    .cat-body { margin-top: 24px; }
    .rstrip { padding: 16px; }
    .rcheck__pics { display: none; }
    .queries { flex-wrap: nowrap; margin-inline: calc(var(--edge) * -1); padding-inline: var(--edge); overflow-x: auto; scrollbar-width: none; }
    .queries::-webkit-scrollbar { display: none; }
    .rhead { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'found' 'src' 'tools' 'sort'; gap: 12px; }
    .rsrc { display: flex; width: 100%; }
    .rsrc :is(button, a) { flex: 0 0 auto; justify-content: center; gap: 4px; padding: 0 8px; font-size: var(--fs-caption); }
    .rsrc { justify-content: space-between; }
    .rsel { justify-self: stretch; }
    .rsel .sortbox { flex: 1; }
    .rsel .select, .rsel #route-catalog-region { width: 100%; max-width: none; }
    .rtools { justify-content: flex-start; flex-wrap: wrap; }
    .rtools .btn { padding: 0 12px; }
    .rtools .rmap { margin-left: auto; }
    .rgrid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
    .themes { display: flex; gap: 16px; margin-inline: calc(var(--edge) * -1); padding: 4px var(--edge); overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--edge); scrollbar-width: none; }
    .themes::-webkit-scrollbar { display: none; }
    .theme { flex: 0 0 64%; min-height: 220px; scroll-snap-align: start; }
    .ai-cta { padding: 24px; }
    .ai-cta .btn { width: 100%; }
}
/* the shared home-page route card: 4:3 photo, round heart, region line, title on two lines, spec row, status pill */
.route[hidden] { display: none; }
.route__where { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.route__title { display: block; overflow: hidden; height: calc(var(--fs-h4) * var(--lh-h4) * 2); }
.route__spec .diff--easy { color: var(--ok); }
.route__spec .diff--medium { color: var(--warn); }
.route__spec .diff--hard { color: var(--link); }
.route__spec > span + span::before { content: "·"; margin-right: 12px; color: var(--quiet); font-weight: var(--fw-text); }
.route__spec { gap: 4px 12px; }
.route__people { min-height: 28px; }
.route__fav { width: 44px; height: 44px; }
.is-list .route { padding: 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.is-list .route__link { grid-template-columns: 240px minmax(0, 1fr); align-items: start; gap: 8px 24px; }
.is-list .route__media { grid-row: span 4; }
.is-list .route__title { min-height: 0; }
@media (max-width: 767px) { .is-list .route__link { grid-template-columns: 112px minmax(0, 1fr); gap: 4px 16px; } .is-list .route { padding: 12px; } }
.route__link > * { min-width: 0; }
.route__people .pill { max-width: 100%; }
.route__people .pill:not(.pill--ok):not(.pill--warn) { background: var(--bg-soft); color: var(--ink-2); }

/* Server-rendered links and asynchronous states. The visual rules above come from routes.html. */
.rmap, .fopen { align-items: center; gap: 8px; }
.rmap { display: inline-flex; white-space: nowrap; }
.route-catalog-filter > .fgroup:first-of-type { border-top: 0; }
.route-catalog-filter .route-catalog-field { width: 100%; margin-top: 8px; }
.route-catalog-filter-actions { display: none; }
.route-catalog-live-status { margin-top: 16px; }
.route-catalog-local-first { margin-top: 8px; color: var(--quiet); font-size: var(--fs-small); }
.route-catalog-intro, .route-catalog-search-interpretation { margin-top: 24px; }
.route-catalog-intro {
    padding: 24px 28px;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--surface);
    color: var(--ink-2);
}
.route-catalog-intro > .eyebrow { margin: 0 0 8px; color: var(--link); font-size: var(--fs-caption); font-weight: var(--fw-button); }
.route-catalog-intro > h2 { margin: 0 0 12px; color: var(--ink); font-size: var(--fs-h3); line-height: var(--lh-h3); }
.route-catalog-intro > p:not(.eyebrow) { max-width: 100ch; margin: 0 0 8px; line-height: 1.6; }
.route-catalog-intro > h3 { margin: 18px 0 8px; color: var(--ink); font-size: var(--fs-body); line-height: 1.4; }
.route-catalog-intro > ol { max-width: 100ch; margin: 0; padding-left: 1.4em; list-style: decimal; line-height: 1.6; }
.route-catalog-intro > ol li + li { margin-top: 4px; }
.route-catalog-intro > ol li::marker { color: var(--link); font-weight: var(--fw-button); }
@media (max-width: 767px) {
    .route-catalog-intro { padding: 20px; }
}
.route-catalog-search-interpretation { margin-bottom: 24px; }
.route-catalog-search-choices { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.route-catalog-search-choice { padding: 4px 12px; border: 1px solid var(--line-2); border-radius: 999px; font-size: var(--fs-small); }
.route-catalog-search-choice.is-active { background: var(--ink); color: var(--bg); }
.route-catalog-pagination { display: flex; justify-content: center; gap: 8px; }
.route-catalog-pagination [aria-current="page"] { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.route-catalog-filter-skeleton { display: grid; gap: 16px; padding-block: 20px; }
.route-catalog-filter-skeleton span { height: 80px; border-radius: var(--r); background: var(--bg-soft); }
.route-catalog-filter-error { display: grid; gap: 12px; padding-block: 20px; color: var(--quiet); font-size: var(--fs-small); }
.route-catalog-filter-error button { color: var(--link); }
.route-filter-badges { display: grid; gap: 16px; margin-top: 16px; }
.route-filter-badges__group { display: grid; gap: 8px; }
.route-filter-badges__group h3 { font: var(--fw-button) var(--fs-small)/var(--lh-small) var(--font-text); letter-spacing: normal; }
.route-filter-badges__items { display: flex; flex-wrap: wrap; gap: 8px; }
.route-filter-badge { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px; min-height: 34px; padding: 4px 12px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--ink-2); font-size: var(--fs-caption); font-weight: var(--fw-button); }
.route-filter-badge[aria-current="true"] { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.route-filter-badge small { font-size: inherit; opacity: .7; }
.route-city-dialog[hidden] { display: none; }
.route-city-dialog { position: fixed; inset: 0; z-index: 950; display: grid; place-items: center; padding: 20px; }
.route-city-dialog__backdrop { position: absolute; inset: 0; background: var(--scrim-45); }
.route-city-dialog__panel { position: relative; width: min(480px, 100%); max-height: calc(100dvh - 40px); overflow-y: auto; padding: 32px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-lg); }
.route-city-dialog__panel h2 { margin-block: 12px; font-size: var(--fs-h3); }
.route-city-dialog__panel p, .route-city-dialog__eyebrow { color: var(--quiet); font-size: var(--fs-small); }
.route-city-dialog__close { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border-radius: 50%; font-size: 24px; }
.route-city-dialog form { display: grid; gap: 8px; margin-top: 20px; }
.route-city-dialog input { width: 100%; min-height: 48px; padding: 0 16px; border: 1px solid var(--field-edge); border-radius: 12px; background: var(--surface); color: var(--ink); }
.route-city-dialog__save { min-height: 48px; margin-top: 8px; border-radius: 999px; background: var(--cta); color: var(--on-accent); font-weight: var(--fw-button); }
.route-city-dialog__skip { display: block; min-height: 44px; margin: 8px auto 0; color: var(--quiet); }
.route-city-dialog__error { color: var(--danger); }
@media (max-width: 1023px) {
    .fpanel { z-index: 140; }
    body:has(.fpanel.is-open) .site-main-offset { z-index: 60; }
}

/* The region and sort menus use the same rounded controls as the catalogue. */
.rsel .catalog-select { position:relative; width:100%; }
.rsel .catalog-select__trigger { width:100%; min-height:40px; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:0 16px; border:1px solid var(--field-edge); border-radius:999px; background:var(--surface); color:var(--ink); font:inherit; font-weight:var(--fw-button); text-align:left; }
.rsel .catalog-select__trigger span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rsel .catalog-select__trigger .icon { width:16px; height:16px; flex:none; color:var(--quiet); }
.rsel .catalog-select__menu { position:absolute; z-index:50; top:calc(100% + 6px); left:0; width:max(100%, 320px); max-width:min(440px, calc(100vw - 32px)); max-height:min(320px, 50vh); overflow:auto; padding:6px; border:1px solid var(--line); border-radius:16px; background:var(--surface); box-shadow:var(--shadow-lg); }
.rsel .catalog-select__menu[hidden] { display:none; }
.rsel .catalog-select__option { display:block; width:100%; min-height:40px; padding:8px 12px; border:0; border-radius:10px; background:transparent; color:var(--ink); font:inherit; text-align:left; }
.rsel .catalog-select__option:hover, .rsel .catalog-select__option:focus-visible { background:var(--bg-soft); }
.rsel .catalog-select__option[aria-selected="true"] { color:var(--cta); font-weight:var(--fw-button); }
.rsel .catalog-select__native { position:absolute; width:1px; height:1px; opacity:0; pointer-events:none; }
@media (max-width:767px) { .rsel .catalog-select__trigger { min-height:44px; } .rsel .sortbox:last-child .catalog-select__menu { left:auto; right:0; } }

/* Phone catalogue: the grid is a real image-first view; list stays compact. */
@media (max-width:767px) {
    .rsrc { justify-content:flex-start; gap:4px; }
    .rsrc :is(button,a) { padding-inline:5px; font-size:11px; }
    .rsel .catalog-select__trigger { gap:3px; padding-inline:9px; font-size:12px; }
    .rgrid:not(.is-list) .route__link { grid-template-columns:minmax(0,1fr); gap:7px; }
    .rgrid:not(.is-list) .route__media { grid-row:auto; aspect-ratio:16 / 10; margin-inline:-16px; border-radius:0; }
    .rgrid:not(.is-list) .route__title { height:auto; min-height:0; }
    .rgrid .route__fav { display:grid; place-items:center; }
    .rgrid.is-list .route__fav { left:76px; right:auto; top:16px; }
}
@media (max-width:360px) {
    .rsel { flex-direction:column; }
    .rsel .sortbox { width:100%; }
    .finder { grid-template-columns:24px minmax(0,1fr); }
    .finder .near, .finder .btn { grid-column:1 / -1; width:100%; }
    .finder .near { grid-row:2; justify-content:center; }
    .finder .btn { grid-row:3; }
    .rsrc :is(button,a) { padding-inline:4px; font-size:11px; }
}
