:root {
  color-scheme: light;
  --ink: #18352f;
  --muted: #65746f;
  --paper: #fffdf7;
  --cream: #f3efe2;
  --pine: #174d3f;
  --pine-light: #e2eee8;
  --berry: #a63d47;
  --line: #d9ddd5;
  --shadow: 0 18px 55px rgba(27, 55, 48, .10);
}

* { box-sizing: border-box; }
html { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: var(--cream); }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 12% 5%, #fff 0, transparent 28rem), var(--cream); }
a { color: var(--pine); }
.topbar { max-width: 1120px; margin: auto; padding: 1.4rem 1.5rem; display: flex; justify-content: space-between; align-items: center; }
.brand { font-family: Georgia, serif; font-size: 1.25rem; font-weight: 700; text-decoration: none; }
.brand span { color: var(--berry); }
.topbar-actions { display: flex; align-items: center; gap: 1rem; }
.topbar-actions form { display: block; }
.button-link { background: transparent; color: var(--pine); margin: 0; padding: .35rem; }
.privacy-label { color: var(--muted); font-size: .85rem; }
main { width: min(1120px, calc(100% - 2rem)); margin: 2.5rem auto 5rem; }
footer { color: var(--muted); font-size: .8rem; text-align: center; padding: 2rem; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; line-height: 1.05; margin-top: 0; }
h1 { font-size: clamp(2.3rem, 6vw, 5.25rem); letter-spacing: -.035em; }
h2 { font-size: 1.65rem; }
.hero { max-width: 780px; margin: 5rem 0 3rem; }
.lead { max-width: 640px; color: var(--muted); font-size: 1.2rem; line-height: 1.6; }
.eyebrow { color: var(--berry); font-size: .75rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.card { background: var(--paper); border: 1px solid rgba(23, 77, 63, .12); border-radius: 18px; box-shadow: var(--shadow); padding: clamp(1.25rem, 4vw, 2.2rem); }
.form-card, .narrow { max-width: 620px; }
.narrow { margin: 6rem auto; }
.invitation-tagline { color: var(--muted); font-size: 1.05rem; line-height: 1.55; margin: -.25rem 0 1.1rem; }
form { display: grid; gap: .65rem; }
label { font-weight: 700; margin-top: .55rem; }
input, textarea, select { width: 100%; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); font: inherit; padding: .8rem .9rem; }
input:focus, textarea:focus, select:focus { outline: 3px solid rgba(23, 77, 63, .14); border-color: var(--pine); }
button { justify-self: start; border: 0; border-radius: 999px; background: var(--pine); color: white; cursor: pointer; font: inherit; font-weight: 750; padding: .8rem 1.25rem; margin-top: 1rem; }
button:hover { background: #0d3b30; transform: translateY(-1px); }
small, .muted { color: var(--muted); }
.validation { color: var(--berry); font-size: .85rem; }
.form-row { display: grid; grid-template-columns: 2fr 1fr; gap: 1rem; }
.event-header { display: flex; justify-content: space-between; align-items: end; margin: 4.5rem 0 2rem; }
.event-header h1 { font-size: clamp(2.5rem, 7vw, 4.5rem); margin-bottom: .5rem; }
.event-header p { color: var(--muted); }
.participant-hero { position: relative; overflow: hidden; margin: 3.5rem 0 1.5rem; border-radius: 26px; background: linear-gradient(135deg, #123f34 0%, var(--pine) 58%, #236452 100%); box-shadow: 0 22px 65px rgba(20, 58, 48, .22); color: #fffdf7; padding: clamp(1.6rem, 5vw, 3.25rem); }
.participant-hero::after { position: absolute; right: -3.5rem; bottom: -6rem; width: 19rem; height: 19rem; border: 1px solid rgba(255, 255, 255, .13); border-radius: 50%; box-shadow: 0 0 0 3rem rgba(255, 255, 255, .035), 0 0 0 6rem rgba(255, 255, 255, .025); content: ""; pointer-events: none; }
.participant-hero .eyebrow { color: #f2bac0; }
.participant-hero h1 { position: relative; z-index: 1; max-width: 850px; font-size: clamp(2.7rem, 7vw, 5rem); margin-bottom: .65rem; }
.event-tagline { position: relative; z-index: 1; max-width: 650px; color: rgba(255, 253, 247, .82); font-size: clamp(1rem, 2vw, 1.18rem); line-height: 1.55; margin: 0; }
.event-facts { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.75rem; }
.event-facts span { display: flex; gap: .45rem; border: 1px solid rgba(255, 255, 255, .17); border-radius: 999px; background: rgba(255, 255, 255, .09); padding: .55rem .85rem; font-size: .88rem; }
.event-facts strong { color: #f2bac0; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 1.25rem; align-items: start; }
.participant-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr); gap: 1.5rem; align-items: start; }
.notice { display: grid; gap: .35rem; background: var(--pine-light); border-left: 4px solid var(--pine); border-radius: 6px; padding: 1rem 1.2rem; margin-bottom: 1.25rem; }
.notice-error { background: #f7e4e5; border-left-color: var(--berry); }
.locked { background: #e9e5f3; border-left-color: #5c477c; }
code { overflow-wrap: anywhere; }
.participant { display: grid; grid-template-columns: minmax(120px, .7fr) minmax(180px, 1.3fr); align-items: center; gap: 1rem; border-top: 1px solid var(--line); padding: 1rem 0; }
.participant:last-child { padding-bottom: 0; }
.participant-editor { border-bottom: 1px solid var(--line); padding: 0 0 1rem; }
.participant-editor summary, .wish-editor summary { color: var(--pine); cursor: pointer; font-weight: 700; padding: .35rem 0; }
.participant-editor form, .wish-editor form { margin-top: .75rem; }
.inline-form { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: .65rem; }
.button-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.button-row form { display: block; margin: 0; }
.button-row button { margin: 0; }
.wish { border-top: 1px solid var(--line); padding: 1rem 0; }
.wish strong { display: inline-block; margin-right: .6rem; }
.wish p { color: var(--muted); margin-bottom: 0; }
.wish-meta { display: flex; flex-wrap: wrap; gap: .4rem .8rem; color: var(--muted); font-size: .85rem; margin-top: .4rem; }
.wish-editor { margin-top: .8rem; }
.section-gap { margin-top: 1.25rem; }
.draw-card { max-width: 760px; }
.recipient-card { overflow: hidden; max-width: none; padding: 0; }
.recipient-reveal { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 1.25rem; background: linear-gradient(100deg, #f7ebe8, #fff8ed); padding: clamp(1.4rem, 4vw, 2.4rem); }
.gift-mark { display: grid; width: 4.2rem; height: 4.2rem; place-items: center; flex: none; border-radius: 50%; background: var(--berry); box-shadow: 0 10px 28px rgba(166, 61, 71, .24); color: white; font-size: 2rem; }
.recipient-reveal .eyebrow { margin: 0 0 .5rem; }
.recipient-reveal h2 { font-size: clamp(1.9rem, 4vw, 3rem); margin: 0; }
.recipient-reveal h2 span { color: var(--berry); }
.recipient-reveal p:last-child { color: var(--muted); margin: .65rem 0 0; }
.recipient-wishlist { padding: clamp(1.4rem, 4vw, 2.4rem); }
.recipient-wishlist h3 { margin: 0 0 .9rem; font-family: Georgia, "Times New Roman", serif; font-size: 1.35rem; }
.recipient-wishlist .wish, .wishlist-card .wish { border: 1px solid var(--line); border-radius: 13px; background: #fff; padding: 1rem; margin-top: .8rem; }
.recipient-wishlist .wish:first-of-type, .wishlist-card .wish:first-of-type { margin-top: 1.1rem; }
.recipient-wishlist .wish a, .wishlist-card .wish a { font-size: .9rem; font-weight: 700; }
.card-intro { color: var(--muted); line-height: 1.5; margin: -.6rem 0 1.25rem; }
.wishlist-card > .eyebrow, .add-wish-card > .eyebrow { margin-top: 0; }
.add-wish-card { position: sticky; top: 1.25rem; }
.wishlist-card .wish-editor { border-top: 1px dashed var(--line); padding-top: .65rem; }
.wishlist-card .wish-editor summary { width: max-content; border-radius: 999px; background: var(--pine-light); padding: .4rem .75rem; font-size: .88rem; }
.exclusion { display: flex; justify-content: space-between; align-items: center; gap: 1rem; border-top: 1px solid var(--line); padding: .75rem 0; }
.exclusion form { display: block; }
.button-secondary { background: transparent; border: 1px solid var(--line); color: var(--ink); margin: 0; padding: .5rem .85rem; }
.button-danger { background: var(--berry); }
.button-danger:hover { background: #832f38; }
.checkbox-label { display: flex; align-items: center; gap: .65rem; font-weight: 600; }
.checkbox-label input { width: 1.15rem; height: 1.15rem; margin: 0; }
.danger-zone { border-color: rgba(166, 61, 71, .35); }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0 .5rem; }

@media (max-width: 720px) {
  .privacy-label { display: none; }
  main { margin-top: 1rem; }
  .hero { margin-top: 3rem; }
  .form-row, .dashboard-grid, .participant-grid, .participant { grid-template-columns: 1fr; }
  .inline-form { grid-template-columns: 1fr; }
  .participant { gap: .5rem; }
  .participant-hero { margin-top: 1.5rem; border-radius: 20px; }
  .event-facts { display: grid; }
  .event-facts span { width: max-content; max-width: 100%; }
  .recipient-reveal { grid-template-columns: 1fr; }
  .gift-mark { width: 3.5rem; height: 3.5rem; }
  .add-wish-card { position: static; }
}
