/* ═══════════════════════════════════════════════
   منام · التصميم — موبايل أولاً
   ═══════════════════════════════════════════════ */

:root {
  --bg: #0A0E2A;
  --bg-deep: #06081C;
  --surface: #131730;
  --surface-2: #1A1F3D;
  --ink: #F5F1E6;
  --ink-muted: #9FA3C0;
  --ivory: #F5E6C8;
  --ivory-soft: #FAF5E8;
  --teal: #5DCAA5;
  --gold: #D4B97D;
  --border: rgba(245, 230, 200, 0.12);
  --border-soft: rgba(245, 230, 200, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'IBM Plex Sans Arabic', system-ui, sans-serif;
  font-weight: 300;
  line-height: 1.7;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

::selection { background: rgba(245, 230, 200, 0.25); color: var(--ivory); }

/* ─── خطوط ─── */
.display { font-family: 'Amiri', serif; }
.italic { font-style: italic; }

/* ─── خلفية كونية ─── */
.nebula {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 50% 40% at 20% 30%, rgba(127, 119, 221, 0.10) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 70%, rgba(133, 183, 235, 0.07) 0%, transparent 60%),
    radial-gradient(ellipse 70% 60% at 50% 50%, rgba(93, 202, 165, 0.04) 0%, transparent 70%);
}

#cosmic {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

#cursor-glow {
  position: fixed;
  width: 400px;
  height: 400px;
  left: 0;
  top: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.7s ease;
  background: radial-gradient(circle, rgba(245,230,200,0.04) 0%, transparent 60%);
  will-change: transform;
}
/* إخفاء على اللمس */
@media (hover: none) { #cursor-glow { display: none; } }

/* ─── تخطيط عام ─── */
.wrap {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}
.wrap-narrow { max-width: 720px; }
.wrap-mid { max-width: 860px; }

/* ─── شريط علوي ─── */
.topbar {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 20px;
  max-width: 1100px;
  margin: 0 auto;
}
.brand {
  font-family: 'Amiri', serif;
  font-size: 1.4rem;
  color: var(--ivory);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.topbar-link {
  color: rgba(245, 230, 200, 0.5);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.3s;
}
.topbar-link:active, .topbar-link:hover { color: var(--ivory); }
.live-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--teal);
  margin-left: 8px;
  animation: pulseSoft 3s ease-in-out infinite;
}
.live-label {
  font-size: 0.75rem;
  color: rgba(245, 230, 200, 0.55);
}

/* ─── أزرار ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 36px;
  background: var(--ivory);
  color: var(--bg);
  font-family: 'IBM Plex Sans Arabic', sans-serif;
  font-weight: 500;
  font-size: 1.02rem;
  border: none;
  border-radius: 3px;
  text-decoration: none;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1), box-shadow 0.35s;
  -webkit-tap-highlight-color: transparent;
  min-height: 52px;
}
.btn:active { transform: scale(0.98); }
@media (hover: hover) {
  .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 44px rgba(245, 230, 200, 0.16);
  }
}
.btn:disabled { opacity: 0.35; cursor: not-allowed; }
.btn-ghost {
  background: transparent;
  color: rgba(245, 230, 200, 0.6);
  border: none;
  font-size: 0.9rem;
  padding: 10px;
  min-height: auto;
}
.btn-ghost:active { color: var(--ivory); }

/* ─── فواصل ─── */
.divider {
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(245,230,200,0.3), transparent);
  border: none;
  margin: 0 auto;
}
.divider-sm { width: 64px; }
.divider-md { width: 128px; }

/* ─── إيش وفئات النص ─── */
.eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(245, 230, 200, 0.4);
}
.muted { color: rgba(245, 230, 200, 0.6); }
.muted-2 { color: rgba(245, 230, 200, 0.4); }
.tabular { font-variant-numeric: tabular-nums; }

/* ═══════════════ الصفحة الرئيسية ═══════════════ */
.hero {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 70px 20px 60px;
  overflow: hidden;
  min-height: 76vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
/* شعار منام */
.brand-logo { display: inline-block; height: 45px; width: auto; vertical-align: middle; transition: opacity .3s; }
.brand-logo:hover { opacity: .82; }
.footer .brand-logo { height: 46px; }
/* شعار بالميرا في التذييل */
.palmyra-credit { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: rgba(245,230,200,.6); font-size: .82rem; transition: color .3s; }
.palmyra-credit:hover { color: rgba(245,230,200,.9); }
.palmyra-mark { height: 34px; width: auto; filter: drop-shadow(0 2px 8px rgba(0,0,0,.4)); }

/* نهر الأحلام في الهيرو */
#dream-river { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.river-veil { position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: radial-gradient(ellipse 62% 52% at 50% 44%, rgba(8,11,32,.72) 0%, rgba(8,11,32,.3) 45%, transparent 72%); }
.river-hint { position: absolute; bottom: 24px; left: 0; right: 0; text-align: center; z-index: 3;
  font-size: .72rem; color: rgba(245,230,200,.32); letter-spacing: .04em; }
.hero h1 {
  font-family: 'Amiri', serif;
  font-weight: 400;
  font-size: clamp(2.2rem, 9vw, 4.5rem);
  line-height: 1.3;
  color: var(--ivory);
}
.hero h1 .line2 { font-style: italic; color: var(--ivory-soft); display: block; margin-top: 6px; }
.hero-sub {
  max-width: 540px;
  margin: 36px auto 0;
  font-size: clamp(0.95rem, 3.5vw, 1.1rem);
  line-height: 2;
  color: rgba(245, 230, 200, 0.7);
  font-weight: 300;
}
.hero-cta {
  margin-top: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

/* أقسام */
.section { position: relative; z-index: 2; padding: 70px 20px; }
.section-head { text-align: center; margin-bottom: 56px; }
.section-head h2 {
  font-family: 'Amiri', serif;
  font-weight: 400;
  font-size: clamp(1.8rem, 6vw, 3rem);
  color: var(--ivory);
  margin-top: 12px;
}

/* خطوات */
.steps { display: grid; grid-template-columns: 1fr; gap: 48px; }
.step { text-align: center; }
.step-num {
  font-family: 'Amiri', serif;
  font-size: 4.5rem;
  color: rgba(245, 230, 200, 0.12);
  line-height: 1;
  margin-bottom: 16px;
}
.step h3 { font-family: 'Amiri', serif; font-weight: 400; font-size: 1.5rem; color: var(--ivory); margin-bottom: 12px; }
.step p { color: rgba(245, 230, 200, 0.6); font-size: 0.95rem; line-height: 1.9; font-weight: 300; max-width: 280px; margin: 0 auto; }

/* اقتباس فلسفي */
.manifesto { text-align: center; padding: 90px 20px; }
.manifesto blockquote {
  font-family: 'Amiri', serif;
  font-style: italic;
  font-size: clamp(1.3rem, 5vw, 2.2rem);
  line-height: 1.8;
  color: rgba(245, 230, 200, 0.9);
  max-width: 760px;
  margin: 0 auto;
}

/* بطاقة معاينة الحلم */
.preview-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  aspect-ratio: 4/5;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.preview-card svg { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ─── تذييل ─── */
.footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--border-soft);
  padding: 40px 20px;
  margin-top: 40px;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(245, 230, 200, 0.4);
}
.footer a { color: rgba(245, 230, 200, 0.6); text-decoration: none; }
.footer a:active { color: var(--ivory); }

/* ═══════════════ المصادقة ═══════════════ */
.auth-screen {
  position: relative; z-index: 2;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.auth-box { width: 100%; max-width: 400px; }
.auth-box h1 {
  font-family: 'Amiri', serif;
  font-weight: 400;
  font-size: clamp(2rem, 8vw, 2.8rem);
  color: var(--ivory);
  text-align: center;
  line-height: 1.4;
  margin-bottom: 16px;
}
.auth-box .sub { text-align: center; color: rgba(245, 230, 200, 0.6); line-height: 2; margin-bottom: 36px; font-size: 0.95rem; }
.field { margin-bottom: 22px; }
.field label {
  display: block;
  font-size: 0.8rem;
  color: rgba(245, 230, 200, 0.5);
  margin-bottom: 8px;
}
.field input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(245, 230, 200, 0.3);
  color: var(--ink);
  font-family: 'IBM Plex Sans Arabic', sans-serif;
  font-size: 1.05rem;
  padding: 12px 4px;
  outline: none;
  transition: border-color 0.3s;
}
.field input:focus { border-bottom-color: rgba(245, 230, 200, 0.8); }
.field input::placeholder { color: rgba(245, 230, 200, 0.25); }
.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 36px;
  border-bottom: 1px solid var(--border-soft);
}
.auth-tab {
  flex: 1;
  text-align: center;
  padding: 14px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: rgba(245, 230, 200, 0.45);
  font-family: 'IBM Plex Sans Arabic', sans-serif;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s;
}
.auth-tab.active { color: var(--ivory); border-bottom-color: var(--ivory); }
.error-msg {
  background: rgba(212, 83, 126, 0.1);
  border: 1px solid rgba(212, 83, 126, 0.3);
  color: #F0A5BC;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  text-align: center;
  margin-bottom: 22px;
}

/* ═══════════════ كتابة حلم ═══════════════ */
.new-screen { position: relative; z-index: 2; padding: 50px 20px 80px; }
.new-head { text-align: center; margin-bottom: 44px; }
.new-head h1 {
  font-family: 'Amiri', serif;
  font-weight: 400;
  font-size: clamp(2rem, 8vw, 3.5rem);
  color: var(--ivory);
  margin-bottom: 18px;
}
.new-head p { color: rgba(245, 230, 200, 0.55); line-height: 2; font-size: 0.95rem; }
.dream-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  color: var(--ink);
  font-family: 'Amiri', serif;
  font-style: italic;
  font-size: clamp(1.2rem, 5vw, 1.6rem);
  line-height: 2;
  padding: 20px 4px;
  min-height: 200px;
}
.dream-input::placeholder { color: rgba(245, 230, 200, 0.25); }
.new-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 28px;
  gap: 16px;
  flex-wrap: wrap;
}
.word-count { font-size: 0.78rem; color: rgba(245, 230, 200, 0.3); }
.new-note {
  margin-top: 60px;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(245, 230, 200, 0.35);
  line-height: 1.9;
}

/* ═══════════════ المعالجة ═══════════════ */
.processing-screen {
  position: relative; z-index: 2;
  min-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}
.orb { position: relative; width: 128px; height: 128px; margin: 0 auto 56px; }
.orb-ring {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(245, 230, 200, 0.3);
  animation: ringPulse 3s cubic-bezier(0.4,0,0.6,1) infinite;
}
.orb-ring:nth-child(2) { animation-delay: 0.6s; border-color: rgba(245,230,200,0.2); }
.orb-ring:nth-child(3) { animation-delay: 1.2s; border-color: rgba(245,230,200,0.15); }
.orb.drawing .orb-ring { border-color: rgba(212, 185, 125, 0.3); }
.orb-core {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.orb-dot {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle, #F5E6C8 0%, rgba(245,230,200,0.3) 60%, transparent 100%);
  box-shadow: 0 0 30px rgba(245,230,200,0.6);
  animation: centerPulse 2.5s ease-in-out infinite;
}
.orb.drawing .orb-dot {
  background: radial-gradient(circle, #D4B97D 0%, rgba(212,185,125,0.3) 60%, transparent 100%);
  box-shadow: 0 0 30px rgba(212,185,125,0.7);
}
.processing-screen h1 { font-family: 'Amiri', serif; font-weight: 400; font-size: clamp(1.8rem, 7vw, 2.5rem); color: var(--ivory); margin-bottom: 18px; }
.stage-msg { color: rgba(245, 230, 200, 0.55); font-size: 1rem; min-height: 1.5rem; }
.prog { margin-top: 48px; max-width: 280px; margin-left: auto; margin-right: auto; }
.prog-track { height: 1px; background: rgba(245,230,200,0.1); overflow: hidden; }
.prog-fill { height: 100%; background: rgba(245,230,200,0.5); width: 0; }
.prog-note { margin-top: 16px; font-size: 0.75rem; color: rgba(245,230,200,0.3); }

/* ═══════════════ عرض الحلم ═══════════════ */
.dream-screen { position: relative; z-index: 2; padding: 50px 20px 60px; }
.dream-title-block { text-align: center; margin-bottom: 56px; }
.dream-title-block h1 {
  font-family: 'Amiri', serif;
  font-weight: 400;
  font-style: italic;
  font-size: clamp(2rem, 8vw, 3.5rem);
  color: var(--ivory);
  line-height: 1.4;
}
.dream-text {
  font-family: 'Amiri', serif;
  font-style: italic;
  font-size: clamp(1.1rem, 4.5vw, 1.3rem);
  line-height: 2.2;
  color: rgba(245, 230, 200, 0.85);
  text-align: center;
  margin-bottom: 60px;
}
.artwork {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 60px;
}
.artwork img { width: 100%; height: 100%; object-fit: cover; display: block; }
.artwork-pending {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 30px;
  backdrop-filter: blur(40px);
  background: rgba(10, 14, 42, 0.4);
}
.artwork-pending .spark {
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(245,230,200,0.3);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
  animation: pulseSoft 3s ease-in-out infinite;
}
.artwork-pending h3 { font-family: 'Amiri', serif; font-style: italic; font-size: 1.4rem; color: var(--ivory); margin-bottom: 10px; }
.artwork-pending p { font-size: 0.85rem; color: rgba(245,230,200,0.55); line-height: 2; max-width: 260px; }

/* عناصر بصمة الحلم */
.fingerprint { margin-top: 30px; }
.fp-block { text-align: center; margin-bottom: 48px; }
.fp-label { font-size: 0.72rem; letter-spacing: 0.25em; text-transform: uppercase; color: rgba(245,230,200,0.4); margin-bottom: 18px; }
.fp-setting {
  font-family: 'Amiri', serif; font-style: italic;
  font-size: clamp(1.2rem, 5vw, 1.6rem);
  line-height: 1.7; color: rgba(245,230,200,0.9);
  max-width: 560px; margin: 0 auto;
}
.chips { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; }
.chip {
  font-family: 'Amiri', serif;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid rgba(245,230,200,0.2);
  background: rgba(245,230,200,0.03);
  color: rgba(245,230,200,0.9);
  font-size: 0.9rem;
}
.chip-theme { border-color: rgba(127,119,221,0.25); background: rgba(127,119,221,0.08); color: rgba(245,230,200,0.8); }
.fp-grid { display: grid; grid-template-columns: 1fr; gap: 36px; }
.fp-item { text-align: center; }
.fp-value { font-family: 'Amiri', serif; font-size: 1.3rem; color: var(--ivory); }
.fp-emotion { display: inline-flex; align-items: center; gap: 10px; }
.fp-emotion .dot { width: 10px; height: 10px; border-radius: 50%; animation: pulseSoft 3s ease-in-out infinite; }
.palette { display: flex; align-items: center; justify-content: center; gap: 24px; }
.palette-swatch { text-align: center; }
.palette-swatch .circle { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto; border: 1px solid rgba(245,230,200,0.15); }
.palette-swatch .name { margin-top: 12px; font-size: 0.72rem; color: rgba(245,230,200,0.4); }

/* قراءة الحلم */
.reading { margin-top: 100px; }
.disclaimer {
  max-width: 560px; margin: 0 auto 50px;
  padding: 16px 24px;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  background: rgba(245,230,200,0.02);
  text-align: center;
}
.disclaimer p { font-size: 0.82rem; color: rgba(245,230,200,0.45); line-height: 2; }
.reading-summary {
  font-family: 'Amiri', serif; font-style: italic;
  font-size: clamp(1.2rem, 5vw, 1.6rem);
  line-height: 1.9; color: rgba(245,230,200,0.9);
  text-align: center; max-width: 640px; margin: 0 auto 50px;
}
.character {
  border-right: 2px solid rgba(245,230,200,0.2);
  padding: 8px 24px 8px 0;
  margin-bottom: 24px;
  max-width: 640px; margin-left: auto; margin-right: auto;
}
.character h4 { font-family: 'Amiri', serif; font-weight: 400; font-size: 1.2rem; color: var(--ivory); margin-bottom: 8px; }
.character .desc { color: rgba(245,230,200,0.65); font-size: 0.92rem; line-height: 1.9; margin-bottom: 6px; }
.character .role { color: rgba(245,230,200,0.45); font-size: 0.85rem; font-style: italic; line-height: 1.8; }
.directions { max-width: 640px; margin: 0 auto; list-style: none; }
.directions li { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.directions li .bullet { margin-top: 11px; width: 6px; height: 6px; border-radius: 50%; background: rgba(245,230,200,0.5); flex-shrink: 0; }
.directions li p { color: rgba(245,230,200,0.8); font-size: 1rem; line-height: 2; }

/* أزرار أسفل الحلم */
.dream-actions {
  margin-top: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

/* ═══════════════ اليوميات ═══════════════ */
.journal-screen { position: relative; z-index: 2; padding: 50px 20px 60px; }
.journal-head { text-align: center; margin-bottom: 56px; }
.journal-head h1 { font-family: 'Amiri', serif; font-weight: 400; font-size: clamp(2rem, 8vw, 3rem); color: var(--ivory); margin-top: 12px; }
.dream-list { }
.dream-item {
  display: block;
  text-decoration: none;
  padding: 26px 0;
  border-bottom: 1px solid rgba(245,230,200,0.08);
  transition: border-color 0.3s;
}
.dream-item:active { border-bottom-color: rgba(245,230,200,0.2); }
.dream-item-inner { display: flex; flex-direction: column; gap: 10px; }
.dream-item .di-date { font-size: 0.72rem; color: rgba(245,230,200,0.3); }
.dream-item .di-title { font-family: 'Amiri', serif; font-style: italic; font-size: 1.3rem; color: var(--ivory); line-height: 1.5; }
.dream-item .di-text {
  color: rgba(245,230,200,0.65); font-size: 0.92rem; line-height: 1.9; font-weight: 300;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.dream-item .di-status { display: inline-flex; align-items: center; gap: 8px; font-size: 0.75rem; color: rgba(245,230,200,0.4); }
.dream-item .di-status .dot { width: 6px; height: 6px; border-radius: 50%; }
.dot-pending { background: rgba(245,230,200,0.4); }
.dot-processing { background: var(--teal); animation: pulseSoft 3s infinite; }
.dot-ready { background: var(--teal); }
.dot-failed { background: rgba(212,83,126,0.6); }
.empty-state { text-align: center; max-width: 400px; margin: 0 auto; }
.empty-state p { color: rgba(245,230,200,0.55); line-height: 2; margin-bottom: 36px; }

/* ═══════════════ أنيميشن ═══════════════ */
@keyframes pulseSoft { 0%,100%{opacity:0.5;} 50%{opacity:1;} }
@keyframes ringPulse { 0%{transform:scale(0.5);opacity:0;} 50%{opacity:1;} 100%{transform:scale(1.6);opacity:0;} }
@keyframes centerPulse { 0%,100%{transform:scale(1);opacity:0.85;} 50%{transform:scale(1.4);opacity:1;} }
@keyframes checkDraw { to { stroke-dashoffset: 0; } }
@keyframes fadeIn { from{opacity:0;} to{opacity:1;} }
@keyframes fadeInUp { from{opacity:0;transform:translateY(24px);} to{opacity:1;transform:translateY(0);} }
@keyframes inkReveal {
  0%{opacity:0;filter:blur(14px);transform:translateY(8px);}
  60%{opacity:0.7;filter:blur(2px);}
  100%{opacity:1;filter:blur(0);transform:translateY(0);}
}
@keyframes artworkReveal {
  0%{opacity:0;transform:scale(1.08);filter:blur(20px);}
  100%{opacity:1;transform:scale(1);filter:blur(0);}
}

.fade-in { opacity: 0; animation: fadeIn 1.2s ease-out forwards; }
.fade-in-up { opacity: 0; animation: fadeInUp 1.4s cubic-bezier(0.16,1,0.3,1) forwards; }
.ink-word { display: inline-block; opacity: 0; animation: inkReveal 1.1s cubic-bezier(0.16,1,0.3,1) forwards; }

/* ═══════════════ تابلت وأعلى ═══════════════ */
@media (min-width: 640px) {
  .wrap { padding: 0 32px; }
  .hero { padding: 110px 32px 90px; }
  .hero-cta { flex-direction: row; justify-content: center; }
  .section { padding: 110px 32px; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 40px; }
  .step { text-align: right; }
  .step p { margin-right: 0; }
  .footer-inner { flex-direction: row; justify-content: space-between; }
  .fp-grid { grid-template-columns: repeat(3, 1fr); }
  .topbar { padding: 32px; }
  .brand { font-size: 1.6rem; }
}

@media (min-width: 1024px) {
  .preview-section { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: center; }
}

/* رموز بأيقونات */
.symbols-deep { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.symbol-card {
  display: flex; gap: 18px; align-items: flex-start;
  padding: 18px 20px; border-radius: 14px;
  border: 1px solid var(--border-soft);
  background: rgba(245,230,200,.02);
}
.symbol-card .sym-icon {
  font-size: 1.8rem; line-height: 1; flex-shrink: 0;
  width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: rgba(245,230,200,.05);
  border: 1px solid var(--border-soft);
}
.symbol-card .sym-body h4 {
  font-family: 'Amiri', serif; font-weight: 400; font-size: 1.2rem;
  color: var(--ivory); margin-bottom: 6px;
}
.symbol-card .sym-body p { color: rgba(245,230,200,.7); font-size: .92rem; line-height: 1.9; font-weight: 300; }

/* ملاحظة الكابوس */
.nightmare-note {
  max-width: 600px; margin: 0 auto 40px;
  display: flex; gap: 18px; align-items: flex-start;
  padding: 22px 24px; border-radius: 14px;
  border: 1px solid rgba(127,119,221,.25);
  background: rgba(127,119,221,.07);
}
.nightmare-note .nm-icon { font-size: 1.6rem; flex-shrink: 0; }
.nightmare-note .nm-title {
  font-family: 'Amiri', serif; font-size: 1.1rem; color: var(--ivory); margin-bottom: 8px;
}
.nightmare-note .nm-text { color: rgba(245,230,200,.8); font-size: .95rem; line-height: 2; font-weight: 300; }

/* القراءة الدينية */
.religious-reading {
  max-width: 640px; margin: 0 auto;
  padding: 24px 26px; border-radius: 14px;
  border: 1px solid rgba(212,185,125,.25);
  background: rgba(212,185,125,.05);
}
.religious-reading > p:first-child {
  font-family: 'Amiri', serif; font-size: 1.15rem; line-height: 2;
  color: rgba(245,230,200,.92);
}
.religious-reading .rel-note {
  margin-top: 16px; font-size: .78rem; color: rgba(245,230,200,.4);
  line-height: 1.8; border-top: 1px solid var(--border-soft); padding-top: 14px;
}

/* ═══ مركز الأحلام (الرواق) ═══ */
.gallery-screen { padding: 90px 0 80px; min-height: 100vh; }
.gallery-head { text-align: center; margin-bottom: 36px; }
.gallery-head h1 { font-family: 'Amiri', serif; font-weight: 700; font-size: clamp(2.2rem,8vw,3.4rem); color: var(--ivory); margin: 10px 0 16px; }
.gallery-intro { color: rgba(245,230,200,.55); line-height: 2; font-size: .98rem; }

.theme-filter { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 44px; }
.theme-chip {
  display: inline-flex; align-items: center; gap: 7px; text-decoration: none;
  padding: 9px 18px; border-radius: 999px; font-size: .88rem;
  border: 1px solid rgba(245,230,200,.16); color: rgba(245,230,200,.72);
  background: rgba(245,230,200,.02); transition: all .25s;
}
.theme-chip:active { transform: scale(.97); }
.theme-chip.active { background: var(--ivory); color: var(--bg); border-color: var(--ivory); }
.chip-count { font-size: .72rem; opacity: .6; }

.gallery-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px;
}
.gallery-card {
  text-decoration: none; color: inherit; display: block;
  border-radius: 16px; overflow: hidden; background: var(--surface, #131730);
  border: 1px solid var(--border-soft, rgba(245,230,200,.06));
  transition: transform .4s cubic-bezier(.16,1,.3,1), box-shadow .4s;
}
.gallery-card:active { transform: scale(.98); }
.gc-art { position: relative; aspect-ratio: 1/1; overflow: hidden; }
.gc-art img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s; }
.gallery-card:hover .gc-art img { transform: scale(1.05); }
.gc-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(6,8,20,.55), transparent 55%); }
.gc-emotion {
  position: absolute; bottom: 10px; right: 12px; z-index: 2;
  font-size: .72rem; color: var(--ivory); padding: 4px 11px; border-radius: 999px;
  background: rgba(6,8,20,.5); backdrop-filter: blur(8px); border: 1px solid rgba(245,230,200,.14);
}
.gc-body { padding: 14px 16px 18px; }
.gc-body h3 { font-family: 'Amiri', serif; font-weight: 700; font-size: 1.15rem; color: var(--ivory); margin-bottom: 6px; line-height: 1.4; }
.gc-body p { font-size: .82rem; color: rgba(245,230,200,.5); line-height: 1.7; }
.gallery-empty { text-align: center; padding: 80px 20px; color: rgba(245,230,200,.5); }

/* ═══ صفحة الحلم العامة ═══ */
.public-dream { padding: 84px 0 80px; }
.pd-art { border-radius: 18px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.5); border: 1px solid var(--border-soft);
  box-shadow: 0 0 0 1px rgba(245,230,200,.05), 0 30px 80px rgba(0,0,0,.5), 0 0 90px -30px var(--accent, #5DCAA5); }
.pd-art img { width: 100%; display: block; }
.pd-head { text-align: center; margin-top: 32px; }
.pd-meta { font-size: .8rem; color: rgba(245,230,200,.5); letter-spacing: .05em; }
.pd-head h1 { font-family: 'Amiri', serif; font-weight: 700; font-size: clamp(1.9rem,7vw,2.8rem); color: var(--ivory); margin-top: 10px; }
.pd-summary { font-family: 'Amiri', serif; font-size: 1.2rem; line-height: 2.1; color: rgba(245,230,200,.85); text-align: center; margin: 30px auto 0; max-width: 560px; }
.pd-symbols { max-width: 560px; margin: 40px auto 0; display: flex; flex-direction: column; gap: 14px; }
.pd-symbol { display: flex; gap: 16px; align-items: flex-start; padding: 14px 18px; border-radius: 12px; background: rgba(245,230,200,.02); border: 1px solid var(--border-soft); }
.pd-sym-icon { font-size: 1.5rem; flex-shrink: 0; }
.pd-symbol strong { display: block; font-family: 'Amiri', serif; font-weight: 700; color: var(--ivory); font-size: 1.05rem; margin-bottom: 3px; }
.pd-symbol span { font-size: .88rem; color: rgba(245,230,200,.6); line-height: 1.8; }
.pd-style { text-align: center; font-style: italic; color: rgba(245,230,200,.6); margin-top: 30px; font-family: 'Amiri', serif; font-size: 1.1rem; }
.pd-privacy { text-align: center; font-size: .76rem; color: rgba(245,230,200,.38); margin-top: 36px; }
.pd-cta { text-align: center; margin-top: 44px; }

/* ═══ الأحلام المشابهة ═══ */
.similar-block { margin-top: 56px; }
.similar-line { color: rgba(245,230,200,.7); font-size: 1.05rem; line-height: 1.9; }
.similar-line .hl { color: var(--gold, #D4B97D); font-weight: 500; }
.similar-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 20px; }
.similar-card { text-decoration: none; color: inherit; display: block; }
.sc-art { aspect-ratio: 1/1; border-radius: 12px; overflow: hidden; border: 1px solid var(--border-soft); }
.sc-art img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s; }
.similar-card:active .sc-art img { transform: scale(1.06); }
.similar-card span { display: block; font-size: .76rem; color: rgba(245,230,200,.6); margin-top: 8px; text-align: center; line-height: 1.5; }

/* ═══ مفتاح الخصوصية ═══ */
.privacy-toggle { max-width: 560px; margin: 48px auto 0; }
.pt-row { display: flex; align-items: center; gap: 16px; cursor: pointer; padding: 18px 20px; border-radius: 14px;
  background: rgba(245,230,200,.02); border: 1px solid var(--border-soft); }
.pt-row > span:first-child { flex: 1; }
.pt-row strong { display: block; color: var(--ivory); font-size: .98rem; font-weight: 500; margin-bottom: 4px; }
.pt-row em { display: block; font-style: normal; font-size: .78rem; color: rgba(245,230,200,.45); line-height: 1.7; }
.pt-row input { position: absolute; opacity: 0; pointer-events: none; }
.pt-switch { position: relative; width: 48px; height: 28px; border-radius: 999px; background: rgba(245,230,200,.12); transition: background .3s; flex-shrink: 0; }
.pt-switch::after { content: ''; position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; background: rgba(245,230,200,.6); transition: transform .3s, background .3s; }
.pt-row input:checked ~ .pt-switch { background: var(--teal, #5DCAA5); }
.pt-row input:checked ~ .pt-switch::after { transform: translateX(-20px); background: #fff; }

@media (min-width: 620px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}

/* احترام تقليل الحركة */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .ink-word { opacity: 1; filter: none; transform: none; }
}
