:root {
  color-scheme: dark;
  --page: #091221;
  --surface: #111d30;
  --ink: #fff5e5;
  --muted: #afbed1;
  --subtle: #8f9fb6;
  --line: #25334a;
  --gold: #f6cd88;
  --gold-light: #ffe6b4;
  --dark-ink: #241905;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 280px;
  background: radial-gradient(ellipse at 54% 9%, #13243b 0%, var(--page) 46%);
  color: var(--ink);
  font: 1rem / 1.55 var(--sans);
}

a { color: inherit; text-decoration: none; }
button, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
h1, h2, h3, p, figure { margin: 0; }
:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 4px; }
:target, #arbol { scroll-margin-top: 1.25rem; }

.wrap { width: min(1320px, calc(100% - 7rem)); margin-inline: auto; }
.sr-only, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}
.skip-link:focus { position: fixed; top: .75rem; left: .75rem; z-index: 5; padding: .75rem; background: var(--surface); }

.topbar { border-bottom: 1px solid #ffffff13; background: #0a1322ad; }
.topbar-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 4.65rem; gap: 1rem; }
.wordmark { display: inline-flex; align-items: center; justify-self: start; gap: .7rem; }
.brand-star { display: grid; place-items: center; width: 2.1rem; height: 2.1rem; color: var(--gold); font-size: 2rem; line-height: 1; text-shadow: 0 0 18px #f4ba665c; }
.wordmark-text { display: grid; line-height: 1.07; }
.wordmark-text strong { font: 1.38rem / 1 var(--serif); letter-spacing: -.035em; }
.wordmark-text small { margin-top: .25rem; color: var(--muted); font-size: .73rem; }
.nav { display: flex; gap: clamp(1.1rem, 3.1vw, 3.1rem); align-items: center; color: var(--muted); font-size: .91rem; font-weight: 550; }
.nav a { padding: .65rem 0; transition: color .18s; }
.nav a:hover, .nav a:focus-visible { color: var(--gold-light); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  padding: .57rem 1.07rem;
  border: 1px solid transparent;
  border-radius: .65rem;
  gap: .56rem;
  font-size: .91rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  transition: background .18s, border-color .18s, color .18s, box-shadow .18s;
}
.button-gold { background: var(--gold); color: var(--dark-ink); box-shadow: 0 3px 21px #fbc06416; }
.button-gold:hover:not(:disabled) { background: var(--gold-light); box-shadow: 0 4px 24px #fbc06438; }
.button-gold:disabled { opacity: .45; }
.button-outline { border-color: #d5ac6660; background: #162236; color: var(--gold-light); }
.button-outline:hover { border-color: var(--gold); background: #222b37; }
.button-quiet { border-color: var(--line); color: var(--ink); background: transparent; }
.button-quiet:hover { background: #ffffff09; border-color: var(--subtle); }
.topbar-cart { justify-self: end; min-height: 2.6rem; }
.cart-count { display: grid; min-width: 1.32rem; height: 1.32rem; padding-inline: .26rem; place-items: center; border-radius: 99rem; background: var(--gold); color: var(--dark-ink); font-size: .73rem; }
.bag-icon { width: .85rem; height: .76rem; border: 1px solid currentColor; border-radius: 2px; position: relative; margin-top: .16rem; }
.bag-icon::before { position: absolute; content: ''; inset: -.34rem .15rem auto; height: .35rem; border: 1px solid currentColor; border-bottom: 0; border-radius: .35rem .35rem 0 0; }

.overview {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.26fr) minmax(16rem, .86fr);
  align-items: center;
  gap: clamp(.9rem, 1.8vw, 1.7rem);
  padding-block: 2.12rem 2.4rem;
}
.intro { position: relative; z-index: 1; padding-block: 1rem; }
.kicker { display: flex; align-items: center; gap: .65rem; margin-bottom: 1rem; color: var(--gold); font-size: .75rem; text-transform: uppercase; letter-spacing: .14em; font-weight: 750; }
.kicker span { width: 1.25rem; height: 1px; background: #d0a568; }
h1 {
  width: 112%;
  font: 400 clamp(2.85rem, 4.7vw, 4.55rem) / .99 var(--serif);
  letter-spacing: -.062em;
}
h1 em { display: block; margin-top: .11em; font-weight: 400; color: var(--gold); }
.lead { max-width: 24rem; margin-top: 1.4rem; color: var(--muted); font-size: clamp(1rem, 1.23vw, 1.13rem); line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; margin-top: 1.65rem; }
.hero-actions .text-button { min-height: 2.75rem; display: inline-flex; align-items: center; }
.demo-caption { margin-top: .62rem; color: var(--muted); font-size: .83rem; }
.progress { margin-top: 2.2rem; max-width: 24rem; padding-top: 1.3rem; border-top: 1px solid var(--line); }
.progress-heading { display: flex; justify-content: space-between; align-items: end; gap: .5rem; }
.progress-label { color: var(--muted); font-size: .88rem; }
.campaign-amount { margin-top: .12rem; font-size: clamp(1.75rem, 2.75vw, 2.42rem); font-weight: 650; line-height: 1.23; letter-spacing: -.052em; font-variant-numeric: tabular-nums; }
.progress-spark { font: 1.9rem / 1.2 var(--serif); color: var(--gold); }
.milestone-bar { display: block; width: 100%; height: .37rem; overflow: hidden; appearance: none; border: 0; border-radius: 99rem; color: var(--gold); background: #283345; margin: .85rem 0 .62rem; }
.milestone-bar::-webkit-progress-bar { background: #283345; border-radius: inherit; }
.milestone-bar::-webkit-progress-value { background: linear-gradient(90deg, #b37639, #edb96a, #ffe0a0); border-radius: inherit; }
.milestone-bar::-moz-progress-bar { background: linear-gradient(90deg, #b37639, #edb96a, #ffe0a0); border-radius: inherit; }

.tree { min-width: 0; align-self: center; justify-self: stretch; text-align: center; }
.tree:focus { outline: none; }
.tree-stage { position: relative; isolation: isolate; width: min(100%, 28.3rem); margin-inline: auto; aspect-ratio: 4 / 5; }
.tree-stage::before { position: absolute; z-index: -1; inset: 5% 0 1%; content: ''; background: radial-gradient(ellipse at 50% 58%, #c5974318, #18355238 43%, transparent 71%); pointer-events: none; }
.tree-stage.has-3d::before { inset: 1% 0 0; background: radial-gradient(ellipse at 50% 56%, #286074a8 2%, #23485e93 32%, #142f475f 51%, transparent 73%); }
.tree-stage.has-3d::after { position: absolute; z-index: -1; inset: auto 2% 2.5%; height: 15%; content: ''; background: radial-gradient(ellipse at center, #49808b47 0%, #26415a24 39%, transparent 72%); pointer-events: none; }
.tree-art {
  display: block;
  width: 100%;
  height: auto;
  mask-image: linear-gradient(90deg, transparent, #000 11%, #000 89%, transparent), linear-gradient(transparent, #000 6%, #000 91%, transparent);
  mask-composite: intersect;
}
.tree-stage.has-3d .tree-art, .tree-stage.has-3d .tree-lights { visibility: hidden; }
.tree-canvas { position: absolute; z-index: 1; display: block; inset: 0; width: 100%; height: 100%; touch-action: pan-y; cursor: grab; border-radius: .85rem; }
.tree-canvas.is-dragging { cursor: grabbing; }
.tree-canvas:focus-visible { outline-offset: -3px; }
.tree-lights { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.personal-lights { position: absolute; inset: 0; z-index: 2; pointer-events: none; container-type: size; }
.personal-ornament {
  position: absolute;
  width: clamp(3.25rem, 17%, 5rem);
  transform: translate(-50%, -50%);
}
.personal-ornament canvas { display: block; width: 100%; height: auto; filter: drop-shadow(0 0 .5rem #060c16); }
.personal-ornament[data-product='guirnalda'] { width: clamp(3.65rem, 20%, 5.5rem); }
.personal-ornament[data-product='regalo'] { width: clamp(2.65rem, 14%, 4.3rem); }
.personal-tree-bulb {
  position: absolute;
  inset: 50% auto auto 50%;
  width: .29rem;
  height: .29rem;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #fff9e2;
  box-shadow: 0 0 .38rem .12rem #ffcf7785;
}
.personal-ornament[data-arriving] canvas { animation: ornament-arrival var(--arrival-duration) var(--arrival) ease-out both; }
.personal-ornament[data-arriving] .personal-tree-bulb { animation: bulb-arrival var(--arrival-duration) var(--arrival) ease-out both; }
@keyframes ornament-arrival {
  0% { opacity: 0; transform: translate(var(--drift), 3rem) scale(.5); }
  9% { opacity: 1; transform: scale(1.14); }
  18%, 81% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(.12); }
}
@keyframes bulb-arrival {
  0%, 81% { opacity: 0; transform: translate(-50%, -50%) scale(.5); }
  94% { opacity: 1; transform: translate(calc(-50% + var(--bulb-offset-x, 0px)), calc(-50% + var(--bulb-offset-y, 0px))) scale(1.25); }
  100% { opacity: 1; transform: translate(calc(-50% + var(--bulb-offset-x, 0px)), calc(-50% + var(--bulb-offset-y, 0px))); }
}
.tree-light {
  position: absolute;
  height: var(--size);
  width: var(--size);
  transform: translate(-50%, -50%) scale(.3);
  border-radius: 50%;
  background: #fff9e2;
  box-shadow: 0 0 5px 2px #ffcf77b5, 0 0 18px 4px #ffcf775d;
  opacity: 0;
  transition: opacity .7s var(--delay), transform .7s var(--delay);
}
.tree-light[data-lit='true'] { opacity: var(--intensity); transform: translate(-50%, -50%) scale(1); }
.tree figcaption { position: relative; display: grid; justify-items: center; gap: .44rem; margin-top: -.10rem; color: var(--muted); font-weight: 560; font-size: .85rem; }
.tree-status { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .12rem .45rem; }
.tree-preview { color: var(--gold-light); text-align: center; }
.tree-controls { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .34rem; }
.tree-controls > span { margin-right: .22rem; color: var(--muted); font-size: .84rem; }
.tree-control { min-height: 2rem; padding: .21rem .64rem; border: 1px solid #465670; border-radius: .44rem; background: #162338; color: var(--gold-light); font-size: .83rem; line-height: 1.2; }
.tree-control:hover { border-color: var(--gold); background: #223348; }
.caption-star { color: var(--gold); font-size: 1rem; }
.tree-bubble {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 5%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 95%;
  padding: .48rem .8rem;
  border: 1px solid #efbe6d8c;
  border-radius: 99rem;
  color: var(--gold-light);
  background: #152033f2;
  box-shadow: 0 3px 20px #0008;
  font-size: .87rem;
  font-weight: 700;
}
.tree-bubble:not([hidden]) { animation: bubble-in .45s ease-out both; }
@keyframes bubble-in { from { opacity: 0; transform: translate(-50%, .45rem); } to { opacity: 1; transform: translate(-50%, 0); } }

.country-panel { min-width: 0; border: 1px solid #2b3b52; border-radius: 1.1rem; background: linear-gradient(145deg, #16243aef, #0e1a2ded); padding: 1.2rem 1.14rem .9rem; box-shadow: 0 1rem 4rem #03081038; }
.country-header { display: flex; align-items: center; gap: .66rem; padding: 0 .2rem 1.03rem; border-bottom: 1px solid var(--line); }
.country-header h2 { font-size: clamp(1.08rem, 1.55vw, 1.32rem); font-weight: 650; line-height: 1.26; letter-spacing: -.03em; }
.country-header p { margin-top: .2rem; color: var(--muted); font-size: .84rem; }
.country-journey {
  display: grid;
  grid-template-columns: minmax(14rem, .83fr) minmax(0, 1.7fr);
  align-items: center;
  gap: clamp(1.1rem, 5vw, 4.5rem);
  padding: clamp(1rem, 3.3vw, 2.8rem);
  margin-bottom: 2.65rem;
  border: 1px solid #344861;
  border-radius: 1.1rem;
  background: radial-gradient(ellipse at 18% 50%, #1a3e3b88, transparent 65%), #111d30;
}
.journey-summary h2 { color: var(--ink); font: 400 clamp(2.15rem, 4vw, 3.65rem) / 1.02 var(--serif); letter-spacing: -.045em; }
.journey-summary h2 em { display: block; color: var(--gold); font-weight: 400; }
.journey-tally { display: flex; flex-wrap: wrap; align-items: baseline; gap: .15rem .6rem; margin-top: 1.35rem; }
.journey-tally strong { color: var(--gold-light); font: 400 clamp(2.2rem, 4.4vw, 3.5rem) / 1 var(--serif); font-variant-numeric: tabular-nums; }
.journey-tally span { color: var(--muted); font-size: .9rem; }
.journey-goal { margin-top: .85rem; color: var(--muted); font-size: .88rem; font-variant-numeric: tabular-nums; }
.journey-goal p { display: flex; flex-wrap: wrap; gap: .15rem .35rem; }
.journey-goal strong { color: var(--gold-light); }
.journey-goal p > span { white-space: nowrap; }
.journey-goal .milestone-bar { margin: .4rem 0 0; height: .3rem; }
.journey-visual { min-width: 0; }
.journey-views { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin-bottom: .64rem; }
.journey-views button[aria-pressed='true'], #country-all[aria-pressed='true'] { background: var(--gold); border-color: var(--gold); color: var(--dark-ink); font-weight: 700; }
.journey-stage { position: relative; }
.journey-stage canvas { display: block; width: 100%; aspect-ratio: 1.82; border: 1px solid #344b60; border-radius: .75rem; background: #0c192a; }
.journey-donor { position: absolute; max-width: min(13rem, calc(100% - 1rem)); padding: .18rem .5rem; border: 1px solid var(--gold); border-radius: .4rem; background: #0c192a; color: var(--gold-light); font-size: .84rem; font-weight: 660; line-height: 1.35; text-align: center; overflow-wrap: anywhere; pointer-events: none; }
.journey-status { color: var(--gold-light); min-height: 1.35em; margin-top: .55rem; font-size: .84rem; line-height: 1.35; }
.journey-legend { display: flex; flex-wrap: wrap; gap: .35rem .95rem; margin: .6rem 0 0; padding: .6rem 0 0; border-top: 1px solid #344861; list-style: none; color: var(--ink); font-size: .78rem; }
.journey-legend li { display: inline-flex; align-items: center; gap: .32rem; text-transform: capitalize; }
.legend-light { display: inline-block; width: var(--marker-size); height: var(--marker-size); margin-right: .12rem; border-radius: 50%; background: #fff9e2; box-shadow: 0 0 .35rem #ffcf77; }
.legend-price { color: var(--subtle); }
.journey-legend strong { padding-left: .39rem; margin-left: .08rem; border-left: 1px solid #344861; color: var(--gold-light); font-variant-numeric: tabular-nums; }
.journey-density { margin-top: .4rem; color: var(--muted); font-size: .78rem; }
.journey-controls { margin-top: 1.4rem; }
.journey-country-link { display: inline-block; margin-top: .45rem; }
.journey-controls select { width: 100%; min-height: 2.75rem; appearance: none; padding: .29rem 1.65rem .29rem .52rem; border: 1px solid #3b4b64; border-radius: .46rem; background: #141f33; color: var(--ink); font-size: .88rem; text-overflow: ellipsis; }
.journey-controls .select-wrap::after { right: .65rem; }
.journey-controls select:disabled { color: var(--muted); }
.country-emblem { color: var(--gold); display: grid; place-items: center; flex: 0 0 2.25rem; height: 2.25rem; border-radius: .55rem; background: #e7bd6a14; border: 1px solid #ddb57231; }
.globe-icon { display: block; position: relative; width: 1.04rem; height: 1.04rem; border: 1px solid currentColor; border-radius: 50%; }
.globe-icon::before { position: absolute; content: ''; inset: -1px 23%; border: 1px solid currentColor; border-radius: 50%; }
.globe-icon::after { position: absolute; content: ''; border-top: 1px solid currentColor; top: 48%; width: 100%; }
.country-list { max-height: 15rem; overflow: auto; list-style: none; margin: 0; padding: 0; scrollbar-width: thin; scrollbar-color: #46566e transparent; }
.country-filter { display: flex; gap: .4rem; padding-block: .65rem .25rem; }
.country-filter input { flex: 1; min-width: 0; min-height: 2.15rem; padding: .29rem .55rem; color: var(--ink); border: 1px solid #3b4b64; border-radius: .46rem; background: #141f33; font: inherit; font-size: .83rem; }
.country-filter input::placeholder { color: var(--muted); }
.country-total { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; padding: .55rem .2rem; border-bottom: 1px solid #3e4c61; color: var(--muted); font-size: .85rem; }
.country-total strong { color: var(--gold-light); font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.country-empty { padding: .63rem .2rem; color: var(--subtle); font-size: .88rem; }
.country-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .64rem; min-height: 3.4rem; padding: .47rem .2rem; border-bottom: 1px solid #26354b; }
.country-row.is-new { animation: country-flash 3.6s ease-out; }
@keyframes country-flash { 0%, 24% { background: #edbd6b21; } 100% { background: transparent; } }
.country-flag { display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; border: 1px solid #ffffff10; background: #26334a; font-size: 1rem; line-height: 1; }
.country-name, .country-value { color: var(--ink); font-size: .87rem; font-weight: 630; line-height: 1.33; }
.country-value { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.country-donations { display: block; margin-top: .13rem; color: var(--subtle); font-size: .75rem; }
.country-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .18rem .45rem; padding-top: .4rem; }
.country-footer .text-button { color: var(--gold-light); font-size: .79rem; }
.country-name-link { display: block; padding: .34rem 0; min-height: 2.75rem; width: 100%; border: 0; background: transparent; color: inherit; text-align: left; font: inherit; }
.country-name-link:hover, .country-name-link:focus-visible { color: var(--gold-light); text-decoration: underline; text-underline-offset: .19em; }

.catalog { border-top: 1px solid var(--line); padding-top: 2.1rem; padding-bottom: 3.1rem; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: .65rem 1.15rem; margin-bottom: 1.35rem; }
.section-heading h2, .receipt h2 { font: 400 clamp(1.95rem, 3.1vw, 2.65rem) / 1.12 var(--serif); letter-spacing: -.053em; }
.section-heading p { margin-top: .38rem; color: var(--muted); font-size: .96rem; }
.currency-note { color: var(--subtle); font-size: .82rem; white-space: nowrap; }
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.product-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 1rem; background: #111d30; transition: border-color .18s, box-shadow .18s; }
.product-card:hover { border-color: #56637a; }
.product-card.has-item { border-color: #b58a54; box-shadow: 0 0 21px #edbb6611; }
.product-card, .product-card .stepper > :is(button, input) { scroll-margin-bottom: 5.5rem; }
.product-art { display: grid; place-items: center; height: 10rem; background: radial-gradient(ellipse at 50% 50%, #17263a, #0e192a 78%); }
.ornament-image { display: block; width: min(10.1rem, 100%); height: auto; aspect-ratio: 1; }
.product-body { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .86rem .9rem .98rem; border-top: 1px solid #25334a99; }
.product-name { font-size: 1.02rem; line-height: 1.3; font-weight: 650; }
.product-price { margin-top: .13rem; color: var(--gold); font-size: .9rem; font-weight: 650; }
.stepper { display: inline-grid; flex: none; grid-template-columns: auto minmax(0, 4.25rem) auto; align-items: center; gap: .14rem; }
.stepper button { display: grid; place-items: center; padding: 0; width: 2.75rem; height: 2.75rem; border: 1px solid var(--line); border-radius: .46rem; background: #19263a; color: var(--ink); font-size: 1.12rem; line-height: 1; }
.stepper button[data-action='add'] { color: var(--dark-ink); background: var(--gold); border-color: var(--gold); }
.stepper button[data-action='add']:hover:not(:disabled) { background: var(--gold-light); }
.stepper button[data-action='remove']:hover:not(:disabled) { border-color: var(--gold); }
.stepper button:disabled { opacity: .33; }
.quantity-input {
  width: 100%;
  min-width: 0;
  height: 2.75rem;
  padding-inline: .2rem;
  border: 1px solid #3b4b64;
  border-radius: .38rem;
  background: #121e31;
  color: var(--ink);
  text-align: center;
  font: 600 .87rem / 1 var(--sans);
  font-variant-numeric: tabular-nums;
}
.quantity-input[aria-invalid='true'] { border-color: #ffae9a; }
.quantity-error { grid-column: 1 / -1; max-width: 9rem; color: #ffc6b6; font-size: .72rem; line-height: 1.25; padding-top: .15rem; }

.organizations { border-top: 1px solid var(--line); padding-block: 2.15rem; }
.organization-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.organization-card {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  padding: clamp(1rem, 2.2vw, 1.65rem);
  border: 1px solid #3c5a58;
  border-radius: .85rem;
  background: linear-gradient(150deg, #1c3a39, #122536 74%);
}
.organization-card[data-organization='caritas'] { background: linear-gradient(150deg, #3a2a39, #182637 80%); border-color: #574455; }
.organization-card[data-organization='alegria'] { background: linear-gradient(150deg, #183951, #152639 80%); border-color: #3a576e; }
.cause-label { color: var(--gold-light); font-size: .76rem; font-weight: 700; letter-spacing: .065em; text-transform: uppercase; }
.organization-card h3 { font: 400 clamp(1.45rem, 2.4vw, 2rem) / 1.12 var(--serif); letter-spacing: -.03em; }
.organization-card p, .pilot-panel p { color: var(--muted); font-size: .92rem; }
.organization-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .8rem; margin-top: auto; padding-top: .7rem; }
.organization-actions .text-button { display: inline-flex; align-items: center; gap: .28rem; min-height: 2.75rem; }
.pilot-panel { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 1.2rem 2rem; margin-bottom: 2.7rem; padding: clamp(1rem, 2.5vw, 2rem); border: 1px solid #415469; border-radius: .9rem; background: #132235; }
.pilot-panel h2 { margin-bottom: .5rem; font: 400 clamp(1.6rem, 3vw, 2.25rem) / 1.1 var(--serif); }
.pilot-actions, .screen-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; }
.screen-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .75rem 1.25rem; padding-block: 1.3rem; }
.screen-header strong { color: var(--gold-light); font: 400 1.65rem / 1.15 var(--serif); }
.screen-header span { display: block; color: var(--muted); font-size: .86rem; }
.screen-actions .text-button { margin-inline-start: .35rem; }
.screen-join { display: grid; justify-items: start; gap: .8rem; margin-top: 1.5rem; }
.screen-join img { display: block; width: clamp(6.75rem, 13vw, 10.5rem); height: auto; border: 1px solid #ffffff80; border-radius: .4rem; image-rendering: pixelated; background: #fff; }
.screen-mode :is(.topbar, .overview, #confirmacion, #adornos, #organizaciones, #negocios, .site-footer, .cart-dock, .journey-controls, .journey-country-link, .journey-views, .tree-controls) { display: none; }
.screen-mode .country-journey {
  min-height: min(41rem, 82dvh);
  grid-template-columns: minmax(10rem, .65fr) minmax(0, 1fr) minmax(0, 1.45fr);
  grid-template-areas: "summary tree visual";
  gap: clamp(.85rem, 2vw, 1.9rem);
}
.screen-mode .journey-summary { grid-area: summary; }
.screen-mode .journey-visual { grid-area: visual; }
.screen-tree { grid-area: tree; min-width: 0; }
.screen-flight :is(.screen-tree, .journey-summary) { display: none; }
.screen-contribution {
  display: grid;
  grid-area: summary;
  min-width: 0;
  gap: .44rem;
  padding-inline-start: clamp(.85rem, 2vw, 1.5rem);
  border-inline-start: 2px solid var(--gold);
  overflow-wrap: anywhere;
}
.screen-contribution-name { font: 400 clamp(1.9rem, 3.6vw, 3.2rem) / 1.08 var(--serif); letter-spacing: -.035em; }
.screen-contribution-origin { color: var(--muted); font-size: clamp(1rem, 1.7vw, 1.35rem); }
.screen-contribution-amount { margin-top: .55rem; color: var(--gold-light); font: 400 clamp(2.35rem, 4.55vw, 4rem) / 1.05 var(--serif); font-variant-numeric: tabular-nums; }
.screen-mode.screen-flight .country-journey {
  grid-template-columns: minmax(12rem, .72fr) minmax(0, 1.7fr);
  grid-template-areas: "summary visual";
}
.screen-mode .journey-tally strong { font-size: clamp(2.65rem, 6vw, 5rem); }

.receipt { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 1rem 1.5rem; border: 1px solid #c39454a1; border-radius: 1rem; margin-bottom: 2rem; padding: 1.3rem 1.4rem; background: linear-gradient(112deg, #252822, #162335 61%); }
.receipt h2 { margin-bottom: .36rem; font-size: clamp(1.55rem, 2.55vw, 2.08rem); }
.receipt p { color: var(--muted); font-size: .91rem; }
.receipt p + p { margin-top: .24rem; }
.receipt-image-note .text-button { color: var(--gold-light); padding: 0; }
.receipt p strong { color: var(--gold-light); }
.receipt-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; }
.receipt-context { display: inline-block; color: var(--gold); font-size: .77rem; font-weight: 670; margin-bottom: .33rem; }

.site-footer { border-top: 1px solid var(--line); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: .6rem 1rem; padding-block: 1.35rem; color: var(--muted); font-size: .85rem; }
.footer-actions { display: flex; flex-wrap: wrap; gap: .7rem 1rem; }
.footer-inner p span { color: var(--gold); margin-right: .25rem; }
.footer-inner small { color: var(--subtle); font-size: .78rem; }
.text-button { padding: .25rem 0; border: 0; background: transparent; color: var(--muted); text-decoration: underline; text-underline-offset: .2rem; font-size: .85rem; }
.text-button:hover { color: var(--gold-light); }
.has-cart .site-footer { padding-bottom: 5.3rem; }
.cart-dock {
  position: fixed;
  bottom: max(1rem, env(safe-area-inset-bottom));
  right: max(1.3rem, calc((100vw - 1320px) / 2));
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid #ad89556e;
  border-radius: .87rem;
  padding: .62rem .65rem .62rem .95rem;
  background: #131f32f7;
  box-shadow: 0 .6rem 2.6rem #0009;
  backdrop-filter: blur(13px);
}
.dock-summary { display: grid; min-width: 4rem; line-height: 1.25; }
.dock-summary strong { font-size: 1.02rem; font-weight: 680; }
.dock-summary span { margin-top: .17rem; color: var(--muted); font-size: .8rem; }
.cart-dock .button { min-height: 2.65rem; }
.dock-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .45rem .8rem; }
.dock-actions .text-button { color: var(--gold-light); white-space: nowrap; font-size: .82rem; }

.modal-open { overflow: hidden; }
.drawer {
  position: fixed;
  inset: 0 0 0 auto;
  margin: 0;
  padding: 0;
  width: min(100%, 29rem);
  height: 100dvh;
  max-width: 100%;
  max-height: 100%;
  overflow: hidden;
  border: 0;
  border-left: 1px solid #344862;
  border-radius: 1.12rem 0 0 1.12rem;
  background: #101b2d;
  color: var(--ink);
  box-shadow: -1.5rem 0 5rem #0008;
}
.drawer::backdrop { background: #040810b9; backdrop-filter: blur(4px); }
.drawer[open] { animation: drawer-in .22s ease-out; }
@keyframes drawer-in { from { transform: translateX(1.2rem); opacity: .45; } to { transform: translateX(0); opacity: 1; } }
.drawer-layout { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 100%; }
.drawer-header, .drawer-body, .drawer-actions { padding-inline: 1.35rem; }
.drawer-header { display: flex; align-items: center; justify-content: space-between; gap: .55rem; padding-block: 1.17rem 1rem; border-bottom: 1px solid var(--line); }
.drawer-header h2 { font: 400 2.06rem / 1.1 var(--serif); letter-spacing: -.045em; }
.drawer-header h2:focus { outline: none; }
.close-button { display: grid; place-items: center; flex: none; width: 2.5rem; height: 2.5rem; padding: 0 0 .09rem; background: #19273d; border: 1px solid var(--line); border-radius: .55rem; color: var(--ink); font-size: 1.6rem; line-height: 1; }
.close-button:hover { border-color: var(--gold); }
.drawer-body { overflow-y: auto; overscroll-behavior: contain; padding-block: .98rem; }
.drawer-body > p { color: var(--muted); }
.drawer-actions { border-top: 1px solid var(--line); padding-block: .84rem max(.95rem, env(safe-area-inset-bottom)); background: #101b2d; }
.drawer-actions .button { width: 100%; }
.drawer-actions .button + .button { margin-top: .5rem; }
.total-line { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; margin-bottom: .65rem; font-size: .96rem; font-weight: 630; }
.total-line strong { color: var(--gold-light); font-size: 1.4rem; }
.drawer-items { list-style: none; margin: 0 0 1.2rem; padding: 0; }
.drawer-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .55rem .7rem; min-height: 4.55rem; border-bottom: 1px solid var(--line); padding-block: .42rem; }
.drawer-item .ornament-image { width: 3.45rem; border-radius: .5rem; }
.drawer-item strong { display: block; line-height: 1.3; font-size: .92rem; font-weight: 650; }
.drawer-item .unit-price { display: block; color: var(--subtle); font-size: .78rem; margin-top: .15rem; }
.field { margin-bottom: 1.12rem; }
.field label { display: block; margin-bottom: .34rem; font-weight: 650; font-size: .94rem; }
.field small { display: block; margin-top: .35rem; color: var(--subtle); font-size: .8rem; }
.select-wrap { position: relative; }
.select-wrap::after { position: absolute; content: ''; right: .95rem; top: calc(50% - .25rem); width: .48rem; height: .48rem; pointer-events: none; border-right: 1.5px solid var(--gold); border-bottom: 1.5px solid var(--gold); transform: rotate(45deg); }
.field select { min-height: 2.85rem; width: 100%; appearance: none; padding: .4rem 2rem .4rem .65rem; color: var(--ink); border-radius: .52rem; border: 1px solid #3b4b64; background: #141f33; }
.field select:hover { border-color: var(--subtle); }
.field input[type='email'] { width: 100%; min-height: 2.85rem; padding: .4rem .65rem; color: var(--ink); border: 1px solid #3b4b64; border-radius: .52rem; background: #141f33; font: inherit; }
.field input[type='email']:disabled { opacity: .7; }
.email-field { margin-top: 1rem; }
.receipt-email-note { margin-top: .45rem; font-size: .88rem; }
.receipt-email-note .text-button { color: var(--gold-light); }
.drawer-body > .checkout-context { margin-bottom: .9rem; color: var(--gold-light); font-size: .86rem; }
.checkout-amounts { min-width: 0; padding: 0; border: 0; margin: 0 0 .65rem; }
.checkout-amounts legend { margin-bottom: .55rem; padding: 0; color: var(--ink); font-size: 1.03rem; font-weight: 700; }
.quick-amounts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .42rem; }
.quick-amounts .button { display: flex; flex-direction: column; gap: .15rem; min-height: 3.78rem; padding: .42rem .15rem; }
.quick-amounts strong { font-size: .96rem; }
.quick-amounts span { color: var(--muted); font-size: .75rem; font-weight: 550; }
.quick-amounts button[aria-pressed='true'] { border-color: var(--gold); background: var(--gold); color: var(--dark-ink); }
.quick-amounts button[aria-pressed='true'] span { color: #46301a; }
.free-amount-field { margin-block: .86rem .45rem; }
.free-amount-input { display: flex; align-items: center; gap: .43rem; padding-inline: .7rem .35rem; border: 1px solid #3b4b64; border-radius: .52rem; background: #141f33; color: var(--muted); }
.free-amount-input:has(input[aria-invalid='true']) { border-color: #ffae9a; }
.free-amount-input .quantity-input { max-width: 100%; border: 0; background: transparent; text-align: start; font-size: 1rem; }
.free-amount-field .quantity-error { max-width: none; color: #ffc6b6; }
.checkout-ornaments { margin: .5rem 0 .75rem; color: var(--gold-light); font-size: .85rem; }
.checkout-section { margin-block: .8rem; border-block: 1px solid var(--line); }
.checkout-section summary { min-height: 2.75rem; padding-block: .57rem; color: var(--gold-light); font-size: .94rem; font-weight: 660; cursor: pointer; }
.checkout-section summary span { margin-left: .35rem; color: var(--subtle); font-size: .77rem; font-weight: 500; }
.checkout-section > .field:first-of-type { margin-top: .35rem; }
.checkout-causes { display: inline-block; margin-top: -.72rem; color: var(--gold-light); }
.checkout-origin { margin-top: .9rem; }
.checkout-origin label span, .donor-name-field label span { margin-left: .3rem; color: var(--muted); font-size: .78rem; font-weight: 500; }
.checkout-origin .location-action { min-height: 2.75rem; color: var(--gold-light); }
.origin-status { margin: 0 0 .38rem; color: var(--muted); font-size: .82rem; }
.located-city { color: var(--gold-light); font-size: .9rem; }
.city-editor summary { width: fit-content; min-height: 2.75rem; padding-block: .61rem; color: var(--gold-light); font-size: .85rem; cursor: pointer; }
.field select:disabled { opacity: .7; }
.drawer-notice { margin-top: 1.2rem; padding: .72rem .8rem; border: 1px solid #a789554d; border-radius: .65rem; background: #dcb36b13; font-size: .88rem; }
.donor-name-field > input { width: 100%; min-height: 2.75rem; padding: .45rem .65rem; border: 1px solid #3b4b64; border-radius: .52rem; background: #141f33; color: var(--ink); font: inherit; }
.checkout-section .consent-choice { display: flex; gap: .4rem; align-items: baseline; margin-bottom: .65rem; font-size: .89rem; }
.consent-choice input { margin: 0 .18rem 0 0; accent-color: var(--gold); }
.donor-status { margin-block: .65rem .35rem; color: var(--muted); font-size: .86rem; }
.donor-list { list-style: none; margin: 0; padding: 0; }
.donor-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .3rem .65rem; padding-block: .64rem; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.donor-list time { color: var(--subtle); font-size: .83rem; }
.saved-image-list { list-style: none; padding: 0; margin-block: .85rem 0; }
.saved-image-list li { padding-block: .9rem; border-bottom: 1px solid var(--line); }
.saved-image-list time { color: var(--subtle); font-size: .83rem; }
.saved-image-list .receipt-actions { margin-top: .45rem; }
.payment-error { margin-top: .7rem; color: #ffc6b6; font-size: .88rem; }

@media (max-width: 1200px) {
  .wrap { width: min(1320px, calc(100% - 4.5rem)); }
  .product-body { flex-wrap: wrap; }
  .overview { column-gap: .88rem; }
}

@media (max-width: 960px) {
  .overview { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.25rem 1.15rem; }
  h1 { width: 107%; font-size: clamp(2.75rem, 6.65vw, 4.2rem); }
  .country-panel { grid-column: 1 / -1; }
  .country-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
  .country-header h2 { font-size: 1.23rem; }
  .product-grid { gap: .75rem; }
  .pilot-panel { grid-template-columns: minmax(0, 1fr); }
  .screen-mode .country-journey {
    grid-template-columns: minmax(0, .78fr) minmax(0, 1fr);
    grid-template-areas: "summary summary" "tree visual";
  }
  .screen-mode:not(.screen-flight) .journey-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: .65rem;
    align-items: center;
  }
  .screen-mode:not(.screen-flight) .journey-summary h2 em { display: inline; }
  .screen-mode:not(.screen-flight) .journey-goal { grid-column: 1; }
  .screen-mode:not(.screen-flight) .screen-join { grid-column: 2; grid-row: 1 / 4; gap: .35rem; margin-top: 0; justify-items: center; }
  .screen-mode:not(.screen-flight) .screen-join img { width: 5rem; }
  .screen-mode:not(.screen-flight) .screen-join .button { max-width: 10rem; font-size: .76rem; text-align: center; }
}

@media (max-width: 680px) {
  .wrap { width: calc(100% - 2rem); }
  .topbar-inner { grid-template-columns: 1fr auto; gap: .1rem .75rem; padding-top: .68rem; }
  .nav { grid-column: 1 / -1; grid-row: 2; justify-content: center; gap: clamp(.85rem, 5vw, 2.75rem); margin-top: .24rem; }
  .nav a { padding-block: .54rem; }
  .topbar-cart { grid-column: 2; grid-row: 1; }
  .overview { grid-template-columns: 1fr; padding-block: 1.45rem 1.65rem; row-gap: 1.2rem; }
  .intro { padding-block: .32rem 0; }
  h1 { width: 100%; font-size: clamp(2.65rem, 11vw, 4rem); }
  .lead { margin-top: 1.02rem; }
  .hero-actions { margin-top: 1.1rem; }
  .progress { max-width: 100%; margin-top: 1.4rem; padding-top: .9rem; }
  .tree-stage { width: min(100%, 23.2rem); }
  .tree figcaption { margin-top: -.35rem; }
  .tree-control { min-height: 2.75rem; }
  .country-panel { padding-top: .9rem; }
  .country-list { display: block; }
  .country-journey { grid-template-columns: minmax(0, 1fr); gap: 1rem; margin-bottom: 1.65rem; }
  .journey-summary h2 em { display: inline; }
  .journey-tally { margin-top: .7rem; }
  .journey-controls { margin-top: .8rem; }
  .catalog { padding-top: 1.36rem; padding-bottom: 2rem; }
  .section-heading { align-items: start; flex-direction: column; gap: .3rem; margin-bottom: .95rem; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-art { height: clamp(6rem, 27vw, 9.3rem); }
  .product-art .ornament-image { width: min(clamp(6rem, 27vw, 9.3rem), 100%); }
  .product-body { padding: .68rem .66rem .82rem; }
  .stepper { grid-template-columns: auto minmax(0, 3.25rem) auto; }
  .organization-grid { grid-template-columns: 1fr; gap: .65rem; }
  .organizations { padding-block: 1.4rem; }
  .screen-mode.screen-flight .country-journey {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "summary" "visual";
    align-content: start;
  }
  .screen-contribution { grid-template-columns: minmax(0, 1fr) auto; column-gap: .7rem; }
  .screen-contribution :is(.screen-contribution-name, .screen-contribution-origin) { grid-column: 1; }
  .screen-contribution-name { font-size: clamp(1.35rem, 5.5vw, 1.9rem); }
  .screen-contribution-origin { font-size: .9rem; }
  .screen-contribution-amount { grid-column: 2; grid-row: 1 / span 2; align-self: center; margin-top: 0; font-size: clamp(1.4rem, 5.7vw, 2.35rem); }
  .receipt { grid-template-columns: 1fr; padding: 1rem; margin-bottom: 1.4rem; }
  .footer-inner { align-items: flex-start; flex-direction: column; padding-block: 1rem; }
  .cart-dock { left: .75rem; right: .75rem; bottom: max(.75rem, env(safe-area-inset-bottom)); }
}

@media (max-width: 450px) {
  .drawer { border-radius: 0; border: 0; }
  .drawer-header, .drawer-body, .drawer-actions { padding-inline: 1rem; }
  .product-card .stepper { margin-left: -.15rem; }
  .footer-inner small { display: block; }
}

@media (max-width: 372px) {
  .product-grid { grid-template-columns: 1fr; }
  .drawer-item { grid-template-columns: minmax(0, 1fr) auto; }
  .drawer-item .ornament-image { display: none; }
  .quick-amounts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .personal-ornament[data-arriving] canvas { animation: none; }
  .personal-ornament[data-arriving] .personal-tree-bulb { animation: none; visibility: hidden; }
}
