:root {
  --paper: #fffdf9;
  --cream: #f8f0e3;
  --cream-2: #f3e5cf;
  --gold: #c99b4a;
  --gold-deep: #a97828;
  --ink: #202024;
  --muted: #6f6c68;
  --line: #e7d8c1;
  --shadow: 0 18px 50px rgba(89, 64, 26, .12);
  --shell: min(100% - 48px, 1400px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: "IBM Plex Sans Thai", system-ui, sans-serif; }
body.menu-open, body.panel-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 200; left: 14px; top: -70px; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: #fff; transition: top .2s; }
.skip-link:focus { top: 14px; }

.inner-header { position: sticky; z-index: 100; top: 0; height: 78px; border-bottom: 1px solid rgba(169,120,40,.08); background: rgba(255,253,249,.94); backdrop-filter: blur(18px); }
.header-inner { width: var(--shell); height: 100%; margin: 0 auto; display: grid; grid-template-columns: 240px 1fr 240px; align-items: center; }
.inner-brand { width: 150px; }
.inner-brand img { width: 100%; height: auto; }
.inner-nav { justify-self: center; display: flex; align-items: stretch; gap: 42px; height: 100%; }
.inner-nav a { position: relative; display: grid; place-items: center; color: #343332; font-size: 16px; font-weight: 600; white-space: nowrap; }
.inner-nav a::after { content: ""; position: absolute; left: 50%; right: 50%; bottom: 13px; height: 2px; background: var(--gold-deep); transition: left .2s, right .2s; }
.inner-nav a:hover::after, .inner-nav a.active::after { left: 0; right: 0; }
.inner-nav a.active { color: var(--gold-deep); }
.header-action { justify-self: end; min-width: 180px; min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid var(--gold); border-radius: 12px; color: #75541e; font-weight: 650; background: rgba(255,255,255,.4); }
.header-action:hover { background: var(--cream); }
.menu-toggle { display: none; justify-self: end; width: 46px; height: 46px; border: 1px solid var(--line); border-radius: 50%; background: #fff; }
.menu-toggle span { width: 18px; height: 1.5px; margin: 4px auto; display: block; background: var(--ink); }

.page-shell { position: relative; isolation: isolate; overflow: hidden; background: var(--paper); }
.page-shell::before, .page-shell::after { content: ""; position: absolute; z-index: -1; width: 720px; height: 720px; border: 42px solid rgba(214,183,132,.11); border-radius: 45% 55% 50% 50%; transform: rotate(22deg); pointer-events: none; }
.page-shell::before { left: -520px; top: 30px; }
.page-shell::after { right: -530px; top: 30px; }
.eyebrow { margin: 0 0 16px; color: var(--gold-deep); font-family: Manrope, sans-serif; font-size: 14px; font-weight: 700; letter-spacing: .33em; }
.gold { color: var(--gold-deep); }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 18px; border-radius: 999px; background: #f5e8d4; color: #8a6325; font: 700 13px Manrope, sans-serif; letter-spacing: .02em; }

/* Buyer search */
.search-hero { position: relative; min-height: 440px; overflow: hidden; background: linear-gradient(90deg, rgba(255,253,249,.99) 0%, rgba(255,253,249,.94) 37%, rgba(255,253,249,.24) 70%), url("assets/ratchada-featured.jpg") center 54% / cover no-repeat; }
.search-hero::after { content: ""; position: absolute; left: -13%; bottom: -355px; width: 87%; height: 680px; border-radius: 50%; background: rgba(255,253,249,.93); }
.search-hero-inner { position: relative; z-index: 2; width: var(--shell); margin: 0 auto; padding: 36px 0 30px; }
.search-hero h1 { max-width: 620px; margin: 0; padding-top: .12em; font-size: clamp(48px, 5vw, 76px); line-height: 1.12; letter-spacing: -.055em; }
.search-hero-copy { max-width: 750px; margin: 12px 0 18px; color: #514e4a; font-size: 20px; }
.search-box { max-width: 940px; display: grid; grid-template-columns: 1fr 185px; gap: 10px; padding: 7px 8px 7px 25px; border: 1px solid rgba(169,120,40,.19); border-radius: 999px; background: rgba(255,255,255,.96); box-shadow: var(--shadow); }
.search-box label { min-width: 0; display: flex; align-items: center; gap: 14px; }
.search-box svg { flex: 0 0 auto; color: #6c6965; }
.search-box input { width: 100%; min-width: 0; height: 48px; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 17px; }
.search-box input::placeholder { color: #aaa6a0; }
.search-box button { border: 0; border-radius: 999px; color: #fff; background: linear-gradient(135deg, #d4a653, #af7927); font-weight: 700; font-size: 17px; box-shadow: 0 8px 24px rgba(169,120,40,.22); }
.filter-row { max-width: 960px; margin-top: 17px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.filter-chip { min-height: 43px; padding: 0 16px; display: inline-flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.9); color: #4a4845; font-weight: 600; cursor: pointer; }
.filter-chip select { appearance: none; max-width: 145px; border: 0; outline: 0; background: transparent; color: inherit; font-weight: 600; cursor: pointer; }
.filter-chip.toggle.active { border-color: var(--gold); color: var(--gold-deep); background: #fff8ed; }
.filter-chip.ai { border-color: var(--gold); color: var(--gold-deep); background: rgba(255,250,241,.96); }

.listing-section { position: relative; z-index: 4; width: min(100% - 24px, 1490px); margin: -6px auto 70px; padding: 30px 48px 45px; border-radius: 42px 42px 0 0; background: rgba(255,255,255,.97); box-shadow: 0 -13px 38px rgba(84,57,20,.06); }
.listing-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.listing-toolbar h2 { margin: 0; font-size: clamp(30px, 3vw, 42px); letter-spacing: -.04em; }
.listing-toolbar h2 small { margin-left: 12px; color: #8e8982; font-size: 14px; font-weight: 500; letter-spacing: 0; }
.toolbar-actions { display: flex; align-items: center; gap: 10px; }
.toolbar-actions select { min-height: 44px; padding: 0 42px 0 16px; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: #46433f; }
.view-button { width: 46px; height: 44px; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: #6e675e; }
.view-button.active { border-color: var(--gold); color: #fff; background: var(--gold); }
.listing-status { min-height: 260px; display: grid; place-items: center; color: #77736d; text-align: center; }
.listing-status[hidden] { display: none; }
.loader { width: 40px; height: 40px; margin: 0 auto 12px; border: 3px solid var(--cream-2); border-top-color: var(--gold); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.property-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.property-card { position: relative; overflow: hidden; border: 1px solid rgba(202,172,124,.25); border-radius: 15px; background: #fff; box-shadow: 0 10px 24px rgba(59,45,25,.08); transition: transform .2s, box-shadow .2s; }
.property-card:hover { transform: translateY(-4px); box-shadow: 0 18px 36px rgba(59,45,25,.13); }
.property-photo { position: relative; height: 215px; overflow: hidden; background: #eee7dc; }
.property-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.property-card:hover .property-photo img { transform: scale(1.025); }
.property-badge { position: absolute; left: 14px; top: 14px; padding: 6px 13px; border-radius: 999px; background: rgba(255,253,249,.93); color: #90671f; font-size: 13px; font-weight: 700; box-shadow: 0 4px 15px rgba(0,0,0,.08); }
.save-button { position: absolute; right: 13px; top: 13px; width: 42px; height: 42px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255,255,255,.94); color: #2f2d2a; font-size: 22px; box-shadow: 0 4px 14px rgba(0,0,0,.12); }
.save-button.saved { color: #a97828; }
.property-body { padding: 14px 18px 17px; }
.property-body h3 { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 750 20px Manrope, "IBM Plex Sans Thai", sans-serif; }
.property-location { margin: 5px 0 12px; overflow: hidden; color: #78746e; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.property-meta { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 10px; padding-top: 12px; border-top: 1px solid #eee5d8; }
.property-specs { display: flex; align-items: center; gap: 7px; color: #625e58; font-size: 13px; white-space: nowrap; }
.property-price { color: #97671f; font-weight: 750; font-size: 20px; white-space: nowrap; }
.property-card-actions { margin-top: 13px; display: flex; gap: 8px; }
.property-card-actions a { flex: 1; min-height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 9px; color: #62533d; font-size: 13px; font-weight: 650; }
.property-card-actions a.primary { border-color: var(--gold); color: #fff; background: var(--gold); }
.load-more { margin: 30px auto 0; min-width: 190px; min-height: 48px; display: block; border: 1px solid var(--gold); border-radius: 999px; background: #fff; color: var(--gold-deep); font-weight: 700; }
.load-more[hidden] { display: none; }

/* Journal hub */
.journal-main { min-height: calc(100vh - 78px); padding: 32px 0 30px; }
.journal-hero { width: var(--shell); margin: 0 auto; display: grid; grid-template-columns: .94fr 1.06fr; gap: 34px; align-items: center; }
.journal-intro h1 { margin: 0; padding-top: .12em; font-size: clamp(50px, 5vw, 76px); line-height: 1.12; letter-spacing: -.055em; }
.journal-intro > p:not(.eyebrow) { margin: 13px 0 25px; color: #55514d; font-size: 18px; }
.category-row { display: flex; flex-wrap: wrap; gap: 9px; }
.category-row button { min-height: 42px; padding: 0 18px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: #5b5650; cursor: pointer; }
.category-row button.active { border-color: var(--gold); color: #fff; background: linear-gradient(135deg,#d6aa59,#af7928); }
.featured-article { position: relative; min-height: 390px; overflow: hidden; border-radius: 18px; box-shadow: var(--shadow); }
.featured-article img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.featured-article::after { content: ""; position: absolute; inset: 36% 0 0; background: linear-gradient(transparent, rgba(25,20,14,.82)); }
.featured-article .pill { position: absolute; z-index: 2; left: 22px; top: 20px; color: #fff; background: rgba(198,148,66,.92); }
.featured-article-copy { position: absolute; z-index: 2; left: 26px; right: 75px; bottom: 22px; color: #fff; }
.featured-article-copy h2 { margin: 0; font-size: 27px; line-height: 1.17; }
.featured-article-copy p { margin: 4px 0 3px; color: rgba(255,255,255,.88); }
.read-time { display: inline-flex; align-items: center; gap: 7px; color: #837d75; font-size: 13px; }
.featured-article .read-time { color: rgba(255,255,255,.85); }
.article-arrow { position: absolute; z-index: 3; right: 24px; bottom: 24px; width: 50px; height: 50px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--gold); font-size: 24px; }
.journal-feed { width: var(--shell); margin: 24px auto 0; }
.feed-heading { display: flex; align-items: center; gap: 18px; margin-bottom: 13px; }
.feed-heading h2 { margin: 0; font-size: 34px; letter-spacing: -.04em; }
.feed-heading span { width: 65px; height: 1px; background: var(--gold); }
.journal-feed > p { margin: -8px 0 13px; color: var(--muted); }
.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.article-card { overflow: hidden; border: 1px solid rgba(202,172,124,.2); border-radius: 14px; background: #fff; box-shadow: 0 9px 24px rgba(71,51,22,.06); }
.article-card[hidden] { display: none; }
.article-card img { width: 100%; height: 192px; object-fit: cover; }
.article-card-content { position: relative; min-height: 100px; padding: 16px 62px 15px 18px; }
.article-card-content .pill { position: absolute; left: 18px; top: -20px; padding: 5px 15px; font-size: 11px; background: rgba(255,250,241,.98); }
.article-card h3 { margin: 5px 0 7px; font-size: 19px; line-height: 1.25; }
.article-card .article-arrow { right: 16px; bottom: 17px; width: 40px; height: 40px; color: var(--gold-deep); background: #fbf3e7; font-size: 18px; }
.ai-guide-strip { width: var(--shell); min-height: 68px; margin: 18px auto 0; padding: 10px 16px 10px 22px; display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: 18px; border: 1px solid rgba(202,172,124,.18); border-radius: 14px; background: linear-gradient(110deg,#fff4df,#fffdfa 55%,#f3e4c9); }
.ai-guide-strip .bot { font-size: 30px; color: var(--gold-deep); }
.ai-guide-strip strong { font-size: 19px; }
.ai-guide-strip span { color: var(--muted); font-size: 14px; }
.gold-button { min-height: 46px; padding: 0 24px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; border: 0; border-radius: 999px; color: #fff; background: linear-gradient(135deg,#d2a34e,#a97324); font-weight: 700; }

/* Article detail */
.article-page { min-height: calc(100vh - 78px); padding: 22px 0 46px; }
.article-detail { width: var(--shell); margin: 0 auto; }
.breadcrumb { margin: 0 0 17px; color: #69655f; font-size: 14px; }
.breadcrumb a { color: inherit; }
.article-kicker { margin-bottom: 4px; }
.article-heading { max-width: 1220px; margin: 0; font-size: clamp(46px, 4.6vw, 70px); line-height: 1.04; letter-spacing: -.055em; }
.article-deck { margin: 7px 0 8px; color: #5d5954; font-size: 20px; }
.article-meta { display: flex; gap: 20px; flex-wrap: wrap; color: #77716a; font-size: 14px; }
.article-meta span { display: inline-flex; align-items: center; gap: 8px; }
.article-stage { margin-top: 18px; display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(290px, .82fr); gap: 20px; align-items: stretch; }
.article-visual { min-width: 0; }
.article-visual figure { position: relative; height: 355px; margin: 0; overflow: hidden; border-radius: 14px; background: #eee; }
.article-visual figure img { width: 100%; height: 100%; object-fit: cover; }
.visual-labels { position: absolute; inset: 0; pointer-events: none; }
.visual-labels span { position: absolute; padding: 8px 14px; border-radius: 999px; background: rgba(255,253,249,.94); color: #3e3932; font-size: 13px; font-weight: 650; box-shadow: 0 6px 18px rgba(0,0,0,.08); }
.visual-labels span:nth-child(1) { left: 18%; top: 17%; }
.visual-labels span:nth-child(2) { right: 24%; top: 20%; }
.visual-labels span:nth-child(3) { left: 16%; bottom: 24%; }
.visual-labels span:nth-child(4) { right: 8%; top: 45%; }
.reading-progress { margin-top: 13px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; color: #817b73; font-size: 12px; }
.reading-progress .track { height: 6px; overflow: hidden; border-radius: 999px; background: #eee8df; }
.reading-progress .track i { display: block; width: 20%; height: 100%; border-radius: inherit; background: var(--gold); }
.article-summary { padding: 24px 26px; border: 1px solid rgba(202,172,124,.22); border-radius: 15px; background: rgba(255,255,255,.95); box-shadow: 0 12px 32px rgba(71,51,22,.07); }
.article-summary h2 { margin: 0 0 13px; color: #8e6524; font-size: 31px; line-height: 1.15; }
.article-summary > p { margin: -7px 0 12px; color: #67615b; }
.summary-list { list-style: none; margin: 0; padding: 0; }
.summary-list li { min-height: 47px; display: flex; align-items: center; gap: 13px; border-bottom: 1px solid #eee5d7; color: #494541; }
.summary-list li::before { content: "✓"; width: 31px; height: 31px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--gold); font-weight: 700; }
.article-summary .gold-button { width: 100%; margin-top: 17px; }
.article-body-row { margin-top: 13px; display: grid; grid-template-columns: 1.45fr .7fr; gap: 24px; }
.article-copy h2 { margin: 0 0 5px; font-size: 34px; line-height: 1.15; letter-spacing: -.035em; }
.article-copy p { max-width: 890px; margin: 6px 0; color: #625d57; line-height: 1.65; }
.tag-row { margin: 8px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tag-row span { padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; color: #695e4c; font-size: 13px; }
.quote-card, .stat-card { min-height: 125px; padding: 20px 24px; border: 1px solid rgba(202,172,124,.16); border-radius: 14px; background: linear-gradient(130deg,#fff9ef,#fff); }
.quote-card { font-size: 18px; font-weight: 650; line-height: 1.4; }
.quote-card::before { content: "“"; display: block; height: 25px; color: var(--gold); font: 700 48px Georgia, serif; }
.stat-stack { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat-card { min-height: 0; }
.stat-card small { color: #7d756b; }
.stat-card strong { display: block; margin-top: 6px; color: var(--gold-deep); font-size: 27px; }

.mini-footer { padding: 28px 24px; border-top: 1px solid var(--line); background: #faf5ec; text-align: center; color: #766f66; font-size: 13px; }
.mini-footer a { margin: 0 9px; color: #685231; }

.ai-float { position: fixed; z-index: 80; right: 22px; bottom: 20px; min-height: 49px; padding: 0 22px; display: inline-flex; align-items: center; gap: 9px; border: 3px solid #f3e2c2; border-radius: 999px; background: linear-gradient(135deg,#d2a34d,#a86f20); color: #fff; box-shadow: 0 12px 30px rgba(91,61,18,.23); font-weight: 650; }
.mini-ai-panel { position: fixed; z-index: 120; right: 22px; bottom: 82px; width: min(370px, calc(100vw - 30px)); padding: 20px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,253,249,.98); box-shadow: 0 25px 70px rgba(47,33,14,.23); transform: translateY(18px) scale(.98); opacity: 0; pointer-events: none; transition: .2s; }
.mini-ai-panel.open { transform: none; opacity: 1; pointer-events: auto; }
.mini-ai-panel header { display: flex; justify-content: space-between; align-items: center; }
.mini-ai-panel h2 { margin: 0; font-size: 21px; }
.mini-ai-panel header button { width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--cream); font-size: 21px; }
.mini-ai-panel p { color: #68625b; line-height: 1.55; }
.mini-ai-choices { display: grid; gap: 8px; }
.mini-ai-choices a { padding: 11px 13px; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: #69512c; font-weight: 600; }

@media (max-width: 1100px) {
  :root { --shell: min(100% - 36px, 980px); }
  .header-inner { grid-template-columns: 200px 1fr auto; }
  .inner-brand { width: 140px; }
  .inner-nav { gap: 23px; }
  .header-action { min-width: 48px; width: 48px; overflow: hidden; white-space: nowrap; }
  .header-action span:nth-child(2) { display: none; }
  .property-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .journal-hero { grid-template-columns: 1fr; }
  .journal-intro { padding-top: 15px; }
  .featured-article { min-height: 430px; }
  .article-stage { grid-template-columns: 1fr; }
  .article-summary { display: grid; grid-template-columns: .8fr 1.2fr; gap: 0 24px; align-items: start; }
  .article-summary .gold-button { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  :root { --shell: min(100% - 28px, 660px); }
  .inner-header { height: 68px; }
  .header-inner { display: flex; justify-content: space-between; }
  .inner-brand { width: 124px; }
  .menu-toggle { display: block; }
  .header-action { display: none; }
  .inner-nav { position: fixed; z-index: 150; inset: 68px 0 auto; height: auto; padding: 16px 20px 24px; display: grid; gap: 0; background: rgba(255,253,249,.99); box-shadow: 0 20px 40px rgba(45,32,15,.12); transform: translateY(-120%); opacity: 0; transition: .22s; }
  .inner-nav.open { transform: none; opacity: 1; }
  .inner-nav a { min-height: 49px; justify-content: start; border-bottom: 1px solid #eee5d9; }
  .inner-nav a::after { display: none; }
  .search-hero { min-height: 540px; background-position: 68% center; }
  .search-hero::before { content: ""; position: absolute; inset: 0; background: rgba(255,253,249,.72); }
  .search-hero::after { left: -35%; bottom: -290px; width: 150%; }
  .search-hero-inner { padding-top: 33px; }
  .search-hero h1 { max-width: 390px; font-size: 49px; }
  .search-hero-copy { max-width: 390px; font-size: 16px; line-height: 1.5; }
  .search-box { padding: 7px; grid-template-columns: 1fr; border-radius: 20px; }
  .search-box label { padding: 0 12px; }
  .search-box button { min-height: 48px; }
  .filter-row { gap: 7px; }
  .filter-chip { min-height: 39px; padding: 0 12px; font-size: 13px; }
  .listing-section { width: 100%; margin-top: -8px; padding: 25px 14px 40px; border-radius: 27px 27px 0 0; }
  .listing-toolbar { align-items: flex-start; }
  .listing-toolbar h2 { font-size: 30px; }
  .listing-toolbar h2 small { display: block; margin: 3px 0 0; }
  .toolbar-actions .view-button { display: none; }
  .toolbar-actions select { width: 145px; }
  .property-grid { grid-template-columns: 1fr; }
  .property-photo { height: 225px; }
  .journal-main { padding-top: 25px; }
  .journal-intro h1 { font-size: 50px; }
  .featured-article { min-height: 350px; }
  .featured-article-copy { right: 62px; }
  .article-grid { grid-template-columns: 1fr; }
  .article-card img { height: 220px; }
  .ai-guide-strip { grid-template-columns: auto 1fr; }
  .ai-guide-strip span { grid-column: 1 / -1; }
  .ai-guide-strip .gold-button { grid-column: 1 / -1; }
  .article-page { padding-top: 17px; }
  .article-heading { font-size: 43px; }
  .article-deck { font-size: 17px; line-height: 1.45; }
  .article-stage { margin-top: 15px; }
  .article-visual figure { height: 290px; }
  .article-summary { display: block; padding: 20px; }
  .article-body-row { grid-template-columns: 1fr; }
  .article-copy h2 { font-size: 29px; }
  .stat-stack { grid-template-columns: 1fr; }
  .ai-float { right: 12px; bottom: 12px; padding: 0 17px; }
  .ai-float span:last-child { display: none; }
  .mini-ai-panel { right: 12px; bottom: 72px; }
}

@media (max-width: 420px) {
  .search-hero h1, .journal-intro h1 { font-size: 43px; }
  .property-meta { grid-template-columns: 1fr; }
  .property-price { justify-self: start; }
  .article-heading { font-size: 38px; }
  .article-meta { gap: 8px 14px; }
  .visual-labels span { font-size: 10px; padding: 6px 9px; }
}

/* ── หน้าซื้อ: การ์ดที่ต่อข้อมูลจริง + popup รายละเอียดห้อง ── */
.property-photo { width: 100%; padding: 0; border: 0; cursor: pointer; font: inherit; }
.photo-placeholder { width: 100%; height: 100%; display: grid; place-content: center; justify-items: center; gap: 8px; color: #b39a73; background: linear-gradient(135deg, #f6eee1, #efe3cf); font-size: 13px; font-weight: 600; }
.property-card-actions button { flex: 1; min-height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: #62533d; font-size: 13px; font-weight: 650; cursor: pointer; }
.property-card-actions button.primary { border-color: var(--gold); color: #fff; background: var(--gold); }
.property-card-actions button:hover { background: var(--cream); }
.property-card-actions button.primary:hover { background: var(--gold-deep); }
.header-action { position: relative; }
.saved-count:empty { display: none; }
.saved-count { min-width: 22px; height: 22px; padding: 0 6px; display: grid; place-items: center; border-radius: 999px; background: var(--gold); color: #fff; font-size: 12px; }

.listing-dialog { width: min(1040px, calc(100vw - 32px)); max-height: min(760px, calc(100dvh - 40px)); padding: 0; border: 0; border-radius: 22px; background: var(--paper); color: var(--ink); box-shadow: 0 30px 90px rgba(35,25,10,.35); }
.listing-dialog::backdrop { background: rgba(28,22,14,.55); backdrop-filter: blur(3px); }
.dialog-body { position: relative; max-height: min(760px, calc(100dvh - 40px)); display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); overflow: auto; }
.dialog-close { position: absolute; z-index: 3; right: 14px; top: 14px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255,255,255,.94); color: var(--ink); font-size: 24px; box-shadow: 0 4px 14px rgba(0,0,0,.15); cursor: pointer; }
.dialog-gallery { position: sticky; top: 0; align-self: start; height: calc(100dvh - 40px); max-height: 760px; background: #efe6d8; }
.gallery-frame { width: 100%; height: 100%; }
.gallery-frame img { width: 100%; height: 100%; object-fit: cover; }
.gallery-nav { position: absolute; top: 50%; width: 44px; height: 44px; margin-top: -22px; border: 0; border-radius: 50%; background: rgba(255,255,255,.9); color: var(--ink); font-size: 26px; line-height: 1; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.15); }
.gallery-nav.prev { left: 14px; }
.gallery-nav.next { right: 14px; }
.gallery-count { position: absolute; left: 14px; bottom: 14px; padding: 5px 12px; border-radius: 999px; background: rgba(20,16,10,.62); color: #fff; font-size: 13px; }
.dialog-content { padding: 30px 30px 32px; }
.dialog-code { margin: 0; color: var(--gold-deep); font-size: 13px; font-weight: 700; letter-spacing: .04em; }
.dialog-content h2 { margin: 6px 44px 4px 0; font: 750 27px/1.25 Manrope, "IBM Plex Sans Thai", sans-serif; }
.dialog-location { margin: 0; color: var(--muted); }
.dialog-price { margin: 14px 0; color: #97671f; font-size: 30px; font-weight: 800; }
.dialog-specs { margin: 0 0 16px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.dialog-specs div { padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.dialog-specs dd { margin: 0; font-weight: 700; }
.dialog-specs dt { color: var(--muted); font-size: 12px; }
.dialog-highlight { margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; background: var(--cream); color: #7b5a22; font-weight: 600; }
.dialog-description { margin: 0 0 14px; color: #4f4b45; line-height: 1.7; white-space: pre-line; }
.dialog-links { display: grid; gap: 6px; margin-bottom: 16px; }
.dialog-links a { color: var(--gold-deep); font-weight: 650; }
.dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dialog-line, .dialog-share { min-height: 46px; display: grid; place-items: center; border-radius: 12px; font-weight: 700; cursor: pointer; }
.dialog-line { background: #06c755; color: #fff; }
.dialog-share { border: 1px solid var(--line); background: #fff; color: #62533d; font: inherit; font-weight: 700; }
.lead-form { margin-top: 20px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.lead-form[hidden], .lead-success[hidden] { display: none; }
.lead-form h3 { margin: 0 0 12px; font-size: 18px; }
.lead-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lead-grid label { display: grid; gap: 4px; color: var(--muted); font-size: 13px; }
.lead-grid input { min-height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); }
.lead-grid input:focus { outline: 2px solid rgba(201,155,74,.45); border-color: var(--gold); }
.lead-alert { margin: 10px 0 0; color: #b3261e; font-size: 14px; }
.lead-form .gold-button { width: 100%; margin-top: 14px; cursor: pointer; }
.lead-success { margin-top: 20px; padding: 18px; border-radius: 16px; background: #eef8ef; color: #2b6a34; }
.lead-success p { margin: 4px 0 0; }
.toast { position: fixed; z-index: 300; left: 50%; bottom: 28px; max-width: calc(100vw - 32px); padding: 12px 20px; border-radius: 999px; background: rgba(32,32,36,.92); color: #fff; font-size: 14px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: .25s; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

@media (max-width: 860px) {
  .listing-dialog { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; }
  .dialog-body { max-height: 100dvh; height: 100%; grid-template-columns: 1fr; }
  .dialog-gallery { position: relative; height: 62vw; max-height: 420px; }
  .dialog-content { padding: 22px 16px 30px; }
  .dialog-specs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lead-grid { grid-template-columns: 1fr; }
}

/* ── หน้าทีมงาน ── */
.team-hero { width: var(--shell); margin: 0 auto; padding: 40px 0 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: end; gap: 32px; }
.team-hero-copy { padding-bottom: 48px; }
.team-hero h1 { margin: 0; padding-top: .12em; font-size: clamp(42px, 4.6vw, 68px); line-height: 1.12; letter-spacing: -.045em; }
.team-hero h1 .gold { color: var(--gold-deep); }
.team-lead { max-width: 560px; margin: 16px 0 24px; color: #4f4b45; font-size: 17px; line-height: 1.75; }
.team-stats { margin: 0 0 28px; display: flex; flex-wrap: wrap; gap: 12px; }
.team-stats div { min-width: 140px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; display: flex; flex-direction: column-reverse; }
.team-stats dt { color: var(--muted); font-size: 13px; }
.team-stats dd { margin: 0; color: var(--gold-deep); font: 800 24px Manrope, "IBM Plex Sans Thai", sans-serif; }
.team-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.team-link { color: #62533d; font-weight: 650; border-bottom: 1px solid var(--gold); }
.team-hero-photo { margin: 0; }
.team-hero-photo img { width: 100%; height: auto; }
.team-ways { width: var(--shell); margin: 0 auto; padding: 44px 0 20px; border-top: 1px solid var(--line); }
.team-ways h2 { margin: 0 0 18px; font-size: 26px; }
.team-ways ol { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: way; }
.team-ways li { padding: 20px; border-radius: 16px; background: var(--cream); counter-increment: way; }
.team-ways li::before { content: "0" counter(way); display: block; margin-bottom: 8px; color: var(--gold-deep); font: 800 14px Manrope, sans-serif; letter-spacing: .1em; }
.team-ways b { display: block; margin-bottom: 6px; font-size: 18px; }
.team-ways span { color: #5c5750; line-height: 1.65; }
.team-members { width: var(--shell); margin: 0 auto; padding: 48px 0 64px; scroll-margin-top: 90px; }
.members-head h2 { margin: 0 0 24px; font-size: clamp(30px, 3vw, 40px); }
.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.member-card { overflow: hidden; border: 1px solid rgba(202,172,124,.3); border-radius: 18px; background: #fff; box-shadow: 0 10px 24px rgba(59,45,25,.07); scroll-margin-top: 90px; }
.member-photo { aspect-ratio: 4 / 4.4; overflow: hidden; background: #eceae6; }
.member-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 12%; transition: transform .4s; }
.member-card:hover .member-photo img { transform: scale(1.03); }
.member-body { padding: 16px 18px 20px; }
.member-role { margin: 0; color: var(--gold-deep); font: 700 11px Manrope, sans-serif; letter-spacing: .16em; text-transform: uppercase; }
.member-body h3 { margin: 4px 0 10px; font-size: 24px; }
.member-body h3 small { color: var(--muted); font: 600 13px Manrope, sans-serif; letter-spacing: .12em; }
.member-zones { margin: 0 0 10px; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.member-zones li { padding: 3px 10px; border-radius: 999px; background: var(--cream); color: #6b5530; font-size: 13px; }
.member-count { min-height: 1.4em; margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.member-actions { display: grid; gap: 10px; justify-items: start; }
.member-actions .gold-button { width: 100%; min-height: 42px; font-size: 14px; }
.member-actions .team-link { font-size: 14px; }
.agent-chip { display: inline-flex; align-items: center; gap: 8px; margin-left: 10px; padding: 4px 6px 4px 12px; border-radius: 999px; background: var(--cream); color: #6b5530; font-size: 14px; font-weight: 600; vertical-align: middle; }
.agent-chip button { width: 24px; height: 24px; border: 0; border-radius: 50%; background: #fff; color: var(--ink); cursor: pointer; }
@media (max-width: 900px) {
  .team-hero { grid-template-columns: 1fr; padding-top: 28px; }
  .team-hero-copy { padding-bottom: 0; }
  .team-ways ol { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .team-hero, .team-ways, .team-members { width: calc(100% - 32px); }
  .team-stats div { min-width: 0; flex: 1 1 40%; }
  .member-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .member-body { padding: 12px 12px 16px; }
  .member-body h3 { font-size: 20px; }
}
@media (max-width: 420px) { .member-grid { grid-template-columns: 1fr; } .member-photo { aspect-ratio: 4 / 3.2; } }

/* team.html — เกี่ยวกับบริษัท + ประวัติรายคน */
.company-story { width: var(--shell); margin: 0 auto; padding: 48px 0 40px; border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 40px; scroll-margin-top: 90px; }
.company-story h2 { margin: 0 0 18px; font-size: clamp(28px, 3vw, 40px); line-height: 1.25; }
.company-story .gold { color: var(--gold-deep); }
.story-copy > p { margin: 0 0 14px; color: #4f4b45; font-size: 16.5px; line-height: 1.85; }
.story-copy .story-vision { margin-top: 22px; padding: 18px 20px; border-left: 3px solid var(--gold); border-radius: 0 14px 14px 0; background: var(--cream); color: #3f3a33; font-size: 18px; font-weight: 600; line-height: 1.6; }
.story-vision span { display: block; margin-bottom: 4px; color: var(--gold-deep); font: 700 12px Manrope, "IBM Plex Sans Thai", sans-serif; letter-spacing: .12em; }
.story-side { padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: #fff; align-self: start; }
.story-side h3 { margin: 0 0 14px; font-size: 20px; }
.story-values { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.story-values li { padding-left: 18px; position: relative; }
.story-values li::before { content: ""; position: absolute; left: 0; top: .6em; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.story-values b { display: block; margin-bottom: 2px; }
.story-values span { color: #5c5750; font-size: 14.5px; line-height: 1.65; }
.team-profiles { width: var(--shell); margin: 0 auto; padding: 8px 0 72px; }
#profiles { display: grid; gap: 22px; }
.profile { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 28px; padding: 24px; border: 1px solid rgba(202,172,124,.3); border-radius: 20px; background: #fff; scroll-margin-top: 90px; }
.profile:target { box-shadow: 0 0 0 3px rgba(201,155,74,.35); }
.profile-photo { margin: 0; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 14px; background: #eceae6; }
.profile-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 12%; }
.profile-body h3 { margin: 4px 0 4px; font-size: 26px; }
.profile-headline { margin: 0 0 14px; color: var(--gold-deep); font-weight: 600; }
.profile-bio p { margin: 0 0 12px; color: #4f4b45; line-height: 1.85; }
.profile-body h4 { margin: 16px 0 8px; font-size: 15px; }
.profile-projects { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.profile-projects li { padding: 4px 11px; border: 1px solid var(--line); border-radius: 999px; font-size: 13.5px; }
.profile-fit { margin: 0 0 18px; color: #4f4b45; line-height: 1.75; }
.profile-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.profile-actions .gold-button { width: auto; padding: 0 20px; }
@media (max-width: 900px) { .company-story { grid-template-columns: 1fr; gap: 24px; } }
@media (max-width: 760px) {
  .company-story, .team-profiles { width: calc(100% - 32px); }
  .profile { grid-template-columns: 1fr; gap: 16px; padding: 16px; }
  .profile-photo { aspect-ratio: 4 / 3.4; }
  .profile-actions .gold-button { width: 100%; }
}
