:root {
  --canvas: #e5e8ea;
  --surface: #fff;
  --ink: #0c0d0e;
  --ink-2: #3a3e43;
  --muted: #8a8f95;
  --line: #e6e8ea;
  --chip: #f2f3f4;
  --accent: #79aeea;
  --gut: clamp(16px, 4vw, 56px);
  --sheet: cubic-bezier(0.32, 0.72, 0, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--canvas); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
svg { display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
body.locked { overflow: hidden; }

/* ---------- shared bits ---------- */
.eyebrow { margin: 0 0 14px; font-size: 13px; letter-spacing: 0.02em; color: var(--muted); }
.display { margin: 0; font-weight: 500; font-size: clamp(42px, 6.4vw, 92px); line-height: 0.98; letter-spacing: -0.045em; }
.display-sm { margin: 0 0 18px; font-weight: 500; font-size: clamp(34px, 4.6vw, 64px); line-height: 1.02; letter-spacing: -0.04em; }
.h2 { margin: 0; font-weight: 500; font-size: clamp(30px, 3.6vw, 48px); line-height: 1.05; letter-spacing: -0.035em; }
.lede { max-width: 30em; margin: 22px 0 30px; color: var(--ink-2); font-size: clamp(16px, 1.25vw, 18px); }
.btn { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 52px; padding: 0 28px; border-radius: 999px; font-weight: 500; font-size: 15px; text-decoration: none; transition: transform 0.25s var(--spring), background 0.2s; }
.btn:active { transform: scale(0.96); }
.btn small { font-size: 11px; font-weight: 400; opacity: 0.6; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #26292c; }
.btn-light { background: #fff; color: var(--ink); }
.btn.wide { width: 100%; }
.btn.apply { flex-direction: row; gap: 0.3em; }
.btn.apply:disabled { opacity: 0.4; cursor: not-allowed; }
.link { color: var(--ink); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.icon-btn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / 0.06); transition: transform 0.25s var(--spring); }
.icon-btn:active { transform: scale(0.9); }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn.sm { width: 36px; height: 36px; }
.icon-btn.sm svg { width: 17px; height: 17px; }
.icon-btn.glass { background: rgb(30 36 44 / 0.22); color: #fff; backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.25); }
.pill-btn { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 999px; background: var(--chip); font-size: 14px; font-weight: 500; transition: transform 0.25s var(--spring), background 0.2s; }
.pill-btn:hover { background: #e9ebed; }
.pill-btn:active { transform: scale(0.95); }
.pill-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }

/* ---------- nav ---------- */
.nav { position: fixed; z-index: 40; inset: 0 0 auto; display: flex; align-items: center; gap: 24px; height: 72px; padding: 0 var(--gut); transition: background 0.3s, box-shadow 0.3s, transform 0.5s var(--sheet); }
.nav.solid { background: rgb(255 255 255 / 0.78); backdrop-filter: blur(18px) saturate(1.6); -webkit-backdrop-filter: blur(18px) saturate(1.6); box-shadow: 0 1px 0 var(--line); }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; font-weight: 600; font-size: 19px; letter-spacing: -0.03em; }
.brand svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.nav-links { display: flex; gap: 28px; margin-left: auto; font-size: 14px; }
.nav-links a { text-decoration: none; color: var(--ink-2); transition: color 0.2s; }
.nav-links a:hover { color: var(--ink); }
.nav .icon-btn { background: rgb(255 255 255 / 0.7); }
@media (max-width: 720px) { .nav-links { display: none; } .nav .icon-btn { margin-left: auto; } }

/* ---------- page scale-back when a sheet is open ---------- */
#page { transform-origin: 50% 0; transition: transform 0.56s var(--sheet), border-radius 0.56s var(--sheet), filter 0.56s; }
body.sheet-open #page { transform: scale(0.94); border-radius: 28px; overflow: hidden; filter: brightness(0.92); }
body.sheet-open .nav { transform: translateY(-110%); }

/* ---------- intro ---------- */
.intro { position: relative; height: 280vh; background: var(--canvas); }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.intro-copy { position: absolute; left: var(--gut); top: 50%; width: min(44vw, 620px); transform: translateY(-50%); z-index: 3; will-change: transform, opacity; }
.display .line { display: block; overflow: hidden; padding-bottom: 0.06em; }
.display .line > span { display: block; transform: translateY(105%); transition: transform 1.1s var(--out); }
.display .line:nth-child(2) > span { transition-delay: 0.12s; }
body.loaded .display .line > span { transform: none; }
.js .reveal-load { opacity: 0; transform: translateY(18px); transition: opacity 0.8s, transform 0.9s var(--out); transition-delay: calc(var(--d) * 0.1s + 0.15s); }
body.loaded .reveal-load { opacity: 1; transform: none; }

.fp-card, .screen-ui { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.fp-card { z-index: 1; width: 300px; height: 560px; padding: 30px 0 0 22px; border-radius: 40px; background: #f4f5f6; box-shadow: 0 30px 60px -30px rgb(20 30 40 / 0.35), inset 0 0 0 1px rgb(255 255 255 / 0.8); overflow: hidden; will-change: transform, opacity; }
.fp-card h2 { margin: 18px 0 28px; font-size: 21px; font-weight: 500; letter-spacing: -0.02em; }
.fp-stats { margin: 0; display: grid; gap: 22px; width: 80px; }
.fp-stats dt { font-size: 10px; color: var(--muted); }
.fp-stats dd { margin: 4px 0 0; font-size: 19px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.fp-plan { position: absolute; left: 92px; top: 92px; width: 300px; }
.fp-plan .plan { width: 100%; height: auto; }
.fp-pager { position: absolute; left: 50%; bottom: 76px; display: flex; gap: 4px; transform: translateX(-50%); }
.fp-pager i { width: 14px; height: 3px; border-radius: 2px; background: var(--ink); }
.fp-pager i + i { width: 3px; background: #c8ccd0; }
.fp-close { position: absolute; left: 18px; right: 18px; bottom: 18px; height: 40px; display: grid; place-items: center; border-radius: 999px; background: #fff; font-size: 11px; color: var(--ink-2); }

.screen { position: absolute; inset: 0; z-index: 2; background: #fff; clip-path: inset(10% 10% 10% 60% round 40px); will-change: clip-path; }
.screen-ui { width: 330px; height: 600px; padding: 26px 20px; will-change: transform, opacity; }
.screen-top { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, #cdb8a4, #8d7663); box-shadow: inset 0 0 0 2px #fff, 0 0 0 1px var(--line); }
.screen-top svg { width: 18px; height: 18px; fill: none; stroke: var(--ink-2); stroke-width: 1.6; stroke-linejoin: round; }
.screen-title { margin: 22px 0 18px; font-size: 25px; line-height: 1.12; letter-spacing: -0.03em; font-weight: 500; }
.mini-card { position: relative; height: 196px; margin-bottom: 10px; border-radius: 24px; overflow: hidden; }
.mini-card img { width: 100%; height: 100%; object-fit: cover; }
.mini-glass { position: absolute; inset: auto 0 0; display: grid; grid-template-columns: 1fr auto; padding: 30px 14px 12px; color: #fff; font-size: 12px; background: linear-gradient(transparent, rgb(25 35 50 / 0.55)); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); mask: linear-gradient(transparent, #000 40%); -webkit-mask: linear-gradient(transparent, #000 40%); }
.mini-glass b { font-weight: 500; }
.mini-glass small { grid-column: 1 / -1; opacity: 0.75; font-size: 10px; }
.tabbar { position: absolute; left: 50%; bottom: 26px; display: flex; gap: 6px; padding: 6px; border-radius: 999px; background: rgb(12 13 14 / 0.86); transform: translateX(-50%); }
.tabbar i { width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle, #8d9196 3px, transparent 3.5px); }
.tabbar i.on { background: #fff radial-gradient(circle, var(--ink) 3px, transparent 3.5px); }

.no-js .intro { height: auto; }
.no-js .stage { position: relative; height: auto; padding: 140px var(--gut) 80px; }
.no-js .intro-copy { position: static; transform: none; width: auto; }
.no-js .fp-card, .no-js .screen { display: none; }

@media (max-width: 819px) {
  .intro-copy { top: 96px; width: auto; right: var(--gut); transform: none; }
  .lede { margin: 16px 0 20px; font-size: 15px; }
  .intro-copy .btn { display: none; }
}

/* ---------- homes ---------- */
.homes { position: relative; background: #fff; padding: 40px var(--gut) 120px; }
.homes-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 36px; }
.homes-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.active-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.active-filters span { padding: 6px 12px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 12px; animation: chipIn 0.45s var(--spring) both; }
@keyframes chipIn { from { opacity: 0; transform: scale(0.6); } }
.result-count { display: inline-block; font-variant-numeric: tabular-nums; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: clamp(14px, 1.6vw, 24px); }
.card { position: relative; aspect-ratio: 5 / 5.6; border-radius: 30px; overflow: hidden; background: #dfe3e6; cursor: pointer; isolation: isolate; transition: transform 0.5s var(--out), box-shadow 0.5s; }
.card:hover { box-shadow: 0 30px 50px -30px rgb(20 30 45 / 0.45); }
.card-img { position: absolute; left: 0; right: 0; top: -8%; height: 116%; transform: translate3d(0, var(--py, 0), 0); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--out); }
.card:hover .card-img img { transform: scale(1.05); }
.card-glass { position: absolute; inset: auto 0 0; z-index: 1; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 2px 12px; padding: 60px 22px 20px; color: #fff; background: linear-gradient(transparent, rgb(18 26 38 / 0.6)); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); mask: linear-gradient(transparent, #000 45%); -webkit-mask: linear-gradient(transparent, #000 45%); }
.card-name { font-size: 19px; font-weight: 500; letter-spacing: -0.02em; }
.card-price { font-size: 19px; font-weight: 500; text-align: right; }
.card-meta { font-size: 13px; opacity: 0.78; }
.card-avail { font-size: 12px; opacity: 0.6; text-align: right; }
.card .heart { position: absolute; z-index: 2; top: 16px; right: 16px; width: 40px; height: 40px; }
.heart svg { transition: fill 0.2s, transform 0.4s var(--spring); }
.heart.on svg { fill: #fff; }
.heart.pop svg { animation: pop 0.5s var(--spring); }
@keyframes pop { 30% { transform: scale(0.7); } 70% { transform: scale(1.25); } }
.heart.pop::after { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 2px #fff; animation: burst 0.6s var(--out) forwards; }
@keyframes burst { from { transform: scale(0.6); opacity: 1; } to { transform: scale(1.7); opacity: 0; } }
.card.leaving { pointer-events: none; }
.empty, .more-note { margin: 32px 0 0; color: var(--muted); font-size: 14px; }
.more-note:empty { display: none; }

.js [data-reveal] { opacity: 0; transform: translateY(30px); transition: opacity 0.9s var(--out), transform 1s var(--out); transition-delay: calc(var(--d, 0) * 0.09s); }
.js [data-reveal].in { opacity: 1; transform: none; }
.js .card[data-reveal] { transform: translateY(60px) scale(0.94); }
.js .card[data-reveal].in { transform: none; }

/* ---------- how ---------- */
.how { background: #fff; padding: 40px var(--gut) 140px; }
.how .h2 { max-width: 14em; }
.steps { list-style: none; margin: 48px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 20px; }
.steps li { display: flex; flex-direction: column; padding: 28px; border-radius: 30px; background: #f4f5f6; min-height: 460px; }
.step-n { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.steps h3 { margin: 40px 0 8px; font-size: 22px; font-weight: 500; letter-spacing: -0.02em; }
.steps p { margin: 0; color: var(--ink-2); font-size: 15px; }
.step-art { margin-top: auto; height: 190px; padding-top: 24px; }
.step-art.bars { display: flex; align-items: flex-end; gap: 4px; }
.step-art.bars i { flex: 1; border-radius: 2px 2px 0 0; background: var(--ink); height: 20%; transform-origin: bottom; animation: barwave 2.6s ease-in-out infinite; animation-delay: calc(var(--n) * -0.18s); }
.step-art.bars i:nth-child(-n+3), .step-art.bars i:nth-last-child(-n+3) { background: #cfd3d7; }
@keyframes barwave { 0%, 100% { height: calc(25% + var(--h) * 0.3%); } 50% { height: calc(30% + var(--h) * 0.7%); } }
.step-art .plan { height: 100%; width: auto; margin: 0 auto; }
.step-room { border-radius: 20px; overflow: hidden; position: relative; padding: 0; }
.step-room img { position: absolute; height: 100%; width: auto; max-width: none; animation: pan 14s ease-in-out infinite alternate; }
@keyframes pan { from { transform: translateX(0); } to { transform: translateX(calc(-100% + 300px)); } }

/* ---------- cta ---------- */
.cta { background: #fff; padding: 0 var(--gut) 24px; }
.cta-inner { padding: clamp(48px, 8vw, 110px) clamp(24px, 6vw, 90px); border-radius: 40px; background: var(--ink) url("/assets/img/h4-1600.webp") center / cover; color: #fff; position: relative; overflow: hidden; isolation: isolate; }
.cta-inner::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgb(8 9 10 / 0.85), rgb(8 9 10 / 0.35)); }
.cta-inner p { max-width: 28em; margin: 0 0 30px; opacity: 0.8; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 28px var(--gut) 40px; background: #fff; color: var(--muted); font-size: 13px; }

/* ---------- sheets (filters) ---------- */
.scrim { position: fixed; inset: 0; z-index: 45; background: rgb(8 10 12 / 0.4); opacity: 0; pointer-events: none; transition: opacity 0.5s; }
.scrim.on { opacity: 1; pointer-events: auto; }
.sheet { position: fixed; z-index: 46; left: 50%; bottom: 0; width: min(560px, 100%); max-height: min(92vh, 860px); display: flex; flex-direction: column; border-radius: 34px 34px 0 0; background: #fff; transform: translate(-50%, 105%); transition: transform 0.6s var(--sheet); visibility: hidden; }
.sheet.open { transform: translate(-50%, 0); visibility: visible; }
.sheet.dragging { transition: none; }
.grabber { display: block; width: 38px; height: 5px; margin: 8px auto 0; border-radius: 3px; background: #d6d9dc; flex: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px 4px; touch-action: none; }
.sheet-head h2 { margin: 0; font-size: 24px; font-weight: 500; letter-spacing: -0.03em; }
.sheet-head .icon-btn { background: var(--chip); }
.sheet-body { overflow-y: auto; padding: 4px 24px 12px; overscroll-behavior: contain; }
.sheet-foot { padding: 12px 24px calc(18px + env(safe-area-inset-bottom)); }
.sheet.open .sheet-body > * { animation: rise 0.6s var(--out) both; }
.sheet.open .sheet-body > :nth-child(n+3) { animation-delay: 0.06s; }
.sheet.open .sheet-body > :nth-child(n+5) { animation-delay: 0.12s; }
.sheet.open .sheet-body > :nth-child(n+7) { animation-delay: 0.18s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
.label { margin: 18px 0 10px; font-size: 13px; color: var(--ink-2); }
.label-row { display: flex; justify-content: space-between; align-items: baseline; }
.hint { margin: 0; font-size: 12px; color: var(--muted); }

.seg { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); padding: 4px; border-radius: 999px; background: var(--chip); }
.seg button { position: relative; z-index: 1; height: 38px; border-radius: 999px; font-size: 14px; color: var(--muted); transition: color 0.3s; }
.seg button.on { color: var(--ink); font-weight: 500; }
.seg-thumb { position: absolute; top: 4px; bottom: 4px; left: 0; width: var(--w, 20%); border-radius: 999px; background: #fff; box-shadow: 0 2px 8px rgb(0 0 0 / 0.08), 0 0 0 1px rgb(0 0 0 / 0.04); transform: translateX(var(--x, 4px)); transition: transform 0.5s var(--spring), width 0.5s var(--spring); }

.histo { padding-top: 8px; }
.bars-wrap { display: flex; align-items: flex-end; gap: 2px; height: 86px; }
.bars-wrap i { flex: 1; height: var(--h); border-radius: 1px 1px 0 0; background: #d3d6da; transform: scaleY(0); transform-origin: bottom; transition: background 0.25s, transform 0.7s var(--spring); transition-delay: 0s, calc(var(--n) * 12ms); }
.bars-wrap i.in { background: var(--ink); }
.sheet.open .bars-wrap i { transform: scaleY(1); }
.range { position: relative; height: 28px; }
.range-track { position: absolute; left: 0; right: 0; top: 13px; height: 2px; background: #e3e5e8; }
.range-fill { position: absolute; top: 0; bottom: 0; background: var(--ink); left: var(--a, 0%); right: calc(100% - var(--b, 100%)); }
.range input { position: absolute; inset: 0; width: 100%; margin: 0; background: none; pointer-events: none; -webkit-appearance: none; appearance: none; }
.range input::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgb(0 0 0 / 0.18), 0 0 0 1px rgb(0 0 0 / 0.06); cursor: grab; transition: transform 0.25s var(--spring); }
.range input:active::-webkit-slider-thumb { transform: scale(1.18); cursor: grabbing; }
.range input::-moz-range-thumb { pointer-events: auto; width: 24px; height: 24px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgb(0 0 0 / 0.18); cursor: grab; }
.range input::-webkit-slider-runnable-track { background: none; }
.range-labels { position: relative; display: flex; justify-content: space-between; height: 30px; margin-top: 4px; font-size: 11px; color: var(--muted); }
.tag { position: absolute; top: 0; left: var(--p); transform: translateX(-50%); padding: 3px 9px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; transition: transform 0.2s; }
.toggle { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle i { position: relative; width: 48px; height: 28px; border-radius: 999px; background: #e3e5e8; transition: background 0.3s; }
.toggle i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 999px; background: #fff; box-shadow: 0 2px 6px rgb(0 0 0 / 0.18); transition: transform 0.45s var(--spring), width 0.25s var(--out); }
.toggle:active i::after { width: 30px; }
.toggle input:checked + i { background: var(--ink); }
.toggle input:checked + i::after { transform: translateX(20px); }
.toggle:active input:checked + i::after { transform: translateX(14px); }
.toggle input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }

.odo { display: inline-flex; height: 1.2em; overflow: hidden; vertical-align: -0.28em; line-height: 1.2em; }
.odo .d { display: block; height: 1.2em; overflow: hidden; }
.odo .col { display: flex; flex-direction: column; transform: translateY(calc(var(--n) * -1.2em)); transition: transform 0.7s var(--spring); }

/* ---------- detail ---------- */
.detail { position: fixed; inset: 0; z-index: 60; visibility: hidden; pointer-events: none; }
.detail.open { visibility: visible; pointer-events: auto; }
.detail-hero { position: absolute; inset: 0; overflow: hidden; background: #c9ced3; opacity: 0; }
.detail.ready .detail-hero { opacity: 1; }
.detail-hero img { width: 100%; height: 100%; object-fit: cover; transform: translateY(var(--hy, 0)) scale(var(--hs, 1)); transform-origin: 50% 30%; }
.detail-hero::after { content: ""; position: absolute; inset: 0 0 auto; height: 160px; background: linear-gradient(rgb(0 0 0 / 0.25), transparent); }
.detail-bar { position: absolute; z-index: 3; inset: 0 0 auto; display: flex; justify-content: space-between; padding: max(18px, env(safe-area-inset-top)) var(--gut); opacity: 0; transform: translateY(-10px); transition: opacity 0.4s, transform 0.5s var(--out); }
.detail.ready .detail-bar { opacity: 1; transform: none; transition-delay: 0.2s; }
.detail.pv .detail-bar { opacity: 0; pointer-events: none; transition-delay: 0s; }
.flip { position: fixed; z-index: 70; overflow: hidden; pointer-events: none; }
.flip img { width: 100%; height: 100%; object-fit: cover; }

.dsheet { position: absolute; z-index: 2; left: 50%; top: 40px; bottom: 0; width: min(640px, 100%); display: flex; flex-direction: column; border-radius: 34px 34px 0 0; background: #fff; box-shadow: 0 -20px 50px -20px rgb(0 0 0 / 0.25); transform: translate(-50%, var(--sy, 110%)); touch-action: none; }
.dsheet.anim { transition: transform 0.6s var(--sheet); }
.dsheet-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 14px 26px 0; touch-action: pan-y; scrollbar-width: none; }
.dsheet-scroll::-webkit-scrollbar { display: none; }
.d-in { opacity: 0; transform: translateY(16px); }
.detail.ready .d-in { opacity: 1; transform: none; transition: opacity 0.6s, transform 0.7s var(--out); transition-delay: calc(0.25s + var(--d) * 0.07s); }
.d-title { margin: 8px 0 4px; font-size: 26px; font-weight: 500; letter-spacing: -0.03em; }
.d-loc { display: flex; align-items: center; gap: 4px; margin: 0 0 14px; color: var(--muted); font-size: 13px; }
.d-loc svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.d-desc { margin: 0 0 4px; color: var(--muted); font-size: 14px; line-height: 1.55; max-height: 4.65em; overflow: hidden; transition: max-height 0.6s var(--out); }
.d-desc.full { max-height: 20em; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; }
.chips li { display: flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); font-size: 12px; color: var(--ink-2); }
.chips svg, .amen svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.d-price { display: flex; align-items: baseline; gap: 8px; margin: 22px 0 6px; }
.d-price b { font-size: 32px; font-weight: 500; letter-spacing: -0.03em; }
.d-price span { font-size: 13px; color: var(--muted); }
.d-h { margin: 30px 0 12px; font-size: 16px; font-weight: 500; }
.amen { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; font-size: 13px; color: var(--ink-2); }
.amen li { display: flex; align-items: center; gap: 10px; }
.thumbs { display: flex; gap: 12px; }
.thumb { flex: 1; max-width: 200px; text-align: left; transition: transform 0.35s var(--spring); }
.thumb:hover { transform: translateY(-3px); }
.thumb:active { transform: scale(0.97); }
.thumb-art { display: grid; place-items: center; height: 170px; border: 1px solid var(--line); border-radius: 20px; padding: 10px; background: #fff; }
.thumb-art .plan { height: 100%; width: auto; }
.thumb span { display: block; margin-top: 8px; font-size: 13px; color: var(--ink-2); }
.chart { position: relative; height: 150px; margin-top: 8px; }
.chart svg { width: 100%; height: 120px; overflow: visible; }
.c-line { fill: none; stroke: var(--ink); stroke-width: 1.8; vector-effect: non-scaling-stroke; stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.c-area { fill: url(#cg); opacity: 0; }
.chart.in .c-line { stroke-dashoffset: 0; transition: stroke-dashoffset 1.8s cubic-bezier(0.65, 0, 0.35, 1); }
.chart.in .c-area { opacity: 1; transition: opacity 1s 1s; }
.c-dot { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--ink); opacity: 0; transform: scale(0); }
.chart.in .c-dot { opacity: 1; transform: scale(1); transition: transform 0.5s var(--spring) 1.7s, opacity 0.2s 1.7s; }
.c-dot::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; background: rgb(12 13 14 / 0.15); animation: ping 2s ease-out infinite 2s; }
@keyframes ping { from { transform: scale(0.5); opacity: 1; } to { transform: scale(2.2); opacity: 0; } }
.c-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 8px; }
.spacer { height: 130px; }

.d-cta { position: absolute; z-index: 4; left: 50%; bottom: 0; width: min(640px, 100%); padding: 24px 26px calc(18px + env(safe-area-inset-bottom)); background: linear-gradient(rgb(255 255 255 / 0), #fff 34%); transform: translate(-50%, 0); transition: transform 0.5s var(--sheet), opacity 0.4s; }
.main-cta { transform: translate(-50%, 120%); }
.detail.ready .main-cta { transform: translate(-50%, 0); transition-delay: 0.3s; }
.detail.peek .main-cta { transform: translate(-50%, 120%); transition-delay: 0s; }

/* ---------- floor plan viewer ---------- */
.planview { position: absolute; z-index: 5; left: 50%; top: 40px; bottom: 0; width: min(640px, 100%); display: flex; flex-direction: column; border-radius: 34px 34px 0 0; background: #fff; box-shadow: 0 -20px 50px -10px rgb(0 0 0 / 0.3); transform: translate(-50%, 105%); transition: transform 0.65s var(--sheet), filter 0.5s; visibility: hidden; }
.planview.open { transform: translate(-50%, 0); visibility: visible; }
.pv-head { display: flex; align-items: center; gap: 6px; padding: 14px 20px 0; }
.pv-head .icon-btn { background: transparent; box-shadow: none; }
.pv-title { margin: 0; font-size: 24px; font-weight: 500; letter-spacing: -0.03em; }
.pv-title span { display: inline-block; transition: opacity 0.2s; }
.pv-hint { margin: 0 0 0 auto; font-size: 12px; color: var(--muted); }
.pv-viewport { position: relative; flex: 1; overflow: hidden; touch-action: pan-y; cursor: grab; }
.pv-viewport.grabbing { cursor: grabbing; }
.pv-track { display: flex; height: 100%; transform: translateX(var(--tx, 0px)); }
.pv-track.anim { transition: transform 0.6s var(--sheet); }
.pv-slide { flex: 0 0 100%; display: grid; place-items: center; padding: 10px 20px 120px; }
.pv-slide .plan { width: 100%; height: 100%; max-height: 560px; }
.pv-dots { position: absolute; left: 50%; bottom: 112px; display: flex; gap: 5px; transform: translateX(-50%); }
.pv-dots i { width: 5px; height: 5px; border-radius: 3px; background: #cfd3d7; transition: width 0.45s var(--spring), background 0.3s; }
.pv-dots i.on { width: 20px; background: var(--ink); }
.spot-tip { position: absolute; z-index: 3; padding: 6px 12px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 12px; white-space: nowrap; pointer-events: none; opacity: 0; transform: translate(-50%, -150%) scale(0.85); transition: opacity 0.2s, transform 0.3s var(--spring); }
.spot-tip.on { opacity: 1; transform: translate(-50%, -170%) scale(1); }

/* ---------- plan vectors ---------- */
.plan .wall { fill: none; stroke: var(--ink); stroke-width: 5; stroke-linejoin: miter; stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.plan .wall.outer { stroke-width: 7; }
.plan .thin { fill: none; stroke: #7b8086; stroke-width: 1.2; stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.plan .win rect { fill: #fff; stroke: var(--ink); stroke-width: 1.2; }
.plan .win path { stroke: var(--ink); stroke-width: 1; }
.plan .wins { opacity: 0; }
.plan .furn > * { fill: none; stroke: #2c2f33; stroke-width: 1.1; opacity: 0; transform: scale(0.9); transform-box: fill-box; transform-origin: center; }
.plan.drawn .wall, .plan.drawn .thin { stroke-dashoffset: 0; transition: stroke-dashoffset 1.2s cubic-bezier(0.65, 0, 0.35, 1); transition-delay: calc(var(--w, 0) * 80ms); }
.plan.drawn .thin { transition-duration: 1.5s; transition-delay: calc(300ms + var(--w, 0) * 60ms); }
.plan.drawn .wins { opacity: 1; transition: opacity 0.5s 0.9s; }
.plan.drawn .furn > * { opacity: 1; transform: none; transition: opacity 0.5s, transform 0.6s var(--spring); transition-delay: calc(700ms + var(--f, 0) * 22ms); }
.plan.static .wall, .plan.static .thin { stroke-dashoffset: 0; }
.plan.static .wins, .plan.static .furn > * { opacity: 1; transform: none; }
.spot { cursor: pointer; outline: none; }
.spot-in { transform: scale(0); transform-box: fill-box; transform-origin: center; }
.plan.drawn .spot-in { transform: scale(1); transition: transform 0.6s var(--spring); transition-delay: calc(1.3s + var(--i) * 0.14s); }
.spot-hit { fill: transparent; }
.spot-dot { fill: var(--ink); transition: fill 0.25s; }
.spot-ring { fill: rgb(12 13 14 / 0.16); transform-box: fill-box; transform-origin: center; animation: ring 3.2s var(--out) infinite; animation-delay: calc(1.8s + var(--i) * 0.8s); opacity: 0; }
.spot-ring.r2 { animation-delay: calc(2.4s + var(--i) * 0.8s); }
@keyframes ring { 0% { transform: scale(0.25); opacity: 0; } 15% { opacity: 1; } 60%, 100% { transform: scale(1.3); opacity: 0; } }
.spot:hover .spot-ring, .spot:focus-visible .spot-ring, .spot.active .spot-ring { fill: rgb(121 174 234 / 0.45); }
.spot:hover .spot-dot, .spot:focus-visible .spot-dot, .spot.active .spot-dot { fill: #2f79cf; }
.spot.active .spot-in { transform: scale(1.5); transition: transform 0.4s var(--spring); }

/* ---------- room tour ---------- */
.tour { position: fixed; inset: 0; z-index: 90; visibility: hidden; color: #fff; background: #0b0c0d; }
.tour.open { visibility: visible; }
.tour-stage { position: absolute; inset: 0; overflow: hidden; }
.tour-img { position: absolute; left: 0; top: 0; max-width: none; will-change: transform; }
.chrome { position: absolute; inset: -30%; opacity: 0; pointer-events: none; background:
  radial-gradient(40% 30% at 30% 40%, #fafbfc 0%, transparent 60%),
  radial-gradient(30% 50% at 70% 60%, #5d6267 0%, transparent 65%),
  radial-gradient(35% 25% at 55% 30%, #c7ccd1 0%, transparent 70%),
  linear-gradient(120deg, #e9ecef, #9aa0a6 45%, #f4f5f6 60%, #6c7177); }
.tour-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(rgb(0 0 0 / 0.3), transparent 18%, transparent 55%, rgb(0 0 0 / 0.55)); opacity: 0; transition: opacity 0.6s; }
.tour.ready .tour-shade { opacity: 1; }
.tour-bar { position: absolute; z-index: 3; inset: 0 0 auto; display: flex; align-items: center; gap: 18px; padding: max(18px, env(safe-area-inset-top)) var(--gut) 0; opacity: 0; transition: opacity 0.5s; }
.tour.ready .tour-bar { opacity: 1; }
.segs { flex: 1; display: flex; gap: 5px; max-width: 420px; margin: 0 auto; padding-left: 54px; }
.segs i { flex: 1; height: 3px; border-radius: 2px; background: rgb(255 255 255 / 0.3); overflow: hidden; }
.segs i b { display: block; height: 100%; background: #fff; transform: scaleX(var(--s, 0)); transform-origin: left; }
.tour-nav { position: absolute; z-index: 2; top: 15%; bottom: 25%; width: 32%; }
.tour-nav.prev { left: 0; cursor: w-resize; }
.tour-nav.next { right: 0; cursor: e-resize; }
.tour-cap { position: absolute; z-index: 3; left: var(--gut); bottom: max(36px, env(safe-area-inset-bottom)); max-width: 480px; }
.tour-floor { margin: 0 0 4px; font-size: 13px; opacity: 0; transform: translateY(10px); transition: opacity 0.5s, transform 0.6s var(--out); }
.tour-name { margin: 0; font-size: clamp(34px, 5vw, 64px); font-weight: 500; letter-spacing: -0.04em; line-height: 1.05; overflow: hidden; }
.tour-name span { display: block; transform: translateY(105%); transition: transform 0.8s var(--out); }
.tour-note { margin: 8px 0 0; font-size: 15px; opacity: 0; transition: opacity 0.6s 0.2s; }
.tour.ready .tour-floor { opacity: 0.75; transform: none; }
.tour.ready .tour-name span { transform: none; }
.tour.ready .tour-note { opacity: 0.8; }
.tour.swap .tour-name span { transform: translateY(-105%); transition-duration: 0.35s; }
.tour.swap .tour-note, .tour.swap .tour-floor { opacity: 0; }

/* ---------- toast ---------- */
.toast { position: fixed; z-index: 100; left: 50%; bottom: max(22px, env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 18px; border-radius: 999px; background: #fff; box-shadow: 0 12px 30px -8px rgb(0 0 0 / 0.25), 0 0 0 1px rgb(0 0 0 / 0.04); font-size: 13px; font-weight: 500; transform: translate(-50%, 160%) scale(0.9); transition: transform 0.6s var(--spring); }
.toast.on { transform: translate(-50%, 0) scale(1); }
.toast button { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--chip); }
.toast svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
}
