:root {
    --bg: #34383f;
    --panel: #292d33;
    --deep: #202329;
    --paper: #ececea;
    --text: #eef0ef;
    --muted: #a8adb2;
    --teal: #6f9996;
    --plum: #765160;
    --line: rgba(255, 255, 255, .08);
    --pixel: "Courier New", monospace;
    --body: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--text);
    font-family: var(--body);
    background:
        radial-gradient(circle at 10% 4%, rgba(92, 130, 129, .14), transparent 29rem),
        radial-gradient(circle at 91% 10%, rgba(118, 81, 96, .10), transparent 30rem),
        linear-gradient(90deg, var(--line) 1px, transparent 1px),
        linear-gradient(var(--line) 1px, transparent 1px),
        var(--bg);
    background-size: auto, auto, 30px 30px, 30px 30px, auto;
}

body.no-scroll {
    overflow: hidden;
}

.crt-glass {
    position: fixed;
    inset: 0;
    z-index: 100;
    pointer-events: none;
    opacity: .3;
    background:
        repeating-linear-gradient(to bottom, transparent 0 3px, rgba(0, 0, 0, .1) 3px 4px),
        radial-gradient(ellipse at center, transparent 58%, rgba(7, 9, 12, .06) 80%, rgba(4, 5, 7, .2));
}

.site-header,
.toolbar,
.status-panel,
.gallery,
.empty-state,
.site-footer {
    width: min(1180px, calc(100% - 32px));
    margin-inline: auto;
}

.site-header {
    min-height: clamp(250px, 31vw, 390px);
    margin-top: 24px;
    padding: clamp(30px, 5vw, 58px);
    padding-right: clamp(170px, 33vw, 430px);
    position: relative;
    overflow: hidden;
    isolation: isolate;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 12px;
    background:
        radial-gradient(circle at 18% 16%, rgba(255, 255, 255, .04), transparent 19rem),
        linear-gradient(145deg, #2c3037, var(--deep));
    box-shadow: 0 16px 34px rgba(13, 14, 17, .32);
}

.site-header::before {
    content: "";
    position: absolute;
    top: 0;
    right: clamp(25px, 7vw, 105px);
    bottom: 0;
    width: clamp(135px, 25vw, 300px);
    z-index: -2;
    background: linear-gradient(
        90deg,
        #173845 0 12%,
        #d7d0bd 12% 15%,
        #246a76 15% 27%,
        #d7d0bd 27% 30%,
        #4f9994 30% 42%,
        #d7d0bd 42% 45%,
        #9d7a3b 45% 57%,
        #d7d0bd 57% 60%,
        #bd6139 60% 72%,
        #d7d0bd 72% 75%,
        #7d302f 75% 87%,
        #d7d0bd 87% 90%,
        #4e2430 90% 100%
    );
    box-shadow: -18px 0 32px rgba(0, 0, 0, .18), 18px 0 32px rgba(0, 0, 0, .14);
}

.site-header::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, rgba(32, 35, 41, .98) 0 42%, rgba(32, 35, 41, .88) 54%, rgba(32, 35, 41, .18) 72%, transparent 88%);
}

.eyebrow {
    margin: 0 0 20px;
    color: rgba(236, 238, 237, .68);
    font-size: clamp(.62rem, 1.5vw, .76rem);
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

h1 {
    max-width: 9.5ch;
    margin: 0;
    color: #f0f1f1;
    font-family: var(--pixel);
    font-size: clamp(2.15rem, 7vw, 5.15rem);
    line-height: .95;
    letter-spacing: -.055em;
    text-transform: uppercase;
    text-shadow: 0 3px 0 rgba(0, 0, 0, .45);
}

.subtitle {
    max-width: 540px;
    margin: 28px 0 0;
    color: rgba(236, 238, 237, .76);
    font-size: clamp(.82rem, 1.8vw, 1rem);
    line-height: 1.7;
}

.toolbar {
    min-height: 86px;
    margin-top: 22px;
    padding: 17px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: end;
    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: 12px;
    background: linear-gradient(145deg, #33373e, #292d33);
    box-shadow: 0 12px 28px rgba(12, 14, 17, .24);
}

.filter-field {
    min-width: 190px;
    display: grid;
    gap: 7px;
}

.search-field {
    flex: 1 1 280px;
}

.filter-field span {
    color: var(--muted);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

input,
select,
button {
    font: inherit;
}

input,
select {
    min-height: 46px;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 7px;
    color: var(--text);
    outline: none;
    background: #20242a;
}

input:focus,
select:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(111, 153, 150, .16);
}

select option {
    background: var(--deep);
}

button {
    min-height: 46px;
    padding: 10px 16px;
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 7px;
    color: #e4e5e7;
    background: linear-gradient(180deg, rgba(255, 255, 255, .04), transparent), #444951;
    box-shadow: 0 3px 0 #1c1f24;
    cursor: pointer;
}

button:hover {
    filter: brightness(1.08);
}

.download-set-button {
    min-height: 46px;
    padding: 10px 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 7px;
    color: #e4e5e7;
    background: linear-gradient(180deg, rgba(255, 255, 255, .04), transparent), #444951;
    box-shadow: 0 3px 0 #1c1f24;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .035em;
    text-decoration: none;
    white-space: nowrap;
}

.download-set-button:hover,
.download-set-button:focus-visible {
    filter: brightness(1.08);
    outline: none;
    border-color: rgba(136, 170, 167, .55);
}

.view-only-badge {
    min-height: 46px;
    padding: 10px 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed rgba(255, 255, 255, .2);
    border-radius: 7px;
    color: var(--muted);
    background: rgba(18, 21, 26, .42);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-align: center;
}

.gallery-count {
    margin-left: auto;
    align-self: center;
    color: var(--muted);
    font-size: .76rem;
}

.status-panel {
    margin-top: 18px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: .72rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--teal);
    box-shadow: 0 0 12px rgba(111, 153, 150, .7);
}

.gallery {
    margin-top: 8px;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 18px;
    padding-bottom: 45px;
}

.photo-card {
    grid-column: span 4;
    min-width: 0;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, .11);
    border-radius: 10px;
    background: var(--panel);
    box-shadow: 0 14px 26px rgba(13, 14, 17, .28);
    cursor: pointer;
    transform: translateY(0);
    transition: transform .18s ease, border-color .18s ease;
}

.photo-card:nth-child(5n + 1),
.photo-card:nth-child(5n + 4) {
    grid-column: span 6;
}

.photo-card:hover,
.photo-card:focus-visible {
    transform: translateY(-4px);
    border-color: rgba(136, 170, 167, .55);
    outline: none;
}

.photo-frame {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #16191e;
}

.photo-card:nth-child(5n + 1) .photo-frame,
.photo-card:nth-child(5n + 4) .photo-frame {
    aspect-ratio: 16 / 10;
}

.photo-frame img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .45s cubic-bezier(.16, 1, .3, 1), filter .2s ease;
}

.photo-card:hover img {
    transform: scale(1.025);
}

.photo-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, transparent 66%, rgba(0, 0, 0, .15));
}

.photo-info {
    padding: 14px 15px 16px;
}

.photo-title {
    margin: 0;
    color: var(--paper);
    font-size: .88rem;
    line-height: 1.35;
}

.photo-meta {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: .66rem;
}

.tag {
    padding: 3px 6px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 4px;
}

.empty-state {
    margin-top: 30px;
    padding: 70px 24px;
    border: 1px dashed rgba(255, 255, 255, .16);
    border-radius: 12px;
    text-align: center;
    background: rgba(32, 35, 41, .48);
}

.empty-kicker {
    color: var(--plum);
    font-weight: 700;
    letter-spacing: .2em;
}

.empty-state h2 {
    margin: 10px 0;
}

.empty-state p {
    color: var(--muted);
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 90;
    padding: 28px;
    display: grid;
    place-items: center;
    background: rgba(9, 11, 14, .94);
    backdrop-filter: blur(12px);
}

.lightbox[hidden] {
    display: none;
}

.lightbox-figure {
    width: min(1120px, calc(100vw - 130px));
    height: min(82vh, 820px);
    margin: 0;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 14px;
}

.lightbox-figure img {
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: contain;
}

.lightbox-figure figcaption {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 20px;
    color: var(--paper);
}

.lightbox-figure figcaption span {
    color: var(--muted);
    font-size: .74rem;
}

.lightbox-close,
.lightbox-nav,
.fullscreen-button {
    position: absolute;
    z-index: 2;
}

.lightbox-close {
    top: 18px;
    right: 18px;
    width: 48px;
    padding: 0;
    font-size: 1.6rem;
}

.lightbox-nav {
    top: 50%;
    width: 52px;
    padding: 0;
    transform: translateY(-50%);
    font-size: 2rem;
}

.lightbox-nav.previous {
    left: 18px;
}

.lightbox-nav.next {
    right: 18px;
}

.fullscreen-button {
    left: 18px;
    bottom: 18px;
}

.site-footer {
    padding: 22px 0 36px;
    display: flex;
    justify-content: space-between;
    color: var(--muted);
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.site-footer a {
    color: inherit;
    text-decoration: none;
    opacity: .45;
}

.site-footer a:hover {
    opacity: 1;
}

@media (max-width: 850px) {
    .photo-card,
    .photo-card:nth-child(5n + 1),
    .photo-card:nth-child(5n + 4) {
        grid-column: span 6;
    }

    .site-header {
        padding-right: 34%;
    }
}

@media (max-width: 620px) {
    .site-header,
    .toolbar,
    .status-panel,
    .gallery,
    .empty-state,
    .site-footer {
        width: min(100% - 20px, 1180px);
    }

    .site-header {
        min-height: 310px;
        padding: 30px 22px;
        padding-bottom: 110px;
    }

    .site-header::before {
        top: auto;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 80px;
    }

    .site-header::after {
        background: linear-gradient(180deg, rgba(32, 35, 41, .99) 0 68%, rgba(32, 35, 41, .25) 100%);
    }

    .toolbar {
        align-items: stretch;
    }

    .filter-field,
    .search-field {
        flex: 1 1 100%;
    }

    .download-set-button {
        width: 100%;
    }

    .gallery-count {
        width: 100%;
        margin: 5px 0 0;
    }

    .photo-card,
    .photo-card:nth-child(5n + 1),
    .photo-card:nth-child(5n + 4) {
        grid-column: 1 / -1;
    }

    .photo-card .photo-frame,
    .photo-card:nth-child(5n + 1) .photo-frame,
    .photo-card:nth-child(5n + 4) .photo-frame {
        aspect-ratio: 4 / 3;
    }

    .lightbox {
        padding: 18px;
    }

    .lightbox-figure {
        width: calc(100vw - 36px);
        height: 78vh;
    }

    .lightbox-nav {
        top: auto;
        bottom: 16px;
    }

    .lightbox-nav.previous {
        left: calc(50% - 66px);
    }

    .lightbox-nav.next {
        right: calc(50% - 66px);
    }

    .fullscreen-button {
        display: none;
    }
}

/* Version 2 shared set/password components */
.header-signal {
    position: absolute;
    top: 24px;
    right: 26px;
    display: flex;
    gap: 16px;
    color: rgba(255,255,255,.78);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .12em;
    z-index: 3;
}

.timecode {
    position: absolute;
    right: 28px;
    bottom: 24px;
    color: rgba(255,255,255,.72);
    font-size: .72rem;
    letter-spacing: .11em;
    z-index: 3;
}

.vhs-tracking {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    top: -12vh;
    height: 9vh;
    pointer-events: none;
    z-index: 101;
}

.set-header h1 {
    max-width: 13ch;
    font-size: clamp(2rem, 6.4vw, 4.8rem);
}

.access-card {
    width: min(620px, calc(100% - 32px));
    margin: 28px auto 80px;
    padding: clamp(28px, 6vw, 54px);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 12px;
    background: rgba(25,28,34,.88);
    box-shadow: 0 18px 40px rgba(0,0,0,.34);
}

.access-card h2 { margin: 8px 0 10px; }
.access-card > p:not(.empty-kicker) { color: var(--muted); line-height: 1.65; }
.access-form { display: grid; gap: 14px; margin-top: 24px; }
.access-form label { display: grid; gap: 8px; color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; }
.access-error { margin-top: 18px; padding: 12px 14px; border: 1px solid rgba(205,99,99,.46); border-radius: 7px; color: #ffd7d7; background: rgba(112,39,39,.2); }

@media (max-width: 680px) {
    .header-signal { top: 16px; right: 18px; }
    .timecode { right: 18px; bottom: 18px; }
}

/* Version 2.3: navigation, covers, pages and slideshow */
.public-nav {
    width: min(1180px, calc(100% - 32px));
    margin: 18px auto -6px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}
.public-nav a {
    padding: 9px 12px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 6px;
    color: var(--muted);
    background: rgba(28,31,37,.72);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-decoration: none;
    text-transform: uppercase;
}
.public-nav a:hover,
.public-nav a.active {
    color: var(--paper);
    border-color: rgba(111,153,150,.5);
    background: rgba(111,153,150,.12);
}

.set-shelf-section {
    width: min(1180px, calc(100% - 32px));
    margin: 22px auto 0;
}
.section-label {
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    color: var(--muted);
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .1em;
}
.set-shelf {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}
.set-tile {
    min-width: 0;
    overflow: hidden;
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 9px;
    color: inherit;
    background: rgba(35,39,46,.88);
    text-decoration: none;
    transition: transform .18s ease, border-color .18s ease;
}
.set-tile:hover {
    transform: translateY(-3px);
    border-color: rgba(111,153,150,.56);
}
.set-tile-cover {
    min-height: 112px;
    background: linear-gradient(145deg, #1a1d22, #343940);
}
.set-tile-cover img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}
.set-tile-copy {
    padding: 14px;
    display: grid;
    align-content: center;
    gap: 7px;
}
.set-tile-copy strong { color: var(--paper); font-size: .86rem; }
.set-tile-copy span {
    overflow: hidden;
    display: -webkit-box;
    color: var(--muted);
    font-size: .68rem;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.set-tile-copy small { color: var(--teal); font-size: .6rem; letter-spacing: .06em; }

.set-header.has-cover {
    padding-right: clamp(42%, 48vw, 610px);
}
.set-header.has-cover::before { display: none; }
.set-header.has-cover::after {
    z-index: 0;
    background: linear-gradient(90deg, rgba(24,27,32,.99) 0 42%, rgba(24,27,32,.88) 57%, rgba(24,27,32,.18) 78%, rgba(24,27,32,.06));
}
.set-cover-hero {
    position: absolute;
    inset: 0 0 0 42%;
    z-index: -1;
    overflow: hidden;
}
.set-cover-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(.82) contrast(1.04);
}
.set-header-content { position: relative; z-index: 1; }

.welcome-card {
    width: min(920px, calc(100% - 32px));
    margin: 24px auto 0;
    padding: clamp(20px, 4vw, 32px);
    border: 1px solid rgba(111,153,150,.28);
    border-left: 4px solid var(--teal);
    border-radius: 9px;
    background: rgba(32,35,41,.76);
    box-shadow: 0 12px 28px rgba(0,0,0,.2);
}
.welcome-card span {
    color: var(--teal);
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .12em;
}
.welcome-card p { margin: 11px 0 0; color: var(--paper); line-height: 1.75; }

.page-header { min-height: 270px; }
.content-main {
    width: min(880px, calc(100% - 32px));
    margin: 24px auto 70px;
}
.content-card {
    padding: clamp(25px, 5vw, 48px);
    border: 1px solid rgba(255,255,255,.11);
    border-radius: 12px;
    background: rgba(37,41,48,.9);
    box-shadow: 0 16px 36px rgba(0,0,0,.25);
}
.prose p { margin: 0; color: var(--paper); font-size: clamp(.9rem, 2vw, 1.04rem); line-height: 1.9; }
.content-actions { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }
.content-actions a,
.primary-link {
    padding: 11px 15px;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 7px;
    color: var(--paper);
    background: #444951;
    text-decoration: none;
}
.content-actions .primary-link { color: #10211f; background: var(--teal); font-weight: 700; }
.contact-form { display: grid; gap: 17px; }
.contact-form label { display: grid; gap: 8px; color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.contact-form textarea {
    width: 100%;
    min-height: 190px;
    padding: 12px;
    resize: vertical;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 7px;
    color: var(--text);
    outline: none;
    background: #20242a;
    font: inherit;
}
.contact-form textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(111,153,150,.16); }
.contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.contact-form button { justify-self: start; color: #10211f; font-weight: 700; background: var(--teal); }
.contact-direct { margin: 24px 0 0; color: var(--muted); }
.contact-direct a { color: var(--paper); }
.contact-success { text-align: center; }
.contact-success h2 { margin: 8px 0; }
.contact-success p:last-child { color: var(--muted); }
.honeypot { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }

.maintenance-screen {
    width: min(720px, calc(100% - 28px));
    min-height: 100vh;
    margin: auto;
    padding: 70px 20px;
    display: grid;
    place-content: center;
    text-align: center;
}
.maintenance-screen h1 { max-width: none; font-size: clamp(2.2rem, 9vw, 5.2rem); }
.maintenance-screen > p:not(.empty-kicker) { color: var(--muted); font-size: 1rem; line-height: 1.8; }
.maintenance-tape {
    margin: 26px 0;
    padding: 13px;
    border-block: 1px solid rgba(255,255,255,.14);
    color: var(--teal);
    font-size: .68rem;
    letter-spacing: .12em;
}
.maintenance-screen a { color: var(--muted); }

.lightbox-actions {
    position: absolute;
    left: 18px;
    bottom: 18px;
    z-index: 4;
    display: flex;
    gap: 8px;
}
.lightbox-actions .fullscreen-button,
.lightbox-actions .slideshow-button {
    position: static;
    min-height: 42px;
}
.lightbox.is-playing .slideshow-button { color: #10211f; background: var(--teal); }
.vhs-switch-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    opacity: 0;
    pointer-events: none;
    background:
        linear-gradient(180deg, transparent 0 35%, rgba(255,255,255,.2) 36%, transparent 39%),
        repeating-linear-gradient(180deg, rgba(255,255,255,.08) 0 1px, transparent 1px 5px),
        linear-gradient(90deg, rgba(40,180,190,.14), transparent 35%, rgba(205,45,92,.13));
}
.lightbox.is-switching .vhs-switch-overlay { animation: vhs-switch-flash .62s steps(5,end); }
.lightbox.is-switching .lightbox-figure img { animation: vhs-image-switch .62s steps(4,end); }
@keyframes vhs-switch-flash {
    0% { opacity: 0; transform: translateY(-18%); }
    15% { opacity: .85; transform: translateY(0); }
    30% { opacity: .25; transform: translateY(16%); }
    48% { opacity: .72; transform: translateY(-7%); }
    70% { opacity: .16; transform: translateY(5%); }
    100% { opacity: 0; transform: translateY(0); }
}
@keyframes vhs-image-switch {
    0% { opacity: .35; transform: translateX(-8px) scale(1.012); filter: contrast(1.45) saturate(.55); }
    25% { opacity: .86; transform: translateX(10px) scale(1.006); filter: hue-rotate(12deg) contrast(1.2); }
    50% { opacity: .5; transform: translateX(-4px) scale(1.01); filter: hue-rotate(-12deg); }
    100% { opacity: 1; transform: none; filter: none; }
}
.lightbox:fullscreen { width: 100vw; height: 100vh; }

@media (max-width: 900px) {
    .set-shelf { grid-template-columns: 1fr; }
    .set-tile { grid-template-columns: 145px minmax(0,1fr); }
}
@media (max-width: 620px) {
    .public-nav,
    .set-shelf-section { width: min(100% - 20px, 1180px); }
    .public-nav { justify-content: center; margin-top: 10px; }
    .public-nav a { flex: 1; text-align: center; }
    .set-tile { grid-template-columns: 105px minmax(0,1fr); }
    .set-header.has-cover { padding-right: 22px; padding-bottom: 125px; }
    .set-cover-hero { inset: auto 0 0; height: 108px; }
    .set-header.has-cover::after { background: linear-gradient(180deg, rgba(32,35,41,.99) 0 68%, rgba(32,35,41,.35)); }
    .contact-grid { grid-template-columns: 1fr; }
    .lightbox-actions { left: 50%; bottom: 78px; transform: translateX(-50%); width: max-content; }
    .lightbox-actions .fullscreen-button { display: none; }
    .slideshow-button { font-size: .7rem; }
}


/* Version 2.5: do not silently remove failed image cards. */
.photo-card.image-unavailable .photo-frame {
    min-height: 180px;
    display: grid;
    place-items: center;
    background: repeating-linear-gradient(135deg, rgba(255,255,255,.03) 0 8px, rgba(0,0,0,.08) 8px 16px);
}
.photo-card.image-unavailable .photo-frame::after {
    content: 'IMAGE SIGNAL UNAVAILABLE';
    color: var(--muted);
    font-size: .68rem;
    letter-spacing: .08em;
}
.photo-card.image-unavailable img { display: none; }

/* Version 2.7: strict one-time links and non-persistent password access */
.access-actions {
    margin-top: 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}
.access-button,
.access-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 11px 16px;
    border-radius: 7px;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    text-decoration: none;
}
.access-button {
    border: 1px solid rgba(111,153,150,.58);
    color: var(--paper);
    background: rgba(111,153,150,.18);
}
.access-button:hover {
    border-color: rgba(111,153,150,.9);
    background: rgba(111,153,150,.28);
}
.access-link {
    border: 1px solid rgba(255,255,255,.1);
    color: var(--muted);
    background: rgba(255,255,255,.03);
}
.access-link:hover {
    color: var(--paper);
    border-color: rgba(255,255,255,.25);
}
.used-link-screen {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px 0;
}
.used-link-card {
    margin: 0 auto;
}
.used-link-card h1 {
    margin: 8px 0 18px;
    max-width: 12ch;
    font-size: clamp(2.6rem, 10vw, 6.2rem);
    line-height: .88;
}

/* Version 3.1 — reliability, branded errors and mobile experience */
:root {
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
}

body {
    -webkit-text-size-adjust: 100%;
    text-rendering: optimizeLegibility;
}

a,
button,
input,
select,
textarea {
    -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.photo-card:focus-visible,
.set-tile:focus-visible {
    outline: 3px solid rgba(134, 215, 206, .52);
    outline-offset: 3px;
}

.status-panel.is-ready .status-dot {
    background: #7fd3b4;
}

.status-panel.is-error {
    color: #ffd2d2;
}

.status-panel.is-error .status-dot {
    background: #d47d7d;
    box-shadow: 0 0 12px rgba(212, 125, 125, .7);
}

.photo-skeleton {
    pointer-events: none;
}

.photo-skeleton .photo-frame,
.photo-skeleton .photo-info {
    position: relative;
    overflow: hidden;
    background: rgba(255,255,255,.045);
}

.photo-skeleton .photo-info {
    min-height: 78px;
}

.photo-skeleton .photo-frame::before,
.photo-skeleton .photo-info::before {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.075), transparent);
    animation: skeleton-sweep 1.35s infinite;
}

@keyframes skeleton-sweep {
    to { transform: translateX(100%); }
}

.image-unavailable-message {
    width: 100%;
    height: 100%;
    min-height: 180px;
    display: grid;
    place-content: center;
    gap: 8px;
    padding: 20px;
    text-align: center;
    color: var(--muted);
    background:
        repeating-linear-gradient(135deg, rgba(255,255,255,.025) 0 8px, transparent 8px 16px),
        #171a1f;
}

.image-unavailable-message strong {
    color: #e29a9a;
    letter-spacing: .12em;
}

.image-unavailable-message span {
    font-size: .72rem;
}

.set-tile-placeholder {
    width: 100%;
    height: 100%;
    min-height: 112px;
    display: grid;
    place-items: center;
    color: rgba(255,255,255,.35);
    font-size: .62rem;
    letter-spacing: .12em;
}

.retry-gallery {
    margin-top: 18px;
}

.download-set-button[aria-busy="true"] {
    opacity: .72;
    pointer-events: none;
}

.lightbox.is-loading-image .lightbox-figure::before {
    content: "LOADING SIGNAL…";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--muted);
    font-size: .72rem;
    letter-spacing: .12em;
}

.lightbox-figure {
    position: relative;
}

.error-screen,
.used-link-screen,
.maintenance-screen {
    min-height: 100svh;
    padding: calc(28px + var(--safe-top)) calc(18px + var(--safe-right)) calc(28px + var(--safe-bottom)) calc(18px + var(--safe-left));
    display: grid;
    place-items: center;
}

.error-card {
    width: min(700px, 100%);
    padding: clamp(28px, 7vw, 58px);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 14px;
    background: rgba(24,27,33,.94);
    box-shadow: 0 22px 55px rgba(0,0,0,.45);
}

.error-card h1 {
    max-width: 12ch;
    font-size: clamp(2.2rem, 9vw, 5rem);
}

.error-message {
    margin: 24px 0 0;
    color: var(--paper);
    font-size: clamp(1rem, 2.8vw, 1.18rem);
    line-height: 1.65;
}

.error-detail {
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.error-reference {
    margin: 20px 0 0;
    padding: 10px 12px;
    border: 1px dashed rgba(255,255,255,.17);
    color: var(--muted);
    font-size: .72rem;
}

.error-actions,
.access-actions {
    margin-top: 28px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.access-button,
.access-link {
    min-height: 46px;
    padding: 11px 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 7px;
    color: var(--paper);
    font: inherit;
    font-size: .78rem;
    font-weight: 700;
    text-decoration: none;
    background: #444951;
    cursor: pointer;
}

.access-button {
    color: #10211f;
    background: var(--teal);
}

.error-back {
    box-shadow: none;
}

@media (max-width: 760px) {
    body {
        padding-bottom: calc(68px + var(--safe-bottom));
    }

    .public-nav {
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: calc(10px + var(--safe-bottom));
        z-index: 80;
        width: auto;
        margin: 0;
        padding: 7px;
        justify-content: stretch;
        gap: 6px;
        border: 1px solid rgba(255,255,255,.12);
        border-radius: 12px;
        background: rgba(20,23,28,.94);
        box-shadow: 0 12px 34px rgba(0,0,0,.42);
        backdrop-filter: blur(14px);
    }

    .public-nav a {
        min-width: 0;
        min-height: 44px;
        flex: 1 1 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 9px 6px;
        text-align: center;
    }

    .site-header,
    .toolbar,
    .status-panel,
    .gallery,
    .empty-state,
    .site-footer,
    .set-shelf-section,
    .welcome-card,
    .content-main {
        width: min(100% - 20px, 1180px);
    }

    .site-header {
        min-height: 275px;
        margin-top: 10px;
        padding: 66px 20px 92px;
        border-radius: 10px;
    }

    .site-header h1,
    .set-header h1 {
        max-width: 100%;
        overflow-wrap: anywhere;
        font-size: clamp(2.1rem, 14vw, 4rem);
        line-height: .92;
    }

    .subtitle {
        margin-top: 20px;
        font-size: .84rem;
        line-height: 1.6;
    }

    .header-signal {
        top: 18px;
        left: 20px;
        right: auto;
        gap: 12px;
    }

    .timecode {
        right: 20px;
        bottom: 22px;
        max-width: calc(100% - 40px);
        text-align: right;
    }

    .site-header::before {
        height: 66px;
    }

    .set-header.has-cover {
        min-height: 390px;
        padding: 58px 20px 190px;
    }

    .set-header.has-cover::after {
        background: linear-gradient(180deg, rgba(24,27,32,.99) 0 52%, rgba(24,27,32,.75) 70%, rgba(24,27,32,.12) 100%);
    }

    .set-cover-hero {
        inset: 45% 0 0;
    }

    .toolbar {
        margin-top: 14px;
        padding: 14px;
        gap: 10px;
        align-items: stretch;
    }

    .toolbar > button,
    .toolbar > a {
        min-height: 48px;
    }

    .gallery {
        gap: 12px;
    }

    .photo-card,
    .photo-card:nth-child(5n + 1),
    .photo-card:nth-child(5n + 4) {
        grid-column: 1 / -1;
        border-radius: 9px;
    }

    .photo-frame,
    .photo-card:nth-child(5n + 1) .photo-frame,
    .photo-card:nth-child(5n + 4) .photo-frame {
        aspect-ratio: var(--photo-ratio, 4 / 3);
        max-height: 72svh;
    }

    .photo-info {
        padding: 13px 14px 15px;
    }

    .set-tile {
        grid-template-columns: 104px minmax(0,1fr);
    }

    .set-tile-cover,
    .set-tile-placeholder {
        min-height: 104px;
    }

    .access-card {
        width: min(100% - 20px, 620px);
        margin: 18px auto 38px;
        padding: 24px 18px;
    }

    .access-form button,
    .access-actions > *,
    .error-actions > * {
        width: 100%;
    }

    .lightbox {
        padding: calc(56px + var(--safe-top)) 10px calc(86px + var(--safe-bottom));
        align-items: stretch;
    }

    .lightbox-figure {
        width: 100%;
        height: calc(100svh - 150px - var(--safe-top) - var(--safe-bottom));
        gap: 8px;
    }

    .lightbox-figure img {
        max-height: calc(100svh - 220px);
    }

    .lightbox-figure figcaption {
        max-height: 82px;
        overflow-y: auto;
        padding-inline: 6px;
        font-size: .72rem;
    }

    .lightbox-close {
        top: calc(10px + var(--safe-top));
        right: calc(10px + var(--safe-right));
        width: 46px;
        height: 46px;
    }

    .lightbox-nav {
        top: 50%;
        bottom: auto;
        width: 46px;
        height: 58px;
        transform: translateY(-50%);
        background: rgba(20,22,27,.76);
    }

    .lightbox-nav.previous { left: 8px; }
    .lightbox-nav.next { right: 8px; }

    .lightbox-actions {
        left: 10px;
        right: 10px;
        bottom: calc(10px + var(--safe-bottom));
        display: grid;
        grid-template-columns: 1fr;
    }

    .slideshow-button {
        width: 100%;
    }

    .fullscreen-button {
        display: none;
    }

    .site-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
        padding-bottom: 28px;
    }
}

@media (min-width: 540px) and (max-width: 850px) {
    .photo-card,
    .photo-card:nth-child(5n + 1),
    .photo-card:nth-child(5n + 4) {
        grid-column: span 6;
    }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
    .crt-glass,
    .vhs-tracking,
    .vhs-switch-overlay {
        display: none !important;
    }
}
