:root {
    --gal-ink: #12242b;
    --gal-muted: #55686c;
    --gal-line: rgba(18, 36, 43, 0.12);
    --gal-surface: #ffffff;
    --gal-night: #0b1a21;
    --gal-gold: #f5bd24;
    --gal-gold-soft: #ffe06a;
    --gal-amber: #d97e2e;
    --gal-blue: #2c6b8a;
    --gal-radius: 18px;
}

body {
    background:
        radial-gradient(1200px 500px at 85% 0%, rgba(245, 189, 36, 0.10), transparent 60%),
        radial-gradient(900px 500px at 0% 30%, rgba(44, 107, 138, 0.10), transparent 60%),
        linear-gradient(180deg, #eef4f4 0, #fbfaf6 26rem, #f6f5ef 100%);
}

/* ---------- Compact header ---------- */
.gallery-header {
    border-bottom: 1px solid rgba(18, 36, 43, 0.12);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 6px 24px rgba(18, 36, 43, 0.05);
}

.gallery-header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0.65rem 28px 0.7rem;
}

.gallery-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
}

.gallery-brand { min-width: 0; }
.gallery-brand p {
    margin: 0 0 0.2rem;
    color: var(--gal-muted);
    font: 600 0.65rem var(--font-body);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.gallery-brand h1 {
    margin: 0;
    color: var(--gal-ink);
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 2.5vw, 2rem);
    font-weight: 600;
    line-height: 1.1;
}
.gallery-brand h1 span { color: var(--gal-blue); }
.gallery-brand h1 span::before { content: " / "; color: #c4a452; }

.gallery-logos {
    display: flex;
    flex: none;
    align-items: center;
    gap: clamp(0.7rem, 2vw, 1.6rem);
}
.gallery-logos img {
    width: clamp(42px, 5vw, 64px);
    height: 56px;
    object-fit: contain;
}

.gallery-theme {
    margin: 0.55rem 0 0;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(18, 36, 43, 0.09);
    color: var(--gal-muted);
    font-size: 0.84rem;
    line-height: 1.4;
}
.gallery-theme span {
    margin-right: 0.6rem;
    color: #a46828;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* ---------- Summary ---------- */
.gallery-main { padding-top: 1.15rem; }
.gallery-summary, .showcase, .mosaic-section { padding: 0; }

.gallery-summary {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    max-width: 760px;
    margin: 0 auto 2.4rem;
    overflow: hidden;
    border: 1px solid var(--gal-line);
    border-radius: 14px;
    background: var(--gal-line);
    box-shadow: 0 18px 40px rgba(18, 36, 43, 0.12);
}

.gallery-stat {
    padding: 1rem;
    text-align: center;
    background: var(--gal-surface);
}

.gallery-stat strong {
    display: block;
    color: var(--gal-blue);
    font-family: var(--font-display);
    font-size: 1.8rem;
    line-height: 1;
}

.gallery-stat span {
    display: block;
    margin-top: 0.45rem;
    color: var(--gal-muted);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.gallery-actions {
    display: grid;
    justify-items: center;
    gap: 0.45rem;
    margin-bottom: 1.5rem;
    padding: 0;
}
.gallery-action-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.7rem;
}
.gallery-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 44px;
    padding: 0.7rem 1.2rem;
    border: 1px solid transparent;
    border-radius: 10px;
    font: 700 0.86rem var(--font-body);
    text-decoration: none;
    cursor: pointer;
}
.gallery-action:disabled { cursor: not-allowed; }
.gallery-action svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.gallery-action-primary {
    border-color: #d3b45e;
    background: #f3d16f;
    color: #392b09;
}
.gallery-action-secondary {
    border-color: #aebfc2;
    background: #eff4f3;
    color: #29484d;
}
.gallery-actions p {
    margin: 0;
    color: var(--gal-muted);
    font-size: 0.75rem;
}

/* ---------- Section headings & album chips ---------- */
.gallery-section-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.8rem 1.5rem;
    margin-bottom: 1.1rem;
}

.gallery-section-heading h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 2.6vw, 1.9rem);
    font-weight: 600;
    color: var(--gal-ink);
}

.gallery-section-heading p {
    margin: 0;
    color: var(--gal-muted);
    font-size: 0.92rem;
}

.album-chips {
    display: flex;
    gap: 0.45rem;
    overflow-x: auto;
    padding: 0.2rem;
    scrollbar-width: none;
}
.album-chips::-webkit-scrollbar { display: none; }

.chip {
    flex: none;
    padding: 0.5rem 0.95rem;
    border: 1px solid var(--gal-line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.8);
    color: var(--gal-ink);
    font: 600 0.82rem var(--font-body);
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}
.chip:hover { transform: translateY(-1px); border-color: var(--gal-blue); }
.chip[aria-pressed="true"] {
    border-color: var(--gal-ink);
    background: var(--gal-ink);
    color: #fff;
}
.chip small { margin-left: 0.35rem; opacity: 0.65; font-weight: 500; }

/* ---------- Stage (slideshow) ---------- */
.showcase { margin-bottom: 1.8rem; }
.gallery-section-heading .eyebrow { margin-bottom: 0.3rem; }

.stage {
    position: relative;
    overflow: hidden;
    width: 100%;
    border-radius: var(--gal-radius);
    background: radial-gradient(circle at 50% 40%, #254553, #0b1a21 75%);
    box-shadow: 0 30px 70px rgba(11, 26, 33, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
    isolation: isolate;
    outline: none;
}
.stage:focus-visible { box-shadow: 0 0 0 3px var(--gal-gold), 0 30px 70px rgba(11, 26, 33, 0.35); }

.gallery-carousel {
    height: clamp(340px, 43vw, 520px);
    max-width: none;
    margin: 0;
    padding: 0;
}
.gallery-carousel .photo-coverflow-stage { position: absolute; inset: 0; height: auto; }
.gallery-carousel .photo-coverflow-slide {
    top: var(--gallery-y);
    left: var(--gallery-x);
    width: var(--gallery-width);
    height: var(--gallery-height);
    max-height: none;
    aspect-ratio: auto;
    border: 2px solid rgba(255, 255, 255, 0.32);
    border-radius: 12px;
    transform: translate(-50%, -50%);
    transition: left 0.9s ease, top 0.9s ease, width 0.9s ease, height 0.9s ease, opacity 0.9s ease;
}
.gallery-carousel .photo-coverflow-slide[data-pos] {
    filter: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.gallery-carousel .photo-coverflow-slide[data-pos="0"] {
    --gallery-x: 50%; --gallery-y: 50%; --gallery-width: 48%; --gallery-height: 86%;
    z-index: 5;
    border-color: rgba(255, 255, 255, 0.75);
}
.gallery-carousel .photo-coverflow-slide[data-pos="-2"] {
    --gallery-x: 13%; --gallery-y: 27%; --gallery-width: 22%; --gallery-height: 39%;
}
.gallery-carousel .photo-coverflow-slide[data-pos="-1"] {
    --gallery-x: 13%; --gallery-y: 73%; --gallery-width: 22%; --gallery-height: 39%;
}
.gallery-carousel .photo-coverflow-slide[data-pos="1"] {
    --gallery-x: 87%; --gallery-y: 27%; --gallery-width: 22%; --gallery-height: 39%;
}
.gallery-carousel .photo-coverflow-slide[data-pos="2"] {
    --gallery-x: 87%; --gallery-y: 73%; --gallery-width: 22%; --gallery-height: 39%;
}
.gallery-carousel .photo-coverflow-slide[data-pos="-3"] {
    --gallery-x: -12%; --gallery-y: 73%; --gallery-width: 22%; --gallery-height: 39%;
}
.gallery-carousel .photo-coverflow-slide[data-pos="3"] {
    --gallery-x: 112%; --gallery-y: 27%; --gallery-width: 22%; --gallery-height: 39%;
}
.gallery-carousel .photo-coverflow-slide[data-pos="-3"],
.gallery-carousel .photo-coverflow-slide[data-pos="3"] { opacity: 0; pointer-events: none; }
.gallery-carousel .photo-coverflow-slide.is-wrapping { transition: none; }
.gallery-carousel .photo-coverflow-slide:focus-visible { outline: 3px solid var(--gal-gold-soft); outline-offset: -3px; }
.gallery-carousel .photo-coverflow-slide[data-pos="0"] img { object-fit: contain; background: #09151b; }
.gallery-carousel .photo-coverflow-caption { display: none; }

.stage-status {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 9;
    max-width: min(80%, 360px);
    padding: 0.8rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    text-align: center;
    color: #fff;
    background: rgba(11, 26, 33, 0.94);
    transform: translate(-50%, -50%);
    pointer-events: none;
}
.stage-status[hidden] { display: none; }
.stage-status p { margin: 0; max-width: 46ch; line-height: 1.55; }
.stage-status strong { color: var(--gal-gold-soft); font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; }

.loader {
    width: 42px;
    height: 42px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--gal-gold);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.stage-top {
    position: absolute;
    top: 9%;
    left: 27%;
    right: 27%;
    z-index: 7;
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
}
.stage-top > * { pointer-events: auto; }

.stage-counter {
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(11, 26, 33, 0.55);
    backdrop-filter: blur(8px);
    color: #fff;
    font: 500 0.78rem var(--font-mono);
    letter-spacing: 0.08em;
}

.icon-btn {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    background: rgba(11, 26, 33, 0.5);
    backdrop-filter: blur(8px);
    color: #fff;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}
.icon-btn:hover, .icon-btn:focus-visible { background: rgba(255, 255, 255, 0.2); transform: scale(1.06); }

.showcase svg, .mosaic svg, .gallery-note svg, .download-dialog svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.play-btn .icon-play { display: none; fill: currentColor; stroke: none; }
.stage.is-paused .play-btn .icon-play { display: block; }
.stage.is-paused .play-btn .icon-pause { display: none; }

.stage-nav {
    position: absolute;
    top: 50%;
    z-index: 7;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin-top: 0;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    background: rgba(11, 26, 33, 0.4);
    backdrop-filter: blur(8px);
    color: #fff;
    cursor: pointer;
    opacity: 1;
    transform: translateY(-50%);
    transition: opacity 0.25s, background 0.2s, transform 0.2s;
}
.stage-nav svg { width: 24px; height: 24px; }
.stage-nav.prev { left: 1rem; }
.stage-nav.next { right: 1rem; }
.stage:hover .stage-nav, .stage:focus-within .stage-nav { opacity: 1; }
.stage-nav:hover { background: rgba(255, 255, 255, 0.22); transform: translateY(-50%) scale(1.06); }

.stage-bar {
    position: absolute;
    left: 26%;
    right: 26%;
    bottom: 7%;
    z-index: 7;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    padding: 3.5rem 1.2rem 1.1rem;
    background: linear-gradient(0deg, rgba(5, 14, 18, 0.85), rgba(5, 14, 18, 0));
    border-radius: 0 0 12px 12px;
}

.stage-caption { min-width: 0; color: #fff; }
.caption-album {
    display: inline-block;
    margin-bottom: 0.35rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: rgba(245, 189, 36, 0.18);
    color: var(--gal-gold-soft);
    font: 500 0.7rem var(--font-mono);
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.caption-title {
    display: block;
    overflow: hidden;
    font-family: var(--font-display);
    font-size: clamp(1rem, 2vw, 1.35rem);
    white-space: nowrap;
    text-overflow: ellipsis;
}

.stage-controls { display: flex; flex: none; align-items: center; gap: 0.6rem; }

.download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.15rem;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--gal-gold-soft), var(--gal-gold) 55%, #e39a1c);
    color: #2a1a00;
    font: 700 0.88rem var(--font-body);
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(245, 189, 36, 0.35);
    transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
}
.download-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(245, 189, 36, 0.45); }
.download-btn:disabled { cursor: not-allowed; filter: grayscale(0.7); opacity: 0.6; }
.download-btn.wide { width: 100%; padding: 0.85rem 1.2rem; font-size: 0.95rem; }

/* Fullscreen */
.stage:fullscreen { width: 100%; height: 100%; max-height: none; border-radius: 0; }
.stage:-webkit-full-screen { width: 100%; height: 100%; max-height: none; border-radius: 0; }

/* ---------- Filmstrip ---------- */
.filmstrip {
    display: flex;
    gap: 0.6rem;
    margin-top: 0.9rem;
    padding: 0.35rem 0.2rem 0.6rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
}

.thumb {
    position: relative;
    flex: none;
    width: 112px;
    aspect-ratio: 4 / 3;
    padding: 0;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 10px;
    background: #d9e4e4;
    cursor: pointer;
    opacity: 0.6;
    scroll-snap-align: center;
    transition: opacity 0.25s, transform 0.25s, border-color 0.25s;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb:hover { opacity: 0.9; transform: translateY(-2px); }
.thumb[aria-current="true"] {
    border-color: var(--gal-gold);
    opacity: 1;
    box-shadow: 0 6px 18px rgba(245, 189, 36, 0.35);
}

/* ---------- Mosaic grid ---------- */
.mosaic-section { margin-bottom: 3rem; }

.mosaic {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    grid-auto-rows: 180px;
    grid-auto-flow: dense;
    gap: 0.75rem;
}

.tile {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    background: linear-gradient(110deg, #e2eaea 30%, #f1f5f5 50%, #e2eaea 70%) 0 0 / 200% 100%;
    animation: shimmer 1.4s linear infinite;
    box-shadow: 0 6px 18px rgba(18, 36, 43, 0.08);
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.3s;
}
.tile.is-visible { opacity: 1; transform: none; }
.tile.is-loaded { animation: none; background: #dfe7e7; }
.tile.wide { grid-column: span 2; }
.tile.tall { grid-row: span 2; }
@keyframes shimmer { to { background-position: -200% 0; } }

.tile-open {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: zoom-in;
}
.tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease, filter 0.4s;
}
.tile:hover { box-shadow: 0 16px 36px rgba(18, 36, 43, 0.22); }
.tile:hover img { transform: scale(1.06); }

.tile-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 2.2rem 0.75rem 0.7rem;
    background: linear-gradient(0deg, rgba(5, 14, 18, 0.8), transparent);
    color: #fff;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
}
.tile:hover .tile-overlay, .tile:focus-within .tile-overlay { opacity: 1; transform: none; }
.tile-overlay span {
    overflow: hidden;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.tile-download {
    flex: none;
    width: 36px;
    height: 36px;
    border-color: transparent;
    background: var(--gal-gold);
    color: #2a1a00;
    pointer-events: auto;
}
.tile-download:hover, .tile-download:focus-visible { background: var(--gal-gold-soft); }
.tile-download svg { width: 18px; height: 18px; }

.mosaic-empty {
    grid-column: 1 / -1;
    padding: 2.5rem 1rem;
    border: 1px dashed var(--gal-line);
    border-radius: 14px;
    text-align: center;
    color: var(--gal-muted);
}

.mosaic-more { display: flex; justify-content: center; margin-top: 1.4rem; }
.mosaic-more [hidden] { display: none; }

/* ---------- Note ---------- */
.gallery-note {
    display: flex;
    gap: 1.1rem;
    margin-bottom: 3rem;
    padding: 1.3rem 1.4rem;
    border: 1px solid rgba(217, 126, 46, 0.25);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255, 244, 214, 0.75), rgba(255, 255, 255, 0.85));
}
.note-icon {
    display: grid;
    flex: none;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: rgba(217, 126, 46, 0.14);
    color: var(--gal-amber);
}
.gallery-note h4 { margin: 0 0 0.35rem; font-size: 1rem; color: var(--gal-ink); }
.gallery-note p { margin: 0; color: var(--gal-muted); font-size: 0.9rem; line-height: 1.6; }

/* ---------- Download dialog ---------- */
.download-dialog {
    width: min(760px, calc(100% - 2rem));
    padding: 0;
    border: 0;
    border-radius: 22px;
    background: transparent;
    color: var(--gal-ink);
    overflow: visible;
}
.download-dialog::backdrop {
    background: rgba(6, 16, 21, 0.68);
    backdrop-filter: blur(6px);
}
.download-dialog[open] { animation: dialog-in 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
@keyframes dialog-in {
    from { opacity: 0; transform: translateY(18px) scale(0.97); }
    to { opacity: 1; transform: none; }
}

.download-card {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    overflow: hidden;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 40px 90px rgba(0, 0, 0, 0.4);
}
.download-dialog.is-bulk .download-card { grid-template-columns: 1fr; }
.download-dialog.is-bulk .download-preview,
.download-dialog.is-bulk .download-name { display: none; }

.dialog-close {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(18, 36, 43, 0.06);
    color: var(--gal-ink);
    cursor: pointer;
}
.dialog-close:hover { background: rgba(18, 36, 43, 0.12); }

.download-preview { min-height: 260px; background: var(--gal-night); }
.download-preview img { width: 100%; height: 100%; object-fit: cover; }

.download-body { padding: 1.8rem 1.6rem 1.5rem; }
.download-body h3 {
    margin: 0.5rem 0 0.2rem;
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 600;
}
.download-name {
    margin: 0 0 1.2rem;
    overflow: hidden;
    color: var(--gal-muted);
    font: 0.8rem var(--font-mono);
    white-space: nowrap;
    text-overflow: ellipsis;
}

.field { display: block; margin-bottom: 0.8rem; }
.field span { display: block; margin-bottom: 0.4rem; font-size: 0.82rem; font-weight: 600; }
.field input {
    width: 100%;
    padding: 0.8rem 0.95rem;
    border: 1.5px solid rgba(18, 36, 43, 0.18);
    border-radius: 12px;
    background: #fbfcfc;
    color: var(--gal-ink);
    font: 500 0.95rem var(--font-body);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus { outline: none; border-color: var(--gal-blue); box-shadow: 0 0 0 4px rgba(44, 107, 138, 0.15); }
.field input[aria-invalid="true"] { border-color: #c0392b; box-shadow: 0 0 0 4px rgba(192, 57, 43, 0.12); }

.remember {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.9rem;
    color: var(--gal-muted);
    font-size: 0.82rem;
    cursor: pointer;
}
.remember input { width: 16px; height: 16px; accent-color: var(--gal-blue); }

.form-message { min-height: 1.2em; margin: 0 0 0.7rem; font-size: 0.84rem; line-height: 1.45; }
.form-message.is-error { color: #b03a2e; }
.form-message.is-success { color: #2f7a55; }
.form-message a { color: var(--gal-blue); font-weight: 600; }

.privacy-line { margin: 0.8rem 0 0; color: var(--gal-muted); font-size: 0.74rem; text-align: center; }

.btn-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(42, 26, 0, 0.25);
    border-top-color: #2a1a00;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ---------- Responsive & motion ---------- */
@media (max-width: 760px) {
    .gallery-header-inner { padding-inline: 16px; }
    .gallery-logos { gap: 0.6rem; }
    .gallery-logos img { width: 42px; height: 46px; }
    .gallery-main { padding-inline: 16px; }
    .gallery-stat { padding: 0.8rem 0.4rem; }
    .gallery-stat strong { font-size: 1.4rem; }
    .stage { border-radius: 14px; }
    .gallery-carousel { height: clamp(330px, 68vw, 480px); }
    .stage-nav { opacity: 1; width: 40px; height: 40px; }
    .stage-nav.prev { left: 0.5rem; }
    .stage-nav.next { right: 0.5rem; }
    .stage-bar { padding: 2.5rem 0.8rem 0.8rem; }
    .stage-controls .download-btn { padding: 0.6rem 0.85rem; font-size: 0; gap: 0; }
    .stage-controls .download-btn svg { width: 20px; height: 20px; }
    .thumb { width: 84px; }
    .mosaic { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 140px; gap: 0.5rem; }
    .tile.wide { grid-column: span 2; }
    .tile-overlay { opacity: 1; transform: none; }
    .download-card { grid-template-columns: 1fr; }
    .download-preview { min-height: 0; height: 170px; }
    .gallery-note { flex-direction: column; }
}

@media (max-width: 600px) {
    .gallery-brand p { font-size: 0.58rem; letter-spacing: 0.07em; }
    .gallery-brand h1 { font-size: clamp(1.05rem, 4.2vw, 1.45rem); }
    .gallery-brand h1 span { display: block; }
    .gallery-brand h1 span::before { content: none; }
    .gallery-logos { gap: 0.35rem; }
    .gallery-logos img { width: 38px; height: 42px; }
    .gallery-theme { font-size: 0.76rem; }
    .gallery-action-buttons { width: 100%; }
    .gallery-action { flex: 1 1 220px; }
    .gallery-carousel { height: clamp(390px, 125vw, 540px); }
    .gallery-carousel .photo-coverflow-slide[data-pos="-2"],
    .gallery-carousel .photo-coverflow-slide[data-pos="-1"],
    .gallery-carousel .photo-coverflow-slide[data-pos="1"],
    .gallery-carousel .photo-coverflow-slide[data-pos="2"] { opacity: 1; visibility: visible; pointer-events: auto; }
    .gallery-carousel .photo-coverflow-slide[data-pos="0"] {
        --gallery-x: 50%; --gallery-y: 50%; --gallery-width: 92%; --gallery-height: 52%;
    }
    .gallery-carousel .photo-coverflow-slide[data-pos="-2"] {
        --gallery-x: 27%; --gallery-y: 12%; --gallery-width: 43%; --gallery-height: 20%;
    }
    .gallery-carousel .photo-coverflow-slide[data-pos="-1"] {
        --gallery-x: 73%; --gallery-y: 12%; --gallery-width: 43%; --gallery-height: 20%;
    }
    .gallery-carousel .photo-coverflow-slide[data-pos="1"] {
        --gallery-x: 27%; --gallery-y: 88%; --gallery-width: 43%; --gallery-height: 20%;
    }
    .gallery-carousel .photo-coverflow-slide[data-pos="2"] {
        --gallery-x: 73%; --gallery-y: 88%; --gallery-width: 43%; --gallery-height: 20%;
    }
    .gallery-carousel .photo-coverflow-slide[data-pos="-3"] {
        --gallery-x: -22%; --gallery-y: 12%; --gallery-width: 43%; --gallery-height: 20%;
    }
    .gallery-carousel .photo-coverflow-slide[data-pos="3"] {
        --gallery-x: 122%; --gallery-y: 88%; --gallery-width: 43%; --gallery-height: 20%;
    }
    .stage-top { top: 26%; left: 6%; right: 6%; }
    .stage-bar { left: 4%; right: 4%; bottom: 24%; }
}

@media (prefers-reduced-motion: reduce) {
    .gallery-carousel .photo-coverflow-slide, .tile, .tile img, .thumb { transition: none; }
    .tile { opacity: 1; transform: none; animation: none; }
    .download-dialog[open] { animation: none; }
}
