/* ---- v1-styles.css ---- */
/* Kvartal V1 "как Циан". Tokens first, components after. */
:root {
  --blue: #1D58E0;
  --blue-press: #1646B8;
  --blue-tint: #EBF1FD;
  --ink: #0F1B33;
  --ink-2: #48546E;
  --ink-3: #7A849A;
  --line: #E2E6EE;
  --line-2: #EEF1F6;
  --soft: #F4F6FA;
  --white: #FFFFFF;
  --good: #0A7D52;
  --good-tint: #E4F4EC;
  --warn: #A9520A;
  --warn-tint: #FBEEE2;
  --radius: 8px;
  --radius-lg: 14px;
  --shadow: 0 1px 2px rgba(15,27,51,.06), 0 4px 16px rgba(15,27,51,.06);
  --shadow-lg: 0 8px 32px rgba(15,27,51,.12);
  --font: "Onest", "Noto Sans Armenian", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1296px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--white); color: var(--ink);
  font: 400 15px/1.5 var(--font); font-feature-settings: "tnum" 0;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-press); }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -0.01em; }
.num { font-variant-numeric: tabular-nums; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid rgba(29,88,224,.45); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 12px; color: #fff; }

/* ---------- header ---------- */
.hdr { border-bottom: 1px solid var(--line); background: var(--white); position: sticky; top: 0; z-index: 40; }
.hdr .wrap { display: flex; align-items: center; gap: 32px; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); font-weight: 800; font-size: 22px; letter-spacing: -0.03em; }
.logo:hover { color: var(--ink); }
.logo svg { flex: none; }
.logo small { font-weight: 500; color: var(--ink-3); font-size: 15px; letter-spacing: 0; margin-left: -6px; }
.nav { display: flex; gap: 4px; }
.nav a { color: var(--ink); font-weight: 500; padding: 8px 12px; border-radius: 8px; font-size: 15px; }
.nav a:hover { background: var(--soft); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--blue); }
.hdr-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.lang { display: inline-flex; background: var(--soft); border-radius: 8px; padding: 3px; }
.lang button { border: 0; background: none; padding: 5px 9px; border-radius: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--white); color: var(--ink); box-shadow: 0 1px 2px rgba(15,27,51,.12); }
.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border: 0; background: none; border-radius: 8px; color: var(--ink); cursor: pointer; }
.icon-btn:hover { background: var(--soft); }
.burger { display: none; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: var(--radius); border: 1px solid transparent; font-weight: 600; font-size: 15px; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-press); color: #fff; }
.btn-ghost { background: var(--blue-tint); color: var(--blue); }
.btn-ghost:hover { background: #DCE6FB; color: var(--blue-press); }
.btn-line { background: var(--white); color: var(--ink); border-color: var(--line); }
.btn-line:hover { border-color: #C9D0DD; color: var(--ink); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; }
.btn-block { width: 100%; }

/* ---------- home hero/search ---------- */
.hero { background: linear-gradient(180deg, var(--blue-tint) 0%, #F7F9FE 100%); padding: 40px 0 36px; border-bottom: 1px solid var(--line-2); }
.hero h1 { font-size: 40px; font-weight: 800; letter-spacing: -0.025em; max-width: 760px; }
.hero p.lead { color: var(--ink-2); margin: 10px 0 24px; font-size: 17px; max-width: 680px; }
.search { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 6px 6px 6px; }
.tabs { display: flex; gap: 2px; padding: 4px 4px 0; }
.tab { border: 0; background: none; padding: 10px 16px; font-weight: 600; font-size: 15px; color: var(--ink-2); border-radius: 8px 8px 0 0; cursor: pointer; position: relative; }
.tab[aria-selected="true"] { color: var(--ink); }
.tab[aria-selected="true"]::after { content: ""; position: absolute; left: 16px; right: 16px; bottom: 0; height: 3px; border-radius: 3px; background: var(--blue); }
.tab:hover { color: var(--ink); }
.sbar { display: grid; grid-template-columns: 1.1fr 1.3fr 1.4fr auto; gap: 0; border: 1px solid var(--line); border-radius: 10px; margin: 6px; }
.sfield { padding: 8px 14px; border-right: 1px solid var(--line); min-width: 0; }
.sfield:last-of-type { border-right: 0; }
.sfield > label, .sfield > .flabel { display: block; font-size: 12px; color: var(--ink-3); font-weight: 500; margin-bottom: 2px; }
.sfield select, .sfield input { border: 0; background: none; width: 100%; padding: 2px 0; font-weight: 600; font-size: 15px; outline: none; min-width: 0; }
.sfield select:focus-visible, .sfield input:focus-visible { outline: 2px solid rgba(29,88,224,.45); outline-offset: 2px; }
.price-pair { display: flex; align-items: center; gap: 6px; }
.price-pair span { color: var(--ink-3); }
.rooms { display: flex; gap: 4px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: var(--white); border-radius: 7px; height: 30px; min-width: 34px; padding: 0 10px; font-size: 14px; font-weight: 600; color: var(--ink); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }
.chip:hover { border-color: #C3CCDD; }
.sbar .btn { margin: 6px; height: auto; min-height: 48px; padding: 0 28px; }
.search-foot { display: flex; align-items: center; gap: 18px; padding: 6px 14px 10px; font-size: 14px; color: var(--ink-2); flex-wrap: wrap; }
.search-foot a { font-weight: 500; }
.quick { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 8px; }
.quick a { display: inline-flex; gap: 6px; align-items: baseline; background: rgba(255,255,255,.8); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; color: var(--ink); font-size: 14px; font-weight: 500; }
.quick a:hover { border-color: var(--blue); color: var(--blue); }
.quick a b { font-weight: 500; color: var(--ink-3); font-size: 13px; }

/* ---------- sections ---------- */
.sec { padding: 48px 0 8px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.sec-head h2 { font-size: 26px; font-weight: 700; }
.sec-head a { font-weight: 500; white-space: nowrap; }
.demo { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--warn); background: var(--warn-tint); border-radius: 4px; padding: 2px 6px; vertical-align: middle; }
.muted { color: var(--ink-3); }

/* district price table */
.ptable { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.prow { display: grid; grid-template-columns: 200px 1fr 110px 120px 28px; gap: 16px; align-items: center; padding: 12px 20px; border-top: 1px solid var(--line-2); color: var(--ink); }
.prow:first-child { border-top: 0; }
a.prow:hover { background: #FAFBFD; color: var(--ink); }
.prow.head { background: var(--soft); font-size: 13px; color: var(--ink-3); font-weight: 500; padding-top: 10px; padding-bottom: 10px; }
.prow .dn { font-weight: 600; }
.bar { height: 10px; background: var(--line-2); border-radius: 5px; position: relative; overflow: hidden; }
.bar i { position: absolute; inset: 0 auto 0 0; background: var(--blue); border-radius: 5px; }
.bar.city::after { content: ""; position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); left: var(--city); }
.prow .v { font-weight: 700; text-align: right; }
.prow .c { text-align: right; color: var(--ink-2); font-size: 14px; }
.prow .arr { color: var(--ink-3); }
.ptable-note { font-size: 13px; color: var(--ink-3); margin-top: 10px; }

/* vertical card (grid) */
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.vcard { border-radius: var(--radius-lg); background: var(--white); border: 1px solid var(--line); overflow: hidden; display: flex; flex-direction: column; color: var(--ink); transition: box-shadow .2s; }
.vcard:hover { box-shadow: var(--shadow); color: var(--ink); }
.vcard .ph { aspect-ratio: 4/3; }
.vcard .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.vcard .price { font-size: 20px; font-weight: 700; }
.vcard .t { font-weight: 500; }
.vcard .addr { color: var(--ink-2); font-size: 14px; }
.vcard .foot { margin-top: auto; padding-top: 8px; display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--ink-3); }

/* photo + placeholder */
.ph { position: relative; background: var(--soft); overflow: hidden; }
.ph img { width: 100%; height: 100%; object-fit: cover; }
.ph-empty { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 8px; color: var(--ink-3); font-size: 13px; text-align: center; padding: 12px;
  background: repeating-linear-gradient(135deg, #F1F4F9 0 12px, #EDF0F6 12px 24px); }
.ph-empty svg { opacity: .7; }
.ph .cnt { position: absolute; right: 8px; bottom: 8px; background: rgba(15,27,51,.72); color: #fff; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 6px; }
.ph .tagnb { position: absolute; left: 8px; top: 8px; background: var(--white); color: var(--ink); font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 6px; box-shadow: 0 1px 2px rgba(0,0,0,.1); }

/* value badge = signature */
.vb { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; border-radius: 6px; padding: 3px 8px; width: fit-content; }
.vb.good { color: var(--good); background: var(--good-tint); }
.vb.warn { color: var(--warn); background: var(--warn-tint); }
.vb.even { color: var(--ink-2); background: var(--soft); }
.ruler { position: relative; height: 22px; margin-top: 2px; }
.ruler .track { position: absolute; left: 0; right: 0; top: 9px; height: 4px; border-radius: 2px; background: linear-gradient(90deg, #BFE3D1 0%, #E4E8EF 50%, #F3D3B6 100%); }
.ruler .med { position: absolute; top: 3px; width: 2px; height: 16px; background: var(--ink); left: 50%; }
.ruler .dot { position: absolute; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--white); border: 3px solid var(--blue); transform: translateX(-50%); }
.ruler-lbl { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-3); }

/* ---------- breadcrumbs ---------- */
.crumbs { font-size: 13px; color: var(--ink-3); padding: 16px 0 10px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.crumbs li + li::before { content: "›"; margin-right: 6px; color: #B3BACA; }
.crumbs a { color: var(--ink-2); }
.crumbs a:hover { color: var(--blue); }

/* ---------- district ---------- */
.dhead h1 { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; }
.intro { display: grid; grid-template-columns: 1fr 1fr 1fr 1.6fr; gap: 0; border: 1px solid var(--line); border-radius: var(--radius-lg); margin: 18px 0 20px; }
.kpi { padding: 16px 20px; border-right: 1px solid var(--line); }
.kpi .k { font-size: 13px; color: var(--ink-3); }
.kpi .v { font-size: 24px; font-weight: 700; margin-top: 2px; }
.kpi .s { font-size: 13px; color: var(--ink-2); }
.trend { padding: 12px 16px 8px; }
.trend .k { font-size: 13px; color: var(--ink-3); display: flex; justify-content: space-between; gap: 8px; }
.trend svg { width: 100%; height: 74px; display: block; }
.dintro-text { color: var(--ink-2); max-width: 860px; margin: 0 0 4px; }

.fbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); position: sticky; top: 64px; background: var(--white); z-index: 30; }
.seg { display: inline-flex; background: var(--soft); border-radius: 9px; padding: 3px; }
.seg button { border: 0; background: none; height: 32px; padding: 0 12px; border-radius: 7px; font-weight: 600; font-size: 14px; color: var(--ink-2); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.seg button[aria-pressed="true"] { background: var(--white); color: var(--ink); box-shadow: 0 1px 2px rgba(15,27,51,.12); }
.fbox { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 9px; height: 38px; padding: 0 10px; background: var(--white); }
.fbox input { width: 82px; border: 0; outline: none; font-size: 14px; background: none; }
.fbox select { border: 0; outline: none; font-size: 14px; background: none; font-weight: 500; }
.fbox label { font-size: 13px; color: var(--ink-3); }
.fcheck { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; cursor: pointer; }
.fcheck input { width: 18px; height: 18px; accent-color: var(--blue); }
.fbar .spacer { flex: 1; }

.results-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 0 12px; flex-wrap: wrap; }
.results-head .cnt { font-weight: 600; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.aside-box { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px; margin-bottom: 16px; }
.aside-box h3 { font-size: 16px; margin-bottom: 10px; }
.aside-list { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.aside-list li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line-2); }
.aside-list li:first-child { border-top: 0; }
.aside-list a { color: var(--ink); font-weight: 500; }
.aside-list a:hover, .aside-list a[aria-current="page"] { color: var(--blue); }

/* horizontal result card (Cian-like) */
.hcard { display: grid; grid-template-columns: 300px minmax(0, 1fr) 236px; gap: 0; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 14px; background: var(--white); transition: box-shadow .2s; }
.hcard:hover { box-shadow: var(--shadow); }
.gal { position: relative; min-height: 230px; }
.gal .ph { position: absolute; inset: 0; }
.gal .ph img { position: absolute; inset: 0; opacity: 0; transition: opacity .25s; }
.gal .ph img.on { opacity: 1; }
.gal .gbtn { position: absolute; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity .15s; box-shadow: 0 1px 4px rgba(0,0,0,.15); color: var(--ink); }
.gal:hover .gbtn, .gal .gbtn:focus-visible { opacity: 1; }
.gal .gbtn.prev { left: 8px; } .gal .gbtn.next { right: 8px; }
.gal .dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 5px; }
.gal .dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.55); }
.gal .dots i.on { background: #fff; }
.hc-mid { padding: 16px 20px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.hc-mid .t { font-size: 18px; font-weight: 700; color: var(--ink); }
.hc-mid .t:hover { color: var(--blue); }
.hc-mid .sub { color: var(--ink-2); font-size: 14px; }
.addr { font-size: 14px; color: var(--ink-2); }
.addr a { font-weight: 500; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.tag { font-size: 12px; font-weight: 500; color: var(--ink-2); background: var(--soft); border-radius: 5px; padding: 2px 7px; }
.hc-meta { margin-top: auto; display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--ink-3); padding-top: 8px; }
.hc-meta .multi { color: var(--ink-2); font-weight: 500; display: inline-flex; align-items: center; gap: 5px; }
.hc-right { padding: 16px 18px; border-left: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 6px; }
.hc-right .price { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; }
.hc-right .ppm { font-size: 14px; color: var(--ink-2); }
.src { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); margin-top: auto; padding-top: 10px; }
.src .fav { width: 22px; height: 22px; border-radius: 5px; display: grid; place-items: center; font-size: 10px; font-weight: 800; color: #fff; flex: none; }
.src b { color: var(--ink); font-weight: 600; display: block; font-size: 13px; line-height: 1.25; }
.hc-right .btn { margin-top: 6px; }
.fav-btn { position: absolute; right: 8px; top: 8px; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.92); border: 0; display: grid; place-items: center; cursor: pointer; color: var(--ink); z-index: 2; }
.fav-btn[aria-pressed="true"] { color: #D93A4A; }

.pager { display: flex; gap: 6px; justify-content: center; padding: 18px 0 8px; flex-wrap: wrap; }
.pager button { min-width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--line); background: var(--white); font-weight: 600; cursor: pointer; padding: 0 12px; }
.pager button[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.pager button:disabled { opacity: .4; cursor: default; }
.empty { border: 1px dashed #C9D0DD; border-radius: var(--radius-lg); padding: 36px; text-align: center; color: var(--ink-2); }
.empty h3 { color: var(--ink); margin-bottom: 6px; }
#map { height: 640px; border-radius: var(--radius-lg); border: 1px solid var(--line); z-index: 1; }
.mpin { background: var(--blue); color: #fff; font: 700 12px/1 var(--font); padding: 6px 8px; border-radius: 6px; white-space: nowrap; box-shadow: 0 2px 6px rgba(15,27,51,.25); border: 2px solid #fff; transform: translate(-50%, -50%); display: inline-block; }
.mpin.rent { background: var(--ink); }
.leaflet-div-icon { background: none !important; border: 0 !important; }
.map-note { font-size: 13px; color: var(--ink-3); margin-top: 8px; }

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 600; font-size: 16px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--ink-3); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 16px; color: var(--ink-2); max-width: 820px; }

/* ---------- listing ---------- */
.lhead { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; margin-bottom: 16px; }
.lhead h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.lhead .addr { margin-top: 6px; font-size: 15px; }
.lhead-actions { display: flex; gap: 8px; flex: none; }
.lgrid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; align-items: start; }
.bigal { display: grid; grid-template-columns: 1fr; gap: 8px; }
.bigal .main { position: relative; aspect-ratio: 16/10; border-radius: var(--radius-lg); overflow: hidden; background: var(--soft); }
.bigal .main img { width: 100%; height: 100%; object-fit: cover; }
.bigal .gbtn { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.95); display: grid; place-items: center; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.15); color: var(--ink); }
.bigal .prev { left: 14px; } .bigal .next { right: 14px; }
.thumbs { display: flex; gap: 8px; overflow-x: auto; }
.thumbs button { border: 2px solid transparent; padding: 0; border-radius: 8px; overflow: hidden; width: 104px; height: 72px; flex: none; cursor: pointer; background: var(--soft); }
.thumbs button[aria-current="true"] { border-color: var(--blue); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.params { display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid var(--line); border-radius: var(--radius-lg); margin: 20px 0 8px; }
.param { padding: 14px 16px; border-right: 1px solid var(--line-2); }
.param:last-child { border-right: 0; }
.param .k { font-size: 13px; color: var(--ink-3); }
.param .v { font-size: 18px; font-weight: 700; margin-top: 2px; }
.block { padding: 28px 0 4px; }
.block h2 { font-size: 22px; font-weight: 700; margin-bottom: 14px; }
.cmp { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center; }
.cmp .big { font-size: 15px; color: var(--ink-2); }
.cmp .big b { color: var(--ink); }
.cmp .ruler { height: 30px; }
.cmp .ruler .track { top: 13px; height: 6px; border-radius: 3px; }
.cmp .ruler .med { top: 5px; height: 22px; }
.cmp .ruler .dot { top: 8px; width: 16px; height: 16px; border-width: 4px; }
.hist { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px 20px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: center; }
.hist svg { width: 100%; height: 120px; }
.hist table { width: 100%; border-collapse: collapse; font-size: 14px; }
.hist td { padding: 7px 0; border-top: 1px solid var(--line-2); }
.hist tr:first-child td { border-top: 0; }
.hist td:last-child { text-align: right; font-weight: 600; }
.chg-down { color: var(--good); font-weight: 600; font-size: 12px; margin-left: 4px; }
.desc { color: var(--ink); max-width: 760px; }
.desc p { margin: 0 0 10px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; margin: 0; }
.facts div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dotted #D3D9E4; font-size: 15px; }
.facts dt { color: var(--ink-2); }
.facts dd { margin: 0; font-weight: 600; text-align: right; }
#lmap { height: 320px; border-radius: var(--radius-lg); border: 1px solid var(--line); z-index: 1; }
.srcblock { display: flex; gap: 16px; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 20px; flex-wrap: wrap; }
.srcblock .fav { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 14px; flex: none; }
.srcblock .txt { flex: 1; min-width: 200px; }
.srcblock .txt b { display: block; font-size: 16px; }
.srcblock .txt span { color: var(--ink-2); font-size: 14px; }

.side { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 14px; }
.pcard { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow); }
.pcard .price { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }
.pcard .ppm { color: var(--ink-2); margin-bottom: 10px; }
.pcard .btn { margin-top: 10px; }
.agent { display: flex; gap: 12px; align-items: center; padding: 14px 0 4px; border-top: 1px solid var(--line-2); margin-top: 16px; }
.agent .ava { width: 48px; height: 48px; border-radius: 50%; background: var(--blue-tint); color: var(--blue); display: grid; place-items: center; font-weight: 800; flex: none; }
.agent b { display: block; }
.agent span { font-size: 13px; color: var(--ink-3); }
.sites { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px 20px; }
.sites h3 { font-size: 15px; margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sites ul { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.sites li { display: flex; justify-content: space-between; padding: 7px 0; border-top: 1px solid var(--line-2); gap: 8px; }
.sites li:first-child { border-top: 0; }
.mobile-cta { display: none; }

/* ---------- footer ---------- */
.ftr { margin-top: 64px; background: var(--soft); border-top: 1px solid var(--line); padding: 40px 0 28px; font-size: 14px; }
.fcols { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 32px; }
.ftr h4 { font-size: 14px; margin-bottom: 10px; }
.ftr ul { list-style: none; margin: 0; padding: 0; }
.ftr li { padding: 3px 0; }
.ftr a { color: var(--ink-2); }
.ftr a:hover { color: var(--blue); }
.ftr .about { color: var(--ink-2); max-width: 320px; margin-top: 12px; }
.fbottom { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 16px; display: flex; justify-content: space-between; gap: 16px; color: var(--ink-3); flex-wrap: wrap; }

/* sources strip (home) */
.sources { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.source { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 14px; display: flex; gap: 10px; align-items: center; }
.source .fav { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 12px; flex: none; }
.source b { display: block; font-size: 14px; }
.source span { font-size: 13px; color: var(--ink-3); }
.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 16px; }
.how div { background: var(--soft); border-radius: var(--radius-lg); padding: 18px 20px; }
.how b { display: block; margin-bottom: 4px; }
.how p { margin: 0; color: var(--ink-2); font-size: 14px; }

.nb { display: grid; grid-template-columns: 1fr 2fr; gap: 24px; background: var(--ink); color: #fff; border-radius: 18px; padding: 28px; align-items: center; }
.nb h2 { font-size: 26px; }
.nb p { color: #C3CADB; margin: 10px 0 18px; }
.nb .grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.nb .vcard { border: 0; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .nav { display: none; }
  .burger { display: inline-grid; }
  .grid4 { grid-template-columns: repeat(2, 1fr); }
  .sources { grid-template-columns: repeat(3, 1fr); }
  .layout { grid-template-columns: 1fr; }
  .layout aside { display: none; }
  .lgrid { grid-template-columns: minmax(0, 1fr) 320px; }
}
@media (max-width: 900px) {
  .sbar { grid-template-columns: 1fr 1fr; }
  .sfield:nth-child(2) { border-right: 0; }
  .sfield:nth-child(3) { grid-column: 1 / -1; border-top: 1px solid var(--line); border-right: 0; }
  .sbar .btn { grid-column: 1 / -1; }
  .intro { grid-template-columns: 1fr 1fr 1fr; }
  .intro .trend { grid-column: 1 / -1; border-top: 1px solid var(--line); }
  .kpi:nth-child(3) { border-right: 0; }
  .hcard { grid-template-columns: 240px minmax(0, 1fr); }
  .hc-right { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line-2); display: grid; grid-template-columns: auto 1fr auto; align-items: center; column-gap: 16px; }
  .hc-right .src { margin: 0; padding: 0; grid-row: span 2; }
  .lgrid { grid-template-columns: 1fr; }
  .side { position: static; }
  .nb { grid-template-columns: 1fr; }
  .fcols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  .wrap { padding: 0 16px; }
  .hdr .wrap { gap: 12px; height: 56px; }
  .fbar { top: 56px; }
  .logo { font-size: 20px; }
  .hdr-right .btn, .hdr-right .fav-link { display: none; }
  .hero { padding: 24px 0 24px; }
  .hero h1 { font-size: 28px; }
  .hero p.lead { font-size: 15px; margin-bottom: 16px; }
  .tabs { overflow-x: auto; }
  .tab { padding: 10px 12px; white-space: nowrap; }
  .sbar { grid-template-columns: 1fr; }
  .sfield { border-right: 0 !important; border-top: 1px solid var(--line); }
  .sfield:first-child { border-top: 0; }
  .sfield:nth-child(3) { grid-column: auto; }
  .quick { flex-wrap: nowrap; overflow-x: auto; margin-left: -16px; margin-right: -16px; padding: 0 16px 4px; scrollbar-width: none; }
  .quick a { flex: none; }
  .sec { padding-top: 36px; }
  .sec-head h2 { font-size: 21px; }
  .prow { grid-template-columns: 1fr 76px 18px; gap: 10px; padding: 12px 14px; }
  .prow .bar, .prow .c { display: none; }
  .prow .dn small { display: block; font-weight: 400; color: var(--ink-3); font-size: 12px; }
  .grid4 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .vcard .body { padding: 10px 12px 12px; gap: 4px; }
  .vcard .price { font-size: 16px; }
  .vcard .t { font-size: 14px; }
  .vcard .addr { font-size: 13px; }
  .vcard .vb { font-size: 11px; padding: 2px 6px; }
  .vcard .foot { font-size: 12px; }
  .sources { grid-template-columns: 1fr 1fr; }
  .how { grid-template-columns: 1fr; }
  .nb { padding: 20px; }
  .nb .grid3 { grid-template-columns: 1fr; }
  .nb .grid3 .vcard:nth-child(n+2) { display: none; }
  .dhead h1 { font-size: 24px; }
  .intro { grid-template-columns: 1fr 1fr; }
  .kpi { padding: 12px 14px; }
  .kpi .v { font-size: 20px; }
  .kpi:nth-child(2) { border-right: 0; }
  .kpi:nth-child(3) { grid-column: 1 / -1; border-top: 1px solid var(--line); }
  .fbar { gap: 8px; overflow-x: auto; flex-wrap: nowrap; margin: 0 -16px; padding: 10px 16px; scrollbar-width: none; }
  .fbar > * { flex: none; }
  .fbar .spacer { display: none; }
  .hcard { grid-template-columns: 1fr; }
  .gal { min-height: 0; aspect-ratio: 4/3; }
  .gal .gbtn { opacity: 1; }
  .hc-mid { padding: 12px 14px 4px; }
  .hc-mid .t { font-size: 16px; }
  .hc-right { display: flex; padding: 4px 14px 14px; border-top: 0; }
  .hc-right .price { font-size: 20px; }
  .hc-right .src { margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--line-2); }
  .hc-right .price-line { order: -1; }
  #map { height: 70vh; }
  .lhead { flex-direction: column; gap: 10px; }
  .lhead h1 { font-size: 22px; }
  .bigal .main { border-radius: 10px; margin: 0 -16px; border-radius: 0; }
  .thumbs button { width: 72px; height: 52px; }
  .params { grid-template-columns: repeat(2, 1fr); }
  .param { border-bottom: 1px solid var(--line-2); }
  .param:nth-child(2n) { border-right: 0; }
  .param:last-child { grid-column: 1 / -1; border-bottom: 0; }
  .cmp, .hist { grid-template-columns: 1fr; gap: 14px; padding: 16px; }
  .facts { grid-template-columns: 1fr; }
  .pcard .price { font-size: 26px; }
  .mobile-cta { display: flex; position: fixed; left: 0; right: 0; bottom: 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--white); border-top: 1px solid var(--line); z-index: 50; gap: 10px; align-items: center; box-shadow: 0 -4px 16px rgba(15,27,51,.08); }
  .mobile-cta .p { font-weight: 800; font-size: 18px; flex: 1; line-height: 1.15; }
  .mobile-cta .p small { display: block; font-weight: 500; font-size: 12px; color: var(--ink-3); }
  body.has-cta { padding-bottom: 76px; }
  .fcols { grid-template-columns: 1fr 1fr; gap: 24px 16px; }
  .fcols > div:first-child { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---------- pass 2 fixes ---------- */
.hero-top { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; align-items: end; }
.hero h1 { max-width: 820px; }
.snap { display: grid; grid-template-columns: 1fr 1fr; margin: 0 0 24px; background: rgba(255,255,255,.7); border: 1px solid #DCE4F5; border-radius: var(--radius-lg); }
.snap div { padding: 12px 16px; }
.snap div:nth-child(odd) { border-right: 1px solid #DCE4F5; }
.snap div:nth-child(-n+2) { border-bottom: 1px solid #DCE4F5; }
.snap dt { font-size: 12px; color: var(--ink-3); }
.snap dd { margin: 2px 0 0; font-weight: 700; font-size: 20px; }
.price-pair input { width: 50%; }
.prow .arr { display: flex; justify-content: flex-end; }
.sec-head.wrapy { flex-wrap: wrap; }
.results-head .spacer { flex: 1; }
.results-head { gap: 10px; }
@media (max-width: 900px) {
  .hero-top { grid-template-columns: 1fr; gap: 0; }
  .snap { margin-bottom: 16px; }
}
@media (max-width: 640px) {
  .prow.head { display: none; }
  .vcard .foot span:last-child { display: none; }
  .snap dd { font-size: 17px; }
  .snap div { padding: 10px 12px; }
  .results-head .spacer { display: none; }
  .results-head .cnt { width: 100%; }
}
.m-price { display: none; }
@media (max-width: 640px) {
  .gal.nophoto { aspect-ratio: 16/7; }
  .gal.nophoto .ph-empty svg { display: none; }
  .m-price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
  .m-price .price { font-size: 21px; font-weight: 800; }
  .m-price .ppm { font-size: 14px; color: var(--ink-2); }
  .hc-right { flex-direction: column; align-items: stretch; gap: 8px; }
  .hc-right .price-line { display: none; }
  .hc-right .src { border-top: 1px solid var(--line-2); padding-top: 10px; margin-top: 2px; }
  .sort-l { display: none; }
  .snap { display: none; }
}
.hc-ruler { max-width: 320px; margin-top: 6px; }
.tags:empty { display: none; }
@media (max-width: 640px) { .hc-ruler { display: none; } .hc-meta { padding-top: 2px; } }
@media (max-width: 900px) {
  .lgrid { display: flex; flex-direction: column; gap: 0; }
  .lgrid > div:first-child { display: contents; }
  .lgrid .bigal, .lgrid .params { order: 0; }
  .lgrid .side { order: 1; margin-top: 16px; }
  .lgrid section.block { order: 2; }
}
.bigal .main.nophoto { aspect-ratio: 16/6; }
@media (max-width: 640px) { .bigal .main.nophoto { aspect-ratio: 16/8; } }
@media (max-width: 900px) { .lgrid section.block, .lgrid .side, .lgrid .bigal, .lgrid .params { width: 100%; } }

/* ---- v5.css ---- */
/* Kvartal V5: добавки к V1 (styles.css не меняем). Те же токены: белый, синий #1D58E0, ink #0F1B33, Onest, радиусы 8/14. */
body.lock { overflow: hidden; }

/* ---------- motion ---------- */
@keyframes rvIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes capIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes kb { from { transform: scale(1.08); } to { transform: scale(1); } }
@keyframes shim { from { background-position: 150% 0; } to { background-position: -50% 0; } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(29,88,224,.45); } 100% { box-shadow: 0 0 0 10px rgba(29,88,224,0); } }
@keyframes ctaIn { from { transform: translateY(110%); } to { transform: none; } }
.anim .rv { opacity: 0; }
.anim .rv.in { opacity: 1; animation: rvIn .65s cubic-bezier(.2,.7,.2,1) backwards; animation-delay: calc(var(--i, 0) * 70ms); }

/* skeleton shimmer while photos load */
.loading { background: linear-gradient(100deg, #EEF1F6 30%, #F8FAFD 50%, #EEF1F6 70%) #EEF1F6 !important; background-size: 200% 100% !important; animation: shim 1.2s linear infinite; }
img.sk { opacity: 0 !important; }
.ph img, .bg-slide img, .reel-slide img, .rs-item img, .dst img { transition: opacity .45s; }

/* hover lift + photo cross-fade (V1 card, more alive) */
.vcard { transition: box-shadow .25s, transform .25s cubic-bezier(.2,.7,.2,1); }
.vcard:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(15,27,51,.06), 0 12px 28px rgba(15,27,51,.10); }
.vcard .ph img.on { transition: opacity .45s, transform .7s cubic-bezier(.2,.7,.2,1); }
.vcard .ph img.alt { position: absolute; inset: 0; opacity: 0; transition: opacity .5s, transform .7s cubic-bezier(.2,.7,.2,1); }
.vcard:hover .ph img { transform: scale(1.035); }
.vcard:hover .ph img.alt { opacity: 1; }
.vcard .ph .tagnb, .vcard .ph .cnt { z-index: 1; }
.hcard { transition: box-shadow .25s, transform .25s cubic-bezier(.2,.7,.2,1); }
.hcard:hover { transform: translateY(-2px); }
.btn { transition: background .15s, border-color .15s, transform .15s; }
.btn:active { transform: scale(.98); }

/* value ruler: dot slides from the median to its place */
.ruler .dot { left: var(--pos, 50%); }
.anim .ruler .dot { transition: left 1.1s cubic-bezier(.2,.7,.2,1) .25s; }
.anim .ruler:not(.in) .dot { left: 50%; }
.anim .ruler.in .dot { animation: ping 1.2s 1.3s ease-out 1; }
/* price bars grow */
.anim .ptable .bar i { transition: width 1s cubic-bezier(.2,.7,.2,1); transition-delay: calc(var(--r, 0) * 60ms + .1s); }
.anim .ptable:not(.in) .bar i { width: 0 !important; }
.ptable .prow .bar i { transition-property: width; }
.prow .prow-row { display: contents; }

/* ---------- hero: search first, reel card on the right ---------- */
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: stretch; }
.hero-main { min-width: 0; }
.hero h1 { font-size: 40px; }
.snap.snap4 { grid-template-columns: repeat(4, 1fr); margin: 0 0 20px; }
.snap.snap4 div { border-bottom: 0 !important; border-right: 1px solid #DCE4F5; }
.snap.snap4 div:last-child { border-right: 0; }
.search-foot a { display: inline-flex; align-items: center; gap: 5px; }
.reel-col { display: flex; min-width: 0; }
@media (min-width: 901px) { .hero-main .sbar { grid-template-columns: auto 1.2fr 1.3fr auto; } }
.hero-main .rooms { flex-wrap: nowrap; }

/* reel card */
.reel { position: relative; flex: 1; min-height: 540px; border-radius: var(--radius-lg); overflow: hidden; background: var(--ink); color: #fff; box-shadow: var(--shadow-lg); isolation: isolate; }
.reel-media, .reel-slide { position: absolute; inset: 0; }
.reel-slide { opacity: 0; transition: opacity .6s; z-index: 0; }
.reel-slide.on { opacity: 1; z-index: 1; }
.reel-slide img { width: 100%; height: 100%; object-fit: cover; }
.anim .reel-slide.on img { animation: kb 6.5s ease-out both; }
.anim .reel.paused .reel-slide.on img { animation-play-state: paused; }
.reel-slide:focus-visible { outline-offset: -4px; }
.reel-shade, .sv-shade { position: absolute; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(180deg, rgba(15,27,51,.6) 0%, rgba(15,27,51,0) 24%, rgba(15,27,51,0) 42%, rgba(15,27,51,.88) 100%); }
.reel-bars, .sv-bars { position: absolute; top: 10px; left: 12px; right: 12px; display: flex; gap: 4px; z-index: 3; pointer-events: none; }
.reel-bars span, .sv-bars span { flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,.35); overflow: hidden; }
.reel-bars i, .sv-bars i { display: block; height: 100%; width: 0; background: #fff; border-radius: 2px; }
.reel-head, .sv-head { position: absolute; top: 22px; left: 12px; right: 12px; z-index: 3; display: flex; align-items: center; gap: 10px; }
.reel-head b, .sv-ttl b { display: block; font-size: 14px; font-weight: 700; line-height: 1.2; }
.reel-head span, .sv-ttl span { display: block; font-size: 12px; opacity: .85; line-height: 1.3; }
.reel-ava, .sv-ava { width: 38px; height: 38px; border-radius: 50%; padding: 2px; background: conic-gradient(from 210deg, #1D58E0, #4C82FF, #9CC0FF, #1D58E0); flex: none; }
.reel-ava > span, .sv-ava > img, .sv-ava > b { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; border: 2px solid #fff; overflow: hidden; background: var(--ink); object-fit: cover; color: #fff; font-size: 14px; }
.reel-ava svg { width: 22px; height: 22px; }
.sv-btn { width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255,255,255,.18); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: background .15s; }
.sv-btn:hover { background: rgba(255,255,255,.3); }
.reel-pp { margin-left: auto; }
.reel-cap { position: absolute; left: 16px; right: 16px; bottom: 16px; z-index: 3; cursor: pointer; }
.reel-cap .sv-tags { margin-bottom: 8px; }
.reel-price { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.reel-t { font-weight: 600; font-size: 15px; }
.reel-a { font-size: 14px; opacity: .85; }
.reel-more { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; background: #fff; color: var(--ink); font-weight: 600; font-size: 14px; height: 36px; padding: 0 14px; border-radius: 8px; transition: background .15s; }
.reel-cap:hover .reel-more { background: var(--blue-tint); }
.reel-cap.in > *, .sv-cap.in > * { animation: capIn .45s cubic-bezier(.2,.7,.2,1) backwards; }
.reel-cap.in > :nth-child(2), .sv-cap.in > :nth-child(2) { animation-delay: .05s; }
.reel-cap.in > :nth-child(3), .sv-cap.in > :nth-child(3) { animation-delay: .1s; }
.reel-cap.in > :nth-child(4), .sv-cap.in > :nth-child(4) { animation-delay: .15s; }
.reel-cap.in > :nth-child(n+5), .sv-cap.in > :nth-child(n+5) { animation-delay: .2s; }
.reel-nav { position: absolute; top: 46%; z-index: 4; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255,255,255,.94); color: var(--ink); display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity .2s; box-shadow: 0 2px 8px rgba(0,0,0,.18); }
.reel-nav.prev { left: 10px; } .reel-nav.next { right: 10px; }
.reel:hover .reel-nav, .reel-nav:focus-visible { opacity: 1; }
.sv-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.sv-tags .vb { font-size: 12.5px; }

/* mobile reel strip (under the search) */
.rstrip { display: none; margin-top: 18px; }
.rstrip-h { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.rstrip-h b { font-size: 16px; font-weight: 700; white-space: nowrap; }
.rstrip-h span { font-size: 13px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rstrip-all { margin-left: auto; border: 0; background: none; color: var(--blue); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 2px; cursor: pointer; padding: 4px 0; flex: none; }
.rstrip-row { position: relative; display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x proximity; margin: 0 -16px; padding: 4px 16px 8px; scrollbar-width: none; }
.rstrip-row::-webkit-scrollbar { display: none; }
.rs-item { flex: 0 0 128px; margin-top: 2px; height: 184px; border-radius: 12px; overflow: hidden; position: relative; scroll-snap-align: start; color: #fff; background: var(--soft); transition: box-shadow .25s, transform .25s; }
.rs-item:hover { color: #fff; }
.rs-item img { width: 100%; height: 100%; object-fit: cover; }
.rs-item::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15,27,51,.35) 0, rgba(15,27,51,0) 30%, rgba(15,27,51,0) 50%, rgba(15,27,51,.85) 100%); }
.rs-item.on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--blue); }
.rs-bar { position: absolute; top: 8px; left: 8px; right: 8px; height: 3px; background: rgba(255,255,255,.4); border-radius: 2px; z-index: 2; overflow: hidden; }
.rs-bar i { display: block; height: 100%; width: 0; background: #fff; }
.rs-cap { position: absolute; left: 9px; right: 9px; bottom: 9px; z-index: 2; display: flex; flex-direction: column; line-height: 1.2; }
.rs-cap b { font-size: 15px; font-weight: 800; }
.rs-cap small { font-size: 12px; opacity: .9; }
.rs-cap em { font-style: normal; position: absolute; right: 0; top: -122px; background: var(--good-tint); color: var(--good); font-size: 11.5px; font-weight: 700; padding: 2px 6px; border-radius: 5px; }

/* district stories (round, V1 blue ring) */
.dstories { display: flex; gap: 8px; overflow-x: auto; margin-top: 22px; padding: 4px 2px 6px; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent); mask-image: linear-gradient(90deg, #000 92%, transparent); }
.dstories::-webkit-scrollbar { display: none; }
.dst { flex: none; width: 86px; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--ink); text-align: center; border-radius: 10px; }
.dst:hover { color: var(--blue); }
.dst-ring { width: 70px; height: 70px; border-radius: 50%; padding: 3px; background: conic-gradient(from 210deg, #1D58E0, #4C82FF, #9CC0FF, #1D58E0); transition: transform .25s cubic-bezier(.2,.7,.2,1); margin-bottom: 4px; }
.dst-ph { display: block; width: 100%; height: 100%; border-radius: 50%; border: 2.5px solid #fff; overflow: hidden; background: var(--blue-tint); }
.dst-ph img { width: 100%; height: 100%; object-fit: cover; }
.dst-ph i { font-style: normal; display: grid; place-items: center; height: 100%; font-weight: 800; color: var(--blue); font-size: 22px; }
.dst.zk .dst-ring { background: conic-gradient(from 210deg, #0F1B33, #1D58E0, #4C82FF, #0F1B33); }
.dst.seen .dst-ring { background: #CDD4E1; }
.dst.cur .dst-ring { background: var(--ink); }
.dst:hover .dst-ring { transform: scale(1.06); }
.dst b { font-size: 12.5px; font-weight: 600; line-height: 1.2; max-width: 86px; }
.dst small { font-size: 11.5px; color: var(--ink-3); }
.dhead + .dstories { margin-top: 14px; }

/* ---------- story viewer ---------- */
.sv { position: fixed; inset: 0; z-index: 120; display: flex; align-items: center; justify-content: center; gap: 24px; }
.sv[hidden] { display: none; }
.sv-bg { position: absolute; inset: 0; background: rgba(15,27,51,.94); opacity: 0; transition: opacity .22s; }
.sv.open .sv-bg { opacity: 1; }
.sv-frame { position: relative; height: min(88vh, 820px); aspect-ratio: 9 / 16; max-width: 100vw; border-radius: 16px; overflow: hidden; background: #0B1426; color: #fff; transform: scale(.94); opacity: 0; transition: transform .25s cubic-bezier(.2,.7,.2,1), opacity .2s; box-shadow: 0 24px 64px rgba(0,0,0,.4); user-select: none; }
.sv.open .sv-frame { transform: none; opacity: 1; }
.sv-media, .sv-m { position: absolute; inset: 0; }
.sv-m { opacity: 0; transition: opacity .4s; }
.sv-m.on { opacity: 1; }
.sv-m img { width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; }
.anim .sv-m.on img { animation: kb 6.5s ease-out both; }
.anim .sv.paused .sv-m.on img { animation-play-state: paused; }
.sv-empty { height: 100%; display: grid; place-items: center; align-content: center; gap: 8px; color: #9AA6BE; font-size: 14px; background: repeating-linear-gradient(135deg, #132038 0 12px, #16243F 12px 24px); }
.sv-head .sv-pp { margin-left: auto; }
.sv-ttl { min-width: 0; }
.sv-ttl span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sv-cap { position: absolute; left: 18px; right: 18px; bottom: 20px; z-index: 3; }
.sv-cap .sv-tags { margin-bottom: 10px; }
.sv-price { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.sv-price small, .zcard .price small { font-size: 16px; font-weight: 600; opacity: .8; margin-left: 2px; }
.sv-h { font-size: 36px; font-weight: 800; letter-spacing: -0.02em; }
.sv-t { font-size: 16px; font-weight: 600; margin-top: 4px; }
.sv-a { font-size: 14px; opacity: .88; margin-top: 4px; display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.sv-chip { font-size: 12px; font-weight: 600; background: rgba(255,255,255,.18); padding: 3px 8px; border-radius: 6px; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.sv-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0 10px; }
.sv-kpis div, .sv-trend { background: rgba(255,255,255,.13); border-radius: 10px; padding: 10px 12px; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.sv-kpis span, .sv-trend span { display: block; font-size: 12px; opacity: .8; }
.sv-kpis b { display: block; font-size: 22px; font-weight: 800; }
.sv-kpis small { display: block; font-size: 11.5px; opacity: .8; }
.sv-spark { display: block; width: 100%; height: 46px; margin-top: 4px; }
.sv-note { font-size: 14px; opacity: .85; margin: 10px 0 0; }
.sv-cta { display: flex; align-items: center; gap: 14px; margin-top: 16px; flex-wrap: wrap; }
.sv-cta .btn { height: 46px; padding: 0 22px; }
.sv-link { color: #fff; font-weight: 600; font-size: 14px; opacity: .92; }
.sv-link:hover { color: #fff; opacity: 1; text-decoration: underline; }
.sv-src { font-size: 13px; opacity: .75; }
.sv-nav { position: relative; z-index: 2; width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,.94); border: 0; color: var(--ink); display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity .2s .1s; }
.sv.open .sv-nav { opacity: 1; }
.sv-nav:disabled { opacity: .3 !important; cursor: default; }

/* ---------- gallery: swipe track + fullscreen ---------- */
.v5gal .bg-main { position: relative; aspect-ratio: 16 / 10; border-radius: var(--radius-lg); overflow: hidden; background: var(--soft); }
.bg-track { position: absolute; inset: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; cursor: zoom-in; overscroll-behavior-x: contain; }
.bg-track::-webkit-scrollbar { display: none; }
.bg-track.drag { scroll-snap-type: none; cursor: grabbing; }
.bg-slide { flex: 0 0 100%; margin: 0; scroll-snap-align: start; position: relative; }
.bg-slide img { width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; user-select: none; }
.v5gal .gbtn { z-index: 2; opacity: 0; transition: opacity .2s; }
.v5gal .bg-main:hover .gbtn, .v5gal .gbtn:focus-visible { opacity: 1; }
.bg-cnt { position: absolute; right: 12px; bottom: 12px; background: rgba(15,27,51,.72); color: #fff; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 6px; z-index: 2; pointer-events: none; }
.bg-full { position: absolute; left: 12px; bottom: 12px; z-index: 2; height: 32px; padding: 0 10px; border: 0; border-radius: 8px; background: rgba(255,255,255,.95); color: var(--ink); font-size: 13px; font-weight: 600; display: inline-flex; gap: 6px; align-items: center; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.bg-dots { display: none; position: absolute; left: 0; right: 0; bottom: 14px; justify-content: center; gap: 5px; z-index: 2; pointer-events: none; }
.bg-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.55); transition: width .25s, background .25s; }
.bg-dots i.on { background: #fff; width: 16px; border-radius: 3px; }
.v5gal .thumbs button { transition: border-color .2s, opacity .2s; opacity: .75; }
.v5gal .thumbs button[aria-current="true"] { opacity: 1; }

.lb { position: fixed; inset: 0; z-index: 130; background: rgba(11,20,38,.97); display: flex; flex-direction: column; opacity: 0; transition: opacity .2s; color: #fff; }
.lb[hidden] { display: none; }
.lb.open { opacity: 1; }
.lb-top { display: flex; align-items: center; gap: 14px; padding: 12px 16px; }
.lb-cnt { font-weight: 700; }
.lb-t { flex: 1; min-width: 0; font-size: 14px; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-track { flex: 1; min-height: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior: contain; }
.lb-track::-webkit-scrollbar { display: none; }
.lb-track figure { flex: 0 0 100%; margin: 0; scroll-snap-align: center; display: flex; align-items: center; justify-content: center; padding: 0 76px; min-height: 0; }
.lb-track img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; -webkit-user-drag: none; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,.94); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.lb-nav.prev { left: 16px; } .lb-nav.next { right: 16px; }
.lb-thumbs { display: flex; gap: 8px; justify-content: center; padding: 12px 16px 16px; overflow-x: auto; }
.lb-thumbs button { width: 72px; height: 50px; border: 2px solid transparent; border-radius: 8px; overflow: hidden; padding: 0; opacity: .55; background: none; cursor: pointer; flex: none; transition: opacity .2s, border-color .2s; }
.lb-thumbs button[aria-current="true"] { border-color: #fff; opacity: 1; }
.lb-thumbs img { width: 100%; height: 100%; object-fit: cover; }

/* mobile sticky CTA: «Связаться / Смотреть на источнике» */
.v5cta .mcta-b { display: flex; gap: 8px; flex: none; }
.v5cta .p { min-width: 0; font-size: 17px; }
.v5cta .p small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v5cta .btn { padding: 0 12px; }
.anim .v5cta { animation: ctaIn .5s .4s cubic-bezier(.2,.7,.2,1) backwards; }

/* ---------- ЖК cards (V1 vcard) ---------- */
.zcard .zname { font-size: 18px; font-weight: 700; line-height: 1.25; }
.zcard .price { font-size: 20px; font-weight: 800; margin-top: 2px; }
.zcard .price small { color: var(--ink-2); opacity: 1; font-size: 14px; }
.zcard .t { color: var(--ink-2); font-size: 14px; font-weight: 400; }
.zcard .t b { color: var(--ink); font-weight: 700; }
.zcard .ph .cnt { background: var(--white); color: var(--good); box-shadow: 0 1px 2px rgba(0,0,0,.1); }
.nb .grid3.zrow .vcard:nth-child(n+4) { display: none; }
.nb-note { font-size: 13px; color: #8F9BB5 !important; margin: 14px 0 0 !important; }
.zgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.zt { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: auto; }
.zt table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 720px; }
.zt th { background: var(--soft); color: var(--ink-3); font-weight: 500; font-size: 13px; text-align: left; padding: 10px 16px; }
.zt td { padding: 12px 16px; border-top: 1px solid var(--line-2); }
.zt .r { text-align: right; }
.zt td a { font-weight: 600; color: var(--ink); }
.zt td a:hover { color: var(--blue); }
.zt tbody tr { transition: background .15s; }
.zt tbody tr:hover { background: #FAFBFD; }
.rooms-t td:first-child { font-weight: 600; }
.zbar { height: 6px; border-radius: 3px; background: var(--line-2); overflow: hidden; margin-top: 6px; min-width: 80px; }
.zbar i { display: block; height: 100%; background: var(--blue); border-radius: 3px; }
.anim .zt:not(.in) .zbar i { width: 0 !important; }
.anim .zt .zbar i { transition: width 1s cubic-bezier(.2,.7,.2,1) .2s; }

/* ---------- drawer (working burger, V1 white) ---------- */
.drawer { position: fixed; inset: 0; z-index: 110; visibility: hidden; pointer-events: none; transition: visibility 0s .3s; }
.drawer.open { visibility: visible; pointer-events: auto; transition: visibility 0s; }
.drawer-bg { position: absolute; inset: 0; width: 100%; background: rgba(15,27,51,.45); opacity: 0; transition: opacity .25s; border: 0; padding: 0; cursor: pointer; }
.drawer.open .drawer-bg { opacity: 1; }
.drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(380px, 100%); background: var(--white); box-shadow: var(--shadow-lg); padding: 8px 16px 24px; overflow-y: auto; transform: translateX(100%); transition: transform .3s cubic-bezier(.2,.7,.2,1); display: flex; flex-direction: column; gap: 14px; }
.drawer.open .drawer-panel { transform: none; }
.drawer-top { display: flex; justify-content: space-between; align-items: center; height: 48px; }
.drawer-nav { display: flex; flex-direction: column; }
.drawer-nav a { display: flex; justify-content: space-between; align-items: center; padding: 13px 4px; border-bottom: 1px solid var(--line-2); color: var(--ink); font-weight: 600; font-size: 17px; }
.drawer-nav a:hover { color: var(--blue); }
.drawer-nav small { color: var(--ink-3); font-weight: 500; font-size: 13px; }
.drawer h3 { font-size: 13px; color: var(--ink-3); font-weight: 600; margin: 6px 0 0; }
.drawer-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.drawer-chips a { display: inline-flex; gap: 6px; align-items: baseline; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; color: var(--ink); font-size: 14px; font-weight: 500; }
.drawer-chips a b { font-weight: 500; color: var(--ink-3); font-size: 13px; }
.drawer-row { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 10px; }

/* ---------- footer: sources ---------- */
.fsrc { padding-bottom: 28px; margin-bottom: 28px; border-bottom: 1px solid var(--line); }
.fsrc-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.fsrc-head h4 { font-size: 16px; margin: 0; }
.fsrc-key { margin-left: auto; font-size: 13px; color: var(--ink-3); display: inline-flex; align-items: center; gap: 6px; }
.fsrc-key i { width: 7px; height: 7px; border-radius: 50%; background: var(--good); }
.fsrc-cols { display: grid; grid-template-columns: 1fr 2fr 1fr 1fr; gap: 24px; }
.fsrc h5 { font-size: 13px; margin: 0 0 8px; color: var(--ink); font-weight: 700; }
.fsrc h5 small { color: var(--ink-3); font-weight: 500; }
.fsrc-cols > div:nth-child(2) ul { columns: 2; column-gap: 24px; }
.fsrc li { padding: 2px 0; font-size: 13.5px; break-inside: avoid; }
.fsrc li.live a { color: var(--ink); font-weight: 600; }
.fsrc li.live a::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--good); margin-right: 6px; vertical-align: 2px; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; }
  .zgrid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .reel-col { display: none; }
  .rstrip { display: block; }
  .fsrc-cols { grid-template-columns: 1fr 1fr; }
  .fsrc-cols > div:nth-child(2) { grid-column: 1 / -1; order: -1; }
  .nb .grid3.zrow { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; margin: 0 -20px; padding: 0 20px 4px; scrollbar-width: none; }
  .nb .grid3.zrow .vcard { flex: 0 0 min(300px, 78%); scroll-snap-align: start; display: flex !important; }
}
@media (max-width: 640px) {
  .hero h1 { font-size: 28px; }
  .snap.snap4 { display: none; }
  .dstories { gap: 10px; margin-top: 18px; margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; }
  .dst { width: 68px; }
  .dst-ring { width: 62px; height: 62px; }
  .dst b { font-size: 12px; }
  .sv { gap: 0; }
  .sv-frame { height: 100%; width: 100%; aspect-ratio: auto; border-radius: 0; }
  .sv-nav { display: none; }
  .sv-price { font-size: 30px; }
  .sv-cap { bottom: calc(20px + env(safe-area-inset-bottom)); }
  .lb-track figure { padding: 0; }
  .lb-track img { border-radius: 0; }
  .lb-nav { display: none; }
  .v5gal .bg-main { aspect-ratio: 1 / 1; margin: 0 -16px; border-radius: 0; }
  .v5gal .gbtn { display: none; }
  .bg-dots { display: flex; }
  .bg-full { top: 12px; bottom: auto; left: auto; right: 12px; width: 36px; padding: 0; justify-content: center; font-size: 0; gap: 0; }
  .bg-cnt { bottom: auto; top: 12px; left: 12px; right: auto; }
  .v5gal .thumbs { display: none; }
  .nb .grid3.zrow { margin: 0 -20px; }
  .zgrid { grid-template-columns: 1fr; gap: 12px; }
  .fsrc-cols { gap: 18px 16px; }
  .fsrc-head { gap: 4px 12px; }
  .fsrc-key { margin-left: 0; }
  .v5cta { gap: 8px; }
  .v5cta .p { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .anim .rv { opacity: 1; }
  .vcard:hover, .hcard:hover { transform: none; }
}

/* ---- site.css ---- */
/* ===== kvartal.am site additions on top of the V5 mock CSS (styles.css + v5.css, unchanged) ===== */
/* links styled like the mock's buttons (server-rendered links instead of JS buttons) */
.lang a { border: 0; background: none; padding: 5px 9px; border-radius: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer; text-decoration: none; }
.lang a[aria-pressed="true"] { background: var(--white); color: var(--ink); box-shadow: 0 1px 2px rgba(15,27,51,.12); }
.seg a { border: 0; background: none; height: 32px; padding: 0 12px; border-radius: 7px; font-weight: 600; font-size: 14px; color: var(--ink-2); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.seg a[aria-pressed="true"] { background: var(--white); color: var(--ink); box-shadow: 0 1px 2px rgba(15,27,51,.12); }
.pager a, .pager span { min-width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--line); background: var(--white); font-weight: 600; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); text-decoration: none; }
.pager span[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.pager .pg-dis { opacity: .4; }
.pager .pg-gap { border: 0; background: none; min-width: 20px; padding: 0; }
.pager a:hover { border-color: var(--blue); color: var(--blue); }

/* first-sentence answer on price pages (AI/GEO) */
.answer { font-size: 18px; line-height: 1.55; color: var(--ink); max-width: 880px; margin: 6px 0 4px; }
.method h2 { font-size: 18px; margin: 20px 0 6px; }
.method p { max-width: 820px; }
.rlinks { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.rlinks .aside-box { margin: 0; }
.fdisc { font-size: 12.5px; color: var(--ink-3); line-height: 1.5; margin: 18px 0 0; max-width: 980px; }
.fdisc a { color: var(--ink-2); }
.src .fav svg { width: 13px; height: 13px; }
.srcblock .fav svg { width: 15px; height: 15px; }
.nf h1 { letter-spacing: -.01em; }

/* mortgage calculator */
.mcalc { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 4px; }
.mcalc label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink-3); }
.mcalc input, .mcalc select { height: 42px; border: 1px solid var(--line); border-radius: 9px; padding: 0 12px; font: inherit; font-size: 15px; color: var(--ink); background: var(--white); width: 100%; min-width: 0; }
.mcalc input:focus, .mcalc select:focus { outline: 2px solid var(--blue); outline-offset: 0; border-color: var(--blue); }
.mcalc small { font-size: 11.5px; color: var(--ink-3); }
.mres { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--radius-lg, 14px); margin-top: 16px; }
.mres > div { padding: 14px 18px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.mres > div:last-child { border-right: 0; }
.mres span { font-size: 13px; color: var(--ink-3); }
.mres b { font-size: 22px; font-weight: 700; color: var(--ink); }
.mres > div:first-child b { color: var(--blue); }
.msched { margin-top: 12px; }
.msched summary { cursor: pointer; font-weight: 600; color: var(--blue); padding: 6px 0; }

/* nearby (OSM) */
.near { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px 20px; margin-bottom: 14px; }
.near h3 { font-size: 14px; margin: 0 0 6px; display: flex; gap: 6px; align-items: baseline; }
.near h3 small { color: var(--ink-3); font-weight: 500; }
.near ul { list-style: none; margin: 0; padding: 0; }
.near li { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; padding: 4px 0; border-bottom: 1px solid var(--line-2, #EEF1F6); }
.near li span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.near li .num { color: var(--ink-3); flex: none; }
.poi { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(15,27,51,.35); }

/* horizontal scrollers (stories row, «Квартиры дня» strip): wheel, edge auto-scroll, drag, fades, arrows */
.hscroll { position: relative; }
.hscroll .dstories { -webkit-mask-image: none; mask-image: none; }
.hscroll.can-r .dstories, .hscroll.can-r .rstrip-row { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent); }
.hscroll.can-l .dstories, .hscroll.can-l .rstrip-row { -webkit-mask-image: linear-gradient(90deg, transparent, #000 56px); mask-image: linear-gradient(90deg, transparent, #000 56px); }
.hscroll.can-l.can-r .dstories, .hscroll.can-l.can-r .rstrip-row { -webkit-mask-image: linear-gradient(90deg, transparent, #000 56px, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(90deg, transparent, #000 56px, #000 calc(100% - 56px), transparent); }
.hs-btn { position: absolute; top: 30px; z-index: 3; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: var(--white); color: var(--ink); display: none; place-items: center; cursor: pointer; box-shadow: 0 2px 8px rgba(15,27,51,.14); padding: 0; transition: opacity .2s, transform .2s; }
.hs-btn:hover { color: var(--blue); border-color: var(--blue); transform: scale(1.06); }
.hs-btn.prev { left: -6px; } .hs-btn.next { right: -6px; }
.hs-strip .hs-btn { top: 50%; margin-top: -15px; }
@media (hover: hover) and (pointer: fine) {
  .hscroll.can-l .hs-btn.prev, .hscroll.can-r .hs-btn.next { display: grid; }
  .hscroll .dstories, .hscroll .rstrip-row { cursor: grab; }
  .hscroll.dragging .dstories, .hscroll.dragging .rstrip-row { cursor: grabbing; scroll-snap-type: none; user-select: none; }
  .hscroll.dragging a { pointer-events: none; }
}
.hscroll .dstories img, .hscroll .rstrip-row img { -webkit-user-drag: none; user-select: none; }

@media (max-width: 900px) {
  .mcalc { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .mres { grid-template-columns: 1fr; }
  .mres > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .mres > div:last-child { border-bottom: 0; }
  .answer { font-size: 16px; }
  .pager a, .pager span { min-width: 36px; height: 36px; padding: 0 9px; }
}

@media (max-width: 640px) {
  .sec-head { flex-wrap: wrap; row-gap: 4px; }
  .sec-head a { white-space: normal; }
}
