/* Design canvas: 390 × 844 (Figma "Mobile" frames). Every screen is drawn on
   that canvas and scaled with --s (set in app.js) to COVER the viewport, so it
   fills any phone edge to edge; the overflow is trimmed evenly top/bottom or left/right. */
:root { --s: 1; --colw: 100vw; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overscroll-behavior: none; }
html { background: #f4ecdc; transition: background-color .8s ease; }
body {
  background: transparent;
  font-family: "Inria Serif", Georgia, serif;
  font-weight: 400;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
img { display: block; max-width: none; user-select: none; -webkit-user-drag: none; }
p { margin: 0; }

#shell {
  position: relative;
  width: var(--colw);
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background: #f4ecdc;
  box-shadow: 0 0 60px rgba(60, 50, 30, .18);
  touch-action: none;
}

/* ---------- screens: stacked, cross-faded in place ---------- */
#scroller { position: absolute; inset: 0; overflow: hidden; }

.screen {
  position: absolute; inset: 0;
  overflow: hidden;
  opacity: 0; visibility: hidden;
  scale: 1.025;
  transition: opacity .8s ease, scale 1.1s cubic-bezier(.2,.7,.2,1), visibility 0s linear .8s;
}
.screen.active {
  z-index: 1;
  opacity: 1; visibility: visible; scale: 1;
  transition: opacity .8s ease, scale 1.1s cubic-bezier(.2,.7,.2,1), visibility 0s;
}
.screen.paper { background: #f4ecdc url(img/paper.webp) center / cover; }

.stage {
  position: absolute;
  left: 50%; top: 50%;
  width: 390px; height: 844px;
  transform: translate(-50%, -50%) scale(var(--s));
  transform-origin: 50% 50%;
}

.layer { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }

/* ---------- primitives ---------- */
.abs { position: absolute; }
.clip { overflow: hidden; }
.cr { position: absolute; max-width: none; }
.stretch { object-fit: fill; }
.cover-fit { object-fit: cover; }
.masked { position: relative; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
.txt { text-align: center; word-break: break-word; white-space: normal; }
.grad {
  background: linear-gradient(to bottom, #f1592a, #ff9000);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.gold { color: #e8cc84; }
.gold-title {
  background: #e8cc84;
  -webkit-mask: url(img/shaadi-title-mask.png) no-repeat 0 0 / 146px 63px;
  mask: url(img/shaadi-title-mask.png) no-repeat 0 0 / 146px 63px;
}
.date-num { font-family: "Playfair Display", Georgia, serif; font-weight: 500;
            font-variant-numeric: lining-nums; letter-spacing: .5px; }
/* ---------- HOME: invitation + interactive medallion ---------- */
.screen .stage img { pointer-events: none; }
.invite p { margin: 0; }
.invite { text-shadow: 0 0 12px rgba(250, 247, 238, .9), 0 0 3px rgba(250, 247, 238, .8); }
.invite .names {
  font-family: "Great Vibes", "Snell Roundhand", cursive;
  font-size: 36px; line-height: 46px; color: #7a1128; margin: 2px 0 0;
}
.invite .names span { font-size: 30px; color: #b8893a; padding: 0 3px; }
.invite .dates {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 8px; font-size: 10px; letter-spacing: 1.8px; color: #9a7430;
}
.invite .dates i { display: block; width: 26px; height: 1px; background: linear-gradient(90deg, transparent, #c9a24f, transparent); }
#medallion { perspective: 700px; }
#medallion .tilt {
  position: absolute; inset: 0; cursor: pointer; pointer-events: auto;
  /* only the round medallion is tappable, not the transparent corners */
  clip-path: circle(36% at 50% 50%);
  transform: rotateX(var(--tx, 0deg)) rotateY(var(--ty, 0deg));
  transition: transform .5s cubic-bezier(.2,.7,.2,1);
  animation: float 6s ease-in-out infinite;
  outline: none;
}
#medallion .tilt.dragging { transition: transform .08s linear; }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -5px; } }
#medallion .sheen {
  background: linear-gradient(110deg, transparent 38%, rgba(255,248,215,.95) 50%, transparent 62%) no-repeat;
  background-size: 300% 100%;
  -webkit-mask: url(img/monogram.webp) center / 100% 100% no-repeat;
  mask: url(img/monogram.webp) center / 100% 100% no-repeat;
  mix-blend-mode: screen;
  animation: sheen 4.5s ease-in-out 1.5s infinite;
}
@keyframes sheen { 0% { background-position: 120% 0; } 45%, 100% { background-position: -20% 0; } }
/* Ganesha: rises out of the paper — small, soft and blurred → full size, with a halo */
.ganesha { opacity: 0; scale: .55; filter: blur(6px); transform-origin: 50% 60%; }
.screen.in .ganesha { animation: ganesha-in 1.6s cubic-bezier(.2,.75,.25,1) .15s forwards; }
@keyframes ganesha-in {
  0%   { opacity: 0;  scale: .55; filter: blur(6px) drop-shadow(0 0 0 rgba(232,196,106,0)); }
  55%  { opacity: 1;  filter: blur(0) drop-shadow(0 0 14px rgba(232,196,106,.85)); }
  100% { opacity: 1;  scale: 1;   filter: blur(0) drop-shadow(0 0 0 rgba(232,196,106,0)); }
}
.bell { pointer-events: auto; cursor: pointer; }
.burst { position: absolute; pointer-events: none; will-change: transform, opacity; }
.spark { width: 6px; height: 6px; border-radius: 50%;
  background: radial-gradient(circle, #fff6d0 0%, #e8c46a 45%, rgba(232,196,106,0) 70%); }

/* VENUE: "Get Directions" button — banner crimson with a gold rim */
.dirbtn {
  position: relative;
  display: inline-flex; align-items: center; gap: 7px;
  height: 38px; padding: 0 18px 0 15px;
  border-radius: 999px;
  font-size: 13px; letter-spacing: 1.2px; text-transform: uppercase; white-space: nowrap;
  text-decoration: none; color: #fff8cd;
  background: linear-gradient(180deg, #c0123f 0%, #a30327 55%, #860220 100%);
  border: 1px solid #e8c46a;
  box-shadow: 0 0 0 3px rgba(255, 248, 205, .75), 0 0 0 4px rgba(200, 160, 80, .55),
              0 8px 18px rgba(110, 10, 30, .35), inset 0 1px 0 rgba(255, 255, 255, .25);
  pointer-events: auto; cursor: pointer;
  overflow: hidden; isolation: isolate;
}
.dirbtn::after {      /* soft gold shimmer passing across */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, transparent 35%, rgba(255, 230, 160, .35) 50%, transparent 65%) no-repeat;
  background-size: 250% 100%;
  animation: btnsheen 3.8s ease-in-out 2s infinite;
}
@keyframes btnsheen { 0% { background-position: 130% 0; } 40%, 100% { background-position: -30% 0; } }
.dirbtn svg { flex: none; color: #f3d98f; }
.dirbtn .arr { margin-left: 1px; opacity: .85; }
.dirbtn:active { scale: .96; }

/* COUPLE: wine calligraphy + gold accents */
.couple-names p, .couple-names h2 { margin: 0; font-weight: 400; }
.couple-names .cn {
  font-family: "Great Vibes", "Snell Roundhand", cursive;
  font-size: 47px; line-height: 58px; padding: 0 8px;
  background: linear-gradient(180deg, #9a1735 0%, #7a1128 55%, #5a0b1c 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 1px 0 rgba(255, 250, 235, .8));
}
.couple-names .rel {
  margin-top: 2px;
  font-size: 10.5px; letter-spacing: 2.6px; text-transform: uppercase; color: #a37a2c;
}
.couple-names .par { margin-top: 3px; font-size: 14px; line-height: 20px; color: #2e2a24; }
.couple-names .amp {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  height: 46px; margin: 6px 0 -4px;
}
.couple-names .amp i { display: block; width: 74px; height: 1px;
  background: linear-gradient(90deg, transparent, #c9a24f 60%, #b8893a); position: relative; }
.couple-names .amp i:last-child { transform: scaleX(-1); }
.couple-names .amp i::after { content: ""; position: absolute; right: -3px; top: -2.5px; width: 5px; height: 5px;
  background: #c9a24f; rotate: 45deg; }
.couple-names .amp span {
  font-family: "Great Vibes", cursive; font-size: 40px; line-height: 46px; padding: 0 6px;
  background: linear-gradient(180deg, #b8862b, #e9c96b 45%, #a6761c 75%, #d4ad55);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- RSVP page ---------- */
.rsvp p, .rsvp h2, .rsvp h3 { margin: 0; font-weight: 400; }
.rsvp { text-shadow: 0 0 12px rgba(250, 247, 238, .9); }
.script {
  font-family: "Great Vibes", "Snell Roundhand", cursive;
  background: linear-gradient(180deg, #9a1735 0%, #7a1128 55%, #5a0b1c 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: none; padding: 0 10px;
}
.rsvp h2.script { font-size: 52px; line-height: 62px; }
.rsvp h3.script { font-size: 36px; line-height: 46px; margin-top: 26px; }
.rsvp .caps {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 10px; letter-spacing: 1.8px; color: #9a7430; margin-top: 2px;
}
.rsvp .caps i { display: block; width: 22px; height: 1px; background: linear-gradient(90deg, transparent, #c9a24f, transparent); }
.countdown { display: flex; justify-content: center; gap: 9px; margin-top: 18px; }
.countdown > div {
  width: 70px; height: 76px; border-radius: 14px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(180deg, rgba(255, 252, 243, .92), rgba(248, 238, 214, .92));
  border: 1px solid #d9b866;
  box-shadow: 0 0 0 3px rgba(255, 250, 235, .7), 0 6px 14px rgba(120, 80, 20, .14), inset 0 1px 0 #fff;
  text-shadow: none;
}
.countdown b {
  display: block; font-family: "Playfair Display", Georgia, serif; font-weight: 500;
  font-variant-numeric: lining-nums tabular-nums;
  font-size: 30px; line-height: 36px; color: #7a1128;
}
.countdown b.tick { animation: tick .45s cubic-bezier(.2,.7,.2,1); }
@keyframes tick { from { translate: 0 -6px; opacity: .2; } to { translate: 0 0; opacity: 1; } }
.countdown span { font-size: 9.5px; letter-spacing: 1.4px; text-transform: uppercase; color: #9a7430; margin-top: 2px; }
.rsvp .cd-note { margin-top: 10px; font-size: 13.5px; color: #4a5d3a; font-style: italic; }
.rsvp .lead { font-size: 14px; line-height: 20px; color: #3f5232; margin-top: 2px; }
.rsvp .actions { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 18px; }
button.dirbtn { font: inherit; font-size: 13px; letter-spacing: 1.2px; }
.ghostbtn {
  position: relative; display: inline-flex; align-items: center; gap: 7px;
  height: 36px; padding: 0 18px 0 15px; border-radius: 999px;
  font: inherit; font-size: 12.5px; letter-spacing: 1.2px; text-transform: uppercase; white-space: nowrap;
  color: #7a1128; cursor: pointer; pointer-events: auto;
  background: rgba(255, 250, 238, .6);
  border: 1px solid #c9a24f;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: 0 4px 12px rgba(120, 80, 20, .12);
  text-shadow: none;
}
.ghostbtn svg { color: #b8893a; }
.ghostbtn:active { scale: .96; }

/* ---------- RSVP bottom sheet ---------- */
.sheet { position: absolute; inset: 0; z-index: 60; }
.sheet[hidden] { display: block; visibility: hidden; pointer-events: none; }
.sheet-backdrop {
  position: absolute; inset: 0; background: rgba(45, 20, 12, .38);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  opacity: 0; transition: opacity .35s ease;
}
.sheet-panel {
  position: absolute; left: 0; right: 0; bottom: 0;
  max-height: 92%; overflow-y: auto; overscroll-behavior: contain;
  padding: 22px 20px calc(20px + env(safe-area-inset-bottom, 0px));
  border-radius: 24px 24px 0 0;
  background: #fbf6ea url(img/paper.webp) center / cover;
  border-top: 1px solid #d9b866;
  box-shadow: 0 -10px 40px rgba(60, 20, 10, .25);
  translate: 0 104%; transition: translate .45s cubic-bezier(.2,.8,.2,1);
  text-align: center; color: #2e2a24;
  touch-action: pan-y;
}
.sheet.open .sheet-backdrop { opacity: 1; }
.sheet.open .sheet-panel { translate: 0 0; }
.sheet-panel::before { content: ""; position: absolute; left: 50%; top: 8px; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: rgba(150, 110, 50, .35); }
.sheet-panel h2 { font-size: 40px; line-height: 50px; margin: 0; font-weight: 400; }
.sheet-sub { font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; color: #9a7430; margin: 0 0 12px; }
.sheet-x {
  position: absolute; right: 12px; top: 12px; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid rgba(201, 162, 79, .6); background: rgba(255, 250, 238, .8);
  font-size: 22px; line-height: 1; color: #7a1128; cursor: pointer;
}
.fld { display: block; text-align: left; margin-top: 12px; }
.fld > span { display: block; font-size: 11px; letter-spacing: 1.3px; text-transform: uppercase; color: #8a6a28; margin-bottom: 6px; }
.fld em { text-transform: none; letter-spacing: 0; font-style: italic; color: #a08a60; }
.fld input[type=text], .fld textarea {
  width: 100%; font: inherit; font-size: 16px; color: #2e2a24;
  padding: 10px 14px; border-radius: 12px;
  background: rgba(255, 253, 247, .9); border: 1px solid #dcc58c; outline: none;
  resize: none;
}
.fld input:focus, .fld textarea:focus { border-color: #a30327; box-shadow: 0 0 0 3px rgba(163, 3, 39, .12); }
.seg, .chips { display: flex; gap: 8px; }
.seg label, .chips label { flex: 1; position: relative; cursor: pointer; }
.seg input, .chips input { position: absolute; opacity: 0; pointer-events: none; }
.seg b, .chips b {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 42px; padding: 6px 8px; border-radius: 12px;
  font-weight: 400; font-size: 13.5px; line-height: 17px; color: #5a4a3a;
  background: rgba(255, 253, 247, .85); border: 1px solid #dcc58c;
  transition: background-color .25s, color .25s, border-color .25s;
}
.chips b small { font-size: 10.5px; color: inherit; opacity: .8; }
.seg input:checked + b, .chips input:checked + b {
  color: #fff8cd; border-color: #e8c46a;
  background: linear-gradient(180deg, #b30f3a, #860220);
}
.seg input:focus-visible + b, .chips input:focus-visible + b { outline: 2px solid #b8860b; outline-offset: 2px; }
.stepper { display: inline-flex; align-items: center; gap: 4px; border: 1px solid #dcc58c; border-radius: 999px; background: rgba(255, 253, 247, .9); padding: 3px; }
.stepper button { width: 36px; height: 36px; border-radius: 50%; border: 0; font-size: 20px; color: #7a1128; background: rgba(232, 196, 106, .25); cursor: pointer; }
.stepper output { min-width: 40px; text-align: center; font-family: "Playfair Display", Georgia, serif; font-size: 20px; color: #7a1128; }
.if-yes[hidden] { display: none; }
.err { min-height: 18px; margin: 8px 0 4px; font-size: 13px; color: #a30327; }
.dirbtn.wide { width: 100%; justify-content: center; height: 46px; font-size: 13.5px; }

#toast {
  position: absolute; left: 50%; bottom: calc(78px + env(safe-area-inset-bottom, 0px)); z-index: 70;
  translate: -50% 12px; opacity: 0; pointer-events: none;
  padding: 10px 18px; border-radius: 999px; white-space: nowrap;
  font-size: 13px; color: #fff8cd; background: rgba(90, 11, 28, .92);
  border: 1px solid #e8c46a; box-shadow: 0 8px 24px rgba(60, 10, 20, .3);
  transition: opacity .3s ease, translate .3s ease;
}
#toast.show { opacity: 1; translate: -50% 0; }

.maplink { display: block; pointer-events: auto; border-radius: 12px; }

/* ---------- entrance animations (played when a screen scrolls into view) ---------- */
.a {
  opacity: 0;
  transition: opacity .9s ease, translate 1.1s cubic-bezier(.2,.7,.2,1), scale 1.1s cubic-bezier(.2,.7,.2,1);
  transition-delay: var(--d, 0s);
}
.rise { translate: 0 var(--ry, 22px); }
.drop { translate: 0 -40px; }
.zoom { scale: .86; }
.screen.in .a { opacity: 1; translate: 0 0; scale: 1; }

/* ---------- ambient loops ---------- */
.swing { transform-origin: 50% 0; animation: swing var(--sd, 4s) ease-in-out infinite alternate; }
@keyframes swing { from { rotate: calc(var(--sw, 2deg) * -1); } to { rotate: var(--sw, 2deg); } }
.sway { animation: swing var(--sd, 5s) ease-in-out infinite alternate; }
.screen.in .drift { animation: drift var(--dd, 12s) ease-in-out 1.2s infinite alternate; }
@keyframes drift { from { translate: 0 0; } to { translate: var(--dx, 12px) 0; } }
.twinkle { animation: twinkle 3.2s ease-in-out infinite alternate; }
@keyframes twinkle { from { opacity: .75; } to { opacity: 1; } }
.ring { animation: ring 2.4s ease-in-out infinite; }
@keyframes ring { 50% { box-shadow: 0 0 0 3px rgba(163,3,39,.15); } }

/* ---------- intro: cover doors + seal ---------- */
#intro { z-index: 20; transition: opacity .9s ease; background: #f4ecdc; }
#intro.gone { opacity: 0; }
.door-paper { position: absolute; inset: 0; background: #f4ecdc; overflow: hidden; }
.door { transition: transform 1.7s cubic-bezier(.65,0,.25,1); will-change: transform;
        animation: breathe 8s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { scale: 1 1; } 50% { scale: 1.002 1; } }
#intro.open .door-l { transform: translateX(-205px); }
#intro.open .door-r { transform: translateX(205px); }

#petals { z-index: 30; }
#seal-layer { z-index: 35; transition: opacity .5s ease; }
#seal {
  pointer-events: auto; cursor: pointer;
  background: none; border: 0; padding: 0;
  border-radius: 50%;
  animation: pulse 2.4s ease-in-out infinite;
  transition: scale .45s ease, opacity .45s ease;
}
#seal:focus-visible { outline: 2px solid #b8860b; outline-offset: 4px; }
@keyframes pulse { 0%, 100% { scale: 1; } 50% { scale: 1.045; } }
#seal-layer.pressed #seal { animation: none; scale: .7; opacity: 0; }

/* ---------- falling petals ---------- */
.petal {
  position: absolute; top: -26px;
  animation: fall 9.9s linear infinite;
  animation-delay: var(--delay);
}
.petal > span { position: absolute; inset: 0; rotate: var(--r); }
.petal img { position: absolute; inset: 13.28% 13.53% 12.5% 15.55%; width: 70.92%; height: 74.22%; }
@keyframes fall {
  0%   { translate: 0 0; rotate: 0deg; opacity: .44; }
  3%   { opacity: .58; }
  50%  { translate: calc(var(--sx) * 1px) 450px; }
  96%  { opacity: .58; }
  100% { translate: calc(var(--sx) * .5px) 901px; rotate: calc(var(--rr) * 1deg); opacity: 0; }
}

/* ---------- navigation ---------- */
#nav-layer { z-index: 40; transition: opacity .7s ease, translate .7s ease; }
#nav-layer.hidden { opacity: 0; translate: 0 14px; }
#nav-layer.hidden #nav { pointer-events: none; }

#nav {
  --bar: rgba(250, 248, 240, .38); --border: rgba(255, 255, 255, .6);
  --active: #46543f; --text: #34402c; --text-active: #fff;
  position: absolute; left: 50%;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  width: min(calc(100% - 24px), 400px); height: 44px;
  transform: translateX(-50%);
  display: flex; align-items: stretch;
  padding: 4px;
  border-radius: 22px;
  background: var(--bar);
  border: 1px solid var(--border);
  -webkit-backdrop-filter: blur(14px) saturate(1.6);
  backdrop-filter: blur(14px) saturate(1.6);
  box-shadow: 0 8px 28px rgba(20, 20, 10, .16), inset 0 1px 0 rgba(255, 255, 255, .45);
  pointer-events: auto;
  transition: background-color .5s ease, border-color .5s ease;
}
#nav[data-theme="silver"] { --bar: rgba(14, 16, 20, .42); --border: rgba(255, 255, 255, .2); --active: #eef0f3; --text: #e9ebef; --text-active: #141518; }
#nav[data-theme="haldi"]  { --bar: rgba(255, 247, 222, .4); --border: rgba(231, 188, 63, .7); --active: #ab410c; --text: #5e300a; --text-active: #fff9e9; }
#nav[data-theme="shaadi"] { --bar: rgba(255, 245, 227, .38); --border: rgba(196, 154, 57, .7); --active: #971e2d; --text: #5e2716; --text-active: #fff5e3; }

#nav .pill {
  position: absolute; left: 4px; top: 4px;
  width: calc((100% - 8px) / 7); height: calc(100% - 8px);
  border-radius: 18px;
  background: var(--active);
  transform: translateX(calc(100% * var(--i, 0)));
  transition: transform .45s cubic-bezier(.3,.8,.3,1), background-color .5s ease;
}
#nav .tab {
  position: relative; z-index: 1;
  flex: 1 0 0; min-width: 1px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 18px;
  font-size: clamp(9px, calc(var(--colw) * .026), 11.5px); line-height: 16px; letter-spacing: .1px;
  white-space: nowrap; text-decoration: none;
  color: var(--text);
  transition: color .4s ease;
}
#nav .tab.active { color: var(--text-active); }
#nav .tab { text-shadow: 0 0 8px var(--bar); }
#nav .tab.active { text-shadow: none; }

/* swipe hint (home page, until the guest moves on) */
#hint {
  position: absolute; left: 50%; bottom: calc(70px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px;
  padding: 7px 14px 7px 12px; border-radius: 999px;
  font-size: 11.5px; letter-spacing: .4px; color: #34402c; white-space: nowrap;
  background: rgba(250, 248, 240, .45);
  border: 1px solid rgba(255, 255, 255, .6);
  -webkit-backdrop-filter: blur(12px) saturate(1.5); backdrop-filter: blur(12px) saturate(1.5);
  box-shadow: 0 6px 20px rgba(20, 20, 10, .14);
  transition: opacity .6s ease, translate .6s ease;
  animation: nudge 2.2s ease-in-out infinite;
}
#hint.off { opacity: 0; translate: 0 10px; animation: none; }
#hint .chev { width: 8px; height: 8px; border-left: 1.6px solid currentColor; border-top: 1.6px solid currentColor; rotate: 45deg; margin-top: 4px; }
@keyframes nudge { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, -5px); } }

/* ---------- music toggle ---------- */
#music {
  position: absolute;
  top: calc(12px + env(safe-area-inset-top, 0px)); right: 12px;
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  pointer-events: auto; cursor: pointer;
  background: rgba(255, 250, 238, .4);
  border: 1px solid rgba(255, 255, 255, .6);
  box-shadow: 0 2px 10px rgba(40, 30, 10, .18);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  color: #8a5a1c;
}
#nav-layer.hidden #music { pointer-events: none; }
#music .bars { display: flex; align-items: flex-end; gap: 2.5px; height: 14px; }
#music .bars i { display: block; width: 3px; height: 100%; border-radius: 2px; background: currentColor;
  transform-origin: 50% 100%; animation: eq 1s ease-in-out infinite alternate; }
#music .bars i:nth-child(2) { animation-duration: .7s; animation-delay: -.3s; }
#music .bars i:nth-child(3) { animation-duration: .9s; animation-delay: -.6s; }
#music .bars i:nth-child(4) { animation-duration: .6s; animation-delay: -.2s; }
@keyframes eq { from { scale: 1 .25; } to { scale: 1 1; } }
#music[aria-pressed="false"] .bars i { animation: none; scale: 1 .25; opacity: .6; }

@media (prefers-reduced-motion: reduce) {
  .petal, .swing, .sway, .drift, .twinkle, .ring, .door, #seal, #music .bars i, #medallion .tilt, #medallion .sheen, #hint, .dirbtn::after { animation: none !important; }
  .ganesha { opacity: 1 !important; scale: 1 !important; filter: none !important; }
  .a { transition-duration: .01s !important; transition-delay: 0s !important; }
  .screen, .screen.active { scale: 1; }
}
