:root {
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    color: #1d1d1f;
    background: #f4f4f6;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

button,
input {
    font: inherit;
}

:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 4px;
}

.memories-public :focus-visible {
    outline-color: #ffffff;
}

button {
    border: 0;
    border-radius: 10px;
    padding: 12px 18px;
    color: white;
    background: #111;
    cursor: pointer;
}

button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.button-secondary {
    color: #111;
    background: white;
    border: 1px solid #d7d7dc;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.public-page,
.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.card,
.panel,
.summary-card {
    background: white;
    border: 1px solid #e1e1e6;
    border-radius: 18px;
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.06);
}

.card {
    width: min(100%, 520px);
    padding: 40px;
}

.login-card form {
    display: grid;
    gap: 12px;
}

label {
    margin-top: 8px;
    font-weight: 700;
}

input {
    width: 100%;
    border: 1px solid #cfcfd5;
    border-radius: 10px;
    padding: 13px;
}

.eyebrow {
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.info-help {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 5px;
    border: 0;
    padding: 0;
    width: 18px;
    height: 18px;
    color: inherit;
    background: transparent;
    font: inherit;
    font-size: 15px;
    line-height: 1;
    cursor: help;
    vertical-align: middle;
    text-transform: none;
    letter-spacing: normal;
}

.info-help::after {
    content: attr(data-help);
    position: absolute;
    z-index: 50;
    top: calc(100% + 8px);
    left: 50%;
    width: min(280px, 75vw);
    padding: 10px 12px;
    border-radius: 8px;
    background: #111;
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.45;
    letter-spacing: normal;
    text-align: left;
    text-transform: none;
    white-space: normal;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%);
    pointer-events: none;
}

.info-help:hover::after,
.info-help:focus::after {
    opacity: 1;
    visibility: visible;
}

.message {
    margin-bottom: 18px;
    border-radius: 10px;
    padding: 12px;
}

.message-error {
    color: #8a1616;
    background: #ffe7e7;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 24px 32px;
    background: white;
    border-bottom: 1px solid #e1e1e6;
}

.admin-header h1 {
    margin-bottom: 0;
}

.admin-main {
    width: min(1200px, calc(100% - 40px));
    margin: 40px auto;
}

.summary-card {
    width: 220px;
    padding: 24px;
    margin-bottom: 24px;
}

.summary-card span {
    display: block;
    margin-bottom: 8px;
}

.summary-card strong {
    font-size: 36px;
}

.panel {
    padding: 28px;
}

.panel-heading,
.album-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.album-row {
    padding: 18px 0;
    border-top: 1px solid #ececef;
}

.album-row p {
    margin: 6px 0 0;
    color: #696970;
}

.empty-state {
    padding: 50px 20px;
    text-align: center;
    color: #696970;
}

@media (max-width: 650px) {
    .admin-header,
    .panel-heading,
    .album-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .card {
        padding: 28px;
    }
}
a {
    color: inherit;
}

.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    padding: 12px 18px;
    color: white;
    background: #111;
    text-decoration: none;
}

.header-actions,
.action-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.header-actions form,
.action-grid form {
    margin: 0;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.summary-grid .summary-card {
    width: auto;
    margin-bottom: 0;
}
@media (max-width: 800px) {
    .summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .summary-grid {
        grid-template-columns: 1fr;
    }
}
.summary-grid .summary-card {
    margin-bottom: 0;
}
/* Admin system health */

.system-health {
    margin-bottom: 24px;
    padding: 24px;
    background: white;
    border: 1px solid #e1e1e6;
    border-radius: 18px;
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.06);
}

.system-health-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.system-health-heading h2 {
    margin-bottom: 0;
}

.health-overall {
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.health-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.health-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: 14px;
    background: #f7f7f9;
}

.health-item strong,
.health-item small {
    display: block;
}

.health-item small {
    margin-top: 3px;
}

.health-details {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e1e1e6;
}

.health-details summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
    color: #55555d;
    user-select: none;
}

.health-details summary:hover {
    color: #1f1f24;
}

.health-details[open] summary {
    margin-bottom: 16px;
}

.health-details .health-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 800px) {
    .health-details .health-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .health-details .health-grid {
        grid-template-columns: 1fr;
    }
}
.health-dot {
    flex: 0 0 auto;
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.health-green {
    color: #17652d;
    background-color: #e0f6e6;
}

.health-dot.health-green {
    background: #27a844;
    box-shadow: 0 0 0 4px rgba(39, 168, 68, 0.12);
}

.health-amber {
    color: #795500;
    background-color: #fff0c2;
}

.health-dot.health-amber {
    background: #e5a500;
    box-shadow: 0 0 0 4px rgba(229, 165, 0, 0.12);
}

.health-red {
    color: #8a1616;
    background-color: #ffe7e7;
}

.health-dot.health-red {
    background: #cf3030;
    box-shadow: 0 0 0 4px rgba(207, 48, 48, 0.12);
}

@media (max-width: 800px) {
    .health-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .system-health-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .health-grid {
        grid-template-columns: 1fr;
    }
}
.panel-spacing {
    margin-top: 24px;
}

.narrow-main {
    max-width: 760px;
}

.album-form,
.form-group {
    display: grid;
    gap: 10px;
}

.album-form {
    gap: 24px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

textarea {
    width: 100%;
    resize: vertical;
    border: 1px solid #cfcfd5;
    border-radius: 10px;
    padding: 13px;
    font: inherit;
}

small {
    color: #696970;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
}

.checkbox-row input {
    width: auto;
}

.album-row-link {
    color: inherit;
    text-decoration: none;
}

.album-row-link:hover {
    background: #f7f7f9;
}

.album-statuses {
    display: flex;
    gap: 8px;
}

.status {
    display: inline-flex;
    border-radius: 999px;
    padding: 7px 11px;
    font-size: 12px;
    font-weight: 800;
    background: #ededf0;
}

.status-open {
    color: #17652d;
    background: #e0f6e6;
}

.status-closed {
    color: #8a1616;
    background: #ffe7e7;
}

.message-success {
    color: #17652d;
    background: #e0f6e6;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.details-list {
    margin: 0;
}

.details-list div {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 18px;
    padding: 13px 0;
    border-bottom: 1px solid #ececef;
}

.details-list dt {
    font-weight: 800;
}

.details-list dd {
    margin: 0;
}

.url-box {
    overflow-wrap: anywhere;
    border-radius: 10px;
    padding: 13px;
    background: #f1f1f4;
    font-family: monospace;
}

.button-warning {
    color: #111;
    background: #f2bf35;
}

.danger-panel {
    border-color: #f0bcbc;
}

.delete-form {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    gap: 12px;
}

.button-danger {
    background: #a51d1d;
}

.public-album-card {
    text-align: center;
}

.event-meta {
    margin-bottom: 6px;
    color: #696970;
}

@media (max-width: 750px) {
    .form-grid,
    .detail-grid,
    .delete-form {
        grid-template-columns: 1fr;
    }

    .header-actions {
        width: 100%;
    }

    .header-actions .button,
    .header-actions form,
    .header-actions button {
        width: 100%;
    }
}
.public-upload-form {
    display: grid;
    gap: 16px;
    margin-top: 28px;
}

.upload-picker {
    display: grid;
    gap: 8px;
    padding: 28px 18px;
    border: 2px dashed #bfc0c8;
    border-radius: 14px;
    text-align: center;
    cursor: pointer;
    background: #f8f8fa;
}

.upload-picker:hover {
    border-color: #111;
}

.upload-picker input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
}

.upload-picker span,
.selected-file-count,
.upload-help,
.memory-count {
    color: #696970;
}

.selected-file-count,
.upload-help,
.memory-count {
    margin-bottom: 0;
}

.admin-media-preview {
    position: relative;
    display: block;
}

.admin-media-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 5px 8px;
    border-radius: 999px;
    color: white;
    background: rgba(0, 0, 0, 0.65);
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    pointer-events: none;
}
.admin-photo-grid {
    display: grid;
    grid-template-columns:
        repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.admin-photo {
    overflow: hidden;
    border: 1px solid #e1e1e6;
    border-radius: 12px;
    background: #f4f4f6;
}

.admin-photo img {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.admin-photo-details {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 10px;
}
/* Admin photo management controls */
.admin-photo-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 0 10px 10px;
}

.admin-photo-actions .button,
.admin-photo-actions button,
.admin-photo-actions form {
    width: 100%;
}

.admin-photo-actions .button,
.admin-photo-actions button {
    padding: 9px 8px;
    font-size: 12px;
}
.bulk-upload-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.bulk-select-all,
.admin-photo-select {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.bulk-select-all input,
.admin-photo-select input {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
}

.admin-photo-select {
    margin-bottom: 8px;
}

#delete-selected-uploads:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}
@media (max-width: 550px) {
    .admin-photo-actions {
        grid-template-columns: 1fr;
    }
}


/* Album guest QR */
.guest-page-panel {
    min-width: 0;
    grid-column: 1 / -1;
}

.guest-page-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 24px;
    align-items: center;
}

.guest-page-copy {
    min-width: 0;
}

.guest-page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.qr-card {
    display: grid;
    gap: 10px;
    justify-items: center;
    padding: 14px;
    border: 1px solid #e1e1e6;
    border-radius: 14px;
    background: #fff;
    text-align: center;
}

.album-qr {
    display: block;
    width: 150px;
    height: 150px;
    max-width: 100%;
}

@media (max-width: 900px) {
    .guest-page-layout {
        grid-template-columns: 1fr;
    }

    .qr-card {
        justify-self: start;
    }
}

@media (max-width: 550px) {
    .guest-page-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .guest-page-actions .button {
        width: 100%;
    }
}


/* Consistent admin navigation */
.admin-brand {
    min-width: 0;
}

.admin-brand-link {
    display: inline-block;
    text-decoration: none;
}

.admin-brand-link .eyebrow {
    transition: opacity 0.15s ease;
}

.admin-brand-link:hover .eyebrow {
    opacity: 0.6;
}

.admin-header .header-actions {
    align-items: center;
}

.admin-header .header-actions form {
    display: flex;
}

@media (max-width: 750px) {
    .admin-header .header-actions {
        display: grid;
        grid-template-columns: 1fr;
    }
}


/* Public shared gallery */
.public-gallery-cta {
    display: grid;
    margin-top: 18px;
}

.public-gallery-cta .button {
    width: 100%;
}

.gallery-page {
    width: min(1400px, calc(100% - 40px));
    margin: 0 auto;
    padding: 32px 0 48px;
}

.public-gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    margin-bottom: 28px;
    padding: 24px 28px;
    background: white;
    border: 1px solid #e1e1e6;
    border-radius: 18px;
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.06);
}

.public-gallery-header h1 {
    margin-bottom: 6px;
}

.public-gallery-header p:last-child {
    margin-bottom: 0;
    color: #696970;
}

.public-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.public-gallery-photo {
    display: block;
    overflow: hidden;
    border-radius: 14px;
    background: #e8e8eb;
    aspect-ratio: 1;
}

.public-gallery-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.18s ease;
}

.public-gallery-photo:hover img {
    transform: scale(1.02);
}

.gallery-empty-state {
    padding: 70px 24px;
    text-align: center;
    background: white;
    border: 1px solid #e1e1e6;
    border-radius: 18px;
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.06);
}

@media (max-width: 700px) {
    .gallery-page {
        width: min(100% - 24px, 1400px);
        padding-top: 12px;
    }

    .public-gallery-header {
        align-items: stretch;
        flex-direction: column;
        padding: 22px;
    }

    .public-gallery-header .button {
        width: 100%;
    }

    .public-gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .public-gallery-photo {
        border-radius: 10px;
    }
}


/* =========================================================
   MAGIC MEMORIES — PUBLIC UI V2
   Public-only classes below deliberately leave admin intact.
   ========================================================= */

.memories-public {
    min-height: 100vh;
    color: #171719;
    background:
        radial-gradient(
            circle at 50% -10%,
            #ffffff 0,
            #f3f3f6 42%,
            #e6e6eb 100%
        );
}

.memories-public .memories-brand {
    margin-bottom: 10px;
    font-size: 11px;
    line-height: 1.2;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.memories-home,
.memory-event-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.memories-home-card,
.memory-event-card {
    width: min(100%, 520px);
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid #e3e3e8;
    border-radius: 24px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.08);
}

/* Home */

.memories-home-card {
    padding: 44px;
}

.memories-home-card h1 {
    margin-bottom: 18px;
    font-size: clamp(42px, 8vw, 64px);
    line-height: 0.96;
    letter-spacing: -0.055em;
}

.memories-lead {
    max-width: 390px;
    margin-bottom: 32px;
    color: #55555d;
    font-size: 18px;
    line-height: 1.5;
}

.memories-how {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 28px;
}

.memories-how div {
    display: grid;
    gap: 6px;
    padding: 16px 10px;
    border-radius: 16px;
    background: #f5f5f7;
    text-align: center;
}

.memories-how strong {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    margin: 0 auto;
    border-radius: 50%;
    color: white;
    background: #111;
    font-size: 12px;
}

.memories-how span {
    font-size: 13px;
    font-weight: 800;
}

.memories-home-note {
    margin-bottom: 0;
    color: #77777e;
    font-size: 13px;
    line-height: 1.5;
}

/* Event / upload */

.memory-event-card {
    overflow: hidden;
}

.memory-event-header {
    padding: 36px 36px 22px;
    text-align: center;
}

.memory-event-header h1 {
    margin-bottom: 8px;
    color: #1d1d1f;
    font-size: clamp(36px, 9vw, 52px);
    line-height: 1;
    letter-spacing: -0.045em;
}

.memory-event-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-bottom: 26px;
    color: #77777e;
    font-size: 14px;
}

.memory-event-intro {
    padding-top: 24px;
    border-top: 1px solid #ededf0;
}

.memory-event-intro h2 {
    margin-bottom: 8px;
    color: #1d1d1f;
    font-size: 25px;
    line-height: 1.08;
    letter-spacing: -0.025em;
}

.memory-event-intro p {
    max-width: 360px;
    margin: 0 auto;
    color: #66666e;
    line-height: 1.45;
}

.memory-flash {
    margin: 0 28px 18px;
    padding: 13px 16px;
    border-radius: 12px;
    background: #f1f1f4;
    text-align: center;
    font-size: 14px;
}

.memory-flash-success {
    color: #17652d;
    background: #e0f6e6;
}

.memory-flash-error {
    color: #8a1616;
    background: #ffe7e7;
}
.memory-upload-progress {
    display: grid;
    gap: 8px;
    margin-top: 16px;
    margin-bottom: 6px;
}
.memory-upload-progress-track {
    overflow: hidden;
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: #e4e4e8;
}
.memory-upload-progress-bar {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: #111;
    transition: width 0.2s ease;
}
.memory-upload-progress-text {
    min-height: 18px;
    margin: 0;
    color: #1d1d1f;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
}
.memory-upload-form {
    display: grid;
    gap: 12px;
    padding: 0 28px 26px;
}
.memory-sharing-preference {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 13px 15px;
    border: 1px solid #dedee3;
    border-radius: 14px;
    background: #f8f8fa;
    cursor: pointer;
}

.memory-sharing-preference input {
    width: 20px;
    height: 20px;
    margin: 1px 0 0;
    flex: 0 0 auto;
    accent-color: #111;
}

.memory-sharing-preference span {
    display: grid;
    gap: 3px;
}

.memory-sharing-preference strong {
    color: #1d1d1f;
    font-size: 14px;
    line-height: 1.3;
}

.memory-sharing-preference small {
    color: #77777e;
    font-size: 12px;
    line-height: 1.4;
}

.memory-upload-picker {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 5px;
    margin: 0;
    padding: 24px 18px;
    border: 2px dashed #c8c8cf;
    border-radius: 18px;
    background: #f8f8fa;
    text-align: center;
    cursor: pointer;
    transition:
        border-color 0.15s ease,
        background 0.15s ease,
        transform 0.15s ease;
}
.memory-upload-picker:active {
    transform: scale(0.99);
}
.memory-upload-picker:hover {
    border-color: #77777e;
    background: #f4f4f7;
}
.memory-upload-picker input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}
.memory-upload-plus {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin-bottom: 4px;
    border-radius: 50%;
    color: white;
    background: #111;
    font-size: 28px;
    font-weight: 400;
    line-height: 1;
}
.memory-upload-picker strong {
    font-size: 18px;
}
.memory-upload-subtitle,
.memory-selected-count {
    color: #77777e;
    font-size: 13px;
    font-weight: 500;
}
.memory-upload-progress[hidden] {
    display: none;
}
.memory-selected-count {
    margin: 0;
    text-align: center;
}
.memory-submit {
    width: 100%;
    min-height: 52px;
    border-radius: 14px;
    font-weight: 800;
}
.memory-clear-selection {
    width: 100%;
    min-height: 44px;
    border: 1px solid #d7d7dc;
    border-radius: 12px;
    color: #55555d;
    background: #f8f8fa;
    font-weight: 700;
    cursor: pointer;
}

.memory-clear-selection:hover {
    border-color: #b8b8bf;
    background: #f1f1f4;
}
.memory-event-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 18px 28px;
    border-top: 1px solid #ededf0;
    background: #fafafa;
}

.memory-event-footer p {
    margin: 0;
    color: #707078;
    font-size: 13px;
}

.memory-event-footer a {
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}
.memory-event-footer-centred {
    justify-content: center;
    text-align: center;
}

/* Gallery */

.memory-gallery-page {
    width: min(1400px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 40px;
}

.memory-gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 16px;
    padding: 18px 4px;
}

.memory-gallery-header h1 {
    margin-bottom: 4px;
    font-size: clamp(30px, 5vw, 46px);
    line-height: 1;
    letter-spacing: -0.04em;
}

.memory-gallery-header p:not(.memories-brand) {
    margin-bottom: 0;
    color: #77777e;
    font-size: 13px;
}

.memory-gallery-back {
    flex: 0 0 auto;
    padding: 10px 14px;
    border-radius: 999px;
    background: white;
    border: 1px solid #dedee3;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.memory-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 10px;
}

.memory-gallery-photo {
    display: block;
    overflow: hidden;
    width: 100%;
    padding: 0;
    border: 1px solid #d7d7dc;
    border-radius: 12px;
    background: #e5e5e8;
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.08),
        0 4px 12px rgba(0, 0, 0, 0.08);
    aspect-ratio: 1;
    cursor: zoom-in;
}

.memory-gallery-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.18s ease;
}

.memory-gallery-photo:hover img {
    transform: scale(1.02);
}
.memory-gallery-photo {
    position: relative;
}

.memory-gallery-play {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    padding-left: 3px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    color: white;
    background: rgba(0, 0, 0, 0.55);
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.3);
    font-size: 19px;
    line-height: 1;
    transform: translate(-50%, -50%);
    pointer-events: none;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.memory-gallery-360 {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    padding: 6px 9px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 999px;
    color: white;
    background: rgba(0, 0, 0, 0.55);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.25);
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    pointer-events: none;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.memory-gallery-empty {
    margin-top: 60px;
    padding: 60px 24px;
    border: 1px solid #e1e1e6;
    border-radius: 22px;
    background: white;
    text-align: center;
}

/* Lightbox */

body.lightbox-open {
    overflow: hidden;
}

.memory-lightbox[hidden] {
    display: none;
}

.memory-lightbox {
    position: fixed;
    z-index: 1000;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 54px 54px 64px;
    background: rgba(0, 0, 0, 0.94);
}

.memory-lightbox img:not([hidden]),
.memory-lightbox video:not([hidden]) {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 118px);
    object-fit: contain;
    border-radius: 4px;
    user-select: none;
    -webkit-user-select: none;
}

.memory-lightbox video {
    width: auto;
    height: auto;
    max-width: calc(100vw - 32px);
    max-height: calc(100dvh - 150px);
}

.memory-lightbox-close,
.memory-lightbox-nav {
    position: fixed;
    z-index: 1001;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    color: white;
    background: rgba(20, 20, 20, 0.88);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.memory-lightbox-close {
    top: max(14px, env(safe-area-inset-top));
    right: 16px;
    width: 42px;
    height: 42px;
    font-size: 30px;
    line-height: 1;
}

.memory-lightbox-nav {
    top: 50%;
    width: 44px;
    height: 44px;
    transform: translateY(-50%);
    font-size: 34px;
}

.memory-lightbox-prev {
    left: 14px;
}

.memory-lightbox-next {
    right: 14px;
}

.memory-lightbox-count {
    position: fixed;
    bottom: max(18px, env(safe-area-inset-bottom));
    left: 50%;
    margin: 0;
    padding: 7px 12px;
    border-radius: 999px;
    color: white;
    background: rgba(255, 255, 255, 0.14);
    transform: translateX(-50%);
    font-size: 12px;
}
.memory-lightbox-panorama {
    width: min(92vw, 1100px);
    height: min(78dvh, 760px);
    border-radius: 8px;
    overflow: hidden;
}

.memory-lightbox-panorama[hidden] {
    display: none;
}

/* Public mobile */

@media (max-width: 600px) {
    .memories-home,
    .memory-event-page {
        align-items: start;
        padding: 14px 12px 24px;
    }

    .memories-home-card,
    .memory-event-card {
        border-radius: 22px;
    }

    .memories-home-card {
        margin-top: 12vh;
        padding: 30px 26px;
    }

    .memories-home-card h1 {
        font-size: 44px;
    }

    .memories-lead {
        font-size: 16px;
    }

    .memory-event-header {
        padding: 28px 22px 18px;
    }

    .memory-event-header h1 {
        font-size: 38px;
    }

    .memory-event-meta {
        margin-bottom: 20px;
    }

    .memory-event-intro {
        padding-top: 20px;
    }

    .memory-event-intro h2 {
        font-size: 23px;
    }

    .memory-flash {
        margin-right: 18px;
        margin-left: 18px;
    }

    .memory-upload-form {
        padding-right: 18px;
        padding-left: 18px;
    }

    .memory-upload-picker {
        padding: 20px 14px;
    }

    .memory-event-footer {
        padding: 16px 18px;
    }

    .memory-gallery-page {
        width: calc(100% - 20px);
        padding-top: 6px;
    }

    .memory-gallery-header {
        align-items: center;
        padding: 12px 2px;
    }

    .memory-gallery-header .memories-brand {
        margin-bottom: 5px;
        font-size: 9px;
    }

    .memory-gallery-header h1 {
        font-size: 28px;
    }

    .memory-gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }

    .memory-lightbox {
        padding:
            calc(58px + env(safe-area-inset-top))
            0
            calc(58px + env(safe-area-inset-bottom));
    }

    .memory-lightbox img {
        width: 100%;
        max-height: calc(
            100vh - 116px - env(safe-area-inset-top) - env(safe-area-inset-bottom)
        );
        border-radius: 0;
    }
}

/* Public interaction hardening */
.memory-event-footer a,
.memory-gallery-back,
.memory-gallery-empty .button {
    position: relative;
    z-index: 2;
    pointer-events: auto;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.08);
}

.memory-submit:disabled {
    color: #77777e;
    background: #e6e6ea;
    opacity: 1;
}

.memory-submit:not(:disabled) {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.memory-selected-count {
    min-height: 18px;
}
.memory-photo-previews {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.memory-photo-previews:empty {
    display: none;
}
.memory-preview-item {
    position: relative;
}

.memory-preview-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    color: white;
    background: rgba(0, 0, 0, 0.68);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.memory-preview-remove:hover {
    background: rgba(0, 0, 0, 0.82);
}
.memory-photo-preview {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border: 3px solid transparent;
    border-radius: 12px;
    background:
        linear-gradient(#fff, #fff) padding-box,
        conic-gradient(
            from var(--preview-angle),
            #ff5f6d,
            #ffc371,
            #7ee8fa,
            #9b5de5,
            #ff5f6d
        ) border-box;
    animation: preview-border-spin 4s linear infinite;
}

@property --preview-angle {
    syntax: "<angle>";
    initial-value: 0deg;
    inherits: false;
}

@keyframes preview-border-spin {
    to {
        --preview-angle: 360deg;
    }
}
/* Admin analytics */

.analytics-panel {
    margin-bottom: 24px;
    padding: 24px;
    background: white;
    border: 1px solid #e1e1e6;
    border-radius: 18px;
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.06);
}

.analytics-heading {
    margin-bottom: 20px;
}

.analytics-heading h2 {
    margin-bottom: 0;
}

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.analytics-card {
    padding: 18px;
    border-radius: 14px;
    background: #f7f7f9;
}

.analytics-card span,
.analytics-card small {
    display: block;
}

.analytics-card span {
    margin-bottom: 6px;
    color: #696970;
    font-size: 13px;
    font-weight: 700;
}

.analytics-card strong {
    display: block;
    margin-bottom: 5px;
    font-size: 30px;
}

.analytics-card small {
    font-size: 12px;
}

@media (max-width: 800px) {
    .analytics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .analytics-grid {
        grid-template-columns: 1fr;
    }
}
.memory-download-panel {
    margin-top: 24px;
    padding: 22px;
    border: 1px solid #e1e1e6;
    border-radius: 18px;
    background: white;
    text-align: center;
}

.memory-download-panel h2 {
    margin-bottom: 8px;
}

.memory-download-panel p:not(.memories-brand) {
    color: #696970;
}

.memory-download-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    max-width: 520px;
    margin: 18px auto 0;
}

.memory-download-form input {
    min-width: 0;
}

@media (max-width: 600px) {

    .memory-lightbox-panorama {
        width: 100%;
        height: calc(
            100dvh
            - 140px
            - env(safe-area-inset-top)
            - env(safe-area-inset-bottom)
        );
        border-radius: 0;
    }

    .memory-lightbox video {
        max-width: 100%;
        max-height: calc(
            100dvh
            - 140px
            - env(safe-area-inset-top)
            - env(safe-area-inset-bottom)
        );
    }
    .memory-download-form {
        grid-template-columns: 1fr;
    }

    .memory-download-form button {
        width: 100%;
    }
}
.button.is-loading {
    pointer-events: none;
    opacity: 0.7;
    cursor: wait;
}
.memory-download-form button.is-loading {
    opacity: 0.7;
    cursor: wait;
}
.version-notes {
    margin-top: 12px;
}

.version-notes ul {
    margin: 10px 0 0;
    padding-left: 20px;
}

.version-notes li + li {
    margin-top: 6px;
}
.admin-title-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.admin-version {
    color: #777;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
}
.memory-download-status {
    max-width: 620px;
    margin: 14px auto 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
}
.download-status-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.download-progress-track {
    width: 100%;
    max-width: 620px;
    height: 14px;
    margin: 24px auto 0;
    overflow: hidden;
    border-radius: 999px;
    background: #ececf1;
}

.download-progress-bar {
    height: 100%;
    border-radius: inherit;
    background: #111;
    transition: width 0.25s ease;
}

@media (prefers-color-scheme: dark) {
    .memories-public {
        color: #f5f5f7;
        background:
            radial-gradient(
                circle at 50% -10%,
                #242426 0,
                #171719 45%,
                #0f0f10 100%
            );
    }

    .memories-public .memory-gallery-header p:not(.memories-brand) {
        color: #a9a9b0;
    }

    .memories-public .memory-gallery-photo {
        border-color: #3a3a40;
        background: #242428;
    }

    .memories-public .memory-gallery-back {
        color: #f5f5f7;
        background: #242426;
        border-color: #3d3d42;
    }

    .memories-public :focus-visible {
        outline-color: #ffffff;
    }
}
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
.memory-video-preview {
    display: grid;
    place-items: center;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 12px;
    background: #111;
    color: white;
    font-size: 13px;
    font-weight: 800;
    text-align: center;
}
.admin-360-page {
    min-height: 100vh;
    padding: 24px;
    background: #f5f5f7;
}
.admin-360-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto 20px;
}
.admin-360-header h1 {
    margin: 4px 0 0;
    font-size: 24px;
    line-height: 1.2;
}
.admin-360-viewer {
    width: min(100%, 1200px);
    height: calc(100dvh - 150px);
    min-height: 500px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 16px;
    background: #111;
}
@media (max-width: 700px) {
    .admin-360-page {
        padding: 14px;
    }
    .admin-360-header {
        align-items: flex-start;
        flex-direction: column;
    }
    .admin-360-viewer {
        height: calc(100dvh - 190px);
        min-height: 420px;
        border-radius: 10px;
    }
}
.retention-status {
    font-weight: 700;
}

.retention-warning,
.retention-expired {
    text-decoration: underline;
}
.memory-event-card,
.memory-event-card h1,
.memory-event-card h2,
.memory-event-card p,
.memory-event-card label,
.memory-event-card small,
.memory-event-card strong,
.memory-event-card .memory-upload-progress-text {
    color: #1d1d1f;
}
.memory-event-meta {
    color: #77777e;
}

.memory-event-intro p {
    color: #66666e;
}
.memory-flash-success {
    color: #17652d;
}

.memory-flash-error {
    color: #8a1616;
}
/* Post-upload next action */
.memory-flash-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 6px;
    font-size: 13px;
}

.memory-flash-actions span {
    color: #4f6855;
}

.memory-flash-actions a {
    color: inherit;
    font-weight: 800;
    text-decoration: none;
}

.memory-flash-actions a:hover {
    text-decoration: underline;
}

/* Public gallery mobile polish */
@media (max-width: 600px) {
    .memory-gallery-page {
        width: calc(100% - 16px);
        padding-top: 4px;
        padding-bottom:
            calc(32px + env(safe-area-inset-bottom));
    }

    .memory-gallery-header {
        gap: 12px;
        margin-bottom: 10px;
        padding: 12px 2px 10px;
    }

    .memory-gallery-header h1 {
        font-size: clamp(25px, 7.5vw, 30px);
        line-height: 1.05;
    }

    .memory-gallery-back {
        display: grid;
        place-items: center;
        min-height: 44px;
        padding: 10px 14px;
        white-space: nowrap;
    }

    .memory-gallery-grid {
        gap: 5px;
    }

    .memory-gallery-photo {
        border-radius: 10px;
    }

    .memory-gallery-play {
        width: 44px;
        height: 44px;
    }

    .memory-gallery-360 {
        top: 7px;
        left: 7px;
        padding: 5px 8px;
    }

    .memory-lightbox {
        min-height: 100dvh;
        padding:
            calc(62px + env(safe-area-inset-top))
            0
            calc(62px + env(safe-area-inset-bottom));
    }

    .memory-lightbox img:not([hidden]) {
        width: 100%;
        max-height: calc(
            100dvh
            - 124px
            - env(safe-area-inset-top)
            - env(safe-area-inset-bottom)
        );
        border-radius: 0;
    }

    .memory-lightbox-close {
        top: calc(10px + env(safe-area-inset-top));
        right: 10px;
        width: 48px;
        height: 48px;
    }

    .memory-lightbox-nav {
        width: 48px;
        height: 48px;
    }

    .memory-lightbox-prev {
        left: 8px;
    }

    .memory-lightbox-next {
        right: 8px;
    }

    .memory-lightbox-count {
        bottom: calc(
            12px + env(safe-area-inset-bottom)
        );
    }

    .memory-download-panel {
        margin-top: 18px;
        padding: 18px 16px;
        border-radius: 14px;
    }

    .memory-download-panel h2 {
        font-size: 20px;
    }

    .memory-download-panel p:not(.memories-brand) {
        font-size: 13px;
        line-height: 1.45;
    }

    .memory-download-form input,
    .memory-download-form button {
        min-height: 48px;
    }
}
/* Keep client download card readable in dark mode */
.memory-download-panel {
    color: #1d1d1f;
}

.memory-download-panel .memories-brand {
    color: #77777e;
}

.memory-download-panel h2 {
    color: #1d1d1f;
}

.memory-download-panel input {
    color: #1d1d1f;
    background: #ffffff;
}

.memory-download-panel input::placeholder {
    color: #8a8a90;
}
/* Magic animated border on gallery Add Photos */
.memory-gallery-back {
    border: 2px solid transparent;
    background:
        linear-gradient(#fff, #fff) padding-box,
        conic-gradient(
            from var(--preview-angle),
            #ff5f6d,
            #ffc371,
            #7ee8fa,
            #9b5de5,
            #ff5f6d
        ) border-box;
    animation: preview-border-spin 4s linear infinite;
}
/* Album event theme selector */

.theme-colour-group {
    gap: 12px;
}

.theme-swatches {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

button.theme-swatch {
    display: block;
    width: 44px;
    height: 44px;
    min-width: 44px;
    padding: 0;
    border: 3px solid #ffffff;
    border-radius: 50%;
    background: var(--swatch-colour);
    box-shadow: 0 0 0 1px #cfcfd5;
    cursor: pointer;
    appearance: none;
}

button.theme-swatch:hover {
    transform: scale(1.06);
}

button.theme-swatch.is-selected {
    box-shadow:
        0 0 0 2px #111111,
        0 0 0 5px #ffffff;
}

.theme-custom {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 0 4px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.theme-custom input[type="color"] {
    width: 44px;
    height: 44px;
    min-width: 44px;
    padding: 3px;
    border: 1px solid #cfcfd5;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
}

.theme-custom input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.theme-custom input[type="color"]::-webkit-color-swatch {
    border: 0;
    border-radius: 50%;
}

.theme-selection {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 2px;
}

.theme-colour-preview {
    display: block;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    border: 1px solid #cfcfd5;
    border-radius: 50%;
    background: var(--preview-colour);
}

.theme-selection code {
    font-size: 13px;
}
/* Client event portal */

.client-event-page {
    width: min(920px, calc(100% - 32px));
    margin: 0 auto;
    padding: 72px 0;
}

.client-event-header {
    margin-bottom: 54px;
    text-align: center;
}

.client-event-header h1 {
    margin: 10px 0 12px;
    font-size: clamp(38px, 7vw, 72px);
    line-height: 1;
}

.client-eyebrow,
.client-panel-number {
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    opacity: 0.6;
}

.client-status-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 28px;
    width: fit-content;
    max-width: 100%;
    margin: -18px auto 40px;
    padding: 16px 22px;
    border: 1px solid rgba(17, 17, 17, 0.12);
    border-radius: 16px;
    background: rgba(17, 17, 17, 0.035);
    text-align: center;
    font-size: 14px;
}

.client-status-strip span {
    opacity: 0.72;
}

.client-status-strip strong {
    margin-left: 4px;
    opacity: 1;
}

.client-intro {
    max-width: 560px;
    margin: 28px auto 0;
    line-height: 1.6;
    opacity: 0.8;
}

.client-panel {
    margin-top: 22px;
    border-radius: 22px;
    padding: 34px;
    color: #1d1d1f;
    background: #ffffff;
}

.client-panel h2 {
    margin-bottom: 10px;
    font-size: 28px;
}

.client-panel > p:not(.client-panel-number) {
    line-height: 1.55;
    color: #626268;
}

.client-url-box {
    margin: 24px 0 18px;
    border-radius: 12px;
    padding: 15px;
    overflow-wrap: anywhere;
    background: #f2f2f4;
    font-family: monospace;
    font-size: 13px;
}

.client-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.client-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    border: 0;
    border-radius: 11px;
    padding: 12px 20px;
    color: #ffffff;
    background: #111111;
    font: inherit;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.client-button-secondary {
    color: #111111;
    border: 1px solid #d7d7dc;
    background: #ffffff;
}

.client-copy-status {
    min-height: 20px;
    margin: 14px 0 0;
    font-size: 13px;
    font-weight: 700;
}

.client-placeholder {
    display: grid;
    min-height: 180px;
    margin-top: 24px;
    place-items: center;
    border: 2px dashed #d7d7dc;
    border-radius: 16px;
    color: #88888e;
    background: #fafafa;
}

.client-event-footer {
    padding: 34px 10px 0;
    text-align: center;
    font-size: 13px;
    opacity: 0.7;
}

@media (max-width: 600px) {
    .client-event-page {
        width: min(100% - 22px, 920px);
        padding: 38px 0;
    }

    .client-event-header {
        margin-bottom: 32px;
    }

    .client-panel {
        padding: 24px 20px;
    }

    .client-actions {
        display: grid;
    }

    .client-button {
        width: 100%;
    }
}
.client-qr-preview,
.client-sign-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 26px 0 22px;
    border-radius: 16px;
    padding: 24px;
    background: #f5f5f7;
}

.client-qr-preview img {
    display: block;
    width: min(100%, 320px);
    height: auto;
    border-radius: 10px;
}

.client-sign-preview img {
    display: block;
    width: min(100%, 390px);
    height: auto;
    border-radius: 10px;
    box-shadow:
        0 10px 35px
        rgba(0, 0, 0, 0.14);
}

@media (max-width: 600px) {
    .client-qr-preview,
    .client-sign-preview {
        padding: 16px;
    }
}
.memory-gallery-uploader {
    position: absolute;
    z-index: 3;
    left: 10px;
    bottom: 10px;

    display: block;
    max-width: calc(100% - 20px);
    padding: 6px 10px;

    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 999px;

    color: #fff;
    background: rgba(0, 0, 0, 0.58);

    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;

    pointer-events: none;

    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
/* Dashboard recent issue filters */

.issue-count {
    display: inline-grid;
    place-items: center;
    min-width: 28px;
    height: 28px;
    margin-left: 6px;
    padding: 0 8px;
    border-radius: 999px;
    background: #f1f1f3;
    color: #55555c;
    font-size: 13px;
    font-weight: 800;
    vertical-align: middle;
}

.issue-range-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 16px 0 18px;
}

.issue-range-filter a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 7px 11px;
    border: 1px solid #d8d8dd;
    border-radius: 999px;
    color: #55555c;
    background: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
}

.issue-range-filter a:hover {
    border-color: #aaaab2;
    background: #f6f6f8;
}

.issue-range-filter a.active {
    border-color: #242426;
    color: #fff;
    background: #242426;
}
.admin-media-play {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    padding-left: 3px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    color: white;
    background: rgba(0, 0, 0, 0.55);
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.3);
    font-size: 19px;
    line-height: 1;
    transform: translate(-50%, -50%);
    pointer-events: none;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.display-status {
    font-weight: 700;
}

.display-status-online {
    color: #16803c;
}

.display-status-offline {
    color: #b42318;
}

.display-meta {
    margin-top: 0.25rem;
    opacity: 0.7;
    font-size: 0.9rem;
}
/* =========================================================
   MAGIC MEMORIES — PUBLIC HOMEPAGE V2
   ========================================================= */

.memories-home {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 18px;
    min-height: 100vh;
    padding: 10vh 24px;
}

.memories-home-card {
    flex: 0 0 auto;
}


/* ---------- HERO ---------- */

.memories-simple-line {
    margin: 28px 0 0;
    color: #4f4f56;
    font-size: 16px;
    font-weight: 650;
    line-height: 1.55;
}


/* ---------- SHARED ---------- */

.memories-section-label {
    margin-bottom: 14px;
    color: #77777e;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.memories-home-card h2 {
    margin: 0 0 24px;
    color: #171719;
    font-size: clamp(38px, 6vw, 50px);
    line-height: 0.98;
    letter-spacing: -0.045em;
}


/* ---------- MEMORIES LIVE ---------- */

.memories-live {
    position: relative;
    overflow: hidden;
}

.memories-live::before {
    content: "";
    position: absolute;
    top: -100px;
    right: -110px;
    width: 270px;
    height: 270px;
    border-radius: 50%;
    background:
        radial-gradient(
            circle,
            rgba(155, 93, 229, 0.14),
            rgba(126, 232, 250, 0.08) 42%,
            transparent 70%
        );
    pointer-events: none;
}

.memories-live > * {
    position: relative;
}

.memories-live-line {
    margin: 0 0 28px;
    color: #5f5f67;
    font-size: 17px;
    line-height: 1.55;
}

.memories-text-link {
    display: inline-block;
    color: #171719;
    font-size: 15px;
    font-weight: 850;
    text-decoration: none;
}

.memories-text-link:hover {
    text-decoration: underline;
}


/* ---------- CONTACT ---------- */

.memories-enquire {
    text-align: center;
}

.memories-contact-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 54px;
    padding: 14px 20px;
    border-radius: 14px;
    color: #ffffff;
    background: #111111;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
    font-size: 15px;
    font-weight: 850;
    text-decoration: none;
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease;
}

.memories-contact-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 13px 32px rgba(0, 0, 0, 0.18);
}


/* ---------- MOBILE ---------- */

@media (max-width: 600px) {
    .memories-home {
        gap: 14px;
        padding:
            28px
            12px
            calc(40px + env(safe-area-inset-bottom));
    }

    .memories-home-card {
        width: 100%;
        margin-top: 0;
        padding: 30px 26px;
    }

    .memories-home-card h1 {
        font-size: 44px;
    }

    .memories-home-card h2 {
        font-size: 38px;
    }
}


/* Keep marketing cards light in dark mode */

@media (prefers-color-scheme: dark) {
    .memories-home-card {
        color: #171719;
        background: rgba(255, 255, 255, 0.97);
        border-color: #e3e3e8;
    }

    .memories-home-card h1,
    .memories-home-card h2,
    .memories-home-card strong,
    .memories-text-link {
        color: #171719;
    }

    .memories-brand {
        color: #171719;
    }

    .memories-simple-line,
    .memories-live-line,
    .memories-home-note,
    .memories-section-label {
        color: #66666e;
    }
}
.memory-do-not-share {
    position: absolute;
    z-index: 4;
    top: 10px;
    left: 10px;

    display: inline-flex;
    align-items: center;
    max-width: calc(100% - 20px);
    padding: 6px 10px;

    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 999px;

    color: #fff;
    background: rgba(0, 0, 0, 0.78);

    font-size: 10px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0.04em;

    pointer-events: none;

    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.client-memories-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 22px 0;
}

.client-memory-card {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    border-radius: 14px;
    background: #f1f1f3;
}

.client-memory-card img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 600px) {
    .client-memories-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Display management controls */
.display-device-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
    margin-top: 14px;
}

.display-device-actions form {
    margin: 0;
}

@media (max-width: 650px) {
    .display-device-actions {
        width: 100%;
    }

    .display-device-actions .button {
        width: 100%;
    }

    .display-device-actions form {
        width: 100%;
    }
}

.album-row[data-display-device] {
    flex-wrap: wrap;
}

.album-row[data-display-device] .display-device-actions {
    flex: 0 0 100%;
    margin-left: 0;
    margin-top: 4px;
    padding-left: 0;
}

.album-row[data-display-device] {
    flex-wrap: wrap;
}

.album-row[data-display-device] .display-device-actions {
    flex: 0 0 100%;
    margin-left: 0;
    margin-top: 4px;
    padding-left: 0;
}

.memory-gallery-voice {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    gap: 8px;
    padding: 24px;
    text-align: center;
}

.memory-gallery-voice-icon {
    font-size: 32px;
    line-height: 1;
}

.memory-gallery-voice strong,
.memory-gallery-voice > span:last-child {
    display: inline-flex;
    justify-self: center;
    align-items: center;
    min-height: 30px;
    padding: 6px 12px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.admin-photo .admin-media-preview {
    min-height: 180px;
}

.admin-photo .memory-gallery-voice {
    position: relative;
    inset: auto;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 24px 16px;
}

.admin-photo .memory-gallery-voice strong,
.admin-photo .memory-gallery-voice > span:last-child {
    position: static;
    margin: 0;
}

.memory-voice-recorder {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 22px 18px;
    border: 1px solid #d7d7dc;
    border-radius: 18px;
    background: #f8f8fa;
    text-align: center;
}

.memory-voice-recorder > strong {
    font-size: 18px;
}

.memory-voice-record,
#voice-remove-button {
    width: 100%;
    min-height: 48px;
    margin-top: 4px;
    border: 0;
    border-radius: 14px;
    font-weight: 800;
    cursor: pointer;
}

.memory-voice-record {
    color: #fff;
    background: #111;
}

#voice-remove-button {
    border: 1px solid #d7d7dc;
    color: #55555d;
    background: #fff;
}

#voice-recording-status {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

#voice-preview {
    width: 100%;
    margin-top: 4px;
}

/* Guest text Memories */
.memory-message-option,
.memory-message-form {
    display: grid;
    gap: 8px;
    padding: 22px 18px;
    border: 1px solid #d7d7dc;
    border-radius: 18px;
    background: #f8f8fa;
}

.memory-message-option {
    justify-items: center;
    text-align: center;
}

.memory-message-option > strong {
    font-size: 18px;
}

.memory-message-open,
.memory-message-submit {
    width: 100%;
    min-height: 48px;
    margin-top: 4px;
    border: 0;
    border-radius: 14px;
    color: #fff;
    background: #111;
    font-weight: 800;
    cursor: pointer;
}

.memory-message-form textarea {
    width: 100%;
    box-sizing: border-box;
    resize: vertical;
    min-height: 130px;
    padding: 14px;
    border: 1px solid #d7d7dc;
    border-radius: 14px;
    background: #fff;
    font: inherit;
}

.memory-message-form > label {
    font-weight: 800;
}

.memory-message-form > small {
    color: #77777f;
}

/* Gallery text Memories */
.memory-gallery-message {
    box-sizing: border-box;
    display: flex;
    min-height: 280px;
    padding: 32px 26px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    overflow: hidden;
    border-radius: 18px;
    background:
        radial-gradient(
            circle at top,
            rgba(255, 255, 255, 0.12),
            transparent 48%
        ),
        #111;
    color: #fff;
    text-align: center;
}

.memory-gallery-message-icon {
    font-size: 28px;
    line-height: 1;
}

.memory-gallery-message blockquote {
    max-width: 30ch;
    margin: 0;
    font-size: clamp(18px, 2.4vw, 24px);
    font-weight: 700;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.memory-gallery-message-name {
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
    font-weight: 800;
}

.memory-gallery-message-name::before {
    content: "— ";
}

/* Keep Gallery Message cards consistent regardless of message length */
.memory-gallery-message {
    height: 320px;
    min-height: 0;
}

.memory-gallery-message blockquote {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 7;
    line-clamp: 7;
}

.memory-gallery-message {
    border: 0;
    font: inherit;
    cursor: pointer;
}

.memory-gallery-message-read {
    color: rgba(255, 255, 255, 0.55);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.memory-gallery-message:hover .memory-gallery-message-read,
.memory-gallery-message:focus-visible .memory-gallery-message-read {
    color: #fff;
}

.memory-gallery-message:focus-visible {
    outline: 3px solid #fff;
    outline-offset: -6px;
}

.memory-lightbox-message {
    box-sizing: border-box;
    width: min(760px, calc(100vw - 48px));
    max-height: calc(100vh - 120px);
    padding: clamp(28px, 5vw, 56px);
    overflow-y: auto;
    border-radius: 24px;
    background:
        radial-gradient(
            circle at top,
            rgba(255, 255, 255, 0.12),
            transparent 48%
        ),
        #111;
    color: #fff;
    text-align: center;
}

.memory-lightbox-message-icon {
    display: block;
    margin-bottom: 24px;
    font-size: 34px;
}

.memory-lightbox-message blockquote {
    margin: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-size: clamp(22px, 4vw, 34px);
    font-weight: 700;
    line-height: 1.45;
}

.memory-lightbox-message-name {
    margin: 28px 0 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    font-weight: 800;
}

/* ---------------------------------------------------------
   Client Event Printables
   --------------------------------------------------------- */

.client-printables {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    margin-top: 30px;
}

.client-printable {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 20px;
    border: 1px solid #e7e7ea;
    border-radius: 18px;
    background: #f8f8fa;
}

.client-printable h3 {
    margin: 0 0 8px;
}

.client-printable > p {
    margin: 0 0 18px;
    color: #666;
}

.client-printable-preview {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    margin-bottom: 20px;
    padding: 18px;
    overflow: hidden;
    border-radius: 14px;
    background: #eeeeF1;
}

.client-printable-preview img {
    display: block;
    max-width: 100%;
    max-height: 300px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.client-printable-preview-qr img {
    width: min(100%, 260px);
}

.client-printable-preview-card img {
    width: 100%;
}

.client-printable-preview-sign img {
    max-height: 300px;
    box-shadow:
        0 8px 24px
        rgba(0, 0, 0, 0.14);
}

.client-printable .client-actions {
    margin-top: auto;
}

.client-printable .client-button {
    width: 100%;
    text-align: center;
}

@media (max-width: 900px) {
    .client-printables {
        grid-template-columns: 1fr;
    }

    .client-printable-preview {
        min-height: 260px;
    }
}
