.elevation {
    display:grid;
    grid-template-columns:clamp(205px, 21%, 275px) minmax(0, 1fr);
    min-width:0;
    border:1px solid var(--line);
    border-radius:18px;
    background:var(--surface);
    overflow:hidden;
}
.elevation-info {display:flex; flex-direction:column; justify-content:center; gap:24px; padding:clamp(18px, 2vw, 32px); min-width:0}
.elevation-kicker, .elevation-project p, .elevation-counts dt, .elevation-status dt,
.elevation-scene-head>div {display:flex; align-items:center; gap:7px}
.elevation-kicker {color:var(--primary); font-size:.78rem; font-weight:600}
.elevation-project h2 {font-size:clamp(1.5rem, 2.05vw, 2.15rem); line-height:1.45; margin:5px 0 1px; overflow-wrap:anywhere}
.elevation-project p {color:var(--muted); font-size:.86rem; overflow-wrap:anywhere}
.elevation-counts {display:grid; grid-template-columns:1fr 1fr; padding:15px 0; border-block:1px solid var(--line)}
.elevation-counts>div+div {border-inline-start:1px solid var(--line); padding-inline-start:15px}
.elevation-counts dt {gap:5px; font-size:.77rem; color:var(--muted)}
.elevation-counts dd, .elevation-status dd {margin:0; font-variant-numeric:tabular-nums; font-weight:600}
.elevation-counts dd {font-size:1.65rem; line-height:1.25; margin-block-start:5px}
.elevation-progress {display:grid; align-items:center; grid-template-columns:1fr auto; gap:8px; font-size:.87rem; font-weight:600}
.elevation-progress bdi {color:var(--primary)}
.elevation-progress progress {grid-column:1/-1; height:6px}
.elevation-progress p {grid-column:1/-1; font-size:.82rem; overflow-wrap:anywhere; color:var(--muted); font-weight:400}
.elevation-status h3 {font-size:.9rem; margin-bottom:8px}
.elevation-status dl>div {display:flex; align-items:center; justify-content:space-between; padding:5px 0; font-size:.85rem}
.elevation-status dt {gap:10px; color:var(--muted)}
.bay-symbol {display:inline-block; flex:none; width:8px; height:8px; background:currentColor}
.bay-available {color:#219668; border-radius:50%}
.bay-reserved {color:#bb8119; transform:rotate(45deg); border-radius:1px}
.bay-sold {color:#c46368; border-radius:1px}

.elevation-canvas {
    --stage-ink:#163849;
    --stage-line:#7e9ba480;
    --stage-paper:#f8fbf6e8;
    --stone:#d4c4ac;
    --stone-light:#f5e6cf;
    --stone-shadow:#968776;
    --recess:#33434a;
    --bay-width:111px;
    --min-bay:55px;
    --side-space:101px;
    --floor-height:clamp(47px, 4vw, 59px);
    position:relative;
    isolation:isolate;
    display:flex;
    flex-direction:column;
    min-width:0;
    background:#ccdbdf;
    color:var(--stage-ink);
    border-inline-start:1px solid var(--line);
}
.elevation-canvas::before {
    content:""; position:absolute; inset:0; z-index:-1; pointer-events:none;
    background:linear-gradient(180deg,#f2f6f347,transparent 45%), url("project-courtyard.webp") center bottom / cover no-repeat;
}
.elevation-scene-head {display:flex; align-items:center; justify-content:space-between; gap:10px; padding:16px 20px 4px; z-index:1}
.elevation-scene-head>div {max-width:100%; padding:5px 10px; background:var(--stage-paper); border:1px solid var(--stage-line); border-radius:7px}
.elevation-scene-head h3 {font-size:.84rem; font-weight:600; overflow-wrap:anywhere}
.elevation-floor-select {display:flex; align-items:center; gap:7px; font-size:.76rem; font-weight:600; background:var(--stage-paper); border-radius:5px; padding:2px 6px}
.elevation-floor-select select {color:var(--stage-ink); background:transparent; width:auto; min-height:29px; padding:2px 5px}
.elevation-viewport {min-width:0; max-height:min(78dvh, 780px); overflow:auto; flex:1; scrollbar-width:thin}
.elevation-viewport:focus-visible {outline-offset:-4px}
.elevation-scene {
    position:relative; display:flex; justify-content:center; align-items:flex-end;
    width:100%; min-width:calc(var(--bay-count) * var(--min-bay) + var(--side-space)); min-height:100%;
    padding:24px 0 33px; direction:ltr;
}
.elevation-model {
    position:relative; isolation:isolate;
    width:min(calc(var(--bay-count) * var(--bay-width) + 12px), calc(100% - var(--side-space)));
}
.elevation-model::before {
    content:""; position:absolute; z-index:-1; left:-8%; right:-5%; height:18px; bottom:-7px;
    background:radial-gradient(ellipse, #3d3c35a6 0%, #5f594f59 48%, transparent 72%);
    filter:blur(2px); transform:skewX(24deg);
}
.elevation-roof {position:relative; height:10px; margin-inline:-5px; background:linear-gradient(to bottom,var(--stone-light) 0 32%,var(--stone) 35% 73%,var(--stone-shadow) 75%); box-shadow:0 2px 3px #232c304d; z-index:1}
.elevation-roof::before, .elevation-roof i, .elevation-roof span {content:""; position:absolute; bottom:100%}
.elevation-roof::before {left:7%; height:14px; width:32%; background:repeating-linear-gradient(90deg,transparent 0 10px,#7e756f26 10px 11px),linear-gradient(var(--stone-light) 0 2px,var(--stone) 2px 100%); box-shadow:inset -6px -2px 0 #413b342d}
.elevation-roof i {right:8%; width:22%; height:6px; border:1px solid var(--stone-shadow); border-bottom:0; background:repeating-linear-gradient(90deg, #6a726f77 0 1px,transparent 1px 6px)}
.elevation-roof span {left:17%; height:22px; width:1px; background:var(--stone-shadow); z-index:-1}
.elevation-tower {position:relative; border-inline:4px solid var(--stone); background:var(--stone)}
.elevation-tower::before, .elevation-lobby::before {
    content:""; position:absolute; top:0; bottom:0; right:100%; width:14px; transform-origin:right center; transform:skewY(11deg);
    background:repeating-linear-gradient(0deg,var(--stone-shadow) 0 2px, transparent 2px var(--floor-height)),linear-gradient(90deg,var(--stone-shadow),var(--stone) 28%,var(--stone-shadow) 31% 50%,var(--stone) 52%);
}
.elevation-storey {position:relative; height:var(--floor-height); border-bottom:4px solid var(--stone); box-shadow:0 1px 0 var(--stone-shadow)}
.elevation-storey::after {content:""; position:absolute; bottom:-4px; left:-5px; right:-5px; height:4px; pointer-events:none; background:linear-gradient(var(--stone-light),var(--stone) 52%,var(--stone-shadow))}
.elevation-level {
    position:absolute; left:calc(100% + 14px); top:50%; transform:translateY(-50%); padding:1px 4px;
    min-width:20px; text-align:center; background:var(--stage-paper); border:1px solid var(--stage-line); border-radius:3px;
    font:600 10px/1.5 var(--ui-font); color:var(--stage-ink);
}
.elevation-level::after {content:""; position:absolute; right:100%; top:50%; width:12px; height:1px; background:var(--stage-line)}
.elevation-bays {
    display:grid; grid-template-columns:repeat(var(--bay-count), minmax(0, 1fr)); direction:rtl; height:100%;
    background:repeating-linear-gradient(90deg,transparent 0 30px,#80756529 31px 32px),linear-gradient(180deg,var(--stone-shadow),var(--stone) 14%);
}
.elevation-bay {
    position:relative; isolation:isolate; display:flex; align-items:flex-end; justify-content:center;
    padding:0 2px 4px; min-width:0; color:white;
    background:var(--recess);
}
.elevation-bay::before {
    content:""; position:absolute; z-index:-1; inset:0;
    background:url("project-balcony.webp") center / 100% 100% no-repeat;
}
.elevation-bay:nth-child(even)::before {transform:scaleX(-1)}
.elevation-bay:is(:hover,:focus-visible) {z-index:2; outline:3px solid var(--accent); outline-offset:-3px}
.elevation-bay:is(:hover,:focus-visible)::before {filter:brightness(1.16)}
.bay-plaque {
    display:inline-flex; align-items:center; gap:5px; padding:2px 7px; border:1px solid #ffffff70; border-radius:5px;
    color:#fff; background:#13292eef; box-shadow:0 1px 3px #16201e55;
    font:600 clamp(.7rem, .9vw, .86rem)/1.16 var(--ui-font); letter-spacing:.3px;
}
.bay-plaque[data-status=available] {background:#163a32ef; border-color:#b3ddc9a8}
.bay-plaque[data-status=reserved] {background:#69481a; border-color:#f1c369}
.bay-plaque[data-status=sold] {background:#632e39; border-color:#ecadb3}
.bay-plaque .bay-symbol {width:7px; height:7px}
.bay-plaque .bay-available {color:#6de3b1}
.bay-plaque .bay-reserved {color:#ffcf6b}
.bay-plaque .bay-sold {color:#ff9f9c}
.elevation-lobby {
    position:relative; display:flex; justify-content:center;
    height:calc(var(--floor-height) * .98); border-inline:4px solid var(--stone); border-bottom:2px solid var(--stone-shadow);
    background:var(--stone);
}
.elevation-lobby span {width:min(100%, calc(var(--floor-height) * 3.9)); background:url("project-entrance.webp") center / 100% 100% no-repeat}
.elevation-lobby i {flex:1; background:url("project-lobby-window.webp") center / calc(var(--floor-height) * 1.3) 100% round}
.elevation-lobby i:last-child {transform:scaleX(-1)}
.elevation-steps {position:relative; margin:auto; height:6px; width:103%; left:-1.5%; background:linear-gradient(var(--stone-light) 0 42%,var(--stone-shadow) 43% 58%,var(--stone) 60%); box-shadow:0 2px 2px #48413870}
.elevation-empty {display:grid; align-content:center; justify-items:center; gap:10px; min-height:270px; padding:20px; flex:1; color:var(--stage-ink); background:var(--stage-paper)}

[data-theme=graphite] .elevation-canvas {--stage-ink:#d4eee3; --stage-line:#8cbba587; --stage-paper:#1c3433e8; --stone:#a49c8c; --stone-light:#d0c8b2; --stone-shadow:#666e65; background:#32434a}
[data-theme=graphite] .elevation-canvas::before {filter:brightness(.43) saturate(.63) hue-rotate(5deg)}
[data-theme=graphite] .elevation-bay::before {filter:brightness(.78) saturate(.8)}
[data-theme=graphite] .elevation-lobby>* {filter:brightness(.83) saturate(.8)}
[data-theme=graphite] .elevation-bay:is(:hover,:focus-visible)::before {filter:brightness(.98)}
[data-theme=graphite] .elevation-status .bay-available {color:#79dbb0}
[data-theme=graphite] .elevation-status .bay-reserved {color:#efc36c}
[data-theme=graphite] .elevation-status .bay-sold {color:#f09695}

@media (max-width:830px) {
    .elevation {grid-template-columns:minmax(0,1fr)}
    .elevation-canvas {grid-row:1; border-inline:0; border-bottom:1px solid var(--line)}
    .elevation-info {display:grid; grid-template-columns:1fr 1fr; gap:18px 26px; align-items:center; padding:20px}
    .elevation-counts {padding:0; border:0}
    .elevation-status h3 {margin:0 0 3px}
    .elevation-status dl {display:flex; flex-wrap:wrap; gap:3px 12px}
    .elevation-status dl>div {gap:5px; padding:0}
    .elevation-status dt {gap:5px}
}
@media (max-width:550px) {
    .elevation-canvas {--min-bay:45px; --side-space:64px; --floor-height:48px}
    .elevation-scene-head {padding:12px 12px 0}
    .elevation-scene {padding:25px 0 24px}
    .elevation-model {left:-4px}
    .elevation-level {left:calc(100% + 7px); min-width:17px}
    .elevation-level::after {width:6px}
    .elevation-tower::before,.elevation-lobby::before {width:8px}
    .bay-plaque {padding:2px 4px; gap:3px}
    .elevation-info {grid-template-columns:1fr; gap:13px; padding:16px}
    .elevation-project, .elevation-status {display:flex; flex-wrap:wrap; align-items:center; gap:4px 10px}
    .elevation-project h2 {margin:0; font-size:1.17rem}
    .elevation-kicker {display:none}
    .elevation-counts {grid-template-columns:auto auto; justify-content:start; gap:13px}
    .elevation-counts>div {display:flex; align-items:center; gap:7px}
    .elevation-counts dd {font-size:.93rem; margin:0}
    .elevation-status dl {gap:4px 13px}
    .elevation-status h3 {font-size:.79rem; margin:0}
}

.elevation-scene-head {flex-wrap:wrap}
.elevation-scene-head .elevation-floor-select {
    display:inline-flex; align-items:center; gap:4px; padding:0 7px 0 3px; color:var(--stage-ink);
    border:1px solid var(--stage-line); border-radius:7px;
}
.elevation-floor-select select {
    width:auto; max-width:100%; min-height:31px; border:0; background:transparent;
    padding:1px 3px; color:inherit; font-size:.79rem; cursor:pointer;
}
.elevation-floor-select option {background:var(--surface); color:var(--ink)}
.elevation-toolbar {
    align-self:start; max-width:calc(100% - 40px); display:flex; align-items:center; flex-wrap:wrap;
    gap:7px 12px; padding:4px; margin:6px 20px 0; border:1px solid var(--stage-line);
    border-radius:10px; background:var(--stage-paper); box-shadow:0 2px 5px #0c1f2210;
}
.elevation-filters {display:flex; flex-wrap:wrap; align-items:center; gap:3px}
.elevation-filters button {
    display:inline-flex; gap:5px; align-items:center; justify-content:center; min-height:33px;
    border:1px solid transparent; padding:3px 8px; border-radius:6px; background:transparent;
    font-size:.78rem; line-height:1.4; font-weight:600; color:var(--stage-ink);
}
.elevation-filters button bdi {font-variant-numeric:tabular-nums; font-size:.74rem}
.elevation-filters button:hover {border-color:var(--stage-line)}
.elevation-filters button[aria-pressed=true] {background:var(--primary); color:var(--wf-on-primary, white)}
.elevation-filters button[aria-pressed=true] .bay-symbol {color:currentColor}
.elevation-toolbar .elevation-pay-toggle {
    position:relative; display:inline-flex; align-items:center; gap:6px; min-height:33px;
    padding:2px 5px; margin:0; color:var(--stage-ink); font-size:.78rem; font-weight:600; cursor:pointer;
}
.elevation-pay-toggle input {
    position:absolute; width:1px; height:1px; min-height:0; margin:0; padding:0;
    opacity:0; overflow:hidden;
}
.elevation-pay-toggle span {
    position:relative; width:28px; height:16px; border:1px solid currentColor; border-radius:14px;
    color:var(--muted); background:var(--secondary);
}
.elevation-pay-toggle span::after {
    content:""; position:absolute; inset-block-start:2px; inset-inline-start:2px; width:10px; height:10px;
    border-radius:50%; background:currentColor;
}
.elevation-pay-toggle input:checked + span {background:var(--primary); border-color:var(--primary); color:var(--wf-on-primary, white)}
.elevation-pay-toggle input:checked + span::after {inset-inline-start:auto; inset-inline-end:2px}
.elevation-pay-toggle input:focus-visible + span {outline:3px solid var(--primary); outline-offset:3px}
.elevation-readout {
    display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:3px 12px;
    background:var(--stage-paper); border-block-start:1px solid var(--stage-line);
    padding:6px 18px; color:var(--stage-ink); font-size:.76rem;
}
.elevation-readout [role=status] {font-weight:600}
.elevation-bay.is-dim::before {filter:grayscale(1) brightness(.64)}
.elevation-bay.is-dim .bay-plaque {background:#334043; border-color:#c1caca; filter:grayscale(.9)}
.elevation-bay.is-match::after {
    content:""; position:absolute; inset:1px; border:3px solid #ffcf65; border-radius:2px;
    pointer-events:none; box-shadow:inset 0 0 0 1px #362701, 0 0 0 1px #362701;
}
.elevation-bay:is(:focus-visible,:hover)::after {border-style:dashed}
.elevation-storey.is-located .elevation-level {
    color:var(--wf-on-primary, white); background:var(--primary); border-color:var(--primary);
    outline:2px solid var(--stage-paper);
}
.elevation-pay-badge {
    position:absolute; top:3px; left:50%; transform:translateX(-50%);
    min-width:25px; max-width:100%; padding:1px 3px; text-align:center; white-space:nowrap;
    color:#251d09; background:#ffe1a0; border:1px solid #533f16; border-radius:4px;
    box-shadow:0 1px 2px #0006; font:700 10px/1.35 var(--ui-font); direction:ltr;
}
.elevation-pay-badge[data-state=unknown] {
    background:#f1f2ef; color:#2d3838; border-color:#627775;
    font:600 10px/1.35 var(--ui-font); direction:rtl;
}
.elevation-pay-badge[data-state=complete] {background:#c9f6d3; color:#0b382d; border-color:#2d7962}
[data-theme=graphite] .elevation-bay.is-match::after {border-color:#a4f1d3; box-shadow:inset 0 0 0 1px #11382d, 0 0 0 1px #11382d}
[data-theme=graphite] .elevation-bay.is-dim::before {filter:grayscale(1) brightness(.5)}
@media (max-width:550px) {
    .elevation-toolbar {max-width:calc(100% - 24px); margin:7px 12px 0; gap:3px 6px}
    .elevation-filters {gap:1px}
    .elevation-filters button {padding:3px 5px}
    .elevation-readout {padding:6px 12px}
}
