:root {
  --bg-base: #13001f;
  --bg-deep: #260136;
  --ink: #fff8f3;
  --muted: #e2c9dc;
  --magenta: #ff2dc7;
  --violet: #a738ff;
  --gold: #ffcf4d;
  --aqua: #67f1ff;
  --card: rgba(35, 8, 58, 0.72);
  --line: rgba(255, 255, 255, 0.2);
  --font-2xs: clamp(0.78rem, 0.74rem + 0.16vw, 0.88rem);
  --font-xs: clamp(0.82rem, 0.79rem + 0.18vw, 0.9rem);
  --font-sm: clamp(0.9rem, 0.86rem + 0.22vw, 1rem);
  --font-md: clamp(0.98rem, 0.92rem + 0.32vw, 1.1rem);
  --font-lg: clamp(1.16rem, 1.04rem + 0.62vw, 1.42rem);
  --font-xl: clamp(1.34rem, 1.14rem + 1vw, 2rem);
  --line-tight: 1.2;
  --line-body: 1.55;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Sora", sans-serif;
  color: var(--ink);
}

html {
  font-size: clamp(16px, 0.95rem + 0.14vw, 18px);
}

html[dir="rtl"],
html[dir="rtl"] body {
  font-family: "Sora", "Noto Sans Arabic", "Tahoma", sans-serif;
}

body {
  background:
    radial-gradient(circle at 12% 5%, rgba(255, 45, 199, 0.3), transparent 36%),
    radial-gradient(circle at 92% 14%, rgba(103, 241, 255, 0.28), transparent 35%),
    radial-gradient(circle at 50% 82%, rgba(255, 207, 77, 0.25), transparent 45%),
    linear-gradient(150deg, var(--bg-base), var(--bg-deep));
  overflow-x: hidden;
  position: relative;
  line-height: var(--line-body);
}

.sparkle {
  position: fixed;
  inset: -20%;
  pointer-events: none;
  z-index: -1;
}

.sparkle-a {
  background-image:
    radial-gradient(circle, rgba(255, 227, 138, 0.85) 0 1.5px, transparent 2px),
    radial-gradient(circle, rgba(255, 94, 222, 0.8) 0 1.2px, transparent 2px),
    radial-gradient(circle, rgba(141, 119, 255, 0.8) 0 1.1px, transparent 2px),
    radial-gradient(circle, rgba(103, 241, 255, 0.72) 0 0.9px, transparent 1.6px);
  background-size: 90px 90px, 130px 130px, 160px 160px, 72px 72px;
  opacity: 0.58;
  animation: glitterDrift 30s linear infinite;
}

.sparkle-b {
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.65) 0 1.3px, transparent 2px),
    radial-gradient(circle, rgba(255, 211, 98, 0.75) 0 1px, transparent 2px),
    radial-gradient(circle, rgba(255, 107, 231, 0.56) 0 0.9px, transparent 1.7px);
  background-size: 120px 120px, 170px 170px, 88px 88px;
  opacity: 0.5;
  animation: glitterDriftReverse 22s linear infinite;
}

.sparkle-c {
  background:
    conic-gradient(
      from 40deg at 50% 50%,
      transparent,
      rgba(255, 255, 255, 0.15),
      transparent,
      rgba(255, 45, 199, 0.11),
      transparent
    );
  mix-blend-mode: screen;
  animation: haloPulse 8s ease-in-out infinite alternate;
}

.invite {
  width: min(1120px, 94vw);
  margin: 0 auto;
  padding: clamp(1.4rem, 4vw, 2.4rem) 0 3rem;
}

.lang-switch {
  margin: 0 0 0.9rem;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.45rem;
}

.lang-button {
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(19, 0, 31, 0.58);
  color: #fff;
  border-radius: 999px;
  padding: 0.32rem 0.7rem;
  font-family: "Bungee", sans-serif;
  font-size: var(--font-2xs);
  letter-spacing: 0.06em;
  cursor: pointer;
  box-shadow:
    0 0 8px rgba(255, 107, 231, 0.22),
    0 0 14px rgba(103, 241, 255, 0.16);
  transition: transform 140ms ease, filter 140ms ease, box-shadow 180ms ease;
}

.lang-button:hover {
  transform: translateY(-1px);
  filter: saturate(1.08);
}

.lang-button.is-active {
  color: #180024;
  background: linear-gradient(92deg, var(--gold), #ff6be7, var(--aqua));
  border-color: rgba(255, 255, 255, 0.8);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.5) inset,
    0 0 16px rgba(255, 107, 231, 0.34),
    0 0 20px rgba(103, 241, 255, 0.26);
}

.mobile-gif {
  display: none;
}

.mobile-gif img {
  width: 100%;
  border-radius: 22px;
  border: 3px solid rgba(255, 255, 255, 0.75);
  box-shadow:
    0 0 0 3px rgba(255, 45, 199, 0.55),
    0 18px 48px rgba(0, 0, 0, 0.46);
}

.hero-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
  gap: 1rem;
  align-items: stretch;
}

.hero,
.event-description,
.countdown-shell,
.rsvp-shell {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.hero::before,
.event-description::before,
.countdown-shell::before,
.rsvp-shell::before {
  content: "";
  position: absolute;
  inset: -35% auto auto -28%;
  width: 60%;
  height: 220%;
  transform: rotate(23deg);
  background: linear-gradient(
    180deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: shineMove 8s linear infinite;
  pointer-events: none;
}

.hero {
  padding: clamp(1.6rem, 5vw, 2.8rem);
  padding-bottom: clamp(4.2rem, 8vw, 5rem);
}

.desktop-gif {
  margin: 0;
  border-radius: 24px;
  border: 2px solid rgba(255, 255, 255, 0.58);
  overflow: hidden;
  position: relative;
  transform: rotate(0deg);
  box-shadow:
    0 0 0 4px rgba(255, 45, 199, 0.38),
    0 26px 70px rgba(0, 0, 0, 0.45);
}

.desktop-gif img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 430px;
  object-fit: cover;
}

.micro {
  margin: 0;
  font-size: var(--font-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}

h1 {
  margin: 0.65rem 0 0;
  font-family: "Bungee", sans-serif;
  font-size: clamp(2rem, 11vw, 5rem);
  line-height: 0.95;
  text-transform: uppercase;
  color: #fff;
  text-shadow:
    0 0 8px rgba(255, 45, 199, 0.55),
    0 0 16px rgba(167, 56, 255, 0.6),
    0 0 34px rgba(255, 207, 77, 0.45);
}

.hero-intro {
  margin: 0.8rem 0 0;
  color: var(--muted);
  font-size: var(--font-md);
  line-height: var(--line-body);
  max-width: 62ch;
}

.hero-signature,
.names {
  margin: 0.18rem 0 0;
  font-size: var(--font-lg);
  font-weight: 800;
  color: var(--aqua);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  line-height: 1.02;
}

.event-meta {
  margin: 0.95rem 0 0;
  color: var(--muted);
  font-size: clamp(0.95rem, 2.5vw, 1.1rem);
}

.hero-more {
  margin: 0.9rem 0 2.45rem;
}

.payoff-cta {
  position: absolute;
  right: clamp(0.9rem, 2vw, 1.25rem);
  bottom: clamp(0.85rem, 2vw, 1.1rem);
  text-decoration: none;
  color: #170025;
  background: linear-gradient(92deg, var(--gold), #ff6be7, var(--aqua));
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  padding: 0.78rem 1.28rem;
  font-family: "Bungee", sans-serif;
  font-size: var(--font-sm);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.24) inset,
    0 0 30px rgba(255, 107, 231, 0.62),
    0 0 38px rgba(103, 241, 255, 0.46);
  transition: transform 170ms ease, filter 170ms ease;
}

.payoff-cta:hover {
  transform: translateY(-2px) scale(1.03);
  filter: brightness(1.06) saturate(1.08);
}

.event-description,
.rsvp-shell {
  margin-top: 1rem;
  padding: clamp(1.2rem, 4vw, 1.8rem);
}

.countdown-stage {
  margin-top: 1rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.42fr);
  align-items: stretch;
}

.countdown-shell {
  margin-top: 0;
  padding: clamp(1.1rem, 3vw, 1.5rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  height: 100%;
  min-height: clamp(250px, 30vw, 340px);
}

.countdown-photo-shell {
  margin-top: 0;
  padding: 0;
  background: transparent;
  border: 0;
  backdrop-filter: none;
  border-radius: 0;
  overflow: visible;
  display: flex;
}

.description-lead {
  margin: 0.8rem 0 0;
  color: var(--muted);
  font-size: var(--font-md);
  line-height: var(--line-body);
  max-width: 72ch;
}

.event-storyboard {
  --story-progress: 0;
  margin-top: 1rem;
  position: relative;
}

.event-storyboard-sticky {
  position: sticky;
  top: clamp(2.4rem, 6vh, 3.8rem);
  padding: 0;
}

.event-photo-stage {
  --story-progress: 0;
  --sun-phase: 0;
  --moon-phase: 0;
  --stars-phase: 0;
  --night-phase: 0;
  position: relative;
  z-index: 0;
  isolation: isolate;
  min-height: clamp(420px, 78svh, 700px);
  aspect-ratio: 16 / 10;
  border-radius: 18px;
  overflow: hidden;
  clip-path: inset(0 round 18px);
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  -webkit-mask-repeat: no-repeat;
  border: 1px solid rgba(255, 255, 255, 0.34);
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.12) inset,
    0 16px 38px rgba(0, 0, 0, 0.34);
  transition: border-color 220ms ease, box-shadow 220ms ease;
}

.event-photo-background {
  position: absolute;
  inset: -0.5px;
  z-index: 0;
  width: calc(100% + 1px);
  height: calc(100% + 1px);
  max-width: none;
  object-fit: cover;
  object-position: center center;
  transform: scale(1);
  border-radius: inherit;
  filter:
    saturate(calc(1.14 + (1 - var(--night-phase)) * 0.24))
    contrast(calc(1.16 + var(--night-phase) * 0.42))
    brightness(calc(0.9 - var(--night-phase) * 0.56))
    hue-rotate(calc(-12deg + var(--night-phase) * 30deg));
  transition: filter 260ms linear;
}

@media (min-width: 821px) {
  .event-photo-stage {
    aspect-ratio: 1600 / 1062;
    clip-path: none;
    -webkit-mask-image: none;
    -webkit-mask-repeat: initial;
  }

  .event-photo-background {
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-position: center 52%;
  }

  .practical-grid .info-card-summary {
    pointer-events: none;
  }

  .practical-grid .info-card .info-card-body {
    display: block !important;
  }
}

.event-photo-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 52% 92%, rgba(255, 106, 70, 0.52), transparent 50%),
    radial-gradient(circle at 78% 10%, rgba(133, 228, 255, 0.24), transparent 46%),
    radial-gradient(circle at 24% 8%, rgba(252, 161, 255, 0.18), transparent 44%),
    linear-gradient(
      180deg,
      rgba(14, 28, 66, 0.08) 0%,
      rgba(12, 24, 60, 0.16) 32%,
      rgba(26, 9, 54, 0.34) 62%,
      rgba(12, 4, 30, 0.74) 100%
    );
  opacity: clamp(0.44, calc(0.52 + var(--night-phase) * 0.68), 1);
  transition: opacity 260ms linear;
  pointer-events: none;
  border-radius: inherit;
}

.event-sky-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
  border-radius: inherit;
}

.event-sky-overlay::before,
.event-sky-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
}

.event-sky-overlay::before {
  background:
    linear-gradient(
      180deg,
      rgba(253, 222, 117, 0.46) 0%,
      rgba(255, 154, 118, 0.4) 28%,
      rgba(255, 74, 153, 0.3) 56%,
      rgba(115, 78, 189, 0.16) 100%
    );
  opacity: clamp(0, calc(1 - var(--night-phase) * 1.4), 1);
  transition: opacity 220ms linear;
}

.event-sky-overlay::after {
  background:
    linear-gradient(
      180deg,
      rgba(8, 21, 66, 0.28) 0%,
      rgba(10, 16, 58, 0.46) 34%,
      rgba(20, 9, 58, 0.64) 70%,
      rgba(13, 6, 40, 0.8) 100%
    );
  opacity: clamp(0, calc((var(--night-phase) - 0.02) * 1.5), 1);
  transition: opacity 220ms linear;
}

.event-sun,
.event-moon {
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.event-sun {
  width: clamp(124px, 13.8vw, 176px);
  aspect-ratio: 1;
  left: calc(13% + var(--sun-phase) * 44%);
  top: calc(-16% + var(--sun-phase) * 74%);
  transform:
    translate(-50%, -50%)
    scale(calc(1 - var(--sun-phase) * 0.16))
    rotate(calc(-3deg + var(--sun-phase) * 10deg));
  opacity: clamp(0, calc(1 - var(--sun-phase) * 1.66), 1);
  border: 2px solid rgba(255, 243, 190, 0.98);
  background:
    radial-gradient(
      circle at 34% 30%,
      rgba(255, 255, 242, 0.98) 0 24%,
      rgba(255, 246, 199, 0.96) 38%,
      rgba(255, 228, 136, 0.94) 58%,
      rgba(255, 197, 89, 0.8) 78%,
      rgba(255, 183, 72, 0.42) 100%
    );
  box-shadow:
    0 0 24px rgba(255, 220, 132, 0.92),
    0 0 56px rgba(255, 197, 89, 0.76),
    0 0 94px rgba(255, 184, 80, 0.54);
  transition:
    left 200ms linear,
    top 200ms linear,
    opacity 200ms linear,
    transform 200ms linear;
}

.event-sun::before,
.event-sun::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.event-sun::before {
  inset: 8%;
  background:
    radial-gradient(
      circle at 30% 30%,
      rgba(255, 255, 244, 0.9) 0 28%,
      rgba(255, 246, 200, 0.8) 42%,
      rgba(255, 228, 138, 0.54) 58%,
      transparent 76%
    );
  opacity: calc(0.98 - var(--sun-phase) * 0.52);
}

.event-sun::after {
  inset: -18%;
  border: 2px solid rgba(255, 232, 155, 0.74);
  opacity: calc(0.92 - var(--sun-phase) * 0.56);
  box-shadow:
    0 0 14px rgba(255, 224, 136, 0.62),
    0 0 34px rgba(255, 205, 98, 0.44);
}

.event-moon {
  width: clamp(54px, 6.2vw, 78px);
  aspect-ratio: 1;
  left: calc(78% - var(--moon-phase) * 28%);
  top: calc(92% - var(--moon-phase) * 70%);
  transform: translate(-50%, -50%);
  opacity: clamp(0, calc((var(--moon-phase) - 0.04) * 1.34), 1);
  background:
    radial-gradient(circle at 32% 30%, rgba(255, 255, 255, 0.86) 0 40%, rgba(228, 240, 255, 0.8) 62%, rgba(187, 207, 235, 0.66) 100%);
  box-shadow:
    0 0 22px rgba(214, 235, 255, 0.48),
    0 0 38px rgba(164, 197, 255, 0.34);
  transition:
    left 220ms linear,
    top 220ms linear,
    opacity 220ms linear;
}

.event-moon::after {
  content: "";
  position: absolute;
  inset: 7%;
  border-radius: inherit;
  background: rgba(18, 11, 42, 0.92);
  transform: translateX(32%);
}

.event-stars {
  position: absolute;
  inset: 0;
  opacity: clamp(0, calc(var(--stars-phase) * 1.58), 1);
  transition: opacity 220ms linear;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 19%, rgba(255, 255, 255, 0.92) 0 0.32%, transparent 0.44%),
    radial-gradient(circle at 22% 8%, rgba(166, 224, 255, 0.9) 0 0.28%, transparent 0.4%),
    radial-gradient(circle at 34% 24%, rgba(255, 237, 191, 0.9) 0 0.31%, transparent 0.43%),
    radial-gradient(circle at 46% 12%, rgba(244, 251, 255, 0.9) 0 0.27%, transparent 0.38%),
    radial-gradient(circle at 58% 20%, rgba(186, 226, 255, 0.9) 0 0.31%, transparent 0.42%),
    radial-gradient(circle at 72% 14%, rgba(255, 255, 255, 0.92) 0 0.28%, transparent 0.39%),
    radial-gradient(circle at 84% 23%, rgba(251, 247, 219, 0.88) 0 0.32%, transparent 0.45%),
    radial-gradient(circle at 18% 36%, rgba(255, 255, 255, 0.88) 0 0.25%, transparent 0.36%),
    radial-gradient(circle at 39% 40%, rgba(176, 217, 255, 0.88) 0 0.29%, transparent 0.4%),
    radial-gradient(circle at 64% 34%, rgba(255, 247, 204, 0.86) 0 0.27%, transparent 0.38%),
    radial-gradient(circle at 77% 44%, rgba(255, 255, 255, 0.88) 0 0.24%, transparent 0.35%),
    radial-gradient(circle at 89% 33%, rgba(179, 220, 255, 0.88) 0 0.27%, transparent 0.38%),
    radial-gradient(circle at 8% 42%, rgba(255, 255, 255, 0.84) 0 0.23%, transparent 0.34%),
    radial-gradient(circle at 27% 52%, rgba(185, 225, 255, 0.84) 0 0.23%, transparent 0.34%),
    radial-gradient(circle at 53% 47%, rgba(255, 245, 214, 0.8) 0 0.21%, transparent 0.33%),
    radial-gradient(circle at 71% 41%, rgba(255, 255, 255, 0.82) 0 0.22%, transparent 0.33%),
    radial-gradient(circle at 88% 52%, rgba(180, 221, 255, 0.84) 0 0.22%, transparent 0.33%),
    radial-gradient(circle at 15% 61%, rgba(255, 247, 210, 0.78) 0 0.2%, transparent 0.3%),
    radial-gradient(circle at 35% 68%, rgba(255, 255, 255, 0.82) 0 0.2%, transparent 0.31%),
    radial-gradient(circle at 62% 63%, rgba(179, 221, 255, 0.84) 0 0.2%, transparent 0.31%),
    radial-gradient(circle at 79% 70%, rgba(255, 250, 224, 0.78) 0 0.2%, transparent 0.31%),
    radial-gradient(circle at 92% 63%, rgba(255, 255, 255, 0.8) 0 0.19%, transparent 0.3%),
    radial-gradient(circle at 6% 76%, rgba(255, 255, 255, 0.82) 0 0.19%, transparent 0.29%),
    radial-gradient(circle at 20% 82%, rgba(186, 227, 255, 0.82) 0 0.19%, transparent 0.29%),
    radial-gradient(circle at 41% 79%, rgba(255, 250, 224, 0.8) 0 0.19%, transparent 0.29%),
    radial-gradient(circle at 58% 84%, rgba(255, 255, 255, 0.8) 0 0.18%, transparent 0.28%),
    radial-gradient(circle at 74% 80%, rgba(191, 229, 255, 0.82) 0 0.19%, transparent 0.29%),
    radial-gradient(circle at 89% 85%, rgba(255, 249, 220, 0.8) 0 0.18%, transparent 0.28%);
  filter:
    brightness(1.14)
    drop-shadow(0 0 10px rgba(197, 230, 255, 0.45))
    drop-shadow(0 0 22px rgba(131, 220, 255, 0.34));
  animation: eventStarPulseA 2.6s ease-in-out infinite alternate;
}

.event-stars::before,
.event-stars::after {
  content: "";
  position: absolute;
  inset: 0;
}

.event-stars::before {
  background:
    radial-gradient(circle at 6% 14%, rgba(255, 255, 255, 0.76) 0 0.17%, transparent 0.3%),
    radial-gradient(circle at 16% 9%, rgba(189, 227, 255, 0.72) 0 0.17%, transparent 0.3%),
    radial-gradient(circle at 26% 18%, rgba(255, 248, 220, 0.72) 0 0.17%, transparent 0.3%),
    radial-gradient(circle at 33% 11%, rgba(255, 255, 255, 0.72) 0 0.17%, transparent 0.3%),
    radial-gradient(circle at 41% 21%, rgba(184, 221, 255, 0.72) 0 0.17%, transparent 0.3%),
    radial-gradient(circle at 49% 9%, rgba(255, 251, 227, 0.72) 0 0.17%, transparent 0.3%),
    radial-gradient(circle at 57% 17%, rgba(255, 255, 255, 0.72) 0 0.17%, transparent 0.3%),
    radial-gradient(circle at 66% 8%, rgba(189, 227, 255, 0.72) 0 0.17%, transparent 0.3%),
    radial-gradient(circle at 75% 20%, rgba(255, 248, 220, 0.72) 0 0.17%, transparent 0.3%),
    radial-gradient(circle at 85% 11%, rgba(255, 255, 255, 0.72) 0 0.17%, transparent 0.3%),
    radial-gradient(circle at 94% 19%, rgba(185, 223, 255, 0.72) 0 0.17%, transparent 0.3%),
    radial-gradient(circle at 10% 30%, rgba(255, 255, 255, 0.68) 0 0.16%, transparent 0.28%),
    radial-gradient(circle at 23% 36%, rgba(190, 228, 255, 0.68) 0 0.16%, transparent 0.28%),
    radial-gradient(circle at 37% 31%, rgba(255, 249, 223, 0.68) 0 0.16%, transparent 0.28%),
    radial-gradient(circle at 52% 37%, rgba(255, 255, 255, 0.68) 0 0.16%, transparent 0.28%),
    radial-gradient(circle at 68% 32%, rgba(187, 226, 255, 0.68) 0 0.16%, transparent 0.28%),
    radial-gradient(circle at 82% 38%, rgba(255, 249, 223, 0.68) 0 0.16%, transparent 0.28%),
    radial-gradient(circle at 92% 30%, rgba(255, 255, 255, 0.68) 0 0.16%, transparent 0.28%);
  opacity: 0.84;
  animation: eventStarPulseB 3.4s ease-in-out infinite alternate-reverse;
}

.event-stars::after {
  background:
    radial-gradient(circle at 18% 24%, rgba(255, 102, 207, 0.46) 0 0.12%, transparent 0.2%),
    radial-gradient(circle at 43% 27%, rgba(106, 242, 255, 0.46) 0 0.12%, transparent 0.2%),
    radial-gradient(circle at 61% 22%, rgba(255, 217, 113, 0.44) 0 0.12%, transparent 0.2%),
    radial-gradient(circle at 73% 28%, rgba(163, 121, 255, 0.44) 0 0.12%, transparent 0.2%),
    radial-gradient(circle at 31% 43%, rgba(106, 242, 255, 0.4) 0 0.11%, transparent 0.18%),
    radial-gradient(circle at 57% 47%, rgba(255, 217, 113, 0.4) 0 0.11%, transparent 0.18%),
    radial-gradient(circle at 79% 44%, rgba(255, 102, 207, 0.4) 0 0.11%, transparent 0.18%),
    radial-gradient(circle at 12% 72%, rgba(106, 242, 255, 0.44) 0 0.11%, transparent 0.19%),
    radial-gradient(circle at 36% 77%, rgba(255, 102, 207, 0.42) 0 0.11%, transparent 0.19%),
    radial-gradient(circle at 64% 73%, rgba(255, 217, 113, 0.42) 0 0.11%, transparent 0.19%),
    radial-gradient(circle at 86% 76%, rgba(163, 121, 255, 0.42) 0 0.11%, transparent 0.19%);
  mix-blend-mode: screen;
  opacity: clamp(0, calc((var(--night-phase) - 0.06) * 1.7), 0.88);
  animation: eventStarPulseC 2.1s ease-in-out infinite alternate;
}

.event-night-dance {
  position: absolute;
  inset: -18%;
  pointer-events: none;
  opacity: clamp(0, calc((var(--night-phase) - 0.16) * 1.36), 0.96);
  mix-blend-mode: screen;
  background:
    radial-gradient(circle at 16% 72%, rgba(255, 61, 216, 0.3), transparent 42%),
    radial-gradient(circle at 84% 66%, rgba(87, 255, 241, 0.28), transparent 44%),
    radial-gradient(circle at 58% 28%, rgba(255, 199, 87, 0.22), transparent 38%),
    conic-gradient(
      from calc(95deg + var(--story-progress) * 220deg) at 54% 58%,
      rgba(255, 74, 188, 0.24) 0deg,
      rgba(103, 241, 255, 0.22) 72deg,
      rgba(255, 207, 77, 0.18) 138deg,
      rgba(142, 111, 255, 0.2) 214deg,
      rgba(255, 74, 188, 0.24) 360deg
    );
  transform:
    translate3d(
      calc((var(--story-progress) - 0.5) * 24%),
      calc((0.5 - var(--story-progress)) * 12%),
      0
    )
    scale(calc(1.08 + var(--night-phase) * 0.06));
  filter:
    blur(2px)
    saturate(calc(1.05 + var(--night-phase) * 0.54));
  animation:
    eventNightDance 7.6s linear infinite,
    eventNightPulse 2.6s ease-in-out infinite alternate;
}

.event-photo-stage.is-night-final {
  border-color: rgba(255, 255, 255, 0.62);
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.18) inset,
    0 0 34px rgba(255, 107, 231, 0.46),
    0 0 42px rgba(103, 241, 255, 0.38),
    0 16px 38px rgba(0, 0, 0, 0.42);
}

.event-photo-stage.is-night-final .event-night-dance {
  opacity: 0.96;
}

.event-photo-stage.is-night-final .event-stars {
  opacity: 1;
}

.event-photo-stage.is-night-final .event-photo-background {
  filter: saturate(1.04) contrast(1.62) brightness(0.34) hue-rotate(28deg);
}

.event-photo-stage.is-night-final .event-sun {
  opacity: 0;
}

.event-photo-stage.is-night-final .event-sky-overlay::after {
  opacity: 1;
}

.event-moment {
  --moment-visibility: 0;
  --moment-icon-visibility: 0;
  --moment-text-visibility: 0;
  --moment-float: 0px;
  --moment-sway: 0deg;
  --moment-delay: 0s;
  --icon-x: 10%;
  --icon-y: 10%;
  --icon-w: 20%;
  --text-x: 25%;
  --text-y: 20%;
  --text-w: 20%;
  --text-h: 14%;
  position: absolute;
  inset: 0;
  color: #fff;
  pointer-events: none;
  z-index: 4;
}

.event-moment.is-current {
  z-index: 5;
}

.event-moment-media {
  position: absolute;
  left: var(--icon-x);
  top: var(--icon-y);
  width: var(--icon-w);
  max-width: none;
  opacity: calc(0.02 + var(--moment-icon-visibility) * 0.98);
  transform:
    translateY(calc((1 - var(--moment-icon-visibility)) * 24px))
    scale(calc(0.9 + var(--moment-icon-visibility) * 0.1))
    rotate(var(--moment-sway));
  filter:
    saturate(calc(0.82 + var(--moment-icon-visibility) * 0.22))
    brightness(calc(0.8 + var(--moment-icon-visibility) * 0.24));
  transition:
    opacity 190ms linear,
    transform 220ms ease,
    filter 220ms ease;
  margin: 0;
}

.event-moment-media::before {
  content: "";
  position: absolute;
  inset: auto 18% -14% 18%;
  height: 24%;
  border-radius: 999px;
  background: radial-gradient(ellipse at center, rgba(8, 5, 20, 0.74), transparent 76%);
  filter: blur(10px);
  z-index: 0;
  opacity: 0.72;
}

.event-moment-media img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  mix-blend-mode: screen;
  opacity: 0.98;
  filter:
    drop-shadow(0 0 3px rgba(255, 255, 255, 0.6))
    drop-shadow(0 0 16px rgba(103, 241, 255, 0.42))
    drop-shadow(0 12px 24px rgba(5, 3, 20, 0.36));
  animation: eventMomentDrift 7.4s ease-in-out infinite;
  animation-delay: var(--moment-delay);
}

.event-moment-copy {
  position: absolute;
  left: var(--text-x);
  top: var(--text-y);
  width: var(--text-w);
  min-height: var(--text-h);
  max-width: none;
  padding: 0.58rem 0.76rem 0.7rem;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background:
    linear-gradient(
      135deg,
      rgba(12, 9, 34, 0.72),
      rgba(28, 16, 54, 0.5)
    );
  backdrop-filter: blur(7px) saturate(1.18);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 12px 28px rgba(8, 4, 24, 0.34);
  opacity: calc(0.02 + var(--moment-text-visibility) * 0.98);
  transform:
    translateY(calc((1 - var(--moment-text-visibility)) * 22px))
    scale(calc(0.94 + var(--moment-text-visibility) * 0.06));
  filter:
    saturate(calc(0.84 + var(--moment-text-visibility) * 0.2))
    brightness(calc(0.84 + var(--moment-text-visibility) * 0.24));
  transition:
    opacity 190ms linear,
    transform 220ms ease,
    filter 220ms ease;
}

.event-moment-copy::before {
  content: "";
  position: absolute;
  top: 1.05rem;
  left: -3rem;
  width: clamp(44px, 7vw, 78px);
  height: 2px;
  background: linear-gradient(90deg, rgba(125, 234, 255, 0.68), transparent 85%);
  transform: rotate(-8deg);
  border-radius: 999px;
  opacity: 0.9;
}

.event-moment h3 {
  margin: 0;
  font-size: clamp(0.84rem, 0.98vw, 1rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--gold) 90%, #fff 10%);
  text-shadow:
    0 1px 1px rgba(0, 0, 0, 0.5),
    0 0 10px rgba(255, 224, 160, 0.36);
}

.event-moment p {
  margin: 0.5rem 0 0;
  font-size: clamp(0.79rem, 0.92vw, 0.93rem);
  line-height: 1.38;
  color: color-mix(in srgb, #ffffff 92%, var(--aqua) 8%);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.48);
}

.moment-aperitivo {
  --moment-float: -2px;
  --moment-sway: -1.2deg;
  --moment-delay: -1s;
  --icon-x: 6.44%;
  --icon-y: 18.35%;
  --icon-w: 12.69%;
  --text-x: 18.81%;
  --text-y: 18.44%;
  --text-w: 18.4%;
  --text-h: 14.2%;
}

.moment-cena {
  --moment-float: 1px;
  --moment-sway: -0.4deg;
  --moment-delay: -3.5s;
  --icon-x: 76.22%;
  --icon-y: 67.88%;
  --icon-w: 18.94%;
  --text-x: 56.18%;
  --text-y: 80.07%;
  --text-w: 20.6%;
  --text-h: 12.8%;
}

.moment-musica {
  --moment-float: -1px;
  --moment-sway: 1.2deg;
  --moment-delay: -2.6s;
  --icon-x: 43.67%;
  --icon-y: 36.49%;
  --icon-w: 24.4%;
  --text-x: 66.89%;
  --text-y: 25.46%;
  --text-w: 21.41%;
  --text-h: 15.34%;
}

.moment-chill {
  --moment-float: 0px;
  --moment-sway: 0.7deg;
  --moment-delay: -5.1s;
  --icon-x: 5.23%;
  --icon-y: 67.11%;
  --icon-w: 12.85%;
  --text-x: 18.45%;
  --text-y: 71.05%;
  --text-w: 23.2%;
  --text-h: 14.6%;
}

.moment-cena .event-moment-copy::before {
  left: auto;
  right: -3rem;
  transform: rotate(8deg);
  background: linear-gradient(270deg, rgba(125, 234, 255, 0.68), transparent 85%);
}

.event-mobile-immersive {
  display: none;
}

@keyframes eventMomentDrift {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-6px) scale(1.012);
  }
}

.description-signature {
  margin: 0.95rem 0 0;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.practical-info {
  margin-top: 1rem;
  padding: clamp(1.2rem, 4vw, 1.8rem);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.practical-info::before {
  content: "";
  position: absolute;
  inset: -35% auto auto -28%;
  width: 60%;
  height: 220%;
  transform: rotate(23deg);
  background: linear-gradient(
    180deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: shineMove 8s linear infinite;
  pointer-events: none;
}

.practical-grid {
  margin-top: 1rem;
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  grid-template-areas:
    "location schedule"
    "food dress"
    "parking rides"
    "parking outside";
}

.practical-grid .info-card {
  border: 1px solid rgba(255, 255, 255, 0.23);
  border-radius: 16px;
  padding: 0.95rem;
  background: rgba(255, 255, 255, 0.06);
  position: relative;
  align-self: start;
}

.practical-grid .info-card-summary {
  list-style: none;
  display: block;
  margin: 0;
  padding: 0;
  padding-right: 3rem;
  cursor: default;
}

.practical-grid .info-card-summary::-webkit-details-marker {
  display: none;
}

.practical-grid .info-card-body {
  margin-top: 0.45rem;
}

.info-card-location {
  grid-area: location;
}

.info-card-schedule {
  grid-area: schedule;
}

.info-card-food {
  grid-area: food;
}

.info-card-dress {
  grid-area: dress;
}

.info-card-parking {
  grid-area: parking;
}

.info-card-rides {
  grid-area: rides;
}

.info-card-outside {
  grid-area: outside;
}

.practical-grid .info-card-title {
  margin: 0;
  display: block;
  font-size: var(--font-sm);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--aqua);
}

.practical-grid p {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: var(--font-sm);
  line-height: var(--line-body);
}

.practical-grid p strong {
  color: #ffffff;
  font-weight: 700;
}

.info-link {
  color: var(--gold);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--gold) 72%, #ffffff 28%);
  text-shadow:
    0 0 8px rgba(255, 207, 77, 0.3),
    0 0 14px rgba(255, 107, 231, 0.22);
  transition: color 180ms ease, border-color 180ms ease, text-shadow 180ms ease;
}

.info-link:hover,
.info-link:focus-visible {
  color: #ffffff;
  border-bottom-color: color-mix(in srgb, #ffffff 70%, var(--aqua) 30%);
  text-shadow:
    0 0 10px rgba(255, 255, 255, 0.34),
    0 0 16px rgba(103, 241, 255, 0.24);
}

.info-icon {
  position: absolute;
  top: 0.62rem;
  right: 0.68rem;
  display: grid;
  place-items: center;
  width: 1.55rem;
  height: 1.55rem;
  color: #ffffff;
  border: 0;
  background: transparent;
  box-shadow: none;
  text-shadow:
    0 0 8px rgba(255, 255, 255, 0.35),
    0 0 14px rgba(255, 255, 255, 0.2);
}

.info-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

h2 {
  margin: 0;
  font-family: "Bungee", sans-serif;
  font-size: var(--font-xl);
  line-height: 1.05;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 0 18px rgba(255, 45, 199, 0.4);
}

.countdown {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr);
  gap: 0.65rem;
  margin-top: 0;
  flex: 1;
  min-height: 0;
  align-items: stretch;
}

.countdown-photo-card {
  margin: 0;
  width: 100%;
  height: 100%;
  flex: 1;
  min-height: clamp(145px, 17vw, 195px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  overflow: hidden;
  position: relative;
  background: rgba(10, 2, 18, 0.08);
  box-shadow:
    0 0 18px rgba(255, 107, 231, 0.34),
    0 0 28px rgba(103, 241, 255, 0.28);
}

.countdown-photo-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.05);
}

.countdown-photo-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 14%, rgba(255, 207, 77, 0.26), transparent 44%),
    radial-gradient(circle at 86% 84%, rgba(103, 241, 255, 0.2), transparent 40%),
    linear-gradient(
      180deg,
      rgba(255, 45, 199, 0.14) 0%,
      rgba(19, 0, 31, 0.08) 44%,
      rgba(19, 0, 31, 0.28) 100%
    );
  pointer-events: none;
}

.countdown div {
  padding: 0.75rem 0.45rem;
  border-radius: 16px;
  border: 1px solid transparent;
  background:
    linear-gradient(rgba(18, 2, 31, 0.78), rgba(18, 2, 31, 0.78)) padding-box,
    linear-gradient(130deg, var(--gold), #ff6be7, var(--aqua)) border-box;
  box-shadow:
    0 0 18px rgba(255, 107, 231, 0.28),
    0 0 24px rgba(103, 241, 255, 0.22);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
}

.countdown strong {
  display: block;
  font-family: "Bungee", sans-serif;
  font-size: clamp(1.7rem, 5vw, 2.35rem);
  color: #ffffff;
  text-shadow:
    0 0 10px rgba(255, 255, 255, 0.55),
    0 0 16px rgba(255, 107, 231, 0.46),
    0 0 18px rgba(103, 241, 255, 0.42);
}

.countdown span {
  display: block;
  margin-top: 0.15rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: color-mix(in srgb, #ffffff 88%, var(--aqua) 12%);
  font-size: var(--font-2xs);
}

.countdown-attendance {
  margin-top: auto;
  border-radius: 16px;
  border: 1px solid transparent;
  padding: 1rem 1.15rem;
  background:
    linear-gradient(rgba(18, 2, 31, 0.76), rgba(18, 2, 31, 0.76)) padding-box,
    linear-gradient(126deg, var(--gold), #ff6be7, var(--aqua)) border-box;
  box-shadow:
    0 0 14px rgba(255, 107, 231, 0.28),
    0 0 20px rgba(103, 241, 255, 0.24);
  text-align: center;
}

.attendance-label {
  margin: 0;
  font-size: var(--font-2xs);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: color-mix(in srgb, #ffffff 84%, var(--aqua) 16%);
}

.attendance-value {
  margin: 0.16rem 0 0;
  display: inline-flex;
  align-items: baseline;
  gap: 0.38rem;
}

#confirmedCount {
  font-family: "Bungee", sans-serif;
  font-size: clamp(1.4rem, 4.2vw, 1.95rem);
  color: #ffffff;
  text-shadow:
    0 0 10px rgba(255, 255, 255, 0.54),
    0 0 14px rgba(255, 107, 231, 0.46),
    0 0 18px rgba(103, 241, 255, 0.42);
}

.attendance-unit {
  font-size: var(--font-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: color-mix(in srgb, #ffffff 88%, var(--gold) 12%);
}

.rsvp-form {
  margin-top: 0.95rem;
  display: grid;
  gap: 0.7rem;
  width: min(100%, 62rem);
  margin-inline: auto;
  padding-inline: clamp(0.2rem, 1.8vw, 1rem);
}

.rsvp-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(250px, 0.72fr);
  column-gap: clamp(1.35rem, 3.4vw, 2.2rem);
  row-gap: 0.8rem;
  align-items: start;
}

.rsvp-main-fields {
  display: grid;
  gap: 0.76rem;
}

.rsvp-form label {
  display: grid;
  gap: 0.45rem;
  color: var(--muted);
  font-size: var(--font-sm);
}

.memory-capsule {
  --memory-glow: rgba(103, 241, 255, 0.24);
  margin-top: clamp(1.2rem, 2.2vw, 1.45rem);
  margin-inline-start: clamp(0.4rem, 1vw, 0.9rem);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 16px;
  background:
    linear-gradient(164deg, rgba(22, 8, 34, 0.94), rgba(16, 6, 29, 0.94)),
    radial-gradient(circle at 10% 10%, rgba(255, 207, 77, 0.14), transparent 48%),
    radial-gradient(circle at 95% 92%, rgba(103, 241, 255, 0.16), transparent 46%);
  padding: 0.78rem 0.72rem 0.72rem;
  display: grid;
  gap: 0.48rem;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 10px 24px rgba(0, 0, 0, 0.28),
    0 0 16px rgba(103, 241, 255, 0.14);
}

.memory-capsule::before,
.memory-capsule::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.memory-capsule::before {
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0) 30%
  );
  opacity: 1;
}

.memory-capsule::after {
  inset: -36% auto auto -24%;
  width: 54%;
  height: 210%;
  transform: rotate(24deg);
  background: linear-gradient(
    180deg,
    transparent,
    rgba(255, 255, 255, 0.17),
    transparent
  );
  opacity: 0.3;
  animation: memorySheen 9.6s linear infinite;
}

.memory-topbar {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem;
}

.memory-title {
  position: relative;
  z-index: 1;
  margin: 0;
  font-weight: 700;
  font-size: var(--font-2xs);
  letter-spacing: 0.045em;
  text-transform: uppercase;
  color: color-mix(in srgb, #ffffff 90%, var(--gold) 10%);
  text-shadow:
    0 0 8px rgba(255, 207, 77, 0.24),
    0 0 12px rgba(103, 241, 255, 0.18);
}

.memory-subtitle {
  display: none;
}

.memory-mode-switch {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 0.14rem;
  padding: 0.14rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.17);
  background: rgba(6, 15, 38, 0.45);
}

.memory-mode-button {
  min-width: 2.3rem;
  border: 0;
  border-radius: 999px;
  padding: 0.36rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: color-mix(in srgb, #ffffff 84%, var(--aqua) 16%);
  font-family: "Sora", sans-serif;
  font-size: var(--font-2xs);
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease, filter 140ms ease;
}

.memory-mode-button .memory-button-icon {
  width: 0.96rem;
  height: 0.96rem;
}

.memory-mode-button:hover {
  color: #ffffff;
  filter: saturate(1.04);
}

.memory-mode-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.memory-mode-button.is-active {
  color: #10002a;
  background: linear-gradient(95deg, rgba(255, 207, 77, 0.92), rgba(103, 241, 255, 0.88));
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.34) inset,
    0 0 12px rgba(103, 241, 255, 0.24);
}

.memory-preview-shell {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.2rem;
  justify-items: center;
  width: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
}

.memory-audio-pulse {
  --memory-dot-1: 0.86;
  --memory-dot-2: 1;
  --memory-dot-3: 1.14;
  --memory-dot-4: 1;
  --memory-dot-5: 0.86;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.42rem;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  background: rgba(5, 16, 38, 0.56);
  min-height: 2.35rem;
  padding: 0.22rem 0.3rem;
}

.memory-audio-toggle {
  width: 1.78rem;
  height: 1.78rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 207, 77, 0.88), rgba(103, 241, 255, 0.86));
  color: #13001f;
  cursor: pointer;
  flex: 0 0 auto;
  transition: transform 140ms ease, filter 140ms ease;
}

.memory-audio-toggle:hover {
  transform: translateY(-1px);
  filter: saturate(1.06);
}

.memory-audio-toggle:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  filter: none;
}

.memory-audio-toggle .memory-button-icon {
  width: 0.92rem;
  height: 0.92rem;
  stroke-width: 2;
}

.memory-audio-icon-pause {
  display: none;
}

.memory-capsule.is-playing-audio .memory-audio-icon-play {
  display: none;
}

.memory-capsule.is-playing-audio .memory-audio-icon-pause {
  display: block;
}

.memory-audio-dots {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 0.2rem;
  flex: 1;
  min-height: 1.18rem;
}

.memory-audio-dots span {
  width: 0.37rem;
  height: 0.37rem;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 207, 77, 0.9), rgba(103, 241, 255, 0.92));
  opacity: 0.92;
  transform-origin: center bottom;
  transition: transform 120ms linear, opacity 120ms linear;
}

.memory-audio-dots span:nth-child(1) {
  transform: scale(var(--memory-dot-1));
}

.memory-audio-dots span:nth-child(2) {
  transform: scale(var(--memory-dot-2));
}

.memory-audio-dots span:nth-child(3) {
  transform: scale(var(--memory-dot-3));
}

.memory-audio-dots span:nth-child(4) {
  transform: scale(var(--memory-dot-4));
}

.memory-audio-dots span:nth-child(5) {
  transform: scale(var(--memory-dot-5));
}

.memory-audio-time {
  min-width: 2.9rem;
  text-align: right;
  color: color-mix(in srgb, #ffffff 86%, var(--aqua) 14%);
  font-size: var(--font-2xs);
  font-weight: 700;
  letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums;
  font-family: "Sora", sans-serif;
  flex: 0 0 auto;
}

.memory-capsule.is-recording-audio .memory-audio-dots span:nth-child(1) {
  animation: audioPulse 620ms ease-in-out infinite;
}

.memory-capsule.is-recording-audio .memory-audio-dots span:nth-child(2) {
  animation: audioPulse 680ms ease-in-out 60ms infinite;
}

.memory-capsule.is-recording-audio .memory-audio-dots span:nth-child(3) {
  animation: audioPulse 560ms ease-in-out 120ms infinite;
}

.memory-capsule.is-recording-audio .memory-audio-dots span:nth-child(4) {
  animation: audioPulse 700ms ease-in-out 180ms infinite;
}

.memory-capsule.is-recording-audio .memory-audio-dots span:nth-child(5) {
  animation: audioPulse 600ms ease-in-out 240ms infinite;
}

.memory-live-ring {
  position: relative;
  width: 100%;
  max-width: 158px;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(4, 10, 26, 0.78);
  justify-self: center;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 0 12px rgba(103, 241, 255, 0.26);
}

#memoryLiveVideo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.memory-video-replay {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: rgba(7, 14, 30, 0.56);
  color: #f6fbff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: scale(0.9);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease, background-color 160ms ease;
  z-index: 2;
}

.memory-video-replay.is-visible {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.memory-video-replay:hover {
  background: rgba(8, 17, 34, 0.74);
}

.memory-video-replay svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: currentColor;
}

#memoryPlaybackAudio {
  width: 100%;
  min-height: 2.15rem;
  border-radius: 10px;
  overflow: hidden;
  accent-color: #66e7ee;
}

.memory-live-badge {
  position: absolute;
  top: 0.32rem;
  right: 0.32rem;
  border-radius: 999px;
  padding: 0.04rem 0.32rem;
  font-family: "Bungee", sans-serif;
  font-size: var(--font-2xs);
  letter-spacing: 0.08em;
  color: #ffffff;
  background: rgba(255, 58, 92, 0.78);
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 140ms ease, transform 140ms ease;
  z-index: 3;
}

.memory-capsule.is-recording .memory-live-badge {
  opacity: 1;
  transform: scale(1);
}

.memory-status {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: var(--font-xs);
  line-height: 1.32;
  color: color-mix(in srgb, #ffffff 82%, var(--aqua) 18%);
  text-align: center;
}

.memory-capsule.is-idle .memory-status {
  display: none;
}

.memory-gesture-hint {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: var(--font-2xs);
  color: color-mix(in srgb, #ffffff 72%, var(--gold) 28%);
  text-align: center;
  opacity: 0.92;
}

.memory-lock-chip {
  position: relative;
  z-index: 1;
  margin: 0;
  justify-self: center;
  border-radius: 999px;
  border: 1px solid rgba(103, 241, 255, 0.46);
  background: linear-gradient(95deg, rgba(103, 241, 255, 0.2), rgba(255, 207, 77, 0.2));
  color: #f5e8ff;
  font-size: var(--font-2xs);
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.16rem 0.5rem;
  box-shadow:
    0 0 8px rgba(103, 241, 255, 0.24),
    0 0 10px rgba(255, 207, 77, 0.16);
}

.memory-actions {
  position: relative;
  z-index: 1;
  margin-top: 0;
  display: grid;
  gap: 0.32rem;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
}

.memory-actions-secondary {
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.32rem;
}

.memory-capsule.has-recording .memory-actions-secondary {
  display: grid;
}

.memory-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.24rem;
  border: 1px solid rgba(255, 255, 255, 0.23);
  border-radius: 12px;
  padding: 0.35rem 0.4rem;
  background: rgba(10, 22, 49, 0.46);
  color: color-mix(in srgb, #ffffff 90%, var(--aqua) 10%);
  font-family: "Sora", sans-serif;
  font-size: var(--font-2xs);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 140ms ease,
    border-color 140ms ease,
    color 140ms ease,
    transform 140ms ease;
}

.memory-button-icon {
  width: 1.04rem;
  height: 1.04rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.memory-action-button:hover {
  transform: translateY(-1px);
  background: rgba(12, 28, 61, 0.62);
  border-color: rgba(255, 255, 255, 0.42);
  color: #ffffff;
  box-shadow:
    0 0 10px rgba(103, 241, 255, 0.22);
}

.memory-action-button:disabled,
.memory-action-button[aria-disabled="true"] {
  opacity: 0.42;
  cursor: not-allowed;
  background: rgba(6, 12, 28, 0.46);
}

#memoryRecordButton:disabled,
#memoryStopButton:disabled,
#memoryShareButton:disabled {
  color: #8ea0b8;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(6, 12, 28, 0.46);
}

.memory-action-button.is-primary {
  color: #0f0024;
  border-color: rgba(255, 255, 255, 0.64);
  background: linear-gradient(96deg, rgba(255, 207, 77, 0.95), rgba(103, 241, 255, 0.9));
  box-shadow:
    0 0 11px rgba(103, 241, 255, 0.28),
    0 0 12px rgba(255, 207, 77, 0.24);
}

#memoryRecordButton {
  width: 3.25rem;
  height: 3.25rem;
  min-height: 0;
  padding: 0;
  grid-column: 2;
  justify-self: center;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 207, 77, 0.96), rgba(103, 241, 255, 0.94));
  border-color: rgba(255, 255, 255, 0.72);
  color: #16002a;
  position: relative;
  touch-action: none;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.34) inset,
    0 0 14px rgba(103, 241, 255, 0.34),
    0 0 16px rgba(255, 207, 77, 0.24);
}

#memoryRecordButton .memory-button-icon {
  width: 1.3rem;
  height: 1.3rem;
  stroke-width: 1.95;
}

#memoryRecordButton .memory-record-icon-video {
  display: none;
}

#memoryRecordButton .memory-record-icon-retake {
  display: none;
}

.memory-capsule[data-mode="video"] #memoryRecordButton .memory-record-icon-audio {
  display: none;
}

.memory-capsule[data-mode="video"] #memoryRecordButton .memory-record-icon-video {
  display: block;
}

.memory-capsule.has-video-recording #memoryRecordButton .memory-record-icon-audio,
.memory-capsule.has-video-recording #memoryRecordButton .memory-record-icon-video {
  display: none;
}

.memory-capsule.has-video-recording #memoryRecordButton .memory-record-icon-retake {
  display: block;
}

#memoryRecordButton::after {
  content: "↑";
  position: absolute;
  top: -0.85rem;
  left: 50%;
  transform: translate(-50%, 0.28rem);
  opacity: 0;
  color: #e8fff9;
  font-size: 0.74rem;
  transition: opacity 140ms ease, transform 140ms ease;
}

#memoryRecordButton:hover {
  filter: saturate(1.06) brightness(1.03);
  color: #100021;
}

.memory-capsule.is-recording #memoryRecordButton {
  opacity: 0.55;
  transform: scale(0.94);
}

.memory-capsule.is-pressing #memoryRecordButton::after {
  opacity: calc(0.34 + var(--lock-progress, 0) * 0.66);
  transform: translate(-50%, calc(0.28rem - var(--lock-progress, 0) * 0.92rem));
}

.memory-capsule.is-locked #memoryRecordButton::after {
  opacity: 0;
}

#memoryStopButton {
  width: 3.25rem;
  height: 3.25rem;
  min-height: 0;
  padding: 0;
  grid-column: 2;
  justify-self: center;
  border-radius: 999px;
  background: rgba(34, 15, 58, 0.84);
  border-color: rgba(255, 255, 255, 0.38);
  display: none;
}

#memoryStopButton:disabled {
  display: none;
}

.memory-capsule.is-locked #memoryStopButton {
  display: inline-flex;
}

.memory-capsule.is-locked #memoryRecordButton {
  display: none;
}

#memoryDownloadButton,
#memoryShareButton {
  font-size: var(--font-2xs);
}

#memoryDownloadButton[aria-disabled="true"],
#memoryShareButton:disabled {
  display: none;
}

.memory-capsule[data-mode="audio"] .memory-live-ring {
  display: none !important;
}

.memory-capsule[data-mode="video"] .memory-audio-pulse,
.memory-capsule[data-mode="video"] #memoryPlaybackAudio {
  display: none !important;
}

.rsvp-skyline {
  position: absolute;
  top: 0.48rem;
  right: 0.75rem;
  width: clamp(170px, 30vw, 305px);
  pointer-events: none;
  opacity: 1;
  mix-blend-mode: normal;
  animation: skylineFloat 5.6s ease-in-out infinite alternate;
  will-change: transform;
}

html[dir="rtl"] .rsvp-skyline {
  right: auto;
  left: 0.75rem;
}

.rsvp-skyline img {
  display: block;
  width: 100%;
  height: auto;
  filter:
    drop-shadow(0 0 4px rgba(255, 207, 77, 0.34))
    drop-shadow(0 0 8px rgba(255, 107, 231, 0.38))
    drop-shadow(0 0 10px rgba(103, 241, 255, 0.32));
  animation: skylineNeon 4.2s ease-in-out infinite alternate;
  will-change: filter;
}

#rsvpTitle {
  max-width: calc(100% - 12.5rem);
}

.community-stage {
  margin-top: 1rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  position: relative;
  overflow: visible;
}

.rsvp-community-grid {
  margin-top: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 0.82rem;
  align-items: stretch;
  perspective: 920px;
}

.rsvp-community-card {
  position: relative;
  z-index: 1;
  min-height: 14rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 1.2rem;
  padding: 0.84rem 0.82rem 0.78rem;
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  gap: 0.44rem;
  transform-style: preserve-3d;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.rsvp-community-card-media {
  transform: rotate(-1.4deg);
  background:
    linear-gradient(155deg, rgba(37, 11, 59, 0.92), rgba(15, 30, 57, 0.86)),
    radial-gradient(circle at 14% 20%, rgba(255, 207, 77, 0.22), transparent 44%),
    radial-gradient(circle at 82% 88%, rgba(103, 241, 255, 0.22), transparent 46%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.07) inset,
    0 0 14px rgba(255, 107, 231, 0.32),
    0 0 20px rgba(103, 241, 255, 0.22);
}

.rsvp-community-card-song {
  transform: rotate(1.4deg);
  background:
    linear-gradient(151deg, rgba(12, 35, 67, 0.9), rgba(32, 9, 54, 0.86)),
    radial-gradient(circle at 18% 84%, rgba(255, 107, 231, 0.2), transparent 42%),
    radial-gradient(circle at 88% 14%, rgba(255, 207, 77, 0.22), transparent 44%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 0 16px rgba(103, 241, 255, 0.28),
    0 0 18px rgba(255, 207, 77, 0.2);
}

.rsvp-community-card:hover {
  transform: translateY(-2px) rotate(0deg);
}

.rsvp-community-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(
    122deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.2) 46%,
    rgba(255, 255, 255, 0) 70%
  );
  transform: translateX(-130%) skewX(-16deg);
  opacity: 0.46;
  animation: communityCardSweep 8.4s linear infinite;
}

.rsvp-community-icon {
  width: 2.05rem;
  height: 2.05rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  display: grid;
  place-items: center;
  color: #ffffff;
  background: rgba(5, 19, 46, 0.58);
  box-shadow:
    0 0 10px rgba(103, 241, 255, 0.28),
    0 0 14px rgba(255, 207, 77, 0.18);
}

.rsvp-community-icon svg {
  width: 1.08rem;
  height: 1.08rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rsvp-community-visual {
  height: 2.34rem;
  border-radius: 0.74rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(5, 16, 35, 0.5);
  display: grid;
  align-items: center;
  overflow: hidden;
}

.rsvp-community-visual-media {
  grid-template-columns: repeat(4, 1fr);
  gap: 0.22rem;
  padding: 0.3rem;
}

.rsvp-community-visual-media span {
  display: block;
  height: 100%;
  border-radius: 0.38rem;
  background:
    linear-gradient(170deg, rgba(255, 207, 77, 0.58), rgba(255, 107, 231, 0.64), rgba(103, 241, 255, 0.66));
  box-shadow:
    0 0 8px rgba(255, 107, 231, 0.24),
    0 0 10px rgba(103, 241, 255, 0.18);
}

.rsvp-community-visual-song {
  grid-template-columns: repeat(7, 1fr);
  gap: 0.22rem;
  padding: 0.3rem;
}

.rsvp-community-visual-song span {
  display: block;
  align-self: end;
  border-radius: 999px;
  min-height: 0.55rem;
  background: linear-gradient(180deg, rgba(255, 207, 77, 0.95), rgba(103, 241, 255, 0.95));
  animation: communityEqPulse 860ms ease-in-out infinite;
}

.rsvp-community-visual-song span:nth-child(1) { height: 44%; animation-delay: 0ms; }
.rsvp-community-visual-song span:nth-child(2) { height: 72%; animation-delay: 70ms; }
.rsvp-community-visual-song span:nth-child(3) { height: 56%; animation-delay: 140ms; }
.rsvp-community-visual-song span:nth-child(4) { height: 90%; animation-delay: 210ms; }
.rsvp-community-visual-song span:nth-child(5) { height: 62%; animation-delay: 280ms; }
.rsvp-community-visual-song span:nth-child(6) { height: 78%; animation-delay: 350ms; }
.rsvp-community-visual-song span:nth-child(7) { height: 48%; animation-delay: 420ms; }

.rsvp-community-card h3 {
  margin: 0;
  font-size: var(--font-sm);
  line-height: 1.2;
  font-family: "Bungee", sans-serif;
  letter-spacing: 0.04em;
  color: #fffafc;
  text-transform: uppercase;
  text-wrap: balance;
}

.rsvp-community-card p {
  margin: 0;
  font-size: var(--font-xs);
  line-height: 1.42;
  color: color-mix(in srgb, #ffffff 90%, var(--aqua) 10%);
  text-wrap: pretty;
}

.rsvp-community-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: "Sora", sans-serif;
  appearance: none;
  -webkit-appearance: none;
  margin-top: 0.16rem;
  justify-self: start;
  text-decoration: none;
  border-radius: 0.66rem;
  border: 1px solid rgba(255, 255, 255, 0.52);
  padding: 0.42rem 0.68rem;
  font-size: var(--font-2xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #130022;
  background: linear-gradient(96deg, rgba(255, 207, 77, 0.98), rgba(103, 241, 255, 0.9));
  box-shadow:
    0 0 10px rgba(103, 241, 255, 0.3),
    0 0 14px rgba(255, 207, 77, 0.2);
  transition: transform 160ms ease, filter 160ms ease;
}

.rsvp-community-link:hover {
  transform: translateY(-1px);
  filter: saturate(1.07) brightness(1.04);
}

.rsvp-community-upload-trigger {
  white-space: nowrap;
}

.rsvp-community-song-trigger {
  white-space: nowrap;
}

@keyframes communityCardSweep {
  from {
    transform: translateX(-130%) skewX(-16deg);
  }
  to {
    transform: translateX(230%) skewX(-16deg);
  }
}

@keyframes communityEqPulse {
  0%,
  100% {
    transform: scaleY(0.78);
    opacity: 0.74;
  }
  50% {
    transform: scaleY(1.18);
    opacity: 1;
  }
}

.rsvp-form input,
.rsvp-form textarea {
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 14px;
  background: rgba(17, 5, 29, 0.76);
  color: #fff;
  padding: 0.8rem 0.9rem;
  font: inherit;
}

.rsvp-form input:focus,
.rsvp-form textarea:focus {
  outline: 2px solid rgba(103, 241, 255, 0.85);
  outline-offset: 1px;
}

.button-primary {
  margin-top: 0.25rem;
  border: none;
  border-radius: 999px;
  padding: 0.86rem 1.1rem;
  font-family: "Bungee", sans-serif;
  font-size: var(--font-sm);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #170025;
  background: linear-gradient(90deg, var(--gold), #ffd9f2, var(--aqua));
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.45) inset,
    0 14px 34px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  transition: transform 170ms ease, filter 170ms ease;
}

.rsvp-main-fields .button-primary {
  justify-self: center;
  width: auto;
  padding: 0.62rem 0.98rem;
  font-size: var(--font-xs);
  letter-spacing: 0.04em;
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.38) inset,
    0 10px 24px rgba(0, 0, 0, 0.35);
}

.button-primary:hover {
  transform: translateY(-2px) scale(1.01);
  filter: saturate(1.08) brightness(1.04);
}

.form-hint {
  margin: 0;
  color: var(--muted);
  font-size: var(--font-xs);
}

body.memory-prompt-open {
  overflow: hidden;
}

body.upload-modal-open {
  overflow: hidden;
}

body.song-modal-open {
  overflow: hidden;
}

.memory-prompt {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.memory-prompt[hidden] {
  display: none !important;
}

.memory-prompt-overlay {
  position: absolute;
  inset: 0;
  border: 0;
  margin: 0;
  padding: 0;
  background:
    radial-gradient(circle at 18% 16%, rgba(255, 207, 77, 0.18), transparent 34%),
    radial-gradient(circle at 82% 74%, rgba(103, 241, 255, 0.18), transparent 36%),
    rgba(8, 3, 18, 0.72);
  backdrop-filter: blur(5px);
  cursor: pointer;
}

.memory-prompt-card {
  position: relative;
  width: min(460px, 92vw);
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background:
    linear-gradient(145deg, rgba(24, 6, 41, 0.95), rgba(14, 22, 48, 0.92));
  padding: 1.2rem 1.06rem 0.98rem;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.14) inset,
    0 14px 44px rgba(0, 0, 0, 0.55),
    0 0 18px rgba(255, 107, 231, 0.2),
    0 0 20px rgba(103, 241, 255, 0.18);
  overflow: hidden;
}

.memory-prompt-card::before,
.memory-prompt-card::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.memory-prompt-card::before {
  inset: -52% -12% auto;
  height: 48%;
  background: linear-gradient(
    110deg,
    rgba(255, 255, 255, 0) 14%,
    rgba(255, 255, 255, 0.18) 42%,
    rgba(255, 255, 255, 0) 68%
  );
  animation: memorySheen 8.8s linear infinite;
}

.memory-prompt-card::after {
  inset: 0;
  background-image:
    radial-gradient(circle at 14% 20%, rgba(255, 207, 77, 0.6) 0 1px, transparent 1px),
    radial-gradient(circle at 84% 24%, rgba(255, 107, 231, 0.56) 0 1px, transparent 1px),
    radial-gradient(circle at 62% 86%, rgba(103, 241, 255, 0.52) 0 1px, transparent 1px);
  background-size: 150px 150px, 190px 190px, 170px 170px;
  opacity: 0.45;
  animation: glitterDrift 12s linear infinite;
}

.memory-prompt-close {
  position: absolute;
  top: 0.52rem;
  right: 0.52rem;
  width: 1.96rem;
  height: 1.96rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(11, 23, 44, 0.56);
  color: rgba(255, 255, 255, 0.86);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.memory-prompt-close svg {
  width: 0.92rem;
  height: 0.92rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
}

.memory-prompt-kicker {
  margin: 0 0 0.36rem;
  font-family: "Bungee", sans-serif;
  font-size: var(--font-2xs);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: color-mix(in srgb, #ffffff 70%, var(--gold) 30%);
}

#memoryPromptTitle {
  margin: 0;
  font-family: "Bungee", sans-serif;
  font-size: var(--font-lg);
  line-height: var(--line-tight);
  color: #fff8fe;
  letter-spacing: 0.02em;
}

.memory-prompt-text {
  margin: 0.56rem 0 0;
  font-size: var(--font-sm);
  line-height: 1.38;
  color: color-mix(in srgb, #ffffff 88%, var(--aqua) 12%);
}

.memory-prompt-note {
  margin: 0.48rem 0 0;
  font-family: "Bungee", sans-serif;
  font-size: var(--font-2xs);
  letter-spacing: 0.05em;
  color: color-mix(in srgb, #ffffff 84%, var(--gold) 16%);
}

.memory-prompt-actions {
  margin-top: 0.86rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.memory-prompt-button {
  min-height: 2.3rem;
  border-radius: 12px;
  font-family: "Sora", sans-serif;
  font-size: var(--font-xs);
  font-weight: 700;
  letter-spacing: 0.01em;
  border: 1px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
  color: #f6fbff;
  background: rgba(8, 20, 44, 0.56);
}

.memory-prompt-button-soft {
  color: color-mix(in srgb, #ffffff 90%, var(--aqua) 10%);
}

.memory-prompt-button-primary {
  color: #160027;
  background: linear-gradient(96deg, rgba(255, 207, 77, 0.96), rgba(103, 241, 255, 0.92));
  border-color: rgba(255, 255, 255, 0.58);
}

.upload-modal {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.upload-modal[hidden] {
  display: none !important;
}

.upload-modal-overlay {
  position: absolute;
  inset: 0;
  border: 0;
  margin: 0;
  padding: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 207, 77, 0.12), transparent 32%),
    radial-gradient(circle at 84% 72%, rgba(103, 241, 255, 0.12), transparent 34%),
    rgba(4, 2, 12, 0.82);
  backdrop-filter: blur(8px);
  cursor: pointer;
}

.upload-modal-card {
  position: relative;
  width: min(470px, 94vw);
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background:
    linear-gradient(154deg, rgba(20, 7, 38, 0.96), rgba(10, 22, 45, 0.95));
  padding: 1.12rem 0.94rem 0.9rem;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12) inset,
    0 16px 44px rgba(0, 0, 0, 0.58),
    0 0 16px rgba(255, 107, 231, 0.22),
    0 0 18px rgba(103, 241, 255, 0.18);
  overflow: hidden;
}

.upload-modal-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 18% 22%, rgba(255, 207, 77, 0.56) 0 1px, transparent 1px),
    radial-gradient(circle at 86% 20%, rgba(255, 107, 231, 0.52) 0 1px, transparent 1px),
    radial-gradient(circle at 64% 82%, rgba(103, 241, 255, 0.48) 0 1px, transparent 1px);
  background-size: 150px 150px, 180px 180px, 170px 170px;
  opacity: 0.35;
  animation: glitterDrift 12s linear infinite;
}

.upload-modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 1.95rem;
  height: 1.95rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(11, 23, 44, 0.58);
  color: rgba(255, 255, 255, 0.88);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.upload-modal-close svg {
  width: 0.92rem;
  height: 0.92rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.upload-modal-kicker {
  position: relative;
  z-index: 1;
  margin: 0 0 0.34rem;
  font-family: "Bungee", sans-serif;
  font-size: var(--font-2xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: color-mix(in srgb, #ffffff 70%, var(--gold) 30%);
}

#uploadModalTitle {
  position: relative;
  z-index: 1;
  margin: 0;
  font-family: "Bungee", sans-serif;
  font-size: var(--font-md);
  line-height: 1.25;
  color: #fff9ff;
}

.upload-modal-text {
  position: relative;
  z-index: 1;
  margin: 0.54rem 0 0;
  font-size: var(--font-sm);
  line-height: 1.38;
  color: color-mix(in srgb, #ffffff 88%, var(--aqua) 12%);
}

.upload-file-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.upload-dropzone {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  margin-top: 0.72rem;
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.42);
  padding: 0.82rem 0.78rem;
  font-family: "Sora", sans-serif;
  font-size: var(--font-xs);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #f8fcff;
  background:
    linear-gradient(95deg, rgba(255, 107, 231, 0.2), rgba(103, 241, 255, 0.24));
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, filter 160ms ease;
}

.upload-dropzone:hover,
.upload-dropzone:focus-visible,
.upload-dropzone.is-dragover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.74);
  filter: saturate(1.08) brightness(1.04);
}

.upload-dropzone span {
  display: inline-block;
}

.upload-modal-meta {
  position: relative;
  z-index: 1;
  margin: 0.54rem 0 0;
  font-size: var(--font-2xs);
  color: color-mix(in srgb, #ffffff 72%, var(--aqua) 28%);
}

.upload-file-list {
  position: relative;
  z-index: 1;
  margin: 0.45rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.36rem;
  max-height: min(220px, 34vh);
  overflow-y: auto;
}

.upload-file-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.44rem;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(8, 22, 47, 0.66);
  padding: 0.4rem 0.46rem;
}

.upload-file-icon {
  width: 1.72rem;
  height: 1.72rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(19, 7, 37, 0.65);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 0.74rem;
}

.upload-file-details {
  min-width: 0;
}

.upload-file-name {
  margin: 0;
  font-size: var(--font-2xs);
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upload-file-meta {
  margin: 0.12rem 0 0;
  font-size: 0.7rem;
  color: color-mix(in srgb, #ffffff 70%, var(--aqua) 30%);
}

.upload-file-remove {
  min-width: 1.8rem;
  min-height: 1.8rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(21, 8, 40, 0.68);
  color: #ffffff;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.upload-modal-status {
  position: relative;
  z-index: 1;
  margin: 0.58rem 0 0;
  min-height: 1.05rem;
  font-size: var(--font-xs);
  color: color-mix(in srgb, #ffffff 84%, var(--gold) 16%);
}

.upload-modal-actions {
  position: relative;
  z-index: 1;
  margin-top: 0.72rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.42rem;
}

.upload-modal-button {
  min-height: 2.2rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-family: "Sora", sans-serif;
  font-size: var(--font-xs);
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #f6fbff;
  background: rgba(9, 20, 44, 0.58);
  cursor: pointer;
}

.upload-modal-button:disabled {
  opacity: 0.46;
  cursor: not-allowed;
}

.upload-modal-button-soft {
  color: color-mix(in srgb, #ffffff 88%, var(--aqua) 12%);
}

.upload-modal-button-primary {
  color: #160027;
  background: linear-gradient(96deg, rgba(255, 207, 77, 0.96), rgba(103, 241, 255, 0.92));
  border-color: rgba(255, 255, 255, 0.58);
}

.song-modal {
  position: fixed;
  inset: 0;
  z-index: 160;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.song-modal[hidden] {
  display: none !important;
}

.song-modal-overlay {
  position: absolute;
  inset: 0;
  border: 0;
  margin: 0;
  padding: 0;
  background:
    radial-gradient(circle at 16% 20%, rgba(255, 107, 231, 0.18), transparent 34%),
    radial-gradient(circle at 84% 76%, rgba(103, 241, 255, 0.16), transparent 34%),
    rgba(5, 2, 15, 0.84);
  backdrop-filter: blur(8px);
  cursor: pointer;
}

.song-modal-card {
  position: relative;
  width: min(560px, 94vw);
  border-radius: 23px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background:
    linear-gradient(150deg, rgba(27, 7, 46, 0.96), rgba(8, 28, 53, 0.95));
  padding: 1.1rem 0.95rem 0.92rem;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12) inset,
    0 18px 48px rgba(0, 0, 0, 0.58),
    0 0 18px rgba(255, 107, 231, 0.24),
    0 0 18px rgba(103, 241, 255, 0.2);
  overflow: hidden;
}

.song-modal-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 14% 22%, rgba(255, 207, 77, 0.58) 0 1px, transparent 1px),
    radial-gradient(circle at 84% 24%, rgba(255, 107, 231, 0.54) 0 1px, transparent 1px),
    radial-gradient(circle at 66% 84%, rgba(103, 241, 255, 0.48) 0 1px, transparent 1px);
  background-size: 155px 155px, 185px 185px, 170px 170px;
  opacity: 0.42;
  animation: glitterDrift 12s linear infinite;
}

.song-modal-close {
  position: absolute;
  top: 0.52rem;
  right: 0.52rem;
  width: 1.95rem;
  height: 1.95rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(11, 23, 44, 0.6);
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.song-modal-close svg {
  width: 0.92rem;
  height: 0.92rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.song-modal-kicker {
  position: relative;
  z-index: 1;
  margin: 0 0 0.34rem;
  font-family: "Bungee", sans-serif;
  font-size: var(--font-2xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: color-mix(in srgb, #ffffff 70%, var(--gold) 30%);
}

#songModalTitle {
  position: relative;
  z-index: 1;
  margin: 0;
  font-family: "Bungee", sans-serif;
  font-size: var(--font-md);
  line-height: 1.24;
  color: #fff9ff;
}

.song-modal-text {
  position: relative;
  z-index: 1;
  margin: 0.5rem 0 0;
  font-size: var(--font-sm);
  line-height: 1.38;
  color: color-mix(in srgb, #ffffff 90%, var(--aqua) 10%);
}

.song-request-list {
  position: relative;
  z-index: 1;
  margin: 0.62rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.34rem;
  max-height: min(190px, 26vh);
  overflow-y: auto;
}

.song-request-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.5rem;
  align-items: center;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(8, 21, 46, 0.64);
  padding: 0.4rem 0.46rem;
}

.song-request-rank {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Bungee", sans-serif;
  font-size: var(--font-2xs);
  color: #ffffff;
  background: rgba(18, 6, 35, 0.66);
}

.song-request-content {
  min-width: 0;
}

.song-request-main {
  margin: 0;
  font-size: var(--font-xs);
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.song-request-meta {
  margin: 0.12rem 0 0;
  font-size: 0.7rem;
  color: color-mix(in srgb, #ffffff 74%, var(--aqua) 26%);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.song-request-empty {
  position: relative;
  z-index: 1;
  margin: 0.56rem 0 0;
  font-size: var(--font-xs);
  color: color-mix(in srgb, #ffffff 76%, var(--gold) 24%);
}

.song-request-form {
  position: relative;
  z-index: 1;
  margin-top: 0.62rem;
  display: grid;
  gap: 0.44rem;
}

.song-request-field {
  display: grid;
  gap: 0.22rem;
}

.song-request-field span,
.song-identity-field p {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: color-mix(in srgb, #ffffff 84%, var(--aqua) 16%);
}

.song-request-field input {
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 11px;
  background: rgba(9, 20, 44, 0.64);
  color: #ffffff;
  padding: 0.54rem 0.58rem;
  font: inherit;
  font-size: var(--font-xs);
}

.song-request-field input:focus {
  outline: 2px solid rgba(103, 241, 255, 0.82);
  outline-offset: 1px;
}

.song-identity-field {
  display: grid;
  gap: 0.24rem;
}

.song-identity-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.34rem;
}

.song-identity-option {
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 10px;
  background: rgba(9, 20, 44, 0.56);
  padding: 0.34rem 0.42rem;
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease, transform 150ms ease;
}

.song-identity-option:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.52);
}

.song-identity-option input {
  accent-color: #67f1ff;
}

.song-identity-option span {
  font-size: var(--font-xs);
  color: #ffffff;
}

.song-identity-option.is-active {
  border-color: rgba(255, 255, 255, 0.62);
  background: linear-gradient(96deg, rgba(255, 107, 231, 0.24), rgba(103, 241, 255, 0.22));
}

.song-modal-status {
  margin: 0.1rem 0 0;
  min-height: 1.05rem;
  font-size: var(--font-xs);
  color: color-mix(in srgb, #ffffff 84%, var(--gold) 16%);
}

.song-modal-submit {
  min-height: 2.26rem;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 12px;
  font-family: "Sora", sans-serif;
  font-size: var(--font-xs);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #160027;
  background: linear-gradient(96deg, rgba(255, 207, 77, 0.96), rgba(103, 241, 255, 0.92));
  cursor: pointer;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 520ms ease, transform 520ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes eventStarsTwinkle {
  0% {
    transform: scale(0.995);
    filter: drop-shadow(0 0 6px rgba(197, 230, 255, 0.3));
  }
  100% {
    transform: scale(1.01);
    filter: drop-shadow(0 0 10px rgba(217, 237, 255, 0.42));
  }
}

@keyframes eventStarPulseA {
  0% {
    opacity: clamp(0, calc(var(--stars-phase) * 1.2), 0.92);
    transform: translateY(0);
  }
  100% {
    opacity: clamp(0, calc(var(--stars-phase) * 1.38), 1);
    transform: translateY(-0.4%);
  }
}

@keyframes eventStarPulseB {
  0% {
    opacity: 0.56;
  }
  100% {
    opacity: 0.86;
  }
}

@keyframes eventStarPulseC {
  0% {
    filter: blur(0.2px) saturate(0.9);
  }
  100% {
    filter: blur(0) saturate(1.18);
  }
}

@keyframes eventNightDance {
  0% {
    transform:
      translate3d(
        calc((var(--story-progress) - 0.5) * 22%),
        calc((0.5 - var(--story-progress)) * 12%),
        0
      )
      scale(calc(1.06 + var(--night-phase) * 0.05));
  }
  100% {
    transform:
      translate3d(
        calc((var(--story-progress) - 0.5) * 28%),
        calc((0.5 - var(--story-progress)) * 8%),
        0
      )
      scale(calc(1.11 + var(--night-phase) * 0.07));
  }
}

@keyframes eventNightPulse {
  0% {
    opacity: clamp(0.2, calc(0.34 + var(--night-phase) * 0.34), 0.78);
  }
  100% {
    opacity: clamp(0.28, calc(0.44 + var(--night-phase) * 0.42), 0.95);
  }
}

@keyframes glitterDrift {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(0, -160px, 0);
  }
}

@keyframes glitterDriftReverse {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(0, 120px, 0);
  }
}

@keyframes haloPulse {
  0% {
    opacity: 0.26;
  }
  100% {
    opacity: 0.58;
  }
}

@keyframes shineMove {
  from {
    transform: translateX(-20%) rotate(23deg);
  }
  to {
    transform: translateX(260%) rotate(23deg);
  }
}

@keyframes flowTraverse {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(calc(100% - 1.15rem));
  }
}

@keyframes mobileBackgroundCycle {
  0%,
  24% {
    filter: saturate(1.12) contrast(1.12) brightness(0.94) hue-rotate(-8deg);
  }
  52% {
    filter: saturate(1.06) contrast(1.16) brightness(0.78) hue-rotate(8deg);
  }
  78%,
  100% {
    filter: saturate(1.02) contrast(1.48) brightness(0.46) hue-rotate(25deg);
  }
}

@keyframes mobileSkyDayCycle {
  0%,
  44% {
    opacity: 1;
  }
  62%,
  100% {
    opacity: 0.22;
  }
}

@keyframes mobileSkyNightCycle {
  0%,
  48% {
    opacity: 0;
  }
  54%,
  100% {
    opacity: 1;
  }
}

@keyframes mobileSunCycle {
  0% {
    left: 37%;
    top: 0%;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  20% {
    left: 68%;
    top: 31.6%;
    opacity: 0.98;
    transform: translate(-50%, -50%) scale(0.96);
  }
  24% {
    left: 68%;
    top: 31.6%;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
  }
  100% {
    left: 68%;
    top: 31.6%;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
  }
}

@keyframes mobileMoonCycle {
  0% {
    left: 82%;
    top: 60.1%;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
  }
  18% {
    left: 82%;
    top: 60.1%;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
  }
  24% {
    left: 76%;
    top: 50%;
    opacity: 0.42;
    transform: translate(-50%, -50%) scale(0.94);
  }
  58% {
    left: 66%;
    top: 34%;
    opacity: 0.84;
    transform: translate(-50%, -50%) scale(0.96);
  }
  100% {
    left: 49.3%;
    top: 8.7%;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes mobileStarsCycle {
  0%,
  58% {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
  }
  76% {
    opacity: 0.76;
    transform: translateY(1px) scale(1);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1.02);
  }
}

@keyframes mobileStarsPulse {
  from {
    filter:
      brightness(1.02)
      drop-shadow(0 0 6px rgba(197, 230, 255, 0.3))
      drop-shadow(0 0 14px rgba(131, 220, 255, 0.24));
  }
  to {
    filter:
      brightness(1.18)
      drop-shadow(0 0 10px rgba(197, 230, 255, 0.45))
      drop-shadow(0 0 22px rgba(131, 220, 255, 0.34));
  }
}

@keyframes mobileNightDanceCycle {
  0%,
  58% {
    opacity: 0;
  }
  78%,
  100% {
    opacity: 0.88;
  }
}

@keyframes mobileIconAperitivoCycle {
  0%,
  3.2% {
    opacity: 0;
    transform: translateY(14px) scale(0.92);
  }
  4.2%,
  100% {
    opacity: 0.92;
    transform: translateY(0) scale(1);
  }
}

@keyframes mobileIconCenaCycle {
  0%,
  12.4% {
    opacity: 0;
    transform: translateY(14px) scale(0.92);
  }
  13.4%,
  100% {
    opacity: 0.92;
    transform: translateY(0) scale(1);
  }
}

@keyframes mobileIconMusicaCycle {
  0%,
  24.9% {
    opacity: 0;
    transform: translateY(14px) scale(0.92);
  }
  25.9%,
  100% {
    opacity: 0.92;
    transform: translateY(0) scale(1);
  }
}

@keyframes mobileIconChillCycle {
  0%,
  37.4% {
    opacity: 0;
    transform: translateY(14px) scale(0.92);
  }
  38.4%,
  100% {
    opacity: 0.92;
    transform: translateY(0) scale(1);
  }
}

@keyframes mobileNightDanceDrift {
  from {
    transform: translate3d(-4%, 3%, 0) scale(1.02);
  }
  to {
    transform: translate3d(4%, -3%, 0) scale(1.08);
  }
}

@keyframes eventSheen {
  from {
    transform: translateX(-16%) rotate(22deg);
  }
  to {
    transform: translateX(245%) rotate(22deg);
  }
}

@keyframes timelineFlux {
  from {
    background-position: 0% 0%;
  }
  to {
    background-position: 0% 180%;
  }
}

@keyframes timelineScan {
  from {
    background-position: 0% 0%;
  }
  to {
    background-position: 0% 210%;
  }
}

@keyframes cursorGemFloat {
  0% {
    transform: translate(-50%, -50%) rotate(45deg) scale(0.94);
  }
  50% {
    transform: translate(-50%, -50%) rotate(45deg) scale(1.08);
  }
  100% {
    transform: translate(-50%, -50%) rotate(45deg) scale(0.94);
  }
}

@keyframes cursorSparkleOrbit {
  from {
    transform: rotate(0deg) scale(0.95);
  }
  to {
    transform: rotate(360deg) scale(1.04);
  }
}

@keyframes cursorFlash {
  0% {
    opacity: 0.34;
    transform: translate(-50%, -50%) rotate(-45deg) scale(0.78);
  }
  50% {
    opacity: 0.9;
    transform: translate(-50%, -50%) rotate(-45deg) scale(1);
  }
  100% {
    opacity: 0.34;
    transform: translate(-50%, -50%) rotate(-45deg) scale(0.78);
  }
}

@keyframes markerSpark {
  0% {
    transform: rotate(45deg) scale(0.92);
    filter: saturate(1.02) brightness(0.98);
  }
  50% {
    transform: rotate(45deg) scale(1.08);
    filter: saturate(1.22) brightness(1.12);
  }
  100% {
    transform: rotate(45deg) scale(0.92);
    filter: saturate(1.02) brightness(0.98);
  }
}

@keyframes markerHalo {
  0% {
    opacity: 0.38;
    transform: scale(0.72);
  }
  50% {
    opacity: 0.88;
    transform: scale(1.18);
  }
  100% {
    opacity: 0.38;
    transform: scale(0.72);
  }
}

@keyframes cursorPulse {
  from {
    transform: translate(-50%, -50%) scale(0.95);
    filter: saturate(0.95);
  }
  to {
    transform: translate(-50%, -50%) scale(1.06);
    filter: saturate(1.12);
  }
}

@keyframes skylineNeon {
  from {
    filter:
      drop-shadow(0 0 3px rgba(255, 207, 77, 0.3))
      drop-shadow(0 0 7px rgba(255, 107, 231, 0.34))
      drop-shadow(0 0 9px rgba(103, 241, 255, 0.28));
  }
  to {
    filter:
      drop-shadow(0 0 6px rgba(255, 207, 77, 0.42))
      drop-shadow(0 0 11px rgba(255, 107, 231, 0.45))
      drop-shadow(0 0 14px rgba(103, 241, 255, 0.38));
  }
}

@keyframes skylineFloat {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-1px);
  }
}

@keyframes memorySparkleDrift {
  from {
    background-position: 0 0, 0 0, 0 0;
  }
  to {
    background-position: 0 -120px, 0 -90px, 0 -140px;
  }
}

@keyframes memorySheen {
  from {
    transform: translateX(-18%) rotate(18deg);
  }
  to {
    transform: translateX(235%) rotate(18deg);
  }
}

@keyframes audioPulse {
  0% {
    transform: scale(0.6);
    opacity: 0.48;
  }
  50% {
    transform: scale(1.72);
    opacity: 1;
  }
  100% {
    transform: scale(0.6);
    opacity: 0.48;
  }
}

@media (max-width: 820px) {
  .event-storyboard {
    display: none;
  }

  .event-mobile-immersive {
    margin-top: 1rem;
    display: grid;
    gap: 1rem;
  }

  .event-mobile-stage {
    --mobile-cycle-duration: 12s;
    position: relative;
    z-index: 0;
    isolation: isolate;
    min-height: clamp(288px, 68svh, 470px);
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.34);
    box-shadow:
      0 0 0 2px rgba(255, 255, 255, 0.12) inset,
      0 16px 38px rgba(0, 0, 0, 0.34);
  }

  .event-mobile-background {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 52%;
    transform: scale(1.02);
    filter:
      saturate(1.1)
      contrast(1.14)
      brightness(0.92);
    animation: mobileBackgroundCycle var(--mobile-cycle-duration) linear infinite;
  }

  .event-mobile-sky {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
  }

  .event-mobile-sky::before,
  .event-mobile-sky::after {
    content: "";
    position: absolute;
    inset: 0;
  }

  .event-mobile-sky::before {
    background:
      linear-gradient(
        180deg,
        rgba(255, 181, 118, 0.4) 0%,
        rgba(173, 107, 229, 0.24) 46%,
        rgba(25, 10, 61, 0.38) 100%
      );
    animation: mobileSkyDayCycle var(--mobile-cycle-duration) linear infinite;
  }

  .event-mobile-sky::after {
    background:
      linear-gradient(
        180deg,
        rgba(9, 20, 58, 0.32) 0%,
        rgba(12, 14, 54, 0.54) 44%,
        rgba(13, 6, 36, 0.74) 100%
      );
    opacity: 0;
    animation: mobileSkyNightCycle var(--mobile-cycle-duration) linear infinite;
  }

  .event-mobile-sun,
  .event-mobile-moon {
    position: absolute;
    border-radius: 999px;
  }

  .event-mobile-sun {
    width: 12.5%;
    aspect-ratio: 1;
    left: 37%;
    top: 0%;
    transform: translate(-50%, -50%);
    border: 2px solid rgba(255, 243, 190, 0.98);
    background:
      radial-gradient(
        circle,
        rgba(255, 255, 239, 0.98) 0 30%,
        rgba(255, 239, 170, 0.94) 42%,
        rgba(255, 208, 110, 0.86) 66%,
        rgba(255, 183, 72, 0.44) 100%
      );
    box-shadow:
      0 0 24px rgba(255, 220, 132, 0.92),
      0 0 56px rgba(255, 197, 89, 0.76);
    animation: mobileSunCycle var(--mobile-cycle-duration) linear infinite;
  }

  .event-mobile-moon {
    width: 8%;
    aspect-ratio: 1;
    left: 82%;
    top: 60.1%;
    transform: translate(-50%, -50%);
    background:
      radial-gradient(circle at 32% 30%, rgba(255, 255, 255, 0.86) 0 40%, rgba(228, 240, 255, 0.8) 62%, rgba(187, 207, 235, 0.66) 100%);
    box-shadow:
      0 0 22px rgba(214, 235, 255, 0.48),
      0 0 38px rgba(164, 197, 255, 0.34);
    opacity: 0;
    animation: mobileMoonCycle var(--mobile-cycle-duration) linear infinite;
  }

  .event-mobile-moon::after {
    content: "";
    position: absolute;
    inset: 7%;
    border-radius: inherit;
    background: rgba(18, 11, 42, 0.92);
    transform: translateX(30%);
  }

  .event-mobile-stars {
    position: absolute;
    inset: 0;
    opacity: 0;
    background:
      radial-gradient(circle at 12% 19%, rgba(255, 255, 255, 0.92) 0 0.32%, transparent 0.44%),
      radial-gradient(circle at 22% 8%, rgba(166, 224, 255, 0.9) 0 0.28%, transparent 0.4%),
      radial-gradient(circle at 34% 24%, rgba(255, 237, 191, 0.9) 0 0.31%, transparent 0.43%),
      radial-gradient(circle at 46% 12%, rgba(244, 251, 255, 0.9) 0 0.27%, transparent 0.38%),
      radial-gradient(circle at 58% 20%, rgba(186, 226, 255, 0.9) 0 0.31%, transparent 0.42%),
      radial-gradient(circle at 72% 14%, rgba(255, 255, 255, 0.92) 0 0.28%, transparent 0.39%),
      radial-gradient(circle at 84% 23%, rgba(251, 247, 219, 0.88) 0 0.32%, transparent 0.45%),
      radial-gradient(circle at 18% 36%, rgba(255, 255, 255, 0.88) 0 0.25%, transparent 0.36%),
      radial-gradient(circle at 39% 40%, rgba(176, 217, 255, 0.88) 0 0.29%, transparent 0.4%),
      radial-gradient(circle at 64% 34%, rgba(255, 247, 204, 0.86) 0 0.27%, transparent 0.38%),
      radial-gradient(circle at 77% 44%, rgba(255, 255, 255, 0.88) 0 0.24%, transparent 0.35%),
      radial-gradient(circle at 89% 33%, rgba(179, 220, 255, 0.88) 0 0.27%, transparent 0.38%),
      radial-gradient(circle at 8% 42%, rgba(255, 255, 255, 0.84) 0 0.23%, transparent 0.34%),
      radial-gradient(circle at 27% 52%, rgba(185, 225, 255, 0.84) 0 0.23%, transparent 0.34%),
      radial-gradient(circle at 53% 47%, rgba(255, 245, 214, 0.8) 0 0.21%, transparent 0.33%),
      radial-gradient(circle at 71% 41%, rgba(255, 255, 255, 0.82) 0 0.22%, transparent 0.33%),
      radial-gradient(circle at 88% 52%, rgba(180, 221, 255, 0.84) 0 0.22%, transparent 0.33%),
      radial-gradient(circle at 15% 61%, rgba(255, 247, 210, 0.78) 0 0.2%, transparent 0.3%),
      radial-gradient(circle at 35% 68%, rgba(255, 255, 255, 0.82) 0 0.2%, transparent 0.31%),
      radial-gradient(circle at 62% 63%, rgba(179, 221, 255, 0.84) 0 0.2%, transparent 0.31%),
      radial-gradient(circle at 79% 70%, rgba(255, 250, 224, 0.78) 0 0.2%, transparent 0.31%),
      radial-gradient(circle at 92% 63%, rgba(255, 255, 255, 0.8) 0 0.19%, transparent 0.3%),
      radial-gradient(circle at 6% 76%, rgba(255, 255, 255, 0.82) 0 0.19%, transparent 0.29%),
      radial-gradient(circle at 20% 82%, rgba(186, 227, 255, 0.82) 0 0.19%, transparent 0.29%),
      radial-gradient(circle at 41% 79%, rgba(255, 250, 224, 0.8) 0 0.19%, transparent 0.29%),
      radial-gradient(circle at 58% 84%, rgba(255, 255, 255, 0.8) 0 0.18%, transparent 0.28%),
      radial-gradient(circle at 74% 80%, rgba(191, 229, 255, 0.82) 0 0.19%, transparent 0.29%),
      radial-gradient(circle at 89% 85%, rgba(255, 249, 220, 0.8) 0 0.18%, transparent 0.28%);
    filter:
      brightness(1.12)
      drop-shadow(0 0 10px rgba(197, 230, 255, 0.45))
      drop-shadow(0 0 22px rgba(131, 220, 255, 0.34));
    animation:
      mobileStarsCycle var(--mobile-cycle-duration) linear infinite,
      mobileStarsPulse 2.4s ease-in-out infinite alternate;
  }

  .event-mobile-stars::before,
  .event-mobile-stars::after {
    content: "";
    position: absolute;
    inset: 0;
  }

  .event-mobile-stars::before {
    background:
      radial-gradient(circle at 6% 14%, rgba(255, 255, 255, 0.76) 0 0.17%, transparent 0.3%),
      radial-gradient(circle at 16% 9%, rgba(189, 227, 255, 0.72) 0 0.17%, transparent 0.3%),
      radial-gradient(circle at 26% 18%, rgba(255, 248, 220, 0.72) 0 0.17%, transparent 0.3%),
      radial-gradient(circle at 33% 11%, rgba(255, 255, 255, 0.72) 0 0.17%, transparent 0.3%),
      radial-gradient(circle at 41% 21%, rgba(184, 221, 255, 0.72) 0 0.17%, transparent 0.3%),
      radial-gradient(circle at 49% 9%, rgba(255, 251, 227, 0.72) 0 0.17%, transparent 0.3%),
      radial-gradient(circle at 57% 17%, rgba(255, 255, 255, 0.72) 0 0.17%, transparent 0.3%),
      radial-gradient(circle at 66% 8%, rgba(189, 227, 255, 0.72) 0 0.17%, transparent 0.3%),
      radial-gradient(circle at 75% 20%, rgba(255, 248, 220, 0.72) 0 0.17%, transparent 0.3%),
      radial-gradient(circle at 85% 11%, rgba(255, 255, 255, 0.72) 0 0.17%, transparent 0.3%),
      radial-gradient(circle at 94% 19%, rgba(185, 223, 255, 0.72) 0 0.17%, transparent 0.3%),
      radial-gradient(circle at 10% 30%, rgba(255, 255, 255, 0.68) 0 0.16%, transparent 0.28%),
      radial-gradient(circle at 23% 36%, rgba(190, 228, 255, 0.68) 0 0.16%, transparent 0.28%),
      radial-gradient(circle at 37% 31%, rgba(255, 249, 223, 0.68) 0 0.16%, transparent 0.28%),
      radial-gradient(circle at 52% 37%, rgba(255, 255, 255, 0.68) 0 0.16%, transparent 0.28%),
      radial-gradient(circle at 68% 32%, rgba(187, 226, 255, 0.68) 0 0.16%, transparent 0.28%),
      radial-gradient(circle at 82% 38%, rgba(255, 249, 223, 0.68) 0 0.16%, transparent 0.28%),
      radial-gradient(circle at 92% 30%, rgba(255, 255, 255, 0.68) 0 0.16%, transparent 0.28%);
    opacity: 0.84;
    animation: eventStarPulseB 3.4s ease-in-out infinite alternate-reverse;
  }

  .event-mobile-stars::after {
    background:
      radial-gradient(circle at 18% 24%, rgba(255, 102, 207, 0.46) 0 0.12%, transparent 0.2%),
      radial-gradient(circle at 43% 27%, rgba(106, 242, 255, 0.46) 0 0.12%, transparent 0.2%),
      radial-gradient(circle at 61% 22%, rgba(255, 217, 113, 0.44) 0 0.12%, transparent 0.2%),
      radial-gradient(circle at 73% 28%, rgba(163, 121, 255, 0.44) 0 0.12%, transparent 0.2%),
      radial-gradient(circle at 31% 43%, rgba(106, 242, 255, 0.4) 0 0.11%, transparent 0.18%),
      radial-gradient(circle at 57% 47%, rgba(255, 217, 113, 0.4) 0 0.11%, transparent 0.18%),
      radial-gradient(circle at 79% 44%, rgba(255, 102, 207, 0.4) 0 0.11%, transparent 0.18%),
      radial-gradient(circle at 12% 72%, rgba(106, 242, 255, 0.44) 0 0.11%, transparent 0.19%),
      radial-gradient(circle at 36% 77%, rgba(255, 102, 207, 0.42) 0 0.11%, transparent 0.19%),
      radial-gradient(circle at 64% 73%, rgba(255, 217, 113, 0.42) 0 0.11%, transparent 0.19%),
      radial-gradient(circle at 86% 76%, rgba(163, 121, 255, 0.42) 0 0.11%, transparent 0.19%);
    mix-blend-mode: screen;
    opacity: 0.88;
    animation: eventStarPulseC 2.1s ease-in-out infinite alternate;
  }

  .event-mobile-night-dance {
    position: absolute;
    inset: -16%;
    opacity: 0;
    mix-blend-mode: screen;
    background:
      radial-gradient(circle at 16% 72%, rgba(255, 61, 216, 0.3), transparent 42%),
      radial-gradient(circle at 84% 66%, rgba(87, 255, 241, 0.28), transparent 44%),
      radial-gradient(circle at 58% 28%, rgba(255, 199, 87, 0.22), transparent 38%);
    animation:
      mobileNightDanceCycle var(--mobile-cycle-duration) linear infinite,
      mobileNightDanceDrift 6.2s linear infinite;
  }

  .event-mobile-icon {
    position: absolute;
    z-index: 3;
    margin: 0;
    opacity: 0;
    transform: translateY(0) scale(1);
  }

  .event-mobile-icon img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    mix-blend-mode: screen;
    filter:
      drop-shadow(0 0 3px rgba(255, 255, 255, 0.6))
      drop-shadow(0 0 16px rgba(103, 241, 255, 0.42))
      drop-shadow(0 12px 24px rgba(5, 3, 20, 0.36));
    animation: eventMomentDrift 6.6s ease-in-out infinite;
  }

  .mobile-icon-aperitivo {
    left: 8%;
    top: 25%;
    width: 15%;
    animation: mobileIconAperitivoCycle var(--mobile-cycle-duration) linear infinite;
  }

  .mobile-icon-cena {
    left: 72.78%;
    top: 65.23%;
    width: 22%;
    animation: mobileIconCenaCycle var(--mobile-cycle-duration) linear infinite;
  }

  .mobile-icon-musica {
    left: 39.81%;
    top: 41%;
    width: 25%;
    animation: mobileIconMusicaCycle var(--mobile-cycle-duration) linear infinite;
  }

  .mobile-icon-chill {
    left: 8%;
    top: 66%;
    width: 15%;
    animation: mobileIconChillCycle var(--mobile-cycle-duration) linear infinite;
  }

  .mobile-icon-aperitivo img {
    animation-delay: -0.2s;
  }

  .mobile-icon-cena img {
    animation-delay: -1.8s;
  }

  .mobile-icon-musica img {
    animation-delay: -3.2s;
  }

  .mobile-icon-chill img {
    animation-delay: -4.6s;
  }

  .event-mobile-copy-list {
    display: grid;
    gap: 0.7rem;
    padding: 0 0.1rem;
  }

  .event-mobile-copy-item {
    position: relative;
    padding: 0 0 0.82rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  }

  .event-mobile-copy-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  .event-mobile-copy-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.42rem;
    width: 0.46rem;
    height: 0.46rem;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--gold), var(--aqua));
    box-shadow:
      0 0 0 2px rgba(255, 255, 255, 0.26),
      0 0 10px rgba(255, 207, 77, 0.45);
  }

  .event-mobile-copy-item h3 {
    margin: 0;
    font-size: clamp(0.98rem, 3.2vw, 1.12rem);
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--gold) 92%, #fff 8%);
    text-shadow: 0 0 12px rgba(255, 209, 95, 0.28);
  }

  .event-mobile-copy-item p {
    margin: 0.36rem 0 0;
    font-size: clamp(0.94rem, 2.8vw, 1.04rem);
    line-height: 1.44;
    color: color-mix(in srgb, #fff 90%, var(--aqua) 10%);
  }

  .event-mobile-stage * {
    animation-play-state: paused !important;
  }

  .event-mobile-sky::before,
  .event-mobile-sky::after {
    animation-play-state: paused !important;
  }

  .event-mobile-immersive.is-playing .event-mobile-stage * {
    animation-play-state: running !important;
  }

  .event-mobile-immersive.is-playing .event-mobile-sky::before,
  .event-mobile-immersive.is-playing .event-mobile-sky::after {
    animation-play-state: running !important;
  }

  .mobile-gif {
    display: block;
    margin-bottom: 1rem;
  }

  .hero-stage {
    grid-template-columns: 1fr;
  }

  .desktop-gif {
    display: none;
  }

  .event-photo-stage {
    min-height: clamp(430px, 78svh, 650px);
  }

  .event-moment-copy {
    padding: 0.5rem 0.65rem 0.62rem;
  }

  .event-moment-copy::before {
    top: 0.95rem;
    left: -2.2rem;
    width: clamp(30px, 6vw, 56px);
  }

  .moment-cena .event-moment-copy::before {
    right: -2.2rem;
    left: auto;
  }

  .practical-grid {
    grid-template-columns: 1fr;
    grid-template-areas: none;
  }

  .practical-grid .info-card {
    grid-area: auto;
    padding: 0;
    overflow: hidden;
  }

  .practical-grid .info-card-summary {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 2.2rem;
    padding: 0.95rem 3.6rem 0.95rem 0.95rem;
    cursor: pointer;
  }

  .practical-grid .info-card-body {
    margin-top: 0;
    padding: 0 0.95rem 0.95rem;
  }

  .countdown-stage {
    grid-template-columns: 1fr;
  }

  .countdown-photo-shell {
    padding: 0;
  }

  .countdown-photo-card {
    min-height: clamp(150px, 40vw, 210px);
  }

  .rsvp-skyline {
    width: clamp(138px, 35vw, 205px);
    top: 0.5rem;
    right: 0.55rem;
  }

  html[dir="rtl"] .rsvp-skyline {
    right: auto;
    left: 0.55rem;
  }

  #rsvpTitle {
    max-width: calc(100% - 8.5rem);
  }

  .rsvp-layout {
    grid-template-columns: 1fr;
  }

  .rsvp-community-grid {
    grid-template-columns: 1fr;
    gap: 0.58rem;
  }

  .rsvp-community-card {
    transform: none !important;
    min-height: 0;
  }

  .rsvp-community-card h3 {
    font-size: var(--font-sm);
  }

  .rsvp-community-card p {
    font-size: var(--font-xs);
  }

  .rsvp-community-visual {
    height: 2.08rem;
  }

  .memory-capsule {
    margin-top: 0.5rem;
    margin-inline-start: 0;
  }
}

@media (max-width: 620px) {
  .invite {
    width: min(740px, 94vw);
    padding-top: 1rem;
  }

  .event-mobile-stage {
    min-height: clamp(250px, 58svh, 360px);
    border-radius: 16px;
  }

  .mobile-icon-aperitivo {
    width: 15%;
    top: 25%;
  }

  .mobile-icon-cena {
    width: 22%;
    left: 72.78%;
    top: 65.23%;
  }

  .mobile-icon-musica {
    width: 25%;
    left: 39.81%;
    top: 41%;
  }

  .mobile-icon-chill {
    width: 15%;
    left: 8%;
    top: 66%;
  }

  .event-mobile-copy-list {
    gap: 0.62rem;
    padding: 0;
  }

  .event-mobile-copy-item {
    padding: 0 0 0.74rem 0.9rem;
  }

  .event-mobile-copy-item::before {
    top: 0.36rem;
    width: 0.4rem;
    height: 0.4rem;
  }

  .event-mobile-copy-item h3 {
    font-size: clamp(0.92rem, 3.5vw, 1.02rem);
    letter-spacing: 0.06em;
  }

  .event-mobile-copy-item p {
    font-size: clamp(0.88rem, 3.3vw, 0.98rem);
    line-height: 1.38;
  }

  .lang-switch {
    justify-content: center;
    margin-bottom: 0.75rem;
  }

  .event-storyboard-sticky {
    top: clamp(1.8rem, 4.8vh, 2.8rem);
    padding: 0;
  }

  .event-photo-stage {
    min-height: clamp(450px, 80svh, 680px);
  }

  .event-sun {
    width: clamp(94px, 24vw, 132px);
  }

  .event-moon {
    width: clamp(42px, 12vw, 60px);
  }

  .event-night-dance {
    inset: -26%;
  }

  .event-moment-copy {
    padding: 0.44rem 0.58rem 0.54rem;
  }

  .event-moment-copy::before {
    top: 0.82rem;
    left: -1.8rem;
    right: auto;
    width: clamp(20px, 7vw, 34px);
    transform: rotate(-6deg);
  }

  .moment-cena .event-moment-copy::before {
    left: auto;
    right: -1.8rem;
    transform: rotate(6deg);
  }

  .event-moment h3 {
    font-size: 0.77rem;
    letter-spacing: 0.05em;
  }

  .event-moment p {
    font-size: 0.7rem;
    line-height: 1.34;
  }

  .countdown {
    gap: 0.5rem;
  }

  .countdown-shell {
    padding: 1rem;
  }

  .countdown-photo-shell {
    order: -1;
    padding: 0;
    margin-bottom: 0.7rem;
  }

  .countdown-photo-card {
    min-height: clamp(82px, 24vw, 108px);
  }

  .rsvp-skyline {
    position: relative;
    top: auto;
    right: auto;
    width: min(100%, 330px);
    margin: 0 auto 0.55rem;
  }

  #rsvpTitle {
    max-width: 100%;
  }

  .rsvp-form {
    width: 100%;
    padding-inline: clamp(0.15rem, 1.8vw, 0.5rem);
  }

  .memory-capsule {
    max-width: none;
    margin-top: 0;
    margin-inline-start: 0;
    padding: 0.74rem 0.68rem 0.68rem;
  }

  .memory-topbar {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.36rem;
  }

  .memory-mode-switch {
    justify-self: start;
    padding: 0.14rem;
    gap: 0.16rem;
  }

  .memory-mode-button {
    min-width: 2.16rem;
    padding: 0.34rem;
    font-size: var(--font-2xs);
  }

  .memory-actions {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 0.24rem;
  }

  #memoryRecordButton,
  #memoryStopButton {
    width: 3rem;
    height: 3rem;
  }

  .memory-gesture-hint {
    font-size: var(--font-2xs);
  }

  .memory-prompt-card {
    width: min(94vw, 430px);
    padding: 1.05rem 0.86rem 0.84rem;
  }

  #memoryPromptTitle {
    font-size: var(--font-md);
  }

  .memory-prompt-text {
    font-size: var(--font-sm);
  }

  .memory-prompt-actions {
    grid-template-columns: 1fr;
    gap: 0.38rem;
  }

  .memory-prompt-button {
    min-height: 2.2rem;
  }

  .upload-modal-card {
    width: min(94vw, 430px);
    padding: 1.04rem 0.82rem 0.82rem;
  }

  #uploadModalTitle {
    font-size: var(--font-md);
  }

  .upload-modal-text {
    font-size: var(--font-xs);
  }

  .upload-dropzone {
    padding: 0.72rem;
    font-size: var(--font-xs);
  }

  .upload-modal-actions {
    grid-template-columns: 1fr;
    gap: 0.36rem;
  }

  .song-modal-card {
    width: min(94vw, 460px);
    padding: 1.02rem 0.82rem 0.82rem;
  }

  #songModalTitle {
    font-size: 0.86rem;
  }

  .song-modal-text {
    font-size: var(--font-xs);
  }

  .song-request-list {
    max-height: min(180px, 22vh);
  }

  .song-identity-options {
    grid-template-columns: 1fr;
  }
}

/* Rides page */
.rides-invite {
  width: min(1160px, 94vw);
}

.rides-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
}

.rides-topbar .lang-switch {
  margin: 0;
}

.rides-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  text-decoration: none;
  color: #fff;
  font-family: "Bungee", sans-serif;
  font-size: var(--font-xs);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 999px;
  padding: 0.46rem 0.78rem;
  background: rgba(19, 0, 31, 0.56);
  box-shadow:
    0 0 8px rgba(255, 107, 231, 0.24),
    0 0 12px rgba(103, 241, 255, 0.17);
  transition: transform 150ms ease, filter 150ms ease;
}

.rides-back-link::before {
  content: "<";
  font-family: "Sora", sans-serif;
  font-size: var(--font-sm);
  line-height: 1;
}

html[dir="rtl"] .rides-back-link {
  flex-direction: row-reverse;
}

html[dir="rtl"] .rides-back-link::before {
  content: ">";
}

.rides-back-link:hover,
.rides-back-link:focus-visible {
  transform: translateY(-1px);
  filter: saturate(1.07);
}

.rides-hero {
  margin-top: 0.85rem;
  padding-bottom: clamp(1.6rem, 5vw, 2.3rem);
}

.rides-hero-note {
  margin: 0.7rem 0 0;
  color: color-mix(in srgb, #ffffff 88%, var(--gold) 12%);
  font-size: var(--font-sm);
  line-height: 1.5;
  max-width: 66ch;
  font-style: italic;
}

.rides-grid {
  margin-top: 1rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  align-items: start;
}

.rides-form-shell,
.rides-board-shell,
.rides-helper-shell {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.rides-form-shell::before,
.rides-board-shell::before,
.rides-helper-shell::before {
  content: "";
  position: absolute;
  inset: -35% auto auto -28%;
  width: 60%;
  height: 220%;
  transform: rotate(23deg);
  background: linear-gradient(
    180deg,
    transparent,
    rgba(255, 255, 255, 0.28),
    transparent
  );
  animation: shineMove 8s linear infinite;
  pointer-events: none;
}

.rides-form-shell,
.rides-board-shell {
  padding: clamp(1.1rem, 3vw, 1.45rem);
}

.rides-mode-switch {
  margin-top: 0.85rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.42rem;
  padding: 0.26rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(10, 2, 18, 0.34);
}

.rides-mode-button {
  border: 0;
  border-radius: 999px;
  padding: 0.58rem 0.6rem;
  background: transparent;
  color: color-mix(in srgb, #ffffff 82%, var(--aqua) 18%);
  font-family: "Sora", sans-serif;
  font-size: var(--font-xs);
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 160ms ease, filter 160ms ease, color 160ms ease;
}

.rides-mode-button:hover {
  transform: translateY(-1px);
}

.rides-mode-button.is-active {
  color: #180024;
  background: linear-gradient(92deg, var(--gold), #ff6be7, var(--aqua));
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.44) inset,
    0 0 12px rgba(255, 107, 231, 0.38);
}

.rides-form {
  margin-top: 0.9rem;
  display: grid;
  gap: 0.72rem;
}

.rides-form label {
  display: grid;
  gap: 0.4rem;
  color: var(--muted);
  font-size: var(--font-sm);
}

.rides-form input,
.rides-form textarea {
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 13px;
  background: rgba(17, 5, 29, 0.74);
  color: #fff;
  padding: 0.74rem 0.82rem;
  font: inherit;
}

.rides-form input:focus,
.rides-form textarea:focus,
.rides-search-label input:focus {
  outline: 2px solid rgba(103, 241, 255, 0.85);
  outline-offset: 1px;
}

.rides-board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.rides-count-badge {
  min-width: 2rem;
  height: 2rem;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid transparent;
  background:
    linear-gradient(rgba(18, 2, 31, 0.78), rgba(18, 2, 31, 0.78)) padding-box,
    linear-gradient(130deg, var(--gold), #ff6be7, var(--aqua)) border-box;
  font-family: "Bungee", sans-serif;
  font-size: var(--font-sm);
  box-shadow:
    0 0 14px rgba(255, 107, 231, 0.32),
    0 0 18px rgba(103, 241, 255, 0.26);
}

.rides-filters {
  margin-top: 0.84rem;
  display: grid;
  gap: 0.72rem;
}

.rides-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.rides-filter-button {
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  background: rgba(10, 2, 18, 0.48);
  color: #fff;
  font-family: "Sora", sans-serif;
  font-size: var(--font-2xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: transform 150ms ease, filter 150ms ease;
}

.rides-filter-button:hover {
  transform: translateY(-1px);
}

.rides-filter-button.is-active {
  border-color: rgba(255, 255, 255, 0.78);
  background: linear-gradient(95deg, rgba(255, 207, 77, 0.92), rgba(255, 107, 231, 0.92));
  color: #180024;
}

.rides-search-label {
  display: grid;
  gap: 0.36rem;
  color: var(--muted);
  font-size: var(--font-xs);
}

.rides-search-label input {
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 13px;
  background: rgba(17, 5, 29, 0.74);
  color: #fff;
  padding: 0.64rem 0.82rem;
  font: inherit;
}

.rides-list {
  list-style: none;
  margin: 0.95rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.68rem;
  max-height: 67svh;
  overflow: auto;
  padding-right: 0.18rem;
}

.ride-card {
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 16px;
  padding: 0.78rem;
  background: rgba(255, 255, 255, 0.06);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 10px 24px rgba(0, 0, 0, 0.22);
}

.ride-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.58rem;
}

.ride-name {
  margin: 0;
  font-weight: 800;
  font-size: var(--font-md);
}

.ride-type-badge {
  border-radius: 999px;
  padding: 0.24rem 0.56rem;
  font-size: var(--font-2xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.ride-type-badge.is-offer {
  background: rgba(103, 241, 255, 0.2);
  color: color-mix(in srgb, #ffffff 84%, var(--aqua) 16%);
  border: 1px solid rgba(103, 241, 255, 0.45);
}

.ride-type-badge.is-request {
  background: rgba(255, 107, 231, 0.2);
  color: color-mix(in srgb, #ffffff 84%, #ff6be7 16%);
  border: 1px solid rgba(255, 107, 231, 0.45);
}

.ride-meta {
  margin-top: 0.58rem;
  display: grid;
  gap: 0.34rem;
}

.ride-meta-row {
  margin: 0;
  display: flex;
  gap: 0.32rem;
  font-size: var(--font-sm);
  line-height: 1.44;
}

.ride-meta-label {
  color: var(--aqua);
  font-weight: 700;
  text-transform: uppercase;
  font-size: var(--font-2xs);
  letter-spacing: 0.06em;
  min-width: 5rem;
  flex-shrink: 0;
}

.ride-meta-value {
  color: var(--muted);
}

.ride-card-footer {
  margin-top: 0.7rem;
  display: grid;
  gap: 0.48rem;
}

.ride-posted {
  margin: 0;
  font-size: var(--font-xs);
  color: color-mix(in srgb, #ffffff 78%, var(--gold) 22%);
}

.ride-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.ride-action-button,
.ride-action-link {
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 999px;
  padding: 0.36rem 0.66rem;
  background: rgba(17, 5, 29, 0.66);
  color: #fff;
  font-family: "Sora", sans-serif;
  font-size: var(--font-2xs);
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: transform 140ms ease, filter 140ms ease;
}

.ride-action-button:hover,
.ride-action-link:hover {
  transform: translateY(-1px);
  filter: saturate(1.08);
}

.ride-action-button.is-danger {
  color: #ffd7ef;
  border-color: rgba(255, 107, 231, 0.52);
}

.rides-empty-state {
  margin-top: 0.95rem;
  border-radius: 15px;
  border: 1px dashed rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.06);
  padding: 0.9rem;
}

.rides-empty-state h3 {
  margin: 0;
  font-size: var(--font-sm);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--aqua);
}

.rides-empty-state p {
  margin: 0.38rem 0 0;
  color: var(--muted);
  font-size: var(--font-sm);
}

.rides-helper-shell {
  margin-top: 1rem;
  padding: clamp(1rem, 2.7vw, 1.3rem);
}

.rides-helper-shell p {
  margin: 0.7rem 0 0;
  color: var(--muted);
  font-size: var(--font-sm);
  line-height: 1.55;
}

.rides-helper-shell .info-link {
  display: inline-block;
  margin-top: 0.72rem;
}

@media (max-width: 980px) {
  .rides-grid {
    grid-template-columns: 1fr;
  }

  .rides-list {
    max-height: none;
  }
}

@media (max-width: 620px) {
  .rides-topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.7rem;
  }

  .rides-topbar .lang-switch {
    justify-content: center;
  }

  .rides-back-link {
    justify-content: center;
  }

  .rides-mode-switch {
    grid-template-columns: 1fr;
    border-radius: 16px;
  }

  .ride-meta-row {
    flex-direction: column;
    gap: 0.06rem;
  }

  .ride-meta-label {
    min-width: 0;
  }
}
