/* لمحة — هوية: أزرق كوبالت عميق + برتقالي زعفراني للصوت والجديد، على خلفية رمادية زرقاء باردة (لا بيج ولا أخضر) */
@font-face { font-family: 'Readex'; src: url(/fonts/readex-ar-400.woff2) format('woff2'); font-weight: 400; unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; font-display: swap; }
@font-face { font-family: 'Readex'; src: url(/fonts/readex-ar-500.woff2) format('woff2'); font-weight: 500; unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; font-display: swap; }
@font-face { font-family: 'Readex'; src: url(/fonts/readex-ar-700.woff2) format('woff2'); font-weight: 700; unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; font-display: swap; }
@font-face { font-family: 'Readex'; src: url(/fonts/readex-la-400.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Readex'; src: url(/fonts/readex-la-500.woff2) format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Readex'; src: url(/fonts/readex-la-700.woff2) format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --bg: #F3F5FB; --surface: #FFFFFF; --surface-2: #E9ECF7; --line: #DDE1F0;
  --ink: #0E1330; --ink-2: #3A4166; --muted: #6A7194;
  --accent: #3346FF; --accent-ink: #FFFFFF; --accent-soft: #E3E6FF;
  --amber: #FF8A1F; --amber-soft: #FFEBD9; --danger: #E5364B;
  --shadow: 0 1px 2px rgba(14,19,48,.06), 0 8px 24px rgba(14,19,48,.06);
  --r: 18px; --r-sm: 12px;
  --nav-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #090C1C; --surface: #121732; --surface-2: #1B2145; --line: #262D57;
    --ink: #EEF0FF; --ink-2: #C3C8EA; --muted: #8C93BE;
    --accent: #7C8BFF; --accent-ink: #0A0D22; --accent-soft: #1F2660;
    --amber: #FFA24C; --amber-soft: #3A2716; --danger: #FF6B7D;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #090C1C; --surface: #121732; --surface-2: #1B2145; --line: #262D57;
  --ink: #EEF0FF; --ink-2: #C3C8EA; --muted: #8C93BE;
  --accent: #7C8BFF; --accent-ink: #0A0D22; --accent-soft: #1F2660;
  --amber: #FFA24C; --amber-soft: #3A2716; --danger: #FF6B7D;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.25);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font: 400 16px/1.65 'Readex', system-ui, -apple-system, 'Segoe UI', sans-serif; min-height: 100dvh; overflow-x: hidden; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }

#app { max-width: 680px; margin: 0 auto; padding: 0 16px calc(var(--nav-h) + var(--safe-b) + 24px); }
body.has-player #app { padding-bottom: calc(var(--nav-h) + var(--safe-b) + 96px); }

/* ---------- الرأس ---------- */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); margin: 0 -16px; padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px 8px; }
.top-row { display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 22px; letter-spacing: -.01em; }
.brand img { width: 34px; height: 34px; border-radius: 10px; }
.top h1 { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -.01em; }
.date { color: var(--muted); font-size: 13px; }
.spacer { flex: 1; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--surface); box-shadow: var(--shadow); display: grid; place-items: center; cursor: pointer; flex: none; }
.icon-btn svg { width: 20px; height: 20px; }

/* ---------- شرائح التبويب ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 10px 16px 4px; margin: 0 -16px; scroll-snap-type: x proximity; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); padding: 7px 14px; border-radius: 999px; font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap; scroll-snap-align: start; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip.sel { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

/* ---------- بطاقة الإيجاز ---------- */
.brief-card { margin: 14px 0 6px; border-radius: 22px; padding: 18px; color: #fff; position: relative; overflow: hidden;
  background: radial-gradient(120% 140% at 100% 0%, #4C5DFF 0%, #2632C9 45%, #141A6E 100%); box-shadow: 0 12px 30px rgba(39,52,210,.28); }
.brief-card::after { content: ''; position: absolute; inset-inline-start: -40px; bottom: -60px; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, rgba(255,138,31,.55), transparent 65%); }
.brief-card .k { font-size: 13px; opacity: .8; }
.brief-card h2 { margin: 2px 0 10px; font-size: 21px; line-height: 1.4; }
.brief-card .row { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.play-big { width: 54px; height: 54px; border-radius: 50%; border: 0; background: #FF8A1F; color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 6px 18px rgba(255,138,31,.45); flex: none; }
.play-big svg { width: 24px; height: 24px; }
.brief-card .meta { font-size: 13px; opacity: .85; }
.wave { display: flex; gap: 3px; align-items: center; height: 26px; }
.wave i { width: 3px; border-radius: 3px; background: rgba(255,255,255,.55); }

/* ---------- البطاقات ---------- */
.list { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.card { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 14px; display: flex; gap: 12px; cursor: pointer; position: relative; transition: transform .12s ease; }
.card:active { transform: scale(.985); }
.card .body { flex: 1; min-width: 0; }
.card .kicker { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin-bottom: 4px; flex-wrap: wrap; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font-weight: 500; font-size: 12px; }
.tag.podcast, .tag.video { background: var(--amber-soft); color: var(--amber); }
.tag.decision, .tag.report, .tag.study { background: var(--accent-soft); color: var(--accent); }
.tag.local { background: transparent; color: var(--accent); padding: 0; }
.card h3 { margin: 0; font-size: 16.5px; line-height: 1.5; font-weight: 500; }
.card p { margin: 6px 0 0; color: var(--ink-2); font-size: 14px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .thumb { width: 84px; height: 84px; border-radius: var(--r-sm); object-fit: cover; flex: none; background: var(--surface-2); }
.card.seen h3 { color: var(--ink-2); }
.card .marks { position: absolute; inset-inline-end: 10px; bottom: 8px; display: flex; gap: 6px; color: var(--muted); font-size: 12px; }
.card.feature { flex-direction: column; padding: 0; overflow: hidden; }
.card.feature .thumb { width: 100%; height: 180px; border-radius: 0; }
.card.feature .body { padding: 12px 14px 16px; }
.card.feature h3 { font-size: 19px; font-weight: 700; }

.section-title { margin: 22px 2px 4px; font-size: 14px; font-weight: 700; color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 48px 16px; }
.empty b { display: block; color: var(--ink); font-size: 18px; margin-bottom: 6px; }
.skeleton { height: 96px; border-radius: var(--r); background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: sk 1.4s infinite; }
@keyframes sk { to { background-position: -200% 0; } }
.more { display: block; margin: 16px auto; }

/* ---------- الأزرار والحقول ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 14px; padding: 12px 18px; font-weight: 500; cursor: pointer; background: var(--surface-2); color: var(--ink); min-height: 46px; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.amber { background: var(--amber); color: #fff; }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.danger { background: transparent; color: var(--danger); }
.btn.block { width: 100%; }
.btn.sm { min-height: 36px; padding: 6px 12px; font-size: 14px; border-radius: 11px; }
.btn svg { width: 18px; height: 18px; }
.btn:disabled { opacity: .5; }
.field { display: block; margin: 12px 0; }
.field > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.input, textarea.input, select.input { width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 12px 14px; outline: none; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea.input { min-height: 96px; resize: vertical; line-height: 1.7; }
.err { color: var(--danger); font-size: 14px; min-height: 20px; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- الدخول والإعداد ---------- */
.auth { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding: 24px 0; }
.hero-mark { width: 76px; height: 76px; border-radius: 22px; box-shadow: 0 14px 34px rgba(51,70,255,.35); }
.auth h1 { font-size: 34px; margin: 18px 0 4px; letter-spacing: -.02em; }
.auth .lead { color: var(--ink-2); margin: 0 0 22px; font-size: 17px; }
.panel { background: var(--surface); border-radius: 22px; padding: 18px; box-shadow: var(--shadow); }
.switch { text-align: center; margin-top: 14px; color: var(--muted); font-size: 14px; }
.steps { display: flex; gap: 6px; margin: 18px 0 8px; }
.steps i { flex: 1; height: 4px; border-radius: 4px; background: var(--line); }
.steps i.on { background: var(--accent); }
.onb h1 { font-size: 26px; margin: 8px 0 4px; }
.onb .lead { color: var(--ink-2); margin: 0 0 16px; }
.tracks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.track { text-align: start; border: 1.5px solid var(--line); background: var(--surface); border-radius: 16px; padding: 14px; cursor: pointer; }
.track b { display: block; font-size: 15px; margin-bottom: 2px; }
.track small { color: var(--muted); font-size: 12.5px; line-height: 1.5; display: block; }
.track[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.wrap-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.wrap-chips .chip { padding: 7px 12px; }
.cat { margin: 14px 0 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.sticky-actions { position: sticky; bottom: 0; padding: 12px 0 calc(var(--safe-b) + 12px); background: linear-gradient(transparent, var(--bg) 30%); display: flex; gap: 8px; }
.seg { display: flex; background: var(--surface-2); border-radius: 12px; padding: 3px; gap: 3px; }
.seg button { flex: 1; border: 0; background: transparent; border-radius: 10px; padding: 8px 6px; font-size: 14px; cursor: pointer; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); font-weight: 500; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.toggle-row:last-child { border-bottom: 0; }
.switch-t { position: relative; width: 48px; height: 28px; flex: none; }
.switch-t input { opacity: 0; width: 0; height: 0; }
.switch-t span { position: absolute; inset: 0; background: var(--line); border-radius: 28px; transition: .2s; cursor: pointer; }
.switch-t span::before { content: ''; position: absolute; width: 22px; height: 22px; inset-inline-start: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch-t input:checked + span { background: var(--accent); }
.switch-t input:checked + span::before { transform: translateX(-20px); }
[dir="ltr"] .switch-t input:checked + span::before { transform: translateX(20px); }
.voices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.voice { display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--line); background: var(--surface); border-radius: 14px; padding: 10px 12px; cursor: pointer; text-align: start; }
.voice[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.voice small { color: var(--muted); display: block; font-size: 12px; }
.voice .pv { margin-inline-start: auto; width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--surface-2); display: grid; place-items: center; cursor: pointer; }
.voice .pv svg { width: 14px; height: 14px; }

/* ---------- الورقة السفلية ---------- */
.scrim { position: fixed; inset: 0; background: rgba(5,8,25,.42); z-index: 60; animation: fade .18s ease; }
.sheet { position: fixed; inset-inline: 0; bottom: 0; z-index: 61; max-width: 680px; margin: 0 auto; max-height: 92dvh; overflow-y: auto; background: var(--bg); border-radius: 24px 24px 0 0; padding: 8px 18px calc(var(--safe-b) + 24px); animation: up .24s cubic-bezier(.2,.8,.2,1); overscroll-behavior: contain; }
.grab { width: 40px; height: 5px; border-radius: 5px; background: var(--line); margin: 4px auto 12px; }
@keyframes up { from { transform: translateY(40px); opacity: .4; } }
@keyframes fade { from { opacity: 0; } }
.sheet h2 { font-size: 22px; line-height: 1.45; margin: 8px 0; }
.sheet .orig { color: var(--muted); font-size: 14px; direction: auto; text-align: start; margin: -2px 0 8px; }
.sheet .summary { font-size: 17px; color: var(--ink-2); line-height: 1.8; margin: 8px 0 14px; }
.sheet .hero { width: 100%; max-height: 220px; object-fit: cover; border-radius: 16px; margin: 6px 0 10px; }
.sheet .yt { width: 100%; aspect-ratio: 16/9; border: 0; border-radius: 16px; margin: 6px 0 10px; background: #000; }
.actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 10px 0 6px; }
.act { display: flex; flex-direction: column; align-items: center; gap: 4px; border: 0; background: var(--surface); border-radius: 14px; padding: 10px 4px; font-size: 12px; cursor: pointer; color: var(--ink-2); box-shadow: var(--shadow); }
.act svg { width: 22px; height: 22px; color: var(--ink); }
.act.on svg { color: var(--accent); fill: var(--accent); }
.notes-box { margin-top: 18px; }
.notes-box h4 { margin: 0 0 8px; font-size: 15px; }
.note { background: var(--surface); border-radius: 14px; padding: 12px 14px; margin-top: 8px; box-shadow: var(--shadow); white-space: pre-wrap; }
.note blockquote { margin: 0 0 6px; padding-inline-start: 10px; border-inline-start: 3px solid var(--amber); color: var(--ink-2); font-size: 14px; }
.note .when { color: var(--muted); font-size: 12px; margin-top: 6px; display: flex; gap: 10px; align-items: center; }
.note .when button { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0; font-size: 12px; }
.note .src { font-size: 13px; color: var(--accent); display: block; margin-bottom: 4px; cursor: pointer; }

/* ---------- المشغّل ---------- */
.player { position: fixed; inset-inline: 10px; bottom: calc(var(--nav-h) + var(--safe-b) + 8px); z-index: 40; max-width: 660px; margin: 0 auto; background: var(--ink); color: var(--bg); border-radius: 18px; padding: 10px 12px; display: flex; align-items: center; gap: 10px; box-shadow: 0 10px 30px rgba(9,12,28,.35); }
.player img { width: 42px; height: 42px; border-radius: 10px; object-fit: cover; flex: none; background: var(--accent); }
.player .t { flex: 1; min-width: 0; }
.player .t b { display: block; font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player .bar { height: 3px; background: rgba(127,127,160,.4); border-radius: 3px; margin-top: 6px; position: relative; cursor: pointer; }
.player .bar i { position: absolute; inset-block: 0; inset-inline-start: 0; background: var(--amber); border-radius: 3px; }
.player button { border: 0; background: none; color: inherit; width: 36px; height: 36px; display: grid; place-items: center; cursor: pointer; flex: none; border-radius: 50%; }
.player button.pp { background: var(--amber); color: #fff; }
.player button svg { width: 20px; height: 20px; }
.player .rate { font-size: 12px; font-weight: 700; width: auto; padding: 0 6px; }

/* ---------- التنقل السفلي ---------- */
.nav { position: fixed; inset-inline: 0; bottom: 0; z-index: 50; height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(1.4) blur(16px); -webkit-backdrop-filter: saturate(1.4) blur(16px); border-top: 1px solid var(--line); display: flex; justify-content: space-around; }
.nav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); font-size: 11px; font-weight: 500; max-width: 120px; }
.nav a svg { width: 24px; height: 24px; }
.nav a.on { color: var(--accent); }

/* ---------- صفحات ---------- */
.page-head { padding: calc(env(safe-area-inset-top, 0px) + 18px) 0 6px; }
.page-head h1 { margin: 0; font-size: 28px; letter-spacing: -.01em; }
.page-head p { margin: 2px 0 0; color: var(--muted); }
.group { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 4px 16px; margin: 14px 0; }
.group > h3 { font-size: 13px; color: var(--muted); margin: 12px 0 2px; }
.src-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.src-row:last-child { border-bottom: 0; }
.src-row img, .src-row .ph { width: 44px; height: 44px; border-radius: 11px; object-fit: cover; flex: none; background: var(--accent-soft); display: grid; place-items: center; color: var(--accent); font-weight: 700; }
.src-row .t { flex: 1; min-width: 0; }
.src-row .t b { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.src-row .t small { color: var(--muted); }
.script { background: var(--surface); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--shadow); line-height: 2; font-size: 16.5px; white-space: pre-wrap; color: var(--ink-2); }
.searchbar { display: flex; gap: 8px; margin: 10px 0; }
.toast { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 14px); inset-inline: 0; margin: 0 auto; width: max-content; max-width: 90vw; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 14px; font-size: 14px; z-index: 100; opacity: 0; transform: translateY(-10px); transition: .2s; pointer-events: none; }
.toast.on { opacity: 1; transform: none; }
.spin { width: 18px; height: 18px; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: rot .8s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes rot { to { transform: rotate(360deg); } }
.muted { color: var(--muted); }
.small { font-size: 13px; }

@media (min-width: 720px) {
  .card .thumb { width: 112px; height: 96px; }
  .tracks { grid-template-columns: 1fr 1fr 1fr; }
}

/* ================= اللمحات: الخلاصة العمودية ================= */
/* ألوان الفئات (بلا أخضر): كل فئة تمنح بطاقتها هالة لونية خاصة فوق حبر ليلي موحّد */
.gc.cat-tech, .card.cat-tech     { --t1: #3346FF; --t2: #1B2390; }
.gc.cat-money, .card.cat-money    { --t1: #F2A93B; --t2: #7A4413; }
.gc.cat-science, .card.cat-science  { --t1: #2EA8FF; --t2: #0E3F8A; }
.gc.cat-society, .card.cat-society  { --t1: #7B5CFF; --t2: #2C1B85; }
.gc.cat-culture, .card.cat-culture  { --t1: #E0457B; --t2: #6E1543; }
.gc.cat-life, .card.cat-life     { --t1: #FF6B4A; --t2: #7A2416; }
.gc.cat-sports, .card.cat-sports   { --t1: #E5364B; --t2: #6A0F22; }
.gc.cat-local, .card.cat-local    { --t1: #FF8A1F; --t2: #2632C9; }
.gc.cat-custom, .card.cat-custom   { --t1: #9B6BFF; --t2: #2A1E7A; }
.gc.cat-source, .card.cat-source   { --t1: #5C7CFF; --t2: #1D2A6E; }

body.glance-mode { overflow: hidden; background: #070A1A; }
body.glance-mode #app { max-width: none; padding: 0; }
body.glance-mode .nav { background: #070A1A; border-top-color: rgba(255,255,255,.07); backdrop-filter: none; -webkit-backdrop-filter: none; }
body.glance-mode .nav a { color: rgba(255,255,255,.5); }
body.glance-mode .nav a.on { color: #fff; }
body.glance-mode .player { bottom: calc(var(--nav-h) + var(--safe-b) + 8px); }
/* حاوية التمرير تنتهي فوق شريط التنقل: لا يختفي شيء خلفه ولا خلف شريط المتصفح */
.gl { position: fixed; top: 0; inset-inline: 0; bottom: calc(var(--nav-h) + var(--safe-b)); z-index: 10; overflow-y: auto; overscroll-behavior: contain; scroll-snap-type: y mandatory; scrollbar-width: none; outline: none; background: #070A1A; color: #fff; }
.gl::-webkit-scrollbar { display: none; }
.gl-head { position: fixed; z-index: 12; top: calc(env(safe-area-inset-top, 0px) + 10px); inset-inline: 14px; display: flex; align-items: center; gap: 10px; pointer-events: none; max-width: 680px; margin: 0 auto; }
.gl-head > * { pointer-events: auto; }
.gl-prog { position: fixed; z-index: 12; top: calc(env(safe-area-inset-top, 0px) + 4px); inset-inline: 14px; max-width: 680px; margin: 0 auto; display: flex; gap: 3px; pointer-events: none; }
.gl-prog i { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.22); transition: background .25s; }
.gl-prog i.done { background: rgba(255,255,255,.75); }
.gl-prog i.on { background: #FF8A1F; }
.gl-tabs { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(7,10,26,.45); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.gl-tabs button { border: 0; background: none; color: rgba(255,255,255,.7); font-size: 14px; font-weight: 500; padding: 6px 14px; border-radius: 999px; cursor: pointer; }
.gl-tabs button.on { background: #fff; color: #0E1330; }
.gl-count { margin-inline-start: auto; font-size: 13px; color: rgba(255,255,255,.8); font-variant-numeric: tabular-nums; background: rgba(7,10,26,.45); padding: 4px 10px; border-radius: 999px; }
.gl-count:empty { visibility: hidden; }
.icon-btn.dark { background: rgba(7,10,26,.45); color: #fff; box-shadow: none; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }

.gc { --t1: #3346FF; --t2: #1B2390; position: relative; height: var(--gl-h, calc(100dvh - var(--nav-h) - var(--safe-b))); flex: none; scroll-snap-align: start; scroll-snap-stop: always; overflow: hidden; display: flex; touch-action: pan-y; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; will-change: transform;
  padding: calc(env(safe-area-inset-top, 0px) + 62px) 18px 18px; padding-inline-end: 78px;
  background: radial-gradient(120% 70% at 85% 0%, color-mix(in srgb, var(--t1) 70%, transparent) 0%, transparent 60%), radial-gradient(90% 60% at 0% 100%, color-mix(in srgb, var(--t2) 70%, transparent) 0%, transparent 70%), linear-gradient(180deg, color-mix(in srgb, var(--t2) 55%, #070A1A) 0%, #070A1A 75%); }
body.has-player .gc { padding-bottom: 92px; }
.gc.k-brief { background: radial-gradient(120% 80% at 100% 0%, #FF8A1F 0%, #C24A12 28%, transparent 60%), radial-gradient(100% 70% at 0% 100%, #2632C9 0%, transparent 70%), #0B0E2A; }
.gc.k-end, .gc.k-news { background: radial-gradient(110% 70% at 50% 0%, #2632C9 0%, transparent 60%), #070A1A; }
.gc-bg { position: absolute; inset: -40px; z-index: 0; background-size: cover; background-position: center; filter: blur(34px) brightness(.32) saturate(1.4); }
.gc > :not(.gc-bg) { position: relative; z-index: 1; }
.gc-inner { flex: 1; min-width: 0; max-width: 600px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; min-height: 0; }
.gc-inner.center { justify-content: center; }
.gc-top { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.gc-body { display: flex; flex-direction: column; gap: 11px; }

/* الصورة: صورة الخبر نفسه بإطار مستدير وظل، والخلفية نسخة ضبابية منها */
.gc-hero { margin: 0; width: 100%; height: 100%; max-height: 40vh; min-height: 120px; border-radius: 22px; overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.08); }
.gc-hero img { width: 100%; height: 100%; object-fit: cover; }
.gc-poster { display: none; }
.gc.noimg .gc-poster { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.gc-orb { position: relative; width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--t1) 90%, #fff 10%), var(--t2) 75%); box-shadow: 0 0 0 10px color-mix(in srgb, var(--t1) 14%, transparent), 0 0 0 22px color-mix(in srgb, var(--t1) 7%, transparent), 0 24px 60px color-mix(in srgb, var(--t1) 45%, transparent); }
.gc-orb::after { content: ''; position: absolute; inset: -34px; border-radius: 50%; border: 2px solid transparent; border-top-color: rgba(255,138,31,.85); border-inline-start-color: rgba(255,138,31,.25); transform: rotate(-30deg); }
.gc-orb svg { width: 56px; height: 56px; stroke-width: 1.5; }
.gc-poster b { font-size: 16px; font-weight: 700; margin-top: 18px; }
.gc-poster span { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: rgba(255,255,255,.7); }
.gc-poster span svg { width: 15px; height: 15px; }
@media (max-height: 700px) { .gc-orb { width: 96px; height: 96px; } .gc-orb svg { width: 42px; height: 42px; } .gc-poster b { margin-top: 10px; } }

.gc-kick { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12.5px; align-items: center; }
.gc-kick > span { display: inline-flex; align-items: center; gap: 5px; background: rgba(255,255,255,.13); padding: 3px 10px; border-radius: 999px; color: rgba(255,255,255,.92); }
.gc-kick svg { width: 14px; height: 14px; }
.gc-kick .gc-type { background: #fff; color: #0E1330; font-weight: 700; }
.gc-kick .gc-type svg { color: #FF8A1F; fill: #FF8A1F; stroke: none; }
.gc.k-podcast .gc-kick .gc-type, .gc.k-brief .gc-kick .gc-type { background: #FF8A1F; color: #fff; }
.gc-kick .gc-local { background: rgba(255,138,31,.22); color: #FFD2A8; }
.gc-title { margin: 0; font-size: 25px; line-height: 1.45; font-weight: 700; letter-spacing: -.01em; text-wrap: pretty; }
.gc-title.lg { font-size: 28px; }
.gc-title.xl { font-size: 32px; line-height: 1.38; }
.gc-title.sm { font-size: 21px; }
.gc-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.gc-points li { position: relative; padding-inline-start: 18px; font-size: 15.5px; line-height: 1.6; color: rgba(255,255,255,.88); }
.gc-points li::before { content: ''; position: absolute; inset-inline-start: 0; top: .6em; width: 8px; height: 8px; border-radius: 50%; background: #FF8A1F; box-shadow: 0 0 0 3px rgba(255,138,31,.2); }
.gc-sum { margin: 0; font-size: 15.5px; line-height: 1.7; color: rgba(255,255,255,.85); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.gc-src { display: flex; gap: 8px; align-items: center; font-size: 13.5px; color: rgba(255,255,255,.7); min-width: 0; }
.gc-src b { color: #fff; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 48%; }
.gc-also { color: rgba(255,255,255,.6); white-space: nowrap; }
.gc-dot { width: 3px; height: 3px; border-radius: 50%; background: rgba(255,255,255,.5); flex: none; }
.src-badge { position: relative; width: 22px; height: 22px; border-radius: 7px; background: rgba(255,255,255,.92); display: grid; place-items: center; overflow: hidden; flex: none; }
.src-badge i { font-style: normal; font-size: 12px; font-weight: 700; color: #1B2390; }
.src-badge img { position: absolute; inset: 3px; width: 16px; height: 16px; background: #fff; }
.gc-orig { font-size: 12.5px; color: rgba(255,255,255,.5); text-align: start; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gc-cover { position: relative; height: 100%; max-height: 36vh; aspect-ratio: 1; border-radius: 24px; overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,.5); background: linear-gradient(145deg, #FF8A1F, #8E2F0E); }
.gc-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.gc-cover-ph { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,.75); }
.gc-cover-ph svg { width: 40%; height: 40%; stroke-width: 1.3; }
.gc-play { position: absolute; z-index: 2; inset-inline-start: 12px; bottom: 12px; width: 58px; height: 58px; border-radius: 50%; border: 0; background: #FF8A1F; color: #fff; display: grid; place-items: center; box-shadow: 0 8px 22px rgba(255,138,31,.5); cursor: pointer; }
.gc-play svg { width: 24px; height: 24px; }
.gc-video { position: relative; width: 100%; aspect-ratio: 16/9; border-radius: 20px; overflow: hidden; border: 0; padding: 0; background: #000; cursor: pointer; display: block; box-shadow: 0 24px 60px rgba(0,0,0,.5); }
.gc-video img { width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.gc-video .gc-play { inset-inline-start: calc(50% - 29px); bottom: calc(50% - 29px); }
.gc-video iframe { width: 100%; height: 100%; border: 0; }
.gc-rail { position: absolute !important; inset-inline-end: 10px; bottom: 22px; display: flex; flex-direction: column; gap: 14px; align-items: center; z-index: 3 !important; }
body.has-player .gc-rail { bottom: 96px; }
.gc-rail button { border: 0; background: none; color: #fff; display: grid; justify-items: center; gap: 4px; font-size: 11px; font-weight: 500; cursor: pointer; text-shadow: 0 1px 4px rgba(0,0,0,.5); }
.gc-rail svg { width: 46px; height: 46px; padding: 12px; border-radius: 16px; background: rgba(255,255,255,.13); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); transition: transform .12s; }
.gc-rail button:active svg { transform: scale(.88); }
.gc-rail button.on svg { background: #FF8A1F; fill: #fff; box-shadow: none; }
.gc-stamp { position: absolute !important; top: calc(env(safe-area-inset-top, 0px) + 110px); z-index: 4 !important; padding: 8px 18px; border: 3px solid; border-radius: 14px; font-size: 22px; font-weight: 700; opacity: 0; pointer-events: none; }
.gc-stamp.more { inset-inline-end: 24px; color: #FFB46B; border-color: #FFB46B; transform: rotate(8deg); background: rgba(10,14,40,.5); }
.gc-stamp.less { inset-inline-start: 24px; color: #FF9AA6; border-color: #FF9AA6; transform: rotate(-8deg); background: rgba(10,14,40,.5); }
.gc-burst { position: absolute !important; inset: 0; margin: auto; width: 120px; height: 120px; z-index: 5 !important; pointer-events: none; animation: burst .7s ease-out forwards; }
.gc-burst svg { width: 100%; height: 100%; fill: #FF8A1F; stroke: #fff; stroke-width: 1; }
@keyframes burst { 0% { transform: scale(.3); opacity: 0; } 30% { transform: scale(1.15); opacity: 1; } 100% { transform: scale(1); opacity: 0; } }
.gc-done { width: 72px; height: 72px; border-radius: 50%; background: #FF8A1F; display: grid; place-items: center; font-size: 34px; font-weight: 700; box-shadow: 0 12px 30px rgba(255,138,31,.45); }
.gc-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 4px; }
.gc-stats div { background: rgba(255,255,255,.1); border-radius: 14px; padding: 10px 6px; text-align: center; }
.gc-stats b { display: block; font-size: 22px; }
.gc-stats span { font-size: 12px; color: rgba(255,255,255,.7); }
.gc-learn { margin: 0; font-size: 14px; color: #C9D0FF; }
.gc .btn { min-height: 44px; }
.gc .btn:not(.amber) { background: rgba(255,255,255,.14); color: #fff; }
.gc .btn.ghost { background: transparent; }
.gc .spin { color: #fff; }

.coach { position: fixed; inset: 0; z-index: 80; background: rgba(4,6,20,.7); display: grid; place-items: end center; padding: 16px 16px calc(var(--safe-b) + 24px); animation: fade .2s; }
.coach-card { width: 100%; max-width: 420px; background: var(--surface); color: var(--ink); border-radius: 24px; padding: 20px; display: grid; gap: 12px; }
.coach-card h3 { margin: 0 0 2px; font-size: 20px; }
.coach-row { display: flex; gap: 12px; align-items: center; }
.coach-row b { display: block; font-weight: 500; }
.coach-row small { color: var(--muted); }
.coach-ic { width: 42px; height: 42px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 20px; flex: none; }
@media (min-width: 720px) { .gc { padding-inline: calc(50vw - 320px); padding-inline-end: calc(50vw - 320px + 80px); } .gc-rail { inset-inline-end: calc(50vw - 340px); } }

/* ---------- صفحة الإيجاز: معاينة ما سيأتي ---------- */
.preview-list { counter-reset: n; display: grid; gap: 0; }
.preview-list .pv-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.preview-list .pv-row:last-child { border-bottom: 0; }
.preview-list .pv-row::before { counter-increment: n; content: counter(n, arabic-indic); flex: none; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 14px; }
.preview-list .pv-row b { font-weight: 500; font-size: 15px; line-height: 1.55; display: block; }
.preview-list .pv-row small { color: var(--muted); font-size: 12.5px; }
.voice-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 4px 0 8px; }
.voice-chips::-webkit-scrollbar { display: none; }
.past { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.past:last-child { border-bottom: 0; }
.past .pp { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--amber-soft); color: var(--amber); display: grid; place-items: center; cursor: pointer; flex: none; }
.past .pp svg { width: 18px; height: 18px; }

/* ---------- إصلاحات ---------- */
input[type="time"].input { -webkit-appearance: none; appearance: none; display: block; min-width: 0; max-width: 100%; min-height: 48px; text-align: start; }
input[type="time"].input::-webkit-date-and-time-value { text-align: start; }
.card .src-line { display: inline-flex; align-items: center; gap: 6px; }
.card .src-badge { width: 18px; height: 18px; border-radius: 5px; background: var(--surface-2); }
.card .src-badge img { inset: 2px; width: 14px; height: 14px; }
.card .src-badge i { font-size: 10px; color: var(--accent); }
.card .hot { color: var(--amber); font-weight: 700; display: inline-flex; align-items: center; gap: 3px; }
.card .hot svg { width: 13px; height: 13px; fill: currentColor; stroke: none; }
.card { border-inline-start: 4px solid var(--t1, transparent); }
.card .marks svg { width: 14px; height: 14px; }
/* الملخص: ثلاثة أسطر في البطاقة المصوّرة، وأربعة في البطاقة النصية */
.gc:not(.noimg) .gc-sum { -webkit-line-clamp: 3; }
.gc-body .gc-sum + .gc-points { margin-top: 2px; }
.gc-body .gc-points li { font-size: 14.5px; color: rgba(255,255,255,.8); }
.card p { -webkit-line-clamp: 3; }

/* ================= بطاقات القائمة: مقاس وخط موحّدان ================= */
.list .card { display: block; padding: 14px; border-inline-start: 0; position: relative; overflow: hidden; }
.list .card::before { content: ''; position: absolute; inset-block: 14px; inset-inline-start: 0; width: 3px; border-radius: 3px; background: var(--t1, var(--accent)); }
.list .card .row { display: flex; gap: 12px; align-items: flex-start; }
.list .card .body { flex: 1; min-width: 0; }
.list .card .kicker { flex-wrap: nowrap; overflow: hidden; white-space: nowrap; gap: 6px; margin-bottom: 6px; }
.list .card .kicker .src-line { min-width: 0; overflow: hidden; }
.list .card .kicker .sname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .card .kicker .when { flex: none; color: var(--muted); }
.list .card .kicker .when::before { content: '·'; margin-inline-end: 6px; }
.list .card h3 { font-size: 16px; line-height: 1.55; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; unicode-bidi: plaintext; text-align: start; }
.list .card p { font-size: 14px; line-height: 1.65; -webkit-line-clamp: 2; margin-top: 4px; }
.list .card .meta { display: flex; gap: 10px; margin-top: 8px; font-size: 12px; color: var(--muted); align-items: center; flex-wrap: wrap; }
.list .card .meta span { display: inline-flex; align-items: center; gap: 4px; }
.list .card .meta svg { width: 14px; height: 14px; }
.list .card .meta .on { color: var(--accent); }
.list .card .tile { position: relative; width: 88px; height: 88px; border-radius: 14px; overflow: hidden; flex: none; display: grid; place-items: center;
  background: radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--t1, #3346FF) 85%, #fff 15%), var(--t2, #1B2390)); color: #fff; }
.list .card .tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.list .card .tile svg { width: 34px; height: 34px; stroke-width: 1.5; }
.list .card .tile:not(.ph) svg { opacity: 0; }
.list .card.feature .hero-img { margin: -14px -14px 12px; height: 190px; }
.list .card.feature .hero-img img { width: 100%; height: 100%; object-fit: cover; }
.list .card.feature h3 { font-size: 19px; font-weight: 700; }
.list .card.seen h3 { color: var(--ink-2); font-weight: 500; }
.list .card .marks { display: none; }

/* ================= قالب اللمحة الموحّد ================= */
.gc { padding: calc(env(safe-area-inset-top, 0px) + 64px) 18px 20px; padding-inline-end: 78px; }
.gc .gc-inner { justify-content: flex-start; gap: 12px; }
.gc-top, .gc-poster, .gc-hero, .gc-cover, .gc-body { display: none !important; }
/* إطار الوسائط: المقاس نفسه في كل البطاقات */
.gf { position: relative; flex: none; width: 100%; height: clamp(150px, 34%, 300px); border-radius: 22px; overflow: hidden; border: 0; padding: 0; display: block;
  background: radial-gradient(circle at 75% 20%, color-mix(in srgb, var(--t1) 90%, #fff 10%), var(--t2) 80%); box-shadow: 0 20px 50px rgba(0,0,0,.4), 0 0 0 1px rgba(255,255,255,.08); }
.gf > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gf.gc-video { background: #000; cursor: pointer; aspect-ratio: auto; }
.gf.gc-video img { opacity: .9; }
.gf.gc-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.gf-cover { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: #fff; overflow: hidden; }
.gf-cover::before { content: ''; position: absolute; width: 150%; aspect-ratio: 2; bottom: -62%; border-radius: 50%; border: 2px solid rgba(255,138,31,.55); border-bottom: 0; }
.gf-cover::after { content: ''; position: absolute; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.18), transparent 65%); top: -60px; inset-inline-end: -40px; }
.gf-cover svg { width: 54px; height: 54px; stroke-width: 1.4; position: relative; z-index: 1; }
.gf-cover b { font-size: 15px; font-weight: 700; position: relative; z-index: 1; opacity: .95; }
.gf-pod .gf-blur { position: absolute; inset: -30px; background-size: cover; background-position: center; filter: blur(22px) brightness(.55); }
.gf-pod .gf-art { position: absolute; top: 12px; bottom: 12px; inset-inline-start: 50%; transform: translateX(-50%); height: calc(100% - 24px); aspect-ratio: 1; width: auto; border-radius: 14px; object-fit: cover; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
[dir="rtl"] .gf-pod .gf-art { transform: translateX(50%); }
.gf .gc-play { z-index: 2; }
.gc.k-podcast .gf { background: linear-gradient(145deg, #FF8A1F, #8E2F0E); }
/* النص: مقاسات ثابتة في كل البطاقات */
.gc .gc-title, .gc .gc-title.lg, .gc .gc-title.xl, .gc .gc-title.sm { font-size: 24px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 0; unicode-bidi: plaintext; text-align: start; }
.gc .gc-sum { font-size: 15.5px; line-height: 1.7; -webkit-line-clamp: 4 !important; unicode-bidi: plaintext; text-align: start; }
.gc .muted-sum { color: rgba(255,255,255,.5); font-size: 14px; }
.gc-fill { flex: 1; min-height: 0; }
.gc .gc-points { display: none; }
.gc .gc-kick { flex-wrap: nowrap; overflow: hidden; }
.gc .gc-kick > span { flex: none; white-space: nowrap; }
.gc .gc-kick .gc-cat { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.gc .gc-src { padding-top: 10px; border-top: 1px solid rgba(255,255,255,.1); }
@media (max-height: 700px) { .gf { height: 28%; } .gc .gc-title { font-size: 21px; } .gc .gc-sum { -webkit-line-clamp: 3 !important; } }

/* ================= اللمحة الراعية ================= */
.gc.gc-ad { --t1: #FF8A1F; --t2: #3A1F6E; }
.gc-ad .gf { background: radial-gradient(circle at 70% 25%, #FFB15C, #C24A12 55%, #3A1F6E); }
.ad-cover .ad-mono { position: relative; z-index: 1; width: 76px; height: 76px; border-radius: 22px; background: #fff; color: #C24A12; display: grid; place-items: center; font-size: 36px; font-weight: 700; box-shadow: 0 10px 30px rgba(0,0,0,.3); }
.ad-cover .ad-logo { position: relative; z-index: 1; width: 84px; height: 84px; border-radius: 22px; object-fit: contain; background: #fff; padding: 8px; }
.gc .gc-kick .ad-badge { background: transparent; color: #FFB15C; box-shadow: inset 0 0 0 1.5px #FFB15C; }
.gc .gc-kick .ad-prev { background: rgba(255,255,255,.9); color: #0E1330; font-weight: 700; }
.gc .ad-cta { align-self: flex-start; gap: 6px; }
.gc .ad-cta svg { width: 16px; height: 16px; }
.ad-why { margin-inline-start: auto; border: 0; background: none; color: rgba(255,255,255,.55); font-size: 12px; text-decoration: underline; cursor: pointer; padding: 0; }
.gc-ad .gc-stamp.more { color: #C9D0FF; border-color: #C9D0FF; }
.ad-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 4px 0 12px; }
.ad-stats div { background: var(--surface-2); border-radius: 12px; padding: 8px 4px; text-align: center; }
.ad-stats b { display: block; font-size: 16px; }
.ad-stats span { font-size: 11px; color: var(--muted); }
.gc.gc-ad { padding-inline-end: 18px; }

/* =====================================================================
   لمحة ٢: اليوم، القصة، المتابعة، الإشعارات، اللعبة، الأسبوع، الملفات، الفرق
   ===================================================================== */
.spacer { flex: 1; }
.icon-btn.sm { width: 34px; height: 34px; }
.icon-btn.sm svg { width: 17px; height: 17px; }
.icon-btn.bell { position: relative; }
.icon-btn.bell i { position: absolute; top: -3px; inset-inline-end: -3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--amber); color: #fff; font: 700 11px/18px 'Readex', sans-serif; font-style: normal; text-align: center; }

/* ---------- اليوم ---------- */
.td-head { display: flex; align-items: center; gap: 10px; padding: calc(env(safe-area-inset-top, 0px) + 16px) 0 6px; }
.td-head h1 { margin: 0; font-size: 27px; letter-spacing: -.01em; }
.td-head .date { color: var(--muted); font-size: 13px; }
.pulse { margin: 8px 0 14px; padding: 14px 16px; border-radius: 20px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, var(--surface)), var(--surface)); box-shadow: var(--shadow); }
.pulse-t { font-size: 14px; color: var(--ink-2); font-weight: 500; }
.pulse-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pchip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; font-size: 14px; font-weight: 600; }
.pchip::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pchip.amber { background: var(--amber-soft); color: var(--amber); }
.pchip.blue { background: var(--accent-soft); color: var(--accent); }
.pchip.violet { background: color-mix(in srgb, #7B5CFF 14%, var(--surface)); color: #6A4CF0; }
.sec { margin: 22px 0 6px; }
.sec-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 18px 2px 8px; }
.sec-h h2 { margin: 0; font-size: 17px; font-weight: 700; }
.sec-h a { font-size: 14px; color: var(--accent); font-weight: 500; }
.list-rows { display: flex; flex-direction: column; gap: 10px; }
.srow { display: flex; gap: 12px; align-items: flex-start; padding: 12px; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); color: var(--ink); position: relative; }
.srow .tile { position: relative; width: 64px; height: 64px; border-radius: 14px; overflow: hidden; flex: none; display: grid; place-items: center; color: #fff;
  background: radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--t1, #3346FF) 85%, #fff 15%), var(--t2, #1B2390)); }
.srow .tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.srow .tile svg { width: 28px; height: 28px; stroke-width: 1.5; }
.srow .tile:not(.ph) svg { opacity: 0; }
.srow-b { flex: 1; min-width: 0; display: grid; gap: 3px; }
.srow-b b { font-size: 15.5px; line-height: 1.55; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.srow-b small { font-size: 13px; color: var(--ink-2); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.srow-u { display: flex !important; gap: 5px; align-items: flex-start; color: var(--amber) !important; font-weight: 500; }
.srow-u svg { width: 14px; height: 14px; flex: none; margin-top: 3px; fill: currentColor; stroke: none; }
.srow-k { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.srow-k span { display: inline-flex; align-items: center; gap: 4px; }
.srow-k svg { width: 13px; height: 13px; }
.srow-k .when { margin-inline-start: auto; }
.badge-new { background: var(--amber); color: #fff !important; padding: 1px 8px; border-radius: 999px; font-weight: 700; }
.badge-off { display: inline-flex; align-items: center; gap: 4px; background: color-mix(in srgb, #5C7CFF 14%, transparent); color: #4A63E8 !important; padding: 1px 8px; border-radius: 999px; font-weight: 600; font-size: 12px; }
.badge-off svg { width: 12px; height: 12px; }
.badge-off.sm { font-size: 11px; padding: 0 6px; }
.badge-team { background: var(--accent-soft); color: var(--accent); font-size: 11px; padding: 1px 7px; border-radius: 999px; font-weight: 600; }
.fbtn { flex: none; align-self: center; width: 38px; height: 38px; border-radius: 12px; border: 0; background: var(--surface-2); color: var(--ink-2); display: grid; place-items: center; cursor: pointer; }
.fbtn svg { width: 19px; height: 19px; }
.fbtn.on { background: var(--accent); color: #fff; }
.hrow { display: grid; gap: 4px; padding: 12px 14px; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); color: var(--ink); }
.hrow.flat { box-shadow: none; padding: 8px 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.hrow.flat:last-child { border-bottom: 0; }
.hrow b { font-weight: 600; font-size: 15px; line-height: 1.55; }
.hrow small { color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.hrow .term { justify-self: start; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 2px 9px; border-radius: 999px; }
.hrow .term.off { color: #4A63E8; background: color-mix(in srgb, #5C7CFF 13%, transparent); }
.hrow .term svg { width: 12px; height: 12px; }
.empty-mini { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); color: var(--ink-2); font-size: 14px; line-height: 1.6; }
.empty-mini .btn { flex: none; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 22px 0 10px; }
.tcard { display: grid; gap: 4px; padding: 14px; border-radius: 20px; color: #fff; min-height: 118px; align-content: end; position: relative; overflow: hidden; }
.tcard.quiz { background: radial-gradient(circle at 85% 10%, #FFB15C, #E2731A 45%, #8E2F0E); }
.tcard.week { background: radial-gradient(circle at 85% 10%, #7C8BFF, #3346FF 45%, #141A6E); }
.tcard b { font-size: 16px; }
.tcard small { font-size: 12.5px; opacity: .88; line-height: 1.5; }
.tc-ic { position: absolute; top: 12px; inset-inline-start: 12px; width: 34px; height: 34px; border-radius: 11px; background: rgba(255,255,255,.2); display: grid; place-items: center; }
.tc-ic svg { width: 19px; height: 19px; }
.cta-glance { display: flex; align-items: center; gap: 12px; padding: 16px; margin: 4px 0 8px; border-radius: 22px; color: #fff; background: radial-gradient(120% 140% at 100% 0%, #4C5DFF 0%, #2632C9 45%, #141A6E 100%); box-shadow: 0 12px 30px rgba(39,52,210,.25); }
.cta-glance > span { width: 46px; height: 46px; border-radius: 14px; background: #FF8A1F; display: grid; place-items: center; flex: none; }
.cta-glance > span svg { width: 24px; height: 24px; }
.cta-glance div { flex: 1; display: grid; }
.cta-glance b { font-size: 17px; }
.cta-glance small { opacity: .85; font-size: 13px; }
.cta-glance > svg { width: 20px; height: 20px; opacity: .8; }

/* ---------- صفحة القصة ---------- */
.st-bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px; padding: calc(env(safe-area-inset-top, 0px) + 10px) 0 8px; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); margin: 0 -16px; padding-inline: 16px; }
.st-bar #stAct, .st-bar #dAct { display: flex; gap: 8px; align-items: center; }
.btn.on-follow { background: var(--accent-soft); color: var(--accent); }
.story h1 { font-size: 26px; line-height: 1.45; margin: 8px 0 12px; letter-spacing: -.01em; }
.st-kick { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 12.5px; color: var(--muted); }
.since { background: var(--amber-soft); border-radius: 16px; padding: 12px 14px; margin: 0 0 14px; }
.since b { display: flex; align-items: center; gap: 6px; color: var(--amber); font-size: 14px; }
.since b svg { width: 15px; height: 15px; fill: currentColor; stroke: none; }
.since p { margin: 6px 0 0; font-size: 15px; line-height: 1.7; }
.since small { color: var(--muted); }
.st-hero { width: 100%; max-height: 230px; object-fit: cover; border-radius: 18px; margin: 4px 0 12px; }
.st-sum { font-size: 17.5px; line-height: 1.85; color: var(--ink-2); margin: 0 0 14px; }
.why { border-radius: 18px; padding: 14px 16px; margin: 0 0 8px; background: linear-gradient(135deg, var(--accent-soft), color-mix(in srgb, var(--amber-soft) 60%, var(--surface))); }
.why b { display: flex; align-items: center; gap: 6px; color: var(--accent); font-size: 14px; }
.why b svg { width: 16px; height: 16px; }
.why p { margin: 6px 0 4px; font-size: 15.5px; line-height: 1.75; }
.why small { color: var(--muted); font-size: 12px; }
.st-sec { margin: 24px 0 0; }
.st-sec h2 { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 17px; margin: 0 0 10px; }
.st-sec h2 svg { width: 18px; height: 18px; color: var(--accent); align-self: center; }
.st-sec h2 small { font-size: 12.5px; color: var(--muted); font-weight: 400; }
.points { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; counter-reset: p; }
.points li { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.points .pt { width: 100%; border: 0; background: none; text-align: start; padding: 12px 14px; display: grid; gap: 6px; cursor: pointer; font-size: 15.5px; line-height: 1.7; color: var(--ink); }
.pt-src { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); }
.pt-src i { font-style: normal; background: var(--surface-2); padding: 1px 8px; border-radius: 999px; }
.pt-src svg { width: 15px; height: 15px; color: #1FA7A0; margin-inline-start: auto; }
.pt-src em { margin-inline-start: auto; font-style: normal; color: var(--muted); }
.points li.unv .pt { color: var(--ink-2); }
.points li.open { box-shadow: 0 0 0 2px var(--accent-soft), var(--shadow); }
.pt-q { padding: 0 14px 12px; display: grid; gap: 6px; }
.pt-q blockquote { margin: 0; padding: 8px 12px; border-inline-start: 3px solid var(--amber); background: var(--surface-2); border-radius: 0 10px 10px 0; font-size: 14.5px; line-height: 1.7; color: var(--ink-2); }
.pt-q a { font-size: 13px; display: inline-flex; gap: 4px; align-items: center; }
.pt-q a svg { width: 13px; height: 13px; }
.angle { font-size: 15.5px; line-height: 1.75; color: var(--ink-2); margin: 10px 2px 0; }
.timeline { list-style: none; margin: 0; padding: 0 14px 0 0; border-inline-start: 2px solid var(--line); padding-inline-start: 16px; }
.timeline li { position: relative; padding: 0 0 14px; }
.timeline li::before { content: ''; position: absolute; inset-inline-start: -22px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.timeline li.new::before { background: var(--amber); box-shadow: 0 0 0 4px var(--amber-soft); }
.timeline time { font-size: 12px; color: var(--muted); }
.timeline p { margin: 2px 0 0; font-size: 15px; line-height: 1.65; }
.qchips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.qchips .chip { white-space: normal; text-align: start; line-height: 1.5; }
.answer { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); padding: 12px 14px; margin-top: 10px; }
.answer b { font-size: 14px; color: var(--accent); }
.answer p { margin: 6px 0; font-size: 15.5px; line-height: 1.75; }
.answer blockquote { margin: 0 0 6px; padding: 6px 10px; border-inline-start: 3px solid var(--amber); background: var(--surface-2); font-size: 14px; }
.answer .cites { display: flex; gap: 8px; flex-wrap: wrap; font-size: 12.5px; }
.sources { display: grid; gap: 8px; }
.srcrow { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); color: var(--ink); }
.srcrow .src-badge { width: 26px; height: 26px; border-radius: 8px; background: var(--surface-2); margin-top: 2px; }
.srcrow .src-badge img { inset: 4px; width: 18px; height: 18px; }
.srcrow .src-badge i { color: var(--accent); }
.srcrow div { flex: 1; min-width: 0; display: grid; gap: 2px; }
.srcrow b { font-size: 13.5px; }
.srcrow span { font-size: 14px; line-height: 1.6; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.srcrow .orig { font-size: 12.5px; color: var(--muted); -webkit-line-clamp: 1; }
.srcrow small { color: var(--muted); font-size: 11.5px; text-align: end; flex: none; line-height: 1.6; }
.st-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 24px 0 6px; }
.st-actions .btn { padding: 10px 6px; font-size: 13.5px; }
.story-link { display: flex; align-items: center; gap: 10px; padding: 12px 14px; margin: 4px 0 12px; border-radius: 16px; background: var(--accent-soft); color: var(--ink); }
.story-link > span { width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; }
.story-link > span svg { width: 18px; height: 18px; }
.story-link div { flex: 1; display: grid; }
.story-link small { color: var(--ink-2); font-size: 12.5px; }
.story-link > svg { width: 18px; height: 18px; color: var(--accent); }

/* ---------- تبويبات الصفحات ---------- */
.segtabs { display: flex; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 14px; margin: 8px 0 14px; }
.segtabs a { flex: 1; text-align: center; padding: 8px 6px; border-radius: 11px; color: var(--ink-2); font-size: 14px; font-weight: 500; display: inline-flex; justify-content: center; align-items: center; gap: 6px; }
.segtabs a.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.segtabs i { font-style: normal; font-size: 11px; background: var(--amber); color: #fff; border-radius: 999px; padding: 0 6px; }

/* ---------- المراقبة ---------- */
.wrow { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.wrow:last-child { border-bottom: 0; }
.wrow .t { flex: 1; min-width: 0; display: grid; }
.wrow .t b { font-weight: 600; }
.wrow .t small { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wcount { display: grid; text-align: center; font-weight: 700; font-size: 18px; color: var(--accent); line-height: 1.1; }
.wcount small { font-size: 10.5px; color: var(--muted); font-weight: 400; }

/* ---------- الإشعارات ---------- */
.push-ask { text-align: center; padding: 6px 4px; }
.pa-ic { width: 64px; height: 64px; border-radius: 20px; margin: 4px auto 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.pa-ic svg { width: 30px; height: 30px; }
.push-ask p { color: var(--ink-2); line-height: 1.7; }
.push-ask .btn { margin-top: 6px; }
.push-hint { padding: 12px 16px; display: flex; gap: 12px; align-items: center; }
.push-hint p { margin: 0; font-size: 14px; color: var(--ink-2); line-height: 1.6; display: flex; gap: 6px; }
.push-hint p svg { width: 18px; height: 18px; flex: none; color: var(--accent); }
.nrow { display: flex; gap: 12px; padding: 12px 14px; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); color: var(--ink); }
.nrow.unread { box-shadow: inset 3px 0 0 var(--amber), var(--shadow); }
.nrow div { flex: 1; min-width: 0; display: grid; gap: 2px; }
.nrow small { color: var(--muted); font-size: 12px; }
.nrow b { font-weight: 600; font-size: 15px; line-height: 1.5; }
.nrow p { margin: 0; font-size: 14px; color: var(--ink-2); line-height: 1.6; }
.nk { width: 36px; height: 36px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.nk.story, .nk.evening { background: var(--amber-soft); color: var(--amber); }
.nk svg { width: 18px; height: 18px; }

/* ---------- اللعبة ---------- */
.qz { background: var(--surface); border-radius: 22px; box-shadow: var(--shadow); padding: 18px; }
.qz-prog { display: flex; gap: 4px; margin-bottom: 14px; }
.qz-prog i { flex: 1; height: 5px; border-radius: 5px; background: var(--line); }
.qz-prog i.done { background: var(--accent); }
.qz-prog i.on { background: var(--amber); }
.qz-n { font-size: 13px; color: var(--muted); }
.qz h2 { font-size: 21px; line-height: 1.55; margin: 6px 0 16px; }
.qz-opts { display: grid; gap: 10px; }
.qz-opt { text-align: start; border: 1.5px solid var(--line); background: var(--surface); border-radius: 14px; padding: 13px 14px; font-size: 15.5px; cursor: pointer; transition: .15s; }
.qz-opt:active, .qz-opt.picked { border-color: var(--accent); background: var(--accent-soft); }
.qz-res { text-align: center; padding: 18px; background: radial-gradient(circle at 80% 0%, #FFB15C, #E2731A 50%, #8E2F0E); color: #fff; border-radius: 24px; }
.qz-score { display: flex; align-items: baseline; justify-content: center; gap: 6px; }
.qz-score b { font-size: 64px; line-height: 1; }
.qz-score span { font-size: 18px; opacity: .85; }
.qz-res p { margin: 8px 0; font-size: 16px; }
.qz-meta { display: flex; justify-content: center; gap: 12px; font-size: 13px; opacity: .95; margin-bottom: 10px; }
.qz-meta span { display: inline-flex; align-items: center; gap: 4px; }
.qz-meta svg { width: 14px; height: 14px; fill: currentColor; stroke: none; }
.qz-res .btn { background: rgba(255,255,255,.2); color: #fff; }
.qz-rev { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; }
.qz-rev li { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); padding: 12px 14px; display: grid; gap: 4px; border-inline-start: 4px solid var(--line); }
.qz-rev li.ok { border-inline-start-color: #1FA7A0; }
.qz-rev li.no { border-inline-start-color: var(--danger); }
.qz-rev p { margin: 0; font-weight: 600; }
.qz-rev small { color: var(--ink-2); line-height: 1.6; }
.qz-rev a { font-size: 13px; display: inline-flex; align-items: center; gap: 4px; }
.qz-rev a svg { width: 14px; height: 14px; }

/* ---------- الأسبوع ---------- */
.wk-intro { font-size: 18px; line-height: 1.8; color: var(--ink-2); margin: 0 0 14px; }
.wk-sec { display: flex; gap: 12px; padding: 14px; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); color: var(--ink); }
.wk-n { width: 32px; height: 32px; border-radius: 10px; flex: none; display: grid; place-items: center; color: #fff; font-weight: 700; background: radial-gradient(circle at 30% 25%, var(--t1, #3346FF), var(--t2, #1B2390)); }
.wk-sec div { display: grid; gap: 4px; }
.wk-sec p { margin: 0; font-size: 14.5px; line-height: 1.7; color: var(--ink-2); }
.wk-sec small { color: var(--muted); font-size: 12px; }
.wk-w { margin: 6px 0; padding-inline-start: 14px; position: relative; line-height: 1.7; }
.wk-w::before { content: ''; position: absolute; inset-inline-start: 0; top: .7em; width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }

/* ---------- الملفات والفرق ---------- */
.dcard { display: flex; gap: 12px; padding: 14px; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); color: var(--ink); }
.dc-ic { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; flex: none; background: var(--accent-soft); color: var(--accent); }
.dc-ic svg { width: 22px; height: 22px; }
.dcard div { flex: 1; min-width: 0; display: grid; gap: 3px; }
.dcard small { color: var(--muted); font-size: 12.5px; }
.dcard p { margin: 2px 0 0; font-size: 14px; color: var(--ink-2); line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.drow { width: 100%; text-align: start; border: 0; background: var(--surface); border-radius: 14px; padding: 12px 14px; display: grid; gap: 2px; cursor: pointer; box-shadow: var(--shadow); }
.drow small { color: var(--muted); }
.dossier h1 { font-size: 28px; margin: 4px 0 6px; }
.ds-k { color: var(--amber); font-weight: 700; font-size: 13px; }
.ds-meta { color: var(--muted); font-size: 13px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.dossier h2 { font-size: 17px; color: var(--accent); margin: 22px 0 8px; }
.ds-sum { font-size: 16.5px; line-height: 1.9; margin: 0; }
.ds-dev { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ds-dev a { display: grid; gap: 3px; padding: 12px 14px; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); color: var(--ink); }
.ds-dev time { font-size: 12px; color: var(--amber); font-weight: 600; }
.ds-dev p { margin: 0; font-size: 14.5px; line-height: 1.7; color: var(--ink-2); }
.ds-dev small { color: var(--accent); font-size: 12.5px; display: inline-flex; align-items: center; gap: 3px; }
.ds-dev small svg { width: 13px; height: 13px; }
.ds-list { margin: 0; padding-inline-start: 20px; line-height: 1.9; }
.ds-foot { font-size: 12.5px; color: var(--muted); margin-top: 22px; }
.invite { display: flex; align-items: center; gap: 10px; padding: 12px 16px; }
.invite div { flex: 1; display: grid; }
.invite small { color: var(--muted); font-size: 12px; }
.invite b { font-size: 22px; letter-spacing: .12em; font-family: ui-monospace, monospace; }

/* ---------- اللمحة: القصة الموثّقة ---------- */
.gc .gc-kick .gc-story { background: rgba(31,167,160,.25); color: #B5F1EC; }
.gc .gc-kick .gc-story svg { width: 13px; height: 13px; }
.gc .gc-kick .gc-off { background: rgba(124,139,255,.3); color: #DCE1FF; }
.gc-vpts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.gc-vpts li { display: flex; gap: 8px; font-size: 15px; line-height: 1.6; color: rgba(255,255,255,.9); }
.gc-vpts li svg { width: 17px; height: 17px; flex: none; margin-top: 4px; color: #6FE3D9; }
.gc-vpts li span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gc-rail button.on svg { background: #FF8A1F; }
.gc-rail button[data-act="follow"].on svg { fill: none; }

/* ---------- الصفحة العامة للقصة ---------- */
body.public { background: var(--bg); }
.pub { max-width: 640px; margin: 0 auto; padding: 24px 18px 40px; }
.pub-brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 20px; color: var(--ink); }
.pub-brand img { width: 32px; height: 32px; border-radius: 9px; }
.pub-kick { margin-top: 22px; color: var(--amber); font-weight: 600; font-size: 13px; }
.pub h1 { font-size: 26px; line-height: 1.45; margin: 6px 0 10px; }
.pub-sum { font-size: 17px; line-height: 1.85; color: var(--ink-2); }
.pub-points { padding: 0; list-style: none; display: grid; gap: 10px; }
.pub-points li { background: var(--surface); border-radius: 16px; padding: 12px 14px; box-shadow: var(--shadow); display: grid; gap: 6px; }
.pub-points blockquote { margin: 0; padding: 6px 10px; border-inline-start: 3px solid var(--amber); background: var(--surface-2); font-size: 14px; color: var(--ink-2); }
.pub-points small a { margin-inline-end: 6px; }
.pub-src { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; font-size: 13px; }
.pub-src a { background: var(--surface); padding: 4px 10px; border-radius: 999px; box-shadow: var(--shadow); }
.pub-cta { margin: 10px 0; }
.pub-foot { text-align: center; color: var(--muted); font-size: 13px; }

/* ---------- الطباعة (ملفات الإحاطة) ---------- */
@media print {
  body { background: #fff; }
  .nav, .player, .st-bar, #ddel, .toast { display: none !important; }
  #app { padding: 0; max-width: none; }
  .ds-dev a, .group { box-shadow: none; border: 1px solid #ddd; }
}

.srcrow .badge-off { display: inline-flex !important; -webkit-line-clamp: unset; font-size: 11px; vertical-align: middle; }
.push-hint .btn, .empty-mini .btn, .sec-h .btn { white-space: nowrap; flex: none; }

/* =====================================================================
   عدسة المجال: هوية لكل مجال داخل هوية لمحة (بلا أخضر ولا بيج)
   الثابت: الشعار، والقالب، والبرتقالي لأفعال اللمحات. المتغيّر: لون التمييز، والنقش، وخط العناوين، وعرض الأرقام.
   ===================================================================== */
.dom-law       { --d1: #9E2B47; --d2: #3A1626; }
.dom-tech      { --d1: #2E5BFF; --d2: #101C66; }
.dom-finance   { --d1: #1F3A6E; --d2: #0D1A33; --dg: #C99A2E; }
.dom-health    { --d1: #1680C4; --d2: #0B3556; --dg: #FF6B5A; }
.dom-policy    { --d1: #3F5F86; --d2: #1C2B3F; --dg: #E08A1E; }
.dom-nonprofit { --d1: #3346FF; --d2: #141A6E; --dg: #FF8A1F; }

:root[data-space="law"]       { --accent: #9E2B47; --accent-soft: #F6E4E9; --sp1: #9E2B47; --sp2: #3A1626; --spg: #D9A35A; }
:root[data-space="tech"]      { --accent: #2E5BFF; --accent-soft: #E3E9FF; --sp1: #2E5BFF; --sp2: #101C66; --spg: #00C2FF; }
:root[data-space="finance"]   { --accent: #1F3A6E; --accent-soft: #E6EBF5; --sp1: #1F3A6E; --sp2: #0D1A33; --spg: #C99A2E; --amber: #B8862A; --amber-soft: #F3EADB; }
:root[data-space="health"]    { --accent: #1680C4; --accent-soft: #E1F1FB; --sp1: #1680C4; --sp2: #0B3556; --spg: #FF6B5A; }
:root[data-space="policy"]    { --accent: #3F5F86; --accent-soft: #E6ECF4; --sp1: #3F5F86; --sp2: #1C2B3F; --spg: #E08A1E; }
:root[data-space="nonprofit"] { --accent: #3346FF; --accent-soft: #E3E6FF; --sp1: #3346FF; --sp2: #141A6E; --spg: #FF8A1F; }
@media (prefers-color-scheme: dark) {
  :root[data-space="law"]:not([data-theme="light"])       { --accent: #E77B95; --accent-soft: #3A1622; }
  :root[data-space="tech"]:not([data-theme="light"])      { --accent: #7C9BFF; --accent-soft: #16234F; }
  :root[data-space="finance"]:not([data-theme="light"])   { --accent: #8FB0F0; --accent-soft: #17253F; --amber: #E2B65A; --amber-soft: #3A2E16; }
  :root[data-space="health"]:not([data-theme="light"])    { --accent: #5CB8F0; --accent-soft: #0F2E44; }
  :root[data-space="policy"]:not([data-theme="light"])    { --accent: #8DAAD0; --accent-soft: #1C2B3F; }
}
:root[data-theme="dark"][data-space="law"] { --accent: #E77B95; --accent-soft: #3A1622; }
:root[data-theme="dark"][data-space="tech"] { --accent: #7C9BFF; --accent-soft: #16234F; }
:root[data-theme="dark"][data-space="finance"] { --accent: #8FB0F0; --accent-soft: #17253F; --amber: #E2B65A; --amber-soft: #3A2E16; }
:root[data-theme="dark"][data-space="health"] { --accent: #5CB8F0; --accent-soft: #0F2E44; }
:root[data-theme="dark"][data-space="policy"] { --accent: #8DAAD0; --accent-soft: #1C2B3F; }

/* خط العناوين: القانون بخط نسخي يذكّر بنصوص الأنظمة */
:root[data-space="law"] .td-head h1, :root[data-space="law"] .story h1, :root[data-space="law"] .gc-title, :root[data-space="law"] .dhero h1, :root[data-space="law"] .srow-b b { font-family: 'Amiri', 'Readex', serif; font-weight: 700; letter-spacing: 0; }
:root[data-space="law"] .gc-title { font-size: 27px; line-height: 1.6; }
:root[data-space="finance"] .gc-title, :root[data-space="finance"] .ln-fig, :root[data-space="finance"] .srow-b b { font-variant-numeric: tabular-nums; }

/* النقوش: تُرسم خلف البطاقات وفي رأس المساحة */
:root[data-space] .gc::after, .motif::after { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0 !important; opacity: .9; }
.motif { position: relative; overflow: hidden; }
.motif > * { position: relative; z-index: 1; }
:root[data-space="law"] .gc::after, :root[data-space="law"] .motif::after { background: repeating-linear-gradient(180deg, transparent 0 31px, rgba(255,255,255,.06) 31px 32px); }
:root[data-space="tech"] .gc::after, :root[data-space="tech"] .motif::after { background: radial-gradient(rgba(255,255,255,.14) 1px, transparent 1.6px) 0 0 / 20px 20px; }
:root[data-space="finance"] .gc::after, :root[data-space="finance"] .motif::after { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 200' preserveAspectRatio='none'%3E%3Cpath d='M0 170 L50 150 L90 160 L140 110 L190 125 L240 80 L290 95 L340 40 L400 55' fill='none' stroke='%23C99A2E' stroke-opacity='.35' stroke-width='2'/%3E%3C/svg%3E") bottom / 100% 45% no-repeat; }
:root[data-space="health"] .gc::after, :root[data-space="health"] .motif::after { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36'%3E%3Cpath d='M18 13v10M13 18h10' stroke='white' stroke-opacity='.10' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); }
:root[data-space="policy"] .gc::after, :root[data-space="policy"] .motif::after { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cg fill='none' stroke='white' stroke-opacity='.08' stroke-width='1.5'%3E%3Ccircle cx='170' cy='30' r='40'/%3E%3Ccircle cx='170' cy='30' r='60'/%3E%3Ccircle cx='170' cy='30' r='80'/%3E%3Ccircle cx='170' cy='30' r='100'/%3E%3C/g%3E%3C/svg%3E") top left / 340px no-repeat; }
:root[data-space="nonprofit"] .gc::after, :root[data-space="nonprofit"] .motif::after { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 300'%3E%3Cpath d='M40 260c50-130 125-200 216-200s166 70 216 200' fill='none' stroke='%23FF8A1F' stroke-opacity='.22' stroke-width='6' stroke-linecap='round'/%3E%3C/svg%3E") center 30% / 120% no-repeat; }
/* البطاقة في المساحة تأخذ تدرّج المجال */
:root[data-space] .gc:not(.gc-ad):not(.k-brief) { background: radial-gradient(120% 70% at 85% 0%, color-mix(in srgb, var(--sp1) 75%, transparent) 0%, transparent 60%), radial-gradient(90% 60% at 0% 100%, color-mix(in srgb, var(--spg) 22%, transparent) 0%, transparent 70%), linear-gradient(180deg, color-mix(in srgb, var(--sp2) 70%, #070A1A) 0%, #070A1A 80%); }
:root[data-space] .gf { background: radial-gradient(circle at 75% 20%, color-mix(in srgb, var(--sp1) 90%, #fff 10%), var(--sp2) 80%); }
:root[data-space] .gl-prog i.on { background: var(--spg); }

/* ---------- مبدّل المساحات ---------- */
.spaces { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 6px -16px 4px; padding: 4px 16px; }
.spaces::-webkit-scrollbar { display: none; }
.sp { flex: none; display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 999px; padding: 6px 12px 6px 14px; font-size: 14px; font-weight: 600; cursor: pointer; transition: .2s; }
.sp svg { width: 17px; height: 17px; }
.sp.on { color: #fff; border-color: transparent; background: linear-gradient(135deg, var(--d1, var(--ink)), var(--d2, var(--ink))); box-shadow: 0 6px 16px color-mix(in srgb, var(--d1, #000) 35%, transparent); }
.sp:not([class*="dom-"]).on { background: var(--ink); color: var(--bg); box-shadow: none; }
.spaces.dark { position: fixed; z-index: 12; top: calc(env(safe-area-inset-top, 0px) + 58px); inset-inline: 0; margin: 0; padding: 0 14px; pointer-events: auto; }
.spaces.dark .sp { background: rgba(7,10,26,.45); border-color: rgba(255,255,255,.12); color: rgba(255,255,255,.8); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding: 4px 10px; font-size: 13px; }
.spaces.dark .sp.on { color: #fff; background: linear-gradient(135deg, var(--d1, #fff), var(--d2, #fff)); }
.spaces.dark .sp:not([class*="dom-"]).on { background: #fff; color: #0E1330; }
body.glance-mode .gl-head ~ .spaces.dark, .gl .spaces.dark { }
:root .gl:has(.spaces.dark) .gc { padding-top: calc(env(safe-area-inset-top, 0px) + 100px); }

/* ---------- رأس المساحة في «اليوم» ---------- */
.dban { display: grid; gap: 10px; margin: 10px 0 0; padding: 14px 16px; border-radius: 22px; color: #fff; background: linear-gradient(140deg, var(--sp1), var(--sp2)); box-shadow: 0 12px 28px color-mix(in srgb, var(--sp1) 30%, transparent); }
.db-top { display: flex; align-items: center; gap: 10px; }
.db-top div { flex: 1; display: grid; }
.db-top small { opacity: .75; font-size: 12px; }
.db-top b { font-size: 18px; }
.db-top > svg { width: 18px; height: 18px; opacity: .8; }
.db-ic { width: 42px; height: 42px; border-radius: 13px; background: rgba(255,255,255,.16); display: grid; place-items: center; flex: none; }
.db-ic svg { width: 22px; height: 22px; }
.db-cal { display: grid; gap: 6px; }
.db-cal span { display: flex; gap: 10px; align-items: baseline; font-size: 14px; line-height: 1.5; }
.db-cal time { flex: none; font-size: 12px; font-weight: 700; color: var(--spg); min-width: 52px; }
.db-p { margin: 0; font-size: 14px; opacity: .9; line-height: 1.6; }
.db-cta { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--spg); }
.db-cta svg { width: 16px; height: 16px; }

/* ---------- صفحة المجال ---------- */
.dhero { margin: 6px 0 4px; padding: 20px 18px; border-radius: 26px; color: #fff; background: linear-gradient(150deg, var(--sp1), var(--sp2)); display: grid; gap: 4px; }
.dhero small { opacity: .75; font-size: 12.5px; }
.dhero h1 { margin: 2px 0; font-size: 28px; line-height: 1.35; }
.dhero p { margin: 0; opacity: .88; font-size: 14.5px; }
.dhero .db-ic { margin-bottom: 6px; }
.dh-q { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; align-items: center; }
.dh-q small { width: 100%; }
.dh-q span { background: rgba(255,255,255,.14); border-radius: 999px; padding: 4px 10px; font-size: 12.5px; }
.dw-sec { margin: 12px 0; }
.dw-sec h3 { margin: 0 0 6px; font-size: 14px; color: var(--accent); }
.dw-sec a { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--ink); font-size: 14.5px; line-height: 1.65; }
.dw-sec a:last-child { border-bottom: 0; }
.dw-sec a svg { width: 16px; height: 16px; flex: none; margin-top: 4px; color: var(--muted); }
.term-card { margin: 12px 0; padding: 14px; border-radius: 16px; background: var(--accent-soft); display: grid; gap: 4px; }
.term-card small { color: var(--accent); font-weight: 700; font-size: 12px; }
.term-card b { font-size: 20px; }
.term-card p { margin: 0; font-size: 14.5px; line-height: 1.75; color: var(--ink-2); }
.term-card a { font-size: 13px; display: inline-flex; gap: 4px; align-items: center; }
.term-card a svg { width: 14px; height: 14px; }
.dcal { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.dcal a { display: flex; gap: 12px; align-items: center; padding: 10px 12px; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); color: var(--ink); }
.dcal time { width: 52px; height: 56px; flex: none; border-radius: 14px; background: linear-gradient(160deg, var(--sp1, var(--accent)), var(--sp2, var(--ink))); color: #fff; display: grid; place-items: center; align-content: center; font-size: 12px; line-height: 1.2; }
.dcal time b { font-size: 22px; }
.dcal div { display: grid; gap: 2px; }
.dcal div b { font-weight: 600; font-size: 15px; line-height: 1.5; }
.dcal small { color: var(--muted); font-size: 12.5px; }

/* ---------- صندوق العدسة في صفحة القصة ---------- */
.lens { margin: 0 0 10px; border-radius: 20px; padding: 14px 16px; background: var(--surface); box-shadow: var(--shadow); border-top: 4px solid var(--d1); }
.ln-h { display: flex; align-items: center; gap: 8px; color: var(--d1); }
:root[data-theme="dark"] .ln-h { color: var(--accent); }
.ln-h svg { width: 20px; height: 20px; }
.ln-h b { font-size: 15px; }
.ln-fig { font-size: 26px; font-weight: 700; margin: 8px 0 2px; color: var(--ink); font-variant-numeric: tabular-nums; }
.lens dl { margin: 8px 0 0; display: grid; gap: 0; }
.lens dl div { display: grid; grid-template-columns: 34% 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.lens dl div:last-child { border-bottom: 0; }
.lens dt { color: var(--muted); font-size: 13px; font-weight: 600; line-height: 1.6; }
.lens dd { margin: 0; font-size: 14.5px; line-height: 1.65; }
.ln-imp { display: flex; gap: 8px; margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--d1) 8%, var(--surface)); font-size: 14.5px; line-height: 1.7; }
.ln-imp svg { width: 18px; height: 18px; flex: none; color: var(--d1); margin-top: 3px; }

/* ---------- العدسة على بطاقة اللمحة ---------- */
.gc-lens { margin: 0; display: grid; gap: 8px; }
.gc-lens div { display: grid; gap: 2px; padding: 8px 12px; border-radius: 12px; background: rgba(255,255,255,.08); border-inline-start: 3px solid var(--spg, #FF8A1F); }
.gc-lens dt { font-size: 12px; color: rgba(255,255,255,.65); font-weight: 600; }
.gc-lens dd { margin: 0; font-size: 15px; line-height: 1.55; color: #fff; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- اختيار المجال ---------- */
.track[class*="dom-"] { position: relative; }
.tr-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 8px; color: #fff; background: linear-gradient(140deg, var(--d1, var(--ink-2)), var(--d2, var(--ink))); }
.tr-ic svg { width: 21px; height: 21px; }
.track[class*="dom-"][aria-pressed="true"] { border-color: var(--d1); background: color-mix(in srgb, var(--d1) 9%, var(--surface)); }
.dchip { display: inline-flex; align-items: center; gap: 6px; }
.dchip svg { width: 16px; height: 16px; }
.dchip.sel { background: color-mix(in srgb, var(--d1) 12%, var(--surface)); border-color: var(--d1); color: var(--d1); }
:root[data-theme="dark"] .dchip.sel { color: #fff; }

/* في المساحة: لون المجال يغلب صورة الخلفية وتصنيف الموضوع */
:root[data-space] .gc { --t1: var(--sp1); --t2: var(--sp2); }
:root[data-space] .gc-bg { opacity: .5; }
/* بطاقة بعدسة: الصورة أصغر، والعنوان ثلاثة أسطر، والعدسة تحل محل الملخص */
.gc.has-lens .gf { height: clamp(110px, 22%, 190px); }
.gc.has-lens .gc-title { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 23px; }
:root[data-space="law"] .gc.has-lens .gc-title { font-size: 25px; line-height: 1.55; }
.sec-h h2 > svg { width: 20px; height: 20px; color: var(--accent); vertical-align: -3px; margin-inline-end: 4px; }

/* ---------- الهوية: الشعار الكتابي ولوحة المشاركة ---------- */
.auth-word { margin: 14px 0 6px; line-height: 0; }
.auth-word img { height: 58px; width: auto; }
:root[data-theme="dark"] .auth-word img, .pub-brand img { }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .auth-word img { content: url(/brand/wordmark-light.svg); } }
:root[data-theme="dark"] .auth-word img { content: url(/brand/wordmark-light.svg); }
.pub-brand img { width: auto; height: 34px; border-radius: 0; }
.sh-title { display: flex; align-items: center; gap: 8px; margin: 4px 0 12px; font-size: 18px; }
.sh-title svg { width: 20px; height: 20px; color: var(--accent); }
.sh-mode { margin-bottom: 12px; }
.sh-mode .chip svg { width: 15px; height: 15px; }
.sh-mode .chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: transparent; }
.sh-mode .dchip[aria-pressed="true"] { background: linear-gradient(135deg, var(--d1), var(--d2)); color: #fff; }
.sh-prev { border-radius: 18px; overflow: hidden; background: #070A1A; aspect-ratio: 4 / 5; max-height: 52vh; margin: 0 auto; display: grid; place-items: center; box-shadow: 0 16px 40px rgba(7,10,26,.35); }
.sh-prev img { width: 100%; height: 100%; object-fit: contain; display: block; }
.sh-prev .skeleton { width: 100%; height: 100%; margin: 0; }
.sh-acts { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 8px; margin-top: 14px; }
.sh-acts .btn { justify-content: center; }
.sh-acts svg { width: 18px; height: 18px; }
.ln-share { margin-top: 10px; display: inline-flex; align-items: center; gap: 6px; background: none; border: 1.5px solid color-mix(in srgb, var(--d1) 40%, transparent); color: var(--d1); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
:root[data-theme="dark"] .ln-share { color: var(--accent); }
.ln-share svg { width: 16px; height: 16px; }
.sh-acts .btn { white-space: nowrap; font-size: 14px; padding-inline: 10px; gap: 6px; }

.auth .tagline { margin: 2px 0 6px; font-size: 17px; font-weight: 700; color: var(--amber, #FF8A1F); }
.auth-word img { height: 72px; }
