/* VIOS Viewer — extracted from viewer.html by REFACTOR-001 */
/* Do not edit manually. See src/viewer.html for context. */
/* Lines: 2207 (extracted from viewer.html which was 7676 lines before, 5468 after) */

    @import url('https://fonts.googleapis.com/css2?family=Josefin+Sans:wght@300;400;500;600;700&display=swap');

    /* === Nuclear text selection off === */
    *, *::before, *::after {
        -webkit-user-select: none !important;
        -webkit-touch-callout: none !important;
        -webkit-tap-highlight-color: transparent !important;
        user-select: none !important;
    }
    input, textarea, [contenteditable="true"] {
        -webkit-user-select: text !important;
        user-select: text !important;
    }

    :root {
        --vios-dark-950: #1f1b18;
        --vios-dark-900: #26211d;
        --vios-dark-850: #322b26;
        --vios-gold: #d9c5b2;
        --vios-gold-soft: rgba(217, 197, 178, 0.34);
        --vios-white-92: rgba(248, 240, 232, 0.92);
        --vios-white-74: rgba(241, 230, 218, 0.74);
        --vios-white-56: rgba(232, 220, 206, 0.56);
        --glass-bg: rgba(31, 27, 24, 0.76);
        --glass-bg-strong: rgba(31, 27, 24, 0.88);
        --glass-border: rgba(217, 197, 178, 0.22);
        --glass-shadow: 0 16px 42px rgba(8, 7, 6, 0.52);
        --panel-radius: 18px;
        --ui-sans: "Josefin Sans", "Segoe UI", Arial, sans-serif;
        --ui-serif: "Josefin Sans", "Segoe UI", Arial, sans-serif;
        --safe-top: env(safe-area-inset-top, 0px);
        --safe-right: env(safe-area-inset-right, 0px);
        --safe-bottom: env(safe-area-inset-bottom, 0px);
        --safe-left: env(safe-area-inset-left, 0px);
    }

    html,
    body {
        margin: 0;
        padding: 0;
        height: 100%;
        overflow: hidden;
        font-family: var(--ui-sans);
        background: radial-gradient(circle at 15% 15%, #312a24, #211c18 62%, #171310 100%);
        color: var(--vios-white-92);
    }

    canvas {
        display: block;
        touch-action: none;
    }

    #loadingOverlay {
        position: fixed;
        inset: 0;
        z-index: 40;
        pointer-events: auto;
        display: flex;
        align-items: center;
        justify-content: center;
        background: radial-gradient(circle at 22% 16%, rgba(62, 52, 43, 0.82), rgba(25, 21, 18, 0.95));
        opacity: 1;
        visibility: visible;
        transition: opacity 0.5s ease, visibility 0.5s ease;
        overflow: hidden;
    }

    #loadingOverlay.hidden {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }

    /* === Loading UI === hide card during intro video on ALL devices */
    #loadingOverlay.intro-active #loadingCard {
        opacity: 0;
        transition: opacity 0.4s ease;
    }
    #loadingOverlay.intro-active.show-card #loadingCard {
        opacity: 1;
    }

    #loadingMedia {
        position: absolute;
        inset: 0;
        background-size: cover;
        background-position: center;
        filter: blur(10px) saturate(1.05);
        transform: scale(1.04);
        opacity: 0.32;
        z-index: 0;
    }

    #loadingMedia::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(145deg, rgba(31, 27, 24, 0.72), rgba(31, 27, 24, 0.92));
    }

    #introVideo {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        z-index: 1;
        opacity: 1;
        pointer-events: none;
        transition: opacity 0.45s ease;
    }

    #introVideo.hidden {
        opacity: 0;
    }

    #introPlayBtn {
        position: absolute;
        left: 50%;
        bottom: 24px;
        transform: translateX(-50%);
        z-index: 3;
        border: 1px solid var(--glass-border);
        background: var(--glass-bg-strong);
        color: var(--vios-white-92);
        padding: 9px 14px;
        border-radius: 999px;
        cursor: pointer;
        font-size: 12px;
    }

    #loadingCard {
        position: relative;
        z-index: 2;
        width: min(440px, 90vw);
        padding: 18px 18px 14px;
        border-radius: 20px;
        background: var(--glass-bg-strong);
        border: 1px solid var(--glass-border);
        box-shadow: var(--glass-shadow);
        color: var(--vios-white-92);
        backdrop-filter: blur(18px) saturate(1.05);
    }

    #loadingBrand {
        font-size: 10px;
        font-weight: 500;
        letter-spacing: 0.06em;
        text-transform: none;
        font-style: italic;
        color: rgba(232, 214, 196, 0.78);
    }

    #loadingTitle {
        margin-top: 6px;
        font-size: 22px;
        font-weight: 500;
        font-family: var(--ui-serif);
        letter-spacing: 0.01em;
    }

    #loadingSubtitle {
        margin-top: 4px;
        font-size: 14px;
        font-weight: 400;
        color: var(--vios-white-74);
        letter-spacing: 0.01em;
    }
    #loadingSubtitle:empty { display: none; }

    #loadingAttributes {
        margin-top: 6px;
        font-size: 13px;
        color: var(--vios-white-74);
        letter-spacing: 0.02em;
    }
    #loadingAttributes:empty { display: none; }

    #loadingStatus {
        margin-top: 8px;
        font-size: 13px;
        color: var(--vios-white-74);
    }

    #loadingProgressWrap {
        margin-top: 12px;
        width: 100%;
        height: 8px;
        border-radius: 999px;
        background: rgba(217, 197, 178, 0.16);
        overflow: hidden;
    }

    #loadingProgressBar {
        height: 100%;
        width: 0%;
        border-radius: 999px;
        background: linear-gradient(90deg, rgba(217, 197, 178, 0.72), rgba(233, 218, 202, 0.95));
        transition: width 0.12s linear;
    }

    #loadingPercent {
        margin-top: 8px;
        font-size: 12px;
        color: var(--vios-white-74);
    }

    #loadingErrorActions {
        margin-top: 10px;
    }

    #loadingErrorActions button {
        border: 1px solid var(--glass-border);
        background: var(--glass-bg-strong);
        color: var(--vios-white-92);
        padding: 7px 10px;
        border-radius: 999px;
        cursor: pointer;
        font-size: 12px;
    }

    #overlay {
        position: fixed;
        inset: 0;
        z-index: 10;
        pointer-events: none;
        color: #f4f4f4;
    }

    .panel {
        position: fixed;
        pointer-events: auto;
        background: var(--glass-bg);
        border: 1px solid var(--glass-border);
        border-radius: var(--panel-radius);
        backdrop-filter: blur(18px) saturate(1.05);
        box-shadow: var(--glass-shadow);
    }

    #topBar {
        position: fixed;
        left: calc(14px + var(--safe-left));
        right: calc(14px + var(--safe-right));
        top: calc(12px + var(--safe-top));
        height: 56px;
        z-index: 12;
        pointer-events: none;
    }

    #chromeTopLeft,
    #chromeTopRight,
    #chromeBottomLeft,
    #chromeBottomRight {
        z-index: 13;
    }

    #chromeTopLeft {
        top: calc(12px + var(--safe-top));
        left: calc(14px + var(--safe-left));
        width: min(360px, calc(100vw - 28px - var(--safe-left) - var(--safe-right)));
        padding: 10px 14px 9px;
        pointer-events: none;
    }

    #chromeTopRight {
        top: calc(12px + var(--safe-top));
        right: calc(14px + var(--safe-right));
        max-width: calc(100vw - 28px - var(--safe-left) - var(--safe-right));
        padding: 8px;
    }

    #chromeBottomLeft {
        left: calc(14px + var(--safe-left));
        bottom: calc(16px + var(--safe-bottom));
        padding: 8px;
    }

    #chromeBottomRight {
        right: calc(14px + var(--safe-right));
        bottom: calc(16px + var(--safe-bottom));
        max-width: calc(100vw - 28px - var(--safe-left) - var(--safe-right));
        padding: 8px;
    }

    #chromeTopLeft,
    #chromeTopRight,
    #chromeBottomLeft,
    #chromeBottomRight,
    #help {
        transition: opacity 0.32s ease, filter 0.32s ease;
    }

    #overlay.viewer-idle #chromeTopLeft,
    #overlay.viewer-idle #chromeTopRight,
    #overlay.viewer-idle #chromeBottomLeft,
    #overlay.viewer-idle #help {
        opacity: 0.2;
        filter: saturate(0.8);
    }

    #overlay.viewer-idle #chromeBottomRight {
        opacity: 0.62;
        filter: saturate(0.9);
    }

    #brand {
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-width: 0;
        gap: 4px;
    }

    #propertyMetaRow {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
    }

    #brandTitle {
        font-size: 10px;
        font-weight: 500;
        letter-spacing: 0.06em;
        text-transform: none;
        font-style: italic;
        color: rgba(232, 214, 196, 0.78);
    }

    #brandSubtitle {
        margin-top: 2px;
        font-size: 18px;
        font-weight: 500;
        font-family: var(--ui-serif);
        letter-spacing: 0.01em;
        color: var(--vios-white-92);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: min(46vw, 360px);
    }

    #propertyAddress {
        font-size: 12px;
        color: rgba(233, 220, 206, 0.72);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    #propertyPrice {
        font-size: 16px;
        color: rgba(217, 197, 178, 0.96);
        font-family: var(--ui-serif);
        letter-spacing: 0.01em;
    }

    #propertyStats {
        font-size: 12px;
        color: rgba(234, 221, 206, 0.78);
        letter-spacing: 0.02em;
    }

    #rotInfo {
        margin-top: 3px;
        font-size: 10px;
        letter-spacing: 0.09em;
        text-transform: uppercase;
        color: var(--vios-white-56);
    }

    #globalActions,
    #actions,
    #spatialTools {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    #globalActions {
        justify-content: flex-end;
    }

    #actions {
        flex-wrap: nowrap;
    }

    #spatialTools {
        min-height: 34px;
    }

    #spatialSlot {
        min-height: 30px;
        padding: 0 10px;
        display: inline-flex;
        align-items: center;
        border-radius: 999px;
        border: 1px dashed rgba(217, 197, 178, 0.26);
        color: rgba(229, 212, 193, 0.56);
        font-size: 10px;
        letter-spacing: 0.1em;
        text-transform: uppercase;
    }

    #editorRibbonGroup {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding-left: 10px;
        margin-left: 2px;
        border-left: 1px solid rgba(217, 197, 178, 0.24);
    }

    #editorRibbonGroup[hidden] {
        display: none;
    }

    /* === Editor Ribbon === groups */
    #editorRibbonCreate,
    #editorRibbonUtils,
    #editorRibbonLeft {
        display: inline-flex;
        align-items: center;
        gap: 6px;
    }

    #editorRibbonCreate {
        padding: 2px;
        border-radius: 12px;
        background: rgba(217, 197, 178, 0.14);
        box-shadow: 0 0 0 1px rgba(217, 197, 178, 0.2) inset;
    }

    #editorRibbonUtils {
        padding: 2px;
        border-radius: 12px;
        background: rgba(217, 197, 178, 0.06);
    }

    #editorRibbonLeft {
        padding-right: 6px;
        margin-right: 2px;
        border-right: 1px solid rgba(217, 197, 178, 0.2);
    }

    /* === Editor Ribbon === edit-mode accent stripe */
    #topBar.edit-mode {
        border-bottom: 2px solid rgba(217, 197, 178, 0.28);
        box-shadow: 0 2px 14px rgba(217, 197, 178, 0.06);
    }

    #topBar.edit-mode #globalActions {
        flex-wrap: wrap;
        justify-content: flex-end;
        row-gap: 6px;
    }

    #topBar.edit-mode #chromeTopLeft {
        opacity: 0.88;
    }

    /* === Editor Ribbon === status strip (second row in edit mode) */
    #editorStatusStrip {
        display: none;
        width: 100%;
        padding: 4px 2px 0;
        border-top: 1px solid rgba(217, 197, 178, 0.12);
        gap: 10px;
        align-items: center;
        font-size: 10.5px;
        color: rgba(241, 230, 218, 0.54);
        letter-spacing: 0.04em;
    }

    #topBar.edit-mode #editorStatusStrip {
        display: flex;
    }

    .editorStatusChip:empty {
        display: none;
    }

    /* === Editor Ribbon === button interactions */
    #editorRibbonCreate button:hover,
    #editorRibbonUtils button:hover {
        background: rgba(217, 197, 178, 0.26);
        color: rgba(255, 248, 240, 1);
    }

    #editorRibbonCreate button:active,
    #editorRibbonUtils button:active {
        transform: scale(0.96);
    }

    #undoBtn:disabled,
    #redoBtn:disabled {
        opacity: 0.35;
        cursor: not-allowed;
    }

    #exitEditorBtn {
        border-color: rgba(217, 197, 178, 0.14);
    }

    #exitEditorBtn:hover {
        background: rgba(220, 90, 70, 0.18);
        border-color: rgba(220, 90, 70, 0.32);
        color: rgba(255, 200, 180, 0.95);
    }

    #globalActions button,
    #actions button,
    #spatialTools button,
    #modeToggle button,
    #compactMenu button,
    #settingsBody button,
    #editorPanel button {
        height: 34px;
        border: 1px solid rgba(217, 197, 178, 0.2);
        background: rgba(217, 197, 178, 0.1);
        color: var(--vios-white-92);
        padding: 0 12px;
        border-radius: 999px;
        cursor: pointer;
        font-size: 12px;
        font-weight: 500;
        transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    }

    button,
    summary,
    a {
        touch-action: manipulation;
    }

    #globalActions button:hover,
    #actions button:hover,
    #spatialTools button:hover,
    #modeToggle button:hover,
    #compactMenu button:hover,
    #settingsBody button:hover,
    #editorPanel button:hover {
        background: rgba(217, 197, 178, 0.2);
    }

    #globalActions button.active,
    #actions button.active,
    #modeToggle button.active,
    #viewsBtn.active,
    #settingsBtn.active {
        background: var(--vios-gold-soft);
        border-color: rgba(217, 197, 178, 0.6);
        color: #2a231e;
        box-shadow: 0 0 0 1px rgba(217, 197, 178, 0.26) inset;
    }

    #modeToggle {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        background: rgba(217, 197, 178, 0.08);
        border-radius: 999px;
        padding: 2px;
    }

    #modeToggle button {
        height: 30px;
        min-width: 58px;
        padding: 0 10px;
        border-radius: 999px;
        background: transparent;
        border: none;
    }

    #ctaBtn {
        background: linear-gradient(180deg, rgba(224, 205, 186, 0.94), rgba(197, 172, 149, 0.92));
        border-color: rgba(217, 197, 178, 0.56);
        color: #241f1b;
        font-weight: 600;
    }

    #ctaBtn:hover {
        transform: translateY(-1px);
        background: linear-gradient(180deg, rgba(234, 216, 200, 0.98), rgba(210, 188, 167, 0.96));
    }

    #settingsBtn,
    #helpBtn,
    #moreBtn {
        width: 34px;
        padding: 0;
        font-size: 14px;
        justify-content: center;
    }

    #moreBtn {
        display: none;
    }

    #viewsPanel {
        right: calc(14px + var(--safe-right));
        bottom: calc(64px + var(--safe-bottom));
        width: min(240px, 72vw);
        padding: 8px;
        display: flex;
        flex-direction: column;
        gap: 6px;
        z-index: 13;
    }

    /* === View Navigation Bar === */
    #viewNav {
        position: fixed;
        bottom: calc(20px + var(--safe-bottom));
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        align-items: center;
        gap: 12px;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        border-radius: 24px;
        padding: 6px 20px;
        z-index: 14;
        pointer-events: auto;
        transition: opacity 0.32s ease;
    }
    #viewNav[hidden] { display: none; }
    #viewNav .view-arrow {
        background: none;
        border: none;
        color: rgba(255, 255, 255, 0.9);
        font-size: 20px;
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        border-radius: 50%;
        flex-shrink: 0;
        transition: background 0.15s;
    }
    #viewNav .view-arrow:hover { background: rgba(255, 255, 255, 0.12); }
    #viewNav .view-arrow:active { background: rgba(255, 255, 255, 0.2); }
    #viewName {
        color: rgba(255, 255, 255, 0.92);
        font-size: 14px;
        font-weight: 500;
        min-width: 160px;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        user-select: none;
    }
    #overlay.viewer-idle #viewNav { opacity: 0.2; }

    #dpad {
        user-select: none;
        -webkit-user-select: none;
        -webkit-touch-callout: none;
    }
    .dpad-btn {
        position: relative;
        width: 44px;
        height: 44px;
        border-radius: 10px;
        background: var(--glass-bg);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        border: 1px solid var(--glass-border);
        color: white;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        user-select: none;
        -webkit-user-select: none;
        -webkit-touch-callout: none;
        touch-action: none;
        padding: 0;
    }
    .dpad-btn:active {
        background: var(--glass-bg-strong);
    }
    .dpad-arrow {
        font-size: 18px;
        line-height: 1;
    }
    .dpad-key {
        position: absolute;
        bottom: 4px;
        right: 5px;
        font-size: 9px;
        opacity: 0.55;
        color: white;
        font-family: monospace;
        line-height: 1;
        display: none;
    }

    /* === Mobile Bottom Bar === */
    #mobileBar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: transparent;
        padding: 8px 16px env(safe-area-inset-bottom, 16px);
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px;
        z-index: 5;
        transition: opacity 0.32s ease;
    }
    #mobileViewNav {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        background: var(--glass-bg);
        border: 1px solid var(--glass-border);
        border-radius: 999px;
        padding: 6px 8px;
        backdrop-filter: blur(18px) saturate(1.05);
        -webkit-backdrop-filter: blur(18px) saturate(1.05);
        box-shadow: var(--glass-shadow);
    }
    #mobileRoomName {
        text-align: center;
        color: var(--vios-white-92);
        font-size: 14px;
        font-weight: 500;
        min-width: 100px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .mobile-nav-btn {
        width: 34px;
        height: 34px;
        border-radius: 999px;
        background: transparent;
        border: none;
        color: var(--vios-white-92);
        font-size: 18px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
    }
    .mobile-nav-btn:active {
        background: rgba(255,255,255,0.1);
    }

    /* === Agent Card === */
    #agentCard {
        position: fixed;
        top: calc(80px + var(--safe-top));
        left: calc(14px + var(--safe-left));
        max-width: 280px;
        background: var(--glass-bg);
        backdrop-filter: blur(18px) saturate(1.05);
        -webkit-backdrop-filter: blur(18px) saturate(1.05);
        border: 1px solid var(--glass-border);
        border-radius: var(--panel-radius);
        box-shadow: var(--glass-shadow);
        padding: 10px 14px 12px;
        z-index: 11;
        color: var(--vios-white-92);
        display: none;
        transition: opacity 0.32s ease, filter 0.32s ease;
    }
    #agentCardInner {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 12px;
    }
    #agentPhoto img {
        width: 52px;
        height: 52px;
        border-radius: 50%;
        object-fit: cover;
    }
    #agentPhotoPlaceholder {
        width: 52px;
        height: 52px;
        border-radius: 50%;
        background: rgba(217, 197, 178, 0.15);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 22px;
    }
    #agentName {
        font-size: 14px;
        font-weight: 500;
        font-family: var(--ui-serif);
        letter-spacing: 0.01em;
        line-height: 1.3;
    }
    #agentAgency {
        font-size: 11px;
        color: rgba(233, 220, 206, 0.72);
        margin-top: 2px;
    }
    #agentRating {
        font-size: 11px;
        color: #C9A84C;
        margin-top: 2px;
    }
    #agentActions {
        display: flex;
        gap: 8px;
    }
    #agentEmailBtn, #agentCallBtn {
        flex: 1;
        height: 32px;
        border-radius: 999px;
        font-size: 12px;
        font-family: var(--ui-sans);
        font-weight: 500;
        cursor: pointer;
        border: none;
        transition: opacity 0.15s ease;
    }
    #agentEmailBtn {
        background: #C9A84C;
        color: white;
    }
    #agentCallBtn {
        background: transparent;
        color: var(--vios-white-92);
        border: 1px solid var(--glass-border);
    }
    #agentEmailBtn:active, #agentCallBtn:active {
        opacity: 0.8;
    }
    #mobileAgentBtn {
        position: fixed;
        top: 90px;
        left: 16px;
        height: 34px;
        padding: 0 16px;
        border-radius: 17px;
        background: #C9A84C;
        color: white;
        font-size: 13px;
        font-weight: 600;
        font-family: var(--ui-sans);
        border: none;
        z-index: 100;
        display: none;
        cursor: pointer;
        transition: opacity 0.32s ease;
    }
    #mobileAgentBtn:active { opacity: 0.85; }

    /* === Floor Switcher === */
    #floorSwitcher {
        position: fixed;
        z-index: 100;
        transition: opacity 0.32s ease;
    }
    #floorSwitcherBtn {
        height: 34px;
        padding: 0 14px;
        border-radius: 17px;
        background: var(--glass-bg-strong);
        backdrop-filter: blur(12px) saturate(1.05);
        -webkit-backdrop-filter: blur(12px) saturate(1.05);
        color: var(--vios-white-92);
        border: 1px solid var(--glass-border);
        font-size: 13px;
        font-family: var(--ui-sans);
        font-weight: 500;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 8px;
        white-space: nowrap;
    }
    #floorSwitcherBtn:active { opacity: 0.8; }
    #floorSwitcherArrow {
        font-size: 10px;
        opacity: 0.6;
    }
    #floorSwitcherPopup {
        position: absolute;
        top: calc(100% + 8px);
        left: 0;
        background: var(--glass-bg-strong);
        backdrop-filter: blur(18px) saturate(1.05);
        -webkit-backdrop-filter: blur(18px) saturate(1.05);
        border: 1px solid var(--glass-border);
        border-radius: 12px;
        box-shadow: var(--glass-shadow);
        overflow: hidden;
        min-width: 160px;
    }
    .floor-option {
        padding: 12px 16px;
        color: var(--vios-white-92);
        font-size: 14px;
        font-family: var(--ui-sans);
        cursor: pointer;
        border-bottom: 1px solid rgba(217, 197, 178, 0.08);
        transition: background 0.15s ease;
    }
    .floor-option:last-child { border-bottom: none; }
    .floor-option:hover { background: rgba(217, 197, 178, 0.1); }
    .floor-option.active { color: #C9A84C; }
    .floor-option-icon {
        margin-right: 8px;
        opacity: 0.7;
    }

    /* === Mobile Enquire Button (below property card) === */
    #mobileEnquireBtn {
        position: fixed;
        top: 90px;
        left: 16px;
        height: 40px;
        padding: 0 20px;
        border-radius: 20px;
        background: #C9A84C;
        color: white;
        font-size: 13px;
        font-weight: 600;
        border: none;
        z-index: 100;
        display: none;
        cursor: pointer;
        transition: opacity 0.32s ease;
    }
    #mobileEnquireBtn:active {
        opacity: 0.85;
    }

    #viewsPanel[hidden] {
        display: none;
    }

    #viewsPanel button {
        border: 1px solid rgba(217, 197, 178, 0.22);
        background: rgba(217, 197, 178, 0.11);
        color: var(--vios-white-92);
        padding: 8px 10px;
        border-radius: 12px;
        cursor: pointer;
        font-size: 12px;
        text-align: left;
    }

    /* === Hotspot Visual Redesign === */
    #hotspotInfoCard {
        left: calc(16px + var(--safe-left));
        bottom: calc(80px + var(--safe-bottom));
        right: auto;
        width: min(320px, calc(100vw - 32px - var(--safe-left) - var(--safe-right)));
        padding: 13px 14px 14px;
        z-index: 13;
        background: rgba(31, 27, 24, 0.88);
        backdrop-filter: blur(16px) saturate(1.1);
        -webkit-backdrop-filter: blur(16px) saturate(1.1);
        border: 0.5px solid rgba(217, 197, 178, 0.15);
        border-radius: 14px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
        opacity: 0;
        visibility: hidden;
        transform: translateY(8px) scale(0.97);
        /* hide: fast ease-in upward */
        transition: opacity 0.2s ease-in, transform 0.2s ease-in, visibility 0.2s ease-in;
        pointer-events: none;
    }

    #hotspotInfoCard::before {
        display: none;
    }

    #hotspotInfoCard.show {
        opacity: 1;
        visibility: visible;
        transform: translateY(0) scale(1);
        /* show: gentle float-up ease-out */
        transition: opacity 0.3s ease-out, transform 0.3s ease-out, visibility 0s;
        pointer-events: auto;
    }

    #hotspotInfoEyebrow {
        font-size: 9px;
        font-weight: 500;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        color: rgba(235, 223, 211, 0.62);
    }

    #hotspotInfoTitle {
        margin-top: 6px;
        font-size: 19px;
        font-family: var(--ui-serif);
        font-weight: 500;
        color: var(--vios-white-92);
        line-height: 1.18;
    }

    #hotspotInfoBody {
        margin-top: 8px;
        font-size: 12px;
        line-height: 1.52;
        color: rgba(238, 227, 215, 0.76);
    }

    #hotspotInfoCta {
        margin-top: 12px;
        min-height: 34px;
        border-radius: 999px;
        border: 1px solid rgba(217, 197, 178, 0.46);
        background: rgba(217, 197, 178, 0.15);
        color: var(--vios-white-92);
        font-weight: 500;
        letter-spacing: 0.02em;
        padding: 0 14px;
        cursor: pointer;
        transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
    }

    #hotspotInfoCta:hover {
        background: rgba(217, 197, 178, 0.24);
        border-color: rgba(217, 197, 178, 0.64);
        box-shadow: 0 10px 20px rgba(10, 8, 7, 0.32);
        transform: translateY(-1px);
    }

    #hotspotInfoCta:active {
        transform: translateY(0);
    }

    #hotspotInfoCta:focus-visible {
        outline: 1px solid rgba(217, 197, 178, 0.8);
        outline-offset: 2px;
    }

    #settingsBackdrop {
        position: fixed;
        inset: 0;
        background: rgba(24, 20, 17, 0.32);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s ease;
        z-index: 11;
    }

    #settingsBackdrop.open {
        opacity: 1;
        pointer-events: auto;
    }

    #settingsDrawer {
        right: calc(14px + var(--safe-right));
        top: calc(72px + var(--safe-top));
        width: min(340px, calc(100vw - 28px - var(--safe-left) - var(--safe-right)));
        max-height: calc(100vh - 90px - var(--safe-top) - var(--safe-bottom));
        padding: 12px;
        z-index: 12;
        display: flex;
        flex-direction: column;
        gap: 10px;
        opacity: 0;
        transform: translateX(24px);
        pointer-events: none;
        transition: transform 0.25s ease, opacity 0.25s ease;
    }

    #settingsDrawer.open {
        opacity: 1;
        transform: translateX(0);
        pointer-events: auto;
    }

    #settingsHeader {
        display: flex;
        align-items: center;
        justify-content: space-between;
        font-size: 14px;
        font-weight: 600;
    }

    #settingsCloseBtn {
        width: 30px;
        height: 30px;
        padding: 0;
        border-radius: 10px;
    }

    #settingsBody {
        display: flex;
        flex-direction: column;
        gap: 8px;
        overflow: auto;
        padding-right: 2px;
    }

    #homeBtn {
        justify-content: center;
        background: var(--vios-gold-soft);
        border-color: rgba(217, 197, 178, 0.56);
        color: #2a231e;
    }

    #speedWrap,
    #heightWrap,
    #fovWrap {
        display: grid;
        grid-template-columns: 66px 1fr auto;
        align-items: center;
        gap: 8px;
        font-size: 14px;
        color: var(--vios-white-92);
    }

    #qualityWrap,
    #autoWrap,
    #perfWrap {
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: center;
        gap: 8px;
        font-size: 14px;
        color: var(--vios-white-92);
    }

    #speedSlider,
    #heightSlider,
    #fovSlider {
        width: 100%;
    }

    #qualitySelect {
        width: 128px;
        height: 32px;
        background: rgba(31, 27, 24, 0.82);
        color: var(--vios-white-92);
        border: none;
        border-radius: 10px;
        padding: 3px 8px;
        font-size: 13px;
    }

    #autoPerfToggle,
    #perfModeToggle {
        accent-color: var(--vios-gold);
    }

    #fpsMeter {
        font-size: 12px;
        color: var(--vios-white-74);
        margin-top: 2px;
    }

    .sliderWrap.disabled {
        opacity: 0.45;
    }

    #compactMenu {
        top: calc(72px + var(--safe-top));
        right: calc(14px + var(--safe-right));
        width: 160px;
        padding: 8px;
        z-index: 13;
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    #compactMenu[hidden] {
        display: none;
    }

    #editorPanel {
        left: calc(14px + var(--safe-left));
        top: calc(72px + var(--safe-top));
        width: min(360px, calc(100vw - 28px - var(--safe-left) - var(--safe-right)));
        max-height: calc(100vh - 80px - var(--safe-top));
        overflow: hidden;
        padding: 12px;
        z-index: 13;
        font-size: 12px;
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    #editorPanel[hidden] {
        display: none;
    }

    #topBar.edit-mode ~ #editorPanel {
        border-top-left-radius: 10px;
        border-top-right-radius: 10px;
        border-color: rgba(217, 197, 178, 0.28);
        background: rgba(31, 27, 24, 0.86);
        box-shadow: 0 16px 34px rgba(11, 9, 7, 0.44);
    }

    #topBar.edit-mode ~ #editorPanel::before {
        content: "";
        position: absolute;
        top: 0;
        left: 10px;
        right: 10px;
        height: 8px;
        border-radius: 0 0 8px 8px;
        pointer-events: none;
        opacity: 0.78;
        background: linear-gradient(180deg, rgba(217, 197, 178, 0.3), rgba(217, 197, 178, 0));
    }

    #topBar.edit-mode ~ #editorPanel #editorBody {
        padding-top: 8px;
    }

    /* === Editor Ribbon === mode badge */
    #editorTitle {
        font-size: 10px;
        font-weight: 700;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        color: rgba(217, 197, 178, 0.95);
        background: rgba(217, 197, 178, 0.14);
        border: 1px solid rgba(217, 197, 178, 0.3);
        padding: 2px 9px;
        border-radius: 999px;
        white-space: nowrap;
    }

    #editorDirty {
        font-size: 11px;
        color: #2a231e;
        background: rgba(217, 197, 178, 0.88);
        border: 1px solid rgba(217, 197, 178, 0.52);
        padding: 2px 9px;
        border-radius: 999px;
        white-space: nowrap;
    }

    #editorRibbonCreate button {
        height: 30px;
        font-size: 12px;
        font-weight: 600;
        letter-spacing: 0.01em;
    }

    #addHotspotBtn,
    #saveViewBtn {
        background: linear-gradient(180deg, rgba(217, 197, 178, 0.38), rgba(186, 161, 137, 0.32));
        box-shadow: 0 0 0 1px rgba(217, 197, 178, 0.28) inset;
    }

    #editorBody {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        display: flex;
        flex-direction: column;
        gap: 11px;
        padding-right: 3px;
        padding-bottom: 40px;
    }
    #editorBody::-webkit-scrollbar {
        width: 4px;
    }
    #editorBody::-webkit-scrollbar-track {
        background: transparent;
    }
    #editorBody::-webkit-scrollbar-thumb {
        background: rgba(217, 197, 178, 0.2);
        border-radius: 2px;
    }

    #editorRibbonUtils #exitEditorBtn,
    #editorRibbonUtils #undoBtn,
    #editorRibbonUtils #redoBtn {
        height: 28px;
        padding: 0 9px;
        font-size: 11px;
    }

    #exitEditorBtn {
        border: 1px solid rgba(217, 197, 178, 0.24);
        background: rgba(217, 197, 178, 0.08);
        color: var(--vios-white-92);
    }

    #undoBtn,
    #redoBtn {
        border: 1px solid rgba(217, 197, 178, 0.2);
        background: rgba(217, 197, 178, 0.08);
        color: var(--vios-white-92);
    }

    #editorRibbonGroup button:disabled,
    #editorPanel button:disabled {
        opacity: 0.45;
        cursor: default;
    }

    .editorSection {
        border: 1px solid rgba(217, 197, 178, 0.16);
        border-radius: 12px;
        background: rgba(31, 27, 24, 0.44);
        overflow: hidden;
    }

    .editorSection--primary {
        border-color: rgba(217, 197, 178, 0.24);
        background: rgba(31, 27, 24, 0.52);
    }

    .editorSection--secondary {
        border-color: rgba(217, 197, 178, 0.14);
        background: rgba(31, 27, 24, 0.4);
    }

    .editorSection summary {
        list-style: none;
        cursor: pointer;
        padding: 10px 12px;
        font-size: 11px;
        font-weight: 600;
        line-height: 1.25;
        user-select: none;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        color: rgba(229, 219, 201, 0.88);
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .editorSection summary::-webkit-details-marker {
        display: none;
    }

    .editorSection summary::after {
        content: '\25BC';
        font-size: 9px;
        opacity: 0.45;
        transition: transform 0.2s;
    }

    .editorSection[open] > summary::after {
        transform: rotate(180deg);
    }

    .editorSection summary:hover {
        color: rgba(255, 255, 255, 0.95);
        background: rgba(255, 255, 255, 0.04);
    }

    .editorSectionBody {
        padding: 4px 12px 14px;
        display: flex;
        flex-direction: column;
        gap: 8px;
        max-height: 400px;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }

    #editorPanel input[type="text"],
    #editorPanel input[type="url"],
    #editorPanel input[type="tel"],
    #editorPanel input[type="email"],
    #editorPanel input[type="number"],
    #editorPanel textarea,
    #editorPanel select {
        width: 100%;
        box-sizing: border-box;
    }

    #editorExportActions {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    #editorExportActions button {
        flex: 1;
        min-width: 130px;
        height: 31px;
        font-size: 11px;
    }

    #editorMetaGrid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .editorMetaFieldContent {
        gap: 8px;
    }

    .editorMetaContentRow {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .editorMetaContentRow select {
        flex: 1;
        min-width: 0;
    }

    .editorMetaContentRow button {
        white-space: nowrap;
    }

    .editorMetaContentRowStack {
        align-items: stretch;
    }

    .editorMetaContentRowStack .editorMetaReadonly {
        flex: 1;
        min-width: 0;
    }

    .editorMetaContentRowWrap {
        flex-wrap: wrap;
        align-items: stretch;
    }

    .editorMetaContentRowWrap button {
        flex: 1;
        min-width: 132px;
        min-height: 32px;
    }

    #metaViewerUrl {
        font-family: var(--ui-sans);
    }

    #metaContentHint {
        margin: 0;
    }

    #metaPublishHint {
        margin: 0;
    }

    /* === Deploy Config === */
    #metaDeployUrls {
        display: flex;
        flex-direction: column;
        gap: 8px;
        margin-top: 4px;
    }

    #metaDeployUrls .editorMetaReadonly {
        word-break: break-all;
        font-size: 11px;
    }

    #editorSectionMetadata .editorSectionBody {
        overflow-x: hidden;
        padding-right: 8px;
    }

    .editorMetaField {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .editorMetaField label {
        font-size: 11px;
        color: rgba(229, 215, 200, 0.82);
    }

    .editorMetaField input,
    .editorMetaField textarea,
    .editorMetaField select {
        min-height: 32px;
        border: 1px solid rgba(217, 197, 178, 0.2);
        background: rgba(31, 27, 24, 0.72);
        color: var(--vios-white-92);
        border-radius: 8px;
        padding: 6px 8px;
        font-size: 11.5px;
        resize: vertical;
    }

    #agentPhotoUploadRow {
        display: flex;
        gap: 8px;
        align-items: center;
    }
    #agentPhotoUploadRow input[type="url"] {
        flex: 1;
    }
    #agentPhotoUploadBtn {
        white-space: nowrap;
        flex-shrink: 0;
        min-height: 32px;
        padding: 4px 12px;
        border: 1px solid rgba(217, 197, 178, 0.25);
        background: rgba(201, 168, 76, 0.15);
        color: #C9A84C;
        border-radius: 8px;
        font-size: 11px;
        cursor: pointer;
    }
    #agentPhotoUploadBtn:hover {
        background: rgba(201, 168, 76, 0.3);
    }
    #agentPhotoUploadBtn:disabled {
        opacity: 0.5;
        cursor: default;
    }

    /* === Property Attribute Rows === */
    .editorAttrGroup {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }
    .editorAttrRow {
        display: flex;
        align-items: center;
        gap: 6px;
        min-height: 30px;
    }
    .editorAttrIcon {
        font-size: 14px;
        width: 20px;
        text-align: center;
        flex-shrink: 0;
    }
    .editorAttrRow > label:nth-child(2) {
        font-size: 11px;
        color: rgba(229, 215, 200, 0.82);
        width: 68px;
        flex-shrink: 0;
    }
    .editorAttrRow > input[type="number"],
    .editorAttrRow > input[type="text"] {
        flex: 1;
        min-height: 28px;
        max-width: 80px;
        border: 1px solid rgba(217, 197, 178, 0.2);
        background: rgba(31, 27, 24, 0.72);
        color: var(--vios-white-92);
        border-radius: 6px;
        padding: 4px 6px;
        font-size: 11.5px;
    }
    .editorAttrToggle {
        display: flex;
        align-items: center;
        gap: 3px;
        font-size: 10px;
        color: rgba(229, 215, 200, 0.6);
        cursor: pointer;
        flex-shrink: 0;
    }
    .editorAttrToggle input[type="checkbox"] {
        width: 13px;
        height: 13px;
        accent-color: #C9A84C;
    }

    .editorMetaReadonly {
        min-height: 32px;
        display: flex;
        align-items: center;
        padding: 6px 8px;
        border-radius: 8px;
        background: rgba(31, 27, 24, 0.5);
        border: 1px solid rgba(217, 197, 178, 0.14);
        color: rgba(239, 228, 214, 0.9);
        font-size: 11.5px;
        overflow-wrap: anywhere;
    }

    #addHotspotBtn.active {
        background: rgba(217, 197, 178, 0.52);
        box-shadow: 0 0 0 1px rgba(217, 197, 178, 0.52) inset;
    }

    #editorSnapWrap {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-wrap: wrap;
        justify-content: space-between;
    }

    #editorSnapWrap label {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-size: 11px;
        color: rgba(232, 219, 204, 0.82);
    }

    #snapYValue {
        width: 90px;
        height: 31px;
        border: 1px solid rgba(217, 197, 178, 0.2);
        background: rgba(31, 27, 24, 0.74);
        color: var(--vios-white-92);
        border-radius: 8px;
        padding: 3px 8px;
        font-size: 11.5px;
    }

    .editorList {
        display: flex;
        flex-direction: column;
        gap: 8px;
        max-height: 210px;
        overflow: auto;
        padding-right: 2px;
    }

    .editorItem {
        border: 1px solid rgba(217, 197, 178, 0.16);
        border-radius: 11px;
        padding: 8px;
        display: flex;
        flex-direction: column;
        gap: 6px;
        background: rgba(31, 27, 24, 0.52);
        position: relative;
        transition: border-color 0.15s;
    }
    .editorItem[draggable="true"] { cursor: grab; }
    .editorItem.dragging { opacity: 0.4; }
    .editorItem.drag-over-above { border-top: 2px solid rgba(201, 168, 76, 0.8); }
    .editorItem.drag-over-below { border-bottom: 2px solid rgba(201, 168, 76, 0.8); }
    .editorDragGrip {
        position: absolute;
        top: 8px;
        right: 8px;
        font-size: 14px;
        color: rgba(217, 197, 178, 0.35);
        cursor: grab;
        user-select: none;
        line-height: 1;
    }

    .editorItem.selected {
        border-color: rgba(217, 197, 178, 0.68);
        box-shadow: 0 0 0 1px rgba(217, 197, 178, 0.26) inset, 0 4px 14px rgba(0, 0, 0, 0.28);
    }

    .editorItemTop {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 6px;
    }

    .editorItemTop strong {
        font-size: 11px;
        color: rgba(239, 228, 214, 0.92);
    }

    .editorItemActions {
        display: flex;
        gap: 5px;
        flex-wrap: wrap;
    }

    .editorItemActions button {
        height: 27px;
        padding: 0 8px;
        font-size: 10.5px;
        border-radius: 8px;
        border: 1px solid rgba(217, 197, 178, 0.2);
        background: rgba(217, 197, 178, 0.08);
    }

    .editorItem input,
    .editorItem select {
        height: 30px;
        border: 1px solid rgba(217, 197, 178, 0.2);
        background: rgba(31, 27, 24, 0.76);
        color: var(--vios-white-92);
        border-radius: 8px;
        padding: 3px 8px;
        font-size: 11.5px;
    }

    #editorStatus {
        font-size: 10.5px;
        color: rgba(236, 224, 210, 0.8);
        min-height: 16px;
        padding: 7px 2px 0;
        border-top: 1px solid rgba(217, 197, 178, 0.16);
    }

    #editorValidation {
        border: 1px solid rgba(217, 197, 178, 0.16);
        border-radius: 10px;
        background: rgba(31, 27, 24, 0.42);
        padding: 8px;
        display: flex;
        flex-direction: column;
        gap: 5px;
    }

    #validationSummary {
        font-size: 11.5px;
        font-weight: 600;
        color: rgba(230, 214, 197, 0.95);
    }

    #validationSummary.validationSummaryWarn {
        color: rgba(227, 203, 173, 0.96);
    }

    #validationSummary.validationSummaryError {
        color: rgba(241, 190, 166, 0.96);
    }

    .validationList {
        margin: 0;
        padding-left: 16px;
        display: flex;
        flex-direction: column;
        gap: 2px;
        font-size: 10.5px;
        line-height: 1.35;
    }

    .validationList li {
        margin: 0;
        overflow-wrap: anywhere;
    }

    #validationErrors {
        color: rgba(241, 200, 176, 0.96);
    }

    #validationWarnings {
        color: rgba(228, 207, 180, 0.96);
    }

    .editorHint {
        font-size: 10.5px;
        color: rgba(232, 219, 204, 0.72);
    }

    #selectedHotspotPos {
        font-size: 10.5px;
        color: rgba(232, 219, 204, 0.74);
        min-height: 14px;
    }

    #help {
        left: calc(14px + var(--safe-left));
        bottom: calc(66px + var(--safe-bottom));
        padding: 8px 12px;
        font-size: 12px;
        line-height: 1.35;
        max-width: min(560px, calc(100vw - 28px - var(--safe-left) - var(--safe-right)));
        opacity: 0;
        transform: translateY(8px);
        transition: opacity 0.25s ease, transform 0.25s ease;
        pointer-events: none;
    }

    #help.show {
        opacity: 1;
        transform: translateY(0);
    }

    @media (max-width: 980px) {
        #topBar {
            left: calc(8px + var(--safe-left));
            right: calc(8px + var(--safe-right));
            top: calc(8px + var(--safe-top));
            height: 52px;
        }

        #chromeTopLeft {
            left: calc(8px + var(--safe-left));
            top: calc(8px + var(--safe-top));
            width: min(300px, calc(100vw - 16px - var(--safe-left) - var(--safe-right)));
            padding: 9px 12px 8px;
        }

        #chromeTopRight {
            right: calc(8px + var(--safe-right));
            top: calc(8px + var(--safe-top));
            max-width: calc(100vw - 16px - var(--safe-left) - var(--safe-right));
        }

        #chromeBottomLeft {
            left: calc(8px + var(--safe-left));
            bottom: calc(8px + var(--safe-bottom));
        }

        #chromeBottomRight {
            right: calc(8px + var(--safe-right));
            bottom: calc(8px + var(--safe-bottom));
        }

        #brandSubtitle {
            max-width: 38vw;
        }

        #propertyAddress {
            max-width: 38vw;
        }

        #fullscreenBtn,
        #helpBtn {
            display: none;
        }

        #spatialSlot {
            display: none;
        }

        #moreBtn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        #viewsPanel {
            right: calc(8px + var(--safe-right));
            bottom: calc(58px + var(--safe-bottom));
        }

        #hotspotInfoCard {
            left: calc(12px + var(--safe-left));
            right: auto;
            bottom: calc(80px + var(--safe-bottom));
            width: min(300px, calc(100vw - 24px - var(--safe-left) - var(--safe-right)));
        }

        #compactMenu,
        #settingsDrawer {
            right: calc(8px + var(--safe-right));
            top: calc(64px + var(--safe-top));
        }

        #editorPanel {
            left: calc(8px + var(--safe-left));
            top: calc(64px + var(--safe-top));
            width: min(360px, calc(100vw - 16px - var(--safe-left) - var(--safe-right)));
        }

        #help {
            left: calc(8px + var(--safe-left));
            bottom: calc(54px + var(--safe-bottom));
            max-width: min(560px, calc(100vw - 16px - var(--safe-left) - var(--safe-right)));
        }

        #topBar.edit-mode #globalActions {
            width: 100%;
        }

        #topBar.edit-mode #editorRibbonGroup {
            width: 100%;
            order: 99;
            margin-left: 0;
            padding-left: 0;
            padding-top: 6px;
            border-left: none;
            border-top: 1px solid rgba(217, 197, 178, 0.24);
            justify-content: space-between;
            flex-wrap: wrap;
        }
    }

    @media (max-width: 1120px) and (min-width: 981px) {
        #topBar {
            left: calc(10px + var(--safe-left));
            right: calc(10px + var(--safe-right));
            top: calc(10px + var(--safe-top));
        }

        #chromeTopLeft {
            left: calc(10px + var(--safe-left));
            top: calc(10px + var(--safe-top));
            width: min(320px, calc(100vw - 20px - var(--safe-left) - var(--safe-right)));
            padding: 9px 12px 8px;
        }

        #brandTitle {
            font-size: 9px;
            letter-spacing: 0.05em;
        }

        #brandSubtitle {
            font-size: 16px;
            max-width: min(34vw, 300px);
        }

        #propertyAddress {
            max-width: min(34vw, 300px);
        }

        #propertyPrice {
            font-size: 15px;
        }

        #chromeTopRight {
            right: calc(10px + var(--safe-right));
            top: calc(10px + var(--safe-top));
            padding: 7px;
        }

        #chromeBottomLeft {
            left: calc(10px + var(--safe-left));
            bottom: calc(10px + var(--safe-bottom));
        }

        #chromeBottomRight {
            right: calc(10px + var(--safe-right));
            bottom: calc(10px + var(--safe-bottom));
        }

        #fullscreenBtn,
        #helpBtn {
            display: none;
        }

        #moreBtn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        #viewsPanel {
            right: calc(10px + var(--safe-right));
            bottom: calc(62px + var(--safe-bottom));
        }

        #compactMenu,
        #settingsDrawer {
            right: calc(10px + var(--safe-right));
            top: calc(66px + var(--safe-top));
        }

        #hotspotInfoCard {
            left: calc(12px + var(--safe-left));
            right: auto;
            bottom: calc(80px + var(--safe-bottom));
            width: min(296px, calc(100vw - 24px - var(--safe-left) - var(--safe-right)));
            padding: 12px 13px 13px;
        }

        #hotspotInfoTitle {
            font-size: 18px;
        }
    }

    @media (max-width: 820px) {
        #brandSubtitle {
            max-width: 48vw;
        }

        #propertyAddress {
            max-width: 48vw;
            font-size: 11px;
        }

        #propertyStats {
            font-size: 11px;
        }

        #rotInfo {
            display: none;
        }

        #hotspotInfoCard {
            width: min(276px, calc(100vw - 24px - var(--safe-left) - var(--safe-right)));
        }

        #hotspotInfoBody {
            display: -webkit-box;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 2;
            overflow: hidden;
        }
    }

    @media (max-width: 680px) {
        #actions {
            width: min(320px, calc(100vw - 16px - var(--safe-left) - var(--safe-right)));
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 6px;
            align-items: stretch;
        }

        #settingsBtn,
        #moreBtn {
            width: 32px;
        }

        #chromeTopLeft {
            width: min(260px, calc(100vw - 16px - var(--safe-left) - var(--safe-right)));
        }

        #chromeBottomRight {
            width: min(320px, calc(100vw - 16px - var(--safe-left) - var(--safe-right)));
        }

        #viewsBtn,
        #modeToggle,
        #ctaBtn {
            width: 100%;
            min-width: 0;
        }

        #modeToggle {
            padding: 2px;
            justify-content: stretch;
        }

        #modeToggle button {
            flex: 1 1 0;
            min-width: 0;
            padding: 0 6px;
        }

        #hotspotInfoCard {
            width: min(264px, calc(100vw - 24px - var(--safe-left) - var(--safe-right)));
            padding: 11px 12px 12px;
        }

        #hotspotInfoBody {
            display: none;
        }

        /* === Editor Ribbon === hide mode badge on small screens (redundant on mobile) */
        #topBar.edit-mode #editorRibbonLeft #editorTitle {
            display: none;
        }

        #topBar.edit-mode #editorRibbonGroup {
            gap: 6px;
        }
    }

    #onboardingModal {
        position: fixed;
        inset: 0;
        z-index: 30;
        pointer-events: auto;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(24, 20, 17, 0.7);
        opacity: 1;
        visibility: visible;
        transition: opacity 0.25s ease, visibility 0.25s ease;
    }

    #onboardingModal.hidden {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }

    #onboardingCard {
        width: min(520px, 92vw);
        border-radius: 20px;
        background: var(--glass-bg-strong);
        border: 1px solid var(--glass-border);
        backdrop-filter: blur(18px) saturate(1.05);
        box-shadow: var(--glass-shadow);
        padding: 18px;
        color: var(--vios-white-92);
    }

    #onboardingLabel {
        font-size: 10px;
        letter-spacing: 0.18em;
        text-transform: uppercase;
        color: rgba(228, 211, 193, 0.9);
    }

    #onboardingTitle {
        margin-top: 8px;
        font-size: 22px;
        font-weight: 500;
        font-family: var(--ui-serif);
    }

    #onboardingBody {
        margin-top: 8px;
        font-size: 13px;
        line-height: 1.5;
        color: var(--vios-white-74);
    }
    .onboard-line {
        padding: 4px 0;
        font-size: 14px;
        color: rgba(255,255,255,0.85);
    }
    .onboard-spacer { height: 4px; }

    #onboardingActions {
        margin-top: 14px;
        display: flex;
        gap: 8px;
        justify-content: flex-end;
    }

    #onboardingActions button {
        border: 1px solid var(--glass-border);
        background: rgba(217, 197, 178, 0.12);
        color: var(--vios-white-92);
        padding: 7px 12px;
        border-radius: 999px;
        cursor: pointer;
        font-size: 12px;
    }

    #onboardDone {
        background: linear-gradient(180deg, rgba(224, 205, 186, 0.94), rgba(197, 172, 149, 0.92));
        border-color: rgba(217, 197, 178, 0.56);
        color: #241f1b;
    }

    @keyframes walkPulseAnim {
        0% {
            box-shadow: 0 0 0 0 rgba(217, 197, 178, 0.55);
        }
        80% {
            box-shadow: 0 0 0 10px rgba(217, 197, 178, 0);
        }
        100% {
            box-shadow: 0 0 0 0 rgba(217, 197, 178, 0);
        }
    }

    @media (pointer: coarse), (hover: none) {
        #globalActions button,
        #actions button,
        #spatialTools button,
        #modeToggle button,
        #compactMenu button,
        #settingsBody button,
        #editorPanel button,
        #hotspotInfoCta,
        #onboardingActions button,
        #introPlayBtn {
            min-height: 42px;
        }

        #settingsBtn,
        #helpBtn,
        #moreBtn {
            width: 42px;
        }

        #modeToggle {
            min-height: 42px;
            padding: 3px;
        }

        #modeToggle button {
            min-width: 64px;
        }

        #settingsCloseBtn {
            min-width: 38px;
            min-height: 38px;
        }
    }

    #walkBtn.walkPulse {
        animation: walkPulseAnim 1.3s ease-out infinite;
    }

    /* === Embed Mode === */
    /* Applied when viewer runs inside an iframe or when ?mode=embed is set. */
    /* Strips non-essential chrome so the 3D scene fills the iframe. */
    body.embed-mode #chromeTopLeft,
    body.embed-mode #agentCard,
    body.embed-mode #mobileAgentBtn,
    body.embed-mode #floorSwitcher,
    body.embed-mode #mobileEnquireBtn,
    body.embed-mode #mobilePropertyPanel,
    body.embed-mode #ctaBtn {
        display: none !important;
    }

    body.embed-mode {
        overflow: hidden;
    }

    /* Hide property-specific text in the loading card during embed mode. */
    /* #loadingBrand ("powered by VIOS"), #loadingStatus, and the progress */
    /* bar remain visible — the branded loading state is preserved. */
    body.embed-mode #loadingTitle,
    body.embed-mode #loadingSubtitle,
    body.embed-mode #loadingAttributes {
        display: none !important;
    }

    /* === Embed Preview Card === */
    /* Hidden by default; shown only in embed mode. z-index 45 sits above the  */
    /* loading overlay (z-index 40) so the preview is visible while model loads. */
    #embedPreview {
        display: none;
    }

    body.embed-mode.preview-active #embedPreview {
        display: flex;
        position: fixed;
        inset: 0;
        z-index: 45;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        background: #111;
        cursor: default;
    }

    .embed-preview-inner {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }

    .embed-preview-logo,
    .embed-preview-title {
        display: none;
    }

    .embed-preview-logo {
        width: 40px;
        height: 40px;
        opacity: 0.9;
    }

    .embed-preview-title {
        color: rgba(255, 255, 255, 0.7);
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
        font-size: 14px;
        font-weight: 400;
        letter-spacing: 0.03em;
        margin: 0;
    }

    .embed-launch-btn {
        background: #000000;
        color: #fff;
        border: none;
        border-radius: 999px;
        padding: 12px 32px;
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
        font-size: 15px;
        font-weight: 600;
        cursor: pointer;
        letter-spacing: 0.01em;
        transition: opacity 200ms ease;
    }

    .embed-launch-btn:hover {
        opacity: 0.85;
    }

    body.embed-mode.preview-active #embedPreview.has-thumb {
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
    }

    body.embed-mode.preview-active #embedPreview.has-thumb::before {
        content: '';
        position: absolute;
        inset: 0;
        background: rgba(0, 0, 0, 0.55);
    }

    body.embed-mode.preview-active #embedPreview.has-thumb .embed-preview-inner {
        position: relative;
        z-index: 1;
    }

    /* While the embed preview is active, hide ALL viewer chrome.
       preview-active class is added to <body> by JS on page load in embed mode
       and removed when the user clicks "Explore in 3D". Re-added on fullscreen exit. */
    body.embed-mode.preview-active #dpad,
    body.embed-mode.preview-active #viewNav,
    body.embed-mode.preview-active #mobileBar,
    body.embed-mode.preview-active #helpBtn,
    body.embed-mode.preview-active #fullscreenBtn,
    body.embed-mode.preview-active #compactMenu,
    body.embed-mode.preview-active #globalActions {
        display: none !important;
    }

    /* In modal variant, fullscreen is the parent modal — hide the viewer's own
       fullscreen button to avoid visual clash with the parent's × close button. */
    body.embed-mode.embed-variant-modal #fullscreenBtn {
        display: none !important;
    }

    /* Spatial Tools is for operator/editor workflows — hide in all embed modes. */
    body.embed-mode #spatialTools {
        display: none !important;
    }

    /* In modal variant, hide all top-right chrome except the help button.
       Fullscreen/settings/more conflict with the parent modal's × at top-right.
       Help button is repositioned to top-left via fixed positioning so it's
       accessible but doesn't clash with × (top-right). */
    body.embed-mode.embed-variant-modal #fullscreenBtn,
    body.embed-mode.embed-variant-modal #settingsBtn,
    body.embed-mode.embed-variant-modal #moreBtn {
        display: none !important;
    }

    /* Hide chrome panel containers that are empty in modal variant */
    body.embed-mode.embed-variant-modal #chromeTopRight,
    body.embed-mode.embed-variant-modal #chromeBottomLeft {
        display: none !important;
    }

    body.embed-mode.embed-variant-modal #helpBtn {
        /* Position: bottom-left, mirrors × close at top-right */
        display: flex !important;
        position: fixed !important;
        bottom: 16px !important;
        left: 16px !important;
        top: auto !important;
        right: auto !important;
        z-index: 90;

        /* Visual: match the modal × button styling — dark frosted-glass circle */
        width: 36px;
        height: 36px;
        align-items: center;
        justify-content: center;
        background: rgba(30, 30, 30, 0.85);
        color: #fff;
        border: 1px solid rgba(255, 255, 255, 0.15);
        border-radius: 50%;
        font-size: 16px;
        font-weight: 600;
        line-height: 1;
        cursor: pointer;
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        padding: 0;
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
        transition: background 200ms ease;
    }

    body.embed-mode.embed-variant-modal #helpBtn:hover {
        background: rgba(60, 60, 60, 0.95);
    }

    /* On touch devices in modal, hide help — no hover state, takes up space */
    @media (pointer: coarse) {
        body.embed-mode.embed-variant-modal #helpBtn {
            display: none !important;
        }
    }

    /* Suppress the Day 2 click-hint in embed mode — preview card replaces it */
    body.embed-mode #embedClickHint {
        display: none !important;
    }

    /* === Embed Click-to-Explore Hint === */
    #embedClickHint {
        position: fixed;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 100;
        pointer-events: none;
    }
    #embedClickHint.hidden { display: none; }
    #embedClickHint span {
        background: rgba(0, 0, 0, 0.55);
        color: #fff;
        padding: 10px 22px;
        border-radius: 24px;
        font-size: 13px;
        font-weight: 500;
        letter-spacing: 0.05em;
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        animation: embedHintPulse 2s ease-in-out infinite;
    }
    @keyframes embedHintPulse {
        0%, 100% { opacity: 0.75; }
        50% { opacity: 1; }
    }
