.sp-radial-stage-wrap {
    --sp-bg: #17181a;
    --sp-tile-bg: #1c1d1f;
    --sp-line: #2b2c2e;
    --sp-pearl: #eae7e0;
    --sp-pearl-dim: #9a9992;
    --sp-pearl-faint: #616160;

    width: 100%;
    padding: 2rem 0 3rem;
    font-family: 'Inter', sans-serif;
}

/* A responsive "cloud" -- tiles wrap based on their own size, no fixed
 * stage dimensions and no JS positioning. Works at any viewport width. */
.sp-radial-stage {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 22px;
    max-width: 1400px;
    margin: 0 auto;
}

.sp-tile {
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    overflow: hidden;
    background: var(--sp-tile-bg);
    border: 1px solid var(--sp-line);
    cursor: pointer;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
    flex: 0 0 auto;
    max-width: 90vw;
    max-height: 90vw;
}
.sp-tile:hover {
    transform: scale(1.05) translateY(-4px);
    box-shadow: 0 20px 48px rgba(0,0,0,0.45);
    border-color: #3f4042;
    z-index: 5;
}

.sp-tile-imgwrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    min-height: 0;
}
.sp-tile-img { object-fit: contain; border-radius: 10px; }

.sp-tile-cap { padding: 0 14px 12px; text-align: center; }
.sp-tile-t { font-weight: 500; color: var(--sp-pearl); line-height: 1.25; }

@media (max-width: 700px) {
    .sp-radial-stage { gap: 14px; }
}

/* Detail sidebar -- docks to the right, ~half the screen, instead of a
 * centered popup. */
.sp-scrim {
    position: fixed; inset: 0;
    background: rgba(10,11,10,0.6);
    opacity: 0; pointer-events: none;
    transition: opacity .3s;
    z-index: 100000;
}
.sp-scrim.sp-open { opacity: 1; pointer-events: auto; }

.sp-sidebar {
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: 55vw;
    min-width: 480px;
    max-width: 900px;
    z-index: 100001;
    pointer-events: none;
    transform: translateX(100%);
    transition: transform .35s ease;
}
.sp-sidebar.sp-open {
    transform: translateX(0);
    pointer-events: auto;
}

.sp-sidebar-body {
    position: relative;
    height: 100%;
    background: var(--sp-tile-bg, #1c1d1f);
    border-left: 1px solid var(--sp-line, #2b2c2e);
    color: var(--sp-pearl, #eae7e0);
    font-family: 'Inter', sans-serif;
    display: flex;
    flex-direction: column;
    box-shadow: -20px 0 60px rgba(0,0,0,0.35);
}

/* Only this inner area scrolls, so the close button (a sibling, not a
 * descendant) always stays put in the top-right corner regardless of
 * how long the description or carousel gets. */
.sp-sidebar-scroll {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 3rem 1.8rem 2.4rem;
}

.sp-sidebar-close {
    position: absolute; top: 18px; right: 20px;
    background: none; border: 1px solid #2b2c2e; color: #9a9992;
    border-radius: 6px; padding: 5px 12px; font-size: 12px; cursor: pointer;
    z-index: 2;
}
.sp-sidebar-close:hover { border-color: #616160; color: #eae7e0; }

.sp-raw-toggle {
    display: inline-flex; align-items: center; gap: 6px;
    font-family: 'JetBrains Mono', monospace; font-size: 12px;
    color: #9a9992; margin-bottom: 14px; cursor: pointer; user-select: none;
}
.sp-raw-toggle input { accent-color: #eae7e0; cursor: pointer; }
.sp-raw-toggle:hover { color: #eae7e0; }

/* Raw CAD shows underneath the render, more compact so it reads as a
 * secondary reference rather than competing with the main render. */
.sp-raw-section {
    margin-top: 1.4rem;
    padding-top: 1.2rem;
    border-top: 1px dashed #2b2c2e;
}
.sp-raw-section-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #616160;
    margin-bottom: 8px;
}
.sp-carousel-compact .sp-slide img { max-height: 26vh; }
.sp-carousel-compact .sp-arrow { width: 30px; height: 30px; font-size: 16px; }

.sp-carousel { position: relative; margin-bottom: 0.6rem; }
.sp-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    border-radius: 10px;
    gap: 0;
}
.sp-track::-webkit-scrollbar { display: none; }
.sp-slide {
    flex: 0 0 100%;
    scroll-snap-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    background: #101112;
    border-radius: 10px;
}
.sp-slide img {
    width: 100%;
    max-height: 58vh;
    object-fit: contain;
    display: block;
}
.sp-slide-label {
    position: absolute;
    top: 10px; left: 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #eae7e0;
    background: rgba(10,11,10,0.6);
    padding: 3px 8px;
    border-radius: 4px;
}
/* Short caption, right against the image -- distinct from the longer
 * description that appears further below. */
.sp-slide-caption {
    width: 100%;
    padding: 8px 14px;
    font-size: 13px;
    color: #9a9992;
    background: rgba(10,11,10,0.55);
    text-align: center;
    border-top: 1px solid #2b2c2e;
}
.sp-noshot {
    width: 100%; height: 260px;
    display: flex; align-items: center; justify-content: center; text-align: center;
    font-family: 'JetBrains Mono', monospace; font-size: 12px; color: #616160; padding: 0 20px;
}
.sp-arrow {
    position: absolute;
    top: 50%; transform: translateY(-50%);
    background: rgba(10,11,10,0.55);
    color: #eae7e0;
    border: 1px solid #2b2c2e;
    border-radius: 50%;
    width: 38px; height: 38px;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.sp-arrow:hover { background: rgba(10,11,10,0.85); border-color: #616160; }
.sp-arrow-prev { left: 10px; }
.sp-arrow-next { right: 10px; }
.sp-dots {
    display: flex; justify-content: center; gap: 8px;
    margin-top: 10px;
}
.sp-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #2b2c2e; border: none; padding: 0; cursor: pointer;
}
.sp-dot-active { background: #eae7e0; }

/* Longer, formatted per-image description -- updates as you move
 * through the carousel, sits below the image/caption. */
.sp-active-desc {
    font-size: 14px;
    color: #9a9992;
    line-height: 1.6;
    margin-top: 1rem;
}
.sp-active-desc p { margin: 0 0 0.8em; }
.sp-active-desc p:last-child { margin-bottom: 0; }
.sp-active-desc a { color: #eae7e0; text-decoration-color: #2b2c2e; }
.sp-active-desc a:hover { text-decoration-color: #eae7e0; }
.sp-active-desc strong { color: #eae7e0; font-weight: 600; }

.sp-sidebar-divider {
    border: none;
    border-top: 1px solid #2b2c2e;
    margin: 1.6rem 0;
}

.sp-modal-meta { display: flex; gap: .7rem; align-items: center; font-family: 'JetBrains Mono', monospace; font-size: 11.5px; color: #616160; margin-bottom: .5rem; }
.sp-tag { border: 1px solid #2b2c2e; border-radius: 3px; padding: 1px 6px; color: #9a9992; }
.sp-sidebar-body h2 { font-family: 'Space Grotesk', sans-serif; font-weight: 500; font-size: 22px; margin: 0 0 .5rem; color: #eae7e0; }

.sp-tabs {
    display: flex;
    gap: 4px;
    margin: 1.2rem 0 0;
    border-bottom: 1px solid #2b2c2e;
}
.sp-tab-btn {
    background: none;
    border: none;
    color: #9a9992;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 8px 4px 10px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}
.sp-tab-btn:hover { color: #eae7e0; }
.sp-tab-btn.sp-tab-active { color: #eae7e0; border-bottom-color: #eae7e0; }
.sp-tab-btn + .sp-tab-btn { margin-left: 18px; }
.sp-tab-panel { margin-top: 1.2rem; }

/* Overall project description -- distinct from the per-image ones above */
.sp-modal-desc { font-size: 14.5px; color: #9a9992; line-height: 1.6; }
.sp-modal-desc p { margin: 0 0 0.9em; }
.sp-modal-desc p:last-child { margin-bottom: 0; }
.sp-modal-desc a { color: #eae7e0; text-decoration-color: #2b2c2e; }
.sp-modal-desc a:hover { text-decoration-color: #eae7e0; }
.sp-modal-desc strong { color: #eae7e0; font-weight: 600; }

@media (max-width: 900px) {
    .sp-sidebar {
        width: 100vw;
        min-width: 0;
        max-width: none;
    }
    .sp-sidebar-scroll { padding: 3.2rem 1.4rem 2rem; }
}
