@font-face {
    font-family: "Invitation Brush";
    src: url("invitation-brush.woff2") format("woff2");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

:root {
    --paper: #f4e7c7;
    --red: #ad271f;
    --ink: #762018;
    --cream: #fff0ce;
    --gold: #e4b571;
    --brush: "Invitation Brush", "Kaiti TC", "DFKai-SB", serif;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    color: #48241a;
    background: radial-gradient(ellipse at 50% 4%, #f5e0ba, #ead1a7 56%, #dfbe92);
    font-family: "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", system-ui, sans-serif;
}
h1, h2, p, figure { margin: 0; }
button { font: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid currentColor; outline-offset: 4px; }

.invitation {
    width: min(100%, 480px);
    min-height: 100vh;
    margin-inline: auto;
    background: var(--paper);
    container-type: inline-size;
    box-shadow: 0 0 84px #74451c2e;
}
.invitation-art {
    position: relative;
    isolation: isolate;
    height: 109cqi;
    overflow: hidden;
    background: radial-gradient(ellipse at 45% 24%, #fbf0d6, transparent 66%), var(--paper);
}
.invitation-art::before {
    content: "";
    position: absolute;
    inset: 3.3cqi 3.4cqi 0;
    border-top: 2px solid var(--red);
    border-left: 1px solid var(--red);
    pointer-events: none;
}
.event-seal {
    position: absolute;
    z-index: 2;
    top: 6.6cqi;
    left: 5.5cqi;
    display: flex;
    align-items: center;
    gap: 2.4cqi;
    transform: rotate(-2deg);
    color: #961f18;
    font: 400 9cqi/1.2 var(--brush);
    letter-spacing: .035em;
}
.event-seal span {
    display: grid;
    place-content: center;
    width: 10cqi;
    height: 10cqi;
    border: 1px solid var(--red);
    outline: 1px solid var(--red);
    outline-offset: 2px;
    font-size: 4.1cqi;
    line-height: .98;
    text-align: center;
}
.event-seal strong { font-weight: inherit; }
.pendant-print {
    position: absolute;
    top: 22.8cqi;
    left: -2cqi;
    width: 83cqi;
    height: 89cqi;
    border: 1.5cqi solid #faefd6;
    background: #b88243;
    transform: rotate(-4deg);
    box-shadow: 0 2px #a68459, 4px 8px #947142;
}
.pendant-print img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 3% 52%; }
.pendant-print figcaption {
    position: absolute;
    left: 4cqi;
    bottom: 5cqi;
    padding: 2px 5px;
    color: #53261a;
    background: #f7e9cdee;
    font-size: .65rem;
}
.store-name {
    position: absolute;
    z-index: 1;
    top: -2cqi;
    right: 6cqi;
    display: flex;
    flex-direction: row-reverse;
    align-items: flex-start;
    justify-content: center;
    width: 35cqi;
    min-height: 68cqi;
    padding: 8.2cqi 2cqi 4cqi;
    border-inline: 1px solid var(--red);
    background: linear-gradient(135deg, #fbefd0, #f0ddb4);
    box-shadow: 3px 5px 0 #63421d30;
    color: #941e18;
    font: 400 6.3cqi/1.2 var(--brush);
    text-align: center;
    overflow-wrap: anywhere;
    transform: rotate(3deg);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 95%);
}
.store-name-vertical { font-size: 16.2cqi; line-height: 1; }
.store-name-vertical span { writing-mode: vertical-rl; text-orientation: upright; letter-spacing: .035em; }
.store-name-vertical span + span { margin-top: 10cqi; }
.gold-tag {
    position: absolute;
    z-index: 2;
    top: 78cqi;
    right: 5cqi;
    padding: 1.5cqi 2.2cqi;
    transform: rotate(4deg);
    border: 1px solid #733a22;
    outline: 2px solid #edcd88;
    box-shadow: 4px 5px #722820;
    background: #f3d491;
    font: 400 5.25cqi/1.25 var(--brush);
}
.gold-tag b { display: block; font: 700 italic 10cqi/.94 Georgia, serif; letter-spacing: -.055em; }

.gold-rsvp {
    position: relative;
    isolation: isolate;
    margin-top: -7cqi;
    padding: 18cqi 7.4cqi 7cqi;
    color: var(--cream);
}
.gold-rsvp::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    background: linear-gradient(136deg, #b72d24, #9e241d 70%);
    clip-path: polygon(0 8cqi, 100% 0, 100% 100%, 0 100%);
}
.gold-rsvp::after {
    content: "";
    position: absolute;
    inset: 8.8cqi 0 auto;
    border-top: 1px solid var(--gold);
    transform-origin: left;
    transform: skewY(-4.55deg);
    pointer-events: none;
}
.gold-rsvp h2 { display: flex; gap: 3cqi; align-items: center; transform: rotate(-3deg); }
.gold-rsvp h2 span {
    flex: none;
    width: 1.85em;
    padding: .3em;
    border: 1px solid var(--gold);
    outline: 1px solid var(--gold);
    outline-offset: 2px;
    color: #ffe4a6;
    text-align: center;
    font-size: clamp(.72rem, 3.5cqi, 1rem);
    line-height: 1.05;
}
.gold-rsvp h2 strong {
    font: 400 15.2cqi/1.07 var(--brush);
    letter-spacing: .005em;
    white-space: nowrap;
    text-shadow: 1px 2px #63150e;
}
.entry-terms { margin-top: 5.8cqi; font-size: clamp(.83rem, 3.75cqi, 1rem); line-height: 1.55; }
.participate { margin-top: 5.4cqi; }
.line-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .55em;
    width: 100%;
    min-height: clamp(48px, 14cqi, 65px);
    padding: 7px 12px;
    border: 1px solid #8b291d;
    outline: 2px solid #efbf76;
    outline-offset: 3px;
    background: #f7e6b9;
    color: var(--ink);
    font-size: clamp(1rem, 4.55cqi, 1.25rem);
    font-weight: 750;
    letter-spacing: .025em;
    text-decoration: none;
}
.line-cta::after { content: "→"; margin-left: .25em; font-size: 1.2em; line-height: 1; }
.line-cta:hover:not(:disabled) { background: #fff1cc; }
.line-cta:focus-visible { outline-style: dashed; outline-color: #fff6e0; }
.line-cta:disabled { opacity: .68; }
.line-icon { width: 1.24em; height: 1.24em; flex: none; }
.claim-help,.consent { margin-top: 12px; font-size: .83rem; line-height: 1.55; }
.claim-help { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 8px; }
.copy-phrase { padding: 4px 0; border: 0; background: transparent; color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.consent { display: flex; align-items: flex-start; gap: 7px; }
.consent input { width: 17px; height: 17px; flex: none; margin: 2px 0 0; }
.rules-link { display: inline-block; margin-top: 9px; color: inherit; font-size: .84rem; text-underline-offset: 3px; }

.house-footnote,.info { margin-inline: 7.4cqi; }
.house-footnote {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-block: 21px;
}
.house-footnote img { width: 34%; height: auto; aspect-ratio: 1.75; object-fit: cover; border: 1px solid #bc9660; }
.house-footnote figcaption { display: grid; gap: 2px; }
.house-footnote strong { color: var(--ink); font-size: 1.15rem; }
.plate-label,.footnote { font-size: .74rem; }
.info { padding-bottom: max(24px, env(safe-area-inset-bottom)); }
.info details { padding-block: 12px; border-top: 1px solid #bc9660; }
.info summary { cursor: pointer; color: var(--ink); font-weight: 650; }
.details-body { margin-top: 7px; font-size: .9rem; line-height: 1.65; }
.details-body p + p { margin-top: 8px; }
.rules-copy { white-space: pre-line; overflow-wrap: anywhere; }

@media (max-height: 720px) and (max-width: 500px) {
    .gold-rsvp { padding-top: 14cqi; }
    .entry-terms { margin-top: 3.6cqi; }
    .participate { margin-top: 4.5cqi; }
}
