:root {
  --bg: hsl(210 40% 98%); --card: #fff; --ink: hsl(210 17% 15%); --muted: hsl(215.4 16.3% 46.9%);
  --line: hsl(214.3 31.8% 91.4%); --soft: hsl(210 40% 96.1%);
  --primary: hsl(256 64% 57%); --primary-2: hsl(256 64% 67%); --primary-soft: hsl(256 64% 96%);
  --ok: hsl(152 60% 36%); --ok-soft: hsl(152 60% 94%); --warn: hsl(36 90% 38%); --warn-soft: hsl(40 95% 92%);
  --red: hsl(0 72% 51%); --red-soft: hsl(0 80% 96%);
  --radius: .75rem;
  --shadow: 0 4px 20px -2px hsl(256 64% 57% / .1);
  --shadow-hover: 0 8px 30px -4px hsl(256 64% 57% / .2);
  --hero: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  --heading: "Josefin Sans", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: hsl(210 17% 10%); --card: hsl(210 17% 12%); --ink: hsl(0 0% 98%); --muted: hsl(215 20.2% 65.1%);
    --line: hsl(210 17% 20%); --soft: hsl(210 17% 16%); --primary-soft: hsl(256 30% 20%);
    --ok-soft: hsl(152 40% 16%); --warn-soft: hsl(36 40% 16%); --red-soft: hsl(0 40% 16%);
    --shadow: 0 4px 20px -2px hsl(0 0% 0% / .3); --shadow-hover: 0 8px 30px -4px hsl(0 0% 0% / .4);
    --hero: linear-gradient(135deg, var(--primary) 0%, hsl(256 64% 47%) 100%);
  }
}
/* Party themes only tint the hero */
.theme-dino    { --hero: linear-gradient(135deg, hsl(140 45% 40%), hsl(90 50% 50%)); }
.theme-space   { --hero: linear-gradient(135deg, hsl(234 60% 35%), hsl(256 64% 57%)); }
.theme-unicorn { --hero: linear-gradient(135deg, hsl(290 60% 60%), hsl(330 80% 70%)); }
.theme-ocean   { --hero: linear-gradient(135deg, hsl(200 75% 40%), hsl(185 65% 50%)); }

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 18px/1.55 "Josefin Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
h1, h2, h3, legend, .logo, .stat b { font-family: var(--heading); letter-spacing: -.01em; }
h2 { font-size: 24px; font-weight: 600; }
a { color: var(--primary); }
.wrap { max-width: 680px; margin: 0 auto; padding: 0 16px 48px; }

.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--card) 85%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-in { max-width: 680px; margin: 0 auto; padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; }
.logo { font-weight: 700; font-size: 26px; text-decoration: none; color: var(--primary); display: flex; gap: 6px; align-items: center; }
.lang { font-weight: 600; font-size: 15px; text-decoration: none; color: var(--ink); border: 1px solid var(--line); border-radius: 99px; padding: 4px 12px; }
.lang:hover { border-color: var(--primary); color: var(--primary); }
.foot { text-align: center; color: var(--muted); font-size: 15px; padding: 24px 16px; border-top: 1px solid var(--line); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: calc(var(--radius) * 1.5); padding: 24px; margin: 20px 0; box-shadow: var(--shadow); }
.card h1, .card h2 { margin-top: 0; }
.center { text-align: center; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 16px; }
.error { color: var(--red); background: var(--red-soft); padding: 10px 14px; border-radius: var(--radius); font-weight: 600; }
.ok { color: var(--ok); font-weight: 600; }
.notice { border-color: var(--primary); background: var(--primary-soft); }
.danger { border-color: var(--red-soft); }
.danger h2 { color: var(--red); }

/* Landing hero */
.hero { background: var(--hero); color: #fff; border-radius: calc(var(--radius) * 2); padding: 44px 24px 36px; margin-top: 20px; text-align: center; box-shadow: var(--shadow-hover); }
.hero h1 { font-size: clamp(34px, 7vw, 48px); font-weight: 700; margin: 0; line-height: 1.1; }
.lead { font-size: 20px; margin: 10px auto 24px; max-width: 460px; opacity: .95; }
.steps { list-style: none; padding: 0; margin: 0 auto; max-width: 480px; text-align: left; display: grid; gap: 8px; }
.steps li { background: hsl(0 0% 100% / .16); border: 1px solid hsl(0 0% 100% / .25); border-radius: var(--radius); padding: 10px 14px; font-size: 17px; }

/* Forms */
fieldset { border: 0; padding: 0; margin: 0 0 26px; }
legend { font-weight: 600; font-size: 20px; margin-bottom: 10px; padding: 0; }
label { display: block; font-size: 16px; font-weight: 500; margin: 0 0 14px; flex: 1; min-width: 0; }
label.narrow { flex: 0 0 130px; }
input, select, textarea { display: block; width: 100%; margin-top: 6px; font: inherit; font-size: 17px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--ink); transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px hsl(256 64% 57% / .18); }
.row { display: flex; gap: 12px; }
@media (max-width: 520px) { .row { flex-wrap: wrap; } label.narrow { flex: 1 1 110px; } }
label.check { display: flex; gap: 8px; align-items: center; font-weight: 400; }
label.check input { width: auto; margin: 0; accent-color: var(--primary); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid transparent; cursor: pointer; font: inherit; font-size: 17px; font-weight: 600; text-decoration: none; background: var(--primary); color: #fff; padding: 10px 18px; border-radius: var(--radius); list-style: none; transition: transform .15s, box-shadow .15s, background .15s; }
.btn:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.btn::-webkit-details-marker { display: none; }
.btn.ghost { background: var(--card); color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn.big { width: 100%; padding: 14px; font-size: 19px; background: var(--hero); }
.btn.red { background: var(--red); }
.link { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; font-size: 16px; padding: 0 4px; }
.link:hover { color: var(--primary); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
form.inline { display: inline; }
form.right { display: block; text-align: right; }
summary { cursor: pointer; }
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }
.inline-h { display: inline; }

.gift-row { border: 1px dashed var(--line); background: var(--soft); border-radius: var(--radius); padding: 14px 14px 6px; margin-bottom: 12px; }
.gift-row .rm { margin-bottom: 8px; }

.copy { display: flex; gap: 8px; }
.copy input { margin: 0; background: var(--soft); }

/* Dashboard */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 20px 0; }
@media (max-width: 520px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; text-align: center; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 26px; font-weight: 600; color: var(--primary); }
.stat span { font-size: 15px; color: var(--muted); }

.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list.small li { padding: 8px 0; font-size: 16px; }
.list li.done { opacity: .6; }
.allergy { font-size: 16px; color: var(--red); margin-top: 2px; }
.badge { display: inline-block; font-size: 14px; font-weight: 600; padding: 2px 10px; border-radius: 99px; background: var(--soft); margin-right: 6px; }
.s-yes { background: var(--ok-soft); color: var(--ok); }
.s-maybe { background: var(--warn-soft); color: var(--warn); }
.s-no { background: var(--red-soft); color: var(--red); }
.chip { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 99px; font-size: 14px; padding: 3px 10px; cursor: pointer; }
.chip:hover { border-color: var(--primary); }
.chip.on { background: var(--ok-soft); border-color: transparent; color: var(--ok); }

/* Gifts */
.gift { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 12px 0; transition: box-shadow .15s, border-color .15s; }
.gift:hover { box-shadow: var(--shadow-hover); border-color: hsl(256 64% 57% / .35); }
.gift-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.gift-head a { color: var(--ink); text-decoration: none; }
.gift-head a:hover { color: var(--primary); }
.price { font-family: var(--heading); font-weight: 600; font-size: 20px; color: var(--primary); white-space: nowrap; }
.bar { height: 10px; background: var(--soft); border-radius: 99px; overflow: hidden; margin: 12px 0 6px; }
.bar i { display: block; height: 100%; background: var(--hero); border-radius: 99px; transition: width .4s; }
.gift .muted { font-size: 16px; margin: 4px 0 12px; }
.pledge { margin-top: 14px; }
.amounts, .seg { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.amounts label, .seg label { flex: 1; margin: 0; }
.amounts input, .seg input { position: absolute; opacity: 0; width: 0; }
.amounts span, .seg span { display: block; text-align: center; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 6px; cursor: pointer; font-weight: 600; transition: all .15s; }
.amounts span:hover, .seg span:hover { border-color: var(--primary); }
.amounts input:checked + span, .seg input:checked + span { border-color: var(--primary); background: var(--primary); color: #fff; }
.amounts input:focus-visible + span, .seg input:focus-visible + span { box-shadow: 0 0 0 3px hsl(256 64% 57% / .25); }
.claim { display: flex; gap: 8px; }
.claim input { margin: 0; }
.claim .btn { white-space: nowrap; }

/* Invitation */
.invite { text-align: center; padding: 0; overflow: hidden; }
.invite-hero { background: var(--hero); color: #fff; padding: 32px 24px 28px; }
.invite-body { padding: 8px 24px 24px; }
.deco { font-size: 40px; letter-spacing: 8px; }
.kicker { text-transform: uppercase; letter-spacing: .12em; font-size: 15px; font-weight: 600; margin: 8px 0 0; opacity: .9; }
.invite h1 { font-size: clamp(32px, 7vw, 44px); font-weight: 700; margin: 4px 0 0; line-height: 1.1; }
.age { display: inline-block; margin-top: 10px; font-size: 17px; font-weight: 600; background: hsl(0 0% 100% / .2); border-radius: 99px; padding: 3px 14px; }
.message { font-size: 19px; }
.details { display: grid; grid-template-columns: 36px 1fr; gap: 12px; text-align: left; max-width: 420px; margin: 20px auto; }
.details dt { width: 36px; height: 36px; display: grid; place-items: center; background: var(--primary-soft); border-radius: var(--radius); }
.details dd { margin: 0; align-self: center; }
.invite .actions { justify-content: center; }

.mine { border-color: var(--primary); }
.pay { padding: 12px 0; border-bottom: 1px solid var(--line); }
.pay:last-child { border-bottom: 0; }
.pay.flash { animation: flash 2s; }
@keyframes flash { from { background: var(--primary-soft); } }
.paydl { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; background: var(--soft); padding: 14px; border-radius: var(--radius); font-size: 16px; }
.paydl dt { color: var(--muted); }
.paydl dd { margin: 0; display: flex; justify-content: space-between; gap: 8px; font-weight: 600; word-break: break-word; }

/* Nav */
.nav { display: flex; align-items: center; gap: 14px; font-size: 16px; font-weight: 500; }
.nav a:not(.btn) { color: var(--ink); text-decoration: none; }
.nav a:not(.btn):hover { color: var(--primary); }
.btn.sm { padding: 6px 12px; font-size: 15px; }
@media (max-width: 560px) { .nav { gap: 10px; } .nav .btn.sm { display: none; } }

.top-in { max-width: 1080px; }

/* Auth */
.narrow-wrap { max-width: 440px; }
.auth { margin-top: 40px; }
.auth h1 { font-size: 30px; margin-bottom: 4px; }

/* My parties */
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 30px; }
.page-head p { margin: 2px 0 0; }
.party-card { display: flex; align-items: center; gap: 16px; text-decoration: none; color: var(--ink); padding: 0; overflow: hidden; transition: box-shadow .15s, transform .15s; }
.party-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.party-card.past { opacity: .6; }
.party-stripe { align-self: stretch; width: 8px; background: var(--hero); flex: none; }
.party-info { flex: 1; padding: 16px 0; display: flex; flex-direction: column; min-width: 0; }
.party-info strong { font-family: var(--heading); font-size: 20px; }
.party-info .muted { font-size: 16px; }
.party-nums { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px 16px 0; font-size: 16px; font-weight: 600; text-align: right; white-space: nowrap; }
.empty .deco { font-size: 50px; }

/* Landing */
.wrap.wide { max-width: 1080px; }
.land-hero { background: var(--hero); color: #fff; }
.land-in { max-width: 1080px; margin: 0 auto; padding: 64px 16px; display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 860px) { .land-in { grid-template-columns: 1fr; padding: 40px 16px; } .mock { max-width: 380px; margin: 0 auto; } }
.pill { display: inline-block; background: hsl(0 0% 100% / .18); border: 1px solid hsl(0 0% 100% / .3); border-radius: 99px; padding: 4px 14px; font-size: 16px; font-weight: 600; margin: 0 0 16px; }
.land-copy h1 { font-size: clamp(34px, 5.5vw, 54px); line-height: 1.08; margin: 0 0 16px; font-weight: 700; }
.land-copy .lead { margin: 0 0 26px; max-width: 520px; font-size: 21px; }
.hero-note { font-size: 16px; opacity: .9; margin: 14px 0 0; }
.btn.white { background: #fff; color: hsl(256 64% 45%); }
.btn.outline-white { background: transparent; color: #fff; border-color: hsl(0 0% 100% / .6); }
.btn.outline-white:hover { background: hsl(0 0% 100% / .12); }

.mock { background: var(--card); color: var(--ink); border-radius: calc(var(--radius) * 2); overflow: hidden; box-shadow: 0 30px 60px -20px hsl(256 64% 20% / .5); transform: rotate(1.5deg); }
.mock-hero { background: linear-gradient(135deg, hsl(330 85% 65%), hsl(30 95% 62%)); color: #fff; text-align: center; padding: 22px 16px 18px; }
.mock-hero div { font-size: 28px; letter-spacing: 6px; }
.mock-hero small { display: block; text-transform: uppercase; letter-spacing: .12em; font-size: 13px; font-weight: 600; margin-top: 4px; }
.mock-hero b { display: block; font-family: var(--heading); font-size: 36px; line-height: 1.1; }
.mock-hero .age { font-size: 14px; margin-top: 6px; }
.mock-body { padding: 16px; display: grid; gap: 10px; }
.mock-row { display: flex; gap: 10px; align-items: center; font-size: 16px; font-weight: 600; }
.mock-row i { font-style: normal; width: 30px; height: 30px; display: grid; place-items: center; background: var(--primary-soft); border-radius: var(--radius); }
.mock-gift { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.mock-gift .bar { margin: 8px 0 4px; }
.mock-seg { margin: 0; }
.mock-seg span { flex: 1; text-align: center; border: 1px solid var(--line); border-radius: var(--radius); padding: 7px 4px; font-size: 15px; font-weight: 600; }
.mock-seg span.on { background: var(--primary); border-color: var(--primary); color: #fff; }

.problem { max-width: 680px; margin: 64px auto 0; text-align: center; }
.problem h2, #features h2, .how h2, .faq h2 { font-size: clamp(26px, 4vw, 34px); margin: 0 0 12px; }
.problem p { font-size: 20px; }
#features { margin-top: 64px; }
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 28px; }
@media (max-width: 900px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .features { grid-template-columns: 1fr; } }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: calc(var(--radius) * 1.5); padding: 20px; box-shadow: var(--shadow); transition: box-shadow .15s, transform .15s; }
.feature:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.f-icon { width: 46px; height: 46px; display: grid; place-items: center; font-size: 24px; background: var(--primary-soft); border-radius: var(--radius); }
.feature h3 { font-size: 19px; margin: 14px 0 6px; font-weight: 600; }
.feature p { margin: 0; font-size: 16px; }

.how { margin-top: 72px; }
.how-steps { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 900px) { .how-steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .how-steps { grid-template-columns: 1fr; } }
.how-steps li { display: flex; gap: 14px; }
.num { flex: none; width: 36px; height: 36px; border-radius: 99px; display: grid; place-items: center; background: var(--hero); color: #fff; font-family: var(--heading); font-weight: 700; }
.how-steps h3 { margin: 4px 0 4px; font-size: 19px; font-weight: 600; }
.how-steps p { margin: 0; font-size: 16px; }

.faq { max-width: 720px; margin: 72px auto 0; }
.faq details.card { margin: 10px 0; padding: 16px 20px; }
.faq summary { font-weight: 600; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: "+"; color: var(--primary); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 10px 0 0; }

.cta-band { background: var(--hero); color: #fff; border-radius: calc(var(--radius) * 2); text-align: center; padding: 48px 24px; margin: 72px 0 16px; box-shadow: var(--shadow-hover); }
.cta-band h2 { font-size: clamp(26px, 4vw, 34px); margin: 0 0 8px; }
.cta-band p { margin: 0 0 22px; opacity: .95; }

/* Date picker (shadcn style) */
.dp { position: relative; margin-top: 6px; }
.dp-trigger { width: 100%; display: flex; align-items: center; gap: 8px; font: inherit; font-size: 17px; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--ink); cursor: pointer; font-weight: 400; transition: border-color .15s, box-shadow .15s; }
.dp-trigger:hover { background: var(--soft); }
.dp-trigger:focus-visible, .dp-trigger[aria-expanded="true"] { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px hsl(256 64% 57% / .18); }
.dp-trigger svg { color: var(--muted); flex: none; }
.dp-ph { color: var(--muted); }
.dp-trigger.dp-err { border-color: var(--red); }
.dp-pop { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; width: 280px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 38px -10px hsl(210 17% 15% / .25), 0 10px 20px -15px hsl(210 17% 15% / .2); padding: 12px; animation: dp-in .12s ease-out; }
@keyframes dp-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.dp-head strong { font-size: 16px; font-weight: 600; }
.dp-nav { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: calc(var(--radius) * .6); cursor: pointer; padding: 0; }
.dp-nav:hover { background: var(--soft); }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dp-wd span { text-align: center; font-size: 14px; color: var(--muted); padding: 4px 0; text-transform: capitalize; }
.dp-grid button { height: 34px; border: 0; background: none; color: var(--ink); font: inherit; font-size: 16px; border-radius: calc(var(--radius) * .6); cursor: pointer; padding: 0; }
.dp-grid button:hover { background: var(--soft); }
.dp-grid button.today { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.dp-grid button.past { color: var(--muted); opacity: .6; }
.dp-grid button.sel { background: var(--primary); color: #fff; font-weight: 600; opacity: 1; }
input[type=time] { font-variant-numeric: tabular-nums; }
input[type=time]::-webkit-calendar-picker-indicator { opacity: .5; cursor: pointer; }
.row-3 label { flex: 1 1 0; }
.row-3 .dp-label { flex: 2 1 0; }
@media (max-width: 520px) { .row-3 .dp-label { flex: 1 1 100%; } }
.label { display: block; font-size: 16px; font-weight: 500; margin: 0 0 14px; min-width: 0; }
/* Time picker */
.tp { position: relative; margin-top: 6px; }
.tp-pop { width: 150px; padding: 8px; }
.tp-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.tp-col { max-height: 216px; overflow-y: auto; display: grid; gap: 2px; scrollbar-width: thin; }
.tp-col button { height: 32px; border: 0; background: none; color: var(--ink); font: inherit; font-size: 16px; font-variant-numeric: tabular-nums; border-radius: calc(var(--radius) * .6); cursor: pointer; }
.tp-col button:hover { background: var(--soft); }
.tp-col button.sel { background: var(--primary); color: #fff; font-weight: 600; }
.tp-clear { width: 100%; margin-top: 6px; border: 0; border-top: 1px solid var(--line); background: none; color: var(--muted); font: inherit; font-size: 15px; padding: 8px 0 2px; cursor: pointer; }
.tp-clear:hover { color: var(--primary); }
@media (max-width: 520px) { .tp .dp-pop { right: 0; left: auto; } }
.row-3 > .label { flex: 1 1 0; }
.row-3 > .dp-label { flex: 1.6 1 0; }
.dp-trigger span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Gift photos */
.photo-pick { margin: 0 0 10px; }
.photo-box { display: flex; align-items: center; justify-content: center; height: 110px; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--card); color: var(--muted); font-weight: 500; overflow: hidden; cursor: pointer; transition: border-color .15s; }
.photo-box:hover { border-color: var(--primary); color: var(--primary); }
.photo-box img { width: 100%; height: 100%; object-fit: contain; }
.photo-input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.gift.has-photo { display: flex; gap: 14px; align-items: flex-start; }
.gift-main { flex: 1; min-width: 0; }
.photo-edit { flex: none; width: 96px; text-align: center; }
.gift-photo { display: grid; place-items: center; width: 96px; height: 96px; margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--soft); cursor: pointer; border: 1px solid var(--line); position: relative; }
.gift-photo.empty { border-style: dashed; color: var(--muted); font-size: 13px; line-height: 1.3; }
.gift-photo:hover { border-color: var(--primary); }
.gift-photo img { width: 100%; height: 100%; object-fit: cover; }
.gift-photo.loading { opacity: .5; }
.photo-edit .link { font-size: 12px; margin-top: 4px; }
.gift-img { display: block; margin: -16px -16px 14px; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; background: var(--soft); }
.gift-img img { display: block; width: 100%; max-height: 260px; object-fit: contain; }

/* Lightbox */
html.lb-open { overflow: hidden; }
.lb { border: 0; padding: 0; margin: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; background: transparent; color: #fff; }
.lb::backdrop { background: hsl(256 30% 8% / .88); backdrop-filter: blur(6px); }
.lb[open] { display: flex; align-items: center; justify-content: center; animation: lb-fade .18s ease-out; }
@keyframes lb-fade { from { opacity: 0; } }
.lb figure { margin: 0; flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 64px 16px 24px; min-width: 0; }
.lb img { max-width: 100%; max-height: calc(100dvh - 150px); object-fit: contain; border-radius: var(--radius); box-shadow: 0 30px 60px -20px rgb(0 0 0 / .6); background: #fff; opacity: 0; transform: scale(.97); transition: opacity .2s, transform .2s; }
.lb img.in { opacity: 1; transform: none; }
.lb figcaption { margin-top: 16px; text-align: center; display: flex; flex-direction: column; gap: 2px; }
.lb figcaption strong { font-family: var(--heading); font-size: 22px; font-weight: 600; }
.lb figcaption span { font-size: 15px; opacity: .7; }
.lb-btn { flex: none; width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid hsl(0 0% 100% / .2); border-radius: 99px; background: hsl(0 0% 100% / .1); color: #fff; cursor: pointer; transition: background .15s; }
.lb-btn:hover { background: var(--primary); border-color: var(--primary); }
.lb-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.lb-prev { margin-left: 16px; }
.lb-next { margin-right: 16px; }
.lb-close { position: absolute; top: 16px; right: 16px; }
.lb.single .lb-prev, .lb.single .lb-next { visibility: hidden; }
@media (max-width: 600px) {
  .lb-prev, .lb-next { position: absolute; bottom: 24px; margin: 0; }
  .lb-prev { left: calc(50% - 60px); }
  .lb-next { right: calc(50% - 60px); }
  .lb figure { padding-bottom: 90px; }
}
.gift-img { cursor: zoom-in; }

/* Admin */
.admin .page-head h1 { font-size: 32px; }
.crumbs { margin: 0 0 4px; font-size: 15px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.adm-tools { position: sticky; top: 58px; z-index: 5; display: flex; gap: 16px; align-items: center; background: var(--bg); padding: 12px 0; margin-top: 12px; }
.adm-tools input[type=search] { margin: 0; flex: 1; }
.adm-tools label.check { margin: 0; flex: none; white-space: nowrap; }
.adm-group h2 { margin-bottom: 4px; }
.adm-row { padding: 14px 0; border-bottom: 1px solid var(--line); }
.adm-row:last-child { border-bottom: 0; }
.adm-row.changed .adm-key { color: var(--warn); }
.adm-row.dirty { background: var(--primary-soft); margin: 0 -24px; padding: 14px 24px; }
.adm-key { font-size: 13px; color: var(--muted); }
.adm-langs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 6px; }
@media (max-width: 700px) { .adm-langs { grid-template-columns: 1fr; } }
.adm-lang { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.adm-field textarea { resize: vertical; margin-top: 4px; font-size: 16px; line-height: 1.4; }
.adm-field .hint { font-size: 13px; }
.adm-save { position: sticky; bottom: 0; display: flex; justify-content: flex-end; align-items: center; gap: 16px; padding: 14px 0; background: linear-gradient(transparent, var(--bg) 30%); }
.table-wrap { overflow-x: auto; }
.adm-table { width: 100%; border-collapse: collapse; font-size: 16px; }
.adm-table th { text-align: left; font-weight: 600; font-size: 14px; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.adm-table td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.adm-table tr:last-child td { border-bottom: 0; }
.adm-table .right { text-align: right; }
.danger-link:hover { color: var(--red); }
.f-icon img { width: 30px; height: 30px; object-fit: contain; }
.logo img { display: block; height: 52px; width: auto; }
@media (max-width: 560px) { .logo img { height: 42px; } }

/* Parent's own invitation design */
.invite-design { display: block; background: var(--soft); cursor: zoom-in; }
.invite-design img { display: block; width: 100%; max-height: 80vh; object-fit: contain; }
.invite-design + .invite-body { padding-top: 16px; }
.design-pick .photo-box { height: 180px; }

/* Footer */
.foot { display: grid; gap: 8px; }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; }
.foot-links a, .foot-links .link { color: var(--muted); text-decoration: none; font-size: 15px; padding: 0; }
.foot-links a:hover, .foot-links .link:hover { color: var(--primary); }
@media (max-width: 560px) { .nav .hide-sm { display: none; } }

/* Cookie banner */
.cookie-bar { position: fixed; z-index: 50; left: 16px; right: 16px; bottom: 16px; max-width: 760px; margin: 0 auto; display: flex; gap: 18px; align-items: center; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: calc(var(--radius) * 1.5); padding: 16px 20px; box-shadow: 0 20px 50px -12px hsl(256 40% 20% / .35); animation: ck-up .25s ease-out; }
.cookie-bar[hidden] { display: none; }
@keyframes ck-up { from { opacity: 0; transform: translateY(16px); } }
.cookie-text p { margin: 2px 0 0; font-size: 15px; color: var(--muted); }
.cookie-actions { display: flex; gap: 8px; flex: none; }
@media (max-width: 640px) { .cookie-bar { flex-direction: column; align-items: stretch; } .cookie-actions .btn { flex: 1; } }

/* Legal and contact */
.legal article h2 { font-size: 22px; margin: 28px 0 8px; }
.legal article p, .legal article li { color: var(--ink); }
.legal article ul { padding-left: 20px; }
.legal code { font-size: 14px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Admin messages */
.msg.read { opacity: .65; }
.msg-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: baseline; }
.msg-head strong { margin-right: 8px; }
.msg-body { white-space: normal; background: var(--soft); border-radius: var(--radius); padding: 14px; margin: 12px 0; }
.count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: var(--red); color: #fff; font-size: 13px; }

/* Minecraft-style theme: grass block on top, dirt below, pixel font */
.theme-minecraft {
  --hero:
    linear-gradient(180deg, transparent 0 calc(100% - 0px), transparent),
    repeating-conic-gradient(hsl(28 38% 32%) 0 25%, hsl(28 36% 38%) 0 50%) 0 0 / 24px 24px;
  --primary: hsl(110 45% 36%); --primary-2: hsl(100 50% 45%); --primary-soft: hsl(100 40% 92%);
}
.theme-minecraft .invite-hero {
  position: relative;
  background:
    linear-gradient(180deg, hsl(100 55% 42%) 0 28px, hsl(100 50% 34%) 28px 36px, transparent 36px),
    repeating-conic-gradient(hsl(28 38% 30%) 0 25%, hsl(28 36% 37%) 0 50%) 0 36px / 24px 24px,
    hsl(28 36% 34%);
  padding-top: 52px;
  text-shadow: 3px 3px 0 hsl(0 0% 0% / .45);
  image-rendering: pixelated;
}
.theme-minecraft .invite-hero::before {
  content: ""; position: absolute; left: 0; right: 0; top: 28px; height: 8px;
  background: repeating-linear-gradient(90deg, hsl(100 55% 42%) 0 12px, transparent 12px 24px);
}
.theme-minecraft .invite-hero h1, .theme-minecraft .invite-hero .kicker {
  font-family: "Pixelify Sans", var(--heading); letter-spacing: .02em;
}
.theme-minecraft .invite-hero h1 { font-weight: 700; }
.theme-minecraft .invite-hero .age { background: hsl(0 0% 0% / .3); border-radius: 0; font-family: "Pixelify Sans", var(--heading); text-shadow: none; }
.theme-minecraft .invite, .theme-minecraft .btn, .theme-minecraft .gift, .theme-minecraft .bar, .theme-minecraft .bar i,
.theme-minecraft .seg span, .theme-minecraft .amounts span { border-radius: 2px; }
.theme-minecraft .bar i { background: repeating-linear-gradient(90deg, hsl(100 55% 42%) 0 10px, hsl(100 50% 34%) 10px 20px); }
.theme-minecraft .btn:not(.ghost) { background: hsl(110 45% 36%); box-shadow: inset -3px -3px 0 hsl(110 45% 24%), inset 3px 3px 0 hsl(100 50% 52%); }
.theme-minecraft .details dt { border-radius: 2px; }
.party-card.theme-minecraft .party-stripe { background: linear-gradient(180deg, hsl(100 55% 42%) 0 30%, hsl(28 36% 34%) 30%); }

/* Pokémon-style theme: red and white ball halves with a black band and centre button */
.theme-pokemon { --primary: hsl(354 78% 50%); --primary-2: hsl(48 100% 52%); --primary-soft: hsl(48 100% 92%);
  --hero: linear-gradient(180deg, hsl(354 78% 52%) 0 50%, #fff 50%); }
.theme-pokemon .invite-hero {
  position: relative; overflow: hidden; color: hsl(220 60% 25%);
  background: hsl(354 78% 52%);
  padding-bottom: 96px;
}
/* white lower half with the black band, then the centre button */
.theme-pokemon .invite-hero::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 40px;
  background: hsl(0 0% 98%); border-top: 12px solid hsl(220 20% 12%);
}
.theme-pokemon .invite-hero::after {
  content: ""; position: absolute; left: 50%; bottom: 14px; width: 36px; height: 36px; transform: translateX(-50%);
  background: #fff; border: 9px solid hsl(220 20% 12%); border-radius: 50%;
}
.theme-pokemon .invite-hero .deco, .theme-pokemon .invite-hero .kicker { color: #fff; text-shadow: 0 2px 0 hsl(354 70% 35%); }
.theme-pokemon .invite-hero h1 {
  color: hsl(48 100% 52%); font-weight: 700; letter-spacing: .02em;
  -webkit-text-stroke: 2px hsl(220 65% 32%); paint-order: stroke fill;
  text-shadow: 3px 4px 0 hsl(220 65% 32%);
}
.theme-pokemon .invite-hero .age { background: hsl(220 65% 32%); color: #fff; -webkit-text-stroke: 0; text-shadow: none; }
.theme-pokemon .btn:not(.ghost) { background: hsl(354 78% 50%); }
.theme-pokemon .bar i { background: linear-gradient(90deg, hsl(48 100% 52%), hsl(38 100% 50%)); }
.theme-pokemon .details dt { background: hsl(48 100% 92%); }

/* Roblox-style theme: dark grey, tilted blocks, bold techy type */
.theme-roblox { --primary: hsl(0 0% 12%); --primary-2: hsl(0 0% 30%); --primary-soft: hsl(0 0% 93%);
  --hero: linear-gradient(135deg, hsl(0 0% 14%), hsl(0 0% 26%)); }
.theme-roblox .invite-hero {
  position: relative; overflow: hidden;
  background:
    linear-gradient(15deg, transparent 0 70%, hsl(0 0% 100% / .05) 70% 80%, transparent 80%),
    linear-gradient(-12deg, transparent 0 20%, hsl(0 0% 100% / .06) 20% 34%, transparent 34%),
    linear-gradient(135deg, hsl(0 0% 12%), hsl(0 0% 24%));
}
.theme-roblox .invite-hero::after {
  content: ""; position: absolute; right: -28px; bottom: -28px; width: 120px; height: 120px;
  border: 14px solid hsl(0 0% 100% / .12); transform: rotate(16deg);
}
.theme-roblox .invite-hero::before {
  content: ""; position: absolute; left: -24px; top: -24px; width: 80px; height: 80px;
  background: hsl(0 85% 52% / .9); transform: rotate(-14deg);
}
.theme-roblox .invite-hero h1, .theme-roblox .invite-hero .kicker, .theme-roblox .invite-hero .age {
  font-family: "Chakra Petch", var(--heading); text-transform: uppercase; letter-spacing: .04em; position: relative; z-index: 1;
}
.theme-roblox .invite-hero h1 { font-weight: 700; }
.theme-roblox .invite-hero .age { background: hsl(0 85% 52%); border-radius: 4px; }
.theme-roblox .invite, .theme-roblox .btn, .theme-roblox .gift, .theme-roblox .seg span, .theme-roblox .amounts span, .theme-roblox .details dt { border-radius: 4px; }
.theme-roblox .btn:not(.ghost) { background: hsl(0 0% 12%); }
.theme-roblox .btn:not(.ghost):hover { background: hsl(0 85% 50%); }
.theme-roblox .bar i { background: linear-gradient(90deg, hsl(0 85% 52%), hsl(14 90% 55%)); }
.theme-roblox .seg input:checked + span, .theme-roblox .amounts input:checked + span { background: hsl(0 0% 12%); border-color: hsl(0 0% 12%); }

/* Guest accounts */
.tabs { display: flex; gap: 6px; margin: 20px 0 4px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs a.on { color: var(--primary); border-bottom-color: var(--primary); }
.tabs a span { display: inline-block; min-width: 22px; padding: 0 6px; border-radius: 99px; background: var(--soft); color: var(--muted); font-size: 14px; text-align: center; }
.tabs a.on span { background: var(--primary-soft); color: var(--primary); }
div.party-card:hover { transform: none; }
a.party-info { text-decoration: none; color: var(--ink); }
.invite-status { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.invite-status .badge { margin: 0; }
.party-hide { padding: 0 16px; align-self: center; }
.account-nudge { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--primary-soft); border-radius: var(--radius); padding: 14px 16px; margin: 0 0 18px; }
.account-nudge p { margin: 2px 0 0; font-size: 15px; }
.saved-note { margin-top: -6px; }
