/* ============ Tokens ============ */
:root {
  --maroon: #5a0b2b;
  --maroon-2: #7a1240;
  --deep: #2a0414;
  --magenta: #9b1c5c;
  --gold: #e8b84a;
  --gold-2: #f9e19a;
  --gold-3: #b8860b;
  --red: #c8102e;
  --cream: #f6ecd9;
  --cream-2: #fffaf0;
  --ink: #3b0a22;
  --text-on-dark: #f8ead0;
  --script: "Parisienne", cursive;
  --serif: "Cormorant Garamond", Georgia, serif;
  --hindi: "Tiro Devanagari Hindi", "Noto Sans Devanagari", serif;
  --texture: repeating-linear-gradient(115deg, rgba(120, 80, 40, .045) 0 1px, transparent 1px 4px);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--serif);
  background: var(--deep);
  color: var(--text-on-dark);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button { font: inherit; cursor: pointer; }
#petals { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 40; }

.script { font-family: var(--script); font-weight: 400; }
.serif { font-family: var(--serif); }
.hi { font-family: var(--hindi); }
.gold-text, .gold-letters .ch {
  background: linear-gradient(180deg, #fff4c4 0%, #f3cd6a 45%, #c8922c 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ============ Toran (marigold garland) ============ */
.toran { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: flex-start; padding: 0 4px; z-index: 30; pointer-events: none; }
.toran .rope { position: absolute; left: 0; right: 0; top: 0; height: 5px; background: linear-gradient(#d9a33a, #8a5a12); box-shadow: 0 2px 4px rgba(0, 0, 0, .3); }
.strand { display: flex; flex-direction: column; align-items: center; transform-origin: top center; animation: sway 3.2s ease-in-out var(--sd) infinite alternate; padding-top: 3px; }
.strand .f { width: 15px; height: 15px; border-radius: 50%; margin-top: -3px; background: radial-gradient(circle at 35% 35%, #ffd27a, #f08a00 65%, #b85c00); box-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
.strand .f.y { background: radial-gradient(circle at 35% 35%, #fff2a8, #ffc300 60%, #c98f00); }
.toran .leaf { width: 11px; height: 24px; margin-top: 2px; background: linear-gradient(90deg, #1f6b2b, #3aa64a 50%, #1f6b2b); border-radius: 50% 50% 50% 50% / 20% 20% 80% 80%; transform-origin: top; animation: sway 2.6s ease-in-out infinite alternate-reverse; }
@keyframes sway { from { transform: rotate(-4deg); } to { transform: rotate(4deg); } }

/* ============ Landing / envelope ============ */
.page-invite .landing {
  position: fixed; inset: 0; overflow: auto;
  background: var(--texture), radial-gradient(ellipse at 50% 30%, #fff8ea, var(--cream) 60%, #e9d6b0);
  color: var(--ink);
  transition: opacity 1s ease .9s;
}
.landing.opening { opacity: 0; }
.land-inner { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 90px 16px 40px; }
.land-om { color: var(--magenta); margin: 0 0 22px; font-size: 1rem; letter-spacing: .04em; }

.envelope { position: relative; width: min(82vw, 340px); aspect-ratio: 1.6; perspective: 900px; margin-bottom: 26px; animation: float 4s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px); } }
.env-back, .env-front, .env-flap, .env-letter { position: absolute; border-radius: 8px; }
.env-back { inset: 0; background: #d9bf93; box-shadow: 0 18px 40px rgba(90, 11, 43, .25); }
.env-letter {
  left: 6%; right: 6%; top: 6%; bottom: 8%; z-index: 2;
  background: var(--texture), var(--cream-2); border: 1px solid #e3c98f;
  display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--magenta);
  transition: transform 1.1s cubic-bezier(.3, .7, .3, 1) .5s;
}
.env-letter .script { font-size: clamp(1.6rem, 7vw, 2.2rem); }
.env-letter em { font-size: .9rem; }
.env-front { inset: 0; z-index: 3; background: var(--texture), linear-gradient(160deg, #f6e6c6, #ead3a8); clip-path: polygon(0 0, 50% 58%, 100% 0, 100% 100%, 0 100%); }
.env-swastik { position: absolute; right: 7%; bottom: 10%; width: 30px; color: var(--red); opacity: .8; }
.env-flap {
  left: 0; right: 0; top: 0; height: 62%; z-index: 4;
  background: linear-gradient(180deg, #ecd6ac, #dfc08a); clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top; transition: transform .8s ease, z-index 0s .4s;
}
.env-seal {
  position: absolute; left: 50%; top: 60%; width: 74px; height: 74px; z-index: 5; padding: 8px; border: 3px solid var(--gold);
  transform: translate(-50%, -50%); border-radius: 50%; color: #ffd76a;
  background: radial-gradient(circle at 40% 35%, #e3263f, #a50c22 70%); box-shadow: 0 6px 16px rgba(120, 0, 20, .45);
  transition: transform .5s, opacity .5s; animation: pulse 2s ease-in-out infinite;
}
.env-seal .ganesh { width: 100%; height: 100%; }
@keyframes pulse { 50% { box-shadow: 0 6px 16px rgba(120, 0, 20, .45), 0 0 0 10px rgba(232, 184, 74, .25); } }
.opening .env-seal { opacity: 0; transform: translate(-50%, -50%) scale(.3) rotate(90deg); }
.opening .env-flap { transform: rotateX(180deg); z-index: 0; }
.opening .env-letter { transform: translateY(-62%); }
.opening .envelope { animation: none; }

.dear { margin: 0; font-size: 1.15rem; font-style: italic; color: #7a4a35; }
.guest-name { margin: 2px 0 4px; font-family: var(--script); font-weight: 400; font-size: clamp(2.6rem, 12vw, 4rem); line-height: 1.1; color: var(--magenta); overflow-wrap: anywhere; }
.invited { margin: 0 0 24px; font-size: 1.25rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); font-weight: 600; }
.btn-open {
  border: 0; border-radius: 999px; padding: 15px 34px; font-size: 1.15rem; font-weight: 700; letter-spacing: .05em; color: #fff7e0;
  background: linear-gradient(180deg, var(--maroon-2), var(--maroon)); box-shadow: 0 10px 24px rgba(90, 11, 43, .35), inset 0 0 0 2px var(--gold);
  animation: glow 2.2s ease-in-out infinite;
}
.btn-open:active { transform: scale(.97); }
@keyframes glow { 50% { box-shadow: 0 10px 30px rgba(200, 16, 46, .45), inset 0 0 0 2px var(--gold-2); } }
.hint { margin-top: 16px; font-size: .95rem; color: #8a6a55; }

/* ============ Player ============ */
.player { position: fixed; inset: 0; overflow: hidden; animation: fadeIn 1.2s ease both; }
@keyframes fadeIn { from { opacity: 0; } }
.bg-glow { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 38%, #8f1a3c 0%, #5a0b2b 42%, #2a0414 100%); }
.bg-glow::after { content: ""; position: absolute; inset: 0; background: var(--texture); opacity: .6; }
.mandala-bg { position: absolute; left: 50%; top: 50%; width: 150vmax; height: 150vmax; transform: translate(-50%, -50%); color: var(--gold); opacity: .07; animation: spin 120s linear infinite; }
.mandala-bg svg { width: 100%; height: 100%; }
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
.stage { position: absolute; inset: 0; z-index: 10; }

.controls { position: absolute; right: 12px; bottom: 18px; z-index: 50; display: flex; gap: 8px; }
.controls button {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; min-width: 40px; padding: 0 10px; border-radius: 999px;
  border: 1px solid rgba(232, 184, 74, .5); background: rgba(42, 4, 20, .55); color: var(--gold-2); backdrop-filter: blur(4px);
}
.controls svg { width: 20px; height: 20px; }
.controls .skip { font-size: .95rem; padding: 0 14px; }
.player.ended .skip { display: none; }
.progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(232, 184, 74, .15); z-index: 50; }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold-3), var(--gold-2)); box-shadow: 0 0 8px var(--gold); }

/* ============ Scenes ============ */
.scene {
  position: absolute; inset: 0; display: flex; overflow: hidden;
  opacity: 0; transition: opacity .9s ease, transform 1s ease, filter 1s ease;
}
.scene.in { opacity: 1; }
.scene.out { opacity: 0; transform: scale(1.05); filter: blur(6px); }
.scene-inner {
  margin: auto; width: 100%; max-width: 680px; padding: 84px 16px 70px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.scene p { margin: 0; }

/* entrance animations, triggered when the scene gets .in */
[data-a], .ch { opacity: 0; }
.in [data-a] { animation: var(--anim, up) 1.1s cubic-bezier(.2, .7, .2, 1) var(--d, 0s) both; }
.in [data-a="up"] { --anim: up; }
.in [data-a="fade"] { --anim: fade; animation-duration: 1.6s; }
.in [data-a="zoom"] { --anim: zoom; animation-duration: 1.6s; }
.in [data-a="left"] { --anim: left; }
.in [data-a="right"] { --anim: right; }
.in [data-a="grow"] { --anim: grow; }
.in [data-a="drop"] { --anim: drop; animation-timing-function: cubic-bezier(.3, 1.5, .5, 1); }
.in [data-a="pop"] { --anim: pop; animation-duration: .6s; animation-timing-function: cubic-bezier(.3, 1.6, .5, 1); }
.in [data-a="flip"] { --anim: flip; animation-duration: 1.2s; }
.ch { display: inline-block; padding: .15em .45em; margin: -.15em -.45em; }
.script.gold-text { padding-left: .45em; padding-right: .3em; }
.in .ch { animation: letter .8s cubic-bezier(.2, .7, .2, 1) var(--d) both; }
.w { display: inline-block; white-space: nowrap; }
@keyframes up { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes zoom { from { opacity: 0; transform: scale(.55); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes left { from { opacity: 0; transform: translateX(-50px); } to { opacity: 1; transform: none; } }
@keyframes right { from { opacity: 0; transform: translateX(50px); } to { opacity: 1; transform: none; } }
@keyframes grow { from { opacity: 0; transform: scaleX(0); } to { opacity: 1; transform: none; } }
@keyframes drop { from { opacity: 0; transform: translateY(-140px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.3); } to { opacity: 1; transform: none; } }
@keyframes flip { from { opacity: 0; transform: perspective(600px) rotateX(-90deg); } to { opacity: 1; transform: none; } }
@keyframes letter { from { opacity: 0; transform: translateY(.5em) rotate(8deg); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }

.label { font-size: clamp(1rem, 4vw, 1.25rem); letter-spacing: .22em; text-transform: uppercase; color: var(--gold-2); opacity: .9; }
.en { font-size: clamp(1.05rem, 4.2vw, 1.35rem); line-height: 1.5; color: var(--text-on-dark); }
.lead { font-size: clamp(1.2rem, 5vw, 1.6rem); font-style: italic; }
.small { font-size: clamp(.95rem, 3.6vw, 1.1rem); }
.dim { opacity: .75; }
.mid { font-size: clamp(2.2rem, 10vw, 3.4rem); line-height: 1.15; }

/* intro */
.om-wrap { position: relative; width: min(70vw, 300px); aspect-ratio: 1; display: grid; place-items: center; }
.om-rays { position: absolute; inset: -10%; border-radius: 50%; background: repeating-conic-gradient(from 0deg, rgba(255, 210, 110, .35) 0 4deg, transparent 4deg 14deg); -webkit-mask: radial-gradient(circle, #000 25%, transparent 70%); mask: radial-gradient(circle, #000 25%, transparent 70%); animation: spinR 30s linear infinite; }
@keyframes spinR { to { transform: rotate(360deg); } }
.om { position: relative; font-family: var(--hindi); font-size: clamp(120px, 40vw, 210px); line-height: 1; background: linear-gradient(180deg, #fff6cf, #f5c94f 50%, #c47f17); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 24px rgba(255, 190, 70, .6)); animation: breathe 3s ease-in-out infinite; }
@keyframes breathe { 50% { filter: drop-shadow(0 0 40px rgba(255, 200, 80, .9)); } }
.diyas { display: flex; gap: clamp(6px, 3vw, 18px); margin-top: 6px; }
.diya { width: clamp(42px, 13vw, 60px); filter: drop-shadow(0 0 10px rgba(255, 170, 50, .6)); }
.diya .flame { transform-origin: 30px 34px; animation: flicker .35s ease-in-out infinite alternate; }
@keyframes flicker { from { transform: scale(1, 1) skewX(-2deg); } to { transform: scale(.94, 1.08) skewX(2deg); } }
.line { font-size: clamp(1.25rem, 5.4vw, 1.7rem); margin-top: 10px; }

/* ganesh */
.ganesh-disc { position: relative; width: min(64vw, 300px); aspect-ratio: 1; display: grid; place-items: center; margin-bottom: 12px; }
.ring-rot { position: absolute; inset: -14%; color: var(--gold); opacity: .8; animation: spinR 40s linear infinite; }
.ring-rot svg { width: 100%; height: 100%; }
.disc { position: relative; width: 78%; aspect-ratio: 1; border-radius: 50%; padding: 9%; color: #ffd76a; background: radial-gradient(circle at 40% 35%, #e8263f, #a30c22 70%, #6e0716); box-shadow: 0 0 0 4px var(--gold), 0 0 0 8px rgba(232, 184, 74, .3), 0 0 60px rgba(255, 120, 60, .5); }
.ganesh { display: block; width: 100%; height: 100%; }
.disc .dots { opacity: 0; transition: opacity 1s 3.6s; }
.in .disc .dots { opacity: 1; }
.mantra { font-size: clamp(1.25rem, 5.4vw, 1.8rem); line-height: 1.6; }
.meaning { font-style: italic; font-size: clamp(.98rem, 3.8vw, 1.15rem); max-width: 520px; opacity: .85; margin-top: 8px !important; }

/* doha */
.kalash-row { display: flex; align-items: flex-end; gap: clamp(10px, 5vw, 30px); margin-bottom: 14px; }
.kalash { width: clamp(70px, 22vw, 110px); filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .35)); }
.swastik { width: clamp(70px, 20vw, 100px); color: #ff3b4f; filter: drop-shadow(0 0 14px rgba(255, 60, 80, .55)); margin-bottom: 18px; }
.swastik svg { width: 100%; }
.doha { font-size: clamp(1.3rem, 5.6vw, 1.9rem); line-height: 1.6; color: #ffe9b8; }

/* guest */
.gname { font-size: clamp(3rem, 15vw, 5.4rem); line-height: 1.15; margin: 0; padding: 0 6px; overflow-wrap: anywhere; filter: drop-shadow(0 0 16px rgba(255, 190, 70, .35)); }
.div-wrap { width: min(70vw, 260px); color: var(--gold); transform-origin: center; }
.divider { width: 100%; display: block; }
.big-hi { font-size: clamp(1.25rem, 5.4vw, 1.75rem); color: #ffe9b8; margin-top: 6px !important; }

/* hosts */
.hosts { font-size: clamp(1.6rem, 7vw, 2.4rem); font-weight: 700; color: var(--gold-2); margin: 8px 0; line-height: 1.25; }
.amp { font-family: var(--script); font-weight: 400; color: var(--gold); padding: 0 .1em; }

/* couple */
.scene-couple .scene-inner { gap: 4px; }
.person { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.huge { font-size: clamp(3rem, 14vw, 5rem); line-height: 1.15; margin: 0; filter: drop-shadow(0 0 14px rgba(255, 190, 70, .35)); }
.rel { font-size: clamp(1rem, 3.9vw, 1.2rem); line-height: 1.4; }
.rel.dim { font-size: clamp(.9rem, 3.4vw, 1.05rem); font-style: italic; }
.weds { position: relative; display: grid; place-items: center; margin: 8px 0; color: var(--gold); }
.rings { width: 92px; filter: drop-shadow(0 0 10px rgba(255, 200, 80, .5)); }
.weds span { font-family: var(--script); font-size: 1.8rem; color: var(--gold-2); margin-top: -4px; }

/* save the date */
.dates { display: flex; align-items: center; gap: clamp(10px, 4vw, 24px); margin-top: 16px; }
.dash { font-size: 2rem; color: var(--gold); }
.date-tile { width: clamp(118px, 34vw, 150px); padding: 12px 8px 14px; border-radius: 14px; display: flex; flex-direction: column; align-items: center; background: var(--texture), linear-gradient(180deg, #fff8e6, #f2dfb6); color: var(--maroon); box-shadow: 0 0 0 3px var(--gold), 0 14px 30px rgba(0, 0, 0, .4); transform-origin: top; }
.date-tile .m { width: 100%; background: var(--red); color: #fff; font-weight: 700; letter-spacing: .2em; border-radius: 6px; padding: 3px 0; }
.date-tile .d { font-size: clamp(3rem, 13vw, 4.2rem); font-weight: 700; line-height: 1.05; }
.date-tile .y { font-weight: 700; letter-spacing: .12em; }
.date-tile .wd { font-style: italic; color: var(--magenta); }

/* programme */
.day-card { width: min(100%, 520px); padding: 18px clamp(14px, 5vw, 28px) 20px; border-radius: 18px; background: var(--texture), linear-gradient(180deg, rgba(255, 248, 230, .97), rgba(242, 223, 182, .97)); color: var(--maroon); box-shadow: 0 0 0 2px var(--gold), 0 0 0 7px rgba(232, 184, 74, .25), 0 20px 40px rgba(0, 0, 0, .45); }
.day-title { margin: 0 0 12px; font-size: clamp(1.25rem, 5vw, 1.6rem); color: var(--magenta); border-bottom: 1px dashed rgba(155, 28, 92, .4); padding-bottom: 10px; }
.events { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.events li { display: flex; align-items: flex-end; gap: 8px; text-align: left; font-size: clamp(1.1rem, 4.6vw, 1.35rem); font-weight: 600; }
.ev-name small { display: block; font-size: .78em; font-weight: 400; color: #8a4a5a; }
.dots { flex: 1; border-bottom: 2px dotted rgba(155, 28, 92, .45); margin-bottom: 7px; min-width: 16px; }
.ev-time { color: var(--red); font-weight: 700; white-space: nowrap; }
.barat { position: relative; width: min(100%, 520px); height: 74px; overflow: hidden; margin-top: 8px; }
.barat .road { position: absolute; left: 0; right: 0; bottom: 10px; height: 2px; background: repeating-linear-gradient(90deg, var(--gold) 0 14px, transparent 14px 26px); opacity: .6; }
.barat .horse { position: absolute; bottom: 8px; font-size: 52px; line-height: 1; animation: trot 7s linear infinite, bob .34s ease-in-out infinite alternate; }
@keyframes trot { from { left: 105%; } to { left: -25%; } }
@keyframes bob { to { transform: translateY(-6px) rotate(-3deg); } }
.note { position: absolute; bottom: 30px; color: var(--gold-2); font-size: 22px; animation: noteUp 2.2s ease-out infinite; }
.n1 { left: 22%; } .n2 { left: 50%; animation-delay: .7s; } .n3 { left: 76%; animation-delay: 1.4s; }
@keyframes noteUp { from { opacity: 0; transform: translateY(20px); } 30% { opacity: 1; } to { opacity: 0; transform: translateY(-30px); } }
.barat-note { font-style: italic; font-size: clamp(1rem, 4vw, 1.2rem); padding: 8px 16px; border: 1px solid rgba(232, 184, 74, .6); border-radius: 10px; color: var(--gold-2); }

/* venue */
.pin-wrap { width: 70px; filter: drop-shadow(0 10px 10px rgba(0, 0, 0, .4)); }
.pin-wrap svg { width: 100%; animation: bounce 2s ease-in-out 1.4s infinite; }
@keyframes bounce { 50% { transform: translateY(-8px); } }
.venue-name { font-size: clamp(1.8rem, 8vw, 2.8rem); font-weight: 700; margin: 0; line-height: 1.2; }

/* bal manuhar */
.hex-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin-top: 8px; }
.hex { width: min(86vw, 280px); padding: 26px 22px; color: var(--maroon); background: var(--texture), linear-gradient(180deg, #fff8e6, #f2dfb6); clip-path: polygon(12% 0, 88% 0, 100% 50%, 88% 100%, 12% 100%, 0 50%); }
.hex-title { font-size: 1.15rem; font-style: italic; font-weight: 600; margin-bottom: 10px !important; }
.kids { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.kids span { padding: 3px 12px; border-radius: 999px; background: var(--magenta); color: #fff; font-weight: 600; }

/* compliments */
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 620px; margin: 6px 0 4px; }
.chips span { padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(232, 184, 74, .55); background: rgba(255, 230, 170, .07); font-size: clamp(.95rem, 3.8vw, 1.1rem); }

/* finale */
.scene-finale { overflow-y: auto; -webkit-overflow-scrolling: touch; }
.scene-finale .scene-inner { padding-bottom: 90px; }
.finale { display: flex; flex-direction: column; align-items: center; gap: 12px; width: 100%; }
.fin-ganesh { width: 96px; height: 96px; border-radius: 50%; padding: 12px; color: #ffd76a; background: radial-gradient(circle at 40% 35%, #e8263f, #a30c22 70%); box-shadow: 0 0 0 3px var(--gold), 0 0 30px rgba(255, 120, 60, .5); }
.couple-line { font-size: clamp(2.3rem, 10vw, 4.2rem); white-space: nowrap; margin: 0; line-height: 1.1; }
.couple-line small { font-size: .45em; }
.countdown { display: flex; gap: 8px; justify-content: center; }
.countdown div { width: 70px; padding: 8px 0; border-radius: 12px; border: 1px solid rgba(232, 184, 74, .5); background: rgba(255, 230, 170, .08); display: flex; flex-direction: column; }
.countdown b { font-size: 1.7rem; color: var(--gold-2); line-height: 1.1; }
.countdown span { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; opacity: .8; }
.fin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; width: 100%; }
.fin-card { padding: 16px 18px; border-radius: 16px; text-align: left; color: var(--maroon); background: var(--texture), linear-gradient(180deg, #fff8e6, #f2dfb6); box-shadow: 0 0 0 2px var(--gold), 0 12px 24px rgba(0, 0, 0, .35); font-size: 1.08rem; line-height: 1.45; }
.fin-card h4 { margin: 0 0 8px; color: var(--magenta); font-size: 1.2rem; }
.fin-card p { margin: 0; }
.fin-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.fin-card li { display: flex; justify-content: space-between; gap: 10px; }
.fin-card li b { color: var(--red); white-space: nowrap; }
.fin-link { display: inline-block; margin-top: 8px; color: var(--red); font-weight: 700; text-decoration: none; }
.phones { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px !important; }
.phones a { padding: 4px 10px; border-radius: 999px; background: var(--maroon); color: #fff; text-decoration: none; font-weight: 600; font-size: .98rem; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 6px; }
.btn-gold { border: 0; border-radius: 999px; padding: 11px 20px; font-weight: 700; font-size: 1.02rem; color: var(--maroon); background: linear-gradient(180deg, #fff1bd, #e8b84a); box-shadow: 0 6px 16px rgba(0, 0, 0, .35); }
.btn-gold:active { transform: scale(.97); }
.welcome { margin-top: 8px !important; font-size: 1.15rem; }
.welcome .script { font-size: 2.1rem; color: var(--gold-2); }

/* ============ Admin ============ */
.page-admin { background: var(--texture), radial-gradient(ellipse at 50% 0%, #fff8ea, var(--cream) 55%, #ead7b2); background-attachment: fixed; color: var(--ink); min-height: 100%; }
.admin { min-height: 100vh; }
.adm-head { text-align: center; padding: 40px 16px 26px; background: radial-gradient(ellipse at 50% 30%, #8f1a3c, var(--maroon) 60%, var(--deep)); color: var(--text-on-dark); border-bottom: 4px solid var(--gold); }
.adm-seal { width: 76px; height: 76px; margin: 0 auto 10px; border-radius: 50%; padding: 10px; color: #ffd76a; background: radial-gradient(circle at 40% 35%, #e8263f, #a30c22 70%); box-shadow: 0 0 0 3px var(--gold); }
.adm-head .hi { margin: 0; color: var(--gold-2); }
.adm-head h1 { margin: 4px 0 0; font-weight: 400; }
.adm-head h1 .script { font-size: clamp(2.4rem, 10vw, 3.4rem); color: var(--gold-2); }
.adm-head h1 small { font-family: var(--script); font-size: 1.6rem; }
.adm-head .sub { margin: 4px 0 0; letter-spacing: .2em; text-transform: uppercase; font-size: .9rem; opacity: .85; }
.adm-main { max-width: 680px; margin: 0 auto; padding: 24px 16px 60px; display: flex; flex-direction: column; gap: 18px; }
.btn-primary { border: 0; border-radius: 12px; padding: 14px 22px; font-weight: 700; font-size: 1.1rem; color: #fff7e0; background: linear-gradient(180deg, var(--maroon-2), var(--maroon)); box-shadow: 0 8px 18px rgba(90, 11, 43, .3), inset 0 0 0 2px var(--gold); width: 100%; }
.btn-primary.big { padding: 18px; font-size: 1.2rem; }
.adm-card { background: var(--cream-2); border-radius: 16px; padding: 18px; box-shadow: 0 0 0 1px #e3c98f, 0 10px 24px rgba(90, 11, 43, .08); }
.adm-card-head { display: flex; align-items: center; justify-content: space-between; }
.adm-card h2 { margin: 0; font-size: 1.35rem; color: var(--maroon); }
.count { min-width: 30px; padding: 2px 10px; border-radius: 999px; background: var(--maroon); color: #fff; text-align: center; font-weight: 700; }
.search { width: 100%; margin: 12px 0 6px; padding: 10px 12px; border-radius: 10px; border: 1px solid #dcc08a; background: #fff; font: inherit; font-size: 1.05rem; color: var(--ink); }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 2px; border-bottom: 1px dashed #e0c78f; }
.list li:last-child { border-bottom: 0; }
.list .who { display: flex; flex-direction: column; min-width: 0; }
.list .who strong { font-size: 1.15rem; color: var(--maroon); overflow-wrap: anywhere; }
.list .who small { color: #8a6a55; }
.acts { display: flex; gap: 6px; flex-wrap: wrap; }
.acts button, .acts a { border: 1px solid #d8b878; background: #fff; color: var(--maroon); border-radius: 8px; padding: 6px 10px; font-size: .95rem; font-weight: 600; text-decoration: none; }
.acts .wa { background: #25d366; border-color: #1eb456; color: #fff; }
.acts .del { color: #a33; }
.acts .ok, .linkbox .ok { background: #2e7d32 !important; color: #fff !important; }
.list .empty { justify-content: center; color: #8a6a55; font-style: italic; }
.adm-note { text-align: center; color: #8a6a55; font-size: .95rem; margin: 0; }

.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(42, 4, 20, .6); backdrop-filter: blur(3px); animation: fadeIn .25s; }
.modal[hidden] { display: none; }
.modal-box { position: relative; width: min(100%, 440px); padding: 28px 22px 22px; border-radius: 20px; text-align: center; background: var(--texture), var(--cream-2); box-shadow: 0 0 0 3px var(--gold), 0 30px 60px rgba(0, 0, 0, .4); animation: pop .35s cubic-bezier(.3, 1.4, .5, 1); }
.modal-x { position: absolute; top: 8px; right: 10px; width: 36px; height: 36px; border: 0; background: none; font-size: 1.8rem; color: var(--maroon); line-height: 1; }
.modal-icon { width: 54px; height: 54px; margin: 0 auto 8px; color: var(--red); }
.modal-icon.ok { display: grid; place-items: center; border-radius: 50%; background: #2e7d32; color: #fff; font-size: 1.8rem; font-weight: 700; }
.modal-box h2 { margin: 0 0 16px; color: var(--maroon); font-size: 1.5rem; line-height: 1.3; }
.modal-box h2 .script { font-size: 2.4rem; color: var(--magenta); overflow-wrap: anywhere; }
.field { display: block; text-align: left; font-weight: 600; color: var(--maroon); }
.field input { display: block; width: 100%; margin-top: 6px; padding: 13px 14px; font: inherit; font-size: 1.2rem; border-radius: 12px; border: 2px solid #dcc08a; background: #fff; color: var(--ink); }
.field input:focus { outline: none; border-color: var(--magenta); box-shadow: 0 0 0 3px rgba(155, 28, 92, .15); }
.chk { display: flex; align-items: center; gap: 8px; margin: 12px 0 16px; text-align: left; font-size: 1.05rem; }
.chk input { width: 18px; height: 18px; accent-color: var(--maroon); }
.chk em { color: #8a6a55; }
.err { color: var(--red); margin: -6px 0 10px; font-weight: 600; }
.linkbox { display: flex; gap: 6px; margin-bottom: 12px; }
.linkbox input { flex: 1; min-width: 0; padding: 11px 12px; border-radius: 10px; border: 1px solid #dcc08a; background: #fff; font: inherit; font-size: .95rem; color: var(--ink); }
.linkbox button { border: 0; border-radius: 10px; padding: 0 16px; font-weight: 700; background: var(--maroon); color: #fff; }
.row { display: flex; gap: 8px; }
.btn-wa, .btn-ghost { flex: 1; padding: 12px; border-radius: 12px; font-weight: 700; text-decoration: none; }
.btn-wa { background: #25d366; color: #fff; }
.btn-ghost { border: 2px solid var(--maroon); color: var(--maroon); }
.btn-link { margin-top: 14px; border: 0; background: none; color: var(--magenta); font-weight: 700; font-size: 1.05rem; }

@media (prefers-reduced-motion: reduce) {
  .mandala-bg, .ring-rot, .om-rays, .strand, .toran .leaf { animation: none !important; }
}

/* ============ v2: "& Family", card effects, hold-to-pause ============ */
.family { margin: -2px 0 6px; font-family: var(--script); font-size: clamp(1.6rem, 7vw, 2.1rem); color: var(--magenta); }
.family-line { font-size: clamp(1.8rem, 8vw, 2.6rem); margin-top: -6px !important; }
.fam-note { margin: 12px 0 16px; color: #8a6a55; font-size: 1.05rem; }
.fam-note strong { color: var(--magenta); }
.list .who em { font-style: italic; font-weight: 500; color: #9a6a7a; font-size: .9em; }

/* richer card entrances */
.in [data-a="card"] { --anim: card; animation-duration: 1.4s; animation-timing-function: cubic-bezier(.2, .9, .25, 1.12); }
.in [data-a="swingL"] { --anim: swingL; animation-duration: 1.4s; animation-timing-function: cubic-bezier(.2, .9, .3, 1.15); }
.in [data-a="swingR"] { --anim: swingR; animation-duration: 1.4s; animation-timing-function: cubic-bezier(.2, .9, .3, 1.15); }
.in [data-a="chip"] { --anim: chip; animation-duration: 1s; }
.in [data-a="row"] { --anim: row; animation-duration: .9s; }
@keyframes card {
  0% { opacity: 0; transform: perspective(900px) translateY(80px) rotateX(60deg) scale(.82); filter: blur(4px); }
  55% { opacity: 1; filter: none; }
  100% { opacity: 1; transform: none; filter: none; }
}
@keyframes swingL { from { opacity: 0; transform: perspective(900px) translateX(-60px) rotateY(80deg); } to { opacity: 1; transform: none; } }
@keyframes swingR { from { opacity: 0; transform: perspective(900px) translateX(60px) rotateY(-80deg); } to { opacity: 1; transform: none; } }
@keyframes chip {
  0% { opacity: 0; transform: translateY(22px) rotateX(90deg) scale(.6); }
  55% { opacity: 1; transform: translateY(-4px) rotateX(-12deg) scale(1.06); box-shadow: 0 0 22px rgba(255, 210, 110, .85); background: rgba(255, 220, 140, .3); }
  100% { opacity: 1; transform: none; }
}
@keyframes row { from { opacity: 0; transform: translateX(-36px) rotate(-2deg); } to { opacity: 1; transform: none; } }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* dotted leader draws across, time badge pops */
.in .events li .dots { transform-origin: left; animation: grow .8s ease calc(var(--d) + .3s) both; }
.in .events li .ev-time { animation: pop .6s cubic-bezier(.3, 1.6, .5, 1) calc(var(--d) + .7s) both; }

/* golden shine sweeping across a card once it lands */
.shine { position: relative; overflow: hidden; }
.shine::after {
  content: ""; position: absolute; top: -30%; bottom: -30%; left: 0; width: 45%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .7), rgba(255, 236, 170, .5), transparent);
  transform: translateX(-160%) skewX(-18deg);
}
.in .shine::after { animation: shine 1.5s ease-in-out calc(var(--d, 0s) + 1s) both; }
@keyframes shine { to { transform: translateX(330%) skewX(-18deg); } }

/* sparkles twinkling around cards */
.card-wrap { position: relative; display: flex; justify-content: center; }
.card-wrap.wide { width: min(100%, 520px); }
.card-wrap.wide > .day-card { width: 100%; }
.spark { position: absolute; z-index: 2; font-style: normal; font-size: 16px; line-height: 1; color: #fff1b8; opacity: 0; pointer-events: none; text-shadow: 0 0 8px #ffd36a, 0 0 16px #ffb340; transform: translate(-50%, -50%); }
.in .spark { animation: twinkle 2.6s ease-in-out var(--sd) infinite; }
@keyframes twinkle {
  0%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(.2) rotate(0deg); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.2) rotate(90deg); }
}

.venue-card { padding: 16px 22px 18px; border-radius: 16px; color: var(--maroon); background: var(--texture), linear-gradient(180deg, #fff8e6, #f2dfb6); box-shadow: 0 0 0 2px var(--gold), 0 0 0 7px rgba(232, 184, 74, .25), 0 18px 36px rgba(0, 0, 0, .4); font-size: clamp(1rem, 4vw, 1.2rem); }
.venue-card .venue-name { color: var(--maroon); margin-bottom: 4px; }

/* hold-to-pause */
.player { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.player:not(.ended) { touch-action: none; }
.player.paused *, .player.paused *::before, .player.paused *::after { animation-play-state: paused !important; }
.pause-pill {
  position: absolute; left: 12px; bottom: 18px; z-index: 55; height: 40px; padding: 0 14px; border-radius: 999px;
  display: flex; align-items: center; gap: 6px; font-size: .95rem; pointer-events: none;
  background: rgba(42, 4, 20, .8); border: 1px solid var(--gold); color: var(--gold-2); backdrop-filter: blur(4px);
  opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s;
}
.pause-pill svg { width: 18px; height: 18px; }
.player.paused .pause-pill { opacity: 1; transform: none; }
.player.paused .controls .skip { opacity: .4; }
.hold-hint {
  position: absolute; left: 50%; bottom: 70px; z-index: 55; transform: translateX(-50%); white-space: nowrap; pointer-events: none;
  padding: 6px 14px; border-radius: 999px; background: rgba(42, 4, 20, .6); border: 1px solid rgba(232, 184, 74, .4); color: var(--gold-2); font-size: .95rem;
  opacity: 0; animation: hint 5s ease 2.5s both;
}
@keyframes hint { 0% { opacity: 0; transform: translate(-50%, 8px); } 12%, 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }
.player.ended .hold-hint { display: none; }

/* ============ v3: admin views / tracking ============ */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stat { background: var(--cream-2); border-radius: 14px; padding: 12px 6px; text-align: center; box-shadow: 0 0 0 1px #e3c98f; }
.stat b { display: block; font-size: 1.8rem; line-height: 1.1; color: var(--maroon); }
.stat span { font-size: .85rem; color: #8a6a55; }
.stat.good b { color: #2e7d32; }
.stat.warn b { color: #c26a00; }
.refresh { border: 1px solid #d8b878; background: #fff; color: var(--maroon); width: 36px; height: 36px; border-radius: 10px; font-size: 1.2rem; }
.tools { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.tools .search { margin: 0; flex: 1; min-width: 0; }
.tools select { padding: 10px 8px; border-radius: 10px; border: 1px solid #dcc08a; background: #fff; font: inherit; color: var(--ink); }
.chips-filter { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 4px; }
.chips-filter button { border: 1px solid #d8b878; background: #fff; color: var(--maroon); border-radius: 999px; padding: 5px 12px; font-weight: 600; }
.chips-filter button.on { background: var(--maroon); color: #fff; border-color: var(--maroon); }
.list > li { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; }
.list > li.empty { display: block; text-align: center; }
.list .who { grid-column: 1 / -1; }
.list .views { display: flex; gap: 6px; flex-wrap: wrap; }
.list .acts { justify-self: end; }
.list .history { grid-column: 1 / -1; font-size: .95rem; color: #6a4a3a; }
.list .history summary { cursor: pointer; color: var(--magenta); font-weight: 600; }
.list .history ol { margin: 6px 0 0; padding-left: 22px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; vertical-align: middle; background: #c9b9a6; }
.is-open .dot { background: #2e9d44; box-shadow: 0 0 0 3px rgba(46, 157, 68, .2); }
.pill { padding: 3px 10px; border-radius: 999px; font-size: .92rem; font-weight: 600; background: #f1e6d2; color: #8a6a55; white-space: nowrap; }
.pill.on { background: #fde9c0; color: var(--maroon); }
.pill.done { background: #dff3e2; color: #2e7d32; }
@media (max-width: 480px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .list > li { grid-template-columns: 1fr; }
  .list .acts { justify-self: start; }
}
