/* Pollyanna: one stylesheet for the whole site.
   The look: a raffle drawn out of a hat, printed on a risograph. Newsprint paper, two inks
   (red and evergreen) plus a highlighter yellow, poster type, tickets, rubber stamps. */

:root {
    --paper: #f1ece1;
    --sheet: #faf7f0;
    --ink: #17201c;
    --muted: #5f645d;
    --rule: #d5cdbd;
    --red: #e03a24;
    --red-ink: #ffffff;
    --red-soft: #f7d9d1;
    --green: #0d6a4a;
    --green-ink: #ffffff;
    --green-soft: #d6e7dc;
    --yellow: #f6c814;
    --yellow-ink: #17201c;
    --yellow-soft: #f8e9a8;
    --blue: #2b4fa0;
    --pink: #e66b8f;
    --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
    --body: "Archivo", "Helvetica Neue", Arial, sans-serif;
    --mono: "Fragment Mono", ui-monospace, "SF Mono", Menlo, monospace;
    --press: 0 10px 24px -12px rgba(23, 32, 28, .35);
    --soft: 0 1px 2px rgba(23, 32, 28, .05), 0 12px 32px -18px rgba(23, 32, 28, .22);
    --line-2: color-mix(in srgb, var(--ink) 16%, transparent);
    color-scheme: light;

    /* Kept so older inline styles still resolve. */
    --bg: var(--paper); --surface: var(--sheet); --surface-2: #ebe5d8; --line: var(--rule);
    --pine: var(--green); --pine-ink: var(--green-ink); --pine-soft: var(--green-soft);
    --berry: var(--red); --berry-soft: var(--red-soft); --gold: var(--yellow); --gold-ink: var(--yellow-ink); --gold-soft: var(--yellow-soft);
    --radius: 18px; --radius-sm: 12px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font: 400 16px/1.55 var(--body);
    font-stretch: 100%;
    color: var(--ink);
    background: var(--paper);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}
/* Paper grain over everything. */
body::before {
    content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .07; mix-blend-mode: multiply;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--red); }
h1, h2, h3 { font-family: var(--display); margin: 0; line-height: 1; }
h1 { font-size: clamp(2.1rem, 5.5vw, 3.4rem); font-weight: 800; font-stretch: 112%; letter-spacing: -.025em; line-height: 1; }
h2 { font-size: 1.3rem; font-weight: 750; font-stretch: 108%; letter-spacing: -.01em; line-height: 1.1; }
h3 { font-size: 1.02rem; font-weight: 700; font-stretch: 110%; line-height: 1.2; }
p { margin: 0; }
::selection { background: var(--yellow); color: var(--yellow-ink); }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.link-muted { color: var(--muted); text-decoration: none; font-size: .9rem; }
.link-muted:hover { color: var(--red); }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.icon { width: 1.1em; height: 1.1em; flex: none; vertical-align: -0.15em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Little mono labels used all over: eyebrows, counters, meta. */
.eyebrow, .counter, .fact dt, th, .thread-when, .bubble-time, .tag {
    font-family: var(--mono); font-weight: 400; letter-spacing: .01em;
}
.eyebrow, .fact dt, th { text-transform: uppercase; letter-spacing: .05em; }

/* ---------- Top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line-2); }
.topbar-inner { max-width: 1160px; margin: 0 auto; padding: 0 24px; display: flex; align-items: stretch; gap: 24px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-word { font-family: var(--display); font-weight: 850; font-stretch: 115%; font-size: 1.4rem; letter-spacing: -.03em; }
.brand-year {
    display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
    background: var(--red); color: var(--red-ink); font-family: var(--mono); font-size: .78rem;
    transform: rotate(-12deg); transition: transform .3s cubic-bezier(.3, 1.6, .5, 1);
}
.brand:hover .brand-year { transform: rotate(12deg) scale(1.08); }
.brand-mark { display: none; }
.tabs { display: flex; gap: 4px; align-items: center; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.tabs a {
    display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 12px; text-decoration: none; color: var(--muted);
    font-weight: 600; font-stretch: 105%; font-size: .94rem; white-space: nowrap; position: relative; transition: background .15s ease, color .15s ease;
}
.tabs a:hover { color: var(--ink); background: var(--sheet); }
.tabs a.is-active { color: var(--ink); background: var(--sheet); box-shadow: inset 0 -3px 0 var(--red); }
.topbar-user { display: flex; align-items: center; gap: 12px; }
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--red); color: var(--red-ink); font: 400 .72rem/1 var(--mono); }

@media (max-width: 760px) {
    .topbar-inner { flex-wrap: wrap; gap: 0 12px; padding: 0 14px; }
    .brand { min-height: 54px; }
    .topbar-user { margin-left: auto; }
    .tabs { order: 3; width: 100%; padding: 0 0 8px; }
    .tabs a { padding: 9px 10px; font-size: .88rem; flex: 1; justify-content: center; }
}

/* ---------- Season banner: a ticker strip ---------- */
.banner { background: var(--red); color: var(--red-ink); }
.banner-inner { max-width: 1160px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; gap: 20px; }
.banner-year { font-family: var(--display); font-weight: 850; font-stretch: 112%; font-size: 2.1rem; line-height: 1; letter-spacing: -.03em; }
.banner-body { display: flex; align-items: baseline; gap: 4px 16px; flex: 1; min-width: 0; flex-wrap: wrap; }
.banner-body strong { font-size: 1.05rem; font-weight: 700; font-stretch: 110%; }
.banner-body span { font-size: .92rem; opacity: .9; }
.banner-meta::before { content: "✱ "; }
.banner-action { display: flex; gap: 8px; }
.banner-action form { margin: 0; }
.banner .btn-gold { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.banner .btn-ghost-light { border-color: currentColor; color: inherit; background: transparent; }
@media (max-width: 600px) {
    .banner-inner { flex-wrap: wrap; gap: 10px 14px; padding: 12px 14px; }
    .banner-year { font-size: 1.6rem; }
    .banner-action { width: 100%; }
    .banner-action form { flex: 1; }
    .banner-action .btn { width: 100%; }
}

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 44px 24px 64px; flex: 1; display: flex; flex-direction: column; gap: 24px; }
.wrap-narrow { max-width: 780px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 4px; }
.page-head p { color: var(--muted); margin-top: 10px; max-width: 60ch; }
.eyebrow { font-size: .78rem; color: var(--red); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.eyebrow::before { content: "✱"; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.split { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 24px; }
@media (max-width: 880px) { .split { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .grid-2 { grid-template-columns: 1fr; } .wrap { padding: 24px 14px 48px; gap: 18px; } }
.footer { text-align: center; color: var(--muted); font-size: .85rem; padding: 28px 24px 36px; }
.footer::before { content: "✱ "; color: var(--red); }
.footer::after { content: " ✱"; color: var(--red); }

/* ---------- Sheets (cards) ---------- */
.card { background: var(--sheet); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 26px; position: relative; box-shadow: var(--soft); }
.card > h2:first-child, .card-head h2 { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.card-head > div { flex: 1; min-width: 220px; }
.card-head p { margin-top: 8px; }
.card-soft { background: transparent; border: 1.5px dashed var(--line-2); box-shadow: none; }
.counter { font-size: .8rem; color: var(--muted); }
details.card > summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::after { content: "+"; font: 400 1.4rem/1 var(--mono); color: var(--red); transition: transform .2s ease; flex: none; }
details.card[open] > summary::after { transform: rotate(45deg); }
details.card[open] > summary { margin-bottom: 20px; }

/* Hero: the raffle ticket you drew. */
.card-hero, .ticket {
    background: var(--red); color: var(--red-ink); border: 0; border-radius: 20px; padding: 0; display: grid; grid-template-columns: 1fr 120px; overflow: visible;
    -webkit-mask: radial-gradient(circle 14px at calc(100% - 120px) 0, transparent 13.5px, #000 14px) top / 100% 51% no-repeat,
                  radial-gradient(circle 14px at calc(100% - 120px) 100%, transparent 13.5px, #000 14px) bottom / 100% 51% no-repeat;
            mask: radial-gradient(circle 14px at calc(100% - 120px) 0, transparent 13.5px, #000 14px) top / 100% 51% no-repeat,
                  radial-gradient(circle 14px at calc(100% - 120px) 100%, transparent 13.5px, #000 14px) bottom / 100% 51% no-repeat;
    animation: ticket-in .7s cubic-bezier(.2, 1.4, .4, 1) both;
}
@keyframes ticket-in { from { transform: translateY(18px) rotate(-1.5deg); opacity: 0; } }
.ticket-main { padding: 30px 32px 28px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ticket-label { font-family: var(--mono); font-size: .85rem; opacity: .9; }
.ticket-name { font-size: clamp(2.6rem, 8vw, 5rem); font-stretch: 115%; line-height: .95; overflow-wrap: anywhere; }
.ticket-foot { display: flex; gap: 8px 22px; flex-wrap: wrap; font-family: var(--mono); font-size: .85rem; }
.ticket-stub {
    border-left: 2px dashed color-mix(in srgb, var(--red-ink) 55%, transparent); display: flex; align-items: center; justify-content: center;
    writing-mode: vertical-rl; transform: rotate(180deg); font-family: var(--display); font-weight: 850; font-stretch: 112%; font-size: 2.6rem; letter-spacing: -.02em;
}
.ticket-stub small { font-family: var(--mono); font-weight: 400; font-size: .72rem; letter-spacing: .08em; margin-bottom: 10px; opacity: .85; }
.card-hero .muted { color: inherit; opacity: .85; }
@media (max-width: 600px) {
    .card-hero, .ticket { grid-template-columns: 1fr 64px;
        -webkit-mask: radial-gradient(circle 11px at calc(100% - 64px) 0, transparent 10.5px, #000 11px) top / 100% 51% no-repeat, radial-gradient(circle 11px at calc(100% - 64px) 100%, transparent 10.5px, #000 11px) bottom / 100% 51% no-repeat;
                mask: radial-gradient(circle 11px at calc(100% - 64px) 0, transparent 10.5px, #000 11px) top / 100% 51% no-repeat, radial-gradient(circle 11px at calc(100% - 64px) 100%, transparent 10.5px, #000 11px) bottom / 100% 51% no-repeat; }
    .ticket-main { padding: 22px 20px; }
    .ticket-stub { font-size: 1.6rem; }
}

/* ---------- Buttons: printed blocks that press in ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font: 650 .95rem/1 var(--body); font-stretch: 104%;
    padding: 13px 20px; border-radius: 12px; border: 1px solid var(--line-2); cursor: pointer; text-decoration: none; white-space: nowrap;
    background: var(--sheet); color: var(--ink);
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { color: inherit; transform: translateY(-1px); box-shadow: var(--press); }
.btn:active { transform: none; box-shadow: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-primary { background: var(--red); color: var(--red-ink); border-color: transparent; }
.btn-primary:hover { color: var(--red-ink); box-shadow: 0 10px 22px -10px color-mix(in srgb, var(--red) 70%, transparent); }
.btn-gold, .btn-red { background: var(--yellow); color: var(--yellow-ink); border-color: transparent; }
.btn-gold:hover { color: var(--yellow-ink); }
.btn-danger { background: var(--red); color: var(--red-ink); border-color: var(--red); }
.btn-ghost { background: transparent; }
.btn-ghost-light { background: transparent; border-color: currentColor; color: inherit; }
.btn-sm { padding: 8px 13px; font-size: .85rem; border-radius: 10px; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btn-link { background: none; border: 0; padding: 4px 2px; color: var(--muted); text-decoration: underline; text-decoration-color: currentColor; text-decoration-thickness: 1px; font: 500 .85rem var(--body); cursor: pointer; }
.btn-link:hover { color: var(--red); transform: none; box-shadow: none; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; }
.field label, .label { font-weight: 650; font-size: .9rem; }
.field .hint, .hint { color: var(--muted); font-weight: 400; }
input[type=text], input[type=email], input[type=number], input[type=password], input[type=date], input[type=url], select, textarea {
    width: 100%; font: inherit; color: var(--ink); background: var(--paper);
    border: 1.5px solid var(--line-2); border-radius: 12px; padding: 11px 14px;
    transition: background .12s ease, border-color .12s ease, box-shadow .12s ease;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--red); background: var(--sheet); box-shadow: 0 0 0 4px color-mix(in srgb, var(--red) 15%, transparent); }
input[type=range] { width: 100%; accent-color: var(--red); }
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--red); flex: none; }
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.check-big { padding: 18px 20px; border: 2px dashed var(--line-2); border-radius: var(--radius-sm); background: var(--sheet); font-weight: 650; }
.check-big:has(input:checked) { border-style: solid; border-color: var(--green); background: var(--green-soft); }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.inline-form > * { flex: 1; min-width: 160px; margin: 0; }
.inline-form > .btn { flex: none; }
.code-input { font: 400 2rem var(--mono) !important; letter-spacing: .5em; text-align: center; padding-left: calc(14px + .5em) !important; }
.form-section { border: 0; padding: 0; margin: 0 0 8px; }
.form-section + .form-section { border-top: 1px solid var(--rule); padding-top: 22px; margin-top: 6px; }
.form-section legend { font-family: var(--display); font-weight: 750; font-stretch: 108%; font-size: 1.05rem; padding: 0; margin-bottom: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-block; padding: 8px 14px; border: 1.5px solid var(--line-2); border-radius: 999px; background: var(--sheet); font-size: .9rem; font-weight: 600; transition: all .15s ease; }
.chip:hover span { border-color: var(--red); }
.chip input:checked + span { background: var(--yellow); border-color: var(--yellow); color: var(--yellow-ink); transform: rotate(-2deg); }
.chip input:focus-visible + span { outline: 3px solid var(--red); outline-offset: 2px; }

/* ---------- Alerts, toast ---------- */
.alert { padding: 13px 16px; font-weight: 550; border: 0; border-left: 5px solid; border-radius: var(--radius-sm); background: var(--sheet); }
.alert-success { border-color: var(--green); }
.alert-error { border-color: var(--red); background: var(--red-soft); }
.alert-info { border-color: var(--yellow); background: var(--yellow-soft); }
.toast {
    position: fixed; bottom: 22px; left: 50%; transform: translate(-50%, 20px) rotate(-2deg); opacity: 0;
    background: var(--ink); color: var(--paper); padding: 11px 18px; border-radius: 12px; font: 600 .9rem var(--body);
    transition: all .2s ease; pointer-events: none; z-index: 50;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0) rotate(-2deg); }
.toast.is-error { background: var(--red); color: var(--red-ink); }

/* ---------- Tags (pills) and avatars ---------- */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; font-size: .78rem; font-weight: 600; line-height: 1.2; white-space: nowrap; vertical-align: middle; border-radius: 8px; background: var(--surface-2); }
.pill .icon { width: 12px; height: 12px; stroke-width: 2.5; }
.pill-green { color: var(--green); background: var(--green-soft); }
.pill-red { color: var(--red); background: var(--red-soft); }
.pill-gold { background: var(--yellow); color: var(--yellow-ink); border-color: var(--yellow); }
.pill-gray { color: var(--muted); }
.avatar {
    --a: var(--green); display: inline-grid; place-items: center; flex: none;
    width: 44px; height: 44px; border-radius: 50%; font: 750 .9rem/1 var(--display); font-stretch: 108%;
    background: var(--a); color: #fff; transition: transform .2s cubic-bezier(.3, 1.6, .5, 1);
}
.avatar-sm { width: 32px; height: 32px; font-size: .7rem; }
.avatar-lg { width: 72px; height: 72px; font-size: 1.5rem; }
.avatar-0 { --a: var(--green); } .avatar-1 { --a: var(--red); } .avatar-2 { --a: var(--yellow); color: var(--yellow-ink); }
.avatar-3 { --a: var(--blue); } .avatar-4 { --a: var(--ink); color: var(--paper); } .avatar-5 { --a: var(--pink); }
.avatar-santa { background: var(--red); color: var(--red-ink); border-radius: 30%; transform: rotate(-8deg); }
.avatar-santa .icon { width: 55%; height: 55%; }

/* ---------- Profile facts: a spec sheet ---------- */
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0 28px; margin: 0; }
.fact { padding: 12px 0 14px; border-top: 1px solid var(--rule); }
.fact-wide { grid-column: 1 / -1; }
.fact dt { font-size: .7rem; color: var(--red); margin-bottom: 5px; }
.fact dd { margin: 0; font-weight: 500; }
.empty { color: var(--muted); padding: 10px 0; }

/* ---------- Wishlist: a numbered catalog ---------- */
.wishes { list-style: none; padding: 0; margin: 0; }
.wish { display: flex; gap: 16px; align-items: flex-start; padding: 16px 0; border-top: 1px solid var(--rule); position: relative; }
.wish:first-child { border-top: 0; padding-top: 4px; }
.wish-num {
    flex: none; width: 46px; font: 850 1.9rem/.9 var(--display); font-stretch: 110%; letter-spacing: -.04em;
    color: transparent; -webkit-text-stroke: 1.5px var(--red); transition: color .2s ease;
}
.wish:hover .wish-num { color: var(--red); }
.wish-main { flex: 1; min-width: 0; }
.wish-title { font-weight: 700; font-stretch: 108%; font-size: 1.08rem; line-height: 1.3; }
.wish-title .pill { margin-left: 6px; vertical-align: 2px; }
.wish-desc { color: var(--muted); margin-top: 4px; font-size: .95rem; }
.wish-meta { display: flex; gap: 16px; margin-top: 6px; font-size: .88rem; color: var(--muted); flex-wrap: wrap; }
.wish-meta a { color: var(--red); font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.wish-action { margin: 0; }
.wishes.is-muted .wish-num { -webkit-text-stroke-color: var(--muted); font-size: 1.6rem; }
.wishes.is-muted .wish-title { font-weight: 600; }
.wish-edit { margin-top: 10px; }
.wish-edit summary { cursor: pointer; color: var(--muted); font-size: .85rem; font-weight: 600; list-style: none; display: inline; }
.wish-edit summary::-webkit-details-marker { display: none; }
.wish-edit summary:hover, .wish-edit[open] summary { color: var(--red); }
.wish-edit form { margin-top: 14px; }
.wish-edit .field { margin-bottom: 12px; }

/* ---------- "I'm getting this": rubber stamps ---------- */
.claim { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.claim-form { margin: 0; }
.wish > .claim { margin-top: 0; align-self: center; }
.claim .pill-gold, .claim .pill-green {
    font-family: var(--mono); font-weight: 400;
    background: transparent; border: 2px solid var(--red); border-radius: 6px; color: var(--red); padding: 5px 9px 4px; font-size: .74rem; text-transform: uppercase;
    transform: rotate(-4deg); box-shadow: inset 0 0 0 1px var(--red);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.7' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1.6 1.25'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.7' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1.6 1.25'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    animation: stamp .35s cubic-bezier(.3, 1.8, .5, 1) both;
}
.claim .pill-green { border-color: var(--green); color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
@keyframes stamp { from { transform: rotate(-4deg) scale(1.6); opacity: 0; } }
.wish.is-claimed .wish-title, .suggestion.is-claimed .suggestion-title { text-decoration: line-through; text-decoration-color: var(--red); text-decoration-thickness: 2px; }
.wish.is-claimed .wish-desc, .suggestion.is-claimed .suggestion-desc { opacity: .6; }
.gate { display: flex; gap: 12px; align-items: center; padding: 12px 14px; margin-bottom: 16px; border-radius: var(--radius-sm); background: var(--yellow-soft); color: var(--ink); font-size: .93rem; }
.gate .icon { width: 18px; height: 18px; flex: none; }

/* ---------- Surprise meter: a ruler ---------- */
.meter-value { font-weight: 700; font-stretch: 105%; margin-bottom: 12px; }
.meter-track { position: relative; height: 10px; border-radius: 999px; background: linear-gradient(90deg, var(--green), var(--yellow), var(--red)); }
.meter-dot { position: absolute; top: 50%; width: 22px; height: 22px; border-radius: 50%; background: var(--sheet); border: 4px solid var(--ink); transform: translate(-50%, -50%); }
.meter-labels { display: flex; justify-content: space-between; font-size: .82rem; color: var(--muted); margin-top: 10px; }

/* ---------- Easy mode ---------- */
.easy-image img { border-radius: var(--radius-sm); max-height: 560px; margin: 0 auto; transform: rotate(-1deg); box-shadow: var(--soft); }
.easy-banner { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--yellow-soft); margin-bottom: 20px; }
.easy-banner .icon { width: 26px; height: 26px; flex: none; }

/* ---------- Family: name tags ---------- */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.person {
    display: flex; flex-direction: column; gap: 14px; padding: 20px; text-decoration: none; color: inherit;
    background: var(--sheet); border: 1px solid var(--line-2); border-radius: var(--radius); box-shadow: var(--soft); position: relative;
    transition: transform .2s ease, box-shadow .2s ease;
}
.person::before { content: ""; position: absolute; top: 14px; right: 14px; width: 10px; height: 10px; border-radius: 50%; box-shadow: inset 0 1px 2px rgba(0,0,0,.25); background: var(--paper); }
.person:hover { color: inherit; transform: translateY(-3px) rotate(-.6deg); box-shadow: 0 18px 36px -20px rgba(23, 32, 28, .45); }
.person:hover .avatar { transform: rotate(-10deg) scale(1.06); }
.person.is-out { opacity: .55; }
.person-top { display: flex; align-items: center; gap: 14px; }
.person-top > div { min-width: 0; }
.person-name { font-weight: 750; font-stretch: 106%; font-size: 1.15rem; line-height: 1.15; overflow-wrap: anywhere; }
.person-sub { color: var(--muted); font-size: .86rem; margin-top: 2px; }
.person-bits { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.person-snip { color: var(--muted); font-size: .92rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Gift ideas: catalog tiles ---------- */
.suggestions:empty { display: none; }
.suggestion-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.suggestion { padding: 16px; border-radius: var(--radius-sm); background: var(--paper); display: flex; flex-direction: column; gap: 6px; }
.suggestion-title { font-weight: 750; font-stretch: 108%; line-height: 1.25; }
.suggestion-desc { color: var(--muted); font-size: .9rem; flex: 1; }
.suggestion-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.suggestion-meta .pill { white-space: normal; text-align: left; }
.suggestion-meta .pill-green { color: var(--red); border-color: var(--red); }
.suggestion-actions { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; align-items: center; }
.suggestion-actions .claim { margin-top: 0; }
.loading { display: flex; align-items: center; gap: 12px; color: var(--muted); padding: 12px 0; }
.spinner { width: 22px; height: 22px; border: 3px solid var(--rule); border-top-color: var(--red); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.shortlist { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.shortlist-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; background: var(--yellow-soft); }

/* ---------- Old Q&A ---------- */
.qa { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.qa-item { padding: 14px 0; border-top: 1px solid var(--rule); display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.qa-q { font-weight: 600; }
.qa-a { padding-left: 12px; border-left: 3px solid var(--red); }
.qa-wait { color: var(--muted); font-size: .88rem; }

/* ---------- Admin ---------- */
.table-wrap { overflow-x: auto; margin: 0 -26px; padding: 0 26px; }
table { width: 100%; border-collapse: collapse; font-size: .94rem; }
th { text-align: left; font-size: .7rem; color: var(--muted); padding: 10px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
td { padding: 11px 10px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td form { margin: 0; display: inline; }
.who { display: flex; align-items: center; gap: 10px; font-weight: 650; }
.who small { display: block; color: var(--muted); font-weight: 400; font-size: .8rem; }
.pairs { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0 20px; }
.pair { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.pair-arrow { color: var(--red); font-family: var(--mono); }
.pair form { margin: 0 0 0 auto; display: flex; gap: 6px; }
.pair select { padding: 6px 8px; font-size: .9rem; width: auto; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.stat { padding: 16px; border-radius: var(--radius-sm); background: var(--sheet); border: 1px solid var(--line-2); }
.stat b { display: block; font: 800 2.1rem/1 var(--display); font-stretch: 110%; letter-spacing: -.03em; }
.stat span { color: var(--muted); font-size: .7rem; display: block; margin-top: 6px; }
.steps { display: flex; gap: 6px; flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: 8px; padding: 7px 13px; border-radius: 10px; background: var(--sheet); border: 1px solid var(--line-2); font-size: .8rem; color: var(--muted); }
.step .icon { width: 14px; height: 14px; stroke-width: 3; }
.step.is-done { color: var(--ink); }
.step.is-now { background: var(--red); border-color: var(--red); color: var(--red-ink); }
.danger-zone { border-color: var(--red); }
.response-select { width: auto !important; padding: 6px 28px 6px 12px !important; font-size: .85rem !important; font-weight: 600; border-radius: 10px !important; }
.response-select.is-in { background: var(--green-soft); color: var(--green); border-color: transparent !important; }
.response-select.is-out { background: var(--red-soft); color: var(--red); border-color: transparent !important; }
.response-select.is-none { color: var(--muted); }
.announce { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; background: var(--yellow); color: var(--yellow-ink); border: 0; }
.announce .muted { color: inherit; opacity: .8; }
.announce-mark { width: 54px; height: 54px; flex: none; display: grid; place-items: center; border-radius: 16px; background: var(--ink); color: var(--yellow); transform: rotate(-8deg); }
.announce-mark .icon { width: 24px; height: 24px; }
.announce-body { flex: 1; min-width: 240px; }
.announce-body h2 { margin-bottom: 6px; }
.announce form { margin: 0; }

/* ---------- Login: the whole page is the red ticket booth ---------- */
body.is-bare { background: var(--red); color: var(--red-ink); }
body.is-bare .footer { color: inherit; border-top-color: color-mix(in srgb, var(--red-ink) 30%, transparent); }
body.is-bare .footer::before, body.is-bare .footer::after { color: inherit; }
.login { max-width: 460px; width: 100%; margin: 4vh auto 0; }
.login-head { text-align: center; margin-bottom: 30px; display: flex; flex-direction: column; align-items: center; }
.login-head h1 { font-size: clamp(2.6rem, 12vw, 5.6rem); white-space: nowrap; }
.login-head p { margin-top: 10px; opacity: .9; }
.login-head .brand-mark { display: none; }
.login .card { padding: 30px; color: var(--ink); border: 0; box-shadow: 0 30px 60px -24px rgba(60, 8, 0, .55); transform: rotate(-1deg); }
.login .center { text-align: center; }
/* ---------- Dialog ---------- */
dialog.welcome { border: 0; border-radius: 22px; padding: 30px; max-width: 540px; width: calc(100% - 32px); background: var(--sheet); color: var(--ink); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .5); }
dialog.welcome::backdrop { background: color-mix(in srgb, var(--ink) 55%, transparent); }
dialog.welcome h2 { margin-bottom: 16px; font-size: 1.6rem; }
dialog.welcome ul { padding-left: 0; list-style: none; display: flex; flex-direction: column; margin: 0 0 24px; counter-reset: step; }
dialog.welcome li { padding: 12px 0 12px 44px; border-top: 1px solid var(--rule); position: relative; counter-increment: step; }
dialog.welcome li::before { content: "0" counter(step); position: absolute; left: 0; top: 10px; font: 850 1.4rem var(--display); font-stretch: 110%; color: transparent; -webkit-text-stroke: 1.2px var(--red); }
dialog.welcome li strong { display: block; }

.saving-dot { font-size: .82rem; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.saving-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.saving-dot.is-saving::before { background: var(--yellow); animation: pulse 1s infinite; }
.saving-dot.is-error::before { background: var(--red); }
@keyframes pulse { 50% { opacity: .3; } }

.empty-mark { width: 76px; height: 76px; margin: 0 auto 18px; display: grid; place-items: center; border-radius: 22px; background: var(--red); color: var(--red-ink); transform: rotate(-8deg); }
.empty-mark .icon { width: 34px; height: 34px; }
.card-head:has(+ .suggestions:empty) { margin-bottom: 0; }

/* ---------- Messages ---------- */
.inbox { display: grid; grid-template-columns: 340px minmax(0, 1fr); background: var(--sheet); border: 1px solid var(--line-2); border-radius: 22px; box-shadow: var(--soft); height: calc(100vh - 150px); min-height: 520px; overflow: hidden; }
.inbox-list { border-right: 1px solid var(--line-2); display: flex; flex-direction: column; min-height: 0; background: var(--paper); }
.inbox-head { padding: 22px 18px 14px; }
.inbox-head h1 { font-size: 2rem; }
.new-message { padding: 0 16px 14px; border-bottom: 1px solid var(--rule); }
.new-message > summary { list-style: none; }
.new-message > summary::-webkit-details-marker { display: none; }
.new-message[open] > summary { margin-bottom: 12px; }
.new-message-body { display: flex; flex-direction: column; gap: 16px; background: var(--sheet); padding: 14px; border-radius: 14px; border: 1px solid var(--line-2); }
.new-message-form label { font-weight: 700; font-size: .9rem; }
.new-message-form .hint { font-size: .82rem; margin: 2px 0 8px; }
.new-message-form .inline-form > * { min-width: 0; }
.threads { list-style: none; margin: 0; padding: 8px 0; overflow-y: auto; flex: 1; }
.thread { display: flex; gap: 12px; align-items: flex-start; padding: 12px; margin: 2px 8px; border-radius: 14px; text-decoration: none; color: var(--ink); position: relative; }
.thread:hover { background: var(--sheet); color: var(--ink); }
.thread.is-active { background: var(--sheet); box-shadow: var(--soft); }
.thread-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.thread-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.thread-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-when { color: var(--muted); font-size: .68rem; flex: none; }
.thread-sub { color: var(--red); font-size: .8rem; font-weight: 600; margin-top: 1px; }
.thread-preview { color: var(--muted); font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 3px; }
.thread.is-unread { padding-right: 32px; }
.thread.is-unread .thread-preview { color: var(--ink); font-weight: 650; }
.unread-dot { position: absolute; right: 14px; top: 50%; margin-top: -5px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
.convo { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.convo-empty { margin: auto; text-align: center; max-width: 400px; padding: 24px; }
.convo-empty h2 { margin-bottom: 10px; font-size: 1.6rem; }
.convo-head { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.convo-who { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.25; }
.convo-who strong { font-weight: 800; font-stretch: 112%; font-size: 1.05rem; }

.convo-back { display: none; font-size: 1.3rem; padding: 0 4px; }
.convo-body { flex: 1; overflow-y: auto; padding: 22px; display: flex; flex-direction: column; gap: 4px; }
.convo-note { align-self: center; text-align: center; max-width: 440px; font-size: .84rem; color: var(--muted); padding: 7px 14px; border-radius: 12px; background: var(--surface-2); margin-bottom: 16px; }
.bubble-row { display: flex; flex-direction: column; max-width: min(76%, 560px); }
.bubble-row.is-end { margin-bottom: 12px; }
.bubble-row.is-mine { align-self: flex-end; align-items: flex-end; }
.bubble-row.is-theirs { align-self: flex-start; align-items: flex-start; }
.bubble { padding: 10px 15px; overflow-wrap: anywhere; line-height: 1.45; border-radius: 20px; }
.is-mine .bubble { background: var(--red); color: var(--red-ink); }
.is-theirs .bubble { background: var(--surface-2); }
.is-end.is-mine .bubble { border-bottom-right-radius: 6px; }
.is-end.is-theirs .bubble { border-bottom-left-radius: 6px; }
.bubble-row.is-new .bubble { animation: pop .25s ease-out; }
@keyframes pop { from { transform: scale(.9); opacity: 0; } }
.bubble-time { font-size: .66rem; color: var(--muted); margin-top: 6px; }
.composer { padding: 12px 16px 16px; border-top: 1px solid var(--line-2); }
.composer-row { display: flex; gap: 8px; align-items: flex-end; background: var(--paper); border: 1.5px solid var(--line-2); border-radius: 26px; padding: 5px 5px 5px 16px; }
.composer-row:focus-within { border-color: var(--red); box-shadow: 0 0 0 4px color-mix(in srgb, var(--red) 14%, transparent); }
.composer textarea { flex: 1; border: 0 !important; background: transparent !important; box-shadow: none !important; border-radius: 0; resize: none; padding: 9px 0 !important; min-height: 24px; max-height: 160px; outline: none; font: inherit; color: inherit; }
.composer-send { width: 42px; height: 42px; padding: 0; flex: none; border: 0; border-radius: 50%; background: var(--red); color: var(--red-ink); }
.composer-send:hover { color: var(--red-ink); box-shadow: none; transform: scale(1.06) rotate(-8deg); }
.composer-send .icon { width: 18px; height: 18px; }
.starters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.starter { font: inherit; font-size: .86rem; font-weight: 600; padding: 7px 13px; border: 1.5px dashed var(--line-2); border-radius: 999px; background: transparent; color: var(--ink); cursor: pointer; }
.starter:hover { border-style: solid; border-color: var(--yellow); background: var(--yellow); color: var(--yellow-ink); }
.message-card-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 16px; }
.message-card-head .avatar { width: 46px; height: 46px; }
.message-card-head h2 { margin-bottom: 4px; }
.message-card-last { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; margin-bottom: 12px; border-radius: 12px; background: var(--paper); text-decoration: none; color: var(--muted); font-size: .9rem; }
.message-card-last span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.message-card-last.is-unread { color: var(--ink); font-weight: 650; background: var(--red-soft); }
.message-card-last.is-unread .link-muted { color: var(--red); }
.composer-compact { padding: 0; border: 0; }
@media (max-width: 760px) {
    .inbox { grid-template-columns: 1fr; height: calc(100vh - 150px); }
    .inbox.has-open .inbox-list { display: none; }
    .inbox:not(.has-open) .convo { display: none; }
    .inbox-list { border-right: 0; }
    .convo-back { display: inline; }
    .convo-head { padding: 12px 14px; }
    .convo-head .pill { display: none; }
    .bubble-row { max-width: 86%; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
