/* =========================================================================
   المركز الإعلامي — الأمانة العامة للعتبة الكاظمية المقدسة
   بوابة اعتماد التغطية الإعلامية — ملف التنسيق (الإصدار 3: «معماري معاصر»)
   عمارة العتبة بلغة حديثة: عناوين كوفية، أزرار بلون الحبر، الذهبي للخطوط والعنصر النشط فقط،
   رسم معماري خطي، صور بمعالجة لونية موحّدة، وملمس حبيبي خفيف على الأسطح الداكنة.
   ========================================================================= */

/* ---------- 1. المتغيرات ---------- */
:root {
  --font-ui: 'IBM Plex Sans Arabic', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  --font-display: 'Noto Kufi Arabic', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', 'IBM Plex Sans Arabic', ui-monospace, Menlo, Consolas, monospace;

  /* الأسطح الداكنة: الواجهة والتذييل وبطاقة المناسبة */
  --night: #0a1a13;
  --night-2: #0f2219;
  --night-3: #163026;
  --on-night: #f3efe6;
  --on-night-2: rgba(243, 239, 230, .74);
  --on-night-3: rgba(243, 239, 230, .52);
  --night-rule: rgba(243, 239, 230, .12);
  --gold: #c9a24d;
  --gold-light: #e2c785;
  --gold-ink: #7a581b;
  --gold-line: rgba(201, 162, 77, .5);

  --paper: #f5f2ea;
  --paper-2: #ece6d8;
  --surface: #fffdf8;
  --surface-2: #f8f5ee;
  --ink: #101814;
  --ink-hover: #26322b;
  --ink-2: #47524c;
  --ink-3: #6c7670;
  --rule: #e2dbcc;
  --rule-2: #cbc2ae;
  --green: #14462f;
  --green-ink: #14462f;
  --green-soft: #e3ebe5;
  --ring: rgba(201, 162, 77, .32);
  --danger: #a3271b;
  --danger-soft: #fbecea;
  --ok: #1b6a42;
  --ok-soft: #e4f0e8;
  --warn: #8a5800;
  --warn-soft: #f8eed8;

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 20px;
  --r-xl: 28px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 20, .05);
  --shadow: 0 1px 2px rgba(16, 24, 20, .04), 0 14px 34px -20px rgba(16, 24, 20, .3);
  --shadow-lg: 0 2px 6px rgba(16, 24, 20, .05), 0 44px 80px -44px rgba(16, 24, 20, .5);
  --header-h: 72px;
  --container: 1240px;
  --gutter: clamp(16px, 4.5vw, 48px);
  --section-y: clamp(72px, 9vw, 128px);
  --ease: cubic-bezier(.16, 1, .3, 1);
  /* ملمس حبيبي (ضوضاء بيضاء شفافة) يُطبَّق بشفافية منخفضة على الأسطح الداكنة */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .7 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");

  color-scheme: light;
  interpolate-size: allow-keywords;
}

:root[data-theme="dark"] {
  --night: #07110c;
  --paper: #0d1a14;
  --paper-2: #11211a;
  --surface: #152820;
  --surface-2: #1a2f26;
  --ink: #ebeee8;
  --ink-hover: #ffffff;
  --ink-2: #b5bfb9;
  --ink-3: #8a958f;
  --rule: #22382d;
  --rule-2: #31493c;
  --green: #2b7a55;
  --green-ink: #8fd0ad;
  --green-soft: #15291f;
  --ring: rgba(226, 199, 133, .3);
  --gold-ink: #dcbd75;
  --danger: #f2897e;
  --danger-soft: #331512;
  --ok: #6fd3a0;
  --ok-soft: #10291c;
  --warn: #efb85a;
  --warn-soft: #2e230d;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 40px -20px rgba(0, 0, 0, .75);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, .3), 0 44px 80px -40px rgba(0, 0, 0, .85);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --night: #07110c;
    --paper: #0d1a14;
    --paper-2: #11211a;
    --surface: #152820;
    --surface-2: #1a2f26;
    --ink: #ebeee8;
    --ink-hover: #ffffff;
    --ink-2: #b5bfb9;
    --ink-3: #8a958f;
    --rule: #22382d;
    --rule-2: #31493c;
    --green: #2b7a55;
    --green-ink: #8fd0ad;
    --green-soft: #15291f;
    --ring: rgba(226, 199, 133, .3);
    --gold-ink: #dcbd75;
    --danger: #f2897e;
    --danger-soft: #331512;
    --ok: #6fd3a0;
    --ok-soft: #10291c;
    --warn: #efb85a;
    --warn-soft: #2e230d;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 40px -20px rgba(0, 0, 0, .75);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, .3), 0 44px 80px -40px rgba(0, 0, 0, .85);
    color-scheme: dark;
  }
}

/* ---------- 2. الأساسيات ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 20px); }
html:not(.lenis) { scroll-behavior: smooth; }
body {
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.8;
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
main { flex: 1; }
img, svg, video, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.35; }
ul, ol { padding: 0; list-style: none; }
[hidden] { display: none !important; }
::selection { background: var(--gold-light); color: var(--night); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: 12px; inset-inline-start: 12px; z-index: 300; padding: 10px 18px; border-radius: 999px;
  background: var(--on-night); color: var(--night); font-weight: 600; transform: translateY(-200%); transition: transform .2s;
}
.skip-link:focus { transform: none; }
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.ltr { direction: ltr; unicode-bidi: plaintext; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }

i[data-icon] { display: inline-flex; line-height: 0; flex: none; }
.i { width: 1.2em; height: 1.2em; flex: none; }

/* خطوط SplitText: مساحة إضافية حتى لا تُقص الحروف العربية الصاعدة والنازلة (نقاط الياء في الكوفي عميقة) */
:is([data-split], .hero-title, .page-title) > [class$="-mask"] { padding-block: .34em; margin-block: -.34em; }

/* الملمس الحبيبي للأسطح الداكنة */
.grain::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: var(--grain); opacity: .07;
}

/* معالجة لونية موحّدة للصور: ظلال خضراء وإضاءات ذهبية دافئة */
.graded img { filter: saturate(.9) contrast(1.05); }
.graded::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; mix-blend-mode: soft-light;
  background: linear-gradient(172deg, rgba(232, 200, 128, .3), rgba(232, 200, 128, 0) 40%, rgba(8, 40, 26, 0) 55%, rgba(8, 40, 26, .55));
}

/* ---------- 3. الأزرار والروابط ---------- */
.btn {
  --h: 50px;
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: var(--h); padding: 0 1.5rem; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 1rem; line-height: 1.2; white-space: nowrap; user-select: none;
  transition: background-color .25s, color .25s, border-color .25s, box-shadow .3s, transform .3s var(--ease);
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn .i { width: 1.1em; height: 1.1em; }
.btn .arrow { display: inline-block; transition: transform .4s var(--ease); }
.btn:hover .arrow { transform: translateX(-5px); }
.btn-lg { --h: 56px; padding: 0 1.8rem; font-size: 1.04rem; }
.btn-sm { --h: 40px; padding: 0 1.1rem; font-size: .93rem; }
.btn-block { width: 100%; }
/* الإجراء الأساسي بلون الحبر (يُعكس تلقائياً في الوضع الليلي) */
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--ink-hover); box-shadow: 0 12px 26px -16px rgba(16, 24, 20, .6); }
/* الإجراء الأساسي على الأسطح الداكنة */
.btn-light { background: var(--on-night); color: #0a1a13; }
.btn-light:hover { background: #fff; box-shadow: 0 14px 30px -18px rgba(0, 0, 0, .7); }
.btn-ghost { border-color: var(--rule-2); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); }
.btn-ghost-light { border-color: rgba(243, 239, 230, .3); color: var(--on-night); background: transparent; }
.btn-ghost-light:hover { border-color: var(--gold); color: var(--gold-light); }
.btn-danger-ghost { border-color: var(--rule-2); color: var(--danger); }
.btn-danger-ghost:hover { border-color: var(--danger); }

.link {
  color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--gold);
  text-decoration-thickness: 1px; text-underline-offset: 6px; transition: text-decoration-thickness .2s;
}
.link:hover { text-decoration-thickness: 2px; }

.icon-btn {
  width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 999px;
  color: inherit; transition: background-color .2s;
}
.icon-btn:hover { background: rgba(243, 239, 230, .1); }
.icon-btn .i { width: 20px; height: 20px; }

/* ---------- 4. الترويسة ---------- */
.site-header {
  position: fixed; top: 0; inset-inline: 0; z-index: 60; height: var(--header-h);
  color: var(--on-night); border-bottom: 1px solid transparent;
  transition: transform .5s var(--ease), background-color .35s, border-color .35s;
  view-transition-name: site-header;
}
.site-header.is-solid {
  background: color-mix(in srgb, var(--night) 93%, transparent); border-bottom-color: var(--night-rule);
  -webkit-backdrop-filter: blur(12px) saturate(1.2); backdrop-filter: blur(12px) saturate(1.2);
}
.site-header.is-hidden { transform: translateY(-101%); }
/* خط رفيع يبيّن موضع القارئ في الصفحة */
.header-progress {
  position: absolute; bottom: -1px; inset-inline: 0; height: 2px; background: var(--gold);
  transform: scaleX(var(--progress, 0)); transform-origin: 100% 50%; opacity: 0; transition: opacity .3s;
}
.site-header.is-solid .header-progress { opacity: 1; }
.header-inner { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 14px; flex: none; }
.brand img { height: 34px; width: auto; }
.brand-name {
  font-size: .86rem; color: var(--on-night-2); line-height: 1.3; white-space: nowrap;
  padding-inline-start: 14px; border-inline-start: 1px solid var(--night-rule);
}
.main-nav { display: flex; align-items: center; gap: 2px; margin-inline-start: auto; }
.main-nav a { position: relative; padding: 10px 14px; font-size: .97rem; color: var(--on-night-2); white-space: nowrap; transition: color .2s; }
@media (max-width: 1240px) { .main-nav a { padding-inline: 10px; } .brand-name { display: none; } }
.main-nav a:hover, .main-nav a.is-active { color: var(--on-night); }
.main-nav a::after {
  content: ""; position: absolute; inset-inline: 14px; bottom: 4px; height: 1px; background: var(--gold);
  transform: scaleX(0); transition: transform .45s var(--ease);
}
.main-nav a:hover::after { transform: scaleX(1); }
.main-nav a.is-active::after { height: 2px; transform: none; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.menu-btn { display: none; }
.theme-toggle .t-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .t-sun { display: inline-flex; }
:root[data-theme="dark"] .theme-toggle .t-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .t-sun { display: inline-flex; }
  :root:not([data-theme="light"]) .theme-toggle .t-moon { display: none; }
}
@media (max-width: 1080px) {
  .main-nav, .header-cta { display: none; }
  .menu-btn { display: inline-grid; }
  .header-actions { margin-inline-start: auto; }
}
@media (max-width: 560px) {
  :root { --header-h: 64px; }
  .brand img { height: 28px; }
  .brand-name { display: none; }
}

/* القائمة السفلية للهاتف */
.sheet {
  position: fixed; inset: auto 0 0 0; margin: 0; width: 100%; max-width: 100%; max-height: 90svh;
  border: 0; padding: 0; border-radius: 24px 24px 0 0; overflow: auto;
  background: var(--night-2); color: var(--on-night);
  transform: translateY(100%); transition: transform .45s var(--ease);
}
.sheet.is-open { transform: none; }
.sheet::backdrop { background: rgba(4, 10, 7, .62); opacity: 0; transition: opacity .3s; }
.sheet.is-open::backdrop { opacity: 1; }
.sheet-inner { padding: 10px var(--gutter) calc(22px + env(safe-area-inset-bottom)); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.sheet-handle { width: 42px; height: 4px; border-radius: 4px; background: rgba(243, 239, 230, .22); margin-inline: auto; }
.sheet-head .icon-btn { margin-inline-start: -40px; }
.sheet-nav a {
  display: flex; align-items: center; justify-content: space-between; padding: 17px 2px;
  font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; border-bottom: 1px solid var(--night-rule);
}
.sheet-nav a .i { width: 18px; height: 18px; opacity: .5; }
.sheet-nav a.is-active { color: var(--gold-light); }
.sheet-foot { display: grid; gap: 10px; margin-top: 20px; }

/* ---------- 5. الواجهة الرئيسية ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden; color: var(--on-night);
  background: radial-gradient(55% 65% at 22% 34%, rgba(201, 162, 77, .14), transparent 70%), var(--night);
  padding: calc(var(--header-h) + clamp(28px, 5vw, 72px)) 0 clamp(150px, 19vw, 300px);
}
/* الرسم المعماري يقف على خط الأرض في أسفل الواجهة */
.hero-drawing { position: absolute; z-index: -1; inset-inline: 0; bottom: 0; height: clamp(110px, 17vw, 286px); color: var(--gold); pointer-events: none; }
.hero-drawing .shrine { width: 100%; height: 100%; opacity: .5; }
.hero-ground { position: absolute; inset-inline: 0; bottom: 0; height: 1px; background: var(--gold); opacity: .55; }

.hero-grid {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: auto auto 1fr;
  column-gap: clamp(14px, 2vw, 28px); align-items: start;
}
.hero-date { grid-column: 1 / 8; grid-row: 1; display: flex; align-items: center; gap: 12px; min-height: 1.7em; font-family: var(--font-mono); font-size: .82rem; color: var(--on-night-3); }
.hero-date::before { content: ""; width: 28px; height: 1px; background: var(--gold); flex: none; }
.hero-title {
  grid-column: 1 / 8; grid-row: 2; position: relative; z-index: 2;
  font-size: clamp(3rem, 6.2vw, 6.4rem); line-height: 1.16; font-weight: 700; letter-spacing: -.01em;
  margin: clamp(16px, 2vw, 26px) 0 clamp(18px, 2.2vw, 28px); text-shadow: 0 4px 40px rgba(4, 12, 8, .45);
}
.hero-body { grid-column: 1 / 7; grid-row: 3; }
.hero-lead { font-size: clamp(1.05rem, 1.35vw, 1.2rem); color: var(--on-night-2); max-width: 44ch; }
.hero-cta { margin-top: clamp(26px, 3vw, 36px); }
.hero-status { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: .9rem; color: var(--on-night-2); margin-bottom: 18px; }
.hero-status .sep, .page-meta .sep { color: var(--on-night-3); }
.hero-note { color: var(--on-night-2); margin: -4px 0 20px; max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* حالة التقديم: نقطة نابضة داخل كبسولة */
.state {
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 13px; border-radius: 999px;
  font-size: .86rem; font-weight: 600; line-height: 1.6; white-space: nowrap;
  color: #9fdcbb; background: rgba(159, 220, 187, .08); border: 1px solid rgba(159, 220, 187, .24);
}
.state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 2.4s ease-in-out infinite; }
.state.is-closed { color: #f0a69d; background: rgba(240, 166, 157, .08); border-color: rgba(240, 166, 157, .24); }
.state.is-closed::before { animation: none; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(159, 220, 187, .45); } 60% { box-shadow: 0 0 0 7px rgba(159, 220, 187, 0); } }

.hero-media { grid-column: 8 / 13; grid-row: 1 / 4; align-self: center; margin: 0; position: relative; z-index: 1; }
.hero-media .arch { aspect-ratio: 4 / 5; }
.hero-media .arch::before { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(to top, rgba(10, 26, 19, .6), transparent 38%); }
.arch-frame { position: relative; }
.arch { display: block; position: relative; overflow: hidden; aspect-ratio: 3 / 4; background: var(--night-3); border-radius: 50% 50% 0 0 / 30% 30% 0 0; }
.arch.is-shaped { border-radius: 0; }
.arch img { width: 100%; height: 100%; object-fit: cover; }
.arch-line { position: absolute; top: -14px; inset-inline: -14px; width: calc(100% + 28px); max-width: none; height: calc(100% + 14px); pointer-events: none; overflow: visible; }
.arch-line path { fill: none; stroke: var(--gold); stroke-width: 1.2; }

/* تعليق الصور بأسلوب وكالات الأنباء: سطر للوصف وسطر للبيانات */
.caption { position: relative; display: grid; gap: 2px; margin-top: 22px; padding-inline-start: 30px; font-size: .86rem; line-height: 1.7; color: var(--on-night-2); }
.caption::before { content: ""; position: absolute; inset-inline-start: 0; top: .85em; width: 18px; height: 1px; background: var(--gold); }
.caption .meta { font-family: var(--font-mono); font-size: .74rem; color: var(--on-night-3); }

@media (max-width: 999px) {
  .hero { padding-bottom: clamp(110px, 24vw, 200px); }
  .hero-grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  .hero-date, .hero-title, .hero-body, .hero-media { grid-column: 1; grid-row: auto; }
  .hero-media { order: 1; width: 100%; max-width: 560px; margin-top: 18px; }
  .hero-date { order: 0; }
  .hero-media .arch { aspect-ratio: 1 / 1; }
  .hero-media .caption { display: none; }
  .hero-title { order: 2; margin-top: -.6em; font-size: clamp(2.6rem, 11.4vw, 4.6rem); }
  .hero-body { order: 3; }
}
@media (max-width: 560px) {
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-media { margin-inline: 4px; width: calc(100% - 8px); }
}

/* ---------- 6. الأقسام ---------- */
.section { padding: var(--section-y) 0; }
.section-alt { background: var(--paper-2); }
.section-head {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 18px 64px; align-items: end;
  margin-bottom: clamp(36px, 5vw, 64px);
}
.kicker { display: inline-flex; align-items: center; gap: 12px; font-size: .86rem; font-weight: 600; color: var(--gold-ink); margin-bottom: 16px; }
.kicker::before { content: ""; width: 24px; height: 1px; background: var(--gold); }
.section-title { font-size: clamp(2.1rem, 4.2vw, 3.4rem); line-height: 1.3; text-wrap: balance; }
.section-intro { color: var(--ink-2); font-size: 1.06rem; max-width: 46ch; }
@media (max-width: 860px) { .section-head { grid-template-columns: 1fr; } }

/* بطاقات المناسبة (Bento) */
.now { padding: clamp(40px, 6vw, 80px) 0 clamp(56px, 7vw, 96px); }
.bento {
  display: grid; gap: 16px; grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-areas: "ev ev ev ev ev ev ev pa pa pa pa pa" "tr tr tr tr he he he pa pa pa pa pa";
}
.tile {
  position: relative; isolation: isolate; overflow: hidden; min-width: 0;
  padding: clamp(22px, 2.6vw, 34px); border-radius: var(--r-xl);
  background: var(--surface); border: 1px solid var(--rule); box-shadow: var(--shadow-sm);
}
.tile-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 18px; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: .84rem; font-weight: 600; color: var(--gold-ink); }
.eyebrow::before { content: ""; width: 16px; height: 1px; background: var(--gold); }
.tile-title { font-size: clamp(1.35rem, 2vw, 1.75rem); line-height: 1.45; text-wrap: balance; }
.tile-text { color: var(--ink-2); margin-top: 8px; }
.tile-sub { margin-top: 6px; font-family: var(--font-mono); font-size: .84rem; color: var(--on-night-3); }
.tile-foot { font-size: .88rem; color: var(--on-night-2); }

.tile-event { grid-area: ev; background: var(--night); color: var(--on-night); border-color: var(--night-rule); }
.tile-event .eyebrow { color: var(--gold-light); }
.tile-event .tile-text { color: var(--on-night-2); }
.tile-event .tile-title { max-width: 26ch; }
.countdown { display: flex; margin: clamp(20px, 2.4vw, 30px) 0 16px; }
.countdown .unit { padding-inline: clamp(14px, 2vw, 28px); border-inline-start: 1px solid var(--night-rule); }
.countdown .unit:first-child { padding-inline-start: 0; border-inline-start: 0; }
.countdown b {
  display: grid; overflow: hidden; font-family: var(--font-mono); font-size: clamp(2.4rem, 4.4vw, 3.6rem);
  font-weight: 500; line-height: 1.12; color: var(--gold-light); font-variant-numeric: tabular-nums;
}
.countdown b span { grid-area: 1 / 1; }
.countdown small { display: block; font-size: .8rem; color: var(--on-night-3); }

.tile-track { grid-area: tr; display: flex; flex-direction: column; }
.tile-track .tile-text { margin-bottom: 18px; }
.inline-form { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
.inline-form .input { flex: 1; min-width: 0; }

.tile-help { grid-area: he; display: flex; flex-direction: column; }
.tile-help .link { margin-top: auto; padding-top: 16px; align-self: flex-start; }
.contact-list { margin-top: 14px; border-top: 1px solid var(--rule); }
.contact-list li { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--rule); font-size: .92rem; }
.contact-list span { color: var(--ink-3); }
.contact-list a:hover { color: var(--gold-ink); }

/* الباج: نسخة مصغّرة مطابقة لتصميم الباج الحقيقي */
.tile-pass { grid-area: pa; display: grid; grid-template-rows: 1fr auto; gap: 26px; background: var(--paper-2); text-align: center; }
.tile-pass .eyebrow { justify-content: center; }
.pass-stage { display: grid; place-items: center; perspective: 1100px; padding-top: 12px; }
/* الميل مع المؤشر في غلاف، والقلب مع التمرير في غلاف داخلي ثلاثي الأبعاد */
.pass-tilt {
  --rx: 0deg; --ry: 0deg; --sheen: 100%;
  width: clamp(176px, 16vw, 228px); transform-style: preserve-3d;
  transform: rotateX(var(--rx)) rotateY(var(--ry)) rotate(-3deg); transition: transform .7s var(--ease);
}
.tile-pass:hover .pass-tilt, .pass-tilt.is-tilting { transform: rotateX(var(--rx)) rotateY(var(--ry)) rotate(0deg); }
.pass-tilt.is-tilting { transition: transform .12s linear; }
.pass-3d { position: relative; transform-style: preserve-3d; }
.pass-3d > .pass { backface-visibility: hidden; -webkit-backface-visibility: hidden; transform: translateZ(2px); }
.pass-3d > .pass-back { position: absolute; inset: 0; transform: rotateY(180deg) translateZ(2px); }
/* حافة ذهبية تظهر عند دوران البطاقة */
.pass-core { position: absolute; inset: 1px; border-radius: 14px; background: linear-gradient(135deg, #8a6a2a, #e2c785 45%, #8a6a2a); }
.pass {
  position: relative; width: 100%; aspect-ratio: 3 / 5; container-type: inline-size;
  border-radius: 14px; overflow: hidden; background: #f5f2ea; color: #121a16; text-align: center;
  box-shadow: 0 36px 60px -32px rgba(16, 24, 20, .55), 0 2px 6px rgba(16, 24, 20, .1);
}
.pass::after {
  content: ""; position: absolute; inset: 0; z-index: 5; pointer-events: none; opacity: 0; transition: opacity .5s;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 246, 220, .5) 46%, transparent 62%);
  background-size: 250% 100%; background-position: var(--sheen, 100%) 0;
}
.tile-pass:hover .pass::after { opacity: 1; }
.pass > * { position: absolute; }
.pass-band { inset: 0 0 auto; height: 26.7%; background: #0a1a13; border-bottom: .5cqw solid #c9a24d; }
.pass-logo { top: 3.3%; left: 22.2%; width: 55.6%; height: auto; }
.pass-org { top: 9.6%; inset-inline: 0; font-size: 2.96cqw; color: rgba(243, 239, 230, .7); }
.pass-kind { top: 12.6%; inset-inline: 0; font-family: var(--font-display); font-weight: 700; font-size: 5.6cqw; color: #e2c785; line-height: 1.4; }
.pass-en { top: 17.4%; inset-inline: 0; font-family: var(--font-mono); font-size: 2.3cqw; letter-spacing: .14em; color: rgba(226, 199, 133, .75); direction: ltr; }
.pass-photo { top: 20.9%; left: 30.9%; width: 38.15%; }
.pass-photo svg { width: 100%; height: auto; }
.pass-bars { top: 52%; inset-inline: 0; display: grid; justify-items: center; gap: 2.2cqw; }
.pass-bars i { display: block; height: 3.4cqw; border-radius: 3cqw; background: #d8d1c1; }
.pass-bars i:first-child { width: 52%; height: 5cqw; background: #c7bfac; }
.pass-bars i:nth-child(2) { width: 30%; }
.pass-bars i:nth-child(3) { width: 58%; margin-top: 4cqw; background: rgba(201, 162, 77, .55); }
.pass-bars i:nth-child(4) { width: 38%; }
.pass-rule { left: 13%; right: 13%; height: .25cqw; background: #ded7c8; }
.pass-rule.r1 { top: 61.3%; }
.pass-rule.r2 { top: 74.4%; }
.pass-qr { top: 77%; left: 11.1%; width: 26.7%; padding: 1.5cqw; background: #fff; border-radius: 1.6cqw; }
.pass-qr svg { width: 100%; height: auto; }
.pass-ref { top: 78.4%; right: 11.1%; text-align: right; display: grid; gap: .6cqw; font-size: 2.8cqw; color: #6f7a74; line-height: 1.3; }
.pass-ref b { font-family: var(--font-mono); font-weight: 500; font-size: 4.6cqw; color: #121a16; direction: ltr; }
.pass-bottom { inset: auto 0 0; height: 5.6%; background: #0a1a13; }
/* الوجه الخلفي: رمز التحقق */
.pass-back { background: #0a1a13; color: #e2c785; box-shadow: inset 0 0 0 .6cqw rgba(201, 162, 77, .55); }
.pass-back > * { inset-inline: 0; }
.pass-back-logo { top: 8%; left: 20%; width: 60%; height: auto; }
.pass-back-qr { top: 23%; left: 17%; right: 17%; padding: 4cqw; background: #fff; border-radius: 3cqw; }
.pass-back-qr svg { width: 100%; height: auto; }
.pass-back-label { top: 73%; font-family: var(--font-display); font-weight: 700; font-size: 6.2cqw; }
.pass-back-en { top: 81%; font-family: var(--font-mono); font-size: 3cqw; letter-spacing: .2em; color: rgba(226, 199, 133, .7); direction: ltr; }
.pass-back-ref { top: 87.5%; font-family: var(--font-mono); font-size: 4.4cqw; color: rgba(243, 239, 230, .85); direction: ltr; }

@media (max-width: 1100px) {
  .bento { grid-template-columns: repeat(6, minmax(0, 1fr)); grid-template-areas: "ev ev ev ev ev ev" "tr tr tr pa pa pa" "he he he pa pa pa"; }
}
@media (max-width: 700px) {
  .bento { grid-template-columns: minmax(0, 1fr); grid-template-areas: "ev" "tr" "pa" "he"; }
  .pass-tilt { width: 196px; }
}

/* مشهد العتبة: صورة حقيقية ملء الشاشة تقترب ببطء مع التمرير، والنص يضيء فوقها */
.scene { position: relative; isolation: isolate; background: var(--night); color: var(--on-night); }
.scene-sticky {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: center;
  min-height: 100svh; padding: calc(var(--header-h) + 32px) 0 96px;
}
.scene.is-scroll { height: 300vh; }
.scene.is-scroll .scene-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; min-height: 0; }
.scene-media { position: absolute; inset: 0; z-index: -1; overflow: hidden; background: var(--night-3); }
.scene-media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); transform-origin: 50% 55%; will-change: transform; }
.scene-media.is-dusk img { object-position: 50% 78%; }
/* ظلّ قراءة: داكن في جهة النص ويخفّ نحو الصورة، وسفلي للتعليق */
.scene-media::before {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(to left, rgba(6, 15, 11, .92) 0%, rgba(6, 15, 11, .74) 34%, rgba(6, 15, 11, .28) 66%, rgba(6, 15, 11, .1) 100%),
    linear-gradient(to top, rgba(6, 15, 11, .8), rgba(6, 15, 11, 0) 34%);
}
.scene-copy { position: relative; z-index: 2; }
.scene-copy .kicker { color: var(--gold-light); }
.scene-text { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.5rem, 2.8vw, 2.65rem); line-height: 1.7; max-width: 30ch; text-wrap: pretty; }
.scene-text .w { transition: opacity .25s linear; }
.scene-foot { position: absolute; inset-inline: 0; bottom: 30px; z-index: 2; margin: 0 auto; }
.scene-foot .caption { margin: 0; }
/* المجسّم ثلاثي الأبعاد (على الأجهزة القادرة): الرسم الخطي على سماء الوقت، ثم المجسّم، ثم عبور الباب */
.scene-canvas, .scene-drawing, .scene-flash { display: none; }
.scene.has-3d .scene-media, .scene.has-3d .scene-foot { display: none; }
.scene.is-scroll.has-3d { height: min(560vh, 5600px); }
.scene.has-3d { background: linear-gradient(#04090b 0%, #0c1d19 55%, #3a3826 91%, #0a0907 100%); }
.scene.has-3d[data-sky="dawn"] { background: linear-gradient(#16253f 0%, #4c5d7c 55%, #e7a670 91%, #2c2219 100%); }
.scene.has-3d[data-sky="day"] { background: linear-gradient(#1f5288 0%, #5b90bd 55%, #d3e2e8 91%, #7c735f 100%); }
.scene.has-3d[data-sky="dusk"] { background: linear-gradient(#1a1a36 0%, #59405f 55%, #f19a4e 91%, #3b2617 100%); }
.scene.has-3d .scene-sticky { justify-content: flex-start; padding-top: calc(var(--header-h) + clamp(24px, 4vw, 56px)); }
/* ظلّ في جهة النص يحفظ وضوحه فوق السماء والرخام نهاراً */
.scene.has-3d .scene-sticky::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(to left, rgba(4, 10, 8, .6) 0%, rgba(4, 10, 8, .32) 38%, rgba(4, 10, 8, 0) 62%),
    linear-gradient(to bottom, rgba(4, 10, 8, .35), rgba(4, 10, 8, 0) 45%);
}
[dir="ltr"] .scene.has-3d .scene-sticky::after {
  background: linear-gradient(to right, rgba(4, 10, 8, .6) 0%, rgba(4, 10, 8, .32) 38%, rgba(4, 10, 8, 0) 62%),
    linear-gradient(to bottom, rgba(4, 10, 8, .35), rgba(4, 10, 8, 0) 45%);
}
@media (max-width: 760px) {
  .scene.has-3d .scene-sticky::after { background: linear-gradient(to bottom, rgba(4, 10, 8, .62) 0%, rgba(4, 10, 8, .3) 45%, rgba(4, 10, 8, 0) 65%); }
}
.scene.has-3d .scene-canvas {
  display: block; position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0;
  --m: 1;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, calc(1 - var(--m))) 4%, #000 calc(34% * var(--m)));
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, calc(1 - var(--m))) 4%, #000 calc(34% * var(--m)));
}
.scene.has-3d .scene-drawing {
  display: block; position: absolute; z-index: 1; left: 50%; bottom: 9svh; width: min(1180px, 94vw);
  transform: translateX(-50%); transform-origin: 50% 93%; color: var(--gold);
}
.scene[data-sky="day"] .scene-drawing, .scene[data-sky="dawn"] .scene-drawing { color: #5e4313; }
.scene-drawing .shrine { width: 100%; height: auto; opacity: .85; }
.scene-ground { display: block; height: 1px; margin-inline: -50vw; background: currentColor; opacity: .5; }
/* دمج «تفتيح» حتى يشرق المشهد نحو ضوء الباب بدل أن يعتم */
.scene.has-3d .scene-flash {
  display: block; position: absolute; inset: 0; z-index: 4; pointer-events: none; opacity: 0; mix-blend-mode: screen;
  background: radial-gradient(70% 75% at 50% 64%, #fff6e2 0%, #ffe2a6 30%, rgba(255, 196, 112, .45) 60%, rgba(0, 0, 0, 0) 88%);
}
@media (max-width: 760px) {
  .scene.is-scroll.has-3d { height: 440vh; }
  .scene.has-3d .scene-sticky { padding-bottom: 0; }
  .scene.has-3d .scene-drawing { width: 100vw; bottom: 14svh; }
}
@media (max-width: 760px) {
  .scene.is-scroll { height: 260vh; }
  /* فوق شريط التقديم اللاصق وشريط التنقل السفلي */
  .scene-sticky { justify-content: flex-end; padding-bottom: calc(168px + env(safe-area-inset-bottom)); }
  .scene-foot { display: none; }
  .scene-media::before { background: linear-gradient(to top, rgba(6, 15, 11, .95) 0%, rgba(6, 15, 11, .8) 45%, rgba(6, 15, 11, .2) 80%, rgba(6, 15, 11, .35) 100%); }
  .scene-text { font-size: 1.32rem; }
}

/* الزيارة مكتوبة داخل الحرم: صفحة مخطوطة بإطار ذهبي مزدوج، تُكتب كلمةً كلمة بالحبر من اليمين إلى اليسار */
.ziyara {
  position: absolute; z-index: 3; top: calc(var(--header-h) + 18px); bottom: clamp(24px, 6svh, 56px);
  inset-inline-start: max(16px, 5vw); width: min(640px, calc(100vw - 32px));
  display: flex; align-items: center; opacity: 0; visibility: hidden; pointer-events: none;
}
.zy-frame {
  position: relative; width: 100%; max-height: 100%; display: flex; flex-direction: column;
  padding: clamp(22px, 2.6vw, 34px) clamp(20px, 2.8vw, 40px) clamp(14px, 1.8vw, 22px);
  color: #efe6cf; border: 1px solid rgba(201, 162, 77, .6); border-radius: 4px;
  background: radial-gradient(120% 70% at 50% 0%, rgba(201, 162, 77, .12), transparent 62%), rgba(7, 13, 10, .84);
  box-shadow: 0 50px 90px -40px rgba(0, 0, 0, .85);
}
.zy-frame::before { content: ""; position: absolute; inset: 6px; border: 1px solid rgba(201, 162, 77, .3); border-radius: 2px; pointer-events: none; }
.zy-frame::after {
  content: ""; position: absolute; inset: -7px; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%23c9a24d' d='M10 0l2.4 4.2L17 3l-1.2 4.6L20 10l-4.2 2.4L17 17l-4.6-1.2L10 20l-2.4-4.2L3 17l1.2-4.6L0 10l4.2-2.4L3 3l4.6 1.2z'/%3E%3C/svg%3E") left top / 14px no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%23c9a24d' d='M10 0l2.4 4.2L17 3l-1.2 4.6L20 10l-4.2 2.4L17 17l-4.6-1.2L10 20l-2.4-4.2L3 17l1.2-4.6L0 10l4.2-2.4L3 3l4.6 1.2z'/%3E%3C/svg%3E") right top / 14px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%23c9a24d' d='M10 0l2.4 4.2L17 3l-1.2 4.6L20 10l-4.2 2.4L17 17l-4.6-1.2L10 20l-2.4-4.2L3 17l1.2-4.6L0 10l4.2-2.4L3 3l4.6 1.2z'/%3E%3C/svg%3E") left bottom / 14px no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%23c9a24d' d='M10 0l2.4 4.2L17 3l-1.2 4.6L20 10l-4.2 2.4L17 17l-4.6-1.2L10 20l-2.4-4.2L3 17l1.2-4.6L0 10l4.2-2.4L3 3l4.6 1.2z'/%3E%3C/svg%3E") right bottom / 14px no-repeat;
}
.zy-head { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.zy-rule { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(201, 162, 77, .75)); }
.zy-rule:last-child { background: linear-gradient(270deg, transparent, rgba(201, 162, 77, .75)); }
.zy-title { margin: 0; font-family: 'Amiri', var(--font-display), serif; font-weight: 700; font-size: clamp(1.2rem, 1.9vw, 1.55rem); line-height: 1.7; color: #e8c66e; text-align: center; white-space: nowrap; }
.zy-scroll {
  position: relative; overflow: hidden; flex: 1; min-height: 0; max-height: min(60svh, 540px);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 8%, #000 88%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 8%, #000 88%, transparent 100%);
}
.zy-body { position: relative; padding-block: 16px 34px; transition: transform .6s cubic-bezier(.16, 1, .3, 1); }
.zy-p {
  margin: 0; font-family: 'Amiri', serif; font-size: clamp(1.18rem, 1.55vw, 1.45rem); line-height: 2.3; color: #efe6cf;
  text-align: justify; text-align-last: center; text-justify: inter-word; word-spacing: .03em;
}
.zy-p + .zy-p { position: relative; margin-top: 18px; padding-top: 30px; }
.zy-p + .zy-p::before {
  content: ""; position: absolute; top: 0; left: 50%; width: 180px; height: 16px; transform: translateX(-50%);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%23c9a24d' d='M10 0l2.4 4.2L17 3l-1.2 4.6L20 10l-4.2 2.4L17 17l-4.6-1.2L10 20l-2.4-4.2L3 17l1.2-4.6L0 10l4.2-2.4L3 3l4.6 1.2z'/%3E%3C/svg%3E") center / 14px no-repeat,
    linear-gradient(90deg, transparent, rgba(201, 162, 77, .7) 42%, transparent 42%, transparent 58%, rgba(201, 162, 77, .7) 58%, transparent) center / 100% 1px no-repeat;
}
.zy-gold, .zw.is-gold { color: #eac66c; font-weight: 700; }
.zw {
  -webkit-mask-image: linear-gradient(to left, #000 calc(var(--w, 1) * 140% - 40%), transparent calc(var(--w, 1) * 140%));
  mask-image: linear-gradient(to left, #000 calc(var(--w, 1) * 140% - 40%), transparent calc(var(--w, 1) * 140%));
}
.zw.is-writing { text-shadow: 0 0 16px rgba(234, 198, 108, .55); }
@media (max-width: 760px) {
  .ziyara { inset-inline: 12px; width: auto; top: calc(var(--header-h) + 10px); bottom: calc(150px + env(safe-area-inset-bottom)); }
  .zy-p { font-size: 1.1rem; line-height: 2.15; }
  .zy-scroll { max-height: none; }
}
/* بلا حركة أو بلا جافاسكربت: الزيارة مكتوبة كاملة تحت نص المشهد */
.scene:not(.is-scroll) .ziyara { position: relative; inset: auto; width: min(720px, calc(100% - 32px)); margin: 32px auto 0; opacity: 1; visibility: visible; }
.scene:not(.is-scroll) .zy-scroll { max-height: none; -webkit-mask-image: none; mask-image: none; }
@media print { .ziyara { display: none !important; } }

/* رحلة الاعتماد داخل هاتف: شاشات تطبيق حقيقية تتبدّل مع الخطوات */
.journey { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(40px, 8vw, 140px); align-items: center; }
.journey .steps { grid-template-columns: 1fr; gap: 0; }
.journey .steps-line { top: 8px; bottom: 24px; inset-inline-start: 6px; inset-inline-end: auto; width: 1px; height: auto; }
.journey .steps-progress { transform-origin: 50% 0; }
.journey .step { padding: 0 0 30px; padding-inline-start: 44px; transition: opacity .35s; }
.journey .step:last-child { padding-bottom: 0; }
.journey .step-num { font-size: 1rem; margin-bottom: 4px; }
.journey .step h3 { font-size: 1.35rem; margin-bottom: 4px; }
.journey .step p { max-width: 44ch; }
.journey.is-animated .step { cursor: pointer; }
.journey.is-animated .step:not(.is-current) { opacity: .5; }
.journey.is-animated .step:not(.is-current):hover { opacity: .8; }
.journey-dots { display: none; }

.phone {
  position: relative; width: clamp(260px, 22vw, 300px); aspect-ratio: 9 / 19; padding: 9px; border-radius: 46px;
  background: linear-gradient(145deg, #3a4640, #121a16 38%, #070b09);
  box-shadow: 0 0 0 1.5px #2b3530, 0 60px 100px -50px rgba(16, 24, 20, .7), 0 30px 50px -40px rgba(16, 24, 20, .5), inset 0 0 0 1px rgba(255, 255, 255, .08);
}
.phone::before { content: ""; position: absolute; top: 18px; left: 50%; z-index: 5; width: 30%; height: 22px; transform: translateX(-50%); border-radius: 22px; background: #000; }
.phone-screen { position: relative; height: 100%; overflow: hidden; border-radius: 38px; background: #f5f2ea; color: #121a16; container-type: inline-size; }
.ps-status { position: absolute; top: 0; inset-inline: 0; z-index: 4; display: flex; align-items: center; justify-content: space-between; height: 13cqw; padding: 0 8cqw; direction: ltr; font-size: 4.2cqw; font-weight: 600; color: #f3efe6; }
.ps-sys { display: flex; align-items: flex-end; gap: 1cqw; }
.ps-sys i { width: 1.4cqw; border-radius: 1cqw; background: #f3efe6; }
.ps-sys i:nth-child(1) { height: 1.8cqw; } .ps-sys i:nth-child(2) { height: 2.6cqw; } .ps-sys i:nth-child(3) { height: 3.4cqw; }
.ps-app { position: absolute; top: 0; inset-inline: 0; z-index: 3; display: grid; place-items: end center; height: 25cqw; padding-bottom: 3.4cqw; background: #0a1a13; }
.ps-app img { width: 38cqw; height: auto; }
.ps {
  position: absolute; inset: 25cqw 0 19cqw; display: flex; flex-direction: column; gap: 3.2cqw; padding: 5cqw 6cqw 4cqw;
  font-size: 3.6cqw; line-height: 1.5; opacity: 0; transform: translateY(4%); transition: opacity .45s var(--ease), transform .65s var(--ease);
}
.ps.is-active { opacity: 1; transform: none; }
.ps b { font-weight: 600; }
.ps .ltr { direction: ltr; text-align: right; }
.ps-eyebrow { font-size: 3.2cqw; color: #7a581b; font-weight: 600; }
.ps-title { margin-top: -1.5cqw; font-family: var(--font-display); font-weight: 700; font-size: 6.4cqw; line-height: 1.45; }
.ps-step { font-size: 3cqw; color: #6c7670; }
.ps-event { display: flex; align-items: center; justify-content: space-between; gap: 2cqw; padding: 3.4cqw 4cqw; border-radius: 4cqw; background: #0a1a13; color: #f3efe6; }
.ps-count { display: flex; align-items: baseline; gap: 1.2cqw; direction: ltr; }
.ps-count b { font-size: 5.4cqw; font-weight: 500; color: #e2c785; }
.ps-count small { font-size: 2.6cqw; color: rgba(243, 239, 230, .6); margin-inline-end: 1.6cqw; }
.ps-route { display: grid; grid-template-columns: 16cqw minmax(0, 1fr) auto; align-items: center; gap: 3cqw; padding: 2.6cqw; border: 1px solid #e2dbcc; border-radius: 4cqw; background: #fffdf8; }
.ps-route img { width: 16cqw; height: 20cqw; object-fit: cover; border-radius: 50% 50% 1.4cqw 1.4cqw / 34% 34% 1.4cqw 1.4cqw; }
.ps-route b { display: block; font-size: 4cqw; line-height: 1.45; }
.ps-check { display: grid; gap: 1.6cqw; margin-top: 1cqw; padding: 3.4cqw 4cqw; border-radius: 4cqw; background: #ece6d8; font-size: 3.1cqw; color: #47524c; }
.ps-check b { font-size: 3.4cqw; color: #121a16; margin-bottom: .6cqw; }
.ps-check span { position: relative; padding-inline-start: 4.6cqw; }
.ps-check span::before { content: ""; position: absolute; inset-inline-start: .4cqw; top: 1.2cqw; width: 2.4cqw; height: 1.3cqw; border-bottom: 1.5px solid #7a581b; border-left: 1.5px solid #7a581b; transform: rotate(-45deg); }
.ps-note { padding: 3cqw 3.6cqw; border-radius: 3cqw; background: #ece6d8; font-size: 3cqw; color: #47524c; line-height: 1.6; }
.ps-tabs {
  position: absolute; inset: auto 0 0; z-index: 4; display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  height: 19cqw; padding: 0 2cqw 4cqw; background: #0a1a13; color: rgba(243, 239, 230, .55); font-size: 2.3cqw; font-weight: 600;
}
.ps-tabs span { display: grid; justify-items: center; gap: .8cqw; white-space: nowrap; }
.ps-tabs .i { width: 4.8cqw; height: 4.8cqw; }
.ps-tabs .on { color: #e2c785; }
.ps-tabs .main i { display: grid; place-items: center; width: 10.5cqw; height: 10.5cqw; margin-top: -5cqw; border-radius: 50%; background: #f3efe6; color: #0a1a13; box-shadow: 0 0 0 1.2cqw #0a1a13; }
.ps-route small { display: block; font-size: 2.9cqw; color: #6c7670; line-height: 1.4; }
.ps-route i { width: 2.6cqw; height: 2.6cqw; border-top: 1.5px solid #6c7670; border-left: 1.5px solid #6c7670; transform: rotate(-45deg); margin-inline-end: 1cqw; }
[dir="ltr"] .ps-route i { transform: rotate(135deg); }
.ps-progress { display: flex; gap: 1.4cqw; }
.ps-progress i { flex: 1; height: 1cqw; border-radius: 1cqw; background: #e2dbcc; }
.ps-progress i.on { background: #c9a24d; }
.ps-person { display: grid; grid-template-columns: 19cqw minmax(0, 1fr); gap: 3cqw; align-items: stretch; }
.ps-avatar { border-radius: 3cqw; overflow: hidden; border: 1px solid #cbc2ae; }
.ps-avatar svg { width: 100%; height: 100%; display: block; }
.ps-fields { display: grid; gap: 2.4cqw; }
.ps-field { display: grid; gap: .6cqw; padding: 2cqw 3cqw; border: 1px solid #cbc2ae; border-radius: 2.6cqw; background: #fffdf8; }
.ps-field small { font-size: 2.6cqw; color: #6c7670; }
.ps-field b { font-size: 3.3cqw; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-btn { margin-top: auto; padding: 3cqw; border-radius: 99px; text-align: center; font-size: 3.9cqw; font-weight: 600; background: #121a16; color: #f5f2ea; }
.ps-search { display: flex; align-items: center; justify-content: space-between; gap: 2cqw; padding: 1.4cqw 1.4cqw 1.4cqw 3.4cqw; border: 1px solid #cbc2ae; border-radius: 99px; background: #fffdf8; }
.ps-search b { font-weight: 500; font-size: 3.3cqw; }
.ps-search i { font-style: normal; padding: 1.6cqw 3.6cqw; border-radius: 99px; background: #121a16; color: #f5f2ea; font-size: 3.1cqw; font-weight: 600; }
.ps-card { display: grid; gap: 3cqw; padding: 4cqw; border: 1px solid #e2dbcc; border-radius: 4cqw; background: #fffdf8; }
.ps-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 2cqw; }
.ps-card-top b { display: block; font-family: var(--font-display); font-size: 4cqw; line-height: 1.45; }
.ps-card-top small { display: block; font-size: 2.8cqw; color: #6c7670; }
.ps-ref { font-size: 3cqw; color: #47524c; }
.ps-ref b { font-weight: 500; }
.ps-chip { flex: none; justify-self: start; align-self: flex-start; padding: 1cqw 3cqw; border-radius: 99px; font-size: 2.9cqw; font-weight: 600; white-space: nowrap; }
.ps-chip.pending { background: #f8eed8; color: #8a5800; }
.ps-chip.ok { background: #e4f0e8; color: #1b6a42; align-self: center; }
.ps-chip.live { background: rgba(159, 220, 187, .12); color: #9fdcbb; border: 1px solid rgba(159, 220, 187, .3); }
.ps-timeline { display: grid; gap: 2.6cqw; padding-top: 3cqw; border-top: 1px solid #e2dbcc; font-size: 3.1cqw; color: #6c7670; }
.ps-timeline li { position: relative; padding-inline-start: 5.4cqw; }
.ps-timeline li::before { content: ""; position: absolute; inset-inline-start: 0; top: 1.3cqw; width: 2.4cqw; height: 2.4cqw; border-radius: 50%; border: 1px solid #cbc2ae; background: #fffdf8; }
.ps-timeline li.done { color: #121a16; }
.ps-timeline li.done::before { background: #c9a24d; border-color: #c9a24d; }
.ps-timeline li.current { color: #8a5800; font-weight: 600; }
.ps-timeline li.current::before { border-color: #8a5800; background: #f8eed8; }
.ps-done { align-items: center; }
.ps-pass { width: 58cqw; }
.ps-pass .pass { box-shadow: 0 22px 40px -24px rgba(16, 24, 20, .6); }
.ps-done .ps-btn { width: 100%; }
@media (max-width: 860px) {
  .journey { grid-template-columns: 1fr; gap: 28px; }
  .phone { order: -1; justify-self: center; width: min(250px, 66vw); }
}

/* ختم «استُلم» على رقم الطلب */
.ref-box { position: relative; }
.ref-box .stamp {
  position: absolute; top: -24px; inset-inline-end: -100px; width: 134px; height: 134px; color: #17603c;
  opacity: 0; transform: rotate(-12deg); pointer-events: none;
}
:root[data-theme="dark"] .ref-box .stamp { color: #8fd0ad; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ref-box .stamp { color: #8fd0ad; } }
.stamp svg { width: 100%; height: 100%; overflow: visible; }
.stamp circle { fill: none; stroke: currentColor; }
.stamp .r1 { stroke-width: 3.5; }
.stamp .r2 { stroke-width: 1; }
.stamp .r3 { stroke-width: 1.2; stroke-dasharray: 2 3; }
.stamp text { fill: currentColor; font-family: var(--font-display); }
.stamp .ring { font-size: 13px; font-weight: 700; }
.stamp .main { font-size: 29px; font-weight: 800; }
.stamp .date { font-family: var(--font-mono); font-size: 10.5px; }
.stamp.is-static { opacity: .9; }
@media (max-width: 480px) { .ref-box .stamp { inset-inline-end: -46px; top: -64px; width: 104px; height: 104px; } }

/* مسارات الاعتماد: بابان مقوّسان */
.doors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); align-items: stretch; }
.door { display: flex; flex-direction: column; min-width: 0; }
.door-media { display: block; margin: 0; }
.door-media .arch { aspect-ratio: 16 / 13; background: var(--paper-2); }
.door-body {
  flex: 1; display: flex; flex-direction: column; align-items: flex-start;
  padding: clamp(24px, 3vw, 38px); background: var(--surface); border: 1px solid var(--rule); border-top: 0;
  border-radius: 0 0 var(--r-xl) var(--r-xl); box-shadow: var(--shadow-sm);
}
.door-index { display: block; font-family: var(--font-mono); font-size: .86rem; color: var(--gold-ink); margin-bottom: 6px; }
.door-title { font-size: clamp(1.8rem, 2.8vw, 2.4rem); margin-bottom: 8px; }
.door-text { color: var(--ink-2); font-size: 1.04rem; max-width: 46ch; margin-bottom: 22px; }
.req-list { width: 100%; margin-bottom: 28px; border-top: 1px solid var(--rule); }
.req-list li { display: flex; align-items: baseline; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); font-size: .97rem; }
.req-list li::before { content: ""; width: 10px; height: 1px; background: var(--gold); flex: none; transform: translateY(-5px); }
.door-body .btn { margin-top: auto; }
.vt-creator { view-transition-name: route-creator; }
.vt-channel { view-transition-name: route-channel; }
@media (max-width: 860px) {
  .doors { grid-template-columns: 1fr; }
  .door-media .arch { aspect-ratio: 5 / 4; }
}

/* خطوات الاعتماد */
.steps-wrap { position: relative; }
.steps-line { position: absolute; top: 9px; inset-inline: 0; height: 1px; background: var(--rule-2); }
.steps-progress { position: absolute; inset: -1px 0; background: var(--gold); transform-origin: 100% 50%; }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.step { position: relative; padding-top: 48px; }
.step-dot {
  position: absolute; top: 3px; inset-inline-start: 0; width: 13px; height: 13px; border-radius: 50%;
  background: var(--paper-2); border: 1px solid var(--rule-2); transition: background-color .4s, border-color .4s, transform .4s var(--ease);
}
.step-num { display: block; font-family: var(--font-mono); font-weight: 500; font-size: 2.6rem; line-height: 1; color: var(--rule-2); margin-bottom: 18px; transition: color .5s; }
.step h3 { font-size: 1.45rem; margin-bottom: 8px; }
.step p { color: var(--ink-2); font-size: .97rem; max-width: 30ch; }
.process:not(.is-animated) .step-dot, .step.is-active .step-dot { background: var(--gold); border-color: var(--gold); }
.step.is-active .step-dot { transform: scale(1.25); }
.process:not(.is-animated) .step-num, .step.is-active .step-num { color: var(--gold-ink); }
@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; gap: 0; }
  .steps-line { top: 8px; bottom: 30px; inset-inline-start: 6px; inset-inline-end: auto; width: 1px; height: auto; }
  .steps-progress { transform-origin: 50% 0; }
  .step { padding: 0 0 40px; padding-inline-start: 40px; }
  .step:last-child { padding-bottom: 0; }
  .step-dot { top: 3px; }
  .step-num { font-size: 2.1rem; margin-bottom: 10px; }
}

/* الصورة العريضة */
.interlude { position: relative; height: clamp(380px, 74vh, 780px); overflow: hidden; background: var(--night); color: var(--on-night); isolation: isolate; }
.interlude-media { position: absolute; inset: -12% 0; z-index: -2; }
.interlude-media img { width: 100%; height: 100%; object-fit: cover; }
.interlude::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(10, 26, 19, .9), rgba(10, 26, 19, 0) 50%); }
.interlude .container { height: 100%; display: flex; align-items: flex-end; padding-bottom: clamp(24px, 4vw, 48px); }
.interlude .caption { margin: 0; max-width: 64ch; }

/* الأسئلة الشائعة */
.faq-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px clamp(32px, 7vw, 120px); align-items: start; }
.faq-aside { position: sticky; top: calc(var(--header-h) + 32px); }
.faq-aside .section-intro { margin-top: 16px; }
.faq-list { border-top: 1px solid var(--rule-2); }
.faq-list details { border-bottom: 1px solid var(--rule-2); }
.faq-list summary {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; padding: 22px 0; cursor: pointer; list-style: none;
  font-family: var(--font-display); font-size: clamp(1.15rem, 1.7vw, 1.35rem); font-weight: 600; line-height: 1.6; transition: color .2s;
}
.faq-list summary:hover { color: var(--gold-ink); }
.faq-list summary::-webkit-details-marker { display: none; }
.plus { position: relative; width: 18px; height: 18px; flex: none; margin-top: 10px; transition: transform .4s var(--ease); }
.plus::before, .plus::after { content: ""; position: absolute; top: 50%; inset-inline: 0; height: 1.5px; background: currentColor; }
.plus::after { transform: rotate(90deg); }
details[open] .plus { transform: rotate(45deg); }
.faq-list details::details-content { block-size: 0; overflow: clip; transition: block-size .45s var(--ease), content-visibility .45s allow-discrete; }
.faq-list details[open]::details-content { block-size: auto; }
.faq-list .answer { padding: 0 0 24px; color: var(--ink-2); max-width: 62ch; }
@media (max-width: 860px) { .faq-grid { grid-template-columns: 1fr; } .faq-aside { position: static; } }

/* ---------- 7. التذييل ---------- */
.site-footer { position: relative; isolation: isolate; background: var(--night); color: var(--on-night-2); padding-top: clamp(40px, 6vw, 72px); }
/* أفق العتبة فوق التذييل */
.footer-skyline { position: relative; height: clamp(64px, 9.5vw, 140px); margin-bottom: clamp(36px, 5vw, 60px); }
.footer-skyline::before {
  content: ""; position: absolute; inset: 0; background: var(--gold); opacity: .38;
  -webkit-mask: url(../img/shrine.svg) center bottom / contain no-repeat; mask: url(../img/shrine.svg) center bottom / contain no-repeat;
}
.footer-skyline::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 1px; background: var(--gold); opacity: .35; }
@media (max-width: 700px) {
  .footer-skyline::before { -webkit-mask-image: url(../img/shrine-thick.svg); mask-image: url(../img/shrine-thick.svg); }
}
.footer-top { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 56px; border-bottom: 1px solid var(--night-rule); }
.footer-top.has-contact { grid-template-columns: 1.4fr 1fr 1fr 1fr 1.1fr; }
.footer-brand img { height: 40px; width: auto; margin-bottom: 20px; }
.footer-brand p { max-width: 36ch; font-size: .94rem; }
.footer-col h3 { font-family: var(--font-ui); font-size: .84rem; font-weight: 600; color: var(--gold-light); margin-bottom: 16px; }
.footer-col li + li { margin-top: 10px; }
.footer-col a { font-size: .94rem; transition: color .2s; }
.footer-col a:hover { color: var(--on-night); }
.footer-col .ltr { display: inline-block; }
.footer-col small { display: block; font-size: .78rem; color: var(--on-night-3); }
.socials { display: flex; flex-wrap: wrap; gap: 8px; }
.socials a { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 999px; border: 1px solid var(--night-rule); transition: border-color .2s, color .2s; }
.socials a:hover { border-color: var(--gold); color: var(--gold-light); }
.socials .i { width: 17px; height: 17px; }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  padding: 22px 0 calc(22px + env(safe-area-inset-bottom)); font-size: .8rem; color: var(--on-night-3);
}
@media (max-width: 1000px) { .footer-top, .footer-top.has-contact { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-top, .footer-top.has-contact { grid-template-columns: 1fr; gap: 32px; } }

/* ---------- 8. رأس الصفحات الداخلية ---------- */
.page-hero {
  position: relative; isolation: isolate; overflow: hidden; background: var(--night); color: var(--on-night);
  padding: calc(var(--header-h) + clamp(28px, 4.5vw, 56px)) 0 clamp(96px, 10vw, 128px);
}
.page-hero-bg { position: absolute; inset: 0; z-index: -3; width: 100%; height: 100%; object-fit: cover; opacity: .5; filter: saturate(.85) contrast(1.05); }
.page-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: linear-gradient(to left, rgba(10, 26, 19, .97) 28%, rgba(10, 26, 19, .55)), linear-gradient(to top, var(--night), transparent 55%);
}
.breadcrumb { display: flex; align-items: center; gap: 10px; font-size: .86rem; color: var(--on-night-3); margin-bottom: 16px; }
.breadcrumb a:hover { color: var(--on-night); }
.page-title { font-size: clamp(2.2rem, 4.6vw, 3.7rem); line-height: 1.28; margin-bottom: 12px; max-width: 18ch; text-wrap: balance; }
.page-lead { color: var(--on-night-2); font-size: 1.06rem; max-width: 58ch; }
.page-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 22px; font-size: .9rem; color: var(--on-night-2); }
@media (max-width: 640px) { .page-meta { flex-direction: column; align-items: flex-start; gap: 6px; } .page-meta .sep { display: none; } }

/* ---------- 9. الاستمارات ---------- */
.form-layout {
  display: grid; grid-template-columns: 272px minmax(0, 1fr); gap: 28px; align-items: start;
  margin-top: -64px; padding-bottom: clamp(64px, 9vw, 112px); position: relative; z-index: 2;
}
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.aside-card { padding: 24px; }
.aside-title { font-family: var(--font-ui); font-size: .84rem; font-weight: 600; color: var(--ink-3); margin-bottom: 18px; }
.help-card ul { display: grid; gap: 12px; color: var(--ink-2); font-size: .92rem; line-height: 1.7; }
.help-card li { display: flex; gap: 10px; }
.help-card li::before { content: ""; width: 8px; height: 1px; background: var(--gold); margin-top: 13px; flex: none; }
.help-card .link { display: inline-block; margin-top: 16px; font-size: .92rem; }

.stepper li { position: relative; padding-bottom: 20px; }
.stepper li:last-child { padding-bottom: 0; }
.stepper li:not(:last-child)::before {
  content: ""; position: absolute; top: 36px; bottom: 4px; inset-inline-start: 14px; width: 1px; background: var(--rule-2); transition: background-color .3s;
}
.stepper li.is-done:not(:last-child)::before { background: var(--gold); }
.stepper button { display: flex; gap: 14px; width: 100%; text-align: start; border-radius: 8px; }
.stepper button[disabled] { cursor: default; }
.stepper .num {
  width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 50%;
  font-family: var(--font-mono); font-size: .84rem; font-weight: 500; color: var(--ink-3); border: 1px solid var(--rule-2); background: var(--surface); transition: all .3s;
}
.stepper .num .i { width: 15px; height: 15px; }
.stepper b { display: block; font-size: .95rem; font-weight: 600; color: var(--ink-2); line-height: 1.5; padding-top: 3px; }
.stepper small { display: block; font-size: .8rem; color: var(--ink-3); line-height: 1.5; }
.stepper li.is-active .num { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.stepper li.is-active b, .stepper li.is-done b { color: var(--ink); }
.stepper li.is-done .num { background: transparent; border-color: var(--gold); color: var(--gold-ink); }

.form-card { --pad: clamp(20px, 4.5vw, 48px); padding: var(--pad); }
.form-progress { display: flex; align-items: center; gap: 16px; margin-bottom: 34px; }
.segments { display: flex; gap: 6px; flex: 1; }
.seg { flex: 1; height: 3px; border-radius: 3px; background: var(--paper-2); transition: background-color .4s; }
.seg.is-done { background: var(--ink); }
.seg.is-current { background: var(--gold); }
.form-progress-label { font-size: .86rem; color: var(--ink-3); white-space: nowrap; }
.form-progress-label b { color: var(--ink); font-weight: 600; }

.step-panel:not(.is-active) { display: none; }
.no-gsap .step-panel.is-active { animation: panelIn .4s var(--ease); }
@keyframes panelIn { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }
.panel-head { margin-bottom: 30px; }
.panel-head h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); margin-bottom: 4px; outline: none; }
.panel-head p { color: var(--ink-3); }
.sub-head { font-family: var(--font-ui); font-size: 1rem; font-weight: 600; margin: 34px 0 18px; padding-top: 28px; border-top: 1px solid var(--rule); }

.grid { display: grid; gap: 20px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.span-all { grid-column: 1 / -1; }
.person-grid { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 28px; align-items: start; }

.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field-label { font-weight: 500; font-size: .95rem; color: var(--ink); }
.field-label .opt { color: var(--ink-3); font-weight: 400; font-size: .84rem; }
.req { color: var(--danger); }
.field-hint { color: var(--ink-3); font-size: .85rem; line-height: 1.6; }
.field-error { display: flex; align-items: center; gap: 6px; color: var(--danger); font-size: .86rem; font-weight: 500; line-height: 1.5; }
.field-error .i { width: 15px; height: 15px; }

.input, .select, .textarea {
  width: 100%; min-height: 52px; padding: 0 16px; border: 1px solid var(--rule-2); border-radius: var(--r);
  background: var(--surface); color: var(--ink); font-size: 1rem; outline: none;
  -webkit-appearance: none; appearance: none; transition: border-color .2s, box-shadow .2s;
}
.textarea { padding: 13px 16px; min-height: 112px; resize: vertical; line-height: 1.7; }
.input::placeholder, .textarea::placeholder { color: var(--ink-3); opacity: .7; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--ink-3); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 4px var(--ring); }
.input[readonly] { background: var(--surface-2); color: var(--ink-2); }
.input.ltr { text-align: right; }
.select {
  padding-inline-end: 42px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23737d77' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-size: 18px; background-position: left 14px center;
}
.has-error .input, .has-error .select, .has-error .textarea, .has-error .input-group, .has-error .phone-group, .has-error .upload-drop, .has-error .ts-control {
  border-color: var(--danger) !important; box-shadow: 0 0 0 3px rgba(163, 39, 27, .1) !important;
}

.input-group, .phone-group {
  display: flex; align-items: stretch; direction: ltr; overflow: hidden;
  border: 1px solid var(--rule-2); border-radius: var(--r); background: var(--surface); transition: border-color .2s, box-shadow .2s;
}
.input-group:focus-within, .phone-group:focus-within { border-color: var(--ink); box-shadow: 0 0 0 4px var(--ring); }
.input-group .addon { display: flex; align-items: center; gap: 8px; padding: 0 12px; flex: none; color: var(--ink-3); font-size: .9rem; background: var(--surface-2); border-inline-end: 1px solid var(--rule); }
.input-group .addon .i { width: 17px; height: 17px; color: var(--ink-2); }
.input-group .input, .phone-group .input { border: 0; border-radius: 0; background: transparent; box-shadow: none !important; text-align: left; min-width: 0; }
.dial { position: relative; display: flex; align-items: center; gap: 6px; flex: none; padding: 0 12px; min-width: 96px; border-inline-end: 1px solid var(--rule); background: var(--surface-2); font-family: var(--font-mono); font-size: .94rem; font-variant-numeric: tabular-nums; }
.dial .i { width: 14px; height: 14px; color: var(--ink-3); }
.dial select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 16px; direction: rtl; }
.date-group { display: grid; grid-template-columns: 1fr 1.5fr 1.2fr; gap: 10px; }
.date-group .select { padding-inline: 12px 32px; background-position: left 10px center; background-size: 16px; }
@media (max-width: 420px) {
  .date-group { grid-template-columns: 1fr 1fr; }
  .date-group select[name="dob_month"] { grid-column: 1 / -1; grid-row: 1; }
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; padding: 9px 16px; border-radius: 999px; pointer-events: none;
  border: 1px solid var(--rule-2); background: var(--surface); color: var(--ink-2); font-size: .94rem; transition: all .2s;
}
.chip:hover span { border-color: var(--ink-3); color: var(--ink); }
.chip input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }

.pledge { display: flex; gap: 14px; align-items: flex-start; padding: 18px; margin-top: 24px; border: 1px solid var(--rule-2); border-radius: var(--r); background: var(--surface-2); cursor: pointer; }
.pledge input { width: 20px; height: 20px; flex: none; margin-top: 4px; accent-color: var(--ink); cursor: pointer; }
.has-error.pledge { border-color: var(--danger); }

/* رفع الملفات */
.upload { position: relative; }
.upload input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.upload-drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 170px;
  padding: 20px 16px; text-align: center; cursor: pointer; border: 1px dashed var(--rule-2); border-radius: var(--r);
  background: var(--surface-2); transition: border-color .2s, background-color .2s;
}
.upload.has-cam .upload-drop { padding-bottom: 64px; }
.upload-drop:hover, .upload.is-dragover .upload-drop { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 7%, var(--surface-2)); }
.upload input:focus-visible + .upload-drop { outline: 2px solid var(--gold); outline-offset: 2px; }
.upload-ico { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--paper-2); color: var(--gold-ink); margin-bottom: 2px; }
.upload-ico .i { width: 21px; height: 21px; }
.upload-title { font-weight: 500; font-size: .95rem; line-height: 1.5; }
.upload-title u { color: var(--ink); text-decoration-color: var(--gold); text-underline-offset: 4px; }
.upload-meta { font-size: .8rem; color: var(--ink-3); }
.upload-cam {
  position: absolute; bottom: 14px; inset-inline: 0; margin-inline: auto; width: max-content; z-index: 1;
  display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--rule-2); background: var(--surface); font-size: .88rem; font-weight: 500; transition: border-color .2s;
}
.upload-cam:hover { border-color: var(--ink); }
.upload-cam .i { width: 16px; height: 16px; }
.upload.has-file .upload-drop, .upload.has-file .upload-cam { display: none; }
.upload-preview { display: none; position: relative; min-height: 170px; border-radius: var(--r); overflow: hidden; border: 1px solid var(--rule-2); background: var(--surface-2); }
.upload.has-file .upload-preview { display: block; }
.upload-preview img { width: 100%; height: 100%; min-height: 170px; max-height: 230px; object-fit: cover; }
.upload-preview .doc { min-height: 170px; display: grid; place-items: center; align-content: center; gap: 8px; padding: 16px; color: var(--ink-2); font-size: .9rem; }
.upload-preview .doc .i { width: 36px; height: 36px; color: var(--gold-ink); }
.upload-bar {
  position: absolute; inset-inline: 0; bottom: 0; display: flex; align-items: center; gap: 8px; padding: 8px 10px; color: #fff; font-size: .8rem;
  background: linear-gradient(0deg, rgba(6, 14, 10, .88), rgba(6, 14, 10, .35) 70%, transparent);
}
.upload-bar .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: ltr; text-align: right; }
.upload-bar button, .upload-bar label { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 8px; background: rgba(255, 255, 255, .16); cursor: pointer; transition: background-color .2s; }
.upload-bar button:hover { background: #c0392b; }
.upload-bar label:hover { background: rgba(255, 255, 255, .3); }
.upload-bar .i { width: 16px; height: 16px; }
.upload-tag { position: absolute; top: 10px; inset-inline-start: 10px; padding: 2px 10px; border-radius: 999px; background: rgba(6, 14, 10, .72); color: #fff; font-size: .74rem; }
.upload.is-busy .upload-drop { pointer-events: none; opacity: .6; }
.upload.is-busy::after {
  content: "جارٍ تجهيز الصورة…"; position: absolute; inset: 0; display: grid; place-items: center;
  font-size: .9rem; font-weight: 500; color: var(--ink); background: color-mix(in srgb, var(--surface) 65%, transparent); border-radius: var(--r);
}
.upload-portrait .upload-drop, .upload-portrait .upload-preview { aspect-ratio: 3 / 4; min-height: 0; }
.upload-portrait .upload-preview img { height: 100%; min-height: 0; max-height: none; }
/* الصورة الشخصية داخل قوس المحراب، كما تُطبع على الباج */
.upload-portrait { --arch-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 400' preserveAspectRatio='none'%3E%3Cpath d='M0,400 L0,168 C0,75.6 90,16.8 150,0 C210,16.8 300,75.6 300,168 L300,400 Z'/%3E%3C/svg%3E"); }
.upload-arch { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.upload-arch path { fill: var(--surface-2); stroke: var(--rule-2); stroke-width: 1.2; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; transition: stroke .2s, fill .2s, stroke-width .2s; }
.upload-portrait .upload-drop, .upload-portrait .upload-drop:hover, .upload-portrait.is-dragover .upload-drop { position: relative; border: 0; border-radius: 0; background: none; padding-top: 24%; }
.upload-portrait:hover .upload-arch path, .upload-portrait.is-dragover .upload-arch path { stroke: var(--gold); fill: color-mix(in srgb, var(--gold) 7%, var(--surface-2)); }
.upload-portrait input:focus-visible + .upload-drop { outline: none; }
.upload-portrait:has(input:focus-visible) .upload-arch path { stroke: var(--gold); stroke-width: 2.4; stroke-dasharray: none; }
.has-error .upload-portrait .upload-arch path { stroke: var(--danger); }
.upload-portrait .upload-preview { border: 0; border-radius: 0; -webkit-mask: var(--arch-mask) center / 100% 100% no-repeat; mask: var(--arch-mask) center / 100% 100% no-repeat; }
.upload-portrait.has-file .upload-arch { z-index: 2; }
.upload-portrait.has-file .upload-arch path { fill: none; stroke: var(--gold); stroke-width: 1.5; stroke-dasharray: none; }
.upload-portrait .upload-tag { top: auto; bottom: 54px; inset-inline: 0; width: max-content; margin-inline: auto; }
.upload-portrait.is-busy::after { border-radius: 0; -webkit-mask: var(--arch-mask) center / 100% 100% no-repeat; mask: var(--arch-mask) center / 100% 100% no-repeat; }

/* أعضاء الكادر */
.members { display: grid; gap: 10px; }
.member {
  display: grid; grid-template-columns: 30px minmax(0, 1.3fr) minmax(0, 1fr) 44px; gap: 12px; align-items: end;
  padding: 14px; border: 1px solid var(--rule); border-radius: var(--r); background: var(--surface-2);
}
.member .num { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; margin-bottom: 11px; font-family: var(--font-mono); font-size: .84rem; font-weight: 500; color: var(--gold-ink); border: 1px solid var(--rule-2); }
.member .field-label { font-size: .85rem; }
.member .input { min-height: 48px; }
.member .remove { width: 44px; height: 48px; display: grid; place-items: center; border-radius: var(--r); color: var(--ink-3); border: 1px solid var(--rule-2); background: var(--surface); }
.member .remove:hover { color: var(--danger); border-color: var(--danger); }
.member .remove .i { width: 17px; height: 17px; }
.members-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.members-foot small { color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* التنقل بين الخطوات */
.draft-status { display: flex; align-items: center; gap: 6px; min-height: 22px; margin-top: 28px; font-size: .84rem; color: var(--ink-3); }
.draft-status .i { width: 15px; height: 15px; }
.draft-status button { color: var(--ink); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; font-size: .84rem; }
.wizard-nav { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding-top: 22px; border-top: 1px solid var(--rule); }
.wizard-nav .grow { flex: 1; }

/* المراجعة */
.review { display: grid; gap: 14px; }
.review-block { border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; }
.review-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; background: var(--surface-2); border-bottom: 1px solid var(--rule); }
.review-head h3 { font-family: var(--font-ui); font-size: .98rem; font-weight: 600; }
.review-head button { color: var(--ink); font-size: .9rem; font-weight: 600; text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 4px; }
.review dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; padding: 16px 18px; }
.review dl > div { min-width: 0; }
.review dl .wide { grid-column: 1 / -1; }
.review dt { color: var(--ink-3); font-size: .82rem; }
.review dd { font-weight: 500; overflow-wrap: anywhere; }
.review-files { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.review-files figure { width: 112px; }
.review-files img, .review-files .doc-thumb { width: 112px; height: 82px; object-fit: cover; border-radius: 8px; border: 1px solid var(--rule); background: var(--surface-2); }
.review-files .doc-thumb { display: grid; place-items: center; color: var(--gold-ink); }
.review-files figcaption { font-size: .74rem; color: var(--ink-3); margin-top: 4px; line-height: 1.4; }
.review ol.team { display: grid; gap: 4px; }
.review ol.team span { color: var(--ink-3); font-weight: 400; }

.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r); font-size: .95rem; border: 1px solid transparent; margin-bottom: 20px; }
.alert .i { width: 19px; height: 19px; margin-top: 4px; }
.alert-danger { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 22%, transparent); }
.alert-info { background: var(--surface-2); color: var(--ink); border-color: var(--rule); }
.alert-info .i { color: var(--gold-ink); }
.alert-warn { background: var(--warn-soft); color: var(--ink); border-color: color-mix(in srgb, var(--warn) 22%, transparent); }
.alert-warn .i { color: var(--warn); }

/* الحالات: الإرسال والنجاح والحالات الفارغة */
.state-card { padding: clamp(40px, 7vw, 72px) clamp(20px, 4vw, 48px); text-align: center; }
.state-card h2 { font-size: clamp(1.6rem, 3.2vw, 2.1rem); margin-bottom: 8px; }
.state-card p { color: var(--ink-2); max-width: 48ch; margin-inline: auto; }
.state-icon { width: 84px; height: 84px; margin: 0 auto 22px; display: grid; place-items: center; border-radius: 50%; }
.state-icon .i { width: 36px; height: 36px; }
.state-icon.lock { background: var(--surface-2); color: var(--gold-ink); border: 1px solid var(--rule); }
/* رسم العتبة المصغّر للحالات الفارغة */
.empty-art { position: relative; width: min(300px, 80%); height: 68px; margin: 0 auto 26px; }
.empty-art::before {
  content: ""; position: absolute; inset: 0; background: var(--gold); opacity: .75;
  -webkit-mask: url(../img/shrine-thick.svg) center bottom / contain no-repeat; mask: url(../img/shrine-thick.svg) center bottom / contain no-repeat;
}
.empty-art::after { content: ""; position: absolute; inset-inline: -10%; bottom: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.check-draw { width: 92px; height: 92px; margin: 0 auto 22px; color: var(--ok); }
.check-draw circle, .check-draw path { fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.state-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 28px; }
.success-grid { display: grid; gap: clamp(26px, 4vw, 40px); align-items: center; }
.success-badge { margin: 0; }
.success-stage.ly-stage { height: clamp(430px, 60svh, 540px); touch-action: pan-y; border: 1px solid var(--rule); background: radial-gradient(70% 55% at 50% 62%, color-mix(in srgb, var(--gold) 16%, transparent), transparent 70%), var(--surface-2); }
.success-stage .ly-card { touch-action: none; }
.success-badge figcaption { max-width: 40ch; margin: 12px auto 0; font-size: .82rem; line-height: 1.7; color: var(--ink-3); }
@media (min-width: 1100px) { .success-grid:has(> .success-badge:not([hidden])) { grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); } }
.form-layout.is-submitted .preview-card { display: none; }
.ref-box { display: inline-flex; flex-direction: column; gap: 2px; margin-top: 22px; padding: 12px 28px; border: 1px dashed var(--gold); border-radius: var(--r); }
.ref-box span { font-size: .8rem; color: var(--ink-3); }
.ref-box b { font-family: var(--font-mono); font-size: 1.3rem; font-weight: 500; direction: ltr; font-variant-numeric: tabular-nums; }
/* شريط تقدّم غير محدد بدل دائرة التحميل */
.loader-bar { position: relative; width: min(280px, 70%); height: 3px; margin: 0 auto 28px; border-radius: 3px; background: var(--rule); overflow: hidden; }
.loader-bar::after { content: ""; position: absolute; inset-block: 0; width: 38%; border-radius: 3px; background: var(--gold); animation: loader 1.3s var(--ease) infinite; }
@keyframes loader { from { inset-inline-start: -38%; } to { inset-inline-start: 100%; } }

/* هياكل المحتوى أثناء التحميل */
.sk {
  display: block; border-radius: 8px;
  background: linear-gradient(90deg, var(--paper-2) 25%, var(--surface-2) 45%, var(--paper-2) 65%);
  background-size: 300% 100%; animation: sk 1.5s ease-in-out infinite;
}
@keyframes sk { from { background-position: 100% 0; } to { background-position: 0 0; } }
.sk-card { padding: clamp(20px, 3.4vw, 30px); display: grid; gap: 12px; }
.sk-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.sk-title { height: 26px; width: 46%; }
.sk-pill { height: 30px; width: 110px; border-radius: 999px; }
.sk-line { height: 14px; width: 70%; }
.sk-line.short { width: 40%; }
.sk-steps { height: 42px; margin-top: 10px; }
.sk-verify { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 24px; align-items: center; padding: 26px 24px; }
.sk-verify .sk-arch { aspect-ratio: 3 / 4; border-radius: 50% 50% 8px 8px / 32% 32% 8px 8px; }
.sk-bar { height: 72px; border-radius: 0; }
.sk-stack { display: grid; gap: 12px; }
@media (max-width: 640px) { .sk-verify { grid-template-columns: 1fr; } .sk-verify .sk-arch { width: 150px; } }

/* القوائم القابلة للبحث (Tom Select) */
.ts-wrapper.select { padding: 0; border: 0; min-height: 0; background: none; box-shadow: none !important; }
.ts-wrapper.single .ts-control, .ts-wrapper.single.input-active .ts-control {
  min-height: 52px; padding: 0 16px; padding-inline-end: 40px; border: 1px solid var(--rule-2); border-radius: var(--r);
  background: var(--surface); color: var(--ink); box-shadow: none; font-size: 1rem; line-height: 1.5; display: flex; align-items: center; cursor: pointer;
}
.ts-wrapper.single .ts-control::after { border-color: var(--ink-3) transparent transparent; }
.ts-wrapper.single.dropdown-active .ts-control::after { border-color: transparent transparent var(--ink-3); }
.ts-wrapper.focus .ts-control { border-color: var(--ink); box-shadow: 0 0 0 4px var(--ring); }
.ts-control > input { color: var(--ink); font-size: 1rem; }
.ts-control > input::placeholder { color: var(--ink-3); }
.ts-dropdown { margin-top: 6px; border: 1px solid var(--rule-2); border-radius: var(--r); background: var(--surface); color: var(--ink); box-shadow: var(--shadow); overflow: hidden; }
.ts-dropdown .option { padding: 10px 16px; }
.ts-dropdown .active { background: var(--surface-2); color: var(--ink); }
.ts-dropdown .selected { font-weight: 600; }
.ts-dropdown .no-results { padding: 12px 16px; color: var(--ink-3); }
.ts-dropdown-content { max-height: 288px; }

/* ---------- 10. النوافذ (القص، الكاميرا، الباج) ---------- */
.modal {
  margin: auto; border: 0; padding: 0; border-radius: var(--r-lg); width: min(560px, calc(100% - 24px)); max-height: calc(100svh - 32px);
  background: var(--surface); color: var(--ink); box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .65); overflow: hidden;
}
.modal[open] { display: flex; flex-direction: column; animation: modalIn .35s var(--ease); }
.modal::backdrop { background: rgba(4, 10, 7, .72); }
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--rule); }
.modal-head h2 { font-family: var(--font-ui); font-size: 1.02rem; font-weight: 600; }
.modal-head .icon-btn:hover { background: var(--surface-2); }
.modal-body { padding: 18px; overflow: auto; }
.modal-foot { display: flex; flex-wrap: wrap; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--rule); }
.modal-foot .grow { flex: 1; }
.crop-stage { height: min(56svh, 460px); background: #0b0f0d; border-radius: 10px; overflow: hidden; }
.crop-stage img { display: block; max-width: 100%; }
.crop-tools { display: flex; gap: 6px; }
.crop-tools .icon-btn { border: 1px solid var(--rule-2); }
.crop-tools .icon-btn:hover { background: var(--surface-2); }
.cropper-view-box { outline: 2px solid var(--gold); outline-color: rgba(201, 162, 77, .9); }
.cropper-line, .cropper-point { background-color: var(--gold); }

.camera {
  width: 100%; height: 100%; max-width: 100%; max-height: 100%; margin: 0; inset: 0; border-radius: 0;
  background: #000; color: #fff;
}
.camera[open] { display: block; animation: none; }
.cam-view { position: absolute; inset: 0; overflow: hidden; }
.cam-view video { width: 100%; height: 100%; object-fit: cover; }
.cam-guide {
  position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%);
  width: min(86vw, 560px); aspect-ratio: 1.586; border-radius: 14px;
  box-shadow: 0 0 0 200vmax rgba(0, 0, 0, .58); outline: 2px solid rgba(255, 255, 255, .92);
}
.cam-guide.face { width: min(64vw, 340px); aspect-ratio: 3 / 4; border-radius: 50% / 44%; }
.cam-hint { position: absolute; top: calc(env(safe-area-inset-top) + 22px); inset-inline: 16px; text-align: center; font-weight: 600; font-size: 1.02rem; text-shadow: 0 1px 8px rgba(0, 0, 0, .6); }
.cam-hint small { display: block; font-weight: 400; font-size: .85rem; opacity: .8; }
.cam-bar { position: absolute; bottom: 0; inset-inline: 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 20px 24px calc(26px + env(safe-area-inset-bottom)); }
.cam-bar .icon-btn { width: 48px; height: 48px; background: rgba(255, 255, 255, .12); border-radius: 50%; justify-self: center; }
.shutter { width: 74px; height: 74px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px #000, 0 0 0 7px rgba(255, 255, 255, .92); transition: transform .15s; }
.shutter:active { transform: scale(.92); }
.cam-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.cam-error { position: absolute; inset: 0; display: grid; place-items: center; padding: 32px; text-align: center; }

.badge-dialog canvas { width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--rule); }
.badge-sk { aspect-ratio: 3 / 5; border-radius: 10px; }
.badge-note { font-size: .85rem; color: var(--ink-3); margin-top: 12px; }

/* ---------- 11. التتبع والتحقق ---------- */
.narrow { max-width: 820px; margin-inline: auto; margin-top: -64px; padding-bottom: clamp(64px, 9vw, 112px); position: relative; z-index: 2; display: grid; gap: 18px; }
.track-card { padding: clamp(22px, 4vw, 36px); }
.track-form { display: flex; gap: 10px; }
.track-form .input { min-height: 56px; font-size: 1.05rem; }
.track-form .btn { --h: 56px; }
.results { display: grid; gap: 16px; }
.req-card { padding: clamp(20px, 3.4vw, 30px); }
.req-top { display: flex; align-items: flex-start; gap: 14px; }
.req-title { flex: 1; min-width: 0; }
.req-title h3 { font-size: 1.45rem; line-height: 1.45; }
.req-title p { color: var(--ink-3); font-size: .9rem; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: .84rem; font-weight: 600; white-space: nowrap; }
.badge .i { width: 15px; height: 15px; }
.badge-pending { background: var(--warn-soft); color: var(--warn); }
.badge-approved { background: var(--ok-soft); color: var(--ok); }
.badge-rejected { background: var(--danger-soft); color: var(--danger); }
.req-meta { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 14px 0 4px; color: var(--ink-2); font-size: .9rem; }
.req-meta b { font-weight: 600; }
.req-meta b[dir="ltr"] { font-family: var(--font-mono); font-weight: 500; }
/* رحلة الطلب: محطات بأيقونات، خط ذهبي حتى المرحلة الحالية، والمتبقي منقّط يتحرك أثناء المراجعة */
.timeline { --p: 1; position: relative; display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 26px; }
.timeline::before, .timeline::after { content: ""; position: absolute; top: 19px; inset-inline: 16.667%; height: 2px; border-radius: 2px; }
.timeline::before { background: repeating-linear-gradient(90deg, var(--rule-2) 0 6px, transparent 6px 11px); }
.timeline::after { background: linear-gradient(90deg, var(--gold), color-mix(in srgb, var(--gold) 65%, #fff)); transform: scaleX(var(--p)); transform-origin: 0 50%; }
[dir="rtl"] .timeline::after { transform-origin: 100% 50%; }
.timeline[data-p="0.5"]::before { animation: tl-flow 1.1s linear infinite; }
[dir="ltr"] .timeline[data-p="0.5"]::before { animation-direction: reverse; }
@keyframes tl-flow { to { background-position: -11px 0; } }
.timeline li { position: relative; display: grid; justify-items: center; align-content: start; gap: 2px; padding-inline: 4px; text-align: center; font-size: .86rem; color: var(--ink-3); }
.timeline b { font-weight: 600; line-height: 1.45; }
.timeline small { font-size: .76rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.tl-node { position: relative; z-index: 1; width: 40px; height: 40px; margin-bottom: 8px; display: grid; place-items: center; border-radius: 50%; background: var(--surface); border: 1px solid var(--rule-2); color: var(--ink-3); }
.tl-node .i { width: 18px; height: 18px; }
.timeline li.done { color: var(--ink); }
.timeline li.done .tl-node { background: var(--gold); border-color: var(--gold); color: #1d1608; }
.timeline li.current { color: var(--warn); }
.timeline li.current .tl-node { border-color: var(--warn); background: var(--warn-soft); color: var(--warn); }
.timeline li.current .tl-node::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--warn); opacity: 0; animation: tl-pulse 2.2s ease-out infinite; }
@keyframes tl-pulse { from { transform: scale(.82); opacity: .5; } to { transform: scale(1.32); opacity: 0; } }
.timeline li.success { color: var(--ok); }
.timeline li.success .tl-node { background: var(--ok); border-color: var(--ok); color: #fff; }
.timeline li.fail { color: var(--danger); }
.timeline li.fail .tl-node { background: var(--danger); border-color: var(--danger); color: #fff; }
@media (prefers-reduced-motion: reduce) { .timeline::before, .tl-node::after { animation: none !important; } }
.req-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.req-note { margin: 20px 0 0; }
.legend { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--rule); }
.legend div { padding: 18px 0; padding-inline-end: 20px; border-bottom: 1px solid var(--rule); }
.legend p { font-size: .86rem; color: var(--ink-2); margin-top: 8px; }

.verify-card { overflow: hidden; }
.verify-status { display: flex; align-items: center; gap: 14px; padding: 20px 24px; color: #fff; }
.verify-status .i { width: 34px; height: 34px; }
.verify-status b { display: block; font-size: 1.25rem; font-weight: 600; line-height: 1.4; }
.verify-status small { opacity: .85; }
.verify-status.valid { background: #1b6a42; }
.verify-status.invalid { background: #a3271b; }
.verify-status.expired { background: #8a5800; }
.verify-body { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 24px; align-items: center; padding: 26px 24px; }
.verify-body .arch { aspect-ratio: 3 / 4; background: var(--surface-2); }
.arch-ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--rule-2); }
.arch-ph .i { width: 56px; height: 56px; }
.verify-name { font-size: clamp(1.6rem, 3.6vw, 2.1rem); line-height: 1.4; margin-bottom: 4px; }
.verify-role { color: var(--ink-2); }
.verify-dl { display: grid; gap: 10px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--rule); font-size: .94rem; }
.verify-dl div { display: flex; justify-content: space-between; gap: 16px; }
.verify-dl dt { color: var(--ink-3); }
.verify-dl dd { font-weight: 500; text-align: end; }
.verify-dl dd[dir="ltr"] { font-family: var(--font-mono); }
.verify-foot { padding: 14px 24px; border-top: 1px solid var(--rule); font-size: .84rem; color: var(--ink-3); }
/* وثيقة الاعتماد: إطار مزدوج، ترويسة داكنة، نقش أمان دقيق، وختم المركز الإعلامي */
.cert { position: relative; isolation: isolate; margin: 16px; border: 1px solid color-mix(in srgb, var(--gold) 75%, transparent); border-radius: 10px; overflow: hidden; background: var(--surface); }
.cert::before { content: ""; position: absolute; inset: 5px; z-index: 3; border: 1px solid color-mix(in srgb, var(--gold) 38%, transparent); border-radius: 7px; pointer-events: none; }
.cert::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: repeating-radial-gradient(circle at 0 115%, transparent 0 7px, color-mix(in srgb, var(--gold) 13%, transparent) 7px 8px),
    repeating-radial-gradient(circle at 100% 115%, transparent 0 7px, color-mix(in srgb, var(--gold) 13%, transparent) 7px 8px);
  -webkit-mask: linear-gradient(0deg, #000, transparent 70%); mask: linear-gradient(0deg, #000, transparent 70%);
}
.cert-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 22px; background: var(--night); border-bottom: 2px solid var(--gold); }
.cert-head img { width: min(190px, 44%); height: auto; }
.cert-title { text-align: end; }
.cert-title b { display: block; font-family: var(--font-display); font-size: 1rem; font-weight: 700; line-height: 1.5; color: #e2c785; }
.cert-title small { font-family: var(--font-mono); font-size: .64rem; letter-spacing: .22em; white-space: nowrap; color: rgba(226, 199, 133, .7); }
.cert .verify-body { position: relative; }
.cert-seal { position: absolute; z-index: 4; top: 14px; inset-inline-end: 16px; width: 106px; height: 106px; color: #1b6a42; opacity: .88; transform: rotate(-12deg); pointer-events: none; mix-blend-mode: multiply; }
.cert-expired .cert-seal { color: #8a5800; }
:root[data-theme="dark"] .cert-seal { mix-blend-mode: normal; color: #8fd0ad; }
:root[data-theme="dark"] .cert-expired .cert-seal { color: #e0b25c; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .cert-seal { mix-blend-mode: normal; color: #8fd0ad; }
  :root:not([data-theme="light"]) .cert-expired .cert-seal { color: #e0b25c; }
}
.cert-micro { margin: 0 14px 12px; padding-top: 6px; overflow: hidden; white-space: nowrap; border-top: 1px solid color-mix(in srgb, var(--gold) 35%, transparent); font-size: 7px; letter-spacing: .12em; line-height: 1.6; color: color-mix(in srgb, var(--gold-ink) 75%, transparent); }
@media (max-width: 560px) {
  .cert { margin: 10px; }
  .cert-head { flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px 18px; }
  .cert-head img { width: 150px; }
  .cert-title { text-align: start; }
  .cert-title b { font-size: .92rem; }
  .cert-seal { width: 92px; height: 92px; top: 12px; }
}

@media (max-width: 960px) {
  .form-layout { grid-template-columns: 1fr; margin-top: -56px; }
  .form-aside { position: static; order: 2; }
  .stepper-card { display: none; }
}
@media (max-width: 760px) {
  .form-card .wizard-nav {
    position: sticky; bottom: 0; z-index: 5; margin: 12px calc(-1 * var(--pad)) calc(-1 * var(--pad));
    padding: 12px var(--pad) calc(12px + env(safe-area-inset-bottom));
    background: var(--surface); border-top: 1px solid var(--rule); border-radius: 0 0 var(--r-lg) var(--r-lg);
    box-shadow: 0 -12px 24px -18px rgba(0, 0, 0, .35);
  }
  .wizard-nav .grow { display: none; }
  .wizard-nav [data-next], .wizard-nav [data-submit] { flex: 1; }
  .form-progress { flex-direction: column-reverse; align-items: stretch; gap: 10px; }
}
@media (max-width: 640px) {
  .cols-2 { grid-template-columns: 1fr; }
  .person-grid { grid-template-columns: 1fr; }
  .person-grid .upload-portrait { max-width: 210px; width: 100%; }
  .review dl { grid-template-columns: 1fr; }
  .member { grid-template-columns: 30px minmax(0, 1fr) 44px; }
  .member .num { grid-row: 1; grid-column: 1; }
  .member .field:first-of-type { grid-column: 2; grid-row: 1; }
  .member .remove { grid-column: 3; grid-row: 1; }
  .member .field:last-of-type { grid-column: 2 / -1; grid-row: 2; }
  .track-form { flex-direction: column; }
  .legend { grid-template-columns: 1fr; }
  .req-top { flex-wrap: wrap; }
  .verify-body { grid-template-columns: 1fr; }
  .verify-body .arch-frame { width: 150px; }
}

/* ---------- 12. الإشعارات ---------- */
.toasts { position: fixed; inset-inline: 0; bottom: 20px; z-index: 400; display: flex; flex-direction: column; align-items: center; gap: 8px; padding-inline: 16px; pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 10px; max-width: 520px; padding: 12px 18px; border-radius: 999px;
  background: #102119; color: #f3efe6; border: 1px solid rgba(243, 239, 230, .1); box-shadow: 0 20px 44px -16px rgba(0, 0, 0, .55);
  font-size: .94rem; animation: toastIn .35s var(--ease);
}
.toast .i { width: 19px; height: 19px; }
.toast.error .i { color: #ff9b8f; }
.toast.success .i { color: #8fdcb6; }
.toast.info .i { color: var(--gold-light); }
.toast.out { animation: toastOut .25s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px); } }
.form-page .toasts { bottom: calc(96px + env(safe-area-inset-bottom)); }

/* ---------- 13. اللغات ---------- */
.lang-switch { display: flex; align-items: center; gap: 2px; }
.lang-switch a {
  min-width: 34px; padding: 6px 8px; border-radius: 999px; text-align: center;
  font-size: .86rem; font-weight: 600; color: var(--on-night-2); transition: color .2s, background-color .2s;
}
.lang-switch a:hover { color: var(--on-night); background: rgba(243, 239, 230, .08); }
.sheet-langs { display: flex; gap: 8px; margin-top: 18px; }
.sheet-langs a { flex: 1; padding: 10px 6px; text-align: center; border: 1px solid var(--night-rule); border-radius: 999px; color: var(--on-night-2); font-size: .95rem; }
.sheet-langs a[aria-current] { color: var(--gold-light); border-color: var(--gold); }
@media (max-width: 1080px) { .lang-switch { display: none; } }

/* التتبع: البريد ورقم الطلب، وفتح الباج */
.track-fields { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.track-submit { margin-top: 18px; --h: 54px; }
.unlock { display: grid; gap: 10px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--rule); }
@media (max-width: 640px) { .track-fields { grid-template-columns: 1fr; } }

/* ---------- 14. الهاتف: شريط التنقل السفلي، اختيار المسار، الشريط اللاصق، التثبيت ---------- */
.tabbar, .apply-strip, .snap-dots, .journey-dots, .preview-btn, .receipt-head, .print-sheet { display: none; }
@media (max-width: 860px) {
  .has-tabbar { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  .has-tabbar .menu-btn { display: none; }
  .has-tabbar .toasts { bottom: calc(84px + env(safe-area-inset-bottom)); }
  body:has(.install-card) .apply-strip { opacity: 0; pointer-events: none; transform: translateY(150%); }
  .tabbar {
    position: fixed; inset: auto 0 0 0; z-index: 70; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    height: calc(64px + env(safe-area-inset-bottom)); padding: 0 6px env(safe-area-inset-bottom);
    background: color-mix(in srgb, var(--night) 94%, transparent); border-top: 1px solid var(--night-rule);
    -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
  }
  .tab {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: 64px;
    color: var(--on-night-3); font-size: .7rem; font-weight: 600; line-height: 1.2; transition: color .2s; -webkit-tap-highlight-color: transparent;
  }
  .tab .i { width: 22px; height: 22px; }
  .tab.is-active { color: var(--gold-light); }
  .tab:active { color: var(--on-night); }
  /* زر «قدّم» البارز في الوسط */
  .tab-main i {
    display: grid; place-items: center; width: 52px; height: 52px; margin-top: -26px; border-radius: 50%;
    background: var(--on-night); color: #0a1a13; box-shadow: 0 12px 26px -10px rgba(0, 0, 0, .7), 0 0 0 4px var(--night);
  }
  .tab-main .i { width: 24px; height: 24px; }
  .tab-main span { color: var(--gold-light); }

  /* حالة التقديم لاصقة فوق الشريط بعد تجاوز الواجهة */
  .apply-strip {
    position: fixed; z-index: 69; inset-inline: 12px; bottom: calc(76px + env(safe-area-inset-bottom));
    display: flex; align-items: center; gap: 10px; padding: 7px; padding-inline-start: 12px; border-radius: 999px;
    background: color-mix(in srgb, var(--night-2) 94%, transparent); color: var(--on-night); border: 1px solid var(--night-rule);
    box-shadow: 0 18px 36px -18px rgba(0, 0, 0, .75); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    font-size: .8rem; text-align: start; opacity: 0; transform: translateY(150%); pointer-events: none;
    transition: transform .55s var(--ease), opacity .3s;
  }
  .apply-strip.is-visible { opacity: 1; transform: none; pointer-events: auto; }
  .apply-strip .state { padding: 2px 10px; font-size: .72rem; }
  .apply-strip .strip-date { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--on-night-2); }
  .apply-strip b { flex: none; padding: 8px 14px; border-radius: 999px; background: var(--on-night); color: #0a1a13; font-size: .8rem; }
}

/* نافذة اختيار المسار */
.apply-title { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; margin: 6px 0 16px; }
.apply-routes { display: grid; gap: 10px; }
.apply-route {
  display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 14px;
  border: 1px solid var(--night-rule); border-radius: 18px; background: rgba(243, 239, 230, .03); transition: border-color .2s;
}
.apply-route:active, .apply-route:hover { border-color: var(--gold); }
.apply-route b { display: block; font-family: var(--font-display); font-size: 1.05rem; line-height: 1.5; }
.apply-route small { display: block; color: var(--on-night-3); font-size: .8rem; line-height: 1.6; }
.apply-route .i { width: 18px; height: 18px; opacity: .6; }
.route-arch { width: 46px; height: 58px; border-radius: 50% 50% 6px 6px / 36% 36% 6px 6px; background: linear-gradient(170deg, #c9a24d, #3c3417 55%, #0a1a13); }
.route-arch.alt { background: linear-gradient(170deg, #e2c785, #8a3a1c 40%, #0a1a13); }

/* بطاقة تثبيت التطبيق */
.install-card {
  position: fixed; z-index: 72; inset-inline: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); max-width: 460px; margin-inline: auto;
  display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 14px;
  border-radius: 20px; background: var(--night-2); color: var(--on-night); border: 1px solid var(--night-rule);
  box-shadow: 0 26px 60px -24px rgba(0, 0, 0, .8); animation: installIn .55s var(--ease);
}
.install-card img { width: 46px; height: 46px; border-radius: 12px; }
.install-card b { display: block; font-size: .94rem; }
.install-card p { font-size: .8rem; color: var(--on-night-2); line-height: 1.6; }
.install-card .btn { --h: 38px; padding: 0 14px; font-size: .85rem; }
.install-card .close { position: absolute; top: 6px; inset-inline-end: 6px; width: 28px; height: 28px; }
.install-card .close .i { width: 15px; height: 15px; }
@keyframes installIn { from { opacity: 0; transform: translateY(24px); } }
.install-card { overflow: hidden; transition: opacity .3s, transform .35s var(--ease); }
.install-card.is-out { opacity: 0; transform: translateY(16px); }
/* شريط رفيع يبيّن أن البطاقة ستختفي وحدها */
.install-timer { position: absolute; inset-inline: 0; bottom: 0; height: 2px; background: var(--gold); opacity: .6; transform-origin: 100% 50%; animation: installTimer 12s linear forwards; }
[dir="ltr"] .install-timer { transform-origin: 0 50%; }
@keyframes installTimer { to { transform: scaleX(0); } }
@media (max-width: 860px) { .has-tabbar .install-card { bottom: calc(78px + env(safe-area-inset-bottom)); } }
@media (display-mode: standalone) { [data-install], .install-card { display: none !important; } }

/* البطاقات تُسحب أفقياً على الهاتف بدل رصّها عمودياً */
@media (max-width: 700px) {
  .bento[data-snap] {
    display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
    padding-bottom: 4px; scrollbar-width: none; overscroll-behavior-x: contain;
  }
  .bento[data-snap] > .tile { flex: 0 0 88%; scroll-snap-align: center; }
  .bento .pass-tilt { width: 150px; }
  .tile-pass .pass-stage { cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .tile-pass { gap: 18px; }
}
@media (max-width: 860px) {
  .doors[data-snap] {
    display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: calc(-1 * var(--gutter));
    padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); scrollbar-width: none; overscroll-behavior-x: contain;
  }
  .doors[data-snap] > .door { flex: 0 0 86%; scroll-snap-align: center; }
  [data-snap]::-webkit-scrollbar { display: none; }
  .snap-dots, .journey-dots { display: flex; justify-content: center; gap: 8px; margin-top: 18px; }
  .snap-dots button, .journey-dots button { width: 7px; height: 7px; border-radius: 99px; background: var(--rule-2); transition: width .35s var(--ease), background-color .3s; }
  .snap-dots button.is-active, .journey-dots button.is-active { width: 24px; background: var(--gold); }
  /* خطوات الرحلة تصير تعليقاً واحداً تحت الهاتف يتبدّل مع شاشاته */
  .journey.is-animated .steps-line, .journey.is-animated .step-dot { display: none; }
  .journey.is-animated .step:not(.is-current) { display: none; }
  .journey.is-animated .step { padding: 0; text-align: center; opacity: 1; animation: stepIn .5s var(--ease); }
  .journey.is-animated .step p { margin-inline: auto; }
  .journey-dots { display: flex; }
}
@keyframes stepIn { from { opacity: 0; transform: translateY(8px); } }
@media (min-width: 701px) { .bento + .snap-dots { display: none !important; } }
.pass-tilt.is-tilting .pass::after { opacity: 1; }

/* ---------- 15. الكمبيوتر: الشاشات العريضة، فهرس الأقسام، الإضاءة مع المؤشر ---------- */
@media (min-width: 1680px) {
  :root { --container: 1480px; }
  html { font-size: 106.25%; }
  .hero { padding-bottom: clamp(300px, 17vw, 440px); }
  .hero-drawing { height: clamp(260px, 14vw, 360px); }
}
@media (min-width: 2200px) {
  :root { --container: 1640px; }
  html { font-size: 115%; }
}

.chapters { display: none; }
@media (min-width: 1280px) {
  .chapters {
    position: fixed; z-index: 55; top: 50%; inset-inline-end: 20px; transform: translateY(-50%);
    display: grid; gap: 2px; padding: 8px 6px; border-radius: 16px; color: var(--ink); transition: color .3s, background-color .3s;
  }
  .chapters.on-dark { color: var(--on-night); }
  .chapters:hover { background: color-mix(in srgb, var(--paper) 88%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
  .chapters.on-dark:hover { background: color-mix(in srgb, var(--night) 82%, transparent); }
  .chapters a { display: flex; align-items: center; justify-content: flex-end; gap: 12px; height: 24px; padding-inline: 6px; }
  .chapters a::after { content: ""; flex: none; width: 6px; height: 6px; border-radius: 6px; background: currentColor; opacity: .35; transition: height .35s var(--ease), opacity .3s, background-color .3s; }
  .chapters a:hover::after { opacity: .8; }
  .chapters a.is-active::after { height: 20px; opacity: 1; background: var(--gold); }
  .chapters span { font-size: .78rem; font-weight: 600; white-space: nowrap; opacity: 0; transition: opacity .3s; }
  .chapters:hover span, .chapters a:focus-visible span { opacity: 1; }
}

.door-media, .door-body { position: relative; }
.door-body { isolation: isolate; }
/* إطار القوس الذهبي يُرسم حول صورة الباب عند المرور */
.arch-trace { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.arch-trace path { fill: none; stroke: var(--gold-light); stroke-width: 1.4; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.2s var(--ease); }
.door:hover .arch-trace path, .door:focus-within .arch-trace path { stroke-dashoffset: 0; }
@media (pointer: fine) {
  .tile::after, .door-body::after {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit; opacity: 0; transition: opacity .45s;
    background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(201, 162, 77, .14), transparent 62%);
  }
  .tile-event::after { background: radial-gradient(440px circle at var(--mx, 50%) var(--my, 50%), rgba(226, 199, 133, .16), transparent 60%); }
  .tile:hover::after, .door:hover .door-body::after { opacity: 1; }
}

/* ---------- 16. معاينة الباج الحيّة في الاستمارة ---------- */
.form-aside { align-self: stretch; display: flex; flex-direction: column; gap: 16px; }
.aside-sticky { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 16px; }
.preview-pass { width: 152px; margin: 2px auto 0; }
.help-card summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 0; cursor: pointer; list-style: none; }
.help-card summary::-webkit-details-marker { display: none; }
.help-card summary .plus { width: 12px; height: 12px; margin: 0; color: var(--ink-3); }
.help-card[open] summary { margin-bottom: 18px; }
.help-card[open] .plus { transform: rotate(45deg); }
.stepper-card .stepper li { padding-bottom: 14px; }
/* على الشاشات القصيرة يكفي شريط التقدّم أعلى الاستمارة، فتبقى المعاينة كاملة */
@media (min-width: 961px) and (max-height: 860px) { .aside-sticky .stepper-card { display: none; } }
.preview-pass .pass { box-shadow: 0 24px 44px -26px rgba(16, 24, 20, .55); }
.preview-note { margin-top: 14px; font-size: .8rem; line-height: 1.6; text-align: center; color: var(--ink-3); }
.pass-text { top: 51%; inset-inline: 7%; display: none; text-align: center; }
.pass.is-filled .pass-bars { display: none; }
.pass.is-filled .pass-text { display: grid; gap: .6cqw; }
.pass-name { font-family: var(--font-display); font-weight: 700; font-size: 6.6cqw; line-height: 1.45; color: #121a16; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pass-name.is-long { font-size: 5cqw; }
.pass-role { font-size: 3.5cqw; color: #46514b; }
.pass-event { margin-top: 3cqw; font-size: 3cqw; font-weight: 600; line-height: 1.55; color: #7a581b; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.preview-dialog { width: min(340px, calc(100% - 32px)); }
.preview-dialog .preview-pass { width: min(230px, 66vw); margin: 4px auto; }
@media (max-width: 960px) {
  .preview-card { display: none; }
  .aside-sticky { position: static; }
  .preview-btn {
    display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px; margin-bottom: 18px;
    border-radius: 999px; border: 1px solid var(--rule-2); background: var(--surface-2); color: var(--ink); font-size: .86rem; font-weight: 600;
  }
  .preview-btn .i { width: 16px; height: 16px; color: var(--gold-ink); }
}

/* ---------- 17. الطباعة: الباج ووصل الاستلام ---------- */
@media print {
  .tabbar, .apply-strip, .chapters, .install-card, .preview-btn, .state-actions, .check-draw, .success-badge, .form-page .page-hero, .form-page .form-aside, .hero-expand, .vf, .scene-canvas { display: none !important; }
  .receipt-head { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-bottom: 22px; padding-bottom: 16px; border-bottom: 1px solid #bbb; }
  .receipt-head img { width: 220px; height: auto; filter: brightness(0); }
  .receipt-head b { font-family: var(--font-display); font-size: 17pt; color: #000; }
  .receipt-head small { font-size: 10pt; color: #444; }
  .form-page .state-card { max-width: 160mm; margin: 0 auto; border: 1px solid #bbb; box-shadow: none; }
  body.is-printing > :not(.print-sheet) { display: none !important; }
  body.is-printing .print-sheet { display: grid !important; place-items: center; min-height: 90vh; }
  .print-sheet img { width: 64mm; height: auto; }
  @page { margin: 12mm; }
}

/* ---------- 18. القوس يتّسع حتى يملأ الشاشة (الكمبيوتر) ---------- */
.hero-expand { position: absolute; z-index: 3; overflow: hidden; background: var(--night-3); will-change: clip-path; }
.hero-expand img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-expand .hx-a { transform-origin: 50% 40%; }
/* الصورة الثانية مقصوصة من أعلاها قليلاً لإخفاء علامة المصدر المائية */
.hero-expand .hx-b { opacity: 0; object-position: 50% 100%; transform: scale(1.1); transform-origin: 50% 100%; }
.hero-expand::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10, 26, 19, .6), rgba(10, 26, 19, 0) 32%); pointer-events: none; }
.hx-cap {
  position: absolute; inset-inline: 0; bottom: 40px; z-index: 2; margin: 0 auto; opacity: 0;
  display: grid; gap: 2px; padding-inline-start: calc(var(--gutter) + 30px); color: var(--on-night-2); font-size: .9rem;
}
.hx-cap::before { content: ""; position: absolute; inset-inline-start: var(--gutter); top: .85em; width: 18px; height: 1px; background: var(--gold); }
.hx-cap .meta { font-family: var(--font-mono); font-size: .74rem; color: var(--on-night-3); }

/* ---------- 19. الساعة الحيّة في مشهد العتبة ---------- */
.scene-clock { display: flex; align-items: center; gap: 8px; margin: -6px 0 20px; font-size: .84rem; color: var(--on-night-2); }
.scene-clock b { font-weight: 500; color: var(--gold-light); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #9fdcbb; box-shadow: 0 0 0 0 rgba(159, 220, 187, .5); animation: pulse 2s ease-in-out infinite; flex: none; }

/* ---------- 20. عدسة الكاميرا على صورة الصحن ---------- */
.vf { position: absolute; inset: clamp(16px, 3vw, 36px); z-index: 1; pointer-events: none; color: rgba(255, 255, 255, .88); }
.vf-corner { position: absolute; width: 34px; height: 34px; border: 0 solid currentColor; }
.vf-corner.tl { top: 0; left: 0; border-top-width: 2px; border-left-width: 2px; }
.vf-corner.tr { top: 0; right: 0; border-top-width: 2px; border-right-width: 2px; }
.vf-corner.bl { bottom: 0; left: 0; border-bottom-width: 2px; border-left-width: 2px; }
.vf-corner.br { bottom: 0; right: 0; border-bottom-width: 2px; border-right-width: 2px; }
.vf-rec, .vf-meta { position: absolute; top: 14px; direction: ltr; font-size: .78rem; letter-spacing: .06em; text-shadow: 0 1px 6px rgba(0, 0, 0, .6); }
.vf-rec { left: 50px; display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-weight: 500; }
.vf-rec i { width: 9px; height: 9px; border-radius: 50%; background: #ff3b30; animation: rec 1.2s steps(1) infinite; }
.vf-rec b { font-weight: 400; color: rgba(255, 255, 255, .75); }
.vf-meta { right: 50px; color: rgba(255, 255, 255, .7); }
@keyframes rec { 50% { opacity: 0; } }
.vf-focus { position: absolute; left: 50%; top: 46%; width: clamp(90px, 12vw, 150px); aspect-ratio: 4 / 3; margin: calc(clamp(90px, 12vw, 150px) * -.375) 0 0 calc(clamp(90px, 12vw, 150px) * -.5); }
.vf-focus { color: rgba(255, 255, 255, .85); transition: color .3s; background:
  linear-gradient(currentColor, currentColor) 0 0 / 18px 2px, linear-gradient(currentColor, currentColor) 0 0 / 2px 18px,
  linear-gradient(currentColor, currentColor) 100% 0 / 18px 2px, linear-gradient(currentColor, currentColor) 100% 0 / 2px 18px,
  linear-gradient(currentColor, currentColor) 0 100% / 18px 2px, linear-gradient(currentColor, currentColor) 0 100% / 2px 18px,
  linear-gradient(currentColor, currentColor) 100% 100% / 18px 2px, linear-gradient(currentColor, currentColor) 100% 100% / 2px 18px;
  background-repeat: no-repeat; }
.vf-focus.is-locked { color: #6fe3a0; }
@media (max-width: 700px) { .vf-meta { display: none; } .vf-rec { left: 44px; font-size: .7rem; } }

/* ---------- 21. أرقام المناسبة ---------- */
.stats {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 16px;
  border: 1px solid var(--rule); border-radius: var(--r-xl); background: var(--surface); overflow: hidden;
}
.stats > div { display: flex; flex-direction: column-reverse; gap: 4px; padding: clamp(18px, 2.4vw, 28px); }
.stats > div + div { border-inline-start: 1px solid var(--rule); }
.stats dd { font-size: clamp(2.2rem, 4.4vw, 3.4rem); font-weight: 500; line-height: 1.1; color: var(--ink); }
.stats dt { font-size: .9rem; color: var(--ink-3); }
.stats-note { margin-top: 10px; padding-inline: 6px; font-size: .8rem; color: var(--ink-3); }
@media (max-width: 560px) { .stats > div { padding: 16px 12px; } .stats dd { font-size: 1.9rem; } }

/* ---------- 22. أفق التذييل يضيء ---------- */
.skyline-lights { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 0 5px rgba(255, 190, 90, .75)); }
.skyline-lights > * { fill: #ffcf7a; opacity: 0; transition: opacity 1.1s ease var(--d, 0ms); }
.skyline-lights .l-niche { fill: #f2b85e; }
.footer-skyline.is-lit .skyline-lights > * { opacity: .92; }
.footer-skyline.is-lit .skyline-lights .l-niche { opacity: .55; }
.footer-skyline.is-lit .skyline-lights .l-door { opacity: 1; }

/* ---------- 23. مظهر المناسبة: لمسة لونية في الواجهة ---------- */
[data-mood="mourning"] .hero { background: radial-gradient(55% 65% at 22% 34%, rgba(150, 40, 34, .16), transparent 70%), var(--night); }
[data-mood="mourning"] .scene-media img { filter: saturate(.72) contrast(1.06) brightness(.92); }
[data-mood="celebration"] .scene-media img { filter: saturate(1.06) contrast(1.04); }
[data-mood="celebration"] .hero { background: radial-gradient(55% 65% at 22% 34%, rgba(61, 200, 120, .14), transparent 70%), var(--night); }
[dir="ltr"][data-mood] .hero { background-position: 100% 0; }

/* ---------- 24. الباج المعلّق بشريط العنق ---------- */
.ly-stage { position: relative; height: clamp(440px, 64svh, 600px); overflow: hidden; touch-action: none; border-radius: 12px; background: radial-gradient(70% 55% at 50% 60%, rgba(201, 162, 77, .12), transparent 70%), var(--surface-2); }
.ly-strap { position: absolute; inset: 0; pointer-events: none; }
.ly-card { position: absolute; top: 0; left: 0; transform-origin: 50% 0; cursor: grab; border-radius: 12px; box-shadow: 0 30px 50px -26px rgba(0, 0, 0, .55); will-change: transform; }
.ly-card.is-grabbing { cursor: grabbing; }
.ly-card canvas { display: block; width: 100%; height: 100%; border-radius: 12px; border: 0 !important; }
.ly-card::before { content: ""; position: absolute; top: 9px; left: 50%; z-index: 1; width: 22%; height: 5px; transform: translateX(-50%); border-radius: 4px; background: rgba(0, 0, 0, .55); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .6); }
.ly-hint { position: absolute; bottom: 10px; inset-inline: 0; text-align: center; font-size: .8rem; color: var(--ink-3); pointer-events: none; }
.badge-dialog { width: min(460px, calc(100% - 24px)); }
@media (max-width: 560px) { .badge-dialog [data-act="print"] { display: none; } }

/* ---------- 25. التحقق الحيّ ---------- */
.verify-live { display: flex; align-items: center; gap: 10px; padding: 10px 24px; border-bottom: 1px solid var(--rule); font-size: .88rem; color: var(--ink-2); background: var(--surface-2); }
.verify-live b { margin-inline-start: auto; font-weight: 500; font-size: 1rem; color: var(--ink); }
.verify-body.is-live .arch::after {
  content: ""; position: absolute; inset: -20% -60%; z-index: 2; pointer-events: none;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 236, 190, .55) 48%, rgba(201, 162, 77, .25) 52%, transparent 62%);
  animation: sheen 2.8s linear infinite;
}
@keyframes sheen { from { transform: translateX(-60%); } to { transform: translateX(60%); } }

/* ---------- 27. مقدمة الزيارة الأولى ---------- */
.intro { display: none; }
.intro-on .intro {
  position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(60% 50% at 50% 60%, rgba(201, 162, 77, .12), transparent 70%), var(--night); color: var(--gold);
  border-bottom: 1px solid rgba(201, 162, 77, .5); animation: intro-out .6s ease 2.6s forwards;
}
.intro-inner { display: grid; justify-items: center; gap: 24px; width: min(880px, 100%); }
.intro-shrine { width: 100%; height: auto; opacity: 0; animation: intro-in .6s ease .2s forwards; }
.intro-shrine path, .intro-shrine circle { stroke-width: 1.2; }
.intro-name { display: flex; align-items: center; gap: 14px; width: 100%; font-size: .95rem; letter-spacing: .02em; color: rgba(226, 199, 133, .82); }
.intro-name::before, .intro-name::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(201, 162, 77, .55), transparent); }
@keyframes intro-in { to { opacity: 1; } }
@keyframes intro-out { to { opacity: 0; visibility: hidden; } }

/* ---------- 28. نسخ رقم الطلب ---------- */
.ref-copy {
  position: absolute; top: 50%; inset-inline-start: -52px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--rule-2); background: var(--surface); color: var(--ink-2); transform: translateY(-50%);
  transition: border-color var(--dur-1), color var(--dur-1), background-color var(--dur-1), transform var(--dur-2) var(--ease);
}
.ref-copy:hover { border-color: var(--gold); color: var(--ink); }
.ref-copy:active { transform: translateY(-50%) scale(.92); }
.ref-copy.is-done { border-color: var(--ok); background: var(--ok-soft); color: var(--ok); }
.ref-copy .i { width: 17px; height: 17px; }
@media (max-width: 480px) { .ref-copy { position: static; transform: none; margin: 8px auto 0; } .ref-copy:active { transform: scale(.92); } }
@media print { .ref-copy { display: none !important; } }

/* ---------- 29. تفاعلات دقيقة موحّدة: نفس المنحنى والمدد في كل العناصر ---------- */
:root { --dur-1: .18s; --dur-2: .32s; --dur-3: .55s; }
.btn .i { transition: transform var(--dur-2) var(--ease); }
.btn:hover .i { transform: translateY(-1px); }
.btn:active { transition-duration: .08s; }
.icon-btn { transition: background-color var(--dur-1), transform var(--dur-2) var(--ease); }
.icon-btn:active { transform: scale(.92); }
.chip span { transition: background-color var(--dur-1), border-color var(--dur-1), color var(--dur-1), transform var(--dur-2) var(--ease); }
.chip:active span { transform: scale(.97); }
.input, .select, .textarea { transition: border-color var(--dur-1), box-shadow var(--dur-2) var(--ease), background-color var(--dur-1); }
.link { transition: text-decoration-thickness var(--dur-1), text-underline-offset var(--dur-2) var(--ease); }
.link:hover { text-underline-offset: 4px; }
.upload-cam, .tab, .stepper button { transition: border-color var(--dur-1), color var(--dur-1), background-color var(--dur-1), transform var(--dur-2) var(--ease); }
.upload-cam:active, .tab:active, .stepper button:active { transform: scale(.97); }
.field.is-valid .input, .field.is-valid .select { border-color: color-mix(in srgb, var(--ok) 45%, var(--rule-2)); }
@media (prefers-reduced-motion: reduce) {
  .btn:hover .i, .icon-btn:active, .chip:active span, .upload-cam:active, .tab:active, .stepper button:active, .ref-copy:active { transform: none; }
}

/* ---------- 26. انتقالات مترابطة ---------- */
@media (min-width: 961px) { .preview-pass { view-transition-name: kz-pass; } }
[data-page="track"] .track-card { view-transition-name: kz-track; }
::view-transition-group(kz-pass), ::view-transition-group(kz-track) { animation-duration: .65s; animation-timing-function: cubic-bezier(.16, 1, .3, 1); }
::view-transition-old(kz-track), ::view-transition-new(kz-track) { height: 100%; object-fit: cover; }

/* الاتجاه من اليسار إلى اليمين (الإنجليزية) */
[dir="ltr"] .select { background-position: right 14px center; }
[dir="ltr"] .date-group .select { background-position: right 10px center; }
[dir="ltr"] .btn:hover .arrow { transform: translateX(5px); }
[dir="ltr"] .steps-progress, [dir="ltr"] .header-progress { transform-origin: 0% 50%; }
[dir="ltr"] .hero { background: radial-gradient(55% 65% at 78% 34%, rgba(201, 162, 77, .14), transparent 70%), var(--night); }
[dir="ltr"] .scene-media::before {
  background: linear-gradient(to right, rgba(6, 15, 11, .92) 0%, rgba(6, 15, 11, .74) 34%, rgba(6, 15, 11, .28) 66%, rgba(6, 15, 11, .1) 100%),
    linear-gradient(to top, rgba(6, 15, 11, .8), rgba(6, 15, 11, 0) 34%);
}
[dir="ltr"] .page-hero::after {
  background: linear-gradient(to right, rgba(10, 26, 19, .97) 28%, rgba(10, 26, 19, .55)), linear-gradient(to top, var(--night), transparent 55%);
}
[dir="ltr"] .input.ltr, [dir="ltr"] .upload-bar .name { text-align: left; }
[dir="ltr"] .dial select { direction: ltr; }
[dir="ltr"] .kicker, [dir="ltr"] .eyebrow { letter-spacing: .04em; }
[dir="ltr"] .caption .meta { letter-spacing: .02em; }
/* الحروف اللاتينية تحتاج تباعد أسطر أقل من العربية */
[dir="ltr"] .hero-title { grid-column: 1 / 9; letter-spacing: -.02em; line-height: 1.04; }
[dir="ltr"] .page-title, [dir="ltr"] .section-title, [dir="ltr"] .door-title, [dir="ltr"] .tile-title { line-height: 1.12; }
@media (max-width: 860px) { [dir="ltr"] .steps-progress { transform-origin: 50% 0; } }

/* الحالة الأولية للحركة — تكشفها GSAP */
.anim [data-hero], .anim [data-reveal], .anim [data-split], .anim .hero-drawing, .anim .door-media { visibility: hidden; }

/* انتقالات الصفحات: صورة المسار تتحوّل إلى رأس الاستمارة */
@view-transition { navigation: auto; }
::view-transition-group(route-creator), ::view-transition-group(route-channel) { animation-duration: .6s; animation-timing-function: cubic-bezier(.16, 1, .3, 1); }
/* الصفحة الجديدة تنكشف من قوس مدبّب يتسع من أسفل الشاشة، كأن الزائر يدخل من باب */
::view-transition-old(root) { animation: vt-recede .7s cubic-bezier(.7, 0, .2, 1) both; }
::view-transition-new(root) { animation: vt-arch .7s cubic-bezier(.7, 0, .2, 1) both; }
@keyframes vt-recede { to { opacity: .6; transform: scale(.985); } }
@keyframes vt-arch {
  from { clip-path: polygon(46.0% 104.0%, 46.0% 96.5%, 46.1% 95.8%, 46.3% 95.1%, 46.6% 94.5%, 46.9% 94.0%, 47.4% 93.5%, 47.9% 93.1%, 48.4% 92.7%, 49.0% 92.4%, 49.5% 92.2%, 50.0% 92.0%, 50.5% 92.2%, 51.0% 92.4%, 51.6% 92.7%, 52.1% 93.1%, 52.6% 93.5%, 53.1% 94.0%, 53.4% 94.5%, 53.7% 95.1%, 53.9% 95.8%, 54.0% 96.5%, 54.0% 104.0%); }
  to { clip-path: polygon(-100.0% 104.0%, -100.0% -58.0%, -97.4% -84.7%, -90.2% -109.3%, -78.9% -131.9%, -64.5% -152.2%, -47.5% -170.3%, -28.7% -186.2%, -8.9% -199.8%, 11.4% -210.9%, 31.2% -219.7%, 50.0% -226.0%, 68.8% -219.7%, 88.6% -210.9%, 108.9% -199.8%, 128.7% -186.2%, 147.5% -170.3%, 164.5% -152.2%, 178.9% -131.9%, 190.2% -109.3%, 197.4% -84.7%, 200.0% -58.0%, 200.0% 104.0%); }
}

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

@media print {
  .site-header, .site-footer, .form-aside, .wizard-nav, .toasts, .page-hero-bg, .hero-drawing { display: none !important; }
  .page-hero { padding: 16px 0; background: none; color: #000; }
  .form-layout, .narrow { margin: 0; display: block; }
  .card { box-shadow: none; }
}
