:root {
  color-scheme: light;
  --paper: #f5f5ee;
  --white: #fffefa;
  --ink: #192e25;
  --muted: #465b51;
  --green: #204d3d;
  --green-dark: #143b2d;
  --mint: #e8f0df;
  --line: #d7e1d6;
  --control-line: #82978a;
  --focus: #315d8b;
  --radius: 16px;
  --page-gutter: clamp(16px, 4vw, 40px);
  --gift-width: 200px;
  --gap: 12px;
  --banner-fade: linear-gradient(90deg, transparent, #0002 17%, #0007 43%, #000d 72%, #000 98%);
  --featured-fade: linear-gradient(90deg, transparent, #0002 7%, #0009 16%, #000 29%);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 175px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.5 system-ui, "Segoe UI", sans-serif; }
button, input, select, textarea { font: inherit; }
button, summary { cursor: pointer; }
button:disabled { cursor: default; opacity: .7; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
img, svg { display: block; max-width: 100%; }
a { color: var(--green); text-underline-offset: .2em; }
h1, h2, h3, p { margin: 0; }
.sub { color: var(--muted); font-size: .88rem; overflow-wrap: anywhere; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
:focus:not(:focus-visible) { outline: none; }
.skip-link {
  position: fixed; z-index: 20; top: 8px; left: 8px; padding: 9px 14px; border-radius: 8px;
  background: var(--green-dark); color: white; transform: translateY(-150%);
}
.skip-link:focus { transform: none; }

.btn, .banner-action, .tab, .person, .tab-add {
  display: inline-flex; min-height: 44px; align-items: center; justify-content: center;
  gap: 7px; padding: 8px 13px; border: 1px solid var(--line); border-radius: 11px;
  color: var(--green-dark); background: var(--white); font-weight: 720; font-size: .9rem;
  line-height: 1.24; text-align: center; text-decoration: none; overflow-wrap: anywhere;
  transition: background-color .15s, border-color .15s;
}
.btn:hover, .person:hover, .tab:hover { background: #edf2e8; }
.btn.primary { color: #fff; background: var(--green); border-color: var(--green); }
.btn.primary:hover { background: var(--green-dark); border-color: var(--green-dark); }
.btn.text { background: transparent; border-color: transparent; }
.btn.text:hover { background: var(--mint); }
.btn.soft { background: var(--mint); }
.btn.small { padding-inline: 10px; font-size: .83rem; }
.btn svg, .banner-action svg, .tab svg, .contact-icon { width: 18px; height: 18px; flex: none; }

.site-header { position: sticky; inset: 0 0 auto; z-index: 4; background: var(--white); border-bottom: 1px solid var(--line); }
.site-bar, .main { width: min(100%, 1200px); margin-inline: auto; padding-inline: var(--page-gutter); }
.site-bar {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "brand account" "actions actions";
  align-items: center; gap: 5px 12px; padding-block: 9px 10px;
}
.site-bar > .site-brand { grid-area: brand; }
.site-brand img { width: min(146px, 100%); height: auto; }
.site-actions { grid-area: actions; display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.site-actions .btn { padding-inline: 8px; }
.create-menu { position: relative; }
.create-menu summary { list-style: none; width: 100%; }
.create-menu summary::-webkit-details-marker { display: none; }
.menu-panel {
  position: absolute; z-index: 3; inset: calc(100% + 6px) auto auto 0; min-width: 136px;
  display: grid; padding: 5px; background: var(--white); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 9px 24px #172d261c;
}
.menu-panel .btn { justify-content: flex-start; }
.social-people, .purchase-history { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 7px; }
.social-people li, .purchase-history li {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; padding: 8px;
  border: 1px solid var(--line); border-radius: 10px; overflow-wrap: anywhere;
}
.social-people li > div, .purchase-history li > button { margin-left: auto; }
.social-people small, .purchase-history small { display: block; color: var(--muted); }
.social-avatar {
  position: relative; display: grid; place-items: center; flex: none; width: 42px; height: 42px;
  border-radius: 50%; overflow: hidden; background: var(--mint); font-weight: 720; color: var(--green-dark);
}
.social-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.purchase-group + .purchase-group { margin-top: 16px; }
.account-menu { grid-area: account; position: relative; }
.account-menu summary {
  display: flex; align-items: center; justify-content: flex-end; gap: 6px; min-height: 44px; padding: 3px;
  border-radius: 9px; color: var(--green-dark); font-size: .84rem; font-weight: 730; list-style: none;
}
.account-menu summary::-webkit-details-marker { display: none; }
.account-menu summary::after { content: "⌄"; }
.account-avatar {
  display: grid; place-items: center; flex: none; width: 34px; height: 34px;
  border-radius: 50%; background: var(--mint); color: var(--green);
}
.account-menu[open] .account-avatar, .account-menu summary:hover .account-avatar { background: #dce8d3; }
#account-label { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-popover {
  position: absolute; inset: calc(100% + 6px) 0 auto auto; width: min(210px, 85vw); padding: 7px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: 0 9px 24px #172d261c;
}
.account-popover .btn { width: 100%; justify-content: flex-start; }
#account-name { display: block; padding: 7px 10px; font-weight: 730; overflow-wrap: anywhere; }
.main { padding-block: 21px 48px; }

.occasion-menu { margin-bottom: 22px; }
.occasion-heading { font-size: 1.2rem; font-weight: 760; letter-spacing: -.025em; margin-bottom: 10px; }
.occasion-groups { display: grid; gap: 12px 22px; }
.occasion-group { min-width: 0; }
.cap { margin-bottom: 5px; font-size: .8rem; color: var(--muted); font-weight: 730; }
.occasion-items { display: grid; gap: 7px; grid-template-columns: repeat(auto-fit, minmax(min(146px, 100%), 1fr)); }
.eventButton {
  width: 100%; display: flex; align-items: center; gap: 8px; min-height: 54px; padding: 8px 9px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--white); color: var(--ink);
  font-weight: 720; font-size: .85rem; text-align: left; line-height: 1.28;
}
.eventButton > span:nth-child(2) { min-width: 0; overflow-wrap: anywhere; }
.eventButton small { display: block; margin-top: 2px; color: var(--muted); font-weight: 600; font-size: .75rem; }
.occasion-items .eventButton:hover { border-color: var(--control-line); }
.occasion-items .eventButton.active { border-color: var(--accent,var(--green)); background: var(--tint,var(--mint)); box-shadow: inset 3px 0 var(--accent,var(--green)); }
.emoji {
  display: grid; place-items: center; block-size: 31px; inline-size: 31px; flex: none;
  border-radius: 9px; background: var(--tint,#eff1e7); font-size: 17px;
}
.eventButton.active .emoji { background: #fff; }
.occasion-current { margin-left: auto; color: var(--green-dark); font-size: .85rem; font-weight: 800; }

.welcome {
  padding: clamp(22px, 6vw, 64px); border: 1px solid var(--line); border-radius: 24px; background: var(--white);
  display: grid; align-items: center; gap: 18px;
}
.welcome h1 { margin-bottom: 7px; font-size: clamp(1.75rem, 5vw, 2.85rem); line-height: 1.1; letter-spacing: -.045em; overflow-wrap: anywhere; }
.welcome p { color: var(--muted); max-width: 36ch; }
.welcome-art { width: 82px; height: 74px; }
.welcome-art svg { width: 100%; height: 100%; }
.welcome-actions, .list-controls { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.welcome-actions .btn { flex: 1; }

.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center;
  position: relative; isolation: isolate; overflow: hidden; min-height: 158px;
  border-radius: 20px; border: 1px solid var(--accent-line,var(--line)); background: var(--tint,#f3efe3); color: var(--ink);
}
.hero.christmas { --tint:#e7efe4; }
.hero.shower { --tint:#e9f1fb; }
.hero-content { position: relative; z-index: 1; min-width: 0; padding: 16px; }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.hero-meta > span { min-width: 0; }
.chip {
  display: inline-flex; align-items: center; gap: 5px; width: fit-content; max-width: 100%;
  padding: 4px 8px; border: 1px solid #192e2529; border-radius: 99px; background: #fff9;
  font-size: .76rem; font-weight: 720; line-height: 1.3; color: inherit; overflow-wrap: anywhere;
}
.chip.role { background: var(--ink); color: #fff; border-color: transparent; }
.hero h1 {
  margin: 8px 0 5px; font-size: clamp(1.64rem, 4.7vw, 3.2rem);
  line-height: 1.05; font-weight: 780; letter-spacing: -.052em; overflow-wrap: anywhere;
}
.hero p { color: var(--muted); max-width: 49ch; font-size: .92rem; overflow-wrap: anywhere; }
.hero .code { margin-top: 9px; font-variant-numeric: tabular-nums; }
.hero .list-controls { margin-top: 9px; gap: 4px 7px; }
.banner-action { background: transparent; border-color: transparent; color: inherit; padding-inline: 6px; }
.banner-action:hover { background: #192e2514; }
.hero-art { position: relative; width: clamp(82px, 26vw, 160px); padding: 3px 7px 3px 0; }
.hero-art svg, .hero-art img { width: 100%; height: auto; max-height: 184px; object-fit: contain; }
.hero-portrait, .hero-integrated-photo { --photo-position: var(--photo-mobile,center); }
.hero-portrait { width: clamp(78px, 27vw, 135px); margin-right: 11px; aspect-ratio: 1; padding: 4px; background: #fff9; border: 1px solid #fff; border-radius: 50%; }
.hero-portrait img, .hero-integrated-photo img {
  width: 100%; height: 100%; object-fit: cover; object-position: var(--photo-position,center);
}
.hero-portrait img { border-radius: 50%; }
.hero.has-integrated-photo { grid-template-columns: minmax(0, 65%) 1fr; }
.hero-integrated-photo { position: absolute; inset: 0 0 0 auto; width: 53%; pointer-events: none; mask-image: var(--banner-fade); }
.hero.custom-header-color[data-color] { background: var(--header-color); color: var(--header-ink); }
.hero.custom-header-color p { color: inherit; }
.hero.custom-header-color .chip { background: color-mix(in srgb,currentColor 8%,transparent); border-color: color-mix(in srgb,currentColor 28%,transparent); }
.hero.custom-header-color .chip.role { color: inherit; }
.hero.custom-header-color .banner-action:focus-visible { outline-color: currentColor; }
.hero.has-featured-photo[data-color], .photo-demo[data-layout="featured"][data-photo="true"] {
  background: color-mix(in srgb,var(--header-color,var(--accent,#542f50)) 9%,#fffdfa); color: #1b332a;
}
.hero.has-featured-photo { display: flex; flex-direction: column; align-items: stretch; }
.hero.has-featured-photo .hero-integrated-photo { position: relative; inset: auto; order: -1; width: 100%; aspect-ratio: 16/9; mask-image: none; }
.hero.has-featured-photo p { color: var(--muted); }
.hero.has-featured-photo .chip { color: inherit; border-color: #1b332a25; background: #fff9; }

.metric {
  display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px 11px; margin: 13px 0 16px; padding: 12px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--white);
}
.metric small { display: block; color: var(--muted); font-size: .74rem; }
.metric b { display: block; font-size: .95rem; line-height: 1.3; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.metric b.over { color: #8c3229; }
.budget-overview { grid-column: 1/-1; }
.budget-overview small { margin-top: 5px; }
.bar { display: flex; block-size: 8px; overflow: hidden; border-radius: 99px; background: #e4e9e1; }
.bar i { flex: none; background: #36704a; }
.bar .budget-committed { background: #a27028; }

.tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 13px 0 21px; padding-bottom: 9px; border-bottom: 1px solid var(--line); }
.tabs > * { max-width: 100%; }
.tab { padding-inline: 10px; background: transparent; border-color: transparent; color: var(--muted); }
.tab.active { background: var(--mint); color: var(--green-dark); border-color: var(--green); }
.tab.tab-purchased { background: #fbefdc; color: #63451c; }
.tab.tab-purchased.active { color: #fff; background: #654418; border-color: #654418; }
.tab-add { width: 44px; padding: 0; border-style: dashed; font-size: 1.25rem; }
.tab-add:hover { background: var(--mint); }
.section-head { display: flex; align-items: flex-start; flex-wrap: wrap; justify-content: space-between; gap: 7px 12px; margin-bottom: 13px; }
.section-head h2, #section > h2 { font-size: clamp(1.3rem, 3vw, 1.75rem); line-height: 1.16; letter-spacing: -.035em; overflow-wrap: anywhere; }
.section-head p { margin-top: 3px; color: var(--muted); font-size: .9rem; }
.people { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 13px; }
.person.active { background: var(--mint); border-color: var(--green); }
.empty { display: grid; gap: 4px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); color: var(--muted); }
.empty strong { color: var(--ink); }
.empty + .grid { margin-top: 12px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%,var(--gift-width)),var(--gift-width))); gap: var(--gap); align-items: start; }
.card {
  position: relative; min-width: 0; overflow: hidden; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--white); color: var(--ink);
}
.card .art { position: relative; display: grid; place-items: center; aspect-ratio: 4/3; overflow: hidden; background: var(--tile,#e8eee1); }
.art img, .art svg { width: 100%; height: 100%; object-fit: cover; }
.art.unavailable > :is(img,svg) { opacity: .43; }
.art .overlay {
  position: absolute; max-width: 94%; padding: 4px 7px; border: 1px solid #6f776e; border-radius: 8px;
  color: #29392e; background: #fff; text-align: center; font-size: .77rem; font-weight: 750;
}
.cardbody { display: block; padding: 10px; }
.card h3 { margin: 4px 0 3px; font-size: .95rem; line-height: 1.28; overflow-wrap: anywhere; }
.card p { font-size: .8rem; color: var(--muted); overflow-wrap: anywhere; }
.card .gift-description { margin-top: 4px; }
.card .price { margin-top: 7px; color: var(--ink); overflow-wrap: anywhere; }
.price strong { display: block; font-size: 1rem; font-variant-numeric: tabular-nums; }
.price small { display: block; color: var(--muted); font-size: .73rem; }
.flag { display: inline-block; max-width: 100%; border-radius: 8px; padding: 3px 6px; background: var(--mint); color: var(--green-dark); font-size: .73rem; font-weight: 750; line-height: 1.3; }
.flag.reserved { background: #f6e5bb; color: #63420e; }
.flag.paid { background: #e2edda; color: #234a2b; }
.flag.funding { background: #e6ecfa; color: #303e71; }
.flag.unavailable { background: #ecefea; color: #3d4c42; }
.card[data-status="reserved"] { border-color: #c9a469; background: #fffcf2; }
.card[data-status="paid"] { border-color: #bf9b63; background: #fff9eb; }
.card[data-status="funding"] { border-color: #a8b8df; background: #f8faff; }
.card .purchase-buyer, .card .reservation-buyer { font-weight: 700; }
.card-action { display: grid; gap: 5px; margin-top: 9px; align-items: start; }
.card-action a { display: flex; align-items: center; min-height: 44px; justify-content: center; text-align: center; font-size: .8rem; }
.purchase-add { display: grid; min-height: 198px; width: 100%; padding: 0; text-align: left; color: var(--green-dark); font: inherit; border-style: dashed; border-color: var(--control-line); }
.purchase-add .cardbody { font-size: .91rem; font-weight: 760; }
.purchase-add .art { width: 100%; background: #ebf1e6; }
.purchase-add:hover { background: #eef4e9; border-color: var(--green); }
.purchase-add-icon { display: grid; place-items: center; inline-size: 45px; block-size: 45px; border-radius: 50%; background: var(--white); color: var(--green); font-size: 1.55rem; }
.purchase-ribbon { position: absolute; inset: 0; pointer-events: none; filter: drop-shadow(0 1px 2px #4e391c45); }
.purchase-ribbon::before,.purchase-ribbon::after,.purchase-ribbon i { position:absolute; content:""; background:linear-gradient(90deg,#bd873e,#efc986 48%,#bd873e); }
.purchase-ribbon::before { inset: 0 22px 0 auto; width: 11px; }
.purchase-ribbon::after { inset: 23px 0 auto; height: 8px; }
.purchase-ribbon i { z-index: 1; top: 20px; right: 22px; width: 11px; height: 13px; border: 1px solid #996527; border-radius: 4px; }
.purchase-ribbon i::before,.purchase-ribbon i::after { position:absolute; top:-7px; width:16px; height:11px; content:""; border:3px solid #d59d52; border-radius:55% 60% 48% 55%; }
.purchase-ribbon i::before { right: 7px; transform: rotate(24deg); }
.purchase-ribbon i::after { left: 7px; transform: rotate(-24deg); }
.funding-progress { display: grid; gap: 5px; margin-top: 8px; padding: 7px; border-radius: 9px; background: #eaf0fc; color: #263c63; }
.funding-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 4px; }
.funding-top strong { display: block; font-size: .93rem; }
.funding-top small, .funding-percent { color: #3c537a; font-size: .72rem; }
.funding-percent { padding: 2px 4px; border-radius: 6px; background: white; font-weight: 780; white-space: nowrap; }
.funding-progress progress { display: block; width: 100%; height: 7px; border: 0; border-radius: 8px; overflow: hidden; background: #d1dbef; appearance: none; }
.funding-progress progress::-webkit-progress-bar { background: #d1dbef; }
.funding-progress progress::-webkit-progress-value { background: #4866a2; }
.funding-progress progress::-moz-progress-bar { background: #4866a2; }
.card .funding-remaining, .funding-people span { font-weight: 760; }
.funding-own { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 2px 6px; padding-top: 4px; border-top: 1px solid #c8d6ed; font-size: .74rem; }
.ledger { display: grid; gap: 9px; }
.entry { display: grid; gap: 8px; padding: 13px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.entry h3 { font-size: 1rem; overflow-wrap: anywhere; }
.entry-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.entry-actions strong { font-variant-numeric: tabular-nums; }

.dialog {
  width: min(calc(100% - 24px),525px); max-height: min(90dvh,780px); padding: 0;
  border: 1px solid var(--line); border-radius: 21px; background: var(--white); color: var(--ink); overflow: auto;
}
.dialog::backdrop { background: #14251eb3; }
.dialog:not(:has(.dialog-heading)) { padding: 18px; }
.dialog h2 { font-size: 1.32rem; line-height: 1.2; letter-spacing: -.027em; overflow-wrap: anywhere; }
.dialog-heading { position: sticky; top: 0; z-index: 2; padding: 16px 16px 11px; border-bottom: 1px solid var(--line); background: var(--white); }
.dialog-fields { padding: 8px 16px 15px; }
.dialog-actions { position: sticky; bottom: 0; z-index: 2; padding: 9px 16px 12px; border-top: 1px solid var(--line); background: var(--white); }
.dialog footer { display: flex; flex-wrap: wrap; gap: 7px; justify-content: flex-end; }
 #reauth-form footer { margin-top: 12px; }
.dialog label { display: grid; gap: 4px; margin: 10px 0; font-size: .88rem; font-weight: 710; overflow-wrap: anywhere; }
.dialog :is(input,select,textarea):not([type=checkbox],[type=radio],[type=file],[type=hidden]) {
  width: 100%; min-width: 0; min-height: 44px; padding: 8px 10px;
  border: 1px solid var(--control-line); border-radius: 9px; background: #fff; color: var(--ink); font-size: 1rem;
}
.dialog textarea { min-height: 78px; resize: vertical; }
.dialog label.inline { display: flex; align-items: center; min-height: 36px; gap: 8px; }
.dialog [type=checkbox] { width: 18px; height: 18px; flex: none; accent-color: var(--green); }
.formnote { margin-top: 5px; color: var(--muted); font-size: .83rem; overflow-wrap: anywhere; }
.error { margin: 3px 0 8px; color: #902f27; font-size: .85rem; font-weight: 670; overflow-wrap: anywhere; }
.error:empty, .photo-controls .formnote:empty { display: none; }
.wizard-progress { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin: 4px 0 13px; padding: 0; list-style: none; }
.wizard-progress li { display: grid; justify-items: center; align-content: center; gap: 3px; min-height: 47px; padding: 4px 2px; border-bottom: 2px solid var(--line); color: var(--muted); text-align: center; font-size: .8rem; font-weight: 730; }
.wizard-progress li[aria-current="step"] { border-color: var(--green); border-radius: 9px 9px 0 0; background: var(--mint); color: var(--green-dark); }
.wizard-progress li.done { border-color: #739a75; }
.wizard-progress li:has(.wizard-step-link) { padding: 0; }
.wizard-step-link { display: grid; place-items: center; width: 100%; min-height: 47px; padding: 4px 2px; border: 0; border-radius: 9px 9px 0 0; background: transparent; color: inherit; }
.wizard-step-link:hover { background: var(--mint); }
.wizard-fields { min-width: 0; margin: 0; padding: 0; border: 0; }
.wizard-fields legend { font-weight: 740; font-size: .9rem; }
.wizard-fields .formnote { margin: -4px 0 10px; }
.dialog footer [data-act="wizard-back"] { margin-right: auto; }
.dialog label.photo-pick {
  position: relative; display: flex; align-items: center; gap: 10px; min-height: 67px; padding: 10px;
  border: 1px dashed var(--control-line); border-radius: 12px; background: #eff5ec; cursor: pointer;
}
.photo-pick:hover,.photo-pick:focus-within { border-color: var(--green); background: var(--mint); }
.photo-pick:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.dialog .photo-pick input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.photo-icon { display: grid; place-items: center; flex: 0 0 35px; height: 35px; border-radius: 9px; background: var(--green); color: #fff; font-size: 1.22rem; }
.photo-pick small { display: block; color: var(--muted); overflow-wrap: anywhere; font-weight: 560; }
.photo-url summary,.purchase-details summary { display: list-item; min-height: 35px; color: var(--green-dark); font-weight: 740; font-size: .88rem; }
.purchase-details { margin-top: 12px; }
.photo-alternatives { display: flex; gap: 6px; margin-bottom: 6px; }
.header-personalize { margin-top: 10px; }
.header-personalize summary { display: flex; justify-content: space-between; list-style: none; }
.header-personalize summary::-webkit-details-marker { display: none; }
.header-personalize summary::after { content: "+"; }
.header-personalize[open] summary::after { content: "−"; }
.photo-delete { min-height: 44px; padding: 5px 9px; border: 0; border-radius: 8px; background: transparent; color: #8e2e25; font-size: .88rem; font-weight: 740; }
.photo-delete:hover { background: #f8e9e4; }
.photo-previews { display: grid; gap: 8px; }
.photo-preview-device { display: grid; gap: 4px; margin: 0; }
.photo-preview-device figcaption { color: var(--muted); font-size: .78rem; font-weight: 720; }
.photo-preview-mobile { width: min(100%,276px); }
.photo-demo { position: relative; display: grid; align-items: center; isolation: isolate; aspect-ratio: 390/185; padding: 8px 12px; overflow: hidden; border-radius: 11px; background: var(--header-color,var(--tint,#f3efe3)); color: var(--header-ink,var(--ink)); }
.photo-demo[data-device="desktop"] { aspect-ratio: 4/1; }
.photo-demo-title { position: relative; z-index: 1; max-width: 62%; font-size: .84rem; font-weight: 760; overflow-wrap: anywhere; pointer-events: none; }
.photo-demo-fallback { position: absolute; inset: 0 0 0 auto; width: 42%; }
.photo-demo-fallback svg { width: 100%; height: 100%; }
.photo-demo-image { touch-action: none; cursor: grab; user-select: none; }
.photo-demo-image:active { cursor: grabbing; }
.photo-demo-image:focus-visible { outline-offset: -3px; }
.photo-demo-image img,.gift-photo-preview img { width: 100%; height: 100%; object-fit: cover; object-position: var(--photo-position,center); }
.photo-demo[data-layout="portrait"] .photo-demo-image { position: absolute; right: 4%; top: 50%; transform: translateY(-50%); width: 29%; aspect-ratio: 1; overflow: hidden; border-radius: 50%; border: 2px solid #fff; }
.photo-demo[data-device="desktop"][data-layout="portrait"] .photo-demo-image { width: 19%; }
.photo-demo[data-layout="integrated"] .photo-demo-image { position: absolute; inset: 0 0 0 auto; width: 53%; mask-image: var(--banner-fade); }
.photo-demo[data-device="desktop"][data-layout="integrated"] .photo-demo-image { width: 57%; }
.photo-demo[data-device="desktop"][data-layout="featured"] .photo-demo-title { max-width: 37%; }
.photo-demo[data-layout="featured"] .photo-demo-image { position: absolute; inset: 0 0 0 auto; width: 66%; mask-image: var(--featured-fade); }
.photo-demo[data-device="mobile"][data-layout="featured"][data-photo="true"] { aspect-ratio: 4/3; align-items: end; }
.photo-demo[data-device="mobile"][data-layout="featured"][data-photo="true"] .photo-demo-title { max-width: 100%; }
.photo-demo[data-device="mobile"][data-layout="featured"] .photo-demo-image { inset: 0 0 auto; width: 100%; aspect-ratio: 16/9; mask-image: none; }
.dialog #header-color-field input { width: 72px; min-height: 44px; padding: 3px; cursor: pointer; }
.gift-photo-preview { width: min(180px,100%); height: 103px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; }
.color-palette { margin-top: 10px; }
#selected-color { margin-left: 5px; color: var(--muted); font-weight: 550; }
.color-swatches { display: grid; grid-template-columns: repeat(auto-fit,minmax(37px,1fr)); gap: 3px; margin-top: 5px; }
.dialog label.color-option { position: relative; display: grid; place-items: center; min-height: 39px; margin: 0; cursor: pointer; }
.color-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.color-option span { width: 26px; height: 26px; border: 1px solid #172d2655; border-radius: 50%; background: var(--swatch,var(--accent)); }
.color-option input:checked + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.color-option input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 3px; }
.tag-preview { padding: 9px; border: 1px solid var(--line); border-radius: 11px; background: #f7faf4; }
.tag-preview .formnote { margin: 0 0 5px; }
.tag-preview .eventButton { background: var(--tint,var(--mint)); border-color: var(--accent-line,var(--line)); }
.budget-stepper { display: inline-flex; align-items: stretch; min-height: 48px; border: 1px solid var(--control-line); border-radius: 10px; }
.budget-value { display: flex; align-items: center; padding-inline: 10px; font-weight: 750; font-variant-numeric: tabular-nums; }
.dialog .budget-value input[type=number] { width: calc(var(--digits,2) * 1ch + .18ch); min-width: 1ch; min-height: 0; box-sizing: content-box; padding: 0; border: 0; background: transparent; font-weight: inherit; appearance: textfield; }
.budget-value input::-webkit-inner-spin-button,.budget-value input::-webkit-outer-spin-button { appearance: none; margin: 0; }
.budget-arrows { display: grid; border-left: 1px solid var(--line); }
.budget-arrows button { width: 36px; min-height: 26px; padding: 0; border: 0; background: transparent; color: var(--green); font-size: .69rem; }
.budget-arrows button:first-child { border-bottom: 1px solid var(--line); }
.budget-arrows button:hover { background: var(--mint); }
.toast { position: fixed; z-index: 7; inset: auto 12px 12px auto; max-width: min(calc(100% - 24px),400px); padding: 9px 13px; border-radius: 10px; background: var(--green-dark); color: white; font-weight: 650; font-size: .88rem; box-shadow: 0 8px 23px #172d2630; }
.toast:empty { padding: 0; background: transparent; box-shadow: none; pointer-events: none; }

@media (max-width: 460px) {
  :root { --gift-width: 156px; }
  .grid { justify-content: center; gap: 10px; }
}
@media (min-width: 621px) {
  html { scroll-padding-top: 78px; }
  .site-bar { grid-template-columns: minmax(0,1fr) auto auto; grid-template-areas: "brand actions account"; gap: 12px; min-height: 67px; }
  .site-actions { display: flex; }
  .site-actions .btn { padding-inline: 13px; }
  .main { padding-block: 27px 58px; }
  .occasion-groups { grid-template-columns: repeat(auto-fit,minmax(min(300px,100%),1fr)); }
  .occasion-items { display: flex; flex-wrap: wrap; }
  .occasion-items .eventButton { width: fit-content; max-width: min(100%,244px); min-width: 146px; }
  .hero { min-height: 214px; border-radius: 24px; }
  .hero-content { padding: 24px; }
  .hero-art { width: clamp(170px,28vw,258px); padding-right: 17px; }
  .hero-portrait,.hero-integrated-photo { --photo-position: var(--photo-desktop,center); }
  .hero-portrait { width: clamp(138px,20vw,205px); margin-right: 24px; padding: 5px; }
  .hero-integrated-photo { width: 56%; }
  .hero.has-featured-photo { display: grid; grid-template-columns: minmax(0,41%) 1fr; align-items: center; min-height: 245px; }
  .hero.has-featured-photo .hero-content { padding-right: 7px; }
  .hero.has-featured-photo .hero-integrated-photo { position: absolute; inset: 0 0 0 auto; width: 65%; aspect-ratio: auto; mask-image: var(--featured-fade); }
  .metric { padding: 16px 18px; }
  .metric b { font-size: 1.12rem; }
  .metric small { font-size: .8rem; }
  .cardbody { padding: 12px; }
  .card h3 { font-size: 1.01rem; }
  .entry { display: flex; align-items: center; justify-content: space-between; }
  .dialog-heading { padding-inline: 21px; }
  .dialog-fields { padding-inline: 21px; }
  .dialog-actions { padding-inline: 21px; }
}
@media (min-width: 1000px) {
  .occasion-menu { margin-bottom: 26px; }
  .hero { min-height: 236px; }
  .hero-content { padding: 29px 32px; }
  .hero.has-featured-photo { min-height: 277px; }
  .hero-art { margin-right: 26px; }
  .hero-portrait { margin-right: 43px; }
  .welcome { grid-template-columns: 90px minmax(0,1fr); max-width: 720px; margin-top: 20px; gap: 24px; }
  .welcome-actions .btn { flex: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* La misma estructura para listas, amistades y compras. */
:root {
  --paper: #faf8f6;
  --white: #fffdfa;
  --ink: #171d19;
  --green: #134a32;
  --green-dark: #103a29;
  --mint: #e8eee1;
  --line: #e2ded9;
  --sidebar-width: clamp(216px, 19.4vw, 310px);
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.site-header { background: var(--paper); }
.site-bar {
  width: 100%; display: grid; grid-template-columns: minmax(0,1fr) auto; grid-template-areas: "brand tools" "actions actions";
  gap: 7px 10px; padding: 10px 14px; align-items: center;
}
.site-bar .site-brand img { width: clamp(132px, 26vw, 228px); }
.site-tools { grid-area: tools; display: flex; align-items: center; gap: 8px; }
.site-tools .create-menu { order: 2; }
.site-actions { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 4px; }
.site-actions .btn { background: transparent; border-color: transparent; color: var(--muted); line-height: 1.15; }
.site-actions .btn:hover, .site-actions .btn[aria-current="page"] { background: var(--mint); color: var(--green-dark); }
.create-menu summary { white-space: nowrap; }
.menu-panel { inset-inline: auto 0; }
.site-tools .account-menu summary::after { display: none; }
.site-tools #account-label { display: none; }
.site-tools .account-menu summary { padding: 0; }
.main { width: 100%; padding: 0; display: grid; min-height: calc(100svh - 112px); align-content: start; }
.occasion-menu { margin: 0; min-width: 0; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.mobile-context { display: block; }
.mobile-context select { color: var(--green-dark); font-weight: 720; width: 100%; min-height: 44px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--white); }
.context-items { display: none; }
.context-button {
  display: flex; align-items: center; width: 100%; min-height: 45px; gap: 10px; padding: 9px 13px;
  background: transparent; color: var(--ink); border: 1px solid transparent; border-radius: 10px;
  text-align: left; font-size: .99rem; font-weight: 630; line-height: 1.28; overflow-wrap: anywhere;
}
.context-button svg { width: 21px; height: 21px; flex: none; }
.occasion-items .context-button { width: 100%; max-width: none; min-width: 0; }
.context-button:hover, .context-button.active, .occasion-items .context-button.active {
  background: var(--mint); color: var(--green-dark); border-color: transparent; box-shadow: none;
}
.context-button small { margin-left: auto; margin-top: 0; padding: 1px 6px; border-radius: 6px; background: #dce5d8; color: var(--green-dark); font-weight: 720; }
.context-items .occasion-items, .context-items .occasion-groups { display: grid; gap: 3px; }
.context-items .occasion-group .cap { margin: 12px 12px 4px; }
#view { min-width: 0; padding: 25px 14px 44px; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; column-gap: 22px; margin-bottom: 25px; }
.page-heading h1 { font-size: clamp(2rem,4.1vw,3.8rem); line-height: 1.09; letter-spacing: -.05em; font-weight: 770; overflow-wrap: anywhere; }
.page-heading p { margin-top: 10px; color: var(--muted); font-size: clamp(.95rem,1.4vw,1.22rem); overflow-wrap: anywhere; }
.page-heading .list-controls { margin-top: 4px; }
.page-heading .banner-action { border-color: var(--line); padding-inline: 8px; }
.list-description { margin: -10px 0 16px; color: var(--muted); overflow-wrap: anywhere; }
.wishlist-content > .section-head { margin-bottom: 8px; }
.wishlist-content > .section-head:has(h2:only-child) { display: none; }
.wishlist-content .grid, .list-grid {
  display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; justify-content: start; align-items: stretch;
}
.wishlist-content .card, .list-grid .card { width: 100%; min-width: 0; border-radius: 13px; }
.wishlist-content .card .art { aspect-ratio: 4/3; }
.wishlist-content .cardbody { padding: 11px; }
.wishlist-content .card h3 { font-size: clamp(.97rem,1.45vw,1.22rem); overflow-wrap: anywhere; }
.wishlist-content .card .price { margin-top: 5px; }
.wishlist-content .card-action .btn { background: transparent; }
.list-add { display: grid; align-content: center; justify-items: center; gap: 7px; padding: 12px; min-height: 172px; color: var(--green-dark); font-weight: 750; line-height: 1.25; }
.list-add span { font-size: 2.8rem; font-weight: 440; line-height: .96; }
.list-add:hover { background: var(--mint); border-color: var(--control-line); }
.linked-lists { display: flex; flex-wrap: wrap; gap: 4px 11px; margin: 8px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: .75rem; }
.linked-lists li { display: flex; gap: 4px; align-items: center; }
.linked-lists svg { width: 14px; height: 14px; flex: none; }
.people-search { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 9px; max-width: 740px; margin-bottom: 20px; }
.people-search label { display: flex; min-width: 0; align-items: center; gap: 8px; background: var(--white); border: 1px solid var(--control-line); border-radius: 11px; padding-inline: 10px; }
.people-search svg { width: 21px; height: 21px; color: var(--muted); flex: none; }
.people-search input { font: inherit; color: var(--ink); background: transparent; min-width: 0; width: 100%; min-height: 46px; padding: 5px 0; border: 0; }
.people-search input:focus { outline: none; }
.people-search label:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.social-people { gap: 10px; }
.social-people li { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 8px 14px; background: var(--white); padding: 12px; }
.social-people li > strong { overflow-wrap: anywhere; }
.social-people li > div { grid-column: 2; justify-self: start; margin: 0; display: flex; gap: 4px; flex-wrap: wrap; }
.social-avatar { width: 54px; height: 54px; }
.friend-list-links { padding: 0; list-style: none; }
.purchase-group { margin: 0 0 24px; }
.purchase-group h2 { font-size: clamp(1.13rem,2.25vw,1.6rem); letter-spacing: -.02em; }
.purchase-history li { display: grid; grid-template-columns: 58px minmax(0,1fr) auto; gap: 8px; padding: 8px; background: var(--white); }
.purchase-history .art { width: 100%; aspect-ratio: 1; border-radius: 9px; overflow: hidden; }
.purchase-history .art :is(img,svg) { width: 100%; height: 100%; object-fit: cover; }
.purchase-title { min-width: 0; overflow-wrap: anywhere; }
.purchase-title strong { display: block; }
.purchase-history .flag { margin: 0; text-align: center; }
.purchase-actions { grid-column: 2 / -1; }
.btn.outline { border-color: var(--green); color: var(--green-dark); }
@media (max-width: 420px) {
  .people-search { grid-template-columns: minmax(0,1fr); }
  .people-search .btn { justify-self: start; }
  .people-search input { font-size: .94rem; }
}
@media (min-width: 768px) {
  html { scroll-padding-top: 90px; }
  .site-bar { grid-template-columns: var(--sidebar-width) minmax(0,1fr) auto; grid-template-areas: "brand actions tools"; gap: 0; padding: 12px 20px; min-height: 70px; }
  .site-actions { display: flex; gap: clamp(6px,1.8vw,22px); }
  .site-actions .btn { padding-inline: clamp(10px,1.4vw,22px); font-size: clamp(.9rem,1.35vw,1.15rem); }
  .site-tools { gap: 12px; }
  .site-tools .account-menu summary { padding-inline: 2px; }
  .main { grid-template-columns: var(--sidebar-width) minmax(0,1fr); min-height: calc(100svh - 70px); align-content: stretch; }
  .occasion-menu { border-bottom: 0; border-right: 1px solid var(--line); padding: 35px 10px 24px; }
  .mobile-context { display: none; }
  .context-items { display: grid; gap: 3px; }
  #view { padding: clamp(28px,4vw,55px) clamp(22px,3vw,48px) 48px; }
  .wishlist-content .grid, .list-grid { grid-template-columns: repeat(auto-fill,minmax(min(100%,182px),1fr)); gap: 14px; }
  .social-people li { grid-template-columns: auto minmax(0,1fr) auto; align-items: center; padding: 15px; }
  .social-people li > div { grid-column: auto; justify-self: end; }
  .social-avatar { width: 64px; height: 64px; }
  .people-search { gap: 14px; }
  .people-search .btn { padding-inline: 22px; }
}
@media (min-width: 1100px) {
  .wishlist-content .grid, .list-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .purchase-history li { grid-template-columns: 100px minmax(0,1fr) auto auto; gap: 15px; padding: 10px; }
  .purchase-actions { grid-column: auto; }
  .purchase-title strong { font-size: 1.14rem; }
}

/* Colores de los tags de cumpleaños */
[data-color="plum"]{--accent:#633659;--tint:#f4e8f1;--accent-line:#e8cfe1}
[data-color="forest"]{--accent:#204d3d;--tint:#e6f2e7;--accent-line:#c8dfcb}
[data-color="blue"]{--accent:#2c4671;--tint:#e9effa;--accent-line:#d0dcef}
[data-color="rose"]{--accent:#713349;--tint:#f8e8ec;--accent-line:#eed0d9}
[data-color="teal"]{--accent:#174f53;--tint:#e5f4f3;--accent-line:#bcdedc}
[data-color="violet"]{--accent:#533d79;--tint:#f0eafa;--accent-line:#dcd0ee}
[data-color="terracotta"]{--accent:#783b2d;--tint:#f9eee8;--accent-line:#efd0c3}
[data-color="mustard"]{--accent:#694815;--tint:#fbf1d7;--accent-line:#ebd9aa}
[data-color="slate"]{--accent:#374654;--tint:#ebf0f3;--accent-line:#cbd9e1}
[data-color="raspberry"]{--accent:#7c2d50;--tint:#faeaf2;--accent-line:#efcadd}
[data-color="indigo"]{--accent:#393a73;--tint:#eeeeff;--accent-line:#d6d6f1}
[data-color="olive"]{--accent:#46521d;--tint:#eef2df;--accent-line:#d7e0b7}
[data-color="red"]{--accent:#a2232b;--tint:#ffe4e4;--accent-line:#efb9b9;--swatch:#d9353f}
[data-color="coral"]{--accent:#923d36;--tint:#ffe7de;--accent-line:#f2c1b4;--swatch:#ef7668}
[data-color="peach"]{--accent:#8b481c;--tint:#fff0df;--accent-line:#f0cbb0;--swatch:#ffc193}
[data-color="gold"]{--accent:#745410;--tint:#fff4cb;--accent-line:#eedb96;--swatch:#f0c447}
[data-color="lime"]{--accent:#4c5d0d;--tint:#f0f8ca;--accent-line:#d3e692;--swatch:#c7e85d}
[data-color="jade"]{--accent:#13624b;--tint:#e1f6eb;--accent-line:#afdfc6;--swatch:#22a97d}
[data-color="mint"]{--accent:#2a6253;--tint:#e4faef;--accent-line:#b8e3d3;--swatch:#8cddbb}
[data-color="aqua"]{--accent:#00606a;--tint:#d9f7f8;--accent-line:#a4dedd;--swatch:#3bcbd1}
[data-color="sky"]{--accent:#225c7e;--tint:#e4f5ff;--accent-line:#bddff2;--swatch:#83c9fd}
[data-color="cobalt"]{--accent:#2345a3;--tint:#e6edff;--accent-line:#c8d6fb;--swatch:#3b68eb}
[data-color="lavender"]{--accent:#604581;--tint:#f3eaff;--accent-line:#ddcaef;--swatch:#c0a3ed}
[data-color="pink"]{--accent:#87354d;--tint:#ffebf2;--accent-line:#f3c1d0;--swatch:#f39dbe}
[data-color="sand"]{--accent:#5d4f3d;--tint:#f5eee2;--accent-line:#e4d5bb;--swatch:#d6bb92}
[data-color="charcoal"]{--accent:#2e3031;--tint:#eceeef;--accent-line:#ced3d5}
