/* ══════════════════════════════════════════
   شادي & سارة — دعوة زفاف
   بناء يطابق عرض القالب الأصلي minimalism-dark-red
   ══════════════════════════════════════════ */

:root {
  --cream:      #fff7eb;   /* خلفية الصفحة */
  --wine:       #511419;   /* البرغندي الأساسي */
  --wine-deep:  #590310;   /* عنوان Save The Date */
  --oncard:     #ece4d8;   /* نص داخل البطاقات البرغندية */
  --oncard-dim: rgba(236, 228, 216, .7);
  --line:       rgba(81, 20, 25, .18);

  /* خطوط عربية أصيلة — لا يُسنَد نص عربي إلى خط لاتيني أبداً */
  --f-display: 'Aref Ruqaa', 'Amiri', 'Traditional Arabic', serif;  /* الأسماء الكبيرة — رقعة */
  --f-body:    'Amiri', 'Traditional Arabic', serif;                /* النصوص — نسخ */
  --f-head:    'Reem Kufi', 'Amiri', sans-serif;                    /* العناوين — كوفي */

  /* لاتيني بحت: Save The Date، اسم القاعة، الأرقام */
  --f-latin:   'Cormorant Garamond', 'Times New Roman', serif;
  --f-num:     'EB Garamond', Georgia, serif;

  /* أسماء قديمة للتوافق */
  --f-ar:     var(--f-body);
  --f-serif:  var(--f-body);
  --f-script: var(--f-display);

  --ease: cubic-bezier(.22, .61, .36, 1);
}

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

[hidden] { display: none !important; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }

body {
  margin: 0;
  background: #f3ece1;
  color: var(--wine);
  font-family: var(--f-body);
  /* العربية تحتاج سطراً أوسع من اللاتينية */
  line-height: 2;
  /* clip لا hidden: hidden يجعل العنصر حاوية تمرير، وخلطها مع html
     هو ما جعل متصفّحات الجوال تسمح بجرّ الصفحة جانبياً */
  overflow-x: clip;
  /* تفعيل الوصلات والأشكال العربية وتنعيم الحواف */
  font-feature-settings: 'liga' 1, 'calt' 1, 'kern' 1;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.is-locked { overflow: hidden; }

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


/* ══════════ شاشة الفتح ══════════ */

.gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px 12px;
  text-align: center;
  overflow: hidden;
  background:
    linear-gradient(rgba(255,247,235,.9), rgba(246,233,216,.94)),
    url('../img/theme/paper.webp') center top/100%,
    var(--cream);
  transition: opacity .9s var(--ease), visibility .9s;
}

.gate.is-open { opacity: 0; visibility: hidden; pointer-events: none; }

/* يجب ألّا يضيق عن المظروف، وإلا فاض عنه وانزاح عن محور الأسماء */
.gate__inner {
  width: 100%;
  max-width: min(470px, calc(100vw - 24px));
  animation: rise 1s var(--ease) both;
}

.gate__eyebrow {
  font-family: var(--f-latin);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--wine-deep);
  margin: 0 0 6px;
}

.gate__names {
  font-family: var(--f-display);
  font-size: clamp(44px, 13vw, 58px);
  font-weight: 700;
  line-height: 1.6;
  color: var(--wine);
  margin: 0 0 8px;
}

.gate__names span { opacity: .4; }

.gate__env {
  position: relative;
  display: block;
  /* مظروف أكبر عند البداية */
  width: min(470px, calc(100vw - 24px));
  margin: 40px auto 34px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  aspect-ratio: 1013 / 668;
  transition: transform .45s var(--ease);
  animation: drFloat 5s ease-in-out infinite;
}

.gate__env:hover  { transform: translateY(-6px) scale(1.03); }
.gate__env:active { transform: scale(.98); }

.gate__env-cover {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%; height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 18px 34px rgba(81, 20, 25, .32));
  pointer-events: none;
}


/* اللوح الساد: يظهر فقط عبر فتحة الـ V فيبدو المظروف مغلقاً */
.gate__env-seal {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 2px;
  /* ألوان الغطاء المطوي مأخوذة بالعيّنة من المثلث السفلي — وهو غطاء
     مطوي فعلاً في الصورة (#491416 · #4c171b · #461317). التدرّج رأسي
     كورقة مطوية، لا أفقي كجانبَي المظروف، وإلا بدا مفتوحاً. */
  background:
    /* ظلّ ناعم عند ملتقى الطيّة يمنح الغطاء عمقاً فلا يبدو مسطّحاً */
    radial-gradient(120% 85% at 50% 118%, rgba(28, 6, 10, .55) 0%, transparent 62%),
    /* إضاءة مائلة خفيفة تُبرز الغطاء كسطح مستقلّ */
    linear-gradient(168deg, #64222b 0%, #58191f 38%, #4c1519 70%, #421118 100%);
  pointer-events: none;
}

/* البطاقة مخفية تماماً في البداية */
.gate__env-card {
  position: absolute;
  z-index: 3;
  left: 15%;
  bottom: 8%;
  width: 70%;
  max-height: 92%;
  object-fit: cover;
  object-position: top center;
  border-radius: 3px 3px 0 0;
  box-shadow: 0 -6px 18px rgba(0, 0, 0, .28);
  opacity: 0;
  transform: translateY(14%);
  pointer-events: none;
}

/* عند الفتح: البطاقة تظهر بالتدريج وترتفع خارج المظروف */
.gate.is-opening .gate__env      { animation: none; }
.gate.is-opening .gate__env-card { animation: cardReveal 1.9s var(--ease) .15s both; }

@keyframes cardReveal {
  0%   { opacity: 0; transform: translateY(14%)  scale(.97); }
  22%  { opacity: 1; transform: translateY(4%)   scale(.99); }
  100% { opacity: 1; transform: translateY(-48%) scale(1.06); }
}

.gate__to {
  font-family: var(--f-body);
  font-size: 19px;
  color: var(--wine);
  margin: 0 0 4px;
}

.gate__to span { font-weight: 700; }

.gate__hint {
  font-family: var(--f-head);
  font-size: 17px;
  letter-spacing: normal;
  color: rgba(81, 20, 25, .6);
  margin: 0;
  animation: hintPulse 2.4s ease-in-out infinite;
}


/* ══════════ زر الموسيقى ══════════ */

.music-toggle {
  position: fixed;
  top: 14px; right: 14px;
  z-index: 60;
  /* 44px هو الحد الأدنى المريح للمس على الجوال */
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 247, 235, .85);
  color: var(--wine);
  cursor: pointer;
}

.music-toggle.is-playing .music-toggle__icon { animation: spin 4s linear infinite; }


/* ══════════ لوح الدعوة ══════════ */

.invite {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin-inline: auto;
  background: var(--cream);
  color: var(--wine);
  /* بلا قصّ هنا عمداً: الورود يجب أن تخرج خارج إطار اللوح إلى خلفية
     الصفحة. القصّ يقع على مستوى الصفحة (html/body) فيمنع الجرّ الجانبي
     دون أن يقطع الورود عند حافة الإطار. */
  isolation: isolate;
  opacity: 0;
  transition: opacity 1s var(--ease);
}

.invite.is-visible { opacity: 1; }

@media (min-width: 900px) {
  .invite { max-width: 900px; border-inline: 1px solid rgba(81, 20, 25, .13); }
}

/* نسيج الورق فوق اللوح كله */
.invite__paper {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: url('../img/theme/paper.webp') center top/100%;
  mix-blend-mode: multiply;
  opacity: .5;
}


/* ══════════ الغلاف ══════════ */

.hero {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 36px 56px;
  text-align: center;
  overflow-x: clip;
}

.hero__castle {
  position: absolute;
  left: 50%;
  top: 26%;
  width: 170%;
  max-width: none;
  transform: translateX(-50%);
  opacity: .1;
  pointer-events: none;
}

.hero__eyebrow {
  position: relative;
  z-index: 1;
  font-family: var(--f-latin);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--wine-deep);
  margin: 0;
}

@media (min-width: 768px) {
  .hero__eyebrow { font-size: 21px; }
}


/* ── تركيبة المظروف ── */

.scene {
  position: relative;
  z-index: 1;
  width: 82%;
  max-width: 330px;
  margin-top: 96px;
  aspect-ratio: 333 / 384;
}

@media (min-width: 768px) {
  .scene { max-width: 420px; margin-top: 112px; }
}

.scene__open {
  position: absolute;
  inset: 0;
  z-index: 10;
  width: 100%;
  max-width: none;
}

/* الصورة المائلة داخل المظروف */
.scene__photo {
  position: absolute;
  left: 33%;
  top: -2%;
  z-index: 20;
  width: 64%;
}

.scene__photo-frame {
  aspect-ratio: 221 / 309;
  transform: rotate(12deg);
  border: 7px solid #fff;
  background: #fff;
  box-shadow: 2px 2px 4px rgba(0, 0, 0, .25);
}

.scene__photo-frame img { width: 100%; height: 100%; object-fit: cover; }

.scene__flower {
  position: absolute;
  left: -2%;
  top: -12%;
  z-index: 25;
  display: block;
  width: 42%;
  pointer-events: none;
}

.scene__flower img {
  width: 100%;
  max-width: none;
  transform: rotate(-17deg);
  filter: drop-shadow(3px 4px 3px rgba(0, 0, 0, .3));
}

.scene__cover {
  position: absolute;
  bottom: 0; left: 0;
  z-index: 30;
  width: 100%;
  max-width: none;
}


/* ── الأسماء ── */

.hero__names {
  position: relative;   /* مرجع تموضع علامة & */
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  margin-top: 64px;
  isolation: isolate;
}

.hero__name {
  font-family: var(--f-display);
  font-size: clamp(50px, 13.5vw, 64px);
  font-weight: 700;
  /* الرقعة تمتد تحت خط الأساس — نمنع القصّ */
  line-height: 1.5;
  color: var(--wine);
  margin: 0;
}

@media (min-width: 768px) {
  .hero__name  { font-size: 66px; }
  .hero__names { margin-top: 80px; }
}

.hero__amp {
  position: absolute;
  top: 37%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--f-latin);
  font-size: 104px;
  line-height: 1;
  color: rgba(81, 20, 25, .15);
  pointer-events: none;
}

@media (min-width: 768px) {
  .hero__amp { font-size: 136px; }
}


/* ══════════ البطاقات البرغندية ══════════ */

/* بلا z-index هنا عمداً: لو أنشأ القسم سياق تراصّ لحُبست وروده داخله
   فغطّتها بطاقة القسم التالي. الترتيب الآن عام عبر اللوح كله. */
.block {
  position: relative;
  width: 84%;
  max-width: 420px;
  margin: 0 auto 40px;
}

@media (min-width: 768px) {
  .block { max-width: 560px; margin-bottom: 64px; }
}

.card {
  position: relative;
  z-index: 2;
  overflow: hidden;
  border-radius: 12px;
  padding: 36px 20px 40px;
  text-align: center;
  color: var(--oncard);
  background: var(--wine);
  box-shadow: 4px 4px 10px rgba(0, 0, 0, .25);
}

/* نسيج ورقي داخل البطاقة */
.card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../img/theme/paper.webp') center/cover;
  mix-blend-mode: multiply;
  opacity: .4;
  pointer-events: none;
}

.card > * { position: relative; z-index: 1; }

.card__title {
  font-family: var(--f-head);
  font-size: 27px;
  font-weight: 600;
  /* العربية متصلة — أي تباعد يفصل حروفها */
  letter-spacing: normal;
  line-height: 1.7;
  color: var(--oncard);
  margin: 0 0 26px;
}

.card__lede {
  font-family: var(--f-body);
  font-size: 21px;
  line-height: 2.05;
  color: var(--oncard);
  margin: 24px 0;
}

/* أول سطر في بطاقة بلا عنوان: حشوة البطاقة وحدها تكفي */
.card__lede--first { margin-top: 0; }


/* ── الوالدان ── */

.honour {
  font-family: var(--f-head);
  font-size: 19px;
  font-weight: 500;
  color: var(--oncard-dim);
  margin: 18px 0 12px;
}

/* اسما الوالدين مرصوفان رأسياً بينهما «و» */
.fathers {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
}

.fathers__side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.fathers__name {
  font-family: var(--f-body);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.8;
  color: var(--oncard);
  margin: 0;
  overflow-wrap: anywhere;
}

/* صفة الوالد تحت اسمه */
.fathers__role {
  font-family: var(--f-head);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--oncard-dim);
  margin: 0;
}

.fathers__and {
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.4;
  color: var(--oncard-dim);
  margin-block: 6px;
}


/* ── العروسان ── */

/* اسما العروسين — بؤرة البطاقة */
.couple-names {
  font-family: var(--f-display);
  font-size: clamp(38px, 11vw, 56px);
  font-weight: 700;
  /* خط الرقعة يمتدّ تحت خط الأساس */
  line-height: 1.75;
  letter-spacing: normal;
  color: var(--oncard);
  margin: 20px 0;
}

.couple-names span {
  font-family: var(--f-latin);
  font-size: .72em;
  opacity: .75;
  padding-inline: 4px;
}

/* السطر الختامي داخل البطاقة */
.card__closing {
  font-family: var(--f-body);
  font-size: 19px;
  line-height: 2;
  color: var(--oncard);
  margin: 22px 0 0;
  padding-top: 20px;
  border-top: 1px solid rgba(236, 228, 216, .28);
}


/* ── الاستقبال ── */

.reception__lede {
  font-family: var(--f-head);
  font-size: 25px;
  font-weight: 500;
  letter-spacing: normal;
  color: var(--oncard);
  margin: 0 0 24px;
}

.reception {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.reception__col { display: flex; flex-direction: column; align-items: center; gap: 5px; }

/* عربي: بلا تباعد */
.reception__day {
  font-family: var(--f-body);
  font-size: 17px;
  color: var(--oncard-dim);
}

/* لاتيني: التباعد هنا مناسب */
.reception__time {
  font-family: var(--f-num);
  font-size: 18px;
  letter-spacing: .06em;
  color: var(--oncard-dim);
}

.reception__rule { width: 1px; height: 46px; background: rgba(236, 228, 216, .45); }

.reception__num  { font-family: var(--f-num);  font-size: 56px; line-height: 1; color: var(--oncard); }
.reception__mon  { font-family: var(--f-body); font-size: 21px; color: var(--oncard); }
.reception__year { font-family: var(--f-num);  font-size: 17px; color: var(--oncard-dim); }


/* ── العد التنازلي ── */

.clock {
  font-family: var(--f-body);
  font-size: 20px;
  line-height: 2;
  color: var(--oncard);
  margin: 0 0 6px;
}

.clock span {
  font-family: var(--f-num);
  font-size: 25px;
  font-variant-numeric: tabular-nums;
}

.clock__done { font-family: var(--f-body); font-size: 21px; color: var(--oncard); }


/* ── التقويم ── */

.cal {
  width: fit-content;
  max-width: 100%;
  margin: 14px auto 22px;
  padding: 8px 16px 16px;
  border-radius: 10px;
  background: var(--oncard);
  overflow: hidden;
}

.cal__inner { width: 280px; max-width: 100%; color: var(--wine); }

@media (min-width: 768px) { .cal__inner { width: 330px; } }

.cal__month {
  font-family: var(--f-display);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.7;
  text-align: center;
  padding: 8px 0 12px;
  margin: 0;
  border-bottom: 1px solid rgba(81, 20, 25, .27);
}

.cal__week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-bottom: 2px solid var(--wine);
}

.cal__week span {
  text-align: center;
  padding: 7px 0;
  font-family: var(--f-head);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: normal;
  opacity: .65;
}

.cal__days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px 0;
  padding: 8px 4px;
}

.cal__day {
  position: relative;
  height: 30px;
  display: grid;
  place-items: center;
  font-family: var(--f-num);
  font-size: 17px;
}

/* اليوم الموعود داخل قلب */
.cal__day--mark { color: #fff; font-weight: 700; }

.cal__day--mark::before {
  content: '';
  position: absolute;
  inset: 50% auto auto 50%;
  translate: -50% -50%;
  width: 26px; height: 24px;
  background: var(--wine);
  -webkit-mask: var(--heart) center/contain no-repeat;
  mask: var(--heart) center/contain no-repeat;
}

.cal__day--mark span { position: relative; z-index: 1; }

:root {
  --heart: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 22'%3E%3Cpath d='M12 21C12 21 1.5 13.5 1.5 7.5C1.5 4.46 3.96 2 7 2C8.76 2 10.35 2.81 11.4 4.09L12 4.8L12.6 4.09C13.65 2.81 15.24 2 17 2C20.04 2 22.5 4.46 22.5 7.5C22.5 13.5 12 21 12 21Z'/%3E%3C/svg%3E");
}


/* ── الأزرار ── */

.btn {
  display: inline-block;
  font-family: var(--f-head);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: normal;
  padding: 12px 30px;
  border: 1px solid rgba(236, 228, 216, .5);
  border-radius: 999px;
  background: transparent;
  color: var(--oncard);
  cursor: pointer;
  text-decoration: none;
  transition: background .25s, border-color .25s;
}

.btn:hover { background: rgba(236, 228, 216, .12); border-color: var(--oncard); }


/* ── المكان والخريطة ── */

/* اسم القاعة لاتيني */
.venue {
  font-family: var(--f-num);
  font-size: 30px;
  color: var(--oncard);
  margin: 0 0 4px;
}

.venue__sub {
  font-family: var(--f-body);
  font-size: 18px;
  color: var(--oncard-dim);
  margin: 0 0 20px;
}

.map {
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  margin-bottom: 18px;
  border: 1px solid rgba(236, 228, 216, .25);
}

.map iframe { width: 100%; height: 100%; border: 0; display: block; }


/* ── سجل التهاني ── */

/* minmax(0,1fr) يمنع عناصر الشبكة من رفض الانكماش دون عرضها الطبيعي */
.wish-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  text-align: start;
}

.wish-form input,
.wish-form textarea {
  /* الحقول لها عرض داخلي افتراضي يتجاوز الشاشات الضيقة — نُلغيه */
  width: 100%;
  min-width: 0;
  max-width: 100%;
  font-family: var(--f-body);
  font-size: 18px;
  line-height: 1.9;
  color: var(--wine);
  padding: 10px 12px;
  border: 1px solid rgba(236, 228, 216, .4);
  border-radius: 8px;
  background: rgba(255, 247, 235, .92);
  resize: vertical;
}

.wish-form input::placeholder,
.wish-form textarea::placeholder { color: rgba(81, 20, 25, .45); }

.wish-form input:focus,
.wish-form textarea:focus { outline: none; border-color: var(--oncard); }

.wish-form .btn { justify-self: center; margin-top: 4px; }
.wish-form .btn[disabled] { opacity: .55; cursor: default; }

/* مصيدة السبام: مخفية بصرياً وعن قارئات الشاشة */
.wish-trap {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.wish-status {
  font-family: var(--f-body);
  font-size: 16px;
  color: var(--oncard-dim);
  min-height: 1.5em;
  margin: 14px 0 0;
}

.wishes { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; text-align: start; }

.wish {
  padding: 12px 14px;
  border: 1px solid rgba(236, 228, 216, .25);
  border-radius: 8px;
  background: rgba(236, 228, 216, .08);
  animation: rise .5s var(--ease) both;
}

.wish__name { font-family: var(--f-head);  font-size: 19px; font-weight: 600; color: var(--oncard); margin: 0 0 4px; }
.wish__text { font-family: var(--f-body);  font-size: 18px; line-height: 1.95; color: var(--oncard); margin: 0 0 6px; }
.wish__time { font-family: var(--f-num);   font-size: 14px; color: var(--oncard-dim); }

.wishes__empty { font-family: var(--f-body); font-size: 17px; color: var(--oncard-dim); margin: 18px 0 0; }


/* ══════════ الختام ══════════ */

/* بلا نص الآن — ارتفاع يكفي لتستقرّ الوردة الختامية دون أن تركب ما فوقها */
.closing {
  position: relative;
  padding: 20px 36px 40px;
  text-align: center;
}

@media (min-width: 900px) {
  .closing { min-height: 300px; }
}

.closing__text {
  font-family: var(--f-body);
  font-size: 21px;
  line-height: 2.15;
  color: var(--wine);
  margin: 0 0 24px;
}

.closing__names {
  font-family: var(--f-display);
  font-size: clamp(36px, 10.5vw, 52px);
  font-weight: 700;
  line-height: 1.8;
  color: var(--wine);
  margin: 0;
}


/* ══════════ الورود الطافية ══════════ */

/* خلف محتوى القسم دائماً — تُطلّ من وراء حواف البطاقة ولا تحجب النص.
   القيمة السالبة تضمن بقاءها تحت النصوص المنسابة أيضاً، لا تحت البطاقات وحدها. */
/* فوق البطاقات كي تُرى، لكن موضعها يُبقي تداخلها داخل حشوة البطاقة
   (20px جانبياً) فلا تلامس نصاً. تحقّق من ذلك في فحص التداخل. */
.bloom {
  position: absolute;
  z-index: 5;
  display: block;
  pointer-events: none;
}

.bloom img {
  width: 100%;
  max-width: none;
  filter: drop-shadow(3px 4px 3px rgba(0, 0, 0, .3));
}

/* ── بطاقة الدعوة ── */

.block--showcard { overflow: visible; }

.showcard {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 9px;
  border-radius: 8px;
  background: #fffdf8;
  box-shadow: 0 14px 34px rgba(81, 20, 25, .22);
}

/* إطار أحمر عريض داخل الكرت بدرجة البرغندي نفسها */
.showcard img {
  width: 100%;
  display: block;
  border: 7px solid var(--wine);
  border-radius: 3px;
}

/* خيط رفيع بين الإطار العريض والحافة البيضاء */
.showcard::after {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(81, 20, 25, .35);
  border-radius: 5px;
  pointer-events: none;
}

@media (max-width: 520px) {
  .showcard img { border-width: 5px; }
}

/* الوردة أعلى يمين البطاقة — فوقها لا تحتها.
   اللوح يقصّ ما يتجاوز حدّه (overflow: hidden)، فالبروز محسوب على
   المساحة المتاحة فعلاً: ضيّق افتراضياً، وأوسع حين يتّسع اللوح. */
/* أسفل يسار البطاقة — الركن الوحيد الخالي من الكتابة في التصميم */
.bloom--card {
  left: -4%;
  bottom: -3%;
  right: auto;
  top: auto;
  width: 32%;
  /* فوق البطاقة: لا نص في هذا الركن فلا تحجب قراءة */
  z-index: 30;
}

.bloom--card img { transform: rotate(196deg); animation: drFloat 6.2s ease-in-out .5s infinite; }

@media (min-width: 900px) {
  .bloom--card { left: -18%; bottom: -5%; width: 34%; }
}

/* كلها في الأركان وبارزة للخارج: الجزء المتداخل يقع في حشوة البطاقة لا نصّها */
.bloom--a { right: -22%; top: -11%;   width: 34%; }
.bloom--a img { animation: drFloat 5.5s ease-in-out .6s infinite; }

.bloom--b { left: -22%;  top: -4%;    width: 34%; }
.bloom--b img { transform: rotate(-14deg); animation: drFloat 6s ease-in-out .3s infinite; }

.bloom--c { right: -22%; top: -4%;    width: 34%; }
.bloom--c img { transform: rotate(166deg); animation: drFloat 6.4s ease-in-out .9s infinite; }

.bloom--d { left: -22%;  bottom: -4%; width: 34%; }
.bloom--d img { transform: rotate(196deg); animation: drFloat 5.8s ease-in-out 1.2s infinite; }

.bloom--e { display: none; }
.bloom--e img { transform: rotate(18deg); animation: drFloat 6.8s ease-in-out .4s infinite; }

@media (max-width: 520px) {
  .bloom { opacity: .85; }
}


/* ══════════ الظهور عند التمرير ══════════ */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}

.reveal.is-in { opacity: 1; transform: none; }


/* ══════════ قلوب متصاعدة ══════════ */

/* ثابتة على الشاشة ومحصورة بعرض لوح الدعوة، فتبدو صاعدة من داخلها */
.hearts {
  position: fixed;
  inset: 0;
  z-index: 55;
  width: 100%;
  max-width: 480px;
  margin-inline: auto;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.4s var(--ease);
}

.hearts.is-on { opacity: 1; }

@media (min-width: 900px) {
  .hearts { max-width: 900px; }
}

.heart {
  position: absolute;
  bottom: -6%;
  width: 14px;
  aspect-ratio: 24 / 22;
  background: linear-gradient(160deg, #7a2430, #511419 55%, #b8912f);
  -webkit-mask: var(--heart) center/contain no-repeat;
  mask: var(--heart) center/contain no-repeat;
  opacity: 0;
  animation: heartRise linear infinite;
  will-change: transform, opacity;
}

@keyframes heartRise {
  0%   { transform: translate(0, 0) scale(.65) rotate(0deg); opacity: 0; }
  12%  { opacity: var(--peak, .5); }
  80%  { opacity: var(--peak, .5); }
  100% { transform: translate(var(--drift, 30px), -108vh) scale(1.05) rotate(var(--spin, 20deg)); opacity: 0; }
}


/* ══════════ الحركات ══════════ */

@keyframes drFloat   { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
@keyframes rise      { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes spin      { to { rotate: 360deg; } }
@keyframes hintPulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { transition: opacity .4s ease !important; transform: none !important; }
  .gate__env, .bloom img, .scene__photo, .scene__flower { animation: none !important; }
}


/* الشاشات العريضة: اللوح 900px داخل نافذة أوسع، فمتّسع لبروز أكبر */
@media (min-width: 900px) {
  .bloom--a { right: -41%; top: -16%; width: 42%; }
  .bloom--b { left:  -37%; width: 42%; }
  .bloom--c { right: -37%; width: 42%; }
  .bloom--d { left:  -37%; width: 42%; }
  .bloom--e { display: block; right: -24%; top: auto; bottom: calc(-3.9% - 15px); width: 34%; }
}


/* الجوال: نوسّع الحشوة الجانبية قليلاً فيقع تداخل الوردة داخلها لا على النص */
@media (max-width: 620px) {
  .card { padding-inline: 28px; }
}
