/* Baby in Bloom — Gift Registry
   Theme matches the invite: greige ground, watercolour wildflowers, white arch, taupe didone + mauve name */
:root {
  /* "Baby in Bloom" invite palette */
  --bg: #fffefc;            /* arch white */
  --greige: #efeae7;        /* invite ground */
  --paper: #fffefc;
  --white: #ffffff;
  --ink: #4a403b;           /* BABY lettering */
  --ink-2: #5f5550;
  --muted: #8b8079;
  --line: rgba(74, 64, 59, .12);
  --line-2: rgba(74, 64, 59, .22);
  --taupe: #a89c90;         /* "in bloom" script */
  --lilac: #a87b92;         /* name mauve (kept var names for continuity) */
  --lilac-deep: #8e5f78;
  --lilac-ink: #7a4f66;
  --lilac-soft: #f5edf1;
  --blush: #c9a0b4;
  --blush-deep: #9a5f7c;
  --blush-soft: #f7eef2;
  --blue: #7f98c6;          /* forget-me-not */
  --blue-soft: #edf1f8;
  --sage: #a9b79a;
  --leaf: #5f7652;
  --sage-soft: #eef2ea;
  --butter: #f7efd2;
  --radius: 20px;
  --radius-s: 12px;
  --shadow: 0 1px 2px rgba(74, 64, 59, .05), 0 10px 30px -14px rgba(74, 64, 59, .22);
  --shadow-lg: 0 30px 80px -20px rgba(60, 50, 45, .35);
  --display: "Gilda Display", "Didot", "Bodoni 72", Georgia, serif;
  --sans: "Jost", "Futura", "Avenir Next", "Segoe UI", sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--lilac-ink); }
:focus-visible { outline: 2px solid var(--lilac-deep); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }

/* ── type ── */
.eyebrow { font: 500 12px/1.2 var(--sans); letter-spacing: .28em; text-transform: uppercase; color: var(--muted); }
.display { font-family: var(--display); font-weight: 400; letter-spacing: .01em; line-height: 1.05; color: var(--lilac-ink); margin: 0; }
.muted { color: var(--muted); }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

/* ── buttons ── */
.btn { --b: var(--lilac-deep); display: inline-flex; align-items: center; justify-content: center; gap: .55em; min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent; background: var(--b); color: #fff; font-weight: 500; letter-spacing: .02em; cursor: pointer; text-decoration: none; transition: transform .15s var(--ease), background .2s, box-shadow .2s, opacity .2s; }
.btn:hover { background: var(--lilac-ink); box-shadow: 0 8px 20px -10px rgba(85, 74, 153, .7); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn.ghost:hover { background: var(--white); box-shadow: none; }
.btn.blush { background: var(--blush-deep); }
.btn.blush:hover { background: #a03b68; }
.btn.leaf { background: var(--leaf); }
.btn.leaf:hover { background: #46624a; }
.btn.small { min-height: 38px; padding: 0 15px; font-size: 14px; }
.btn.block { width: 100%; }
.linkbtn { background: none; border: 0; padding: 6px 2px; color: var(--lilac-ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 14px; }
.iconbtn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--paper); display: grid; place-items: center; cursor: pointer; }
.iconbtn:hover { background: var(--white); }

/* ── form ── */
label.field { display: grid; gap: 6px; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.input, textarea.input, select.input { width: 100%; min-height: 48px; padding: 12px 14px; border-radius: var(--radius-s); border: 1px solid var(--line-2); background: var(--white); font-size: 16px; font-weight: 400; color: var(--ink); transition: border-color .2s, box-shadow .2s; }
textarea.input { min-height: 92px; resize: vertical; line-height: 1.45; }
.input:focus { outline: none; border-color: var(--lilac-deep); box-shadow: 0 0 0 4px var(--lilac-soft); }
.hint { font-size: 13px; color: var(--muted); font-weight: 400; }
.error-text { color: var(--blush-deep); font-size: 14px; min-height: 1.2em; }

/* ── hero: greige meadow + white arch, mirroring the invite ── */
.hero { position: relative; overflow: hidden; text-align: center; padding: clamp(70px, 9vw, 120px) 20px 0; border-bottom: 1px solid rgba(168, 156, 144, .6); background: var(--greige) url("/assets/bloom-banner.webp") center top / cover no-repeat; }
@media (max-width: 700px) { .hero { background-image: url("/assets/bloom-portrait.webp"); background-size: 100% auto; padding-top: 118px; } }
.arch { position: relative; margin: 0 auto; width: min(560px, 100%); background: var(--bg); border-radius: 999px 999px 0 0; padding: clamp(80px, 11vw, 120px) clamp(22px, 5vw, 56px) 34px; }
@media (max-width: 700px) { .arch { width: 86%; padding: 64px 16px 28px; } .arch .for { margin-top: 18px; font-size: 11.5px; letter-spacing: .16em; } .arch .meta { letter-spacing: .1em; } }
.arch .mark { width: min(330px, 74%); height: auto; margin: 0 auto; animation: rise .9s var(--ease) both; }
.arch .for { text-wrap: balance; margin-top: 26px; font: 400 13px/1.6 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-2); animation: rise .9s .08s var(--ease) both; }
.arch .name { font-family: var(--display); font-size: clamp(32px, 6vw, 46px); line-height: 1.1; color: var(--lilac); margin: 26px 0 0; text-wrap: balance; font-weight: 400; animation: rise .9s .12s var(--ease) both; }
.arch .meta { margin-top: 18px; display: grid; gap: 8px; font: 400 clamp(12.5px, 2.2vw, 14.5px)/1.5 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); animation: rise .9s .16s var(--ease) both; }
.arch .meta .when { font-size: clamp(14px, 2.6vw, 17px); color: var(--ink); letter-spacing: .12em; }
.arch .meta .when i { font-style: normal; color: var(--taupe); margin: 0 .6em; }
.arch .meta .when b { font-weight: 400; white-space: nowrap; }
@media (max-width: 520px) { .arch .meta .when { display: flex; flex-wrap: wrap; justify-content: center; column-gap: .55em; } .arch .meta .when i { display: none; } }
.intro { margin: 0 auto; max-width: 600px; text-align: center; padding: 30px 22px 0; }
.intro p { margin: 0; font-size: 17px; color: var(--ink-2); }
.intro .tagline { display: none; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ── steps strip ── */
.howto { padding: 0; margin: 40px auto 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; max-width: 900px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.howto li { list-style: none; padding: 18px 20px; display: flex; gap: 14px; align-items: baseline; }
.howto li + li { border-left: 1px solid var(--line); }
.howto .n { font-family: var(--display); font-size: 30px; color: var(--lilac); line-height: 1; }
.howto b { display: block; font-weight: 500; }
.howto span { font-size: 14px; color: var(--muted); }
@media (max-width: 760px) { .howto { grid-template-columns: 1fr; margin-inline: 20px; } .howto li + li { border-left: 0; border-top: 1px solid var(--line); } .howto li { padding: 14px 4px; } }

/* ── toolbar ── */
.toolbar { position: sticky; top: 0; z-index: 20; background: rgba(255, 254, 252, .92); border-bottom: 1px solid transparent; transition: border-color .2s; margin-top: 34px; }
.toolbar.stuck { border-bottom-color: var(--line); }
.toolbar .wrap { display: flex; align-items: center; gap: 14px; padding: 12px 0; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; flex: 1; padding: 2px; -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }
.chips::after { content: ""; flex: 0 0 20px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; cursor: pointer; font-size: 14px; color: var(--ink-2); white-space: nowrap; transition: background .2s, color .2s, border-color .2s; }
.chip:hover { background: var(--white); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip .c { opacity: .6; margin-left: 4px; font-size: 12px; }
.sort { flex: none; min-height: 40px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; padding: 0 34px 0 14px; font-size: 14px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%232f3d33' stroke-width='1.4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; cursor: pointer; }
.progress { display: flex; align-items: center; gap: 12px; padding: 18px 0 6px; font-size: 14px; color: var(--muted); }
.progress .sort { margin-left: auto; }
@media (max-width: 540px) { .progress .bar { display: none; } .progress .sort { font-size: 13.5px; } }
.progress .bar { flex: 0 0 140px; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.progress .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--blush), var(--lilac)); border-radius: inherit; transition: width .6s var(--ease); }

/* ── grid / cards ── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 26px 22px; padding: 18px 0 80px; }
@media (max-width: 540px) { .grid { grid-template-columns: 1fr 1fr; gap: 18px 12px; } }
.card { position: relative; display: flex; flex-direction: column; text-align: left; background: none; border: 0; padding: 0; cursor: pointer; color: inherit; animation: rise .5s var(--ease) both; }
.card .ph { position: relative; aspect-ratio: 1; border-radius: var(--radius); background: var(--white); overflow: hidden; box-shadow: var(--shadow); outline: 1px solid var(--line); outline-offset: -1px; transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.card .ph img { width: 100%; height: 100%; object-fit: contain; padding: 9%; transition: transform .5s var(--ease), filter .3s; }
.card .ph img.fallback { object-fit: contain; padding: 18%; opacity: .9; }
.card:hover .ph { transform: translateY(-3px); box-shadow: 0 1px 2px rgba(47,61,51,.05), 0 22px 40px -18px rgba(47,61,51,.28); }
.card:hover .ph img { transform: scale(1.03); }
.card .body { padding: 13px 4px 0; display: grid; gap: 3px; }
.card .store { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.card .title { font-size: 16px; font-weight: 500; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 3px; }
.card .price { font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; }
.card .need { font-size: 13px; color: var(--muted); }
.badge { position: absolute; top: 12px; left: 12px; z-index: 2; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 500; padding: 6px 10px; border-radius: 999px; background: var(--blush-soft); color: var(--blush-deep); }
.badge.mine { background: var(--lilac-soft); color: var(--lilac-ink); left: auto; right: 12px; }
.card.done .ph img { filter: grayscale(.85) opacity(.55); }
.card.done .title, .card.done .price { color: var(--muted); }
.stamp { position: absolute; inset: auto 12px 12px 12px; z-index: 2; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 12px; border-radius: 999px; background: rgba(233, 240, 228, .96); color: var(--leaf); font-size: 13px; font-weight: 500; letter-spacing: .02em; }
@media (max-width: 540px) { .card .title { font-size: 14.5px; } .badge { top: 8px; left: 8px; font-size: 10px; padding: 5px 8px; } .stamp { inset: auto 8px 8px 8px; font-size: 12px; padding: 7px 8px; } }
.empty { text-align: center; padding: 70px 20px 120px; color: var(--muted); }
.empty img { width: 92px; margin: 0 auto 18px; }
.empty h3 { font-family: var(--display); font-weight: 400; font-size: 30px; color: var(--ink); margin: 0 0 6px; }
.skeleton .ph { background: linear-gradient(100deg, #fff 30%, #f6f1e3 50%, #fff 70%) 0 0 / 300% 100%; animation: shimmer 1.4s infinite linear; }
@keyframes shimmer { to { background-position: -100% 0; } }

/* ── dialog sheet ── */
dialog.sheet { border: 0; padding: 0; width: min(980px, 100% - 32px); max-height: min(92vh, 900px); border-radius: 26px; background: var(--paper); color: var(--ink); box-shadow: var(--shadow-lg); overflow: hidden; }
dialog.sheet::backdrop { background: rgba(37, 46, 39, .38); backdrop-filter: blur(3px); }
dialog.sheet[open] { animation: pop .35s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(20px) scale(.98); } to { opacity: 1; transform: none; } }
.sheet-inner { display: grid; grid-template-columns: 1fr 1.15fr; max-height: inherit; }
.sheet .media { background: var(--white); position: relative; display: grid; place-items: center; padding: 36px; min-height: 100%; border-right: 1px solid var(--line); }
.sheet .media img { max-height: 420px; object-fit: contain; }
.sheet .content { overflow-y: auto; padding: 30px 32px 30px; max-height: min(92vh, 900px); }
.sheet .close { position: absolute; top: 14px; right: 14px; z-index: 3; }
.sheet h2 { font-family: var(--sans); font-weight: 500; font-size: clamp(22px, 2.6vw, 27px); line-height: 1.22; letter-spacing: -.005em; margin: 8px 0 8px; color: var(--ink); }
.sheet .success h2 { font-family: var(--display); font-weight: 400; font-size: clamp(30px, 3.6vw, 38px); color: var(--lilac-ink); }
.sheet .pricerow { display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap; color: var(--ink-2); }
.sheet .pricerow strong { font-size: 22px; font-weight: 500; color: var(--ink); }
.sheet .note { margin: 14px 0 0; padding: 12px 14px; background: var(--blue-soft); border-radius: var(--radius-s); font-size: 14.5px; color: #3f557d; }
@media (max-width: 760px) {
  dialog.sheet { width: 100%; max-width: 100%; max-height: 94vh; margin: auto 0 0; border-radius: 26px 26px 0 0; }
  dialog.sheet[open] { animation: slideup .4s var(--ease); }
  .sheet-inner { grid-template-columns: 1fr; overflow-y: auto; max-height: 94vh; }
  .sheet .media { padding: 22px; min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .sheet .media img { max-height: 220px; }
  .sheet .content { max-height: none; overflow: visible; padding: 22px 20px calc(28px + env(safe-area-inset-bottom)); }
}
@keyframes slideup { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }

.step { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.step-h { display: flex; gap: 12px; align-items: baseline; margin-bottom: 12px; }
.step-h .n { font-family: var(--display); font-size: 26px; line-height: 1; color: var(--lilac); min-width: 18px; }
.step-h h3 { margin: 0; font-size: 17px; font-weight: 500; }
.step-h p { margin: 2px 0 0; font-size: 14px; color: var(--muted); }
.step.locked { opacity: .45; pointer-events: none; }

.opts { display: grid; gap: 10px; }
.opt { position: relative; display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--white); cursor: pointer; transition: border-color .2s, box-shadow .2s, background .2s; }
.opt:hover { border-color: var(--lilac); }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt .dot { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line-2); margin-top: 2px; display: grid; place-items: center; transition: border-color .2s; }
.opt .dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--lilac-deep); transform: scale(0); transition: transform .2s var(--ease); }
.opt:has(input:checked) { border-color: var(--lilac-deep); box-shadow: 0 0 0 3px var(--lilac-soft); }
.opt:has(input:checked) .dot { border-color: var(--lilac-deep); }
.opt:has(input:checked) .dot::after { transform: scale(1); }
.opt:has(input:focus-visible) { outline: 2px solid var(--lilac-deep); outline-offset: 2px; }
.opt b { font-weight: 500; display: block; }
.opt .addr { font-size: 14px; color: var(--muted); white-space: pre-line; margin-top: 2px; }
.addrbox { margin-top: 12px; padding: 16px; border-radius: 16px; background: var(--lilac-soft); display: grid; gap: 10px; }
.addrbox pre { margin: 0; font: 400 15px/1.5 var(--sans); white-space: pre-wrap; color: var(--ink); }
.addrbox .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.addrbox .instr { font-size: 13.5px; color: var(--ink-2); }
.callout { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 14px; padding: 12px 14px; background: var(--blush-soft); color: var(--blush-deep); border-radius: var(--radius-s); font-size: 14.5px; animation: rise .4s var(--ease); }
.formgrid { display: grid; gap: 14px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 999px; background: var(--white); }
.qty button { width: 44px; height: 44px; border: 0; background: none; cursor: pointer; font-size: 20px; color: var(--ink-2); }
.qty output { min-width: 28px; text-align: center; font-weight: 500; }

.success { text-align: center; padding: 26px 8px 8px; }
.success img { width: 86px; margin: 0 auto 10px; animation: rise .6s var(--ease) both; }
.success h2 { color: var(--lilac-ink); }
.success p { color: var(--ink-2); max-width: 400px; margin: 8px auto 0; }
.success .acts { display: grid; gap: 10px; margin-top: 22px; }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 100; transform: translate(-50%, 20px); opacity: 0; background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: 999px; font-size: 14.5px; box-shadow: var(--shadow-lg); transition: opacity .25s, transform .25s var(--ease); pointer-events: none; max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

footer.foot { text-align: center; padding: 34px 20px 54px; color: var(--muted); font-size: 13.5px; background: var(--greige); }
footer.foot img { width: 46px; margin: 0 auto 8px; opacity: .9; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }

/* sprig art carries an ivory ground — multiply it into any light surface */
img[src*="sprig"], img[src*="posy"] { mix-blend-mode: multiply; }

@media (max-width: 700px) { .arch .name { font-size: clamp(24px, 7.2vw, 32px); white-space: nowrap; margin-top: 22px; } }
