:root {
  /* ألوان */
  --ivory: #fbf7ef;
  --paper: #f3ecdf;
  --bg: #efe7d8;
  --ink: #2b2620;
  --ink-2: #3f382f;
  --muted: #5f5547;
  --copper: #8f432a;
  --copper-d: #74341f;
  --gold: #b8924a;          /* خطوط وزخارف */
  --gold-text: #87672b;     /* نصوص ذهبية مقروءة */
  --line: #b8924a80;
  --on-copper: #fff6ea;
  --col: min(100vw, 460px);

  /* خطوط: Aref Ruqaa للعناوين والأسماء فقط، Amiri للنص والأرقام، Tajawal للواجهة */
  --f-title: "Aref Ruqaa", serif;
  --f-text: "Amiri", serif;
  --f-ui: "Tajawal", system-ui, sans-serif;
  --f-amp: "Cormorant Garamond", serif;

  /* مقاسات */
  --t-xs: 13px;
  --t-sm: 14.5px;
  --t-md: 16.5px;
  --t-lg: 19px;
  --t-xl: 22px;
  --t-h2: 30px;
  --t-name: 36px;

  /* مسافات */
  --gap-section: 64px;
  --pad-card: 40px 24px 36px;

  --foil: linear-gradient(100deg, #6e4d1c 0%, #a07a36 24%, #d6bb7a 40%, #94702f 56%, #c4a35e 74%, #6e4d1c 100%);
  --liner: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36'%3E%3Cg fill='none' stroke='%23e3c27e' stroke-opacity='.55' stroke-width='.9'%3E%3Crect x='10' y='10' width='16' height='16'/%3E%3Crect x='10' y='10' width='16' height='16' transform='rotate(45 18 18)'/%3E%3Ccircle cx='0' cy='0' r='5'/%3E%3Ccircle cx='36' cy='0' r='5'/%3E%3Ccircle cx='0' cy='36' r='5'/%3E%3Ccircle cx='36' cy='36' r='5'/%3E%3C/g%3E%3C/svg%3E");
  --ease: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--f-ui);
  font-size: var(--t-md);
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg) url(media/paper.webp) 0 0 / 460px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; height: 100svh; }
h1, h2, p, ol { margin: 0; }
img { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--copper); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* عنوان صغير فوق كل قسم */
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--f-ui); font-weight: 700; font-size: var(--t-sm); line-height: 1.4;
  color: var(--gold-text);
}
.eyebrow::before, .eyebrow::after { content: ""; width: 28px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.eyebrow::after { background: linear-gradient(-90deg, transparent, var(--gold)); }
.eyebrow--sm { font-size: 11px; gap: 6px; }
.eyebrow--sm::before, .eyebrow--sm::after { width: 14px; }

.foil {
  background: var(--foil); background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: foil 6s ease-in-out infinite;
}
@keyframes foil { 50% { background-position: 100% 0; } }

.amp { font-family: var(--f-amp); font-weight: 500; color: var(--copper); }

/* =================== المظروف =================== */
.intro {
  position: fixed; inset: 0; z-index: 50;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: max(48px, env(safe-area-inset-top)) 20px max(36px, env(safe-area-inset-bottom));
  background:
    radial-gradient(ellipse 70% 55% at 50% 46%, #fffaf1 0%, #f1e8d8 55%, #e3d7c1 100%),
    var(--bg);
  overflow: hidden;
  text-align: center;
}
.intro::before { content: ""; position: absolute; inset: 0; background: url(media/paper.webp) 0 0 / 460px; mix-blend-mode: multiply; opacity: .55; pointer-events: none; }
.intro__glow {
  position: absolute; left: 50%; top: 47%; width: 170vmax; aspect-ratio: 1; translate: -50% -50%;
  background: repeating-conic-gradient(from 0deg, #fff8e600 0deg 7deg, #fff8e6aa 9deg, #fff8e600 11deg 22deg);
  mask-image: radial-gradient(circle, #000 0%, transparent 42%);
  animation: rays 60s linear infinite; pointer-events: none; opacity: .8;
}
@keyframes rays { to { rotate: 360deg; } }
.intro__top, .intro__bottom { position: relative; display: grid; justify-items: center; gap: 10px; animation: rise 1.2s var(--ease) both; }
.intro__bottom { animation-delay: .25s; gap: 16px; }
.intro__to { font-family: var(--f-title); font-weight: 700; font-size: 28px; line-height: 1.4; color: var(--ink-2); }
.intro__names { font-family: var(--f-title); font-weight: 700; font-size: 34px; line-height: 1.3; color: var(--ink); }
.intro__names i, .letter__names i, .foot__names i { font-family: var(--f-amp); font-style: normal; font-weight: 500; color: var(--copper); margin: 0 6px; }
.intro__btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 24px; border-radius: 999px; border: 1px solid var(--line);
  background: #fffaf2f0; color: var(--ink-2); font-size: 15.5px; font-weight: 700; cursor: pointer;
  box-shadow: 0 10px 26px #54443026;
}
.intro__btn-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--copper); box-shadow: 0 0 0 0 #96492f88; animation: ping 1.8s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 10px #96492f00; } 100% { box-shadow: 0 0 0 0 #96492f00; } }
@keyframes rise { from { opacity: 0; translate: 0 16px; } }

.env {
  --w: min(84vw, 360px);
  position: relative; width: var(--w); aspect-ratio: 10 / 7;
  perspective: 1400px;
  animation: rise 1.3s .1s var(--ease) both, float 6s 1.4s ease-in-out infinite;
  margin-top: -2vh;
}
@keyframes float { 50% { translate: 0 -6px; } }
.env__back {
  position: absolute; inset: 0; z-index: 1; border-radius: 6px;
  background: var(--liner) 0 0 / 30px, linear-gradient(160deg, #9b5236, #6f321f);
  box-shadow: 0 30px 60px -18px #4a2a1a66, 0 12px 24px -12px #4a2a1a55;
}
.env__letter {
  position: absolute; left: 6%; right: 6%; top: 5%; height: 88%; z-index: 2;
  background: var(--ivory) url(media/paper.webp) 0 0 / 300px; border-radius: 3px;
  box-shadow: 0 -4px 14px #00000022;
  padding: 7%;
  transition: transform 1.1s var(--ease);
}
.letter__frame {
  height: 100%; border: 1px solid var(--line); outline: 1px solid #b8924a33; outline-offset: -5px;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding-top: 9%; gap: 4px;
}
.letter__names { font-family: var(--f-title); font-weight: 700; font-size: calc(var(--w) * .09); color: var(--ink); line-height: 1.45; }
.letter__date { font-family: var(--f-text); font-weight: 700; font-size: calc(var(--w) * .05); color: var(--muted); }
.env__pocket { position: absolute; inset: 0; z-index: 3; filter: drop-shadow(0 -1px 1.5px #3b261918); pointer-events: none; }
.pocket { position: absolute; inset: 0; border-radius: 6px; }
.pocket--l { clip-path: polygon(0 0, 53% 56%, 0 100%); background: linear-gradient(90deg, #ede3d0, #f7f0e3); }
.pocket--r { clip-path: polygon(100% 0, 47% 56%, 100% 100%); background: linear-gradient(-90deg, #ede3d0, #f7f0e3); }
.pocket--b { clip-path: polygon(0 100%, 50% 44%, 100% 100%); background: linear-gradient(0deg, #f1e8d8, #fbf6ec); }
.pocket::after { content: ""; position: absolute; inset: 0; background: url(media/paper.webp) 0 0 / 300px; mix-blend-mode: multiply; opacity: .45; }
.env__flap {
  position: absolute; left: 0; top: 0; width: 100%; height: 58%; z-index: 4;
  transform-origin: 50% 0; transform-style: preserve-3d;
  transition: transform .95s cubic-bezier(.55, .05, .3, 1), z-index 0s;
}
.env__flap::before {
  content: ""; position: absolute; inset: 0 0 -3px; clip-path: polygon(0 0, 100% 0, 50% 100%);
  background: #3b261926; filter: blur(2px); backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.flap__front, .flap__back { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.flap__front { clip-path: polygon(0 0, 100% 0, 50% 100%); background: linear-gradient(180deg, #f8f2e6, #e9dfcb); border-radius: 6px 6px 0 0; }
.flap__front::after { content: ""; position: absolute; inset: 0; background: url(media/paper.webp) 0 0 / 300px; mix-blend-mode: multiply; opacity: .45; }
.flap__back { clip-path: polygon(50% 0, 100% 100%, 0 100%); transform: rotateX(180deg); background: var(--liner) 0 0 / 30px, linear-gradient(0deg, #8d4930, #6f321f); }

.seal {
  position: absolute; left: 50%; top: 58%; z-index: 6;
  width: 32%; aspect-ratio: 1; translate: -50% -50%;
  padding: 0; border: 0; background: none; cursor: pointer; border-radius: 50%;
  -webkit-tap-highlight-color: transparent;
  transition: scale .25s;
}
.seal::before {
  content: ""; position: absolute; inset: -14%; border-radius: 50%; border: 1px solid #96492f66;
  animation: halo 2.6s ease-out infinite; pointer-events: none;
}
.seal:hover { scale: 1.04; }
.seal:active { scale: .95; }
@keyframes halo { 0% { opacity: 0; transform: scale(.8); } 35% { opacity: .9; } 100% { opacity: 0; transform: scale(1.45); } }
.seal__half {
  position: absolute; inset: -4%; width: 108%; height: 108%; max-width: none;
  filter: drop-shadow(0 8px 10px #4a24164d);
  transition: transform 1s cubic-bezier(.5, 0, .75, .4), opacity .8s ease-in;
  pointer-events: none; user-select: none;
}
.seal__half--a { clip-path: polygon(0 0, 54% 0, 47% 22%, 57% 41%, 45% 63%, 55% 82%, 49% 100%, 0 100%); }
.seal__half--b { clip-path: polygon(54% 0, 100% 0, 100% 100%, 49% 100%, 55% 82%, 45% 63%, 57% 41%, 47% 22%); }

/* تسلسل الفتح */
.is-opening .seal { animation: press .35s ease-out both; }
.is-opening .seal::before { animation: none; opacity: 0; }
.is-opening .seal__half--a { transform: translate(-46%, 70%) rotate(-32deg); opacity: 0; transition-delay: .3s; }
.is-opening .seal__half--b { transform: translate(46%, 76%) rotate(26deg); opacity: 0; transition-delay: .3s; }
@keyframes press { 50% { scale: .9; } 100% { scale: 1.04; } }
.is-opening .env { animation: none; }
.is-opening .env__flap { transform: rotateX(180deg); z-index: 1; transition-delay: .55s, 1.02s; }
.is-opening .env__letter { transform: translateY(-62%); transition-delay: 1.35s; }
.is-opening .intro__top, .is-opening .intro__bottom { opacity: 0; translate: 0 10px; transition: opacity .6s, translate .6s; }
.is-leaving .intro { opacity: 0; transition: opacity 1.1s ease .2s; pointer-events: none; }
.is-leaving .env { transform: scale(1.12) translateY(-3vh); transition: transform 1.3s var(--ease); }

/* =================== الصفحة =================== */
main {
  width: var(--col); margin: 0 auto; position: relative;
  background: var(--paper) url(media/paper.webp) 0 0 / 460px;
  box-shadow: 0 0 80px #4a3a2a26;
  overflow: hidden;
}
.col { padding: 0 20px 8px; }

/* الواجهة */
.hero {
  min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px 24px 48px; text-align: center; position: relative;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 50% at 50% 35%, #fffaf0cc, transparent 70%); pointer-events: none;
}
.basmala { position: relative; font-family: var(--f-text); font-size: var(--t-xl); line-height: 1.6; color: var(--copper); }
.arch { position: relative; width: 72%; max-width: 310px; aspect-ratio: 6 / 7; margin: 30px auto 34px; }
.arch::before, .arch::after { content: ""; position: absolute; border-radius: 999px 999px 10px 10px; pointer-events: none; }
.arch::before { inset: -9px; border: 1px solid var(--gold); }
.arch::after { inset: -16px; border: 1px solid #b8924a59; }
.arch__photo {
  position: absolute; inset: 0; border-radius: 999px 999px 6px 6px; overflow: hidden;
  box-shadow: 0 24px 50px -16px #3d2a1a73; background: #d8cdb8;
}
.arch__photo::before {
  content: ""; position: absolute; inset: 0;
  background: url(media/hero-720.webp) 50% 5.5% / 134% auto no-repeat;
  transform: scale(1.12); transform-origin: 50% 40%;
}
.is-open .arch__photo::before { transform: scale(1); transition: transform 7s cubic-bezier(.2, .6, .3, 1); }
.arch__photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, #2f2a2433); }
.arch__sprig { position: absolute; width: 104px; left: -40px; bottom: -30px; rotate: -16deg; z-index: 2; filter: drop-shadow(2px 6px 4px #4a3a2a30); }
.hero__names { position: relative; display: flex; align-items: center; justify-content: center; gap: 14px; font-weight: 400; }
.hero__names .foil { font-family: var(--f-title); font-weight: 700; font-size: 56px; line-height: 1.3; padding: 0 4px; }
.hero__amp { font-family: var(--f-amp); font-weight: 500; font-size: 40px; line-height: 1; color: var(--copper); translate: 0 4px; }
.hero__date {
  position: relative; margin-top: 14px; display: flex; align-items: center; gap: 12px;
  font-family: var(--f-text); font-weight: 700; font-size: var(--t-lg); color: var(--ink-2);
}
.hero__date b { color: var(--gold); font-size: 9px; }
.hero__date::before, .hero__date::after { content: ""; width: 28px; height: 1px; background: var(--line); }
.js .hero-in { opacity: 0; translate: 0 22px; }
.is-open .hero-in { opacity: 1; translate: 0 0; transition: opacity 1.1s, translate 1.1s var(--ease); transition-delay: calc(.2s + var(--d) * .17s); }

/* ظهور الأقسام */
.js [data-reveal] { opacity: 0; translate: 0 34px; transition: opacity 1s, translate 1s var(--ease); }
.js [data-reveal].is-visible { opacity: 1; translate: 0 0; }

.flourish { display: block; width: 190px; height: 20px; margin: 0 auto; }
.flourish--sm { width: 150px; margin: 24px auto 16px; }

/* الآية */
.verse { text-align: center; padding: 8px 4px 0; }
.verse__text { font-family: var(--f-text); font-size: 23px; line-height: 2; color: var(--ink); margin: 18px 0 6px; }
.verse__ref { font-family: var(--f-ui); font-weight: 500; font-size: var(--t-sm); color: var(--gold-text); }

/* البطاقات */
.card {
  position: relative; text-align: center;
  background: var(--ivory) url(media/paper.webp) 0 0 / 360px;
  border: 1px solid var(--line); border-radius: 4px;
  box-shadow: 0 22px 50px -24px #4a3a2a59, 0 2px 0 #fff inset;
}
.card::before { content: ""; position: absolute; inset: 8px; border: 1px solid #b8924a40; pointer-events: none; }
.corner { position: absolute; width: 50px; height: 50px; pointer-events: none; }
.corner--tl { top: 4px; left: 4px; }
.corner--tr { top: 4px; right: 4px; transform: scaleX(-1); }
.corner--bl { bottom: 4px; left: 4px; transform: scaleY(-1); }
.corner--br { bottom: 4px; right: 4px; transform: scale(-1, -1); }

/* بطاقة الدعوة الرسمية */
.card--formal { margin: 44px 0 0; padding: 48px 26px 42px; }
.formal__intro { font-family: var(--f-text); font-size: var(--t-lg); line-height: 1.7; color: var(--muted); margin-top: 20px; }
.formal__hosts { margin: 6px 0 2px; display: grid; gap: 0; }
.formal__host { font-family: var(--f-text); font-weight: 700; font-size: 22px; line-height: 1.75; color: var(--ink); }
.formal__and { font-family: var(--f-text); font-weight: 700; font-size: var(--t-lg); line-height: 1.3; color: var(--copper); }
.formal__occasion, .formal__father { font-family: var(--f-text); font-size: var(--t-lg); line-height: 1.7; color: var(--muted); }
.formal__occasion { margin: 6px 0 18px; }
.formal__father { margin: 14px 0 12px; }
.formal__person { display: grid; justify-items: center; }
.formal__title { font-family: var(--f-ui); font-weight: 700; font-size: var(--t-sm); line-height: 1.5; color: var(--gold-text); }
.formal__name { font-family: var(--f-title); font-weight: 700; font-size: var(--t-name); line-height: 1.4; color: var(--copper); }
.formal__closing { font-family: var(--f-text); font-weight: 700; font-size: var(--t-lg); color: var(--ink-2); }

/* رأس القسم */
.block { margin: var(--gap-section) 0; }
.head { display: grid; justify-items: center; gap: 2px; margin-bottom: 24px; text-align: center; }
.head h2 { font-family: var(--f-title); font-weight: 700; font-size: var(--t-h2); color: var(--ink); line-height: 1.45; }

/* الموعد مع طبقة الذهب */
.when {
  position: relative; width: min(100%, 290px); height: 280px; margin: 0 auto;
  border-radius: 999px 999px 10px 10px; overflow: hidden;
  box-shadow: 0 24px 50px -22px #4a3a2a66;
}
.when::after { content: ""; position: absolute; inset: 9px; border-radius: 999px 999px 4px 4px; border: 1px solid var(--line); pointer-events: none; z-index: 3; }
.when__card {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
  background: var(--ivory) url(media/paper.webp) 0 0 / 300px; padding-top: 26px;
}
.when__wd { font-family: var(--f-ui); font-weight: 700; font-size: 17px; color: var(--muted); }
.when__day { font-family: var(--f-text); font-weight: 700; font-size: 84px; line-height: 1.25; color: var(--copper); }
.when__my { font-family: var(--f-text); font-weight: 700; font-size: var(--t-xl); line-height: 1.4; color: var(--ink); }
.when__time { margin-top: 8px; padding: 6px 16px 0; border-top: 1px solid var(--line); font-weight: 500; font-size: var(--t-md); color: var(--ink-2); }
.when__foil { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; touch-action: none; cursor: grab; transition: opacity .7s; }
.when__foil.is-clear { opacity: 0; pointer-events: none; }
.when__hint {
  position: absolute; inset: auto 0 36px; z-index: 2; pointer-events: none;
  display: grid; justify-items: center; gap: 6px;
  font-family: var(--f-ui); font-weight: 700; font-size: 15px; color: #3d2a0e; text-shadow: 0 1px 0 #f6e6b8aa;
  transition: opacity .3s;
}
.when__hint svg { width: 30px; height: 30px; fill: none; stroke: #3d2a0e; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; animation: swipe 1.8s ease-in-out infinite; }
.when__hint.is-hidden { opacity: 0; }
@keyframes swipe { 0%, 100% { translate: 10px 0; rotate: 8deg; } 50% { translate: -10px 0; rotate: -8deg; } }

/* العد التنازلي */
.count { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.count__u {
  display: grid; justify-items: center; gap: 2px; padding: 22px 0 14px;
  background: var(--ivory); border: 1px solid var(--line); border-radius: 999px 999px 8px 8px;
  box-shadow: 0 14px 30px -18px #4a3a2a59;
  position: relative;
}
.count__u::before { content: ""; position: absolute; inset: 4px; border: 1px solid #b8924a26; border-radius: inherit; }
.count__u b { font-family: var(--f-text); font-weight: 700; font-size: 34px; line-height: 1.3; color: var(--copper); font-variant-numeric: tabular-nums; }
.count__u span { font-family: var(--f-ui); font-weight: 500; font-size: var(--t-sm); color: var(--muted); }
.count__done { text-align: center; margin-top: 18px; font-family: var(--f-title); font-weight: 700; font-size: 24px; color: var(--copper); }

/* البرنامج */
.prog { list-style: none; padding: 0; position: relative; width: fit-content; min-width: 220px; margin: 0 auto; display: grid; gap: 20px; }
.prog::before { content: ""; position: absolute; right: 31px; top: 32px; bottom: 32px; border-right: 1px dashed var(--gold); }
.prog__item { display: flex; align-items: center; gap: 18px; position: relative; }
.prog__icon {
  flex: none; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ivory); border: 1px solid var(--gold); color: var(--copper);
  box-shadow: 0 0 0 5px var(--paper), 0 0 0 6px #b8924a40, 0 10px 22px -10px #4a3a2a66;
}
.prog__icon svg { width: 30px; height: 30px; }
.prog__time { display: flex; align-items: baseline; gap: 6px; line-height: 1.4; }
.prog__time b { font-family: var(--f-text); font-weight: 700; font-size: 24px; color: var(--copper); }
.prog__time span { font-weight: 500; font-size: var(--t-sm); color: var(--muted); }
.prog__title { font-family: var(--f-text); font-weight: 700; font-size: var(--t-xl); line-height: 1.4; color: var(--ink); }

/* المكان */
.venue { background: var(--ivory); border: 1px solid var(--line); border-radius: 999px 999px 8px 8px; padding: 10px; box-shadow: 0 22px 50px -24px #4a3a2a66; }
.venue__photo { aspect-ratio: 5 / 4; border-radius: 999px 999px 4px 4px; background: url(media/al-mubaraka-venue.webp) 50% 100% / auto 103% no-repeat; position: relative; }
.venue__photo::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px #ffffff55; background: linear-gradient(180deg, transparent 70%, #2f2a2422); }
.venue__info { text-align: center; padding: 22px 12px 18px; display: grid; justify-items: center; gap: 2px; }
.venue__name { font-family: var(--f-title); font-weight: 700; font-size: 27px; line-height: 1.45; color: var(--ink); }
.venue__city { font-weight: 500; font-size: var(--t-md); color: var(--muted); margin-bottom: 18px; }

/* أزرار */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 24px; border-radius: 999px; border: 1.5px solid var(--copper);
  background: transparent; color: var(--copper); font-weight: 700; font-size: 15.5px; line-height: 1.2; cursor: pointer;
  transition: transform .15s, box-shadow .2s, background-color .2s;
}
.btn:active { transform: scale(.97); }
.btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.btn--solid { border: 0; color: var(--on-copper); background: linear-gradient(135deg, #a3553a, var(--copper-d)); box-shadow: 0 14px 26px -12px #74341fcc, inset 0 1px 0 #ffffff33; }
.btn--wide { width: 100%; min-height: 52px; font-size: 17px; }

/* احفظ التاريخ */
.save { display: grid; justify-items: center; gap: 24px; }
.save__cal {
  position: relative; width: 156px; background: var(--ivory); border-radius: 12px; overflow: hidden; text-align: center;
  border: 1px solid var(--line); box-shadow: 0 22px 44px -20px #4a3a2a73; display: grid; padding-bottom: 14px;
}
.save__m { background: linear-gradient(135deg, #a3553a, var(--copper-d)); color: var(--on-copper); font-family: var(--f-ui); font-weight: 700; font-size: 15px; padding: 12px 0 9px; }
.save__d { font-family: var(--f-text); font-weight: 700; font-size: 58px; line-height: 1.35; color: var(--copper); }
.save__w { font-family: var(--f-ui); font-weight: 700; font-size: 15px; color: var(--muted); }
.save__ring { position: absolute; top: -4px; width: 8px; height: 16px; border-radius: 4px; background: #e9dcc4; box-shadow: 0 1px 2px #0003; z-index: 1; }
.save__ring:first-child { right: 42px; } .save__ring:nth-child(2) { left: 42px; }
.save__btns { display: flex; gap: 10px; }

/* تأكيد الحضور */
.card--rsvp { padding: 40px 24px 30px; }
.card--rsvp .head { margin-bottom: 22px; }
#rsvpForm { display: grid; gap: 18px; text-align: right; }
.field { display: grid; gap: 8px; }
.field > span { font-family: var(--f-ui); font-weight: 700; font-size: 15px; color: var(--ink-2); }
.field input, .field textarea {
  width: 100%; border: 1px solid #b8924a80; background: #fffdf8; border-radius: 12px; padding: 13px 15px; font-size: 16px; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.field input::placeholder, .field textarea::placeholder { color: #6f6556; }
.field input:focus, .field textarea:focus { border-color: var(--copper); box-shadow: 0 0 0 3px #96492f1f; }
.field textarea { min-height: 100px; resize: vertical; line-height: 1.7; }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choice__o { min-height: 50px; padding: 12px 8px; border-radius: 12px; border: 1px solid #b8924a80; background: #fffdf8; font-weight: 700; font-size: 15.5px; cursor: pointer; transition: background-color .2s, color .2s; }
.choice__o[aria-checked="true"] { background: var(--copper); border-color: var(--copper); color: var(--on-copper); animation: pop .35s; }
@keyframes pop { 50% { transform: scale(1.05); } }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.err { color: var(--copper); text-align: center; font-size: 15px; font-weight: 700; }
.err:empty { display: none; }
.shake { animation: shake .4s; }
@keyframes shake { 25% { translate: 5px 0; } 50% { translate: -5px 0; } 75% { translate: 3px 0; } }
.thanks { display: grid; justify-items: center; gap: 14px; padding: 4px 0 8px; animation: rise .8s var(--ease) both; }
.thanks img { width: 92px; filter: drop-shadow(0 8px 10px #4a24164d); }
.thanks p { font-family: var(--f-text); font-weight: 700; font-size: var(--t-xl); line-height: 1.6; color: var(--ink); text-align: center; }

/* التهاني */
.wishes { display: grid; gap: 12px; }
.wish {
  display: flex; gap: 12px; padding: 15px 16px; background: var(--ivory); border: 1px solid #b8924a4d; border-radius: 14px;
  box-shadow: 0 10px 24px -16px #4a3a2a4d; animation: rise .6s var(--ease) both;
}
.wish__av {
  flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--f-text); font-weight: 700; font-size: 21px; color: #fff; background: var(--av);
  box-shadow: inset 0 2px 4px #ffffff40, inset 0 -3px 6px #0000002a;
}
.wish__name { font-weight: 700; font-size: var(--t-md); color: var(--ink); }
.wish__msg { font-size: var(--t-md); line-height: 1.75; color: var(--ink-2); white-space: pre-line; overflow-wrap: anywhere; }
.wish__time { font-size: var(--t-xs); color: var(--muted); margin-top: 4px; direction: ltr; text-align: right; }
.wishes__empty { text-align: center; font-family: var(--f-text); font-weight: 700; font-size: var(--t-lg); color: var(--muted); }
.wishes__more { display: flex; margin: 18px auto 0; }

/* التذييل */
.foot { text-align: center; padding: 8px 20px max(100px, env(safe-area-inset-bottom)); display: grid; justify-items: center; gap: 6px; }
.foot__seal { width: 84px; filter: drop-shadow(0 10px 12px #4a24164d); animation: float 5s ease-in-out infinite; }
.foot__bless { font-family: var(--f-text); font-size: var(--t-lg); line-height: 1.7; color: var(--muted); margin-top: 10px; }
.foot__names { font-family: var(--f-title); font-weight: 700; font-size: 36px; line-height: 1.4; color: var(--ink); }
.foot__date { font-family: var(--f-text); font-weight: 700; font-size: var(--t-lg); color: var(--gold-text); }

/* زر الموسيقى */
.music {
  position: fixed; z-index: 40; bottom: max(16px, env(safe-area-inset-bottom)); right: max(16px, calc(50vw - var(--col) / 2 + 16px));
  width: 50px; height: 50px; border-radius: 50%; border: 1px solid var(--line); cursor: pointer;
  background: #fffaf2f0; box-shadow: 0 10px 24px #4a3a2a40; display: grid; place-items: center;
}
.music__bars { display: flex; align-items: flex-end; gap: 3px; height: 18px; }
.music__bars i { width: 3px; height: 30%; border-radius: 2px; background: var(--copper); }
.music.is-on .music__bars i { animation: eq 1s ease-in-out infinite; }
.music.is-on .music__bars i:nth-child(2) { animation-delay: -.3s; }
.music.is-on .music__bars i:nth-child(3) { animation-delay: -.6s; }
.music.is-on .music__bars i:nth-child(4) { animation-delay: -.15s; }
@keyframes eq { 0%, 100% { height: 25%; } 50% { height: 100%; } }

/* بتلات وقلوب */
.petals { position: fixed; inset: 0; z-index: 15; pointer-events: none; overflow: hidden; }
.petal { position: absolute; top: 0; will-change: transform; animation: fall linear infinite; }
.petal i { display: block; background: 50% / contain no-repeat; filter: drop-shadow(1px 2px 1.5px #5a3a2a2e); animation: tumble ease-in-out infinite alternate; }
@keyframes fall {
  0% { transform: translateY(-8vh); }
  25% { transform: translate3d(calc(var(--dx) * .2 + 4vw), 22vh, 0); }
  50% { transform: translate3d(calc(var(--dx) * .5 - 3vw), 50vh, 0); }
  75% { transform: translate3d(calc(var(--dx) * .75 + 3vw), 78vh, 0); }
  100% { transform: translate3d(var(--dx), 108vh, 0); }
}
@keyframes tumble {
  from { transform: rotate3d(1, calc(.3 + var(--rx, 0) * .2), .2, -35deg) rotate(-20deg); }
  to { transform: rotate3d(1, calc(.5 + var(--rx, 0) * .2), .3, 160deg) rotate(140deg); }
}
.hearts { position: fixed; inset: 0; z-index: 60; pointer-events: none; overflow: hidden; }
.hearts span { position: absolute; bottom: -30px; animation: heart ease-out both; }
@keyframes heart { 0% { opacity: 0; transform: translateY(0) scale(.5); } 12% { opacity: .95; } 100% { opacity: 0; transform: translateY(-108vh) scale(1.15) rotate(var(--rot)); } }

/* شاشات ضيّقة */
@media (max-width: 360px) {
  :root { --t-h2: 27px; --t-name: 32px; }
  .hero__names .foil { font-size: 48px; }
  .count__u b { font-size: 28px; }
  .card--formal { padding: 44px 20px 38px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
