:root {
    --bg: #09080c;
    --ink: #f6f1ea;
    --muted: #b7aea4;
    --gold: #e4c79a;
    --gold-deep: #c4a06a;
    --line: rgba(228, 199, 154, 0.28);
    --card: rgba(255, 248, 240, 0.045);
    --danger: #f0c2bb;
    --serif: "Cormorant Garamond", "Palatino Linotype", Palatino, serif;
    --sans: "Outfit", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    min-height: 100%;
}

body {
    color: var(--ink);
    background: #120f0c;
    font-family: var(--sans);
    font-weight: 300;
    letter-spacing: 0.01em;
}

a { color: inherit; }

.atmosphere {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(980px 560px at 50% 28%, rgba(212, 164, 98, 0.16), transparent 62%),
        radial-gradient(640px 420px at 88% 88%, rgba(92, 52, 34, 0.18), transparent 58%),
        #14110e;
}

.atmosphere::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 58%, rgba(12, 8, 6, 0.42) 100%);
}

.atmosphere::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.09;
    background-image: radial-gradient(rgba(255, 255, 255, 0.28) 0.5px, transparent 0.5px);
    background-size: 3px 3px;
}

.gate-stage,
.shell,
.receipt {
    position: relative;
    z-index: 1;
}

.gate-stage,
.receipt {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2.5rem 1.25rem 4rem;
}

.eyebrow {
    margin: 0 0 0.8rem;
    color: var(--gold);
    font-size: 0.74rem;
    font-weight: 500;
    letter-spacing: 0.28em;
    text-transform: uppercase;
}

.eyebrow a {
    color: var(--gold);
    text-decoration: none;
}

.eyebrow a:hover { color: var(--ink); }

h1 {
    margin: 0;
    font-family: var(--serif);
    font-weight: 500;
    font-size: clamp(4.4rem, 12vw, 8rem);
    line-height: 0.85;
    letter-spacing: 0.04em;
}

.receipt h1 {
    max-width: 11em;
    margin-inline: auto;
    font-size: clamp(3.1rem, 8vw, 5.6rem);
    line-height: 0.92;
    letter-spacing: 0.01em;
}

.invite {
    position: relative;
    width: min(100%, 34rem);
    padding: 4.6rem 2.8rem 2.8rem;
    border: 1px solid rgba(228, 199, 154, 0.22);
    background: linear-gradient(180deg, rgba(255, 246, 234, 0.035), rgba(255, 246, 234, 0.012));
}

.invite::before {
    content: "";
    display: block;
    width: 6px;
    height: 6px;
    margin: 0 auto 1.6rem;
    border: 1px solid var(--gold);
    transform: rotate(45deg);
}

.gate-stage .eyebrow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
    margin-bottom: 1.5rem;
}

.gate-stage .eyebrow::before,
.gate-stage .eyebrow::after {
    content: "";
    width: 2.2rem;
    height: 1px;
    background: rgba(228, 199, 154, 0.55);
}

.gate-stage h1 {
    max-width: none;
    font-size: clamp(3.15rem, 6vw, 4.15rem);
    font-weight: 500;
    line-height: 0.9;
    letter-spacing: -0.02em;
}

.gate-stage h1 em {
    font-style: italic;
    font-weight: 500;
}

.gate-stage .whisper {
    max-width: 18rem;
    margin-top: 1.35rem;
    font-size: 0.95rem;
}

.whisper,
.lede {
    max-width: 36rem;
    margin: 1.2rem auto 0;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.6;
}

.gate-form {
    width: 100%;
    margin-top: 2.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.gate-form input {
    width: 100%;
    border: 0;
    border-bottom: 1px solid rgba(228, 199, 154, 0.35);
    background: transparent;
    color: var(--ink);
    text-align: center;
    font: inherit;
    font-size: 1rem;
    letter-spacing: 0.14em;
    padding: 0.85rem 0.4rem 0.7rem;
    outline: none;
}

.gate-form input::placeholder {
    color: rgba(183, 174, 164, 0.55);
    letter-spacing: 0.28em;
    text-transform: uppercase;
    font-size: 0.72rem;
}

.gate-form input:focus {
    border-bottom-color: var(--gold);
}

.gate-form button {
    border: 1px solid rgba(228, 199, 154, 0.45);
    cursor: pointer;
    background: transparent;
    color: var(--gold);
    font: inherit;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    padding: 0.95rem 1.2rem;
}

.gate-form button:hover {
    background: var(--gold);
    color: #1c140e;
}

.buy {
    margin-top: 0.6rem;
    border: 1px solid rgba(228, 199, 154, 0.5);
    cursor: pointer;
    background: transparent;
    color: var(--gold);
    font: inherit;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    padding: 0.95rem 1.3rem;
}

.buy:hover {
    background: var(--gold);
    color: #1c140e;
}

.gate-form.is-wrong { animation: shake 0.42s ease; }

.gate-error {
    margin: 0.2rem 0 0;
    color: var(--danger);
    font-size: 0.92rem;
}

.shell {
    width: min(1720px, calc(100% - clamp(1.25rem, 3vw, 2.5rem)));
    margin: 0 auto;
    padding: 1.1rem 0 3rem;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem 0 0.15rem;
}

.brand {
    font-family: var(--serif);
    font-style: italic;
    font-size: 2.7rem;
    letter-spacing: 0.02em;
    text-decoration: none;
}

.brand .heart {
    margin-left: 0.16em;
    color: #e7a3b8;
    font-style: normal;
    font-size: 0.72em;
}

.menu {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.22rem;
    border: 1px solid rgba(228, 199, 154, 0.22);
    border-radius: 999px;
    background: rgba(255, 244, 226, 0.04);
}

.menu a,
.text-button {
    color: var(--muted);
    text-decoration: none;
    background: transparent;
    border: 0;
    border-radius: 999px;
    padding: 0.42rem 0.75rem;
    font: inherit;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
}

.menu a.is-active {
    background: rgba(228, 199, 154, 0.16);
    color: var(--gold);
}

.menu a:hover,
.text-button:hover { color: var(--ink); }

.shop-line {
    max-width: 36rem;
    margin: 0.55rem 0 0;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
    gap: 1rem;
    width: 100%;
}

.rules {
    margin: 2.4rem 0 1.6rem;
    padding: 0.2rem 1.2rem;
    border: 1px solid rgba(228, 199, 154, 0.2);
    border-radius: 16px;
    background: rgba(255, 244, 226, 0.035);
}

.rules summary {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    padding: 0.85rem 0;
    cursor: pointer;
    list-style: none;
}

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

.rules-label {
    font-family: var(--serif);
    font-style: italic;
    font-size: 1.35rem;
    color: var(--ink);
}

.rules-note {
    color: var(--muted);
    font-size: 0.82rem;
}

.rules summary::after {
    content: "";
    margin-left: auto;
    width: 0.42rem;
    height: 0.42rem;
    border-right: 1.5px solid var(--gold);
    border-bottom: 1.5px solid var(--gold);
    transform: translateY(-0.1rem) rotate(45deg);
}

.rules[open] summary::after { transform: translateY(0.15rem) rotate(225deg); }

.rules ul {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem 2rem;
    margin: 0;
    padding: 0.15rem 0 1rem;
    list-style: none;
}

.rules li {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.7rem;
    align-items: start;
    margin: 0;
    padding: 0.45rem 0;
    color: var(--muted);
    line-height: 1.45;
}

.rules li strong {
    display: block;
    margin-bottom: 0.15rem;
    color: var(--ink);
    font-weight: 500;
}

.rule-mark {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 999px;
    background: rgba(228, 199, 154, 0.12);
    font-size: 0.92rem;
    line-height: 1;
}

.tile {
    display: flex;
    flex-direction: column;
    color: inherit;
    text-decoration: none;
    background: #1b1815;
    border: 1px solid rgba(255, 244, 226, 0.1);
    border-radius: 18px;
    overflow: hidden;
}

.tile:hover { border-color: rgba(228, 199, 154, 0.45); }

.frame,
.cover-empty {
    position: relative;
    display: block;
    overflow: hidden;
    background: #161310;
    aspect-ratio: 3 / 2;
}

.frame img,
.piece-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.tile:hover img { transform: scale(1.04); }

.tile-mark {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    display: grid;
    place-items: center;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 999px;
    background: rgba(255, 244, 226, 0.94);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
    font-size: 1.15rem;
    line-height: 1;
}

.frame .type {
    position: absolute;
    left: 0.7rem;
    bottom: 0.7rem;
    max-width: calc(100% - 1.4rem);
    margin: 0;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    background: rgba(12, 10, 8, 0.78);
    letter-spacing: 0.12em;
    white-space: nowrap;
}

.cover-empty {
    display: grid;
    place-items: center;
    color: var(--gold);
    font-family: var(--serif);
    font-style: italic;
    font-size: 4rem;
}

.tile-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 0.85rem 0.9rem 0.95rem;
}

.tile-body h2 {
    margin: 0;
    min-height: 2.2em;
    font-family: var(--serif);
    font-style: italic;
    font-weight: 500;
    font-size: clamp(1.35rem, 1.6vw, 1.7rem);
    line-height: 1.1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tile-body p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8em;
    margin: 0.35rem 0 0;
    color: var(--muted);
    line-height: 1.4;
    font-size: 0.86rem;
}

.tile-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    margin-top: auto;
    padding-top: 0.85rem;
}

.tile .price {
    color: var(--gold);
    font-size: 2.65rem;
    line-height: 0.9;
}

.tile .text-link {
    flex: 0 0 auto;
    border: 1px solid rgba(228, 199, 154, 0.6);
    border-radius: 999px;
    padding: 0.62rem 1.05rem;
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    line-height: 1;
}

.buy-form {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
    margin-top: 1.3rem;
    max-width: 22rem;
}

.buy-form label {
    color: var(--gold);
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.buy-form input {
    width: 100%;
    border: 0;
    border-bottom: 1px solid rgba(228, 199, 154, 0.4);
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-size: 1.05rem;
    letter-spacing: 0.04em;
    padding: 0.55rem 0 0.45rem;
    outline: none;
}

.buy-form input:focus { border-bottom-color: var(--gold); }

.buy-form input::placeholder { color: rgba(183, 174, 164, 0.55); }

.piece-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.piece {
    display: grid;
    grid-template-columns: minmax(320px, 1.25fr) minmax(300px, 0.75fr);
    align-items: center;
    width: min(100%, 76rem);
    margin: auto;
    border: 1px solid rgba(228, 199, 154, 0.24);
    background:
        linear-gradient(165deg, rgba(255, 244, 226, 0.055), rgba(255, 244, 226, 0.02));
}

.piece-visual {
    display: flex;
    align-items: center;
    align-self: center;
    width: 100%;
    min-height: 0;
    background: transparent;
    border-right: 1px solid rgba(228, 199, 154, 0.16);
}

.piece-visual img,
.piece-visual .cover-empty {
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    object-position: center;
}

.piece-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2.6rem 2.8rem 2.4rem;
}

.piece h1 {
    margin-top: 0.2rem;
    font-style: italic;
    font-size: clamp(2.3rem, 5vw, 3.4rem);
}

.piece .prose { margin-top: 1rem; font-size: 1.05rem; }

.piece .price-large {
    margin: 0.6rem 0 0;
    color: var(--gold);
}

.card,
.detail {
    background: var(--card);
    border: 1px solid rgba(228, 199, 154, 0.16);
    border-radius: 18px;
    padding: 1.35rem 1.3rem 1.2rem;
    backdrop-filter: blur(8px);
}

.card {
    display: flex;
    flex-direction: column;
    min-height: 250px;
}

.type {
    margin: 0 0 0.7rem;
    color: var(--gold-deep);
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.card h2,
.detail h1 {
    font-family: var(--serif);
    font-weight: 500;
    letter-spacing: 0.03em;
}

.card h2 {
    margin: 0;
    font-size: 2.2rem;
    line-height: 1;
}

.detail h1 {
    margin: 0.2rem 0 0;
    font-size: clamp(3.2rem, 8vw, 5.5rem);
    line-height: 0.9;
}

.desc,
.prose {
    color: var(--muted);
    line-height: 1.65;
}

.desc { flex: 1; }

.card-foot {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.2rem;
}

.price {
    font-family: var(--serif);
    font-size: 1.7rem;
}

.price-large {
    margin: 1rem 0 0;
    font-size: 2.4rem;
}

.text-link {
    color: var(--gold);
    text-decoration: none;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.82rem;
}

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

.tile .text-link:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: #1a1612;
}

.detail {
    margin-top: 1.6rem;
    padding: 1.8rem 1.5rem 1.7rem;
}

.note {
    color: var(--muted);
    max-width: 38rem;
}

.empty { color: var(--muted); }

.reference {
    color: var(--muted);
    letter-spacing: 0.08em;
}

.reference strong {
    color: var(--ink);
    font-weight: 500;
}

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

@keyframes drift {
    0%, 100% { transform: translate3d(0, 0, 0); }
    50% { transform: translate3d(24px, -18px, 0); }
}

@keyframes shake {
    20% { transform: translateX(-7px); }
    40% { transform: translateX(7px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

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

@media (max-width: 760px) {
    .shell { width: min(1720px, calc(100% - 1.25rem)); }

    .nav {
        flex-direction: column;
        align-items: stretch;
        gap: 0.7rem;
        padding-top: 0.75rem;
    }

    .brand {
        font-size: 2.15rem;
        line-height: 1;
    }

    .menu {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0.12rem;
        width: 100%;
        padding: 0.22rem;
    }

    .menu form { display: contents; }

    .menu a,
    .text-button {
        display: block;
        width: 100%;
        text-align: center;
        padding: 0.68rem 0.1rem;
        font-size: 0.68rem;
        letter-spacing: 0.06em;
        white-space: nowrap;
    }

    .shop-line,
    .whisper,
    .lede { font-size: 0.95rem; }

    .gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: none;
        gap: 0.85rem 0.6rem;
    }

    .rules ul { grid-template-columns: 1fr; }

    .tile .price { font-size: 1.7rem; }

    .tile .text-link {
        padding: 0.45rem 0.7rem;
        font-size: 0.68rem;
        letter-spacing: 0.1em;
    }

    .tile-body h2 { font-size: 1.15rem; }

    .tile-body p { font-size: 0.78rem; }

    .piece-shell { min-height: 0; }

    .piece {
        grid-template-columns: 1fr;
        min-height: 0;
        margin: 1.2rem 0 1.5rem;
    }

    .piece-visual {
        aspect-ratio: auto;
        min-height: 0;
        border-right: 0;
        border-bottom: 1px solid rgba(228, 199, 154, 0.16);
    }

    .piece-body { padding: 1.45rem 1.15rem 1.55rem; }

    .buy-form { max-width: none; }

    .buy { width: 100%; }

    .buy-form input,
    .gate-form input { font-size: 16px; }

    .invite { padding: 2.2rem 1.15rem 1.5rem; }

    .gate-stage { padding: 1.5rem 0.85rem 2.5rem; }

    .gate-stage h1 { font-size: clamp(2.35rem, 11vw, 3.2rem); }
}

@media (prefers-reduced-motion: reduce) {
    .gate-form.is-wrong { animation: none; }
}
