@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;1,300;1,400&family=Inter:wght@300;400;500&display=swap");

:root {
    --bg: #111110;
    --bg-soft: #181816;
    --bg-card: #1c1b19;
    --text: #ece7de;
    --text-muted: #9a948a;
    --text-faint: #6b665e;
    --line: rgba(236, 231, 222, 0.14);
    --accent: #c9b79c;

    --serif: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
    --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

    --gutter: clamp(1.25rem, 5vw, 4rem);
    --max: 1280px;
    --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
    -webkit-text-size-adjust: 100%;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-weight: 300;
    font-size: 1rem;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 100;
    opacity: 0.06;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

a {
    color: inherit;
    text-decoration: none;
}

em {
    font-style: italic;
    font-weight: 300;
    color: var(--accent);
}

::selection {
    background: var(--accent);
    color: var(--bg);
}

:focus-visible {
    outline: 1px solid var(--accent);
    outline-offset: 4px;
}

.eyebrow {
    font-family: var(--sans);
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

h1,
h2 {
    font-family: var(--serif);
    font-weight: 300;
    line-height: 1.05;
    letter-spacing: -0.01em;
}

h1 {
    font-size: clamp(2.8rem, 8vw, 6.5rem);
}

h2 {
    font-size: clamp(2.2rem, 5vw, 4rem);
}

.button {
    display: inline-block;
    padding: 1rem 2.2rem;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    border: 1px solid transparent;
    transition: background 0.4s var(--ease), color 0.4s var(--ease),
    border-color 0.4s var(--ease);
}

.button-light {
    background: var(--text);
    color: var(--bg);
}

.button-light:hover {
    background: transparent;
    color: var(--text);
    border-color: var(--text);
}

.text-link {
    position: relative;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    padding-bottom: 0.35rem;
    color: var(--text-muted);
    transition: color 0.3s var(--ease);
}

.text-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background: currentColor;
    transform-origin: left;
    transition: transform 0.4s var(--ease);
}

.text-link:hover {
    color: var(--text);
}

.text-link:hover::after {
    transform: scaleX(0.4);
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.4rem var(--gutter);
    background: linear-gradient(to bottom, rgba(17, 17, 16, 0.85), transparent);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.logo {
    font-family: var(--serif);
    font-size: 1.25rem;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    white-space: nowrap;
}

.logo span {
    font-weight: 300;
    font-style: italic;
    letter-spacing: 0.22em;
    color: var(--accent);
}

.navbar nav {
    display: flex;
    align-items: center;
    gap: clamp(1rem, 3vw, 2.5rem);
}

.navbar nav a {
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
    transition: color 0.3s var(--ease);
}

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

.navbar .nav-cta {
    color: var(--text);
    padding: 0.7rem 1.3rem;
    border: 1px solid var(--line);
    transition: background 0.3s var(--ease), color 0.3s var(--ease),
    border-color 0.3s var(--ease);
}

.navbar .nav-cta:hover {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
}

.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 8rem var(--gutter) 6rem;
    overflow: hidden;
    isolation: isolate;
}

.hero-image {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(
            ellipse 55% 60% at 78% 38%,
            rgba(201, 183, 156, 0.22),
            transparent 70%
    ),
    radial-gradient(
            ellipse 40% 50% at 20% 90%,
            rgba(120, 100, 80, 0.16),
            transparent 70%
    ),
    linear-gradient(to bottom, rgba(17, 17, 16, 0.2), var(--bg) 98%),
    linear-gradient(135deg, #1a1816, #0d0d0c);
    animation: breathe 14s ease-in-out infinite alternate;
}

.hero-image::after {
    content: "";
    position: absolute;
    top: -10%;
    right: 12%;
    width: 1px;
    height: 120%;
    background: linear-gradient(
            to bottom,
            transparent,
            rgba(236, 231, 222, 0.35),
            transparent
    );
    transform: rotate(14deg);
    box-shadow: 0 0 60px 20px rgba(201, 183, 156, 0.08);
}

@keyframes breathe {
    from {
        transform: scale(1);
        opacity: 0.85;
    }
    to {
        transform: scale(1.06);
        opacity: 1;
    }
}

.hero-content {
    max-width: var(--max);
    width: 100%;
    margin: 0 auto;
}

.hero-content h1 {
    max-width: 14ch;
    margin-bottom: 2rem;
}

.hero-description {
    max-width: 34rem;
    font-size: clamp(1rem, 1.6vw, 1.15rem);
    color: var(--text-muted);
    margin-bottom: 3rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2rem;
}

.hero-footer {
    position: absolute;
    left: var(--gutter);
    right: var(--gutter);
    bottom: 2rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--line);
    font-size: 0.65rem;
    letter-spacing: 0.25em;
    color: var(--text-faint);
}

.intro {
    max-width: 52rem;
    margin: 0 auto;
    padding: clamp(6rem, 14vw, 11rem) var(--gutter);
    text-align: center;
}

.intro p:last-child {
    font-family: var(--serif);
    font-size: clamp(1.6rem, 3.6vw, 2.6rem);
    font-weight: 300;
    line-height: 1.35;
    color: var(--text);
}

.exhibition {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 var(--gutter) clamp(6rem, 12vw, 10rem);
}

.section-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 2rem;
    margin-bottom: 3rem;
    border-bottom: 1px solid var(--line);
}

.section-heading .eyebrow {
    margin-bottom: 1rem;
}

.collection-count {
    font-size: 0.65rem;
    letter-spacing: 0.25em;
    color: var(--text-faint);
}

.collection-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.collection-card {
    --glow: radial-gradient(ellipse 80% 55% at 50% 25%, rgba(201, 183, 156, 0.18), transparent 70%);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 30rem;
    padding: 2rem;
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--line);
    isolation: isolate;
    transition: transform 0.6s var(--ease), border-color 0.6s var(--ease);
}

.collection-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--glow), linear-gradient(to top, rgba(17, 17, 16, 0.9), transparent 70%);
    transition: transform 1.2s var(--ease), opacity 0.6s var(--ease);
}

.card-almost-us {
    --glow: radial-gradient(ellipse 80% 55% at 70% 25%, rgba(201, 150, 130, 0.26), transparent 70%);
}

.card-unsent-letters {
    --glow: radial-gradient(ellipse 80% 55% at 30% 25%, rgba(160, 175, 190, 0.22), transparent 70%);
}

.card-parallel-lives {
    --glow: radial-gradient(ellipse 80% 55% at 60% 30%, rgba(190, 170, 120, 0.24), transparent 70%);
}

.collection-card:hover {
    transform: translateY(-6px);
    border-color: rgba(236, 231, 222, 0.35);
}

.collection-card:hover::before {
    transform: scale(1.12);
}

.card-number {
    position: absolute;
    top: 2rem;
    left: 2rem;
    font-size: 0.65rem;
    letter-spacing: 0.25em;
    color: var(--text-muted);
}

.card-title {
    font-family: var(--serif);
    font-size: clamp(2rem, 3vw, 2.6rem);
    font-weight: 300;
    line-height: 1.1;
    margin-bottom: 0.8rem;
}

.card-description {
    font-size: 0.92rem;
    color: var(--text-muted);
    max-width: 22ch;
}

.submit-section {
    position: relative;
    padding: clamp(6rem, 14vw, 12rem) var(--gutter);
    text-align: center;
    background: radial-gradient(
            ellipse 60% 70% at 50% 50%,
            rgba(201, 183, 156, 0.1),
            transparent 70%
    ),
    var(--bg-soft);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.submit-section h2 {
    margin-bottom: 1.5rem;
}

.submit-section > p:not(.eyebrow) {
    color: var(--text-muted);
    margin-bottom: 2.8rem;
}

footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 2.5rem var(--gutter);
}

footer .logo {
    font-size: 1rem;
}

footer > span {
    font-size: 0.65rem;
    letter-spacing: 0.25em;
    color: var(--text-faint);
}

.button span {
    display: inline-block;
    margin-left: 0.4rem;
    transition: transform 0.4s var(--ease);
}

.button:hover span {
    transform: translate(2px, -2px);
}

button.button {
    font-family: var(--sans);
    cursor: pointer;
}

.back-link {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 3rem;
    transition: color 0.3s var(--ease), transform 0.3s var(--ease);
}

.back-link:hover {
    color: var(--text);
    transform: translateX(-4px);
}

.form-page,
.story-page {
    max-width: 46rem;
    margin: 0 auto;
    padding: 9rem var(--gutter) clamp(5rem, 10vw, 8rem);
}

.form-intro {
    margin-bottom: 3.5rem;
}

.form-intro h1,
.story-article h1 {
    font-size: clamp(2.6rem, 7vw, 4.8rem);
    margin-bottom: 1.5rem;
}

.form-intro p:last-child {
    color: var(--text-muted);
    font-size: 1.05rem;
}

.form-message {
    padding: 1rem 1.3rem;
    margin-bottom: 2rem;
    font-size: 0.92rem;
    border: 1px solid var(--line);
    border-left-width: 3px;
    background: var(--bg-card);
    color: var(--text);
}

.form-message.error,
.form-message.danger {
    border-left-color: #c47a6b;
}

.form-message.success {
    border-left-color: #8fae8b;
}

.form-message.info,
.form-message.message {
    border-left-color: var(--accent);
}

.story-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.story-form label {
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.story-form .required {
    color: var(--accent);
}

.story-form .optional {
    letter-spacing: 0.1em;
    text-transform: none;
    color: var(--text-faint);
}

.story-form input,
.story-form select,
.story-form textarea {
    width: 100%;
    padding: 1rem 1.1rem;
    font-family: var(--sans);
    font-size: 1rem;
    font-weight: 300;
    color: var(--text);
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 0;
    transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
    -webkit-appearance: none;
    appearance: none;
}

.story-form input::placeholder,
.story-form textarea::placeholder {
    color: var(--text-faint);
}

.story-form input:hover,
.story-form select:hover,
.story-form textarea:hover {
    border-color: rgba(236, 231, 222, 0.3);
}

.story-form input:focus,
.story-form select:focus,
.story-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--bg-soft);
}

.story-form textarea {
    min-height: 16rem;
    resize: vertical;
    line-height: 1.7;
    font-family: var(--serif);
    font-size: 1.2rem;
}

.story-form select {
    cursor: pointer;
    padding-right: 3rem;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%239a948a' stroke-width='1.2'/></svg>");
    background-repeat: no-repeat;
    background-position: right 1.1rem center;
}

.story-form select option {
    background: var(--bg-card);
    color: var(--text);
}

.form-privacy {
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
    font-size: 0.85rem;
    line-height: 1.7;
    color: var(--text-faint);
}

.story-form .button {
    align-self: flex-start;
}

.story-article {
    margin-bottom: 5rem;
}

.story-category {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    margin-bottom: 1.8rem;
    font-size: 0.68rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--accent);
    border: 1px solid rgba(201, 183, 156, 0.35);
}

.story-summary {
    font-family: var(--serif);
    font-size: clamp(1.3rem, 2.6vw, 1.7rem);
    font-style: italic;
    font-weight: 300;
    line-height: 1.5;
    color: var(--text-muted);
}

.story-divider {
    width: 4rem;
    height: 1px;
    margin: 3rem 0;
    background: var(--accent);
}

.story-content {
    font-family: var(--serif);
    font-size: clamp(1.2rem, 2.2vw, 1.4rem);
    font-weight: 400;
    line-height: 1.85;
    color: var(--text);
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.editorial-note {
    margin-top: 3rem;
    font-size: 0.7rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--text-faint);
}

.story-bottom {
    padding-top: 3.5rem;
    border-top: 1px solid var(--line);
    text-align: center;
}

.story-bottom p {
    font-family: var(--serif);
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-weight: 300;
    line-height: 1.3;
    margin-bottom: 2.5rem;
}

.received-page {
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8rem var(--gutter) 5rem;
    text-align: center;
    background: radial-gradient(
            ellipse 55% 55% at 50% 45%,
            rgba(201, 183, 156, 0.14),
            transparent 70%
    ),
    var(--bg);
}

.received-page h1 {
    font-size: clamp(2.6rem, 7vw, 5.2rem);
    margin-bottom: 1.8rem;
}

.received-page p:not(.eyebrow) {
    max-width: 28rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
}

@media (max-width: 640px) {
    .form-page,
    .story-page {
        padding-top: 7rem;
    }

    .back-link {
        margin-bottom: 2rem;
    }

    .story-form .button {
        align-self: stretch;
        text-align: center;
    }
}

.button-ghost {
    background: transparent;
    color: var(--text);
    border-color: var(--line);
}

.button-ghost:hover {
    border-color: var(--text);
}

.button-danger {
    background: transparent;
    color: #c47a6b;
    border-color: rgba(196, 122, 107, 0.35);
}

.button-danger:hover {
    background: #c47a6b;
    color: var(--bg);
    border-color: #c47a6b;
}

.admin-login {
    padding-top: 8rem;
}

.admin-login .story-form {
    width: 100%;
    max-width: 24rem;
    text-align: left;
}

.admin-login .form-message {
    width: 100%;
    max-width: 24rem;
    text-align: left;
}

.admin-page {
    max-width: var(--max);
    margin: 0 auto;
    padding: 9rem var(--gutter) clamp(5rem, 10vw, 8rem);
}

.admin-heading {
    margin-bottom: 3rem;
}

.admin-heading h1 {
    font-size: clamp(2.6rem, 6vw, 4.5rem);
}

.admin-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid var(--line);
}

.admin-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem 1.4rem;
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 1px solid transparent;
    margin-bottom: -1px;
    transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.admin-tab:hover {
    color: var(--text);
}

.admin-tab.is-active {
    color: var(--text);
    border-bottom-color: var(--accent);
}

.admin-count {
    min-width: 1.6rem;
    padding: 0.1rem 0.5rem;
    font-size: 0.65rem;
    letter-spacing: 0;
    text-align: center;
    color: var(--text-muted);
    border: 1px solid var(--line);
    border-radius: 999px;
}

.admin-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    list-style: none;
}

.admin-item {
    padding: clamp(1.4rem, 3vw, 2.2rem);
    background: var(--bg-card);
    border: 1px solid var(--line);
}

.admin-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem 1.4rem;
    margin-bottom: 1.2rem;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-faint);
}

.admin-meta .story-category {
    margin-bottom: 0;
    padding: 0.25rem 0.7rem;
}

.admin-status {
    margin-left: auto;
}

.admin-status.pending {
    color: var(--accent);
}

.admin-status.approved {
    color: #8fae8b;
}

.admin-status.rejected {
    color: #c47a6b;
}

.admin-item h2 {
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    margin-bottom: 1.2rem;
}

.admin-story summary {
    display: inline-block;
    cursor: pointer;
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
    list-style: none;
    transition: color 0.3s var(--ease);
}

.admin-story summary::-webkit-details-marker {
    display: none;
}

.admin-story summary::after {
    content: " +";
}

.admin-story[open] summary::after {
    content: " −";
}

.admin-story summary:hover {
    color: var(--text);
}

.admin-story .story-content {
    margin-top: 1.5rem;
    padding: 1.5rem 0 0.5rem;
    border-top: 1px solid var(--line);
    font-size: 1.15rem;
    max-height: 28rem;
    overflow-y: auto;
}

.admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.8rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
}

.admin-actions .button {
    padding: 0.8rem 1.6rem;
    cursor: pointer;
    font-family: var(--sans);
}

.admin-approve {
    display: flex;
    flex: 1 1 100%;
    gap: 0.8rem;
}

.admin-approve input {
    flex: 1;
    min-width: 0;
    padding: 0.8rem 1rem;
    font-family: var(--sans);
    font-size: 0.9rem;
    font-weight: 300;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 0;
    transition: border-color 0.3s var(--ease);
}

.admin-approve input::placeholder {
    color: var(--text-faint);
}

.admin-approve input:focus {
    outline: none;
    border-color: var(--accent);
}

.admin-actions form:last-child {
    margin-left: auto;
}

.admin-empty {
    padding: 5rem 0;
    text-align: center;
    font-family: var(--serif);
    font-size: 1.6rem;
    font-style: italic;
    color: var(--text-faint);
}

@media (max-width: 640px) {
    .admin-page {
        padding-top: 7rem;
    }

    .admin-actions form,
    .admin-actions form:last-child {
        flex: 1 1 100%;
        margin-left: 0;
    }

    .admin-approve {
        flex-direction: column;
    }

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

    .admin-status {
        margin-left: 0;
    }
}

.error-page .error-code {
    margin-bottom: 0.5rem;
    max-width: none;
    font-family: var(--serif);
    font-size: clamp(6rem, 24vw, 15rem);
    font-weight: 300;
    line-height: 0.9;
    color: transparent;
    -webkit-text-stroke: 1px rgba(201, 183, 156, 0.4);
    user-select: none;
}

.error-page .eyebrow {
    margin-bottom: 1.2rem;
}

.almost-whisper {
    position: fixed;
    top: 5.5rem;
    left: 50%;
    z-index: 60;
    max-width: calc(100vw - 2 * var(--gutter));
    padding: 1rem 1.6rem;
    font-family: var(--serif);
    font-size: 1.2rem;
    font-style: italic;
    text-align: center;
    color: var(--text);
    background: rgba(17, 17, 16, 0.92);
    border: 1px solid rgba(201, 183, 156, 0.35);
    opacity: 0;
    transform: translate(-50%, -10px);
    pointer-events: none;
    transition: opacity 1.4s var(--ease), transform 1.4s var(--ease);
}

.almost-whisper.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.egg-target {
    cursor: default;
    user-select: none;
    -webkit-user-select: none;
}

.story-reactions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    padding: 3rem 0 4rem;
    margin-bottom: 2rem;
    text-align: center;
    border-top: 1px solid var(--line);
}

.felt-button {
    cursor: pointer;
    font-family: var(--sans);
}

.felt-button:disabled {
    cursor: default;
    color: var(--accent);
    border-color: rgba(201, 183, 156, 0.35);
}

.felt-button:disabled:hover {
    border-color: rgba(201, 183, 156, 0.35);
}

.felt-count {
    font-family: var(--serif);
    font-size: 1.3rem;
    font-style: italic;
    color: var(--text-muted);
}

.story-bottom-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.collection-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 2.5rem;
}

.collection-filter {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 1.1rem;
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-muted);
    border: 1px solid var(--line);
    transition: color 0.3s var(--ease), background 0.3s var(--ease),
    border-color 0.3s var(--ease);
}

.collection-filter span {
    font-size: 0.62rem;
    letter-spacing: 0;
    color: var(--text-faint);
}

.collection-filter:hover {
    color: var(--text);
    border-color: rgba(236, 231, 222, 0.35);
}

.collection-filter.is-active {
    color: var(--bg);
    background: var(--text);
    border-color: var(--text);
}

.collection-filter.is-active span {
    color: var(--bg);
    opacity: 0.6;
}

.collection-empty {
    grid-column: 1 / -1;
    padding: 4rem 0;
    text-align: center;
    font-family: var(--serif);
    font-size: 1.6rem;
    font-style: italic;
    color: var(--text-faint);
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-top: 3rem;
}

.pagination-status {
    font-size: 0.7rem;
    letter-spacing: 0.25em;
    color: var(--text-faint);
}

.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.curators-notes {
    margin-top: 4rem;
    padding: 0.4rem 0 0.4rem 1.6rem;
    border-left: 1px solid var(--accent);
}

.curators-notes .eyebrow {
    margin-bottom: 1rem;
    color: var(--accent);
}

.curator-note {
    font-family: var(--serif);
    font-size: clamp(1.2rem, 2.2vw, 1.45rem);
    font-style: italic;
    line-height: 1.7;
    color: var(--text-muted);
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.curator-context {
    margin-top: 1rem;
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    line-height: 1.8;
    color: var(--text-faint);
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.4rem;
    list-style: none;
}

.tag-list a {
    display: inline-block;
    padding: 0.35rem 0.8rem;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    border: 1px solid var(--line);
    transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.tag-list a:hover {
    color: var(--text);
    border-color: rgba(236, 231, 222, 0.35);
}

.admin-edit {
    max-width: 52rem;
}

.admin-edit .admin-heading {
    margin-bottom: 2rem;
}

.admin-edit .admin-story {
    margin-bottom: 3rem;
}

.form-section-title {
    margin-top: 1.5rem;
    padding-top: 2rem;
    font-size: 2rem;
    border-top: 1px solid var(--line);
}

.form-section-title:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

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

    .collection-card {
        min-height: 22rem;
    }
}

@media (max-width: 640px) {
    .navbar {
        padding: 1rem var(--gutter);
    }

    .logo {
        font-size: 1rem;
        letter-spacing: 0.16em;
    }

    .navbar nav a:not(.nav-cta) {
        display: none;
    }

    .navbar {
        gap: 0.8rem;
    }

    .navbar .nav-cta {
        padding: 0.55rem 0.8rem;
        font-size: 0.66rem;
        letter-spacing: 0.12em;
        white-space: nowrap;
    }

    .hero {
        padding-top: 7rem;
        padding-bottom: 7rem;
    }

    .hero-footer {
        flex-direction: column;
        gap: 0.3rem;
        bottom: 1.5rem;
    }

    footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}

.related {
    padding: 3rem 0 3rem;
    border-top: 1px solid var(--line);
}

.related-list {
    display: grid;
    gap: 1rem;
    margin-top: 1.5rem;
    list-style: none;
}

.related-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--line);
    transition: border-color 0.6s var(--ease), transform 0.6s var(--ease);
}

.related-item:hover {
    border-color: rgba(236, 231, 222, 0.35);
    transform: translateX(4px);
}

.related-number {
    font-size: 0.65rem;
    letter-spacing: 0.25em;
    color: var(--text-muted);
}

.related-title {
    font-family: var(--serif);
    font-size: 1.6rem;
    font-weight: 300;
    line-height: 1.2;
}

.related-summary {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.favorites-page {
    padding-top: 6rem;
}

.favorite-entry {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.favorite-entry .collection-card {
    flex: 1;
}

.favorite-remove {
    align-self: flex-start;
    cursor: pointer;
    background: none;
    border: 0;
    font-family: var(--sans);
}

.favorites-note {
    margin-top: 3rem;
    text-align: center;
}

.constellation-page {
    max-width: 82rem;
    margin: 0 auto;
    padding: 7rem var(--gutter) 4rem;
}

.constellation-heading {
    margin-bottom: 2rem;
}

.constellation-heading h1 {
    font-family: var(--serif);
    font-size: clamp(2.4rem, 5vw, 4rem);
    font-weight: 300;
    line-height: 1.1;
}

.constellation-heading h1 em {
    color: var(--accent);
}

.constellation-lead {
    max-width: 34rem;
    margin-top: 1rem;
    color: var(--text-muted);
}

.constellation-map {
    position: relative;
    height: clamp(32rem, 72vh, 48rem);
    overflow: hidden;
    background: radial-gradient(ellipse 60% 50% at 30% 30%, rgba(201, 150, 130, 0.07), transparent 70%),
    radial-gradient(ellipse 60% 50% at 75% 35%, rgba(160, 175, 190, 0.07), transparent 70%),
    radial-gradient(ellipse 60% 50% at 55% 80%, rgba(190, 170, 120, 0.07), transparent 70%),
    #0b0b0a;
    border: 1px solid var(--line);
}

.constellation-svg {
    display: block;
    width: 100%;
    height: 100%;
    cursor: grab;
    touch-action: none;
}

.constellation-svg:active {
    cursor: grabbing;
}

.constellation-link {
    stroke: rgba(236, 231, 222, 0.22);
    stroke-width: 0.7;
    vector-effect: non-scaling-stroke;
    transition: stroke 0.5s var(--ease), opacity 0.5s var(--ease);
}

.constellation-map.has-selection .constellation-link {
    opacity: 0.35;
}

.constellation-link.is-lit {
    stroke: var(--accent);
    stroke-width: 1.1;
    opacity: 1;
}

.constellation-link.is-filtered {
    opacity: 0;
}

.constellation-star {
    --tone: 236, 231, 222;
    cursor: pointer;
    outline: none;
    transition: opacity 0.5s var(--ease);
}

.star-almost-us {
    --tone: 214, 160, 140;
}

.star-unsent-letters {
    --tone: 170, 186, 204;
}

.star-parallel-lives {
    --tone: 205, 184, 128;
}

.star-halo {
    fill: rgba(var(--tone), 0.14);
    transform-box: fill-box;
    transform-origin: center;
    animation: star-pulse 5s ease-in-out infinite;
    animation-delay: var(--delay, 0s);
}

.star-core {
    fill: rgb(var(--tone));
}

.star-hit {
    fill: transparent;
}

.constellation-star:hover .star-halo,
.constellation-star:focus-visible .star-halo,
.constellation-star.is-selected .star-halo {
    fill: rgba(var(--tone), 0.34);
}

.constellation-star:focus-visible .star-core {
    stroke: var(--text);
    stroke-width: 1.5;
}

.constellation-star.is-selected .star-core,
.constellation-star.is-linked .star-core {
    stroke: rgba(var(--tone), 0.9);
    stroke-width: 1.6;
}

.constellation-map.has-selection .constellation-star:not(.is-selected):not(.is-linked) {
    opacity: 0.35;
}

.constellation-star.is-filtered {
    opacity: 0.08 !important;
    pointer-events: none;
}

@keyframes star-pulse {
    0%, 100% {
        opacity: 0.55;
        transform: scale(0.9);
    }
    50% {
        opacity: 1;
        transform: scale(1.15);
    }
}

@media (prefers-reduced-motion: reduce) {
    .star-halo {
        animation: none;
    }
}

.constellation-filters {
    position: absolute;
    top: 1rem;
    left: 1rem;
    right: 4.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.constellation-chip {
    padding: 0.5rem 0.9rem;
    cursor: pointer;
    font-family: var(--sans);
    font-size: 0.68rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-muted);
    background: rgba(17, 17, 16, 0.7);
    border: 1px solid var(--line);
    transition: color 0.4s var(--ease), border-color 0.4s var(--ease);
}

.constellation-chip:hover,
.constellation-chip.is-active {
    color: var(--text);
    border-color: rgba(236, 231, 222, 0.45);
}

.constellation-zoom {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.constellation-zoom button {
    width: 2.2rem;
    height: 2.2rem;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-muted);
    background: rgba(17, 17, 16, 0.7);
    border: 1px solid var(--line);
}

.constellation-zoom button:hover {
    color: var(--text);
    border-color: rgba(236, 231, 222, 0.45);
}

.constellation-panel {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    width: min(23rem, calc(100% - 2rem));
    max-height: calc(100% - 7rem);
    padding: 1.6rem;
    overflow-y: auto;
    background: rgba(17, 17, 16, 0.94);
    border: 1px solid rgba(236, 231, 222, 0.25);
}

.constellation-panel[hidden] {
    display: none;
}

.constellation-close {
    position: absolute;
    top: 0.6rem;
    right: 0.8rem;
    cursor: pointer;
    font-size: 1.4rem;
    color: var(--text-muted);
    background: none;
    border: 0;
}

.constellation-panel-title {
    margin: 0.6rem 0;
    font-family: var(--serif);
    font-size: 1.8rem;
    font-weight: 300;
    line-height: 1.15;
}

.constellation-panel-summary {
    margin-bottom: 1.2rem;
    font-size: 0.92rem;
    color: var(--text-muted);
}

.constellation-panel-cluster {
    margin-top: 1.5rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--line);
}

.constellation-neighbors {
    display: grid;
    gap: 0.5rem;
    margin-top: 0.8rem;
    list-style: none;
}

.constellation-neighbor {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    width: 100%;
    padding: 0.7rem 0.8rem;
    cursor: pointer;
    text-align: left;
    font-family: var(--sans);
    color: var(--text);
    background: var(--bg-card);
    border: 1px solid var(--line);
}

.constellation-neighbor:hover {
    border-color: rgba(236, 231, 222, 0.4);
}

.constellation-neighbor-title {
    font-family: var(--serif);
    font-size: 1.1rem;
}

.constellation-neighbor-via {
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    color: var(--text-muted);
}

.constellation-alone {
    font-family: var(--serif);
    font-style: italic;
    color: var(--text-muted);
}

.constellation-empty {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-family: var(--serif);
    font-size: 1.4rem;
    font-style: italic;
    color: var(--text-muted);
}

.constellation-empty[hidden] {
    display: none;
}

.constellation-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.2rem;
}

.constellation-count {
    font-size: 0.7rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.constellation-index {
    margin-top: 3rem;
    color: var(--text-muted);
}

.constellation-index summary {
    cursor: pointer;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.constellation-index-title {
    margin: 1.6rem 0 0.6rem;
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.22em;
}

.constellation-index ul {
    display: grid;
    gap: 0.4rem;
    list-style: none;
}

@media (max-width: 640px) {
    .constellation-page {
        padding-top: 6rem;
    }

    .constellation-map {
        height: 38rem;
    }

    .constellation-chip {
        padding: 0.4rem 0.6rem;
        font-size: 0.6rem;
        letter-spacing: 0.12em;
    }

    .constellation-panel {
        left: 0.5rem;
        right: 0.5rem;
        bottom: 0.5rem;
        width: auto;
        max-height: 60%;
        padding: 1.2rem;
    }

    .constellation-panel-title {
        font-size: 1.5rem;
    }
}

.lang-switch {
    display: flex;
    gap: 1.2rem;
    margin-bottom: 1.4rem;
}

.lang-link {
    font-size: 0.7rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 1px solid transparent;
}

.lang-link:hover,
.lang-link.is-active {
    color: var(--text);
    border-bottom-color: var(--accent);
}

.admin-ai,
.admin-ai-section {
    display: grid;
    gap: 1rem;
    margin: 2rem 0;
    padding: 1.6rem;
    background: var(--bg-card);
    border: 1px solid var(--line);
}

.admin-ai-section .story-form {
    margin: 0;
}

.admin-ai-section .form-section-title {
    margin: 0;
}