/* تطبيق بني حسين v2: ليل الديوانية — كحلي ليلي + رملي + أحمر السدو */
/* خط Bahij Muna لكل التطبيق (طلب العميل 12 نوفمبر، اختاره من تطبيق الأندلسي وبعته بنفسه)، والأرقام إنجليزي بخط FT */
@font-face { font-family: "NS"; src: url("fonts/muna-regular.woff2") format("woff2"); font-weight: 300 500; font-display: swap; size-adjust: 140%; unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; }
@font-face { font-family: "NS"; src: url("fonts/muna-bold.woff2") format("woff2"); font-weight: 600; font-display: swap; size-adjust: 140%; unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; }
@font-face { font-family: "NS"; src: url("fonts/muna-black.woff2") format("woff2"); font-weight: 700 900; font-display: swap; size-adjust: 140%; unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; }
@font-face { font-family: "FT"; src: url("fonts/futura-book.woff2") format("woff2"); font-weight: 300 400; font-display: swap; }
@font-face { font-family: "FT"; src: url("fonts/futura-medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "FT"; src: url("fonts/futura-demi.woff2") format("woff2"); font-weight: 600 800; font-display: swap; }

:root {
  --bg: #f4eee3;
  --surface: #fffcf6;
  --surface-2: #ece4d5;
  --line: #e2d7c3;
  --line-strong: #cbbb9f;
  --text: #1b1711;
  --muted: #6e6555;
  --navy: #0e1b3a;
  --navy-2: #182a56;
  --on-navy: #f4eee3;
  --on-navy-muted: #b9b6ad;
  --accent: #b1302a;
  --btn: #0e1b3a;
  --btn-ink: #f4eee3;
  --focus: #b1302a;
  --r: 6px;
  --top-h: 64px;
  --sadu: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='10' viewBox='0 0 16 10'%3E%3Crect width='16' height='10' fill='%23f1e7d4'/%3E%3Cpath d='M0 0h8L4 4zM8 10h8l-4-4z' fill='%23161310'/%3E%3Cpath d='M8 0h8l-4 4zM0 10h8L4 6z' fill='%23b1302a'/%3E%3C/svg%3E");
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0a1226; --surface: #111b35; --surface-2: #0d162d; --line: #1f2b4b; --line-strong: #2e3c63;
  --text: #efe8da; --muted: #a29d90; --navy: #060c1d; --navy-2: #0f1a36; --btn: #efe8da; --btn-ink: #0a1226; --accent: #df4a40; --focus: #df4a40;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a1226; --surface: #111b35; --surface-2: #0d162d; --line: #1f2b4b; --line-strong: #2e3c63;
    --text: #efe8da; --muted: #a29d90; --navy: #060c1d; --navy-2: #0f1a36; --btn: #efe8da; --btn-ink: #0a1226; --accent: #df4a40; --focus: #df4a40;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: "NS", "FT", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  font-weight: 500; font-size: 15px; line-height: 1.65;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
img, video { display: block; max-width: 100%; }
.num, bdi.num { font-family: "FT", "NS", sans-serif; font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.sr { position: absolute; top: 0; right: 0; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sadu { height: 10px; background: var(--sadu) repeat-x right center / auto 100%; }

/* ===== الهيكل ===== */
.stage { min-height: 100dvh; }
.side { display: none; }
.app { position: relative; overflow-x: clip; min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); }

@media (min-width: 900px) {
  body { background: #070d1c; }
  .stage {
    display: grid; grid-template-columns: minmax(300px, 460px) 430px; justify-content: center; align-items: center; gap: 80px; padding: 32px;
    background: linear-gradient(90deg, rgba(7, 13, 28, 0.25), rgba(7, 13, 28, 0.88) 70%), url("media/dusk.webp") center / cover no-repeat;
  }
  .side { display: block; color: #f4eee3; }
  .app {
    height: min(900px, calc(100dvh - 64px)); min-height: 0; overflow-y: auto; overscroll-behavior: contain;
    border: 1px solid rgba(244, 238, 227, 0.22); border-radius: 36px; clip-path: inset(0 round 36px);
    box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.8); scrollbar-width: none;
  }
  .app::-webkit-scrollbar { display: none; }
}
.side .sadu { width: 160px; margin-bottom: 26px; }
.side h1 { font-size: 40px; line-height: 1.25; margin: 0 0 12px; font-weight: 700; }
.side .lead { margin: 0 0 32px; color: #c9c3b6; font-size: 17px; max-width: 30ch; }
.side h2 { font-size: 13px; color: #c9c3b6; font-weight: 500; margin: 0 0 8px; }
.side ol { list-style: none; margin: 0 0 32px; padding: 0; border-top: 1px solid rgba(244, 238, 227, 0.16); }
.side li { display: grid; grid-template-columns: 34px 1fr auto; gap: 8px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid rgba(244, 238, 227, 0.16); font-size: 15px; }
.side li .num { color: #c9c3b6; }
.side li em { font-style: normal; font-size: 12px; color: #c9c3b6; }
.side li.on em { color: #f4eee3; background: var(--accent); padding: 1px 8px; border-radius: 4px; }
.side .admin-link { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; border: 1px solid rgba(244, 238, 227, 0.3); padding: 11px 18px; border-radius: var(--r); color: #f4eee3; }


/* ===== الرأس ===== */
.top { position: sticky; top: 0; z-index: 20; padding-top: env(safe-area-inset-top); background: var(--bg); border-bottom: 1px solid var(--line); transition: background 0.3s, border-color 0.3s; }
.top-row { height: var(--top-h); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 18px; }
.brand { text-decoration: none; line-height: 1.2; }
.brand b { display: block; font-size: 20px; font-weight: 700; }
.brand small { display: block; font-size: 12px; color: var(--muted); }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r); cursor: pointer; color: var(--text); }
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn .i-sun { display: none; }
:root[data-theme="dark"] .icon-btn .i-sun { display: block; }
:root[data-theme="dark"] .icon-btn .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-btn .i-sun { display: block; }
  :root:not([data-theme="light"]) .icon-btn .i-moon { display: none; }
}
.top-acts { display: flex; align-items: center; gap: 8px; }
.add-btn { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border-radius: var(--r); background: var(--accent); color: #fff; text-decoration: none; font-size: 14px; font-weight: 700; }
.add-btn svg { width: 16px; height: 16px; }
/* فوق الصورة: الرأس شفاف */
.app.on-hero .top:not(.solid) { background: transparent; border-color: transparent; }
.app.on-hero .top:not(.solid) .brand, .app.on-hero .top:not(.solid) .brand small { color: #f4eee3; }
.app.on-hero .top:not(.solid) .icon-btn { background: rgba(10, 18, 38, 0.35); border-color: rgba(244, 238, 227, 0.25); color: #f4eee3; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }

main { flex: 1; }

/* ===== الهيرو ===== */
.hero { position: relative; margin-top: calc(-1 * (var(--top-h) + env(safe-area-inset-top) + 1px)); height: clamp(540px, 78svh, 700px); background: #0a1226 url("media/hero.webp") center / cover; color: #f4eee3; overflow: hidden; }
.hero video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.2s ease; }
.hero video.on { opacity: 1; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 14, 30, 0.55) 0%, rgba(8, 14, 30, 0) 22%, rgba(8, 14, 30, 0.1) 45%, rgba(8, 14, 30, 0.92) 88%); }
.hero-in { position: absolute; inset: auto 0 0 0; z-index: 2; padding: 0 20px 30px; }
.hero .when { font-size: 13.5px; color: #d9d2c4; margin: 0 0 6px; }
.hero h1 { font-size: 36px; line-height: 1.25; margin: 0 0 8px; font-weight: 700; }
.hero .where { margin: -4px 0 10px; font-size: 14px; color: #e8dfcf; }
.hero .live { display: flex; align-items: baseline; gap: 8px; font-size: 15px; color: #e9e2d5; margin: 0 0 18px; }
.hero .live b { font-family: "FT", "NS", sans-serif; font-size: 24px; color: #fff; font-weight: 600; }
.hero .cta { display: flex; gap: 8px; }
.hero .sadu { position: absolute; inset: auto 0 0 0; z-index: 3; }

/* ===== الأزرار ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 16px; border-radius: var(--r); font-size: 15px; font-weight: 700; text-decoration: none; cursor: pointer; border: 1px solid var(--btn); background: var(--btn); color: var(--btn-ink); white-space: nowrap; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn.line { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn.light { background: #f4eee3; color: #0e1b3a; border-color: #f4eee3; }
.btn.glass { background: rgba(244, 238, 227, 0.1); color: #f4eee3; border-color: rgba(244, 238, 227, 0.35); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.btn.grow { flex: 1; }
.btn[aria-disabled="true"] { border-color: var(--line); color: var(--muted); background: var(--surface-2); pointer-events: none; }
.btn:active { opacity: 0.85; }
.mini { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 12px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r); font-size: 13.5px; cursor: pointer; text-decoration: none; color: var(--text); }
.mini svg { width: 16px; height: 16px; flex: none; }
.mini[aria-pressed="true"] { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.mini[aria-pressed="true"] svg { fill: currentColor; }

/* ===== عناوين الأقسام ===== */
.sec { padding: 30px 0 0; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 0 18px; margin-bottom: 14px; }
.sec-head h2 { margin: 0; font-size: 21px; font-weight: 700; line-height: 1.35; }
.sec-head p { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }
.sec-head a { font-size: 13.5px; color: var(--accent); text-decoration: none; white-space: nowrap; }

/* شريط أفقي من البطاقات */
.rail { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 18px; padding: 2px 18px 6px; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.tile { flex: 0 0 80%; scroll-snap-align: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; }
.tile > a { text-decoration: none; display: block; }
.tile .ph { position: relative; aspect-ratio: 16 / 10; background: var(--surface-2) center / cover; }
.tile .ph .tag { position: absolute; top: 10px; right: 10px; }
.tile .tb { padding: 12px 14px 4px; display: grid; gap: 1px; }
.tile .tb b { font-size: 16.5px; line-height: 1.4; }
.tile .tb span { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .acts { padding: 10px 14px 14px; }
.tile .btn { height: 42px; font-size: 14px; }
.tag { display: inline-block; font-size: 12px; line-height: 1; padding: 6px 8px; border-radius: 4px; background: rgba(10, 18, 38, 0.72); color: #f4eee3; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.tag.red { background: var(--accent); color: #fff; }

/* ===== كتلة الأسبوع (كحلي) ===== */
.week { margin-top: 32px; background: var(--navy); color: var(--on-navy); padding: 28px 18px 26px; }
.week h2 { margin: 0; font-size: 21px; }
.week p { margin: 2px 0 16px; color: var(--on-navy-muted); font-size: 13.5px; }
.wk { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.wk a { display: flex; flex-direction: column; justify-content: space-between; gap: 6px; min-height: 80px; padding: 10px 10px 9px; border: 1px solid rgba(244, 238, 227, 0.16); border-radius: var(--r); text-decoration: none; background: rgba(244, 238, 227, 0.04); }
.wk a b { font-size: 14px; }
.wk a .num { font-size: 26px; font-weight: 600; line-height: 1; }
.wk a small { font-size: 11.5px; color: var(--on-navy-muted); }
.wk a.today { border-color: #b1302a; background: rgba(177, 48, 42, 0.2); }
.wk a.today small { color: #f4eee3; }

/* آية الصلة */
.verse { position: relative; background: var(--navy-2) url("media/sadu.webp") center / 420px; color: #f4eee3; overflow: hidden; }
.verse::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14, 27, 58, 0.94), rgba(14, 27, 58, 0.86)); }
.verse > div { position: relative; padding: 40px 22px 38px; text-align: center; }
.verse q { display: block; font-size: 22px; line-height: 1.75; font-weight: 700; quotes: none; }
.verse small { display: block; margin-top: 8px; color: #c9c3b6; font-size: 13px; }

.near { margin: 26px 18px 0; display: grid; grid-template-columns: 104px 1fr auto; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; text-decoration: none; cursor: pointer; width: calc(100% - 36px); padding: 0; text-align: right; }
.near .ph { align-self: stretch; background: center / cover; min-height: 96px; }
.near .nt { padding: 12px 14px; display: grid; gap: 2px; }
.near b { font-size: 16px; }
.near span { color: var(--muted); font-size: 13px; }
.near .chev { margin-left: 14px; }

.foot { padding: 24px 18px 6px; color: var(--muted); font-size: 12.5px; text-align: center; }

/* ===== شاشة الديوانيات ===== */
.page-hero { position: relative; margin-top: calc(-1 * (var(--top-h) + env(safe-area-inset-top) + 1px)); height: calc(196px + var(--top-h)); background: #0a1226 center 60% / cover; color: #f4eee3; }
.page-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 14, 30, 0.6), rgba(8, 14, 30, 0.2) 40%, rgba(8, 14, 30, 0.9)); }
.page-hero .ph-in { position: absolute; inset: auto 0 0; z-index: 2; padding: 0 18px 20px; }
.page-hero h1 { margin: 0; font-size: 30px; line-height: 1.3; }
.page-hero p { margin: 2px 0 0; color: #d9d2c4; font-size: 14px; }
.page-hero .sadu { position: absolute; inset: auto 0 0; z-index: 3; height: 6px; }

.days { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 16px 18px 0; }
.days.scroll { display: flex; overflow-x: auto; scrollbar-width: none; }
.days.scroll::-webkit-scrollbar { display: none; }
.days.scroll .day { flex: 0 0 auto; min-width: 74px; }
.day { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 58px; padding: 6px 4px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r); text-decoration: none; line-height: 1.35; position: relative; cursor: pointer; }
.day b { font-size: 14.5px; font-weight: 700; }
.day small { font-size: 12px; color: var(--muted); }
.day.today::before { content: ""; position: absolute; top: -1px; left: 12px; right: 12px; height: 3px; background: var(--accent); border-radius: 0 0 2px 2px; }
.day.today small { color: var(--accent); }
.day[aria-current="true"] { background: var(--btn); border-color: var(--btn); color: var(--btn-ink); }
.day[aria-current="true"] small { color: color-mix(in srgb, var(--btn-ink) 75%, transparent); }

.tools { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 12px 18px 0; }
.search { position: relative; display: block; }
.search input { width: 100%; height: 46px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r); padding: 0 12px 0 40px; font: inherit; font-size: 16px; color: var(--text); text-align: right; direction: rtl; }
.search input::placeholder { color: var(--muted); }
.search svg { position: absolute; top: 50%; left: 13px; width: 18px; height: 18px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
/* العميل 25 نوفمبر: الكتابة يمين والعدسة يسار */
.tools .mini, .tools .btn { height: 46px; }

.list-head { display: flex; align-items: baseline; justify-content: space-between; padding: 22px 18px 10px; }
.list-head h2 { font-size: 18px; margin: 0; }
.list-head span { color: var(--muted); font-size: 13px; }

/* بطاقة الديوانية */
.dw-list { display: grid; gap: 14px; padding: 0 18px; }
.dw { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; transition: border-color 0.6s; }
.dw.flash { border-color: var(--accent); }
.dw .ph { position: relative; aspect-ratio: 16 / 8; background: var(--surface-2) center / cover; }
.dw .ph .tag { position: absolute; top: 10px; right: 10px; }
.dw .ph .dist { position: absolute; bottom: 10px; left: 10px; right: auto; top: auto; }
.dw-body { padding: 14px 16px 12px; }
.dw-body h3 { margin: 0 0 8px; font-size: 19px; font-weight: 700; line-height: 1.4; }
.dw-body dl { margin: 0; display: grid; gap: 6px; }
.dw-body dl div { display: grid; grid-template-columns: 18px 1fr; gap: 8px; align-items: start; }
.dw-body dt { color: var(--muted); padding-top: 4px; }
.dw-body dt svg { width: 16px; height: 16px; display: block; }
.dw-body dd { margin: 0; font-size: 14.5px; line-height: 1.6; }
.acts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; padding: 2px 16px 10px; }
.subacts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; padding: 0 16px 14px; }
.empty { margin: 0 18px; padding: 26px 16px; color: var(--muted); text-align: center; font-size: 14px; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--r); }
.also { margin: 14px 18px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; }
.also b { display: block; font-size: 15px; }
.also span { color: var(--muted); font-size: 13px; }
.chev { width: 16px; height: 16px; color: var(--muted); flex: none; }
.note { color: var(--muted); font-size: 13px; text-align: center; margin: 14px 18px 0; }

/* الخريطة */
.map-wrap { position: relative; margin: 12px 18px 0; height: clamp(400px, 60svh, 560px); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface-2); }
#map { position: absolute; inset: 0; }
.map-card { position: absolute; inset: auto 10px 10px 10px; z-index: 500; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.35); }
.map-card b { display: block; font-size: 16px; }
.map-card span { color: var(--muted); font-size: 13px; }
.map-card .acts { padding: 10px 0 0; }
.pin { display: grid; place-items: center; width: 30px; height: 30px; background: #0e1b3a; color: #f4eee3; border: 2px solid #f4eee3; border-radius: 6px; font: 600 13px "FT", sans-serif; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35); }
.pin.on { background: #b1302a; }
.me-dot { width: 16px; height: 16px; border-radius: 50%; background: #2f6fed; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(47, 111, 237, 0.25); }
.leaflet-container { font-family: "NS", "FT", sans-serif; background: var(--surface-2); }
.leaflet-div-icon { background: none; border: 0; }

/* ===== الإضافة والتواصل ===== */
.form { display: grid; gap: 14px; padding: 18px 18px 0; }
.form fieldset { margin: 0; padding: 14px 16px 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); display: grid; gap: 12px; min-width: 0; }
.form legend { padding: 0 6px; font-weight: 700; font-size: 15px; }
.f { display: grid; gap: 6px; min-width: 0; }
.f > span { font-size: 13.5px; color: var(--muted); }
.form input, .form select, .form textarea { width: 100%; font: inherit; font-size: 16px; color: var(--text); background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--r); min-height: 46px; padding: 10px 12px; }
.form textarea { resize: vertical; line-height: 1.7; }
.form input[dir="ltr"] { font-family: "FT", "NS", sans-serif; text-align: left; }
.form input[dir="ltr"]::placeholder { text-align: right; }
.form .btn { width: 100%; }
.muted { color: var(--muted); font-size: 13px; }
.err { color: var(--accent); font-size: 14px; margin: 0; min-height: 1em; }
.done { margin: 18px; padding: 28px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); text-align: center; display: grid; gap: 10px; }
.done .sadu { width: 90px; margin: 0 auto 6px; }
.done h2 { margin: 0; font-size: 21px; }
.done p { margin: 0 0 8px; color: var(--muted); }

/* ===== عناصر مشتركة للأقسام ===== */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; margin: 14px 18px 0; padding: 4px; background: var(--surface-2); border-radius: var(--r); }
.seg a { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; border-radius: 4px; text-decoration: none; font-size: 14px; color: var(--muted); }
.seg a svg { width: 16px; height: 16px; }
.seg a[aria-current="page"] { background: var(--surface); color: var(--text); font-weight: 700; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 16px 18px 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border: 1px solid var(--line); background: var(--surface); border-radius: 18px; text-decoration: none; font-size: 14px; white-space: nowrap; }
.chip[aria-current="true"] { background: var(--btn); color: var(--btn-ink); border-color: var(--btn); }
.detail-top { display: flex; justify-content: space-between; gap: 8px; padding: 14px 18px 0; }
.hero .live i { font-style: normal; color: #b9b6ad; padding: 0 4px; }
.home-links { padding-top: 12px; }

/* الأخبار */
.nw-list { display: grid; gap: 14px; padding: 16px 18px 0; }
.nw-more { display: flex; width: calc(100% - 36px); margin: 16px 18px 0; }
.nw { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; text-decoration: none; }
.nw-ph { position: relative; aspect-ratio: 16 / 9; background: var(--surface-2) center / cover; }
.nw-ph.big { aspect-ratio: 4 / 3; }
/* العميل 17 نوفمبر: الصورة كاملة بدون قص. الإطار ثابت، والصورة جواه كاملة، وورا خلفية من نفس الصورة مغبّشة */
.fit { overflow: hidden; background: var(--surface-2); }
.fit::before, .fit::after { content: ""; position: absolute; background-image: inherit; background-position: center; background-repeat: no-repeat; }  /* inherit عشان الرابط يتحسب نسبة للصفحة مش لملف الستايل */
.fit::before { inset: -24px; background-size: cover; filter: blur(16px) brightness(.8); }
.fit::after { inset: 0; background-size: contain; }
.art-img { display: block; width: 100%; height: auto; max-height: none; background: var(--surface-2); }
.nw-ph .tag { position: absolute; top: 10px; right: 10px; }
.nw-b { padding: 14px 16px 16px; display: grid; gap: 4px; }
.nw-b h3 { margin: 0; font-size: 18px; line-height: 1.45; }
.nw-b p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.nw-b .when { font-size: 12.5px; color: var(--accent); }
.kind { font-size: 12.5px; color: var(--accent); }
.cg { position: relative; aspect-ratio: 16 / 9; background: #0e1b3a url("media/sadu.webp") center / 360px; color: #f4eee3; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 18px; overflow: hidden; }
.cg::before { content: ""; position: absolute; inset: 0; background: rgba(14, 27, 58, 0.9); }
.cg > * { position: relative; }
.cg > .sadu { position: absolute; top: 0; left: 0; right: 0; }
.cg b { font-size: 30px; line-height: 1.3; }
.cg .cg-p { font-size: 18px; font-weight: 700; margin-top: 4px; }
.cg .cg-o { font-size: 14px; color: #d9d2c4; }
.cg small { position: absolute; bottom: 10px; font-size: 11px; color: #b9b6ad; }
.cg.big { aspect-ratio: 4 / 3; }
.cg.big b { font-size: 38px; }
.nrows { margin: 0 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.nrow { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px 12px; border-top: 1px solid var(--line); text-decoration: none; }
.nrow:first-child { border-top: 0; }
.nrow .th { width: 64px; height: 64px; border-radius: 4px; background: var(--surface-2) center / cover; }
.nrow .cgth { display: grid; place-items: center; background: #0e1b3a; color: #f4eee3; font-size: 13px; font-weight: 700; }
.nrow .nt { display: grid; gap: 2px; min-width: 0; }
.nrow b { font-size: 15px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nrow .nt span { color: var(--muted); font-size: 12.5px; }
.article { margin: 14px 18px 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.art-b { padding: 16px 16px 18px; }
.art-b h1 { margin: 4px 0 10px; font-size: 23px; line-height: 1.45; }
.art-b p { margin: 0 0 12px; line-height: 1.9; font-size: 15.5px; }
.art-b .btn { margin-top: 6px; }
/* العميل 18 نوفمبر: «تم النشر في …» تحت الخبر بالنص وبالأحمر، عشان ما ينخلط مع تواريخ المناسبة بالتفاصيل */
.art-b .art-date { margin: 28px 0 0; text-align: center; font-size: 14px; font-weight: 700; color: var(--accent); }

/* المناسبات */
.today-line { margin: 14px 18px 0; font-size: 14px; color: var(--muted); }
.today-line b { color: var(--accent); }
.ev { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.ev-ph { position: relative; aspect-ratio: 16 / 8; background: var(--surface-2) center / cover; }
.ev-ph .tag { position: absolute; top: 10px; right: 10px; }
.ev-date { position: absolute; bottom: 10px; left: 10px; display: grid; place-items: center; min-width: 58px; padding: 6px 8px; background: var(--surface); color: var(--text); border-radius: 4px; line-height: 1.15; }
.ev-date b { font-size: 22px; }
.ev-date small { font-size: 11px; color: var(--muted); }
.ev-note { margin: 10px 0 0; font-size: 14px; color: var(--muted); line-height: 1.7; }

/* الوفيات */
/* مقدمة الوفيات: شاشة سودا مكتوب عليها بالأبيض (طلب حامد 3 نوفمبر) */
.ob-hero { background: #000; height: calc(230px + var(--top-h)); }
.ob-hero::after { display: none; }
.ob-in { position: absolute; inset: var(--top-h) 0 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 0 18px; text-align: center; }
.ob-hero .ob-verse { margin: 0; color: #fff; font-size: 30px; line-height: 1.6; font-weight: 500; }
.ob-hero h1 { margin: 0; font-size: 15px; font-weight: 500; color: rgba(255, 255, 255, 0.6); letter-spacing: 0; }
.ob-list { display: grid; gap: 14px; padding: 16px 18px 0; }
.ob { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.ob-h { position: relative; padding: 20px 16px 16px; text-align: center; background: #151922; color: #eeeae2; display: grid; gap: 2px; }
.ob-h .tag { position: absolute; top: 10px; right: 10px; background: rgba(255, 255, 255, 0.12); }
.ob-lead { font-size: 13px; color: #b9b5ab; }
.ob-h small { font-size: 12px; color: #9e9a91; margin-top: 6px; }
.ob-h h3 { margin: 0; font-size: 21px; line-height: 1.45; }
.ob-d { font-size: 12.5px; color: #b9b5ab; }
.ob-dl { margin: 0; padding: 12px 16px 6px; display: grid; gap: 8px; }
.ob-dl div { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 10px; }
.ob-dl dt { color: var(--muted); font-size: 13px; }
.ob-dl dd { margin: 0; font-size: 14.5px; line-height: 1.6; }
.ob .acts { padding-top: 8px; }
.ob-sec { padding-top: 18px; }
.ob-strip { margin: 0 18px; display: grid; gap: 2px; padding: 12px 16px; background: #151922; color: #eeeae2; border-radius: var(--r); text-decoration: none; text-align: center; }
.ob-strip + .ob-strip { margin-top: 8px; }
.ob-strip b { font-size: 16px; }
.ob-strip span { font-size: 12.5px; color: #b9b5ab; }

/* الصور */
.psearch { display: grid; gap: 8px; padding: 16px 18px 0; }
.ps-f { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ps-f input { width: 100%; height: 44px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r); padding: 0 12px; font: inherit; font-size: 16px; color: var(--text); }
.ps-f input::placeholder { color: var(--muted); }
.al-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 0 18px; }
.al { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; text-decoration: none; }
.al-ph { position: relative; display: block; aspect-ratio: 1; background: var(--surface-2) center / cover; }
.al-ph .tag { position: absolute; bottom: 8px; right: 8px; }
.al-b { display: grid; gap: 1px; padding: 10px 12px 12px; }
.al-b b { font-size: 14.5px; line-height: 1.4; }
.al-b span { font-size: 12px; color: var(--muted); }
.al-desc { margin: 14px 18px 0; color: var(--muted); line-height: 1.8; }
.people { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 18px 0; }
.people .chip { height: 32px; font-size: 13px; }
.gal { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 14px 18px 0; }
.gal .g { aspect-ratio: 1; border: 0; padding: 0; border-radius: 4px; background: var(--surface-2) center / cover; cursor: zoom-in; }
.lb { position: fixed; inset: 0; z-index: 3000; background: rgba(5, 8, 15, 0.96); display: grid; place-items: center; }
.lb img { max-width: 100%; max-height: 86dvh; object-fit: contain; }
.lb button { position: absolute; width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, 0.25); background: rgba(255, 255, 255, 0.08); color: #fff; border-radius: var(--r); cursor: pointer; }
.lb button svg { width: 22px; height: 22px; }
.lb-x { top: calc(14px + env(safe-area-inset-top)); left: 14px; }
.lb-prev { right: 12px; top: 50%; }
.lb-next { left: 12px; top: 50%; }
.lb-cap { position: absolute; bottom: calc(16px + env(safe-area-inset-bottom)); left: 16px; right: 16px; display: grid; gap: 2px; justify-items: center; text-align: center; color: #f4eee3; }
.lb-cap b { font-size: 16px; line-height: 1.5; }
.lb-c { direction: ltr; color: #bbb; font-size: 13px; }
/* الصور بنظام العوائل */
/* أسماء العوائل بخط «الجزيرة» حسب طلب العميل؛ مؤقتًا GE SS Two العريض لحد ما يوصل ملف الخط المرخّص */
:root { --fam-font: "NS", "FT", sans-serif; }
.fam-name { font-family: var(--fam-font); font-weight: 700; }
.fam-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 0 18px; }
.fam { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; aspect-ratio: 1; padding: 8px 4px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; text-align: center; overflow: hidden; }
.fam::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: var(--sadu) repeat-x right center / auto 100%; }
.fam b { font-size: 15px; line-height: 1.35; word-break: break-word; }
.fam small { font-size: 11px; color: var(--muted); }
.reel { gap: 10px; }
.reel-i { flex: 0 0 42%; scroll-snap-align: start; padding: 0; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r); overflow: hidden; text-align: right; cursor: zoom-in; color: var(--text); }
.reel-ph { display: block; aspect-ratio: 4 / 5; background: var(--surface-2) center / cover; }
.reel-b { display: grid; padding: 8px 10px 10px; }
.reel-b b { font-size: 14px; line-height: 1.4; }
.reel-b span { font-size: 12px; color: var(--muted); }
.fathers { display: grid; }
.fathers .also { align-items: center; }
.fa-th { display: flex; flex: none; }
.fa-th i { width: 38px; height: 38px; border-radius: 4px; border: 2px solid var(--surface); background: var(--surface-2) center / cover; margin-inline-start: -10px; }
.fa-th i:first-child { margin-inline-start: 0; }
.fa-t { flex: 1; min-width: 0; display: grid; }
@media (min-width: 900px) { .fam-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ps-l { display: grid; gap: 4px; min-width: 0; }
.ps-l span { font-size: 12.5px; color: var(--muted); }
.ps-a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.ps-a .btn:only-child { grid-column: 1 / -1; }
.abc { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 18px 12px; }
.abc a { display: grid; place-items: center; min-width: 36px; height: 36px; padding: 0 8px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r); text-decoration: none; font-weight: 700; }
.pp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 0 18px; }
.pp { display: block; padding: 0; text-align: right; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; cursor: zoom-in; color: var(--text); }
.pp-ph { position: relative; display: block; aspect-ratio: 4 / 5; background: var(--surface-2) center / cover; }
.pp-ph .tag { position: absolute; bottom: 8px; right: 8px; }
.pp-b { display: grid; gap: 1px; padding: 10px 12px 12px; }
.pp-b b { font-size: 15px; line-height: 1.4; }
.pp-b span { font-size: 12.5px; color: var(--muted); line-height: 1.5; }

/* ===== الشريط السفلي ===== */
.tabs { position: sticky; bottom: 0; z-index: 20; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: color-mix(in srgb, var(--surface) 94%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); margin-top: 28px; }
.tabs a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 0 10px; text-decoration: none; color: var(--muted); font-size: 12px; min-width: 0; white-space: nowrap; }
.tabs a svg { width: 22px; height: 22px; }
.tabs a[aria-current="page"] { color: var(--accent); font-weight: 700; }
.tabs a[aria-current="page"]::before { content: ""; position: absolute; top: -1px; left: 22%; right: 22%; height: 3px; background: var(--accent); border-radius: 0 0 2px 2px; }

@media (hover: hover) {
  .day:not([aria-current="true"]):hover, .mini:hover, .icon-btn:hover, .also:hover, .tile:hover, .near:hover { border-color: var(--line-strong); }
  .wk a:hover { border-color: rgba(244, 238, 227, 0.4); }
  .btn:hover { filter: brightness(1.08); }
  .btn.line:hover { background: var(--surface-2); }
  .tabs a:hover { color: var(--text); }
  .side .admin-link:hover { background: rgba(244, 238, 227, 0.08); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0s !important; transition: none !important; }
}

/* المناسبات حسب الشهر (كروكي العميل 3 نوفمبر) */
.mon { margin-top: 20px; }
.mon-h { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0 18px; padding: 10px 14px; border: 1.5px solid var(--text); border-radius: var(--r); background: var(--surface); }
.mon-h h2 { margin: 0; font-size: 24px; font-weight: 700; text-align: center; }
.mon-h small { font-size: 13px; color: var(--muted); }
.mon .dw-list, .mon .ar-list { margin-top: 10px; }
.ev2 { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.ev2.flash { border-color: var(--accent); }
.ev2-row { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 14px; padding: 14px; }
.ev2-day { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 8px 4px; background: var(--surface-2); border-radius: 4px; align-self: start; text-align: center; line-height: 1.3; }
.ev2-day b { font-size: 13.5px; font-weight: 700; }
.ev2-day .num { font-size: 22px; font-weight: 600; }
.ev-simple .ev2-day { background: var(--accent); color: #fff; }
.ev2-head { margin: 0; font-size: 22px; line-height: 1.35; font-weight: 700; overflow-wrap: anywhere; color: var(--accent); }
.ev2-type { margin: 2px 0 0; font-size: 15px; color: var(--muted); }
.ev2-list { margin: 6px 0 0; font-size: 18px; font-weight: 600; line-height: 1.5; }
.ev2-list span { display: block; overflow-wrap: anywhere; }
.ev2-main { min-width: 0; }
.ev2-main .tag { display: inline-block; margin-bottom: 6px; }
.ev2-names { margin: 0; font-size: 22px; line-height: 1.35; font-weight: 700; }
.ev2-names span { display: block; overflow-wrap: anywhere; }
.ev2-meta { display: flex; align-items: center; gap: 6px; margin: 6px 0 0; font-size: 14px; color: var(--muted); line-height: 1.6; }
.ev2-meta svg { width: 16px; height: 16px; flex: none; }
.ev2 .ev-note { padding: 0; }
.ev2.is-past { opacity: .85; }
.ev2.is-past .ev2-names { font-size: 18px; }
.seg .num { font-size: 12px; color: var(--muted); }

/* البحث بالأب: شجرة، الأب فوق وأبناؤه تحته (ملاحظة العميل 3 نوفمبر) */
.tree { margin: 14px 18px 0; }
.tr-root { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; text-align: right; background: var(--surface); border: 1.5px solid var(--text); border-radius: var(--r); color: var(--text); font: inherit; }
button.tr-root { cursor: zoom-in; }
.tr-ph { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 4px; background: var(--surface-2) center / cover; color: var(--muted); }
.tr-ph svg { width: 26px; height: 26px; }
.tr-t { display: grid; gap: 1px; min-width: 0; line-height: 1.4; }
.tr-none { font-size: 12.5px; color: var(--muted); margin-top: -4px; }
.tr-t small { font-size: 12px; color: var(--accent); font-weight: 700; }
.tr-t b { font-size: 18px; }
.tr-t > span { font-size: 13px; color: var(--muted); }
.tr-kids { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-inline-start: 26px; padding: 12px 0 0 0; padding-inline-start: 14px; border-inline-start: 2px solid var(--line-strong); }
.tr-kids .pp { position: relative; }
.tr-kids .pp::before { content: ""; position: absolute; top: 40px; inset-inline-start: -16px; width: 14px; border-top: 2px solid var(--line-strong); }
.tr-kids .pp:nth-child(2n)::before { display: none; }

/* الصور، 5 نوفمبر: عارض بخلفية بدل img، وحماية من الضغط المطول والتحديد */
.lb-img { width: 100%; height: 86dvh; background: center / contain no-repeat; }
.pp, .pp-ph, .lb, .lb-img, .tr-root, .fa-th, .fam { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.pp-none { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 12px; text-align: center; color: var(--muted); }
.pp-none svg { width: 30px; height: 30px; opacity: .55; }
.pp-none small { font-size: 13px; line-height: 1.5; }
.pp.no-ph { cursor: default; }
.fam-grid.fam-top { margin-top: 18px; }

/* 5 نوفمبر: شجرة البحث، الأب بالنص فوق وأبناؤه تحته */
.tree .tr-root { flex-direction: column; justify-content: center; text-align: center; gap: 8px; padding: 14px 12px; }
.tree .tr-ph { width: 92px; height: 92px; border-radius: 50%; }
.tree .tr-t b { font-size: 19px; }
.tree .tr-kids { position: relative; }
.fam-people { margin-top: 6px; }
.fam small:empty { display: none; }
/* الأرشيف */
.ar-seg a { height: 46px; font-size: 16px; }
.ar-list { display: grid; gap: 8px; padding: 14px 18px 0; }
.ar-ob { display: grid; gap: 4px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line, rgba(0,0,0,.1)); border-radius: var(--r); }
.ar-ob b { font-size: 17px; }
.ar-ob span { font-size: 14px; color: var(--muted); }
.tree .tr-kids { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 22px 0 0; border: 0; }
.tree .tr-kids::before { content: ""; position: absolute; top: 0; left: 50%; height: 14px; border-left: 2px solid var(--line-strong); }
.tree .tr-kids::after { content: ""; position: absolute; top: 14px; left: 16%; right: 16%; border-top: 2px solid var(--line-strong); }
.tree .tr-kids .pp::before { top: -8px; left: 50%; inset-inline-start: auto; width: 0; height: 8px; border-top: 0; border-left: 2px solid var(--line-strong); }
.tree .tr-kids .pp-b b { font-size: 14px; }
.tree .tr-kids .pp-b span { font-size: 12px; }
.tree .tr-kids .pp-none small { font-size: 11px; }

/* تواصل معنا: شعارات الحسابات (8 نوفمبر) */
.soc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 18px 18px 0; }
.soc { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 20px 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); color: var(--text); text-decoration: none; }
.soc b { font-size: 16px; font-weight: 700; }
.soc-ic { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; }
.soc-ic svg { width: 34px; height: 34px; fill: #fff; }
.soc-snapchat .soc-ic svg { fill: #111; }
.soc-instagram .soc-ic { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285AEB 90%) !important; }
.soc:active { transform: scale(.98); }
.soc-note { display: flex; align-items: center; justify-content: space-between; margin: 18px 18px 0; padding: 18px 16px; border: 1.5px solid var(--text); border-radius: var(--r); background: var(--surface); color: var(--text); text-decoration: none; }
.soc-note b { font-size: 18px; font-weight: 700; }

/* قسم مسكّر من لوحة التحكم */
.closed-sec { margin: 120px 18px 0; padding: 28px 18px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.closed-sec h2 { margin: 14px 0 0; font-size: 20px; }

/* 11 نوفمبر: مربع الشهر مميز (أزرق القبيلة بلمعة بتمر عليه)، فبيبين وين بيخلص شهر وبيبلش الثاني */
.mon { margin-top: 26px; }
.mon-h { position: relative; overflow: hidden; border: 0; color: #fff; background: linear-gradient(135deg, #0a2752, #12407a 55%, #0a2752); box-shadow: 0 6px 18px rgba(10, 39, 82, .28); }
.mon-h h2 { color: #fff; }
.mon-h::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .38) 50%, transparent 65%); transform: translateX(-120%); animation: mon-shine 3.6s ease-in-out infinite; pointer-events: none; }
@keyframes mon-shine { 0%, 45% { transform: translateX(120%); } 100% { transform: translateX(-120%); } }
@media (prefers-reduced-motion: reduce) { .mon-h::after { animation: none; display: none; } }
/* زر الأرشيف تحت كلمة المناسبات */
.page-hero .ph-arch { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; padding: 6px 12px; min-height: 36px; border-radius: 999px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .45); color: #fff; font-size: 13px; font-weight: 600; text-decoration: none; line-height: 1.3; }
.page-hero .ph-arch svg { width: 14px; height: 14px; }

/* منطقة المطلع: تبويبها مميز عن الأيام، وبطاقة البيت بلا صورة */
.days:not(.scroll) .day.area { grid-column: 1 / -1; }
.days .day.area { background: #0a2752; color: #fff; border-color: #0a2752; white-space: nowrap; }
.days .day.area[aria-current="true"] { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px #0a2752; }
.dw.home .dw-body { padding-top: 14px; }
.dw.home .tag { position: static; display: inline-block; margin-bottom: 6px; }

/* الشاشة الافتتاحية (حامد 11 نوفمبر، العميل 12 نوفمبر: أبيض على أزرق غامق): لوجو القطرة بينرسم، شرار بيتجمّع وبينفجر، لمعة، وبعدين بتذوب على التطبيق */
@property --sa { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.splash { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; overflow: hidden; cursor: pointer; color: #fff;
  background: radial-gradient(90% 70% at 50% 44%, #0f3470 0%, #061b3d 48%, #020c22 100%);
  transition: opacity .8s ease, filter .8s ease, visibility .8s; }
@media (min-width: 900px) { .app .splash { position: absolute; } }
.splash.out { opacity: 0; filter: blur(6px); visibility: hidden; }
.splash.out .sp-logo { transform: scale(1.12); transition: transform .8s cubic-bezier(.5, 0, .2, 1); }
.sp-rays { position: absolute; left: 50%; top: 44%; width: 220vmax; height: 220vmax; translate: -50% -50%; opacity: 0;
  background: repeating-conic-gradient(from 0deg, rgba(200, 222, 255, .09) 0deg 3deg, transparent 3deg 15deg);
  -webkit-mask: radial-gradient(closest-side, #000 0%, transparent 60%); mask: radial-gradient(closest-side, #000 0%, transparent 60%);
  animation: sp-rays-in 1.6s .3s ease forwards, sp-spin 40s linear infinite; }
.sp-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.sp-in { position: relative; display: grid; justify-items: center; gap: 18px; margin-top: -4vh; }
.sp-logo { position: relative; width: min(62vw, 280px); aspect-ratio: 559 / 802; transition: transform .8s; }
.sp-logo img, .sp-shine, .sp-glow { position: absolute; inset: 0; width: 100%; height: 100%; }
.sp-logo img { --sa: 0deg; filter: drop-shadow(0 0 16px rgba(170, 205, 255, .55));
  -webkit-mask: conic-gradient(from 0deg at 50% 46%, #000 var(--sa), transparent calc(var(--sa) + 14deg));
  mask: conic-gradient(from 0deg at 50% 46%, #000 var(--sa), transparent calc(var(--sa) + 14deg));
  opacity: 0; animation: sp-draw 1.7s 1s cubic-bezier(.55, .1, .35, 1) forwards; }
.sp-glow { background: radial-gradient(closest-side, rgba(190, 220, 255, .5), transparent 70%); scale: 1.9; opacity: 0; animation: sp-pulse 1.4s 2.55s ease-out forwards; }
.sp-shine { opacity: 0; -webkit-mask: url("img/logo-white.webp?v=67") center / 100% 100% no-repeat; mask: url("img/logo-white.webp?v=67") center / 100% 100% no-repeat;
  background: linear-gradient(115deg, transparent 35%, rgba(170, 210, 255, .9) 48%, rgba(255, 255, 255, 1) 50%, rgba(170, 210, 255, .9) 52%, transparent 65%) no-repeat;
  background-size: 300% 100%; background-position: 120% 0; animation: sp-shine 1.2s 2.9s ease-in-out forwards; }
.sp-ring { position: absolute; left: 50%; top: 50%; width: 120%; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; border: 2px solid rgba(215, 232, 255, .85); scale: .3; opacity: 0; animation: sp-ring 1.3s 2.6s cubic-bezier(.2, .7, .3, 1) forwards; }
.sp-ring.r2 { animation-delay: 2.78s; border-width: 1px; }
.sp-cap { display: grid; justify-items: center; gap: 10px; }
.sp-line { width: 0; height: 1px; background: linear-gradient(90deg, transparent, #fff, transparent); animation: sp-line 1s 3.1s ease forwards; }
.sp-sub { font-size: 19px; color: #e6eefb; opacity: 0; animation: sp-sub 1s 3.3s ease forwards; }
@keyframes sp-rays-in { to { opacity: 1; } }
@keyframes sp-spin { to { rotate: 360deg; } }
@keyframes sp-draw { 0% { opacity: 1; --sa: 0deg; scale: .94; } 100% { opacity: 1; --sa: 380deg; scale: 1; } }
@keyframes sp-pulse { 0% { opacity: 0; } 25% { opacity: 1; } 100% { opacity: .18; } }
@keyframes sp-shine { 0% { opacity: 1; background-position: 120% 0; } 100% { opacity: 1; background-position: -20% 0; } }
@keyframes sp-ring { 0% { opacity: .95; scale: .3; } 100% { opacity: 0; scale: 2.2; } }
@keyframes sp-line { to { width: 150px; } }
@keyframes sp-sub { from { opacity: 0; transform: translateY(8px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@media (prefers-reduced-motion: reduce) { .sp-logo img { animation: none; opacity: 1; -webkit-mask: none; mask: none; } .sp-rays { animation: none; opacity: 1; } .sp-sub { animation: none; opacity: 1; } .sp-line { animation: none; width: 150px; } .sp-shine, .sp-ring, .sp-glow { display: none; } }

/* العميل 12 نوفمبر: اللوجو مكان «بني حسين» بالشريط (كحلي على الفاتح، أبيض على الليلي وفوق الغلاف) */
.brand { display: inline-flex; align-items: center; }
.brand img { height: 46px; width: auto; display: block; }
.brand .lg-w { display: none; }
:root[data-theme="dark"] .brand .lg-n, .app.on-hero .top:not(.solid) .brand .lg-n { display: none; }
:root[data-theme="dark"] .brand .lg-w, .app.on-hero .top:not(.solid) .brand .lg-w { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand .lg-n { display: none; }
  :root:not([data-theme="light"]) .brand .lg-w { display: block; }
}
/* العميل 12 نوفمبر: نتائج الصور، الاسم الكامل بسطر واحد */
.pp-b b { font-size: 14px; line-height: 1.45; }
/* العميل 17 نوفمبر: كل بطاقات الصور بنفس المقاس. الصورة كاملة جوا الإطار بدون قص، والاسم دايمًا مساحة سطرين */
.pp-ph { background-size: contain; background-repeat: no-repeat; background-color: #0e1b3a; }
.pp-ph.pp-none { background-color: var(--surface-2); }
.pp-b b { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; min-height: calc(2 * 1.45em); } /* 19 نوفمبر: الأسماء الطويلة كانت تنقص بسطرين */
.pp { display: flex; flex-direction: column; }
/* العميل 12 نوفمبر: الوفيات بالأرشيف، التبويب والأشهر أسود بكتابة بيضا */
.seg a.ob-tab, .seg a.ob-tab[aria-current="page"] { background: #000; color: #fff; } /* العميل 13 نوفمبر: أسود من البداية */
.ob-mode .mon-h { background: #000; box-shadow: 0 6px 18px rgba(0, 0, 0, .3); }

/* العميل 13 نوفمبر: قسم الوفيات متل الفيديو، بطاقات سودا */
.ob-hero { height: calc(150px + var(--top-h)); }
.ob-hero h1 { font-size: 30px; font-weight: 700; color: #fff; }
.ob2 { position: relative; background: #141414; color: #f2f2f2; border-radius: 18px; padding: 22px 18px 0; text-align: center; overflow: hidden; box-shadow: 0 8px 22px rgba(0, 0, 0, .18); }
.ob2-inna { margin: 0 0 4px; font-family: "NS", serif; font-weight: 800; font-size: 30px; line-height: 1.6; color: #fff; } /* العميل 14 نوفمبر: نفس خط اسم المتوفى */
.ob2-lead { margin: 6px 0 0; font-size: 16px; color: #e6e6e6; }
.ob2 h3 { margin: 6px 0 0; font-size: 26px; line-height: 1.45; font-weight: 800; color: #fff; }
.ob2-txt { margin: 12px 0 0; font-size: 15.5px; line-height: 1.85; color: #e2e2e2; }
.ob2-lines { margin: 4px 0 0; display: grid; gap: 2px; font-size: 15px; line-height: 1.8; color: #e2e2e2; }
.ob2-tag { display: inline-block; margin-top: 10px; padding: 3px 12px; border-radius: 999px; background: rgba(255, 255, 255, .12); font-size: 12.5px; }
.ob2-foot { display: flex; justify-content: space-between; gap: 10px; margin: 16px -18px 0; padding: 12px 16px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 13px; color: #bdbdbd; }
.ob2-foot span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.ob2-foot svg { width: 15px; height: 15px; opacity: .8; }
.ob2-acts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 0 -18px; padding: 0 16px 14px; }
.ob2-acts .acts { flex: 1 1 100%; padding: 0; margin: 0; }
.ob2-acts .btn { background: #fff; color: #111; border-color: #fff; }
.ob2-acts .btn.line { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); }
.ob2-acts .mini { background: transparent; color: #e6e6e6; border-color: rgba(255, 255, 255, .3); }
.ob2-end { height: 22px; }
.ob2-acts { padding-top: 16px; }

/* العميل 14 نوفمبر: زر الأرشيف، الكلام بنص المربع بالضبط، وجنبه «اضغط هنا» صغيرة */
.page-hero .ph-arch { justify-content: center; text-align: center; gap: 8px; padding: 7px 16px; }
.page-hero .ph-arch small { font-size: 11px; font-weight: 700; opacity: .85; text-decoration: underline; text-underline-offset: 3px; }
.ob-in .ph-arch { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 7px 16px; min-height: 36px; border-radius: 999px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .45); color: #fff; font-size: 13px; font-weight: 600; text-decoration: none; }
.ob-in .ph-arch small { font-size: 11px; font-weight: 700; opacity: .85; text-decoration: underline; text-underline-offset: 3px; }
.ob-hero { height: calc(190px + var(--top-h)); }
/* العميل 14 نوفمبر: «التطبيق الرسمي» بالشاشة الافتتاحية أكبر وأثقل وأعرض (بمسافة بين الكلمتين، مش بين الحروف) */
/* العميل 15 نوفمبر: مسافة عادية وحدة بين «التطبيق» و«الرسمي»، والجملة نفسها أعرض (بالحجم مش بمط الحروف) */
.sp-sub { font-size: 31px; font-weight: 900; word-spacing: normal; letter-spacing: 0; color: #fff; }
.sp-line { animation-name: sp-line-w; }
@keyframes sp-line-w { to { width: 230px; } }
/* العميل 14 نوفمبر (صورة آيفون): زر الأرشيف كان طالع فوق كلمة «المناسبات». خط Muna أطول، فالعنوان بياخد سطر أعلى ومسافة تحته */
.page-hero h1 { line-height: 1.65; }
.page-hero .ph-in > p { margin: 10px 0 0; }

/* العميل 15 نوفمبر: تخرجات الثانوية العامة وتخرج الضباط تحت العوائل */
.grad-sec { margin-top: 26px; }
.grad-h { margin: 0 18px 10px; font-size: 19px; font-weight: 800; color: var(--text); text-align: center; }
.fam.fam-yr .fam-name { font-size: 19px; }
/* العميل 19 نوفمبر: الصور القديمة مربعة والإطار 4:5، فكان يطلع شريط كحلي فوق وتحت.
   ورا الصورة نسخة منها مغبّشة بتعبّي الفراغ، والصورة نفسها كاملة بدون قص (نفس فكرة .fit بالأخبار) */
.pp-ph:not(.pp-none) { overflow: hidden; }
.pp-ph:not(.pp-none)::before, .pp-ph:not(.pp-none)::after { content: ""; position: absolute; background-image: inherit; background-position: center; background-repeat: no-repeat; }
.pp-ph:not(.pp-none)::before { inset: -24px; background-size: cover; filter: blur(16px) brightness(.85); }
.pp-ph:not(.pp-none)::after { inset: 0; background-size: contain; }

/* العميل 21 نوفمبر: الخبر كله بنص الصفحة، وتاريخ النشر أصغر وبدون تدخيم */
.nw-b, .art-b, .nw-b h3, .nw-b p, .art-b h1, .art-b p { text-align: center; }
.nw-b .when { font-size: 11.5px; font-weight: 400; }
.art-b .art-date { font-size: 12px; font-weight: 400; }

/* العميل 21 نوفمبر: اسم الديوان بالأحمر عشان يتميز عن التفاصيل */
.dw-body h3 { color: var(--accent); }

/* العميل 21 نوفمبر: صفة المناسبة تحت العنوان */
.ev2-sifa { margin: 2px 0; font-size: 13.5px; font-weight: 700; color: var(--accent); }

/* العميل 21 نوفمبر: بطاقة الوفاة بنفس ورقة العميل */
.ob2-name { white-space: pre-line; }
.ob2-sep { height: 1px; margin: 14px 34px 12px; background: rgba(255, 255, 255, .3); }
.ob2-row { margin: 4px 0 0; font-size: 15.5px; line-height: 1.8; color: #ececec; }
.ob2-row b { font-weight: 700; color: #fff; }
.ob2-pre { white-space: pre-line; }
.ob2-tels { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 8px; }
.ob2-tels a { padding: 6px 13px; border: 1px solid rgba(255, 255, 255, .35); border-radius: 8px; color: #fff; text-decoration: none; font-size: 15px; }

/* العميل 21 نوفمبر: زر موقع العزاء (اختياري) */
.ob2-map { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; padding: 8px 16px; border-radius: 8px; background: #f2f2f2; color: #141414; font-weight: 700; font-size: 14px; text-decoration: none; }
.ob2-map svg { width: 16px; height: 16px; }

/* العميل 21 نوفمبر: اسم صاحب الرقم فوق الرقم */
.ob2-tels a { display: inline-flex; flex-direction: column; align-items: center; gap: 1px; }
.ob2-tels small { font-size: 13px; color: #dcdcdc; }

/* العميل 22 نوفمبر: صفة فوق كل معرس */
.ev2-sifa { display: block; margin: 2px 0; line-height: 1.65; }
.ev2-list .ev2-sifa, .ev2-names .ev2-sifa { font-size: 13.5px; font-weight: 700; color: var(--accent); }

/* العميل 22 نوفمبر: اسم العائلة ما بينقسم بنص الكلمة على الجوالات الضيقة */
.fam b { font-size: min(15px, 3.8vw); word-break: normal; overflow-wrap: normal; }
.fam.fam-yr .fam-name { font-size: min(19px, 4.8vw); }
