.panorama-section {
    background:
        radial-gradient(circle at 12% 10%, rgba(181, 90, 75, 0.12), transparent 26%),
        linear-gradient(135deg, #f7f1e8 0%, #efe6d8 100%);
    padding: 76px 20px;
}

.panorama-container {
    width: min(1200px, 100%);
    margin: 0 auto;
}

.panorama-head {
    display: grid;
    gap: 10px;
    margin-bottom: 28px;
}

.panorama-eyebrow {
    margin: 0;
    color: #b55a4b;
    font-family: Georgia, serif;
    font-style: italic;
}

.panorama-head h2 {
    margin: 0;
    color: #4f3b49;
    font-family: "FangSong", "STFangsong", serif;
    font-size: clamp(32px, 4vw, 52px);
    font-weight: 600;
}

.panorama-head p:last-child,
.panorama-description {
    max-width: 720px;
    margin: 0;
    color: #6f6258;
    line-height: 1.9;
}

.panorama-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.75fr);
    gap: 22px;
    align-items: stretch;
}

.panorama-viewer-card,
.object-viewer-card,
.model-viewer-card {
    border: 1px solid rgba(181, 90, 75, 0.18);
    border-radius: 8px;
    background: rgba(255, 253, 248, 0.82);
    box-shadow: 0 18px 42px rgba(42, 31, 23, 0.1);
    overflow: hidden;
}

.panorama-viewer {
    position: relative;
    height: clamp(360px, 46vw, 560px);
    overflow: hidden;
    cursor: grab;
    touch-action: none;
    background: #1d1917;
}

.panorama-viewer.is-dragging {
    cursor: grabbing;
}

.panorama-viewer:fullscreen {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
}

.panorama-viewer canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.panorama-actions {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 5;
    display: flex;
    gap: 10px;
}

.panorama-hotspots {
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
}

.panorama-hotspot {
    position: absolute;
    transform: translate(-50%, -50%);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(255, 250, 238, 0.35);
    border-radius: 999px;
    padding: 7px 10px;
    color: #fffaf0;
    background: rgba(181, 90, 75, 0.82);
    box-shadow: 0 10px 22px rgba(29, 25, 23, 0.22);
    pointer-events: auto;
    cursor: pointer;
}

.panorama-hotspot i {
    font-size: 18px;
}

.panorama-hotspot img {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
}

.panorama-hotspot span {
    font-size: 12px;
    white-space: nowrap;
}

.panorama-hotspot-notice {
    position: absolute;
    left: 50%;
    bottom: 74px;
    z-index: 6;
    max-width: min(420px, calc(100% - 40px));
    padding: 10px 16px;
    border: 1px solid rgba(255, 250, 238, 0.3);
    border-radius: 999px;
    color: #fffaf0;
    background: rgba(79, 59, 73, 0.76);
    box-shadow: 0 12px 28px rgba(29, 25, 23, 0.22);
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
    opacity: 0;
    transform: translate(-50%, 10px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.panorama-hotspot-notice.active {
    opacity: 1;
    transform: translate(-50%, 0);
}

.panorama-actions button {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 250, 238, 0.28);
    border-radius: 50%;
    color: #fffaf0;
    background: rgba(29, 25, 23, 0.58);
    box-shadow: 0 8px 18px rgba(29, 25, 23, 0.18);
    cursor: pointer;
    transition: transform 0.25s ease, background 0.25s ease;
}

.panorama-actions button:hover {
    transform: translateY(-2px);
    background: rgba(106, 76, 90, 0.82);
}

.panorama-actions .panorama-back {
    background: rgba(181, 90, 75, 0.78);
}

.panorama-actions .panorama-back[hidden] {
    display: none;
}

.panorama-scene-back {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 6;
    max-width: min(320px, calc(100% - 120px));
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(255, 250, 238, 0.34);
    border-radius: 999px;
    padding: 9px 14px 9px 10px;
    color: #fffaf0;
    background:
        linear-gradient(135deg, rgba(79, 59, 73, 0.82), rgba(181, 90, 75, 0.72));
    box-shadow: 0 12px 26px rgba(29, 25, 23, 0.24);
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: transform 0.24s ease, box-shadow 0.24s ease, background 0.24s ease;
}

.panorama-scene-back:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(29, 25, 23, 0.3);
    background:
        linear-gradient(135deg, rgba(106, 76, 90, 0.9), rgba(181, 90, 75, 0.84));
}

.panorama-scene-back[hidden] {
    display: none;
}

.panorama-scene-back i {
    font-size: 18px;
    line-height: 1;
}

.panorama-scene-back span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    line-height: 1;
}

.panorama-actions button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.panorama-actions i {
    font-size: 20px;
    line-height: 1;
}

.panorama-loading {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: rgba(255, 250, 238, 0.82);
    background: linear-gradient(135deg, #221d1b, #3f3029);
    font-family: "KaiTi", "STKaiti", serif;
    pointer-events: none;
}

.panorama-media-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    place-items: center;
    padding: 28px;
}

.panorama-media-modal.active {
    display: grid;
}

.panorama-media-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(22, 18, 16, 0.78);
    backdrop-filter: blur(10px);
}

.panorama-media-shell {
    position: relative;
    z-index: 1;
    width: min(1120px, 94vw);
    height: min(760px, 84vh);
    display: grid;
    grid-template-rows: 1fr auto;
    border: 1px solid rgba(245, 240, 232, 0.2);
    border-radius: 6px;
    background: #171311;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42), 0 0 28px rgba(181, 90, 75, 0.28);
    overflow: hidden;
}

.panorama-media-stage {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 0;
    overflow: hidden;
    cursor: grab;
}

.panorama-media-stage.is-moving {
    cursor: grabbing;
}

.panorama-media-stage img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transform-origin: center center;
    user-select: none;
    touch-action: none;
}

.panorama-media-stage video,
.panorama-media-stage iframe {
    width: 100%;
    height: 100%;
    border: 0;
    background: #000;
}

.panorama-media-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 3;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(245, 240, 232, 0.28);
    border-radius: 50%;
    color: #fffaf0;
    background: rgba(29, 25, 23, 0.72);
    cursor: pointer;
}

.panorama-media-close i {
    font-size: 22px;
}

.panorama-media-tools {
    position: absolute;
    left: 50%;
    bottom: 48px;
    z-index: 3;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    padding: 7px;
    border: 1px solid rgba(245, 240, 232, 0.18);
    border-radius: 999px;
    background: rgba(29, 25, 23, 0.62);
    backdrop-filter: blur(8px);
}

.panorama-media-tools[hidden] {
    display: none;
}

.panorama-media-tools button {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: #fffaf0;
    background: rgba(181, 90, 75, 0.76);
    cursor: pointer;
}

.panorama-media-caption {
    min-height: 44px;
    margin: 0;
    padding: 12px 18px;
    color: rgba(255, 250, 240, 0.86);
    background: rgba(22, 18, 16, 0.9);
    font-family: "KaiTi", "STKaiti", serif;
    font-size: 15px;
}

.panorama-hint,
.object-viewer span,
.model-stage span {
    position: absolute;
    left: 16px;
    bottom: 16px;
    border-radius: 4px;
    padding: 7px 11px;
    color: #fffaf0;
    background: rgba(29, 25, 23, 0.56);
    font-family: "KaiTi", "STKaiti", serif;
    font-size: 13px;
}

.panorama-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px;
}

.panorama-toolbar button {
    border: 0;
    border-radius: 4px;
    background: #6a4c5a;
    color: #fffaf0;
    padding: 10px 16px;
    cursor: pointer;
}

.panorama-toolbar button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.panorama-toolbar-note {
    color: #8d8177;
    font-size: 13px;
}

.immersive-more-link,
.immersive-card-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid rgba(181, 90, 75, 0.34);
    border-radius: 999px;
    padding: 9px 14px;
    color: #6a4c5a;
    background:
        linear-gradient(135deg, rgba(255, 253, 248, 0.9), rgba(245, 240, 232, 0.78));
    font-family: "KaiTi", "STKaiti", serif;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(42, 31, 23, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.immersive-more-link:hover,
.immersive-card-more:hover {
    border-color: rgba(246, 221, 139, 0.72);
    box-shadow: 0 0 18px rgba(246, 221, 139, 0.38), 0 10px 24px rgba(42, 31, 23, 0.12);
    transform: translateY(-2px);
}

.immersive-card-more {
    margin: 0 16px 14px;
}

.panorama-scene-tabs,
.immersive-switcher {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
    gap: 8px;
    padding: 0 16px 16px;
}

.panorama-scene-tabs {
    padding-top: 14px;
}

.panorama-scene-tabs button,
.immersive-switcher button {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 4px 9px;
    align-items: center;
    border: 1px solid rgba(181, 90, 75, 0.2);
    border-radius: 8px;
    background: rgba(255, 250, 238, 0.86);
    color: #6a4c5a;
    padding: 8px 12px;
    cursor: pointer;
    text-align: left;
    box-shadow: 0 8px 18px rgba(42, 31, 23, 0.05);
    transition: transform 0.24s ease, box-shadow 0.24s ease, background 0.24s ease;
}

.panorama-scene-tabs button img,
.immersive-switcher button img {
    width: 48px;
    height: 42px;
    grid-row: span 2;
    border-radius: 6px;
    object-fit: cover;
    background: rgba(29, 25, 23, 0.08);
}

.panorama-scene-tabs button span,
.immersive-switcher button span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
}

.panorama-scene-tabs button small,
.immersive-switcher button small {
    color: rgba(106, 76, 90, 0.68);
    font-size: 11px;
    line-height: 1.45;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.panorama-scene-tabs button:hover,
.immersive-switcher button:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(181, 90, 75, 0.22);
}

.panorama-scene-tabs button.active,
.immersive-switcher button.active {
    color: #fffaf0;
    background: #b55a4b;
}

.panorama-scene-tabs button.active small,
.immersive-switcher button.active small {
    color: rgba(255, 250, 240, 0.74);
}

.immersive-side {
    display: grid;
    gap: 22px;
}

.immersive-side.has-multiple {
    grid-template-columns: 1fr;
}

.immersive-side.has-multiple .object-viewer-card,
.immersive-side.has-multiple .model-viewer-card {
    display: grid;
    grid-template-columns: minmax(220px, 0.92fr) minmax(180px, 0.68fr);
    align-items: stretch;
}

.immersive-side.has-multiple .object-viewer-card h3,
.immersive-side.has-multiple .model-viewer-card h3 {
    align-self: start;
}

.immersive-side.has-multiple .immersive-switcher {
    grid-column: 2;
    align-content: start;
    padding: 0 16px 16px;
}

.immersive-side.has-multiple .object-viewer,
.immersive-side.has-multiple .model-stage {
    grid-row: 1 / span 3;
    height: 310px;
}

.object-viewer,
.model-stage {
    position: relative;
    height: 250px;
    overflow: hidden;
    cursor: ew-resize;
    touch-action: none;
    border: 1px solid rgba(246, 221, 139, 0.16);
    background: #221d1b;
    transition: border-color 0.28s ease, box-shadow 0.28s ease;
}

.object-viewer {
    cursor: ew-resize;
}

.object-viewer.is-hovering,
.model-stage.is-hovering,
.model-stage.has-model:hover {
    border-color: rgba(246, 221, 139, 0.55);
    box-shadow: 0 0 18px rgba(246, 221, 139, 0.24), inset 0 0 28px rgba(0, 0, 0, 0.18);
}

.object-viewer.is-panning,
.model-stage.is-panning {
    cursor: grabbing;
}

.model-stage {
    cursor: ew-resize;
}

.model-stage.is-panning {
    cursor: move;
}

.model-stage:fullscreen {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
}

.model-stage:fullscreen span {
    left: 24px;
    bottom: 24px;
}

.object-viewer img,
.model-stage img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform-origin: center center;
    transition: transform 0.12s ease-out;
}

.model-stage canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.model-stage img {
    opacity: 0.58;
}

.object-viewer-card h3,
.model-viewer-card h3 {
    margin: 0;
    padding: 16px;
    color: #4f3b49;
    font-size: 18px;
}

.immersive-card-description {
    margin: -6px 16px 12px;
    color: rgba(79, 59, 73, 0.72);
    font-size: 13px;
    line-height: 1.75;
}

.panorama-description {
    margin-top: 20px;
}

@media (max-width: 900px) {
    .panorama-layout {
        grid-template-columns: 1fr;
    }

    .panorama-viewer {
        height: 58vw;
        min-height: 340px;
    }

    .immersive-side {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .panorama-section {
        padding: 54px 16px;
    }

    .panorama-media-modal {
        padding: 10px;
    }

    .panorama-media-shell {
        width: 100%;
        height: 82vh;
    }

    .immersive-side {
        grid-template-columns: 1fr;
    }

    .panorama-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }
}
