/* ============================================================
   Крис & Ели — the invitation as a paper scroll.
   One narrow column on every screen (edge to edge on phones, a paper
   sheet over a blurred photo on wide screens). Photos meet paper with
   torn edges. One readable serif for all text; script only for the names.
   Palette: white/cream paper, dark green, brown, beige.
   ============================================================ */
:root {
  --paper: #faf8f4;
  --paper-2: #efece6;
  --band: #f0ede7;       /* the tinted band (RSVP) */
  --surface: #ffffff;
  --ink: #1f3326;
  --green: #2e4b36;      /* buttons: dark green pills */
  --green-deep: #24392b;
  --brown: #2e4b36;      /* icons, accents */
  --beige: #efece6;
  --muted: #3c4a40;
  --line: #d2cec6;
  --danger: #a32430;

  --serif: "EB Garamond", Georgia, "Times New Roman", serif;
  --script: "Great Vibes", "Segoe Script", cursive;

  --col: 520px;
  --pad: 28px;
  --ease: cubic-bezier(.32, .72, 0, 1);
  --spring: cubic-bezier(.34, 1.4, .64, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; overflow-x: clip; overscroll-behavior-y: none; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 500 1.25rem/1.5 var(--serif); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overflow-x: clip; overscroll-behavior-y: none; }
img { max-width: 100%; display: block; }
figure { margin: 0; }
h1, h3 { font-family: var(--serif); font-weight: 500; margin: 0; text-wrap: balance; }
h3 { font-size: 1.3125rem; line-height: 1.25; font-weight: 600; }
p { margin: 0 0 12px; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
::selection { background: var(--beige); }
:focus-visible { outline: 2px solid var(--brown); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* the sheet */
.sheet { position: relative; max-width: var(--col); margin: 0 auto; background: var(--paper); overflow: clip; }
.backdrop { display: none; }
@media (min-width: 700px) and (min-height: 600px) {   /* landscape phones keep the plain full-height layout */
  body { background: #16241b; }
  .backdrop { display: block; position: fixed; inset: -40px; z-index: -1; background: url(img/couple-hero.jpg?v=9) center / cover; filter: grayscale(1) blur(28px) brightness(.45); }
  .sheet { margin-block: 40px; border-radius: 6px; box-shadow: 0 40px 90px -30px rgb(0 0 0 / .7); }
}

/* scroll reveal (JS only) */
.js .reveal { opacity: 0; translate: 0 18px; transition: opacity .9s var(--ease), translate .9s var(--ease); transition-delay: calc(var(--d, 0) * 90ms); }
.js .reveal.in { opacity: 1; translate: 0 0; }

/* torn paper edges: a jagged strip in the paper colour laid over the edge of a photo or band */
.torn-top, .torn-bottom { position: relative; }
.torn-top::before, .torn-bottom::after {
  content: ""; position: absolute; left: 0; right: 0; height: 92px; z-index: 2; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 520 110' preserveAspectRatio='none'%3E%3Cfilter id='f' x='-5%' y='-30%' width='110%' height='160%'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.09' numOctaves='3' seed='4'/%3E%3CfeDisplacementMap in='SourceGraphic' scale='11' xChannelSelector='R' yChannelSelector='G'/%3E%3C/filter%3E%3Cfilter id='g' x='-5%' y='-30%' width='110%' height='160%'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.06' numOctaves='4' seed='19'/%3E%3CfeDisplacementMap in='SourceGraphic' scale='14' xChannelSelector='R' yChannelSelector='G'/%3E%3C/filter%3E%3Cfilter id='s' x='-5%' y='-30%' width='110%' height='160%'%3E%3CfeGaussianBlur stdDeviation='4'/%3E%3C/filter%3E%3Cpath d='M-20 130V66l34-7 26 9 30-19 28 9 22-21 28 9 22-21 30 9 22-19 28 11 26-15 28 13 26 13 22-7 28 19 24-9 26 19 28-11 28 17 24-9 30 13v62z' fill='%23000' opacity='.22' filter='url(%23s)'/%3E%3Cpath d='M-20 130V66l34-7 26 9 30-19 28 9 22-21 28 9 22-21 30 9 22-19 28 11 26-15 28 13 26 13 22-7 28 19 24-9 26 19 28-11 28 17 24-9 30 13v62z' fill='%23fff' opacity='.5' filter='url(%23g)'/%3E%3Cpath d='M-20 130V80l40-5 26 7 32-15 26 5 28-19 18 7 26-19 28 7 22-17 26 9 18-13 30 9 22 17 28-7 22 17 26-7 26 17 28-9 28 15 26-7 34 11v54z' fill='%23000' opacity='.16' filter='url(%23s)'/%3E%3Cpath d='M-20 130V80l40-5 26 7 32-15 26 5 28-19 18 7 26-19 28 7 22-17 26 9 18-13 30 9 22 17 28-7 22 17 26-7 26 17 28-9 28 15 26-7 34 11v54z' fill='%23faf8f4' filter='url(%23f)'/%3E%3Crect x='-5' y='98' width='530' height='14' fill='%23faf8f4'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.torn-bottom::after { bottom: -1px; }
.torn-top::before { top: -1px; transform: scale(-1, -1); }   /* flipped both ways so top and bottom tears differ */

/* ---------- Nav: small floating pill ---------- */
.nav {
  position: fixed; top: calc(12px + env(safe-area-inset-top, 0px)); left: 50%; translate: -50% 0; z-index: 20;
  width: max-content; max-width: calc(100vw - 20px); padding: 4px; border-radius: 999px;
  background: rgb(246 241 231 / .86); backdrop-filter: blur(16px) saturate(150%); -webkit-backdrop-filter: blur(16px) saturate(150%);
  box-shadow: 0 0 0 1px rgb(43 51 38 / .1), 0 12px 30px -18px rgb(0 0 0 / .5);
  opacity: 0; pointer-events: none; transition: opacity .4s var(--ease);
}
.nav.solid { opacity: 1; pointer-events: auto; }   /* appears once the photo has scrolled away */
.nav nav { display: flex; overflow-x: auto; scrollbar-width: none; }
.nav nav::-webkit-scrollbar { display: none; }
.nav nav a { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 13px; border-radius: 999px; text-decoration: none; font-size: 1rem; transition: background-color .3s var(--ease), color .3s var(--ease); }
.nav nav a.active { background: var(--green); color: #fff; }

/* ---------- Buttons: small caps pills ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; text-align: center;
  min-height: 48px; padding: 10px 28px; border-radius: 999px; border: 1.5px solid transparent;
  font: 600 .875rem var(--serif); letter-spacing: .14em; text-transform: uppercase; text-decoration: none; cursor: pointer; touch-action: manipulation;
  transition: transform .4s var(--ease), background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.btn:active { transform: scale(.97); transition-duration: 80ms; }
.btn:disabled { opacity: .6; cursor: progress; }
.btn-sm { min-height: 44px; padding: 8px 18px; font-size: .8125rem; letter-spacing: .1em; }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-deep); }
.btn-ghost { border-color: rgb(74 70 62 / .4); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--green); color: var(--green); }
.link { background: none; border: 0; padding: 0; min-height: 44px; display: inline-flex; align-items: center; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ---------- Hero: photo with the names in script ---------- */
.hero { width: 100%; display: grid; align-items: end; color: #fff; text-align: center; overflow: hidden; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgb(18 34 24 / 0) 40%, rgb(18 34 24 / .55) 64%, rgb(18 34 24 / .88) 100%); }
.hero-type { position: relative; z-index: 3; padding: 0 var(--pad) 106px; display: grid; justify-items: center; }
.names { font: 400 clamp(3rem, 13vw, 4.25rem)/1.1 var(--script); display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 0 .22em; text-shadow: 0 2px 24px rgb(0 0 0 / .35); }
.amp { font-size: .6em; }
.hero-date { font-size: 1.125rem; letter-spacing: .3em; margin: 2px 0 0; padding-left: .3em; }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- First screen: hero + countdown share exactly one viewport on every device ---------- */
.first { display: flex; flex-direction: column; height: 100vh; height: 100svh; min-height: 360px;   /* svh, not dvh: dvh grows as the phone hides its address bar and the photo visibly re-zooms */ }
.first .hero { flex: 1 1 auto; min-height: 0; }
.first .count-label { padding-top: 10px; }
.first .countdown { padding-bottom: max(18px, env(safe-area-inset-bottom, 0px)); }
@media (min-width: 700px) and (min-height: 600px) { .first { height: calc(100vh - 40px); height: calc(100svh - 40px); } }   /* the sheet starts 40px down: end exactly at the bottom edge */
@media (max-height: 640px) { .first .countdown dd { font-size: 1.875rem; } .hero-type { padding-bottom: 92px; } }
@media (max-height: 480px) { .first .count-label { padding-top: 2px; font-size: .9rem; } .first .countdown dd { font-size: 1.5rem; } .first .countdown dt { font-size: .85rem; } .first .countdown { padding-bottom: 8px; } .names { font-size: 2.6rem; } .hero-type { padding-bottom: 70px; } }

/* ---------- Countdown ---------- */
.count-label { margin: 0; padding: 26px var(--pad) 4px; text-align: center; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.countdown { display: grid; grid-template-columns: repeat(4, auto); justify-content: center; gap: 0 26px; margin: 0; padding: 0 var(--pad); text-align: center; }
.countdown dd { margin: 0; font-size: 2.375rem; font-weight: 500; line-height: 1.1; font-variant-numeric: tabular-nums; }
.countdown dt { font-size: 1rem; }
.invite { margin: 22px auto 14px; max-width: 13em; text-align: center; line-height: 1.35; }
.when { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 0 0 6px; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; }
.when span { min-width: 86px; padding-block: 5px; border-block: 1px solid var(--ink); text-align: center; }
.when b { font-size: 1.875rem; font-weight: 500; letter-spacing: 0; line-height: 1; }

/* ---------- Event blocks: icon, italic title, — time —, VENUE, city, pill ---------- */
.event { display: grid; justify-items: center; text-align: center; padding: 30px var(--pad) 6px; }
.venue { margin: 0; }
.city { margin: 0 0 16px; }

.lead { line-height: 1.4; margin: 0 auto 14px; max-width: 16em; }


/* ---------- Sections ---------- */
.block { padding: 30px var(--pad) 40px; text-align: center; }
.head { display: grid; justify-items: center; }
.head p { max-width: 17em; }
.label { font-size: 1.5rem; line-height: 1.2; font-weight: 600; color: var(--ink) !important; margin: 0 0 12px; }
.ico { width: 46px; height: 46px; fill: none; stroke: var(--brown); stroke-width: 1.1; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 10px; }

/* ---------- Carousel + photo breaks ---------- */
.carousel { position: relative; }
.car-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: none; }
.car-track::-webkit-scrollbar { display: none; }
.car-slide { flex: 0 0 100%; scroll-snap-align: center; aspect-ratio: 4 / 4.6; }
.car-slide img, .photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; user-select: none; }
.car-arrow { position: absolute; top: 50%; translate: 0 -50%; z-index: 3; width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; background: rgb(246 241 231 / .9); color: var(--ink); transition: scale .4s var(--ease), opacity .3s; }
.car-arrow svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.car-arrow:active { scale: .92; }
.car-arrow:disabled { opacity: 0; pointer-events: none; }
.car-prev { left: 12px; }
.car-next { right: 12px; }
.car-dots { position: absolute; left: 0; right: 0; bottom: 74px; z-index: 3; display: flex; justify-content: center; }
.car-dot { width: 44px; height: 44px; margin-inline: -9px; border: 0; padding: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.car-dot::before { content: ""; width: 7px; height: 7px; border-radius: 999px; background: rgb(255 255 255 / .6); transition: width .4s var(--ease), background-color .3s; }
.car-dot[aria-current="true"]::before { width: 22px; background: #fff; }
.photo { aspect-ratio: 4 / 4.4; }

/* ---------- Programme: line, dots, icons ---------- */
.timeline { list-style: none; margin: 10px auto 0; padding: 0; display: grid; gap: 22px; width: max-content; max-width: 100%; text-align: left; }
.timeline li { display: grid; grid-template-columns: 48px 1fr; gap: 20px; align-items: center; }
.t-ico svg { display: block; width: 44px; height: 44px; fill: none; stroke: var(--brown); stroke-width: .85; stroke-linecap: round; stroke-linejoin: round; }
.timeline time { display: block; line-height: 1.2; font-weight: 600; font-variant-numeric: tabular-nums; }
.timeline h3 { font-size: 1.25rem; font-weight: 500; line-height: 1.25; }

/* the wedding colours */
.swatch-title { margin: 6px 0 12px; font-weight: 600; }
.swatches { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(3, 72px); justify-content: center; gap: 14px 24px; }   /* 3 per row */
.swatches li { display: grid; justify-items: center; gap: 6px; width: 72px; font-size: 1rem; line-height: 1.2; }
.swatches i { width: 46px; height: 46px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgb(0 0 0 / .12); }

/* ---------- Place: one recommended maps button, two alternatives ---------- */
.map-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; max-width: 320px; margin: 0 auto; }
.map-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 8px 14px; border-radius: 999px; text-decoration: none; font-size: 1rem; box-shadow: inset 0 0 0 1px var(--line); transition: transform .4s var(--ease), box-shadow .3s; }
.map-btn b { font-weight: 500; white-space: nowrap; }
.map-btn:active { transform: scale(.97); }
.map-btn.is-default { grid-column: 1 / -1; min-height: 54px; background: var(--green); color: #fff; box-shadow: none; }
.map-btn.is-default b { font: 600 .875rem var(--serif); letter-spacing: .14em; text-transform: uppercase; }
.map-btn.is-default b::before { content: "Упътване с "; }
.app-ico { width: 26px; height: 26px; flex: none; border-radius: 7px; overflow: hidden; display: grid; place-items: center; background: #fff; }
.app-ico svg { width: 100%; height: 100%; display: block; }
.ico-google svg { width: 20px; height: 20px; }

/* ---------- RSVP: the tinted band between torn edges ---------- */
.rsvp-section { background: var(--band); padding: 112px var(--pad) 116px; }
.rsvp-intro { display: grid; justify-items: center; text-align: center; margin-bottom: 22px; }
.rsvp-intro .lead b { color: var(--ink); font-weight: 600; }
.proof { font-style: italic; margin: 0; color: var(--muted); }
.proof:empty { display: none; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 1rem; font-weight: 500; }
.field input, .field textarea { font-size: 1.125rem; width: 100%; min-height: 54px; padding: 12px 22px; border-radius: 999px; border: 1px solid rgb(74 70 62 / .35); background: rgb(255 255 255 / .6); transition: border-color .2s, background-color .2s; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--green); background: #fff; box-shadow: 0 0 0 3px rgb(0 0 0 / .14); }
.field textarea { border-radius: 27px; }   /* same curve as a pill, without squashing a multi-line box */
.rsvp-section ::placeholder { color: rgb(74 70 62 / .6); }
.hint { font-size: 1rem; color: var(--muted); margin: 0; }

.form-msg { margin: 12px 0 0; min-height: 1.4em; font-size: 1rem; text-align: center; }
.form-msg.err { color: var(--danger); font-weight: 500; }
#songs .form-msg { color: var(--green); }
#songs .form-msg.err { color: var(--danger); }

/* confirmation: drawn check, confetti */
.check { width: 60px; height: 60px; margin: 0 auto 12px; display: block; }
.check circle { fill: var(--green); transform-box: fill-box; transform-origin: center; animation: pop-in .5s var(--spring) backwards; }
.check path { fill: none; stroke: #fff; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: stroke .4s .35s var(--ease) forwards; }
@keyframes stroke { to { stroke-dashoffset: 0; } }
@keyframes pop-in { from { transform: scale(0); } }
/* confirmed state + greeting questionnaire */
.btn-block { width: 100%; }
.no-invite { text-align: center; }
.done { outline: none; text-align: center; animation: rise .6s var(--ease); }
.done h3 { font-size: 1.375rem; font-weight: 600; line-height: 1.25; margin: 0 0 8px; }
#done-text { color: var(--muted); margin: 0 0 18px; }
.done.is-no .check circle { fill: var(--muted); }
.greet-summary { margin: -6px 0 18px; padding: 12px 18px; border-radius: 16px; background: rgb(255 255 255 / .6); border: 1px solid var(--line); }
.done-actions { display: grid; gap: 10px; }
.done-actions .link { justify-content: center; }
.greet-form { animation: rise .5s var(--ease); }
.greet-form h3 { font-size: 1.375rem; font-weight: 600; text-align: center; margin: 0 0 4px; }
.greet-form > .hint { text-align: center; margin-bottom: 18px; }
.greet-form .field label { text-align: center; font-weight: 600; }
.greet-form .field small { font-weight: 400; color: var(--muted); }
.greet-form .field { margin-bottom: 18px; }
.greet-form .done-actions { margin-top: 8px; }
@keyframes pop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 30; }

/* ---------- Songs ---------- */
.songs-block { margin-top: 6px; text-align: left; }
.song-form { display: grid; gap: 12px; }
.song-search { position: relative; display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 16px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .3s var(--ease); }
.song-search:focus-within { box-shadow: inset 0 0 0 1.5px var(--green); }
.song-search-ico { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.song-search input { flex: 1; min-width: 0; border: 0; background: none; font-size: 1.125rem; min-height: 46px; outline: none; }
.song-search input::-webkit-search-cancel-button { display: none; }
.song-search .btn { min-height: 46px; padding: 8px 18px; }
.song-search.loading .song-search-ico { opacity: 0; }
.song-search.loading::before { content: ""; position: absolute; left: 16px; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--green); animation: spin .7s linear infinite; }
.song-search.loading ~ .song-results { opacity: .55; }
@keyframes spin { to { transform: rotate(360deg); } }
.song-from { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 12px; font-size: 1rem; color: var(--muted); }
.song-from input { flex: 1; min-width: 150px; max-width: 230px; min-height: 44px; padding: 6px 0; border: 0; border-bottom: 1px solid var(--line); background: none; outline: none; font-size: 1.0625rem; }
.song-from input:focus { border-color: var(--green); }

.song-results { border-block: 1px solid var(--line); transition: opacity .2s; }
.result, .songs li { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 8px 12px; padding: 10px 0; }
.result { grid-template-columns: 48px minmax(0, 1fr) auto auto; animation: rise .4s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 45ms); }
.result + .result, .songs li + li { border-top: 1px solid var(--line); }
.cover { width: 48px; height: 48px; border-radius: 6px; object-fit: cover; background: var(--paper-2); }
.cover-note { display: grid; place-items: center; font-size: 1.375rem; color: var(--brown); }
.song-info { display: grid; min-width: 0; line-height: 1.25; }
.song-info b { font-weight: 500; font-size: 1.125rem; }
.song-info .from { color: var(--muted); font-size: .9375rem; }
.result iframe, .songs iframe { grid-column: 1 / -1; width: 100%; height: 80px; border: 0; border-radius: 10px; }
.results-note { margin: 0; padding: 14px 0; color: var(--muted); text-align: center; }
.results-note .link { color: var(--green); }
/* play / pause drawn as shapes so they sit dead centre (a text glyph never does) */
.play-btn { position: relative; width: 44px; height: 44px; flex: none; padding: 0; border-radius: 50%; border: 1px solid var(--line); cursor: pointer; display: grid; place-items: center; font-size: 0; background: none; color: var(--green); transition: background-color .3s var(--ease), color .3s, border-color .3s; }
.play-btn::before { content: ""; width: 0; height: 0; border-style: solid; border-width: 7px 0 7px 12px; border-color: transparent transparent transparent currentColor; position: absolute; top: 50%; left: 50%; translate: calc(-50% + 2px) -50%; }   /* 2px: a triangle looks centred at its centroid, not its box */
.play-btn:hover, .play-btn.on { background: var(--green); border-color: var(--green); color: #fff; }
.play-btn.on::before { width: 4px; height: 14px; border-width: 0 4px; border-color: currentColor; translate: -50% -50%; }

.songs-wrap { margin-top: 26px; }
.songs-wrap > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; font-size: .875rem; letter-spacing: .16em; text-transform: uppercase; color: var(--brown); border-bottom: 1px solid var(--line); }
.songs-wrap > summary::-webkit-details-marker { display: none; }
.songs-wrap > summary::after { content: "Скрий"; letter-spacing: .08em; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.songs-wrap:not([open]) > summary::after { content: "Покажи"; }
.songs-count { margin-right: auto; color: var(--muted); }
.songs { list-style: none; padding: 0; margin: 0; }
.songs li { animation: rise .5s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 60ms); }
.songs li.new { animation: pop .5s var(--spring); }
.songs li.skeleton { pointer-events: none; }
.songs li.skeleton .cover, .songs li.skeleton i { background: linear-gradient(90deg, var(--line) 0%, var(--paper-2) 50%, var(--line) 100%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.songs li.skeleton i { display: block; height: 13px; border-radius: 7px; width: 60%; }
.songs li.skeleton i + i { width: 30%; margin-top: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty { color: var(--muted); text-align: center; }

@supports (interpolate-size: allow-keywords) {
  .songs-wrap::details-content { opacity: 0; block-size: 0; overflow: clip; transition: block-size .4s var(--ease), opacity .3s, content-visibility .4s allow-discrete; }
  .songs-wrap[open]::details-content { opacity: 1; block-size: auto; interpolate-size: allow-keywords; }
}

/* ---------- Footer ---------- */
.footer { text-align: center; padding: 30px 0 calc(110px + env(safe-area-inset-bottom, 0px)); display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; border-top: 1px solid var(--line); margin-inline: var(--pad); }
.footer-names { font: 400 3rem/1.2 var(--script); margin: 0 0 6px; }
.footer-count { margin-bottom: 20px; color: var(--muted); }
.footer .btn { white-space: nowrap; }
.footer-count b { color: var(--ink); font-weight: 500; }
.footer-contact { margin: 22px 0 0; color: var(--muted); }
.footer-contact a { color: var(--green); font-weight: 600; white-space: nowrap; }

/* "Add a song" pill opens the search right under it */
.song-add { text-align: center; }
.song-add > summary { list-style: none; display: inline-flex; }
.song-add > summary::-webkit-details-marker { display: none; }
.song-add[open] > summary { background: none; color: var(--green); border-color: var(--line); }
.song-add .song-form { margin-top: 18px; text-align: left; }

/* ---------- Dock: the one persistent action, in the thumb zone ---------- */
.dock {
  position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); z-index: 25;
  width: min(calc(var(--col) - 56px), calc(100vw - 32px)); margin-left: calc(min(calc(var(--col) - 56px), calc(100vw - 32px)) / -2);
  min-height: 58px; border-radius: 999px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-decoration: none;
  background: var(--green); color: #fff; box-shadow: 0 0 0 1px rgb(255 255 255 / .14), 0 16px 34px -12px rgb(0 0 0 / .55);
  opacity: 0; visibility: hidden; transform: translateY(24px);
  transition: transform .4s var(--ease), opacity .3s var(--ease), visibility 0s linear .4s;
}
.dock span { font-size: .875rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; line-height: 1.3; }
.dock small { font-size: .875rem; opacity: .85; line-height: 1.2; }
.dock.show { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.dock:not(.show) { pointer-events: none; }   /* sliding away: never catches a tap */
.dock.show:active { transform: scale(.97); transition-duration: 60ms; }

@media (max-width: 420px) {
  .nav nav a { padding: 0 9px; font-size: .9375rem; } /* all 5 links fit without scrolling on a phone-width screen */
}
@media (max-width: 380px) {
  :root { --pad: 20px; }
  .countdown dd { font-size: 2rem; }
}

/* ---------- Motion everywhere (all of it switches off under reduced motion below) ---------- */
.js .reveal-photo { opacity: 0; transition: opacity 1.1s var(--ease); }
.js .reveal-photo img { scale: 1.12; transition: scale 1.8s var(--ease); }
.js .reveal-photo.in { opacity: 1; }
.js .reveal-photo.in img { scale: 1; }
.js .swatches li.reveal { translate: none; scale: .6; transition: opacity .7s var(--ease), scale .7s var(--spring); transition-delay: calc(var(--d, 0) * 80ms); }
.js .swatches li.reveal.in { scale: 1; }
.js .t-ico.reveal-ico { scale: .4; opacity: 0; transition: scale .8s var(--spring), opacity .5s var(--ease); transition-delay: .15s; }
.js .in .t-ico.reveal-ico { scale: 1; opacity: 1; }
.map-btn:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--green); }
.map-btn.is-default:hover { box-shadow: 0 10px 24px -12px rgb(46 75 54 / .7); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -12px rgb(46 75 54 / .7); }
.app-ico { transition: transform .5s var(--spring); }
.map-btn:hover .app-ico { transform: rotate(-8deg) scale(1.08); }
.swatches i { transition: transform .4s var(--spring); }
.swatches li:hover i { transform: scale(1.12); }
.footer-names { animation: none; }
.footer.in .footer-names { animation: rise 1.2s var(--ease) both; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal-photo, .js .reveal-photo img, .js .swatches li.reveal, .js .t-ico.reveal-ico { opacity: 1; scale: none; }
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; transition-delay: 0ms !important; }
  .js .reveal { opacity: 1; translate: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .nav { background: var(--paper); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  .label { color: var(--ink) !important; }
}
/* the reveal transition would otherwise swallow the map buttons' hover lift */
.js .map-btn.reveal { transition: opacity .9s var(--ease), translate .9s var(--ease), transform .4s var(--ease), box-shadow .3s; transition-delay: calc(var(--d, 0) * 90ms), calc(var(--d, 0) * 90ms), 0s, 0s; }
/* the song form never grows past the column: grid tracks and their children may shrink */
.song-form { grid-template-columns: minmax(0, 1fr); }
.song-form > * { min-width: 0; }
@media (max-width: 380px) { .song-search .btn { padding-inline: 12px; letter-spacing: .04em; } .song-search { padding-left: 12px; gap: 6px; } }
/* song titles get two lines instead of an early ellipsis; the add button slims down on narrow phones */
.song-info b, .song-info .from { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; line-height: 1.2; }
.song-info .from { -webkit-line-clamp: 1; }
@media (max-width: 400px) { .result { gap: 8px 8px; } .result .btn-sm { padding-inline: 12px; letter-spacing: .04em; } }
/* personal invitation */
.dear { margin: 26px var(--pad) -10px; text-align: center; font: 400 2.25rem/1.2 var(--script); color: var(--green); }
.for { margin: 0 0 14px; text-align: center; font-style: italic; color: var(--muted); }
#decline { display: flex; margin: 8px auto 0; }

/* example songs */
.song-examples { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 8px; font-size: 1rem; color: var(--muted); }
.chip-btn { min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: none; color: var(--ink); font-size: .9375rem; cursor: pointer; transition: border-color .2s, color .2s; }
.chip-btn:hover { border-color: var(--green); color: var(--green); }

/* dress code icon: shirt + dress side by side */
.ico-wide { width: 80px; }
