/* ЮГИД — главная «вся Россия» и страница города. Токены — tokens.css, карточки и общие блоки — home.css */

.yg-btn--ink { background: var(--yg-ink); color: #fff; }
.yg-btn--ink:hover { background: var(--yg-sea-dark); color: #fff; transform: translateY(-1px); }
.yg-head--row { align-items: flex-end; }

/* ---------- 1. Масштаб: карта России ---------- */
.yg-ru { padding: 16px 0 0; }
.yg-ru .container { position: relative; }
.yg-ru__inner {
    position: relative; isolation: isolate; overflow: hidden;
    display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; gap: 24px;
    padding: 48px 48px 28px; border-radius: 36px; color: #fff;
    background:
        radial-gradient(900px 500px at 85% 20%, rgba(3, 105, 161, .55), transparent 60%),
        radial-gradient(700px 420px at 10% 110%, rgba(255, 193, 35, .16), transparent 60%),
        linear-gradient(160deg, #0B2E45 0%, #082236 60%, #061a2a 100%);
}
.yg-ru__inner::before { /* звёздная пыль */
    content: ''; position: absolute; inset: 0; z-index: -1; opacity: .5;
    background-image: radial-gradient(rgba(255, 255, 255, .5) 1px, transparent 1.2px);
    background-size: 28px 28px; mask-image: radial-gradient(ellipse at 70% 40%, #000 0%, transparent 70%);
}
.yg-ru__pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
    background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); font-size: 14px; font-weight: 700; color: #E0F2FE; }
.yg-ru__pill svg { width: 16px; height: 16px; color: var(--yg-sun); }
.yg-ru h1 { margin: 20px 0 0; font: 600 clamp(32px, 3.8vw, 52px)/1.08 var(--yg-font-head); letter-spacing: -.02em; text-wrap: balance; }
.yg-ru h1 em { font-style: normal; color: var(--yg-sun); }
.yg-ru__lead { margin: 18px 0 0; max-width: 520px; font-size: 18px; line-height: 1.55; color: rgba(224, 242, 254, .86); }

.yg-ru__search { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr) auto; gap: 8px; margin-top: 28px; padding: 8px; border-radius: 22px; background: #fff; box-shadow: 0 20px 50px rgba(0, 0, 0, .3); }
.yg-ru__field { position: relative; display: flex; flex-direction: column; justify-content: center; min-width: 0; min-height: 56px; padding: 8px 12px 8px 42px; border-radius: 16px; color: var(--yg-ink); }
.yg-ru__field + .yg-ru__field { box-shadow: inset 1px 0 0 var(--yg-border); }
.yg-ru__field svg { position: absolute; left: 14px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); color: var(--yg-sea); }
.yg-ru__field label { font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--yg-muted); }
.yg-ru__field input { width: 100%; min-width: 0; border: 0; padding: 0; background: none; font: 700 16px/1.4 var(--yg-font-body); color: var(--yg-ink); }
.yg-ru__field input:focus { outline: none; }
.yg-ru__field:focus-within { box-shadow: inset 0 0 0 2px var(--yg-sea); }
.yg-ru__search .yg-btn { min-height: 56px; border-radius: 16px; }
.yg-ru__quick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; font-size: 14px; color: rgba(224, 242, 254, .7); }
.yg-ru__quick a { padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .08); color: #fff; font-weight: 700; text-decoration: none; transition: background-color .2s; }
.yg-ru__quick a:hover { background: rgba(255, 255, 255, .18); color: #fff; }

/* Карта — фон всего блока: в покое Россия справа, при приближении заполняет блок целиком (viewBox считает скрипт) */
.yg-ru__text { position: relative; z-index: 2; }
.yg-ru__map { position: absolute; inset: 0; z-index: 0; margin: 0; }
.yg-ru__view { position: absolute; inset: 0; touch-action: pan-y; }
.yg-ru__map svg { display: block; width: 100%; height: 100%; }
.yg-ru__map.is-zoomed .yg-ru__view { touch-action: none; cursor: grab; }
.yg-ru__map.is-dragging .yg-ru__view { cursor: grabbing; }
/* Затемнение под текстом: карта под ним видна, текст и поиск читаются */
.yg-ru__map::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
    background: linear-gradient(90deg, rgba(6, 26, 42, .92) 0%, rgba(6, 26, 42, .75) 34%, rgba(6, 26, 42, 0) 52%); }
.yg-ru__map.is-zoomed::after { opacity: 1; }
.yg-ru__map.is-dragging .yg-ru__dot { pointer-events: none; }
.yg-ru__regions path { fill: rgba(125, 211, 252, .07); stroke: rgba(186, 230, 253, .28); stroke-width: .6; stroke-linejoin: round; vector-effect: non-scaling-stroke; transition: fill .3s; }
.yg-ru__regions path:hover { fill: rgba(125, 211, 252, .16); }
.yg-ru__map.is-zoomed .yg-ru__regions path { stroke-width: 1; }
.yg-ru__routes path { fill: none; stroke: rgba(255, 193, 35, .45); stroke-width: 1.2; stroke-dasharray: 3 6; stroke-linecap: round; vector-effect: non-scaling-stroke; animation: yg-route 1.6s linear infinite; }
@keyframes yg-route { to { stroke-dashoffset: -18; } }
/* Самолёт на маршруте: летит по дуге (animateMotion в разметке), размер на экране постоянный (.yg-ru__s) */
.yg-ru__plane path { fill: var(--yg-sun); stroke: #082236; stroke-width: 1.4px; stroke-linejoin: round; paint-order: stroke; filter: drop-shadow(0 0 5px rgba(255, 193, 35, .55)); }
.yg-ru__planes { pointer-events: none; }
.yg-ru__dot { cursor: pointer; text-decoration: none; }
.yg-ru__dot circle { fill: #7DD3FC; transition: fill .2s; }
.yg-ru__dot.has-tours .yg-ru__pin { fill: #fff; }
.yg-ru__dot.is-season .yg-ru__pin { fill: var(--yg-sun); }
.yg-ru__dot circle.yg-ru__hit { fill: transparent; }
.yg-ru__dot text { fill: rgba(224, 242, 254, .8); font: 600 15px var(--yg-font-body); paint-order: stroke; stroke: #082236; stroke-width: 3px; pointer-events: none; }
.yg-ru__dot:not(.is-major) text { display: none; }
.yg-ru__map.is-detail .yg-ru__dot text { display: inline; }
.yg-ru__map.is-detail .yg-ru__dot:not(.is-major) text { font-size: 13px; font-weight: 500; }
/* Подпись, перекрытая более важной (раскладка в скрипте карты), — только при наведении */
.yg-ru__map .yg-ru__dot.is-crowded text { display: none; }
.yg-ru__dot:hover .yg-ru__pin, .yg-ru__dot:focus-visible .yg-ru__pin { fill: var(--yg-sun); }
.yg-ru__dot:hover .yg-ru__s, .yg-ru__dot:focus-visible .yg-ru__s { filter: drop-shadow(0 0 6px rgba(255, 193, 35, .6)); }
.yg-ru__map .yg-ru__dot:hover text, .yg-ru__map .yg-ru__dot:focus-visible text { fill: #fff; display: inline; }
.yg-ru__dot:focus-visible { outline: none; }
.yg-ru__pulse { fill: none !important; stroke: var(--yg-sun); stroke-width: 1.5; transform-box: fill-box; transform-origin: center; animation: yg-pulse 2.4s ease-out infinite; }
@keyframes yg-pulse { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(3.2); opacity: 0; } }
.yg-ru__zoom { position: absolute; z-index: 3; right: 24px; top: 24px; display: grid; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(8, 34, 54, .7);
    backdrop-filter: blur(8px); box-shadow: inset 0 0 0 1px rgba(186, 230, 253, .16); }
.yg-ru__zoom button { width: 36px; height: 36px; border: 0; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 255, 255, .08); color: #fff;
    font: 700 20px/1 var(--yg-font-body); cursor: pointer; transition: background-color .2s, color .2s; }
.yg-ru__zoom button:hover:not(:disabled) { background: var(--yg-sun); color: var(--yg-ink); }
.yg-ru__zoom button:disabled { opacity: .35; cursor: default; }
.yg-ru__zoom button[hidden] { display: none; }
.yg-ru__zoom button:focus-visible { outline: 3px solid var(--yg-sun); outline-offset: 1px; }
.yg-ru__zoom svg { width: 18px; height: 18px; }
.yg-ru__hint { position: absolute; z-index: 2; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0; padding: 10px 16px; border-radius: 12px;
    background: rgba(6, 26, 42, .88); color: #fff; font-size: 14px; font-weight: 700; pointer-events: none; white-space: nowrap; }
.yg-ru__tip { position: absolute; z-index: 3; width: 220px; transform: translate(-50%, calc(-100% - 14px)); padding: 8px; border-radius: 16px; background: #fff; color: var(--yg-ink);
    box-shadow: 0 20px 40px rgba(0, 0, 0, .3); pointer-events: none; display: grid; gap: 2px; }
.yg-ru__tip img { width: 100%; height: 110px; object-fit: cover; border-radius: 10px; margin-bottom: 6px; }
.yg-ru__tip b { font-size: 15px; padding: 0 4px; }
.yg-ru__tip span { font-size: 13px; line-height: 1.35; color: var(--yg-ink-soft); padding: 0 4px; }
.yg-ru__tip small { font-size: 12px; font-weight: 800; color: var(--yg-sea); padding: 2px 4px 2px; }
.yg-ru__legend { position: absolute; z-index: 2; right: 84px; top: 30px; display: flex; gap: 18px; justify-content: flex-end; pointer-events: none; font-size: 13px; color: rgba(224, 242, 254, .78);
    padding: 6px 14px; border-radius: 999px; background: rgba(8, 34, 54, .6); backdrop-filter: blur(6px); }
.yg-ru__legend span { display: inline-flex; align-items: center; gap: 6px; }
.yg-ru__legend i { width: 9px; height: 9px; border-radius: 50%; background: #fff; }
.yg-ru__legend i.is-season { background: var(--yg-sun); box-shadow: 0 0 0 3px rgba(255, 193, 35, .25); }

/* Масштаб в цифрах — матовое стекло внизу тёмного блока, карта просвечивает */
.yg-ru__stats { position: relative; z-index: 2; grid-column: 1 / -1; align-self: end; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 24px 0 0; padding: 6px; list-style: none; border-radius: 24px;
    background: linear-gradient(135deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .04));
    backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12), 0 20px 40px rgba(0, 0, 0, .25); }
.yg-ru__stats li { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 18px; transition: background-color .25s; }
.yg-ru__stats li + li { box-shadow: -1px 0 0 rgba(255, 255, 255, .1); }
.yg-ru__stats li:hover { background: rgba(255, 255, 255, .06); }
.yg-ru__stat-icon { width: 48px; height: 48px; flex: none; border-radius: 15px; display: grid; place-items: center;
    background: linear-gradient(135deg, rgba(255, 193, 35, .22), rgba(255, 193, 35, .06)); box-shadow: inset 0 0 0 1px rgba(255, 193, 35, .35); color: var(--yg-sun); }
.yg-ru__stat-icon svg { width: 22px; height: 22px; }
.yg-ru__stat-text { display: grid; min-width: 0; }
.yg-ru__stat-text b { font: 600 clamp(24px, 2.2vw, 30px)/1.05 var(--yg-font-head); color: #fff; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.yg-ru__stat-text span { margin-top: 2px; font-size: 14px; font-weight: 700; color: #E0F2FE; }
.yg-ru__stat-text small { font-size: 12px; color: rgba(224, 242, 254, .6); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 2. Сезон: бенто из направлений ---------- */
.yg-bento { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 250px; gap: 16px; }
.yg-bento + .yg-more-dest, .yg-more-dest { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 20px; font-size: 15px; color: var(--yg-muted); }
.yg-more-dest[hidden] { display: none; }
.yg-more-dest a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; background: var(--yg-sky-soft);
    color: var(--yg-ink); font-weight: 700; text-decoration: none; }
.yg-more-dest a:hover { background: var(--yg-sky); color: var(--yg-sea); }
.yg-dest { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 18px;
    border-radius: 24px; color: #fff; text-decoration: none; background: var(--yg-ink); }
.yg-dest--lg { grid-column: span 2; grid-row: span 2; padding: 28px; }
.yg-dest img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--yg-ease); }
.yg-dest::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(6, 26, 42, .25) 0%, rgba(6, 26, 42, 0) 35%, rgba(6, 26, 42, .82) 100%); }
.yg-dest:hover { color: #fff; }
.yg-dest:hover img { transform: scale(1.06); }
.yg-dest:focus-visible { outline: 3px solid var(--yg-sun-dark); outline-offset: 3px; }
.yg-dest__chip { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 5px 11px; border-radius: 999px;
    background: rgba(255, 255, 255, .18); backdrop-filter: blur(8px); font-size: 12px; font-weight: 700; }
.yg-dest__body { display: grid; gap: 6px; }
.yg-dest__name { font: 600 22px/1.15 var(--yg-font-head); letter-spacing: -.01em; }
.yg-dest--lg .yg-dest__name { font-size: clamp(30px, 3vw, 42px); }
.yg-dest__tag { font-size: 14px; line-height: 1.4; color: rgba(255, 255, 255, .85); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.yg-dest--lg .yg-dest__tag { font-size: 17px; max-width: 460px; }
.yg-dest__meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; font-size: 13px; font-weight: 800; color: var(--yg-sun); }
.yg-dest__go { width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .16); color: #fff; transition: background-color .2s, transform .2s; }
.yg-dest__go svg { width: 18px; height: 18px; }
.yg-dest:hover .yg-dest__go { background: var(--yg-sun); color: var(--yg-ink); transform: translateX(2px); }
.yg-dest__credit { position: absolute; right: 12px; top: 12px; max-width: 45%; font-size: 10px; line-height: 1.2; text-align: right; color: rgba(255, 255, 255, .6);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: 0; transition: opacity .2s; }
.yg-dest:hover .yg-dest__credit, .yg-dest:focus-visible .yg-dest__credit { opacity: 1; }
@media (hover: none) { .yg-dest__credit { opacity: .8; } }

/* ---------- 3. Популярное: вкладки городов ---------- */
.yg-citytabs { display: flex; gap: 8px; overflow-x: auto; margin: -4px 0 28px; padding: 4px 2px 8px; scrollbar-width: none; }
.yg-citytabs::-webkit-scrollbar { display: none; }
.yg-citytab { flex: none; display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 14px 6px 6px; border: 0; border-radius: 999px; cursor: pointer;
    background: #fff; box-shadow: inset 0 0 0 1px var(--yg-border); font: 700 15px/1 var(--yg-font-body); color: var(--yg-ink); transition: background-color .2s, box-shadow .2s, color .2s; }
.yg-citytab img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.yg-citytab small { min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; display: grid; place-items: center; background: var(--yg-sky); color: var(--yg-sea-dark); font-size: 12px; font-weight: 800; }
.yg-citytab:hover { box-shadow: inset 0 0 0 1px var(--yg-sea); }
.yg-citytab[aria-selected="true"] { background: var(--yg-ink); color: #fff; box-shadow: none; }
.yg-citytab[aria-selected="true"] small { background: var(--yg-sun); color: var(--yg-ink); }
.yg-citytab:focus-visible, .yg-tab:focus-visible { outline: 3px solid var(--yg-sun-dark); outline-offset: 2px; }

/* ---------- 4. Темы ---------- */
.yg-themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.yg-theme { display: grid; grid-template-columns: 52px 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: center; padding: 16px; border-radius: 20px;
    background: var(--yg-sky-soft); color: var(--yg-ink); text-decoration: none; transition: background-color .2s, transform .2s var(--yg-ease), box-shadow .2s; }
.yg-theme:hover { background: #fff; color: var(--yg-ink); transform: translateY(-2px); box-shadow: var(--yg-shadow); }
.yg-theme__icon { grid-row: span 2; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: #fff; box-shadow: var(--yg-shadow); }
.yg-theme__title { font-size: 15px; font-weight: 800; line-height: 1.25; }
.yg-theme__count { font-size: 13px; color: var(--yg-muted); font-weight: 600; }

/* ---------- 5. Все направления ---------- */
.yg-find { position: relative; display: block; width: min(360px, 100%); margin: 0; }
.yg-find svg { position: absolute; left: 16px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); color: var(--yg-muted); }
.yg-find input { width: 100%; min-height: 52px; padding: 0 16px 0 46px; border: 0; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px var(--yg-border);
    font: 600 16px var(--yg-font-body); color: var(--yg-ink); }
.yg-find input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--yg-sea); }
.yg-districts__none { margin: 8px 0 0; font-size: 16px; color: var(--yg-ink-soft); }

/* ---------- 6. Как это работает, организаторам ---------- */
.yg-how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; counter-reset: how; }
.yg-how li { position: relative; padding: 28px 24px 24px; border-radius: 24px; background: var(--yg-sky-soft); }
.yg-how span { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 16px; background: var(--yg-ink); color: var(--yg-sun); font: 600 18px var(--yg-font-head); }
.yg-how b { display: block; font-size: 18px; margin-bottom: 6px; }
.yg-how p { margin: 0; color: var(--yg-ink-soft); line-height: 1.55; }
.yg-org { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-top: 28px; padding: 28px 32px; border-radius: 28px; color: #fff;
    background: radial-gradient(600px 240px at 90% 0%, rgba(255, 193, 35, .25), transparent 60%), linear-gradient(135deg, var(--yg-ink), #0A4A6E); }
.yg-org b { display: block; font: 600 22px/1.2 var(--yg-font-head); margin-bottom: 6px; }
.yg-org p { margin: 0; max-width: 640px; color: rgba(224, 242, 254, .85); }

/* ---------- Страница города ---------- */
.yg-cityhero { padding: 16px 0 0; }
.yg-cityhero__inner { position: relative; isolation: isolate; overflow: hidden; min-height: 460px; display: flex; flex-direction: column; justify-content: flex-end;
    padding: 48px 48px 40px; border-radius: 36px; color: #fff; background: var(--yg-ink); }
.yg-cityhero__inner > img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.yg-cityhero__inner::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(6, 26, 42, .82) 0%, rgba(6, 26, 42, .35) 60%, rgba(6, 26, 42, .1) 100%), linear-gradient(0deg, rgba(6, 26, 42, .6), transparent 50%); }
.yg-crumbs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; padding: 0; list-style: none; font-size: 14px; color: rgba(255, 255, 255, .75); }
.yg-crumbs li + li::before { content: '/'; margin-right: 6px; opacity: .6; }
.yg-crumbs a { color: #fff; text-decoration: none; }
.yg-crumbs a:hover { text-decoration: underline; }
.yg-cityhero h1 { margin: 0; font: 600 clamp(34px, 5vw, 64px)/1.05 var(--yg-font-head); letter-spacing: -.02em; }
.yg-cityhero h1 em { font-style: normal; color: var(--yg-sun); }
.yg-cityhero__tag { margin: 14px 0 0; max-width: 560px; font-size: 19px; line-height: 1.5; color: rgba(255, 255, 255, .9); }
.yg-cityhero__facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.yg-cityhero__facts span { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, .14); backdrop-filter: blur(8px); font-size: 14px; font-weight: 700; }
.yg-cityhero__facts svg { width: 16px; height: 16px; color: var(--yg-sun); }
.yg-cityhero__credit { position: absolute; right: 18px; bottom: 12px; font-size: 11px; color: rgba(255, 255, 255, .6); }
.yg-cityhero__credit a { color: inherit; }
.yg-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.yg-chip-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px var(--yg-border);
    color: var(--yg-ink); font-weight: 700; font-size: 15px; text-decoration: none; }
.yg-chip-link small { color: var(--yg-muted); font-weight: 700; }
.yg-chip-link:hover { color: var(--yg-sea); box-shadow: inset 0 0 0 1px var(--yg-sea); }
.yg-soon { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 24px; padding: 32px; border-radius: 28px; background: #fff; box-shadow: var(--yg-shadow); }
.yg-soon b { display: block; font: 600 22px/1.2 var(--yg-font-head); margin-bottom: 8px; }
.yg-soon p { margin: 0; color: var(--yg-ink-soft); max-width: 640px; }
.yg-soon__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.yg-near { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.yg-near .yg-dest { min-height: 220px; }

/* ---------- Адаптив ---------- */
@media (max-width: 1199.98px) {
    .yg-ru__inner { grid-template-columns: 1fr; padding: 56px 40px 40px; }
    /* Одна колонка: карта — во всю ширину блока под текстом, масштабируется в своей полосе */
    .yg-ru__inner { min-height: 0; }
    .yg-ru__map { position: relative; inset: auto; margin: 8px -40px 0; aspect-ratio: 1000 / 530; }   /* по пропорции самой карты — без пустых полос сверху и снизу */
    .yg-ru__map::after { display: none; }
    .yg-ru__legend { right: 40px; top: auto; bottom: 8px; }
    .yg-ru__zoom { right: 40px; top: 8px; }
    .yg-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 230px; }
    .yg-dest--lg { grid-row: span 1; }
}
@media (max-width: 1199.98px) {
    /* Цифры — 2×2: в четыре колонки на планшете и небольшом ноутбуке подписи обрезались */
    .yg-ru__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 16px; }
    .yg-ru__stats li:nth-child(3) { box-shadow: none; }
    .yg-ru__stats li:nth-child(n+3) { box-shadow: 0 -1px 0 rgba(255, 255, 255, .1); }
    .yg-ru__stats li:nth-child(4) { box-shadow: 0 -1px 0 rgba(255, 255, 255, .1), -1px 0 0 rgba(255, 255, 255, .1); }
    .yg-ru__stat-text small { white-space: normal; }
}
@media (max-width: 991.98px) {
    .yg-how { grid-template-columns: 1fr; }
    .yg-near { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .yg-soon { grid-template-columns: 1fr; }
}
@media (max-width: 767.98px) {
    .yg-ru { padding-top: 8px; }
    .yg-ru__pill { max-width: 100%; padding: 7px 12px; font-size: 12.5px; white-space: nowrap; }
    .yg-ru__quick a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; }   /* цель касания */
    .yg-ru h1 { font-size: clamp(30px, 8.6vw, 40px); }
    .yg-ru__inner { padding: 36px 20px 56px; border-radius: 28px; gap: 8px; }
    .yg-ru__lead { font-size: 15.5px; }
    .yg-ru__search { grid-template-columns: 1fr; margin-top: 22px; }
    .yg-ru__field + .yg-ru__field { box-shadow: inset 0 1px 0 var(--yg-border); }
    .yg-ru__zoom button { width: 40px; height: 40px; }
    .yg-ru__map { margin: 8px -20px 0; aspect-ratio: 1000 / 660; }
    .yg-ru__map:not(.is-zoomed) .yg-ru__dot.is-edge text { display: none; }   /* на краях узкой карты не помещаются */
    .yg-ru__legend { right: auto; top: auto; left: 20px; bottom: 0; justify-content: flex-start; }
    .yg-ru__zoom { right: 20px; }
    .yg-ru__stats { padding: 4px; border-radius: 20px; }
    .yg-ru__stats li { align-items: flex-start; gap: 10px; padding: 12px; }
    .yg-ru__stat-icon { width: 34px; height: 34px; border-radius: 11px; }
    .yg-ru__stat-icon svg { width: 17px; height: 17px; }
    .yg-ru__stat-text b { font-size: 22px; }
    .yg-ru__stat-text span { font-size: 13px; line-height: 1.3; }
    .yg-ru__stat-text small { display: none; }   /* на телефоне — число и что это, без пояснений */
    /* Узкая карта: подписи только у опорных городов — остальные наезжали друг на друга и обрезались у краёв */
    .yg-ru__map:not(.is-zoomed) .yg-ru__dot.is-major text { display: none; }
    .yg-ru__map:not(.is-zoomed) .yg-ru__dot:is([data-name="Москва"], [data-name="Сочи"], [data-name="Казань"], [data-name="Мурманск"], [data-name="Новосибирск"], [data-name="Якутск"]) text { display: inline; }
    .yg-ru__dot:hover text { display: inline; }
    .yg-bento { grid-template-columns: 1fr 1fr; grid-auto-rows: 200px; gap: 10px; }
    .yg-dest { padding: 14px; border-radius: 20px; }
    .yg-dest--lg { padding: 20px; }
    .yg-dest__name { font-size: 17px; }
    .yg-dest__tag { display: none; }
    .yg-dest--lg .yg-dest__tag { display: -webkit-box; font-size: 15px; }
    .yg-dest__chip { display: none; }
    .yg-dest__go { display: none; }
    .yg-themes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .yg-theme { grid-template-columns: 40px minmax(0, 1fr); column-gap: 10px; padding: 12px; min-width: 0; }
    .yg-theme__icon { width: 40px; height: 40px; border-radius: 12px; }
    .yg-theme__icon img { width: 24px; height: 24px; }
    .yg-theme__title { font-size: 14px; }
    .yg-theme__count { font-size: 12px; }
    /* Популярное — горизонтальная лента карточек со снапом */
    .yg-pop .yg-grid { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -12px; padding: 4px 12px 16px; scrollbar-width: none; }
    .yg-pop .yg-grid::-webkit-scrollbar { display: none; }
    .yg-pop .yg-tour { flex: 0 0 82%; scroll-snap-align: start; }
    .yg-pop .yg-more { margin-top: 16px; }
    .yg-org { padding: 24px 20px; }
    .yg-org .yg-btn { width: 100%; }
    .yg-cityhero__inner { min-height: 420px; padding: 28px 20px 28px; border-radius: 28px; }
    .yg-cityhero__tag { font-size: 16px; }
    .yg-near { grid-template-columns: 1fr 1fr; gap: 10px; }
    .yg-soon { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) {
    .yg-ru__pulse { animation: none; opacity: 0; }
    .yg-ru__routes path { animation: none; }
    .yg-ru__planes { display: none; }
    .yg-dest img, .yg-dest__go { transition: none; }
}

/* ---------- «Все направления»: указатель по округам ---------- */
.yg-atlas { border-radius: 32px; background: #fff; box-shadow: var(--yg-shadow); overflow: hidden; }
.yg-atlas__bar { position: relative; display: grid; gap: 14px; padding: 22px 28px 18px; border-bottom: 1px solid var(--yg-border);
    background: linear-gradient(180deg, var(--yg-sky-soft), #fff); }
.yg-atlas__tabs { display: flex; gap: 6px; margin: 0 -28px; padding: 2px 28px; overflow-x: auto; scrollbar-width: none; scroll-padding: 0 28px; }
.yg-atlas__tabs::-webkit-scrollbar { display: none; }
.yg-atlas__tabs button { flex: none; }
.yg-atlas__tabs { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); }
.yg-atlas__tabs button { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 8px 0 14px; border: 0; border-radius: 999px; cursor: pointer;
    background: #fff; color: var(--yg-ink); font: 700 14px var(--yg-font-body); box-shadow: inset 0 0 0 1px var(--yg-border); transition: box-shadow .2s, background-color .2s, color .2s; }
.yg-atlas__tabs button:hover { box-shadow: inset 0 0 0 1px var(--yg-sea); }
.yg-atlas__tabs small { min-width: 24px; padding: 2px 7px; border-radius: 999px; background: var(--yg-sky); color: var(--yg-sea-dark); font-size: 12px; font-weight: 800; text-align: center; }
.yg-atlas__tabs [aria-selected="true"] { background: var(--yg-ink); color: #fff; box-shadow: none; }
.yg-atlas__tabs [aria-selected="true"] small { background: var(--yg-sun); color: var(--yg-ink); }
.yg-atlas__tabs button:focus-visible { outline: 3px solid var(--yg-sun-dark); outline-offset: 2px; }
.yg-atlas__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; }
.yg-atlas .yg-find { flex: 0 1 320px; margin: 0; }
.yg-atlas__switch { display: inline-flex; align-items: center; gap: 10px; margin: 0; font-size: 14px; font-weight: 700; color: var(--yg-ink-soft); cursor: pointer; user-select: none; }
.yg-atlas__switch input { position: absolute; opacity: 0; pointer-events: none; }
.yg-atlas__switch > span { position: relative; width: 40px; height: 24px; border-radius: 999px; background: #CBD8E3; transition: background-color .2s; }
.yg-atlas__switch > span::after { content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(11, 46, 69, .25); transition: transform .2s var(--yg-ease); }
.yg-atlas__switch input:checked + span { background: var(--yg-sea); }
.yg-atlas__switch input:checked + span::after { transform: translateX(16px); }
.yg-atlas__switch input:focus-visible + span { outline: 3px solid var(--yg-sun-dark); outline-offset: 2px; }
.yg-atlas__legend { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; font-size: 13px; font-weight: 700; color: var(--yg-muted); }
.yg-atlas__sun { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #FFF4CC; color: #B45309; font-style: normal; }
.yg-atlas__sun svg { width: 13px; height: 13px; }

.yg-atlas__group { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; padding: 24px 28px; }
.yg-atlas__group + .yg-atlas__group { border-top: 1px solid var(--yg-border); }
.yg-atlas__group[hidden] { display: none; }
.yg-atlas__head { align-self: start; position: sticky; top: 96px; }
.yg-atlas__head h3 { margin: 0; font: 600 19px/1.25 var(--yg-font-head); letter-spacing: -.01em; color: var(--yg-ink); }
.yg-atlas__head p { margin: 6px 0 8px; font-size: 14px; line-height: 1.45; color: var(--yg-ink-soft); }
.yg-atlas__head small { font-size: 12px; font-weight: 700; color: var(--yg-muted); }

.yg-atlas__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 10px; margin: 0; padding: 0; list-style: none; }
.yg-atlas__list li[hidden] { display: none; }
.yg-atlas__city { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 64px; padding: 8px 10px 8px 8px; border-radius: 16px;
    color: var(--yg-ink); text-decoration: none; transition: background-color .15s, box-shadow .15s; }
.yg-atlas__city:hover { background: var(--yg-sky-soft); box-shadow: inset 0 0 0 1px var(--yg-sky); color: var(--yg-ink); }
.yg-atlas__city:focus-visible { outline: 3px solid var(--yg-sun-dark); outline-offset: 1px; }
.yg-atlas__pic { width: 48px; height: 48px; border-radius: 14px; overflow: hidden; background: var(--yg-sky); }
.yg-atlas__pic img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--yg-ease); }
.yg-atlas__city:hover .yg-atlas__pic img { transform: scale(1.08); }
.yg-atlas__city.is-soon .yg-atlas__pic img { filter: saturate(.55); }
.yg-atlas__text { display: grid; min-width: 0; }
.yg-atlas__text b { font-size: 15px; font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; }
.yg-atlas__text small { font-size: 12px; color: var(--yg-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yg-atlas__side { display: inline-flex; align-items: center; gap: 6px; }
.yg-atlas__side em { min-width: 26px; padding: 3px 8px; border-radius: 999px; background: var(--yg-sky); color: var(--yg-sea-dark); font-size: 12px; font-weight: 800; font-style: normal; text-align: center; }
.yg-atlas__side em.is-soon { background: none; color: #93A5B4; font-weight: 700; padding: 3px 0; }
.yg-atlas .yg-districts__none { margin: 0; padding: 28px; }

@media (max-width: 991.98px) {
    .yg-atlas__group { grid-template-columns: 1fr; gap: 12px; }
    .yg-atlas__head { position: static; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
    .yg-atlas__head p { margin: 0; }
    .yg-atlas__legend { margin-left: 0; }
}
@media (max-width: 767.98px) {
    .yg-atlas { border-radius: 24px; }
    .yg-atlas__bar { padding: 16px 16px 14px; }
    .yg-atlas__tabs { margin: 0 -16px; padding: 2px 16px; }
    .yg-atlas .yg-find { flex-basis: 100%; }
    .yg-atlas__group { padding: 18px 12px 14px; }
    .yg-atlas__head { padding: 0 6px; }
    .yg-atlas__head p { flex-basis: 100%; order: 3; }
    .yg-atlas__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 4px; }
    .yg-atlas__city { grid-template-columns: 36px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 10px; row-gap: 2px; min-height: 56px; padding: 8px 6px; }
    .yg-atlas__pic { grid-row: 1 / 3; width: 36px; height: 36px; border-radius: 10px; }
    .yg-atlas__text b { font-size: 14px; }
    .yg-atlas__text small { display: none; }
    .yg-atlas__side { grid-column: 2; justify-self: start; }
    .yg-atlas__side em { padding: 1px 7px; font-size: 11px; }
    .yg-atlas__sun { width: 18px; height: 18px; }
    .yg-atlas__sun svg { width: 11px; height: 11px; }
    .yg-atlas__switch, .yg-atlas__legend { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { .yg-atlas__pic img, .yg-atlas__switch > span::after { transition: none; } }
