/* =========================================================
   DiwaliGlow — festive wishes website
   Built with HTML5, CSS3 and vanilla JavaScript
   ========================================================= */

/* ---------- Design tokens ---------- */
:root {
  --bg: #080517;
  --bg-soft: #100a26;
  --bg-deep: #060312;
  --panel: #160e2d;
  --panel-light: #21143d;
  --cream: #fff6e4;
  --cream-soft: #f0e4d1;
  --muted: #c4b4d2;
  --muted-dark: #8f7ca4;
  --gold: #f3c565;
  --gold-bright: #ffe6a3;
  --gold-deep: #c88d2c;
  --orange: #ff8a3d;
  --red: #e44f4f;
  --rose: #d8749e;
  --green: #35b678;
  --line: rgba(243, 197, 101, 0.2);
  --line-soft: rgba(255, 246, 228, 0.09);
  --glass: rgba(20, 12, 42, 0.72);
  --shadow-card: 0 30px 80px rgba(0, 0, 0, 0.36);
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Outfit", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-script: "Great Vibes", "Segoe Script", cursive;
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --container: 1180px;
  --header-h: 82px;
}

/* ---------- Reset & base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: auto;
}

html.motion-on {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background:
    radial-gradient(ellipse at 12% 5%, rgba(108, 54, 146, 0.3), transparent 36%),
    radial-gradient(ellipse at 88% 17%, rgba(205, 106, 43, 0.13), transparent 32%),
    radial-gradient(ellipse at 50% 100%, rgba(88, 31, 77, 0.22), transparent 43%),
    linear-gradient(180deg, #090519 0%, #130a2a 34%, #0b0820 65%, #070411 100%);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
  opacity: 0.32;
  background-image:
    radial-gradient(circle, rgba(255, 232, 171, 0.9) 0 1px, transparent 1.6px),
    radial-gradient(circle, rgba(243, 197, 101, 0.55) 0 1px, transparent 1.5px);
  background-position: 0 0, 29px 37px;
  background-size: 73px 73px, 109px 109px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.5) 45%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.5) 45%, transparent 100%);
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.16;
  background-image: radial-gradient(rgba(255, 255, 255, 0.22) 0.5px, transparent 0.6px);
  background-size: 5px 5px;
  mix-blend-mode: soft-light;
}

#fx-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

main {
  position: relative;
  z-index: 1;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
}

h2 {
  margin-bottom: 1rem;
  font-size: clamp(2.25rem, 4.7vw, 3.9rem);
  line-height: 1.02;
  text-wrap: balance;
}

h3 {
  line-height: 1.15;
}

p {
  color: var(--muted);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

svg {
  display: block;
  max-width: 100%;
}

::selection {
  color: #1d1007;
  background: var(--gold-bright);
}

:focus-visible {
  outline: 3px solid var(--gold-bright);
  outline-offset: 4px;
  border-radius: 6px;
}

[hidden] {
  display: none !important;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 0.7rem 1rem;
  border-radius: 8px;
  background: var(--gold);
  color: #1a0d04;
  font-weight: 700;
  transform: translateY(-150%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.container {
  width: min(var(--container), calc(100% - 2.75rem));
  margin-inline: auto;
}

.section-pad {
  padding-block: clamp(4rem, 8vw, 7rem);
}

section[id],
div[id] {
  scroll-margin-top: calc(var(--header-h) + 24px);
}

.anchor-target {
  display: block;
  height: 0;
  scroll-margin-top: calc(var(--header-h) + 18px);
}

/* ---------- Shared type and controls ---------- */
.kicker {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1rem;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.21em;
  line-height: 1.4;
  text-transform: uppercase;
}

.kicker::before {
  width: 28px;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--gold));
}

.section-heading {
  max-width: 700px;
  margin-bottom: clamp(2rem, 4vw, 3.4rem);
}

.section-heading > p:last-child {
  max-width: 610px;
  margin-bottom: 0;
  font-size: 1.03rem;
}

.section-heading.centered {
  margin-inline: auto;
  text-align: center;
}

.section-heading.centered .kicker {
  justify-content: center;
}

.section-heading.centered > p:last-child {
  margin-inline: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 52px;
  padding: 0.8rem 1.4rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.btn svg {
  width: 19px;
  height: 19px;
}

.btn-primary {
  position: relative;
  overflow: hidden;
  color: #261307;
  background: linear-gradient(125deg, #ffe7a3 0%, #f4c45d 46%, #f5a943 100%);
  box-shadow: 0 12px 34px rgba(227, 162, 55, 0.23), inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.btn-primary::after {
  position: absolute;
  top: -20%;
  left: -35%;
  width: 24%;
  height: 140%;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  transform: rotate(18deg);
}

html.motion-on .btn-primary::after {
  animation: button-shine 5.5s ease-in-out infinite;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(227, 162, 55, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-ghost {
  border-color: var(--line);
  color: var(--cream);
  background: rgba(255, 255, 255, 0.035);
}

.btn-ghost:hover {
  border-color: rgba(243, 197, 101, 0.48);
  background: rgba(243, 197, 101, 0.08);
  transform: translateY(-1px);
}

.btn-wide {
  width: 100%;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 60;
  padding: 0.85rem 0;
  transition: padding 0.3s ease;
}

.site-header::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  border-bottom: 1px solid transparent;
  background: rgba(8, 5, 23, 0.68);
  opacity: 0;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: opacity 0.3s ease, border-color 0.3s ease;
}

.site-header.is-scrolled {
  padding: 0.55rem 0;
}

.site-header.is-scrolled::before {
  border-color: var(--line-soft);
  opacity: 1;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  min-height: 54px;
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.65rem;
  border-radius: 10px;
}

.brand-icon {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  border: 1px solid rgba(243, 197, 101, 0.36);
  border-radius: 50%;
  color: var(--gold);
  background: radial-gradient(circle at 50% 25%, rgba(255, 202, 98, 0.19), rgba(31, 15, 52, 0.7) 67%);
  box-shadow: 0 0 24px rgba(243, 197, 101, 0.1);
}

.brand-icon svg {
  width: 31px;
  height: 31px;
}

.brand-word {
  font-family: var(--font-display);
  font-size: 1.58rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.brand-word span {
  color: var(--gold);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.4vw, 1.9rem);
}

.main-nav a {
  position: relative;
  padding: 0.4rem 0;
  color: rgba(255, 246, 228, 0.72);
  font-size: 0.89rem;
  font-weight: 400;
  transition: color 0.2s ease;
}

.main-nav a::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  content: "";
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.main-nav a:hover {
  color: var(--gold-bright);
}

.main-nav a:hover::after {
  transform: scaleX(1);
}

.nav-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.55rem;
}

.motion-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.48rem;
  min-height: 42px;
  padding: 0.45rem 0.78rem;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  color: var(--cream-soft);
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.75rem;
  font-weight: 500;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.motion-toggle:hover {
  border-color: var(--line);
  background: rgba(243, 197, 101, 0.07);
}

.motion-toggle svg {
  width: 15px;
  height: 15px;
  color: var(--gold);
}

.motion-icon-off {
  display: none;
}

.motion-toggle[aria-pressed="false"] .motion-icon-on {
  display: none;
}

.motion-toggle[aria-pressed="false"] .motion-icon-off {
  display: block;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line-soft);
  border-radius: 50%;
  color: var(--cream);
  background: rgba(255, 255, 255, 0.035);
}

.menu-toggle svg {
  width: 21px;
  height: 21px;
  margin: auto;
}

.menu-icon-close {
  display: none;
}

.menu-toggle[aria-expanded="true"] .menu-icon-open {
  display: none;
}

.menu-toggle[aria-expanded="true"] .menu-icon-close {
  display: block;
}

.mobile-nav {
  position: absolute;
  top: calc(100% + 0.32rem);
  right: 1.375rem;
  left: 1.375rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(14, 8, 31, 0.97);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.mobile-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0.6rem 0.85rem;
  border-radius: 11px;
  color: var(--cream-soft);
  font-size: 0.95rem;
}

.mobile-nav a + a {
  border-top: 1px solid var(--line-soft);
  border-radius: 0 0 11px 11px;
}

.mobile-nav a:hover {
  color: var(--gold-bright);
  background: rgba(243, 197, 101, 0.06);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex;
  min-height: auto;
  align-items: center;
  overflow: hidden;
  padding: clamp(3rem, 6vh, 4.5rem) 0 clamp(3.5rem, 7vh, 5rem);
}

.hero::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    radial-gradient(ellipse at 81% 39%, rgba(213, 111, 47, 0.14), transparent 29%),
    radial-gradient(ellipse at 18% 62%, rgba(109, 49, 134, 0.2), transparent 33%),
    linear-gradient(180deg, transparent 63%, rgba(8, 5, 23, 0.55) 88%, #080517 100%);
}

.hero-atmosphere {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.light-rays {
  position: absolute;
  top: -28%;
  right: -7%;
  width: 78vw;
  height: 110vh;
  opacity: 0.28;
  background: conic-gradient(from 220deg at 70% 34%, transparent 0deg, rgba(255, 207, 112, 0.08) 8deg, transparent 16deg, transparent 28deg, rgba(255, 180, 79, 0.08) 34deg, transparent 42deg, transparent 58deg, rgba(255, 220, 141, 0.05) 65deg, transparent 74deg);
  -webkit-mask-image: radial-gradient(ellipse at 70% 34%, #000 0%, transparent 67%);
  mask-image: radial-gradient(ellipse at 70% 34%, #000 0%, transparent 67%);
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
}

.hero-glow-one {
  top: 16%;
  right: 8%;
  width: 34rem;
  height: 34rem;
  opacity: 0.18;
  background: #e9a13d;
}

.hero-glow-two {
  bottom: 7%;
  left: -9%;
  width: 24rem;
  height: 24rem;
  opacity: 0.17;
  background: #8b3e87;
}

.star {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--gold-bright);
  box-shadow: 0 0 9px 2px rgba(255, 226, 155, 0.55);
}

.star-a { top: 18%; left: 7%; }
.star-b { top: 31%; left: 44%; width: 2px; height: 2px; animation-delay: 0.8s; }
.star-c { top: 13%; left: 58%; animation-delay: 1.7s; }
.star-d { top: 72%; left: 4%; width: 2px; height: 2px; animation-delay: 2.6s; }
.star-e { top: 84%; right: 12%; animation-delay: 1.3s; }
.star-f { top: 47%; right: 4%; width: 2px; height: 2px; animation-delay: 3.1s; }

html.motion-on .star {
  animation: twinkle 4.2s ease-in-out infinite;
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(390px, 0.94fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
}

.hero-copy {
  max-width: 655px;
}

.eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
  color: var(--gold);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.19em;
  line-height: 1.6;
  text-transform: uppercase;
}

.eyebrow-line {
  display: inline-block;
  width: 32px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}

.eyebrow-dot {
  color: var(--orange);
  font-size: 0.65rem;
}

.hero h1 {
  margin-bottom: 1.25rem;
  font-size: clamp(3.2rem, 6.65vw, 6.6rem);
  font-weight: 600;
  line-height: 0.93;
  letter-spacing: -0.045em;
  background: linear-gradient(105deg, #fff7de 3%, #ffe5a0 31%, #f3bd59 61%, #ffdf90 88%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 8px 30px rgba(238, 168, 61, 0.15));
  text-wrap: balance;
}

.h1-sparkle {
  display: inline-block;
  margin-inline: 0.08em;
  font-size: 0.38em;
  line-height: 1;
  vertical-align: 0.46em;
  filter: drop-shadow(0 0 18px rgba(255, 207, 103, 0.4));
}

.h1-words {
  display: inline;
}

.hero-sub {
  max-width: 545px;
  margin-bottom: 1.65rem;
  color: var(--cream-soft);
  font-size: clamp(1.02rem, 1.5vw, 1.16rem);
  font-weight: 300;
  line-height: 1.7;
}

/* ---------- Generator form ---------- */
.wish-form {
  max-width: 560px;
  padding: 1.15rem;
  border: 1px solid rgba(243, 197, 101, 0.24);
  border-radius: 22px;
  background:
    linear-gradient(140deg, rgba(255, 246, 228, 0.055), transparent 40%),
    rgba(20, 12, 42, 0.72);
  box-shadow: 0 22px 65px rgba(0, 0, 0, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.form-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem 1rem;
  margin-bottom: 0.85rem;
  color: var(--cream-soft);
  font-size: 0.71rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.form-badge {
  color: var(--gold);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: none;
}

.wish-form label {
  display: block;
  margin-bottom: 0.42rem;
  color: var(--cream);
  font-size: 0.88rem;
  font-weight: 500;
}

.input-shell {
  display: flex;
  align-items: center;
  border: 1px solid rgba(255, 246, 228, 0.16);
  border-radius: 14px;
  background: rgba(5, 3, 16, 0.53);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.input-shell:focus-within {
  border-color: rgba(243, 197, 101, 0.72);
  background: rgba(5, 3, 16, 0.7);
  box-shadow: 0 0 0 4px rgba(243, 197, 101, 0.1);
}

.wish-form.has-error .input-shell {
  border-color: rgba(255, 122, 122, 0.8);
  box-shadow: 0 0 0 4px rgba(255, 122, 122, 0.08);
}

.input-icon {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  margin-left: 0.95rem;
  color: var(--gold);
  opacity: 0.8;
}

#name-input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 52px;
  padding: 0.65rem 0.55rem;
  border: 0;
  outline: 0;
  color: var(--cream);
  background: transparent;
  font-size: 1rem;
}

#name-input::placeholder {
  color: rgba(196, 180, 210, 0.63);
}

.name-count {
  flex: 0 0 auto;
  margin-right: 0.9rem;
  color: var(--muted-dark);
  font-size: 0.67rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
}

.form-error {
  display: flex;
  align-items: flex-start;
  gap: 0.42rem;
  margin: 0.55rem 0 0;
  color: #ffb1b1;
  font-size: 0.81rem;
  line-height: 1.45;
}

.form-error::before {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  margin-top: 0.05rem;
  content: "!";
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 13px;
  text-align: center;
}

.btn-generate {
  width: 100%;
  min-height: 55px;
  margin-top: 0.8rem;
  font-size: 0.98rem;
}

.form-hint {
  margin: 0.68rem 0 0;
  color: var(--muted-dark);
  font-size: 0.72rem;
  line-height: 1.5;
}

.hero-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.1rem;
  margin-top: 1.2rem;
}

.hero-notes span {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  color: var(--muted);
  font-size: 0.74rem;
}

.hero-notes svg {
  width: 14px;
  height: 14px;
  color: var(--gold);
}

/* ---------- Hero art ---------- */
.hero-visual {
  position: relative;
  width: min(100%, 570px);
  aspect-ratio: 1;
  margin-inline: auto;
}

.visual-halo {
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 190, 86, 0.2) 0%, rgba(255, 142, 57, 0.06) 38%, transparent 68%);
  filter: blur(5px);
}

.visual-halo::after {
  position: absolute;
  inset: 12%;
  content: "";
  border: 1px solid rgba(243, 197, 101, 0.15);
  border-radius: 50%;
  box-shadow: 0 0 85px rgba(243, 177, 66, 0.14), inset 0 0 60px rgba(243, 177, 66, 0.035);
}

.rangoli-shell {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.rangoli-art {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 22px rgba(240, 161, 56, 0.1));
}

html.motion-on .rangoli-art {
  animation: rangoli-turn 150s linear infinite;
}

.visual-plaque {
  position: absolute;
  display: flex;
  width: 47%;
  aspect-ratio: 1;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  padding: 9%;
  border: 1px solid rgba(243, 197, 101, 0.38);
  border-radius: 50%;
  text-align: center;
  background:
    radial-gradient(circle at 50% 38%, rgba(122, 48, 80, 0.5), transparent 64%),
    rgba(13, 7, 30, 0.76);
  box-shadow: 0 0 0 8px rgba(243, 197, 101, 0.03), 0 0 60px rgba(255, 169, 61, 0.13), inset 0 0 50px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.plaque-ornament {
  margin-bottom: 0.2rem;
  color: var(--gold);
  font-size: 0.9rem;
}

.plaque-hindi {
  margin-bottom: 0.28rem;
  color: var(--gold-bright);
  font-family: "Nirmala UI", "Noto Serif Devanagari", var(--font-display);
  font-size: clamp(0.9rem, 1.7vw, 1.18rem);
  line-height: 1.4;
} 

.plaque-title {
  margin-bottom: 0.42rem;
  color: var(--gold-bright);
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.6vw, 2.1rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
  word-break: break-word;
  max-width: 100%;
  text-shadow: 0 0 16px rgba(246, 189, 74, 0.3);
}

.plaque-rule {
  display: block;
  width: 34px;
  height: 1px;
  margin-bottom: 0.5rem;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.plaque-year {
  margin: 0;
  color: var(--muted);
  font-size: 0.52rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero-diya {
  position: absolute;
  z-index: 3;
  width: 27%;
  filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.34));
}

.hero-diya svg {
  width: 100%;
  height: auto;
}

.hero-diya-left {
  bottom: 1%;
  left: -5%;
}

.hero-diya-right {
  top: 17%;
  right: -7%;
  width: 23%;
}

.diya-glow {
  position: absolute;
  top: 2%;
  left: 50%;
  width: 52%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 201, 99, 0.38), transparent 68%);
  filter: blur(9px);
  transform: translateX(-50%);
}

.diya-flame,
.mini-flame {
  transform-box: fill-box;
  transform-origin: 50% 100%;
}

html.motion-on .diya-flame,
html.motion-on .mini-flame {
  animation: flame-flicker 2.4s ease-in-out infinite;
}

.hero-diya-left {
  transform: translateY(9px) rotate(-4deg);
}

.hero-diya-right {
  transform: translateY(-7px) rotate(5deg);
}

html.motion-on .hero-diya-left {
  animation: diya-float 5.8s ease-in-out infinite;
}

html.motion-on .hero-diya-right {
  animation: diya-float 6.8s ease-in-out 1.1s infinite reverse;
}

.petal {
  position: absolute;
  width: 10px;
  height: 17px;
  border-radius: 70% 30% 65% 35%;
  background: linear-gradient(145deg, #ff9b78, #ad3960);
  opacity: 0.72;
  filter: blur(0.2px);
}

.petal-one { top: 16%; left: 2%; transform: rotate(27deg); }
.petal-two { right: 14%; bottom: 15%; width: 8px; height: 14px; transform: rotate(-41deg); }
.petal-three { right: -2%; bottom: 39%; width: 7px; height: 12px; transform: rotate(57deg); }

html.motion-on .petal-one { animation: petal-drift 9s ease-in-out infinite; }
html.motion-on .petal-two { animation: petal-drift 11s ease-in-out 1.7s infinite reverse; }
html.motion-on .petal-three { animation: petal-drift 8s ease-in-out 3.4s infinite; }

/* ---------- Hanging lanterns ---------- */
.hanging-lantern {
  position: absolute;
  top: -8px;
  z-index: 1;
  width: 62px;
  transform-origin: 50% 0;
}

.hanging-lantern svg {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.35));
}

.lantern-left { left: 3.3%; }
.lantern-right { right: 4.2%; width: 55px; }

.lantern-thread {
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  height: 30px;
  background: linear-gradient(var(--gold), transparent);
  transform: translateX(-50%);
}

html.motion-on .lantern-left { animation: lantern-sway 7s ease-in-out infinite; }
html.motion-on .lantern-right { animation: lantern-sway 8.5s ease-in-out 1.2s infinite reverse; }

.scroll-cue {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  z-index: 2;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 0.5rem;
  color: var(--muted-dark);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transform: translateX(-50%);
}

.scroll-line {
  width: 1px;
  height: 31px;
  background: linear-gradient(var(--gold), transparent);
}

html.motion-on .scroll-line {
  animation: scroll-pulse 2.6s ease-in-out infinite;
}

/* ---------- Ads ---------- */
.ad-band {
  position: relative;
  padding: 1.2rem 0;
}

.ad-band-last {
  padding-bottom: 1.6rem;
}

.ad-slot {
  position: relative;
  display: grid;
  min-height: 108px;
  place-items: center;
  overflow: hidden;
  padding: 1.8rem 1.2rem 1.15rem;
  border: 1px dashed rgba(243, 197, 101, 0.2);
  border-radius: 16px;
  text-align: center;
  background: rgba(255, 255, 255, 0.018);
}

.ad-label {
  position: absolute;
  top: 0.55rem;
  left: 0.9rem;
  color: var(--muted-dark);
  font-size: 0.53rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.ad-placeholder {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 0.22rem;
}

.ad-placeholder span {
  color: var(--muted-dark);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.ad-placeholder small {
  max-width: 480px;
  color: rgba(143, 124, 164, 0.66);
  font-size: 0.64rem;
  line-height: 1.55;
}

/* ---------- Motion keyframes ---------- */
@keyframes twinkle {
  0%, 100% { opacity: 0.3; transform: scale(0.75); }
  50% { opacity: 1; transform: scale(1.25); }
}

@keyframes flame-flicker {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
  25% { transform: scale(0.92, 1.06) rotate(-2deg); opacity: 0.9; }
  50% { transform: scale(1.07, 0.94) rotate(1.5deg); opacity: 1; }
  75% { transform: scale(0.96, 1.03) rotate(-1deg); opacity: 0.94; }
}

@keyframes diya-float {
  0%, 100% { margin-top: 0; }
  50% { margin-top: -10px; }
}

@keyframes rangoli-turn {
  to { transform: rotate(360deg); }
}

@keyframes petal-drift {
  0%, 100% { margin-top: 0; margin-left: 0; opacity: 0.55; }
  35% { margin-top: -15px; margin-left: 9px; opacity: 0.88; }
  65% { margin-top: 8px; margin-left: -5px; opacity: 0.42; }
}

@keyframes lantern-sway {
  0%, 100% { transform: rotate(-1.8deg); }
  50% { transform: rotate(2deg); }
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 0.35; transform: scaleY(0.55); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); transform-origin: top; }
}

@keyframes button-shine {
  0%, 70% { left: -35%; }
  88%, 100% { left: 125%; }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Personalized result (Top Greeting Card) ---------- */
.wish-result {
  position: relative;
  overflow: hidden;
  padding-top: clamp(5.2rem, 9.5vh, 6.8rem);
  padding-bottom: clamp(2.5rem, 5vh, 4rem);
  border-bottom: 1px solid rgba(243, 197, 101, 0.12);
  background:
    radial-gradient(ellipse at 24% 42%, rgba(131, 60, 104, 0.22), transparent 45%),
    radial-gradient(ellipse at 78% 38%, rgba(201, 115, 44, 0.15), transparent 42%),
    radial-gradient(circle at 50% 0%, rgba(255, 200, 100, 0.08), transparent 50%);
}

.wish-result::before {
  position: absolute;
  top: 8%;
  right: -8%;
  width: 21rem;
  height: 21rem;
  content: "";
  border: 1px solid rgba(243, 197, 101, 0.09);
  border-radius: 50%;
  box-shadow: 0 0 0 50px rgba(243, 197, 101, 0.017), 0 0 0 100px rgba(243, 197, 101, 0.012);
  pointer-events: none;
}

.result-heading {
  margin-inline: auto;
  margin-bottom: clamp(0.8rem, 1.8vw, 1.4rem);
  text-align: center;
}

#result-title {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-display, serif);
  font-size: clamp(2rem, 4.5vw, 2.9rem);
  font-weight: 700;
  color: var(--gold-bright);
  text-shadow: 0 0 25px rgba(243, 197, 101, 0.45);
  margin: 0;
  line-height: 1.15;
}

.result-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
  align-items: start;
  gap: clamp(1.4rem, 3.5vw, 2.8rem);
}

.greeting-card,
.share-panel,
.card-frame,
.card-title,
.card-name,
.card-message {
  min-width: 0;
}

.greeting-card {
  position: relative;
  padding: 1px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(255, 232, 165, 0.82), rgba(154, 96, 30, 0.32) 30%, rgba(255, 216, 125, 0.18) 65%, rgba(255, 231, 162, 0.75));
  box-shadow: 0 35px 95px rgba(0, 0, 0, 0.4), 0 0 45px rgba(243, 177, 66, 0.08);
}

.greeting-card::before {
  position: absolute;
  inset: -22px;
  z-index: -1;
  content: "";
  border-radius: 42px;
  background: radial-gradient(ellipse, rgba(243, 177, 66, 0.14), transparent 67%);
  filter: blur(18px);
  pointer-events: none;
}

.card-frame {
  position: relative;
  overflow: hidden;
  padding: clamp(1.7rem, 4.6vw, 3.4rem) clamp(1.2rem, 4.6vw, 3.2rem) clamp(1.6rem, 4vw, 2.7rem);
  border-radius: calc(var(--radius-lg) - 1px);
  background:
    radial-gradient(circle at 50% -10%, rgba(232, 124, 62, 0.2), transparent 36%),
    radial-gradient(circle at 9% 100%, rgba(125, 48, 96, 0.2), transparent 36%),
    linear-gradient(155deg, #1b0d30 0%, #240d35 46%, #13091f 100%);
  box-shadow: inset 0 0 65px rgba(0, 0, 0, 0.32);
}

.card-frame::before {
  position: absolute;
  inset: 10px;
  content: "";
  border: 1px solid rgba(243, 197, 101, 0.24);
  border-radius: 20px;
  pointer-events: none;
}

.card-frame::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 125%;
  aspect-ratio: 1;
  content: "";
  opacity: 0.44;
  background: repeating-conic-gradient(from 0deg, transparent 0deg 14deg, rgba(243, 197, 101, 0.035) 14.4deg 14.8deg);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.card-corner {
  position: absolute;
  z-index: 1;
  width: 33px;
  height: 33px;
  border-color: rgba(243, 197, 101, 0.65);
  pointer-events: none;
}

.card-corner::after {
  position: absolute;
  width: 4px;
  height: 4px;
  content: "";
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px rgba(243, 197, 101, 0.6);
}

.corner-tl { top: 20px; left: 20px; border-top: 1px solid; border-left: 1px solid; border-top-left-radius: 8px; }
.corner-tl::after { top: -2px; left: -2px; }
.corner-tr { top: 20px; right: 20px; border-top: 1px solid; border-right: 1px solid; border-top-right-radius: 8px; }
.corner-tr::after { top: -2px; right: -2px; }
.corner-bl { bottom: 20px; left: 20px; border-bottom: 1px solid; border-left: 1px solid; border-bottom-left-radius: 8px; }
.corner-bl::after { bottom: -2px; left: -2px; }
.corner-br { right: 20px; bottom: 20px; border-right: 1px solid; border-bottom: 1px solid; border-bottom-right-radius: 8px; }
.corner-br::after { right: -2px; bottom: -2px; }

.card-diya-row {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  margin-bottom: 1.3rem;
}

.mini-diya {
  width: 39px;
  height: 29px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
}

.card-topline {
  margin: 0;
  color: var(--gold);
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.21em;
  text-align: center;
  text-transform: uppercase;
}

.card-topline span {
  margin-inline: 0.2rem;
  color: var(--orange);
}

.card-title {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  flex-direction: column;
  margin: 0 0 1rem;
  text-align: center;
}

.card-title-small {
  color: var(--cream-soft);
  font-family: var(--font-script);
  font-size: clamp(1.9rem, 3.9vw, 2.9rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: normal;
}

.card-name {
  display: block;
  max-width: 100%;
  margin-top: 0.22rem;
  color: var(--gold-bright);
  font-size: clamp(2.15rem, 5.6vw, 4.35rem);
  font-weight: 600;
  line-height: 0.97;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
  text-wrap: balance;
  text-shadow: 0 5px 23px rgba(246, 189, 74, 0.15);
}

.card-message {
  position: relative;
  z-index: 2;
  max-width: 480px;
  margin: 0 auto;
  padding-top: 0.65rem;
  color: #efe2ed;
  font-family: var(--font-display);
  font-size: clamp(1.08rem, 2vw, 1.33rem);
  line-height: 1.65;
  text-align: center;
}

.card-divider {
  position: relative;
  z-index: 2;
  display: flex;
  width: min(260px, 80%);
  align-items: center;
  gap: 0.7rem;
  margin: 1.45rem auto 1.05rem;
}

.card-divider span {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(243, 197, 101, 0.55));
}

.card-divider span:last-child {
  background: linear-gradient(90deg, rgba(243, 197, 101, 0.55), transparent);
}

.card-divider b {
  color: var(--gold);
  font-size: 0.65rem;
  font-weight: 400;
}

.card-signoff {
  position: relative;
  z-index: 2;
  margin-bottom: 1.6rem;
  color: var(--gold-bright);
  font-family: var(--font-script);
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  line-height: 1.3;
  text-align: center;
}

.card-signoff .card-name {
  display: inline;
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  font-weight: 700;
  color: var(--gold-bright);
  text-shadow: 0 0 15px rgba(246, 189, 74, 0.4);
}

.card-brand {
  position: relative;
  z-index: 2;
  margin: 0;
  color: rgba(196, 180, 210, 0.58);
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-align: center;
  text-transform: uppercase;
}

.card-brand span {
  color: var(--gold);
  margin-inline: 0.22rem;
}

/* ---------- Share panel ---------- */
.share-panel {
  position: sticky;
  top: calc(var(--header-h) + 18px);
  padding: clamp(1.25rem, 2.6vw, 1.8rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background:
    linear-gradient(140deg, rgba(243, 197, 101, 0.06), transparent 35%),
    rgba(18, 10, 37, 0.88);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.share-panel h3 {
  margin-bottom: 0.65rem;
  font-size: clamp(1.55rem, 2.5vw, 2rem);
}

.share-intro {
  margin-bottom: 1rem;
  font-size: 0.86rem;
  line-height: 1.6;
}

.share-link-preview {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1.1rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.18);
}

.share-link-preview svg {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  color: var(--gold);
}

.share-link-preview span {
  overflow: hidden;
  color: var(--muted-dark);
  font-size: 0.68rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.52rem;
  margin-bottom: 0.75rem;
}

.share-btn {
  display: inline-flex;
  min-width: 0;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  padding: 0.55rem 0.55rem;
  border: 1px solid rgba(255, 246, 228, 0.12);
  border-radius: 11px;
  color: var(--cream-soft);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.15;
  text-align: center;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.share-btn svg {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
}

.share-btn:hover {
  border-color: rgba(243, 197, 101, 0.4);
  background: rgba(243, 197, 101, 0.08);
  transform: translateY(-1px);
}

.share-btn.whatsapp {
  grid-column: 1 / -1;
  border-color: rgba(53, 182, 120, 0.32);
  color: #bff5d8;
  background: rgba(27, 113, 73, 0.3);
}

.share-btn.whatsapp:hover {
  border-color: rgba(53, 182, 120, 0.62);
  background: rgba(27, 136, 83, 0.4);
}

.share-btn.facebook svg { color: #8aabff; }
.share-btn.telegram svg { color: #62c7f5; }
.share-btn.download-btn { grid-column: 1 / -1; }
.share-btn:disabled {
  cursor: wait;
  opacity: 0.65;
  transform: none;
}

.share-panel .btn-wide {
  margin-top: 0.15rem;
  font-size: 0.84rem;
}

.share-note {
  margin: 0.9rem 0 0;
  color: var(--muted-dark);
  font-size: 0.68rem;
  line-height: 1.55;
}

/* ---------- Steps ---------- */
.steps {
  position: relative;
  border-top: 1px solid rgba(243, 197, 101, 0.08);
  background: radial-gradient(ellipse at 50% 0%, rgba(93, 47, 123, 0.13), transparent 46%);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.step-card {
  position: relative;
  overflow: hidden;
  padding: 1.55rem;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.025);
}

.step-card::after {
  position: absolute;
  top: -20px;
  right: -15px;
  width: 100px;
  height: 100px;
  content: "";
  border: 1px solid rgba(243, 197, 101, 0.08);
  border-radius: 50%;
}

.step-number {
  position: absolute;
  top: 1.2rem;
  right: 1.3rem;
  color: rgba(243, 197, 101, 0.24);
  font-family: var(--font-display);
  font-size: 2.4rem;
  line-height: 1;
}

.step-icon {
  display: grid;
  width: 45px;
  height: 45px;
  place-items: center;
  margin-bottom: 1.1rem;
  border: 1px solid rgba(243, 197, 101, 0.2);
  border-radius: 50%;
  background: rgba(243, 197, 101, 0.08);
  font-size: 1.2rem;
}

.step-card h3 {
  margin-bottom: 0.45rem;
  color: var(--cream);
  font-size: 1.35rem;
}

.step-card p {
  margin-bottom: 0;
  font-size: 0.85rem;
  line-height: 1.65;
}

/* ---------- Wishes ---------- */
.wishes-section {
  position: relative;
  border-top: 1px solid rgba(243, 197, 101, 0.08);
  background:
    radial-gradient(ellipse at 85% 12%, rgba(158, 76, 45, 0.1), transparent 32%),
    radial-gradient(ellipse at 9% 65%, rgba(91, 43, 117, 0.15), transparent 37%);
}

.wishes-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.75rem;
}

.wishes-heading h2 {
  max-width: 650px;
  margin-bottom: 0;
}

.wishes-intro {
  max-width: 420px;
  margin-bottom: 0.35rem;
  font-size: 0.93rem;
  line-height: 1.7;
}

.category-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.7rem;
  padding-bottom: 0.3rem;
}

.category-nav a {
  display: inline-flex;
  min-height: 39px;
  align-items: center;
  padding: 0.42rem 0.86rem;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.025);
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.category-nav a:hover,
.category-nav a.is-active {
  border-color: rgba(243, 197, 101, 0.4);
  color: var(--gold-bright);
  background: rgba(243, 197, 101, 0.09);
}

.wishes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 1rem;
}

.wish-category {
  padding: 1.2rem;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.023);
  transition: border-color 0.25s ease, background 0.25s ease;
}

.wish-category:target {
  border-color: rgba(243, 197, 101, 0.35);
  background: rgba(243, 197, 101, 0.035);
}

.category-head {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  margin-bottom: 0.95rem;
  padding: 0.2rem 0.15rem 0.9rem;
  border-bottom: 1px solid var(--line-soft);
}

.category-icon {
  display: grid;
  flex: 0 0 auto;
  width: 41px;
  height: 41px;
  place-items: center;
  border: 1px solid rgba(243, 197, 101, 0.17);
  border-radius: 50%;
  background: rgba(243, 197, 101, 0.065);
  font-size: 1rem;
}

.category-head h3 {
  margin-bottom: 0.16rem;
  color: var(--cream);
  font-size: 1.35rem;
}

.category-head p {
  margin: 0;
  color: var(--muted-dark);
  font-size: 0.73rem;
  line-height: 1.5;
}

.wish-list {
  display: grid;
  gap: 0.58rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.wish-card {
  padding: 0.92rem 0.95rem 0.72rem;
  border: 1px solid rgba(255, 246, 228, 0.065);
  border-radius: 13px;
  background: rgba(8, 5, 22, 0.3);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.wish-card:hover {
  border-color: rgba(243, 197, 101, 0.2);
  background: rgba(243, 197, 101, 0.035);
}

.wish-text {
  margin: 0;
  color: var(--cream-soft);
  font-size: 0.84rem;
  line-height: 1.64;
}

.wish-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.35rem;
  margin-top: 0.65rem;
  padding-top: 0.52rem;
  border-top: 1px solid rgba(255, 246, 228, 0.055);
}

.mini-btn {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 0.3rem;
  padding: 0.32rem 0.62rem;
  border: 1px solid rgba(255, 246, 228, 0.1);
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-size: 0.67rem;
  font-weight: 500;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.mini-btn svg {
  width: 13px;
  height: 13px;
}

.mini-btn:hover {
  border-color: rgba(243, 197, 101, 0.35);
  color: var(--gold-bright);
  background: rgba(243, 197, 101, 0.07);
}

/* ---------- Traditions ---------- */
.traditions {
  position: relative;
  border-top: 1px solid rgba(243, 197, 101, 0.08);
  background:
    radial-gradient(ellipse at 20% 20%, rgba(112, 48, 91, 0.15), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.008), transparent);
}

.traditions-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
}

.traditions-copy h2 {
  max-width: 500px;
}

.traditions-copy p:last-child {
  margin-bottom: 0;
}

.tradition-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.tradition-card {
  padding: 1.15rem;
  border: 1px solid var(--line-soft);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.026);
}

.tradition-card > span {
  display: block;
  margin-bottom: 0.6rem;
  font-size: 1.15rem;
}

.tradition-card h3 {
  margin-bottom: 0.34rem;
  color: var(--cream);
  font-size: 1.23rem;
}

.tradition-card p {
  margin-bottom: 0;
  color: var(--muted-dark);
  font-size: 0.77rem;
  line-height: 1.62;
}

/* ---------- Spread happiness ---------- */
.spread-section {
  position: relative;
  padding-block: clamp(3rem, 6vw, 5rem);
  overflow: hidden;
}

.spread-card {
  position: relative;
  overflow: hidden;
  padding: clamp(2.2rem, 6vw, 4.4rem) 1.5rem;
  border: 1px solid rgba(243, 197, 101, 0.3);
  border-radius: var(--radius-lg);
  text-align: center;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(238, 153, 62, 0.2), transparent 48%),
    radial-gradient(ellipse at 95% 100%, rgba(151, 50, 86, 0.28), transparent 38%),
    linear-gradient(130deg, #24102f, #311035 47%, #1b0c28);
  box-shadow: 0 35px 90px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.spread-card::before,
.spread-card::after {
  position: absolute;
  width: 190px;
  height: 190px;
  content: "";
  border: 1px solid rgba(243, 197, 101, 0.12);
  border-radius: 50%;
  pointer-events: none;
}

.spread-card::before {
  top: -110px;
  left: -70px;
  box-shadow: 0 0 0 22px rgba(243, 197, 101, 0.025), 0 0 0 45px rgba(243, 197, 101, 0.015);
}

.spread-card::after {
  right: -70px;
  bottom: -105px;
  box-shadow: 0 0 0 22px rgba(243, 197, 101, 0.025), 0 0 0 45px rgba(243, 197, 101, 0.015);
}

.spread-glow {
  position: absolute;
  top: 26%;
  left: 50%;
  width: 340px;
  height: 220px;
  border-radius: 50%;
  background: rgba(243, 177, 66, 0.12);
  filter: blur(65px);
  transform: translateX(-50%);
  pointer-events: none;
}

.spread-diya {
  position: relative;
  z-index: 1;
  width: 82px;
  margin: 0 auto 1rem;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
}

.spread-diya svg {
  width: 100%;
  height: auto;
}

.spread-card .kicker {
  position: relative;
  z-index: 1;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.spread-card h2 {
  position: relative;
  z-index: 1;
  max-width: 650px;
  margin-inline: auto;
  font-size: clamp(2.3rem, 5vw, 4rem);
}

.spread-card > p:not(.kicker):not(.spread-note) {
  position: relative;
  z-index: 1;
  max-width: 540px;
  margin: 0 auto 1.35rem;
  color: var(--cream-soft);
  font-size: 0.99rem;
}

.spread-card .btn {
  position: relative;
  z-index: 1;
}

.spread-note {
  position: relative;
  z-index: 1;
  margin: 0.8rem 0 0;
  color: rgba(196, 180, 210, 0.55);
  font-size: 0.68rem;
}

/* ---------- Dialog ---------- */
.blessing-dialog {
  width: min(510px, calc(100vw - 2rem));
  max-width: 510px;
  max-height: min(88svh, 720px);
  padding: 0;
  border: 1px solid rgba(243, 197, 101, 0.4);
  border-radius: var(--radius-lg);
  color: var(--cream);
  background: #180c29;
  overflow-x: hidden !important;
  overflow-y: auto;
  box-shadow: 0 35px 100px rgba(0, 0, 0, 0.75), 0 0 35px rgba(243, 197, 101, 0.12);
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: rgba(243, 197, 101, 0.35) transparent;
}

.blessing-dialog::-webkit-scrollbar {
  width: 6px;
  height: 0px;
}

.blessing-dialog::-webkit-scrollbar-track {
  background: transparent;
}

.blessing-dialog::-webkit-scrollbar-thumb {
  background: rgba(243, 197, 101, 0.35);
  border-radius: 99px;
}

.blessing-dialog::-webkit-scrollbar-thumb:hover {
  background: rgba(243, 197, 101, 0.65);
}

.blessing-dialog::backdrop {
  background: rgba(5, 2, 14, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.dialog-inner {
  position: relative;
  overflow-x: hidden !important;
  width: 100%;
  box-sizing: border-box;
  padding: clamp(1.4rem, 4vw, 2.2rem);
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(231, 134, 55, 0.22), transparent 45%),
    linear-gradient(155deg, #221030, #180c29);
}

.dialog-inner::before {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 170%;
  aspect-ratio: 1;
  content: "";
  opacity: 0.42;
  background: repeating-conic-gradient(from 0deg, transparent 0deg 14deg, rgba(243, 197, 101, 0.04) 14.4deg 14.8deg);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.dialog-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  z-index: 3;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 50%;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.18);
}

.dialog-close:hover {
  color: var(--gold-bright);
  border-color: var(--line);
}

.dialog-close svg {
  width: 17px;
  height: 17px;
}

.dialog-sparkle {
  position: relative;
  z-index: 1;
  display: block;
  margin-bottom: 0.7rem;
  color: var(--gold);
  font-size: 1.2rem;
}

.dialog-inner .kicker {
  position: relative;
  z-index: 1;
  justify-content: center;
}

.dialog-inner h2 {
  position: relative;
  z-index: 1;
  margin-bottom: 0.8rem;
  font-size: clamp(2rem, 6vw, 2.75rem);
  line-height: 1.03;
}

.dialog-inner > p:not(.kicker) {
  position: relative;
  z-index: 1;
  max-width: 390px;
  margin: 0 auto 1.4rem;
  color: var(--cream-soft);
  font-size: 0.94rem;
}

.dialog-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}

.dialog-actions .btn {
  min-height: 48px;
  font-size: 0.86rem;
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  padding: clamp(3rem, 6vw, 4.4rem) 0 1.6rem;
  border-top: 1px solid var(--line-soft);
  background:
    radial-gradient(ellipse at 18% 0%, rgba(105, 46, 119, 0.12), transparent 37%),
    #070411;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.7fr 0.75fr 0.8fr 1.1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  padding-bottom: 2.2rem;
}

.footer-brand .brand {
  margin-bottom: 0.9rem;
}

.footer-brand > p {
  max-width: 305px;
  margin-bottom: 0.8rem;
  color: var(--muted-dark);
  font-size: 0.81rem;
  line-height: 1.68;
}

.footer-brand .footer-made {
  color: var(--muted);
  font-size: 0.75rem;
}

.footer-col h3 {
  margin-bottom: 0.75rem;
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.footer-col a {
  display: block;
  width: fit-content;
  padding: 0.22rem 0;
  color: var(--muted-dark);
  font-size: 0.79rem;
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: var(--gold-bright);
}

.footer-contact p {
  margin-bottom: 0.55rem;
  color: var(--muted-dark);
  font-size: 0.76rem;
  line-height: 1.65;
}

.footer-contact .footer-small {
  color: rgba(143, 124, 164, 0.64);
  font-size: 0.68rem;
}

.footer-privacy {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.1rem 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.footer-privacy p {
  max-width: 850px;
  margin: 0;
  color: rgba(196, 180, 210, 0.62);
  font-size: 0.69rem;
  line-height: 1.6;
}

.footer-privacy strong {
  color: var(--muted);
  font-weight: 500;
}

.footer-privacy a {
  flex: 0 0 auto;
  color: var(--gold);
  font-size: 0.72rem;
  white-space: nowrap;
}

.footer-privacy a:hover {
  color: var(--gold-bright);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.25rem;
}

.footer-bottom p {
  margin: 0;
  color: rgba(143, 124, 164, 0.64);
  font-size: 0.68rem;
}

/* ---------- Fixed controls & toast ---------- */
.back-to-top {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  z-index: 40;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--gold-bright);
  background: rgba(17, 9, 35, 0.92);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.back-to-top:hover {
  border-color: rgba(243, 197, 101, 0.55);
  transform: translateY(-2px);
}

.back-to-top svg {
  width: 19px;
  height: 19px;
}

.toast-region {
  position: fixed;
  right: 1rem;
  bottom: 1.2rem;
  left: 1rem;
  z-index: 100;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.toast {
  display: flex;
  max-width: min(470px, 100%);
  align-items: center;
  gap: 0.6rem;
  padding: 0.72rem 1rem;
  border: 1px solid rgba(243, 197, 101, 0.38);
  border-radius: 999px;
  color: var(--cream);
  background: rgba(20, 11, 39, 0.96);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.45);
  font-size: 0.8rem;
  line-height: 1.35;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

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

.toast-icon {
  display: grid;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  color: #17200d;
  background: var(--gold);
  font-size: 0.7rem;
  font-weight: 700;
}

.toast.toast-error {
  border-color: rgba(255, 122, 122, 0.45);
}

.toast.toast-error .toast-icon {
  color: #2a0b0b;
  background: #ff9696;
}

/* ---------- Result reveal ---------- */
.wish-result.is-revealed .greeting-card {
  box-shadow: 0 35px 95px rgba(0, 0, 0, 0.4), 0 0 45px rgba(243, 177, 66, 0.12);
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.82fr);
    gap: 2.2rem;
  }

  .hero-visual {
    width: min(100%, 500px);
  }

  .hero-diya-left { left: -1%; }
  .hero-diya-right { right: -1%; }

  .result-grid {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.82fr);
  }

  .footer-grid {
    grid-template-columns: 1.45fr 0.7fr 0.8fr 1fr;
  }
}

@media (max-width: 960px) {
  .main-nav {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .hanging-lantern {
    display: none;
  }

  .hero {
    min-height: auto;
    padding-top: 8rem;
    padding-bottom: 5rem;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 2.6rem;
  }

  .hero-copy {
    max-width: 680px;
  }

  .hero-visual {
    width: min(100%, 490px);
    margin-top: 0.5rem;
  }

  .scroll-cue {
    display: none;
  }

  .result-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .share-panel {
    position: static;
  }

  .wishes-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 1rem;
  }

  .wishes-intro {
    max-width: 650px;
  }

  .traditions-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .traditions-copy {
    max-width: 660px;
  }

  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr;
  }

  .footer-contact {
    grid-column: 1 / -1;
    max-width: 530px;
    padding-top: 0.8rem;
    border-top: 1px solid var(--line-soft);
  }
}

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

  .step-card {
    padding: 1.3rem;
  }

  .wishes-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: clamp(3.2rem, 12vw, 5rem);
  }
}

@media (max-width: 640px) {
  :root {
    --header-h: 72px;
  }

  .container {
    width: min(var(--container), calc(100% - 1.5rem));
  }

  .site-header {
    padding: 0.55rem 0;
  }

  .nav-inner {
    min-height: 48px;
  }

  .brand-icon {
    width: 38px;
    height: 38px;
  }

  .brand-icon svg {
    width: 28px;
    height: 28px;
  }

  .brand-word {
    font-size: 1.4rem;
  }

  .motion-toggle {
    width: 40px;
    height: 40px;
    min-height: 40px;
    justify-content: center;
    padding: 0;
  }

  .motion-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .menu-toggle {
    width: 40px;
    height: 40px;
  }

  .hero {
    padding-top: 6.8rem;
    padding-bottom: 3.6rem;
  }

  .eyebrow {
    font-size: 0.62rem;
    letter-spacing: 0.14em;
  }

  .hero h1 {
    margin-bottom: 1rem;
    font-size: clamp(3.05rem, 15vw, 4.2rem);
    line-height: 0.94;
  }

  .hero-sub {
    margin-bottom: 1.4rem;
    font-size: 1rem;
  }

  .wish-form {
    padding: 0.95rem;
    border-radius: 18px;
  }

  .form-heading {
    font-size: 0.65rem;
  }

  .form-badge {
    font-size: 0.61rem;
  }

  .hero-notes {
    gap: 0.4rem 0.8rem;
  }

  .hero-notes span {
    font-size: 0.69rem;
  }

  .hero-visual {
    width: min(94%, 390px);
  }

  .hero-diya-left {
    bottom: -2%;
    left: -4%;
    width: 26%;
  }

  .hero-diya-right {
    top: 15%;
    right: -4%;
    width: 21%;
  }

  .lantern-left {
    display: none;
  }

  .lantern-right {
    display: none;
  }

  .hanging-lantern .lantern-thread {
    height: 18px;
  }

  .section-pad {
    padding-block: 3.7rem;
  }

  .kicker {
    font-size: 0.65rem;
    letter-spacing: 0.17em;
  }

  .kicker::before {
    width: 21px;
  }

  h2 {
    font-size: clamp(2rem, 9vw, 2.8rem);
  }

  .section-heading > p:last-child {
    font-size: 0.93rem;
  }

  .ad-slot {
    min-height: 98px;
    padding-inline: 0.8rem;
  }

  .ad-placeholder small {
    font-size: 0.61rem;
  }

  .card-frame {
    padding: 2.4rem 1.15rem 1.7rem;
  }

  .card-frame::before {
    inset: 7px;
    border-radius: 15px;
  }

  .card-corner {
    width: 22px;
    height: 22px;
  }

  .corner-tl { top: 14px; left: 14px; }
  .corner-tr { top: 14px; right: 14px; }
  .corner-bl { bottom: 14px; left: 14px; }
  .corner-br { right: 14px; bottom: 14px; }

  .card-name {
    font-size: clamp(2rem, 10.5vw, 3rem);
  }

  .card-topline {
    font-size: 0.54rem;
    letter-spacing: 0.16em;
  }

  .mini-diya {
    width: 34px;
    height: 26px;
  }

  .card-message {
    font-size: 1.02rem;
  }

  .share-panel {
    padding: 1.15rem;
  }

  .share-actions {
    gap: 0.45rem;
  }

  .share-btn {
    min-height: 48px;
    font-size: 0.7rem;
  }

  .share-btn svg {
    width: 15px;
    height: 15px;
  }

  .tradition-cards {
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
  }

  .tradition-card {
    padding: 0.95rem;
  }

  .tradition-card h3 {
    font-size: 1.1rem;
  }

  .spread-card {
    padding: 2.2rem 1rem;
  }

  .spread-card h2 {
    font-size: clamp(2.1rem, 9vw, 3rem);
  }

  .spread-card > p:not(.kicker):not(.spread-note) {
    font-size: 0.91rem;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.6rem 1.2rem;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-contact {
    grid-column: 1 / -1;
  }

  .footer-privacy {
    flex-direction: column;
    gap: 0.6rem;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.35rem;
  }

  .toast-region {
    bottom: 1rem;
  }

  .toast {
    font-size: 0.75rem;
    border-radius: 16px;
  }

  .dialog-inner {
    padding: 2.6rem 1.25rem 1.5rem;
  }

  .dialog-actions {
    flex-direction: column;
  }

  .dialog-actions .btn {
    width: 100%;
  }
}

@media (max-width: 400px) {
  .container {
    width: calc(100% - 1.2rem);
  }

  .hero {
    padding-top: 6.3rem;
  }

  .eyebrow {
    gap: 0.4rem;
  }

  .eyebrow-line {
    width: 20px;
  }

  .hero h1 {
    font-size: 3.02rem;
  }

  .form-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.22rem;
  }

  .name-count {
    display: none;
  }

  .hero-diya-right {
    top: 12%;
    right: -6%;
  }

  .wish-actions {
    justify-content: stretch;
  }

  .mini-btn {
    flex: 1;
    justify-content: center;
    min-height: 43px;
  }

  .tradition-cards {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .back-to-top {
    right: 0.8rem;
    bottom: 0.8rem;
    width: 43px;
    height: 43px;
  }
}

@media (max-width: 359px) {
  .card-topline {
    font-size: 0.47rem;
    letter-spacing: 0.1em;
    white-space: nowrap;
  }

  .card-topline span {
    margin-inline: 0.1rem;
  }

  .mini-diya {
    width: 29px;
    height: 22px;
  }

  .card-frame {
    padding-inline: 0.9rem;
  }
}

/* ---------- Reduced motion and motion toggle ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .card-frame,
  .share-panel {
    transition: none;
  }
}

html:not(.motion-on) .star,
html:not(.motion-on) .diya-flame,
html:not(.motion-on) .mini-flame,
html:not(.motion-on) .rangoli-art,
html:not(.motion-on) .petal,
html:not(.motion-on) .lantern-left,
html:not(.motion-on) .lantern-right,
html:not(.motion-on) .hero-diya-left,
html:not(.motion-on) .hero-diya-right,
html:not(.motion-on) .scroll-line,
html:not(.motion-on) .btn-primary::after {
  animation: none !important;
}

/* ---------- Print ---------- */
@media print {
  body {
    background: #fff;
    color: #111;
  }

  .site-header,
  .hero,
  .ad-band,
  .steps,
  .wishes-section,
  .traditions,
  .spread-section,
  .site-footer,
  .back-to-top,
  .toast-region,
  .share-panel,
  #fx-canvas {
    display: none !important;
  }

  .wish-result {
    display: block !important;
    padding: 0;
    border: 0;
  }

  .wish-result .container {
    width: 100%;
  }

  .result-heading,
  .greeting-card::before {
    display: none;
  }

  .result-grid {
    display: block;
  }

  .greeting-card {
    max-width: 650px;
    margin: 0 auto;
    box-shadow: none;
  }
}

/* ---------- Legal pages ---------- */
.legal-page {
  min-height: 100vh;
  padding: 7.5rem 0 4rem;
}

.legal-shell {
  max-width: 830px;
  margin-inline: auto;
}

.legal-topline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--gold);
  font-size: 0.8rem;
}

.legal-back:hover {
  color: var(--gold-bright);
}

.legal-page h1 {
  margin-bottom: 0.65rem;
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  line-height: 0.98;
}

.legal-updated {
  margin-bottom: 2rem;
  color: var(--muted-dark);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.legal-card {
  padding: clamp(1.25rem, 4vw, 2.5rem);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: rgba(20, 12, 42, 0.7);
}

.legal-card h2 {
  margin-top: 2rem;
  margin-bottom: 0.7rem;
  font-size: clamp(1.55rem, 3.3vw, 2.1rem);
}

.legal-card h2:first-child {
  margin-top: 0;
}

.legal-card p,
.legal-card li {
  color: var(--muted);
  font-size: 0.91rem;
  line-height: 1.75;
}

.legal-card ul {
  padding-left: 1.15rem;
}

.legal-card li {
  margin-bottom: 0.45rem;
}

.legal-card a {
  color: var(--gold);
  text-decoration: underline;
  text-decoration-color: rgba(243, 197, 101, 0.4);
  text-underline-offset: 3px;
}

.legal-note {
  margin-top: 1.5rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(243, 197, 101, 0.2);
  border-radius: 10px;
  color: var(--cream-soft) !important;
  background: rgba(243, 197, 101, 0.055);
  font-size: 0.84rem !important;
}

.legal-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  color: var(--muted-dark);
  font-size: 0.72rem;
}

/* =========================================================
   CUSTOM SURPRISE GIFT FEATURE (Photo / Video Attachments)
   ========================================================= */

.share-btn.gift-btn {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.95rem 1.25rem;
  border-radius: 12px;
  border: 1.5px solid rgba(255, 215, 0, 0.65);
  background: linear-gradient(135deg, #d4770b 0%, #e8a020 40%, #ff416c 100%);
  color: #fff;
  font-family: var(--font-body);
  font-size: 1.02rem;
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  box-shadow: 0 4px 18px rgba(232, 160, 32, 0.35);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.share-btn.gift-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(255, 65, 108, 0.5);
}

.gift-btn-icon {
  font-size: 1.28rem;
  animation: giftBounce 2.2s infinite ease-in-out;
}

@keyframes giftBounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-3px) scale(1.12); }
}

.gift-btn-sparkle {
  color: #fff;
  animation: sparkleTwinkle 1.5s infinite alternate;
}

/* Gift Modal (Compact, Zero-Overflow, No Scrollbar) */
.gift-modal {
  width: min(460px, calc(100vw - 1.5rem)) !important;
  max-width: 460px !important;
  max-height: 94vh !important;
  margin: auto !important;
  border-radius: 18px !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  padding: 0 !important;
}

.gift-modal-inner {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  padding: 1.25rem 1.25rem 1.15rem !important;
  overflow: hidden !important;
}

.gift-compact-title {
  font-family: var(--font-display, serif);
  font-size: 1.35rem;
  color: var(--gold-bright);
  margin: 0 0 0.75rem 0;
  text-align: center;
}

.gift-burn-badge {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(255, 65, 108, 0.12);
  border: 1px solid rgba(255, 85, 110, 0.4);
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.75rem;
  text-align: left;
  font-size: 0.78rem;
  line-height: 1.4;
  color: #ffebee;
  box-sizing: border-box;
}

.gift-burn-badge .burn-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.gift-burn-badge strong {
  color: #ff5252;
}

.gift-type-tabs {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 0.65rem;
  box-sizing: border-box;
}

.gift-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.5rem 0.4rem;
  border-radius: 8px;
  border: 1px solid rgba(243, 197, 101, 0.3);
  background: rgba(255, 255, 255, 0.04);
  color: var(--cream-soft);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.gift-tab input[type="radio"] {
  display: none;
}

.gift-tab.active {
  background: linear-gradient(135deg, rgba(232, 160, 32, 0.25), rgba(255, 65, 108, 0.25));
  border-color: var(--gold-bright);
  color: #fff;
  box-shadow: 0 0 10px rgba(243, 197, 101, 0.25);
}

.gift-upload-zone {
  border: 1.5px dashed rgba(243, 197, 101, 0.45);
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
  text-align: center;
  background: rgba(20, 10, 35, 0.6);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  position: relative;
  margin-bottom: 0.65rem;
  box-sizing: border-box;
}

.gift-upload-zone:hover {
  border-color: var(--gold-bright);
  background: rgba(255, 215, 0, 0.05);
}

.gift-file-hidden {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.upload-prompt {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
}

.upload-compact-icon {
  font-size: 1.25rem;
}

.upload-compact-texts {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.upload-main-text {
  font-size: 0.86rem;
  color: #fff;
  margin: 0;
  line-height: 1.2;
}

.upload-hint-text {
  font-size: 0.72rem;
  color: var(--muted-dark);
  margin: 0.15rem 0 0;
}
  height: 24px;
}

.upload-main-text {
  font-size: 0.96rem;
  color: #fff;
  margin-bottom: 0.25rem;
}

.upload-hint-text {
  font-size: 0.8rem;
  color: var(--muted-dark);
}

#preview-container img,
#preview-container video {
  max-width: 100%;
  max-height: 140px;
  border-radius: 10px;
  border: 1px solid rgba(255, 215, 0, 0.3);
  margin-bottom: 0.45rem;
}

.btn-change-file {
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  background: #333;
  color: #fff;
  border: 1px solid #555;
  font-size: 0.75rem;
  cursor: pointer;
}

.gift-input-group {
  margin-bottom: 0.65rem;
  text-align: left;
  box-sizing: border-box;
}

.gift-input-group label {
  display: block;
  font-size: 0.76rem;
  color: var(--cream-soft);
  margin-bottom: 0.25rem;
}

.gift-input-group input {
  width: 100%;
  padding: 0.55rem 0.75rem;
  background: #140b24;
  border: 1px solid rgba(243, 197, 101, 0.3);
  border-radius: 8px;
  color: #fff;
  font-size: 0.85rem;
  outline: none;
  box-sizing: border-box;
}

.gift-input-group input:focus {
  border-color: var(--gold);
}

.btn-generate-gift {
  width: 100%;
  padding: 0.72rem 1rem;
  font-size: 0.95rem;
  box-sizing: border-box;
}

.gift-result-zone {
  margin-top: 0.85rem;
  text-align: center;
  box-sizing: border-box;
}

.gift-success-banner {
  background: rgba(0, 230, 118, 0.1);
  border: 1px solid rgba(0, 230, 118, 0.35);
  border-radius: 12px;
  padding: 0.85rem;
  margin-bottom: 0.85rem;
  box-sizing: border-box;
}

.success-check {
  display: inline-block;
  width: 32px;
  height: 32px;
  line-height: 32px;
  border-radius: 50%;
  background: #00e676;
  color: #000;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}

.gift-success-banner h3 {
  font-size: 1.1rem;
  color: #00e676;
  margin-bottom: 0.3rem;
}

.gift-success-banner p {
  font-size: 0.85rem;
  color: var(--cream-soft);
}

.gift-link-box {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
  box-sizing: border-box;
}

.gift-link-box input {
  flex: 1;
  padding: 0.65rem 0.85rem;
  background: #10081d;
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 8px;
  color: var(--gold-bright);
  font-size: 0.85rem;
  outline: none;
  box-sizing: border-box;
}

.gift-share-actions .share-btn {
  width: 100%;
}

/* =========================================================
   SURPRISE REVEAL GIFT BOX (Recipient View)
   ========================================================= */

.surprise-gift-container {
  position: relative;
  z-index: 2;
  margin: 1.4rem auto 1rem;
  max-width: 440px;
  width: 100%;
  padding: 1.25rem 1rem;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(35, 15, 55, 0.85), rgba(20, 10, 35, 0.9));
  border: 1.5px dashed rgba(246, 189, 74, 0.5);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  text-align: center;
}

.gift-closed-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

.gift-box-interactive {
  position: relative;
  width: 84px;
  height: 84px;
  margin: 0.5rem auto 1rem;
  cursor: pointer;
  animation: giftWiggle 2.8s infinite ease-in-out;
}

@keyframes giftWiggle {
  0%, 75%, 100% { transform: rotate(0deg) scale(1); }
  80% { transform: rotate(-8deg) scale(1.05); }
  85% { transform: rotate(8deg) scale(1.05); }
  90% { transform: rotate(-4deg) scale(1.03); }
  95% { transform: rotate(4deg) scale(1.02); }
}

.gift-lid {
  position: absolute;
  top: 0;
  left: -4px;
  width: 92px;
  height: 22px;
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  border-radius: 5px;
  border: 1.5px solid #ffd700;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  z-index: 3;
  transition: transform 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.gift-bow {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 16px;
}

.gift-bow::before,
.gift-bow::after {
  content: '';
  position: absolute;
  top: 0;
  width: 14px;
  height: 14px;
  border-radius: 50% 50% 0 50%;
  border: 2.5px solid #ffd700;
  background: rgba(255, 215, 0, 0.3);
}

.gift-bow::before {
  left: 0;
  transform: rotate(-30deg);
}

.gift-bow::after {
  right: 0;
  transform: rotate(30deg) scaleX(-1);
}

.gift-base {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 84px;
  height: 66px;
  background: linear-gradient(135deg, #c0392b, #962d22);
  border-radius: 0 0 6px 6px;
  border: 1.5px solid #ffd700;
  border-top: none;
  overflow: hidden;
  z-index: 2;
}

.gift-ribbon-vertical {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 100%;
  background: linear-gradient(90deg, #ffd700, #ffeaa7, #ffd700);
}

.gift-ribbon-horizontal {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  width: 100%;
  height: 16px;
  background: linear-gradient(180deg, #ffd700, #ffeaa7, #ffd700);
}

.gift-glow-effect {
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 20px;
  background: radial-gradient(ellipse, rgba(255, 215, 0, 0.45), transparent 70%);
  filter: blur(5px);
  z-index: 1;
}

.gift-reveal-heading {
  font-size: 1.24rem;
  font-weight: 700;
  color: var(--gold-bright);
  margin-bottom: 0.25rem;
}

.gift-reveal-sub {
  font-size: 0.95rem;
  color: #fff;
  margin-bottom: 0.85rem;
}

.btn-tap-reveal {
  padding: 0.8rem 1.6rem;
  border-radius: 25px;
  border: 1px solid rgba(255, 215, 0, 0.5);
  background: linear-gradient(135deg, #ff416c, #ff4b2b);
  color: #fff;
  font-weight: 700;
  font-size: 0.98rem;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(255, 65, 108, 0.45);
  transition: transform 0.2s, box-shadow 0.2s;
  animation: pulseButton 2s infinite;
}

@keyframes pulseButton {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

.gift-one-time-notice {
  font-size: 0.76rem;
  color: var(--muted-dark);
  margin-top: 0.65rem;
}

/* Opened view */
.gift-opened-view {
  animation: giftRevealFade 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes giftRevealFade {
  0% { opacity: 0; transform: scale(0.92); }
  100% { opacity: 1; transform: scale(1); }
}

.gift-revealed-tag {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  background: rgba(0, 230, 118, 0.15);
  border: 1px solid rgba(0, 230, 118, 0.4);
  color: #00e676;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.9rem;
}

.gift-media-holder {
  margin-bottom: 0.85rem;
}

.gift-media-holder img,
.gift-media-holder video {
  max-width: 100%;
  max-height: 380px;
  border-radius: 12px;
  border: 2px solid rgba(246, 189, 74, 0.6);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.55);
  display: block;
  margin: 0 auto;
}

.gift-caption-display {
  font-size: 1.05rem;
  line-height: 1.55;
  color: #fff;
  font-style: italic;
  margin: 0.6rem auto;
  max-width: 380px;
}

.gift-sender-signoff {
  font-size: 1rem;
  color: var(--gold-bright);
  font-weight: 600;
  margin-top: 0.4rem;
}


@media (max-width: 640px) {
  .legal-page {
    padding-top: 6rem;
  }

  .legal-card {
    padding: 1.15rem;
  }
}
