/* Blush ivory card stock, embossed florals and champagne gold, after a luxury digital invite.
   One narrow column; the envelope and hero fill the phone screen. */
:root {
  --paper: #FBF4EE;
  --paper-2: #F4E5D8;
  --paper-3: #EEDACA;
  --gold: #B88A3E;
  --gold-soft: #D4B072;
  --gold-light: #EED9A8;
  --ink: #5B4033;
  --ink-soft: #8C6F5E;
  --white: #FFFCF8;

  --f-script: "Pinyon Script", "Snell Roundhand", "Apple Chancery", cursive;
  --f-serif: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
  --f-deva: "Tiro Devanagari Hindi", "Noto Serif Devanagari", "Mangal", serif;

  --col: 480px;
  --gold-text: linear-gradient(100deg, #9C6F2C 0%, #C99A4E 30%, #E9CF92 48%, #B88A3E 66%, #8E6426 100%);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--f-serif);
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}
body.is-sealed { overflow: hidden; height: 100%; }
img, svg { max-width: 100%; }
p, h1, h2, h3 { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* =========================================================
   Envelope: four embossed panels meeting at the seal
   ========================================================= */
.env {
  position: fixed;
  inset: 0;
  z-index: 60;
  overflow: hidden;
  cursor: pointer;
  background: #FFF3DA;
  -webkit-tap-highlight-color: transparent;
}
.env.is-gone { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .9s ease, visibility .9s; }
.env-panel-wrap { position: absolute; inset: 0; transition: transform 1.25s cubic-bezier(.7,0,.25,1); }
.env-panel {
  position: absolute;
  inset: 0;
  background-color: var(--paper-2);
  background-image: var(--emboss), radial-gradient(ellipse at 50% 45%, #FAEFE6, #EFDCCB 85%);
  background-size: 180px 180px, 100% 100%;
  background-position: center center;
}
/* gold glints that sweep across the embossed flowers */
.env-shine {
  position: absolute;
  inset: 0;
  background-image: var(--emboss-gold);
  background-size: 180px 180px;
  background-position: center center;
  -webkit-mask-image: linear-gradient(115deg, transparent 38%, #000 47%, #000 53%, transparent 62%);
  mask-image: linear-gradient(115deg, transparent 38%, #000 47%, #000 53%, transparent 62%);
  -webkit-mask-size: 300% 100%;
  mask-size: 300% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  animation: shine 4.2s ease-in-out infinite;
  opacity: .9;
}
@keyframes shine {
  0% { -webkit-mask-position: 120% 0; mask-position: 120% 0; }
  55%, 100% { -webkit-mask-position: -20% 0; mask-position: -20% 0; }
}
.env-top    { z-index: 4; filter: drop-shadow(0 3px 4px rgba(120,80,50,.22)); }
.env-left,
.env-right  { z-index: 3; filter: drop-shadow(0 0 3px rgba(120,80,50,.18)); }
.env-bottom { z-index: 2; }
.env-top .env-panel    { clip-path: polygon(0 0, 100% 0, 50% 52%); }
.env-bottom .env-panel { clip-path: polygon(0 100%, 100% 100%, 50% 49%); }
.env-left .env-panel   { clip-path: polygon(0 0, 50.5% 50%, 0 100%); }
.env-right .env-panel  { clip-path: polygon(100% 0, 49.5% 50%, 100% 100%); }

.env-light {
  position: absolute;
  left: 50%; top: 50%;
  width: 140vmax; height: 140vmax;
  margin: -70vmax 0 0 -70vmax;
  border-radius: 50%;
  background: radial-gradient(circle, #FFFFFF 0%, #FFF4D4 12%, #F7D78E 26%, rgba(240,196,110,.55) 40%, rgba(240,196,110,0) 62%);
  transform: scale(.05);
  opacity: 0;
  z-index: 1;
}
.env-rays {
  position: absolute;
  left: 50%; top: 50%;
  width: 160vmax; height: 160vmax;
  margin: -80vmax 0 0 -80vmax;
  background: repeating-conic-gradient(from 0deg, rgba(255,236,190,0) 0deg 7deg, rgba(255,236,190,.55) 9deg 11deg, rgba(255,236,190,0) 13deg 20deg);
  -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 55%);
  mask-image: radial-gradient(circle, #000 0%, transparent 55%);
  opacity: 0;
  z-index: 1;
}

.env-seal {
  position: absolute;
  left: 50%; top: 50%;
  z-index: 6;
  width: 104px; height: 104px;
  margin: -52px 0 0 -52px;
  border-radius: 48% 52% 50% 50% / 53% 47% 53% 47%;
  background: radial-gradient(circle at 38% 32%, #FFFBF2, #F3E6CF 55%, #E3CFAE);
  box-shadow:
    0 1px 0 rgba(255,255,255,.9) inset,
    0 -3px 6px rgba(160,120,70,.25) inset,
    0 6px 14px rgba(120,80,40,.28),
    0 0 0 0 rgba(240,200,120,0);
  display: grid;
  place-items: center;
  animation: seal-glow 2.8s ease-in-out infinite;
  transition: transform .5s cubic-bezier(.3,1.4,.5,1), opacity .5s;
}
.env-seal::before { /* wax drips around the edge */
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 12% 30%, #F1E3CA 0 9px, transparent 10px),
    radial-gradient(circle at 88% 26%, #F1E3CA 0 8px, transparent 9px),
    radial-gradient(circle at 80% 86%, #EFE0C5 0 9px, transparent 10px),
    radial-gradient(circle at 18% 84%, #EFE0C5 0 7px, transparent 8px);
  z-index: -1;
}
.env-seal-ring {
  display: grid;
  place-items: center;
  width: 76px; height: 76px;
  border-radius: 50%;
  box-shadow: inset 0 2px 3px rgba(150,110,60,.35), inset 0 -1px 1px rgba(255,255,255,.9);
  border: 1px solid rgba(184,138,62,.35);
}
.env-seal-mono {
  font-family: var(--f-script);
  font-size: 36px;
  line-height: 1;
  background: var(--gold-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 1px 0 rgba(255,255,255,.8));
  padding: 0 4px;
}
.env-seal-mono i { font-style: normal; font-size: .62em; }
@keyframes seal-glow {
  50% { box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 -3px 6px rgba(160,120,70,.25) inset, 0 6px 14px rgba(120,80,40,.28), 0 0 34px 8px rgba(240,200,120,.55); }
}
.env-hint {
  position: absolute;
  z-index: 6;
  left: 0; right: 0;
  top: calc(50% + 74px);
  text-align: center;
  font-family: var(--f-serif);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--gold);
  animation: breathe 2.4s ease-in-out infinite;
  transition: opacity .3s;
}
@keyframes breathe { 50% { opacity: .4; } }

.env-sparkles { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.twinkle {
  position: absolute;
  width: 14px; height: 14px;
  margin: -7px 0 0 -7px;
  background: radial-gradient(circle, #FFF8E2 0 18%, transparent 20%),
              linear-gradient(90deg, transparent 46%, #F3D58E 46% 54%, transparent 54%),
              linear-gradient(0deg, transparent 46%, #F3D58E 46% 54%, transparent 54%);
  -webkit-mask-image: radial-gradient(circle, #000 30%, transparent 70%);
  mask-image: radial-gradient(circle, #000 30%, transparent 70%);
  opacity: 0;
  animation: twinkle var(--d, 3s) ease-in-out var(--delay, 0s) infinite;
}
@keyframes twinkle { 0%, 100% { opacity: 0; transform: scale(.3) rotate(0); } 50% { opacity: 1; transform: scale(1) rotate(45deg); } }

/* Opening sequence: glow, then seams part with light, then panels fly away in a flash */
.env.is-opening { cursor: default; }
.env.is-opening .env-hint { opacity: 0; }
.env.is-opening .env-seal { animation: none; transform: scale(1.12); box-shadow: 0 0 50px 18px rgba(245,205,120,.8); }
.env.is-parting .env-top    { transform: translateY(-4%); }
.env.is-parting .env-bottom { transform: translateY(4%); }
.env.is-parting .env-left   { transform: translateX(-5%); }
.env.is-parting .env-right  { transform: translateX(5%); }
.env.is-parting .env-light  { opacity: 1; transform: scale(.35); transition: transform 1.1s ease-out, opacity .4s; }
.env.is-parting .env-rays   { opacity: .7; transition: opacity .8s; animation: spin 14s linear infinite; }
.env.is-parting .env-seal   { transform: translateY(-18vh) scale(.9); opacity: 0; transition: transform 1.1s cubic-bezier(.6,0,.3,1), opacity .9s .2s; }
.env.is-flying .env-top     { transform: translateY(-105%); }
.env.is-flying .env-bottom  { transform: translateY(105%); }
.env.is-flying .env-left    { transform: translateX(-105%); }
.env.is-flying .env-right   { transform: translateX(105%); }
.env.is-flying .env-light   { transform: scale(2.4); transition: transform 1.3s cubic-bezier(.4,0,.2,1); }
@keyframes spin { to { transform: rotate(360deg); } }

/* Page arrives through the light */
.invite { transition: filter 1.4s ease, transform 1.6s cubic-bezier(.2,.8,.2,1); }
body.is-sealed .invite { filter: brightness(1.35) blur(6px); transform: scale(1.06); }

/* =========================================================
   Floating sound button and background sparkles
   ========================================================= */
.sound-btn {
  position: fixed;
  z-index: 40;
  right: calc(16px + env(safe-area-inset-right, 0px));
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  width: 50px; height: 50px;
  border-radius: 50%;
  border: 0;
  background: linear-gradient(145deg, #E2C17E, #B88A3E);
  color: var(--white);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(140,100,40,.35), inset 0 1px 0 rgba(255,255,255,.5);
}
.sound-btn[hidden] { display: none; }
.sound-btn svg { width: 22px; height: 22px; fill: currentColor; }
.sound-btn .ico-off { display: none; }
.sound-btn[aria-pressed="false"] .ico-on { display: none; }
.sound-btn[aria-pressed="false"] .ico-off { display: block; }
.sound-btn.is-playing::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1px solid var(--gold-soft);
  animation: ring 2.2s ease-out infinite;
}
@keyframes ring { from { transform: scale(.9); opacity: .9; } to { transform: scale(1.35); opacity: 0; } }

.sparkle-field { position: fixed; inset: 0; pointer-events: none; z-index: 2; overflow: hidden; }
.dust {
  position: absolute;
  bottom: -10px;
  width: var(--s, 4px); height: var(--s, 4px);
  border-radius: 50%;
  background: radial-gradient(circle, #FFF1C9, #E3BE72 60%, transparent 70%);
  opacity: 0;
  animation: rise var(--d, 14s) linear var(--delay, 0s) infinite;
}
@keyframes rise {
  0% { transform: translate3d(0, 0, 0); opacity: 0; }
  10% { opacity: .9; }
  90% { opacity: .6; }
  100% { transform: translate3d(var(--sway, 20px), -105vh, 0); opacity: 0; }
}

/* =========================================================
   Layout
   ========================================================= */
.invite {
  position: relative;
  z-index: 1;
  max-width: var(--col);
  margin: 0 auto;
  padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px));
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255,255,255,.7), transparent 60%),
    var(--paper);
  box-shadow: 0 0 60px rgba(150,110,80,.12);
  overflow: hidden;
}
.block {
  position: relative;
  padding-block: 56px 20px;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
  text-align: center;
}

/* Reveal on scroll (only when the script runs) */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .9s ease, transform 1s cubic-bezier(.2,.8,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 600px;
  max-height: 980px;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}
.hero-art {
  position: absolute;
  inset: 0;
  background: var(--hero) center top / cover no-repeat, #F3CDA8;
  animation: slow-zoom 22s ease-in-out infinite alternate;
  transform-origin: 50% 70%;
}
.hero::after { /* melt into the page */
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 22%;
  background: linear-gradient(to bottom, rgba(251,244,238,0), var(--paper));
  pointer-events: none;
}
@keyframes slow-zoom { from { transform: scale(1); } to { transform: scale(1.06); } }
.hero-text {
  position: relative;
  z-index: 1;
  /* sits in the open sky inside the arch, above the palace domes */
  margin-top: 14vh;
  margin-top: 14svh;
  width: min(58%, 250px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
  text-shadow: 0 0 18px rgba(255,244,230,.95), 0 0 6px rgba(255,244,230,.8);
}
.hero-blessing { font-family: var(--f-deva); font-size: min(17px, 2.4vh); color: #8B5E24; }
.hero-welcome { font-family: var(--f-script); font-size: min(21px, 3vh); color: #6A4A38; line-height: 1.2; }
.hero-names {
  font-family: var(--f-script);
  font-weight: 400;
  font-size: min(14vw, 7.6vh, 64px);
  line-height: 1.02;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #84561C;
}
.hero-names .amp { font-family: var(--f-serif); font-style: italic; font-size: .5em; color: #A87A3A; margin: -4px 0; }
.hero-names span:first-child { padding-right: 1.2em; }
.hero-names span:last-child { padding-left: 1.2em; }
.hero-dates { margin-top: 6px; white-space: nowrap; font-weight: 600; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: #6A4A38; }
.scroll-cue {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 5%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--f-script);
  font-size: 22px;
  color: var(--ink-soft);
  text-decoration: none;
  text-shadow: 0 0 10px rgba(255,250,242,.95);
}
.scroll-cue svg { width: 22px; height: 22px; animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(5px); } }

/* =========================================================
   Shared type
   ========================================================= */
.script-title {
  font-family: var(--f-script);
  font-weight: 400;
  font-size: 46px;
  line-height: 1.15;
  background: var(--gold-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding: 0 .2em;
}
.hint { margin-top: 2px; font-style: italic; font-size: 17px; color: var(--ink-soft); }
.caps-label { font-weight: 600; font-size: 12.5px; letter-spacing: .24em; line-height: 1.7; text-transform: uppercase; color: var(--ink-soft); }
.soft { font-style: italic; color: var(--ink-soft); max-width: 32ch; margin-inline: auto; text-wrap: balance; }
.title-rule {
  display: block;
  width: 180px;
  height: 14px;
  margin: 6px auto 0;
  background:
    radial-gradient(circle, var(--gold-soft) 0 3px, transparent 3.5px) center / 14px 14px no-repeat,
    linear-gradient(90deg, transparent, var(--gold-soft) 30%, var(--gold-soft) 70%, transparent) center / 100% 1px no-repeat;
}
.corner-floral {
  position: absolute;
  width: 120px; height: 120px;
  background: url("../img/floral-corner.svg") center / contain no-repeat;
  pointer-events: none;
  opacity: .95;
}
.corner-floral.tl { left: -8px; top: 8px; }
.corner-floral.tr { right: -8px; top: 8px; transform: scaleX(-1); }
.corner-floral.bl { left: -14px; bottom: -14px; transform: scaleY(-1); }
.corner-floral.br { right: -14px; bottom: -14px; transform: scale(-1, -1); }

/* =========================================================
   The Date: three gold scratch tiles
   ========================================================= */
.date-block { padding-top: 40px; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; max-width: 360px; margin: 26px auto 0; }
.tile-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.tile {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(160deg, #FFFDF9, #F6EADD);
  box-shadow: 0 10px 22px rgba(150,110,70,.18), 0 2px 4px rgba(150,110,70,.12), inset 0 0 0 1px rgba(212,176,114,.45);
  display: grid;
  place-items: center;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.tile-value { font-weight: 500; font-size: clamp(26px, 8.5vw, 34px); color: var(--ink); letter-spacing: .02em; }
.tile-value-sm { font-size: clamp(17px, 5.4vw, 22px); }
.tile-foil { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; transition: opacity .6s ease; }
.tile.is-revealed .tile-foil { opacity: 0; pointer-events: none; }
.tile.is-revealed .tile-value { animation: pop .7s cubic-bezier(.3,1.6,.5,1); }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
.tile-label { font-weight: 600; font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--ink-soft); }

.text-btn {
  margin-top: 14px;
  background: none;
  border: 0;
  padding: 6px;
  font-size: 15px;
  font-style: italic;
  color: var(--ink-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.countdown { margin-top: 26px; }
.countdown-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; max-width: 360px; margin: 12px auto 0; }
.countdown-grid > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 2px 9px;
  border-radius: 12px;
  background: var(--white);
  box-shadow: inset 0 0 0 1px rgba(212,176,114,.5), 0 6px 14px rgba(150,110,70,.1);
}
.cd-num { font-weight: 500; font-size: clamp(28px, 8.5vw, 36px); line-height: 1; color: var(--gold); font-variant-numeric: tabular-nums lining-nums; }
.cd-unit { margin-top: 4px; font-weight: 600; font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-soft); }
.countdown-done { font-family: var(--f-script); font-size: 44px; color: var(--gold); line-height: 1.2; }

/* =========================================================
   Invitation card inside a carved arch
   ========================================================= */
.card-block { padding-top: 50px; }
.arch-card {
  position: relative;
  margin: 0 auto;
  max-width: 400px;
  padding: 96px 30px 46px;
  border-radius: 200px 200px 14px 14px / 170px 170px 14px 14px;
  background:
    var(--emboss) center / 180px 180px,
    linear-gradient(180deg, #FFFDF9, #F8EEE4);
  background-blend-mode: soft-light, normal;
  box-shadow:
    inset 0 0 0 1px var(--gold-soft),
    inset 0 0 0 8px rgba(255,253,249,.9),
    inset 0 0 0 9px rgba(212,176,114,.7),
    0 18px 40px rgba(150,110,70,.18);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.arch-finial {
  position: absolute;
  left: 50%; top: -22px;
  width: 30px; height: 44px;
  margin-left: -15px;
  background: url("../img/finial.svg") center / contain no-repeat;
}
.arch-blessing { font-family: var(--f-deva); font-size: 24px; color: var(--gold); margin-bottom: 6px; }
.person-name {
  font-family: var(--f-script);
  font-size: clamp(54px, 16vw, 68px);
  line-height: 1.05;
  margin-top: 10px;
  background: var(--gold-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding: 0 .25em;
}
.divider-orn {
  display: block;
  width: 120px; height: 12px;
  background:
    radial-gradient(circle, var(--gold-soft) 0 2.5px, transparent 3px) center / 12px 12px no-repeat,
    linear-gradient(90deg, transparent, var(--gold-soft), transparent) center / 100% 1px no-repeat;
}
.parents { max-width: 30ch; font-weight: 600; font-size: 12.5px; letter-spacing: .14em; line-height: 1.75; text-transform: uppercase; color: var(--ink-soft); text-wrap: balance; }
.with { font-family: var(--f-script); font-size: 34px; color: var(--gold); margin-top: 14px; line-height: 1; }
.dear { font-family: var(--f-script); font-size: 30px; color: var(--ink); margin-top: 26px; }
.message { max-width: 28ch; font-style: italic; font-size: 19px; line-height: 1.55; color: var(--ink); text-wrap: balance; }

/* =========================================================
   Timeline: a gold thread with art on alternating sides
   ========================================================= */
.timeline-block { padding-top: 60px; }
.tl-day { margin: 34px auto 6px; display: flex; flex-direction: column; align-items: center; }
.tl-day-no { font-family: var(--f-script); font-size: 34px; line-height: 1.1; color: var(--gold); }
.tl-day-date { font-weight: 600; font-size: 12.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-soft); }
.timeline { list-style: none; margin: 0; padding: 14px 0 0; position: relative; }
.timeline::before {
  content: "";
  position: absolute;
  left: 50%; top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--gold-soft) 8%, var(--gold-soft) 92%, transparent);
}
.tl-item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 26px 1fr;
  align-items: center;
  padding: 16px 0;
}
.tl-node {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  width: 11px; height: 11px;
  transform: rotate(45deg);
  background: var(--paper);
  border: 1px solid var(--gold);
  box-shadow: 0 0 0 4px var(--paper);
}
.tl-art { grid-row: 1; display: grid; place-items: center; }
.tl-art svg {
  width: 92px; height: 92px;
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
  padding: 16px;
  border-radius: 50% 50% 10px 10px;
  background: linear-gradient(180deg, #FFFDF9, #F6EADD);
  box-shadow: inset 0 0 0 1px rgba(212,176,114,.55), inset 0 0 0 5px #FFFDF9, inset 0 0 0 6px rgba(212,176,114,.3);
}
.tl-text { grid-row: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.art-left .tl-art { grid-column: 1; }
.art-left .tl-text { grid-column: 3; text-align: left; align-items: flex-start; }
.art-right .tl-art { grid-column: 3; }
.art-right .tl-text { grid-column: 1; text-align: right; align-items: flex-end; }
.tl-time { font-family: var(--f-script); font-size: 34px; line-height: 1.05; color: var(--gold); }
.tl-time small { font-family: var(--f-serif); font-size: 15px; font-style: italic; color: var(--ink-soft); }
.tl-name { font-weight: 600; font-size: 14px; letter-spacing: .14em; line-height: 1.4; text-transform: uppercase; color: var(--ink); text-wrap: balance; }
.tl-note { font-style: italic; font-size: 16px; color: var(--ink-soft); line-height: 1.3; }
.tl-venue { font-size: 15px; color: var(--ink-soft); line-height: 1.3; }
.tl-cal { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.art-right .tl-cal { justify-content: flex-end; }
.tl-cal a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(212,176,114,.7);
  font-size: 13px;
  color: var(--ink);
  text-decoration: none;
  background: rgba(255,253,249,.8);
}
.tl-cal svg { width: 12px; height: 12px; fill: var(--gold); }
.event-now {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--gold);
  padding: 2px 10px;
  border-radius: 999px;
  margin-bottom: 4px;
}
.event-now[hidden] { display: none; }
.event-now::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--white); animation: breathe 1.2s infinite; }
.tl-item.is-now .tl-art svg { animation: glow 1.8s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: inset 0 0 0 1px var(--gold), 0 0 22px 4px rgba(226,190,120,.6); } }

/* =========================================================
   Venues, contacts, memories, closing
   ========================================================= */
.venues { display: grid; gap: 18px; margin-top: 24px; }
.venue {
  position: relative;
  padding: 58px 22px 26px;
  border-radius: 120px 120px 14px 14px / 70px 70px 14px 14px;
  background: linear-gradient(180deg, #FFFDF9, #F7ECE1);
  box-shadow: inset 0 0 0 1px rgba(212,176,114,.6), 0 10px 26px rgba(150,110,70,.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.venue-arch {
  position: absolute;
  top: 18px; left: 50%;
  width: 26px; height: 26px;
  margin-left: -13px;
  background: url("../img/finial.svg") center / contain no-repeat;
  opacity: .8;
}
.venue-name { font-family: var(--f-script); font-weight: 400; font-size: 36px; line-height: 1.1; color: var(--gold); }
.venue-address { font-size: 17px; max-width: 28ch; text-wrap: balance; }
.venue-events { font-style: italic; font-size: 15px; color: var(--ink-soft); text-wrap: balance; margin-bottom: 8px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 24px;
  border-radius: 999px;
  border: 0;
  background: linear-gradient(145deg, #E2C17E, #B88A3E);
  color: var(--white);
  font-family: var(--f-serif);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(140,100,40,.25), inset 0 1px 0 rgba(255,255,255,.45);
}
.btn svg { width: 17px; height: 17px; fill: currentColor; flex: none; }
.btn:active { transform: translateY(1px); }

.contacts { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 10px; text-align: left; }
.contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--white);
  box-shadow: inset 0 0 0 1px rgba(212,176,114,.5);
}
.contact-who { min-width: 0; }
.contact-name { font-weight: 600; font-size: 17px; }
.contact-rel { font-style: italic; font-size: 15px; color: var(--ink-soft); }
.contact-phone { font-size: 16px; font-variant-numeric: tabular-nums; user-select: all; }
.contact-actions { display: flex; gap: 8px; flex: none; }
.round-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #E2C17E, #B88A3E);
  color: var(--white);
}
.round-btn.wa { background: #4C9A6A; }
.round-btn svg { width: 20px; height: 20px; fill: currentColor; }

.memories-locked { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 22px; }
.memories-locked svg { width: 54px; height: 54px; fill: none; stroke: var(--gold); stroke-width: 1.4; }
.memories-date { font-family: var(--f-script); font-size: 30px; color: var(--gold); line-height: 1.2; }

.upload-form { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 18px; }
.field { display: flex; flex-direction: column; gap: 4px; width: 100%; max-width: 300px; text-align: left; font-size: 16px; color: var(--ink-soft); }
.field input {
  font: inherit;
  font-size: 17px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(212,176,114,.8);
  background: var(--white);
  color: var(--ink);
}
.upload-pick { cursor: pointer; }
.upload-status { min-height: 1.4em; font-size: 16px; font-style: italic; color: var(--ink-soft); }
.upload-status.is-error { color: #A8483B; }
.upload-bar { width: 100%; max-width: 300px; height: 5px; border-radius: 3px; background: var(--paper-3); overflow: hidden; }
.upload-bar span { display: block; height: 100%; width: 0; background: var(--gold); transition: width .2s; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-top: 20px; }
.gallery button { padding: 0; border: 0; background: var(--paper-2); aspect-ratio: 1; cursor: zoom-in; overflow: hidden; border-radius: 8px; }
.gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-empty { margin-top: 14px; font-style: italic; color: var(--ink-soft); }

.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; }
.lightbox::backdrop { background: rgba(60,40,30,.9); }
.lightbox img { display: block; max-width: 94vw; max-height: 82vh; border-radius: 8px; }
.lightbox-cap { text-align: center; color: var(--gold-light); font-style: italic; margin-top: 8px; }
.lightbox-close {
  position: fixed;
  top: calc(10px + env(safe-area-inset-top, 0px));
  right: calc(12px + env(safe-area-inset-right, 0px));
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 0;
  background: linear-gradient(145deg, #E2C17E, #B88A3E);
  color: var(--white);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.closing {
  position: relative;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-block: 70px 10px;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.closing-arch {
  position: absolute;
  left: 50%; top: 10px;
  width: 220px; height: 120px;
  margin-left: -110px;
  border-radius: 110px 110px 0 0;
  box-shadow: inset 0 0 0 1px rgba(212,176,114,.6), inset 0 0 0 6px var(--paper), inset 0 0 0 7px rgba(212,176,114,.35);
  -webkit-mask-image: linear-gradient(#000 40%, transparent);
  mask-image: linear-gradient(#000 40%, transparent);
}
.closing .caps-label { margin-top: 14px; }
.closing-family {
  font-family: var(--f-script);
  font-size: 50px;
  line-height: 1.2;
  background: var(--gold-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding: 0 .2em;
  margin-bottom: 16px;
}
.share-note { min-height: 1.4em; font-size: 15px; font-style: italic; color: var(--ink-soft); }

.burst { position: fixed; inset: 0; pointer-events: none; z-index: 45; width: 100vw; height: 100vh; }

@media (min-width: 560px) {
  body { background: var(--paper-3) var(--emboss) center / 180px 180px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .sparkle-field, .env-sparkles { display: none; }
  .js .reveal { opacity: 1; transform: none; }
}
