:root {
    --bg: #eae9e4;
    --surface: #ffffff;
    --text: #171717;
    --muted: #6f6f6a;
    --border: #deddd7;
    --accent: #171717;
    --radius: 16px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    padding: 0 20px 60px;
    background: var(--bg);
    color: var(--text);
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Helvetica,
        Arial,
        sans-serif;
    line-height: 1.5;
}

body > h1,
body > h2,
body > p,
body > form,
body > ul {
    width: min(100%, 1100px);
    margin-left: auto;
    margin-right: auto;
}

h1 {
    margin-top: 40px;
    margin-bottom: 8px;
    font-size: clamp(2rem, 5vw, 3.2rem);
    letter-spacing: -0.04em;
}

h2 {
    margin-top: 42px;
    font-size: 1.35rem;
}

a {
    color: inherit;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    min-height: 44px;
    padding: 10px 16px;
    border: 0;
    border-radius: 12px;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

button:hover {
    opacity: 0.86;
}

ul {
    padding: 0;
    list-style: none;
}

li {
    margin: 14px 0;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

li form {
    margin: 10px 6px 0 0;
}

.snap-nav {
    margin: 0 -20px 30px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.94);
}

.snap-nav__inner {
    width: min(calc(100% - 40px), 1100px);
    margin: 0 auto;
    min-height: 68px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.snap-nav__brand {
    margin-right: auto;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    text-decoration: none;
}

.snap-nav a:not(.snap-nav__brand) {
    color: var(--muted);
    font-size: 0.94rem;
    font-weight: 600;
    text-decoration: none;
}

.snap-nav__logout {
    margin: 0;
}

.snap-nav__logout button {
    appearance: none;
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 0.94rem;
    font-weight: 600;
    cursor: pointer;
}

.snap-nav__logout button:hover {
    color: var(--text);
}

.snap-nav a:hover {
    color: var(--text);
}

@media (max-width: 700px) {
    body {
        padding-left: 14px;
        padding-right: 14px;
    }

    .snap-nav {
        margin-left: -14px;
        margin-right: -14px;
    }

    .snap-nav__inner {
        width: calc(100% - 28px);
        gap: 14px;
        overflow-x: auto;
    }

    li {
        padding: 16px;
    }

    button {
        width: 100%;
    }
}

.sessions-section {
    width: min(100%, 1100px);
    margin: 40px auto 0;
}

.sessions-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 18px;
}

.sessions-heading h2 {
    margin: 0;
}

.muted {
    margin: 4px 0 0;
    color: var(--muted);
}

.session-list {
    display: grid;
    gap: 18px;
}

.session-card {
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.session-card--active {
    border-width: 2px;
}

.session-card--disabled {
    background: #f7f6f2;
    border-color: #e5e3dc;
    box-shadow: 0 4px 14px rgba(0,0,0,.03);
}

.active-session-banner {
    margin: -8px 0 18px;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.active-session-close {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.active-session-close form {
    margin: 0;
}

.session-card__header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
}

.session-card h3 {
    margin: 0 0 5px;
    font-size: 1.3rem;
    letter-spacing: -0.025em;
}

.session-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    color: var(--muted);
    font-size: 0.9rem;
}

.status-badge {
    flex: 0 0 auto;
    padding: 6px 10px;
    border-radius: 999px;
    background: #ededE8;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.status-badge--open {
    background: #e5f2e8;
}

.status-badge--ready {
    background: #e7edf7;
}

.status-badge--disabled {
    background: #eee9e9;
    color: var(--muted);
}

.next-step {
    margin-top: 22px;
    padding: 15px 17px;
    border-radius: 12px;
    background: var(--bg);
}

.next-step__label {
    display: block;
    margin-bottom: 2px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.session-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.session-actions form,
.session-footer form,
.session-danger form {
    margin: 0;
}

.button-secondary,
.button-link {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    font-weight: 700;
    text-decoration: none;
}

.button-secondary:hover,
.button-link:hover {
    background: var(--bg);
    opacity: 1;
}

.session-links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.session-links:empty {
    display: none;
}

.session-links a {
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 650;
    text-decoration: none;
}

.session-links a:hover {
    color: var(--text);
}

.session-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 20px;
}

.published-note {
    color: var(--muted);
    font-weight: 700;
}

.session-danger {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    width: 100%;
    margin-top: 18px;
}

.session-danger .session-reopen {
    justify-self: start;
}

.session-danger > form:not(.session-reopen) {
    justify-self: end;
}

.button-danger {
    background: transparent;
    color: #8d3c3c;
    border: 1px solid #dbcaca;
}

.button-danger:hover {
    background: #f7eeee;
    opacity: 1;
}

.empty-state {
    padding: 40px 24px;
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

@media (max-width: 700px) {
    .session-card {
        padding: 18px;
    }

    .session-card__header {
        gap: 10px;
    }

    .session-actions {
        display: grid;
    }

    .session-actions form,
    .session-actions button,
    .button-link {
        width: 100%;
    }

    .session-links {
        gap: 14px;
    }

    .session-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .session-footer form,
    .session-footer button {
        width: 100%;
    }

    .active-session-close form,
    .active-session-close button {
        width: 100%;
    }

    .session-danger {
        justify-content: stretch;
    }

    .session-danger form,
    .session-danger button {
        width: 100%;
    }
}

.scan-page {
    width: min(100%, 620px);
    margin: 40px auto 0;
}

.scan-header {
    margin-bottom: 24px;
}

.scan-header h1 {
    width: auto;
    margin: 5px 0 8px;
}

.scan-session {
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.scan-intro {
    margin: 0;
    color: var(--muted);
}

.camera-area {
    overflow: hidden;
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111;
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.camera-preview {
    display: block;
    width: 100%;
    max-height: 70vh;
    object-fit: cover;
}

.camera-status {
    margin: 0;
    padding: 30px;
    color: #fff;
    text-align: center;
    font-weight: 700;
}

.scan-result {
    margin-top: 16px;
    font-weight: 700;
    text-align: center;
}

.scan-result--error {
    margin-top: 16px;
    padding: 22px 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
    font-size: 1.15rem;
    font-weight: 800;
    text-align: center;
}

.scan-again {
    width: 100%;
    min-height: 48px;
    margin-top: 14px;
    font-weight: 800;
}


.scan-back {
    margin-top: 24px;
}

.scan-back a {
    color: var(--muted);
    font-weight: 650;
    text-decoration: none;
}

@media (max-width: 700px) {
    .scan-page {
        margin-top: 24px;
    }

    .camera-area {
        min-height: 300px;
        border-radius: 16px;
    }

}

/* Camera preview: no unused dark area beside the video */
.camera-area:has(.camera-preview:not([style*="display:none"])) {
    min-height: 0;
    background: transparent;
}

.camera-preview {
    height: auto;
    border-radius: 18px;
}

@media (max-width: 700px) {
    .camera-area:has(.camera-preview:not([style*="display:none"])) {
        min-height: 0;
    }

    .camera-preview {
        border-radius: 16px;
    }
}


/* SNAP-U upload page */

.upload-page {
    width: min(100%, 720px);
    margin: 40px auto 0;
}

.upload-header {
    margin-bottom: 24px;
}

.upload-header h1 {
    width: auto;
    margin-bottom: 8px;
}

.upload-header p {
    margin: 0;
    color: var(--muted);
}

.upload-form {
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.upload-field + .upload-field {
    margin-top: 22px;
}

.upload-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 750;
}

.upload-field select,
.upload-field input[type="file"] {
    width: 100%;
}

.upload-field select {
    min-height: 48px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    color: var(--text);
}

.upload-field input[type="file"] {
    padding: 12px;
    border: 1px dashed var(--border);
    border-radius: 10px;
    background: #fafaf8;
}

.upload-help {
    margin: -2px 0 10px;
    color: var(--muted);
    font-size: 0.92rem;
}

.upload-submit {
    width: 100%;
    margin-top: 24px;
    min-height: 48px;
}

.upload-message,
.upload-empty {
    margin-bottom: 20px;
    padding: 16px 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.upload-message ul {
    margin-bottom: 0;
}

.upload-success {
    font-weight: 700;
}

.upload-errors strong {
    display: block;
    margin-bottom: 8px;
}

.upload-empty p {
    margin-bottom: 0;
    color: var(--muted);
}

.upload-back {
    margin-top: 24px;
}

.upload-back a {
    color: var(--muted);
    font-weight: 650;
    text-decoration: none;
}

@media (max-width: 700px) {
    .upload-page {
        margin-top: 24px;
    }

    .upload-form {
        padding: 18px;
    }
}

/* Field action: only show Scan card on mobile */
@media (min-width: 701px) {
    .scan-card-action {
        display: none !important;
    }
}

/* Desktop action: hide Upload photos on mobile */
@media (max-width: 700px) {
    .session-card a[href^="/uploads.php"] {
        display: none !important;
    }
}

/* Public gallery */

.public-gallery {
    width: min(100%, 1100px);
    margin: 0 auto;
    padding: 28px 20px 48px;
}

.public-gallery__header {
    margin-bottom: 40px;
}

.public-gallery__brand {
    font-size: 0.95rem;
    font-weight: 850;
    letter-spacing: 0.12em;
}

.gallery-state,
.gallery-ready__intro {
    max-width: 620px;
    margin: 70px auto 40px;
    text-align: center;
}

.gallery-state h1,
.gallery-ready__intro h1 {
    margin-bottom: 10px;
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.05;
}

.gallery-state p,
.gallery-ready__intro p {
    margin: 0;
    color: var(--muted);
    font-size: 1.05rem;
}

.photo-grid {
    column-count: 2;
    column-gap: 18px;
}

.photo-card {
    display: block;
    width: 100%;
    margin-bottom: 18px;
    break-inside: avoid;
    overflow: hidden;
    background: #111;
    border-radius: 14px;
}

.photo-card img {
    display: block;
    width: 100%;
    height: auto;
}

.gallery-dashboard-link {
    margin-top: 32px;
    text-align: center;
}

.gallery-dashboard-link a {
    color: var(--muted);
    text-decoration: none;
    font-weight: 650;
}

@media (max-width: 700px) {
    .public-gallery {
        padding: 20px 14px 36px;
    }

    .public-gallery__header {
        margin-bottom: 22px;
    }

    .gallery-state,
    .gallery-ready__intro {
        margin: 46px auto 28px;
    }

    .photo-grid {
        column-count: 1;
        column-gap: 0;
    }

    .photo-card {
        margin-bottom: 14px;
    }
}

/* Stronger session links */

.session-links .session-link-info {
    background: #e5f3ff;
    border-color: #a9d3f5;
    color: #174d73;
}

.session-links .session-link-info:hover {
    background: #d4eaff;
}

.session-links .session-link-danger {
    background: #fff0ee;
    border-color: #efb8b2;
    color: #9b2921;
}

.session-links .session-link-danger:hover {
    background: #ffe1dd;
}


/* Published session thumbnails */

.published-block {
    flex: 1;
}

.session-thumbnails {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.session-thumbnails a {
    display: block;
    width: 62px;
    height: 62px;
    overflow: hidden;
    border-radius: 9px;
    border: 1px solid var(--border);
    background: #eee;
}

.session-thumbnails img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 700px) {
    .session-thumbnails a {
        width: 56px;
        height: 56px;
    }
}

.session-thumbnails__more {
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: var(--muted);
    background: #f3f2ee !important;
    text-decoration: none;
}

/* Equivalent photo actions */

.session-photo-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 9px 14px;
    border: 1px solid;
    border-radius: 10px;
    font-weight: 750;
    text-decoration: none;
}

.session-photo-action-add {
    background: #e5f3ff;
    border-color: #a9d3f5;
    color: #174d73;
}

.session-photo-action-delete {
    background: #fff0ee;
    border-color: #efb8b2;
    color: #9b2921;
}

/* Gallery and QR are neutral navigation actions */
.session-links .session-link-info {
    background: transparent;
    border-color: var(--border);
    color: var(--text);
}

.session-links .session-link-info:hover {
    background: #f3f2ee;
}

.session-links .session-link-info {
    background: transparent;
    border-color: var(--border);
    color: #174d73;
}

.session-links .session-link-info:hover {
    background: #f3f2ee;
    color: #174d73;
}

.session-thumbnail {
    width: 62px;
    height: 62px;
    overflow: hidden;
    border-radius: 9px;
    border: 1px solid var(--border);
    background: #eee;
}

.session-thumbnail img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.session-thumbnails--muted {
    opacity: 0.38;
    filter: grayscale(35%);
}

.session-thumbnails__more {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: var(--muted);
    background: #f3f2ee;
}

@media (max-width: 700px) {
    .session-thumbnail {
        width: 56px;
        height: 56px;
    }
}

/* Photographer photo management */
.manage-page { width: min(100%, 1100px); margin: 36px auto 0; }
.manage-back { display: inline-block; padding: 8px 0; color: var(--muted); font-weight: 650; text-decoration: none; }
.manage-back:hover { color: var(--text); text-decoration: underline; }
.manage-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin: 24px 0; }
.manage-eyebrow { margin: 0 0 6px; color: var(--muted); font-weight: 650; }
.manage-header h1 { margin: 0 0 10px; line-height: 1.1; }
.manage-header .status-badge { flex-shrink: 0; margin-top: 6px; }
.manage-intro { max-width: 580px; margin: 0; color: var(--muted); }
.manage-summary { display: flex; align-items: baseline; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding: 18px 0; border-top: 1px solid var(--border); }
.manage-summary p { margin: 0; color: var(--muted); font-size: .92rem; }
.manage-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.manage-photo { min-width: 0; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.manage-photo__preview { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; padding: 12px; background: #f5f4f0; }
.manage-photo__preview img { display: block; width: 100%; height: 100%; object-fit: contain; }
.manage-photo__footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; border-top: 1px solid var(--border); }
.manage-photo__footer > span { font-size: .9rem; color: var(--muted); }
.manage-photo__footer form { margin: 0; }
.manage-delete { min-height: 44px; border: 1px solid #e5c1bb; background: #fff2ef; color: #943e32; font-size: .9rem; }
.manage-delete:hover { opacity: 1; background: #ffe1dd; }
.manage-page a:focus-visible, .manage-page button:focus-visible { outline: 3px solid #174d73; outline-offset: 3px; }
.manage-photo__preview:focus-visible { outline-offset: -4px; }
.manage-message { padding: 16px 18px; margin: 20px 0; border: 1px solid var(--border); border-radius: 12px; }
.manage-message--success { background: #edf5ed; color: #285636; border-color: #c6ddc9; }
.manage-message--error { background: #fff2ef; color: #943e32; border-color: #e5c1bb; }
.manage-empty h2 { margin: 0 0 10px; }
.manage-empty p { color: var(--muted); margin: 0 auto 16px; max-width: 460px; }
@media (max-width: 960px) { .manage-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) {
    .manage-page { margin-top: 20px; }
    .manage-header { gap: 14px; flex-wrap: wrap; margin-top: 18px; }
    .manage-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    .manage-photo__preview { aspect-ratio: 4 / 3; }
    .manage-empty { padding: 28px 18px; }
}

/* Photographer login */
.login-body { min-height: 100vh; min-height: 100svh; padding-bottom: 36px; }
.login-page { width: min(100%, 440px); margin: 0 auto; padding-top: clamp(32px, 8vh, 88px); }
.login-brand { display: block; margin-bottom: 28px; text-align: center; font-size: 1.2rem; font-weight: 850; letter-spacing: .13em; text-decoration: none; }
.login-panel { padding: 36px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.login-eyebrow { margin: 0 0 8px; color: var(--muted); font-size: .9rem; font-weight: 650; }
.login-panel h1 { margin: 0 0 12px; line-height: 1.1; }
.login-intro { margin: 0 0 28px; color: var(--muted); }
.login-field + .login-field { margin-top: 20px; }
.login-field label { display: block; margin-bottom: 8px; font-weight: 650; }
.login-field input { width: 100%; min-height: 50px; padding: 12px; border: 1px solid #bcbcb5; border-radius: 10px; background: #fff; color: var(--text); font-size: 1rem; }
.login-submit { width: 100%; min-height: 50px; margin-top: 28px; }
.login-error { margin: 0 0 22px; padding: 14px 16px; border: 1px solid #e5c1bb; border-radius: 10px; background: #fff2ef; color: #943e32; }
.login-footnote { margin: 24px 0 0; text-align: center; color: var(--muted); font-size: .9rem; }
.login-page :is(a, input, button):focus-visible, .view-qr-back:focus-visible { outline: 3px solid #174d73; outline-offset: 3px; }
/* Individual QR view; print-sheet layout is separate */
.view-qr-page { width: min(100%, 560px); margin: 32px auto 0; }
.view-qr-back { display: inline-block; padding: 8px 0; color: var(--muted); font-weight: 650; text-decoration: none; }
.view-qr-back:hover { text-decoration: underline; color: var(--text); }
.view-qr-header { margin: 24px 0; }
.view-qr-header h1 { margin: 6px 0 12px; line-height: 1.1; }
.view-qr-header p { margin: 0; color: var(--muted); }
.view-qr-panel { padding: 28px; text-align: center; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.view-qr-brand { margin: 0 0 20px; font-size: 1rem; font-weight: 850; letter-spacing: .13em; }
.view-qr-image { width: min(100%, 400px); margin: 0 auto; padding: 12px; background: #fff; }
.view-qr-image img { display: block; width: 100%; height: auto; }
.view-qr-number { margin: 20px 0 0; font-size: 1.15rem; letter-spacing: .04em; overflow-wrap: anywhere; }
.view-qr-nickname { margin: 8px 0 0; color: var(--muted); overflow-wrap: anywhere; }
.view-qr-note { margin: 20px auto 0; max-width: 420px; text-align: center; color: var(--muted); font-size: .92rem; }
@media (max-width: 600px) {
    .login-panel { padding: 26px 22px; }
    .view-qr-page { margin-top: 20px; }
    .view-qr-panel { padding: 22px 16px; }
}


/* Camera-only scan mode */
.scan-page--camera-mode {
    padding-top: 12px;
}

.scan-page--camera-mode .scan-back--top {
    margin: 0 0 12px;
}

.scan-page--camera-mode .scan-close-session {
    margin-top: 18px;
}

@media (max-width: 700px) {
    .scan-page--camera-mode {
        padding-top: 8px;
    }

    .scan-page--camera-mode .scan-close-session,
    .scan-page--camera-mode .scan-close-session button {
        width: 100%;
    }
}


/* Desktop-only navigation items */
@media (max-width: 700px) {
    .desktop-only-nav {
        display: none !important;
    }
}


/* Hide session management help on mobile */
@media (max-width: 700px) {
    .sessions-heading .muted {
        display: none;
    }
}


/* Desktop-only session actions */
@media (max-width: 700px) {
    .desktop-only-action {
        display: none !important;
    }
}

/* Reopen session: clearer secondary action */
.session-reopen .button-secondary {
    border-color: #aaa9a3;
    border-width: 1.5px;
}

/* Match Reopen and Disable session button size */
.session-danger .button-secondary,
.session-danger .button-danger {
    min-height: 38px;
    padding: 7px 12px;
    font-size: 0.82rem;
    line-height: 1;
    white-space: nowrap;
}

/* Stronger visual distinction for disabled sessions */
.session-card--disabled {
    background: #efeee9;
    border-color: #d8d6cf;
    box-shadow: 0 3px 10px rgba(0,0,0,.025);
}

/* Stronger disabled-session contrast on desktop */
@media (min-width: 701px) {
    .session-card--disabled {
        background: #e4e3de;
        border-color: #cbc9c2;
    }
}

.session-extension-used {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
}

/* Session metadata hierarchy */
.session-meta {
    margin-top: 8px;
}

.session-meta__counts {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.session-meta__counts span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 9px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255,255,255,.55);
    font-size: 0.82rem;
    font-weight: 750;
}

.session-meta__date {
    margin-top: 7px;
    color: var(--muted);
    font-size: 0.78rem;
}

@media (max-width: 700px) {
    .session-meta__counts span {
        min-height: 26px;
        padding: 3px 8px;
        font-size: 0.78rem;
    }

    .session-meta__date {
        margin-top: 5px;
    }
}

/* Primary action: publish gallery */
.session-footer button {
    min-height: 44px;
    padding: 10px 18px;
    border: 1px solid var(--text);
    border-radius: 12px;
    background: var(--text);
    color: #fff;
    font-weight: 800;
}

.session-footer button:hover {
    opacity: .88;
}

@media (max-width: 700px) {
    .session-footer button {
        width: 100%;
    }
}

/* Reopen session is a field/mobile action */
@media (min-width: 701px) {
    .session-reopen {
        display: none !important;
    }
}

.scan-success-word {
    color: #2f7d32;
}

/* Scanner error message */
.scan-result.scan-result--error {
    color: #b42318;
    font-weight: 800;
}

/* Semantic session status colours */
.status-badge.status-badge--pending {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-badge.status-badge--published {
    background: #dcfce7;
    color: #15803d;
}

.status-badge.status-badge--disabled {
    background: #fee2e2;
    color: #b91c1c;
}

/* Generic utility used instead of inline display styles. */
.snap-hidden {
    display: none;
}


/* SNAP-U gallery actions 2026-09-10 */

.gallery-photo {
    width: 100%;
    margin-bottom: 24px;
    break-inside: avoid;
}

.gallery-photo .photo-card {
    margin-bottom: 10px;
}

.gallery-photo__actions {
    display: grid;
    gap: 8px;
}

.gallery-action {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 46px;
    padding: 11px 14px;
    border: 0;
    border-radius: 10px;
    font: inherit;
    font-weight: 750;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.gallery-action--free {
    background: #238636;
    color: #fff;
}

.gallery-action--free:hover {
    filter: brightness(0.94);
}

.gallery-action--paid {
    background: #191919;
    color: #fff;
}

.gallery-action--paid:disabled {
    opacity: 0.48;
    cursor: not-allowed;
}

.gallery-info {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 50;
}

.gallery-info summary {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-left: auto;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 50%;
    background: #111;
    color: #fff;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
    font-size: 1.25rem;
    font-weight: 850;
    font-style: italic;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.gallery-info summary::-webkit-details-marker {
    display: none;
}

.gallery-info__panel {
    position: absolute;
    right: 0;
    bottom: 60px;
    width: min(360px, calc(100vw - 32px));
    max-height: min(540px, calc(100vh - 110px));
    overflow-y: auto;
    padding: 20px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.gallery-info__panel h2 {
    margin: 0 0 18px;
    font-size: 1.3rem;
}

.gallery-info__item + .gallery-info__item {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.gallery-info__item strong {
    display: block;
    margin-bottom: 5px;
}

.gallery-info__item p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

@media (max-width: 700px) {
    .gallery-photo {
        margin-bottom: 22px;
    }

    .gallery-info {
        right: 16px;
        bottom: 16px;
    }

    .gallery-info summary {
        width: 46px;
        height: 46px;
    }

    .gallery-info__panel {
        bottom: 58px;
    }
}

/* SNAP-U individual public photo 2026-09-10 */

.public-photo-view {
    width: min(100%, 1200px);
    margin: 0 auto;
    padding: 22px 20px 40px;
}

.public-photo-view__back {
    display: inline-block;
    margin-bottom: 20px;
    color: var(--muted);
    font-weight: 700;
    text-decoration: none;
}

.public-photo-view__image {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: calc(100vh - 100px);
    margin: 0 auto;
    object-fit: contain;
}

@media (max-width: 700px) {
    .public-photo-view {
        padding: 16px 14px 28px;
    }

    .public-photo-view__back {
        margin-bottom: 14px;
    }

    .public-photo-view__image {
        max-height: none;
    }
}

/* Commercial gallery SNAP-U branding */
.public-gallery__header {
    text-align: center;
}

.public-gallery__brand {
    display: inline-block;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}


/* SNAP-U Prints selection prototype 2026-09-12 */

.gallery-print-controls {
    width: min(100%, 360px);
    margin: 24px auto 0;
}


.gallery-print-cancel {
    padding: 9px 14px;

    border: 1px solid rgba(185, 28, 28, 0.22);
    border-radius: 10px;

    background: rgba(185, 28, 28, 0.08);
    color: #b91c1c;

    font: inherit;
    font-weight: 800;

    cursor: pointer;
}


.gallery-print-cancel:hover {
    background: rgba(185, 28, 28, 0.13);
    color: #991b1b;
}


.photo-card {
    position: relative;
}


.gallery-print-check {
    position: absolute;
    top: 12px;
    right: 12px;

    display: flex;

    align-items: center;
    justify-content: center;

    width: 36px;
    height: 36px;

    border: 2px solid #fff;
    border-radius: 50%;

    background: #111;
    color: #fff;

    box-shadow:
        0 3px 14px rgba(0, 0, 0, 0.28);

    font-size: 1.15rem;
    font-weight: 850;
    line-height: 1;

    pointer-events: none;
}


.gallery-print-check[hidden] {
    display: none;
}


.public-gallery--print-selection
.gallery-photo__actions {
    display: none;
}


.public-gallery--print-selection
.photo-card {
    cursor: pointer;
}


.public-gallery--print-selection
.gallery-photo--print-selected
.photo-card {
    outline: 4px solid #111;
    outline-offset: -4px;
}


.gallery-print-bar {
    position: fixed;

    right: 50%;
    bottom: 18px;

    z-index: 60;

    display: flex;

    align-items: center;

    gap: 16px;

    width:
        min(
            520px,
            calc(100vw - 36px)
        );

    padding:
        10px
        10px
        10px
        18px;

    border:
        1px solid
        rgba(0, 0, 0, 0.12);

    border-radius: 16px;

    background: #fff;

    box-shadow:
        0 10px 36px
        rgba(0, 0, 0, 0.22);

    transform: translateX(50%);
}


.gallery-print-bar[hidden] {
    display: none;
}


.gallery-print-bar__status {
    flex: 1;
    font-weight: 750;
}


.gallery-print-continue {
    min-height: 44px;

    padding:
        10px
        18px;

    border: 0;
    border-radius: 10px;

    background: #111;
    color: #fff;

    font: inherit;
    font-weight: 800;

    cursor: pointer;
}


.gallery-print-continue:disabled {
    opacity: 0.42;
    cursor: not-allowed;
}


.public-gallery--print-selection {
    padding-bottom: 110px;
}


@media (max-width: 700px) {

    .gallery-print-controls {
        margin-top: 20px;
    }


    .gallery-print-bar {
        bottom:
            max(
                12px,
                env(safe-area-inset-bottom)
            );

        width:
            calc(100vw - 28px);
    }


    .gallery-print-check {
        top: 10px;
        right: 10px;

        width: 34px;
        height: 34px;
    }
}


/* SNAP-U Prints review prototype 2026-09-12 */

.prints-review {
    min-height: 100vh;
    padding:
        24px
        14px
        calc(40px + env(safe-area-inset-bottom));
}


.prints-review[hidden] {
    display: none;
}


.prints-review__inner {
    width: min(100%, 620px);
    margin: 0 auto;
}


.prints-review__back {
    position: sticky;
    top: 0;

    z-index: 20;

    display: block;

    width: 100%;
    min-height: 48px;

    margin: 0;
    padding:
        calc(8px + env(safe-area-inset-top))
        4px
        8px;

    border: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);

    background: #fff;
    color: #111;

    text-align: left;

    font: inherit;
    font-weight: 800;

    cursor: pointer;
}


.prints-review__header {
    margin: 20px 0 24px;
}


.prints-review__header h1 {
    margin: 0 0 6px;
}


.prints-review__header p {
    margin: 0;
    color: var(--muted);
}


.prints-review__photos {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 8px;

    margin-bottom: 26px;
}


.prints-review__photo {
    overflow: hidden;

    aspect-ratio: 1;

    border-radius: 10px;
    background: #eee;
}


.prints-review__photo img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;
}


.prints-review__product {
    padding: 18px 0;

    border-top: 1px solid rgba(0, 0, 0, 0.10);
    border-bottom: 1px solid rgba(0, 0, 0, 0.10);
}


.prints-review__product strong,
.prints-review__product span {
    display: block;
}


.prints-review__product span {
    margin-top: 4px;
    color: var(--muted);
}


.prints-review__quantity {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 18px;

    padding: 20px 0;

    border-bottom: 1px solid rgba(0, 0, 0, 0.10);
}


.prints-review__quantity strong,
.prints-review__quantity span {
    display: block;
}


.prints-review__quantity span {
    max-width: 220px;
    margin-top: 4px;

    color: var(--muted);

    font-size: 0.9rem;
}


.prints-review__stepper {
    display: grid;

    grid-template-columns:
        44px
        40px
        44px;

    align-items: center;

    flex: 0 0 auto;

    border: 1px solid rgba(0, 0, 0, 0.14);
    border-radius: 12px;

    overflow: hidden;
}


.prints-review__stepper button {
    width: 44px;
    height: 44px;

    border: 0;

    background: #f4f4f4;
    color: #111;

    font: inherit;
    font-size: 1.3rem;
    font-weight: 800;

    cursor: pointer;
}


.prints-review__stepper button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}


.prints-review__quantity-value {
    text-align: center;
    font-weight: 800;
}


.prints-review__summary {
    padding: 20px 0;
}


.prints-review__summary-row {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding: 7px 0;
}


.prints-review__summary-row--total {
    margin-top: 10px;
    padding-top: 16px;

    border-top: 1px solid rgba(0, 0, 0, 0.12);

    font-size: 1.1rem;
}


.prints-review__continue {
    width: 100%;
    margin-top: 4px;
}


@media (max-width: 420px) {

    .prints-review__quantity {
        align-items: flex-start;
    }


    .prints-review__quantity span {
        max-width: 150px;
    }


    .prints-review__stepper {
        grid-template-columns:
            42px
            36px
            42px;
    }


    .prints-review__stepper button {
        width: 42px;
    }
}


/* Prints server-side selection validation */

.prints-review__validation-status {
    margin: 14px 0 0;

    text-align: center;

    color: var(--muted);

    font-size: 0.92rem;
    font-weight: 700;
}


.prints-review__validation-status[hidden] {
    display: none;
}


/* SNAP-U Prints delivery prototype 2026-09-12 */

.prints-delivery {
    min-height: 100vh;
    padding:
        24px
        14px
        calc(40px + env(safe-area-inset-bottom));
}


.prints-delivery[hidden] {
    display: none;
}


.prints-delivery__inner {
    width: min(100%, 620px);
    margin: 0 auto;
}


.prints-delivery__back {
    position: sticky;
    top: 0;

    z-index: 20;

    display: block;

    width: 100%;
    min-height: 48px;

    margin: 0;
    padding:
        calc(8px + env(safe-area-inset-top))
        4px
        8px;

    border: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);

    background: #fff;
    color: #111;

    text-align: left;

    font: inherit;
    font-weight: 800;

    cursor: pointer;
}


.prints-delivery__header {
    margin: 20px 0 26px;
}


.prints-delivery__header h1 {
    margin: 0 0 6px;
}


.prints-delivery__header p {
    margin: 0;
    color: var(--muted);
}


.prints-delivery__form {
    display: grid;
    gap: 18px;
}


.prints-delivery__field {
    display: grid;
    gap: 7px;
}


.prints-delivery__field label {
    font-weight: 800;
}


.prints-delivery__field label span {
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 500;
}


.prints-delivery__field input {
    width: 100%;
    min-height: 50px;

    box-sizing: border-box;

    padding: 12px 14px;

    border: 1px solid rgba(0, 0, 0, 0.18);
    border-radius: 12px;

    background: #fff;
    color: #111;

    font: inherit;
    font-size: 16px;
}


.prints-delivery__field input:focus {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}


.prints-delivery__field input[readonly] {
    background: #f4f4f4;
    color: var(--muted);
}


.prints-delivery__continue {
    width: 100%;
    margin-top: 8px;
}


.prints-delivery__status {
    margin: 0;

    text-align: center;

    color: var(--muted);

    font-size: 0.92rem;
    font-weight: 700;
}


.prints-delivery__status[hidden] {
    display: none;
}


.prints-delivery__status[data-state="error"] {
    color: #b42318;
}

.manage-photo--removed {
  border-width: 2px;
  border-color: #e5b7b0;
  background: #fff1ef;
}

.manage-photo--removed .manage-photo__footer {
  background: #fff1ef;
  border-top-color: #e5b7b0;
}
