:root {
  --cream: #fbf7ef;
  --cream-deep: #f2e9df;
  --pink: #f23d87;
  --pink-dark: #b52a64;
  --pink-soft: #fbdce8;
  --silver: #e2e4e8;
  --lavender: #e6e4f7;
  --ink: #211d1f;
  --shadow: 0 14px 40px rgba(92, 55, 68, .10);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { min-width: 320px; margin: 0; background: #eee7e1; color: var(--ink); font-family: "Trebuchet MS", Arial, sans-serif; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid var(--pink-dark); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.page { width: 100%; max-width: 940px; margin-inline: auto; }
.paper {
  background-color: var(--cream);
  background-image: radial-gradient(circle at 16% 21%, rgba(255,255,255,.34) 0 1px, transparent 1.5px), radial-gradient(circle at 73% 68%, rgba(151,116,106,.035) 0 1px, transparent 1.5px), linear-gradient(110deg, rgba(255,255,255,.22), transparent 60%);
  background-size: 8px 8px, 13px 13px, 100% 100%;
  box-shadow: var(--shadow);
}

/* Selector at / and language control outside the poster */
.language-page { display: grid; min-height: 100dvh; place-items: center; padding: 24px; }
.language-panel { width: min(100%, 430px); padding: 38px 28px 42px; border-radius: 8px; text-align: center; }
.selector-spark, .section-spark { display: block; color: var(--pink); font-size: 20px; line-height: 1; }
.language-panel h1 { margin: 12px 0 5px; font: italic 600 clamp(29px, 8vw, 39px)/1.15 Georgia, serif; }
.language-panel p { margin: 0 0 28px; color: #745d66; font-size: 13px; }
.language-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.language-choice { display: grid; min-height: 64px; place-items: center; border: 1px solid rgba(255,255,255,.8); border-radius: 16px; box-shadow: 0 5px 11px rgba(78,54,62,.1); color: var(--ink); text-decoration: none; font-size: 17px; transition: transform .22s ease, box-shadow .22s ease; }
.language-choice:hover { transform: translateY(-3px); box-shadow: 0 8px 14px rgba(78,54,62,.16); }
.language-choice--es { background: var(--pink-soft); }
.language-choice--en { background: var(--lavender); }
.language-switch { display: flex; align-items: center; justify-content: flex-end; gap: 9px; width: 100%; max-width: 940px; min-height: 42px; margin: auto; padding: 7px 16px; background: var(--cream); color: #725861; font-size: 11px; font-weight: 700; letter-spacing: .13em; }
.language-switch a { color: var(--ink); text-decoration: none; }
.language-switch a:hover { color: var(--pink-dark); text-decoration: underline; text-underline-offset: 3px; }
.language-switch [aria-current="page"] { color: var(--pink-dark); }

/* Hand-built invitation from the Canva visual reference */
.poster { position: relative; isolation: isolate; overflow: hidden; --hero-stage-height: clamp(445px, 115vw, 690px); padding: 12px clamp(12px, 4.8vw, 34px) 26px; }
.clip-definitions { position: absolute; pointer-events: none; }
.disco {
  position: absolute;
  z-index: 0;
  display: block;
  height: auto;
  max-width: none;
  animation: disco-drift 12s ease-in-out infinite alternate;
  pointer-events: none;
  user-select: none;
}
.disco--top { top: 0; left: 0; width: 96%; transform-origin: 10% 13%; }
.disco--left { top: calc(var(--hero-stage-height) - clamp(27px, 7vw, 44px)); left: 0; width: 55%; transform-origin: 10% 50%; animation-delay: -3s; }
.disco--bottom { right: 0; bottom: 0; width: 70%; transform-origin: 85% 85%; animation-delay: -6s; }
.bunting { position: absolute; top: -15px; right: -11px; display: flex; gap: 4px; padding: 3px 0 0; border-top: 2px solid rgba(54,45,48,.55); transform: rotate(12deg); }
.bunting i { display: block; width: clamp(21px, 5vw, 31px); height: clamp(29px, 7vw, 42px); clip-path: polygon(0 0, 100% 0, 50% 100%); background: #f48fb4; opacity: .95; }
.bunting i:nth-child(2) { background: #e0e3e8; }
.bunting i:nth-child(3) { background: #f8b7cf; }
.bunting i:nth-child(4) { background: #cfd4db; }

.hero-stage { position: relative; height: var(--hero-stage-height); --balloon-size: clamp(148px, 39vw, 215px); --hand-anchor-x: 50%; --hand-anchor-y: 42%; }
.britney-photo { position: absolute; z-index: 2; top: clamp(46px, 12vw, 76px); left: 50%; display: block; width: clamp(190px, 49vw, 304px); height: auto; filter: grayscale(1) contrast(1.1) brightness(1.08); transform: translateX(-50%); clip-path: url(#britney-cutout); }
.balloon-rig { position: absolute; inset: 0; z-index: 3; pointer-events: none; transform-origin: var(--hand-anchor-x) var(--hand-anchor-y); will-change: transform; }
.balloon-rig--two { --balloon-rise: -6px; --balloon-cycle: 4.8s; --balloon-delay: 0s; animation: balloon-sway-two var(--balloon-cycle) ease-in-out var(--balloon-delay) infinite; }
.balloon-rig--six { --balloon-rise: -5px; --balloon-cycle: 5.6s; --balloon-delay: -1.9s; animation: balloon-sway-six var(--balloon-cycle) ease-in-out var(--balloon-delay) infinite; }
.balloon {
  position: absolute;
  z-index: 2;
  display: block;
  width: var(--balloon-size);
  height: auto;
  object-fit: contain;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}
.balloon--two { top: clamp(12px, 3vw, 22px); left: calc(50% - var(--balloon-size) - clamp(30px, 5vw, 70px)); -webkit-mask-image: url("../assets/images/decor/balloons/balloon-2-mask.svg"); mask-image: url("../assets/images/decor/balloons/balloon-2-mask.svg"); }
.balloon--six { top: clamp(17px, 4vw, 28px); left: calc(50% - clamp(63px, 16.5vw, 92px) - clamp(38px, 6vw, 80px)); -webkit-mask-image: url("../assets/images/decor/balloons/balloon-6-mask.svg"); mask-image: url("../assets/images/decor/balloons/balloon-6-mask.svg"); }
.balloon-strings { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; transform-origin: var(--hand-anchor-x) var(--hand-anchor-y); }
.balloon-strings path { fill: none; stroke: #d05b7d; stroke-width: 1.55; vector-effect: non-scaling-stroke; stroke-linecap: round; }
.balloon-rig .balloon, .balloon-rig .balloon-strings { animation-duration: var(--balloon-cycle); animation-timing-function: ease-in-out; animation-delay: var(--balloon-delay); animation-iteration-count: infinite; }
.balloon-rig .balloon { animation-name: balloon-lift; }
.balloon-rig .balloon-strings { animation-name: balloon-string-lift; }
.star, .heart { position: absolute; z-index: 1; line-height: 1; pointer-events: none; }
.star {
  font-size: clamp(28px, 9vw, 52px);
  color: var(--pink);
  background-image: radial-gradient(circle at 2px 2px, rgba(255,255,255,.88) 0 1px, transparent 1.5px), linear-gradient(135deg, #ffdce9, #ff75ad 22%, var(--pink) 48%, #ff94bd 73%, #cc2168);
  background-size: 7px 7px, 100% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: .7px #d32a71;
  text-shadow: 1px 2px rgba(116, 39, 70, .17);
  animation: star-turn 10s ease-in-out infinite alternate;
}
.star--two, .star--three {
  color: var(--silver);
  background-image: radial-gradient(circle at 2px 2px, rgba(255,255,255,.95) 0 1px, transparent 1.5px), linear-gradient(135deg, #fff, #dce0e5 23%, #fcfdfd 42%, #b7bec7 64%, #f5f7f8 82%, #cbd0d8);
  -webkit-text-stroke: .7px #aab2bd;
  text-shadow: 1px 2px rgba(107, 114, 124, .16);
}
.star--one { top: 31%; left: 5%; transform: rotate(-13deg); }
.star--two { top: 23%; right: 6%; color: var(--silver); transform: rotate(15deg); animation-delay: -3s; }
.star--three { top: 62%; left: 6%; color: var(--silver); transform: rotate(17deg); animation-delay: -5s; }
.star--four { top: 71%; right: 4%; transform: rotate(-15deg); animation-delay: -2s; }
.star--five { top: 86%; left: 12%; font-size: clamp(21px, 6vw, 38px); transform: rotate(9deg); }
.heart { font: 700 clamp(33px, 10vw, 57px)/1 cursive; color: var(--pink); }
.heart--one { top: 17%; left: 3%; transform: rotate(-25deg); }
.heart--two { top: 54%; right: 4%; transform: rotate(18deg); }
.heart--three { top: 77%; left: 5%; color: var(--ink); font-size: clamp(24px, 6vw, 34px); transform: rotate(-12deg); }

.collage { position: relative; z-index: 4; display: grid; justify-items: center; gap: 5px; width: max-content; max-width: 100%; margin: -2px auto 0; }
.collage-word { display: flex; align-items: center; justify-content: center; gap: clamp(3px, .55vw, 5px); white-space: nowrap; }
.collage-word span { display: grid; flex: 0 0 auto; place-items: center; width: .91em; height: 1.13em; padding-bottom: .05em; font: 700 clamp(31px, 8.7vw, 58px)/1 Georgia, serif; box-shadow: 1px 3px 3px rgba(59,40,48,.11); }
.collage-word span:nth-child(5n+1) { background: #ffd489; color: #a72a5d; transform: rotate(7deg); font-family: Georgia, serif; }
.collage-word span:nth-child(5n+2) { background: #cf9ed3; color: #fff8f8; transform: rotate(-4deg); font-family: "Times New Roman", serif; }
.collage-word span:nth-child(5n+3) { background: #ffd8e6; color: #b92a75; transform: rotate(-7deg); font-family: Arial, sans-serif; }
.collage-word span:nth-child(5n+4) { background: #e68f99; color: #276f60; transform: rotate(6deg); font-family: Georgia, serif; font-style: italic; }
.collage-word span:nth-child(5n) { background: #849ed8; color: #ffbed0; transform: rotate(-4deg); font-family: "Arial Black", Arial, sans-serif; }
.party-word { transform: rotate(-2deg); }
.party-word span:nth-child(1) { background: #ef7ba3; color: #fff; }
.party-word span:nth-child(2) { background: #ffd07b; color: var(--ink); }
.party-word span:nth-child(3) { background: #f7cad6; color: #a52d5c; }
.party-word span:nth-child(4) { background: #c9b6da; color: #623a79; }
.party-word span:nth-child(5) { background: #ffbed0; color: #b52265; }

.details { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; margin-top: 27px; }
.detail { display: grid; grid-template-rows: 49px 22px 1fr; justify-items: center; min-width: 0; min-height: 145px; padding: 0 4px; text-align: center; }
.detail + .detail { border-left: 1px solid rgba(63,49,53,.25); }
.detail-icon { display: grid; place-items: center; width: 47px; height: 43px; color: var(--ink); border-radius: 40% 55% 48% 55%; background: radial-gradient(circle at 33% 27%, #fff9fb, #f5cdd9 68%, #ebbecd); }
.detail-icon svg { width: 25px; height: 25px; }
.detail h3 { margin: 0; font-size: clamp(10px, 2.8vw, 15px); font-weight: 500; letter-spacing: .14em; }
.detail p, .detail a { margin: 0; font-size: clamp(10px, 2.8vw, 16px); line-height: 1.24; }
.detail p span, .detail p strong, .detail a span { display: block; }
.detail strong { color: var(--pink-dark); font-family: Georgia, serif; font-size: 1.13em; white-space: nowrap; }
.detail a { display: flex; flex-direction: column; align-items: center; color: var(--ink); text-decoration: none; text-underline-offset: 3px; }
.detail a:hover { text-decoration: underline; }

.actions { position: relative; z-index: 3; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin-top: 17px; }
.action { display: grid; grid-template-columns: 1fr auto; grid-template-rows: 33px 1fr; align-items: center; min-width: 0; min-height: 99px; padding: 8px 7px; border: 1px solid rgba(255,255,255,.7); border-radius: 15px; box-shadow: 0 5px 8px rgba(78,54,62,.12); color: var(--ink); cursor: pointer; transition: transform .22s ease, box-shadow .22s ease; }
.action:hover { transform: translateY(-3px); box-shadow: 0 8px 14px rgba(78,54,62,.17); }
.action:active { transform: scale(.98); }
.action--gallery { background: linear-gradient(110deg, #fde4e7, #f5cad8); }
.action--playlist { background: linear-gradient(110deg, #e8e4f1, #dbd6e8); }
.action--rsvp { background: linear-gradient(110deg, #fbe0e4, #f6cdd8); }
.action-icon { width: 29px; height: 29px; }
.action-arrow { grid-column: 2; grid-row: 1; display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; background: var(--pink); color: #fff; font: 27px/1 Arial, sans-serif; }
.action-label { grid-column: 1 / -1; align-self: center; min-width: 0; font-size: clamp(10px, 2.8vw, 16px); line-height: 1.14; text-align: center; }
.action-label > span, .action-label small { display: block; }
.action-label small { margin-top: 3px; font-size: .74em; }

.countdown-section { position: relative; z-index: 2; isolation: isolate; overflow: clip; margin-top: 20px; padding: 15px 0 4px; text-align: center; background: linear-gradient(rgba(106,78,86,.14), rgba(106,78,86,.14)) top / 100% 1px no-repeat; }
.countdown-section > * { position: relative; z-index: 1; }
.countdown-section::before, .countdown-section::after { position: absolute; z-index: 0; content: ""; pointer-events: none; }
.countdown-section::before { inset: -30px -35px; background: radial-gradient(ellipse at 20% 42%, #f16fa6 0%, transparent 48%), radial-gradient(ellipse at 80% 60%, #a994de 0%, transparent 48%), radial-gradient(ellipse at 50% 15%, #f9c9b3 0%, transparent 46%); filter: blur(40px); opacity: .38; animation: countdown-blobs 14s ease-in-out infinite alternate; }
.countdown-section::after { inset: 0 -70px; background: linear-gradient(115deg, transparent 26%, rgba(255,255,255,.12) 37%, rgba(255,255,255,.8) 48%, rgba(255,246,225,.22) 58%, transparent 70%); opacity: .24; animation: countdown-shimmer 10s ease-in-out infinite alternate; }
.countdown-section h3 { margin: 2px 0 13px; font: italic 600 clamp(24px, 6vw, 36px)/1.1 Georgia, serif; }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.countdown-unit { display: grid; align-content: center; justify-items: center; min-width: 0; min-height: 77px; padding: 8px 3px; border: 1px solid #efd0db; border-radius: 13px; background: #f9e8e9; }
.countdown-unit:nth-child(2) { border-color: #e2d7e9; background: #eee6f0; }
.countdown-unit:nth-child(3) { border-color: #efd6d0; background: #f7e4df; }
.countdown-unit:nth-child(4) { border-color: #e9cad9; background: #f3dce6; }
.countdown-unit strong { font: 700 clamp(24px, 7vw, 39px)/1 Georgia, serif; font-variant-numeric: tabular-nums; }
.countdown-unit span { margin-top: 8px; font-size: clamp(8px, 2.1vw, 11px); letter-spacing: .05em; }
#countdown-message { min-height: 1.2em; margin: 9px 0 0; color: var(--pink-dark); font-size: 13px; font-weight: 700; }
.poster-note { position: relative; z-index: 2; max-width: 34ch; margin: 9px auto 0; text-align: center; font: italic clamp(17px, 3.9vw, 25px)/1.35 "Segoe Script", "Bradley Hand", "Brush Script MT", Georgia, cursive; }

/* Gallery and footer */
.gallery-section { margin-top: 12px; padding: 25px 0 28px; text-align: center; scroll-margin-top: 12px; }
.gallery-section h2 { margin: 5px 0 8px; font: italic 600 clamp(27px, 7vw, 39px)/1.12 Georgia, serif; }
.gallery-intro { margin: 0 18px 22px; font-size: 13px; }
.add-memory-button { display: inline-flex; align-items: center; justify-content: center; width: auto; min-width: max-content; max-width: calc(100% - 32px); min-height: 44px; margin: 0 16px 21px; padding: 10px 20px; border: 1px solid #e9bfd0; border-radius: 12px; background: linear-gradient(110deg, #fde4e7, #eae2f5); color: var(--pink-dark); box-shadow: 0 4px 9px rgba(78,54,62,.10); font-weight: 700; white-space: nowrap; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease; }
.add-memory-button:hover { transform: translateY(-2px); box-shadow: 0 7px 12px rgba(78,54,62,.15); }
.add-memory-button:active, .add-memory-button.is-pressed { transform: scale(.97); }
.gallery-track { display: flex; gap: 13px; overflow-x: auto; overscroll-behavior-inline: contain; padding: 2px 18px 16px; scrollbar-color: #e5a8bc transparent; scroll-snap-type: x mandatory; }
.gallery-item, .gallery-placeholder { flex: 0 0 min(80vw, 340px); min-width: 0; aspect-ratio: 4 / 5; scroll-snap-align: center; }
.gallery-item { position: relative; }
.gallery-card { position: relative; display: block; width: 100%; height: 100%; overflow: hidden; padding: 0; border: 0; border-radius: 8px; background: #efe1dc; box-shadow: 0 4px 10px rgba(53,41,45,.11); cursor: pointer; }
.memory-edit, .memory-delete { position: absolute; z-index: 2; top: 9px; right: 9px; min-width: 56px; min-height: 34px; padding: 6px 11px; border: 1px solid rgba(255,255,255,.85); border-radius: 999px; background: rgba(251,247,239,.94); box-shadow: 0 3px 9px rgba(40,25,31,.2); color: var(--pink-dark); font-size: 12px; font-weight: 700; cursor: pointer; transition: transform .18s ease, background-color .18s ease; }
.memory-edit { right: 82px; }
.memory-edit:hover, .memory-delete:hover { background: #fff; transform: translateY(-1px); }
.memory-edit:active, .memory-edit.is-pressed, .memory-delete:active, .memory-delete.is-pressed { transform: scale(.96); }
.photo-unavailable { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; min-height: 180px; padding: 50px 15px; border-radius: 8px; background: linear-gradient(145deg, #f2e9df, #eee6f1); color: #6b5960; font-size: 14px; text-align: center; }
.gallery-card img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 35%; transition: transform .5s ease; }
.gallery-card:hover img { transform: scale(1.025); }
.gallery-caption { position: absolute; right: 0; bottom: 0; left: 0; padding: 18px 8px 9px; background: linear-gradient(transparent, rgba(20,14,17,.72)); color: #fff; text-align: left; font-size: 12px; }
.gallery-memory-message { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; line-height: 1.35; white-space: normal; }
.gallery-memory-author { display: block; margin-top: 3px; font-weight: 700; }
.gallery-placeholder { display: grid; place-content: center; justify-items: center; padding: 12px; border: 1px solid #e9cbd4; border-radius: 8px; background: linear-gradient(135deg, #f8e2e7, #efe6e4 58%, #e9d9e8); color: #805269; }
.gallery-placeholder:nth-child(3) { background: linear-gradient(145deg, #ede4ef, #f7e0e7); }
.gallery-placeholder:nth-child(4) { background: linear-gradient(145deg, #f6e7dd, #f5dce6); }
.gallery-placeholder span { display: block; color: #dba7bd; font: italic 700 40px/1 Georgia, serif; }
.gallery-placeholder p { max-width: 14ch; margin: 5px auto 0; font-size: 12px; line-height: 1.35; }
.page-footer { padding: 21px 12px 27px; color: #6b5960; text-align: center; font-size: 11px; letter-spacing: .08em; }
.page-footer span:nth-child(2) { color: var(--pink-dark); font-size: 16px; vertical-align: -.08em; }

/* Feedback, native dialogs, and optional entry gate */
.toast { position: fixed; z-index: 30; right: 18px; bottom: 20px; left: 18px; width: fit-content; max-width: calc(100% - 36px); margin: auto; padding: 12px 18px; border-radius: 11px; background: var(--ink); box-shadow: 0 8px 30px rgba(0,0,0,.18); color: #fff; text-align: center; font-size: 14px; }
.lightbox, .rsvp-dialog, .memory-dialog { border: 0; padding: 0; }
.lightbox::backdrop, .rsvp-dialog::backdrop, .memory-dialog::backdrop { background: rgba(27,21,25,.84); }
.lightbox { width: min(92vw, 720px); max-height: calc(100dvh - 36px); overflow: visible; background: transparent; color: #fff; }
.lightbox-panel { position: relative; text-align: center; }
.lightbox-panel img { display: block; max-width: 100%; max-height: calc(100dvh - 90px); margin: auto; object-fit: contain; box-shadow: 0 10px 40px rgba(0,0,0,.35); }
.lightbox-panel p { max-width: 60ch; margin: 10px auto 0; font-size: 13px; line-height: 1.5; white-space: pre-line; }
.lightbox--memory { overflow-y: auto; }
.lightbox--memory .lightbox-panel img { max-height: min(65dvh, 620px); }
.lightbox--memory .lightbox-close { top: 4px; right: 4px; }
.modal-close { display: grid; place-items: center; width: 39px; height: 39px; border: 0; border-radius: 50%; background: #fff; color: var(--ink); font-size: 28px; line-height: 1; cursor: pointer; }
.lightbox-close { position: absolute; z-index: 1; top: -17px; right: -17px; }
.rsvp-dialog, .memory-dialog { width: min(92vw, 480px); max-height: calc(100dvh - 28px); overflow-y: auto; border-radius: 18px; background: var(--cream); color: var(--ink); box-shadow: 0 18px 55px rgba(0,0,0,.28); }
.rsvp-panel, .memory-panel { position: relative; padding: 28px clamp(18px, 5vw, 34px) 30px; }
.rsvp-close, .memory-close { position: absolute; top: 10px; right: 10px; }
.rsvp-panel h2, .memory-panel h2 { margin: 0 45px 20px 0; color: var(--pink-dark); font: italic 600 clamp(25px, 6vw, 34px)/1.2 Georgia, serif; }
#rsvp-form { display: grid; gap: 8px; }
.rsvp-status { margin: -8px 0 14px; color: var(--pink-dark); font-size: 13px; line-height: 1.4; }
#rsvp-form > label, #rsvp-form legend { font-size: 14px; font-weight: 700; }
#rsvp-form input[type="text"], #rsvp-form input[type="number"], #rsvp-form textarea { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid #bca7af; border-radius: 8px; background: #fffdfa; color: var(--ink); }
#rsvp-form textarea { min-height: 86px; resize: vertical; }
#rsvp-form fieldset { display: flex; gap: 20px; margin: 4px 0 2px; padding: 10px 0; border: 0; }
#rsvp-form fieldset legend { padding: 0 0 8px; }
#rsvp-form fieldset label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
#rsvp-form input[type="radio"] { width: 18px; height: 18px; accent-color: var(--pink-dark); }
.dress-code { display: flex; gap: 11px; align-items: center; margin: 4px 0 2px; padding: 11px 13px; border: 1px solid #edcbd9; border-radius: 12px; background: linear-gradient(120deg, #fde4ed, #eee6f5); text-align: left; }
.dress-code-spark { color: var(--pink); font: 30px/1 Georgia, serif; }
.dress-code h3 { margin: 0 0 2px; color: var(--pink-dark); font-size: 13px; }
.dress-code p { margin: 0; font-size: 13px; }
#memory-form { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; gap: 8px; }
#memory-form > * { min-width: 0; }
#memory-form > label { font-size: 14px; font-weight: 700; }
#memory-form > label small { color: #705e68; font-size: 12px; font-weight: 400; }
#memory-form input[type="text"], #memory-form textarea { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid #bca7af; border-radius: 8px; background: #fffdfa; color: var(--ink); }
#memory-form textarea { min-height: 90px; resize: vertical; }
#memory-form input[type="file"] { width: 100%; max-width: 100%; min-width: 0; overflow: hidden; padding: 8px; border: 1px dashed #d99fb8; border-radius: 8px; background: #fffdfa; font-size: 13px; }
.memory-upload { position: relative; min-width: 0; }
#memory-form input[type="file"].sr-only { width: 1px; max-width: 1px; height: 1px; min-height: 0; padding: 0; border: 0; }
.memory-pick { display: inline-flex; align-items: center; justify-content: center; width: 100%; min-height: 42px; padding: 8px 12px; border: 1px dashed #d99fb8; border-radius: 8px; background: #fffdfa; color: var(--pink-dark); cursor: pointer; font-size: 13px; font-weight: 700; transition: background-color .18s ease, border-color .18s ease; }
.memory-pick:hover { border-color: var(--pink-dark); background: #fdf2f6; }
#memory-form input[type="file"]:focus-visible + .memory-pick { outline: 3px solid var(--pink-dark); outline-offset: 3px; }
.memory-preview { margin: 2px 0 7px; padding: 9px; border-radius: 9px; background: #f6e9ed; }
.memory-preview img { display: block; max-width: 100%; max-height: 180px; margin: auto; border-radius: 5px; object-fit: contain; }
.memory-preview figcaption { overflow: hidden; margin: 6px 0; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.memory-change { padding: 5px 8px; border: 0; background: transparent; color: var(--pink-dark); cursor: pointer; font-size: 12px; text-decoration: underline; }
.form-error { margin: 3px 0; color: #a51d43; font-size: 13px; font-weight: 700; }
.confirm-button { min-height: 47px; margin-top: 7px; border: 0; border-radius: 10px; background: var(--pink-dark); color: #fff; font-weight: 700; cursor: pointer; }
.confirm-button:hover { background: #872149; }
.entry-screen { position: fixed; z-index: 40; inset: 0; display: grid; place-items: center; padding: 24px; background: var(--cream); }
.entry-button { min-height: 68px; padding: 16px 26px; border: 0; border-radius: 16px; background: var(--pink-soft); color: var(--ink); box-shadow: var(--shadow); cursor: pointer; font-size: 20px; }

.delete-memory-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.delete-memory-actions .confirm-button { width: auto; min-width: 85px; }
.memory-cancel { padding: 11px 18px; border: 1px solid #bca7af; border-radius: 10px; background: transparent; color: var(--ink); cursor: pointer; }
.music-dock { position: sticky; z-index: 20; top: 0; display: flex; justify-content: flex-end; width: 100%; max-width: 940px; min-height: 50px; margin-inline: auto; padding: 6px 12px; background: var(--cream); }
.music-control { min-height: 38px; padding: 7px 13px; border: 1px solid #edcbd9; border-radius: 999px; background: #fff9fc; color: var(--pink-dark); font-size: 12px; cursor: pointer; transition: background-color .2s ease, transform .2s ease; }
.music-control.is-playing { background: var(--pink-soft); }
.music-control:active { transform: scale(.97); }
.music-enabled { scroll-padding-top: 60px; }
body:has(dialog[open]) .music-dock { visibility: hidden; }

/* Motion remains on transforms and opacity; the photo itself only enters once. */
.js-ready .reveal { opacity: 0; transform: translateY(18px); transition: opacity .58s ease-out, transform .58s ease-out; }
.js-ready .reveal.is-visible { opacity: 1; transform: translateY(0); }
.js-ready .britney-photo.reveal { transform: translate(-50%, 12px) scale(.98); transition-duration: .85s; }
.js-ready .britney-photo.reveal.is-visible { transform: translate(-50%, 0) scale(1); }
.js-ready .collage.reveal.is-visible .collage-word span { animation: letter-arrive .36s cubic-bezier(.2,.8,.2,1) both; }
.js-ready .collage.reveal.is-visible .birthday-word span:nth-child(2) { animation-delay: .06s; }
.js-ready .collage.reveal.is-visible .birthday-word span:nth-child(3) { animation-delay: .12s; }
.js-ready .collage.reveal.is-visible .birthday-word span:nth-child(4) { animation-delay: .18s; }
.js-ready .collage.reveal.is-visible .birthday-word span:nth-child(5) { animation-delay: .24s; }
.js-ready .collage.reveal.is-visible .birthday-word span:nth-child(6) { animation-delay: .30s; }
.js-ready .collage.reveal.is-visible .birthday-word span:nth-child(7) { animation-delay: .36s; }
.js-ready .collage.reveal.is-visible .birthday-word span:nth-child(8) { animation-delay: .42s; }
.js-ready .collage.reveal.is-visible .party-word span:nth-child(1) { animation-delay: .50s; }
.js-ready .collage.reveal.is-visible .party-word span:nth-child(2) { animation-delay: .56s; }
.js-ready .collage.reveal.is-visible .party-word span:nth-child(3) { animation-delay: .62s; }
.js-ready .collage.reveal.is-visible .party-word span:nth-child(4) { animation-delay: .68s; }
.js-ready .collage.reveal.is-visible .party-word span:nth-child(5) { animation-delay: .74s; }

.js-ready .details.reveal .detail,
.js-ready .actions.reveal .action,
.js-ready .countdown-section.reveal .countdown-unit,
.js-ready .gallery-item,
.js-ready .gallery-placeholder { opacity: 0; translate: 0 20px; scale: .97; transition: opacity .44s ease-out, translate .44s ease-out, scale .44s ease-out; }
.js-ready .details.reveal.is-visible .detail,
.js-ready .actions.reveal.is-visible .action,
.js-ready .countdown-section.reveal.is-visible .countdown-unit,
.js-ready .gallery-item.is-visible,
.js-ready .gallery-placeholder.is-visible { opacity: 1; translate: 0 0; scale: 1; }
.js-ready .details.reveal .detail:nth-child(2),
.js-ready .actions.reveal .action:nth-child(2) { transition-delay: .1s; }
.js-ready .details.reveal .detail:nth-child(3),
.js-ready .actions.reveal .action:nth-child(3) { transition-delay: .2s; }
.js-ready .countdown-section.reveal .section-spark,
.js-ready .countdown-section.reveal h3,
.js-ready .gallery-section.reveal .section-spark,
.js-ready .gallery-section.reveal h2,
.js-ready .gallery-section.reveal .gallery-intro,
.js-ready .gallery-section.reveal .add-memory-button { opacity: 0; translate: 0 14px; transition: opacity .42s ease-out, translate .42s ease-out, scale .42s ease-out, transform .18s ease, box-shadow .18s ease; }
.js-ready .countdown-section.reveal.is-visible .section-spark,
.js-ready .countdown-section.reveal.is-visible h3,
.js-ready .gallery-section.reveal.is-visible .section-spark,
.js-ready .gallery-section.reveal.is-visible h2,
.js-ready .gallery-section.reveal.is-visible .gallery-intro,
.js-ready .gallery-section.reveal.is-visible .add-memory-button { opacity: 1; translate: 0 0; scale: 1; }
.js-ready .countdown-section.reveal h3 { transition-delay: .07s; }
.js-ready .countdown-section.reveal .countdown-unit:nth-child(1) { transition-delay: .13s; }
.js-ready .countdown-section.reveal .countdown-unit:nth-child(2) { transition-delay: .20s; }
.js-ready .countdown-section.reveal .countdown-unit:nth-child(3) { transition-delay: .27s; }
.js-ready .countdown-section.reveal .countdown-unit:nth-child(4) { transition-delay: .34s; }
.js-ready .gallery-section.reveal .section-spark { scale: .82; }
.js-ready .gallery-section.reveal h2 { transition-delay: .08s; }
.js-ready .gallery-section.reveal .gallery-intro { transition-delay: .16s; }
.js-ready .gallery-section.reveal .add-memory-button { scale: .96; transition-delay: .24s; }
.js-ready .gallery-item:nth-child(4n + 2),
.js-ready .gallery-placeholder:nth-child(4n + 2) { transition-delay: .07s; }
.js-ready .gallery-item:nth-child(4n + 3),
.js-ready .gallery-placeholder:nth-child(4n + 3) { transition-delay: .14s; }
.js-ready .gallery-item:nth-child(4n + 4),
.js-ready .gallery-placeholder:nth-child(4n + 4) { transition-delay: .21s; }

.heart { animation: heart-beat 2.2s ease-in-out infinite; }
.heart--one { animation-delay: -.3s; }
.heart--two { animation-duration: 2.45s; animation-delay: -1.1s; }
.heart--three { animation-duration: 2.05s; animation-delay: -1.7s; }
.star { animation: pink-twinkle 3.9s ease-in-out infinite; }
.star--one { animation-delay: -.8s; }
.star--four { animation-duration: 4.5s; animation-delay: -2s; }
.star--five { animation-duration: 3.6s; animation-delay: -1.6s; }
.star--two, .star--three { animation: silver-glimmer 5.8s ease-in-out infinite; }
.star--two { animation-delay: -2.4s; }
.star--three { animation-duration: 6.5s; animation-delay: -4.2s; }
.disco--top { animation-duration: 10.2s; }
.disco--left { animation-duration: 8.8s; }
.disco--bottom { animation-duration: 11.6s; }

.action { transition: transform .18s ease, box-shadow .22s ease; touch-action: manipulation; }
.action:hover:not(.is-pressed) { transform: translateY(-2px); }
.action:active, .action.is-pressed { transform: scale(.97) !important; box-shadow: 0 3px 7px rgba(78,54,62,.14); }
.action-arrow { transition: transform .2s ease; }
.action:hover .action-arrow, .action:focus-visible .action-arrow, .action:active .action-arrow, .action.is-pressed .action-arrow { transform: translateX(3px); }
.action--playlist .action-icon { transition: transform .22s ease-out; }
.action--playlist:hover .action-icon,
.action--playlist:focus-visible .action-icon,
.action--playlist:active .action-icon,
.action--playlist.is-pressed .action-icon { transform: rotate(-5deg) translateY(-2px); }
.confirm-button { transition: transform .16s ease, background-color .16s ease; touch-action: manipulation; }
.confirm-button:active, .confirm-button.is-pressed { transform: scale(.98); }
.gallery-card:focus-visible img, .gallery-card:active img { transform: scale(1.025); }
.toast.toast-enter { animation: toast-in .23s ease-out both; }

.lightbox[open]::backdrop { animation: backdrop-in .22s ease-out both; }
.lightbox.is-closing::backdrop { animation: backdrop-out .22s ease-in both; }
.lightbox[open] .lightbox-panel { animation: lightbox-in .22s ease-out both; }
.lightbox.is-closing .lightbox-panel { animation: lightbox-out .22s ease-in both; }
.lightbox[open] #lightbox-caption { animation: caption-in .24s ease-out .06s both; }
.memory-preview:not([hidden]) { animation: preview-in .26s ease-out both; }
.memory-dialog .form-error:not([hidden]) { animation: preview-in .2s ease-out both; }
.rsvp-dialog[open]::backdrop { animation: backdrop-in .30s ease-out both; }
.rsvp-dialog.is-closing::backdrop { animation: backdrop-out .30s ease-in both; }
.rsvp-dialog[open] { animation: rsvp-in .30s ease-out both; }
.rsvp-dialog.is-closing { animation: rsvp-out .30s ease-in both; }
.memory-dialog[open]::backdrop { animation: backdrop-in .30s ease-out both; }
.memory-dialog.is-closing::backdrop { animation: backdrop-out .30s ease-in both; }
.memory-dialog[open] { animation: rsvp-in .30s ease-out both; }
.memory-dialog.is-closing { animation: rsvp-out .30s ease-in both; }

@keyframes balloon-sway-two { 0%, 100% { transform: rotate(-.9deg); } 48% { transform: rotate(1.2deg); } 78% { transform: rotate(.2deg); } }
@keyframes balloon-sway-six { 0%, 100% { transform: rotate(.8deg); } 42% { transform: rotate(-1.5deg); } 70% { transform: rotate(-.2deg); } }
@keyframes balloon-lift { 0%, 100% { transform: translateY(0); } 48% { transform: translateY(var(--balloon-rise)); } 78% { transform: translateY(-2px); } }
@keyframes balloon-string-lift { 0%, 100% { transform: scaleY(1); } 48% { transform: scaleY(var(--string-float-scale, 1.04)); } 78% { transform: scaleY(1.012); } }
@keyframes heart-beat { 0%, 100% { scale: 1; } 28% { scale: 1.08; } 50% { scale: 1; } 76% { scale: 1.05; } }
@keyframes pink-twinkle { 0%, 100% { opacity: .73; scale: 1; filter: brightness(1); } 50% { opacity: 1; scale: 1.1; filter: brightness(1.08); } }
@keyframes silver-glimmer { 0%, 100% { opacity: .78; scale: 1; rotate: -1.5deg; filter: brightness(1); } 48% { opacity: 1; scale: 1.04; rotate: 1.5deg; filter: brightness(1.13); } }
@keyframes disco-drift { 0%, 100% { translate: 0 0; rotate: -1deg; } 50% { translate: 0 -5px; rotate: 1deg; } }
@keyframes countdown-blobs { from { transform: translate3d(-30px, -10px, 0) scale(1.04); } to { transform: translate3d(30px, 10px, 0) scale(1.10); } }
@keyframes countdown-shimmer { from { transform: translate3d(-35px, -8px, 0); opacity: .18; } to { transform: translate3d(35px, 8px, 0); opacity: .30; } }
@keyframes caption-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes preview-in { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: scale(1); } }
@keyframes letter-arrive { from { opacity: 0; translate: 0 9px; scale: .96; } to { opacity: 1; translate: 0 0; scale: 1; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes backdrop-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes lightbox-in { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: scale(1); } }
@keyframes lightbox-out { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(.94); } }
@keyframes rsvp-in { from { opacity: 0; transform: translateY(20px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes rsvp-out { from { opacity: 1; transform: translateY(0) scale(1); } to { opacity: 0; transform: translateY(20px) scale(.97); } }

@media (min-width: 600px) {
  .poster { --hero-stage-height: clamp(690px, 100vw, 850px); padding-inline: 36px; padding-bottom: 34px; }
  .hero-stage { --balloon-size: min(35.4%, 275px); }
  .britney-photo { width: min(50%, 390px); }
  .detail { grid-template-rows: 61px 27px 1fr; min-height: 158px; }
  .detail-icon { width: 59px; height: 54px; }
  .detail-icon svg { width: 30px; height: 30px; }
  .actions { gap: 11px; }
  .action { display: flex; justify-content: space-between; gap: 8px; min-height: 88px; padding: 10px; }
  .action-icon { flex: 0 0 auto; width: 36px; height: 36px; }
  .action-label { flex: 1 1 auto; text-align: left; }
  .action-arrow { flex: 0 0 auto; }
  .countdown-unit { min-height: 90px; }
  .gallery-track { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; scroll-snap-type: none; }
  .gallery-item, .gallery-placeholder { width: min(100%, 320px); justify-self: center; }
}
@media (min-width: 900px) {
  .poster { --hero-stage-height: clamp(930px, 104vw, 970px); padding-inline: clamp(36px, 4.5vw, 52px); }
  .hero-stage { --balloon-size: min(35.4%, 300px); }
  .britney-photo { top: clamp(76px, 9vw, 98px); width: min(50%, 430px); }
  .collage-word span { font-size: clamp(68px, 7vw, 80px); }
  .detail { grid-template-rows: 70px 31px 1fr; min-height: 180px; }
  .detail-icon { width: 64px; height: 60px; }
  .detail h3 { font-size: clamp(15px, 1.5vw, 18px); }
  .detail p, .detail a { font-size: clamp(16px, 1.6vw, 19px); }
  .action { min-height: 102px; }
  .action-label { font-size: clamp(16px, 1.6vw, 19px); }
  .countdown { max-width: 760px; margin-inline: auto; }
  .countdown-unit { min-height: 100px; }
  .countdown-unit strong { font-size: clamp(39px, 3.5vw, 50px); }
  .gallery-section h2 { font-size: clamp(39px, 4vw, 45px); }
  .gallery-intro { font-size: 15px; }
  .gallery-track { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .gallery-item, .gallery-placeholder { width: 100%; }
  .gallery-placeholder p { font-size: 14px; }
  .page-footer { font-size: 13px; }
}
@media (max-width: 359px) {
  .poster { padding-inline: 10px; }
  .action { padding-inline: 5px; }
  .action-label { font-size: 10px; }
  .collage-word span { font-size: 30px; }
  .poster { --hero-stage-height: 431px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .balloon-rig, .balloon, .balloon-strings, .heart, .star, .disco { animation: none !important; translate: none !important; rotate: none !important; scale: 1 !important; }
  .countdown-section::before, .countdown-section::after { animation: none !important; transform: none; }
  .countdown-section::before { opacity: .38; }
  .countdown-section::after { opacity: .24; }
  .js-ready .reveal, .js-ready .reveal.is-visible,
  .js-ready .details.reveal .detail, .js-ready .actions.reveal .action,
  .js-ready .countdown-section.reveal .section-spark, .js-ready .countdown-section.reveal h3,
  .js-ready .countdown-section.reveal .countdown-unit,
  .js-ready .gallery-section.reveal .section-spark, .js-ready .gallery-section.reveal h2,
  .js-ready .gallery-section.reveal .gallery-intro, .js-ready .gallery-section.reveal .add-memory-button,
  .js-ready .gallery-item, .js-ready .gallery-placeholder { opacity: 1 !important; transform: none !important; translate: none !important; scale: 1 !important; }
  .js-ready .britney-photo.reveal, .js-ready .britney-photo.reveal.is-visible { transform: translateX(-50%) !important; }
  .js-ready .collage.reveal.is-visible .collage-word span { animation: none !important; translate: none !important; scale: 1 !important; }
  .action-arrow { transform: none !important; }
  .music-control { animation: none !important; transition: none !important; }
  .music-control:active { transform: none !important; }
}
