/* ============ Royal Wedding Invitation – burgundy velvet · antique gold foil · ivory cotton paper ============ */
:root {
  --wine: #3a0915;
  --wine-2: #2a0610;
  --wine-3: #1e040b;
  --burgundy: #5a1426;
  --ink: #3b0d18;
  --ink-2: #5e2a36;
  --muted: #7d5a5f;
  --ivory: #fbf6ea;
  --ivory-2: #f4ead6;
  --gold: #b58f3e;
  --gold-l: #e9cf86;
  --gold-d: #8a6a2a;
  --line: rgba(181, 143, 62, .55);
  --foil-dark: linear-gradient(100deg, #6e4f16 0%, #a8822f 20%, #d6b863 34%, #f0dc9c 44%, #b8913f 56%, #7a5a1c 72%, #c9a453 88%, #8a6a2a 100%);
  --foil-light: linear-gradient(100deg, #a8823a 0%, #e9cf86 18%, #fff3c8 32%, #c9a14e 48%, #8f6d2c 62%, #e8cd82 80%, #a8823a 100%);
  --paper: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .25 0 0 0 0 .1 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --velvet: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .18 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.lang-en { --f-body: "Cormorant Garamond", Georgia, serif; --f-head: "Cinzel", Georgia, serif; --f-name: "Pinyon Script", cursive; --fs: 1.17rem; --name: clamp(3rem, 13vw, 3.9rem); --ls: 3px; }
.lang-mr { --f-body: "Martel", "Nirmala UI", serif; --f-head: "Tiro Devanagari Marathi", serif; --f-name: "Tiro Devanagari Marathi", serif; --fs: 1rem; --name: clamp(2.4rem, 10.5vw, 3.1rem); --ls: 0px; }

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { font-size: 17px; }
body {
  min-height: 100svh; overflow-x: hidden;
  font-family: var(--f-body); font-size: var(--fs); color: var(--ink); line-height: 1.7;
  background-color: var(--wine-3); padding: 64px 16px 30px;
}
.lang-mr { font-weight: 300; }
body.locked { overflow: hidden; height: 100vh; }
#fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 30; }

.foil-dark, .foil-light {
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: var(--gold);
  background-size: 220% 100%; animation: foil 9s linear infinite;
}
.foil-dark { background-image: var(--foil-dark); }
.foil-light { background-image: var(--foil-light); }

/* Backdrop */
.scene { position: fixed; inset: 0; z-index: 0; transform: scale(1.12); transition: transform 4.5s cubic-bezier(.2,.7,.2,1); }
.scene.revealed { transform: none; }
.scene svg { width: 100%; height: 100%; display: block; }
.rs-star { animation: twinkle 3.6s ease-in-out infinite; }
.rs-water { animation: water 4s ease-in-out infinite alternate; }

/* Top pills */
.pill-btn {
  position: fixed; top: 14px; z-index: 120; cursor: pointer; display: flex; align-items: center; gap: 8px;
  font-family: var(--f-head); font-size: .76rem; letter-spacing: 1.5px; color: var(--gold-l);
  padding: 6px 16px; border-radius: 30px; background: rgba(30,4,11,.7); border: 1px solid var(--line); backdrop-filter: blur(6px);
}
.lang-mr .pill-btn { font-size: .9rem; letter-spacing: 0; }
.music-pill { left: 14px; }
.lang-pill { right: 14px; }
.music-pill.on #musicIcon { animation: pulse 1.4s ease-in-out infinite; display: inline-block; }

/* ================= Gate ================= */
.gate { position: fixed; inset: 0; z-index: 100; perspective: 2000px; overflow: hidden; transition: opacity 1s ease, visibility 1s ease; }
.gate.gone { opacity: 0; visibility: hidden; }
.gate-glow { position: absolute; inset: 0; background: radial-gradient(ellipse 35% 70% at center, rgba(255,236,190,.85), rgba(233,207,134,.25) 45%, transparent 75%); opacity: 0; transition: opacity 1.6s ease .2s; }
.gate.opening .gate-glow { opacity: 1; }
.door { position: absolute; top: 0; bottom: 0; width: 50.3%; background: #3a0915; transition: transform 2.4s cubic-bezier(.65,.02,.3,1); backface-visibility: hidden; box-shadow: inset 0 0 80px rgba(0,0,0,.45); }
.door::after { content: ""; position: absolute; inset: 0; background: var(--velvet); mix-blend-mode: multiply; pointer-events: none; }
.door svg { width: 100%; height: 100%; display: block; }
.door.left { left: 0; transform-origin: left center; }
.door.right { right: 0; transform-origin: right center; }
.door.right svg { transform: scaleX(-1); }
.gate.opening .door.left { transform: rotateY(-104deg); }
.gate.opening .door.right { transform: rotateY(104deg); }
.gate-center {
  position: absolute; left: 50%; top: 50%; z-index: 4; transform: translate(-50%, -50%);
  width: min(330px, 84vw); padding: 26px 20px 24px; text-align: center;
  background: radial-gradient(ellipse at center, rgba(30,4,11,.9) 40%, rgba(30,4,11,.6) 70%, transparent 100%);
  transition: opacity .7s ease, transform 1s ease;
}
.gate.opening .gate-center { opacity: 0; transform: translate(-50%, -50%) scale(.85); }
.g-om { font-family: var(--f-head); color: var(--gold-l); font-size: .74rem; letter-spacing: var(--ls); }
.lang-mr .g-om { font-size: .95rem; }
.seal { display: block; width: 128px; height: 128px; margin: 14px auto 8px; border: 0; background: none; cursor: pointer; filter: drop-shadow(0 10px 18px rgba(0,0,0,.55)); animation: breathe 3.2s ease-in-out infinite; }
.seal svg { width: 100%; height: 100%; display: block; }
.seal:focus-visible { outline: 2px solid var(--gold-l); outline-offset: 6px; border-radius: 50%; }
.gate.opening .seal { animation: crack .7s ease forwards; }
.g-names { font-family: var(--f-name); font-size: 2.5rem; line-height: 1.15; }
.lang-mr .g-names { font-size: 2rem; }
.g-names em { font-style: normal; font-size: .55em; }
.g-date { font-family: var(--f-head); font-size: .74rem; letter-spacing: 2px; color: #ecd9ae; margin-top: 4px; }
.lang-mr .g-date { font-size: .92rem; letter-spacing: 0; }
.intro-guest { margin-top: 8px; color: #ecd9ae; font-size: 1rem; }
.intro-guest strong { color: var(--gold-l); font-weight: 600; }
.g-hint { margin-top: 10px; font-size: .9rem; font-style: italic; color: rgba(236,217,174,.7); }

.btn-royal {
  margin-top: 14px; cursor: pointer; position: relative; overflow: hidden;
  font-family: var(--f-head); font-size: .8rem; letter-spacing: 3px; color: var(--gold-l);
  padding: 10px 30px; background: transparent; border: 1px solid var(--gold); border-radius: 2px;
  box-shadow: inset 0 0 0 3px rgba(30,4,11,.9), inset 0 0 0 4px rgba(181,143,62,.5);
  transition: background .3s ease, color .3s ease;
}
.lang-mr .btn-royal { font-size: 1rem; letter-spacing: 0; }
.btn-royal::after { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255,240,200,.35), transparent); animation: sweep 3.6s ease-in-out infinite; }
.btn-royal:hover { background: rgba(181,143,62,.15); }
.btn-royal:focus-visible, .chip:focus-visible, .nav-btn:focus-visible, .pill-btn:focus-visible { outline: 2px solid var(--gold-l); outline-offset: 3px; }

/* Welcome */
.welcome { position: fixed; left: 0; right: 0; top: 7vh; z-index: 20; text-align: center; pointer-events: none; padding: 0 16px; opacity: 0; transform: translateY(24px); transition: opacity 1.4s ease, transform 1.4s ease; }
.welcome.show { opacity: 1; transform: none; }
.welcome.leave { opacity: 0; transform: translateY(-40px); }
.w-top { font-family: var(--f-head); letter-spacing: 6px; color: var(--gold-l); font-size: .85rem; }
.lang-mr .w-top { letter-spacing: 0; font-size: 1.1rem; }
.w-names { font-family: var(--f-name); font-size: clamp(3.2rem, 13vw, 5rem); line-height: 1.15; }
.w-names em { font-style: normal; font-size: .5em; }
.w-date { font-family: var(--f-head); color: #ecd9ae; font-size: .85rem; letter-spacing: 2.5px; }
.lang-mr .w-date { letter-spacing: 0; font-size: 1rem; }

/* ================= Card ================= */
.card {
  position: relative; z-index: 10; width: min(480px, 100%); margin: 0 auto;
  height: min(900px, calc(100svh - 94px)); min-height: 600px;
  display: flex; flex-direction: column;
  background-color: var(--ivory);
  background-image: var(--paper),
    radial-gradient(ellipse at 50% 0%, #fffdf6 0%, transparent 60%),
    radial-gradient(ellipse at 50% 100%, var(--ivory-2), transparent 70%);
  border-radius: 240px 240px 6px 6px / 200px 200px 6px 6px;
  box-shadow: 0 0 0 1px var(--gold), 0 0 0 7px var(--ivory), 0 0 0 8px var(--line), 0 50px 100px rgba(0,0,0,.6);
  opacity: 0; transform: translateY(30px);
  transition: opacity 1.2s ease .3s, transform 1.2s ease .3s;
}
.card.show { opacity: 1; transform: none; }
.frame-line {
  position: absolute; inset: 14px; pointer-events: none; z-index: 1;
  border: 1px solid var(--line); border-radius: 226px 226px 3px 3px / 188px 188px 3px 3px;
  box-shadow: inset 0 0 0 4px var(--ivory), inset 0 0 0 5px rgba(181,143,62,.35);
}
.corner { position: absolute; width: 70px; height: 70px; z-index: 3; pointer-events: none; }
.corner svg { width: 100%; height: 100%; display: block; }
.corner.bl { bottom: 8px; left: 8px; transform: scaleY(-1); }
.corner.br { bottom: 8px; right: 8px; transform: scale(-1, -1); }
.card-crest { position: absolute; top: 34px; left: 50%; transform: translateX(-50%); width: 220px; height: 76px; z-index: 5; pointer-events: none; }
.card-crest svg { width: 100%; height: 100%; display: block; }

.card-top { position: relative; z-index: 6; padding: 116px 34px 0; }
.progress { display: flex; gap: 6px; }
.seg { flex: 1; height: 2px; background: rgba(181,143,62,.25); overflow: hidden; }
.seg i { display: block; height: 100%; width: 0; background: var(--foil-dark); }
.controls { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.chip { font-family: var(--f-head); font-size: .66rem; letter-spacing: 1.5px; color: var(--ink-2); cursor: pointer; padding: 4px 12px; background: transparent; border: 1px solid var(--line); border-radius: 2px; }
.lang-mr .chip { font-size: .85rem; letter-spacing: 0; }
.chip:hover { border-color: var(--gold-d); color: var(--ink); }

.slides { position: relative; flex: 1; min-height: 0; z-index: 2; }
.slide {
  position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden;
  display: flex; flex-direction: column; padding: 6px 40px 12px;
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .9s ease, transform .9s ease, visibility .9s;
  scrollbar-width: thin; scrollbar-color: var(--gold) transparent;
}
.slide.active { opacity: 1; visibility: visible; transform: none; }
.slide .sep { display: none; }
.inner { position: relative; margin: auto 0; text-align: center; padding: 6px 0; }
.slide.active .inner > * { animation: rise 1.1s cubic-bezier(.2,.8,.2,1) both; }
.slide.active .inner > *:nth-child(2) { animation-delay: .14s; }
.slide.active .inner > *:nth-child(3) { animation-delay: .28s; }
.slide.active .inner > *:nth-child(4) { animation-delay: .42s; }
.slide.active .inner > *:nth-child(5) { animation-delay: .56s; }
.slide.active .inner > *:nth-child(6) { animation-delay: .7s; }
.slide.active .inner > *:nth-child(n+7) { animation-delay: .84s; }

.card-nav { position: relative; z-index: 6; display: flex; justify-content: space-between; align-items: center; margin: 0 40px 36px; padding-top: 10px; border-top: 1px solid rgba(181,143,62,.35); }
.nav-btn { background: none; border: 0; cursor: pointer; font-family: var(--f-head); font-size: .72rem; letter-spacing: 2px; color: var(--ink-2); }
.lang-mr .nav-btn { font-size: .9rem; letter-spacing: 0; }
.nav-btn:disabled { opacity: .3; cursor: default; }
.counter { font-family: var(--f-head); font-size: .74rem; letter-spacing: 2px; color: var(--gold-d); }

.card.full { height: auto; min-height: 0; }
.card.full .progress, .card.full #pauseBtn, .card.full .card-nav { display: none; }
.card.full .slides { flex: none; padding-bottom: 70px; }
.card.full .slide { position: relative; inset: auto; opacity: 1; visibility: visible; transform: none; overflow: visible; padding: 18px 40px; transition: none; }
.card.full .slide + .slide .sep { display: block; margin: 4px auto 14px; width: min(300px, 90%); }
.card.full .slide .inner > * { animation: none; }
.sep svg { width: 100%; height: auto; display: block; }

/* ================= Slide typography ================= */
.medal { width: 120px; height: 120px; margin: 0 auto 6px; }
.medal svg { width: 100%; height: 100%; display: block; animation: spin 120s linear infinite; }
.kicker { font-family: var(--f-head); font-size: .74rem; letter-spacing: var(--ls); color: var(--gold-d); line-height: 2; }
.lang-mr .kicker { font-size: .95rem; line-height: 1.7; }
.label { font-family: var(--f-head); font-size: .74rem; letter-spacing: 4px; color: var(--gold-d); margin: 16px 0 10px; }
.lang-mr .label { font-size: 1.05rem; letter-spacing: 0; }
.div { width: min(260px, 80%); margin: 14px auto; }
.div svg { width: 100%; height: auto; display: block; }
.script { font-family: var(--f-body); font-style: italic; font-size: 1.3em; color: var(--ink-2); line-height: 1.45; }
.lang-mr .script { font-family: var(--f-head); font-style: normal; }
.strong { font-family: var(--f-head); font-size: .9rem; letter-spacing: 1.5px; color: var(--ink); margin: 8px 0; line-height: 1.9; }
.lang-mr .strong { font-size: 1.1rem; letter-spacing: 0; line-height: 1.6; }
.body { color: var(--ink); }
.muted { color: var(--muted); font-size: .94em; }

.prefix { font-family: var(--f-head); font-size: .7rem; letter-spacing: 4px; color: var(--gold-d); }
.lang-mr .prefix { font-size: .95rem; letter-spacing: 0; }
.name { font-family: var(--f-name); font-size: var(--name); line-height: 1.15; padding: 4px 0; }
.paren { color: var(--muted); font-size: .94em; line-height: 1.5; }
.with { font-family: var(--f-body); font-style: italic; color: var(--gold-d); font-size: 1.4rem; margin: 10px 0; display: flex; align-items: center; justify-content: center; gap: 14px; }
.lang-mr .with { font-family: var(--f-head); font-style: normal; }
.with::before, .with::after { content: ""; width: 54px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.with::after { transform: scaleX(-1); }
.muhurt { font-family: var(--f-head); font-size: .8rem; letter-spacing: 2px; color: var(--ink); line-height: 1.9; }
.lang-mr .muhurt { font-size: 1.02rem; letter-spacing: 0; }

.dateblock { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; max-width: 320px; margin: 6px auto; }
.db-side { display: flex; flex-direction: column; font-family: var(--f-head); font-size: .7rem; letter-spacing: 2px; color: var(--ink-2); line-height: 1.8; }
.lang-mr .db-side { font-size: .9rem; letter-spacing: 0; }
.db-side:first-child { align-items: flex-end; text-align: right; }
.db-side:last-child { align-items: flex-start; text-align: left; }
.db-num { font-family: var(--f-head); font-size: 3.6rem; line-height: 1; padding: 6px 16px 2px; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }

.verse { font-family: var(--f-body); font-style: italic; font-size: 1.55rem; line-height: 1.6; color: var(--ink); }
.lang-mr .verse { font-family: var(--f-head); font-style: normal; font-size: 1.4rem; }
.verse-src { font-family: var(--f-head); font-size: .72rem; letter-spacing: 3px; color: var(--gold-d); margin-top: 8px; }
.lang-mr .verse-src { font-size: .95rem; letter-spacing: 0; }

.h2 { font-family: var(--f-head); font-size: 1.15rem; letter-spacing: 4px; margin: 2px 0 4px; }
.lang-mr .h2 { font-size: 1.6rem; letter-spacing: 0; }
.ev { position: relative; padding: 16px 14px; margin: 12px 0; border: 1px solid var(--line); }
.ev::before { content: ""; position: absolute; inset: 4px; border: 1px solid rgba(181,143,62,.25); pointer-events: none; }
.ev.main { background: rgba(181,143,62,.07); }
.ev-name { font-family: var(--f-head); font-size: .95rem; letter-spacing: 2.5px; color: var(--ink); }
.lang-mr .ev-name { font-size: 1.2rem; letter-spacing: 0; }
.ev-when { font-family: var(--f-head); font-size: .68rem; letter-spacing: 1.5px; color: var(--gold-d); margin-top: 2px; }
.lang-mr .ev-when { font-size: .9rem; letter-spacing: 0; }
.ev-venue { font-style: italic; margin-top: 4px; color: var(--ink-2); }
.lang-mr .ev-venue { font-style: normal; }
.ev a, .links a, .links button, .contacts a { color: var(--ink); }
.ev a { display: inline-block; margin-top: 6px; font-family: var(--f-head); font-size: .66rem; letter-spacing: 2px; text-decoration: none; border-bottom: 1px solid var(--gold); padding-bottom: 1px; }
.lang-mr .ev a { font-size: .88rem; letter-spacing: 0; }

.tline { max-width: 340px; margin: 10px auto 0; position: relative; text-align: left; }
.tline::before { content: ""; position: absolute; left: 50%; top: 10px; bottom: 10px; width: 1px; background: linear-gradient(transparent, var(--gold), transparent); }
.tl-row { display: grid; grid-template-columns: 1fr 24px 1fr; align-items: center; padding: 8px 0; }
.tl-time { text-align: right; padding-right: 8px; font-family: var(--f-head); font-size: .68rem; letter-spacing: 1.5px; color: var(--gold-d); white-space: nowrap; }
.lang-mr .tl-time { font-size: .86rem; letter-spacing: 0; }
.tl-dot { justify-self: center; width: 9px; height: 9px; transform: rotate(45deg); background: var(--ivory); border: 1px solid var(--gold); position: relative; }
.tl-title { padding-left: 8px; color: var(--ink); line-height: 1.35; }
.swatches { display: flex; justify-content: center; gap: 10px; margin-top: 10px; }
.swatches span { width: 22px; height: 22px; border-radius: 50%; box-shadow: 0 0 0 2px var(--ivory), 0 0 0 3px var(--gold); }

.inviters p { font-family: var(--f-head); font-size: .82rem; letter-spacing: 1.5px; color: var(--ink); line-height: 2; }
.lang-mr .inviters p { font-size: 1.05rem; letter-spacing: 0; line-height: 1.7; }
.family { font-style: italic; color: var(--ink-2); margin-top: 10px; }
.lang-mr .family { font-style: normal; }
.note { display: inline-block; margin-top: 14px; padding: 6px 18px; font-style: italic; color: var(--ink-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.lang-mr .note { font-style: normal; }
.kids { font-family: var(--f-name); margin-top: 14px; font-size: 1.7rem; line-height: 1.3; }
.lang-mr .kids { font-size: 1.15rem; }

.countdown { display: flex; justify-content: center; margin: 12px 0 6px; }
.countdown .u { display: flex; flex-direction: column; align-items: center; padding: 0 14px; }
.countdown .u + .u { border-left: 1px solid var(--line); }
.countdown b { font-family: var(--f-head); font-weight: 400; font-size: 2.2rem; line-height: 1.15; }
.countdown small { font-family: var(--f-head); font-size: .6rem; letter-spacing: 2px; color: var(--muted); }
.lang-mr .countdown small { font-size: .82rem; letter-spacing: 0; }
.cd-done { font-family: var(--f-name); font-size: 2.4rem; }
.std-date { font-family: var(--f-head); font-size: .9rem; letter-spacing: 2px; color: var(--ink); }
.lang-mr .std-date { font-size: 1.15rem; letter-spacing: 0; }
.links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 16px; }
.links a, .links button {
  font-family: var(--f-head); font-size: .66rem; letter-spacing: 2px; text-decoration: none; cursor: pointer;
  padding: 8px 16px; background: transparent; border: 1px solid var(--gold); border-radius: 2px;
  box-shadow: inset 0 0 0 2px var(--ivory), inset 0 0 0 3px rgba(181,143,62,.4); transition: background .3s ease;
}
.lang-mr .links a, .lang-mr .links button { font-size: .88rem; letter-spacing: 0; }
.links a:hover, .links button:hover { background: rgba(181,143,62,.12); }
.contacts { margin-top: 16px; font-size: .95em; color: var(--ink-2); }
.contacts a { text-decoration: none; border-bottom: 1px solid var(--gold); }
.regards { font-family: var(--f-name); margin-top: 16px; font-size: 2rem; }
.lang-mr .regards { font-size: 1.3rem; }

.toast { position: fixed; left: 50%; bottom: 18px; z-index: 130; transform: translate(-50%, 160%); opacity: 0; background: rgba(30,4,11,.92); color: var(--gold-l); border: 1px solid var(--gold-d); padding: 6px 18px; font-size: .9rem; white-space: nowrap; transition: all .4s ease; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

@keyframes foil { to { background-position: -220% 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes twinkle { 0%,100% { opacity: .25; } 50% { opacity: 1; } }
@keyframes water { from { transform: translateX(-8px); opacity: .4; } to { transform: translateX(8px); opacity: .7; } }
@keyframes breathe { 0%,100% { transform: scale(1); } 50% { transform: scale(1.04); } }
@keyframes crack { to { transform: scale(1.3) rotate(-8deg); opacity: 0; } }
@keyframes sweep { 0% { left: -60%; } 60%, 100% { left: 130%; } }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.25); } }

@media (max-width: 420px) {
  body { padding: 60px 10px 18px; }
  .slide { padding: 6px 28px 12px; }
  .card-top { padding: 104px 28px 0; }
  .card-crest { width: 190px; height: 66px; top: 30px; }
  .card-nav { margin: 0 28px 34px; }
  .countdown .u { padding: 0 10px; }
  .countdown b { font-size: 1.8rem; }
  .card.full .slide { padding: 16px 28px; }
  .corner { width: 56px; height: 56px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---- refinements ---- */
:root { --foil-dark: linear-gradient(100deg, #4f370c 0%, #7d5a1a 18%, #a8822f 32%, #c9a650 42%, #8a6420 54%, #5c4110 70%, #9a7428 86%, #6a4c14 100%); }
.gate-center { background: radial-gradient(closest-side, rgba(30,4,11,.94) 0%, rgba(30,4,11,.85) 55%, rgba(30,4,11,0) 100%); padding: 40px 34px 36px; width: min(380px, 94vw); }
/* =================== Richer royal details =================== */
/* Gate frame: sized like the doors so ornaments line up on every screen */
.gate-frame { position: absolute; top: 0; left: 50%; transform: translateX(-50%); height: 100%; aspect-ratio: 600 / 800; max-width: 100%; z-index: 3; pointer-events: none; transition: opacity 1s ease, transform 1.4s ease; }
.gate.opening .gate-frame { opacity: 0; transform: translateX(-50%) translateY(-6%); transition-delay: .3s; }
.jhalar { position: absolute; top: 0; left: 0; right: 0; height: 64px; }
.jhalar svg { width: 100%; height: 100%; display: block; }
.jh-drops { animation: jhsway 4s ease-in-out infinite; transform-origin: top center; transform-box: fill-box; }
.lantern { position: absolute; top: 34px; width: 46px; height: 154px; transform-origin: top center; animation: lsway 4.6s ease-in-out infinite; }
.lantern svg { width: 100%; height: 100%; display: block; overflow: visible; }
.lantern.l { left: 16%; } .lantern.r { right: 16%; animation-delay: -2.3s; }
.ln-glow { animation: lglow 2.2s ease-in-out infinite alternate; }
.ln-flame { animation: flicker 1s ease-in-out infinite alternate; transform-origin: 30px 126px; transform-box: view-box; }

/* Golden light through the door seam */
.seam { position: absolute; top: 0; bottom: 0; left: 50%; width: 4px; transform: translateX(-50%); z-index: 2;
  background: linear-gradient(transparent, rgba(255,236,190,.9) 20%, #fff6dc 50%, rgba(255,236,190,.9) 80%, transparent);
  box-shadow: 0 0 18px 6px rgba(255,214,140,.45), 0 0 60px 18px rgba(255,200,120,.2); animation: seam 2.6s ease-in-out infinite; }
.gate.opening .seam { animation: flood 1.6s ease forwards; }
.gate.opening .door { transition-delay: .45s; }

/* Seal cracks into two halves */
.seal { position: relative; }
.seal .half { position: absolute; inset: 0; transition: transform 1s cubic-bezier(.4,0,.2,1), opacity 1s ease; }
.seal .half.l { clip-path: polygon(0 0, 52% 0, 46% 35%, 54% 55%, 47% 100%, 0 100%); }
.seal .half.r { clip-path: polygon(52% 0, 100% 0, 100% 100%, 47% 100%, 54% 55%, 46% 35%); }
.gate.opening .seal { animation: none; }
.gate.opening .seal .half.l { transform: translate(-46px, 70px) rotate(-28deg); opacity: 0; }
.gate.opening .seal .half.r { transform: translate(46px, 70px) rotate(28deg); opacity: 0; }

/* Card: watermark, sheen, lotus foot */
.watermark { position: absolute; left: 50%; top: 54%; width: 380px; height: 380px; transform: translate(-50%, -50%); opacity: .06; pointer-events: none; z-index: 1; }
.watermark svg { width: 100%; height: 100%; display: block; animation: spin 160s linear infinite; }
.card { overflow: hidden; }
.card.full { overflow: visible; }
.sheen { position: absolute; inset: 0; z-index: 8; pointer-events: none; border-radius: inherit; overflow: hidden; }
.sheen::before { content: ""; position: absolute; top: -20%; bottom: -20%; left: -60%; width: 40%; transform: skewX(-18deg);
  background: linear-gradient(90deg, transparent, rgba(255,246,214,.55), rgba(233,207,134,.25), transparent); opacity: 0; }
.sheen.go::before { animation: cardsheen 1.6s ease-out; }
.card-foot { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); width: 96px; height: 48px; z-index: 7; pointer-events: none; opacity: .9; }
.card-foot svg { width: 100%; height: 100%; display: block; }
.ev-lotus { width: 52px; height: 26px; margin: 0 auto 4px; }
.ev-lotus svg { width: 100%; height: 100%; display: block; }

/* Embossed foil + pressed-ink lettering */
.foil-dark { filter: drop-shadow(0 1px 0 rgba(255,255,255,.85)) drop-shadow(0 1px 1.5px rgba(80,50,10,.28)); }
.foil-light { filter: drop-shadow(0 0 14px rgba(233,207,134,.35)); }
.slide .body, .slide .strong, .slide .paren, .slide .muted, .slide .kicker, .slide .ev-name { text-shadow: 0 1px 0 rgba(255,255,255,.75); }
.card { box-shadow: 0 0 0 1px var(--gold), 0 0 0 7px var(--ivory), 0 0 0 8px var(--line), inset 0 0 60px rgba(181,143,62,.12), 0 50px 100px rgba(0,0,0,.6); }

/* Palace scene motion */
.rs-lantern { animation: rise-lantern 22s linear infinite; }
.rs-diya { animation: bob 4.5s ease-in-out infinite; }

@keyframes jhsway { 0%,100% { transform: skewX(-1.5deg); } 50% { transform: skewX(1.5deg); } }
@keyframes lsway { 0%,100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
@keyframes lglow { from { opacity: .6; } to { opacity: 1; } }
@keyframes flicker { from { transform: scale(1, 1); opacity: .85; } to { transform: scale(.85, 1.12); opacity: 1; } }
@keyframes seam { 0%,100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes flood { 0% { width: 4px; opacity: 1; } 60% { width: 70%; opacity: .9; } 100% { width: 100%; opacity: 0; } }
@keyframes cardsheen { 0% { left: -60%; opacity: 0; } 15% { opacity: 1; } 100% { left: 130%; opacity: 0; } }
@keyframes rise-lantern { 0% { transform: translateY(0); opacity: 0; } 8% { opacity: 1; } 85% { opacity: .9; } 100% { transform: translateY(-760px); opacity: 0; } }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@media (max-width: 420px) { .lantern { width: 36px; height: 120px; top: 30px; } .lantern.l { left: 5%; } .lantern.r { right: 5%; } .watermark { width: 300px; height: 300px; } }
.card-foot { bottom: 0; width: 72px; height: 34px; }
.card-nav { margin-bottom: 44px; }
@media (max-width: 420px) { .card-nav { margin-bottom: 42px; } }

/* =================== Marathi royal elements =================== */
.door { background: #3a1d0f; }
.door::after { opacity: .5; }
.gate-glow { background: radial-gradient(ellipse 35% 70% at center, rgba(255,226,160,.9), rgba(255,170,80,.3) 45%, transparent 75%); }
.toran { position: absolute; top: 0; left: 0; right: 0; height: 74px; }
.toran svg { width: 100%; height: 100%; display: block; }
.tr-leaves { animation: jhsway 5s ease-in-out infinite; transform-origin: top center; transform-box: fill-box; }
.bell { position: absolute; top: 22px; width: 34px; height: 86px; transform-origin: top center; animation: lsway 3.4s ease-in-out infinite; }
.bell svg { width: 100%; height: 100%; display: block; }
.bell.l { left: 9%; } .bell.r { right: 9%; animation-delay: -1.7s; }
.samai { position: absolute; bottom: 2%; width: 74px; height: 164px; }
.samai svg { width: 100%; height: 100%; display: block; overflow: visible; }
.samai.l { left: 3%; } .samai.r { right: 3%; }
.rs-glow { animation: lglow 2.2s ease-in-out infinite alternate; }
.rs-flame { animation: flicker 1s ease-in-out infinite alternate; }
.rs-twinkle { animation: twinkle 2.4s ease-in-out infinite; }
.rs-flag { transform-box: fill-box; transform-origin: left center; animation: flag 2.6s ease-in-out infinite; }
/* Ganesh medallion: glows and rises instead of cracking */
.seal { width: 136px; height: 136px; }
.gate.opening .seal { animation: ganeshrise 1.2s ease forwards; }
.ganesh-medal { width: 110px; height: 128px; }
.ganesh-medal svg { animation: none; }
@keyframes flag { 0%,100% { transform: skewY(0) scaleX(1); } 50% { transform: skewY(-6deg) scaleX(.9); } }
@keyframes ganeshrise { 0% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(255,220,150,0)); } 50% { transform: scale(1.12); filter: drop-shadow(0 0 30px rgba(255,220,150,.9)); } 100% { transform: scale(1.2) translateY(-30px); opacity: 0; } }
@media (max-width: 420px) { .samai { width: 54px; height: 120px; } .bell { width: 26px; height: 66px; } }

/* =================== Simple door + royal framed card =================== */
.door { background: #4a0b18; }
.door::after { opacity: .35; }
.gate-center { background: radial-gradient(closest-side, rgba(40,4,12,.9) 0%, rgba(40,4,12,.75) 55%, rgba(40,4,12,0) 100%); }

:root {
  --ink: #4a0f1e; --ink-2: #6a2232; --muted: #7d4a52;
  --damask-gold: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90' viewBox='0 0 90 90'%3E%3Cg fill='none' stroke='%23b58f3e' stroke-opacity='.10' stroke-width='1'%3E%3Cpath d='M45 8 C56 22 56 34 45 45 C34 34 34 22 45 8Z M45 82 C56 68 56 56 45 45 C34 56 34 68 45 82Z M8 45 C22 34 34 34 45 45 C34 56 22 56 8 45Z M82 45 C68 34 56 34 45 45 C56 56 68 56 82 45Z'/%3E%3Ccircle cx='45' cy='45' r='3'/%3E%3Ccircle cx='0' cy='0' r='6'/%3E%3Ccircle cx='90' cy='0' r='6'/%3E%3Ccircle cx='0' cy='90' r='6'/%3E%3Ccircle cx='90' cy='90' r='6'/%3E%3C/g%3E%3C/svg%3E");
}
.card {
  border-radius: 4px;
  background-image: var(--paper), var(--damask-gold),
    radial-gradient(ellipse at 50% 0%, #fffdf6 0%, transparent 60%),
    radial-gradient(ellipse at 50% 100%, var(--ivory-2), transparent 70%);
  box-shadow:
    0 0 0 1px #b58f3e,
    0 0 0 12px #5c1020,
    0 0 0 13px #d9bb6e,
    0 0 0 17px #4a0b18,
    0 0 0 18px #9c7425,
    inset 0 0 70px rgba(181,143,62,.16),
    0 50px 110px rgba(0,0,0,.65);
  margin-top: 6px;
}
.frame-line { inset: 14px; border-radius: 2px; border: 1px solid rgba(181,143,62,.7);
  box-shadow: inset 0 0 0 4px var(--ivory), inset 0 0 0 5px rgba(181,143,62,.45); }
.corner { width: 78px; height: 78px; z-index: 4; }
.corner.tl { top: 8px; left: 8px; transform: none; }
.corner.tr { top: 8px; right: 8px; transform: scaleX(-1); }
.corner.bl { bottom: 8px; left: 8px; }
.corner.br { bottom: 8px; right: 8px; }
.card-crest { top: 26px; width: 230px; height: 80px; }
.card-top { padding-top: 112px; }
.card-foot { bottom: 12px; }
.sheen { border-radius: 4px; }

/* royal headings with flourishes */
.label { display: flex; align-items: center; justify-content: center; gap: 12px; color: #8a6420; }
.label::before, .label::after { content: ""; width: 38px; height: 1px; background: linear-gradient(90deg, transparent, #b58f3e); }
.label::after { transform: scaleX(-1); }
.h2 { margin-bottom: 0; }
.ev { background: rgba(255,252,244,.6); box-shadow: 0 6px 16px rgba(74,15,30,.06); }
.ev::before { border-color: rgba(181,143,62,.35); }
.btn-royal { border-color: #d9bb6e; }
body { padding-top: 70px; }
@media (max-width: 420px) {
  .corner { width: 62px; height: 62px; }
  .card { box-shadow: 0 0 0 1px #b58f3e, 0 0 0 8px #5c1020, 0 0 0 9px #d9bb6e, 0 0 0 12px #4a0b18, 0 0 0 13px #9c7425, inset 0 0 60px rgba(181,143,62,.16), 0 40px 90px rgba(0,0,0,.6); width: calc(100% - 20px); }
  .card-top { padding-top: 104px; }
}