/* تم «پری‌ها»: آبرنگی صورتی، دو پری بالای کارت، اسم انگلیسی خوش‌نویسی، تیترهای میرعماد، پاکت صورتی */
@font-face { font-family: "Fairy Script"; src: url("../fonts/candlescript.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Fairy Nastaliq"; src: url("../fonts/miremad-sub.woff2") format("woff2"); font-display: swap; }

[data-theme="fairy"] {
  --bg: #f6e6ea; --paper: #fffaf7; --ink: #624b4d; --muted: #8f7478; --line: #efd3da;
  --c2: #efbec9; --c3: #efd89b; --c4: #e9a78e; --c5: #91a98b;
  --gold: #d1a955; --gold-soft: #efd89b; --rose-deep: #a95368;
  --c-head: #77565d;
  --on-accent: #ffffff;
  --display: "Fairy Nastaliq", "BVazir", Tahoma, sans-serif;
  --radius: 28px; --shadow: 0 22px 60px rgba(139, 80, 94, .11);
  --hero-ring: conic-gradient(#efd89b, var(--accent), #f8dce4, #d1a955, #efd89b);
  --intro-bg: #f7dce4;
}
[data-theme="fairy"] body {
  background:
    radial-gradient(circle at 12% 18%, rgba(239, 190, 201, .34) 0 3px, transparent 4px),
    radial-gradient(circle at 88% 56%, rgba(209, 169, 85, .26) 0 2px, transparent 3px),
    linear-gradient(180deg, #fce8ee 0%, #fff8f6 30%, #fffaf3 60%, #f9ebee 100%);
  background-attachment: fixed;
}
[data-theme="fairy"] .bg-deco { display: none; }

/* کادرها: کاغذ کرم با حاشیه‌ی طلایی و قوس بالا */
[data-theme="fairy"] .sec {
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  border: 1px solid color-mix(in srgb, var(--gold) 34%, var(--line));
  border-radius: 40px 40px var(--radius) var(--radius) / 34px 34px var(--radius) var(--radius);
  box-shadow: var(--shadow), inset 0 0 0 6px rgba(255, 255, 255, .5);
  padding: 30px 20px 26px;
}
[data-theme="fairy"] .sec::before { content: "✦"; position: absolute; top: 12px; inset-inline-end: 18px; color: var(--gold); font-size: 11px; }
[data-theme="fairy"] .sec h2 { font: 400 clamp(30px, 9vw, 42px)/1.75 var(--display); color: var(--c-head); margin: 0 0 6px; }
[data-theme="fairy"] .kicker { color: var(--accent); letter-spacing: .06em; }

/* ---------- سرصفحه ---------- */
.fairy-hero { position: relative; margin: -18px -16px 0; padding: 0 16px 56px; text-align: center; overflow: hidden; min-height: 100svh; }
.fairy-header { position: relative; margin: 0 -16px; height: clamp(200px, 50vw, 330px); overflow: hidden; background: linear-gradient(180deg, var(--fairy-top, #fbe7ed) 0%, var(--fairy-top, #fbe8ee) 62%, transparent 100%); }
.fairy-header::after { content: ""; position: absolute; inset: auto 0 -1px; height: 40%; background: linear-gradient(180deg, transparent, var(--fairy-fade, #fff8f6)); pointer-events: none; }
.fairy-header > img { width: 100%; height: auto; animation: fairiesFloat 6s ease-in-out infinite alternate; -webkit-mask-image: linear-gradient(#000 0 72%, transparent 100%); mask-image: linear-gradient(#000 0 72%, transparent 100%); }
.guest-welcome { position: absolute; z-index: 2; top: 19%; left: 50%; width: 44%; display: grid; gap: 2px; justify-items: center; padding: 10px 6px 12px; color: #8f5966; background: rgba(255, 250, 249, .74); border: 1px solid rgba(211, 158, 100, .3); border-radius: 50%; box-shadow: 0 12px 32px rgba(157, 91, 106, .08); transform: translateX(-50%); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.guest-welcome small { font-size: clamp(10.5px, 2.6vw, 13.5px); line-height: 1.7; }
.guest-welcome strong { max-width: 100%; overflow-wrap: anywhere; font: 400 clamp(22px, 6.4vw, 36px)/1.5 "Fairy Nastaliq", var(--body); }
.fairy-copy { position: relative; z-index: 2; margin-top: clamp(-70px, -12vw, -40px); }
.hero-kicker { margin: 0; color: var(--gold); font: 400 12px/1.6 Georgia, "Times New Roman", serif; letter-spacing: .3em; text-transform: uppercase; }
.hero-script { margin: 0; padding: .1em .1em .18em; color: var(--rose-deep); font: 400 clamp(68px, 19vw, 120px)/.95 "Fairy Script", "Brush Script MT", cursive; text-shadow: 0 2px 0 rgba(255, 255, 255, .85); }
.hero-script.fa { font: 400 clamp(46px, 14vw, 72px)/1.6 "Fairy Nastaliq", var(--body); }
.age-pill { display: inline-flex; margin: 6px 0 18px; padding: 5px 16px; color: #8e646b; font-size: 14px; background: rgba(255, 255, 255, .7); border: 1px solid rgba(202, 117, 135, .24); border-radius: 999px; }
.fairy-portrait { position: relative; z-index: 2; width: min(70vw, 320px); aspect-ratio: 4 / 5; margin: 6px auto 26px; filter: drop-shadow(0 22px 30px rgba(132, 79, 91, .14)); }
.portrait-ring { position: absolute; inset: -10px; border: 1px solid rgba(207, 161, 81, .72); border-radius: 50% 50% 44% 44% / 43% 43% 50% 50%; }
.portrait-ring::after { content: ""; position: absolute; inset: 6px; border: 1px solid rgba(255, 255, 255, .88); border-radius: inherit; }
.portrait-window { position: absolute; inset: 0; overflow: hidden; background: linear-gradient(150deg, #f7d9e1, #fff9f5 55%, #eed6bd); border: 7px solid rgba(255, 251, 247, .95); border-radius: 50% 50% 44% 44% / 43% 43% 50% 50%; }
.portrait-window img { width: 100%; height: 100%; object-fit: cover; object-position: center 28%; }
.photo-placeholder { display: grid; place-content: center; width: 100%; height: 100%; color: #c17c8c; background: radial-gradient(circle at 50% 34%, rgba(255, 255, 255, .9), transparent 38%), linear-gradient(145deg, #f7dce4, #fff9f6 55%, #f1d5c8); }
.photo-placeholder span { font: 400 110px/1 "Fairy Script", cursive; }
.portrait-flower { position: absolute; z-index: 3; display: grid; place-items: center; width: 46px; height: 46px; color: #fff9f2; background: #dc91a0; border: 5px solid #f5c7d0; border-radius: 50%; box-shadow: 0 5px 14px rgba(137, 75, 89, .16); }
.portrait-flower.f1 { right: -16px; bottom: 18%; transform: rotate(-12deg); }
.portrait-flower.f2 { left: -13px; top: 16%; width: 36px; height: 36px; background: #edb09a; border-width: 4px; transform: rotate(18deg); }
.fairy-date { position: relative; z-index: 2; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 12px; margin: 0; color: #876a6e; font-size: 14.5px; }
.fairy-date i { width: 4px; height: 4px; background: var(--gold); border-radius: 50%; }
.scroll-cue { position: absolute; z-index: 3; left: 50%; bottom: 10px; display: grid; justify-items: center; gap: 6px; color: #9e777f; font-size: 12px; text-decoration: none; transform: translateX(-50%); }
.scroll-cue i { position: relative; width: 20px; height: 30px; border: 1px solid rgba(202, 117, 135, .45); border-radius: 20px; }
.scroll-cue i::after { content: ""; position: absolute; top: 6px; left: 50%; width: 3px; height: 6px; border-radius: 3px; background: var(--accent); transform: translateX(-50%); animation: scrollDot 1.7s ease-in-out infinite; }
@keyframes fairiesFloat { to { transform: translateY(5px); } }
@keyframes scrollDot { 0% { opacity: 0; transform: translate(-50%, 0); } 35% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, 11px); } }

/* ---------- خانه‌ی گل و متن دعوت ---------- */
.fairy-message { position: relative; margin: 0 -16px; padding: clamp(250px, 72vw, 420px) 16px 10px; }
.flower-house { position: absolute; top: 0; left: 0; width: 100%; height: auto; transform-origin: 50% 92%; animation: houseBreathe 7s ease-in-out infinite alternate; -webkit-mask-image: linear-gradient(#000 0 78%, transparent 100%); mask-image: linear-gradient(#000 0 78%, transparent 100%); }
.fairy-message .message-card { position: relative; z-index: 2; max-width: 560px; margin: 0 auto; border-radius: 48% 48% 24px 24px / 70px 70px 24px 24px; padding: 40px 22px 30px; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.fairy-message .message-card::after { content: "✦"; position: absolute; bottom: 14px; inset-inline-start: 18px; color: var(--gold); font-size: 11px; }
.fairy-message .invite-text { color: color-mix(in srgb, var(--ink) 88%, #fff); font-size: clamp(16px, 4.2vw, 18px); line-height: 2.2; }
@keyframes houseBreathe { to { transform: translateY(5px) scale(1.008); } }

/* ---------- شمارش معکوس: آویزهای گرد زیر یک ریسه ---------- */
[data-theme="fairy"] .cd-cells { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(5px, 1.6vw, 10px); padding-top: 44px; }
[data-theme="fairy"] .countdown.mini .cd-cells { grid-template-columns: repeat(3, minmax(0, 1fr)); }
[data-theme="fairy"] .cd-cells::before { content: ""; position: absolute; top: 12px; left: 2%; width: 96%; height: 40px; border-top: 2px solid rgba(209, 169, 85, .68); border-radius: 50%; }
[data-theme="fairy"] .cd-cells span { position: relative; min-width: 0; padding: 16px 2px 10px; background: linear-gradient(160deg, rgba(255, 255, 255, .96), rgba(249, 218, 226, .92)); border: 1px solid rgba(202, 117, 135, .34); border-radius: 48% 48% 42% 42% / 38% 38% 55% 55%; box-shadow: 0 13px 26px rgba(134, 76, 89, .1), inset 0 0 0 4px rgba(255, 255, 255, .48); animation: charmFloat 4.2s ease-in-out infinite; }
[data-theme="fairy"] .cd-cells span:nth-child(even) { margin-top: 12px; animation-delay: -.9s; }
[data-theme="fairy"] .cd-cells span::before { content: ""; position: absolute; bottom: 100%; left: 50%; width: 1px; height: 26px; background: linear-gradient(var(--gold), rgba(209, 169, 85, .3)); }
[data-theme="fairy"] .cd-cells b { color: #76565c; font: 400 clamp(26px, 7.5vw, 38px)/1.1 Georgia, "Times New Roman", serif; }
[data-theme="fairy"] .cd-cells i { color: #a08286; font-size: 12px; }
@keyframes charmFloat { 50% { transform: translateY(-4px); } }
[data-theme="fairy"] .cd-today { font: 400 28px/1.7 var(--display); color: var(--c-head); }

/* ---------- برنامه، دکمه‌ها و فرم‌ها ---------- */
[data-theme="fairy"] .timeline li { background: color-mix(in srgb, #fff 70%, var(--paper)); border-color: color-mix(in srgb, var(--accent) 22%, var(--line)); border-radius: 20px; }
[data-theme="fairy"] .tl-ico { background: color-mix(in srgb, var(--accent) 14%, #fff); }
[data-theme="fairy"] .timeline b { font-family: Georgia, "Times New Roman", serif; font-weight: 400; color: var(--accent); }
[data-theme="fairy"] .btn { border-radius: 999px; box-shadow: 0 10px 22px color-mix(in srgb, var(--accent) 22%, transparent); }
[data-theme="fairy"] .hero-guest { background: rgba(255, 255, 255, .7); border: 1px solid rgba(202, 117, 135, .2); }
[data-theme="fairy"] .closing-text { font: 400 clamp(22px, 6vw, 30px)/1.9 var(--display); color: var(--c-head); }
[data-theme="fairy"] .foot { color: var(--muted); }

/* ---------- ورودی پاکت صورتی ---------- */
.intro.intro-envelope { display: grid; place-items: center; background: #f7dce4; cursor: pointer; }
.env-backdrop { position: absolute; inset: -44px; background: center / cover no-repeat; filter: blur(30px) saturate(.85) brightness(.95); opacity: .78; transform: scale(1.12); }
.env-stage { position: relative; z-index: 1; width: min(100vw, 56.25svh, 720px); aspect-ratio: 9 / 16; max-height: 100svh; overflow: hidden; background: #fbe8ee; box-shadow: 0 0 80px rgba(103, 59, 72, .24); }
.env-video { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; background: #fbe8ee; }
.env-personal { position: absolute; z-index: 5; top: 5.2%; left: 50%; display: grid; justify-items: center; gap: 2px; width: 50%; padding: 10px 4px 12px; color: #8e5262; text-align: center; background: rgba(255, 249, 249, .72); border: 1px solid rgba(215, 164, 113, .3); border-radius: 50% / 38%; box-shadow: 0 8px 30px rgba(162, 94, 111, .08); opacity: 0; transform: translate(-50%, -8px) scale(.96); transition: opacity .8s ease, transform .9s cubic-bezier(.22, .72, .26, 1); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.env-personal span { font-size: clamp(10.5px, 2.6vw, 14px); line-height: 1.8; }
.env-personal strong { max-width: 100%; overflow-wrap: anywhere; font: 400 clamp(20px, 6vw, 32px)/1.55 "Fairy Nastaliq", var(--body); }
.intro-envelope.personal .env-personal { opacity: 1; transform: translate(-50%, 0) scale(1); }
.env-hint { position: absolute; z-index: 4; left: 50%; bottom: max(6.5%, env(safe-area-inset-bottom)); display: grid; justify-items: center; gap: 9px; width: 84%; color: #8d5e68; transform: translateX(-50%); transition: opacity .55s ease, transform .55s ease; }
.env-hint span { padding: 9px 18px; font-size: clamp(15px, 3.8vw, 19px); line-height: 1.6; background: rgba(255, 250, 248, .8); border: 1px solid rgba(197, 113, 132, .26); border-radius: 999px; box-shadow: 0 10px 28px rgba(140, 75, 91, .08); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.env-hint i { width: 35px; height: 1px; background: linear-gradient(90deg, transparent, #d1a955, transparent); animation: hintBreath 1.8s ease-in-out infinite; }
.intro-envelope.playing .env-hint { opacity: 0; transform: translate(-50%, 12px); pointer-events: none; }
.intro-envelope .intro-skip { color: #8d5e68; z-index: 6; }
@keyframes hintBreath { 0%, 100% { opacity: .35; transform: scaleX(.7); } 50% { opacity: 1; transform: scaleX(1); } }

@media (prefers-reduced-motion: reduce) {
  .fairy-header > img, .flower-house, [data-theme="fairy"] .cd-cells span, .scroll-cue i::after, .env-hint i { animation: none !important; }
}
