/* ==========================================================================
   Попульки (505ulki.online) — «Ледяная доска» (2026-09)
   Светлая тема в духе каталогов 2000-х: квадратные углы, 1px рамки,
   системные шрифты, ноль анимаций/теней/размытий, максимум информации.
   ========================================================================== */

:root {
    --bg: #f3f8fc;
    --panel: #ffffff;
    --panel-alt: #eaf3fa;
    --strip: #dcebf7;
    --line: #b9d3e6;
    --line-soft: #dbe7f0;
    --text: #111111;
    --muted: #5b6b78;
    --faint: #8a98a4;
    --link: #0b5cad;
    --visited: #6b3fa0;
    --cta: #d6336c;
    --cta-dark: #b8245a;
    --ok: #1e8e3e;
    --warn-bg: #fff4e5;
    --warn-line: #f0b35b;
    --err: #c62828;
    --err-bg: #fdecea;
    --vip-bg: #fff1b8;  --vip-line: #d9b74a;
    --top-bg: #ffe3ec;  --top-line: #e8a0b8;
    --new-bg: #e3f6e8;  --new-line: #7dcb93;
    --ver-bg: #e4f0fb;  --ver-line: #7fb1dc;
    --pick-bg: #efe6fb; --pick-line: #b39ddb;
    --font: Tahoma, Verdana, "Segoe UI", Arial, sans-serif;

    /* aliases для старых шаблонов (админка, кабинет) */
    --gold: var(--cta);
    --gold-hover: var(--cta-dark);
    --accent-hot: var(--cta);
    --accent-deep: var(--cta-dark);
    --bg-dark: var(--bg);
    --bg-card: var(--panel);
    --text-main: var(--text);
    --text-muted: var(--muted);
    --border-color: var(--line);
    --red: var(--err);
    --red-hover: #a52020;
    --input-bg: #ffffff;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 13px/1.45 var(--font);
    min-height: 100vh;
}
img { max-width: 100%; height: auto; border: 0; }
h1, h2, h3, h4 { margin: 0 0 8px; line-height: 1.25; font-weight: bold; }
h1 { font-size: 20px; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }
.h-inline { font-size: 14px; margin: 6px 0 4px; }
h4 { font-size: 13px; }
p { margin: 0 0 8px; }
ul, ol { margin: 0 0 8px; padding-left: 20px; }
a { color: var(--link); text-decoration: underline; }
a:visited { color: var(--visited); }
a:hover { color: var(--cta); }
a.plain, a.plain:visited { color: inherit; text-decoration: none; }
a.plain:hover { color: var(--cta); text-decoration: underline; }
hr { border: 0; border-top: 1px solid var(--line-soft); margin: 10px 0; }
table { border-collapse: collapse; }
small, .small { font-size: 11px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.b { font-weight: bold; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.cta-text { color: var(--cta); }
.ok-text { color: var(--ok); }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid var(--cta); outline-offset: 1px; }

/* ---------- каркас ---------- */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 8px; }
.site-main { padding: 8px 0 16px; }
.portal { display: grid; grid-template-columns: 210px minmax(0, 1fr) 230px; gap: 10px; align-items: start; }
.portal--2 { grid-template-columns: minmax(0, 1fr) 260px; }
.portal--1 { grid-template-columns: minmax(0, 1fr); }
.portal--wide-left { grid-template-columns: 250px minmax(0, 1fr); }
.col { min-width: 0; }
.stack > * + * { margin-top: 10px; }

/* ---------- панели ---------- */
.box { background: var(--panel); border: 1px solid var(--line); }
.box__title {
    background: var(--strip);
    border-bottom: 1px solid var(--line);
    padding: 5px 8px;
    font-weight: bold;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.box__title a { font-weight: normal; }
.box__title .count { font-weight: normal; color: var(--muted); }
.box__body { padding: 8px; }
.box__body--tight { padding: 4px 8px; }
.box__body--none { padding: 0; }
.box--warn { border-color: var(--warn-line); background: var(--warn-bg); }
.box--warn .box__title { background: #fde7c4; border-color: var(--warn-line); }
.box--err { border-color: #e59a9a; background: var(--err-bg); }

.notice { border: 1px solid var(--line); background: var(--panel-alt); padding: 6px 8px; }
.notice--warn { border-color: var(--warn-line); background: var(--warn-bg); }
.notice--err { border-color: #e59a9a; background: var(--err-bg); color: var(--err); }
.notice--ok { border-color: #9ad4a8; background: var(--new-bg); }

/* ---------- шапка ---------- */
.topbar { background: var(--panel); border-bottom: 2px solid var(--line); }
.topbar__row { display: flex; align-items: center; gap: 12px; padding: 6px 0; flex-wrap: wrap; }
.topbar__logo { display: flex; align-items: center; text-decoration: none; color: var(--text); flex-shrink: 0; }
.topbar__logo:visited { color: var(--text); }
.topbar__logo svg { display: block; height: 34px; width: auto; }
.topbar__search { display: flex; flex: 1 1 260px; min-width: 200px; max-width: 460px; }
.topbar__search input { flex: 1; min-width: 0; border-right: 0; }
.topbar__user { display: flex; align-items: center; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.lbl-m { display: none; }
.topbar__countries { border-top: 1px solid var(--line-soft); background: var(--panel-alt); }
.topbar__countries ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.topbar__countries li a {
    display: block; padding: 4px 10px; text-decoration: none; color: var(--text);
    border-right: 1px solid var(--line-soft); font-weight: bold; font-size: 12px;
}
.topbar__countries li a:visited { color: var(--text); }
.topbar__countries li a:hover { background: var(--strip); color: var(--cta); }
.topbar__countries li.is-active a { background: var(--panel); color: var(--cta); border-bottom: 2px solid var(--cta); }
.topbar__countries li a .cur { color: var(--muted); font-weight: normal; }
/* «Ещё N стран» — выпадающий список пустых стран */
.topbar__more { position: relative; }
.topbar__more summary { display: block; padding: 4px 10px; font-size: 12px; color: var(--link); cursor: pointer; list-style: none; border-right: 1px solid var(--line-soft); white-space: nowrap; }
.topbar__more summary::-webkit-details-marker { display: none; }
.topbar__more summary::after { content: " ▾"; color: var(--muted); }
.topbar__more details[open] summary::after { content: " ▴"; }
.topbar__more-panel { position: absolute; left: 0; top: 100%; z-index: 500; min-width: 220px; background: var(--panel); border: 1px solid var(--line); padding: 4px 0; columns: 2; column-gap: 0; }
.topbar__more-panel a { display: block; padding: 3px 10px; font-size: 12px; text-decoration: none; color: var(--text); break-inside: avoid; white-space: nowrap; }
.topbar__more-panel a:visited { color: var(--text); }
.topbar__more-panel a:hover { background: var(--panel-alt); color: var(--cta); }
.topbar__more-panel .cur { color: var(--faint); font-size: 10px; }
/* Разделы текущего города — отдельная строка */
.topbar__sections { border-top: 1px solid var(--line-soft); background: var(--panel); font-size: 12px; }
.topbar__sections .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 0; }
.topbar__sections-city { color: var(--muted); padding: 3px 8px 3px 0; white-space: nowrap; }
.topbar__sections a { padding: 3px 9px; text-decoration: none; color: var(--text); border-left: 1px solid var(--line-soft); white-space: nowrap; }
.topbar__sections a:visited { color: var(--text); }
.topbar__sections a:hover { color: var(--cta); text-decoration: underline; }
.geo-bar { background: var(--warn-bg); border-bottom: 1px solid var(--warn-line); padding: 4px 0; font-size: 12px; }
.geo-bar .wrap { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.geo-bar button { margin-left: auto; }
.sudo-bar { background: #efe6fb; border-bottom: 1px solid #b39ddb; padding: 4px 0; font-size: 12px; font-weight: bold; }

/* ---------- кнопки, формы ---------- */
.btn, .btn-gold, .btn-outline {
    display: inline-block;
    padding: 5px 12px;
    border: 1px solid var(--line);
    background: var(--panel-alt);
    color: var(--text);
    font: bold 12px/1.4 var(--font);
    text-decoration: none;
    cursor: pointer;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
}
.btn:visited, .btn-gold:visited, .btn-outline:visited { color: var(--text); }
.btn:hover { background: var(--strip); color: var(--text); }
.btn--cta, .btn-gold { background: var(--cta); border-color: var(--cta-dark); color: #fff; }
.btn--cta:visited, .btn-gold:visited { color: #fff; }
.btn--cta:hover, .btn-gold:hover { background: var(--cta-dark); color: #fff; }
.btn--line, .btn-outline { background: var(--panel); border-color: var(--link); color: var(--link); }
.btn--line:hover, .btn-outline:hover { background: var(--panel-alt); color: var(--link); }
.btn--ok { background: var(--ok); border-color: #176f31; color: #fff; }
.btn--ok:hover { background: #176f31; color: #fff; }
.btn--tg { background: #2a8fd6; border-color: #1f6fa8; color: #fff; }
.btn--tg:hover { background: #1f6fa8; color: #fff; }
.btn--sm { padding: 2px 7px; font-size: 11px; }
.btn--lg { padding: 9px 18px; font-size: 14px; }
.btn--block { display: block; width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .5; cursor: default; }
.btn-full { display: block; width: 100%; }

.input, .select, .form-control, textarea.form-control, select.form-control,
input[type="text"], input[type="number"], input[type="email"], input[type="password"], input[type="search"], input[type="tel"], select, textarea {
    font: 13px/1.4 var(--font);
    color: var(--text);
    background: #fff;
    border: 1px solid var(--line);
    padding: 4px 6px;
    max-width: 100%;
}
.form-control, textarea.form-control, select.form-control { width: 100%; }
.input--sm { padding: 2px 4px; font-size: 12px; }
textarea { resize: vertical; min-height: 80px; }
select { padding-right: 18px; }
input:focus, select:focus, textarea:focus { border-color: var(--link); outline: 2px solid var(--strip); }
input[type="checkbox"], input[type="radio"] { width: 14px; height: 14px; margin: 0 4px 0 0; vertical-align: -2px; accent-color: var(--link); }
label { cursor: pointer; }
.form-group { margin-bottom: 10px; }
.form-group > label { display: block; font-weight: bold; margin-bottom: 3px; }
.form-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.form-row label { white-space: nowrap; }
.form-inline { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 2px; }
.field > span { font-size: 11px; color: var(--muted); }
.field--range { flex-direction: row; align-items: center; gap: 4px; }
.field--range input { width: 64px; }
.check { display: inline-flex; align-items: center; gap: 4px; margin-right: 10px; white-space: nowrap; }
.check-list { columns: 2; column-gap: 12px; }
.check-list .check { display: flex; margin: 0 0 3px; break-inside: avoid; }
.help { font-size: 11px; color: var(--muted); }
.error { color: var(--err); }
.auth-box { max-width: 420px; margin: 20px auto; }

/* фильтры: <details> — на десктопе всегда раскрыты (JS ставит open), маркер скрыт */
details.filters > summary { cursor: pointer; list-style: none; }
details.filters > summary::-webkit-details-marker { display: none; }
details.filters > summary::after { content: "▾"; color: var(--muted); }
details.filters[open] > summary::after { content: "▴"; }
@media (min-width: 901px) { details.filters > summary::after, details.filters[open] > summary::after { content: none; } details.filters > summary { pointer-events: none; } }

/* ---------- плашки (бейджи) ---------- */
.tag {
    display: inline-block; padding: 0 5px; border: 1px solid var(--line);
    background: var(--panel-alt); font-size: 10px; font-weight: bold; line-height: 16px;
    text-transform: uppercase; letter-spacing: .3px; color: var(--text); vertical-align: middle; white-space: nowrap;
}
.tag--vip { background: var(--vip-bg); border-color: var(--vip-line); }
.tag--top { background: var(--top-bg); border-color: var(--top-line); }
.tag--new { background: var(--new-bg); border-color: var(--new-line); }
.tag--ver { background: var(--ver-bg); border-color: var(--ver-line); }
.tag--pick { background: var(--pick-bg); border-color: var(--pick-line); }
.tag--tour { background: #e6f4f1; border-color: #7fc4b4; }
.tag--online { background: var(--new-bg); border-color: var(--new-line); color: var(--ok); text-transform: none; }
.tag--seen { background: #f1f1f1; border-color: #ccc; color: var(--muted); text-transform: none; }
.dot { display: inline-block; width: 7px; height: 7px; background: var(--ok); vertical-align: 1px; margin-right: 3px; }

/* ---------- иконки ---------- */
.ico { width: 14px; height: 14px; vertical-align: -2px; fill: currentColor; }
.ico--lg { width: 18px; height: 18px; vertical-align: -4px; }
.ico-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 4px;
    width: 26px; height: 22px; border: 1px solid var(--line); background: var(--panel); color: var(--muted);
    text-decoration: none; cursor: pointer; padding: 0;
}
.ico-btn:visited { color: var(--muted); }
.ico-btn:hover { border-color: var(--link); color: var(--link); }
.ico-btn--call { color: #1f6fa8; }
.ico-btn--wa { color: #1c9d4a; }
.ico-btn--tg { color: #2a8fd6; }
.ico-btn.is-on { background: var(--cta); border-color: var(--cta-dark); color: #fff; }

/* ---------- карточка (плитка) ---------- */
.ads { display: grid; grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); gap: 8px; }
.ads--tight { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.ad { background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; position: relative; min-width: 0; overflow: hidden; }
.ad--vip { border-color: var(--vip-line); background: #fffdf2; }
.ad--top { border-color: var(--top-line); background: #fff7f9; }
.ad.is-seen { background: #f6f6f6; }
.ad.is-seen .ad__photo img { opacity: .82; }
.ad__photo { display: block; position: relative; aspect-ratio: 3 / 4; background: var(--panel-alt); border-bottom: 1px solid var(--line-soft); overflow: hidden; }
.ad__photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.ad__photo-count { position: absolute; right: 0; bottom: 0; background: rgba(255,255,255,.9); border: 1px solid var(--line); border-right: 0; border-bottom: 0; font-size: 10px; padding: 0 4px; color: var(--muted); }
.ad__tags { position: absolute; left: 0; top: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.ad__tags .tag { border-left: 0; border-top: 0; }
.ad__fav { position: absolute; right: 0; top: 0; width: 24px; height: 24px; border: 1px solid var(--line); border-right: 0; border-top: 0; background: rgba(255,255,255,.92); color: var(--faint); cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.ad__fav.active, .ad__fav:hover { color: var(--cta); }
/* Тело карточки — фиксированные строки одной высоты, чтобы карточки в ряду не «скакали» */
.ad__body { padding: 5px 6px 6px; display: grid; grid-template-rows: 18px 16px 18px 16px 26px 14px; row-gap: 2px; font-size: 12px; align-items: center; }
.ad__body > * { min-width: 0; }
.ad__name { font-size: 13px; font-weight: bold; margin: 0; line-height: 18px; display: flex; align-items: baseline; gap: 4px; min-width: 0; }
.ad__name a { text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; }
.ad__name a:hover { text-decoration: underline; }
.ad__name .age { font-weight: normal; color: var(--muted); flex-shrink: 0; white-space: nowrap; }
.ad__params { color: var(--muted); font-size: 11px; line-height: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad__params b { color: var(--text); font-weight: normal; }
.ad__prices { display: flex; gap: 6px; flex-wrap: nowrap; font-size: 11px; line-height: 18px; overflow: hidden; }
.ad__prices span { white-space: nowrap; }
.ad__prices b { color: var(--cta); font-size: 12px; }
.ad__prices i { font-style: normal; color: var(--faint); }
.ad__city { font-size: 11px; line-height: 16px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad__foot { display: flex; align-items: center; justify-content: space-between; gap: 4px; height: 26px; }
.ad__contacts { display: flex; gap: 3px; }
.ad__upd { font-size: 10px; line-height: 14px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad__cmp { font-size: 10px; color: var(--muted); white-space: nowrap; display: inline-flex; align-items: center; gap: 2px; }
.ad__cmp input { margin: 0; width: 12px; height: 12px; }

/* ---------- табличный список ---------- */
.tbl { width: 100%; border: 1px solid var(--line); background: var(--panel); font-size: 12px; }
.tbl th, .tbl td { border-bottom: 1px solid var(--line-soft); padding: 4px 6px; vertical-align: middle; text-align: left; }
.tbl th { background: var(--strip); font-size: 11px; white-space: nowrap; border-bottom-color: var(--line); }
.tbl tr:nth-child(even) td { background: #f8fbfd; }
.tbl tr:hover td { background: var(--panel-alt); }
.tbl td.num, .tbl th.num { text-align: right; white-space: nowrap; }
.tbl td.price { color: var(--cta); font-weight: bold; text-align: right; white-space: nowrap; }
.tbl .thumb { width: 44px; height: 58px; max-width: none; object-fit: cover; display: block; border: 1px solid var(--line-soft); }
/* каталожная таблица: фиксированные пропорции колонок, строка = 48px фото + 3px отступов */
.tbl--catalog { table-layout: fixed; }
.tbl--catalog th, .tbl--catalog td { padding: 3px 5px; }
.tbl--catalog .thumb { width: 36px; height: 48px; }
.tbl--catalog th:nth-child(1) { width: 44px; }
.tbl--catalog td:nth-child(1) { padding-right: 0; }
.tbl--catalog th:nth-child(3) { width: 5%; }
.tbl--catalog th:nth-child(4) { width: 8%; }
.tbl--catalog th:nth-child(5), .tbl--catalog th:nth-child(6) { width: 8.5%; }
.tbl--catalog th:nth-child(7) { width: 9%; }
.tbl--catalog th:nth-child(8) { width: 12%; }
.tbl--catalog th:nth-child(9) { width: 90px; }
.tbl--catalog th:nth-child(10) { width: 8%; }
.tbl--catalog th:nth-child(11) { width: 26px; }
.tbl--catalog .tbl__name { overflow: hidden; }
.tbl--catalog .tbl__name > a { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 16px; }
.tbl--catalog .tbl__sub { font-size: 10px; line-height: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 14px; }
.tbl--catalog .tbl__sub .tag { font-size: 9px; line-height: 13px; padding: 0 4px; }
.tbl--catalog td:nth-child(8) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbl--catalog td:nth-child(9) { white-space: nowrap; }
.tbl--catalog .ico-btn { width: 24px; height: 20px; }
.tbl--catalog .ico-btn .ico { width: 12px; height: 12px; }
.tbl tr.is-seen td { color: var(--muted); }
.tbl tr.is-vip td { background: #fffdf2; }
.tbl tr.is-top td { background: #fff7f9; }
.tbl--kv td:first-child { color: var(--muted); width: 40%; }
.tbl--compact th, .tbl--compact td { padding: 2px 5px; }
.tbl--noborder { border: 0; }
.tbl--noborder td { border-color: var(--line-soft); }
.tbl--dense th, .tbl--dense td { padding: 2px 4px; font-size: 11px; }
.ads-list { display: none; }
body.view-list .ads-list { display: block; }
body.view-list .ads--main { display: none; }

/* ---------- список городов / дерево ---------- */
.tree { list-style: none; margin: 0; padding: 0; }
.tree > li { border-top: 1px solid var(--line-soft); }
.tree > li:first-child { border-top: 0; }
.tree__country { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px; font-weight: bold; background: var(--panel-alt); }
.tree__country a { text-decoration: none; color: var(--text); }
.tree__country a:visited { color: var(--text); }
.tree__country .count { font-weight: normal; color: var(--muted); font-size: 11px; }
.tree__country.is-active { background: var(--strip); }
.tree__cities { list-style: none; margin: 0; padding: 2px 0 4px; }
.tree__cities li { display: flex; justify-content: space-between; align-items: baseline; padding: 1px 8px 1px 16px; font-size: 12px; }
.tree__cities li.is-active { background: var(--strip); }
.tree__cities li .count { color: var(--faint); font-size: 11px; }
.tree__cities li a { text-decoration: none; }
.tree__cities li a:hover { text-decoration: underline; }
.tree__more { padding: 1px 8px 2px 16px; font-size: 11px; }
.city-cols { columns: 3; column-gap: 12px; }
.city-cols li { break-inside: avoid; }
.linklist { list-style: none; margin: 0; padding: 0; }
.linklist li { padding: 2px 0; border-top: 1px dotted var(--line-soft); display: flex; justify-content: space-between; gap: 6px; align-items: baseline; }
.linklist li:first-child { border-top: 0; }
.linklist li .count { color: var(--faint); font-size: 11px; white-space: nowrap; }
.linklist--inline { display: flex; flex-wrap: wrap; gap: 2px 10px; }
.linklist--inline li { border: 0; padding: 0; display: inline; }
.mini { display: flex; gap: 6px; align-items: center; padding: 3px 0; border-top: 1px dotted var(--line-soft); font-size: 12px; }
.mini:first-child { border-top: 0; }
.mini img { width: 36px; height: 48px; object-fit: cover; border: 1px solid var(--line-soft); flex-shrink: 0; }
.mini__txt { min-width: 0; line-height: 1.3; }
.mini__txt a { font-weight: bold; text-decoration: none; }
.mini__txt small { display: block; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini .price { margin-left: auto; color: var(--cta); font-weight: bold; white-space: nowrap; font-size: 11px; }

/* ---------- разделы каталога: девушки / парни / трансы ---------- */
.gender-tabs { display: flex; margin-bottom: 8px; border-bottom: 2px solid var(--line); }
.gender-tabs a { padding: 6px 16px; border: 1px solid var(--line); border-bottom: 0; margin-right: 3px; margin-bottom: -2px; background: var(--panel-alt); color: var(--text); text-decoration: none; font-weight: bold; font-size: 14px; }
.gender-tabs a:visited { color: var(--text); }
.gender-tabs a .count { font-weight: normal; color: var(--muted); font-size: 12px; }
.gender-tabs a.is-on { background: var(--panel); border-color: var(--cta); border-bottom: 2px solid var(--panel); color: var(--cta); }
@media (max-width: 640px) { .gender-tabs a { flex: 1; text-align: center; padding: 6px 4px; font-size: 13px; margin-right: 2px; } }

/* ---------- крошки, пагинация, вкладки, статус ---------- */
.crumbs { font-size: 12px; color: var(--muted); margin: 0 0 8px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.page-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.page-head h1 { margin: 0; }
.page-head .count { color: var(--muted); }
.pager { display: flex; flex-wrap: wrap; gap: 3px; align-items: center; font-size: 12px; }
.pager a, .pager span { display: inline-block; min-width: 26px; padding: 3px 7px; border: 1px solid var(--line); background: var(--panel); text-decoration: none; text-align: center; }
.pager span.is-current { background: var(--link); border-color: var(--link); color: #fff; font-weight: bold; }
.pager span.dots { border: 0; background: none; min-width: 0; }
.pager .pager__info { border: 0; background: none; color: var(--muted); margin-right: 6px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; justify-content: space-between; font-size: 12px; padding: 5px 8px; background: var(--panel); border: 1px solid var(--line); }
.toolbar__group { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.toolbar select { padding: 2px 4px; font-size: 12px; }
.seg { display: inline-flex; }
.seg button, .seg a { padding: 2px 8px; border: 1px solid var(--line); background: var(--panel); font: 12px var(--font); cursor: pointer; text-decoration: none; color: var(--text); margin-left: -1px; }
.seg .is-on { background: var(--link); border-color: var(--link); color: #fff; }
.tabs { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin: 0 0 8px; padding: 0; list-style: none; }
.tabs li a { display: block; padding: 4px 10px; border: 1px solid var(--line); border-bottom: 0; margin-bottom: -1px; margin-right: 2px; background: var(--panel-alt); text-decoration: none; color: var(--text); font-weight: bold; font-size: 12px; }
.tabs li a:visited { color: var(--text); }
.tabs li.is-active a { background: var(--panel); border-bottom: 1px solid var(--panel); color: var(--cta); }
.tabs li a .count { color: var(--muted); font-weight: normal; }
.tab-pane[hidden] { display: none; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { display: inline-block; padding: 1px 6px; border: 1px solid var(--line); background: var(--panel-alt); font-size: 11px; text-decoration: none; color: var(--text); }
.chip:visited { color: var(--text); }
.chip:hover { border-color: var(--link); color: var(--link); }
.chip.is-on { background: var(--link); border-color: var(--link); color: #fff; }
.chip--x { color: var(--muted); }
.statusbar { border-top: 1px solid var(--line); background: var(--panel-alt); font-size: 11px; color: var(--muted); padding: 3px 0; }
.statusbar .wrap { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.statusbar b { color: var(--text); font-weight: normal; }

/* ---------- футер ---------- */
.footer { margin-top: 16px; border-top: 2px solid var(--line); background: var(--panel); font-size: 12px; }
.footer__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; padding: 10px 0; }
.footer__col h4 { font-size: 12px; border-bottom: 1px solid var(--line-soft); padding-bottom: 2px; margin-bottom: 4px; }
.footer__col ul { list-style: none; margin: 0; padding: 0; }
.footer__col li { padding: 1px 0; }
.footer__col a { text-decoration: none; }
.footer__col a:hover { text-decoration: underline; }
.footer__seo { color: var(--muted); font-size: 11px; line-height: 1.5; border-top: 1px solid var(--line-soft); padding: 8px 0; }
.footer__copy { color: var(--muted); font-size: 11px; padding-bottom: 8px; }

/* ---------- страница анкеты ---------- */
.pgrid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 10px; align-items: start; }
@media (max-width: 760px) { .pgrid { grid-template-columns: minmax(0, 1fr); } }
.gallery__main { display: block; border: 1px solid var(--line); background: var(--panel-alt); }
.gallery__main img { width: 100%; display: block; max-height: 640px; object-fit: contain; background: #fff; }
.gallery__thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-top: 4px; }
.gallery__thumbs a { display: block; border: 1px solid var(--line); aspect-ratio: 3 / 4; overflow: hidden; }
.gallery__thumbs a.is-on { border-color: var(--cta); outline: 1px solid var(--cta); }
.gallery__thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.contacts { display: flex; flex-wrap: wrap; gap: 6px; }
.contacts .btn { display: inline-flex; align-items: center; gap: 6px; }
.contacts .btn .ico { width: 16px; height: 16px; }
.phone-num { font-size: 18px; font-weight: bold; letter-spacing: .5px; }
.prices-tbl td:last-child { text-align: right; font-weight: bold; color: var(--cta); white-space: nowrap; }
.services { display: flex; flex-wrap: wrap; gap: 3px; }
.services a, .services span { display: inline-block; border: 1px solid var(--line); background: var(--panel-alt); padding: 1px 6px; font-size: 12px; text-decoration: none; }
.services a:hover { border-color: var(--link); }
.services .extra { color: var(--cta); font-size: 11px; }
.review { border-top: 1px dotted var(--line-soft); padding: 6px 0; }
.review:first-child { border-top: 0; }
.review__head { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; }
.review__stars { color: #d9a300; letter-spacing: 1px; white-space: nowrap; }
.review__reply { margin: 4px 0 0 12px; padding-left: 8px; border-left: 2px solid var(--line); color: var(--muted); font-size: 12px; }
.sticky-contacts { display: none; }
.desc { white-space: pre-line; line-height: 1.5; }
.note-box textarea { width: 100%; min-height: 60px; font-size: 12px; }

/* ---------- модальное предупреждение (предоплата) ---------- */
.modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 1000; align-items: center; justify-content: center; padding: 16px; }
.modal.active { display: flex; }
.modal .box { max-width: 420px; width: 100%; background: var(--panel); }
.modal .box__title { font-size: 14px; }
.modal .box__body p { font-size: 13px; }

/* ---------- лайтбокс / паника / сравнение ---------- */
.lightbox { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.9); z-index: 1000; align-items: center; justify-content: center; }
.lightbox.active { display: flex; }
.lightbox img { max-width: 94vw; max-height: 90vh; object-fit: contain; }
.lightbox button { position: absolute; background: #fff; border: 1px solid var(--line); font: bold 18px var(--font); cursor: pointer; width: 40px; height: 40px; }
.lightbox-close { top: 10px; right: 10px; }
.lightbox-prev { left: 10px; top: 50%; margin-top: -20px; }
.lightbox-next { right: 10px; top: 50%; margin-top: -20px; }
.lightbox-counter { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); color: #fff; font-size: 12px; }
.panic-screen { display: none; position: fixed; inset: 0; background: #fff; color: #202124; z-index: 999999; padding: 20px; font: 14px/1.5 Arial, sans-serif; overflow: auto; }
.panic-screen.active { display: block; }
.panic-screen table { border-collapse: collapse; margin-top: 10px; }
.panic-screen td, .panic-screen th { border: 1px solid #ddd; padding: 4px 10px; text-align: left; }
.cmpbar { display: none; position: fixed; left: 0; right: 0; bottom: 0; background: var(--panel); border-top: 2px solid var(--line); padding: 5px 0; z-index: 900; font-size: 12px; }
.cmpbar.active { display: block; }
.cmpbar .wrap { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cmp-tbl th { width: 140px; }
.cmp-tbl img { width: 120px; height: 160px; object-fit: cover; }
.toast { display: none; position: fixed; left: 50%; bottom: 60px; transform: translateX(-50%); background: #222; color: #fff; padding: 6px 12px; font-size: 12px; z-index: 950; }
.toast.active { display: block; }

/* ---------- мобильная навигация ---------- */
.mnav { display: none; }

/* ---------- старые классы (кабинет, админка) ---------- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 8px; }
.premium-card, .card { background: var(--panel); border: 1px solid var(--line); padding: 10px; }
.premium-card h3 { border-bottom: 1px solid var(--line-soft); padding-bottom: 4px; margin-bottom: 8px; }
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 10px; margin-bottom: 10px; }
.service-item { border: 1px solid var(--line-soft); padding: 5px; background: #fff; }
.service-item label { display: flex; align-items: center; gap: 4px; margin-bottom: 3px; }
.service-item input[type="number"] { width: 100%; font-size: 12px; padding: 2px 4px; }
.dashboard-services-wrap { max-height: 520px; overflow: auto; }
.dashboard-services-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 5px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; }
.photo-item { position: relative; aspect-ratio: 1; border: 1px solid var(--line); overflow: hidden; background: var(--panel-alt); }
.photo-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-item.photo-item-uploading { border: 2px dashed var(--cta); }
.photo-upload-spinner { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--muted); background: rgba(255,255,255,.6); }
.photo-upload-spinner::after { content: "загрузка…"; }
.photo-delete { position: absolute; top: 0; right: 0; width: 22px; height: 22px; border: 1px solid var(--err); background: #fff; color: var(--err); cursor: pointer; font-size: 14px; line-height: 1; padding: 0; }
.photo-set-main { position: absolute; bottom: 0; left: 0; width: 22px; height: 22px; border: 1px solid var(--line); background: #fff; color: var(--muted); cursor: pointer; padding: 0; }
.photo-set-main:hover { color: var(--cta); }
.photo-main-badge { position: absolute; bottom: 0; left: 0; right: 0; background: var(--cta); color: #fff; font-size: 10px; text-align: center; padding: 1px; }
.photo-add-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; border: 2px dashed var(--line); background: var(--panel-alt); cursor: pointer; aspect-ratio: 1; color: var(--muted); }
.photo-add-btn:hover { border-color: var(--link); color: var(--link); }
.upload-overlay { display: none; position: fixed; inset: 0; background: rgba(255,255,255,.85); z-index: 99999; flex-direction: column; align-items: center; justify-content: center; }
.upload-overlay.active { display: flex; }
.spinner { display: none; }
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; border-bottom: 1px solid var(--line); padding-bottom: 8px; gap: 8px; flex-wrap: wrap; }
.admin-header div { display: flex; flex-wrap: wrap; gap: 4px; }
.breadcrumb { font-size: 12px; color: var(--muted); margin-bottom: 8px; }

/* ---------- адаптив ---------- */
@media (max-width: 1100px) {
    .portal { grid-template-columns: 200px minmax(0, 1fr); }
    .portal > .col--right { grid-column: 1 / -1; }
    .portal > .col--right.stack { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; align-items: start; }
    .portal > .col--right.stack > * + * { margin-top: 0; }
}
@media (max-width: 900px) {
    .portal, .portal--2, .portal--wide-left { grid-template-columns: minmax(0, 1fr); }
    .portal > .col--right.stack { display: block; }
    .portal > .col--right.stack > * + * { margin-top: 10px; }
    .portal > .col--left { order: 1; }
    .portal > .col--main { order: 2; }
    .portal > .col--right { order: 3; }
    .col--left .box--desktop-only { display: none; }
    .city-cols { columns: 2; }
    .check-list { columns: 1; }
}
@media (max-width: 640px) {
    body { padding-bottom: 50px; }
    body.has-sticky-contacts { padding-bottom: 96px; }
    .wrap { padding: 0 6px; }
    .topbar__row { gap: 6px; padding: 5px 0; flex-wrap: wrap; }
    .topbar__logo svg { height: 28px; }
    .topbar__search { order: 3; flex: 1 1 100%; max-width: none; min-width: 0; }
    .topbar__user { flex-wrap: nowrap; gap: 4px; }
    .topbar__user .btn { padding: 4px 6px; font-size: 11px; }
    .topbar__user .lbl { display: none; }
    .topbar__user .lbl-m { display: inline; }
    .topbar__countries ul { flex-wrap: wrap; }
    .topbar__countries li a { padding: 5px 8px; font-size: 11px; border-bottom: 1px solid var(--line-soft); }
    .topbar__more { position: static; }
    .topbar__more summary { padding: 5px 8px; font-size: 11px; }
    .topbar__more-panel { position: static; columns: 2; border: 0; border-top: 1px solid var(--line-soft); background: var(--panel-alt); }
    .topbar__sections { font-size: 11px; }
    .topbar__sections a { padding: 4px 7px; }
    .ads-list, .box--scroll { overflow-x: auto; }
    .tbl--catalog th:nth-child(4), .tbl--catalog td:nth-child(4),
    .tbl--catalog th:nth-child(6), .tbl--catalog td:nth-child(6),
    .tbl--catalog th:nth-child(7), .tbl--catalog td:nth-child(7),
    .tbl--catalog th:nth-child(8), .tbl--catalog td:nth-child(8),
    .tbl--catalog th:nth-child(10), .tbl--catalog td:nth-child(10),
    .tbl--catalog th:nth-child(11), .tbl--catalog td:nth-child(11) { display: none; }
    .tbl--catalog th:nth-child(3) { width: 38px; }
    .tbl--catalog th:nth-child(5) { width: 62px; }
    .tbl--catalog th:nth-child(9) { width: 80px; }
    .tbl th, .tbl td { padding: 3px 4px; }
    .ads { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 5px; }
    .ad__body { padding: 4px 5px 5px; }
    .gallery__thumbs { grid-template-columns: repeat(4, 1fr); }
    .mnav { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; height: 46px; background: var(--panel); border-top: 2px solid var(--line); z-index: 800; }
    .mnav a, .mnav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; font: 10px var(--font); color: var(--muted); text-decoration: none; border: 0; border-left: 1px solid var(--line-soft); background: none; cursor: pointer; padding: 0; }
    .mnav a:first-child { border-left: 0; }
    .mnav a.is-active { color: var(--cta); font-weight: bold; }
    .mnav .ico { width: 18px; height: 18px; }
    .sticky-contacts { display: flex; gap: 4px; position: fixed; left: 0; right: 0; bottom: 46px; background: var(--panel); border-top: 1px solid var(--line); padding: 4px 6px; z-index: 790; }
    .sticky-contacts .btn { flex: 1; padding: 7px 4px; font-size: 12px; }
    .cmpbar { bottom: 46px; }
    .toast { bottom: 100px; }
    .city-cols { columns: 2; }
    .page-head h1 { font-size: 17px; }
    .contacts .btn { flex: 1 1 45%; }
    .footer__cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 380px) {
    .ads { grid-template-columns: 1fr 1fr; }
    .footer__cols { grid-template-columns: 1fr; }
}
@media print {
    .topbar, .footer, .mnav, .sticky-contacts, .cmpbar, .statusbar, .ad__fav, .contacts { display: none !important; }
}
