/* Global Stone — Studio Ruang (showroom.html only).
 * Two environments: the gallery (3D room, dark inspector) and the drafting table
 * (paper, ink, metric grid). The stage recolours its overlay text for its backdrop. */

.st {
    --st-bg: #0b111c;
    --st-panel: #0e1522;
    --st-raise: rgba(255, 255, 255, 0.035);
    --st-line: rgba(236, 230, 220, 0.11);
    --st-text: #f2eee7;
    --st-muted: rgba(242, 238, 231, 0.58);
    --st-gold: #b8955a;
    --st-gold-2: #d9bf8c;
    --st-ease: cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
    background: var(--st-bg);
    color: var(--st-text);
}
.st *, .st *::before, .st *::after { box-sizing: border-box; }
.st [hidden] { display: none !important; }
/* :where keeps this reset at (0,0,1) so component classes always set their own colour. */
:where(.st) button { font-family: var(--sans); color: inherit; }
.st :focus-visible { outline: 2px solid var(--st-gold) !important; outline-offset: 2px; }
.st .mono { font-family: var(--mono); }
body[data-page-type="showroom"] .site-mobile-cta { display: none !important; }

/* ---------- App shell ---------- */
.st-app {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 384px;
    height: calc(100svh - var(--st-header, 72px));
    min-height: 620px;
    max-height: 1100px;
    transition: grid-template-columns 520ms var(--st-ease);
}
.st-app[data-mode="present"] { grid-template-columns: minmax(0, 1fr) 0px; }

/* ---------- Stage ---------- */
.st-stage {
    --fg: #f2eee7;
    --fg-muted: rgba(242, 238, 231, 0.62);
    --glass: rgba(12, 18, 30, 0.6);
    --glass-line: rgba(255, 255, 255, 0.1);
    --on-bg: #f2eee7;
    --on-fg: #0b111c;
    position: relative;
    min-width: 0;
    overflow: hidden;
    color: var(--fg);
    background: radial-gradient(120% 95% at 50% 38%, #1b2436 0%, #0c121d 58%, #05080f 100%);
    transition: background 700ms var(--st-ease);
}
.st-stage[data-time="day"][data-view="axo"] {
    --fg: #161b25;
    --fg-muted: rgba(22, 27, 37, 0.6);
    --glass: rgba(255, 253, 249, 0.7);
    --glass-line: rgba(22, 27, 37, 0.09);
    --on-bg: #161b25;
    --on-fg: #f5f2ec;
    background: radial-gradient(110% 90% at 50% 40%, #f6f3ee 0%, #e7e2da 55%, #d3ccc0 100%);
}
.st-stage[data-time="day"][data-view="eye"] { background: linear-gradient(#dfe6ec, #f2efe9); }
.st-stage[data-time="night"][data-view="eye"] { background: linear-gradient(#0a1220, #182335); }
.st-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; outline: none; transition: opacity 200ms var(--st-ease); }
.st-stage canvas:focus-visible { outline: 2px solid var(--st-gold); outline-offset: -2px; }
.st-stage.is-dragging canvas { cursor: grabbing; }
.st-stage.is-switching canvas, .st-stage.is-switching .st-labels { opacity: 0; }

/* Title and room switcher */
.st-top {
    position: absolute;
    inset: 0 0 auto;
    z-index: 3;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    padding: clamp(1.1rem, 2.2vw, 1.75rem) clamp(1.1rem, 2.4vw, 2rem) 2.5rem;
    pointer-events: none;
}
.st-top > * { pointer-events: auto; }
.st-stage[data-view="eye"] .st-top, .st-stage[data-time="night"] .st-top { background: linear-gradient(rgba(5, 8, 14, 0.5), rgba(5, 8, 14, 0)); }
.st .st-kicker, .site-page .st h1.st-kicker { max-width: none; margin: 0; font: 500 0.62rem/1.4 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--st-gold); }
.st-kicker span { color: var(--fg-muted); }
.st-room-name { margin: 0.4rem 0 0; font: 400 clamp(2.1rem, 3.4vw, 3.3rem)/0.95 var(--serif); letter-spacing: -0.02em; color: var(--fg); }
.st-room-dims { margin: 0.55rem 0 0; font-size: 0.68rem; letter-spacing: 0.04em; color: var(--fg-muted); }
.st-rooms { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.35rem; max-width: 34rem; }
.st-rooms button {
    min-height: 2.35rem;
    padding: 0 0.95rem;
    border: 1px solid var(--glass-line);
    border-radius: 99px;
    background: var(--glass);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    color: var(--fg);
    font: 500 0.76rem/1 var(--sans);
    cursor: pointer;
    transition: background 300ms var(--st-ease), color 300ms var(--st-ease), border-color 300ms var(--st-ease);
}
.st-rooms button:hover { border-color: var(--fg-muted); }
.st-rooms button[aria-pressed="true"] { background: var(--on-bg); border-color: var(--on-bg); color: var(--on-fg); }
.st-rooms .st-room-own { border-color: var(--st-gold); color: var(--st-gold); background: var(--glass); }
.st-stage[data-time="day"][data-view="axo"] .st-rooms .st-room-own { color: #8a6a35; }
.st-rooms .st-room-own:hover { background: var(--st-gold); color: #0b111c; }

/* Dock */
.st-dock {
    position: absolute;
    left: 50%;
    bottom: clamp(0.9rem, 2vw, 1.4rem);
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    max-width: calc(100% - 2rem);
    padding: 0.35rem;
    border: 1px solid var(--glass-line);
    border-radius: 16px;
    background: var(--glass);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
    backdrop-filter: blur(16px) saturate(1.2);
    transform: translateX(-50%);
    box-shadow: 0 18px 40px -24px rgba(5, 8, 14, 0.55);
    transition: opacity 400ms var(--st-ease), transform 500ms var(--st-ease);
}
.st-seg { display: flex; gap: 2px; padding: 2px; border-radius: 11px; }
.st-dock > * { position: relative; flex: none; }
.st-dock > * + *::before { content: ""; position: absolute; left: -0.22rem; top: 22%; bottom: 22%; width: 1px; background: var(--glass-line); }
.st-seg button, .st-tool {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 2.3rem;
    padding: 0 0.8rem;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--fg-muted);
    font: 500 0.74rem/1 var(--sans);
    white-space: nowrap;
    cursor: pointer;
    transition: background 260ms var(--st-ease), color 260ms var(--st-ease);
}
.st-seg button:hover, .st-tool:hover { color: var(--fg); }
.st-seg button[aria-pressed="true"], .st-tool[aria-pressed="true"] { background: var(--on-bg); color: var(--on-fg); }
.st-tool svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.st-tool-present { color: var(--fg); }
.st-tool[hidden] { display: none; }
.st-tool-shot b { font-weight: 500; font-size: 0.62rem; opacity: 0.7; margin-left: 0.15rem; }
/* Quiet disclosure of what is staged, bottom-left of the photograph. */
.st-staging-note { position: absolute; right: 1.4rem; bottom: 5.3rem; z-index: 2; margin: 0; max-width: 30%; text-align: right; color: var(--fg-muted); font-size: 0.56rem; letter-spacing: 0.06em; pointer-events: none; transition: opacity 400ms var(--st-ease); }
.st-stage[data-view="axo"] .st-staging-note { opacity: 0; }
.st-app[data-mode="present"] .st-staging-note { opacity: 0.85; }
.st-zoom button { width: 2.3rem; justify-content: center; padding: 0; font-size: 1rem; }
.st-short { display: none; }

.st-loading {
    position: absolute;
    left: 50%;
    top: 1.2rem;
    z-index: 4;
    margin: 0;
    padding: 0.45rem 0.8rem;
    border-radius: 99px;
    background: var(--glass);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    color: var(--fg);
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    opacity: 0;
    transform: translate(-50%, -6px);
    pointer-events: none;
    transition: opacity 260ms var(--st-ease), transform 260ms var(--st-ease);
}
.st-loading.is-on { opacity: 1; transform: translate(-50%, 0); transition-delay: 150ms; }
.st-hint { position: absolute; left: 50%; bottom: 5.3rem; transform: translateX(-50%); white-space: nowrap; z-index: 2; margin: 0; color: var(--fg-muted); font-size: 0.6rem; letter-spacing: 0.08em; transition: opacity 600ms var(--st-ease); pointer-events: none; }
.st-stage.has-dragged .st-hint { opacity: 0; }

/* Labels projected from 3D */
.st-labels { position: absolute; inset: 0; z-index: 1; pointer-events: none; transition: opacity 220ms var(--st-ease); }
.st-label { position: absolute; left: 0; top: 0; padding: 0.24rem 0.5rem; border-radius: 4px; background: rgba(10, 16, 28, 0.86); color: #e6d3ad; font-size: 0.6rem; letter-spacing: 0.04em; white-space: nowrap; }
.st-label[hidden] { display: none; }
.st-label-area { background: rgba(250, 247, 241, 0.94); color: #161b25; box-shadow: inset 2px 0 0 var(--st-gold), 0 6px 18px -10px rgba(5, 8, 14, 0.5); }
.st-label-tag { background: rgba(245, 242, 236, 0.94); color: #0b111c; }
.st-hover {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 4;
    padding: 0.35rem 0.6rem;
    border-radius: 6px;
    background: rgba(10, 16, 28, 0.88);
    color: #f2eee7;
    font-size: 0.62rem;
    letter-spacing: 0.03em;
    white-space: nowrap;
    pointer-events: none;
}

/* A/B split */
.st-split { --x: 50%; position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.st-split::before { content: ""; position: absolute; top: 0; bottom: 0; left: var(--x); width: 2px; margin-left: -1px; background: #f5f2ec; box-shadow: 0 0 0 1px rgba(10, 16, 28, 0.25), 0 0 24px rgba(10, 16, 28, 0.35); }
.st-split-handle {
    position: absolute;
    left: var(--x);
    top: 50%;
    width: 2.9rem;
    height: 2.9rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f5f2ec;
    box-shadow: 0 10px 28px -10px rgba(5, 8, 14, 0.6);
    transform: translate(-50%, -50%);
    cursor: ew-resize;
    pointer-events: auto;
    touch-action: none;
}
.st-split-handle span::before, .st-split-handle span::after { content: ""; position: absolute; top: 50%; width: 0.45rem; height: 0.45rem; border: solid #161b25; border-width: 0 0 1.5px 1.5px; }
.st-split-handle span::before { left: 0.8rem; transform: translateY(-50%) rotate(45deg); }
.st-split-handle span::after { right: 0.8rem; transform: translateY(-50%) rotate(-135deg); }
.st-split-tag {
    position: absolute;
    top: calc(50% + 2.4rem);
    left: var(--x);
    max-width: 40%;
    overflow: hidden;
    padding: 0.35rem 0.6rem;
    border-radius: 6px;
    background: rgba(10, 16, 28, 0.86);
    color: #f2eee7;
    font: 500 0.62rem/1.2 var(--mono);
    letter-spacing: 0.03em;
    text-overflow: ellipsis;
    white-space: nowrap;
    transform: translateX(calc(-100% - 0.75rem));
}
.st-split-tag.is-b { background: var(--st-gold); color: #0b111c; transform: translateX(0.75rem); }
.st-stage.is-comparing .st-hint { opacity: 0; }

/* Presentation */
.st-present { position: absolute; inset: 0; z-index: 5; display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; padding: clamp(1.1rem, 2.6vw, 2.25rem); pointer-events: none; }
.st-present > * { pointer-events: auto; animation: st-rise 700ms var(--st-ease) both; }
.st-present-card {
    width: min(26rem, 100%);
    padding: 1.4rem 1.5rem 1.3rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    background: rgba(10, 15, 25, 0.78);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    color: #f2eee7;
}
.st-present-title { margin: 0.45rem 0 1rem; font: 400 clamp(2rem, 3.2vw, 2.8rem)/1 var(--serif); letter-spacing: -0.02em; }
.st-present-list { display: grid; gap: 0.7rem; margin: 0; padding: 0; list-style: none; }
.st-present-list li { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); column-gap: 0.75rem; padding-top: 0.7rem; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.st-present-list span { grid-row: span 2; color: rgba(242, 238, 231, 0.5); font: 500 0.58rem/1.6 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; }
.st-present-list b { font-weight: 600; font-size: 0.92rem; }
.st-present-list small { color: rgba(242, 238, 231, 0.6); font-size: 0.72rem; }
.st-present-note { margin: 1rem 0 0; color: var(--st-gold-2); font-size: 0.62rem; letter-spacing: 0.04em; }
.st-present-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.5rem; animation-delay: 120ms; }
.st-present-actions .st-btn-ghost { background: rgba(10, 15, 25, 0.66); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); color: #f2eee7; }
.st-present-actions kbd { padding: 0.1rem 0.35rem; border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 4px; font: 500 0.58rem var(--mono); color: rgba(242, 238, 231, 0.6); }
.st-app[data-mode="present"] .st-top, .st-app[data-mode="present"] .st-dock, .st-app[data-mode="present"] .st-hint { opacity: 0; pointer-events: none; }
.st-app[data-mode="present"] .st-dock { transform: translate(-50%, 1rem); }
.st-app[data-mode="present"] .st-top { transition: opacity 400ms var(--st-ease); }
@keyframes st-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Phone-only controls (see the phone block below). */
.st-deck, .st-tabbar, .st-top-actions, .st-room-switch { display: none; }

/* Boot plate: the room's plan drawing itself while the 3D engine and its shaders
 * get ready, gone as soon as the first photograph is on screen. */
.st-boot { position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; justify-items: center; gap: 0.9rem; color: var(--fg-muted); pointer-events: none; transition: opacity 500ms var(--st-ease), visibility 0s 500ms; }
.st-boot svg { width: 7.5rem; height: auto; fill: none; stroke: var(--st-gold); stroke-width: 1.5; stroke-linecap: round; }
.st-boot path { stroke-dasharray: 420; stroke-dashoffset: 420; animation: st-draw 1.8s var(--st-ease) forwards; }
.st-boot .b { stroke: var(--fg-muted); stroke-width: 3; animation-delay: 0.35s; }
.st-boot .c { animation-delay: 0.55s; }
.st-boot .d { stroke-dasharray: 3 4; animation: none; stroke-dashoffset: 0; opacity: 0.6; }
.st-boot p { margin: 0; font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase; }
.st-boot p::after { content: ""; display: inline-block; width: 1.2em; text-align: left; animation: st-ellipsis 1.2s steps(4) infinite; }
@keyframes st-ellipsis { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }
.st.st-ready .st-boot { opacity: 0; visibility: hidden; }
.st:not(.st-ready) .st-labels { opacity: 0; }
.st-no-webgl .st-boot, .no-js .st-boot { display: none; }

/* Fallback */
.st-fallback { display: none; position: absolute; inset: 0; z-index: 6; padding: 2rem; place-content: center; gap: 1.25rem; text-align: center; background: #0b111c; }
.st-fallback img { width: min(28rem, 100%); margin: 0 auto; border-radius: 4px; }
.st-fallback p { max-width: 40ch; margin: 0 auto; color: var(--st-muted); line-height: 1.6; }
.st-fallback a { color: var(--st-gold-2); }
.st-no-webgl .st-fallback, .no-js .st-fallback { display: grid; }
.st-no-webgl .st-dock, .st-no-webgl .st-hint, .st-no-webgl .st-loading, .no-js .st-dock, .no-js .st-hint, .no-js .st-loading { display: none; }

/* ---------- Inspector ---------- */
.st-inspector {
    position: relative;
    z-index: 4;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    border-left: 1px solid var(--st-line);
    background: var(--st-panel);
}
.st-app[data-mode="present"] .st-inspector { visibility: hidden; transition: visibility 0s 520ms; }
.st-ins-head { padding: 1.1rem 1.1rem 0; }
.st-surfaces { display: flex; gap: 0.45rem; overflow-x: auto; padding-bottom: 0.85rem; scrollbar-width: none; scroll-snap-type: x proximity; }
.st-surfaces::-webkit-scrollbar { display: none; }
.st-surfaces { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); padding-right: 2rem; }
.st-surfaces button {
    flex: none;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 3.1rem;
    max-width: 13rem;
    padding: 0.35rem 0.85rem 0.35rem 0.35rem;
    border: 1px solid var(--st-line);
    border-radius: 12px;
    background: transparent;
    text-align: left;
    cursor: pointer;
    scroll-snap-align: start;
    transition: border-color 260ms var(--st-ease), background 260ms var(--st-ease);
}
.st-surfaces button:hover { border-color: rgba(242, 238, 231, 0.3); }
.st-surfaces button[aria-pressed="true"] { border-color: var(--st-gold); background: rgba(184, 149, 90, 0.1); }
.st-surface-chip { flex: none; width: 2.3rem; height: 2.3rem; border-radius: 8px; background: center / cover; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); }
.st-surface-text { display: grid; min-width: 0; }
.st-surface-text b { font-size: 0.78rem; font-weight: 600; }
.st-surface-text small { overflow: hidden; color: var(--st-muted); font-size: 0.66rem; text-overflow: ellipsis; white-space: nowrap; }
.st-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--st-line); }
.st-tabs button { position: relative; min-height: 2.8rem; padding: 0; border: 0; background: none; color: var(--st-muted); font: 500 0.78rem/1 var(--sans); cursor: pointer; transition: color 240ms var(--st-ease); }
.st-tabs button::after { content: ""; position: absolute; left: 18%; right: 18%; bottom: -1px; height: 2px; border-radius: 2px; background: var(--st-gold); transform: scaleX(0); transition: transform 360ms var(--st-ease); }
.st-tabs button[aria-selected="true"] { color: var(--st-text); }
.st-tabs button[aria-selected="true"]::after { transform: none; }
.st-tab-count { margin-left: 0.2rem; color: var(--st-gold-2); font-size: 0.62rem; }
.st-ins-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 1.1rem 1.1rem 1.5rem; scrollbar-width: thin; scrollbar-color: rgba(242, 238, 231, 0.18) transparent; }
.st-pane { animation: st-fade 360ms var(--st-ease); }
@keyframes st-fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.st-block { margin-top: 1.5rem; }
.st-block-label { margin: 0 0 0.65rem; color: var(--st-muted); font-size: 0.58rem; letter-spacing: 0.16em; text-transform: uppercase; }

.st-tones { display: flex; gap: 0.3rem; margin-bottom: 0.9rem; }
.st-tones button { min-height: 2rem; padding: 0 0.75rem; border: 1px solid var(--st-line); border-radius: 99px; background: none; color: var(--st-muted); font: 500 0.7rem/1 var(--sans); cursor: pointer; }
.st-tones button[aria-pressed="true"] { border-color: var(--st-text); color: var(--st-text); }
.st-slabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.85rem 0.6rem; }
.st-slab { display: grid; gap: 0.3rem; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; }
.st-slab-img { display: block; aspect-ratio: 4 / 3; border-radius: 8px; background: center / cover; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); transition: transform 360ms var(--st-ease), box-shadow 260ms var(--st-ease); }
.st-slab:hover .st-slab-img { transform: translateY(-2px); }
.st-slab[aria-pressed="true"] .st-slab-img { box-shadow: 0 0 0 2px var(--st-panel), 0 0 0 3.5px var(--st-gold); }
.st-slab-name { overflow: hidden; font-size: 0.72rem; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.st-slab[aria-pressed="true"] .st-slab-name { color: var(--st-gold-2); }
.st-slab-size { color: var(--st-muted); font-size: 0.58rem; }

.st-slabcard { margin: 1.3rem 0 0; padding: 0.9rem 0.9rem 0.85rem; border: 1px solid var(--st-line); border-radius: 14px; background: var(--st-raise); }
.st-slabcard svg { display: block; width: 100%; height: auto; }
.st-sc-dim { fill: none; stroke: var(--st-gold); stroke-width: 1; }
.st-sc-text { fill: var(--st-muted); font: 500 9px var(--mono); letter-spacing: 0.03em; }
.st-sc-fig { fill: rgba(242, 238, 231, 0.5); }
.st-sc-floor { stroke: var(--st-line); stroke-width: 1; }
.st-slabcard figcaption { display: flex; align-items: flex-end; justify-content: space-between; gap: 0.75rem; margin-top: 0.7rem; }
.st-slabcard figcaption span { display: grid; gap: 0.2rem; min-width: 0; }
.st-slabcard figcaption b { font: 400 1.35rem/1.05 var(--serif); }
.st-slabcard figcaption small { color: var(--st-muted); font: 500 0.62rem var(--mono); }
.st-slabcard figcaption a { flex: none; color: var(--st-gold-2); font-size: 0.6rem; text-underline-offset: 3px; }

.st-finish { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.4rem; }
.st-finish button { display: grid; gap: 0.2rem; min-height: 3.2rem; padding: 0.6rem 0.7rem; border: 1px solid var(--st-line); border-radius: 10px; background: none; text-align: left; font: 600 0.78rem/1.1 var(--sans); cursor: pointer; transition: background 260ms var(--st-ease), color 260ms var(--st-ease), border-color 260ms var(--st-ease); }
.st-finish button small { color: var(--st-muted); font-size: 0.64rem; font-weight: 400; }
.st-finish button:hover { border-color: rgba(242, 238, 231, 0.3); }
.st-finish button[aria-pressed="true"] { border-color: var(--st-text); background: var(--st-text); color: #0b111c; }
.st-finish button[aria-pressed="true"] small { color: rgba(11, 17, 28, 0.6); }
.st-orient { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.st-orient button { min-height: 2.75rem; align-content: center; }
.st-patterns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.45rem; }
.st-pattern { display: flex; align-items: center; gap: 0.7rem; padding: 0.7rem; border: 1px solid var(--st-line); border-radius: 12px; background: none; text-align: left; cursor: pointer; transition: border-color 260ms var(--st-ease), background 260ms var(--st-ease); }
.st-pattern svg { flex: none; width: 2.1rem; height: 2.1rem; fill: none; stroke: currentColor; stroke-width: 1.3; opacity: 0.75; }
.st-pattern span { display: grid; gap: 0.15rem; }
.st-pattern b { font-size: 0.78rem; font-weight: 600; }
.st-pattern small { color: var(--st-muted); font-size: 0.64rem; }
.st-pattern:hover { border-color: rgba(242, 238, 231, 0.3); }
.st-pattern[aria-pressed="true"] { border-color: var(--st-gold); background: rgba(184, 149, 90, 0.1); }
.st-pattern[aria-pressed="true"] svg { stroke: var(--st-gold-2); opacity: 1; }
.st-is-warehouse [data-st-layout] { display: none; }
.st-warehouse-note { display: none; }
.st-is-warehouse .st-warehouse-note { display: block; margin-top: 0; }
.st-compare-copy { margin: 0 0 0.8rem; color: var(--st-muted); font-size: 0.74rem; line-height: 1.55; }
.st-compare-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.st-compare-actions .st-btn { flex: 1 1 auto; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }

.st-summary { margin: 0; }
.st-summary > div { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr); column-gap: 0.8rem; row-gap: 0.15rem; padding: 0.85rem 0; border-bottom: 1px solid var(--st-line); }
.st-summary > div:first-child { padding-top: 0.2rem; }
.st-summary-chip { grid-row: span 2; width: 2.4rem; height: 2.4rem; border-radius: 8px; background: center / cover; }
.st-summary dt { color: var(--st-muted); font: 500 0.56rem/1.6 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; }
.st-summary dd { display: grid; gap: 0.15rem; margin: 0; font-size: 0.82rem; }
.st-summary dd b { font-weight: 600; }
.st-summary dd span { color: var(--st-muted); font-size: 0.74rem; }
.st-summary dd .mono { color: var(--st-gold-2); font-size: 0.6rem; letter-spacing: 0.02em; }
.st-total { display: grid; gap: 0.2rem; margin: 1.25rem 0 0; }
.st-total:empty { display: none; }
.st-total .mono { color: var(--st-muted); font-size: 0.58rem; letter-spacing: 0.16em; text-transform: uppercase; }
.st-total b { font: 400 2.6rem/1 var(--serif); letter-spacing: -0.02em; }
.st-total small { color: var(--st-muted); font-size: 0.74rem; }
.st-disclaimer { margin: 1.1rem 0 0; padding-left: 0.75rem; border-left: 2px solid var(--st-gold); color: var(--st-muted); font-size: 0.72rem; line-height: 1.55; }

.st-ins-foot { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.5rem; padding: 0.85rem 1.1rem; border-top: 1px solid var(--st-line); background: var(--st-panel); }
.st-ins-foot .st-consult-open { grid-column: 1 / -1; min-height: 2.9rem; }
.st-ins-foot .st-btn-gold { min-width: 0; }

/* Buttons */
.st-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.9rem;
    padding: 0 1.15rem;
    border: 1px solid transparent;
    border-radius: 99px;
    font: 600 0.8rem/1 var(--sans);
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background 260ms var(--st-ease), color 260ms var(--st-ease), border-color 260ms var(--st-ease), transform 200ms var(--st-ease);
}
.st-btn:active { transform: scale(0.98); }
/* Scoped: the site's `.site-page a { color: inherit }` would otherwise win on links. */
.st .st-btn-gold { background: var(--st-gold); color: #0b111c; }
.st .st-btn-gold:hover { background: var(--st-gold-2); }
.st-btn-line { border-color: var(--st-line); background: none; color: var(--st-text); }
.st-btn-line:hover { border-color: rgba(242, 238, 231, 0.4); }
.st-btn-ghost { background: rgba(255, 255, 255, 0.06); color: var(--st-text); }
.st-btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }
.st-btn-icon { width: 2.9rem; padding: 0; }
.st-btn-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Drafting table (plan editor) ---------- */
.st-plan {
    --pp-paper: #f3efe7;
    --pp-sheet: #fbf9f4;
    --pp-ink: #171c26;
    --pp-muted: rgba(23, 28, 38, 0.58);
    --pp-line: rgba(23, 28, 38, 0.13);
    --pp-gold: #94713a;
    position: absolute;
    inset: 0;
    z-index: 10;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--pp-paper);
    color: var(--pp-ink);
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 320ms var(--st-ease), transform 420ms var(--st-ease);
}
.st-plan.is-open { opacity: 1; transform: none; }
.st-plan :focus-visible { outline-color: var(--pp-gold) !important; }
.st-re { display: grid; grid-template-rows: auto 1fr auto; min-height: 100%; }
.st-re-bar { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 1.1rem clamp(1rem, 2.4vw, 2rem); border-bottom: 1px solid var(--pp-line); }
.st-re-kicker { margin: 0; color: var(--pp-gold); font: 500 0.6rem/1.4 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; }
.st-re-heading h2 { margin: 0.3rem 0 0; font: 400 clamp(1.45rem, 2.4vw, 2rem)/1.05 var(--serif); letter-spacing: -0.015em; color: var(--pp-ink); outline: none; }
.st-re-close { display: inline-flex; align-items: center; gap: 0.45rem; min-height: 2.6rem; padding: 0 1rem; border: 1px solid var(--pp-line); border-radius: 99px; background: var(--pp-sheet); color: var(--pp-ink); font: 500 0.78rem/1 var(--sans); cursor: pointer; }
.st-re-close:hover { border-color: var(--pp-ink); }
.st-re-workspace { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(19rem, 0.85fr); align-items: start; }
.st-re-board { position: sticky; top: 0; padding: 1.2rem clamp(1rem, 2.4vw, 2rem); border-right: 1px solid var(--pp-line); }
.st-re-board-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.6rem; }
.st-re-source { overflow: hidden; max-width: 55%; color: var(--pp-muted); font: 500 0.62rem var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.st-re-canvas { position: relative; overflow: hidden; border: 1px solid var(--pp-line); border-radius: 6px; background: var(--pp-sheet); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 20px 40px -32px rgba(23, 28, 38, 0.45); }
.st-re-canvas svg { display: block; width: 100%; height: auto; max-height: calc(100svh - var(--st-header, 72px) - 17rem); min-height: 15rem; touch-action: none; }
.st-re-grid line { stroke: rgba(23, 28, 38, 0.085); stroke-width: 1; }
.st-re-grid line.is-minor { stroke: rgba(23, 28, 38, 0.04); }
.st-re-polygon { fill: rgba(148, 113, 58, 0.1); }
.st-re-wall-line { stroke: var(--pp-ink); stroke-width: 6; stroke-linecap: square; cursor: pointer; transition: stroke 200ms; }
.st-re-wall-line:hover { stroke: #3c4558; }
.st-re-wall-line.is-selected { stroke: var(--pp-gold); stroke-width: 8; }
.st-re-wall-line:focus { outline: none; stroke: var(--pp-gold); }
.st-re-wall-label { fill: var(--pp-ink); font: 500 10px var(--mono); pointer-events: none; }
.st-re-wall-label.is-selected { fill: var(--pp-gold); }
.st-re-vertex { fill: var(--pp-sheet); stroke: var(--pp-ink); stroke-width: 2; cursor: grab; touch-action: none; transition: r 160ms; }
.st-re-vertex:hover { r: 9; }
.st-re-vertex:focus { outline: none; stroke: var(--pp-gold); stroke-width: 3; }
.st-re-opening { stroke-width: 6; stroke-linecap: butt; pointer-events: none; }
.st-re-opening.is-door { stroke: var(--pp-sheet); }
.st-re-opening.is-window { stroke: #6f9fb3; }
.st-re-dim line { stroke: var(--pp-ink); stroke-width: 0.8; }
.st-re-dim line.is-tick { stroke-width: 1.3; }
.st-re-dim text { fill: var(--pp-ink); font: 500 10px var(--mono); }
.st-re-scale rect { fill: var(--pp-ink); }
.st-re-scale rect.is-hollow { fill: none; stroke: var(--pp-ink); stroke-width: 1; }
.st-re-scale text { fill: var(--pp-muted); font: 500 9px var(--mono); }
@keyframes st-scan { from { background-position: 120% 0; } to { background-position: -20% 0; } }
.st-re-wall-edit { display: grid; grid-template-columns: auto minmax(6rem, 1fr) auto minmax(5rem, 0.8fr) auto minmax(4.5rem, 0.6fr); gap: 0.5rem; align-items: center; margin-top: 0.8rem; }
.st-re-wall-edit label { color: var(--pp-muted); font: 500 0.62rem var(--mono); letter-spacing: 0.04em; }
.st-re-status { min-height: 2.6em; margin: 0.7rem 0 0; color: var(--pp-muted); font-size: 0.76rem; line-height: 1.5; }

.st-re-controls { padding: 1.2rem clamp(1rem, 2.4vw, 2rem) 1.5rem; }
.st-re-section + .st-re-section { margin-top: 1.6rem; padding-top: 1.4rem; border-top: 1px solid var(--pp-line); }
.st-re-section h3 { display: flex; align-items: baseline; gap: 0.6rem; margin: 0 0 0.9rem; font: 400 1.3rem/1.1 var(--serif); color: var(--pp-ink); }
.st-re-section h3 span { color: var(--pp-gold); font: 500 0.6rem var(--mono); letter-spacing: 0.08em; }
.st-re-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.5rem; }
.st-re-shapes { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0; padding: 3px; border: 1px solid var(--pp-line); border-radius: 12px; background: var(--pp-sheet); }
.st-re-shapes { margin-top: 0.8rem; }
.st-re-shapes button { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 2.6rem; border: 0; border-radius: 9px; background: none; color: var(--pp-muted); font: 500 0.78rem/1 var(--sans); cursor: pointer; transition: background 240ms var(--st-ease), color 240ms var(--st-ease); }
.st-re-shapes button[aria-pressed="true"] { background: var(--pp-ink); color: var(--pp-paper); }
.st-re-shapes svg { width: 1.3rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 1.6; }
.st-re-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.55rem; margin-top: 0.85rem; }
.st-re-notch { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.st-re-opening-row label { display: grid; gap: 0.3rem; color: var(--pp-muted); font: 500 0.62rem/1.3 var(--mono); letter-spacing: 0.03em; }
.st-re-fields label { display: grid; grid-template-columns: max-content 1fr; column-gap: 0.3rem; row-gap: 0.3rem; color: var(--pp-muted); font: 500 0.62rem/1.3 var(--mono); letter-spacing: 0.03em; }
.st-re-fields label span { color: rgba(23, 28, 38, 0.35); }
.st-re-fields label input { grid-column: 1 / -1; }
.st-re input:not([type="checkbox"]), .st-re select { width: 100%; min-width: 0; min-height: 2.75rem; padding: 0.5rem 0.7rem; border: 1px solid var(--pp-line); border-radius: 8px; background: #fff; color: var(--pp-ink); font: 500 0.9rem var(--sans); transition: border-color 200ms; }
.st-re input:focus, .st-re select:focus { border-color: var(--pp-gold); outline: none; }
.st-re input::placeholder { color: rgba(23, 28, 38, 0.32); }
.st-re-help, .st-re-empty { margin: 0.75rem 0 0; color: var(--pp-muted); font-size: 0.74rem; line-height: 1.5; }
.st-re-confirm { display: flex; align-items: flex-start; gap: 0.55rem; color: var(--pp-muted); font-size: 0.74rem; line-height: 1.5; cursor: pointer; }
.st-re-confirm input { flex: none; width: 1.1rem; height: 1.1rem; margin: 0.1rem 0 0; accent-color: var(--pp-gold); }
.st-re-add { flex: none; min-height: 2.3rem; padding: 0 0.85rem; border: 1px solid var(--pp-line); border-radius: 99px; background: var(--pp-sheet); color: var(--pp-ink); font: 500 0.74rem/1 var(--sans); cursor: pointer; }
.st-re-add:hover { border-color: var(--pp-ink); }
.st-re-opening-row { display: grid; grid-template-columns: 1fr 1.2fr 0.8fr 0.8fr auto; gap: 0.4rem; align-items: end; margin-top: 0.7rem; }
.st-re-opening-row select, .st-re-opening-row input { font-size: 0.82rem !important; padding-inline: 0.5rem !important; }
.st-re-remove { width: 2.75rem; min-height: 2.75rem; border: 1px solid var(--pp-line); border-radius: 8px; background: none; color: #9c4a3f; font-size: 1.1rem; cursor: pointer; }
.st-re-confirm-row { position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; padding: 0.9rem clamp(1rem, 2.4vw, 2rem); border-top: 1px solid var(--pp-line); background: rgba(243, 239, 231, 0.94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.st-re-confirm { max-width: 40rem; color: var(--pp-ink); }
.st-re-build { display: inline-flex; flex: none; align-items: center; gap: 0.6rem; min-height: 3rem; padding: 0 1.5rem; border: 0; border-radius: 99px; background: var(--pp-ink); color: var(--pp-paper); font: 600 0.84rem/1 var(--sans); cursor: pointer; transition: background 240ms var(--st-ease), transform 200ms var(--st-ease); }
.st-re-build:not(:disabled):hover { background: var(--pp-gold); }
.st-re-build:disabled { background: rgba(23, 28, 38, 0.1); color: rgba(23, 28, 38, 0.42); cursor: not-allowed; }
.st-re-build.is-building { opacity: 0.7; }

.st-consult-open { padding: .8rem 1rem; border: 1px solid #94713a; border-radius: 99px; background: #171c26; color: #fff; cursor: pointer; width: 100%; }
.st-consult { position: fixed; z-index: 100; right: 1rem; top: 6rem; bottom: 1rem; width: min(400px, calc(100vw - 2rem)); overflow-y: auto; background: #f3efe7; color: #171c26; padding: 1.2rem; border: 1px solid #d6cdbc; border-radius: 14px; box-shadow: 0 12px 50px #171c2626; }
.st-consult[hidden] { display: none; }
.st-consult header { display: flex; justify-content: space-between; gap: 1rem; }
.st-consult h2 { font: 400 1.7rem/1.1 var(--serif); margin: .6rem 0 1rem; }
.st-consult header button { align-self: start; width: 44px; height: 44px; border: 1px solid #d6cdbc; border-radius: 50%; background: transparent; font-size: 1.5rem; cursor: pointer; }
.st-consult img { width: 100%; border-radius: 8px; }
.st-consult p, .st-consult li { font-size: .8rem; line-height: 1.5; }
.st-consult ul { padding-left: 1rem; }
.st-consult form, .st-consult label { display: grid; gap: .5rem; }
.st-consult form { gap: .8rem; }
.st-consult input, .st-consult textarea { width: 100%; padding: .7rem; border: 1px solid #b9ad99; border-radius: 6px; background: #fff; color: #171c26; font: inherit; }
.st-consult form button { min-height: 44px; background: #171c26; color: #fff; border-radius: 99px; cursor: pointer; }
.st-consult button:disabled { opacity: .55; }
.st-consult a { display: block; color: #171c26; text-decoration: underline; padding: .8rem 0; }
.st-consult small { font-size: .68rem; }
@media (max-width: 860px) { .st-consult { top: auto; bottom: 0; right: 0; width: 100%; max-height: 72dvh; border-radius: 18px 18px 0 0; padding-bottom: calc(1rem + env(safe-area-inset-bottom)); } }

/* ---------- Intake: upload, one button, land in the house ----------
 * Paper, ink and gold like the drafting table. Each step shows one panel with one
 * primary action; every technical tool waits until a result asks for it. */
.st-plan[data-view="intake"] { background: radial-gradient(120% 80% at 80% 0%, #fbf9f4 0%, var(--pp-paper) 55%, #ebe5da 100%); }
.st-in { display: grid; grid-template-rows: auto minmax(0, 1fr); min-height: 100%; }
.st-in-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; padding: 0.9rem clamp(1rem, 2.4vw, 2rem); border-bottom: 1px solid var(--pp-line); }
.st-in-back { justify-self: start; display: inline-flex; align-items: center; gap: 0.45rem; min-height: 2.5rem; padding: 0 1rem; border: 1px solid var(--pp-line); border-radius: 99px; background: var(--pp-sheet); color: var(--pp-ink); font: 500 0.76rem/1 var(--sans); cursor: pointer; transition: border-color 200ms; }
.st-in-back:hover { border-color: var(--pp-ink); }
.st-in-steps { display: flex; gap: 0.35rem; margin: 0; padding: 0; list-style: none; }
.st-in-steps li { display: flex; align-items: center; gap: 0.45rem; padding: 0.35rem 0.75rem 0.35rem 0.35rem; border-radius: 99px; color: var(--pp-muted); font: 500 0.72rem/1 var(--sans); white-space: nowrap; transition: background 300ms var(--st-ease), color 300ms var(--st-ease); }
.st-in-steps li span { display: grid; place-items: center; width: 1.45rem; height: 1.45rem; border: 1px solid var(--pp-line); border-radius: 50%; font: 500 0.58rem var(--mono); }
.st-in-steps li[aria-current="step"] { background: var(--pp-ink); color: var(--pp-paper); }
.st-in-steps li[aria-current="step"] span { border-color: rgba(243, 239, 231, 0.35); }
.st-in-steps li.is-done span { border-color: var(--pp-gold); background: var(--pp-gold); color: #fff; }
.st-in-kicker { margin: 0; overflow: hidden; color: var(--pp-gold); font: 500 0.62rem/1.4 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; text-overflow: ellipsis; white-space: nowrap; }

/* Step 1: upload */
.st-in-drop { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); grid-template-areas: "intro zone" "promise zone" "alt alt"; align-content: center; gap: 1.6rem clamp(2rem, 5vw, 4.5rem); width: 100%; max-width: 1220px; margin: 0 auto; padding: clamp(1.5rem, 4vw, 3.5rem) clamp(1rem, 4vw, 3.5rem); }
.st-in-intro { grid-area: intro; align-self: end; }
.st-in-drop:has(> [data-reselect]:not([hidden])) { grid-template-areas: "reselect reselect" "intro zone" "promise zone" "alt alt"; }
.st-in-intro h2 { margin: 0.8rem 0 0; color: var(--pp-ink); font: 400 clamp(2.5rem, 4.6vw, 4.2rem)/0.95 var(--serif); letter-spacing: -0.025em; outline: none; }
.st-in-intro h2 em { color: var(--pp-gold); }
.st-in-lede { max-width: 30rem; margin: 1.1rem 0 0; color: var(--pp-muted); font-size: 0.95rem; line-height: 1.6; }
.st-in-reselect { grid-area: reselect; margin: 0; padding: 0.85rem 1rem; border: 1px solid rgba(148, 113, 58, 0.4); border-radius: 12px; background: #f6efe2; color: var(--pp-ink); font-size: 0.84rem; line-height: 1.5; }
.st-in-zone { grid-area: zone; position: relative; display: grid; place-content: center; justify-items: center; gap: 0.45rem; min-height: 24rem; padding: 2rem; border: 1.5px dashed rgba(23, 28, 38, 0.28); border-radius: 22px; background: linear-gradient(var(--pp-sheet), #fff); text-align: center; cursor: pointer; transition: border-color 260ms var(--st-ease), transform 360ms var(--st-ease), box-shadow 360ms var(--st-ease); }
.st-in-zone:hover, .st-in.is-dragover .st-in-zone { border-color: var(--pp-gold); transform: translateY(-3px); box-shadow: 0 30px 60px -40px rgba(23, 28, 38, 0.5); }
.st-in.is-dragover .st-in-zone { border-style: solid; background: #fff; }
.st-in-zone strong { color: var(--pp-ink); font: 400 1.6rem/1.1 var(--serif); }
.st-in-zone > span:not([class]) { color: var(--pp-muted); font-size: 0.78rem; }
.st-in-zone-plan svg { width: 9rem; height: auto; margin-bottom: 0.6rem; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.st-in-zone-plan path { stroke: var(--pp-ink); stroke-width: 2.4; stroke-dasharray: 240; stroke-dashoffset: 240; animation: st-draw 1.6s var(--st-ease) forwards; }
.st-in-zone-plan .b { animation-delay: 0.25s; }
.st-in-zone-plan .c { animation-delay: 0.45s; }
.st-in-zone-plan .d { stroke: var(--pp-gold); stroke-width: 2; animation-delay: 0.9s; }
@keyframes st-draw { to { stroke-dashoffset: 0; } }
.st-in-zone-cta { margin-top: 0.9rem; padding: 0.95rem 1.8rem; border-radius: 99px; background: var(--pp-ink); color: var(--pp-paper); font: 600 0.86rem/1 var(--sans); }
.st-in-zone-note { grid-area: zone; align-self: end; justify-self: center; margin: 0 0 1rem; color: var(--pp-ink); font-size: 0.78rem; pointer-events: none; }
.st-in-zone-note:empty { display: none; }
.st-in-promise { grid-area: promise; align-self: start; display: grid; gap: 0.9rem; margin: 0; padding: 0; list-style: none; counter-reset: none; }
.st-in-promise li { display: grid; grid-template-columns: 2.1rem 1fr; column-gap: 0.4rem; color: var(--pp-muted); font-size: 0.8rem; line-height: 1.5; }
.st-in-promise i { grid-row: span 2; padding-top: 0.25rem; color: var(--pp-gold); font: 500 0.64rem/1 var(--mono); font-style: normal; letter-spacing: 0.08em; }
.st-in-promise b { color: var(--pp-ink); font: 400 1.2rem/1.2 var(--serif); }
.st-in-alt { grid-area: alt; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; padding-top: 1.2rem; border-top: 1px solid var(--pp-line); }
.st-in-alt p { margin: 0; color: var(--pp-muted); font-size: 0.78rem; line-height: 1.6; }
.st-in-alt b { color: var(--pp-ink); font-weight: 600; }
.st-in-inline { min-height: 2.25rem; padding: 0 0.15rem; border: 0; background: none; color: var(--pp-ink); font: 500 0.78rem/1 var(--sans); text-decoration: underline; text-decoration-color: var(--pp-gold); text-underline-offset: 4px; cursor: pointer; }

/* Workspace: the drawing on the left, one step's panel on the right */
.st-in-frame { display: grid; grid-template-columns: minmax(0, 1fr) minmax(20rem, 24rem); min-height: 0; }
.st-in-board { position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 0.6rem; min-height: 0; padding: 1rem clamp(1rem, 2vw, 1.6rem); }
.st-in-tools { display: flex; align-items: center; gap: 0.35rem; min-width: 0; }
.st-in-tools button { flex: none; width: 2.4rem; height: 2.4rem; border: 1px solid var(--pp-line); border-radius: 50%; background: #fff; color: var(--pp-ink); font: 500 1rem/1 var(--sans); cursor: pointer; }
.st-in-file { overflow: hidden; margin-left: auto; min-width: 0; color: var(--pp-muted); font-size: 0.64rem; text-overflow: ellipsis; white-space: nowrap; }
.st .st-in-original { flex: none; color: var(--pp-muted); font-size: 0.64rem; text-decoration: underline; text-underline-offset: 3px; }
.st-in-stage { position: relative; overflow: auto; max-height: calc(100svh - var(--st-header, 72px) - 9rem); border: 1px solid var(--pp-line); border-radius: 14px; background: #fff; box-shadow: 0 30px 60px -48px rgba(23, 28, 38, 0.55); overscroll-behavior: contain; }
.st-in-sheet { position: relative; width: calc(100% * var(--zoom, 1)); aspect-ratio: var(--ratio, 3 / 2); touch-action: pan-x pan-y; }
.st-in[data-step="frame"] .st-in-sheet { cursor: crosshair; }
.st-in-sheet canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.st-in-marquee { position: absolute; z-index: 2; border: 2px solid var(--pp-gold); border-radius: 3px; background: rgba(148, 113, 58, 0.1); box-shadow: 0 0 0 200vmax rgba(23, 28, 38, 0.32); cursor: move; touch-action: none; transition: box-shadow 300ms var(--st-ease); }
.st-in-marquee b { position: absolute; left: -2px; bottom: calc(100% + 6px); padding: 0.3rem 0.55rem; border-radius: 6px; background: var(--pp-gold); color: #fff; font: 600 0.66rem/1 var(--sans); white-space: nowrap; pointer-events: none; }
.st-in-marquee span { position: absolute; width: 22px; height: 22px; border: 2px solid var(--pp-gold); border-radius: 50%; background: #fff; touch-action: none; }
.st-in-marquee span::after { content: ""; position: absolute; inset: -10px; }
.st-in-marquee [data-handle="nw"] { left: -12px; top: -12px; cursor: nwse-resize; }
.st-in-marquee [data-handle="ne"] { right: -12px; top: -12px; cursor: nesw-resize; }
.st-in-marquee [data-handle="sw"] { left: -12px; bottom: -12px; cursor: nesw-resize; }
.st-in-marquee [data-handle="se"] { right: -12px; bottom: -12px; cursor: nwse-resize; }
.st-in-reading { position: absolute; inset: calc(1rem + 3rem) clamp(1rem, 2vw, 1.6rem) 1rem; z-index: 3; overflow: hidden; border-radius: 14px; opacity: 0; pointer-events: none; transition: opacity 400ms var(--st-ease); }
.st-in[data-step="reading"] .st-in-reading { opacity: 1; }
.st-in-scan { position: absolute; inset: 0 0 auto; height: 38%; background: linear-gradient(rgba(148, 113, 58, 0), rgba(148, 113, 58, 0.24) 85%, rgba(148, 113, 58, 0.9) 100%); animation: st-sweep 2.2s cubic-bezier(0.45, 0, 0.55, 1) infinite alternate; }
@keyframes st-sweep { from { transform: translateY(-100%); } to { transform: translateY(265%); } }

.st-in-side { display: flex; flex-direction: column; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 1.6rem clamp(1rem, 2vw, 1.8rem); border-left: 1px solid var(--pp-line); background: rgba(251, 249, 244, 0.7); }
.st-in-pane { display: flex; flex-direction: column; gap: 0.9rem; min-height: 100%; animation: st-pane-in 420ms var(--st-ease); }
@keyframes st-pane-in { from { opacity: 0; transform: translateY(6px); } }
.st-in-pane > * { flex-shrink: 0; }
.st-in-side h2 { margin: 0; color: var(--pp-ink); font: 400 2.2rem/1 var(--serif); letter-spacing: -0.02em; outline: none; }
.st-in-copy { margin: 0; color: var(--pp-muted); font-size: 0.86rem; line-height: 1.6; }
.st-in-copy:empty { display: none; }
.st-in-pages { display: flex; align-items: center; gap: 0.6rem; color: var(--pp-muted); font-size: 0.76rem; }
.st-in-pages select { min-height: 2.75rem; padding: 0 0.7rem; border: 1px solid var(--pp-line); border-radius: 8px; background: #fff; color: var(--pp-ink); font: 500 0.86rem var(--sans); }
.st-in-cta { display: grid; gap: 0.55rem; }
.st-in-narration { display: flex; align-items: center; gap: 0.6rem; min-height: 1.5em; margin: 0; color: var(--pp-ink); font: 400 1.15rem/1.35 var(--serif); }
.st-in-narration:empty { display: none; }
.st-in-narration::before { content: ""; flex: none; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--pp-gold); animation: st-pulse 1.1s ease-in-out infinite; }
@keyframes st-pulse { 50% { opacity: 0.25; transform: scale(0.7); } }
.st-in-privacy { margin: 0; color: var(--pp-muted); font-size: 0.72rem; line-height: 1.5; }
.st-in-privacy:empty { display: none; }
.st-in-go { display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem; min-height: 3.4rem; padding: 0 1.4rem; border: 0; border-radius: 99px; background: var(--pp-ink); color: var(--pp-paper); font: 600 0.92rem/1 var(--sans); cursor: pointer; transition: background 240ms var(--st-ease), transform 200ms var(--st-ease); }
.st-in-go span { color: var(--st-gold-2); }
@media (hover: hover) {
    .st-in-go:not(:disabled):hover { background: var(--pp-gold); }
    .st-in-go:not(:disabled):hover span { color: #fff; }
}
.st-in-go:not(:disabled):active { transform: scale(0.98); }
.st-in-go:disabled { background: rgba(23, 28, 38, 0.12); color: rgba(23, 28, 38, 0.45); cursor: not-allowed; }
.st-in-ghost { min-height: 2.9rem; padding: 0 1rem; border: 1px solid var(--pp-line); border-radius: 99px; background: #fff; color: var(--pp-ink); font: 500 0.82rem/1 var(--sans); cursor: pointer; }
.st-in-ghost:hover { border-color: var(--pp-ink); }
.st-in-link { align-self: center; min-height: 2.4rem; padding: 0 0.6rem; border: 0; background: none; color: var(--pp-muted); font: 500 0.76rem/1 var(--sans); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.st-in-pane > .st-in-link:first-of-type { margin-top: auto; }
.st-in-other { display: grid; gap: 0.4rem; padding-top: 0.9rem; border-top: 1px solid var(--pp-line); }
.st-in-other:empty { display: none; }
.st-in-other-label { margin: 0 0 0.15rem; color: var(--pp-muted); font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase; }
.st-in-option { display: grid; gap: 0.2rem; width: 100%; min-height: 3.3rem; padding: 0.65rem 2.2rem 0.65rem 0.9rem; border: 1px solid var(--pp-line); border-radius: 12px; background: rgba(255, 255, 255, 0.65) no-repeat right 0.9rem center / 0.5rem url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 12'%3E%3Cpath d='M1.5 1.5 6 6l-4.5 4.5' fill='none' stroke='%2394713a' stroke-width='1.6'/%3E%3C/svg%3E"); color: var(--pp-ink); text-align: left; cursor: pointer; transition: border-color 200ms, background-color 200ms; }
.st-in-option:hover { border-color: var(--pp-ink); background-color: #fff; }
.st-in-option:disabled { opacity: 0.45; cursor: not-allowed; }
.st-in-option b { font: 500 0.84rem/1.3 var(--sans); }
.st-in-option small { color: var(--pp-muted); font-size: 0.7rem; line-height: 1.4; }

/* ---------- Scale card: what the numbers are, and the one step that improves them ---------- */
.st-scale { width: min(22rem, 100%); margin-top: 0.95rem; overflow: hidden; border: 1px solid var(--glass-line); border-radius: 14px; background: var(--glass); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); color: var(--fg); box-shadow: 0 22px 44px -32px rgba(5, 8, 14, 0.65); }
.st-scale-head { display: flex; align-items: center; gap: 0.6rem; width: 100%; min-height: 2.7rem; padding: 0 0.9rem; border: 0; background: none; color: var(--fg); font: 600 0.74rem/1.2 var(--sans); text-align: left; cursor: pointer; }
.st-scale-head i { flex: none; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--st-gold); }
.st-scale[data-scale="concept"] .st-scale-head i { border: 1.5px dashed var(--fg-muted); background: none; }
.st-scale[data-scale="detected"] .st-scale-head i { box-shadow: 0 0 0 0 rgba(184, 149, 90, 0.6); animation: st-ring 1.8s ease-out infinite; }
.st-scale[data-scale="measured"] .st-scale-head i { background: #5d9a7a; }
@keyframes st-ring { to { box-shadow: 0 0 0 0.55rem rgba(184, 149, 90, 0); } }
.st-scale-head svg { flex: none; width: 12px; height: 12px; margin-left: auto; fill: none; stroke: currentColor; stroke-width: 1.6; transition: transform 300ms var(--st-ease); }
.st-scale-head[aria-expanded="false"] svg { transform: rotate(-90deg); }
.st-scale[data-open="false"] .st-scale-body { display: none; }
.st-scale-body { padding: 0 0.9rem 0.8rem; font-size: 0.76rem; line-height: 1.5; }
.st-scale-body > p { margin: 0 0 0.75rem; color: var(--fg-muted); }
.st-scale-dims b { display: block; margin-bottom: 0.25rem; color: var(--fg); font: 400 1.75rem/1 var(--serif); letter-spacing: -0.01em; }
.st-scale-dims span { font: 500 0.64rem/1.5 var(--mono); letter-spacing: 0.02em; }
.st-scale-label { display: block; margin-bottom: 0.4rem; color: var(--st-gold); font: 500 0.58rem/1.3 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; }
.st-scale-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 0.35rem; }
.st-scale-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.4rem; margin-bottom: 0.6rem; }
.st-scale-grid label { display: grid; gap: 0.25rem; color: var(--fg-muted); font: 500 0.6rem/1.2 var(--mono); }
.st-scale-grid small { opacity: 0.7; }
.st-scale input, .st-scale select { width: 100%; min-width: 0; min-height: 2.5rem; padding: 0 0.6rem; border: 1px solid var(--glass-line); border-radius: 8px; background: color-mix(in srgb, var(--on-fg) 72%, transparent); color: var(--fg); font: 500 0.86rem var(--sans); }
.st-scale select { width: auto; }
.st-scale input:focus, .st-scale select:focus { border-color: var(--st-gold); outline: none; }
.st-scale-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.st-scale-actions button, .st-scale-row button { min-height: 2.5rem; padding: 0 0.95rem; border: 1px solid var(--glass-line); border-radius: 99px; background: none; color: var(--fg); font: 600 0.74rem/1 var(--sans); cursor: pointer; transition: background 200ms, color 200ms; }
.st-scale-actions .is-primary, .st-scale-row button { border-color: transparent; background: var(--on-bg); color: var(--on-fg); }
.st-scale-actions button:hover { border-color: var(--fg-muted); }
.st-scale-actions .is-primary:hover, .st-scale-row button:hover { background: var(--st-gold); color: #0b111c; }
.st-reconstruction-note { color: var(--fg-muted); font-size: 0.76rem; line-height: 1.5; }
.st-scale-error { margin: 0.5rem 0 0; color: #c56a57; font-size: 0.72rem; }
.st-scale-error:empty { display: none; }
.st-scale-link { display: block; width: 100%; margin-top: 0.8rem; padding: 0.65rem 0 0; border: 0; border-top: 1px solid var(--glass-line); background: none; color: var(--fg-muted); font: 500 0.72rem/1 var(--sans); text-align: left; cursor: pointer; }
.st-scale-link:hover { color: var(--fg); }

.st-toast { position: absolute; left: 50%; bottom: 7rem; z-index: 4; display: flex; align-items: center; gap: 0.6rem; max-width: calc(100% - 2rem); margin: 0; padding: 0.7rem 1.1rem; border-radius: 99px; background: rgba(11, 17, 28, 0.9); color: #f2eee7; font-size: 0.8rem; opacity: 0; transform: translate(-50%, 0.6rem); transition: opacity 400ms var(--st-ease), transform 500ms var(--st-ease); pointer-events: none; }
.st-toast::before { content: ""; flex: none; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--st-gold); }
.st-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.st-total .st-btn { justify-self: start; margin-top: 0.75rem; }

@media (max-width: 860px) {
    .st-in-bar { grid-template-columns: auto 1fr; gap: 0.5rem; padding: 0.6rem 0.75rem; }
    .st-in-bar > span:last-child { display: none; }
    .st-in-steps { justify-content: flex-end; gap: 0.1rem; }
    .st-in-steps li { padding: 0.3rem; font-size: 0; }
    .st-in-steps li[aria-current="step"] { padding-right: 0.7rem; font-size: 0.7rem; }
    .st-in-back { min-height: 2.5rem; padding: 0 0.85rem; font-size: 0.74rem; white-space: nowrap; }
    .st-in-drop { grid-template-columns: 1fr; grid-template-areas: "intro" "zone" "promise" "alt"; align-content: start; gap: 1.2rem; padding: 1.3rem 1rem calc(2rem + env(safe-area-inset-bottom)); }
    .st-in-drop:has(> [data-reselect]:not([hidden])) { grid-template-areas: "reselect" "intro" "zone" "promise" "alt"; }
    .st-in-intro h2 { font-size: clamp(2.1rem, 9.6vw, 2.8rem); }
    .st-in-lede { margin-top: 0.75rem; font-size: 0.88rem; }
    .st-in-zone { min-height: 13rem; padding: 1.3rem 1rem; }
    .st-in-zone-plan svg { width: 6rem; }
    .st-in-zone strong { font-size: 1.35rem; }
    .st-in-zone-cta { width: 100%; max-width: 16rem; padding: 1.05rem 1.6rem; }
    .st-in-alt { flex-direction: column; }
    .st-in-frame { grid-template-columns: 1fr; grid-template-rows: auto auto; }
    .st-in-board { padding: 0.6rem 0.75rem 0.5rem; gap: 0.45rem; }
    .st-in-tools button { width: 2.6rem; height: 2.6rem; }
    .st-in-stage { max-height: 46svh; }
    .st-in[data-recovery] .st-in-stage { max-height: 58svh; }
    .st-in-reading { inset: calc(0.6rem + 3.05rem) 0.75rem 0.5rem; }
    .st-in-side { overflow-y: visible; padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--pp-line); border-left: 0; }
    .st-in-pane { gap: 0.75rem; min-height: 0; }
    .st-in-side h2 { font-size: 1.75rem; }
    /* The primary action stays in reach while the drawing scrolls under it. */
    .st-in-pane > .st-in-cta { position: sticky; bottom: 0; z-index: 2; margin-inline: -1rem; padding: 0.6rem 1rem calc(0.6rem + env(safe-area-inset-bottom)); background: linear-gradient(rgba(243, 239, 231, 0), var(--pp-paper) 18%); }
    .st-in-pane > .st-in-link:first-of-type { margin-top: 0; }
}

/* Whole house: an architectural model on a plinth. The canvas fills the Studio; header and
 * dock float over it and the camera frames the house in the space they leave free. */
.st-house { --hs-ink: #161b25; --hs-paper: rgba(255, 253, 249, 0.82); --hs-line: rgba(22, 27, 37, 0.1); --hs-muted: rgba(22, 27, 37, 0.58);
    position: absolute; inset: 0; z-index: 40; overflow: hidden; color: var(--hs-ink);
    background: radial-gradient(115% 85% at 56% 40%, #fdfcf9 0%, #f1ede5 42%, #ddd6c9 100%); transition: opacity 320ms ease; }
.st-house[hidden] { display: none; }
.st-house.is-leaving { opacity: 0; }
.st-house canvas { display: block; width: 100%; height: 100%; outline: none; }
.st-house canvas:focus-visible { box-shadow: inset 0 0 0 2px var(--st-gold); }
.st-house button { font-family: var(--sans); color: inherit; cursor: pointer; }
.st-house button:focus-visible { outline: 2px solid #94713a; outline-offset: 2px; }

.st-house-head { position: absolute; inset: 1rem 1.25rem auto; display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: .75rem; pointer-events: none; }
.st-house-head > button { pointer-events: auto; min-height: 44px; padding: .55rem .95rem; border-radius: 99px; font: 500 .78rem/1 var(--sans);
    background: var(--hs-paper); border: 1px solid var(--hs-line); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 8px 24px -16px rgba(40, 30, 18, .5); }
.st-house-back { justify-self: start; white-space: nowrap; }
.st-house-reset { justify-self: end; min-width: 44px; font-size: 1.05rem !important; }
.st-house-title { display: grid; justify-items: center; gap: .3rem; text-align: center; text-shadow: 0 1px 12px rgba(255, 253, 249, .9); }
.st-house-title b { font: 400 clamp(1.5rem, 2.4vw, 2.1rem)/1 var(--serif); letter-spacing: -.01em; }
.st-house-title small { font: 500 .6rem/1.45 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--hs-muted); max-width: 30rem; }

/* Room pins: projected each frame; the anchor is the dot at the foot of the stem. */
.st-house-pins { position: absolute; inset: 0; pointer-events: none; }
.st-house-pin { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: .4rem; max-width: 13rem; min-height: 30px; padding: .22rem .6rem .22rem .24rem;
    border: 1px solid var(--hs-line); border-radius: 99px; background: rgba(255, 253, 249, .92); box-shadow: 0 6px 16px -10px rgba(30, 22, 12, .55);
    pointer-events: auto; text-align: left; transition: opacity 200ms ease, background-color 200ms ease, color 200ms ease; will-change: transform; }
.st-house-pin::after { content: ""; position: absolute; left: 50%; top: 100%; width: 1px; height: 9px; background: rgba(22, 27, 37, .4); }
.st-house-pin::before { content: ""; position: absolute; left: calc(50% - 2.5px); top: calc(100% + 8px); width: 5px; height: 5px; border-radius: 50%; background: var(--hs-ink); box-shadow: 0 0 0 2px rgba(255, 253, 249, .9); }
.st-house-pin .st-house-sw { width: 22px; height: 22px; }
.st-house-pin-text { display: grid; min-width: 0; }
.st-house-pin b { font: 500 .7rem/1.15 var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-house-pin small { display: none; font: 500 .56rem/1.2 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--hs-muted); white-space: nowrap; }
.st-house-pin.is-hover small, .st-house-pin.is-selected small { display: block; }
.st-house-pin.is-hover { background: #fff; }
.st-house-pin.is-selected { background: var(--hs-ink); color: #fbf8f2; border-color: var(--hs-ink); z-index: 2; }
.st-house-pin.is-selected small { color: var(--st-gold-2); }
.st-house-pin.is-selected::before { background: var(--st-gold); }
.st-house-pin.is-off, .st-house:not(.is-revealed) .st-house-pin { opacity: 0; pointer-events: none; }
.st-house-sw { flex: none; display: block; border-radius: 50%; background: #d8d3ca center / cover; box-shadow: inset 0 0 0 1px rgba(22, 27, 37, .14); }

/* Dock: selection card + room list. Phones: a strip at the bottom. Desktop: a legend column. */
.st-house-dock { position: absolute; left: .75rem; right: .75rem; bottom: max(.75rem, env(safe-area-inset-bottom)); display: grid; gap: .5rem; max-width: 40rem; margin: 0 auto; padding: .55rem;
    border-radius: 20px; background: var(--hs-paper); border: 1px solid var(--hs-line); backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2); box-shadow: 0 16px 40px -22px rgba(40, 30, 18, .55); }
.st-house-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .7rem; padding: .1rem .1rem 0; min-width: 0; }
.st-house-card-swatch { width: 46px; height: 46px; border-radius: 13px; background: linear-gradient(135deg, #ebe6dc, #d7d0c3) center / cover; box-shadow: inset 0 0 0 1px rgba(22, 27, 37, .12); }
.st-house-card-text { display: grid; gap: .16rem; min-width: 0; }
.st-house-kicker { font: 500 .56rem/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: #94713a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-house-card strong { font: 400 1.3rem/1.05 var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-house-card-text > [data-house-hint] { font-size: .66rem; line-height: 1.35; color: var(--hs-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.st-house-go { min-height: 46px; padding: .6rem 1rem; border: 0; border-radius: 99px; background: var(--hs-ink); color: #fbf8f2 !important; font: 500 .8rem/1 var(--sans); white-space: nowrap; transition: transform 160ms ease, opacity 160ms ease; }
.st-house-go span { color: var(--st-gold-2); }
.st-house-go:disabled { opacity: .32; cursor: default; }
.st-house-go:not(:disabled):active { transform: scale(.97); }
.st-house-rooms { display: flex; gap: .35rem; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; touch-action: pan-x; margin: 0 -.15rem; padding: 0 .15rem; }
.st-house-rooms::-webkit-scrollbar { display: none; }
.st-house-rooms button { flex: none; display: flex; align-items: center; gap: .38rem; min-height: 40px; padding: .3rem .7rem .3rem .3rem; border: 1px solid var(--hs-line); border-radius: 99px; background: rgba(255, 255, 255, .55); font: 500 .72rem/1.1 var(--sans); text-align: left; }
.st-house-rooms .st-house-sw { width: 26px; height: 26px; }
.st-house-rooms button[data-designed=true] .st-house-sw, .st-house-pin[data-designed=true] .st-house-sw { box-shadow: 0 0 0 2px var(--st-gold); }
.st-house-rooms i { font: 500 .56rem/1 var(--mono); font-style: normal; color: var(--hs-muted); }
.st-house-rooms small { display: none; }
.st-house-nm { white-space: nowrap; }
.st-house-rooms button[aria-pressed=true] { background: var(--hs-ink); color: #fbf8f2; border-color: var(--hs-ink); }
.st-house-rooms button[aria-pressed=true] i { color: var(--st-gold-2); }
.st-house-foot { margin: 0; font-size: .58rem; line-height: 1.3; text-align: center; color: var(--hs-muted); }

@media (min-width: 1024px) and (min-height: 600px) {
    .st-house-dock { left: 1.25rem; right: auto; top: 5.4rem; bottom: 1.25rem; width: 18.5rem; max-width: none; margin: 0; display: flex; flex-direction: column; gap: .7rem; padding: .8rem; border-radius: 22px; }
    .st-house-rooms { order: 1; flex: 1; flex-direction: column; overflow: hidden auto; touch-action: pan-y; gap: .2rem; margin: 0; padding: 0; scrollbar-width: thin; }
    .st-house-rooms button { min-height: 46px; width: 100%; border-color: transparent; background: transparent; border-radius: 13px; padding: .35rem .5rem; display: grid; grid-template-columns: auto auto 1fr; grid-template-rows: auto auto; column-gap: .55rem; row-gap: .1rem; }
    .st-house-rooms button:not([aria-pressed=true]):hover { background: rgba(255, 255, 255, .7); }
    .st-house-rooms .st-house-sw { grid-row: span 2; width: 32px; height: 32px; border-radius: 9px; }
    .st-house-rooms i { grid-row: span 2; align-self: center; }
    .st-house-nm { overflow: hidden; text-overflow: ellipsis; }
    .st-house-rooms small { display: block; grid-column: 3; font: 500 .56rem/1.2 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--hs-muted); }
    .st-house-rooms button[aria-pressed=true] small { color: var(--st-gold-2); }
    .st-house-card { order: 2; grid-template-columns: 1fr; gap: .55rem; padding: .7rem; border-radius: 16px; background: rgba(255, 255, 255, .6); border: 1px solid var(--hs-line); }
    .st-house-card-swatch { width: 100%; height: 64px; border-radius: 10px; }
    .st-house-card[data-active=false] .st-house-card-swatch { display: none; }
    .st-house-card strong { white-space: normal; font-size: 1.45rem; }
    .st-house-card-text > [data-house-hint] { -webkit-line-clamp: 3; }
    .st-house-go { width: 100%; }
    .st-house-foot { order: 3; text-align: left; }
}
@media (max-width: 560px) {
    .st-house-head { inset: .6rem .6rem auto; gap: .4rem; }
    .st-house-card-text > [data-house-hint] { -webkit-line-clamp: 1; }
    .st-house-head > button { min-height: 40px; padding: .5rem .75rem; }
    .st-house-title b { font-size: 1.3rem; }
    .st-house-title small { font-size: .52rem; letter-spacing: .06em; max-width: 15.5rem; }
    .st-house-pin { min-height: 26px; padding: .16rem .5rem .16rem .18rem; max-width: 9.5rem; }
    .st-house-pin .st-house-sw { width: 18px; height: 18px; }
    .st-house-pin b { font-size: .64rem; }
    .st-house-card strong { font-size: 1.15rem; }
    .st-house-go { padding: .6rem .85rem; }
}
/* Contextual fixes in the Dollhouse: a quiet line on the room card, a last chip in the list. */
.st-house-meta { display: flex; align-items: center; flex-wrap: wrap; gap: .1rem .5rem; min-width: 0; margin-top: .1rem; }
.st-house-meta em { font: 500 .56rem/1.3 var(--mono); font-style: normal; letter-spacing: .08em; text-transform: uppercase; color: var(--hs-muted); }
.st-house-meta[data-check=true] em { color: #a5652c; }
.st-house-meta[data-check=true] em::before { content: ""; display: inline-block; width: .42rem; height: .42rem; margin-right: .35rem; border-radius: 50%; background: #c0803f; vertical-align: .05em; }
.st-house-fix { min-height: 32px; padding: 0 .1rem; border: 0; background: none; font: 500 .7rem/1 var(--sans); text-decoration: underline; text-decoration-color: rgba(148, 113, 58, .6); text-underline-offset: 3px; }
.st-house-meta[data-check=true] .st-house-fix { font-weight: 600; color: #94713a; }
.st-house-add { flex: none; display: flex; align-items: center; gap: .4rem; min-height: 40px; padding: .3rem .85rem .3rem .45rem; border: 1px dashed rgba(22, 27, 37, .3); border-radius: 99px; background: none; font: 500 .72rem/1.1 var(--sans); white-space: nowrap; }
.st-house-add span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: rgba(22, 27, 37, .07); color: #94713a; font-size: .85rem; }
.st-house-add:hover { border-color: var(--hs-ink); }

/* Phones: numbered stone markers; only the chosen room spells out its name. */
.st-house-pin-no { display: none; }
.st-house[data-pins=compact] .st-house-pin:not(.is-selected) { gap: 0; padding: 2px; }
.st-house[data-pins=compact] .st-house-pin:not(.is-selected) .st-house-pin-text { display: none; }
.st-house[data-pins=compact] .st-house-pin:not(.is-selected) .st-house-sw { position: relative; display: grid; place-items: center; width: 28px; height: 28px; }
.st-house[data-pins=compact] .st-house-pin:not(.is-selected) .st-house-sw::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: rgba(22, 27, 37, .38); }
.st-house[data-pins=compact] .st-house-pin:not(.is-selected) .st-house-pin-no { position: relative; z-index: 1; display: block; color: #fff; font: 600 .7rem/1 var(--sans); font-style: normal; }
.st-house[data-pins=compact] .st-house-pin:not(.is-selected)::after, .st-house[data-pins=compact] .st-house-pin:not(.is-selected)::before { display: none; }
.st-house[data-pins=compact] .st-house-pin:not(.is-selected) { box-shadow: 0 0 0 2px rgba(255, 253, 249, .95), 0 6px 14px -6px rgba(30, 22, 12, .6); }
.st-house[data-pins=compact] .st-house-pin.is-hover:not(.is-selected) .st-house-sw::after { background: rgba(148, 113, 58, .55); }
/* A generous invisible touch target around each small marker. */
.st-house[data-pins=compact] .st-house-pin > .st-house-sw::before { content: ""; position: absolute; inset: -8px; }

.st-house-entry { display: inline-flex; align-items: center; gap: .4rem; min-height: 38px; padding: .35rem .85rem .35rem .6rem; border: 1px solid rgba(217, 191, 140, .55); border-radius: 99px; color: var(--fg); background: var(--glass); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); font: 600 .72rem/1 var(--sans); cursor: pointer; transition: border-color 200ms, background 200ms; }
.st-house-entry svg { width: 16px; height: 16px; fill: none; stroke: var(--st-gold); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.st-house-entry:hover { border-color: var(--st-gold); }
.st-house-entry[hidden] { display: none; }
@media (max-width: 860px) { .st-house-entry { margin-top: .35rem; } }
@media (prefers-reduced-motion: reduce) { .st-house, .st-house-pin, .st-house-go, .st-in-pane { transition: none; animation: none; } }

/* Rooms on the drawing: a light SVG layer on the same raster/zoom sheet, shown only when
 * the customer comes back to check or correct them. */
.st-in-regions { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.st-in-regions[hidden] { display: none; }
.st-in-regions g { cursor: pointer; outline: none; }
.st-in-regions polygon { fill: rgba(40, 98, 135, 0.08); stroke: #286287; stroke-width: 2; pointer-events: auto; transition: fill 200ms; }
.st-in-regions g:hover polygon { fill: rgba(40, 98, 135, 0.16); }
.st-in-regions .is-conflict polygon { fill:rgba(190,50,35,.22);stroke:#b63223;stroke-width:4; }
.st-in-regions .is-uncertain polygon { stroke: #a5652c; stroke-dasharray: 5 4; }
.st-in-regions .is-selected polygon, .st-in-regions g:focus-visible polygon { fill: rgba(148, 113, 58, 0.24); stroke: var(--pp-gold); stroke-width: 3; stroke-dasharray: none; }
.st-in-regions .is-editing { opacity: 0; }
.st-in[data-recovery] .st-in-regions polygon { pointer-events: none; }
.st-in-regions text { fill: #fff; stroke: #171c26; stroke-width: 5; paint-order: stroke; font: 600 24px var(--sans); pointer-events: none; }
.st-in-room-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.35rem; max-height: 15rem; overflow-y: auto; overscroll-behavior: contain; }
.st-in-room-list:empty { display: none; }
/* While a boundary is being edited, the save button sits right under the drawing. */
.st-in[data-recovery] .st-in-room-list { display: none; }
.st-in-room-list button { display: flex; align-items: center; gap: 0.5rem; min-height: 2.75rem; padding: 0.45rem 0.6rem; border: 1px solid var(--pp-line); border-radius: 10px; background: #fff; color: var(--pp-ink); font: 500 0.76rem/1.3 var(--sans); text-align: left; overflow-wrap: anywhere; cursor: pointer; }
.st-in-room-list button i { flex: none; color: var(--pp-muted); font-size: 0.58rem; font-style: normal; }
.st-in-room-list button[data-check="true"]::after { content: ""; flex: none; width: 0.45rem; height: 0.45rem; margin-left: auto; border-radius: 50%; background: #c0803f; }
.st-in-room-list button[aria-pressed="true"] { border-color: var(--pp-gold); background: #ede3d0; }
.st-in-room-list button:disabled { opacity: 0.5; }
.st-in-room-actions { display: grid; gap: 0.4rem; padding: 0.75rem; border-radius: 14px; background: #ede3d0; }
.st-in-add { border-style: dashed; }

/* Contextual recovery: only vertex hit targets intercept drawing gestures. */
.st-recovery-overlay { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.st-recovery-overlay[hidden], .st-recovery[hidden] { display: none; }
.st-recovery-overlay svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.st-recovery-overlay polygon { fill: rgba(148, 113, 58, 0.2); stroke: #94713a; stroke-width: 3; vector-effect: non-scaling-stroke; }
.st-recovery-overlay button { position: absolute; transform: translate(-50%, -50%); width: 40px; height: 40px; border: 2px solid #fff; border-radius: 50%; background: #94713a; color: #fff; pointer-events: auto; touch-action: none; font: 600 13px var(--sans); box-shadow: 0 1px 6px #0004; }
.st-recovery-overlay button[aria-pressed="true"] { background: #171c26; outline: 2px solid #94713a; }
.st-recovery { display: grid; gap: 0.7rem; padding: 1rem; border: 1px solid var(--pp-line); border-radius: 14px; background: #fff; }
.st-recovery label { display: grid; gap: 0.35rem; color: var(--pp-ink); font-size: 0.85rem; }
.st-recovery input { width: 100%; min-width: 0; padding: 0.65rem; border: 1px solid var(--pp-line); border-radius: 8px; font: 16px var(--sans); }
.st-recovery-tools { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.st-recovery-tools button { min-height: 44px; padding: 0.4rem 0.75rem; border: 1px solid var(--pp-line); border-radius: 8px; background: #fff; color: var(--pp-ink); cursor: pointer; }
.st-recovery-tools button[aria-pressed="true"] { background: #171c26; color: #fff; }
[data-recovery-note] { margin: 0; color: #8b3d20; font-size: 0.85rem; }
[data-recovery-note]:empty { display: none; }
@media (max-width: 860px) {
    .st-in-room-list { max-height: 11rem; }
    .st-in-regions text { font-size: 30px; }
}

/* ---------- Notes below the app ---------- */
.st-notes { background: var(--paper); }

/* ---------- Tablet ---------- */
@media (max-width: 1180px) {
    .st-app { grid-template-columns: minmax(0, 1fr) 340px; }
    .st-rooms { max-width: 22rem; }
    .st-long { display: none; }
    .st-short { display: inline; }
    .st-zoom, .st-seg-k { display: none; }
    .st-kicker span { display: none; }
}

/* ---------- Phone: the room owns the screen ----------
 * Top: the room's name (tap to change room), presentation and consultation.
 * Bottom: one tool tray over a tab bar. The tray is a single row of controls, so the
 * room stays visible above it while the stone changes; the camera composes the room
 * in whatever space the tray leaves (studio.js insets). */
@media (max-width: 860px) {
    body[data-page-type="showroom"] .site-header-inner { min-height: 3.5rem; }
    body[data-page-type="showroom"] .site-logo img { width: 2.35rem; }
    body[data-page-type="showroom"] .site-logo strong { font-size: 1.15rem; }
    body[data-page-type="showroom"] .site-menu-button { width: 2.6rem; height: 2.6rem; }

    .st { --st-tab: calc(3.85rem + env(safe-area-inset-bottom)); --st-deck-h: 14rem; }
    .st-app { display: block; min-height: 30rem; max-height: none; }
    .st-stage { position: absolute; inset: 0; }
    .st-inspector, .st-dock, .st-hint, .st-rooms { display: none; }

    /* Top: the room, and the two things that leave the workspace. */
    .st-top { flex-direction: row; align-items: flex-start; gap: 0.75rem; padding: 0.75rem 1rem 1.75rem; }
    .st-title { flex: 1 1 auto; min-width: 0; position: relative; }
    .st-title .st-kicker { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    .st-title-main { position: relative; display: inline-grid; max-width: 100%; }
    .st-room-name { display: flex; align-items: center; gap: 0.45rem; margin: 0; font-size: 1.7rem; line-height: 1; white-space: nowrap; }
    .st-room-name::after { content: ""; flex: none; width: 0.42rem; height: 0.42rem; margin-top: -0.2rem; border: solid currentColor; border-width: 0 1.5px 1.5px 0; opacity: 0.55; transform: rotate(45deg); }
    .st-room-dims { margin-top: 0.3rem; font-size: 0.6rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .st-room-switch { display: block; position: absolute; inset: -0.5rem -0.75rem; z-index: 1; border: 0; border-radius: 14px; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
    .st-room-switch:active { background: color-mix(in srgb, var(--fg) 7%, transparent); }
    .st-top-actions { display: flex; flex: none; align-items: center; gap: 0.45rem; }
    .st-consult-pill { min-height: 2.75rem; padding: 0 1.1rem; border: 0; border-radius: 99px; background: var(--st-gold); color: #0b111c !important; font: 600 0.8rem/1 var(--sans); letter-spacing: 0.01em; box-shadow: 0 10px 24px -14px rgba(120, 90, 40, 0.9); cursor: pointer; -webkit-tap-highlight-color: transparent; }
    .st-consult-pill:active { transform: scale(0.97); }

    /* Scale card for the visitor's own room: under the title, over the room. */
    .st-title:has(> .st-scale:not([hidden])) { padding-bottom: 0; }
    .st-scale { position: absolute; left: 0; top: calc(100% + 0.6rem); z-index: 6; width: auto; max-width: calc(100vw - 2rem); margin: 0; }
    .st-scale[data-open="true"] { width: calc(100vw - 2rem); }
    .st-scale-head { min-height: 2.5rem; }
    .st-scale-dims b { font-size: 1.45rem; }

    .st-staging-note { top: 4.35rem; right: 1rem; bottom: auto; left: auto; max-width: 46%; font-size: 0.5rem; line-height: 1.5; }
    .st-app[data-mode="present"] .st-staging-note { top: 1rem; }
    .st-loading { top: 4.6rem; }
    .st-toast { bottom: calc(var(--st-deck-h) + 2.6rem); font-size: 0.74rem; }
    .st-boot { padding-bottom: calc(var(--st-deck-h) - 2rem); }

    /* Deck: the floating row (caption, camera) rides on the tray, the tray on the tabs. */
    .st-deck { display: block; position: absolute; left: 0; right: 0; bottom: var(--st-tab); z-index: 5; transform: translateY(var(--drag, 0px)); transition: transform 420ms var(--st-ease); }
    .st-deck.is-dragging { transition: none; }
    .st-deck[data-open="false"] { transform: translateY(100%); }
    .st-app[data-mode="present"] .st-deck, .st-app[data-mode="present"] .st-tabbar { transform: translateY(calc(100% + var(--st-tab))); pointer-events: none; }
    .st-app[data-mode="present"] .st-tabbar { transform: translateY(100%); }
    .st-app[data-mode="present"] .st-float { opacity: 0; visibility: hidden; }

    .st-float { position: absolute; left: 0; right: 0; bottom: 100%; display: flex; align-items: flex-end; justify-content: space-between; gap: 0.6rem; padding: 0 0.75rem 0.65rem; pointer-events: none; }
    .st-float > * { pointer-events: auto; }
    .st-caption { display: grid; gap: 0.12rem; min-width: 0; max-width: 56%; margin: 0; padding: 0.5rem 0.8rem 0.55rem; border: 1px solid var(--glass-line); border-radius: 14px; background: var(--glass); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); color: var(--fg); pointer-events: none !important; transition: opacity 300ms var(--st-ease); }
    .st-caption:empty, .st-stage.is-comparing .st-caption { opacity: 0; }
    .st-caption span { overflow: hidden; color: var(--st-gold); font-size: 0.52rem; letter-spacing: 0.14em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
    .st-stage[data-time="day"][data-view="axo"] .st-caption span { color: #8a6a35; }
    .st-caption b { overflow: hidden; font: 400 1.08rem/1.1 var(--serif); text-overflow: ellipsis; white-space: nowrap; }
    .st-caption small { overflow: hidden; color: var(--fg-muted); font-size: 0.6rem; text-overflow: ellipsis; white-space: nowrap; }
    .st-viewpill { display: flex; flex: none; align-items: center; gap: 0.4rem; }
    .st-viewpill .st-seg { padding: 3px; border: 1px solid var(--glass-line); border-radius: 99px; background: var(--glass); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
    .st-viewpill .st-seg button { min-height: 2.45rem; padding: 0 0.85rem; border-radius: 99px; font-size: 0.74rem; }
    .st-viewpill .st-tool-shot { width: 2.75rem; height: 2.75rem; min-height: 0; justify-content: center; padding: 0; border: 1px solid var(--glass-line); border-radius: 50%; background: var(--glass); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); color: var(--fg); }
    .st-viewpill .st-tool-shot svg { width: 18px; height: 18px; }
    .st-tool-shot b, .st-tool-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    .st-viewpill .st-tool-shot[hidden], .st-reset[hidden] { display: none; }

    /* Round glass buttons over the room. */
    .st-round { display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem; padding: 0; border: 1px solid var(--glass-line); border-radius: 50%; background: var(--glass); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); color: var(--fg); cursor: pointer; -webkit-tap-highlight-color: transparent; }
    .st-round svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
    .st-round:active { transform: scale(0.94); }

    /* Tray */
    .st-tray { position: relative; padding: 0.45rem 0 0.75rem; border-top: 1px solid rgba(255, 255, 255, 0.08); border-radius: 22px 22px 0 0; background: rgba(11, 17, 28, 0.95); -webkit-backdrop-filter: blur(22px) saturate(1.2); backdrop-filter: blur(22px) saturate(1.2); box-shadow: 0 -20px 44px -26px rgba(3, 6, 12, 0.65); color: var(--st-text); }
    /* Gestures: sideways pans scroll the rails, vertical swipes belong to the tray
     * (studio.js), and only the estimate scrolls vertically. Every horizontal scroller
     * needs its own pan-x: a scroller's touch-action does not inherit. */
    .st-deck, .st-deck *, .st-tabbar, .st-tabbar * { touch-action: none; }
    .st-tray .st-rail, .st-tray .st-rail *, .st-msurfaces, .st-msurfaces * { touch-action: pan-x; }
    .st-mest, .st-mest * { touch-action: pan-y; }
    .st-tray-grip { display: block; width: 2.25rem; height: 4px; margin: 0 auto 0.55rem; border-radius: 4px; background: rgba(242, 238, 231, 0.22); }
    .st-tray-head { display: flex; align-items: center; gap: 0.5rem; padding: 0 1rem 0.6rem; }
    .st-deck[data-tool="room"] .st-tray-head, .st-deck[data-tool="light"] .st-tray-head, .st-deck[data-tool="estimate"] .st-tray-head { display: none; }
    .st-msurfaces { display: flex; flex: 1 1 auto; gap: 0.4rem; min-width: 0; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); padding-right: 1.25rem; }
    .st-msurfaces::-webkit-scrollbar { display: none; }
    .st-msurfaces button { display: flex; flex: none; align-items: center; gap: 0.45rem; height: 2.5rem; padding: 0 0.85rem 0 0.3rem; border: 1px solid var(--st-line); border-radius: 99px; background: none; text-align: left; cursor: pointer; transition: border-color 220ms var(--st-ease), background 220ms var(--st-ease); }
    .st-msurfaces .st-surface-chip { width: 1.85rem; height: 1.85rem; border-radius: 50%; }
    .st-msurfaces .st-surface-text b { font-size: 0.76rem; white-space: nowrap; }
    .st-msurfaces .st-surface-text small { display: none; }
    .st-msurfaces button[aria-pressed="true"] { border-color: var(--st-gold); background: rgba(184, 149, 90, 0.14); }
    .st-mab { display: inline-flex; flex: none; align-items: center; gap: 0.35rem; height: 2.5rem; padding: 0 0.8rem; border: 1px solid var(--st-line); border-radius: 99px; background: none; font: 600 0.72rem/1 var(--sans); cursor: pointer; }
    .st-mab svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }
    .st-deck[data-tool="finish"] .st-mab, .st-deck[data-tool="finish"] .st-mcompare { display: none; }
    .st-mcompare { display: contents; }
    .st-mcompare .st-mchip { flex: 1 1 0; min-width: 0; min-height: 2.5rem; padding: 0 0.8rem; overflow: hidden; border-radius: 99px; font-size: 0.72rem; text-overflow: ellipsis; }
    .st-mcompare .st-mchip.is-b { border-color: var(--st-gold); background: var(--st-gold); color: #0b111c; }
    .st-stage.is-comparing .st-msurfaces { display: none; }

    .st-rail { display: flex; gap: 0.7rem; overflow-x: auto; overscroll-behavior-x: contain; padding: 0.15rem 1rem 0.2rem; scroll-snap-type: x proximity; scroll-padding-inline: 1rem; scrollbar-width: none; touch-action: pan-x; }
    .st-rail::-webkit-scrollbar { display: none; }

    /* Stone: one tap lays it. */
    .st-swatch { display: grid; flex: none; gap: 0.38rem; width: 4.35rem; padding: 0; border: 0; background: none; text-align: center; cursor: pointer; scroll-snap-align: start; -webkit-tap-highlight-color: transparent; }
    .st-swatch[hidden] { display: none; }
    .st-swatch-img { position: relative; display: block; width: 4.35rem; height: 4.35rem; border-radius: 15px; background: center / cover; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09); transition: transform 220ms var(--st-ease), box-shadow 220ms var(--st-ease); }
    .st-swatch:active .st-swatch-img { transform: scale(0.93); }
    .st-swatch[aria-pressed="true"] .st-swatch-img { box-shadow: 0 0 0 2px #0b111c, 0 0 0 3.5px var(--st-gold); }
    .st-swatch[aria-pressed="true"] .st-swatch-img::before { content: ""; position: absolute; right: 0.3rem; bottom: 0.3rem; width: 1.05rem; height: 1.05rem; border-radius: 50%; background: var(--st-gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 6.2 5.1 8.2 9 4' fill='none' stroke='%230b111c' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 0.75rem no-repeat; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35); }
    .st-swatch[aria-busy="true"] .st-swatch-img::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: rgba(11, 17, 28, 0.35) radial-gradient(circle at center, transparent 0.62rem, transparent 0.63rem); }
    .st-swatch[aria-busy="true"] .st-swatch-img::before { content: ""; position: absolute; left: 50%; top: 50%; z-index: 1; width: 1.3rem; height: 1.3rem; margin: -0.65rem 0 0 -0.65rem; border: 2px solid rgba(255, 255, 255, 0.3); border-top-color: #fff; border-radius: 50%; background: none; box-shadow: none; animation: st-spin 700ms linear infinite; }
    .st-swatch-name { overflow: hidden; color: var(--st-muted); font-size: 0.63rem; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
    .st-swatch[aria-pressed="true"] .st-swatch-name { color: var(--st-gold-2); }

    /* Finishing, pattern, direction: groups in one row. */
    .st-groups { align-items: flex-start; gap: 1.15rem; }
    .st-group { display: grid; flex: none; gap: 0.42rem; }
    .st-group[hidden] { display: none; }
    .st-group-label { color: var(--st-muted); font-size: 0.52rem; letter-spacing: 0.16em; text-transform: uppercase; }
    .st-group-row { display: flex; gap: 0.35rem; }
    .st-mchip { display: grid; align-content: center; gap: 0.12rem; min-height: 3.05rem; padding: 0.4rem 0.8rem; border: 1px solid var(--st-line); border-radius: 12px; background: none; font: 600 0.76rem/1.1 var(--sans); text-align: left; white-space: nowrap; cursor: pointer; transition: background 220ms var(--st-ease), color 220ms var(--st-ease), border-color 220ms var(--st-ease); }
    .st-mchip small { color: var(--st-muted); font-size: 0.6rem; font-weight: 400; }
    .st-mchip[aria-pressed="true"] { border-color: var(--st-text); background: var(--st-text); color: #0b111c; }
    .st-mchip[aria-pressed="true"] small { color: rgba(11, 17, 28, 0.6); }
    .st-mpattern { display: grid; justify-items: center; align-content: center; gap: 0.28rem; width: 3.7rem; min-height: 3.05rem; padding: 0.35rem 0; border: 1px solid var(--st-line); border-radius: 12px; background: none; color: var(--st-text); font: 500 0.62rem/1 var(--sans); cursor: pointer; transition: border-color 220ms var(--st-ease), background 220ms var(--st-ease); }
    .st-mpattern svg { width: 1.45rem; height: 1.45rem; fill: none; stroke: currentColor; stroke-width: 1.4; opacity: 0.75; }
    .st-mpattern[aria-pressed="true"] { border-color: var(--st-gold); background: rgba(184, 149, 90, 0.14); color: var(--st-gold-2); }
    .st-mpattern[aria-pressed="true"] svg { opacity: 1; }
    .st-group-note { align-self: center; max-width: 14rem; margin: 0; color: var(--st-muted); font-size: 0.7rem; line-height: 1.45; }
    .st-tray .st-warehouse-note { display: none; }
    .st-is-warehouse .st-tray .st-warehouse-note { display: block; }

    /* Rooms */
    .st-mroom { display: grid; flex: none; align-content: center; gap: 0.3rem; min-width: 7.3rem; min-height: 4.25rem; padding: 0.6rem 0.9rem; border: 1px solid var(--st-line); border-radius: 15px; background: rgba(255, 255, 255, 0.03); text-align: left; cursor: pointer; scroll-snap-align: start; transition: background 220ms var(--st-ease), color 220ms var(--st-ease); }
    .st-mroom b { font: 400 1.15rem/1 var(--serif); letter-spacing: -0.01em; white-space: nowrap; }
    .st-mroom small { color: var(--st-muted); font-size: 0.58rem; white-space: nowrap; }
    .st-mroom[aria-pressed="true"] { border-color: var(--st-text); background: var(--st-text); color: #0b111c; }
    .st-mroom[aria-pressed="true"] small { color: rgba(11, 17, 28, 0.6); }
    .st-mroom-own { border-style: dashed; border-color: rgba(184, 149, 90, 0.65); background: rgba(184, 149, 90, 0.07); }
    .st-mroom-own b { color: var(--st-gold-2); }

    /* Light */
    .st-mlight { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; padding: 0.15rem 1rem 0.2rem; }
    .st-mseg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px; padding: 3px; border: 1px solid var(--st-line); border-radius: 15px; }
    .st-mseg button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.28rem; min-height: 3.75rem; border: 0; border-radius: 12px; background: none; color: var(--st-muted); font: 600 0.74rem/1 var(--sans); cursor: pointer; transition: background 220ms var(--st-ease), color 220ms var(--st-ease); }
    .st-mseg svg { width: 1.2rem; height: 1.2rem; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
    .st-mseg small { font-size: 0.58rem; font-weight: 400; opacity: 0.8; }
    .st-mseg button[aria-pressed="true"] { background: var(--st-text); color: #0b111c; }
    .st-k { width: 0.75rem; height: 0.75rem; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18); }
    .st-k.k3 { background: #ffcf96; }
    .st-k.k4 { background: #fff3e6; }

    /* Estimate: the one tool that reads, so it may scroll. */
    .st-mest { max-height: min(44svh, 23rem); overflow-y: auto; overscroll-behavior: contain; padding: 0.1rem 1rem 0.2rem; touch-action: pan-y; }
    .st-mest .st-total { margin: 0 0 0.35rem; }
    .st-mest .st-total b { font-size: 2.1rem; }
    .st-mest .st-total .st-btn { margin-top: 0.5rem; }
    .st-mest .st-summary > div { padding: 0.6rem 0; }
    .st-mest .st-summary > div:first-child { padding-top: 0.6rem; border-top: 1px solid var(--st-line); }
    .st-mtech { display: flex; align-items: center; justify-content: space-between; gap: 1rem; width: 100%; min-height: 3.1rem; padding: 0; border: 0; border-bottom: 1px solid var(--st-line); background: none; font: 500 0.8rem/1.2 var(--sans); text-align: left; cursor: pointer; }
    .st-mtech i { position: relative; flex: none; width: 2.5rem; height: 1.45rem; border-radius: 99px; background: rgba(242, 238, 231, 0.16); transition: background 240ms var(--st-ease); }
    .st-mtech i::after { content: ""; position: absolute; left: 3px; top: 3px; width: calc(1.45rem - 6px); height: calc(1.45rem - 6px); border-radius: 50%; background: #f2eee7; transition: transform 240ms var(--st-ease); }
    .st-mtech[aria-pressed="true"] i { background: var(--st-gold); }
    .st-mtech[aria-pressed="true"] i::after { transform: translateX(1.05rem); }
    .st-mest-actions { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.5rem; margin-top: 0.75rem; }
    .st-mest-actions .st-btn { min-height: 2.9rem; }
    .st-mest-actions svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
    .st-mest .st-disclaimer { margin-bottom: 0.4rem; font-size: 0.68rem; }

    /* Tab bar */
    .st-tabbar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: absolute; left: 0; right: 0; bottom: 0; z-index: 6; height: var(--st-tab); padding-bottom: env(safe-area-inset-bottom); border-top: 1px solid rgba(255, 255, 255, 0.07); background: #0a0f19; transition: transform 420ms var(--st-ease); }
    .st-tabbar button { position: relative; display: grid; align-content: center; justify-items: center; gap: 0.3rem; min-width: 0; padding: 0; border: 0; background: none; color: rgba(242, 238, 231, 0.52); font: 500 0.63rem/1 var(--sans); letter-spacing: 0.01em; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: color 220ms var(--st-ease); }
    .st-tabbar svg { width: 1.38rem; height: 1.38rem; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: transform 260ms var(--st-ease); }
    .st-tabbar button:active svg { transform: scale(0.9); }
    .st-tabbar button[aria-pressed="true"] { color: var(--st-gold-2); }
    .st-tabbar button::before { content: ""; position: absolute; top: -1px; left: 32%; right: 32%; height: 2px; border-radius: 0 0 2px 2px; background: var(--st-gold); transform: scaleX(0); transition: transform 320ms var(--st-ease); }
    .st-tabbar button[aria-pressed="true"]::before { transform: none; }
    .st-tabbar b { position: absolute; top: 0.5rem; left: calc(50% + 0.6rem); color: var(--st-gold-2); font-size: 0.52rem; font-weight: 500; }

    /* Presentation */
    .st-present { flex-direction: column; align-items: stretch; justify-content: flex-end; gap: 0.6rem; padding: 0.75rem 0.75rem calc(0.75rem + env(safe-area-inset-bottom)); }
    .st-present-card { width: 100%; padding: 1rem 1.1rem 0.95rem; }
    .st-present-title { margin-bottom: 0.6rem; font-size: 1.8rem; }
    .st-present-list li { grid-template-columns: 5.6rem minmax(0, 1fr); padding-top: 0.45rem; }
    .st-present-list { gap: 0.45rem; }
    .st-present-actions { display: grid; grid-template-columns: 1fr 1fr; }
    .st-present-actions .st-btn-gold { grid-column: 1 / -1; order: -1; }
    .st-present-actions kbd { display: none; }

    /* Consultation sheet: above the keyboard, closable by back gesture. */
    .st-consult { bottom: var(--st-kb, 0px); max-height: calc(100dvh - var(--st-kb, 0px) - 4rem); }
    .st-consult img { max-height: 24svh; object-fit: cover; }

    /* Drafting table (plan editor) */
    .st-re-bar { flex-wrap: wrap; gap: 0.8rem; padding: 0.9rem 1rem; }
    .st-re-heading { flex: 1 1 60%; }
    .st-re-close { order: -1; min-height: 2.4rem; padding: 0 0.85rem; font-size: 0.74rem; }
    .st-re-workspace { grid-template-columns: 1fr; }
    .st-re-board { position: static; padding: 0.9rem 1rem; border-right: 0; border-bottom: 1px solid var(--pp-line); }
    .st-re-canvas svg { max-height: none; min-height: 0; }
    .st-re-wall-edit { grid-template-columns: auto 1fr auto 1fr; }
    .st-re-angle-label { grid-column: 1; }
    .st-re-controls { padding: 1rem; }
    .st-re-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .st-re-fields label:nth-child(3) { grid-column: 1 / -1; }
    .st-re-notch label:nth-child(3) { grid-column: auto; }
    .st-re-opening-row { grid-template-columns: 1fr 1fr 1fr auto; }
    .st-re-opening-row label:first-child { grid-column: 1 / 3; }
    .st-re-opening-row label:nth-child(2) { grid-column: 3 / 5; }
    .st-re-confirm-row { flex-direction: column; align-items: stretch; gap: 0.7rem; padding: 0.8rem 1rem calc(0.8rem + env(safe-area-inset-bottom)); }
    .st-re-build { justify-content: center; }
}

/* Short landscape phones: the tray stays one row, the tab bar goes slimmer. */
@media (max-width: 860px) and (max-height: 520px) {
    .st { --st-tab: calc(3.1rem + env(safe-area-inset-bottom)); }
    .st-tabbar button { grid-auto-flow: column; gap: 0.4rem; }
    .st-tray-grip { display: none; }
    .st-swatch-name { display: none; }
}

@keyframes st-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
    .st *, .st *::before, .st *::after { animation: none !important; transition-duration: 1ms !important; }
}
/* Headings receive focus only so screen readers announce the new step. */
.st-in h2[tabindex="-1"]:focus-visible { outline: none !important; }
