@font-face { font-family: "Alfa Slab One"; font-weight: 400; font-display: swap; src: url("../fonts/alfa-slab-one-400.woff2") format("woff2"); }
@font-face { font-family: "Caveat"; font-weight: 500; font-display: swap; src: url("../fonts/caveat-500.woff2") format("woff2"); }
@font-face { font-family: "Caveat"; font-weight: 700; font-display: swap; src: url("../fonts/caveat-700.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 400; font-display: swap; src: url("../fonts/nunito-400.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 600; font-display: swap; src: url("../fonts/nunito-600.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 800; font-display: swap; src: url("../fonts/nunito-800.woff2") format("woff2"); }
/* Layout: a night-time stable yard. 25 wooden stable doors (door 25 is a wide double barn door) (split top/bottom like real ones) under a donate and share card, then the horses' letters to Santa. Single dark look by design. */
:root {
  box-sizing: border-box; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
  --night: #0e1828;
  --night-2: #172740;
  --night-3: #22375a;
  --wood: #8a5631;
  --wood-dark: #5c3620;
  --wood-light: #a86d40;
  --brass: #e6b85a;
  --brass-dark: #b3852f;
  --holly: #c8413f;
  --holly-dark: #8f2524;
  --green: #2f7a52;
  --straw: #f2dfae;
  --paper: #fbf3df;
  --paper-edge: #e8d7ae;
  --ink: #2c2118;
  --ink-soft: #6b5640;
  --snow: #f3f6fb;
  --muted: #a3b3c9;
  --shadow: rgba(0, 0, 0, .45);
  --font-display: "Alfa Slab One", Rockwell, "Roboto Slab", Georgia, serif;
  --font-body: "Nunito", "Segoe UI", system-ui, sans-serif;
  --font-hand: "Caveat", "Segoe Print", "Bradley Hand", cursive;
}
* { box-sizing: border-box; }
html { background: var(--night); }
img { max-width: 100%; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: radial-gradient(ellipse at 50% -10%, var(--night-3) 0%, var(--night-2) 35%, var(--night) 75%) fixed, var(--night);
  color: var(--snow);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: hidden;
}
#snow { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.wrap { position: relative; z-index: 1; max-width: 1060px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 24px 96px; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 3px; }

/* ---------- header ---------- */
header.hero { text-align: center; display: grid; gap: 10px; justify-items: center; margin-bottom: 26px; }
.eyebrow { text-transform: uppercase; letter-spacing: .22em; font-size: 12px; color: var(--brass); font-weight: 800; }
h1 {
  font-family: var(--font-display); font-weight: 400; margin: 0;
  font-size: clamp(2.1rem, 6vw, 3.8rem); line-height: 1.05; text-wrap: balance;
  color: var(--straw); text-shadow: 0 3px 0 var(--wood-dark), 0 8px 24px var(--shadow);
}
h1 .red { color: var(--holly); text-shadow: 0 3px 0 var(--holly-dark), 0 8px 24px var(--shadow); }
.lede { max-width: 58ch; color: var(--muted); margin: 0; text-wrap: pretty; }
.garland { display: flex; gap: 10px; justify-content: center; margin-top: 4px; }
.garland span { width: 12px; height: 12px; border-radius: 50%; background: var(--holly); box-shadow: 0 0 10px var(--holly); animation: twinkle 2.4s infinite ease-in-out; }
.garland span:nth-child(3n+2) { background: var(--brass); box-shadow: 0 0 10px var(--brass); animation-delay: .8s; }
.garland span:nth-child(3n) { background: var(--green); box-shadow: 0 0 10px var(--green); animation-delay: 1.6s; }
@keyframes twinkle { 50% { opacity: .35; transform: scale(.8); } }

/* ---------- calendar ---------- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 14px; }
h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.5rem, 3.5vw, 2.1rem); margin: 0; color: var(--straw); text-wrap: balance; }
.section-head p { margin: 0; color: var(--muted); font-size: 14px; }

.barn {
  background:
    linear-gradient(var(--holly-dark), var(--holly-dark)) top / 100% 14px no-repeat,
    repeating-linear-gradient(90deg, #6e3a22 0 46px, #5f321d 46px 48px);
  border-radius: 14px; padding: 30px 16px 18px; position: relative;
  box-shadow: 0 20px 50px var(--shadow), inset 0 0 60px rgba(0, 0, 0, .35);
}
.barn::before { /* fairy lights along the eaves */
  content: ""; position: absolute; left: 10px; right: 10px; top: 16px; height: 8px;
  background: radial-gradient(circle, var(--brass) 0 3px, transparent 4px) 0 0 / 28px 8px repeat-x;
  filter: drop-shadow(0 0 4px var(--brass)); animation: twinkle 3s infinite;
}
.grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 760px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; } }
@media (max-width: 440px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.door {
  position: relative; aspect-ratio: 3 / 4; max-width: 100%; border: 0; padding: 0;
  background: var(--night); border-radius: 6px; perspective: 700px;
  box-shadow: inset 0 0 0 4px var(--wood-dark), 0 6px 12px var(--shadow);
  animation: doorIn .6s backwards cubic-bezier(.2, .9, .3, 1.3);
}
@keyframes doorIn { from { transform: translateY(18px) scale(.9); opacity: 0; } }
.inside {
  position: absolute; inset: 4px; border-radius: 3px; overflow: hidden; z-index: 0; /* own stacking context so labels stay behind the closed leaves */
  display: grid; place-items: center; align-content: center; gap: 2px;
  background: radial-gradient(circle at 50% 40%, #3a2a1a 0%, #1b130c 80%);
  color: var(--straw);
}
.inside .peek { font-size: clamp(28px, 5vw, 44px); line-height: 1; }
.inside .who { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; opacity: .85; padding-inline: 4px; text-align: center; }
.door.open .inside .peek { animation: peek 1.2s .5s backwards cubic-bezier(.3, 1.6, .5, 1); }
@keyframes peek { from { transform: translateY(70%); opacity: 0; } }
.inside.pic { align-content: end; padding-bottom: 6px; }
.inside.pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.inside.pic::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 55%, rgba(0, 0, 0, .78)); }
.inside.pic .who { position: relative; z-index: 1; opacity: 1; color: var(--snow); text-shadow: 0 1px 3px #000; }
.door.open .inside.pic img { animation: zoomIn 1.4s .4s backwards cubic-bezier(.2, .8, .3, 1); }
@keyframes zoomIn { from { transform: scale(1.3); opacity: 0; } }

.leaf {
  position: absolute; left: 4px; right: 4px; transform-origin: left center;
  background:
    linear-gradient(90deg, rgba(0,0,0,.18), transparent 12%, transparent 88%, rgba(0,0,0,.25)),
    repeating-linear-gradient(90deg, var(--wood) 0 22%, var(--wood-dark) 22% 23%, var(--wood-light) 23% 25%, var(--wood) 25% 45%);
  border: 2px solid var(--wood-dark);
  transition: transform .8s cubic-bezier(.5, 0, .2, 1.15);
  backface-visibility: hidden;
}
.leaf.top { top: 4px; height: calc(50% - 4px); border-radius: 3px 3px 0 0; }
.leaf.bottom { bottom: 4px; height: calc(50% - 4px); border-radius: 0 0 3px 3px; transition-delay: .18s; }
.leaf.bottom::before { /* Z brace on the lower half */
  content: ""; position: absolute; left: 6%; right: 6%; top: 48%; height: 7px;
  background: var(--wood-dark); transform: rotate(-24deg); border-radius: 2px;
}
.leaf.bottom::after { /* bolt */
  content: ""; position: absolute; right: 8%; top: 10%; width: 18%; height: 8px;
  background: linear-gradient(var(--muted), #6e7d92); border-radius: 3px;
}
.plaque {
  position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%);
  font-family: var(--font-display); font-size: clamp(18px, 3.2vw, 28px); color: var(--ink);
  background: radial-gradient(circle at 35% 30%, #f6d78e, var(--brass) 50%, var(--brass-dark));
  border-radius: 50%; width: 2.1em; height: 2.1em; display: grid; place-items: center;
  box-shadow: 0 2px 0 var(--wood-dark), 0 4px 8px var(--shadow); font-variant-numeric: tabular-nums;
}
.door.open .leaf.top { transform: rotateY(-108deg); transition-delay: 0s; }
.door.open .leaf.bottom { transform: rotateY(-100deg); transition-delay: .18s; }
.door.locked { cursor: not-allowed; }
.door.locked .leaf.bottom .lock {
  position: absolute; right: 8%; bottom: 10%; font-size: 14px; opacity: .8;
}
.door.today { box-shadow: inset 0 0 0 4px var(--brass), 0 0 0 3px var(--brass), 0 0 26px var(--brass); animation: doorIn .6s backwards, glow 1.8s infinite ease-in-out; }
@keyframes glow { 50% { box-shadow: inset 0 0 0 4px var(--brass), 0 0 0 3px var(--brass), 0 0 6px var(--brass); } }
.door.today::after {
  content: "Open me!"; position: absolute; top: -10px; left: 50%; transform: translateX(-50%) rotate(-4deg); z-index: 3;
  background: var(--holly); color: var(--snow); font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 20px; white-space: nowrap;
  box-shadow: 0 3px 6px var(--shadow);
}
.door.special .leaf { background:
    linear-gradient(90deg, rgba(0,0,0,.18), transparent 12%, transparent 88%, rgba(0,0,0,.25)),
    repeating-linear-gradient(90deg, var(--holly) 0 22%, var(--holly-dark) 22% 23%, #d9605d 23% 25%, var(--holly) 25% 45%); }
.door.special .leaf.top::after { content: "🎄"; position: absolute; top: 10%; left: 50%; transform: translateX(-50%); font-size: 18px; }
/* door 25: a wide double barn door across the bottom of the yard */
.door.xmas { grid-column: 1 / -1; aspect-ratio: auto; height: clamp(150px, 24vw, 230px); perspective: 1400px; }
.door.xmas .leaf.top { top: 4px; bottom: 4px; height: auto; left: 4px; right: 50%; border-radius: 3px 0 0 3px; transform-origin: left center; }
.door.xmas .leaf.bottom { top: 4px; bottom: 4px; height: auto; left: 50%; right: 4px; border-radius: 0 3px 3px 0; transform-origin: right center; transition-delay: 0s; }
.door.xmas .plaque { left: 0; top: 50%; font-size: clamp(22px, 4vw, 34px); z-index: 2; }
.door.xmas .inside .who { font-size: 14px; }
.door.xmas.open .leaf.top { transform: rotateY(-100deg); }
.door.xmas.open .leaf.bottom { transform: rotateY(100deg); transition-delay: 0s; }
.door.xmas:not(.locked):hover .leaf.bottom { transform: rotateY(14deg); }
.door.xmas.open:hover .leaf.bottom { transform: rotateY(100deg); }
.door.shake { animation: shake .45s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px) rotate(-2deg); } 40%, 80% { transform: translateX(6px) rotate(2deg); } }
.door:not(.locked):hover .leaf.top { transform: rotateY(-14deg); }
.door.open:hover .leaf.top { transform: rotateY(-108deg); }

/* ---------- letters to santa ---------- */
.letters { margin-top: 48px; }
.stalls { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 16px; }
.stall {
  text-align: left; border: 0; border-radius: 14px; padding: 16px; display: grid; gap: 10px; align-content: start;
  background: linear-gradient(160deg, var(--night-2), var(--night)); color: var(--snow);
  box-shadow: inset 0 0 0 1px var(--night-3), 0 8px 18px var(--shadow);
  transition: transform .25s, box-shadow .25s;
}
.stall:hover { transform: translateY(-4px) rotate(-.5deg); box-shadow: inset 0 0 0 1px var(--brass-dark), 0 14px 28px var(--shadow); }
.nameplate { display: flex; align-items: center; gap: 12px; }
.avatar { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; flex: none; border: 3px solid var(--brass); background: var(--night-3); }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nameplate b { font-family: var(--font-display); font-weight: 400; font-size: 1.35rem; color: var(--straw); display: block; line-height: 1.1; }
.nameplate span { font-size: 13px; color: var(--muted); }
.stall .cta { color: var(--brass); font-weight: 800; font-size: 14px; }

/* ---------- modal ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 50; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 16px;
  background: rgba(6, 10, 18, .72); backdrop-filter: blur(4px); animation: fade .25s;
}
@keyframes fade { from { opacity: 0; } }
.sheet {
  width: min(100%, 560px); max-height: calc(100vh - 32px); overflow: auto; position: relative;
  background: var(--paper); color: var(--ink); border-radius: 14px; padding: 26px 24px 22px;
  box-shadow: 0 30px 80px var(--shadow), inset 0 0 0 1px var(--paper-edge);
  animation: pop .45s cubic-bezier(.2, 1.3, .4, 1);
}
@keyframes pop { from { transform: scale(.85) translateY(30px); opacity: 0; } }
.close { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--paper-edge); color: var(--ink); font-size: 20px; line-height: 1; }
.sheet h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.7rem; margin: 0 0 6px; line-height: 1.15; text-wrap: balance; padding-right: 30px; }
.sheet p { margin: 0 0 12px; }
.day-tag { display: inline-block; background: var(--holly); color: var(--snow); font-weight: 800; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; padding: 3px 10px; border-radius: 20px; margin-bottom: 10px; }
.photo {
  aspect-ratio: 4 / 3; max-width: 100%; border-radius: 10px; margin: 6px 0 14px; display: grid; place-items: center; align-content: center; gap: 4px;
  position: relative; overflow: hidden; border: 3px dashed rgba(44, 33, 24, .25);
}
.photo .big { font-size: 88px; line-height: 1; animation: bob 2.6s infinite ease-in-out; }
@keyframes bob { 50% { transform: translateY(-8px) rotate(3deg); } }
.photo small { font-size: 12px; font-weight: 700; color: var(--ink); background: rgba(251, 243, 223, .8); padding: 2px 8px; border-radius: 10px; }
.photo.pic { aspect-ratio: 1; max-height: 50vh; width: 100%; border: 0; background: var(--paper-edge); box-shadow: 0 6px 16px rgba(0, 0, 0, .25); }
.photo.pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: fade .6s; }
.photo.pic.fit { aspect-ratio: 4 / 3; background: #1b130c; }
.photo.pic.fit img { object-fit: contain; }
button.photo.pic { padding: 0; cursor: zoom-in; font: inherit; }
.photo.zoom small { position: absolute; right: 10px; bottom: 10px; background: rgba(27, 19, 12, .78); color: var(--snow); }
.lightbox { position: fixed; inset: 0; z-index: 70; background: #0b0805; overflow: hidden; animation: fade .25s; touch-action: pan-y pinch-zoom; }
.lightbox img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; user-select: none; }
.lb-btn { position: absolute; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(27, 19, 12, .72); color: var(--snow); font-size: 30px; line-height: 1; display: grid; place-items: center; box-shadow: inset 0 0 0 2px rgba(243, 246, 251, .5); }
.lb-close { top: calc(14px + env(safe-area-inset-top, 0px)); right: calc(14px + env(safe-area-inset-right, 0px)); }
.lb-prev { left: calc(14px + env(safe-area-inset-left, 0px)); top: calc(50% - 24px); }
.lb-next { right: calc(14px + env(safe-area-inset-right, 0px)); top: calc(50% - 24px); }
.lb-count { position: absolute; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: rgba(27, 19, 12, .72); color: var(--snow); font-size: 14px; font-weight: 700; padding: 3px 12px; border-radius: 999px; }
.caption { font-size: 13px; font-weight: 700; color: var(--ink-soft); margin: -6px 0 12px; }
.dyk { background: #fff9ea; border: 1px solid var(--paper-edge); border-left: 5px solid var(--green); border-radius: 10px; padding: 10px 12px; margin: 0 0 12px; }
.dyk .tag { display: block; color: var(--green); font-weight: 800; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 4px; }
.dyk p { margin: 0 0 6px; } .dyk p:last-child { margin: 0; }
.quote { font-family: var(--font-hand); font-size: 1.4rem; line-height: 1.3; border-left: 4px solid var(--brass); padding-left: 12px; margin: 0 0 12px; }
.quote p { margin: 0 0 6px; }
.joke { background: #fff9ea; border: 1px solid var(--paper-edge); border-radius: 10px; padding: 10px 12px; margin: 0 0 10px; }
.joke summary { cursor: pointer; font-weight: 800; list-style: none; }
.joke summary::-webkit-details-marker { display: none; }
.joke summary::after { content: " Tap for the answer"; font-weight: 700; font-size: 12px; color: var(--holly); white-space: nowrap; }
.joke[open] summary::after { content: ""; }
.joke p { margin: 6px 0 0; font-family: var(--font-hand); font-size: 1.5rem; color: var(--holly); }
.names-head { font-weight: 800; margin: 0 0 6px; }
.names { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 12px; padding: 0; list-style: none; }
.names li { background: #fff9ea; border: 1px solid var(--paper-edge); border-radius: 999px; padding: 1px 9px; font-size: 13px; }
.facts { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; padding: 0; list-style: none; }
.facts li { background: #fff9ea; border: 1px solid var(--paper-edge); border-radius: 999px; padding: 2px 10px; font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.album { display: grid; gap: 8px; margin: 4px 0 12px; }
.album .photo.pic { margin: 0; }
.thumbs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.thumbs button { flex: none; width: 54px; height: 54px; padding: 0; border: 3px solid transparent; border-radius: 9px; overflow: hidden; background: var(--paper-edge); }
.thumbs button[aria-pressed="true"] { border-color: var(--holly); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.btn {
  border: 0; border-radius: 999px; padding: 11px 20px; font-weight: 800; display: inline-flex; align-items: center; gap: 8px;
  background: var(--holly); color: var(--snow); box-shadow: 0 4px 0 var(--holly-dark); transition: transform .1s, box-shadow .1s;
}
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--holly-dark); }
.btn.gold { background: var(--brass); color: var(--ink); box-shadow: 0 4px 0 var(--brass-dark); }
.btn.ghost { background: transparent; color: var(--ink-soft); box-shadow: inset 0 0 0 2px var(--paper-edge); }
.btn:disabled { opacity: .5; cursor: default; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }

/* the letter itself */
.letter { font-family: var(--font-hand); font-size: 1.45rem; line-height: 1.3; color: var(--ink);
  background: repeating-linear-gradient(transparent 0 33px, rgba(120, 90, 50, .18) 33px 34px); padding-top: 4px; }
.letter p { margin: 0 0 8px; }
.wish { list-style: none; padding: 0; margin: 10px 0 14px; display: grid; gap: 8px; font-family: var(--font-body); font-size: 15px; }
.wish li {
  display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px;
  background: #fff9ea; border: 1px solid var(--paper-edge); border-radius: 10px; padding: 8px 10px;
}
.wish .item b { display: block; }
.wish .item span { font-size: 12px; color: var(--ink-soft); }
.wish .price { font-weight: 800; font-variant-numeric: tabular-nums; }
.wish .give { padding: 7px 12px; font-size: 13px; }
.wish li.done { opacity: .6; }
.wish li.done .give { background: var(--green); box-shadow: 0 3px 0 #1d4f34; }
.signoff { font-family: var(--font-hand); font-size: 1.6rem; }
.hoof { display: inline-flex; gap: 3px; align-items: flex-start; transform: rotate(-12deg); vertical-align: middle; }
.hoofprint { width: 26px; height: 26px; fill: var(--wood-dark); }
.hoofprint + .hoofprint { margin-top: 12px; }

/* share card + QR */
.share-card {
  max-width: 760px; margin: 0 auto 30px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 22px; align-items: center;
  background: linear-gradient(160deg, var(--holly), var(--holly-dark)); border-radius: 16px; padding: 18px 20px; box-shadow: 0 14px 30px var(--shadow);
}
.share-card h2 { font-size: clamp(1.3rem, 3vw, 1.6rem); }
.share-card p { margin: 6px 0 12px; color: var(--snow); text-wrap: pretty; }
.qr { margin: 0; background: #fff; border-radius: 12px; padding: 10px; display: grid; gap: 4px; justify-items: center; color: var(--ink); }
.qr svg { width: 132px; height: 132px; display: block; }
.qr figcaption { font-size: 12px; font-weight: 800; text-align: center; }
.btn.line { background: transparent; color: var(--snow); box-shadow: inset 0 0 0 2px rgba(243, 246, 251, .6); }
@media (max-width: 560px) { .share-card { grid-template-columns: minmax(0, 1fr); text-align: center; } .share-card .btn-row { justify-content: center; } .qr { justify-self: center; } }

/* "have you seen the letters?" pop-up */
.nudge {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 55;
  width: min(calc(100% - 32px), 380px); background: var(--holly); color: var(--snow); border-radius: 16px; padding: 16px;
  box-shadow: 0 20px 50px var(--shadow), inset 0 0 0 2px var(--brass); display: grid; gap: 10px; justify-items: center; text-align: center;
  animation: nudgeIn .6s cubic-bezier(.2, 1.4, .4, 1);
}
@keyframes nudgeIn { from { transform: translate(-50%, 140%) rotate(-4deg); opacity: 0; } }
.nudge b { font-family: var(--font-display); font-weight: 400; font-size: 1.35rem; line-height: 1.15; text-wrap: balance; }
.nudge-ponies { display: flex; padding-left: 8px; }
.nudge-ponies img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid var(--brass); margin-left: -8px; background: var(--night-3); }
.nudge .btn-row { justify-content: center; margin: 0; }
.share { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--ink-soft); border-top: 1px dashed var(--paper-edge); padding-top: 12px; margin-top: 8px; }
.share code { background: #fff9ea; border: 1px solid var(--paper-edge); padding: 3px 8px; border-radius: 6px; font-size: 12px; overflow-wrap: anywhere; }

/* checkout */
.field { display: grid; gap: 4px; margin-bottom: 12px; font-size: 14px; font-weight: 700; }
.field input[type=text] { font: inherit; font-weight: 400; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--paper-edge); background: #fff; color: var(--ink); }
.summary { display: flex; justify-content: space-between; align-items: center; background: #fff9ea; border-radius: 10px; padding: 12px; margin-bottom: 14px; border: 1px solid var(--paper-edge); }
.summary b { font-size: 1.3rem; font-variant-numeric: tabular-nums; }

/* envelope reveal */
.envelope { position: relative; width: min(100%, 300px); aspect-ratio: 3 / 2; margin: 10px auto 18px; }
.env-back { position: absolute; inset: 0; background: var(--holly); border-radius: 6px; }
.env-letter {
  position: absolute; left: 8%; right: 8%; top: 10%; bottom: 6%; background: var(--paper); border-radius: 4px;
  display: grid; place-items: center; font-family: var(--font-hand); font-size: 1.4rem; color: var(--ink);
  animation: slideUp 1s 1s forwards cubic-bezier(.3, 1.4, .5, 1); box-shadow: 0 2px 6px var(--shadow);
}
@keyframes slideUp { to { transform: translateY(-55%); } }
.env-front { position: absolute; inset: 0; border-radius: 6px; z-index: 2; pointer-events: none;
  background: linear-gradient(to top right, var(--holly-dark) 50%, transparent 50%) left / 50% 100% no-repeat,
              linear-gradient(to top left, var(--holly-dark) 50%, transparent 50%) right / 50% 100% no-repeat; }
.env-flap { position: absolute; left: 0; right: 0; top: 0; height: 55%; z-index: 3; transform-origin: top;
  background: linear-gradient(to bottom right, #a8312f 50%, transparent 50%) left / 50% 100% no-repeat,
              linear-gradient(to bottom left, #a8312f 50%, transparent 50%) right / 50% 100% no-repeat;
  animation: flap .7s .3s forwards; }
@keyframes flap { to { transform: rotateX(180deg); z-index: 0; } }
.seal { position: absolute; left: 50%; top: 48%; transform: translate(-50%, -50%); z-index: 4; font-size: 30px; animation: sealOff .4s .2s forwards; }
@keyframes sealOff { to { transform: translate(-50%, -50%) scale(0); opacity: 0; } }
.thanks { animation: fade .6s 1.6s backwards; }
/* intro gift box */
.intro { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(6, 10, 18, .88); backdrop-filter: blur(6px); }
.intro-card { text-align: center; display: grid; gap: 14px; justify-items: center; max-width: 420px; }
.giftbox { position: relative; width: 170px; height: 150px; margin-top: 30px; }
.box { position: absolute; bottom: 0; left: 10px; right: 10px; height: 100px; background: var(--holly); border-radius: 6px;
  background-image: linear-gradient(90deg, transparent 43%, var(--brass) 43% 57%, transparent 57%); }
.lid { position: absolute; top: 18px; left: 0; right: 0; height: 36px; background: #d14d4b; border-radius: 6px; z-index: 2;
  background-image: linear-gradient(90deg, transparent 43%, var(--brass) 43% 57%, transparent 57%); box-shadow: 0 4px 0 var(--holly-dark); transition: transform .8s cubic-bezier(.5, -0.3, .4, 1.4); }
.lid::before { content: "🎀"; position: absolute; top: -34px; left: 50%; transform: translateX(-50%); font-size: 46px; }
.giftbox.wiggle { animation: wiggle 1.6s infinite; }
@keyframes wiggle { 0%, 70%, 100% { transform: rotate(0); } 75% { transform: rotate(-6deg); } 85% { transform: rotate(6deg); } 95% { transform: rotate(-3deg); } }
.giftbox.opened .lid { transform: translate(90px, -140px) rotate(40deg); }
.intro h2 { font-size: 1.9rem; }
.intro p { color: var(--muted); margin: 0; }
.intro .price-tag { font-family: var(--font-display); color: var(--brass); font-size: 1.4rem; }
.intro.leaving { animation: fade .6s reverse forwards; }

/* toast + confetti */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, calc(100% + 60px)); z-index: 80;
  background: var(--paper); color: var(--ink); font-weight: 700; padding: 10px 18px; border-radius: 999px; box-shadow: 0 10px 30px var(--shadow);
  transition: transform .35s cubic-bezier(.2, 1.3, .4, 1), visibility .35s; max-width: calc(100% - 32px); text-align: center; visibility: hidden;
}
.toast.show { transform: translate(-50%, 0); visibility: visible; }
.confetti { position: fixed; top: -20px; z-index: 90; pointer-events: none; width: 10px; height: 14px; border-radius: 2px; animation: drop var(--t, 2.6s) ease-in forwards; }
@keyframes drop { to { transform: translate(var(--dx, 0), 110vh) rotate(var(--r, 720deg)); } }

footer { margin-top: 48px; text-align: center; color: var(--muted); font-size: 13px; display: grid; gap: 4px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  #snow { display: none; }
}

/* ---------- production additions ---------- */
body.modal-open { overflow: hidden; }
a.btn { text-decoration: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.noscript { background: var(--paper); color: var(--ink); border-radius: 12px; padding: 16px; margin-bottom: 24px; text-align: center; }
.stall .meta { font-size: 13px; color: var(--muted); }

/* team preview strip (only ever shown in the team-preview copy) */
.demo-strip {
  display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: center;
  background: rgba(230, 184, 90, .12); border: 1px dashed var(--brass-dark); color: var(--straw);
  border-radius: 10px; padding: 8px 14px; font-size: 14px; margin-bottom: 22px;
}
.demo-strip strong { color: var(--brass); }
.demo-strip select { background: var(--night-2); color: var(--snow); border: 1px solid var(--brass-dark); border-radius: 6px; padding: 4px 8px; font: inherit; }
.demo-strip button { background: none; border: 0; color: var(--brass); text-decoration: underline; padding: 0; }

/* donate card */
.support { max-width: 760px; margin: 0 auto 16px; background: rgba(23, 39, 64, .85); border: 1px solid var(--night-3); border-radius: 16px; padding: 18px 20px; display: grid; gap: 12px; }
.support h2 { font-size: clamp(1.3rem, 3vw, 1.6rem); }
.support p { margin: 0; color: var(--snow); text-wrap: pretty; }
.small-print { font-size: 13px; color: var(--muted) !important; }
.sheet .small-print { color: var(--ink-soft) !important; }
.amounts { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.amounts legend { padding: 0; margin-bottom: 6px; font-size: 14px; font-weight: 800; }
.amounts label { position: relative; cursor: pointer; }
.amounts input[type=radio] { position: absolute; inset: 0; opacity: 0; margin: 0; width: 100%; height: 100%; cursor: pointer; }
.amounts label span { display: block; min-width: 62px; padding: 9px 16px; border-radius: 999px; text-align: center; font-weight: 800; color: var(--straw); box-shadow: inset 0 0 0 2px var(--brass-dark); font-variant-numeric: tabular-nums; }
.amounts input:checked + span { background: var(--brass); color: var(--ink); }
.amounts input:focus-visible + span { outline: 3px solid var(--snow); outline-offset: 2px; }
.other-amount { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; }
.other-amount input { width: 96px; font: inherit; padding: 8px 12px; border-radius: 10px; border: 2px solid var(--brass-dark); background: #fff; color: var(--ink); }
.amount-error { color: #ffb4a8; font-size: 14px; font-weight: 700; margin: 0; }
.float-donate { position: fixed; right: calc(16px + env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 30; }
.intro { overflow: auto; }
.intro-card .amounts { justify-content: center; }
.intro-card .amounts legend { width: 100%; text-align: center; }
.intro .btn-row { justify-content: center; }
.intro .opened-hide { transition: opacity .4s; }
.intro.unwrapping .opened-hide { opacity: 0; }
.nudge p { margin: 0; font-size: 14px; }
.nudge .linkish { background: none; border: 0; padding: 0; color: var(--snow); font-size: 13px; text-decoration: underline; }
footer a { color: var(--straw); }
footer details { max-width: 64ch; margin: 8px auto 0; }
footer summary { cursor: pointer; color: var(--straw); }
footer details p { margin: 8px 0 0; text-align: left; }
@media (max-width: 560px) { .support { text-align: center; } .support .amounts, .support .btn-row { justify-content: center; } .amounts legend { width: 100%; text-align: center; } }
.donate-form { display: grid; gap: 12px; }
.page { overflow-x: clip; }
.sheet .envelope { margin-top: 96px; }
.intro h2 { line-height: 1.15; outline: none; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-delay: 0s !important; } }
/* envelope: triangular flap that tucks behind the letter once open */
.env-flap { background: #a8312f; clip-path: polygon(0 0, 100% 0, 50% 100%); animation: flapOpen .7s .3s forwards; }
@keyframes flapOpen { 60% { z-index: 3; } to { transform: rotateX(180deg); z-index: 0; } }
.env-letter { z-index: 1; }

/* your donations */
.mine { max-width: 760px; margin: 48px auto 0; scroll-margin-top: 16px; }
.mine-card { background: var(--paper); color: var(--ink); border-radius: 14px; padding: 20px; box-shadow: inset 0 0 0 1px var(--paper-edge); }
.mine-card > p { margin: 0 0 12px; text-wrap: pretty; }
.mine-card .small-print { color: var(--ink-soft) !important; }
.mine-card .linkish { background: none; border: 0; padding: 8px 0; color: var(--ink-soft); font-size: 13px; text-decoration: underline; text-align: left; }
#mineConfirm p { margin: 0 0 8px; font-weight: 700; }
.support a { color: var(--straw); font-weight: 700; }
#mineLinkRow:has(a[hidden]) { display: none; }
.donate-form .field { margin: 0; max-width: 360px; }
.intro-card .donate-form { width: 100%; justify-items: center; }
.intro-card .donate-form .field { width: 100%; max-width: 320px; text-align: left; }
@media (max-width: 560px) { .support .donate-form { justify-items: center; } .support .donate-form .field { width: 100%; text-align: left; } }
@media (max-width: 480px) { .mine .wish li { display: flex; flex-wrap: wrap; } .mine .wish .item { flex: 1 0 100%; } .mine .wish .give { margin-left: auto; white-space: nowrap; } }

/* final changes */
.letter .ask-adult { font-size: 1.15rem; }
.album-cap { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 1.15rem; color: var(--holly-dark); }
.jg-star { margin: 22px auto 0; max-width: 760px; text-align: center; display: grid; gap: 10px; justify-items: center; padding: 18px 20px; border-radius: 16px; border: 2px dashed var(--brass-dark); background: rgba(23, 39, 64, .85); }
.jg-star p { margin: 0; color: var(--snow); font-weight: 700; text-wrap: balance; }
.star-btn { font-size: 1.05rem; overflow-wrap: anywhere; }
.star-btn span { color: var(--holly-dark); font-size: 1.3em; line-height: 1; vertical-align: -2px; }
.nudge a:not(.btn) { color: var(--straw); font-weight: 800; overflow-wrap: anywhere; }
.nudge p { margin: 0; }
a.btn[data-went] { text-align: center; }
