/* irent.sg — shared styles */
:root {
  --red: #D4282C;
  --red-dark: #B01F23;
  --red-soft: #FDECEC;
  --ink: #1C1F24;
  --muted: #5E6470;
  --line: #E3E5E9;
  --soft: #F5F6F8;
  --white: #FFFFFF;
  --green: #1E8E4E;
  --wa: #1FA855;

  /* MRT line colours */
  --ns: #D42E12; --ew: #009645; --ne: #9900AA;
  --cc: #FA9E0D; --dt: #005EC4; --te: #9D5B25;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(28,31,36,.06), 0 4px 14px rgba(28,31,36,.06);
  --font: "Poppins", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--white);
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -0.02em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.25rem); font-weight: 700; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 24px; } }

:focus-visible { outline: 3px solid var(--dt); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 700; font-size: .95rem;
  padding: 11px 18px; border-radius: var(--radius-sm);
  border: 1.5px solid transparent; cursor: pointer; text-decoration: none;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); }
.btn-outline { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-outline:hover { border-color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--soft); }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { background: #178a45; }
.btn-lg { padding: 14px 24px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; gap: 16px; height: 68px; }
.logo { display: flex; align-items: center; text-decoration: none; }
.logo img { height: 36px; width: auto; }
.nav { display: none; gap: 4px; margin-left: 16px; }
.nav a { text-decoration: none; font-weight: 600; font-size: .95rem; padding: 8px 12px; border-radius: var(--radius-sm); color: var(--muted); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); background: var(--soft); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.header-actions .who { font-size: .9rem; color: var(--muted); display: none; }
@media (min-width: 860px) {
  .nav { display: flex; }
  .header-actions .who { display: inline; }
}
.header-actions .login-link { display: none; }
@media (min-width: 520px) { .header-actions .login-link { display: inline-flex; } }

/* ---------- Hero ---------- */
.hero { padding: 48px 0 40px; background:
  linear-gradient(180deg, var(--red-soft) 0, #fff 100%); }
@media (min-width: 900px) { .hero { padding: 80px 0 64px; } }
.hero h1 { max-width: 15ch; }
.hero .lede { font-size: 1.1rem; color: var(--muted); max-width: 46ch; margin-bottom: 28px; }

.search {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: 10px; display: grid; gap: 8px;
  grid-template-columns: 1fr; max-width: 920px;
}
@media (min-width: 760px) {
  .search { grid-template-columns: 2.2fr 1.1fr 1.1fr auto; align-items: stretch; }
}
.field { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; border-radius: var(--radius); }
.search .field + .field { border-top: 1px solid var(--line); }
@media (min-width: 760px) {
  .search .field + .field { border-top: 0; border-left: 1px solid var(--line); border-radius: 0; }
}
.field label { font-size: .78rem; font-weight: 700; color: var(--muted); }
.field input, .field select {
  font: inherit; font-size: 1rem; font-weight: 600; color: var(--ink);
  border: 0; padding: 2px 0; background: transparent; width: 100%; min-width: 0;
}
.field input:focus, .field select:focus { outline: none; }
.field:focus-within { background: var(--soft); }
.search .btn { padding: 14px 26px; font-size: 1rem; border-radius: var(--radius); }

.poster-strip {
  margin-top: 22px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
  font-weight: 600;
}
.poster-strip span { color: var(--muted); font-weight: 500; }

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section-soft { background: var(--soft); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.section-head p { color: var(--muted); margin: 0; }
.link-more { font-weight: 700; color: var(--red); text-decoration: none; white-space: nowrap; }
.link-more:hover { text-decoration: underline; }

/* ---------- MRT line picker (the signature element) ---------- */
.lines { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .lines { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .lines { grid-template-columns: repeat(3, 1fr); } }
.line {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 16px 14px; position: relative; overflow: hidden;
}
.line::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--c); }
.line-name { display: flex; align-items: center; gap: 10px; font-weight: 700; margin-bottom: 10px; }
.line-code {
  display: inline-grid; place-items: center; min-width: 36px; height: 24px; padding: 0 6px;
  border-radius: 12px; background: var(--c); color: #fff; font-size: .75rem; font-weight: 700;
}
.stations { display: flex; flex-wrap: wrap; gap: 6px; }
.station {
  text-decoration: none; font-size: .88rem; font-weight: 600; padding: 5px 10px;
  border-radius: 999px; border: 1.5px solid var(--line); background: #fff;
}
.station:hover { border-color: var(--c); color: var(--c); }

/* ---------- Listing cards ---------- */
.grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .grid { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
}
.card-media { position: relative; aspect-ratio: 4 / 3; background: var(--soft); display: block; }
.card-media img, .card-media .ph { width: 100%; height: 100%; object-fit: cover; }
.verified {
  position: absolute; top: 10px; left: 10px;
  display: inline-flex; align-items: center; gap: 5px;
  background: #fff; color: var(--green); font-size: .78rem; font-weight: 700;
  padding: 4px 9px 4px 6px; border-radius: 999px; box-shadow: 0 1px 4px rgba(0,0,0,.15);
}
.verified svg { width: 16px; height: 16px; }
.photo-count {
  position: absolute; bottom: 10px; right: 10px; background: rgba(28,31,36,.75); color: #fff;
  font-size: .75rem; font-weight: 700; padding: 3px 8px; border-radius: 999px;
}
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.price { font-size: 1.3rem; font-weight: 700; }
.price small { font-size: .85rem; font-weight: 600; color: var(--muted); }
.card-title { font-weight: 700; text-decoration: none; }
.card-title:hover { color: var(--red); }
.loc { color: var(--muted); font-size: .92rem; display: flex; align-items: center; gap: 6px; }
.mrt-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--muted)); flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 6px; }
.chip { font-size: .8rem; font-weight: 600; background: var(--soft); padding: 3px 9px; border-radius: 999px; }
.card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.poster { font-size: .85rem; color: var(--muted); line-height: 1.3; }
.poster b { color: var(--ink); display: block; }
.card-foot .btn { padding: 8px 12px; font-size: .88rem; }

/* ---------- How it works ---------- */
.how { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 820px) { .how { grid-template-columns: 1fr 1fr; } }
.how-col { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; }
.how-col ol { list-style: none; padding: 0; margin: 0 0 22px; counter-reset: s; }
.how-col li { counter-increment: s; display: grid; grid-template-columns: 36px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.how-col li:first-child { border-top: 0; }
.how-col li::before {
  content: counter(s); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--red-soft); color: var(--red); font-weight: 700; font-size: .9rem;
}
.how-col li b { display: block; }
.how-col li span { color: var(--muted); font-size: .95rem; }

/* ---------- Agent band ---------- */
.agent-band { display: grid; gap: 24px; align-items: center; grid-template-columns: 1fr; }
@media (min-width: 820px) { .agent-band { grid-template-columns: 1.2fr 1fr; } }
.agent-band p { color: var(--muted); max-width: 52ch; }
.badge-demo { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; display: flex; gap: 14px; align-items: center; }
.badge-demo .big-check { width: 48px; height: 48px; border-radius: 50%; background: #E6F4EC; color: var(--green); display: grid; place-items: center; flex: none; }
.badge-demo .big-check svg { width: 26px; height: 26px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0; color: var(--muted); font-size: .92rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); }

/* ---------- Rooms page ---------- */
.page-head { padding: 28px 0 8px; }
.page-head h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.filters {
  display: grid; gap: 10px; grid-template-columns: 1fr 1fr; padding: 16px;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff; margin-bottom: 20px;
}
@media (min-width: 900px) { .filters { grid-template-columns: 2fr repeat(5, 1fr); align-items: end; } }
.filters .f-wide { grid-column: 1 / -1; }
@media (min-width: 900px) { .filters .f-wide { grid-column: auto; } }
.f { display: flex; flex-direction: column; gap: 4px; }
.f label, .f .lbl { font-size: .78rem; font-weight: 700; color: var(--muted); }
.input, select.input, textarea.input {
  font: inherit; font-size: .95rem; color: var(--ink); background: #fff;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 9px 11px; width: 100%; min-width: 0;
}
.input:focus { outline: none; border-color: var(--ink); }
.check { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: .92rem; padding: 9px 0; }
.check input { width: 18px; height: 18px; accent-color: var(--red); }
.results-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.results-bar .count { font-weight: 700; }
.empty { text-align: center; padding: 56px 16px; border: 1.5px dashed var(--line); border-radius: var(--radius-lg); }
.empty p { color: var(--muted); }

/* ---------- Detail page ---------- */
.detail { display: grid; gap: 28px; grid-template-columns: 1fr; padding: 24px 0 56px; }
@media (min-width: 920px) { .detail { grid-template-columns: 1.7fr 1fr; align-items: start; } }
.gallery { border-radius: var(--radius-lg); overflow: hidden; position: relative; aspect-ratio: 16/10; background: var(--soft); }
.gallery img, .gallery .ph { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; }
.thumbs button { border: 2px solid transparent; padding: 0; border-radius: var(--radius-sm); overflow: hidden; width: 84px; height: 62px; flex: none; cursor: pointer; background: var(--soft); }
.thumbs button[aria-current="true"] { border-color: var(--red); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 20px 0; }
@media (min-width: 600px) { .facts { grid-template-columns: repeat(4, 1fr); } }
.facts div { background: #fff; padding: 12px 14px; }
.facts dt { font-size: .78rem; font-weight: 700; color: var(--muted); }
.facts dd { margin: 0; font-weight: 700; }
.contact-box { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; position: sticky; top: 88px; display: flex; flex-direction: column; gap: 12px; }
.contact-box .price { font-size: 1.8rem; }
.poster-card { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--red-soft); color: var(--red); display: grid; place-items: center; font-weight: 700; flex: none; }
.cea { font-size: .85rem; color: var(--green); font-weight: 700; display: flex; align-items: center; gap: 4px; }
.cea svg { width: 15px; height: 15px; }
.note { font-size: .85rem; color: var(--muted); }

/* ---------- Forms (account / post) ---------- */
.form-page { padding: 32px 0 64px; }
.form-card { max-width: 640px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; }
@media (min-width: 640px) { .form-card { padding: 32px; } }
.form-card.narrow { max-width: 460px; }
.form-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .form-grid.two { grid-template-columns: 1fr 1fr; } }
.form-grid .full { grid-column: 1 / -1; }
.hint { font-size: .82rem; color: var(--muted); }
.error { font-size: .85rem; color: var(--red-dark); font-weight: 600; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--soft); border-radius: var(--radius); padding: 4px; margin-bottom: 22px; }
.tabs button { font: inherit; font-weight: 700; border: 0; background: transparent; padding: 10px; border-radius: 8px; cursor: pointer; color: var(--muted); }
.tabs button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.roles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 560px) { .roles { grid-template-columns: repeat(4, 1fr); } }
.roles label { border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 10px; text-align: center; font-weight: 700; font-size: .92rem; cursor: pointer; }
.roles input { position: absolute; opacity: 0; pointer-events: none; }
.roles label:has(input:checked) { border-color: var(--red); background: var(--red-soft); color: var(--red-dark); }
.roles label:has(input:focus-visible) { outline: 3px solid var(--dt); outline-offset: 2px; }
.agent-fields { border-left: 4px solid var(--green); background: #F2FAF5; padding: 14px 16px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.agent-fields[hidden] { display: none; }
.photo-preview { display: flex; flex-wrap: wrap; gap: 8px; }
.photo-preview img { width: 88px; height: 66px; object-fit: cover; border-radius: var(--radius-sm); }
.gate { text-align: center; }
.gate p { color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: var(--radius); font-weight: 600; z-index: 50; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- Mobile nav: second row under the logo ---------- */
@media (max-width: 859px) {
  .site-header .wrap { flex-wrap: wrap; height: auto; padding-top: 12px; padding-bottom: 0; row-gap: 6px; }
  .nav { display: flex; order: 3; width: 100%; margin: 0 -4px; overflow-x: auto; scrollbar-width: none; }
  .nav a { white-space: nowrap; padding: 8px 10px 10px; border-radius: 0; border-bottom: 2px solid transparent; background: none; }
  .nav a[aria-current="page"] { background: none; border-bottom-color: var(--red); }
}

/* ---------- Tenant profiles ---------- */
.tgrid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .tgrid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .tgrid { grid-template-columns: repeat(3, 1fr); } }
.tcard { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.tcard-head { display: flex; gap: 14px; align-items: center; }
.tcard h3 { margin: 0; font-size: 1.1rem; }
.tphoto { width: 72px; height: 72px; border-radius: 50%; overflow: hidden; flex: none; background: var(--red-soft); color: var(--red); display: grid; place-items: center; font-weight: 700; font-size: 1.3rem; }
.tphoto img { width: 100%; height: 100%; object-fit: cover; }
.tfacts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin: 0; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tfacts dt { font-size: .75rem; font-weight: 700; color: var(--muted); }
.tfacts dd { margin: 0; font-weight: 700; font-size: .92rem; }
.tintro { margin: 0; color: var(--muted); font-size: .93rem; flex: 1; }
.tcard .btn { align-self: flex-start; }
.photo-pick { display: flex; align-items: center; gap: 16px; }
.photo-pick .tphoto { width: 88px; height: 88px; }

/* ---------- Singpass verification (owners, landlords) ---------- */
.verify-box { border-left: 4px solid var(--red); background: var(--red-soft); padding: 14px 16px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; display: flex; flex-direction: column; gap: 10px; }
.verify-box[hidden] { display: none; }
.verify-box p { margin: 0; font-size: .9rem; }
.verify-box .btn { align-self: flex-start; }
.verify-done { color: var(--green); font-weight: 700; display: flex; align-items: center; gap: 6px; }
.verify-done svg { width: 18px; height: 18px; }
.preview-note { font-size: .8rem; color: var(--muted); font-style: italic; }

/* ---------- Listing card, PropertyGuru-style layout ---------- */
.btn-wa { background: var(--red); color: #fff; }
.btn-wa:hover { background: var(--red-dark); }
h1, h2 { letter-spacing: -0.015em; }

.grid { grid-template-columns: 1fr; }
@media (min-width: 700px) { .grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .grid { grid-template-columns: repeat(3, 1fr); } }

.card { border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.card-media::after { content: ""; position: absolute; inset: 0 0 auto; height: 45%; background: linear-gradient(rgba(0,0,0,.55), transparent); pointer-events: none; }
.poster-over { position: absolute; top: 12px; left: 12px; right: 12px; z-index: 1; display: flex; align-items: center; gap: 10px; color: #fff; line-height: 1.25; text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.poster-over .avatar { width: 40px; height: 40px; font-size: .85rem; border: 2px solid #fff; text-shadow: none; }
.poster-over b { display: block; font-size: .95rem; }
.poster-over small { display: block; font-size: .78rem; opacity: .9; text-transform: uppercase; letter-spacing: .02em; }
.card .verified { top: auto; bottom: 12px; left: 12px; z-index: 1; }
.dots { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 5px; padding: 5px 8px; border-radius: 999px; background: rgba(28,31,36,.55); z-index: 1; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.6); }
.dots i.on { width: 14px; border-radius: 3px; background: #fff; }
.photo-count { display: inline-flex; align-items: center; gap: 5px; z-index: 1; bottom: 12px; right: 12px; padding: 4px 9px; }
.photo-count svg { width: 15px; height: 15px; }

.card-body { padding: 16px 18px 16px; gap: 8px; }
.card-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.card-title { font-weight: 600; font-size: 1.05rem; line-height: 1.3; min-width: 0; }
.card .price { font-size: 1.15rem; font-weight: 600; white-space: nowrap; }
.card .price small { font-size: .9rem; font-weight: 500; color: var(--ink); }
.addr { color: var(--muted); font-size: .9rem; }
.attrs { display: flex; flex-wrap: wrap; gap: 6px 0; color: var(--muted); font-size: .88rem; }
.attrs span { display: inline-flex; align-items: center; gap: 5px; padding: 0 10px; border-left: 1px solid var(--line); }
.attrs span:first-child { padding-left: 0; border-left: 0; }
.attrs svg { width: 16px; height: 16px; }
.avail { color: var(--muted); font-size: .88rem; }
.mrt { display: flex; align-items: center; gap: 8px; font-size: .88rem; color: var(--muted); }
.stn { background: var(--c); color: #fff; font-size: .72rem; font-weight: 700; padding: 2px 7px; border-radius: 5px; flex: none; }
.listed { display: flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--muted); }
.listed svg { width: 15px; height: 15px; }
.card .card-foot { margin-top: 6px; padding-top: 12px; gap: 10px; justify-content: flex-start; }
.card .card-foot b { margin-right: auto; font-weight: 600; }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink); flex: none; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.icon-btn:hover { border-color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; }
.card .card-foot .btn-wa { padding: 10px 22px; border-radius: 999px; font-size: .95rem; }

/* Browse by area (home) */
.regions { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .regions { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .regions { grid-template-columns: repeat(3, 1fr); } }
.region { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.region h3 { font-size: 1rem; margin-bottom: 10px; }
.region .station:hover { border-color: var(--red); color: var(--red); }
.station .n { color: var(--muted); font-weight: 500; margin-left: 4px; }
.card .verified { top: 12px; bottom: auto; left: auto; right: 12px; }
.card .poster-over { right: 150px; }
.poster-over > span:last-child { min-width: 0; }
.poster-over b, .poster-over small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ======================= Listing page (PropertyGuru-style) ======================= */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; padding: 18px 0 14px; font-size: .9rem; color: var(--muted); }
.crumbs a { color: var(--ink); }
.btn.round { border-radius: 999px; }

/* photo mosaic: 1 big + 4 small */
.mosaic { position: relative; display: grid; gap: 6px; border-radius: var(--radius-lg); overflow: hidden; height: clamp(260px, 46vw, 480px);
  grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; }
.mosaic .tile { position: relative; padding: 0; border: 0; cursor: pointer; background: var(--soft); overflow: hidden; display: block; min-width: 0; }
.mosaic .tile img, .mosaic .tile video { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.mosaic .tile:hover img { transform: scale(1.03); }
.mosaic .big { grid-row: 1 / 3; }
.mosaic.n1 { grid-template-columns: 1fr; }
.mosaic.n2 { grid-template-columns: 2fr 1fr; } .mosaic.n2 .tile:not(.big) { grid-row: 1 / 3; }
.mosaic.n3 { grid-template-columns: 2fr 1fr; }
.mosaic.n4 { grid-template-columns: 2fr 1fr 1fr; } .mosaic.n4 .tile:nth-of-type(2) { grid-row: 1 / 3; }
.mosaic .vid svg { position: absolute; inset: 50% auto auto 50%; width: 54px; height: 54px; transform: translate(-50%, -50%); }
.tile-label { position: absolute; left: 10px; bottom: 10px; background: rgba(28,31,36,.75); color: #fff; font-size: .78rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; }
.mosaic .verified { top: 14px; left: 14px; }
.show-all { position: absolute; right: 16px; bottom: 16px; border-radius: 999px; box-shadow: var(--shadow); }
@media (max-width: 699px) {
  .mosaic, .mosaic.n2, .mosaic.n3, .mosaic.n4 { grid-template-columns: 1fr; grid-template-rows: 1fr; height: 62vw; }
  .mosaic .tile:not(.big) { display: none; }
  .mosaic .big { grid-row: auto; }
}

/* section tabs */
.detail-tabs { position: sticky; top: 68px; z-index: 15; background: #fff; display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin-top: 18px; overflow-x: auto; scrollbar-width: none; }
@media (max-width: 859px) { .detail-tabs { top: 94px; } }
.detail-tabs button { font: inherit; font-weight: 600; font-size: 1rem; color: var(--muted); background: none; border: 0; padding: 14px 0 12px; border-bottom: 3px solid transparent; cursor: pointer; white-space: nowrap; }
.detail-tabs button.on { color: var(--ink); border-bottom-color: var(--red); }

.detail2 { display: grid; gap: 32px; grid-template-columns: 1fr; padding: 8px 0 64px; }
@media (min-width: 960px) { .detail2 { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; } }
.dsec { padding: 24px 0 28px; border-bottom: 1px solid var(--line); scroll-margin-top: 140px; }
.dsec h2 { font-size: 1.45rem; margin: 26px 0 16px; }
.dsec h2:first-child { margin-top: 0; }
.crumb-area { color: var(--muted); font-size: 1rem; }
.dtitle { font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin: 4px 0 2px; }
.price-row { display: flex; align-items: center; gap: 12px; margin: 14px 0 6px; flex-wrap: wrap; }
.big-price { font-size: 1.9rem; font-weight: 700; }
.big-price small { font-size: 1.3rem; font-weight: 600; }
.chip-grey { background: var(--soft); color: var(--muted); font-size: .85rem; padding: 4px 12px; border-radius: 8px; }
.key-facts { display: flex; gap: 34px; padding: 18px 0; margin: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.key-facts > div { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 64px; line-height: 1.3; }
.kf-ic { width: 50px; height: 50px; border-radius: 50%; background: var(--soft); display: grid; place-items: center; margin-bottom: 6px; }
.kf-ic svg { width: 24px; height: 24px; }
.key-facts small { font-size: .85rem; font-weight: 600; }
.mrt.big { font-size: 1rem; color: var(--ink); margin: 14px 0 10px; }
.ready { display: flex; align-items: center; gap: 12px; font-size: 1rem; }
.ready svg { width: 24px; height: 24px; flex: none; }
.pdetails, .amen { list-style: none; padding: 0; margin: 0 0 6px; display: grid; gap: 18px 24px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .pdetails, .amen { grid-template-columns: 1fr 1fr; } }
.pdetails li, .amen li { display: flex; align-items: center; gap: 14px; font-size: 1rem; min-width: 0; }
.pdetails svg, .amen svg { width: 26px; height: 26px; flex: none; }
.amen + .btn { margin-top: 16px; }
.about { white-space: pre-line; color: var(--muted); font-size: 1rem; max-width: 70ch; }

/* sidebar */
.side { position: sticky; top: 140px; display: flex; flex-direction: column; gap: 18px; padding-top: 24px; }
@media (max-width: 959px) { .side { position: static; padding-top: 0; } }
.side-actions { display: flex; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.pill { font: inherit; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; border: 1.5px solid var(--ink); background: #fff; cursor: pointer; }
.pill svg { width: 20px; height: 20px; }
.pill.on { border-color: var(--red); color: var(--red); }
.pill.on svg path { fill: var(--red); }
.contact-card { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.cc-head { display: flex; gap: 14px; align-items: center; padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.avatar.big { width: 64px; height: 64px; font-size: 1.3rem; }
.cc-name { font-size: 1.15rem; display: block; }
.cc-sub { font-size: .85rem; text-transform: uppercase; letter-spacing: .03em; }
.contact-card .btn svg { width: 20px; height: 20px; }
.enquiry { display: flex; flex-direction: column; gap: 10px; padding: 12px; background: var(--soft); border-radius: var(--radius); }
.enquiry[hidden] { display: none; }
.mobile-bar { display: none; }
@media (max-width: 959px) {
  .mobile-bar { display: flex; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: #fff; border-top: 1px solid var(--line);
    padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
  .mobile-bar .btn { flex: 1; }
  body:has(.mobile-bar) .site-footer { padding-bottom: 96px; }
}

/* all-media viewer */
.media-modal { width: min(960px, 100vw); max-width: 100vw; height: 100vh; max-height: 100vh; margin: 0 auto; padding: 0; border: 0; background: #fff; }
.media-modal::backdrop { background: rgba(0,0,0,.6); }
.media-head { position: sticky; top: 0; display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; background: #fff; border-bottom: 1px solid var(--line); z-index: 1; }
.media-list { display: flex; flex-direction: column; gap: 10px; padding: 16px; }
.media-list img, .media-list video { width: 100%; border-radius: var(--radius); background: #000; }

/* ======================= Map ======================= */
.map-wrap { position: relative; height: 460px; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); background: #CFE3EF; }
.map-wrap.expanded { position: fixed; inset: 0; height: auto; z-index: 60; border-radius: 0; }
.map-canvas { position: absolute; inset: 0; background: #CFE3EF; }
.map-panel { position: absolute; top: 12px; left: 12px; z-index: 500; width: min(300px, calc(100% - 80px)); background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px; display: flex; flex-direction: column; }
.map-stn { font: inherit; display: flex; justify-content: space-between; gap: 10px; align-items: center; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 10px; cursor: pointer; border-radius: 8px; }
.map-stn:last-child { border-bottom: 0; }
.map-stn:hover { background: var(--soft); }
.map-stn-name { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.map-stn-name b { font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map-stn-name > span { display: flex; gap: 4px; }
.map-stn-dist { text-align: right; line-height: 1.25; flex: none; }
.map-stn-dist b { display: block; font-size: .92rem; }
.map-stn-dist small { color: var(--muted); }
.map-tools { position: absolute; right: 12px; top: 12px; z-index: 500; display: flex; flex-direction: column; gap: 8px; }
.map-tools button { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow); }
.map-tools svg { width: 20px; height: 20px; }
.map-wrap .leaflet-control-zoom a { width: 38px; height: 38px; line-height: 38px; border-radius: 50% !important; margin-top: 6px; border: 1px solid var(--line); }
.map-wrap .leaflet-control-zoom { border: 0 !important; }
.map-wrap .leaflet-container { font-family: var(--font); background: #CFE3EF; }
.map-stn-marker { display: flex !important; align-items: center; gap: 4px; width: auto !important; }
.map-train { width: 30px; height: 30px; border-radius: 50%; background: #1A6FE0; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); display: grid; place-items: center; flex: none; }
.map-train svg { width: 17px; height: 17px; }
.map-codes { display: flex; gap: 2px; }
.map-codes .stn { font-size: .66rem; padding: 1px 5px; }
.map-home span { width: 40px; height: 40px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--ink); border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.4); display: grid; place-items: center; }
.map-home svg { width: 20px; height: 20px; transform: rotate(45deg); }
@media (max-width: 599px) {
  .map-wrap { height: auto; background: #fff; }
  .map-canvas { position: relative; height: 360px; }
  .map-panel { position: static; width: auto; box-shadow: none; border-radius: 0; border-top: 1px solid var(--line); }
  .map-wrap.expanded .map-canvas { height: 65vh; }
}

/* ---------- Post form sections ---------- */
[hidden] { display: none !important; }
.form-card.wide { max-width: 820px; }
.fs { border: 0; border-top: 1px solid var(--line); margin: 22px 0 0; padding: 20px 0 0; min-width: 0; }
.fs legend { font-weight: 700; font-size: 1.05rem; padding: 0 10px 0 0; }
.ticks { display: grid; gap: 8px; grid-template-columns: 1fr; margin-top: 8px; }
@media (min-width: 560px) { .ticks { grid-template-columns: 1fr 1fr; } }
@media (min-width: 760px) { .ticks { grid-template-columns: repeat(3, 1fr); } }
.tick { display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 9px 12px; cursor: pointer; font-size: .92rem; font-weight: 500; }
.tick svg { width: 20px; height: 20px; flex: none; color: var(--muted); }
.tick input { width: 18px; height: 18px; accent-color: var(--red); flex: none; }
.tick:has(input:checked) { border-color: var(--red); background: var(--red-soft); }
.tick:has(input:checked) svg { color: var(--red); }
.wm { background: var(--soft); border-radius: var(--radius); padding: 4px 14px 12px; }
.photo-preview img { width: 120px; height: 90px; }
.vid-prev { width: 100%; max-width: 360px; border-radius: var(--radius); margin-top: 8px; background: #000; }
.vid-badge { position: absolute; left: 12px; bottom: 12px; z-index: 1; background: rgba(28,31,36,.75); color: #fff; font-size: .75rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.map-canvas .maplibregl-ctrl-group { border-radius: 999px; overflow: hidden; box-shadow: var(--shadow); }
.map-canvas .maplibregl-ctrl-group button { width: 38px; height: 38px; }
.map-stn-marker { cursor: default; }
.map-wrap .maplibregl-cooperative-gesture-screen { font-family: var(--font); }
.lines-mini { display: inline-flex; gap: 3px; margin-left: 6px; vertical-align: 1px; }
.lines-mini i { font-style: normal; font-size: .62rem; font-weight: 700; color: #fff; background: var(--c); padding: 1px 5px; border-radius: 4px; line-height: 1.5; }
.region .station { display: inline-flex; align-items: center; }

/* ---------- Card photo slider ---------- */
.card-media { position: relative; overflow: hidden; }
.card-link, .card-link img { display: block; width: 100%; height: 100%; }
.card-link img { object-fit: cover; }
.card-media .poster-over, .card-media .verified, .card-media .dots, .card-media .photo-count, .card-media .vid-badge { pointer-events: none; }
.card-media::after { pointer-events: none; }
.slide-btn { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); color: var(--ink); display: grid; place-items: center; cursor: pointer; box-shadow: 0 1px 5px rgba(0,0,0,.25); opacity: 0; transition: opacity .15s; }
.slide-btn svg { width: 18px; height: 18px; }
.slide-btn.prev { left: 10px; } .slide-btn.next { right: 10px; }
.card-media:hover .slide-btn, .slide-btn:focus-visible { opacity: 1; }
@media (hover: none) { .slide-btn { opacity: .9; width: 32px; height: 32px; } }

/* ---------- Post form: location ---------- */
.postal-row { display: flex; gap: 8px; }
.postal-row .input { flex: 1; }
.pick-map { height: 340px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.privacy { display: grid; gap: 8px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .privacy { grid-template-columns: 1fr 1fr; } .privacy legend { grid-column: 1 / -1; } }
.radio-card { display: flex; gap: 10px; align-items: flex-start; border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 12px; cursor: pointer; }
.radio-card input { margin-top: 4px; accent-color: var(--red); width: 18px; height: 18px; flex: none; }
.radio-card b { display: block; font-size: .95rem; }
.radio-card small { color: var(--muted); font-size: .82rem; }
.radio-card:has(input:checked) { border-color: var(--red); background: var(--red-soft); }
.map-approx-tag { background: #fff; color: var(--red-dark); font-weight: 700; font-size: .8rem; padding: 4px 10px; border-radius: 999px; box-shadow: var(--shadow); border: 1.5px solid var(--red); }

/* ---------- No agent fee tag ---------- */
.chip-nofee { display: inline-flex; align-items: center; background: #E6F4EC; color: var(--green); font-weight: 700; font-size: .8rem; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.avail { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
@media (min-width: 900px) { .filters { grid-template-columns: 2fr repeat(6, 1fr); } }

/* ---------- Home: Singpass trust banner ---------- */
.trust { margin-top: 28px; max-width: 920px; background: #fff; border: 1.5px solid #BFE3CC; border-radius: var(--radius-lg); padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.trust-main { display: flex; gap: 14px; align-items: center; }
.trust-ic { width: 48px; height: 48px; border-radius: 50%; background: #E6F4EC; color: var(--green); display: grid; place-items: center; flex: none; }
.trust-ic svg { width: 26px; height: 26px; }
.trust-main b { display: block; font-size: 1.05rem; }
.trust-main span { color: var(--muted); font-size: .92rem; }
.trust-points { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .88rem; font-weight: 600; }
.trust-points li { display: flex; align-items: center; gap: 6px; }
.trust-points li::before { content: ""; width: 16px; height: 16px; border-radius: 50%; background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center / 11px no-repeat; flex: none; }

/* ---------- Language switch ---------- */
.lang-btn { font: inherit; font-weight: 700; font-size: .92rem; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--red); color: var(--red); background: #fff; cursor: pointer; white-space: nowrap; }
.lang-btn:hover { background: var(--red-soft); }
.lang-btn svg { width: 18px; height: 18px; }
@media (max-width: 420px) { .lang-btn { padding: 7px 10px; } .header-actions .btn-red { padding: 10px 12px; font-size: .88rem; } }
:lang(zh) .hero h1 { max-width: 14em; }
.hero h1 { max-width: 20ch; font-size: clamp(1.9rem, 4.2vw, 3rem); }

/* ---------- Text pages: FAQ, terms, privacy ---------- */
.doc { max-width: 780px; margin: 0 auto; padding: 32px 0 72px; }
.doc h1 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); margin-bottom: 6px; }
.doc .updated { color: var(--muted); font-size: .9rem; margin-bottom: 26px; }
.doc h2 { font-size: 1.25rem; margin: 34px 0 10px; }
.doc p, .doc li { color: #383C44; }
.doc ul, .doc ol { padding-left: 22px; margin: 0 0 1em; }
.doc li { margin-bottom: 6px; }
.doc a { color: var(--red); }
.doc .callout { background: var(--soft); border-radius: var(--radius); padding: 14px 16px; font-size: .95rem; }
.doc-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.doc-nav a { text-decoration: none; font-weight: 600; font-size: .9rem; padding: 7px 14px; border-radius: 999px; border: 1.5px solid var(--line); color: var(--ink); }
.doc-nav a[aria-current="page"] { border-color: var(--red); color: var(--red); background: var(--red-soft); }
.faq-group { margin-top: 30px; }
.faq-group h2 { margin-bottom: 8px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 16px 36px 16px 0; font-weight: 600; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 12px; font-size: 1.4rem; font-weight: 400; color: var(--red); }
.faq details[open] summary::after { content: "−"; }
.faq details > div { padding: 0 0 16px; }
.faq details > div p:last-child { margin-bottom: 0; }
.zh-only { display: none; }
:lang(zh) .zh-only { display: block; }
.legal-note { font-size: .82rem; color: var(--muted); text-align: center; margin: 0; }
.legal-note a { color: var(--ink); }
.topics { list-style: none; padding: 0 !important; display: grid; gap: 10px; margin: 12px 0 24px !important; }
.topics li { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin: 0 !important; }
.topics b { display: block; }
.topics span { color: var(--muted); font-size: .92rem; }
/* buttons inside text pages keep their own colours (not the red link colour) */
.doc a.btn-red, .doc a.btn-red:hover { color: #fff; text-decoration: none; }
.doc a.btn-outline { color: var(--ink); text-decoration: none; }

/* ---------- Contact form ---------- */
.contact-form { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; margin: 8px 0 12px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.sent { display: flex; gap: 14px; align-items: center; border: 1.5px solid #BFE3CC; background: #F2FAF5; border-radius: var(--radius-lg); padding: 18px; margin: 8px 0 12px; }
.sent b { display: block; font-size: 1.05rem; }
.sent span { color: var(--muted); }
.error a { color: var(--red-dark); text-decoration: underline; }
.report-link { font-size: .85rem; color: var(--muted); align-self: flex-start; }
