/* Карта Red Dead Redemption 2 — Дикий Запад: тёмная кожа, латунь, ржавый красный, пергаментный текст; шрифты Rye и Underdog
   (заголовки, кнопки) и Bitter (текст) из общей папки fonts. Объём и форма — общий каркас css/map-nm.css (html[data-game="rdr2"]). Движок — копия карты Cyberpunk 2077. */
:root {
    --ink: #f1e4c8;
    --ink-soft: #c2ab82;
    --ink-faint: #8a7650;
    --bg-0: #120d09;
    --bg-1: #1a130d;
    --bg-2: #241a11;
    --bg-3: #302316;
    --steel: #9c7b45;
    --steel-light: #e8c987;
    --steel-dark: #4f3a1d;
    --line: rgba(214, 170, 90, .22);
    --blood: #a8341f;
    --blood-light: #d4553a;
    --blood-dark: #521309;
    --gold: #e8b64a;
    --cyan: #e8b64a;
    --map-bg: #d1b58e;
    --sidebar-width: 392px;
    --font-display: "Underdog", "Rye", "Bitter", Georgia, serif;
    --font-latin: "Rye", "Underdog", Georgia, serif;
    --font-body: "Bitter", Georgia, "Times New Roman", serif;
    /* зерно кожи — без картинок */
    --noise-fine: repeating-linear-gradient(180deg, rgba(214, 170, 90, .03) 0 1px, transparent 1px 3px);
    --noise-stain: none;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--map-bg); color: var(--ink); font-family: var(--font-body); font-size: 16px; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; }

/* ---------- Карта ---------- */
#map { position: fixed; inset: 0 0 0 var(--sidebar-width); z-index: 1; background: var(--map-bg); transition: left .3s ease; }
body:has(#sidebar.collapsed) #map { left: 0; }
#map-empty { position: fixed; inset: 0 0 0 var(--sidebar-width); z-index: 2; display: grid; place-items: center; pointer-events: none; color: var(--steel-light); font-family: var(--font-display); font-size: 20px; letter-spacing: .08em; text-align: center; padding: 16px; transition: left .3s ease; }
#map-empty.is-note { place-items: end center; padding-bottom: 20px; font-size: 15px; text-shadow: 0 1px 3px #000; }
body:has(#sidebar.collapsed) #map-empty { left: 0; }
.leaflet-container { background: var(--map-bg); font-family: var(--font-body); }

/* ---------- Меню ---------- */
#sidebar {
    position: fixed; inset: 0 auto 0 0; width: var(--sidebar-width); z-index: 10;
    display: flex; flex-direction: column; background: var(--bg-0);
    box-shadow: 6px 0 26px rgba(0, 0, 0, .75);
    transition: transform .3s ease;
}
#sidebar.collapsed { transform: translateX(-100%); }

.scroll-body {
    position: relative; flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden;
    margin: 0; color: var(--ink);
    background:
        radial-gradient(ellipse 85% 22% at 50% 0%, rgba(120, 40, 18, .16), transparent 72%),
        radial-gradient(ellipse 80% 24% at 50% 100%, rgba(120, 40, 18, .10), transparent 70%),
        var(--noise-fine),
        linear-gradient(180deg, #1e1610 0%, #17110b 50%, #100b07 100%);
    /* двойная стальная рамка по краю меню: внешняя тонкая и внутренняя пунктирная в 7 px */
    box-shadow: inset 0 0 0 1px rgba(214, 170, 90, .30), inset 0 0 0 7px #0b0805, inset 0 0 0 8px rgba(214, 170, 90, .14), inset 0 0 46px rgba(0, 0, 0, .75);
    scrollbar-width: thin; scrollbar-color: #6e5530 rgba(0, 0, 0, .25);
}
.scroll-body::-webkit-scrollbar { width: 8px; }
.scroll-body::-webkit-scrollbar-track { background: rgba(0, 0, 0, .3); }
.scroll-body::-webkit-scrollbar-thumb { background: linear-gradient(90deg, #7d6338, #47351c); border-radius: 4px; border: 1px solid #0b0805; }

/* Язычок сворачивания */
#sidebar-toggle-btn {
    position: fixed; top: 50%; left: var(--sidebar-width); transform: translateY(-50%); z-index: 11;
    width: 20px; height: 56px; padding: 0; display: grid; place-items: center; color: var(--steel-light); font-size: 10px; line-height: 1; cursor: pointer;
    border: 1px solid #000; border-left: none; border-radius: 0 8px 8px 0;
    background: linear-gradient(90deg, #241a10, #6e5530 50%, #2c2014);
    box-shadow: 4px 0 14px rgba(0, 0, 0, .55), inset 0 0 4px rgba(214, 170, 90, .25);
    transition: left .3s ease, width .2s ease, color .2s ease;
}
#sidebar-toggle-btn:hover { width: 24px; color: #fff; }
#sidebar-toggle-btn:focus-visible { outline: 2px solid var(--blood-light); outline-offset: 3px; }
body:has(#sidebar.collapsed) #sidebar-toggle-btn { left: 0; }

/* ---------- Шапка ---------- */
.sidebar-header { display: flex; flex-direction: column; gap: 12px; padding: 20px 20px 14px; position: relative; }
.sidebar-header > * { position: relative; z-index: 1; }
.header-top-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.header-top-row h1 { flex: 1 1 auto; margin: 0; display: flex; flex-direction: column; align-items: flex-start; line-height: 1; min-width: 0; }
.logo-title { mix-blend-mode: screen; display: block; width: 100%; max-width: 230px; height: auto; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .7)); }
.logo-sub { font: 600 13.5px/1.25 var(--font-body); color: var(--ink-soft); letter-spacing: .02em; font-style: italic; }

/* Кнопки — тёмные плашки со стальным кантом, как пункты меню игры */
.home-back-btn, .btn-group button, .io-row button, .add-marker-btn, .map-switch-btn, .map-select, .social-btn, .auth-mini-btn {
    position: relative; color: var(--ink); cursor: pointer;
    border: 1px solid var(--steel-dark); border-radius: 2px;
    background: linear-gradient(180deg, #2c2014 0%, #1d150c 55%, #150f08 100%);
    box-shadow: inset 0 1px 0 rgba(214, 170, 90, .12), inset 0 0 0 1px rgba(0, 0, 0, .55), 0 1px 3px rgba(0, 0, 0, .55);
    transition: background .18s, box-shadow .18s, transform .12s, color .18s, border-color .18s;
}
.home-back-btn:hover, .btn-group button:hover, .io-row button:hover, .add-marker-btn:hover, .map-switch-btn:hover, .map-select:hover, .social-btn:hover, .auth-mini-btn:hover {
    color: #fff; border-color: var(--steel); background: linear-gradient(180deg, #3c2b19 0%, #261a0e 55%, #1a1109 100%);
    box-shadow: inset 0 1px 0 rgba(255, 250, 235, .2), inset 0 0 0 1px rgba(0, 0, 0, .5), 0 0 10px rgba(214, 170, 90, .16);
}
.home-back-btn:active, .btn-group button:active, .io-row button:active, .map-switch-btn:active, .social-btn:active { transform: translateY(1px); }
.home-back-btn:focus-visible, .btn-group button:focus-visible, .io-row button:focus-visible, .map-switch-btn:focus-visible, .map-select:focus-visible, .social-btn:focus-visible,
.filter-item:focus-visible, .group-toggle:focus-visible, .auth-mini-btn:focus-visible, .add-marker-btn:focus-visible { outline: 2px solid var(--blood-light); outline-offset: 2px; }

.home-back-btn { display: inline-flex; align-items: center; gap: 4px; padding: 6px 10px; font: 600 14px var(--font-display); letter-spacing: .04em; flex-shrink: 0; }
.home-back-btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* Соцсети и вход */
.social-links { display: flex; gap: 7px; flex-wrap: wrap; }
.social-btn { flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 5px 9px; min-height: 30px; font: 600 13px var(--font-display); letter-spacing: .03em; white-space: nowrap; }
.social-btn svg:not(.sp-ico) { width: 14px; height: 14px; flex-shrink: 0; fill: var(--brand, currentColor); }
.social-twitch { --brand: #a77bf0; }
.social-youtube { --brand: #ee4a43; }
.social-donate { --brand: #e8a23a; }

.auth-mini-box {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px;
    border: 1px solid var(--steel-dark); border-radius: 2px; background: rgba(0, 0, 0, .28);
    box-shadow: inset 0 0 0 3px rgba(12, 11, 10, .9), inset 0 0 0 4px rgba(214, 170, 90, .12);
}
.auth-mini-info { display: flex; align-items: center; gap: 9px; min-width: 0; }
.auth-mini-info::before {
    content: ""; flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b79a62' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='3.6'/%3E%3Cpath d='M4.8 20c.9-3.6 3.600-5.400 7.200-5.400s6.300 1.800 7.200 5.400'/%3E%3C/svg%3E") center / 17px no-repeat, rgba(214, 170, 90, .06);
    border: 1px dashed rgba(214, 170, 90, .4);
}
.auth-mini-info.has-avatar::before { display: none; }
.auth-mini-avatar { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--steel); object-fit: cover; display: none; flex-shrink: 0; }
.auth-mini-text { font-size: 13px; line-height: 1.3; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth-mini-text b { color: var(--ink); font-size: 14.5px; font-weight: 700; }
.auth-online { color: #a6c46a; font-weight: 600; }
.auth-mini-btn { display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0; padding: 5px 11px; min-height: 30px; font: 700 13px var(--font-display); line-height: 1; }
.auth-mini-btn .google-icon { width: 14px; height: 14px; flex-shrink: 0; }
.auth-mini-btn.logout { color: #fbe9c8; border-color: #1b0605; background: linear-gradient(180deg, var(--blood-light), var(--blood) 55%, var(--blood-dark)); box-shadow: inset 0 1px 0 rgba(255, 190, 180, .35), 0 1px 3px rgba(0, 0, 0, .6); }
@media (max-width: 700px) { .social-btn span { display: none; } .social-btn { padding: 7px 12px; } }

/* ---------- Блоки ---------- */
.section { position: relative; padding: 16px 20px 16px; display: flex; flex-direction: column; gap: 11px; }
/* разделитель: тонкая сталь с кровавым ромбом посередине, как в меню игры */
.section::before, .filters-list::before {
    content: ""; position: absolute; left: 18px; right: 18px; top: 0; height: 9px;
    background:
        linear-gradient(90deg, transparent, rgba(214, 170, 90, .5) 14%, rgba(214, 170, 90, .5) 46%, transparent 47%) 0 4px / 100% 1px no-repeat,
        linear-gradient(90deg, transparent 53%, rgba(214, 170, 90, .5) 54%, rgba(214, 170, 90, .5) 86%, transparent) 0 4px / 100% 1px no-repeat,
        linear-gradient(45deg, transparent 38%, var(--blood-light) 39%, var(--blood-light) 61%, transparent 62%) 50% 0 / 9px 9px no-repeat,
        linear-gradient(-45deg, transparent 38%, var(--blood-light) 39%, var(--blood-light) 61%, transparent 62%) 50% 0 / 9px 9px no-repeat;
    opacity: .95;
}
.section-label { margin: 0; color: var(--steel-light); font: 700 13px/1 var(--font-display); letter-spacing: .3em; text-transform: uppercase; text-align: center; padding-left: .3em; }

.map-switch { position: relative; }
/* Выбор карты выпадающим списком: оформлен как кнопки игры, стрелка нарисована поверх */
.map-select { -webkit-appearance: none; appearance: none; display: block; width: 100%; min-height: 44px; margin: 0; padding: 8px 40px 8px 14px; text-align: left; font: 700 15px/1.2 var(--font-display); letter-spacing: .03em; }
.map-switch::after { content: ""; position: absolute; right: 16px; top: 50%; width: 8px; height: 8px; border-right: 2px solid var(--blood-light); border-bottom: 2px solid var(--blood-light); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.map-select option { background: #16100a; color: var(--ink); text-transform: none; }
.map-switch-btn { display: flex; align-items: center; justify-content: center; min-height: 40px; padding: 5px 8px; text-align: center; font: 700 14.5px/1.15 var(--font-display); letter-spacing: .03em; text-wrap: balance; }
.map-switch-btn.active, .btn-group button[aria-pressed="true"] {
    color: #fff0d6; border-color: #1a0804; border-bottom-color: #d2cdbf;
    background: linear-gradient(180deg, var(--blood-light) 0%, var(--blood) 52%, var(--blood-dark) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 190, 180, .35), inset 0 -2px 4px rgba(0, 0, 0, .45), 0 0 12px rgba(190, 70, 40, .35);
    text-shadow: 0 1px 1px rgba(0, 0, 0, .7);
}

.btn-group { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.btn-group .wide { grid-column: 1 / -1; }
.btn-group button { padding: 8px 8px; font: 700 13.5px var(--font-display); letter-spacing: .08em; text-transform: uppercase; }

/* Прогресс — тонкая полоса со стальным кантом, как шкала опыта в игре */
.progress-card { padding: 9px 12px 10px; border: 1px solid var(--steel-dark); border-radius: 2px; background: rgba(0, 0, 0, .28); box-shadow: inset 0 0 0 3px rgba(12, 11, 10, .9), inset 0 0 0 4px rgba(214, 170, 90, .12); }
.progress-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 6px; font-size: 14.5px; color: var(--ink-soft); }
.progress-head strong { color: var(--steel-light); font: 700 22px/1 var(--font-display); font-variant-numeric: lining-nums tabular-nums; }
.progress-track { height: 10px; overflow: hidden; border-radius: 1px; background: #050404; border: 1px solid var(--steel-dark); box-shadow: inset 0 2px 3px rgba(0, 0, 0, .8); }
.progress-track span { display: block; height: 100%; width: 0; background: linear-gradient(180deg, #e0704f, var(--blood-light) 40%, var(--blood) 75%, var(--blood-dark)); box-shadow: 0 0 8px rgba(190, 70, 40, .7); transition: width .35s ease; }
.progress-count { margin-top: 6px; font-size: 13.5px; color: var(--ink-soft); font-variant-numeric: lining-nums tabular-nums; }

/* Поиск */
.search-wrap { position: relative; }
.section input[type="search"] {
    width: 100%; padding: 9px 12px; color: var(--ink); font: 500 16px var(--font-body); outline: none;
    background: rgba(0, 0, 0, .45); border: 1px solid var(--steel-dark); border-radius: 2px; box-shadow: inset 0 2px 5px rgba(0, 0, 0, .7);
}
.section input[type="search"]:focus { border-color: var(--blood-light); box-shadow: inset 0 2px 5px rgba(0, 0, 0, .7), 0 0 0 2px rgba(190, 70, 40, .22); }
.section input[type="search"]::placeholder { color: var(--ink-faint); }
.search-results { display: none; flex-direction: column; max-height: 290px; margin-top: 6px; overflow-y: auto; border: 1px solid var(--steel-dark); border-radius: 2px; background: #17100a; box-shadow: 0 6px 16px rgba(0, 0, 0, .7); }
.search-results.open { display: flex; }
.search-results::-webkit-scrollbar { width: 7px; }
.search-results::-webkit-scrollbar-thumb { background: #6e5530; border-radius: 4px; }
.search-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 10px; border: 0; border-bottom: 1px solid rgba(214, 170, 90, .1); background: transparent; color: var(--ink); font: 500 15px/1.25 var(--font-body); text-align: left; cursor: pointer; }
.search-item:last-child { border-bottom: 0; }
.search-item:hover, .search-item:focus-visible { background: rgba(190, 70, 40, .16); outline: none; }
.search-item .rd-filter-icon { width: 22px; height: 22px; }
.search-item .si-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-item .si-zone { flex: 0 1 auto; max-width: 42%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-faint); font-size: 12.5px; }
.search-item.is-done .si-title { text-decoration: line-through; opacity: .55; }
.search-empty { padding: 10px; color: var(--ink-soft); font-size: 14px; }

.add-marker-btn { width: 100%; padding: 8px 12px; font: 600 14.5px var(--font-display); letter-spacing: .04em; border-style: dashed; background: rgba(0, 0, 0, .22); box-shadow: none; }
.add-marker-btn:hover, .add-marker-btn.active { background: rgba(190, 70, 40, .16); border-color: var(--blood-light); }
.io-row { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.io-row button { padding: 7px 6px; font: 600 13px var(--font-display); letter-spacing: .02em; }
.io-status { margin: 0; min-height: 14px; color: var(--ink-soft); font-size: 13px; }
#map.adding { cursor: crosshair; }

/* ---------- Фильтры ---------- */
.filters-list { position: relative; padding: 20px 20px 28px; }
.filter-group { margin-bottom: 10px; }
.filter-group-head { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 12px 0 6px; padding-bottom: 5px; border-bottom: 1px solid var(--line); }
.filter-group-head::after { content: ""; position: absolute; left: 0; bottom: -4px; width: 7px; height: 7px; transform: rotate(45deg); background: var(--blood-light); box-shadow: 0 0 0 2px #16100a; }
.filter-group-title { margin: 0; color: var(--steel-light); font: 700 17px/1.1 var(--font-display); letter-spacing: .14em; text-transform: uppercase; }
.filter-group-title .filter-hint { margin-left: 6px; color: var(--ink-faint); font: 600 13px var(--font-body); letter-spacing: 0; text-transform: none; }
.group-toggle { padding: 1px 9px; border: 1px solid var(--steel-dark); border-radius: 2px; background: rgba(0, 0, 0, .3); color: var(--ink-soft); font: 600 12px var(--font-display); letter-spacing: .04em; cursor: pointer; }
.group-toggle:hover { color: #fff; border-color: var(--steel); background: rgba(214, 170, 90, .1); }
.filter-item {
    position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 4px 8px 4px 10px; margin: 0;
    color: var(--ink); font: 500 16px/1.2 var(--font-body); text-align: left; cursor: pointer;
    background: transparent; border: 0; border-bottom: 1px solid rgba(214, 170, 90, .08); border-radius: 0; transition: background .15s, opacity .15s, filter .15s;
}
.filter-item::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 2px; background: var(--blood-light); opacity: 0; box-shadow: 0 0 6px var(--blood-light); transition: opacity .15s; }
.filter-item:hover { background: linear-gradient(90deg, rgba(190, 70, 40, .18), transparent 85%); color: #fff; }
.filter-item:hover::before { opacity: 1; }
.filter-item.disabled { opacity: .4; filter: grayscale(.9); }
.filter-item.disabled .filter-name { text-decoration: line-through; text-decoration-color: rgba(214, 170, 90, .5); }
.filter-item.is-empty { opacity: .38; }
.filter-name { display: inline-flex; align-items: center; gap: 9px; min-width: 0; }
.filter-count { color: var(--ink-soft); font: 600 14px var(--font-body); font-variant-numeric: lining-nums tabular-nums; flex-shrink: 0; }
.filters-note { margin: 10px 0 0; color: var(--ink-faint); font-size: 13.5px; line-height: 1.35; text-align: center; }

/* Круглые медальоны с иконками */
.rd-filter-icon {
    flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center;
    border: 1.5px solid rgba(235, 230, 215, .85); box-shadow: 0 0 0 1px rgba(0, 0, 0, .8), 0 1px 3px rgba(0, 0, 0, .6);
}
/* глиф из спрайта icons.png (2048×112, ячейка 44): маска, цвет значка — фон (белый или ink) */
.rd-glyph { display: block; width: 15px; height: 15px; background: #fff;
    -webkit-mask: url("../icons.png?v=1") var(--gx) var(--gy) / 5800% 100% no-repeat; mask: url("../icons.png?v=1") var(--gx) var(--gy) / 5800% 100% no-repeat; }
.search-item .rd-glyph { width: 13px; height: 13px; }

.sidebar-collapse-mobile { display: none; }
@media (max-width: 700px) { :root { --sidebar-width: 340px; } .logo-main { font-size: 32px; } }
@media (max-width: 480px) {
    :root { --sidebar-width: 100vw; }
    .sidebar-collapse-mobile {
        display: block; position: sticky; bottom: 0; margin-top: auto; width: 100%; padding: 12px; z-index: 2;
        border: 0; border-top: 1px solid var(--steel-dark); cursor: pointer; background: #241a10; color: var(--steel-light); font: 700 15px var(--font-display); letter-spacing: .06em;
    }
    #map, #map-empty { left: 0 !important; }
    #sidebar { box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; } }

/* ---------- Метки, окна ---------- */
.rd-tip { background: #17100a; color: var(--ink); border: 1px solid var(--steel); border-radius: 2px; box-shadow: 0 2px 10px rgba(0, 0, 0, .7); font: 600 14px/1.25 var(--font-body); padding: 3px 8px; }
.rd-tip.leaflet-tooltip-top:before { border-top-color: var(--steel); }
.leaflet-bar { border: 0; box-shadow: 0 2px 10px rgba(0, 0, 0, .7); border-radius: 2px; overflow: hidden; }
.leaflet-bar a, .leaflet-bar a:hover { width: 34px; height: 34px; line-height: 32px; background: linear-gradient(180deg, #33250f, #17100a); color: var(--steel-light); border: 1px solid var(--steel-dark); border-bottom: 0; font: 700 22px/32px var(--font-body); transition: background .15s; }
.leaflet-bar a:last-child { border-bottom: 1px solid var(--steel-dark); }
.leaflet-bar a:hover { background: linear-gradient(180deg, #46321a, #241a10); color: #fff; }
.leaflet-bar a.leaflet-disabled { background: #16100a; color: #6e5530; opacity: .6; cursor: default; }

.rd-popup-wrap .leaflet-popup-content { margin: 14px 16px; font-family: var(--font-body); }
.rd-popup { min-width: 230px; }
.rd-popup-cat { display: flex; align-items: center; gap: 6px; font: 700 12px var(--font-display); text-transform: uppercase; letter-spacing: .14em; }
.rd-popup-icon { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid rgba(235, 230, 215, .85); box-shadow: 0 0 0 1px rgba(0, 0, 0, .8); }
.rd-popup-icon .rd-glyph { width: 13px; height: 13px; }
.rd-popup h3 { margin: 5px 0 4px; font: 400 22px/1.12 var(--font-latin); letter-spacing: .02em; color: var(--sp-text); }
.rd-popup-meta { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin: 0 0 7px; color: var(--sp-muted); font-size: 13px; }
.rd-popup-en { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-link-btn { padding: 0; border: 0; background: none; color: var(--sp-muted); font: 600 13px var(--font-body); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; flex-shrink: 0; }
.rd-link-btn:hover { color: var(--blood-light); }
.rd-tags { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 8px; }
.rd-tag { padding: 1px 8px; border: 1px solid var(--blood); border-radius: 2px; background: rgba(120, 40, 18, .22); color: var(--sp-text); font: 700 11.5px var(--font-body); letter-spacing: .04em; }
.rd-popup-img { display: block; width: 100%; height: 150px; object-fit: cover; background: rgba(0, 0, 0, .4); border-radius: 2px; margin: 0 0 8px; border: 1px solid var(--steel); cursor: zoom-in; box-shadow: 0 2px 6px rgba(0, 0, 0, .6); }
.rd-desc { max-height: 250px; overflow-y: auto; margin: 0 0 10px; padding-right: 5px; font-size: 15.5px; line-height: 1.38; color: var(--sp-text); }
.rd-desc::-webkit-scrollbar { width: 6px; }
.rd-desc::-webkit-scrollbar-thumb { background: var(--sp-muted); border-radius: 3px; }
.rd-desc p { margin: 0 0 6px; }
.rd-desc b { color: var(--sp-accent); font-weight: 700; }
.rd-desc ul { margin: 2px 0 6px; padding-left: 18px; }
.rd-desc ul ul { margin: 0; }
.rd-desc li { margin: 1px 0; }
.rd-desc i { color: var(--sp-muted); font-style: normal; opacity: .9; }
/* описание категории (с etalongame) — под описанием метки, мелко */
.rd-about { margin: 0 0 4px; padding: 6px 10px; border-left: 2px solid var(--sp-accent); border-radius: 0 6px 6px 0; background: color-mix(in srgb, var(--sp-text) 8%, transparent); color: var(--sp-muted); font-size: 13.5px; line-height: 1.35; }
.rd-desc .rd-qtag { display: inline-block; margin-left: 2px; padding: 0 6px; border-radius: 9px; font-size: 12px; line-height: 17px; font-weight: 700; white-space: nowrap; vertical-align: 1px; }
.rd-desc .rd-qtag-main { background: #f3e600; color: #1b1a05; }
.rd-desc .rd-qtag-side { background: rgba(243, 230, 0, .16); color: #f3e600; box-shadow: inset 0 0 0 1px rgba(243, 230, 0, .55); }
.rd-desc a.rd-link { color: var(--sp-accent); font-weight: 600; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 2px; }
.rd-desc a.rd-link:hover { color: var(--sp-accent); text-decoration-style: solid; }
.rd-desc table { width: 100%; margin: 4px 0 8px; border-collapse: collapse; font-size: 14px; }
.rd-desc th, .rd-desc td { padding: 2px 6px; border: 1px solid color-mix(in srgb, var(--sp-text) 18%, transparent); text-align: left; }
.rd-done-btn, .rd-del-btn {
    width: 100%; padding: 7px 10px; border-radius: 2px; font: 700 14.5px var(--font-display); letter-spacing: .05em; cursor: pointer; transition: background .15s, box-shadow .15s;
}
.rd-done-btn { border: 1px solid #1a0804; color: #fff0d6; background: linear-gradient(180deg, var(--blood-light), var(--blood) 55%, var(--blood-dark)); text-shadow: 0 1px 1px rgba(0, 0, 0, .7); box-shadow: inset 0 1px 0 rgba(255, 190, 180, .35), 0 2px 5px rgba(0, 0, 0, .55); }
.rd-done-btn:hover { box-shadow: inset 0 1px 0 rgba(255, 190, 180, .5), 0 2px 10px rgba(190, 70, 40, .55); }
.rd-done-btn.is-done { border-color: #12240c; color: #e8f2d4; background: linear-gradient(180deg, #6f8f3f, #3d6a2e 55%, #2a4a22); text-shadow: 0 1px 1px rgba(10, 30, 6, .7); }
.rd-del-btn { margin-bottom: 8px; border: 1px solid #7a3a1c; background: transparent; color: #e0906a; }
.rd-del-btn:hover { background: rgba(190, 70, 40, .18); }
.rd-add-form select, .rd-add-form input, .rd-add-form textarea { display: block; width: 100%; margin: 6px 0; padding: 6px 8px; font: 500 15px var(--font-body); border-radius: 2px; border: 1px solid #8a6a3a; background: rgba(255, 244, 214, .6); color: var(--sp-text); }

#rd-lightbox { position: fixed; inset: 0; z-index: 10000; background: rgba(5, 4, 3, .92); display: grid; place-items: center; cursor: zoom-out; }
#rd-lightbox img { max-width: 92vw; max-height: 92vh; border-radius: 2px; border: 2px solid var(--steel); box-shadow: 0 0 30px #000; }
#rd-lightbox button { position: absolute; top: 14px; right: 20px; background: none; border: 0; color: var(--steel-light); font-size: 36px; line-height: 1; cursor: pointer; }
.rd-toast { position: fixed; left: 50%; bottom: 28px; z-index: 10001; max-width: 90vw; padding: 9px 18px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; border: 1px solid var(--steel); border-radius: 2px; background: #1a1109; color: var(--ink); font: 600 16px var(--font-body); box-shadow: 0 6px 20px rgba(0, 0, 0, .75), inset 0 0 0 3px #0b0805; transition: opacity .25s, transform .25s; }
.rd-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Загрузочный экран: каркас и слои — css/map-nm.css (#map-loader.spl), здесь только эмблема и шрифты игры ---------- */
.spl .spl-eyebrow { font-family: var(--font-latin); color: var(--gold); letter-spacing: .3em; padding-left: .3em; }
.spl-logo { mix-blend-mode: screen; display: block; width: 124px; height: auto; filter: drop-shadow(0 3px 8px rgba(0, 0, 0, .8)); animation: rdl-sway 4s ease-in-out infinite; transform-origin: 50% 0; }
@keyframes rdl-sway { 0%, 100% { transform: rotate(-1.2deg); } 50% { transform: rotate(1.2deg); } }
.spl .rdl-title { font: 400 30px/1.1 var(--font-latin); letter-spacing: .06em; color: var(--gold); text-shadow: 2px 2px 0 #3a1a08; }
.spl .spl-status { font: 600 13px/1.4 var(--font-display); letter-spacing: .1em; text-transform: uppercase; }
@media (prefers-reduced-motion: reduce) { .spl-logo { animation: none; } }

/* Кнопка-лупа рядом с категорией: подсвечивает метки на карте */
.filter-row { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; padding-right: 6px; }
.filter-row .filter-item { flex: 1 1 auto; width: auto; min-width: 0; }
.filter-locate {
    flex: 0 0 30px; display: flex; align-items: center; justify-content: center; padding: 0;
    color: var(--ink-soft); background: rgba(0, 0, 0, .3); border: 1px solid var(--steel-dark); border-radius: 2px; cursor: pointer;
    transition: color .15s, background .15s, border-color .15s, box-shadow .15s;
}
.filter-locate:hover { color: #fff; border-color: var(--steel); background: rgba(214, 170, 90, .12); }
.filter-locate.is-on { color: #2a1d00; background: #f2c14e; border-color: #a8741a; box-shadow: 0 0 8px rgba(255, 213, 74, .8); }
.filter-locate:disabled { opacity: .3; cursor: default; pointer-events: none; }
.filter-locate:focus-visible { outline: 2px solid var(--blood-light); outline-offset: 2px; }

/* шрифт как у «Показать все»; вид — общий, css/map-nm.css */
.locate-clear { font: 700 13.5px var(--font-display); letter-spacing: .08em; text-transform: uppercase; }
.locate-clear:focus-visible { outline: 2px solid var(--blood-light); outline-offset: 2px; }

