:root {
  color-scheme: light;
  --cream: #fbf4ea;
  --paper: #fffdf9;
  --blush: #f3d9dc;
  --blush-deep: #e6b9c0;
  --rose: #b8677a;
  --rose-deep: #96495c;
  --sage: #9cae87;
  --sage-deep: #74875f;
  --lilac: #ddd2e7;
  --ink: #4a3d36;
  --ink-soft: #7a695f;
  --line: #e7d9cd;
  --tint-blush: #fbebee;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  min-height: 100vh;
  background-color: var(--cream);
  background-image:
    radial-gradient(420px 320px at 12% 8%, rgba(184, 103, 122, 0.22), transparent 65%),
    radial-gradient(460px 360px at 88% 22%, rgba(230, 185, 192, 0.30), transparent 65%),
    radial-gradient(480px 380px at 20% 90%, rgba(221, 207, 231, 0.28), transparent 65%),
    radial-gradient(440px 340px at 92% 96%, rgba(184, 103, 122, 0.20), transparent 65%),
    repeating-linear-gradient(0deg, transparent, transparent 13px, rgba(184, 103, 122, 0.16) 13px, rgba(184, 103, 122, 0.16) 26px),
    repeating-linear-gradient(90deg, transparent, transparent 13px, rgba(184, 103, 122, 0.16) 13px, rgba(184, 103, 122, 0.16) 26px);
  background-blend-mode: multiply;
  background-attachment: fixed;
  color: var(--ink);
  font-family: "Poppins", ui-sans-serif, system-ui, sans-serif;
  padding-inline: 16px;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3 {
  font-family: "Playfair Display", Georgia, serif;
  text-wrap: balance;
  margin: 0;
}

.script {
  font-family: "Mrs Saint Delafield", "Brush Script MT", cursive;
  line-height: 1;
}

p { margin: 0; }
button { font-family: inherit; }

.page {
  max-width: 560px;
  margin: 0 auto;
  padding-block: 28px 48px;
}

.card {
  background: linear-gradient(175deg, var(--tint-blush) 0%, var(--paper) 55%);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 18px 40px -28px rgba(150, 73, 92, 0.45);
  position: relative;
  overflow: hidden;
}

.card.section::before {
  content: "";
  display: block;
  height: 5px;
  width: 100%;
  background: linear-gradient(90deg, var(--blush-deep), var(--rose-deep));
}

.hero {
  padding: 40px 62px;
  text-align: center;
}

.hero-side {
  position: absolute;
  top: 0;
  width: 58px;
  height: 100%;
  pointer-events: none;
}

.hero-side.left { left: 0; }
.hero-side.right { right: 0; transform: scaleX(-1); }
.hero-side svg { width: 100%; height: 100%; display: block; }

.hero .eyebrow-top {
  font-size: 12.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rose-deep);
  font-weight: 600;
}

.hero .eyebrow-da {
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-size: 15px;
  color: var(--ink-soft);
  margin-top: 3px;
}

.hero .name {
  font-size: clamp(42px, 13vw, 54px);
  color: var(--rose-deep);
  margin-block: 2px 0;
}

.hero .divider {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  margin-block: 20px 16px;
  color: var(--rose);
}

.hero .divider::before,
.hero .divider::after {
  content: "";
  height: 1px;
  width: 46px;
  background: var(--line);
}

.verse {
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-size: 16px;
  line-height: 1.6;
  color: var(--rose-deep);
  max-width: 40ch;
  margin-inline: auto;
}

.verse cite {
  display: block;
  font-style: normal;
  font-family: "Poppins", sans-serif;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rose-deep);
  margin-top: 8px;
}

.message {
  margin-top: 14px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 34ch;
  margin-inline: auto;
}

.section { margin-top: 20px; }

.section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 24px 4px;
}

.section-head .ico { font-size: 20px; }

.section-head h2 {
  font-size: 21px;
  color: var(--rose-deep);
}

.section-body { padding: 4px 24px 22px; }

.detail-row {
  display: flex;
  gap: 12px;
  padding-block: 10px;
  border-top: 1px dashed var(--line);
}

.detail-row:first-child { border-top: none; }

.detail-row .ico {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 50%;
  background: var(--blush);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.detail-row .label {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rose-deep);
  font-weight: 600;
}

.detail-row .value { font-size: 15px; margin-top: 2px; }
.detail-row .value a { color: var(--rose); }
.detail-row .hint { font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }

.field label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}

.field input[type="text"],
.field input[type="password"] {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: var(--cream);
  font-size: 15px;
  color: var(--ink);
}

.field input:focus {
  outline: 2px solid var(--rose);
  outline-offset: 1px;
}

.choice-row {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.choice-btn {
  flex: 1;
  padding: 13px 8px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: var(--paper);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}

.choice-btn[aria-pressed="true"].yes {
  background: var(--rose-deep);
  border-color: var(--rose-deep);
  color: #fff;
}

.choice-btn[aria-pressed="true"].no {
  background: var(--ink-soft);
  border-color: var(--ink-soft);
  color: #fff;
}

#gift-picker { margin-top: 16px; }

.mini-hint {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.5;
}

.size-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.size-btn {
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: var(--paper);
  padding: 10px 6px;
  text-align: center;
  cursor: pointer;
}

.size-btn .sz {
  font-family: "Playfair Display", serif;
  font-size: 17px;
  color: var(--rose-deep);
}

.size-btn .left {
  display: block;
  font-size: 10.5px;
  color: var(--sage-deep);
  margin-top: 2px;
}

.size-btn[aria-pressed="true"] {
  background: var(--rose-deep);
  border-color: var(--rose-deep);
}

.size-btn[aria-pressed="true"] .sz,
.size-btn[aria-pressed="true"] .left { color: #fff; }

.size-grid.compact {
  grid-template-columns: repeat(5, 1fr);
  margin-top: 8px;
}

.size-grid.compact .size-btn {
  padding: 9px 4px;
}

.size-grid.compact .size-btn .sz {
  font-size: 15px;
}

.size-grid.is-disabled {
  opacity: 0.4;
  pointer-events: none;
}

.guest-row .choice-row.compact,
.guest-row .size-grid.compact {
  margin-top: 0;
}

.mimo-note {
  margin-top: 14px;
  background: var(--blush);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--rose-deep);
}

.submit-btn {
  width: 100%;
  margin-top: 18px;
  padding: 14px;
  border-radius: 16px;
  border: none;
  background: var(--rose-deep);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.edit-link {
  display: block;
  text-align: center;
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--ink-soft);
  text-decoration: underline;
  background: none;
  border: none;
  cursor: pointer;
}

.form-msg {
  font-size: 13px;
  margin-top: 10px;
  text-align: center;
}

.form-msg.error { color: var(--rose-deep); }
.form-msg.saving { color: var(--ink-soft); }

.thanks {
  text-align: center;
  padding: 10px 4px 4px;
}

.thanks .big { font-size: 34px; }
.thanks p { margin-top: 8px; color: var(--ink-soft); font-size: 14px; }

.stat-row {
  display: flex;
  gap: 14px;
  margin-bottom: 16px;
}

.stat {
  flex: 1;
  background: var(--cream);
  border-radius: 14px;
  padding: 12px 10px;
  text-align: center;
}

.stat .n {
  font-family: "Playfair Display", serif;
  font-size: 26px;
  color: var(--rose-deep);
  font-variant-numeric: tabular-nums;
}

.stat .l {
  font-size: 10.5px;
  color: var(--rose-deep);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.bar-row { margin-top: 12px; }
.bar-row:first-child { margin-top: 0; }

.bar-top {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 5px;
}

.bar-top .sz { font-weight: 600; }
.bar-top .cnt { color: var(--ink-soft); font-variant-numeric: tabular-nums; }

.bar-track {
  height: 9px;
  border-radius: 6px;
  background: var(--line);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blush-deep), var(--rose));
  border-radius: 6px;
  width: 0;
  transition: width 0.4s ease;
}

.bar-fill.full { background: linear-gradient(90deg, var(--rose), var(--rose-deep)); }

.footer {
  text-align: center;
  margin-top: 26px;
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.6;
}

.footer .script {
  font-size: 30px;
  color: var(--rose-deep);
  display: block;
  margin-bottom: 4px;
}

.guest-list {
  display: grid;
  gap: 10px;
}

.guest-row {
  display: grid;
  gap: 8px;
  padding: 12px;
  background: var(--cream);
  border-radius: 16px;
}

.add-card .guest-name,
.guest-row .guest-name {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--paper);
  font-size: 14px;
  color: var(--ink);
}

.choice-btn:focus-visible,
.size-btn:focus-visible {
  outline: 2px solid var(--rose);
  outline-offset: 1px;
}

.choice-row.compact {
  margin-top: 8px;
}

.choice-row.compact .choice-btn {
  padding: 11px 8px;
  font-size: 13.5px;
}

.need-grid input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--paper);
  font-size: 13px;
  color: var(--ink);
  font-family: inherit;
}

.guest-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mini-btn {
  padding: 9px 10px;
  border-radius: 12px;
  border: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.mini-btn.save {
  background: var(--rose-deep);
  color: #fff;
}

.mini-btn.ghost {
  background: var(--paper);
  border: 1.5px solid var(--line);
  color: var(--ink);
}

.mini-btn.danger {
  background: transparent;
  color: var(--rose-deep);
  border: 1.5px solid var(--blush-deep);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.filter-row input[type="search"] {
  flex: 1 1 160px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--paper);
  font-size: 13px;
}

.chip {
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--paper);
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.chip[aria-pressed="true"] {
  background: var(--rose-deep);
  border-color: var(--rose-deep);
  color: #fff;
}

.need-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.need-grid label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rose-deep);
  margin-bottom: 4px;
}

.admin-msg {
  min-height: 1.2em;
}

.add-card {
  margin-bottom: 12px;
  padding: 12px;
  border: 1.5px dashed var(--blush-deep);
  border-radius: 16px;
  background: var(--paper);
}

.badge {
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge.yes { background: var(--blush); color: var(--rose-deep); }
.badge.no { background: var(--line); color: var(--ink-soft); }

@media (max-width: 520px) {
  .need-grid { grid-template-columns: repeat(3, 1fr); }
}

[hidden] { display: none !important; }

@media (max-width: 420px) {
  .hero { padding: 32px 48px; }
  .hero-side { width: 42px; }
  .choice-row { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .bar-fill { transition: none; }
}
