html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
}

* {
    box-sizing: border-box;
}

:root {
    --glass-bg: rgba(11, 26, 48, 0.46);
    --glass-bg-strong: rgba(8, 20, 38, 0.64);
    --glass-line: rgba(255, 255, 255, 0.12);
    --glass-line-soft: rgba(255, 255, 255, 0.08);
    --text-main: #ffffff;
    --text-soft: #d7e3f1;
    --text-muted: #9db0c7;
    --accent-a: #a5f3fc;
    --accent-b: #67e8f9;
    --accent-c: #60a5fa;
    --shadow-soft: 0 12px 26px rgba(0, 0, 0, 0.14);
    --shadow-panel: 0 22px 48px rgba(0, 0, 0, 0.20);
    --shadow-premium: 0 26px 60px rgba(0, 0, 0, 0.24);
    --dock-height: 92px;
    --brand-top: 18px;
    --brand-z: 30;
    --chrome-z: 35;
    --panel-z: 42;
    --info-z: 60;
    --intro-z: 80;
}

body {
    overscroll-behavior: none;
    background:
        radial-gradient(circle at top, rgba(103, 232, 249, 0.16), transparent 28%),
        radial-gradient(circle at bottom right, rgba(96, 165, 250, 0.14), transparent 25%),
        linear-gradient(180deg, #081426 0%, #0a1d35 46%, #0b2240 100%);
    color: var(--text-main);
}

.hidden {
    display: none !important;
}

/* ===== VIEWER ===== */
.preview-viewer {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background:
        radial-gradient(circle at center, rgba(103, 232, 249, 0.12), transparent 32%),
        linear-gradient(180deg, #081426 0%, #0a1d35 48%, #0b2240 100%);
    isolation: isolate;
}

.preview-viewer::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: none;
    background: radial-gradient(circle at center, transparent 38%, rgba(0, 0, 0, 0.14) 100%);
    opacity: 0;
    transition: opacity 0.8s ease;
}

.preview-viewer::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(0,0,0,0.08) 0%, transparent 18%, transparent 72%, rgba(0,0,0,0.14) 100%);
}

.preview-viewer.is-cinematic-transition::before {
    opacity: 1;
}

.preview-viewer.is-entering::after {
    animation: viewerEntryGlow 1.1s ease both;
}

@keyframes viewerEntryGlow {
    0% {
        opacity: 0;
        transform: scale(1.02);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===== LAYERS ===== */
.preview-layer,
.preview-mount {
    position: absolute;
    inset: 0;
}

.preview-layer {
    opacity: 0;
    transform: scale(1.02);
    filter: blur(0);
    transition:
        opacity 1.1s ease,
        transform 1.2s cubic-bezier(0.22, 1, 0.36, 1),
        filter 1.1s ease;
    will-change: transform, opacity, filter;
    pointer-events: none;
}

.preview-layer.active-layer {
    opacity: 1;
    z-index: 2;
    transform: scale(1);
    filter: blur(0);
    pointer-events: auto;
}

.preview-layer.standby-layer {
    opacity: 0;
    z-index: 1;
    transform: scale(1.04);
}

.preview-layer.layer-outgoing {
    opacity: 0.12;
    z-index: 2;
    transform: scale(1.12);
    filter: blur(1.2px);
}

.preview-layer.layer-incoming {
    opacity: 1;
    z-index: 3;
    transform: scale(1.006);
    filter: blur(0);
}

.preview-viewer.is-cinematic-transition .active-layer {
    transform: scale(1.04);
}

/* ===== INTRO ===== */
.preview-intro-overlay {
    position: absolute;
    inset: 0;
    z-index: var(--intro-z);
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at top, rgba(103,232,249,0.18), transparent 28%),
        linear-gradient(180deg, rgba(7,20,38,0.94) 0%, rgba(10,29,53,0.92) 45%, rgba(11,34,64,0.94) 100%);
    backdrop-filter: blur(16px);
    transition:
        opacity 0.9s ease,
        visibility 0.9s ease,
        transform 0.9s ease;
}

.preview-intro-overlay.is-hidden {
    opacity: 0;
    visibility: hidden;
    transform: scale(1.03);
}

.preview-intro-glow {
    position: absolute;
    border-radius: 999px;
    filter: blur(60px);
    pointer-events: none;
}

.preview-intro-glow-a {
    width: 280px;
    height: 280px;
    background: rgba(103, 232, 249, 0.16);
    top: 12%;
    left: 50%;
    transform: translateX(-50%);
}

.preview-intro-glow-b {
    width: 320px;
    height: 320px;
    background: rgba(96, 165, 250, 0.13);
    bottom: 10%;
    right: 8%;
}

.preview-intro-card {
    position: relative;
    width: min(92vw, 460px);
    padding: 28px 24px 22px;
    border-radius: 32px;
    border: 1px solid var(--glass-line);
    background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.05));
    box-shadow:
        0 24px 60px rgba(0,0,0,0.20),
        inset 0 1px 0 rgba(255,255,255,0.12);
    text-align: center;
    overflow: hidden;
}

.preview-intro-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(103,232,249,0.16), transparent 45%);
    pointer-events: none;
}

.preview-intro-logo-wrap {
    position: relative;
    z-index: 1;
    margin-bottom: 16px;
    display: flex;
    justify-content: center;
}

.preview-intro-logo {
    width: 82px;
    height: 82px;
    border-radius: 999px;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,0.18);
    box-shadow: 0 16px 30px rgba(0,0,0,0.18);
    background: rgba(255,255,255,0.08);
}

.preview-intro-logo-fallback {
    display: grid;
    place-items: center;
    font-size: 28px;
    font-weight: 900;
    color: #d9f8ff;
    background: linear-gradient(135deg, rgba(103,232,249,0.24), rgba(96,165,250,0.22));
}

.preview-intro-text {
    position: relative;
    z-index: 1;
}

.preview-intro-kicker {
    margin: 0 0 8px;
    font-size: 11px;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    font-weight: 900;
    color: rgba(186, 245, 255, 0.92);
}

.preview-intro-title {
    margin: 0;
    font-size: clamp(1.5rem, 4vw, 2rem);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.04em;
    color: white;
}

.preview-intro-subtitle {
    margin: 10px 0 0;
    color: var(--text-soft);
    font-size: 14px;
    font-weight: 700;
}

.preview-intro-loader {
    position: relative;
    z-index: 1;
    margin-top: 22px;
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255,255,255,0.08);
}

.preview-intro-loader-bar {
    display: block;
    width: 42%;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent-a) 0%, var(--accent-b) 50%, var(--accent-c) 100%);
    animation: previewLoaderMove 1.3s ease-in-out infinite;
}

@keyframes previewLoaderMove {
    0% { transform: translateX(-120%); }
    100% { transform: translateX(320%); }
}

/* ===== BRAND / TOP CHIP ===== */
.brand-overlay-wrap {
    position: absolute;
    top: var(--brand-top);
    left: 50%;
    transform: translateX(-50%);
    z-index: var(--brand-z);
    width: calc(100% - 32px);
    display: flex;
    justify-content: center;
    pointer-events: none;
}

.brand-overlay-chip,
.brand-header-chip {
    position: relative;
    min-width: 220px;
    max-width: min(92vw, 520px);
    padding: 12px 18px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.12);
    background: linear-gradient(180deg, rgba(11,26,48,0.54), rgba(11,26,48,0.42));
    backdrop-filter: blur(22px);
    box-shadow:
        0 20px 44px rgba(0,0,0,0.18),
        inset 0 1px 0 rgba(255,255,255,0.10);
    overflow: hidden;
    pointer-events: auto;
}

.brand-overlay-chip-centered {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-overlay-chip::before,
.brand-header-chip::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(103,232,249,0.18), transparent 42%);
    pointer-events: none;
}

.brand-logo-frame {
    position: relative;
    flex-shrink: 0;
    width: 54px;
    height: 54px;
    overflow: hidden;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.08);
    box-shadow: 0 12px 24px rgba(0,0,0,0.16);
}

.brand-logo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.brand-logo-fallback {
    display: grid;
    place-items: center;
    font-size: 18px;
    font-weight: 900;
    color: #d9f8ff;
    background: linear-gradient(135deg, rgba(103,232,249,0.24), rgba(96,165,250,0.22));
}

.brand-kicker {
    margin: 0 0 2px;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: rgba(186, 245, 255, 0.88);
}

.brand-company-name {
    margin: 0;
    font-size: 17px;
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.03em;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#previewSceneTitle,
.preview-scene-title-chip,
.scene-title-chip,
.viewer-scene-title,
.preview-top-actions,
.top-right-actions,
.top-floating-actions {
    display: none !important;
}

/* ===== BOTTOM CHROME / DOCK ===== */
.viewer-bottom-chrome {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--chrome-z);
    pointer-events: none;
    padding: 0 12px 14px;
}

.viewer-bottom-chrome-inner {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
}

.viewer-bottom-chrome-card {
    position: relative;
    width: min(100%, 1120px);
    border: 1px solid rgba(255,255,255,0.12);
    background: linear-gradient(180deg, rgba(11,26,48,0.54), rgba(11,26,48,0.42));
    box-shadow:
        0 22px 48px rgba(0,0,0,0.20),
        inset 0 1px 0 rgba(255,255,255,0.08);
    backdrop-filter: blur(20px);
    border-radius: 28px;
    padding: 12px;
    pointer-events: auto;
    overflow: visible;
}

.dock-scroll {
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    position: relative;
}

.dock-scroll::-webkit-scrollbar {
    display: none;
}

.dock-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    white-space: nowrap;
    min-width: max-content;
    position: relative;
}

.dock-divider {
    width: 1px;
    height: 38px;
    background: rgba(255,255,255,0.12);
    margin: 0 2px;
    flex-shrink: 0;
}

.control-btn {
    position: relative;
    width: 52px;
    min-width: 52px;
    height: 52px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.10);
    color: #ffffff;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 900;
    cursor: pointer;
    transition:
        transform 0.18s ease,
        background 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease;
    backdrop-filter: blur(10px);
    flex-shrink: 0;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.control-btn:hover {
    transform: translateY(-1px);
    background: rgba(255,255,255,0.16);
    border-color: rgba(255,255,255,0.18);
}

.control-btn:active {
    transform: translateY(0) scale(0.98);
}

.control-btn.active {
    background: linear-gradient(135deg, var(--accent-a) 0%, var(--accent-b) 50%, var(--accent-c) 100%);
    color: #08111f;
    border-color: transparent;
    box-shadow: 0 12px 24px rgba(103, 232, 249, 0.20);
}

.control-btn svg,
.control-btn i,
.control-btn img {
    width: 21px;
    height: 21px;
    object-fit: contain;
    flex-shrink: 0;
}

.control-btn span,
.control-btn .label,
.control-btn .btn-label {
    display: none !important;
}

/* ===== 3D STACK BUTTON ===== */
.scene-stack-anchor {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.scene-stack-toggle-inline {
    position: relative;
    width: 78px;
    min-width: 78px;
    height: 52px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.12);
    background: linear-gradient(180deg, rgba(255,255,255,0.14), rgba(255,255,255,0.08));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition:
        transform 0.18s ease,
        background 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease;
    backdrop-filter: blur(10px);
    flex-shrink: 0;
    perspective: 900px;
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.scene-stack-toggle-inline::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(103,232,249,0.18), transparent 50%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.scene-stack-toggle-inline:hover {
    transform: translateY(-1px);
    background: rgba(255,255,255,0.16);
}

.scene-stack-toggle-inline:hover::before,
.scene-stack-toggle-inline.open::before {
    opacity: 1;
}

.scene-stack-mini-preview {
    position: relative;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    transform-style: preserve-3d;
}

.scene-stack-mini-card {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: 11px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.08);
    box-shadow: 0 10px 18px rgba(0,0,0,0.16);
    transition:
        transform 0.42s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.42s ease,
        filter 0.42s ease;
}

.scene-stack-mini-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.scene-stack-mini-card:nth-child(1) {
    transform: translate3d(0, 0, 18px) rotate(0deg);
    z-index: 3;
}

.scene-stack-mini-card:nth-child(2) {
    transform: translate3d(4px, 4px, 8px) rotate(6deg);
    z-index: 2;
}

.scene-stack-mini-card:nth-child(3) {
    transform: translate3d(8px, 8px, 0) rotate(11deg);
    z-index: 1;
}

.scene-stack-toggle-inline.open .scene-stack-mini-card:nth-child(1) {
    transform: translate3d(-8px, -12px, 24px) rotate(-12deg);
    box-shadow: 0 16px 26px rgba(0,0,0,0.18);
}

.scene-stack-toggle-inline.open .scene-stack-mini-card:nth-child(2) {
    transform: translate3d(6px, 1px, 12px) rotate(4deg);
    box-shadow: 0 12px 22px rgba(0,0,0,0.16);
}

.scene-stack-toggle-inline.open .scene-stack-mini-card:nth-child(3) {
    transform: translate3d(16px, 13px, 0) rotate(15deg);
    box-shadow: 0 10px 18px rgba(0,0,0,0.14);
}

.scene-stack-badge {
    position: absolute;
    right: 4px;
    top: 4px;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent-a) 0%, var(--accent-c) 100%);
    color: #08111f;
    font-size: 10px;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 16px rgba(103, 232, 249, 0.22);
}

/* ===== STACK PANEL ===== */
.scene-stack-panel {
    position: absolute;
    left: 0;
    bottom: calc(100% + 12px);
    width: 320px;
    max-height: min(62vh, 520px);
    opacity: 0;
    transform: translateY(22px) scale(0.96);
    transform-origin: bottom left;
    pointer-events: none;
    transition:
        opacity 0.26s ease,
        transform 0.34s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: var(--panel-z);
}

.scene-stack-panel.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.scene-stack-panel-inner {
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(11,26,48,0.70);
    backdrop-filter: blur(22px);
    box-shadow: 0 24px 52px rgba(0,0,0,0.20);
    padding: 14px;
    max-height: min(62vh, 520px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.16) transparent;
}

.scene-stack-panel-inner::-webkit-scrollbar {
    width: 8px;
}

.scene-stack-panel-inner::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.14);
    border-radius: 999px;
}

.scene-stack-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.scene-card {
    position: relative;
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 12px;
    width: 100%;
    border: 1px solid rgba(255,255,255,0.10);
    background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.06));
    border-radius: 22px;
    padding: 11px;
    color: white;
    cursor: pointer;
    overflow: hidden;
    text-align: left;
    transition:
        transform 0.28s ease,
        border-color 0.28s ease,
        box-shadow 0.28s ease,
        background 0.28s ease,
        opacity 0.28s ease;
    box-shadow: 0 10px 24px rgba(0,0,0,0.14);
    opacity: 0;
    transform: translateY(26px) scale(0.97);
}

.scene-stack-panel.open .scene-card {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition-delay: calc(var(--stagger, 0) * 45ms);
}

.scene-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(103,232,249,0.10), transparent 45%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.scene-card:hover {
    transform: translateY(-2px);
    border-color: rgba(103,232,249,0.30);
    box-shadow: 0 16px 30px rgba(0,0,0,0.18);
}

.scene-card:hover::before,
.scene-card.active::before {
    opacity: 1;
}

.scene-card.active {
    border-color: rgba(103,232,249,0.40);
    background: linear-gradient(180deg, rgba(103,232,249,0.14), rgba(255,255,255,0.08));
    box-shadow:
        0 18px 34px rgba(0,0,0,0.18),
        0 0 0 1px rgba(103,232,249,0.08) inset;
}

.scene-thumb {
    position: relative;
    width: 104px;
    height: 78px;
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.08);
}

.scene-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.scene-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: #d8e6f7;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.18em;
}

.scene-body {
    min-width: 0;
    align-self: center;
}

.scene-title {
    display: block;
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: -0.02em;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.scene-subtitle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 700;
}

.scene-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: rgba(165,243,252,0.9);
    box-shadow: 0 0 12px rgba(165,243,252,0.65);
}

/* ===== HOTSPOTS ===== */
.preview-hotspot {
    position: relative;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: transform 0.18s ease, filter 0.18s ease, opacity 0.18s ease;
    will-change: transform;
}

.preview-hotspot:hover {
    transform: scale(1.08);
    filter: brightness(1.06);
}

.preview-hotspot::after {
    content: "";
    position: absolute;
    inset: 14%;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(255,255,255,0.26), transparent 70%);
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.preview-hotspot:hover::after {
    opacity: 1;
    transform: scale(1);
}

.preview-hotspot img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter:
        drop-shadow(0 12px 20px rgba(0,0,0,0.24))
        drop-shadow(0 4px 10px rgba(0,0,0,0.12));
    user-select: none;
    -webkit-user-drag: none;
}

.preview-hotspot.variant-label {
    min-width: 90px;
    width: auto !important;
    height: auto !important;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(11, 26, 48, 0.74);
    border: 1px solid rgba(255,255,255,0.14);
    color: white;
    font-size: 12px;
    font-weight: 900;
    display: inline-flex;
    gap: 10px;
    align-items: center;
    backdrop-filter: blur(12px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.18);
}

.preview-hotspot.variant-label img {
    width: 22px;
    height: 22px;
}

.preview-hotspot.variant-floor img {
    transform: perspective(300px) rotateX(65deg);
}

.preview-hotspot.variant-flat img {
    filter: drop-shadow(0 8px 12px rgba(0,0,0,0.14));
}

/* ===== INFO / AD PANEL ===== */
.info-backdrop,
#previewInfoBackdrop {
    background: rgba(8, 15, 28, 0.16);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
}

.info-backdrop.open,
#previewInfoBackdrop.open {
    opacity: 1;
    pointer-events: auto;
}

.info-panel,
#previewInfoPanel {
    transform: translateX(115%);
    opacity: 0;
    pointer-events: none;
    transition:
        transform 0.38s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.28s ease;
    z-index: var(--info-z);
}

.info-panel.open,
#previewInfoPanel.open {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

.info-media-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.info-media-empty {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: var(--text-soft);
    font-size: 14px;
    font-weight: 800;
}

/* ===== TOAST ===== */
.toast-show {
    opacity: 1 !important;
    transform: translate(-50%, -8px) !important;
}

/* ===== UI HIDE MODE ===== */
.ui-hidden [data-ui="chrome"] {
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity 0.28s ease, transform 0.28s ease;
}

[data-ui="chrome"] {
    transition: opacity 0.28s ease, transform 0.28s ease;
}

/* ===== TABLET ===== */
@media (max-width: 1024px) {
    .brand-overlay-wrap {
        top: 14px;
    }

    .viewer-bottom-chrome {
        padding-inline: 10px;
        padding-bottom: 12px;
    }

    .viewer-bottom-chrome-card {
        border-radius: 24px;
        padding: 10px;
    }

    .scene-stack-panel {
        width: min(78vw, 320px);
    }
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
    :root {
        --dock-height: 82px;
        --brand-top: 12px;
    }

    .preview-intro-card {
        padding: 24px 18px 18px;
        border-radius: 26px;
    }

    .preview-intro-logo {
        width: 70px;
        height: 70px;
    }

    .brand-overlay-wrap {
        top: 10px;
        width: calc(100% - 18px);
    }

    .brand-overlay-chip,
    .brand-header-chip {
        max-width: calc(100vw - 1.1rem);
        padding: 9px 12px;
        border-radius: 22px;
    }

    .brand-logo-frame {
        width: 42px;
        height: 42px;
    }

    .brand-kicker {
        font-size: 9px;
        letter-spacing: 0.22em;
    }

    .brand-company-name {
        font-size: 14px;
        max-width: 58vw;
    }

    .viewer-bottom-chrome {
        padding: 0 8px 10px;
    }

    .viewer-bottom-chrome-card {
        width: 100%;
        border-radius: 22px;
        padding: 8px;
    }

    .dock-scroll {
        overflow-x: auto;
        overflow-y: visible;
        padding-bottom: 2px;
    }

    .dock-row {
        gap: 7px;
        min-width: max-content;
    }

    .control-btn {
        width: 46px;
        min-width: 46px;
        height: 46px;
        border-radius: 16px;
        font-size: 18px;
    }

    .control-btn svg,
    .control-btn i,
    .control-btn img {
        width: 19px;
        height: 19px;
    }

    .scene-stack-anchor {
        position: relative;
    }

    .scene-stack-toggle-inline {
        width: 66px;
        min-width: 66px;
        height: 46px;
        border-radius: 16px;
    }

    .scene-stack-mini-preview {
        width: 31px;
        height: 31px;
    }

    .dock-divider {
        height: 30px;
    }

    .scene-stack-panel {
        left: 0;
        right: auto;
        bottom: calc(100% + 10px);
        width: min(88vw, 330px);
        max-height: min(56vh, 440px);
        transform: translateY(22px) scale(0.96);
        transform-origin: bottom left;
    }

    .scene-stack-panel.open {
        transform: translateY(0) scale(1);
    }

    .scene-stack-panel-inner {
        max-height: min(56vh, 440px);
        border-radius: 24px;
        padding: 12px;
    }

    .scene-card {
        grid-template-columns: 88px minmax(0, 1fr);
        gap: 10px;
        border-radius: 18px;
        padding: 9px;
    }

    .scene-thumb {
        width: 88px;
        height: 66px;
        border-radius: 15px;
    }

    .scene-title {
        font-size: 14px;
    }

    .scene-subtitle {
        font-size: 11px;
    }

    .preview-hotspot.variant-label {
        min-width: 78px;
        padding: 8px 11px;
        gap: 8px;
        font-size: 11px;
    }

    .preview-hotspot.variant-label img {
        width: 18px;
        height: 18px;
    }

    .info-panel,
    #previewInfoPanel {
        right: 10px !important;
        left: 10px !important;
        bottom: 76px !important;
        width: auto !important;
        max-width: none !important;
        transform: translateY(120%);
        border-radius: 24px !important;
    }

    .info-panel.open,
    #previewInfoPanel.open {
        transform: translateY(0);
    }
}

/* ===== SMALL MOBILE ===== */
@media (max-width: 480px) {
    .brand-overlay-chip,
    .brand-header-chip {
        padding: 8px 10px;
    }

    .brand-logo-frame {
        width: 38px;
        height: 38px;
    }

    .brand-company-name {
        font-size: 13px;
        max-width: 56vw;
    }

    .control-btn {
        width: 44px;
        min-width: 44px;
        height: 44px;
        border-radius: 15px;
    }

    .scene-stack-toggle-inline {
        width: 62px;
        min-width: 62px;
        height: 44px;
        border-radius: 15px;
    }

    .scene-stack-panel {
        width: min(92vw, 320px);
    }

    .scene-card {
        grid-template-columns: 82px minmax(0, 1fr);
    }

    .scene-thumb {
        width: 82px;
        height: 62px;
    }
}
