/* GameM · Roco Kingdom — интерактивная карта
   Карта на весь экран, интерфейс — плавающие «стеклянные» панели поверх неё. */
:root {
  --bg: #0f1626;
  --glass: rgba(17, 23, 40, .80); --glass-strong: rgba(15, 20, 35, .92);
  --tile: rgba(255, 255, 255, .045); --tile-hover: rgba(255, 255, 255, .08);
  --stroke: rgba(255, 255, 255, .09); --stroke-2: rgba(255, 255, 255, .16);
  --text: #eef1f8; --muted: #98a2bd; --faint: #6b7592;
  --gold: #ffcb57; --ok: #3ddc84; --ok-2: #22b866; --danger: #ff6b6b;
  --r-xl: 22px; --r-lg: 16px; --r-md: 12px; --r-sm: 9px;
  --gap: 12px; --side-w: 356px; --panel-w: 392px;
  --shadow: 0 18px 50px rgba(0, 0, 0, .45), 0 2px 8px rgba(0, 0, 0, .25);
  --anchor-h: 0px;            /* высота закреплённой рекламы AdSense внизу (мобильный); выставляет js/ads.js */
  --font: "Onest", "Inter", "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Hiragino Sans", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 14px/1.45 var(--font); -webkit-font-smoothing: antialiased; overflow: hidden; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }
.only-mobile { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

#map { position: fixed; inset: 0; background: var(--bg); }
.leaflet-container { font-family: var(--font); background: var(--bg); }

.glass { background: var(--glass); border: 1px solid var(--stroke); box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4); }
.icon-btn { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; border: 1px solid transparent; background: var(--tile); color: var(--text); }
.icon-btn:hover { background: var(--tile-hover); border-color: var(--stroke); }

/* ---------- панель слева ---------- */
.side { position: fixed; z-index: 800; top: var(--gap); left: var(--gap); bottom: var(--gap); width: var(--side-w);
  border-radius: var(--r-xl); display: flex; flex-direction: column; overflow: hidden; transition: transform .3s cubic-bezier(.2, .8, .2, 1), opacity .3s; }
body.side-collapsed .side { transform: translateX(calc(-100% - var(--gap) * 2)); opacity: 0; pointer-events: none; }
.side-head { display: flex; align-items: center; gap: 12px; padding: 16px 14px 12px 18px; }
.brand { display: flex; align-items: baseline; text-decoration: none; color: var(--text); font-weight: 800; font-size: 19px; letter-spacing: .02em; flex: none; }
.brand i, .mobile-brand i { font-style: italic; font-family: Georgia, serif; color: #ff5468; font-size: 1.22em; margin-left: 1px; }
.side-title { flex: 1; min-width: 0; padding-left: 12px; border-left: 1px solid var(--stroke); line-height: 1.15; }
.side-title h1 { margin: 0; display: flex; flex-direction: column; min-width: 0; }
.side-title .h1-game { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-title .h1-sub { font-size: 12px; font-weight: 500; color: var(--muted); }
.side-scroll { flex: 1; overflow-y: auto; padding: 0 14px 14px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .15) transparent; }



/* блок прогресса */
.progress-card { position: relative; padding: 14px 14px 12px; border-radius: var(--r-lg); margin-bottom: 14px; overflow: hidden;
  background: radial-gradient(120% 140% at 100% 0%, rgba(255, 203, 87, .16), transparent 55%),
              radial-gradient(120% 140% at 0% 100%, rgba(61, 220, 132, .12), transparent 55%), rgba(255, 255, 255, .04);
  border: 1px solid var(--stroke); }
.progress-top { display: flex; justify-content: space-between; align-items: center; }
.pc-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pc-pct { font-size: 12px; font-weight: 700; color: var(--gold); background: rgba(255, 203, 87, .12); padding: 2px 8px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.pc-num { display: flex; align-items: baseline; gap: 8px; margin: 4px 0 8px; }
.pc-num b { font-size: 26px; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.pc-num span { color: var(--muted); font-size: 13px; }
.bar { height: 8px; background: rgba(0, 0, 0, .35); border-radius: 999px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--gold), var(--ok)); box-shadow: 0 0 12px rgba(61, 220, 132, .45); transition: width .4s; }
.side-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
.side-tools > button { border: 1px solid var(--stroke); background: var(--tile); color: var(--text); padding: 5px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; }
.side-tools > button:hover { background: var(--tile-hover); }
.switch { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; font-size: 12.5px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch span { width: 32px; height: 18px; background: rgba(255, 255, 255, .14); border-radius: 999px; position: relative; transition: background .2s; flex: none; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; background: #fff; border-radius: 50%; transition: transform .2s; }
.switch input:checked + span { background: var(--ok-2); }
.switch input:checked + span::after { transform: translateX(14px); }
.switch input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.switch b { font-weight: 600; color: var(--muted); }

/* фильтр групп */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chips::-webkit-scrollbar { display: none; }
.chips button { flex: none; border: 1px solid var(--stroke); background: transparent; color: var(--muted); border-radius: 999px; padding: 6px 12px; font-size: 12.5px; font-weight: 600; }
.chips button:hover { color: var(--text); }
.chips button.active { background: var(--text); color: #111827; border-color: var(--text); }

/* плитки категорий */
.cat-group h3 { display: flex; justify-content: space-between; align-items: center; margin: 14px 2px 8px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cat-group:first-child h3 { margin-top: 4px; }
.cat-group h3 span { display: flex; gap: 2px; }
.cat-group h3 button { border: 0; background: none; color: var(--faint); font-size: 11px; font-weight: 600; letter-spacing: 0; text-transform: none; padding: 2px 6px; border-radius: 6px; }
.cat-group h3 button:hover { color: var(--text); background: var(--tile); }
.cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cat { position: relative; display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 10px 10px 9px; border-radius: var(--r-md);
  border: 1px solid var(--stroke); background: var(--tile); color: var(--text); min-height: 92px; transition: background .15s, border-color .15s, transform .1s; }
.cat:hover { background: var(--tile-hover); }
.cat:active { transform: scale(.98); }
.cat .c-top { display: flex; align-items: flex-start; justify-content: space-between; }
.cat img { width: 34px; height: 34px; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .4)); transition: filter .2s, opacity .2s; }
.cat .c-count { font-size: 11.5px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; background: rgba(0, 0, 0, .25); padding: 1px 7px; border-radius: 999px; }
.cat .c-name { font-size: 12.5px; font-weight: 600; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cat .c-bar { height: 3px; border-radius: 999px; background: rgba(0, 0, 0, .3); overflow: hidden; margin-top: auto; }
.cat .c-bar i { display: block; height: 100%; background: var(--c); border-radius: inherit; }
.cat:not(.off) { border-color: color-mix(in srgb, var(--c) 55%, transparent);
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 22%, transparent), color-mix(in srgb, var(--c) 6%, transparent)); }
.cat:not(.off)::after { content: ""; position: absolute; top: 9px; right: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); display: none; }
.cat.off img { filter: grayscale(1) brightness(.8); opacity: .45; }
.cat.off .c-name { color: var(--muted); }
.cat.complete .c-count { color: #0b2e1a; background: var(--ok); }

.side-foot { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--stroke); font-size: 12.5px; }
.side-foot nav { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.side-foot a, .side-foot button { color: var(--text); font-weight: 600; text-decoration: none; background: none; border: 0; padding: 0; opacity: .85; }
.side-foot a:hover, .side-foot button:hover { opacity: 1; text-decoration: underline; }
.side-foot .legal { color: var(--faint); font-size: 11px; line-height: 1.4; margin: 10px 0 0; }

.expand-btn { position: fixed; z-index: 800; top: var(--gap); left: var(--gap); display: flex; align-items: center; gap: 8px;
  border-radius: 999px; padding: 8px 14px 8px 10px; color: var(--text); font-weight: 600; }
.expand-btn b { font-variant-numeric: tabular-nums; color: var(--gold); font-weight: 700; }

/* ---------- справа сверху ---------- */
.top-right { position: fixed; z-index: 800; top: var(--gap); right: var(--gap); display: flex; gap: 8px; transition: right .3s cubic-bezier(.2, .8, .2, 1); }
.top-right .icon-btn { width: 40px; height: 40px; }
.lang-pill { display: flex; align-items: center; border-radius: 999px; padding: 0 4px; height: 40px; }
.lang-pill select { background: transparent; border: 0; font-weight: 700; padding: 0 8px; height: 100%; outline: none; cursor: pointer; }
.lang-pill option { background: #1b2238; }

/* ---------- рекламные места ---------- */
/* Размер зарезервирован заранее, чтобы страница не «прыгала» при загрузке объявления (CLS).
   Пока AdSense не настроен — видна пунктирная заглушка. */
.ad-slot { margin: 16px auto 0; width: 300px; max-width: 100%; min-height: 250px; display: grid; place-items: center; }
.ad-slot.placeholder { border: 1px dashed var(--stroke-2); border-radius: var(--r-md); color: var(--faint); font-size: 11.5px; text-align: center; padding: 10px;
  background: repeating-linear-gradient(45deg, transparent 0 10px, rgba(255, 255, 255, .02) 10px 20px); }

/* телефон: полоса закреплённой рекламы внизу экрана */
.mobile-anchor { position: fixed; z-index: 1300; left: 0; right: 0; bottom: 0; display: grid; place-items: center;
  padding: 4px 0 calc(4px + env(safe-area-inset-bottom)); background: rgba(10, 14, 26, .96); border-top: 1px solid var(--stroke); }
.mobile-anchor .ad-slot { margin: 0; width: 320px; min-height: 50px; }
.mobile-anchor .ad-slot.placeholder { font-size: 10.5px; padding: 4px; }

/* ---------- карточка метки ---------- */
.panel { position: fixed; z-index: 850; top: calc(var(--gap) + 52px); right: var(--gap); max-height: calc(100% - var(--gap) * 2 - 52px); width: var(--panel-w);
  border-radius: var(--r-xl); overflow-y: auto; transform: translateX(calc(100% + var(--gap) * 2)); transition: transform .3s cubic-bezier(.2, .8, .2, 1);
  scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .15) transparent; }
.panel.open { transform: none; }
.p-head { position: sticky; top: 0; z-index: 2; display: grid; grid-template-columns: 54px 1fr auto; gap: 12px; align-items: center; padding: 16px 14px 14px 16px;
  background: linear-gradient(180deg, var(--glass-strong) 70%, transparent); }
.p-head img { width: 54px; height: 54px; padding: 6px; border-radius: 16px; background: color-mix(in srgb, var(--c, #fff) 20%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c, #fff) 45%, transparent); }
.p-id { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--gold); background: rgba(255, 203, 87, .12); padding: 1px 8px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.p-head h2 { margin: 4px 0 1px; font-size: 18px; font-weight: 700; line-height: 1.2; }
.p-sub { color: var(--muted); font-size: 12.5px; }
.close-btn { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--stroke); background: var(--tile); display: grid; place-items: center; align-self: start; color: var(--text); }
.close-btn:hover { background: var(--tile-hover); }
.p-body { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 12px; }
.timecode-note { padding: 9px 11px; border: 1px solid var(--stroke); border-radius: var(--r-md); color: var(--muted); font-size: 12.5px; }
.timecode-note b { color: var(--text); font-variant-numeric: tabular-nums; }

.media { position: relative; border-radius: var(--r-lg); overflow: hidden; background: #000; aspect-ratio: 16 / 9; box-shadow: 0 0 0 1px var(--stroke); }
.media iframe, .media .yt-host { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.media .facade { position: absolute; inset: 0; border: 0; padding: 0; background: #000 center / cover no-repeat; display: block; width: 100%; }
.media .facade::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, .55)); }
.media .play { position: absolute; z-index: 1; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 64px; height: 64px; border-radius: 50%;
  background: rgba(255, 255, 255, .18); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, .35); display: grid; place-items: center; transition: transform .15s, background .15s; }
.media .play svg { width: 26px; height: 26px; fill: #fff; stroke: none; margin-left: 3px; }
.media .facade:hover .play { transform: translate(-50%, -50%) scale(1.07); background: #ff0033; border-color: #ff0033; }
.media .tc { position: absolute; z-index: 1; left: 10px; bottom: 10px; background: rgba(0, 0, 0, .7); color: #fff; font-weight: 700; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.media img.photo { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
/* видео, картинка и заглушка — всегда 16:9, чтобы карточка не меняла высоту от метки к метке */
.media.empty { display: grid; place-items: center; background: var(--tile); color: var(--muted); text-align: center; padding: 18px; box-shadow: inset 0 0 0 1px var(--stroke); }
.media.empty svg { width: 28px; height: 28px; margin: 0 auto 6px; display: block; opacity: .7; }
.yt-link { font-size: 12.5px; color: var(--muted); font-weight: 600; text-decoration: none; margin-top: -4px; }
.yt-link:hover { color: var(--text); }

.actions { display: flex; gap: 8px; }
.found-btn { flex: 1; border: 1px solid rgba(61, 220, 132, .55); background: rgba(61, 220, 132, .1); color: var(--ok); font-weight: 700; padding: 11px 14px;
  border-radius: 999px; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 14.5px; transition: background .15s, color .15s, box-shadow .15s; }
.found-btn:hover { background: rgba(61, 220, 132, .18); }
.found-btn svg { width: 18px; height: 18px; stroke-width: 3; }
.found-btn.on { background: linear-gradient(135deg, #3ddc84, #1fa85a); color: #06200f; border-color: transparent; box-shadow: 0 6px 20px rgba(61, 220, 132, .35); }
.ghost-btn { width: 46px; border-radius: 50%; border: 1px solid var(--stroke); background: var(--tile); display: grid; place-items: center; color: var(--text); }
.ghost-btn:hover { background: var(--tile-hover); }
.meta { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 13.5px; margin: 0; padding: 12px; border-radius: var(--r-md); background: var(--tile); }
.meta dt { color: var(--muted); }
.meta dd { margin: 0; font-weight: 600; }
.pnav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pnav button { border: 1px solid var(--stroke); background: var(--tile); color: var(--text); border-radius: 999px; padding: 7px 12px; font-weight: 600; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.pnav button:hover:not(:disabled) { background: var(--tile-hover); }
.pnav button:disabled { opacity: .35; cursor: default; }
.pnav span { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.panel-ad { padding: 0 14px 16px; }

/* поддержать автора (в карточке — над рекламой, с отступом; в панели — над подвалом) */
.support { margin-top: 6px; padding: 14px; border-radius: var(--r-lg); border: 1px solid var(--stroke);
  background: radial-gradient(120% 120% at 100% 0%, rgba(255, 84, 104, .14), transparent 60%), var(--tile); }
/* в левой панели — закреплён внизу, компактно */
.side-support { flex: none; padding: 10px 14px 14px; border-top: 1px solid var(--stroke); }
.side-support .support { margin: 0; padding: 12px; }
.side-support .support-text span { display: none; }
.side-support .support-btns { margin-top: 8px; }
.side-support .sup { flex-direction: row; justify-content: center; gap: 4px; padding: 8px 2px; white-space: nowrap; font-size: 11px; letter-spacing: -.01em; }
.side-support .sup svg.logo { width: 15px; height: 15px; }
.support-text b { display: block; font-size: 14px; }
.support-text span { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.support-btns { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; margin-top: 12px; }   /* 2 или 3 кнопки */
.sup { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 9px 4px 8px; border-radius: var(--r-md); text-decoration: none;
  font-size: 11px; font-weight: 700; color: #111; transition: transform .12s, filter .12s; text-align: center; line-height: 1.15; }
.sup:hover { transform: translateY(-1px); filter: brightness(1.06); }
.sup svg.logo { width: 20px; height: 20px; fill: currentColor; stroke: none; }
.sup-bmc { background: #ffdd00; }
.sup-patreon { background: #ff424d; color: #fff; }
.sup-boosty { background: #f15f2c; color: #fff; }
.panel-ad { border-top: 1px solid var(--stroke); padding-top: 4px; }

/* «Рядом ещё не найдено» (карточки без видео) */
.near h3 { margin: 2px 2px 8px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.near-row { display: grid; grid-template-columns: 30px 1fr auto 20px; gap: 10px; align-items: center; width: 100%; padding: 8px 10px; margin-bottom: 6px;
  border: 1px solid var(--stroke); border-radius: var(--r-md); background: var(--tile); color: var(--text); text-align: left; transition: background .15s, border-color .15s; }
.near-row:hover { background: var(--tile-hover); border-color: var(--stroke-2); }
.near-row img { width: 30px; height: 30px; }
.near-name { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.near-dist { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.near-dir { width: 18px; height: 18px; color: var(--gold); }
.near-done { margin: 0; padding: 12px; border-radius: var(--r-md); background: rgba(61, 220, 132, .1); color: var(--ok); font-weight: 600; text-align: center; }

.panel-ad .ad-slot { margin-top: 4px; }

/* десктоп (класс ad-dock ставит js/app.js при высоте окна ≥ 640 px): карточка на всю высоту, реклама закреплена внизу карточки,
   содержимое прокручивается над ней */
@media (min-width: 861px) {
  body.ad-dock .panel { bottom: var(--gap); max-height: none; display: flex; flex-direction: column; overflow: hidden; }
  body.ad-dock #panelBody { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .15) transparent; }
  body.ad-dock .panel-ad { flex: none; padding: 10px 0 12px; background: rgba(10, 14, 26, .35); }
  body.ad-dock .panel-ad .ad-slot { margin: 0 auto; }
}

/* открытая карточка: кнопки справа уезжают, чтобы не лежать поверх неё */
@media (min-width: 861px) {
  body.panel-open .leaflet-right { right: calc(var(--panel-w) + var(--gap) * 2); }
  .leaflet-right { transition: right .3s cubic-bezier(.2, .8, .2, 1); }
}

/* ---------- элементы карты ---------- */
.leaflet-bottom.leaflet-right { margin: 0 var(--gap) var(--gap) 0; }
.leaflet-control-zoom.leaflet-bar { border: 1px solid var(--stroke) !important; border-radius: 14px !important; overflow: hidden; box-shadow: var(--shadow) !important; margin: 0 !important;
  background: var(--glass); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.leaflet-control-zoom a { width: 40px !important; height: 40px !important; line-height: 38px !important; font-size: 20px !important; background: transparent !important; color: var(--text) !important; border-color: var(--stroke) !important; }
.leaflet-control-zoom a:hover { background: var(--tile-hover) !important; }
.map-hint { position: fixed; z-index: 900; left: 50%; top: var(--gap); transform: translateX(-50%); padding: 8px 16px; border-radius: 999px; font-weight: 600; font-size: 13px; }

/* ---------- окно «О карте» и картинка на весь экран ---------- */
.about { max-width: 560px; width: calc(100% - 32px); border-radius: var(--r-xl); color: var(--text); padding: 24px 24px 20px; }
.about::backdrop { background: rgba(5, 8, 16, .6); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.about h2 { margin: 0 0 12px; font-size: 20px; }
.about h3 { margin: 18px 0 6px; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.about p { margin: 0 0 8px; color: #d6dbea; font-size: 14px; }
.about a { color: var(--gold); text-decoration: underline; text-underline-offset: 2px; }
.about a:hover { color: #ffe494; }
.about-close { position: absolute; top: 14px; right: 14px; }
.lightbox { position: fixed; inset: 0; z-index: 3000; background: rgba(5, 8, 16, .92); display: grid; place-items: center; cursor: zoom-out; }
.lightbox img { max-width: 94vw; max-height: 90vh; border-radius: 12px; }

/* ---------- телефон ---------- */
@media (max-width: 860px) {
  :root { --gap: 10px; }
  .only-mobile { display: grid !important; }
  .only-desktop { display: none !important; }
  .mobile-brand { position: fixed; z-index: 800; top: var(--gap); left: var(--gap); display: flex !important; align-items: baseline; gap: 0; padding: 9px 14px;
    border-radius: 999px; text-decoration: none; color: var(--text); font-weight: 800; font-size: 16px; }
  .mobile-brand small { font-family: var(--font); font-style: normal; font-weight: 600; font-size: 12px; color: var(--muted); margin-left: 10px; }

  /* шторки снизу: меню и карточка метки */
  .sheet { top: auto; left: 0; right: 0; bottom: var(--anchor-h); width: auto; max-height: 84vh; border-radius: 24px 24px 0 0; border-bottom: 0;
    transform: translateY(105%); opacity: 1; transition: transform .3s cubic-bezier(.2, .8, .2, 1), max-height .3s; padding-bottom: env(safe-area-inset-bottom); }
  .sheet.open { transform: none; }
  body.side-collapsed .side { transform: translateY(105%); }
  .sheet-handle { display: block !important; width: 40px; height: 5px; border-radius: 999px; background: rgba(255, 255, 255, .25); margin: 9px auto 0; flex: none; }
  .side-head { padding-top: 10px; }
  .panel { top: auto; max-height: 52vh; }
  .panel.expanded { max-height: 90vh; }
  .p-head { padding-top: 8px; }

  .mobile-bar { position: fixed; z-index: 800; left: var(--gap); right: var(--gap); bottom: calc(var(--gap) + var(--anchor-h) + env(safe-area-inset-bottom));
    display: flex !important; justify-content: space-between; align-items: center; pointer-events: none; }
  .mobile-bar > * { pointer-events: auto; }
  .mobile-bar button { display: flex; align-items: center; gap: 8px; border-radius: 999px; padding: 6px 16px 6px 6px; font-weight: 700; color: var(--text); }
  .mobile-bar button img { width: 32px; height: 32px; }
  .mobile-progress { border-radius: 999px; padding: 9px 14px; font-size: 13px; }
  .mobile-progress b { font-variant-numeric: tabular-nums; color: var(--gold); }
  .leaflet-bottom.leaflet-right { bottom: calc(60px + var(--anchor-h)); }
  body.panel-open .mobile-bar, body.cats-open .mobile-bar { display: none !important; }
  .panel-ad { display: none; }   /* на телефоне реклама — закреплённый баннер внизу экрана, в шторке её не видно */
  .backdrop { position: fixed; inset: 0; z-index: 790; background: rgba(5, 8, 16, .45); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
