: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;
    }
}

/* Hidden guest surprises */
.memories-brand-secret {
    user-select: none;
    -webkit-user-select: none;
    cursor: pointer;
}

/* Magic Memory gallery reveal */
.memory-magic-effect {
    position: absolute;
    inset: 0;
    z-index: 20;
    overflow: hidden;
    pointer-events: none;
}

.memory-magic-effect::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    opacity: 0;
}

.memory-magic-effect::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 12vmin;
    height: 12vmin;
    border: 3px solid rgba(255, 225, 130, 0.95);
    border-radius: 50%;
    box-shadow:
        0 0 18px rgba(255, 224, 126, 0.95),
        0 0 55px rgba(212, 168, 67, 0.85),
        inset 0 0 22px rgba(255, 240, 180, 0.8);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.1);
}

.memory-magic-glow {
    position: absolute;
    inset: -35%;
    background:
        radial-gradient(
            circle at center,
            rgba(255, 249, 211, 0.95) 0%,
            rgba(255, 220, 110, 0.8) 7%,
            rgba(212, 168, 67, 0.42) 22%,
            rgba(154, 103, 22, 0.18) 38%,
            rgba(0, 0, 0, 0) 66%
        );
    opacity: 0;
    mix-blend-mode: screen;
}

.memory-magic-glow::after {
    content: "";
    position: absolute;
    top: -30%;
    bottom: -30%;
    left: 50%;
    width: 16%;
    background:
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 0),
            rgba(255, 244, 190, 0.9),
            rgba(255, 255, 255, 0)
        );
    filter: blur(10px);
    opacity: 0;
    transform: translateX(-50%) rotate(22deg);
}

.memory-magic-sparkles {
    position: absolute;
    inset: 0;
}

.memory-magic-sparkles span {
    position: absolute;
    left: 50%;
    top: 50%;
    color: #ffe694;
    font-size: clamp(1.8rem, 5vw, 4rem);
    line-height: 1;
    opacity: 0;
    text-shadow:
        0 0 5px #fff8d8,
        0 0 14px rgba(255, 224, 116, 1),
        0 0 34px rgba(212, 168, 67, 0.95);
}

.memory-magic-sparkles span:nth-child(1) {
    --magic-x: -42vw;
    --magic-y: -31vh;
    --magic-r: -120deg;
}

.memory-magic-sparkles span:nth-child(2) {
    --magic-x: 39vw;
    --magic-y: -34vh;
    --magic-r: 145deg;
}

.memory-magic-sparkles span:nth-child(3) {
    --magic-x: -46vw;
    --magic-y: 4vh;
    --magic-r: -190deg;
}

.memory-magic-sparkles span:nth-child(4) {
    --magic-x: 45vw;
    --magic-y: 9vh;
    --magic-r: 210deg;
}

.memory-magic-sparkles span:nth-child(5) {
    --magic-x: -31vw;
    --magic-y: 38vh;
    --magic-r: -155deg;
}

.memory-magic-sparkles span:nth-child(6) {
    --magic-x: 33vw;
    --magic-y: 40vh;
    --magic-r: 180deg;
}

.memory-magic-sparkles span:nth-child(7) {
    --magic-x: -9vw;
    --magic-y: -43vh;
    --magic-r: -220deg;
}

.memory-magic-sparkles span:nth-child(8) {
    --magic-x: 11vw;
    --magic-y: 44vh;
    --magic-r: 240deg;
}

.memory-magic-reveal {
    position: absolute;
    left: 50%;
    top: 50%;
    display: flex;
    align-items: center;
    gap: clamp(0.55rem, 2vw, 1rem);
    padding:
        clamp(0.8rem, 2vw, 1.15rem)
        clamp(1.1rem, 4vw, 2rem);
    border: 1px solid rgba(255, 226, 132, 0.9);
    border-radius: 999px;
    background:
        linear-gradient(
            135deg,
            rgba(18, 12, 4, 0.96),
            rgba(68, 45, 8, 0.88),
            rgba(18, 12, 4, 0.96)
        );
    box-shadow:
        0 0 12px rgba(255, 237, 176, 0.55),
        0 0 40px rgba(212, 168, 67, 0.7),
        0 0 100px rgba(212, 168, 67, 0.35);
    color: #ffe8a0;
    font-size: clamp(0.85rem, 3vw, 1.35rem);
    letter-spacing: clamp(0.12em, 0.6vw, 0.25em);
    text-shadow:
        0 0 7px rgba(255, 249, 218, 0.9),
        0 0 18px rgba(212, 168, 67, 0.75);
    white-space: nowrap;
    opacity: 0;
    transform:
        translate(-50%, -50%)
        scale(0.25);
}

.memory-lightbox.magic-memory-active
    #memory-lightbox-image:not([hidden]) {
    animation:
        memory-magic-photo 2.7s
        cubic-bezier(0.16, 1, 0.3, 1)
        both;
}

.memory-magic-effect.is-active::before {
    animation: memory-magic-blackout 2.7s ease-out forwards;
}

.memory-magic-effect.is-active::after {
    animation:
        memory-magic-shockwave 1.35s
        cubic-bezier(0.16, 1, 0.3, 1)
        0.18s forwards;
}

.memory-magic-effect.is-active .memory-magic-glow {
    animation:
        memory-magic-glow 2.5s
        cubic-bezier(0.16, 1, 0.3, 1)
        forwards;
}

.memory-magic-effect.is-active .memory-magic-glow::after {
    animation:
        memory-magic-shimmer 1.35s
        ease-in-out
        0.55s forwards;
}

.memory-magic-effect.is-active .memory-magic-sparkles span {
    animation:
        memory-magic-sparkle 1.75s
        cubic-bezier(0.12, 0.8, 0.25, 1)
        0.22s forwards;
}

.memory-magic-effect.is-active
    .memory-magic-sparkles span:nth-child(even) {
    animation-delay: 0.32s;
}

.memory-magic-effect.is-active .memory-magic-reveal {
    animation:
        memory-magic-reveal 2.55s
        cubic-bezier(0.16, 1, 0.3, 1)
        0.3s forwards;
}

@keyframes memory-magic-blackout {
    0% {
        background: rgba(0, 0, 0, 0);
        opacity: 0;
    }

    8% {
        background: rgba(0, 0, 0, 0.72);
        opacity: 1;
    }

    24% {
        background: rgba(61, 38, 0, 0.22);
        opacity: 1;
    }

    100% {
        background: rgba(0, 0, 0, 0);
        opacity: 0;
    }
}

@keyframes memory-magic-photo {
    0% {
        opacity: 0.15;
        transform: scale(0.82);
        filter:
            brightness(0.35)
            saturate(0.7);
    }

    16% {
        opacity: 1;
        transform: scale(1.055);
        filter:
            brightness(1.55)
            saturate(1.25)
            drop-shadow(
                0 0 28px
                rgba(255, 214, 93, 0.85)
            );
    }

    34% {
        transform: scale(0.985);
        filter:
            brightness(1.12)
            saturate(1.12)
            drop-shadow(
                0 0 16px
                rgba(212, 168, 67, 0.55)
            );
    }

    58% {
        transform: scale(1.012);
    }

    100% {
        opacity: 1;
        transform: scale(1);
        filter: none;
    }
}

@keyframes memory-magic-glow {
    0% {
        opacity: 0;
        transform: scale(0.15) rotate(-12deg);
    }

    12% {
        opacity: 1;
    }

    32% {
        opacity: 0.92;
        transform: scale(0.8) rotate(4deg);
    }

    100% {
        opacity: 0;
        transform: scale(1.55) rotate(12deg);
    }
}

@keyframes memory-magic-shockwave {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.1);
    }

    18% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(14);
    }
}

@keyframes memory-magic-shimmer {
    0% {
        left: 8%;
        opacity: 0;
    }

    20% {
        opacity: 0.9;
    }

    80% {
        opacity: 0.7;
    }

    100% {
        left: 92%;
        opacity: 0;
    }
}

@keyframes memory-magic-sparkle {
    0% {
        opacity: 0;
        transform:
            translate(-50%, -50%)
            scale(0)
            rotate(0deg);
    }

    12% {
        opacity: 1;
        transform:
            translate(-50%, -50%)
            scale(1.4)
            rotate(25deg);
    }

    100% {
        opacity: 0;
        transform:
            translate(
                calc(-50% + var(--magic-x)),
                calc(-50% + var(--magic-y))
            )
            scale(0.45)
            rotate(var(--magic-r));
    }
}

@keyframes memory-magic-reveal {
    0% {
        opacity: 0;
        transform:
            translate(-50%, -50%)
            scale(0.25);
    }

    13% {
        opacity: 1;
        transform:
            translate(-50%, -50%)
            scale(1.16);
    }

    23% {
        transform:
            translate(-50%, -50%)
            scale(0.96);
    }

    31%,
    66% {
        opacity: 1;
        transform:
            translate(-50%, -50%)
            scale(1);
    }

    100% {
        opacity: 0;
        transform:
            translate(-50%, -50%)
            scale(1.08);
    }
}

@media (prefers-reduced-motion: reduce) {
    .memory-lightbox.magic-memory-active
        #memory-lightbox-image:not([hidden]),
    .memory-magic-effect.is-active::before,
    .memory-magic-effect.is-active::after,
    .memory-magic-effect.is-active .memory-magic-glow,
    .memory-magic-effect.is-active .memory-magic-glow::after,
    .memory-magic-effect.is-active .memory-magic-sparkles span,
    .memory-magic-effect.is-active .memory-magic-reveal {
        animation: none;
    }
}
}

/* Magic Memory glitter cannon */
.memory-magic-glitter {
    position: absolute;
    inset: 0;
    z-index: 4;
    overflow: hidden;
    pointer-events: none;
}

.magic-glitter-piece {
    position: absolute;
    left: 0;
    top: 0;
    width: var(--glitter-size);
    height: calc(var(--glitter-size) * 0.42);
    border-radius: 1px;
    opacity: 0;
    transform-origin: center;
    will-change: transform, opacity;
}

.magic-glitter-piece.glitter-0 {
    background: #fff4b8;
    box-shadow: 0 0 6px rgba(255, 244, 184, 0.9);
}

.magic-glitter-piece.glitter-1 {
    background: #e8bb4c;
    box-shadow: 0 0 7px rgba(232, 187, 76, 0.85);
}

.magic-glitter-piece.glitter-2 {
    background: #fff;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.85);
}

.magic-glitter-piece.glitter-3 {
    background: #b77b18;
    box-shadow: 0 0 6px rgba(183, 123, 24, 0.8);
}

.memory-magic-effect.is-active .magic-glitter-piece {
    animation:
        memory-magic-glitter-cannon
        var(--glitter-duration)
        cubic-bezier(0.12, 0.72, 0.28, 1)
        var(--glitter-delay)
        forwards;
}

@keyframes memory-magic-glitter-cannon {
    0% {
        opacity: 0;
        transform:
            translate(
                var(--glitter-start-x),
                var(--glitter-start-y)
            )
            rotate(0deg)
            scale(0.2);
    }

    7% {
        opacity: 1;
    }

    42% {
        opacity: 1;
        transform:
            translate(
                calc(
                    var(--glitter-start-x)
                    + var(--glitter-x)
                ),
                calc(
                    var(--glitter-start-y)
                    + var(--glitter-y)
                )
            )
            rotate(
                calc(var(--glitter-rotation) * 0.55)
            )
            scale(1);
    }

    72% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform:
            translate(
                calc(
                    var(--glitter-start-x)
                    + var(--glitter-fall-x)
                ),
                calc(
                    var(--glitter-start-y)
                    + var(--glitter-fall-y)
                )
            )
            rotate(var(--glitter-rotation))
            scale(0.72);
    }
}

@media (prefers-reduced-motion: reduce) {
    .memory-magic-effect.is-active .magic-glitter-piece {
        animation: none;
    }
}

/* ---------------------------------------------------------
   Hidden Guest Surprise: Iron Man Memory
   Futuristic HUD treatment for Gallery.
   --------------------------------------------------------- */

.memory-iron-man-effect {
    position: absolute;
    inset: 0;
    z-index: 22;
    overflow: hidden;
    pointer-events: none;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco,
        Consolas, "Liberation Mono", monospace;
}

.memory-iron-man-vignette,
.memory-iron-man-grid,
.memory-iron-man-scan {
    position: absolute;
    inset: 0;
}

.memory-iron-man-vignette {
    z-index: 1;
    background:
        radial-gradient(
            circle at center,
            rgba(0, 24, 34, 0.02) 25%,
            rgba(0, 16, 24, 0.48) 72%,
            rgba(0, 8, 14, 0.88) 100%
        );
    opacity: 0;
}

.memory-iron-man-grid {
    z-index: 2;
    background-image:
        linear-gradient(
            rgba(93, 231, 255, 0.08) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(93, 231, 255, 0.08) 1px,
            transparent 1px
        );
    background-size: 42px 42px;
    opacity: 0;
}

.memory-iron-man-scan {
    z-index: 6;
    height: 4px;
    top: -8%;
    bottom: auto;
    background:
        linear-gradient(
            90deg,
            transparent 4%,
            rgba(126, 239, 255, 0.25) 15%,
            rgba(190, 249, 255, 1) 50%,
            rgba(126, 239, 255, 0.25) 85%,
            transparent 96%
        );
    box-shadow:
        0 0 10px rgba(126, 239, 255, 0.95),
        0 0 32px rgba(70, 215, 255, 0.72);
    opacity: 0;
}

.memory-iron-man-bracket {
    position: absolute;
    z-index: 7;
    width: clamp(54px, 10vw, 110px);
    height: clamp(54px, 10vw, 110px);
    opacity: 0;
    filter:
        drop-shadow(0 0 5px rgba(91, 230, 255, 0.9));
}

.memory-iron-man-bracket::before,
.memory-iron-man-bracket::after {
    content: "";
    position: absolute;
    background: rgba(137, 240, 255, 0.95);
}

.memory-iron-man-bracket::before {
    width: 100%;
    height: 3px;
}

.memory-iron-man-bracket::after {
    width: 3px;
    height: 100%;
}

.memory-iron-man-bracket.bracket-tl {
    top: 9%;
    left: 8%;
}

.memory-iron-man-bracket.bracket-tr {
    top: 9%;
    right: 8%;
    transform: scaleX(-1);
}

.memory-iron-man-bracket.bracket-bl {
    bottom: 9%;
    left: 8%;
    transform: scaleY(-1);
}

.memory-iron-man-bracket.bracket-br {
    right: 8%;
    bottom: 9%;
    transform: scale(-1);
}

.memory-iron-man-reticle {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 8;
    width: clamp(110px, 22vw, 230px);
    aspect-ratio: 1;
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.6);
}

.reticle-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid rgba(126, 239, 255, 0.88);
    box-shadow:
        0 0 10px rgba(83, 224, 255, 0.55),
        inset 0 0 10px rgba(83, 224, 255, 0.3);
}

.reticle-ring::before,
.reticle-ring::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    background: rgba(150, 243, 255, 0.9);
    transform: translate(-50%, -50%);
}

.reticle-ring::before {
    width: 120%;
    height: 1px;
}

.reticle-ring::after {
    width: 1px;
    height: 120%;
}

.ring-one {
    inset: 0;
    border-style: dashed;
}

.ring-two {
    inset: 22%;
    border-color: rgba(255, 174, 72, 0.9);
}

.reticle-core {
    position: absolute;
    inset: 44%;
    border-radius: 50%;
    background: #d9fbff;
    box-shadow:
        0 0 8px #d9fbff,
        0 0 24px rgba(88, 228, 255, 0.95);
}

.memory-iron-man-diagnostics {
    position: absolute;
    top: 12%;
    left: 11%;
    z-index: 9;
    display: flex;
    flex-direction: column;
    gap: 5px;
    color: rgba(156, 242, 255, 0.95);
    font-size: clamp(9px, 1.4vw, 13px);
    letter-spacing: 0.12em;
    text-shadow: 0 0 8px rgba(71, 221, 255, 0.7);
    opacity: 0;
}

.memory-iron-man-diagnostics span:nth-child(2) {
    color: rgba(255, 183, 84, 0.95);
}

.memory-iron-man-lock {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 10;
    display: flex;
    min-width: min(76vw, 460px);
    padding: 14px 22px;
    border:
        1px solid rgba(120, 235, 255, 0.72);
    background:
        linear-gradient(
            90deg,
            rgba(0, 25, 34, 0.12),
            rgba(0, 30, 42, 0.88),
            rgba(0, 25, 34, 0.12)
        );
    box-shadow:
        0 0 26px rgba(60, 217, 255, 0.24);
    flex-direction: column;
    align-items: center;
    color: #e6fcff;
    text-align: center;
    text-transform: uppercase;
    opacity: 0;
    transform:
        translate(-50%, -50%)
        scaleX(0.2);
}

.memory-iron-man-lock small {
    color: rgba(127, 231, 248, 0.85);
    font-size: clamp(8px, 1.2vw, 11px);
    letter-spacing: 0.28em;
}

.memory-iron-man-lock strong {
    margin: 3px 0;
    font-size: clamp(19px, 4vw, 38px);
    letter-spacing: 0.12em;
    text-shadow:
        0 0 9px rgba(109, 235, 255, 0.9);
}

.memory-iron-man-lock span {
    color: #ffb65f;
    font-size: clamp(10px, 1.7vw, 15px);
    letter-spacing: 0.18em;
}

.memory-iron-man-effect.is-active
.memory-iron-man-vignette {
    animation: memory-hud-vignette 6s ease both;
}

.memory-iron-man-effect.is-active
.memory-iron-man-grid {
    animation: memory-hud-grid 6s ease both;
}

.memory-iron-man-effect.is-active
.memory-iron-man-scan {
    animation: memory-hud-scan 2s ease-in-out 0.25s both;
}

.memory-iron-man-effect.is-active
.memory-iron-man-bracket {
    animation: memory-hud-bracket 5.2s ease 0.45s both;
}

.memory-iron-man-effect.is-active
.memory-iron-man-reticle {
    animation: memory-hud-reticle 4.2s ease 0.7s both;
}

.memory-iron-man-effect.is-active
.ring-one {
    animation: memory-hud-spin 3.8s linear 0.7s;
}

.memory-iron-man-effect.is-active
.ring-two {
    animation: memory-hud-spin-reverse 2.8s linear 0.7s;
}

.memory-iron-man-effect.is-active
.memory-iron-man-diagnostics {
    animation: memory-hud-diagnostics 4.7s ease 0.35s both;
}

.memory-iron-man-effect.is-active
.memory-iron-man-lock {
    animation: memory-hud-lock 3.4s ease 2.35s both;
}

@keyframes memory-hud-vignette {
    0%,
    100% {
        opacity: 0;
    }

    10%,
    82% {
        opacity: 1;
    }
}

@keyframes memory-hud-grid {
    0%,
    100% {
        opacity: 0;
    }

    12%,
    78% {
        opacity: 0.62;
    }
}

@keyframes memory-hud-scan {
    0% {
        top: 2%;
        opacity: 0;
    }

    8% {
        opacity: 1;
    }

    92% {
        opacity: 1;
    }

    100% {
        top: 96%;
        opacity: 0;
    }
}

@keyframes memory-hud-bracket {
    0% {
        opacity: 0;
        margin: -30px;
    }

    18% {
        opacity: 1;
        margin: 0;
    }

    82% {
        opacity: 1;
        margin: 0;
    }

    100% {
        opacity: 0;
        margin: 0;
    }
}

@keyframes memory-hud-reticle {
    0% {
        opacity: 0;
        transform:
            translate(-50%, -50%)
            scale(1.65);
    }

    25% {
        opacity: 1;
    }

    62% {
        opacity: 1;
        transform:
            translate(-50%, -50%)
            scale(0.72);
    }

    82% {
        opacity: 1;
        transform:
            translate(-50%, -50%)
            scale(0.72);
    }

    100% {
        opacity: 0;
        transform:
            translate(-50%, -50%)
            scale(0.72);
    }
}

@keyframes memory-hud-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes memory-hud-spin-reverse {
    to {
        transform: rotate(-360deg);
    }
}

@keyframes memory-hud-diagnostics {
    0% {
        opacity: 0;
        transform: translateX(-14px);
    }

    16%,
    78% {
        opacity: 1;
        transform: translateX(0);
    }

    100% {
        opacity: 0;
        transform: translateX(8px);
    }
}

@keyframes memory-hud-lock {
    0% {
        opacity: 0;
        transform:
            translate(-50%, -50%)
            scaleX(0.2);
    }

    12% {
        opacity: 1;
    }

    25%,
    78% {
        opacity: 1;
        transform:
            translate(-50%, -50%)
            scaleX(1);
    }

    88% {
        opacity: 1;
        filter: brightness(1.8);
    }

    100% {
        opacity: 0;
        transform:
            translate(-50%, -50%)
            scaleX(1.04);
    }
}

@media (prefers-reduced-motion: reduce) {
    .memory-iron-man-effect.is-active
    .memory-iron-man-vignette,
    .memory-iron-man-effect.is-active
    .memory-iron-man-grid,
    .memory-iron-man-effect.is-active
    .memory-iron-man-scan,
    .memory-iron-man-effect.is-active
    .memory-iron-man-bracket,
    .memory-iron-man-effect.is-active
    .memory-iron-man-reticle,
    .memory-iron-man-effect.is-active
    .ring-one,
    .memory-iron-man-effect.is-active
    .ring-two,
    .memory-iron-man-effect.is-active
    .memory-iron-man-diagnostics,
    .memory-iron-man-effect.is-active
    .memory-iron-man-lock {
        animation-duration: 0.01ms;
        animation-delay: 0s;
    }
}

/* Superman Memory — Gallery Easter Egg */

.memory-superman-effect {
    position: absolute;
    inset: 0;
    z-index: 23;
    overflow: hidden;
    pointer-events: none;
    background: transparent;
    font-family: Georgia, "Times New Roman", serif;
}

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

/* Metropolis */

.superman-metropolis-sky {
    position: absolute;
    inset: 0;
    opacity: 0;
    overflow: hidden;
    background:
        radial-gradient(
            circle at 76% 18%,
            rgba(255, 231, 153, 0.2),
            transparent 18%
        ),
        linear-gradient(
            180deg,
            rgba(7, 19, 45, 0.82) 0%,
            rgba(18, 61, 121, 0.62) 58%,
            rgba(32, 90, 146, 0.48) 100%
        );
}

.superman-moon {
    position: absolute;
    right: 11%;
    top: 10%;
    width: 12vmin;
    height: 12vmin;
    border-radius: 50%;
    background: #fff3c6;
    box-shadow:
        0 0 30px rgba(255, 239, 180, 0.55),
        0 0 70px rgba(255, 239, 180, 0.2);
}

.superman-cloud {
    position: absolute;
    width: 45%;
    height: 12%;
    border-radius: 50%;
    opacity: 0.16;
    background: #d9ebff;
    filter: blur(12px);
}

.cloud-one {
    top: 24%;
    left: -8%;
}

.cloud-two {
    top: 38%;
    right: -14%;
}

/* Metropolis skyline */

.superman-skyline {
    position: absolute;
    inset: auto 0 0;
    height: 47%;
    opacity: 0;
}

.superman-skyline .building {
    position: absolute;
    bottom: 0;
    display: block;
    background:
        repeating-linear-gradient(
            90deg,
            transparent 0 13px,
            rgba(255, 222, 103, 0.6) 13px 17px,
            transparent 17px 27px
        ),
        repeating-linear-gradient(
            180deg,
            #07101f 0 17px,
            #0e1b31 17px 23px
        );
    border-top: 2px solid rgba(90, 145, 205, 0.25);
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.28);
}

.building-one {
    left: 0;
    width: 14%;
    height: 48%;
}

.building-two {
    left: 11%;
    width: 15%;
    height: 73%;
}

.building-three {
    left: 23%;
    width: 17%;
    height: 56%;
}

.building-four {
    left: 38%;
    width: 18%;
    height: 88%;
    clip-path: polygon(
        0 9%,
        38% 9%,
        44% 0,
        56% 0,
        62% 9%,
        100% 9%,
        100% 100%,
        0 100%
    );
}

.building-five {
    left: 54%;
    width: 14%;
    height: 64%;
}

.building-six {
    left: 66%;
    width: 19%;
    height: 78%;
}

.building-seven {
    right: 0;
    width: 18%;
    height: 51%;
}

/* Daily Planet rooftop */

.superman-planet-rooftop {
    position: absolute;
    left: 50%;
    bottom: 23%;
    width: 28vmin;
    text-align: center;
    opacity: 0;
    transform: translateX(-50%);
}

.superman-planet-globe {
    position: relative;
    width: 16vmin;
    height: 16vmin;
    margin: 0 auto 1.4vmin;
    border: 3px solid #f2d46b;
    border-radius: 50%;
    box-shadow:
        0 0 15px rgba(255, 219, 89, 0.65),
        inset 0 0 15px rgba(255, 219, 89, 0.28);
}

.planet-latitude,
.planet-longitude {
    position: absolute;
    display: block;
    border: 1px solid rgba(255, 224, 118, 0.75);
    border-radius: 50%;
}

.planet-latitude {
    left: 7%;
    width: 86%;
    height: 32%;
}

.latitude-one {
    top: 20%;
}

.latitude-two {
    bottom: 20%;
}

.planet-longitude {
    top: 5%;
    width: 38%;
    height: 90%;
}

.longitude-one {
    left: 30%;
}

.longitude-two {
    right: 30%;
}

.superman-planet-rooftop strong {
    display: block;
    color: #ffe277;
    font-family: Arial, Helvetica, sans-serif;
    font-size: clamp(0.65rem, 2vw, 1rem);
    font-weight: 900;
    letter-spacing: 0.16em;
    text-shadow:
        0 2px 5px #000,
        0 0 12px rgba(255, 218, 86, 0.55);
}

/* Daily Planet special edition */

.superman-newspaper {
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(82vw, 590px);
    padding: clamp(18px, 4vw, 34px);
    color: #111;
    opacity: 0;
    background:
        linear-gradient(
            rgba(255, 255, 255, 0.08),
            rgba(0, 0, 0, 0.04)
        ),
        #eee5cd;
    border: 1px solid #c7b990;
    box-shadow:
        0 22px 65px rgba(0, 0, 0, 0.72);
    transform:
        translate(-50%, -50%)
        rotate(-4deg)
        scale(1.35);
}

.superman-paper-topline {
    margin-bottom: 5px;
    text-align: center;
    font-family: Arial, Helvetica, sans-serif;
    font-size: clamp(0.55rem, 1.6vw, 0.78rem);
    font-weight: 800;
    letter-spacing: 0.18em;
}

.superman-paper-masthead {
    text-align: center;
    font-size: clamp(2.1rem, 7.5vw, 4.8rem);
    font-weight: 900;
    line-height: 0.92;
    letter-spacing: -0.06em;
    text-transform: uppercase;
}

.superman-paper-rule {
    height: 4px;
    margin: 10px 0 15px;
    background: #151515;
    box-shadow:
        0 5px 0 #151515;
}

.superman-paper-headline {
    display: block;
    text-align: center;
    font-size: clamp(1.4rem, 5vw, 3.25rem);
    font-weight: 900;
    line-height: 0.94;
    text-transform: uppercase;
}

.superman-paper-copy {
    display: block;
    max-width: 85%;
    margin: 14px auto 0;
    text-align: center;
    font-size: clamp(0.72rem, 2vw, 1rem);
    font-style: italic;
    line-height: 1.25;
}

/* Flight through Metropolis */

.superman-flight {
    position: absolute;
    inset: 0;
    opacity: 0;
}

.flight-trail {
    position: absolute;
    left: 50%;
    bottom: -30%;
    width: 4px;
    height: 115%;
    border-radius: 50%;
    background: linear-gradient(
        0deg,
        transparent,
        rgba(255, 232, 122, 0.7),
        rgba(255, 255, 255, 1),
        transparent
    );
    box-shadow:
        0 0 14px rgba(255, 240, 150, 0.9),
        0 0 34px rgba(75, 160, 255, 0.9);
    transform-origin: bottom center;
}

.trail-one {
    transform: rotate(-12deg);
}

.trail-two {
    transform: rotate(0deg);
}

.trail-three {
    transform: rotate(12deg);
}

.flight-cape {
    position: absolute;
    left: 50%;
    bottom: -22%;
    width: 13vmin;
    height: 35vmin;
    opacity: 0;
    background: linear-gradient(
        135deg,
        #f21f2f,
        #8f0714 72%
    );
    clip-path: polygon(
        50% 0,
        100% 22%,
        75% 100%,
        43% 76%,
        0 100%,
        14% 25%
    );
    filter:
        drop-shadow(0 0 12px rgba(255, 30, 45, 0.7));
    transform:
        translateX(-50%)
        rotate(-7deg);
}

/* Sonic boom */

.superman-sonic-ring {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 10vmin;
    height: 10vmin;
    border: 4px solid rgba(255, 239, 151, 0.95);
    border-radius: 50%;
    opacity: 0;
    box-shadow:
        0 0 20px rgba(255, 234, 115, 0.9),
        inset 0 0 20px rgba(255, 255, 255, 0.5);
    transform:
        translate(-50%, -50%)
        scale(0);
}

/* Hero reveal */

.memory-superman-reveal {
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(92vw, 760px);
    text-align: center;
    opacity: 0;
    transform:
        translate(-50%, -50%)
        scale(1.6);
}

.superman-giant-s {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: -1;
    color: rgba(213, 21, 36, 0.52);
    font-family: Arial Black, Arial, sans-serif;
    font-size: min(55vw, 55vh);
    font-style: italic;
    font-weight: 900;
    line-height: 0.7;
    text-shadow:
        7px 7px 0 rgba(245, 205, 50, 0.28),
        0 0 50px rgba(220, 20, 35, 0.38);
    transform:
        translate(-50%, -50%)
        skewX(-10deg);
}

.memory-superman-reveal small,
.memory-superman-reveal strong,
.superman-tagline {
    display: block;
}

.memory-superman-reveal small {
    margin-bottom: 8px;
    color: #ffe36b;
    font-family: Arial, Helvetica, sans-serif;
    font-size: clamp(0.7rem, 2vw, 1rem);
    font-weight: 900;
    letter-spacing: 0.3em;
    text-shadow:
        0 2px 8px #000;
}

.memory-superman-reveal strong {
    color: #fff;
    font-family: Arial Black, Arial, sans-serif;
    font-size: clamp(2.2rem, 8vw, 5.4rem);
    font-style: italic;
    font-weight: 900;
    line-height: 0.88;
    letter-spacing: -0.04em;
    text-transform: uppercase;
    -webkit-text-stroke:
        2px rgba(18, 67, 145, 0.95);
    text-shadow:
        5px 5px 0 #c91c2b,
        9px 9px 0 rgba(245, 202, 49, 0.9),
        0 10px 24px rgba(0, 0, 0, 0.9);
}

.superman-tagline {
    margin-top: 20px;
    color: #ffe26b;
    font-family: Arial, Helvetica, sans-serif;
    font-size: clamp(1rem, 3.5vw, 1.7rem);
    font-weight: 900;
    font-style: italic;
    letter-spacing: 0.12em;
    text-shadow:
        2px 2px 0 #a51422,
        0 3px 10px #000;
}

/* Sequence */

.memory-superman-effect.is-active
.superman-metropolis-sky {
    animation:
        super-metropolis 7.2s ease both;
}

.memory-superman-effect.is-active
.superman-skyline {
    animation:
        super-skyline 7.2s ease both;
}

.memory-superman-effect.is-active
.superman-planet-rooftop {
    animation:
        super-planet 3.1s ease both 0.3s;
}

.memory-superman-effect.is-active
.superman-planet-globe {
    animation:
        super-globe 3s linear both 0.3s;
}

.memory-superman-effect.is-active
.superman-newspaper {
    animation:
        super-newspaper 3.15s cubic-bezier(.2, .8, .2, 1)
        both 0.65s;
}

.memory-superman-effect.is-active
.superman-flight {
    animation:
        super-flight-container 2s ease both 3.05s;
}

.memory-superman-effect.is-active
.flight-trail {
    animation:
        super-flight-trail 1.55s ease-in both 3.1s;
}

.memory-superman-effect.is-active
.flight-cape {
    animation:
        super-cape 1.45s cubic-bezier(.2, .8, .2, 1)
        both 3.15s;
}

.memory-superman-effect.is-active
.superman-sonic-ring.ring-one {
    animation:
        super-sonic 1.3s ease-out both 4.1s;
}

.memory-superman-effect.is-active
.superman-sonic-ring.ring-two {
    animation:
        super-sonic 1.45s ease-out both 4.28s;
}

.memory-superman-effect.is-active
.memory-superman-reveal {
    animation:
        super-hero-reveal 2.9s cubic-bezier(.18, .82, .2, 1)
        both 4.25s;
}

@keyframes super-metropolis {
    0%,
    100% {
        opacity: 0;
    }

    5%,
    88% {
        opacity: 1;
    }

    95% {
        opacity: 0.35;
    }
}

@keyframes super-skyline {
    0% {
        opacity: 0;
        transform: translateY(12%);
    }

    9%,
    88% {
        opacity: 1;
        transform: translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateY(3%);
    }
}

@keyframes super-planet {
    0% {
        opacity: 0;
        transform:
            translateX(-50%)
            translateY(25px)
            scale(0.8);
    }

    20%,
    76% {
        opacity: 1;
        transform:
            translateX(-50%)
            translateY(0)
            scale(1);
    }

    100% {
        opacity: 0;
        transform:
            translateX(-50%)
            translateY(-18px)
            scale(1.05);
    }
}

@keyframes super-globe {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes super-newspaper {
    0% {
        opacity: 0;
        transform:
            translate(-50%, -50%)
            rotate(-12deg)
            scale(1.55);
    }

    16% {
        opacity: 1;
        transform:
            translate(-50%, -50%)
            rotate(-2deg)
            scale(0.96);
    }

    25%,
    72% {
        opacity: 1;
        transform:
            translate(-50%, -50%)
            rotate(-2deg)
            scale(1);
    }

    100% {
        opacity: 0;
        transform:
            translate(-125%, -90%)
            rotate(-24deg)
            scale(0.8);
    }
}

@keyframes super-flight-container {
    0%,
    100% {
        opacity: 0;
    }

    8%,
    72% {
        opacity: 1;
    }
}

@keyframes super-flight-trail {
    0% {
        opacity: 0;
        transform-origin: bottom center;
        scale: 0.15 0.15;
    }

    18% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        scale: 1.7 1.7;
    }
}

@keyframes super-cape {
    0% {
        bottom: -28%;
        opacity: 0;
        transform:
            translateX(-50%)
            rotate(-12deg)
            scale(0.5);
    }

    20% {
        opacity: 1;
    }

    70% {
        opacity: 1;
    }

    100% {
        bottom: 115%;
        opacity: 0;
        transform:
            translateX(-50%)
            rotate(9deg)
            scale(1.35);
    }
}

@keyframes super-sonic {
    0% {
        opacity: 1;
        transform:
            translate(-50%, -50%)
            scale(0);
    }

    100% {
        opacity: 0;
        transform:
            translate(-50%, -50%)
            scale(12);
    }
}

@keyframes super-hero-reveal {
    0% {
        opacity: 0;
        transform:
            translate(-50%, -50%)
            scale(1.8);
        filter: blur(7px);
    }

    13% {
        opacity: 1;
        transform:
            translate(-50%, -50%)
            scale(0.92);
        filter: blur(0);
    }

    22% {
        transform:
            translate(-50%, -50%)
            scale(1.06);
    }

    30%,
    78% {
        opacity: 1;
        transform:
            translate(-50%, -50%)
            scale(1);
    }

    100% {
        opacity: 0;
        transform:
            translate(-50%, -50%)
            scale(1.12);
        filter: blur(2px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .memory-superman-effect.is-active *,
    .memory-superman-effect.is-active *::before,
    .memory-superman-effect.is-active *::after {
        animation-duration: 0.01ms !important;
        animation-delay: 0ms !important;
    }
}

/* Event Setup — Hidden Guest Surprises */
.easter-eggs-group {
    margin-top: 1.5rem;
    padding: 1.25rem;
    border: 1px solid rgba(197, 157, 74, 0.3);
    border-radius: 16px;
    background: rgba(197, 157, 74, 0.045);
}

.easter-eggs-group > .checkbox-row {
    margin: 0;
}

.easter-egg-code-key {
    margin: 1rem 0 0.65rem;
    color: #6f6f73;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.easter-egg-code-key code,
.easter-egg-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
        "Liberation Mono", monospace;
}

.easter-egg-code-key code {
    color: #222;
    font-weight: 800;
}

.easter-egg-code-key span {
    margin: 0 0.4rem;
    opacity: 0.5;
}

#easter-egg-options {
    display: grid;
    gap: 0.5rem;
}

#easter-egg-options .checkbox-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.8rem;
    margin: 0;
    padding: 0.8rem 0.9rem;
    border: 1px solid rgba(0, 0, 0, 0.07);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.7);
}

.easter-egg-details {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 0.15rem;
}

.easter-egg-name {
    font-weight: 800;
    line-height: 1.2;
}

.easter-egg-details small {
    color: #6f6f73;
    font-size: 0.82rem;
    line-height: 1.3;
}

.easter-egg-code {
    min-width: 5.6rem;
    padding: 0.38rem 0.55rem;
    border: 1px solid rgba(197, 157, 74, 0.32);
    border-radius: 8px;
    background: rgba(197, 157, 74, 0.09);
    color: #725417;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-align: center;
    white-space: nowrap;
}

@media (max-width: 640px) {
    #easter-egg-options .checkbox-row {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .easter-egg-code {
        grid-column: 2;
        justify-self: start;
    }
}

/* Hidden Guest Surprise — Dog's Bollocks trigger */
.memories-shared-secret {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    cursor: default;
}

/* Hidden Guest Surprise — Dog's Bollocks Gallery */
.memory-dogs-bollocks-effect {
    position: absolute;
    inset: 0;
    z-index: 24;
    overflow: hidden;
    pointer-events: none;
}

.memory-dogs-bollocks-effect[hidden] {
    display: none;
}

.dogs-bollocks-flash {
    position: absolute;
    inset: 0;
    background: #fff8dc;
    opacity: 0;
}

.memory-dogs-bollocks-effect.is-active
.dogs-bollocks-flash {
    animation: dogs-gallery-flash 900ms ease-out forwards;
}

.dogs-bollocks-rays {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 140vmax;
    height: 140vmax;
    background:
        repeating-conic-gradient(
            from 0deg,
            rgba(212, 175, 55, 0.22) 0deg 5deg,
            transparent 5deg 12deg
        );
    opacity: 0;
    transform:
        translate(-50%, -50%)
        scale(0.25)
        rotate(-18deg);
}

.memory-dogs-bollocks-effect.is-active
.dogs-bollocks-rays {
    animation:
        dogs-gallery-rays-in 1.2s ease-out 120ms forwards,
        dogs-gallery-rays-turn 18s linear 1.3s infinite;
}

.dogs-bollocks-corner {
    position: absolute;
    color: #e6c45f;
    font-size: clamp(1.5rem, 4vw, 3rem);
    line-height: 1;
    opacity: 0;
    text-shadow:
        0 0 12px rgba(255, 224, 122, 0.8),
        0 0 28px rgba(197, 157, 74, 0.6);
}

.dogs-bollocks-corner.corner-tl {
    top: 5%;
    left: 5%;
}

.dogs-bollocks-corner.corner-tr {
    top: 5%;
    right: 5%;
}

.dogs-bollocks-corner.corner-bl {
    bottom: 5%;
    left: 5%;
}

.dogs-bollocks-corner.corner-br {
    right: 5%;
    bottom: 5%;
}

.memory-dogs-bollocks-effect.is-active
.dogs-bollocks-corner {
    animation: dogs-gallery-star 700ms ease-out 650ms forwards;
}

.dogs-bollocks-stamp {
    position: absolute;
    top: 50%;
    left: 50%;
    display: flex;
    width: min(72vw, 440px);
    box-sizing: border-box;
    flex-direction: column;
    align-items: center;
    padding: clamp(1.4rem, 4vw, 2.4rem);
    border: 3px double #e1bd62;
    border-radius: 24px;
    background:
        linear-gradient(
            145deg,
            rgba(20, 16, 7, 0.96),
            rgba(3, 3, 3, 0.94)
        );
    box-shadow:
        0 0 0 7px rgba(197, 157, 74, 0.12),
        0 24px 80px rgba(0, 0, 0, 0.62),
        inset 0 0 35px rgba(197, 157, 74, 0.14);
    color: #fff;
    text-align: center;
    opacity: 0;
    transform:
        translate(-50%, -50%)
        scale(2.5)
        rotate(-9deg);
}

.memory-dogs-bollocks-effect.is-active
.dogs-bollocks-stamp {
    animation:
        dogs-gallery-stamp-in
        850ms
        cubic-bezier(.16, 1.35, .35, 1)
        300ms
        forwards;
}

.dogs-bollocks-crown {
    display: block;
    margin-bottom: 0.45rem;
    color: #e1bd62;
    font-size: clamp(2.4rem, 8vw, 4.5rem);
    line-height: 0.9;
    text-shadow:
        0 0 18px rgba(225, 189, 98, 0.5);
}

.dogs-bollocks-stamp small {
    color: #d8bd72;
    font-size: clamp(0.55rem, 1.7vw, 0.78rem);
    font-weight: 800;
    letter-spacing: 0.22em;
}

.dogs-bollocks-stamp strong {
    margin: 0.5rem 0;
    color: #f4d978;
    font-size: clamp(2.1rem, 8vw, 4.6rem);
    font-weight: 950;
    line-height: 0.82;
    letter-spacing: -0.045em;
    text-shadow:
        0 2px 0 #765413,
        0 0 25px rgba(225, 189, 98, 0.38);
}

.dogs-bollocks-rule {
    width: 70%;
    height: 1px;
    margin: 0.5rem 0 0.75rem;
    background:
        linear-gradient(
            90deg,
            transparent,
            #e1bd62,
            transparent
        );
}

.dogs-bollocks-stamp em {
    color: #fff;
    font-size: clamp(0.72rem, 2.1vw, 1rem);
    font-style: normal;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.dogs-bollocks-approved {
    margin-top: 1rem;
    padding: 0.45rem 0.8rem;
    border: 1px solid rgba(225, 189, 98, 0.65);
    border-radius: 999px;
    color: #e1bd62;
    font-size: clamp(0.55rem, 1.7vw, 0.76rem);
    font-weight: 900;
    letter-spacing: 0.12em;
}

@keyframes dogs-gallery-flash {
    0% {
        opacity: 0;
    }

    12% {
        opacity: 0.92;
    }

    100% {
        opacity: 0;
    }
}

@keyframes dogs-gallery-rays-in {
    0% {
        opacity: 0;
        transform:
            translate(-50%, -50%)
            scale(0.25)
            rotate(-18deg);
    }

    100% {
        opacity: 1;
        transform:
            translate(-50%, -50%)
            scale(1)
            rotate(0deg);
    }
}

@keyframes dogs-gallery-rays-turn {
    from {
        transform:
            translate(-50%, -50%)
            scale(1)
            rotate(0deg);
    }

    to {
        transform:
            translate(-50%, -50%)
            scale(1)
            rotate(360deg);
    }
}

@keyframes dogs-gallery-star {
    0% {
        opacity: 0;
        transform: scale(0) rotate(-180deg);
    }

    70% {
        opacity: 1;
        transform: scale(1.35) rotate(15deg);
    }

    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

@keyframes dogs-gallery-stamp-in {
    0% {
        opacity: 0;
        transform:
            translate(-50%, -50%)
            scale(2.5)
            rotate(-9deg);
    }

    65% {
        opacity: 1;
        transform:
            translate(-50%, -50%)
            scale(0.92)
            rotate(2deg);
    }

    100% {
        opacity: 1;
        transform:
            translate(-50%, -50%)
            scale(1)
            rotate(0deg);
    }
}

/* Dog's Bollocks Gallery — reveal the actual Memory */
.memory-dogs-bollocks-effect.is-active {
    animation:
        dogs-gallery-effect-out
        650ms
        ease
        2.7s
        forwards;
}

@keyframes dogs-gallery-effect-out {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
        visibility: hidden;
    }
}
