/* Mycelium Spatial Immersion (UP-4) — 360 viewer + Apple-spatial card. */

.mln-spatial-section {
    margin-top: 1.5rem;
}
.mln-spatial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
}
.mln-spatial-card {
    border: 1px solid var(--mln-border, #e0e0e0);
    border-radius: var(--mln-radius, 10px);
    overflow: hidden;
    background: var(--mln-surface, #fff);
    display: flex;
    flex-direction: column;
}
.mln-spatial-card-title {
    font-weight: 600;
    padding: .6rem .8rem;
    border-top: 1px solid var(--mln-divider, #eee);
    color: var(--mln-text, #1a1a1a);
    font-size: .95rem;
}

/* ---- 360 WebGL viewer host ---- */
.mln-spatial-viewer {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 220px;
    background: radial-gradient(circle at 50% 40%, #123, #0a1512);
    overflow: hidden;
    touch-action: none;      /* let pointer drag drive the pano, not page scroll */
    cursor: grab;
}
.mln-spatial-viewer.mln-spatial--grabbing { cursor: grabbing; }
.mln-spatial-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}
.mln-spatial-hint {
    position: absolute;
    left: 50%;
    bottom: .5rem;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, .45);
    color: #fff;
    font-size: .72rem;
    line-height: 1;
    padding: .35rem .6rem;
    border-radius: 999px;
    pointer-events: none;
    opacity: .85;
    white-space: nowrap;
}

/* ---- flat pannable fallback (no WebGL / no CORS) ---- */
.mln-spatial--flat { cursor: grab; }
.mln-spatial-flat-scroll {
    position: absolute;
    inset: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}
.mln-spatial-flat-img {
    height: 100%;
    width: auto;
    max-width: none;         /* wider than the frame so there is something to pan */
    display: block;
    user-select: none;
    -webkit-user-drag: none;
}

/* ---- Apple Vision Pro spatial download card ---- */
.mln-spatial-apple {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    padding: 1.5rem 1rem;
    text-align: center;
    aspect-ratio: 16 / 9;
    min-height: 220px;
    background:
        linear-gradient(135deg, rgba(0, 89, 76, .12), rgba(188, 78, 44, .10)),
        var(--mln-surface, #fff);
}
.mln-spatial-apple-icon {
    font-size: 2.4rem;
    color: var(--mln-primary, #00594c);
    line-height: 1;
}
.mln-spatial-apple-label {
    font-weight: 600;
    color: var(--mln-text, #1a1a1a);
}
.mln-spatial-apple-sub {
    font-size: .8rem;
    color: var(--mln-text-muted, #6b7280);
    max-width: 26ch;
}
.mln-spatial-apple-link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .5rem .9rem;
    border-radius: 999px;
    background: var(--mln-primary, #00594c);
    color: #fff !important;
    text-decoration: none;
    font-size: .85rem;
    font-weight: 600;
}
.mln-spatial-apple-link:hover { filter: brightness(1.08); }

/* Empty / read-only note */
.mln-spatial-empty {
    color: var(--mln-text-muted, #6b7280);
    font-size: .9rem;
    padding: .5rem 0;
}
