.site-module[data-module="galen"] {
    --galen-purple: var(--logo-purple);
    --galen-red: var(--logo-red);
    --galen-bg: var(--page-bg);
    --galen-text: var(--text-primary);
    --galen-muted: var(--text-muted);
    --galen-serif: var(--font-serif, Georgia, serif);
    background-color: var(--galen-bg);
    padding: var(--section-padding);
    position: relative;
    z-index: 1;
    max-width: 100%;
}

.site-module[data-module="galen"] .site-module__inner {
    width: 100%;
}

.galen-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.28fr);
    gap: 24px 4px;
    align-items: center;
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.galen-copy {
    position: relative;
    z-index: 2;
    min-width: 0;
    max-width: 100%;
}

.galen-copy .site-module__title {
    font-family: var(--galen-serif);
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    font-weight: 600;
    color: var(--galen-purple);
    line-height: 1.15;
    text-align: left;
    margin-bottom: 12px;
}

.galen-copy .site-module__subtitle {
    font-size: 1.05rem;
    font-weight: 300;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--galen-muted);
    text-align: left;
    margin-bottom: 10px;
}

.galen-copy__when {
    margin-bottom: 28px;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--galen-red);
    flex-wrap: wrap;
    min-width: 0;
    max-width: 100%;
}

.galen-copy p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--galen-text);
    margin-bottom: 16px;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.galen-copy__quote {
    margin: 8px 0 16px;
    padding: 18px 22px;
    border-radius: var(--radius, 18px);
    background: var(--surface-panel);
    font-family: var(--galen-serif);
    font-size: 1.15rem;
    font-style: italic;
    color: var(--galen-purple);
}

.galen-photos {
    position: relative;
    margin: 4px 0 28px;
    padding-bottom: 16px;
    min-width: 0;
    max-width: 100%;
}

.galen-photos__stack {
    position: relative;
    width: min(100%, 400px);
    max-width: 100%;
    aspect-ratio: 4 / 3;
    margin: 0 auto;
    cursor: pointer;
}

.galen-photos__print {
    position: absolute;
    inset: 0;
    margin: 0;
    padding: 10px 10px 26px;
    background-color: var(--surface-solid);
    background-image: var(--surface-card);
    box-shadow:
        0 1px 2px var(--shadow-plum),
        0 6px 18px var(--shadow-plum);
    transform-origin: center center;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    -webkit-user-drag: none;
}

.galen-photos__print[data-stack="0"] {
    z-index: 1;
    transform: rotate(-5.5deg) translate(-14px, 12px) scale(0.955);
}

.galen-photos__print[data-stack="1"] {
    z-index: 2;
    transform: rotate(4.5deg) translate(10px, -8px) scale(0.975);
}

.galen-photos__print[data-stack="2"] {
    z-index: 3;
    transform: rotate(-2deg) translate(3px, -3px) scale(1);
}

.galen-photos__print.is-shuffling {
    z-index: 4;
    animation: galen-photo-to-back 0.85s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes galen-photo-to-back {
    0% {
        transform: rotate(-2deg) translate(3px, -3px) scale(1);
    }

    38% {
        transform: rotate(1.5deg) translate(0, -30px) scale(1.03);
    }

    68% {
        transform: rotate(-4deg) translate(-22px, 6px) scale(0.96);
    }

    100% {
        transform: rotate(-5.5deg) translate(-14px, 12px) scale(0.955);
    }
}

.galen-photos__print img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 4 / 3;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

.galen-photos__shadow {
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 68%;
    height: 16px;
    transform: translateX(-50%);
    border-radius: 50%;
    background: var(--shadow-plum);
    filter: blur(11px);
    pointer-events: none;
}

.galen-stage {
    position: relative;
    z-index: 0;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    aspect-ratio: 0.78;
    min-height: 560px;
    overflow: visible;
    touch-action: none;
    cursor: grab;
    user-select: none;
}

.galen-stage.is-dragging {
    cursor: grabbing;
}

.galen-stage__glow {
    position: absolute;
    width: 118%;
    height: 112%;
    left: 50%;
    top: 48%;
    transform: translate(-52%, -50%);
    border-radius: 50%;
    background: var(--purple-glow);
    opacity: 0.28;
    filter: blur(58px);
    pointer-events: none;
    z-index: 0;
}

.galen-stage__shadow {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 62%;
    height: 86%;
    transform: translate(-46%, -52%);
    border-radius: 50%;
    background: var(--shadow-plum);
    filter: blur(34px);
    pointer-events: none;
    z-index: 1;
}

.galen-stage canvas {
    position: relative;
    z-index: 2;
    display: block;
    width: 100%;
    max-width: 100%;
    height: 100%;
    pointer-events: none;
}

.galen-stage__status {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    text-align: center;
    pointer-events: none;
}

.galen-stage__spinner {
    width: 42px;
    height: 42px;
    border: 3px solid var(--border-purple-strong);
    border-top-color: var(--galen-purple);
    border-radius: 50%;
    animation: galen-spinner 0.75s linear infinite;
}

.galen-stage__status-message {
    margin: 0;
    max-width: 240px;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--galen-muted);
}

.galen-stage__status.is-error .galen-stage__spinner {
    display: none;
}

@keyframes galen-spinner {
    to {
        transform: rotate(360deg);
    }
}

.galen-stage.is-ready .galen-stage__status {
    display: none;
}

@media (prefers-reduced-motion: reduce) {
    .galen-photos__print {
        transition: none;
    }

    .galen-photos__print.is-shuffling {
        animation: none;
    }

    .galen-stage__spinner {
        animation-duration: 1.4s;
    }
}

@media (max-width: 767px) {
    .site-module[data-module="galen"] {
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }

    .galen-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .galen-copy .site-module__title,
    .galen-copy .site-module__subtitle {
        text-align: center;
    }

    .galen-copy__when {
        text-align: center;
        justify-content: center;
    }

    .galen-photos__stack {
        width: min(100%, 340px);
    }

    .galen-stage {
        min-height: 460px;
        aspect-ratio: 0.86;
    }

    .galen-stage__glow {
        width: 120%;
        height: 120%;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        opacity: 0.24;
    }

    .galen-stage__shadow {
        width: 68%;
        height: 80%;
        transform: translate(-48%, -52%);
    }
}
