:root {
    --font-body: "DIN 2014", "TT Hoves", system-ui, sans-serif;
    --font-display: "TT Hoves", "DINPro", system-ui, sans-serif;
    --font-accent: "DINPro", "TT Hoves", system-ui, sans-serif;
}

@font-face {
    font-family: "DIN 2014";
    src: url("/fonts/din-2014.otf") format("opentype");
    font-display: swap;
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: "DINPro";
    src: url("/fonts/DINPro-Bold.ttf") format("truetype");
    font-display: swap;
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: "TT Hoves";
    src: url("/fonts/TTHoves-Medium.ttf") format("truetype");
    font-display: swap;
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: "TT Hoves";
    src: url("/fonts/TTHoves-Bold.ttf") format("truetype");
    font-display: swap;
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: "TT Hoves";
    src: url("/fonts/TTHoves-Black.ttf") format("truetype");
    font-display: swap;
    font-weight: 900;
    font-style: normal;
}

:root {
    --bg: #1A1A1A;
    --surface: #17181b;
    --raised: #23252a;
    --border: #34373d;
    --text: #f2f0ea;
    --muted: #9c9a92;
    --faint: #6b6a64;
    --accent: #2bbbcb;
    --accent-ink: #062b30;
    --yellow: #fbe304;
    --yellow-ink: #3a3400;
    --danger: #e24b4a;
    --success: #1d9e75;
    --chrome-bg: #1A1A1A;
    --chrome-border: rgba(242, 240, 234, .18);
    --chrome-text: #fff;
    --chrome-muted: rgba(255, 255, 255, .72);
    --radius-xs: 3px;
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-pill: 999px;
    font-family: var(--font-body);
    color: var(--text);
    background: var(--bg);
}

[data-theme="light"] {
    --bg: #fbfaf6;
    --surface: #fff;
    --raised: #f2f0ea;
    --border: #d9d7ce;
    --text: #1a1b1d;
    --muted: #5f5e5a;
    --faint: #8e8c84;
    --accent: #1397a6;
    --accent-ink: #fff;
    --yellow: #c9a800;
    --yellow-ink: #fff;
    --danger: #c0392b;
    --success: #0f6e56;
    --chrome-bg: #fbfaf6;
    --chrome-border: rgba(26, 27, 29, .14);
    --chrome-text: #1a1b1d;
    --chrome-muted: rgba(26, 27, 29, .68);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; overflow-x: clip; }
body { min-height: 100vh; margin: 0; overflow-x: clip; background: var(--bg); color: var(--text); font-size: 17px; line-height: 1.5; }
body.viewer-body { background: #1A1A1A; }
img, svg { max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: .3rem 0 1rem; font-family: var(--font-display); font-weight: 900; letter-spacing: .012em; line-height: .98; }
h1 { font-size: clamp(40px, 5.8vw, 68px); }
h2 { font-size: 30px; }
h3 { font-size: 22px; }
p { margin: .5rem 0 1rem; }
button, input, select, textarea { font: inherit; }
.link-button { border: 0; background: transparent; color: var(--accent); padding: 0; text-align: left; text-decoration: underline; }
.link-button:hover { cursor: pointer; color: var(--text); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(43, 187, 203, .4);
}

.outline {
    color: transparent;
    font-family: var(--font-display);
    font-weight: 900;
    letter-spacing: .02em;
    -webkit-text-stroke: 1.6px var(--text);
}
@supports not (-webkit-text-stroke: 1px #000) {
    .outline { color: var(--text); }
}
.wrap { width: min(1180px, calc(100% - 32px)); margin: auto; }
.muted { color: var(--muted); }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}
.small { font-size: 14px; }
.eyebrow { margin: 0 0 8px; color: var(--muted); font-size: 14px; font-weight: 700; letter-spacing: .08em; }
.main { min-height: calc(100vh - 142px); padding: 48px 0 72px; }

.header {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 60;
    border-bottom: 1px solid var(--chrome-border);
    background: var(--chrome-bg);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .16);
}
.header-inner, .nav, .actions, .section-heading, .footer-inner, .viewer-topbar, .viewer-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}
.header-inner { min-height: 66px; justify-content: space-between; }
.brand-controls { display: flex; align-items: center; gap: 14px; }
.brand { display: block; width: 120px; filter: brightness(0) invert(1); }
[data-theme="light"] .brand { filter: none; }
.nav { flex-wrap: wrap; justify-content: flex-end; font-size: 14px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.nav > * + * { border-left: 1px solid var(--chrome-border); padding-left: 16px; }
.nav a { color: var(--chrome-text); }
.nav a:hover { color: var(--accent); text-decoration: none; }
.nav form { margin: 0; }
.nav-count { display: inline-grid; min-width: 20px; min-height: 20px; place-items: center; border-radius: var(--radius-sm); background: rgba(255, 255, 255, .1); color: var(--chrome-text); font-size: 12px; }
.theme-toggle.theme-toggle-mobile { display: none; }
.footer { border-top: 1px solid var(--chrome-border); background: var(--chrome-bg); color: var(--chrome-muted); font-size: 14px; }
.footer-inner { min-height: 74px; justify-content: space-between; }
.footer-inner > span:last-child { display: flex; flex-wrap: wrap; align-items: center; gap: 0 4px; }
.footer a { color: var(--chrome-text); }
.footer a:hover { color: var(--accent); text-decoration: none; }
.footer-cookie-form {
    display: inline;
    margin: 0;
}
.footer-cookie-button {
    display: inline;
    border: 0;
    background: transparent;
    color: var(--chrome-text);
    padding: 0;
    font-size: inherit;
    letter-spacing: inherit;
    text-transform: none;
}
.footer-cookie-button:hover {
    color: var(--accent);
    opacity: 1;
}

.hero { padding: 40px 0 64px; }
.hero h1, .page-hero h1, h1.page-hero {
    max-width: 980px;
    font-family: var(--font-display);
    font-size: clamp(58px, 8.2vw, 105px);
    font-weight: 900;
    letter-spacing: -.035em;
    line-height: .88;
}
.hero h1 .outline, .page-hero h1 .outline, h1.page-hero .outline {
    display: block;
    font-size: .98em;
    letter-spacing: -.04em;
    -webkit-text-stroke-width: 1px;
}
.hero-copy { max-width: 560px; }
.page-hero {
    margin-bottom: 34px;
    padding: 24px 0 10px;
}
.page-hero.compact h1, h1.page-hero.compact { font-size: clamp(44px, 6vw, 78px); }
.page-hero-copy { max-width: 640px; }
.page-intro, .gallery-intro { margin-bottom: 28px; }
.main-gallery-view { width: 100%; max-width: none; padding-top: 0; }
.main-gallery-view .gallery-intro.page-hero { padding-top: 0; }
.main-gallery-view > .flash, .main-gallery-view > .errors { width: min(1180px, calc(100% - 32px)); margin: 16px auto; }
.main-gallery-view .gallery-intro > .section-heading {
    width: min(1180px, calc(100% - 32px));
    margin-right: auto;
    margin-left: auto;
}
.main-gallery-view .gallery-intro > .section-heading {
    display: block;
    text-align: center;
}
.main-gallery-view .gallery-intro > .section-heading > div {
    max-width: 840px;
    margin: 0 auto;
}
.main-gallery-view .gallery-intro h1 { margin-right: auto; margin-left: auto; }
.main-gallery-view .gallery-intro .chip-row,
.main-gallery-view .gallery-intro .photographer-credit-list {
    justify-content: center;
}
.back-link { display: inline-block; margin-bottom: 18px; }
.section-heading { justify-content: space-between; margin-bottom: 18px; }

.panel, .card {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    padding: 20px;
}
.panel { overflow-x: auto; }
.empty-state { min-height: 140px; display: grid; align-content: center; }
.grid { display: grid; gap: 16px; }
.grid.events { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.btn, button {
    display: inline-block;
    border: 1px solid var(--accent);
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: var(--accent-ink);
    cursor: pointer;
    font-weight: 700;
    padding: 7px 11px;
    font-size: 14px;
    letter-spacing: .04em;
    text-transform: uppercase;
    transition: transform .15s ease, opacity .15s ease;
}
.btn:hover, button:hover { text-decoration: none; opacity: .88; }
.btn:active, button:active { transform: scale(.98); }
.btn.secondary, button.secondary { background: transparent; color: var(--accent); }
.btn.danger { border-color: var(--danger); background: transparent; color: var(--danger); }
button:disabled, .btn:disabled { cursor: not-allowed; opacity: .55; }
.admin-event-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.admin-event-actions form { margin: 0; }
.admin-review-requests { margin-top: 8px; color: var(--muted); font-size: 13px; }
.admin-review-requests article { margin-top: 8px; border-left: 2px solid var(--danger); padding-left: 10px; }
.admin-review-requests p { margin: 3px 0; }
.theme-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    border: 0;
    background: transparent;
    color: var(--chrome-text);
    padding: 0;
}
.theme-toggle-track {
    position: relative;
    display: block;
    width: 42px;
    height: 22px;
    border: 1px solid var(--chrome-border);
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, .12);
    transition: border-color .18s ease, background .18s ease;
}
.theme-toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 14px;
    height: 14px;
    border-radius: var(--radius-pill);
    background: var(--chrome-text);
    transition: transform .18s ease, background .18s ease;
}
.theme-toggle:hover { opacity: 1; }
.theme-toggle:hover .theme-toggle-track { border-color: var(--accent); }
.theme-toggle:hover .theme-toggle-thumb { background: var(--accent); }
[data-theme="light"] .theme-toggle-track { background: rgba(43, 187, 203, .18); }
[data-theme="light"] .theme-toggle-thumb { transform: translateX(20px); }

label { display: block; margin-top: 12px; font-weight: 700; }
input, select, textarea {
    display: block;
    width: 100%;
    margin-top: 5px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--raised);
    color: var(--text);
    padding: 9px 10px;
}
input[type="checkbox"] { display: inline; width: auto; }
.checkbox-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--accent);
    background: color-mix(in srgb, var(--accent) 10%, var(--raised));
}
.checkbox-card input { margin: 0; }
.upload-dropzone { border: 1px dashed var(--accent); border-radius: var(--radius-sm); background: var(--raised); padding: 14px; }
.upload-dropzone input { margin-bottom: 8px; }
.upload-duplicates { display: grid; gap: 8px; margin: 14px 0; padding: 14px; border: 1px solid var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--raised)); }
.upload-duplicates[hidden] { display: none; }
.upload-duplicates label { display: flex; flex-direction: row; align-items: center; gap: 8px; margin: 0; }
.upload-duplicates input { width: auto; margin: 0; }
.upload-progress { display: grid; gap: 12px; margin: 14px 0; padding: 14px; border: 1px solid var(--line); background: var(--raised); }
.upload-progress[hidden] { display: none; }
.upload-progress-summary { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.upload-progress-track { overflow: hidden; height: 8px; background: var(--field); border: 1px solid var(--line); }
.upload-progress-track span { display: block; width: 0%; height: 100%; background: var(--accent); transition: width 160ms ease; }
.upload-progress-list { display: grid; gap: 8px; max-height: 260px; overflow: auto; margin: 0; padding-left: 22px; }
.upload-progress-list li { color: var(--muted); }
.upload-progress-list li.is-uploading { color: var(--text); }
.upload-progress-list li.is-complete { color: var(--accent); }
.upload-progress-list li.is-skipped { color: var(--muted); }
.upload-progress-list li.is-failed { color: var(--danger); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 16px; }
.checkbox-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px 14px; margin: 10px 0 18px; }
.checkbox-grid label { margin: 0; }
.inline-form { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.inline-form label { margin-top: 0; min-width: min(260px, 100%); }
.section-heading:has(.filter-form) > div { flex-shrink: 0; }
.filter-form { display: grid; flex: 1; grid-template-columns: repeat(3, minmax(170px, 1fr)) auto auto; align-items: end; gap: 10px; }
.filter-form label { display: grid; min-width: 0; gap: 6px; margin-top: 0; font-size: 14px; }
.filter-form label span { line-height: 1; }
.filter-form input, .filter-form select, .filter-form button, .filter-form .btn {
    height: 42px;
    margin-top: 0;
    padding-top: 0;
    padding-bottom: 0;
    line-height: 1;
}
.filter-form input, .filter-form select { min-width: 0; max-width: 100%; padding-right: 14px; padding-left: 14px; }
.filter-form input[type="date"] {
    align-items: center;
    -webkit-appearance: none;
    appearance: none;
    color: var(--muted);
    color-scheme: dark;
    display: block;
    line-height: 42px;
    min-inline-size: 0;
    width: 100%;
    -webkit-text-fill-color: var(--muted);
}
.filter-form input[type="date"]::-webkit-date-and-time-value {
    color: var(--muted);
    min-height: 42px;
    min-width: 0;
    text-align: left;
    -webkit-text-fill-color: var(--muted);
}
.filter-form input[type="date"]::-webkit-datetime-edit,
.filter-form input[type="date"]::-webkit-datetime-edit-day-field,
.filter-form input[type="date"]::-webkit-datetime-edit-month-field,
.filter-form input[type="date"]::-webkit-datetime-edit-year-field,
.filter-form input[type="date"]::-webkit-datetime-edit-text {
    color: var(--muted);
    -webkit-text-fill-color: var(--muted);
}
.filter-form input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: .72;
}
[data-theme="light"] .filter-form input[type="date"] {
    color-scheme: light;
}
[data-theme="light"] .filter-form input[type="date"]::-webkit-calendar-picker-indicator {
    filter: none;
}
.filter-form button, .filter-form .btn { display: inline-flex; align-items: center; justify-content: center; }

.flash, .errors { margin-bottom: 16px; border-radius: var(--radius-sm); padding: 10px 12px; }
.flash { background: var(--accent); color: var(--accent-ink); }
.errors { border: 1px solid var(--danger); color: var(--danger); }
table { width: 100%; min-width: 620px; border-collapse: collapse; }
th, td { border-bottom: 1px solid var(--border); padding: 10px; text-align: left; }
.badge { display: inline-block; border-radius: var(--radius-xs); background: var(--raised); padding: 3px 8px; font-size: 13px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.badge.live { background: var(--yellow); color: var(--yellow-ink); }
.badge.category { border: 1px solid var(--accent); background: transparent; color: var(--accent); }
.badge.tag { border: 1px solid var(--border); background: transparent; color: var(--muted); }
.badge.disabled { border: 1px solid var(--danger); background: transparent; color: var(--danger); }
.badge.share { border: 1px solid var(--accent); background: transparent; color: var(--accent); }
.chip-row, .event-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.gallery-filter-tabs {
    display: flex;
    width: min(100%, 1180px);
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 0 auto 20px;
    padding: 0 4px;
}
.gallery-filter-tabs button {
    min-height: 36px;
    border-color: var(--border);
    border-radius: var(--radius-pill);
    background: var(--surface);
    color: var(--muted);
    padding: 7px 13px;
    font-size: 13px;
    letter-spacing: .04em;
}
.gallery-filter-tabs button:hover,
.gallery-filter-tabs button.active {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--accent-ink);
}
.event-tags { margin: 8px 0 4px; }
.event-tags span { border-radius: var(--radius-xs); background: var(--raised); color: var(--muted); padding: 2px 8px; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; }

.event-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.event-card { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); color: var(--text); }
.event-card:hover { border-color: var(--accent); text-decoration: none; }
.event-cover { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--raised); }
.event-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.event-cover-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(48%, 190px) !important;
    height: auto !important;
    max-height: 58%;
    object-fit: contain !important;
    transform: translate(-50%, -50%);
    filter: drop-shadow(0 4px 18px rgba(0,0,0,.55));
}
.event-card:hover img { transform: scale(1.035); }
.event-card:hover .event-cover-logo { transform: translate(-50%, -50%); }
.gallery-cover {
    position: relative;
    display: grid;
    min-height: clamp(340px, 42vw, 540px);
    width: 100vw;
    margin: 0 calc(50% - 50vw) 34px;
    overflow: hidden;
    place-items: center;
    background: var(--raised);
}
.gallery-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom, rgba(0, 0, 0, .22), rgba(0, 0, 0, .44)),
        radial-gradient(circle at center, rgba(0, 0, 0, .08), rgba(0, 0, 0, .58));
}
.gallery-cover-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.gallery-cover-content {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    gap: 14px;
    padding: 28px;
    text-align: center;
}
.gallery-cover-content h1 {
    max-width: min(860px, 82vw);
    margin: 0;
    color: #fff;
    text-shadow: 0 8px 28px rgba(0, 0, 0, .72);
}
.gallery-cover-content p {
    margin: 0;
    color: rgba(255, 255, 255, .84);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .22em;
    text-transform: uppercase;
}
.gallery-cover-logo {
    width: min(64vw, 680px);
    max-height: 74%;
    object-fit: contain;
    filter: drop-shadow(0 8px 28px rgba(0, 0, 0, .55));
}
.event-logo-preview { display: flex; align-items: center; gap: 16px; margin: 18px 0 8px; }
.event-logo-preview img { max-width: 180px; max-height: 96px; object-fit: contain; border-radius: var(--radius-sm); background: var(--raised); padding: 10px; }
.watermark-preview-panel {
    grid-column: 1 / -1;
    display: grid;
    gap: 10px;
    margin-top: 12px;
}
.watermark-preview-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 14px;
}
.watermark-preview-heading strong {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 900;
}
.watermark-preview-heading span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.watermark-preview-stage {
    position: relative;
    width: min(100%, 460px);
    aspect-ratio: 4 / 5;
    min-height: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background:
        linear-gradient(120deg, rgba(0, 0, 0, .12), rgba(0, 0, 0, .36)),
        linear-gradient(145deg, #6f8e9f 0%, #d7c095 45%, #37404a 46%, #14181c 100%);
    background-position: center;
    background-size: cover;
}
.watermark-preview-stage::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom, rgba(255, 255, 255, .04), transparent 34%),
        linear-gradient(to top, rgba(0, 0, 0, .28), transparent 45%);
    pointer-events: none;
}
.watermark-preview-layer {
    position: absolute;
    inset: 0;
    z-index: 1;
}
.watermark-preview-mark {
    position: absolute;
    display: grid;
    width: var(--watermark-preview-size, 24%);
    min-width: 58px;
    max-width: 60%;
    place-items: center;
    color: rgba(242, 240, 234, .9);
    font-size: clamp(10px, 1.25vw, 16px);
    font-weight: 900;
    letter-spacing: .08em;
    line-height: 1.1;
    text-align: center;
    text-transform: uppercase;
    transform: translate(-50%, -50%) rotate(-18deg);
    word-break: normal;
}
.watermark-preview-mark.has-logo {
    transform: translate(-50%, -50%);
}
.watermark-preview-mark img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}
.watermark-preview-mark.is-center { top: 50%; left: 50%; }
.watermark-preview-mark.is-top-left { top: 14%; left: 15%; }
.watermark-preview-mark.is-top-right { top: 14%; left: 85%; }
.watermark-preview-mark.is-bottom-left { top: 86%; left: 15%; }
.watermark-preview-mark.is-bottom-right { top: 86%; left: 85%; }
.watermark-preview-mark.is-tiled {
    max-width: none;
}
.event-placeholder { display: grid; width: 100%; height: 100%; place-items: center; font: 900 54px var(--font-display); }
.event-card-body { padding: 16px; }
.event-card h3 { margin: 12px 0 4px; }
.event-count { margin-bottom: 0; color: var(--accent); font-weight: 700; }

.gallery-price { color: var(--accent); font-weight: 700; }
.gallery-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 18px;
    justify-content: center;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.gallery-toolbar a, .gallery-toolbar span { color: var(--muted); }
.gallery-toolbar a:hover { color: var(--accent); text-decoration: none; }
.gallery-credits { display: grid; gap: 8px; margin: 12px 0; color: var(--muted); font-weight: 700; }
.gallery-credits-label { color: var(--muted); }
.photographer-credit-list { display: flex; flex-wrap: wrap; gap: 10px; }
.photographer-credit {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    padding: 7px 10px 7px 7px;
}
.photographer-credit:hover { border-color: var(--accent); text-decoration: none; }
.photographer-credit span:last-child { display: grid; gap: 1px; line-height: 1.1; }
.photographer-credit strong { font-size: 13px; letter-spacing: .05em; text-transform: uppercase; }
.avatar {
    display: inline-block;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--raised);
    object-fit: cover;
}
.avatar-placeholder, .profile-photo-placeholder {
    position: relative;
    overflow: hidden;
    background: var(--raised);
}
.avatar-placeholder::before, .profile-photo-placeholder::before {
    content: "";
    position: absolute;
    top: 20%;
    left: 50%;
    width: 34%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--muted);
    transform: translateX(-50%);
}
.avatar-placeholder::after, .profile-photo-placeholder::after {
    content: "";
    position: absolute;
    right: 16%;
    bottom: 10%;
    left: 16%;
    height: 38%;
    border-radius: 999px 999px 0 0;
    background: var(--muted);
}
.gallery-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: start;
    gap: 8px;
    --gallery-target-row-height: 255px;
    --gallery-min-row-height: 170px;
    --gallery-max-row-height: 330px;
}
.main-gallery-view .gallery-grid {
    width: calc(100% - 16px);
    max-width: none;
    margin: 0 auto;
}
.gallery-tile {
    position: relative;
    flex: 0 0 var(--tile-width, calc(var(--photo-ratio, 1.5) * 220px));
    width: var(--tile-width, calc(var(--photo-ratio, 1.5) * 220px));
    height: var(--tile-height, 220px);
    overflow: hidden;
    border-radius: 0;
    background: var(--raised);
    line-height: 0;
}
.gallery-tile::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, .08) 42%, transparent 72%),
        var(--raised);
    background-size: 220% 100%;
    opacity: 1;
    animation: wax-image-loading 1.3s ease-in-out infinite;
    transition: opacity .22s ease;
}
.gallery-tile.image-loaded::before { opacity: 0; animation: none; }
.gallery-tile > a { display: block; width: 100%; height: 100%; }
.gallery-tile img {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: transform .24s ease, filter .24s ease, opacity .22s ease;
}
.gallery-tile.image-loaded img { opacity: 1; }
.gallery-tile:hover img { filter: brightness(1.06); }
.tile-actions { position: absolute; right: 8px; bottom: 8px; z-index: 2; display: flex; gap: 6px; opacity: 0; transition: opacity .2s ease; }
.gallery-tile:hover .tile-actions, .gallery-tile:focus-within .tile-actions { opacity: 1; }
.icon-button { display: grid; width: 34px; height: 34px; place-items: center; border-color: rgba(242, 240, 234, .35); border-radius: var(--radius-xs); background: rgba(26, 26, 26, .78); color: var(--accent); font-size: 19px; line-height: 1; padding: 0; backdrop-filter: blur(10px); }
.icon-button[aria-pressed="true"] { color: var(--yellow); }
.cart-icon { width: 22px; height: 22px; overflow: visible; }
.cart-icon-line { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.cart-icon-fill { fill: currentColor; opacity: 0; transition: opacity .18s ease; }
.icon-button[aria-pressed="true"] .cart-icon-fill { opacity: 1; }
.gallery-loader {
    display: grid;
    max-width: 420px;
    margin: 24px auto 10px;
    place-items: center;
    gap: 8px;
    text-align: center;
}
.gallery-loader[hidden] { display: none; }
.gallery-loader .btn { width: 100%; }
.gallery-loader .muted { margin: 0; font-size: 13px; }

@keyframes wax-image-loading {
    from { background-position: 180% 0; }
    to { background-position: -40% 0; }
}

.mini-cart {
    position: sticky;
    bottom: 16px;
    z-index: 10;
    display: flex;
    max-width: 560px;
    align-items: center;
    gap: 12px;
    justify-content: space-between;
    margin: 22px auto 0;
    border: 1px solid var(--accent);
    border-radius: var(--radius-md);
    background: var(--surface);
    padding: 9px 10px;
    font-size: 14px;
}
.mini-cart[hidden] { display: none; }
.mini-cart-total { margin-left: auto; color: var(--accent); font-family: var(--font-display); font-size: 22px; }
.mini-cart .btn { padding: 6px 10px; }

.viewer-body .header, .viewer-body .footer { display: none; }
.main-photo-viewer { width: 100%; max-width: none; padding: 0; }
.photo-viewer { width: 100%; min-height: 100vh; margin: 0; background: #1A1A1A; color: #f7f5ee; }
.viewer-topbar { position: sticky; top: 0; z-index: 6; justify-content: space-between; margin-bottom: 0; border-bottom: 1px solid rgba(255, 255, 255, .08); background: rgba(26, 26, 26, .74); backdrop-filter: blur(16px); padding: 10px 18px; }
.viewer-actions { flex-wrap: wrap; justify-content: flex-end; }
.viewer-back-group {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}
.viewer-event-title { color: rgba(255, 255, 255, .76); font-size: 12px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.viewer-event-title:hover { color: var(--accent); text-decoration: none; }
.viewer-back {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: var(--radius-xs);
    color: #fff;
    font-size: 20px;
}
.viewer-back:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.viewer-tool {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: var(--radius-pill);
    background: transparent;
    color: rgba(255, 255, 255, .7);
    padding: 6px 8px;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.viewer-tool:hover { color: var(--accent); opacity: 1; text-decoration: none; }
.viewer-tool-primary { background: var(--accent); color: var(--accent-ink); padding-inline: 14px; }
.viewer-tool-primary:hover { color: var(--accent-ink); opacity: .9; }
.viewer-tool-danger { background: var(--danger); color: #fff; padding-inline: 14px; }
.viewer-tool-danger:hover { color: #fff; opacity: .88; }
.viewer-tool-checkout { background: var(--yellow); color: var(--yellow-ink); padding-inline: 14px; }
.viewer-tool-checkout:hover { color: var(--yellow-ink); opacity: .9; }
.viewer-stage { position: relative; display: grid; min-height: calc(100vh - 190px); overflow: hidden; place-items: center; background: radial-gradient(circle at center, rgba(255,255,255,.045), transparent 58%), #1A1A1A; padding: 22px 76px 10px; user-select: none; }
.viewer-stage::after {
    position: absolute;
    top: 18px;
    left: 50%;
    z-index: 3;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: var(--radius-pill);
    background: rgba(26, 26, 26, .72);
    color: rgba(255, 255, 255, .72);
    content: "Loading photo";
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .12em;
    opacity: 0;
    padding: 7px 10px;
    text-transform: uppercase;
    transform: translate(-50%, -8px);
    transition: opacity .18s ease, transform .18s ease;
    pointer-events: none;
}
.photo-viewer.viewer-loading .viewer-stage::after { opacity: 1; transform: translate(-50%, 0); }
.viewer-stage-controls {
    position: absolute;
    top: 14px;
    right: 18px;
    z-index: 4;
    display: flex;
    gap: 6px;
}
.viewer-stage-tool {
    min-height: 34px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: var(--radius-xs);
    background: rgba(26, 26, 26, .66);
    color: rgba(255, 255, 255, .76);
    padding: 6px 9px;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
    backdrop-filter: blur(12px);
}
.viewer-stage-tool:hover, .viewer-stage-tool[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.viewer-image-frame { display: grid; width: 100%; height: 100%; min-height: calc(100vh - 250px); place-items: center; overflow: hidden; touch-action: pan-y; }
.viewer-stage img {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 270px);
    border-radius: 0;
    object-fit: contain;
    box-shadow: 0 18px 80px rgba(0, 0, 0, .52);
    cursor: zoom-in;
    transform: translate3d(var(--viewer-pan-x, 0), var(--viewer-pan-y, 0), 0) scale(var(--viewer-zoom-scale, 1));
    transition: transform .2s ease, opacity .18s ease;
    will-change: transform;
}
.viewer-zoomed .viewer-image-frame { touch-action: none; }
.viewer-zoomed .viewer-stage img { cursor: grab; }
.viewer-panning .viewer-stage img { cursor: grabbing; transition: none; }
.viewer-slide-next { animation: viewer-slide-next .24s cubic-bezier(.2, .72, .2, 1) both; }
.viewer-slide-previous { animation: viewer-slide-previous .24s cubic-bezier(.2, .72, .2, 1) both; }
.viewer-arrow { position: absolute; z-index: 2; display: grid; width: 34px; height: 34px; place-items: center; border-radius: var(--radius-xs); background: rgba(255, 255, 255, .1); color: rgba(255, 255, 255, .72); font-size: 20px; backdrop-filter: blur(10px); }
.viewer-arrow:hover { text-decoration: none; }
.viewer-arrow:hover { background: var(--accent); color: var(--accent-ink); }
.viewer-arrow.previous { left: 18px; }
.viewer-arrow.next { right: 18px; }
.viewer-close { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid rgba(255,255,255,.18); border-radius: var(--radius-md); color: #fff; font-size: 28px; line-height: 1; }
.viewer-close:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.viewer-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    justify-content: center;
    padding: 6px 16px 10px;
    color: rgba(255, 255, 255, .54);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.viewer-meta p { margin: 0; }
.viewer-admin-diagnostics {
    flex-basis: min(920px, 100%);
    color: var(--accent);
    text-align: center;
    text-transform: none;
}
.viewer-admin-diagnostics-banner {
    margin: 10px auto 0;
    width: min(1180px, calc(100% - 32px));
    border: 1px solid var(--accent);
    background: rgba(43, 187, 203, .14);
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 800;
}
.viewer-actions-under {
    display: flex;
    justify-content: center;
    padding: 0 16px 14px;
}
.photo-removal-request {
    position: relative;
    color: rgba(255, 255, 255, .66);
    font-size: 12px;
}
.photo-removal-request summary {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    cursor: pointer;
    color: rgba(255, 255, 255, .45);
    font-weight: 900;
    letter-spacing: .08em;
    list-style: none;
    padding: 6px 8px;
    text-transform: uppercase;
}
.photo-removal-request summary::-webkit-details-marker { display: none; }
.photo-removal-request summary:hover { color: var(--accent); }
.photo-removal-request form {
    position: absolute;
    right: 0;
    bottom: calc(100% + 10px);
    z-index: 8;
    width: min(420px, calc(100vw - 32px));
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(26, 26, 26, .96);
    box-shadow: 0 18px 60px rgba(0, 0, 0, .48);
    padding: 12px;
    text-align: left;
}
.photo-removal-request p { margin-top: 0; }
.photo-removal-request input,
.photo-removal-request textarea {
    border-color: rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .07);
    color: #fff;
}
.photo-removal-request button { margin-top: 10px; }
.viewer-filmstrip {
    position: sticky;
    bottom: 0;
    z-index: 5;
    box-sizing: border-box;
    display: flex;
    gap: 5px;
    width: 100%;
    max-width: none;
    margin: 0;
    overflow-x: auto;
    border-top: 1px solid rgba(255, 255, 255, .08);
    background: linear-gradient(180deg, rgba(26, 26, 26, .82), rgba(26, 26, 26, .98));
    padding: 10px max(18px, calc((100vw - 1180px) / 2)) 12px;
    scrollbar-color: rgba(255, 255, 255, .22) transparent;
    backdrop-filter: blur(16px);
}
.viewer-filmstrip a {
    display: block;
    width: 74px;
    height: 48px;
    flex: 0 0 auto;
    border-bottom: 2px solid transparent;
    opacity: .48;
}
.viewer-filmstrip a:hover, .viewer-filmstrip a.active { opacity: 1; text-decoration: none; }
.viewer-filmstrip a.active { border-color: var(--accent); }
.viewer-filmstrip img { display: block; width: 100%; height: 100%; object-fit: cover; }
.main-photo-viewer .mini-cart {
    position: fixed;
    right: 18px;
    bottom: 86px;
    left: auto;
    width: min(420px, calc(100vw - 36px));
    margin: 0;
}
.viewer-file-meta { max-width: 1180px; margin: -12px auto 0; padding: 0 16px 22px; color: var(--text); font-size: 14px; font-weight: 800; text-align: center; text-transform: uppercase; }
.photo-viewer:fullscreen,
.photo-viewer.viewer-fullscreen-fallback {
    width: 100vw;
    height: 100vh;
    overflow: auto;
    background: #1A1A1A;
}
.photo-viewer.viewer-fullscreen-fallback { position: fixed; inset: 0; z-index: 100; }
.photo-viewer.viewer-fullscreen-active .viewer-stage { min-height: calc(100vh - 150px); }
.photo-viewer.viewer-fullscreen-active .viewer-image-frame { min-height: calc(100vh - 210px); }
.photo-viewer.viewer-fullscreen-active .viewer-stage img { max-height: calc(100vh - 220px); }
.pswp {
    --pswp-bg: #1A1A1A;
    z-index: 90;
}
.pswp .pswp__top-bar {
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    background: rgba(26, 26, 26, .84) !important;
    backdrop-filter: blur(16px);
}
.pswp__img {
    border-radius: 0;
}
.pswp__counter {
    display: none;
}
.pswp-wax-controls {
    position: absolute;
    inset: 0;
    z-index: 12;
    color: #f7f5ee;
    pointer-events: none;
}
.pswp.pswp--ui-visible .pswp-wax-controls {
    z-index: 12;
    pointer-events: none;
}
.pswp-wax-controls .viewer-tool,
.pswp-wax-controls .viewer-back,
.pswp-wax-controls .viewer-event-title,
.pswp-wax-controls .photo-removal-request,
.pswp-wax-controls .viewer-filmstrip {
    pointer-events: auto;
}
.pswp-wax-topbar {
    position: absolute;
    top: 0;
    right: 108px;
    left: 0;
    box-sizing: border-box;
    display: flex;
    width: auto;
    max-width: none;
    min-height: 58px;
    margin: 0;
    border-bottom: 0;
    background: transparent;
    backdrop-filter: none;
}
.pswp-wax-topbar .viewer-actions {
    gap: 4px;
}
.pswp-wax-meta {
    position: absolute;
    right: 0;
    bottom: 116px;
    left: 0;
    pointer-events: none;
}
.pswp-wax-actions-under {
    position: absolute;
    right: 0;
    bottom: 74px;
    left: 0;
    pointer-events: none;
}
.pswp-wax-actions-under > * {
    pointer-events: auto;
}
.pswp-wax-filmstrip {
    position: absolute;
    bottom: 0;
    pointer-events: auto;
}
.pswp-wax-filmstrip:empty::before {
    content: "Loading nearby photos...";
    color: rgba(255, 255, 255, .54);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.pswp-wax-filmstrip a {
    transition: opacity .18s ease, transform .18s ease;
}
.pswp-wax-filmstrip a.active {
    transform: translateY(-2px);
}

@keyframes viewer-slide-next {
    from { opacity: .1; transform: translateX(46px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes viewer-slide-previous {
    from { opacity: .1; transform: translateX(-46px); }
    to { opacity: 1; transform: translateX(0); }
}

.favourite-group { margin-top: 34px; }
.favourites-email { max-width: 560px; margin-top: 32px; }
.photographer-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, 280px); align-items: center; gap: 28px; }
.profile-photo { display: block; width: 100%; aspect-ratio: 1 / 1; border: 1px solid var(--border); object-fit: cover; }
.profile-photo-placeholder { border-radius: 50%; }
.profile-thumb { width: 96px; height: 96px; border: 1px solid var(--border); object-fit: cover; }
.profile-photo-rank { position: absolute; right: 8px; bottom: 8px; z-index: 2; background: rgba(26, 26, 26, .82); color: var(--accent); }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 12px; margin: 18px 0 26px; }
.metric { display: grid; gap: 5px; border-radius: var(--radius-sm); background: var(--raised); padding: 14px; }
.metric span { color: var(--muted); font-size: 14px; }
.metric strong { font-family: var(--font-display); font-size: 25px; font-weight: 700; }
.portal-actions, .admin-links { flex-wrap: wrap; margin: 0 0 22px; }
.admin-links { gap: 14px; }
.admin-section { margin-top: 20px; }
.staff-account { border-top: 1px solid var(--border); padding: 12px 0; }
.staff-account:first-of-type { border-top: 0; }
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); gap: 18px; align-items: start; }
.cart-lines { display: grid; gap: 10px; }
.cart-line { display: grid; grid-template-columns: 86px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 10px; }
.cart-line img { display: block; width: 86px; height: 70px; border-radius: var(--radius-xs); object-fit: cover; }
.cart-line-copy { display: grid; gap: 4px; min-width: 0; }
.cart-line-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-line-meta { color: var(--muted); font-size: 13px; font-weight: 800; text-transform: uppercase; }
.cart-summary { position: sticky; top: 84px; }
.cart-summary h2 { color: var(--accent); font-size: 40px; }
.cart-callout { border-left: 3px solid var(--accent); background: var(--raised); padding: 10px 12px; }
.cart-delivery-note { border: 1px solid var(--border); background: var(--raised); padding: 10px 12px; color: var(--text); font-size: 14px; font-weight: 800; }
.checkout-form { display: grid; gap: 12px; }
.checkout-form label { margin-top: 0; }
.checkout-marketing-opt-in { font-size: 14px; }
.login-card { max-width: 440px; margin: auto; }
.access-card { max-width: 560px; margin: auto; }
.access-error-hero { text-align: center; }
.access-error-hero h1, .access-error-hero .page-hero-copy { margin-right: auto; margin-left: auto; }
.access-error-card { text-align: center; }
.access-error-card .actions { justify-content: center; }
.access-code-input { font-size: 28px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.download-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.download-card { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); padding-bottom: 12px; }
.download-card img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.download-card-copy { padding: 0 12px; word-break: break-word; }
.download-card .btn { margin: 12px 12px 0; }
.legal { max-width: 720px; margin: auto; }
.cookie-consent {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 120;
    display: grid;
    width: min(520px, calc(100vw - 32px));
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    border: 1px solid var(--chrome-border);
    border-radius: var(--radius-md);
    background: var(--chrome-bg);
    box-shadow: 0 18px 44px rgba(0, 0, 0, .34);
    color: var(--chrome-text);
    padding: 16px;
}
.cookie-consent-copy {
    min-width: 0;
}
.cookie-consent-copy strong {
    display: block;
    margin-bottom: 4px;
    color: var(--accent);
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 900;
    line-height: 1.05;
}
.cookie-consent-copy p {
    margin: 0;
    color: var(--chrome-muted);
    font-size: 14px;
    line-height: 1.35;
}
.cookie-consent-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}
.cookie-consent-actions form { margin: 0; }

.spin-mode .brand,
.spin-mode .gallery-tile img,
.spin-mode .cart-line img,
.spin-mode .download-card img,
.spin-mode [data-wax-viewer-image],
.spin-mode .pswp__img,
.spin-mode .viewer-filmstrip img,
.spin-mode .gallery-cover-image,
.spin-mode .event-card img {
    animation: wax-spin 1.15s linear infinite;
    transform-origin: center;
}
.spin-mode .brand { animation-duration: .72s; }
.spin-mode .btn,
.spin-mode button,
.spin-mode .badge,
.spin-mode .nav a {
    animation: wax-spin-wobble .9s ease-in-out infinite;
}

@keyframes wax-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes wax-spin-wobble {
    0%, 100% { transform: rotate(-2deg); }
    50% { transform: rotate(2deg); }
}

@media (max-width: 800px) {
    .viewer-topbar, .section-heading { align-items: flex-start; flex-direction: column; }
    .header-inner { align-items: stretch; flex-direction: column; gap: 14px; }
    .brand-controls { width: 100%; justify-content: space-between; }
    .theme-toggle.theme-toggle-mobile { display: inline-flex; }
    .theme-toggle.theme-toggle-desktop { display: none; }
    .main-gallery-view .gallery-intro > .section-heading { align-items: center; }
    .header-inner { padding: 16px 0; }
    .brand { width: 150px; }
    .theme-toggle-track { width: 58px; height: 31px; }
    .theme-toggle-thumb { top: 4px; left: 4px; width: 21px; height: 21px; }
    [data-theme="light"] .theme-toggle-thumb { transform: translateX(27px); }
    .nav {
        display: grid;
        width: 100%;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 6px;
        font-size: 13px;
    }
    .nav > * + * { border-left: 0; padding-left: 0; }
    .nav a {
        display: flex;
        min-width: 0;
        min-height: 38px;
        align-items: center;
        justify-content: center;
        border: 1px solid var(--chrome-border);
        padding: 7px 4px;
        text-align: center;
    }
    .nav a:hover { border-color: var(--accent); }
    .nav form { grid-column: 1 / -1; }
    .nav form button { width: 100%; }
    .main { padding: 30px 0 54px; }
    .main-photo-viewer { padding: 0; }
    .hero { padding: 24px 0 44px; }
    .event-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filter-form { width: 100%; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; }
    .filter-form label:first-child { grid-column: 1 / -1; }
    .filter-form button, .filter-form .btn { width: 100%; }
    .filter-form > * { min-width: 0; }
    .photographer-hero { grid-template-columns: 1fr; }
    .cart-layout { grid-template-columns: 1fr; }
    .cart-summary { position: static; }
    .cookie-consent { grid-template-columns: 1fr; }
    .cookie-consent-actions { justify-content: stretch; }
    .cookie-consent-actions .btn { flex: 1 1 150px; }
}

@media (max-width: 560px) {
    .wrap { width: min(100% - 20px, 1180px); }
    .header-inner { padding: 14px 0; }
    .brand { width: 138px; }
    .theme-toggle-track { width: 54px; height: 30px; }
    .theme-toggle-thumb { top: 4px; left: 4px; width: 20px; height: 20px; }
    [data-theme="light"] .theme-toggle-thumb { transform: translateX(24px); }
    .nav { gap: 5px; font-size: 12px; letter-spacing: .025em; }
    .nav a { min-height: 36px; padding-right: 2px; padding-left: 2px; }
    .nav-count { min-width: 18px; min-height: 18px; font-size: 11px; }
    .filter-form { gap: 8px; }
    .filter-form input, .filter-form select, .filter-form button, .filter-form .btn { width: 100%; height: 39px; }
    .filter-form input[type="date"] { min-width: 0 !important; padding-right: 6px; padding-left: 9px; font-size: 13px; }
    .event-grid { grid-template-columns: 1fr; }
    .main-gallery-view .gallery-grid { width: calc(100% - 4px); }
    .main-gallery-view .gallery-cover { min-height: 390px; margin-top: -30px; margin-bottom: 26px; }
    .gallery-grid { gap: 4px; --gallery-target-row-height: 138px; --gallery-min-row-height: 104px; --gallery-max-row-height: 176px; }
    .gallery-tile { flex-basis: var(--tile-width, calc(var(--photo-ratio, 1.5) * 138px)); width: var(--tile-width, calc(var(--photo-ratio, 1.5) * 138px)); height: var(--tile-height, 138px); }
    .main-gallery-view .tile-actions { display: none; }
    .tile-actions { right: 5px; bottom: 5px; }
    .icon-button { width: 30px; height: 30px; font-size: 16px; }
    .cart-icon { width: 19px; height: 19px; }
    .viewer-body .main-photo-viewer { width: 100vw; margin-right: calc(50% - 50vw); margin-left: calc(50% - 50vw); }
    .photo-viewer, .viewer-stage { background: #1A1A1A; }
    .viewer-topbar { flex-direction: row; align-items: center; gap: 8px; padding: 8px 10px; }
    .viewer-back-group { gap: 8px; min-width: 0; }
    .viewer-event-title { display: none; }
    .viewer-back { width: 30px; height: 30px; }
    .viewer-actions { flex: 1; flex-wrap: nowrap; justify-content: flex-end; gap: 4px; min-width: 0; }
    .viewer-tool { min-height: 30px; padding: 4px 5px; font-size: 10px; letter-spacing: .04em; white-space: nowrap; }
    .viewer-tool-primary { padding-inline: 8px; }
    .viewer-stage { min-height: calc(100vh - 205px); padding: 12px 32px 8px; }
    .viewer-stage::after { top: 10px; font-size: 10px; }
    .viewer-stage-controls { top: 8px; right: 8px; gap: 4px; }
    .viewer-stage-tool { min-height: 29px; padding: 4px 6px; font-size: 9px; letter-spacing: .04em; }
    .viewer-image-frame { min-height: calc(100vh - 280px); }
    .viewer-stage img { max-height: calc(100vh - 300px); box-shadow: none; }
    .viewer-arrow { width: 28px; height: 28px; font-size: 16px; }
    .viewer-arrow.previous { left: 5px; }
    .viewer-arrow.next { right: 5px; }
    .viewer-meta { padding-inline: 10px; text-align: center; }
    .viewer-actions-under { display: none; }
    .viewer-filmstrip { padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); }
    .viewer-filmstrip a { width: 64px; height: 44px; }
    .pswp-wax-topbar { right: 92px; min-height: 46px; padding: 8px 6px; }
    .pswp .pswp__top-bar { min-height: 46px; }
    .pswp-wax-topbar .viewer-actions { overflow-x: auto; justify-content: flex-start; }
    .pswp-wax-actions-under [data-wax-download-feedback],
    .pswp-wax-actions-under [data-wax-cart-add] {
        min-height: 42px;
        padding: 8px 18px;
        font-size: 12px;
    }
    .pswp-wax-topbar [data-wax-download-feedback],
    .pswp-wax-topbar [data-wax-viewer-fullscreen] { display: none; }
    .pswp-wax-meta { bottom: 104px; padding-inline: 8px; font-size: 10px; }
    .pswp-wax-meta [data-wax-pswp-caption] { display: none; }
    .pswp-wax-actions-under {
        bottom: 58px;
        display: flex;
        overflow-x: auto;
        justify-content: center;
        gap: 10px;
        padding-inline: 8px;
        text-align: center;
    }
    .pswp-wax-actions-under [data-wax-favourite],
    .pswp-wax-actions-under [data-wax-share] { display: none; }
    .pswp-wax-filmstrip { padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
    .pswp-wax-filmstrip a { width: 58px; height: 42px; }
    .main-photo-viewer .mini-cart { bottom: calc(70px + env(safe-area-inset-bottom)); }
    .mini-cart { bottom: 8px; gap: 10px; }
    .mini-cart-total { font-size: 22px; }
    .mini-cart .btn { padding: 8px 10px; }
    .cart-line { grid-template-columns: 70px minmax(0, 1fr); }
    .cart-line img { width: 70px; height: 58px; }
    .cart-line .btn { grid-column: 2; justify-self: start; }
    table { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
    .gallery-tile::before { animation: none; }
    .viewer-slide-next,
    .viewer-slide-previous { animation: none; }
    .spin-mode .brand,
    .spin-mode .gallery-tile img,
    .spin-mode .cart-line img,
    .spin-mode .download-card img,
    .spin-mode [data-wax-viewer-image],
    .spin-mode .viewer-filmstrip img,
    .spin-mode .gallery-cover-image,
    .spin-mode .event-card img,
    .spin-mode .btn,
    .spin-mode button,
    .spin-mode .badge,
    .spin-mode .nav a { animation: none; }
}
