/* Web kho hàng BĐS Toolkit: trang công khai của môi giới. Một cột trên điện thoại, lưới thẻ trên máy tính. */
:root {
  --bg: #eef1f6; --surface: #ffffff; --soft: #f5f7fb; --fg: #142033; --muted: #5d6a7e; --line: #dde3ec;
  --brand: #1f3a68; --brand-ink: #ffffff; --brand-soft: #e3e9f4; --price: #c2410c; --ok: #15803d; --ok-bg: #dcfce7;
  --warn: #a16207; --warn-bg: #fef3c7; --zalo: #0068ff; --call: #16a34a; --sold: #6b7280;
  --chrome: #142033; --chrome-ink: #e8edf5; --chrome-muted: #9aa7ba;
  --font: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r: 14px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0d1420; --surface: #172131; --soft: #1c2738; --fg: #e8edf5; --muted: #9aa7ba; --line: #263246;
  --brand: #8fb0e8; --brand-ink: #0d1420; --brand-soft: #1f2d45; --price: #fb923c; --ok: #4ade80; --ok-bg: #12301f;
  --warn: #fbbf24; --warn-bg: #2e2510; --zalo: #4d94ff; --call: #22c55e; --sold: #9ca3af;
  --chrome: #060a11; --chrome-ink: #e8edf5; --chrome-muted: #8592a6; color-scheme: dark } }
:root[data-theme="dark"] {
  --bg: #0d1420; --surface: #172131; --soft: #1c2738; --fg: #e8edf5; --muted: #9aa7ba; --line: #263246;
  --brand: #8fb0e8; --brand-ink: #0d1420; --brand-soft: #1f2d45; --price: #fb923c; --ok: #4ade80; --ok-bg: #12301f;
  --warn: #fbbf24; --warn-bg: #2e2510; --zalo: #4d94ff; --call: #22c55e; --sold: #9ca3af;
  --chrome: #060a11; --chrome-ink: #e8edf5; --chrome-muted: #8592a6; color-scheme: dark }

* { box-sizing: border-box }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font); font-size: 15px; line-height: 1.5; }
h1, h2, h3 { text-wrap: balance; margin: 0 }
a { color: inherit }
button, input, select, textarea { font: inherit; color: inherit }
.gut { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.max { max-width: 1120px; margin: 0 auto }
.num { font-variant-numeric: tabular-nums }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px }

/* Nút chung */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 12px; font-weight: 700; border: 0; cursor: pointer; text-decoration: none; }
.btn.call { background: var(--call); color: #fff } .btn.zalo { background: var(--zalo); color: #fff }
.btn.pri { background: var(--brand); color: var(--brand-ink) }
.btn.ghost { background: var(--surface); border: 1px solid var(--line); color: var(--fg) }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: 10px }
.btn svg { width: 18px; height: 18px }
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; white-space: nowrap }
.pill.ok { color: var(--ok); background: var(--ok-bg) } .pill.sold { color: #fff; background: var(--sold) }
.pill.warn { color: var(--warn); background: var(--warn-bg) } .pill.brand { color: var(--brand); background: var(--brand-soft) }
.muted { color: var(--muted) }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--fg); color: var(--bg); padding: 8px 16px; border-radius: 999px; font-size: 14px; z-index: 30; max-width: calc(100% - 32px) }

/* ===== Trang công khai ===== */
.pub-top { background: var(--surface); border-bottom: 1px solid var(--line) }
.pub-top .in { display: flex; align-items: center; gap: 12px; padding-block: 10px }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0 }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--acc, var(--brand)); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none }
.logo b { display: block; line-height: 1.2 } .logo small { color: var(--muted); font-size: 12px }
.pub-nav { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end }
.pub-nav a { text-decoration: none; padding: 6px 10px; border-radius: 8px; font-size: 14px; color: var(--muted) }
.pub-nav a.on { color: var(--fg); background: var(--soft); font-weight: 600 }

.hero { background: linear-gradient(135deg, var(--acc, #1f3a68), color-mix(in srgb, var(--acc, #1f3a68) 55%, #000)); color: #fff }
.hero .in { padding-block: 28px; display: grid; gap: 14px }
.hero h1 { font-size: clamp(22px, 4vw, 32px); line-height: 1.25 }
.hero p { margin: 0; max-width: 62ch; opacity: .92 }
.hero .ctas { display: flex; gap: 10px; flex-wrap: wrap }
.stats { display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; opacity: .9 }
.stats b { font-size: 18px; display: block }

/* Trang cá nhân kiểu Facebook: ảnh bìa, avatar tròn đè lên bìa, tên, nút liên hệ, icon mạng xã hội, thanh tab */
.profile { background: var(--surface); border-bottom: 1px solid var(--line) }
.cover { max-width: 1120px; margin: 0 auto; aspect-ratio: 1640 / 624; max-height: 380px; width: 100%; overflow: hidden; position: relative; background: var(--soft) }
@media (min-width: 1121px) { .cover { border-radius: 0 0 16px 16px } }
.cover svg, .cover img { width: 100%; height: 100%; object-fit: cover; display: block }
.pf-row { display: flex; gap: 18px; align-items: flex-start; margin-top: -58px; flex-wrap: wrap; position: relative }
.pf-ava { width: 150px; height: 150px; border-radius: 50%; border: 5px solid var(--surface); background: var(--acc, var(--brand)); overflow: hidden; flex: none; display: grid; place-items: center; color: #fff; font-size: 48px; font-weight: 700; box-shadow: 0 2px 10px #0f1a2e33 }
.pf-ava img, .avatar img { width: 100%; height: 100%; object-fit: cover; display: block }
.avatar { overflow: hidden }
/* Tên và thông tin luôn nằm dưới ảnh bìa (ảnh đại diện nhô lên 58px, chữ bắt đầu sau phần nhô đó). */
.pf-id { flex: 1 1 240px; min-width: 0; padding-top: 66px; padding-bottom: 8px; display: grid; gap: 2px }
.pf-id h1 { font-size: clamp(24px, 3vw, 32px); line-height: 1.2; display: flex; align-items: center; gap: 8px; flex-wrap: wrap }
.pf-id .verified { width: 22px; height: 22px; flex: none }
.pf-id .sub { color: var(--muted) }
.pf-id .pf-phone { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 16px; color: var(--acc, var(--brand)); text-decoration: none; width: fit-content }
.pf-id .pf-phone svg { width: 16px; height: 16px }
.pf-id .facts { color: var(--muted); font-size: 14px }
.pf-id .facts b { color: var(--fg) }
.pf-cta { display: flex; gap: 8px; padding-bottom: 10px; flex-wrap: wrap; align-self: flex-end }
.pf-intro { margin: 14px 0 0; max-width: 70ch }
.socials { display: flex; gap: 10px; flex-wrap: wrap; padding-block: 12px 14px; align-items: center }
.soc { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; text-decoration: none; box-shadow: inset 0 0 0 1px #ffffff22; flex: none }
.soc svg { width: 20px; height: 20px }
.soc.zl { font-size: 11px; font-weight: 800; letter-spacing: -.02em }
.pf-tabs { display: flex; gap: 4px; border-top: 1px solid var(--line); overflow-x: auto; scrollbar-width: none }
.pf-tabs::-webkit-scrollbar { display: none }
.pf-tabs a { flex: none; padding: 12px 14px; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent }
.pf-tabs a.on { color: var(--acc, var(--brand)); border-bottom-color: var(--acc, var(--brand)) }
@media (max-width: 640px) {
  .pf-row { flex-direction: column; align-items: center; text-align: center; margin-top: -64px; gap: 8px }
  .pf-ava { width: 128px; height: 128px; font-size: 42px }
  .pf-id { flex: none; justify-items: center; padding-top: 0 }
  .pf-tabs { gap: 0 }
  /* Các tab chia đều độ rộng điện thoại (3 hoặc 4 tab tùy trang có Dự án hay không). */
  .pf-tabs a { flex: 1 1 0; min-width: max-content; text-align: center; padding: 12px 6px; font-size: 14px }
  .pf-id h1 { justify-content: center }
  .pf-cta { display: none }
  .pf-intro { text-align: center; margin-inline: auto }
  .socials { justify-content: center }
}
.cover-pick { display: flex; gap: 8px; flex-wrap: wrap; align-items: center }
.cover-pick button { width: 92px; aspect-ratio: 1640 / 624; border-radius: 8px; overflow: hidden; border: 2px solid transparent; padding: 0; cursor: pointer; background: none; max-width: 100% }
.cover-pick button[aria-pressed="true"] { border-color: var(--fg) }
.cover-pick svg, .cover-pick img { width: 100%; height: 100%; object-fit: cover; display: block }
.upl { display: inline-flex; align-items: center; gap: 6px; border: 1px dashed var(--muted); border-radius: 8px; padding: 6px 10px; font-size: 13px; cursor: pointer; color: var(--muted) }
.upl input { position: absolute; width: 1px; height: 1px; opacity: 0 }
.upl:focus-within { outline: 3px solid var(--brand); outline-offset: 2px }
.soc-in { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 10px; align-items: center }
.preview .cover { max-height: 150px }
.preview .pf-row { margin-top: -40px; flex-direction: row; text-align: left; align-items: flex-end }
.preview .pf-ava { width: 84px; height: 84px; font-size: 28px; border-width: 4px }
.preview .pf-id h1 { font-size: 19px; justify-content: flex-start }
.preview .pf-id { justify-items: start }
.preview .pf-cta { display: none }
.preview .pf-intro { font-size: 14px; text-align: left; margin-inline: 0 }
.preview .socials { justify-content: flex-start }
.preview .soc { width: 32px; height: 32px } .preview .soc svg { width: 16px; height: 16px }

.search { background: var(--surface); border-radius: var(--r); padding: 12px; display: grid; gap: 10px; margin-top: 16px; position: relative; border: 1px solid var(--line) }
.search input { width: 100%; border: 1px solid var(--line); background: var(--soft); border-radius: 10px; padding: 10px 12px }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px }
.chips::-webkit-scrollbar { display: none }
.chip { flex: none; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 12px; font-size: 14px; cursor: pointer }
.chip[aria-pressed="true"] { background: var(--acc, var(--brand)); border-color: var(--acc, var(--brand)); color: #fff }

.sec { padding-block: 22px 6px; display: grid; gap: 12px; scroll-margin-top: 110px }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap }
.sec-h h2 { font-size: 19px }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px }
.card { background: var(--surface); border-radius: var(--r); overflow: hidden; text-decoration: none; display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line) }
.card .ph { aspect-ratio: 4 / 3; max-width: 100%; position: relative }
.card .ph svg { width: 100%; height: 100%; display: block }
.card .ph .pill { position: absolute; left: 10px; top: 10px }
.card .ph .cnt { position: absolute; right: 10px; bottom: 10px; background: #000a; color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 999px }
.card .bd { padding: 12px; display: grid; gap: 6px }
.card h3 { font-size: 15px; font-weight: 600; line-height: 1.35 }
.card .pr { color: var(--price); font-weight: 800; font-size: 18px }
.card .meta { color: var(--muted); font-size: 13px; display: flex; gap: 10px; flex-wrap: wrap }
.card > .ph { display: block; text-decoration: none }
.card-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px }
.card-acts .btn { flex: 1 1 auto }
.card h3 a:hover { text-decoration: underline }
.proj .ph { aspect-ratio: 1640 / 760 }
.pager { display: flex; gap: 6px; justify-content: center; align-items: center; flex-wrap: wrap; padding-top: 6px }
.pager a, .pager .pg-num, .pager .pg-btn { display: inline-grid; place-items: center; min-width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); padding: 0 12px; font-variant-numeric: tabular-nums; color: inherit; text-decoration: none; font-weight: 600 }
.pager a:hover { border-color: var(--acc, var(--brand)); color: var(--acc, var(--brand)) }
.pager .pg-gap { padding: 0 4px; color: var(--muted, #6b7280) }
.pager .pg-num[aria-current="page"] { background: var(--acc, var(--brand)); border-color: var(--acc, var(--brand)); color: #fff; font-weight: 700 }
.pager [aria-disabled="true"] { opacity: .4 }
.pg-note { text-align: center; font-size: 13px; margin: 0 }
/* Lưới căn: 3 cột trên máy tính, 2 cột thẻ gọn trên điện thoại (6 căn mỗi trang). */
.lgrid { grid-template-columns: repeat(3, minmax(0, 1fr)) }
@media (max-width: 900px) { .lgrid { grid-template-columns: repeat(2, minmax(0, 1fr)) } }
@media (max-width: 640px) {
  .lgrid { gap: 10px }
  .lgrid .card .ph { aspect-ratio: 1 / 1 }
  .lgrid .card .bd { padding: 8px 9px 10px; gap: 4px }
  .lgrid .card .pr { font-size: 15px }
  .lgrid .card h3 { font-size: 13px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden }
  .lgrid .card .meta { font-size: 11.5px; gap: 6px; flex-wrap: nowrap; overflow: hidden; white-space: nowrap }
  .lgrid .card .meta span { overflow: hidden; text-overflow: ellipsis }
  .lgrid .card .meta.specs span:nth-child(n+4) { display: none }
  .lgrid .card-acts { display: none }
  .lgrid .card .ph .pill { left: 6px; top: 6px; font-size: 11px; padding: 2px 7px }
  .lgrid .card .ph .cnt { right: 6px; bottom: 6px; font-size: 11px; padding: 1px 6px }
  .lgrid .card.is-sold .ph::after { font-size: 11px }
  .pager .pg-btn { min-width: 48px; font-size: 18px }
  .pager .pg-t { display: none }
}
.card.is-sold .ph::after { content: "ĐÃ GIAO DỊCH"; position: absolute; inset: 0; display: grid; place-items: center; background: #0f141ecc; color: #fff; font-weight: 800; letter-spacing: .04em }

.areas { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px }
.area { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; text-decoration: none }
.area b { display: block } .area span { color: var(--muted); font-size: 13px }

.about { background: var(--surface); border-radius: var(--r); padding: 16px; display: grid; gap: 10px; border: 1px solid var(--line) }
.foot { padding-block: 26px 40px; color: var(--muted); font-size: 13px; display: grid; gap: 6px; text-align: center }
.foot a { color: var(--muted) }
.mbar { display: none }
@media (max-width: 640px) {
  .pub-nav { display: none }
  .mbar { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); padding-top: 10px; padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); z-index: 15 }
  .pub { padding-bottom: 80px }
}

/* Chi tiết căn */
.detail { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; padding-block: 16px }
@media (max-width: 820px) {
  .detail { grid-template-columns: minmax(0, 1fr) }
  .d-main { display: contents }
  .d-main > * { order: 1 } .d-side { order: 2 } .d-main > .d-desc { order: 3; margin-top: 0 !important }
}
.gal { border-radius: var(--r); overflow: hidden; aspect-ratio: 4 / 3; max-width: 100%; position: relative }
.gal svg { width: 100%; height: 100%; display: block }
.thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 6px }
.thumbs button { border: 2px solid transparent; padding: 0; border-radius: 8px; overflow: hidden; aspect-ratio: 4 / 3; cursor: pointer; background: none; max-width: 100% }
.thumbs button[aria-pressed="true"] { border-color: var(--acc, var(--brand)) }
.thumbs svg { width: 100%; height: 100%; display: block }
.box { background: var(--surface); border-radius: var(--r); padding: 16px; border: 1px solid var(--line); display: grid; gap: 10px; align-content: start }
.box h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600 }
.big-pr { color: var(--price); font-size: 28px; font-weight: 800 }
.specs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px }
.spec { background: var(--soft); border-radius: 10px; padding: 8px 4px; text-align: center; min-width: 0 }
.spec b { display: block } .spec small { color: var(--muted); font-size: 12px }
dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 14px } dt { color: var(--muted) } dd { margin: 0; font-weight: 500; min-width: 0 }
.crumb { font-size: 13px; color: var(--muted); padding-top: 14px } .crumb a { color: var(--muted) }

/* Form */
.form { display: grid; gap: 12px }
.form label { display: grid; gap: 4px; font-size: 14px; font-weight: 500 }
.form input, .form select, .form textarea { border: 1px solid var(--line); background: var(--soft); border-radius: 10px; padding: 10px 12px; width: 100% }
.seg { display: flex; gap: 6px; flex-wrap: wrap }
.seg button { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 8px 14px; cursor: pointer }
.seg button[aria-pressed="true"] { background: var(--acc, var(--brand)); color: #fff; border-color: var(--acc, var(--brand)) }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px } @media (max-width: 520px) { .two { grid-template-columns: 1fr } }

/* Hình nền chủ đề: cảnh nội thất tối giản, tô màu chủ đạo, mờ 15%, sát đáy màn hình */
.bgscene { position: fixed; left: 0; right: 0; bottom: 0; height: min(60vh, 520px); pointer-events: none; z-index: -1; background-color: var(--acc, var(--brand)); opacity: .15; -webkit-mask: var(--scene) no-repeat center bottom / contain; mask: var(--scene) no-repeat center bottom / contain }
body { position: relative; z-index: 0 }
.bgphoto { position: fixed; inset: 0; pointer-events: none; z-index: -1; background: center / cover no-repeat; opacity: .15 }
.bg-dark .sec-h, .bg-dark .sec-h .muted, .bg-dark .pg-note, .bg-dark .foot, .bg-dark .foot a, .bg-dark .pager .pg-gap { color: #fff }
.bg-dark .sec-h .muted, .bg-dark .pg-note, .bg-dark .foot { opacity: .85 }
.notice { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; display: grid; gap: 10px; text-align: center; margin-block: 40px }
.err { color: var(--price); font-size: 13px }
.ok-box { background: var(--ok-bg); color: var(--ok); border-radius: 12px; padding: 12px 14px; font-weight: 600 }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden }
.slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: var(--r) }
.slides::-webkit-scrollbar { display: none }
.slides img, .slides .ph-empty { flex: 0 0 100%; scroll-snap-align: center; aspect-ratio: 4 / 3; object-fit: cover; width: 100%; max-width: 100%; display: block; background: var(--soft) }
.slides .ph-empty { display: grid; place-items: center }
.card .ph img { width: 100%; height: 100%; object-fit: cover; display: block; background: var(--soft) }
.ph-empty { display: grid; place-items: center; color: var(--muted); font-size: 13px; width: 100%; height: 100% }
.desc-text { white-space: pre-line; margin: 0 }

/* ===== 21/11/2026: theo style app (gradient tươi sáng), menu cố định, nút về đầu trang ===== */
:root {
  /* Nền gradient pastel như màn giới thiệu của app (xanh nhạt, tím nhạt, xanh bạc hà). */
  --page-grad: linear-gradient(160deg, #cdebff 0%, #e3daff 48%, #cff7ea 100%);
  /* Gradient nút chính: màu chủ đạo sang xanh ngọc của logo. */
  --grad: linear-gradient(135deg, var(--acc, var(--brand)) 0%, #00bcd4 100%);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --page-grad: linear-gradient(160deg, #14274d 0%, #2b2162 48%, #0f4b4b 100%) } }
:root[data-theme="dark"] { --page-grad: linear-gradient(160deg, #14274d 0%, #2b2162 48%, #0f4b4b 100%) }
body { background: var(--page-grad) fixed, var(--bg); --grad: linear-gradient(135deg, var(--acc, var(--brand)) 0%, #00bcd4 100%) }
body.bg-solid { background-attachment: scroll }
.btn.pri { background: var(--grad); color: #fff; box-shadow: 0 4px 14px rgb(0 188 212 / .25) }
.chip[aria-pressed="true"] { background: var(--grad); border-color: transparent; color: #fff }
.pager .pg-num[aria-current="page"] { background: var(--grad); border-color: transparent }
.card { box-shadow: 0 2px 10px rgb(31 56 100 / .07); transition: transform .15s ease, box-shadow .15s ease }
@media (hover: hover) { .card:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgb(31 56 100 / .12) } }
.profile { background: var(--surface) }

/* Menu trên đầu cố định khi trượt */
.tabbar { position: sticky; top: 0; z-index: 14; background: color-mix(in srgb, var(--surface) 92%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); box-shadow: 0 2px 10px rgb(31 56 100 / .06) }
.tabbar .pf-tabs { border-top: 0 }
.pf-tabs a.on { border-image: var(--grad) 1; border-bottom-width: 3px; border-bottom-style: solid }
.pub-top { position: sticky; top: 0; z-index: 14; background: color-mix(in srgb, var(--surface) 92%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px) }
.sec { scroll-margin-top: 64px }

/* Nút về đầu trang */
.to-top { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 16; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: 0 6px 18px rgb(31 56 100 / .25); text-decoration: none }
.to-top[hidden] { display: none }
.to-top svg { width: 22px; height: 22px }
@media (max-width: 640px) { .to-top { bottom: calc(84px + env(safe-area-inset-bottom, 0px)) } }

/* Thanh thương hiệu (trang chủ, trang quản lý) */
.brandbar { position: sticky; top: 0; z-index: 14; background: color-mix(in srgb, var(--surface) 88%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line) }
.brandbar-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 10px }
.brandmark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--fg) }
.brandmark img { width: 36px; height: 36px; border-radius: 9px; display: block }
.brandmark b { font-size: 17px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; --acc: #1f3864 }
.a-top .brandmark img { width: 32px; height: 32px; border-radius: 8px }

/* ===== 21/11/2026: chuẩn hóa theo style Apple (HIG): font hệ thống, màu chữ, thanh mờ, segmented control, thẻ bo tròn ===== */
:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Be Vietnam Pro", system-ui, "Segoe UI", Roboto, sans-serif;
  --fg: #1d1d1f; --muted: #6e6e73; --line: rgb(60 60 67 / .14);
  --call: #34c759; --zalo: #0a84ff; --r: 18px;
  --fill-3: rgb(118 118 128 / .12);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --fg: #f5f5f7; --muted: #a1a1a6; --line: rgb(84 84 88 / .55); --call: #30d158; --fill-3: rgb(118 118 128 / .24) } }
:root[data-theme="dark"] { --fg: #f5f5f7; --muted: #a1a1a6; --line: rgb(84 84 88 / .55); --call: #30d158; --fill-3: rgb(118 118 128 / .24) }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100% }
h1, h2, h3 { letter-spacing: -0.02em }
.sec-h h2 { font-size: 22px; font-weight: 700 }
.pf-id h1 { font-weight: 700; letter-spacing: -0.025em }

/* Thẻ: bo 18px, không viền, bóng mềm như thẻ iOS */
.card, .box, .about, .area, .search { border: 0; box-shadow: 0 1px 2px rgb(0 0 0 / .04), 0 6px 20px rgb(0 0 0 / .06) }
.card { border-radius: 18px }
@media (hover: hover) { .card:hover { transform: scale(1.015); box-shadow: 0 2px 4px rgb(0 0 0 / .05), 0 12px 28px rgb(0 0 0 / .10) } }
.card .pr { letter-spacing: -0.01em }

/* Nút kiểu iOS: góc bo tròn, chữ đậm vừa, nhấn thì mờ nhẹ */
.btn { border-radius: 12px; font-weight: 600; transition: opacity .15s ease, transform .1s ease }
.btn:active { opacity: .75; transform: scale(.98) }
.btn.pri { box-shadow: none }
.btn.ghost { border: 0; background: var(--fill-3); color: var(--acc, var(--brand)) }
.mbar .btn { border-radius: 14px; min-height: 50px; font-size: 17px }

/* Ô lọc dạng viên thuốc như iOS */
.chip { border: 0; background: var(--fill-3); font-weight: 500 }
.chip[aria-pressed="true"] { font-weight: 600 }

/* Menu dạng segmented control của iOS */
.tabbar .pf-tabs { background: var(--fill-3); border-radius: 10px; padding: 2px; gap: 2px; margin-block: 8px; width: fit-content; max-width: 100% }
.tabbar .pf-tabs a, .tabbar .pf-tabs a.on { border: 0; border-image: none; border-radius: 8px; padding: 7px 14px; color: var(--fg); font-weight: 500; font-size: 14px }
.tabbar .pf-tabs a.on { background: var(--surface); font-weight: 600; box-shadow: 0 3px 8px rgb(0 0 0 / .12), 0 3px 1px rgb(0 0 0 / .04) }
@media (max-width: 640px) {
  .tabbar .pf-tabs { width: 100% }
  .tabbar .pf-tabs a { flex: 1 1 0; padding: 7px 4px; font-size: 13px }
}

/* Số trang: viên tròn nhẹ */
.pager a, .pager .pg-num, .pager .pg-btn { border: 0; background: var(--surface); box-shadow: 0 1px 2px rgb(0 0 0 / .06); border-radius: 12px }
.pager .pg-num[aria-current="page"] { box-shadow: none }

/* Chương trình ưu đãi (trang chủ, trang quản lý) */
.promo { display: grid; gap: 4px; padding: 14px 16px; border-radius: 16px; color: #fff; background: linear-gradient(135deg, #ff9f5a, #ff5e8a 55%, #8b7cf6); box-shadow: 0 6px 20px rgb(255 94 138 / .25) }
.promo b { font-size: 16px } .promo small { opacity: .9 }
#promo:empty { display: none }

/* Trang chủ: hàng Ưu đãi + Tải app (gộp 1 hàng trên máy tính, xếp chồng trên điện thoại) */
.cta-row { display: grid; gap: 16px; padding-bottom: 32px }
.cta-row.has-promo { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) }
@media (max-width: 900px) { .cta-row.has-promo { grid-template-columns: minmax(0, 1fr) } }
.promo-card { display: flex; gap: 18px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 24px; border-radius: 22px; color: #fff; background: linear-gradient(120deg, #263a7a 0%, #5a4fd0 50%, #4f9fd0 100%); box-shadow: 0 10px 30px rgb(58 70 180 / .25) }
.promo-card h2 { font-size: clamp(22px, 3vw, 30px); line-height: 1.15; letter-spacing: -0.02em; margin: 2px 0 6px }
.promo-card p { margin: 0 0 10px; opacity: .92 }
.pc-text { flex: 1 1 260px; min-width: 0 }
.pc-kicker { font-weight: 600; opacity: .85 }
.pc-until { display: inline-block; font-size: 13px; font-weight: 700; padding: 5px 12px; border-radius: 999px; background: rgb(255 255 255 / .18) }
.pc-code { flex: none; display: grid; justify-items: center; gap: 8px; padding: 16px 18px; border-radius: 18px; background: rgb(255 255 255 / .82); color: #1d1d1f; text-align: center }
.pc-code small { color: #6e6e73 }
.pc-code b { font: 800 22px/1 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .12em; color: #b3401a; padding: 10px 14px; border: 2px dashed #b3401a; border-radius: 10px }
.dl-card { display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 24px; border-radius: 22px; background: linear-gradient(120deg, #fde4d8 0%, #f8d9e8 50%, #e6ddff 100%); box-shadow: 0 1px 2px rgb(0 0 0 / .04), 0 6px 20px rgb(0 0 0 / .06); color: #1d1d1f }
.dl-text { flex: 1 1 240px; min-width: 0; display: grid; gap: 10px; justify-items: start }
.dl-text h2 { font-size: clamp(22px, 3vw, 30px); line-height: 1.15; letter-spacing: -0.02em }
.dl-text p { margin: 0; color: #515154 }
.as-badge { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px 8px 12px; border-radius: 12px; background: #000; color: #fff; text-decoration: none; line-height: 1.1 }
.as-badge svg { width: 26px; height: 26px }
.as-badge small { display: block; font-size: 11px; opacity: .9 } .as-badge b { font-size: 19px; letter-spacing: -0.01em }
.dl-qr { margin: 0; display: grid; justify-items: center; gap: 6px; padding: 12px; border-radius: 16px; background: #fff; box-shadow: 0 2px 10px rgb(0 0 0 / .06) }
.dl-qr img { width: 148px; height: 148px; display: block }
.dl-qr figcaption { font-size: 12px; color: #6e6e73 }
@media (max-width: 640px) { .dl-qr { display: none } }
@media (min-width: 641px) {
  .dl-card { flex-wrap: nowrap }
  .cta-row.has-promo .dl-qr img { width: 116px; height: 116px }
}

/* Thẻ căn: nhãn Bán / Cho thuê góc trái ảnh, Nổi bật góc phải; dòng thông số; ảnh minh họa khi chưa có ảnh */
.card .ph .pill.deal { left: 10px; top: 10px; color: #fff; font-weight: 700; box-shadow: 0 2px 6px rgb(0 0 0 / .18) }
.pill.deal.sale { background: linear-gradient(135deg, #ff7a45, #ff3b30) }
.pill.deal.rent { background: linear-gradient(135deg, #34c759, #00bcd4) }
.card .ph .pill.hot { left: auto; right: 10px }
.card .meta.specs span + span::before { content: "·"; margin-right: 6px; color: var(--muted) }
.card .meta.specs { gap: 6px }
.card .meta.place { font-size: 12.5px }
.ph-art { background: linear-gradient(150deg, #eaf2ff 0%, #efe9ff 55%, #e3f8f1 100%) }
.ph-art svg { width: 62%; height: auto }
/* Đầu trang: dòng mô tả của môi giới ngay dưới số điện thoại */
.pf-id .pf-intro { margin: 4px 0 2px; color: var(--fg); max-width: 62ch }
@media (max-width: 640px) {
  .lgrid .card .ph .pill.deal { left: 6px; top: 6px; font-size: 11px; padding: 2px 7px }
  .lgrid .card .ph .pill.hot { right: 6px; left: auto }
  .lgrid .card .meta.specs span:nth-child(n+4) { display: none }
  .lgrid .card .meta.place { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
}

/* Trang chủ: điện thoại minh họa trang mẫu /mau */
.home-top { display: grid; gap: 24px; align-items: center }
@media (min-width: 960px) { .home-top { grid-template-columns: minmax(0, 1fr) 340px } }
.phone-mock { margin: 0 auto 24px; display: grid; gap: 10px; justify-items: center }
/* Khung điện thoại đúng tỉ lệ iPhone (390 × 844 điểm), thu nhỏ còn 280 px chiều ngang */
.phone-mock .screen { display: block; width: 300px; height: 626px; overflow: hidden; border: 10px solid #1d1d1f; border-radius: 46px; background: #fff; box-shadow: 0 20px 50px rgb(31 56 100 / .25); position: relative }
.phone-mock .screen::before { content: ""; position: absolute; top: 9px; left: 50%; transform: translateX(-50%); width: 84px; height: 24px; border-radius: 999px; background: #1d1d1f; z-index: 2 }
.phone-mock iframe { width: 390px; height: 844px; border: 0; transform: scale(.718); transform-origin: 0 0; pointer-events: none; display: block; overflow: hidden }

/* Trang chủ: app trên iPad */
.ipad-sec { display: grid; gap: 24px; align-items: center; padding-bottom: 36px }
@media (min-width: 900px) { .ipad-sec { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) } }
.ipad-text { display: grid; gap: 12px }
.ipad-text h2 { font-size: clamp(24px, 3.4vw, 34px); letter-spacing: -0.02em; line-height: 1.15 }
.ipad-text p { margin: 0; color: var(--muted); font-size: 16px }
.ipad-points { margin: 0; padding-left: 20px; display: grid; gap: 6px }
.ipad-frames { position: relative; display: grid; justify-items: center; min-height: 420px }
.ipad-mock { margin: 0; width: min(78%, 360px); border: 12px solid #1d1d1f; border-radius: 30px; overflow: hidden; background: #fff; box-shadow: 0 24px 60px rgb(31 56 100 / .25); position: relative; z-index: 2 }
.ipad-mock img { width: 100%; height: auto; display: block }
.ipad-mock.back { position: absolute; top: 34px; right: 0; width: min(62%, 290px); z-index: 1; transform: rotate(6deg); opacity: .95 }
@media (max-width: 640px) { .ipad-mock.back { display: none } .ipad-frames { min-height: 0 } }

.ipad-frames { min-height: 470px; align-items: start }
.ipad-mock.front { z-index: 3; width: min(74%, 330px); margin-top: 18px }
.ipad-mock.front figcaption { position: absolute; left: 50%; bottom: -1px; transform: translateX(-50%); white-space: nowrap; font-size: 12px; font-weight: 700; color: #fff; background: var(--grad, #1f3864); padding: 5px 12px; border-radius: 999px 999px 0 0 }
.ipad-mock.back.left { right: auto; left: 0; transform: rotate(-6deg) }
@media (max-width: 640px) { .ipad-mock.back.left { display: none } }

/* Nút chuyển trang chỉ có mũi tên */
.pager .pg-btn { min-width: 44px; padding: 0; font-size: 22px; line-height: 1 }

/* Trang chi tiết căn: khung ảnh cố định 4:3 (tối đa 70% chiều cao màn hình), ảnh hiện trọn (contain) trên nền mờ của chính ảnh,
   nên ảnh dọc hay ảnh ngang đều không tràn và không bị cắt mất phần quan trọng. */
/* Trang chi tiết căn: khung 4:3 tối đa 72vh; ảnh ngang phủ khung, ảnh dọc/vuông hiện trọn trên nền mờ của chính ảnh */
.slides { align-items: flex-start }
.slides .slide { flex: 0 0 100%; scroll-snap-align: center; position: relative; overflow: hidden; aspect-ratio: 4 / 3; max-height: 72vh; width: 100%; background: var(--soft) }
.slides .slide::before { content: ""; position: absolute; inset: -24px; background: var(--img) center / cover no-repeat; filter: blur(22px) saturate(1.1); opacity: .6; transform: scale(1.08) }
.slides .slide img { position: relative; z-index: 1; width: 100%; height: 100%; max-width: 100%; aspect-ratio: auto; object-fit: contain; display: block; background: transparent }
.slides .slide img.wide { object-fit: cover }
.gal-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 0; background: #ffffffe6; color: #1d1d1f; font-size: 26px; line-height: 1; display: grid; place-items: center; cursor: pointer; box-shadow: 0 2px 10px #0003; padding: 0 0 3px }
.gal-nav.prev { left: 10px } .gal-nav.next { right: 10px }
.gal-count { position: absolute; right: 10px; bottom: 10px; z-index: 2; background: #000a; color: #fff; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px }
@media (hover: none) { .gal-nav { display: none } }
dialog.lb { position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #000; overflow: hidden }
dialog.lb::backdrop { background: #000 }
dialog.lb[open] { display: grid; place-items: center }
dialog.lb img { max-width: 100vw; max-height: 100dvh; width: auto; height: auto; object-fit: contain; display: block }
.lb-x, .lb-nav { position: absolute; z-index: 2; border: 0; border-radius: 50%; background: #0009; color: #fff; width: 44px; height: 44px; display: grid; place-items: center; cursor: pointer; font-size: 20px }
.lb-x { top: max(12px, env(safe-area-inset-top)); right: 12px }
.lb-nav { top: 50%; transform: translateY(-50%); font-size: 30px; padding-bottom: 4px } .lb-nav.prev { left: 12px } .lb-nav.next { right: 12px }
.lb-count { position: absolute; bottom: max(14px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); color: #fff; font-size: 13px; font-weight: 600 }
/* Giao diện tối: màu chủ đạo của môi giới thường đậm (xanh than...) nên chữ nút phụ dùng màu chữ chính cho đủ tương phản */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.ghost { color: var(--fg) } }
:root[data-theme="dark"] .btn.ghost { color: var(--fg) }

/* Bộ gradient pastel cho nền trang (bg_kind = gradient). Mặc định "" dùng --page-grad gốc (= Tươi sáng). */
body.bg-g-tuoi-sang { --page-grad: linear-gradient(160deg, #cdebff 0%, #e3daff 48%, #cff7ea 100%) }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body.bg-g-tuoi-sang { --page-grad: linear-gradient(160deg, #14274d 0%, #2b2162 48%, #0f4b4b 100%) } }
:root[data-theme="dark"] body.bg-g-tuoi-sang { --page-grad: linear-gradient(160deg, #14274d 0%, #2b2162 48%, #0f4b4b 100%) }
body.bg-g-binh-minh { --page-grad: linear-gradient(160deg, #ffe1cc 0%, #ffd6e8 48%, #e6dcff 100%) }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body.bg-g-binh-minh { --page-grad: linear-gradient(160deg, #3d2324 0%, #3a2140 48%, #2a1f4d 100%) } }
:root[data-theme="dark"] body.bg-g-binh-minh { --page-grad: linear-gradient(160deg, #3d2324 0%, #3a2140 48%, #2a1f4d 100%) }
body.bg-g-bien { --page-grad: linear-gradient(160deg, #cfe8ff 0%, #d4f3ff 48%, #d8fff4 100%) }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body.bg-g-bien { --page-grad: linear-gradient(160deg, #0f2a4a 0%, #0e3a4f 48%, #0d4040 100%) } }
:root[data-theme="dark"] body.bg-g-bien { --page-grad: linear-gradient(160deg, #0f2a4a 0%, #0e3a4f 48%, #0d4040 100%) }
body.bg-g-vuon { --page-grad: linear-gradient(160deg, #dff3e2 0%, #d9ecff 48%, #fff3c4 100%) }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body.bg-g-vuon { --page-grad: linear-gradient(160deg, #15301f 0%, #122a40 48%, #33301a 100%) } }
:root[data-theme="dark"] body.bg-g-vuon { --page-grad: linear-gradient(160deg, #15301f 0%, #122a40 48%, #33301a 100%) }
body.bg-g-hoa-tim { --page-grad: linear-gradient(160deg, #e6dcff 0%, #f3d9f7 48%, #dde4ff 100%) }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body.bg-g-hoa-tim { --page-grad: linear-gradient(160deg, #2a1f4d 0%, #3a1f45 48%, #1f2650 100%) } }
:root[data-theme="dark"] body.bg-g-hoa-tim { --page-grad: linear-gradient(160deg, #2a1f4d 0%, #3a1f45 48%, #1f2650 100%) }
body.bg-g-trung-tinh { --page-grad: linear-gradient(160deg, #f3f1ec 0%, #ebeef2 48%, #f5f2ee 100%) }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body.bg-g-trung-tinh { --page-grad: linear-gradient(160deg, #1d1f23 0%, #23262b 48%, #1e2024 100%) } }
:root[data-theme="dark"] body.bg-g-trung-tinh { --page-grad: linear-gradient(160deg, #1d1f23 0%, #23262b 48%, #1e2024 100%) }

/* Bộ lọc trang môi giới: giao dịch + loại trong một hộp (22/11/2026) */
.filters { gap: 12px }
.f-row { display: grid; grid-template-columns: 76px 1fr; align-items: center; gap: 10px; min-width: 0 }
.f-lab { font-size: 13px; font-weight: 600; color: var(--muted) }
.seg { display: flex; gap: 6px; flex-wrap: wrap }
@media (max-width: 560px) { .f-row { grid-template-columns: 1fr; gap: 6px } }

/* ===== Landing page bán sơ cấp (22/11/2026) ===== */
.lp { padding-bottom: 84px }
.lp-top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--surface) 88%, transparent); -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid var(--line) }
.lp-top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px }
.lp-top .logo { display: flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; min-width: 0 }
.lp-top .logo span { display: grid; min-width: 0 } .lp-top .logo b { font-size: 15px } .lp-top .logo small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.lp-hero { position: relative; color: #fff; background: #0f1d33 var(--cover, none) center / cover no-repeat; isolation: isolate }
.lp-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgb(8 15 30 / .25) 0%, rgb(8 15 30 / .55) 55%, rgb(8 15 30 / .85) 100%) }
.lp-hero-in { display: grid; gap: 14px; align-content: end; min-height: min(78vh, 640px); padding-block: 72px 40px }
.lp-badge { justify-self: start; background: rgb(255 255 255 / .16); border: 1px solid rgb(255 255 255 / .35); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600 }
.lp-hero h1 { font-size: clamp(30px, 6vw, 56px); line-height: 1.08; letter-spacing: -.02em; margin: 0; max-width: 16ch; text-wrap: balance }
.lp-sub { font-size: clamp(15px, 2.2vw, 19px); line-height: 1.55; max-width: 60ch; margin: 0; color: rgb(255 255 255 / .9) }
.lp-price { margin: 4px 0 0; display: grid; gap: 2px } .lp-price small { font-size: 13px; color: rgb(255 255 255 / .8) } .lp-price b { font-size: clamp(28px, 5vw, 40px); line-height: 1.1 }
.lp-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px }
.lp-cta .btn { min-height: 50px; padding: 0 22px; font-size: 16px; border-radius: 14px }
.lp-ghost { background: rgb(255 255 255 / .14); color: #fff; border: 1px solid rgb(255 255 255 / .4); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px) }
.lp-main { display: grid; gap: 22px; padding-block: 22px 10px }
.lp-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: -54px; position: relative; z-index: 2 }
.lp-stats div { background: var(--surface); border-radius: var(--r); padding: 16px 12px; text-align: center; display: grid; gap: 4px; box-shadow: 0 8px 24px rgb(15 30 60 / .12) }
.lp-stats b { font-size: clamp(18px, 3vw, 26px); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent }
.lp-stats span { font-size: 13px; color: var(--muted) }
.lp-sec { background: var(--surface); border-radius: 20px; padding: clamp(18px, 3vw, 32px); display: grid; gap: 16px; box-shadow: 0 2px 12px rgb(31 56 100 / .06) }
.lp-sec h2 { margin: 0; font-size: clamp(20px, 3vw, 28px); letter-spacing: -.01em }
.lp-hl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px }
.lp-hl-i { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: var(--r); background: var(--soft) }
.lp-hl-i b { display: block; font-size: 16px } .lp-hl-i p { margin: 4px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5 }
.lp-ic { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--grad); color: #fff }
.lp-ic svg { width: 22px; height: 22px }
.lp-gal { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: calc(-1 * clamp(18px, 3vw, 32px)); padding-inline: clamp(18px, 3vw, 32px) }
.lp-gal::-webkit-scrollbar { display: none }
.lp-gal img { flex: 0 0 auto; width: min(78%, 520px); min-width: 0; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r); scroll-snap-align: start; background: var(--soft) }
.lp-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 24px; margin: 0 }
.lp-facts div { display: grid; grid-template-columns: 110px 1fr; gap: 10px; padding-block: 10px; border-bottom: 1px solid var(--line) }
.lp-facts dt { color: var(--muted); font-size: 14px } .lp-facts dd { margin: 0; font-weight: 600 }
.lp-offer { background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--grad) border-box; border: 2px solid transparent }
.lp-offer p { margin: 0; line-height: 1.7; font-size: 16px } .lp-offer .btn { justify-self: start }
.lp-loc p { margin: 0; color: var(--muted) } .lp-loc .btn { justify-self: start }
.lp-reg { grid-template-columns: 1fr 1fr; align-items: start; gap: clamp(16px, 4vw, 40px) }
.lp-reg-txt { display: grid; gap: 12px } .lp-reg-txt p { margin: 0; color: var(--muted); line-height: 1.6 }
.lp-agent { display: flex; gap: 10px; align-items: center } .lp-agent span { display: grid } .lp-agent small { color: var(--muted) }
.lp-reg-box { background: var(--soft); border-radius: var(--r); padding: 18px }
.lp-form { display: grid; gap: 12px }
.lp-f { display: grid; gap: 6px; font-size: 14px; font-weight: 600 }
.lp-f input, .lp-f select { font: inherit; font-weight: 400; font-size: 16px; min-height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); width: 100% }
.lp-f input:focus-visible, .lp-f select:focus-visible { outline: 2px solid var(--acc, var(--brand)); outline-offset: 1px }
.lp-f [aria-invalid="true"] { border-color: var(--price) }
.lp-submit { min-height: 52px; font-size: 17px; border-radius: 14px }
.lp .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0 }
.lp-done { display: grid; gap: 8px; text-align: center; padding: 10px } .lp-done b { font-size: 18px; color: var(--ok) } .lp-done span { color: var(--muted) }
.lp-done-acts { display: flex; gap: 8px; justify-content: center; margin-top: 6px }
.lp-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 8px; padding: 10px max(12px, env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); background: color-mix(in srgb, var(--surface) 92%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-top: 1px solid var(--line) }
.lp-bar .btn { min-height: 50px; border-radius: 14px; font-size: 16px; padding: 0 10px }
@media (min-width: 900px) { .lp-bar { display: none } .lp { padding-bottom: 0 } }
@media (max-width: 899px) { .lp-top-call span { display: none } .lp-top-call { padding: 0 10px } }
@media (max-width: 760px) {
  .lp-stats { grid-template-columns: repeat(2, 1fr); margin-top: -40px }
  .lp-hl, .lp-facts, .lp-reg { grid-template-columns: 1fr }
  .lp-hero-in { min-height: 72vh; padding-block: 56px 64px }
  .lp-cta .btn.lp-ghost { flex: 1 }
  .lp-cta .btn.pri { flex: 1 0 100% }
}

/* ===== Trang cá nhân môi giới, bố cục mới theo phong cách landing (22/11/2026) ===== */
.pf2 .pf-hero .cover { max-width: none; max-height: none; aspect-ratio: auto; height: clamp(200px, 34vw, 420px); border-radius: 0 }
.pf2 .pf-hero .cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(8 15 30 / 0) 50%, rgb(8 15 30 / .35) 100%) }
.pf-card { position: relative; z-index: 2; margin-top: clamp(-120px, -8vw, -60px); background: var(--surface); border-radius: 24px; padding: clamp(18px, 3vw, 28px); display: grid; grid-template-columns: auto 1fr auto; gap: 8px 24px; align-items: center; box-shadow: 0 10px 34px rgb(15 30 60 / .14) }
.pf-card .pf-ava { width: clamp(104px, 12vw, 148px); height: clamp(104px, 12vw, 148px); border: 4px solid var(--surface); margin-top: clamp(-90px, -6vw, -50px); align-self: start; font-size: 44px }
.pf-card .pf-id { padding: 0; gap: 4px; min-width: 0 }
.pf-card .pf-intro { margin: 6px 0 2px; color: var(--fg); line-height: 1.55 }
.pf-side { display: grid; gap: 12px; justify-items: end; align-self: center }
.pf-side .pf-cta { display: flex; gap: 8px; padding: 0; flex-wrap: wrap; justify-content: flex-end }
.pf-side .pf-cta .btn { min-height: 46px; padding: 0 18px; border-radius: 14px }
.pf-side .socials { margin: 0 }
.pf-nav { position: sticky; top: 0; z-index: 14; margin-top: 18px; background: color-mix(in srgb, var(--surface) 82%, transparent); -webkit-backdrop-filter: saturate(1.5) blur(14px); backdrop-filter: saturate(1.5) blur(14px); border-block: 1px solid var(--line) }
.pf-nav .gut { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-block: 8px }
.pf-nav .gut::-webkit-scrollbar { display: none }
.pf-nav a { flex: none; padding: 8px 16px; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 14px; color: var(--fg); background: var(--fill-3, #eef1f6) }
.pf-nav a[aria-current="true"] { background: var(--grad); color: #fff }
.pf2 .sec { scroll-margin-top: 0 }
html:has(.pf2) { scroll-behavior: smooth; scroll-padding-top: 72px }
.pj-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px }
.pj-card { display: grid; grid-template-rows: auto 1fr; background: var(--surface); border-radius: 18px; overflow: hidden; text-decoration: none; color: var(--fg); box-shadow: 0 4px 18px rgb(31 56 100 / .10); transition: transform .15s ease, box-shadow .15s ease }
.pj-card:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgb(31 56 100 / .16) }
.pj-ph { position: relative; aspect-ratio: 16 / 10; background: var(--grad) center / cover no-repeat }
.pj-badge { position: absolute; left: 10px; top: 10px; background: rgb(255 255 255 / .9); color: #142033; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px }
.pj-bd { padding: 14px 16px 16px; display: grid; gap: 6px; align-content: start }
.pj-bd h3 { font-size: 18px; margin: 0 }
.pj-bd p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden }
.pj-ft { display: flex; justify-content: space-between; align-items: baseline; margin-top: 4px }
.pj-ft b { color: var(--price); font-size: 18px }
.pj-go { font-weight: 700; color: var(--acc, var(--brand)); font-size: 14px }
.pf-ask { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--grad) border-box; border: 2px solid transparent; border-radius: 20px; padding: clamp(18px, 3vw, 28px) }
.pf-ask h2 { margin: 0; font-size: clamp(18px, 2.4vw, 24px) } .pf-ask p { margin: 4px 0 0; color: var(--muted) }
.pf-ask-acts { display: flex; gap: 8px; flex-wrap: wrap }
@media (max-width: 900px) { .pj-row { grid-template-columns: repeat(2, 1fr) } }
@media (max-width: 760px) {
  .pf-card { grid-template-columns: 1fr; text-align: center; justify-items: center; margin-top: -48px; border-radius: 20px }
  .pf-card .pf-ava { margin-top: -78px }
  .pf-card .pf-id { justify-items: center } .pf-card .pf-id h1 { justify-content: center }
  .pf-side { justify-items: center } .pf-side .pf-cta { display: none }
  .pj-row { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px }
  .pj-row::-webkit-scrollbar { display: none }
  .pj-card { flex: 0 0 82%; scroll-snap-align: start }
  .pf-ask { grid-template-columns: 1fr; text-align: center } .pf-ask-acts { justify-content: center }
}
/* Landing: menu cố định neo tới từng khối */
html:has(.lp) { scroll-behavior: smooth; scroll-padding-top: 76px }
.lp-top-in { flex-wrap: nowrap }
.lp-nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; min-width: 0; flex: 1; justify-content: center }
.lp-nav::-webkit-scrollbar { display: none }
.lp-nav a { flex: none; padding: 7px 12px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--fg); text-decoration: none; white-space: nowrap }
.lp-nav a:hover { background: var(--fill-3, #eef1f6) }
.lp-nav a[aria-current="true"] { background: var(--grad); color: #fff }
@media (max-width: 1279px) {
  html:has(.lp) { scroll-padding-top: 112px }
  .lp-top-in { flex-wrap: wrap; row-gap: 0; padding-top: 6px }
  .lp-top .logo { flex: 1 }
  .lp-nav { order: 3; flex: 1 0 100%; justify-content: flex-start; padding-block: 6px 8px; margin-inline: -16px; padding-inline: 16px }
  .lp-nav a { background: var(--fill-3, #eef1f6); font-size: 13px; padding: 6px 12px }
}
/* Landing kiểu đầu trang "Chia đôi": chữ bên trái trên nền gradient của trang, ảnh bo góc bên phải */
.lp-hero.split { background: none; color: var(--fg); isolation: auto }
.lp-hero.split::before { display: none }
.lp-split { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(18px, 4vw, 48px); align-items: center; padding-block: clamp(28px, 5vw, 64px) clamp(70px, 8vw, 96px) }
.lp-hero.split .lp-hero-in { min-height: 0; padding: 0; align-content: center }
.lp-hero.split .lp-badge { background: var(--surface); border-color: var(--line); color: var(--acc, var(--brand)) }
.lp-hero.split h1 { color: var(--fg) }
.lp-hero.split .lp-sub { color: var(--muted) }
.lp-hero.split .lp-price small { color: var(--muted) } .lp-hero.split .lp-price b { color: var(--price) }
.lp-hero.split .lp-ghost { background: var(--surface); color: var(--fg); border: 1px solid var(--line) }
.lp-hero-img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 24px; display: block; box-shadow: 0 18px 40px rgb(15 30 60 / .22) }
@media (max-width: 760px) {
  .lp-split { grid-template-columns: 1fr; padding-block: 18px 64px }
  .lp-hero-img { order: -1 }
}
/* Landing: popup tin nóng khi mở trang (1 ảnh + 1 khung chữ) */
.lp-pop { border: 0; padding: 0; background: transparent; max-width: min(820px, calc(100vw - 32px)); width: 100%; max-height: calc(100dvh - 32px); overflow: visible }
.lp-pop::backdrop { background: rgb(8 15 30 / .55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px) }
.lp-pop[open] { animation: lpPop .28s ease-out }
@keyframes lpPop { from { opacity: 0; transform: translateY(14px) scale(.98) } }
.lp-pop-in { position: relative; display: grid; grid-template-columns: 1.1fr 1fr; background: var(--surface); color: var(--fg); border-radius: 22px; overflow: hidden; box-shadow: 0 24px 60px rgb(0 0 0 / .35); max-height: calc(100dvh - 32px) }
.lp-pop-in:not(:has(.lp-pop-img)) { grid-template-columns: 1fr; max-width: 480px; margin-inline: auto }
.lp-pop-img { min-height: 100%; background: var(--soft) }
.lp-pop-img img { width: 100%; height: 100%; object-fit: cover; display: block; min-height: 320px }
.lp-pop-txt { display: grid; gap: 12px; align-content: center; padding: clamp(20px, 3vw, 32px); overflow-y: auto }
.lp-pop-tag { justify-self: start; background: var(--grad); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; letter-spacing: .02em }
.lp-pop-txt h2 { margin: 0; font-size: clamp(20px, 2.6vw, 26px); line-height: 1.25 }
.lp-pop-txt p { margin: 0; color: var(--muted); line-height: 1.6 }
.lp-pop-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px }
.lp-pop-acts .btn { min-height: 46px; border-radius: 14px; flex: 1 1 auto }
.lp-pop-x { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgb(0 0 0 / .55); color: #fff; font-size: 16px; cursor: pointer; display: grid; place-items: center }
@media (max-width: 640px) {
  .lp-pop { max-width: calc(100vw - 24px) }
  .lp-pop-in { grid-template-columns: 1fr; grid-template-rows: auto 1fr; max-height: calc(100dvh - 24px) }
  .lp-pop-img img { min-height: 0; aspect-ratio: 4 / 3; max-height: 42dvh }
  .lp-pop-txt { padding: 18px }
}
/* Landing: tên dự án nổi bật trên thanh trên cùng, menu nhẹ hơn */
.lp-brand { flex: 0 1 auto }
.lp-brand .avatar { width: 38px; height: 38px; flex: none }
.lp-top .lp-brand .lp-proj { font-size: 18px; font-weight: 800; letter-spacing: -.01em; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: linear-gradient(90deg, var(--fg) 0%, var(--acc, var(--brand)) 100%); -webkit-background-clip: text; background-clip: text; color: transparent }
.lp-top .lp-brand small { font-size: 12px }
.lp-nav a { font-size: 13.5px; font-weight: 500; color: var(--muted) }
.lp-nav a[aria-current="true"] { font-weight: 600 }
@media (max-width: 1279px) {
  .lp-brand { max-width: none; flex: 1; min-width: 0 }
  .lp-top .lp-brand .lp-proj { font-size: 17px }
  .lp-nav a { color: var(--fg) }
}
/* Landing: 3 nút dưới màn hình cân đều */
.lp-bar { grid-template-columns: repeat(3, minmax(0, 1fr)) }
.lp-bar .btn { min-width: 0; gap: 6px; font-size: 15px; padding: 0 6px; white-space: nowrap }
.lp-bar .btn span { overflow: hidden; text-overflow: ellipsis }
.lp-bar .btn svg { width: 18px; height: 18px; flex: none }
/* Bộ chủ đề landing: số liệu gradient (mặc định cam–đỏ–vàng), giá nổi bật */
.lp-stats b { background: var(--num-grad, linear-gradient(90deg, #f59e0b, #f97316 45%, #ef4444)); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 800 }
.lp-price b { font-size: clamp(32px, 5.6vw, 46px); font-weight: 800; letter-spacing: -.01em; background: linear-gradient(90deg, #fde68a, #fbbf24 40%, #fb923c); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none }
.lp-price small { text-transform: uppercase; letter-spacing: .06em; font-weight: 600 }
.lp-hero.split .lp-price b { background: none; color: var(--lp-price, var(--price)); -webkit-text-fill-color: currentColor }
.lp .pj-ft b, .lp .card .price, .lp .big-pr { color: var(--lp-price, var(--price)) }
.lp-hero:not(.split) .lp-price { display: inline-grid; justify-self: start; padding: 8px 16px 10px; border-radius: 16px; background: rgb(0 0 0 / .28); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); border: 1px solid rgb(255 255 255 / .18) }
/* Landing: menu trên cùng chỉ có viền mảnh, không tô nền nút */
.lp-nav a, .lp-nav a:hover { background: none !important; border: 1.5px solid transparent; padding: 6px 12px }
.lp-nav a:hover { border-color: var(--line) }
.lp-nav a[aria-current="true"] { background: none !important; color: var(--acc, var(--brand)); border-color: var(--acc, var(--brand)); font-weight: 600 }
@media (max-width: 1279px) { .lp-nav a { background: none !important; border-color: var(--line) } .lp-nav a[aria-current="true"] { border-color: var(--acc, var(--brand)) } }
/* Landing: thanh trên cùng không đè nhau (tên dự án co lại có dấu …, menu chừa khoảng) */
.lp-top-in { gap: 16px }
.lp-brand { flex: 0 1 auto; min-width: 0 }
.lp-brand > span { min-width: 0; overflow: hidden }
.lp-top .lp-brand small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.lp-top-call { flex: none }
@media (min-width: 1280px) { .lp-brand { flex: none; max-width: none } .lp-nav { flex: 1 1 auto; justify-content: center; gap: 2px } .lp-nav a { padding: 6px 10px } }
/* Landing: khối Vị trí có bản đồ nhỏ */
.lp-loc { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); align-items: center; gap: clamp(16px, 3vw, 32px) }
.lp-loc-txt { display: grid; gap: 12px; align-content: center } .lp-loc-txt .btn { justify-self: start }
.lp-map { border-radius: 16px; overflow: hidden; aspect-ratio: 16 / 10; background: var(--soft); border: 1px solid var(--line) }
.lp-map iframe { width: 100%; height: 100%; border: 0; display: block }
@media (max-width: 760px) { .lp-loc { grid-template-columns: 1fr } .lp-map { aspect-ratio: 4 / 3 } }
/* Trang cá nhân: thẻ "Dự án đang mở bán" thẳng mép với các khối khác (22/11/2026)
   1 dự án: rộng hết khung (máy tính: ảnh trái, chữ phải). 2–3 dự án: chia cột đều. Điện thoại: 1 dự án rộng hết khung, nhiều dự án lướt ngang, thẻ đầu thẳng mép trái. */
.pj-row.n1 { grid-template-columns: 1fr }
.pj-row.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)) }
.pj-row.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)) }
@media (min-width: 761px) {
  .pj-row.n1 .pj-card { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); grid-template-rows: none }
  .pj-row.n1 .pj-ph { aspect-ratio: auto; min-height: 280px }
  .pj-row.n1 .pj-bd { padding: 24px 28px; align-content: center; gap: 10px }
  .pj-row.n1 .pj-bd h3 { font-size: 24px }
  .pj-row.n1 .pj-bd p { -webkit-line-clamp: 4 }
}
@media (max-width: 900px) and (min-width: 761px) { .pj-row.n3 { grid-template-columns: repeat(2, minmax(0, 1fr)) } }
@media (max-width: 760px) {
  .pj-row.n1 { display: grid; margin-inline: 0; padding-inline: 0 }
  .pj-row.n1 .pj-card { width: 100% }
  .pj-row.n2, .pj-row.n3 { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; margin-inline: -16px; padding-inline: 16px; gap: 12px }
  .pj-row.n2 .pj-card, .pj-row.n3 .pj-card { flex: 0 0 86%; scroll-snap-align: start }
}

/* Landing: khối Mặt bằng, Layout sản phẩm, Tiện ích (22/11/2026); màu lấy từ bộ chủ đề (--grad, --price) */
.lp-zoom { display: block; position: relative; cursor: zoom-in; border-radius: var(--r); overflow: hidden; background: var(--soft) }
.lp-zoom img { display: block; width: 100%; height: auto }
.lp-zoom::after { content: ""; position: absolute; right: 10px; bottom: 10px; width: 36px; height: 36px; border-radius: 50%; background: rgb(0 0 0 / .55) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6'/%3E%3Cpath d='m20 20-4.5-4.5M11 8v6M8 11h6'/%3E%3C/svg%3E") center / 20px no-repeat }
.lp-plan { margin: 0; display: grid; gap: 10px }
.lp-plan figcaption { color: var(--muted); font-size: 15px; line-height: 1.6 }
.lp-lay { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px }
.lp-lay-c { display: grid; align-content: start; border-radius: var(--r); background: var(--soft); overflow: hidden }
.lp-lay-img { border-radius: 0; background: #fff }
.lp-lay-img img { aspect-ratio: 4 / 3; object-fit: contain }
.lp-lay-t { display: grid; gap: 3px; padding: 12px 14px 14px }
.lp-lay-t b { font-size: 17px } .lp-lay-t span { color: var(--muted); font-size: 14px }
.lp-lay-t em { font-style: normal; font-weight: 700; color: var(--lp-price, var(--price)) }
.lp-am { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px }
.lp-am li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r); background: var(--soft); font-weight: 600; font-size: 15px; line-height: 1.3; min-width: 0 }
.lp-am .lp-ic { width: 38px; height: 38px; border-radius: 11px } .lp-am .lp-ic svg { width: 20px; height: 20px }
.lp-am-img img { aspect-ratio: 16 / 9; object-fit: cover }
.lp-lb { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100dvh; width: 100vw; height: 100dvh; display: none; place-items: center }
.lp-lb[open] { display: grid }
.lp-lb::backdrop { background: rgb(5 10 20 / .9) }
.lp-lb img { max-width: calc(100vw - 24px); max-height: calc(100dvh - 80px); width: auto; height: auto; object-fit: contain; border-radius: 10px; background: #fff; cursor: zoom-out }
.lp-lb .lp-pop-x { position: fixed; z-index: 2; top: max(12px, env(safe-area-inset-top)); right: 12px; width: 44px; height: 44px; font-size: 18px }
@media (max-width: 899px) { .lp-lay { grid-template-columns: repeat(2, 1fr) } .lp-am { grid-template-columns: repeat(3, 1fr) } }
@media (max-width: 559px) { .lp-lay { grid-template-columns: 1fr } .lp-am { grid-template-columns: repeat(2, 1fr) } .lp-am li { font-size: 14px; padding: 10px } }
.lp-lb.big { overflow: auto; place-items: start }
.lp-lb.big img { max-width: none; max-height: none; width: min(1640px, 260vw); border-radius: 0; cursor: zoom-out }
.lp-lb:not(.big) img { cursor: zoom-in }
