/* Карта «Ведьмак 3: Дикая Охота» — боковое меню в духе интерфейса игры: тёмная кожа, стальные рамки с ромбами,
   кровавый акцент, шрифты Philosopher и EB Garamond из общей папки fonts. Текстура — SVG-шум, картинок нет. */
:root {
    --ink: #d9d3c5;
    --ink-soft: #aaa493;
    --ink-faint: #7f7a6c;
    --bg-0: #0c0b0a;
    --bg-1: #14120f;
    --bg-2: #1c1915;
    --bg-3: #26221c;
    --steel: #8f8b80;
    --steel-light: #d2cdbf;
    --steel-dark: #4a463f;
    --line: rgba(210, 205, 191, .2);
    --blood: #9e1f19;
    --blood-light: #c8372c;
    --blood-dark: #4d0f0c;
    --gold: #d9b45a;
    --sidebar-width: 392px;
    --font-display: "Philosopher", "Cinzel", "Times New Roman", serif;
    --font-latin: "Cinzel", "Philosopher", serif;
    --font-body: "EB Garamond", "Cormorant Garamond", Georgia, "Times New Roman", serif;

    --noise-fine: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='260' height='260'><filter id='f' x='0' y='0' width='100%' height='100%'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' seed='4' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .22  0 0 0 0 .19  0 0 0 0 .13  0 0 0 .5 0'/></filter><rect width='100%' height='100%' filter='url(%23f)'/></svg>");
    --noise-stain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='520' height='520'><filter id='f' x='0' y='0' width='100%' height='100%'><feTurbulence type='fractalNoise' baseFrequency='.011 .016' numOctaves='4' seed='11' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .34  0 0 0 0 .30  0 0 0 0 .22  0 0 0 1.15 -.38'/></filter><rect width='100%' height='100%' filter='url(%23f)'/></svg>");
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #0b0a09; 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: #0b0a09; 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: #0b0a09; 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(158, 31, 25, .16), transparent 72%),
        radial-gradient(ellipse 80% 24% at 50% 100%, rgba(158, 31, 25, .10), transparent 70%),
        var(--noise-fine),
        linear-gradient(180deg, #1a1713 0%, #13110e 50%, #0e0c0a 100%);
    /* двойная стальная рамка по краю меню: внешняя тонкая и внутренняя пунктирная в 7 px */
    box-shadow: inset 0 0 0 1px rgba(210, 205, 191, .30), inset 0 0 0 7px #0c0b0a, inset 0 0 0 8px rgba(210, 205, 191, .14), inset 0 0 46px rgba(0, 0, 0, .75);
    scrollbar-width: thin; scrollbar-color: #5b564c 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, #6a655a, #3f3b34); border-radius: 4px; border: 1px solid #0c0b0a; }

/* Язычок сворачивания */
#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, #1b1915, #4b473f 50%, #24211c);
    box-shadow: 4px 0 14px rgba(0, 0, 0, .55), inset 0 0 4px rgba(210, 205, 191, .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; }
/* знак Школы Волка — большой водяной знак за заголовком */
.logo-medal { position: absolute !important; z-index: 0 !important; right: -6px; top: 4px; width: 170px; height: 130px; opacity: .10; pointer-events: none; }
.logo-medal .w3-wolf-img { width: 100%; height: 100%; }
/* картинка вырезана из белого рисунка на прозрачном фоне: цвет задаётся через маску */
.w3-wolf-img { display: block; background: #d9d3c5; -webkit-mask: url("../wolf.png") center / contain no-repeat; mask: url("../wolf.png") center / contain no-repeat; }
.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-top { font: 600 11px/1 var(--font-latin); letter-spacing: .34em; text-transform: uppercase; color: var(--blood-light); }
.logo-main {
    margin: 5px 0 5px; font: 700 38px/1 var(--font-display); letter-spacing: .04em; white-space: nowrap; text-transform: uppercase;
    background: linear-gradient(180deg, #fbf8ef 0%, #cfc9b9 55%, #8c877a 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .7));
}
.logo-sub { font: italic 500 14px/1.2 var(--font-body); color: var(--ink-soft); letter-spacing: .02em; }

/* Кнопки — тёмные плашки со стальным кантом, как пункты меню игры */
.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, #25221c 0%, #181612 55%, #12100d 100%);
    box-shadow: inset 0 1px 0 rgba(210, 205, 191, .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, #34302a 0%, #201d18 55%, #17140f 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(210, 205, 191, .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(210, 205, 191, .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='%23a29c8b' 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(210, 205, 191, .06);
    border: 1px dashed rgba(210, 205, 191, .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: #8fcf7a; 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: #f6e3df; 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(210, 205, 191, .5) 14%, rgba(210, 205, 191, .5) 46%, transparent 47%) 0 4px / 100% 1px no-repeat,
        linear-gradient(90deg, transparent 53%, rgba(210, 205, 191, .5) 54%, rgba(210, 205, 191, .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: #14120f; 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: #fff1ee; border-color: #1a0605; 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(200, 55, 44, .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(210, 205, 191, .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, #e0584a, var(--blood-light) 40%, var(--blood) 75%, var(--blood-dark)); box-shadow: 0 0 8px rgba(200, 55, 44, .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(200, 55, 44, .22); }
.section input[type="search"]::placeholder { color: var(--ink-faint); font-style: italic; }
.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: #15130f; 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: #5b564c; border-radius: 4px; }
.search-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 10px; border: 0; border-bottom: 1px solid rgba(210, 205, 191, .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(200, 55, 44, .16); outline: none; }
.search-item .w3-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; font-style: italic; }
.search-item.is-done .si-title { text-decoration: line-through; opacity: .55; }
.search-empty { padding: 10px; color: var(--ink-soft); font-size: 14px; font-style: italic; }

.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(200, 55, 44, .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; font-style: italic; }
#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 #14120f; }
.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(210, 205, 191, .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(210, 205, 191, .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(200, 55, 44, .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(210, 205, 191, .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; font-style: italic; text-align: center; }

/* Круглые медальоны с иконками */
.w3-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);
}
.w3-filter-icon svg { width: 14px; height: 14px; fill: #fff; filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .35)); }

.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: #1b1915; 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; } }

/* ---------- Метки, окна ---------- */
.w3-tip { background: #16140f; 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; }
.w3-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, #2a2721, #15130f); 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, #3a362e, #1d1a15); color: #fff; }
.leaflet-bar a.leaflet-disabled { background: #14120f; color: #5b564c; opacity: .6; cursor: default; }

.w3-popup-wrap .leaflet-popup-content-wrapper {
    color: var(--ink); border: 1px solid var(--steel); border-radius: 3px;
    background: var(--noise-fine), radial-gradient(ellipse at 20% 0%, rgba(158, 31, 25, .20), transparent 70%), linear-gradient(180deg, #1d1a15, #110f0c);
    box-shadow: 0 8px 26px rgba(0, 0, 0, .8), inset 0 0 0 3px #0c0b0a, inset 0 0 0 4px rgba(210, 205, 191, .14);
}
.w3-popup-wrap .leaflet-popup-tip { background: #14120f; border: 1px solid var(--steel); }
.w3-popup-wrap .leaflet-popup-content { margin: 14px 16px; font-family: var(--font-body); }
.w3-popup-wrap a.leaflet-popup-close-button { color: var(--ink-soft); }
.w3-popup-wrap a.leaflet-popup-close-button:hover { color: var(--blood-light); }
.w3-popup { min-width: 230px; }
.w3-popup-cat { display: flex; align-items: center; gap: 6px; font: 700 12px var(--font-display); text-transform: uppercase; letter-spacing: .14em; }
.w3-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); }
.w3-popup-icon svg { width: 12px; height: 12px; fill: #fff; }
.w3-popup h3 { margin: 5px 0 4px; font: 700 22px/1.12 var(--font-display); letter-spacing: .02em; color: #f4f0e4; text-shadow: 0 1px 6px rgba(0, 0, 0, .8); }
.w3-popup-meta { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin: 0 0 7px; color: var(--ink-faint); font-size: 13px; font-style: italic; }
.w3-popup-en { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w3-link-btn { padding: 0; border: 0; background: none; color: var(--ink-soft); font: 600 13px var(--font-body); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; flex-shrink: 0; }
.w3-link-btn:hover { color: var(--blood-light); }
.w3-tags { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 8px; }
.w3-tag { padding: 1px 8px; border: 1px solid var(--blood); border-radius: 2px; background: rgba(158, 31, 25, .22); color: #f0b8b0; font: 700 11.5px var(--font-body); letter-spacing: .04em; }
.w3-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); }
.w3-desc { max-height: 250px; overflow-y: auto; margin: 0 0 10px; padding-right: 5px; font-size: 15.5px; line-height: 1.38; color: var(--ink); }
.w3-desc::-webkit-scrollbar { width: 6px; }
.w3-desc::-webkit-scrollbar-thumb { background: #5b564c; border-radius: 3px; }
.w3-desc p { margin: 0 0 6px; }
.w3-desc b { color: var(--gold); font-weight: 700; }
.w3-desc ul { margin: 2px 0 6px; padding-left: 18px; }
.w3-desc ul ul { margin: 0; }
.w3-desc li { margin: 1px 0; }
.w3-desc i { color: var(--steel-light); }
.w3-desc .w3-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; }
.w3-desc .w3-qtag-main { background: #f5c518; color: #2b2000; }
.w3-desc .w3-qtag-side { background: #ffffff; color: #2a2a2a; }
.w3-desc a.w3-link { color: #e9867b; font-weight: 600; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 2px; }
.w3-desc a.w3-link:hover { color: #ffb4aa; text-decoration-style: solid; }
.w3-desc table { width: 100%; margin: 4px 0 8px; border-collapse: collapse; font-size: 14px; }
.w3-desc th, .w3-desc td { padding: 2px 6px; border: 1px solid var(--line); text-align: left; }
.w3-done-btn, .w3-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;
}
.w3-done-btn { border: 1px solid #1a0605; color: #fff1ee; 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); }
.w3-done-btn:hover { box-shadow: inset 0 1px 0 rgba(255, 190, 180, .5), 0 2px 10px rgba(200, 55, 44, .55); }
.w3-done-btn.is-done { border-color: #12240c; color: #e8f2d4; background: linear-gradient(180deg, #5b8a45, #3d6a2e 55%, #2a4a22); text-shadow: 0 1px 1px rgba(10, 30, 6, .7); }
.w3-del-btn { margin-bottom: 8px; border: 1px solid #7a3028; background: transparent; color: #e08a80; }
.w3-del-btn:hover { background: rgba(200, 55, 44, .18); }
.w3-add-form select, .w3-add-form input, .w3-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 var(--steel-dark); background: rgba(0, 0, 0, .45); color: var(--ink); }

#w3-lightbox { position: fixed; inset: 0; z-index: 10000; background: rgba(5, 4, 3, .92); display: grid; place-items: center; cursor: zoom-out; }
#w3-lightbox img { max-width: 92vw; max-height: 92vh; border-radius: 2px; border: 2px solid var(--steel); box-shadow: 0 0 30px #000; }
#w3-lightbox button { position: absolute; top: 14px; right: 20px; background: none; border: 0; color: var(--steel-light); font-size: 36px; line-height: 1; cursor: pointer; }
.w3-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: #17140f; color: var(--ink); font: 600 16px var(--font-body); box-shadow: 0 6px 20px rgba(0, 0, 0, .75), inset 0 0 0 3px #0c0b0a; transition: opacity .25s, transform .25s; }
.w3-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Загрузочный экран: каркас и слои — css/map-nm.css (#map-loader.spl), здесь только эмблема и шрифты игры ---------- */
.w3l-ring { fill: none; stroke: #d2cdbf; stroke-width: 2.4; transform-origin: 60px 60px; }
.w3l-ring-1 { stroke-dasharray: 3 8; animation: w3l-turn 26s linear infinite; }
.w3l-ring-2 { stroke: #8f8b80; stroke-width: 1.4; stroke-dasharray: 14 5 2 5; animation: w3l-turn 18s linear infinite reverse; }
@keyframes w3l-turn { to { transform: rotate(360deg); } }
.spl-well .w3-wolf-img { position: relative; width: 62%; height: 50%; background: #ece7d9; }
.spl .spl-eyebrow { font-family: var(--font-latin); color: var(--sp-accent); }
.spl .w3l-title { font-size: 38px; line-height: 1; letter-spacing: .14em; padding-left: .14em; }
.spl .spl-status { font: italic 500 16px/1.4 var(--font-body); }

/* Кнопка-лупа рядом с категорией: подсвечивает метки на карте */
.filter-row { display: flex; align-items: stretch; gap: 4px; }
.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(210, 205, 191, .12); }
.filter-locate.is-on { color: #2a1d00; background: #ffd54a; 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; }
