:root {
  /* Samarqand koshinlari: lojuvard (lapis) moviy + firuza + oltin */
  --brand: #1b5e9e;
  --brand-dark: #154a7d;
  --brand-600: #2474bd;
  --brand-50: #eef5fc;
  --brand-100: #d6e7f7;
  --tile: #149bb0;
  --grad: linear-gradient(100deg, #1b5e9e 0%, #2474bd 45%, #149bb0 100%);
  --ink: #1c1f23;
  --ink-2: #3f4750;
  --muted: #6a717b;
  --line: #e4e7eb;
  --bg: #ffffff;
  --bg-soft: #f5f7f9;
  --top: #e9a83a;
  --top-bg: #fdf5e6;
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%231b5e9e' stroke-opacity='.09' stroke-width='1.3'%3E%3Crect x='20' y='20' width='24' height='24'/%3E%3Crect x='20' y='20' width='24' height='24' transform='rotate(45 32 32)'/%3E%3Ccircle cx='32' cy='32' r='6'/%3E%3Cpath d='M0 0l12 12M64 0L52 12M0 64l12-12M64 64L52 52'/%3E%3C/g%3E%3C/svg%3E");
  --pattern-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.10' stroke-width='1.3'%3E%3Crect x='20' y='20' width='24' height='24'/%3E%3Crect x='20' y='20' width='24' height='24' transform='rotate(45 32 32)'/%3E%3Ccircle cx='32' cy='32' r='6'/%3E%3Cpath d='M0 0l12 12M64 0L52 12M0 64l12-12M64 64L52 52'/%3E%3C/g%3E%3C/svg%3E");
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --ok: #15803d;
  --ok-bg: #f0fdf4;
  --info: #2563eb;
  --info-bg: #eff6ff;
  --star: #f5a524;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 6px 20px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 40px rgba(0,0,0,.16);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 15px; line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: 30px; } h2 { font-size: 22px; } h3 { font-size: 18px; }
p { margin: 0 0 .8em; }
.container { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); } .small { font-size: 13px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.hidden { display: none !important; }
.loading { padding: 80px; text-align: center; color: var(--muted); }

/* ---------- Header ---------- */
.header { position: sticky; top: 0; z-index: 1000; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 18px; height: 68px; }
.logo { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 22px; color: var(--brand); letter-spacing: -.03em; }
.logo b { color: var(--tile); font-weight: 800; }
.logo svg { width: 36px; height: 36px; flex: none; }
.logo-sm { font-size: 18px; } .logo-sm svg { width: 28px; height: 28px; }
.hsearch { display: flex; align-items: center; gap: 0; border: 1px solid var(--line); border-radius: 999px; padding: 6px 6px 6px 18px; box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 4px 12px rgba(0,0,0,.05); font-size: 14px; font-weight: 600; margin-left: 24px; transition: box-shadow .2s; }
.hsearch:hover { box-shadow: 0 2px 4px rgba(0,0,0,.08), 0 8px 20px rgba(0,0,0,.08); }
.hsearch span { padding: 0 14px; border-right: 1px solid var(--line); }
.hsearch span:first-child { padding-left: 0; }
.hsearch span.m { color: var(--muted); font-weight: 400; border: none; }
.hsearch i { width: 32px; height: 32px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-style: normal; }
.hsearch i svg { width: 14px; height: 14px; }
.nav { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.nav a.navlink { padding: 8px 12px; border-radius: 999px; font-weight: 500; color: var(--ink-2); }
.nav a.navlink:hover { background: var(--bg-soft); }
.badge-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 12px; font-weight: 700; margin-left: 4px; }
.user-chip { display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border: 1px solid var(--line); border-radius: 999px; font-weight: 600; }
.user-chip:hover { box-shadow: var(--shadow); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--brand-100); color: var(--brand); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.avatar.lg { width: 72px; height: 72px; font-size: 26px; }
.avatar.md { width: 48px; height: 48px; font-size: 17px; }

/* ---------- Buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border-radius: var(--radius-sm); border: 1px solid transparent; font: inherit; font-weight: 600; cursor: pointer; transition: .15s; white-space: nowrap; background: var(--bg-soft); color: var(--ink); }
.btn:hover { filter: brightness(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); filter: none; }
.btn-grad { background: var(--grad); color: #fff; background-size: 140% 100%; background-position: 0 0; transition: background-position .3s; }
.btn-grad:hover { background-position: 100% 0; filter: none; }
.btn-outline { background: #fff; border-color: var(--ink); color: var(--ink); }
.btn-ghost { background: transparent; border-color: var(--line); }
.btn-danger { background: var(--danger-bg); color: var(--danger); }
.btn-ok { background: var(--ok); color: #fff; }
.btn-top { background: var(--top); color: #1f1300; }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }
.link-btn { background: none; border: none; color: var(--brand); font: inherit; font-weight: 600; cursor: pointer; padding: 0; }

label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.req::after { content: " *"; color: var(--danger); }
input[type=text], input[type=tel], input[type=number], input[type=date], input[type=time], select, textarea {
  width: 100%; padding: 11px 12px; border: 1px solid #d5d9de; border-radius: var(--radius-sm); font: inherit; color: var(--ink); background: #fff; outline: none; transition: border .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand-600); box-shadow: 0 0 0 3px var(--brand-100); }
textarea { min-height: 96px; resize: vertical; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 14px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 14px; }
.err { color: var(--danger); font-size: 13px; margin-top: 4px; }
.input-err { border-color: var(--danger) !important; }

.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.check { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; user-select: none; font-size: 14px; }
.check:hover { border-color: #c4c9cf; }
.check input { width: 17px; height: 17px; accent-color: var(--brand); margin: 0; }
.check.on { border-color: var(--brand-600); background: var(--brand-50); }

.seg { display: inline-flex; background: var(--bg-soft); border-radius: 12px; padding: 4px; gap: 4px; flex-wrap: wrap; }
.seg button { border: none; background: transparent; padding: 9px 14px; border-radius: 9px; font: inherit; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }

.role-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.role-card { border: 2px solid var(--line); border-radius: var(--radius); padding: 14px; cursor: pointer; text-align: left; background: #fff; font: inherit; }
.role-card.on { border-color: var(--brand); background: var(--brand-50); }
.role-card b { display: block; margin: 6px 0 2px; }
.role-card .ic { font-size: 22px; }

/* ---------- Hero ---------- */
.hero { background: var(--pattern), linear-gradient(180deg, var(--brand-50), #fff 92%); padding: 60px 0 44px; text-align: center; }
.hero h1 { font-size: 46px; font-weight: 800; letter-spacing: -.035em; max-width: 760px; margin: 0 auto .35em; }
.hero h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 18px; color: var(--ink-2); max-width: 640px; margin: 0 auto; }
.searchbar { margin: 28px auto 0; max-width: 920px; text-align: left; display: grid; grid-template-columns: 1.2fr 1fr 1fr 1.1fr auto; background: #fff; border: 1px solid var(--line); border-radius: 999px; box-shadow: 0 3px 12px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05); padding: 8px; gap: 0; align-items: center; }
.searchbar .sb-item { padding: 6px 22px; border-right: 1px solid var(--line); border-radius: 999px; transition: background .15s; }
.searchbar .sb-item:hover { background: var(--bg-soft); }
.searchbar .sb-item:nth-last-child(2) { border-right: none; }
.searchbar .sb-item small { display: block; font-size: 12px; font-weight: 700; color: var(--ink); }
.searchbar .sb-item select, .searchbar .sb-item input { border: none; padding: 2px 0; box-shadow: none !important; background: transparent; font-size: 14px; color: var(--ink-2); }
.searchbar .btn { border-radius: 999px; padding: 0 24px; height: 50px; }
.hero .chips { justify-content: center; }

/* Kategoriyalar qatori (Airbnb uslubida) */
.catbar { display: flex; gap: 30px; overflow-x: auto; padding: 18px 2px 0; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.catbar::-webkit-scrollbar { display: none; }
.cat { display: flex; flex-direction: column; align-items: center; gap: 7px; padding-bottom: 12px; border-bottom: 2px solid transparent; color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; opacity: .85; transition: .15s; }
.cat svg { width: 26px; height: 26px; }
.cat:hover { color: var(--ink); opacity: 1; border-bottom-color: #c9ced4; }
.cat.on { color: var(--brand); opacity: 1; border-bottom-color: var(--brand); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.chip { padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 14px; font-weight: 500; cursor: pointer; }
.chip:hover { border-color: var(--ink); }

.section { padding: 34px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; margin-bottom: 18px; gap: 12px; }
.section-head h2 { margin: 0; }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 34px 22px; }
.card { position: relative; display: block; }
.card .ph { position: relative; aspect-ratio: 20/19; border-radius: 16px; overflow: hidden; background: var(--bg-soft); }
.slides { display: flex; width: 100%; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.slides::-webkit-scrollbar { display: none; }
.slides img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: start; }
.cnav { position: absolute; top: 50%; transform: translateY(-50%) scale(.9); width: 32px; height: 32px; border-radius: 50%; border: none; background: rgba(255,255,255,.92); box-shadow: 0 2px 6px rgba(0,0,0,.18); cursor: pointer; font-size: 18px; line-height: 1; color: var(--ink); opacity: 0; transition: .15s; z-index: 2; display: grid; place-items: center; padding: 0 0 2px; }
.cnav.prev { left: 10px; } .cnav.next { right: 10px; }
.card:hover .cnav { opacity: 1; transform: translateY(-50%) scale(1); }
.card .ph.first .cnav.prev, .card .ph.last .cnav.next { opacity: 0 !important; pointer-events: none; }
.dots { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 5px; z-index: 2; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.6); transition: .15s; }
.dots i.on { background: #fff; transform: scale(1.15); }
.card.is-top .ph::after { content: ""; position: absolute; inset: 0; border: 3px solid var(--top); border-radius: 16px; pointer-events: none; }
.tag { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; z-index: 2; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.pill-top { background: var(--top); color: #1f1300; }
.pill-agent { background: #ede9fe; color: #5b21b6; box-shadow: none; }
.pill-owner { background: var(--brand-50); color: var(--brand); box-shadow: none; }
.pill-gray { background: var(--bg-soft); color: var(--ink-2); box-shadow: none; }
.pill-ok { background: var(--ok-bg); color: var(--ok); box-shadow: none; }
.pill-danger { background: var(--danger-bg); color: var(--danger); box-shadow: none; }
.pill-info { background: var(--info-bg); color: var(--info); box-shadow: none; }
.pill-warn { background: var(--top-bg); color: #92400e; box-shadow: none; }
.photo-count { position: absolute; bottom: 10px; right: 10px; background: rgba(0,0,0,.55); color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 999px; }
.fav { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border: none; background: transparent; cursor: pointer; display: grid; place-items: center; z-index: 3; padding: 0; transition: transform .15s; }
.fav:hover { transform: scale(1.1); }
.fav svg { width: 26px; height: 26px; fill: rgba(0,0,0,.45); stroke: #fff; stroke-width: 2; }
.fav.on svg { fill: #e63e5c; }
.fav.plain svg { fill: none; stroke: var(--ink); width: 18px; height: 18px; }
.fav.plain:hover { transform: none; }
.fav.plain.on svg { fill: #e63e5c; stroke: #e63e5c; }
.card .body { padding: 12px 2px 0; font-size: 14.5px; }
.card .line1 { display: flex; justify-content: space-between; gap: 8px; font-weight: 600; }
/* Joylashuv nomi to'liq ko'rinadi; narx sig'masa — keyingi qatorga o'tadi */
.card .line1 { align-items: flex-start; }
.card .line1 .loc-price { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 6px; row-gap: 0; min-width: 0; }
.card .line1 .loc { flex: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .line1 .loc::after { content: " ·"; color: var(--muted); font-weight: 400; }
.card .line1 .cprice { flex: none; white-space: nowrap; color: var(--brand); font-weight: 800; }
.card .line1 .cprice span { color: var(--muted); font-weight: 500; font-size: 13px; }
.card .line1 > .stars, .card .line1 > .new-user { flex: none; }
.card .line1 .stars { font-weight: 500; color: var(--ink); }
.card .line1 .stars::first-letter { color: var(--ink); }
.card .title, .card .meta { color: var(--muted); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.card .price { margin-top: 6px; }
.card .price b { font-weight: 700; }
.card .price span { color: var(--ink-2); }
.card .agentfee { color: var(--muted); font-size: 13px; }
.stars { color: var(--star); font-weight: 700; white-space: nowrap; }
.stars .n { color: var(--ink); }
.stars .c { color: var(--muted); font-weight: 400; }
.new-user { color: var(--muted); font-size: 13px; }

/* ---------- Search ---------- */
.search-layout { display: grid; grid-template-columns: 290px 1fr; gap: 28px; padding: 24px 0 40px; }
.filters { position: sticky; top: 88px; align-self: start; max-height: calc(100vh - 100px); overflow: auto; padding-right: 6px; }
.filters h4 { font-size: 14px; margin: 18px 0 8px; }
.filters .checks { grid-template-columns: 1fr; gap: 6px; }
.filters .check { padding: 7px 10px; font-size: 13px; }
.results-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.results-head select { width: auto; }
.map-big { height: 640px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.filter-toggle { display: none; }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }
.empty .ic { font-size: 40px; }

/* Price markers */
.pmark { background: #fff; color: var(--ink); font-weight: 700; font-size: 12px; padding: 4px 9px; border-radius: 999px; box-shadow: 0 2px 8px rgba(0,0,0,.25); white-space: nowrap; border: 1px solid rgba(0,0,0,.08); transform: translate(-50%, -50%); display: inline-block; }
.pmark.top { background: var(--top); }
.pin { width: 30px; height: 30px; border-radius: 50% 50% 50% 0; background: var(--brand); transform: rotate(-45deg); border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35); }
.leaflet-popup-content { margin: 10px; }
.mini { display: flex; gap: 10px; width: 250px; }
.mini img { width: 84px; height: 64px; object-fit: cover; border-radius: 8px; }
.mini b { display: block; font-size: 14px; }

/* ---------- Listing detail ---------- */
.detail { padding: 24px 0 40px; }
.detail h1 { font-size: 26px; }
.gallery { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 200px 200px; gap: 8px; border-radius: var(--radius); overflow: hidden; margin: 16px 0 28px; position: relative; }
.gallery img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.gallery img:first-child { grid-row: span 2; }
.gallery .all { position: absolute; right: 14px; bottom: 14px; }
.detail-grid { display: grid; grid-template-columns: 1fr 380px; gap: 48px; }
/* Uy faktlari: har biri o'z rangi va ikonkasi bilan */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 18px 0; }
.fact { --fc: var(--brand); --fb: var(--brand-50); display: flex; align-items: center; gap: 10px; background: var(--fb); border: 1px solid color-mix(in srgb, var(--fc) 22%, transparent); border-left: 4px solid var(--fc); border-radius: var(--radius-sm); padding: 12px; min-width: 0; }
.fact .fic { width: 38px; height: 38px; flex: none; border-radius: 10px; background: #fff; color: var(--fc); display: grid; place-items: center; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.fact .fic svg { width: 22px; height: 22px; }
.fact > div { min-width: 0; }
.fact small { display: block; color: var(--ink-2); font-size: 12px; font-weight: 600; }
.fact b { display: block; font-size: 18px; font-weight: 800; color: var(--fc); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fact.f-rooms { --fc: #1b5e9e; --fb: #eef5fc; }
.fact.f-area { --fc: #0f8a7e; --fb: #e8f7f4; }
.fact.f-floor { --fc: #b26a00; --fb: #fdf4e3; }
.fact.f-type { --fc: #6d3fc0; --fb: #f3effc; }

/* "Kvartira · 3 xonali  $750 / oy" sarlavhasi */
.ltitle2 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.ltitle2 .hprice { color: var(--brand); font-weight: 800; white-space: nowrap; }
.ltitle2 .hprice::before { content: "·"; color: var(--muted); font-weight: 400; margin-right: 12px; }
.ltitle2 .hprice small { font-size: .7em; font-weight: 500; color: var(--muted); }

/* Lmeta: sarlavha ostidagi ma'lumot va tugmalar */
.lmeta { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-top: 4px; }
.lmeta-info { display: grid; gap: 6px; min-width: 0; font-size: 14px; }
.lmeta-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.lmeta-line { line-height: 1.4; }
.lmeta-acts { display: flex; gap: 8px; flex: none; }
.pill-aud { background: #e8f7f4; color: #0f6e65; box-shadow: none; }
.save-btn svg { width: 17px; height: 17px; fill: none; stroke: var(--ink); stroke-width: 2.4; }
.save-btn.on svg { fill: #e63e5c; stroke: #e63e5c; }
.dsec { border-top: 1px solid var(--line); padding: 24px 0; }
.dsec h3 { margin-bottom: 14px; }
/* Sharoitlar va infratuzilma: ixcham, bir nechta ustunda */
.taglist { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 14px; font-size: 13.5px; }
.taglist div { display: flex; gap: 6px; align-items: baseline; line-height: 1.35; min-width: 0; }
.taglist div::before { content: "✓"; color: var(--brand); font-weight: 800; font-size: 12px; flex: none; }
.translist { display: grid; gap: 8px; font-size: 14px; }
.translist > div { background: var(--bg-soft); border-radius: var(--radius-sm); padding: 8px 12px; line-height: 1.4; }
.dsec h3 .cnt { font-size: 12px; font-weight: 700; color: var(--muted); background: var(--bg-soft); border-radius: 999px; padding: 2px 8px; vertical-align: middle; margin-left: 4px; }
.map-sm { height: 300px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.side { position: sticky; top: 92px; align-self: start; }
.box { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); background: #fff; }
.box + .box { margin-top: 16px; }
.big-price { font-size: 28px; font-weight: 800; }
.big-price small { font-size: 15px; font-weight: 500; color: var(--muted); }
.kv { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; }
.kv span:first-child { color: var(--muted); }
.actions { display: grid; gap: 10px; margin-top: 16px; }
.note { background: var(--bg-soft); border-radius: var(--radius-sm); padding: 12px; font-size: 13px; color: var(--ink-2); }
.note.warn { background: var(--top-bg); color: #7c4a03; }
.note.ok { background: var(--ok-bg); color: var(--ok); }
.person { display: flex; gap: 12px; align-items: center; }
.person b { display: block; }
.review { padding: 14px 0; border-bottom: 1px solid var(--line); }
.review:last-child { border-bottom: none; }
.review .row { gap: 8px; }

/* ---------- Post form ---------- */
.form-page { max-width: 860px; margin: 0 auto; padding: 28px 20px 60px; }
.fsec { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 18px; }
.fsec h3 { display: flex; align-items: center; gap: 10px; }
.fsec h3 .num { width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 13px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.photo-item { position: relative; aspect-ratio: 4/3; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-soft); }
.photo-item img { width: 100%; height: 100%; object-fit: cover; }
.photo-item .rm { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; border: none; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; }
.photo-item .cover { position: absolute; bottom: 6px; left: 6px; }
.photo-add { aspect-ratio: 4/3; border: 2px dashed #c9ced4; border-radius: var(--radius-sm); display: grid; place-items: center; text-align: center; cursor: pointer; color: var(--muted); font-size: 13px; padding: 8px; }
.photo-add:hover { border-color: var(--brand); color: var(--brand); }
.photo-add b { display: block; font-size: 26px; line-height: 1; }
.progress { height: 6px; border-radius: 6px; background: var(--bg-soft); overflow: hidden; margin: 10px 0 14px; }
.progress div { height: 100%; background: var(--brand); transition: width .3s; }
.map-pick { height: 320px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); }

/* ---------- Cabinet ---------- */
.cab { display: grid; grid-template-columns: 240px 1fr; gap: 32px; padding: 28px 0 60px; }
.cab-nav { display: grid; gap: 4px; align-self: start; position: sticky; top: 92px; }
.cab-nav a { padding: 10px 14px; border-radius: var(--radius-sm); font-weight: 500; color: var(--ink-2); display: flex; justify-content: space-between; align-items: center; }
.cab-nav a.on { background: var(--brand-50); color: var(--brand); font-weight: 700; }
.cab-nav a:hover:not(.on) { background: var(--bg-soft); }
.item { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; grid-template-columns: 120px 1fr; gap: 16px; margin-bottom: 14px; }
.item > img { width: 120px; height: 90px; object-fit: cover; border-radius: var(--radius-sm); }
.item h4 { margin: 0 0 4px; font-size: 16px; }
.item .acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.item .detailbox { background: var(--bg-soft); border-radius: var(--radius-sm); padding: 10px 12px; margin-top: 10px; font-size: 14px; }
.steps { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.step { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--bg-soft); color: var(--muted); font-weight: 600; }
.step.done { background: var(--ok-bg); color: var(--ok); }
.step.cur { background: var(--info-bg); color: var(--info); }

/* ---------- Auth ---------- */
.auth { max-width: 520px; margin: 40px auto 60px; padding: 0 20px; }
.auth .box { padding: 30px; }
.otp { letter-spacing: 12px; font-size: 24px !important; text-align: center; font-weight: 700; }
.demo-users { display: grid; gap: 8px; margin-top: 10px; }
.demo-users button { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; cursor: pointer; font: inherit; text-align: left; }
.demo-users button:hover { border-color: var(--brand); }

/* ---------- Profile ---------- */
.profile-head { display: flex; gap: 20px; align-items: center; padding: 28px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.rating-big { font-size: 34px; font-weight: 800; }
.rating-big .stars { font-size: 34px; }

/* ---------- Trust ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature { background: var(--bg-soft); border-radius: var(--radius); padding: 22px; }
.feature .ic { font-size: 28px; }
.feature { border: 1px solid var(--line); background: #fff; }
.feature .ic { width: 48px; height: 48px; border-radius: 14px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; margin-bottom: 12px; }
.feature .ic svg { width: 26px; height: 26px; }
.cta { background: var(--pattern-light), var(--grad); color: #fff; border-radius: 24px; padding: 40px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.cta p { color: rgba(255,255,255,.85); margin: 0; }
.cta .btn { background: #fff; color: var(--brand); }

/* ---------- Modal ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(15,18,22,.55); z-index: 3000; display: grid; place-items: center; padding: 16px; animation: fade .15s; }
.modal { background: #fff; border-radius: 18px; width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow: auto; box-shadow: var(--shadow-lg); animation: pop .18s; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 1; }
.modal-head h3 { margin: 0; }
.modal-body { padding: 22px; }
.x { border: none; background: var(--bg-soft); width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 16px; }
.pkg { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border: 2px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; margin-bottom: 10px; }
.pkg.on { border-color: var(--top); background: var(--top-bg); }
.paym { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.paym button { padding: 12px; border: 2px solid var(--line); border-radius: var(--radius-sm); background: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.paym button.on { border-color: var(--brand); background: var(--brand-50); }
.star-input { display: flex; gap: 4px; font-size: 36px; }
.star-input button { border: none; background: none; cursor: pointer; color: #d6d9dd; font-size: 36px; padding: 0; line-height: 1; }
.star-input button.on { color: var(--star); }
.contract { font-size: 14px; line-height: 1.6; }
.contract h4 { text-align: center; }

.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 4000; display: grid; place-items: center; }
.lightbox img { max-width: 92vw; max-height: 84vh; border-radius: 8px; }
.lightbox .nav-b { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; border: none; background: rgba(255,255,255,.9); font-size: 22px; cursor: pointer; }
.lightbox .prev { left: 20px; } .lightbox .next { right: 20px; }
.lightbox .close { position: absolute; top: 18px; right: 18px; }
.lightbox .cnt { position: absolute; top: 24px; left: 50%; transform: translateX(-50%); color: #fff; }

/* ---------- Toast ---------- */
.toast-root { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 5000; display: grid; gap: 8px; width: max-content; max-width: calc(100vw - 32px); }
.toast { background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow-lg); font-weight: 500; animation: pop .2s; }
.toast.ok { background: var(--ok); } .toast.err { background: var(--danger); }

.footer { border-top: 1px solid var(--line); background: var(--pattern), var(--bg-soft); padding: 30px 0; margin-top: 40px; }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 18px; font-weight: 500; }

@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: scale(.96); opacity: 0; } }

/* ---------- Mehmonxona, moderatsiya, admin ---------- */
.pill-biz { background: #e0f2f1; color: #00695c; box-shadow: none; }
.banner { margin: 14px 0 0; }
.banner .pill { margin-right: 6px; }
.biz-cta { margin-top: 16px; }
.stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-top: 8px; }
.stat { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; background: #fff; }
.stat small { display: block; color: var(--muted); font-size: 12px; font-weight: 600; }
.stat b { font-size: 24px; font-weight: 800; margin-right: 4px; }
.item.urow { grid-template-columns: 48px 1fr; align-items: start; }
.item.urow > .avatar { color: var(--brand); }

.stat.link { display: block; transition: border-color .15s; }
.stat.link:hover { border-color: var(--brand-600); }
.report { color: var(--muted); margin-top: 12px; display: inline-block; }
.report:hover { color: var(--danger); }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:hover td { background: var(--bg-soft); }
.tbl .row { flex-wrap: nowrap; gap: 6px; }
.nowrap { white-space: nowrap; }
#adm { min-width: 0; overflow-x: auto; }

/* Grafiklar: bitta qator, ingichka ustunlar, sust o'qlar */
.charts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.chart { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; background: #fff; }
.chart figcaption { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; font-size: 14px; }
.chart-wrap { position: relative; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .gl { stroke: var(--line); stroke-width: 1; }
.chart .base { stroke: #c9ced4; stroke-width: 1; }
.chart .ax { fill: var(--muted); font-size: 11px; font-family: inherit; }
.chart .bar path { fill: var(--brand-600); transition: fill .1s; }
.chart .bar.on path { fill: var(--brand-dark); }
.chart .tip { position: absolute; top: -6px; transform: translate(-50%, -100%); background: var(--ink); color: #fff; padding: 6px 10px; border-radius: 8px; font-size: 12px; pointer-events: none; white-space: nowrap; text-align: center; }
.chart .tip .muted { color: #c9cdd3; }
.chart details { margin-top: 8px; }
.chart details .tbl td { padding: 4px 8px; }
.hbar { display: grid; grid-template-columns: 110px 1fr 40px; gap: 10px; align-items: center; font-size: 14px; margin-bottom: 8px; }
.hbar > div { background: var(--bg-soft); border-radius: 4px; height: 12px; overflow: hidden; }
.hbar i { display: block; height: 100%; background: var(--brand-600); border-radius: 0 4px 4px 0; }
.hbar b { text-align: right; }

.test-banner { background: var(--top); color: #1f1300; text-align: center; font-size: 13px; font-weight: 700; padding: 6px 12px; }

/* ---------- Sarlavha: tor telefonlar uchun ixcham ---------- */
.nav-short { display: none; }
.header-inner .logo { flex: none; }
.header-inner .nav { min-width: 0; }
@media (max-width: 480px) {
  .header-inner { gap: 6px; }
  .header-inner .logo { font-size: 17px; gap: 6px; }
  .header-inner .logo svg { width: 30px; height: 30px; }
  .nav { gap: 4px; }
  .icon-btn { width: 34px; height: 34px; }
  .nav-admin .nav-full { display: none; }
  .header-inner.logged .nav-post .nav-full { display: none; }
  .header-inner.logged .nav-post .nav-short { display: inline; font-size: 18px; line-height: 1; }
  .header-inner.logged .nav-post { padding: 7px 12px; }
  .user-chip { padding: 2px; border: none; }
}

/* ---------- Sayt matnlarini tahrirlash rejimi ---------- */
.edit-toggle { position: fixed; left: 16px; bottom: 16px; z-index: 2500; border: none; border-radius: 999px; padding: 12px 18px; font: inherit; font-weight: 700; cursor: pointer; background: var(--ink); color: #fff; box-shadow: var(--shadow-lg); }
.edit-toggle.on { background: var(--top); color: #1f1300; }
body.edit-mode [data-tk] { outline: 2px dashed var(--top); outline-offset: 2px; border-radius: 3px; cursor: text; background: rgba(233,168,58,.10); }
body.edit-mode [data-tk].changed { outline-color: var(--ok); background: rgba(21,128,61,.08); }
body.edit-mode [data-tk]:hover { outline-style: solid; background: rgba(233,168,58,.22); }
.txtbl td:first-child { width: 34%; }
.txtbl tr.changed td { background: var(--top-bg); }
.txtbl code { color: var(--muted); }

/* ---------- Cheksiz varaqlash ---------- */
.load-more { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 28px 0 8px; min-height: 40px; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--brand-100); border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Joylashuv bo'yicha xarita, Yandex, transport ---------- */
.near-row { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 14px; font-weight: 600; color: var(--ink-2); flex-wrap: wrap; }
.me-dot { width: 18px; height: 18px; border-radius: 50%; background: #2563eb; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(37,99,235,.25); }
.map-sm iframe { width: 100%; height: 100%; border: 0; display: block; }
.map-links { margin-top: 10px; gap: 8px; }
.service-cta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: space-between; margin-bottom: 18px; background: var(--brand-50); color: var(--ink-2); }

/* ---------- Obuna tariflari ---------- */
.plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-top: 16px; }
.plan { border: 2px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 6px; background: #fff; }
.plan.on { border-color: var(--brand); background: var(--brand-50); }
.plan-name { font-size: 18px; }
.plan-price { font-size: 26px; font-weight: 800; }
.plan-price small { font-size: 13px; font-weight: 500; color: var(--muted); }
.plan ul { margin: 6px 0 12px; padding-left: 18px; color: var(--ink-2); font-size: 14px; flex: 1; }
.fee-box { margin-bottom: 12px; }
.rev .check { align-items: flex-start; margin-bottom: 10px; }
.rev .check input { margin-top: 3px; }
.ctable.meters { width: auto; min-width: 320px; }
.ctable.meters th { text-align: left; border: 1px solid #ccc; padding: 6px 12px; font-size: 13px; }
.ctable.meters td { width: auto; padding: 6px 12px; line-height: 1.4; }

/* ---------- Sarlavhadagi chat va qo'ng'iroqcha ---------- */
.icon-btn { position: relative; width: 40px; height: 40px; border-radius: 50%; border: none; background: transparent; display: grid; place-items: center; color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { background: var(--bg-soft); }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn .badge-count { position: absolute; top: 0; right: -2px; margin: 0; min-width: 18px; height: 18px; font-size: 11px; padding: 0 5px; border: 2px solid #fff; }
.bell-wrap { position: relative; }
.notif-panel { position: absolute; right: -60px; top: 48px; width: 380px; max-width: calc(100vw - 24px); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); z-index: 1100; overflow: hidden; animation: pop .15s; }
.np-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.np-list { max-height: 420px; overflow: auto; }
.np-list.big { max-height: none; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.np-foot { display: block; text-align: center; padding: 12px; font-weight: 600; color: var(--brand); border-top: 1px solid var(--line); }
.notif { display: flex; gap: 12px; width: 100%; text-align: left; border: none; background: #fff; padding: 12px 16px; border-bottom: 1px solid var(--line); cursor: pointer; font: inherit; }
.notif:last-child { border-bottom: none; }
.notif:hover { background: var(--bg-soft); }
.notif.unread { background: var(--brand-50); }
.notif.unread b::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--brand-600); margin-right: 6px; vertical-align: middle; }
.notif .nic { font-size: 20px; line-height: 1.2; }
.notif .nbody { display: grid; gap: 2px; min-width: 0; }
.chat-toast { cursor: pointer; max-width: 420px; }

/* ---------- Chat ---------- */
.chat { display: grid; grid-template-columns: 340px 1fr; height: calc(100vh - 68px - 48px); min-height: 480px; margin: 24px 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.chat-list { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.chat-list-head { padding: 16px; border-bottom: 1px solid var(--line); }
#clist { overflow: auto; flex: 1; }
.conv { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); align-items: center; }
.conv:hover { background: var(--bg-soft); }
.conv.on { background: var(--brand-50); }
.conv .avatar { position: relative; }
.dot-online { position: absolute; right: 0; bottom: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--ok); border: 2px solid #fff; }
.conv-body { display: grid; gap: 2px; min-width: 0; flex: 1; }
.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.b { font-weight: 700; color: var(--ink); }
.chat-thread { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.chat-placeholder { margin: auto; text-align: center; padding: 30px; }
.thread-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.back-btn { display: none; }
.thread-listing { display: flex; gap: 10px; align-items: center; max-width: 280px; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px 6px 6px; }
.thread-listing img { width: 48px; height: 38px; object-fit: cover; border-radius: 6px; }
.thread-listing > span { display: grid; min-width: 0; }
.safety { background: var(--top-bg); color: #7c4a03; padding: 8px 16px; }
.msgs { flex: 1; overflow: auto; padding: 16px 18px; background: var(--pattern), var(--bg-soft); display: flex; flex-direction: column; gap: 4px; }
#more-msgs-slot { text-align: center; }
.day-sep { text-align: center; margin: 10px 0 6px; }
.day-sep span { background: rgba(255,255,255,.9); border: 1px solid var(--line); border-radius: 999px; padding: 2px 12px; font-size: 12px; color: var(--muted); }
.msg { display: flex; flex-direction: column; align-items: flex-start; max-width: 72%; }
.msg.mine { align-self: flex-end; align-items: flex-end; }
.bubble { background: #fff; border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; padding: 8px 12px 6px; font-size: 15px; line-height: 1.45; word-wrap: break-word; overflow-wrap: anywhere; box-shadow: 0 1px 1px rgba(0,0,0,.04); }
.msg.mine .bubble { background: var(--brand); color: #fff; border-color: var(--brand); border-radius: 16px 16px 4px 16px; }
.bubble .meta { display: block; text-align: right; font-size: 11px; margin-top: 2px; opacity: .65; }
.tick.read { color: #9fe3ff; opacity: 1; font-weight: 700; }
.msg.warn .bubble { border: 2px solid var(--danger); }
.warn-note { font-size: 12px; color: var(--danger); background: var(--danger-bg); border-radius: 8px; padding: 6px 10px; margin-top: 4px; max-width: 100%; }
.composer { display: flex; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line); align-items: flex-end; }
.composer textarea { min-height: 44px; max-height: 140px; resize: none; border-radius: 22px; padding: 11px 16px; }
.composer .btn { border-radius: 50%; width: 46px; height: 46px; padding: 0; font-size: 18px; flex: none; }

/* ---------- Shartnoma ---------- */
.csec { border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 10px; background: #fff; }
.csec > summary { cursor: pointer; padding: 12px 14px; font-weight: 700; list-style: none; display: flex; gap: 8px; align-items: center; }
.csec > summary::-webkit-details-marker { display: none; }
.csec > summary::before { content: "▸"; color: var(--muted); transition: transform .15s; }
.csec[open] > summary::before { transform: rotate(90deg); }
.cform { padding: 4px 14px 14px; }
.contract-doc { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 26px 30px; background: #fffdf8; max-height: 56vh; overflow: auto; }
.contract { font-size: 14px; line-height: 1.65; color: #222; }
.contract h4 { text-align: center; font-size: 16px; margin-bottom: 14px; letter-spacing: .02em; }
.contract h5 { font-size: 14px; margin: 16px 0 6px; }
.contract p { margin: 0 0 6px; text-align: justify; }
.blank { display: inline-block; border-bottom: 1px solid #999; min-height: 1em; vertical-align: bottom; }
.ctable { width: 100%; border-collapse: collapse; margin: 10px 0 14px; font-size: 13px; }
.ctable td { width: 50%; border: 1px solid #ccc; padding: 12px; vertical-align: top; line-height: 1.7; }
.sig-ok { color: var(--ok); font-weight: 700; }

@media print {
  body.print-contract > *:not(#modalRoot) { display: none !important; }
  body.print-contract .modal-back { position: static; background: none; padding: 0; display: block; }
  body.print-contract .modal { box-shadow: none; max-width: none !important; max-height: none; border-radius: 0; }
  body.print-contract .modal-head, body.print-contract .no-print { display: none !important; }
  body.print-contract .contract-doc { border: none; max-height: none; overflow: visible; padding: 0; background: #fff; }
  body.print-contract .contract p.note { background: none; padding: 0; color: #555; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .detail-grid { grid-template-columns: 1fr; gap: 0; }
  .side { position: static; margin-top: 10px; }
  .search-layout { grid-template-columns: 1fr; }
  .filters { position: static; max-height: none; display: none; }
  .filters.open { display: block; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
  .filter-toggle { display: inline-flex; }
  .cab { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(3, 1fr) !important; }
  .charts { grid-template-columns: 1fr; }
  .chat { grid-template-columns: 1fr; height: calc(100vh - 68px - 24px); margin: 12px 0; }
  .chat.has-thread .chat-list { display: none; }
  .chat:not(.has-thread) .chat-thread { display: none; }
  .back-btn { display: inline-flex; }
  .thread-listing { display: none; }
  .msg { max-width: 86%; }
  .notif-panel { position: fixed; right: 12px; left: 12px; top: 64px; width: auto; }
  .contract-doc { padding: 16px; }
  .cab-nav { position: static; display: flex; overflow-x: auto; }
  .cab-nav a { white-space: nowrap; }
  .searchbar { grid-template-columns: 1fr 1fr; border-radius: 22px; }
  .searchbar .sb-item { border-right: none; border-bottom: 1px solid var(--line); border-radius: 12px; }
  .searchbar .btn { grid-column: span 2; padding: 12px; margin-top: 6px; }
  .hsearch { display: none; }
  .cnav { display: none; }
}
@media (max-width: 700px) {
  .container { padding: 0 16px; }
  .hero { padding: 32px 0 24px; }
  .hero h1 { font-size: 31px; }
  .hero p.lead { font-size: 16px; }
  .catbar { gap: 22px; }
  .cta { padding: 26px; }
  .nav .hide-sm { display: none; }
  .gallery { grid-template-columns: 1fr 1fr; grid-template-rows: 220px 110px; }
  .gallery img:first-child { grid-column: span 2; grid-row: auto; }
  .gallery img:nth-child(n+4) { display: none; }
  .facts { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .fact { padding: 10px; gap: 8px; }
  .fact .fic { width: 32px; height: 32px; }
  .fact .fic svg { width: 18px; height: 18px; }
  .fact b { font-size: 16px; }
  .taglist { grid-template-columns: repeat(2, minmax(0, 1fr)); font-size: 13px; gap: 6px 10px; }
  .lmeta { flex-direction: column; align-items: stretch; gap: 10px; }
  .lmeta-info { font-size: 13px; }
  .lmeta-acts .btn { flex: 1; }
  .detail h1 { font-size: 22px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  .role-cards { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; }
  .item { grid-template-columns: 1fr; }
  .item > img { width: 100%; height: 160px; }
  .searchbar { grid-template-columns: 1fr; }
  .searchbar .btn { grid-column: auto; }
  .map-big { height: 460px; }
  .header-inner { gap: 10px; }
  .logo { font-size: 19px; }
}
