@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,500;1,600&display=swap');

:root {
  color-scheme: light;
  --paper: #fbfaf2;
  --surface: #fffefa;
  --ink: #203a30;
  --muted: #69786f;
  --line: #dce4d8;
  --leaf: #328454;
  --leaf-dark: #1f4935;
  --lime: #e4f36e;
  --coral: #e85e43;
  --sky: #64c5cf;
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'DM Sans', 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; overflow-x: clip; }
body { margin: 0; overflow-x: clip; background: var(--paper); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.site-header { height: 74px; padding: 0 clamp(20px, 6.2vw, 92px); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.wordmark { color: var(--leaf-dark); font-family: var(--serif); font-size: 25px; font-weight: 600; text-decoration: none; letter-spacing: 0; }
.wordmark span { padding: 0 2px; color: var(--coral); font-family: var(--sans); font-size: 14px; vertical-align: 4px; }
.header-note, .header-link { font-size: 11px; font-weight: 700; letter-spacing: 1.1px; }
.header-note { color: var(--muted); }
.header-note span { padding: 0 9px; color: var(--coral); }
.header-link { text-decoration: none; }
.header-link span { padding-left: 9px; color: var(--coral); font-size: 15px; }

.intro { position: relative; min-height: 350px; padding: 60px clamp(20px, 10vw, 148px) 56px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, 340px); align-items: end; gap: 56px; overflow: hidden; background-color: #e7f1d9; background-image: linear-gradient(115deg, #edf4df 0%, #e5f0dc 57%, #e1f2e8 100%); }
.intro::before { position: absolute; inset: -24px; background-image: radial-gradient(circle, var(--coral) 0 2px, transparent 2.8px), radial-gradient(circle, var(--lime) 0 2.5px, transparent 3.2px), radial-gradient(circle, var(--sky) 0 2px, transparent 2.8px); background-position: 0 0, 27px 18px, 57px 7px; background-size: 108px 98px, 137px 121px, 151px 119px; content: ''; opacity: .38; pointer-events: none; animation: confetti-drift 24s linear infinite; }
.intro-copy, .progress-panel { position: relative; z-index: 1; }
.eyebrow { margin: 0 0 15px; color: var(--leaf); font-size: 10px; font-weight: 700; letter-spacing: 1.35px; }
.eyebrow-mark { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--coral); vertical-align: 1px; animation: party-pulse 1.8s ease-in-out infinite; }
h1, h2, p { margin-top: 0; }
h1, .section-heading h2, .gift-dialog h2 { font-family: var(--serif); font-weight: 500; letter-spacing: 0; }
h1 { margin: 0; color: var(--leaf-dark); font-size: 68px; line-height: .98; animation: arrive .7s cubic-bezier(.2,.8,.2,1) both; }
.couple-names { display: block; }
.ampersand { color: var(--leaf); font-style: italic; }
h1 em { display: block; margin-top: 5px; color: var(--coral); font-size: 76px; font-weight: 600; }
.intro-text { max-width: 470px; margin: 17px 0 0; color: #606e61; font-size: 14px; line-height: 1.75; }
.progress-panel { padding: 19px 0 4px; border-top: 1px solid #cbd5c6; }
.progress-heading { display: flex; justify-content: space-between; gap: 12px; color: var(--leaf-dark); font-size: 12px; font-weight: 700; }
.progress-heading span:last-child { font-variant-numeric: tabular-nums; }
.progress-track { height: 5px; margin: 14px 0 11px; overflow: hidden; border-radius: 5px; background: #d8dfd2; }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--leaf); transition: width .4s ease; }
.progress-panel p { margin: 0; color: var(--muted); font-size: 11px; }

.registry { max-width: 1230px; margin: 0 auto; padding: 62px clamp(20px, 5vw, 60px) 68px; }
.registry-tabs { margin-bottom: 28px; display: flex; gap: 24px; border-bottom: 1px solid var(--line); }
.registry-tab { min-height: 48px; padding: 0 2px 12px; display: inline-flex; align-items: center; gap: 9px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); cursor: pointer; font-size: 12px; font-weight: 600; }
.registry-tab[aria-selected="true"] { border-bottom-color: var(--coral); color: var(--leaf-dark); }
.registry-tab span { min-width: 21px; height: 21px; padding: 0 5px; display: inline-grid; place-items: center; background: #e8efdf; color: var(--leaf-dark); font-size: 9px; }
.registry-tab:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.section-heading .eyebrow { margin-bottom: 9px; }
.section-heading h2 { margin: 0; color: var(--leaf-dark); font-size: 34px; }
.search-field { display: flex; width: min(270px, 34vw); height: 42px; align-items: center; gap: 9px; padding: 0 12px; border: 1px solid var(--line); background: var(--surface); }
.search-icon { color: var(--leaf); font-size: 23px; line-height: 1; transform: rotate(-15deg); }
.search-field input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 12px; }
.search-field input::placeholder { color: #9a9f94; }
.search-field kbd { padding: 2px 5px; border: 1px solid var(--line); color: #8b9289; font-family: var(--sans); font-size: 9px; }
.toolbar { min-height: 63px; margin-top: 23px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.filters { display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filter-button { flex: 0 0 auto; padding: 9px 12px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 11px; }
.filter-button[aria-pressed="true"] { background: var(--leaf-dark); color: white; }
.availability-toggle { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; color: #5c685d; cursor: pointer; font-size: 11px; }
.availability-toggle input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.toggle-track { position: relative; width: 27px; height: 15px; border-radius: 12px; background: #c6ccc1; transition: background .15s ease; }
.toggle-track::after { position: absolute; top: 2px; left: 2px; width: 11px; height: 11px; border-radius: 50%; background: white; content: ''; transition: transform .15s ease; }
.availability-toggle input:checked + .toggle-track { background: var(--leaf); }
.availability-toggle input:checked + .toggle-track::after { transform: translateX(12px); }
.availability-toggle input:focus-visible + .toggle-track { outline: 2px solid var(--coral); outline-offset: 2px; }
.custom-gift-panel { margin-top: 28px; padding: 30px clamp(20px, 4vw, 48px); display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 42px; align-items: start; border-left: 4px solid var(--coral); background: #edf3e7; }
.custom-gift-intro .eyebrow { margin-bottom: 10px; }
.custom-gift-intro h2 { margin: 0; color: var(--leaf-dark); font-family: var(--serif); font-size: 30px; font-weight: 500; line-height: 1.18; }
.custom-gift-intro > p:last-child { max-width: 330px; margin: 12px 0 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.custom-gift-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
.custom-field { min-width: 0; display: grid; gap: 7px; color: var(--ink); font-size: 12px; font-weight: 700; }
.custom-field small { color: var(--muted); font-size: 11px; font-weight: 400; }
.custom-field input { width: 100%; min-width: 0; height: 44px; padding: 0 11px; border: 1px solid #d2ded0; border-radius: 0; outline-color: var(--leaf); background: var(--surface); color: var(--ink); font-size: 12px; font-weight: 400; }
.custom-field input::placeholder { color: #9ba398; }
.custom-form-message { min-height: 0; margin: 0; grid-column: 1 / -1; color: #ad4e3d; font-size: 12px; }
.custom-form-message:empty { display: none; }
.custom-submit { width: fit-content; grid-column: 1 / -1; display: inline-flex; align-items: center; gap: 12px; }
.custom-submit span { color: var(--lime); font-size: 16px; }
.custom-footnote { grid-column: 1 / -1; margin: -5px 0 0; }

.gift-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin-top: 25px; background: var(--line); border: 1px solid var(--line); }
.gift-card { min-height: 204px; padding: 20px 20px 17px; display: flex; flex-direction: column; background: var(--surface); transition: background .2s ease, box-shadow .2s ease; animation: reveal .35s both; }
.gift-card:hover { background: #fff; box-shadow: inset 0 0 0 1px #c9d8c8; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.category-label { color: #69786f; font-size: 11px; }
.status-label { display: inline-flex; align-items: center; gap: 6px; color: var(--leaf); font-size: 11px; font-weight: 600; white-space: nowrap; }
.status-label::before { width: 6px; height: 6px; border-radius: 50%; background: #78a56e; content: ''; }
.status-label.reserved { color: #a55d43; }
.status-label.reserved::before { background: var(--coral); }
.status-label.purchased { color: #6a7268; }
.status-label.purchased::before { background: #92988d; }
.gift-card h3 { margin: 20px 0 6px; color: var(--ink); font-family: var(--serif); font-size: 20px; font-weight: 500; line-height: 1.2; }
.gift-card .gift-description { margin: 0; color: #69786f; font-size: 12px; line-height: 1.55; }
.gift-product-link { width: fit-content; margin-top: 10px; color: var(--leaf-dark); font-size: 11px; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.card-bottom { margin-top: auto; padding-top: 17px; display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.gift-owner { max-width: 57%; color: #805c4d; font-size: 11px; line-height: 1.45; }
.gift-owner.paid { color: var(--leaf); }
.gift-action { min-height: 34px; padding: 0 2px; display: inline-flex; align-items: center; gap: 7px; border: 0; background: transparent; color: var(--leaf-dark); cursor: pointer; font-size: 12px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.gift-action:hover { color: var(--coral); }
.gift-action span { font-size: 14px; }
.gift-action:disabled { color: #8e958c; cursor: default; }
.empty-state { padding: 44px 0; color: var(--muted); text-align: center; font-size: 13px; }
.sync-note { margin: 22px 0 0; display: flex; align-items: center; justify-content: center; gap: 8px; color: #69786f; font-size: 11px; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: #72a16b; box-shadow: 0 0 0 3px #72a16b22; }

.site-footer { min-height: 80px; padding: 15px clamp(20px, 6.2vw, 92px); display: flex; align-items: center; justify-content: space-between; gap: 18px; border-top: 1px solid var(--line); }
.footer-mark { font-size: 21px; }
.site-footer p { margin: 0; color: #69786f; font-size: 11px; }
.site-footer p span { padding-left: 4px; color: var(--coral); }
.site-footer > a:last-child { color: var(--leaf-dark); font-size: 10px; text-decoration: none; }

.gift-dialog { position: fixed; width: min(480px, calc(100vw - 28px)); max-width: none; max-height: min(90vh, 780px); padding: 36px; overflow-y: auto; border: 1px solid var(--line); background: var(--surface); color: var(--ink); box-shadow: 0 22px 80px #1c302a33; }
.gift-dialog::backdrop { background: #1c302a88; backdrop-filter: blur(2px); }
.dialog-close { position: absolute; top: 15px; right: 17px; width: 30px; height: 30px; border: 0; background: transparent; color: var(--leaf-dark); cursor: pointer; font-size: 24px; line-height: 1; }
.gift-dialog .eyebrow { margin: 0 35px 10px 0; }
.gift-dialog h2 { margin: 0; color: var(--leaf-dark); font-size: 31px; line-height: 1.15; }
.dialog-description { margin: 11px 0 20px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.search-product { min-height: 44px; padding: 0 14px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--leaf); color: var(--leaf-dark); font-size: 12px; font-weight: 700; text-decoration: none; }
.search-product:hover { background: #edf1e6; }
.search-product span { font-size: 15px; }
.dialog-divider { height: 1px; margin: 21px 0 16px; background: var(--line); }
.dialog-status { margin: 0 0 14px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.name-label { display: block; margin-bottom: 8px; color: var(--ink); font-size: 12px; font-weight: 700; }
#guest-name { width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 0; outline-color: var(--leaf); background: white; color: var(--ink); font-size: 13px; }
.text-field { width: 100%; min-width: 0; height: 42px; padding: 0 11px; border: 1px solid var(--line); border-radius: 0; outline-color: var(--leaf); background: white; color: var(--ink); font-size: 12px; }
.icon-button { flex: 0 0 42px; border: 1px solid var(--leaf); background: white; color: var(--leaf-dark); cursor: pointer; font-size: 19px; }
.field-note { margin: 8px 0 0; color: #69786f; font-size: 11px; line-height: 1.55; }
.dialog-tabs { margin: 17px 0 13px; display: grid; grid-template-columns: .8fr 1.4fr; border-bottom: 1px solid var(--line); }
.dialog-tab { min-height: 42px; padding: 0 8px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); cursor: pointer; font-size: 11px; font-weight: 600; }
.dialog-tab[aria-selected="true"] { border-bottom-color: var(--coral); color: var(--leaf-dark); }
.dialog-tab:focus-visible, .icon-button:focus-visible { outline: 2px solid var(--coral); outline-offset: 2px; }
.receipt-panel .name-label { margin-top: 14px; }
.receipt-panel .name-label:first-child { margin-top: 2px; }
.file-field { width: 100%; padding: 10px; border: 1px dashed #b9c9b9; background: #f9faf5; color: var(--muted); font-size: 12px; }
.file-field::file-selector-button { margin-right: 10px; padding: 8px 11px; border: 0; background: #eaf1e2; color: var(--leaf-dark); cursor: pointer; font: 600 11px var(--sans); }
.receipt-lock, .receipt-status { margin: 0 0 12px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.receipt-status { margin-top: 13px; color: var(--leaf-dark); }
.receipt-status:empty { display: none; }
.private-note { color: var(--leaf); }
.form-message { min-height: 0; margin: 0; color: #ad4e3d; font-size: 12px; }
.form-message:not(:empty) { margin-top: 8px; }
.dialog-actions { margin-top: 13px; display: flex; flex-wrap: wrap; gap: 8px; }
.dialog-button { min-height: 44px; padding: 0 16px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: var(--leaf-dark); color: white; cursor: pointer; font-size: 12px; font-weight: 700; text-decoration: none; }
.dialog-button:hover { background: #3c6548; }
.dialog-button.secondary { border: 1px solid var(--line); background: transparent; color: var(--leaf-dark); }
.dialog-button.secondary:hover { background: #f1f3ec; }
.dialog-button:disabled { opacity: .6; cursor: wait; }
.dialog-button[aria-disabled="true"] { opacity: .6; pointer-events: none; }
.trust-note { margin: 18px 0 0; color: #69786f; font-size: 11px; line-height: 1.55; }
.toast { position: fixed; right: 22px; bottom: 22px; max-width: min(380px, calc(100vw - 44px)); padding: 14px 17px; background: var(--leaf-dark); color: white; opacity: 0; pointer-events: none; font-size: 12px; line-height: 1.45; transform: translateY(8px); transition: opacity .2s ease, transform .2s ease; }
.toast.visible { opacity: 1; transform: translateY(0); }

@keyframes reveal { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes arrive { from { opacity: 0; transform: translateY(17px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes confetti-drift { from { background-position: 0 0, 27px 18px, 57px 7px; } to { background-position: 84px 76px, 130px 109px, 176px 94px; } }
@keyframes party-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(232, 94, 67, .3); } 50% { box-shadow: 0 0 0 5px rgba(232, 94, 67, 0); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }
@media (max-width: 760px) {
  .intro { min-height: auto; padding-top: 48px; padding-bottom: 39px; grid-template-columns: 1fr; gap: 31px; }
  .progress-panel { max-width: 430px; width: 100%; }
  .registry { padding-top: 45px; }
  .gift-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-heading h2 { font-size: 30px; }
  .header-note { font-size: 9px; letter-spacing: .7px; }
  .custom-gift-panel { grid-template-columns: 1fr; gap: 22px; }
}
@media (max-width: 520px) {
  .site-header { height: 62px; }
  .header-note { max-width: 170px; text-align: center; }
  .header-link { font-size: 10px; letter-spacing: .5px; }
  .intro { padding: 42px 22px 34px; }
  h1 { font-size: 43px; }
  h1 em { font-size: 56px; }
  .intro-text { max-width: 330px; font-size: 13px; }
  .registry { padding: 39px 16px 48px; }
  .section-heading { align-items: stretch; flex-direction: column; gap: 17px; }
  .section-heading h2 { font-size: 29px; }
  .search-field { width: 100%; }
  .toolbar { padding: 11px 0; align-items: flex-start; flex-direction: column; gap: 10px; }
  .registry-tabs { gap: 15px; }
  .registry-tab { min-height: 46px; gap: 6px; font-size: 11px; }
  .custom-gift-panel { margin-top: 18px; padding: 23px 18px; }
  .custom-gift-intro h2 { font-size: 27px; }
  .custom-gift-form { grid-template-columns: 1fr; }
  .filters { max-width: 100%; width: 100%; flex-wrap: wrap; overflow: visible; }
  .filter-button { min-height: 44px; }
  .availability-toggle { min-height: 44px; }
  .gift-grid { grid-template-columns: 1fr; margin-top: 18px; }
  .gift-card { min-height: 178px; padding: 18px; }
  .gift-card h3 { margin-top: 16px; font-size: 19px; }
  .gift-action { min-height: 44px; }
  .site-footer { min-height: 76px; padding-right: 17px; padding-left: 17px; }
  .site-footer p { max-width: 160px; line-height: 1.5; text-align: center; }
  .gift-dialog { padding: 29px 23px 24px; }
  .dialog-close { top: 10px; right: 10px; width: 44px; height: 44px; }
  .dialog-tab { min-height: 44px; font-size: 11px; }
}
