/* ════════════════════════════════════════════════
   WAMEED — Design System v2
   Green→Teal brand  ·  Warm dark  ·  3-breakpoint responsive
   Mobile-first  →  Tablet (768px)  →  Desktop (1280px)
   ════════════════════════════════════════════════ */

/* ── Layout constants ── */
:root {
  --topbar-h:    calc(54px + env(safe-area-inset-top));
  --wc-ribbon-h: 0px;
  --topicnav-h:  44px;
  --bottomnav-h: calc(56px + env(safe-area-inset-bottom));
  --chrome-h:    calc(var(--topbar-h) + var(--topicnav-h));
  --sidebar-w:   220px;
  --drawer-w:    380px;
  --r:           12px;
  --r-sm:        8px;
  --ease:        cubic-bezier(.4,0,.2,1);
  --font-en-display: "DM Serif Display", Georgia, serif;
  --font-en-body:    "DM Sans", system-ui, sans-serif;
  --font-ar-display: "Cairo", system-ui, sans-serif;
  --font-ar-body:    "Tajawal", system-ui, sans-serif;
}

/* ════════════════════════════════════════════════
   THEMES  —  derived from logo gradient #3dd68c→#00c9b1
   ════════════════════════════════════════════════ */
html[data-theme="dark"] {
  --bg:          #161718;
  --surface:     #1e1f21;
  --surface-2:   #242526;
  --surface-3:   #2a2c2e;
  --border:      rgba(61,214,140,.07);
  --border-2:    rgba(61,214,140,.14);
  --text:        #e8eae8;
  --text-2:      #7a9e88;
  --muted:       #354040;
  --accent:      #3dd68c;
  --accent-2:    #00c9b1;
  --accent-hot:  #ff6b6b;
  --accent-rgb:  61,214,140;
  --accent2-rgb: 0,201,177;
  --shadow:      0 16px 48px rgba(0,0,0,.6);
  --shadow-sm:   0 4px 16px rgba(0,0,0,.4);
  --ring:        0 0 0 3px rgba(61,214,140,.22);
  --wc-border:   rgba(200,16,46,.22);
  --wc-bg:       rgba(200,16,46,.07);
}

html[data-theme="dark"] body {
  background: #161718;
}

html[data-theme="light"] {
  --bg:          #f2faf5;
  --surface:     #ffffff;
  --surface-2:   #e8f5ec;
  --surface-3:   #d8eede;
  --border:      rgba(0,100,50,.1);
  --border-2:    rgba(0,100,50,.2);
  --text:        #0a1f12;
  --text-2:      #3d7a55;
  --muted:       #9fccb0;
  --accent:      #1a8a52;
  --accent-2:    #009e8a;
  --accent-hot:  #d63030;
  --accent-rgb:  26,138,82;
  --accent2-rgb: 0,158,138;
  --shadow:      0 8px 24px rgba(10,31,18,.1);
  --shadow-sm:   0 2px 8px rgba(10,31,18,.07);
  --ring:        0 0 0 3px rgba(26,138,82,.2);
  --wc-border:   rgba(200,16,46,.18);
  --wc-bg:       rgba(200,16,46,.05);
}

/* ── Reset ── */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-en-body);
  font-size: 15px;
  line-height: 1.6;
  padding-bottom: env(safe-area-inset-bottom);
  overscroll-behavior-y: contain;
}
html[lang="ar"] body { font-family: var(--font-ar-body); }
img { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
a { color: inherit; text-decoration: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.hidden { display: none !important; }

/* ════════════════════════════════════════════════
   TOPBAR
   ════════════════════════════════════════════════ */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: var(--topbar-h);
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: 0 16px 8px;
  padding-top: env(safe-area-inset-top);
  padding-left: calc(16px + env(safe-area-inset-left));
  padding-right: calc(16px + env(safe-area-inset-right));
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 9px; color: var(--text); min-width: 0; flex-shrink: 1; overflow: hidden; }
.brand-logo { width: 28px; height: 28px; border-radius: 7px; flex-shrink: 0; }
.brand-name { font-family: var(--font-en-display); font-size: 1.15rem; font-weight: 400; letter-spacing: .3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[lang="ar"] .brand-name { font-family: var(--font-ar-display); font-weight: 800; font-size: 1.05rem; }
.topbar-actions { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 11px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font-size: .78rem; font-weight: 600; white-space: nowrap;
  transition: background .15s, transform .12s, border-color .15s;
  min-height: 36px;
}
.chip:hover  { background: var(--surface-2); border-color: var(--border-2); transform: translateY(-1px); }
.chip:active { transform: scale(.96); }
.chip:focus  { outline: none; box-shadow: var(--ring); }
.chip-icon   { font-size: .88rem; line-height: 1; }
.chip--account { border-color: rgba(var(--accent-rgb),.3); }
.chip--account:hover { background: rgba(var(--accent-rgb),.08); }
.chip--icon-only { padding: 0; width: 34px; justify-content: center; }
.chip-avatar { font-size: .65rem; font-weight: 700; width: 22px; height: 22px; border-radius: 50%; background: rgba(var(--accent-rgb),.18); color: var(--accent); display: flex; align-items: center; justify-content: center; letter-spacing: 0; }
@media (max-width: 600px) { .chip-label { display: none; } .chip { padding: 6px 9px; } }
/* Mobile: hide lower-priority topbar buttons (accessible via bottom nav Settings) */
@media (max-width: 767px) {
  #langToggle, #themeToggle, #searchToggleBtn, #bookmarksBtn { display: none; }
}

/* ════════════════════════════════════════════════
   TOPIC NAV
   ════════════════════════════════════════════════ */
.topic-nav {
  position: fixed; top: var(--topbar-h); left: 0; right: 0; z-index: 190;
  height: var(--topicnav-h);
  background: var(--surface); border-bottom: 1px solid var(--border);
  overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.topic-nav::-webkit-scrollbar { display: none; }
.topic-nav-inner { display: flex; align-items: center; height: 100%; padding: 0 16px; min-width: max-content; gap: 2px; }
.topic-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 0 14px; height: 100%; min-height: 44px;
  border: none; background: none; color: var(--text-2);
  font-size: .84rem; font-weight: 600; white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
html[lang="ar"] .topic-btn { font-family: var(--font-ar-body); font-size: .9rem; font-weight: 700; }
.topic-btn:hover  { color: var(--text); }
.topic-btn.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 700; }

/* Mobile emoji-only strip at ≤600px */
@media (max-width: 600px) {
  .topic-nav { overflow-x: hidden; }
  .topic-nav-inner { min-width: 0; width: 100%; padding: 0; }
  .topic-btn { flex: 1 1 0; min-width: 0; padding: 0; gap: 0; justify-content: center; font-size: 1.25rem; }
  .topic-btn span { display: none; }
}

/* Desktop: topic-nav hidden (topics in sidebar) */
@media (min-width: 1280px) { .topic-nav { display: none; } }

/* ════════════════════════════════════════════════
   BOTTOM NAV  (mobile ≤767px only)
   ════════════════════════════════════════════════ */
.bottom-nav {
  display: none;
  justify-content: space-around; align-items: center;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 490;
  height: var(--bottomnav-h); padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in oklab, var(--bg) 96%, transparent);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
}
@media (max-width: 767px) {
  .bottom-nav { display: flex; bottom: env(safe-area-inset-bottom); border-top: none; }
  /* When WC ribbon is expanded, or prefs drawer is open, hide bottom nav entirely */
  body.rb-main-pushed .bottom-nav,
  body.prefs-open .bottom-nav { display: none; }
}

.bn-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: .68rem; color: var(--muted); cursor: pointer; padding: 4px 12px;
  transition: color .15s; position: relative;
}
html[lang="ar"] .bn-item { font-family: var(--font-ar-body); font-size: .72rem; }
.bn-item.active { color: var(--accent); }
.bn-icon { font-size: 1.3rem; line-height: 1; }
.bn-active-dot { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 3px; height: 3px; border-radius: 50%; background: var(--accent); opacity: 0; transition: opacity .15s; }
.bn-item.active .bn-active-dot { opacity: 1; }

/* ════════════════════════════════════════════════
   MAIN LAYOUT
   ════════════════════════════════════════════════ */
/* Mobile default */
main {
  padding-top: calc(var(--chrome-h) + 20px);
  padding-bottom: calc(var(--bottomnav-h) + 16px);
  padding-left: max(12px, env(safe-area-inset-left));
  padding-right: max(12px, env(safe-area-inset-right));
  max-width: 100%;
}
@media (max-width: 767px) {
  .dt-sidebar, .dt-panel { display: none !important; }
  main { padding-bottom: calc(var(--bottomnav-h) + 56px + env(safe-area-inset-bottom) + 16px) !important; }
}

/* Tablet: sidebar + feed */
@media (min-width: 768px) and (max-width: 1279px) {
  main {
    display: grid; grid-template-columns: 180px 1fr;
    padding-top: calc(var(--topbar-h) + var(--topicnav-h) + 16px) !important;
    padding-left: 0 !important; padding-right: 0 !important; padding-bottom: 32px !important;
    max-width: 100%;
  }
  .dt-sidebar {
    display: flex; flex-direction: column; padding: 16px 0 24px;
    border-right: 1px solid var(--border);
    position: sticky; top: calc(var(--topbar-h) + var(--topicnav-h));
    height: calc(100vh - var(--topbar-h) - var(--topicnav-h));
    overflow-y: auto; overflow-x: hidden;
    scrollbar-width: thin; scrollbar-color: var(--border) transparent; background: var(--surface);
  }
  .dt-sidebar-label { font-size: .63rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); padding: 0 12px 6px; display: block; }
  .dt-sidebar-item { display: flex; align-items: center; gap: 8px; padding: 6px 12px; font-size: .82rem; color: var(--text-2); cursor: pointer; transition: background .12s, color .12s; border-left: 2px solid transparent; }
  html[lang="ar"] .dt-sidebar-item { border-left: none; border-right: 2px solid transparent; }
  .dt-sidebar-item:hover  { background: var(--surface-2); color: var(--text); }
  .dt-sidebar-item.active { background: rgba(var(--accent-rgb),.08); color: var(--accent); border-left-color: var(--accent); font-weight: 700; }
  html[lang="ar"] .dt-sidebar-item.active { border-left-color: transparent; border-right-color: var(--accent); }
  .dt-sidebar-dot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
  .dt-wc-block { margin: 8px 12px 0; padding: 10px; background: var(--wc-bg); border: 1px solid var(--wc-border); border-radius: var(--r-sm); }
  .dt-wc-head { font-size: .63rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #c8102e; margin-bottom: 8px; display: flex; align-items: center; gap: 4px; }
  .dt-wc-match { display: flex; align-items: center; justify-content: space-between; padding: 4px 0; border-bottom: 1px solid var(--border); font-size: .76rem; }
  .dt-wc-match:last-child { border-bottom: none; }
  .dt-wc-teams { color: var(--text-2); font-size: .75rem; }
  .dt-wc-score { font-weight: 800; color: var(--text); }
  .dt-wc-live  { font-size: .62rem; font-weight: 700; color: #c8102e; background: rgba(200,16,46,.14); padding: 1px 4px; border-radius: 3px; }
  .dt-wc-time  { font-size: .68rem; color: var(--muted); }
  .news-section { padding: 14px 16px 40px; }
  .dt-panel { display: none; }
}

/* Desktop: sidebar + feed + right panel */
@media (min-width: 1280px) {
  main {
    display: grid; grid-template-columns: var(--sidebar-w) 1fr 200px;
    padding-top: var(--topbar-h) !important;
    padding-left: 0 !important; padding-right: 0 !important; padding-bottom: 0 !important;
    max-width: 100%; min-height: calc(100vh - var(--topbar-h));
  }
  .dt-sidebar {
    display: flex; flex-direction: column; padding: 18px 0 24px;
    border-right: 1px solid var(--border);
    position: sticky; top: var(--topbar-h);
    height: calc(100vh - var(--topbar-h));
    overflow-y: auto; overflow-x: hidden;
    scrollbar-width: thin; scrollbar-color: var(--border) transparent; background: var(--surface);
  }
  .dt-sidebar-label { font-size: .65rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 0 14px 7px; display: block; }
  html[lang="ar"] .dt-sidebar-label { font-family: var(--font-ar-body); letter-spacing: 0; font-size: .7rem; text-transform: none; }
  .dt-sidebar-item { display: flex; align-items: center; gap: 9px; padding: 7px 14px; font-size: .85rem; color: var(--text-2); cursor: pointer; transition: background .12s, color .12s; border-left: 2px solid transparent; }
  html[lang="ar"] .dt-sidebar-item { font-family: var(--font-ar-body); border-left: none; border-right: 2px solid transparent; }
  .dt-sidebar-item:hover  { background: var(--surface-2); color: var(--text); }
  .dt-sidebar-item.active { background: rgba(var(--accent-rgb),.08); color: var(--accent); border-left-color: var(--accent); font-weight: 700; }
  html[lang="ar"] .dt-sidebar-item.active { border-left-color: transparent; border-right-color: var(--accent); }
  .dt-sidebar-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
  .dt-wc-block { margin: 8px 14px 0; padding: 12px; background: var(--wc-bg); border: 1px solid var(--wc-border); border-radius: var(--r-sm); }
  .dt-wc-head { font-size: .68rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: #c8102e; margin-bottom: 10px; display: flex; align-items: center; gap: 5px; }
  .dt-wc-match { display: flex; align-items: center; justify-content: space-between; padding: 5px 0; border-bottom: 1px solid var(--border); font-size: .8rem; }
  .dt-wc-match:last-child { border-bottom: none; padding-bottom: 0; }
  .dt-wc-teams { color: var(--text-2); font-size: .78rem; }
  .dt-wc-score { font-weight: 800; color: var(--text); font-size: .82rem; }
  .dt-wc-live  { font-size: .65rem; font-weight: 700; letter-spacing: .06em; color: #c8102e; background: rgba(200,16,46,.14); padding: 1px 5px; border-radius: 3px; }
  .dt-wc-time  { font-size: .72rem; color: var(--muted); }
  .news-section { padding: 18px 20px 48px; min-height: calc(100vh - var(--topbar-h)); background: var(--bg); }
  .dt-panel {
    display: flex; flex-direction: column; padding: 18px 14px 24px;
    border-left: 1px solid var(--border);
    position: sticky; top: var(--topbar-h);
    height: calc(100vh - var(--topbar-h));
    overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--border) transparent; background: var(--surface);
  }
  .dt-panel-label { font-size: .65rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
  .dt-panel-section { margin-bottom: 18px; }
  .dt-trending-item { padding: 6px 0; border-bottom: 1px solid var(--border); font-size: .82rem; color: var(--text-2); cursor: pointer; line-height: 1.4; }
  .dt-trending-item:last-child { border-bottom: none; }
  .dt-trending-item:hover { color: var(--accent); }
  .dt-trending-num { font-size: .65rem; color: var(--muted); margin-bottom: 2px; }
  .dt-weather-widget { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 12px; }
  .dt-weather-temp { font-size: 1.8rem; font-weight: 700; color: var(--text); line-height: 1; }
  .dt-weather-city { font-size: .78rem; color: var(--text-2); margin-top: 2px; }
  .dt-weather-desc { font-size: .72rem; color: var(--muted); margin-top: 3px; }
  /* Desktop topbar: show WC nav item */
  .dt-wc-nav-item {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 5px 11px; border-radius: 18px; margin-left: 4px;
    background: var(--wc-bg); border: 1px solid var(--wc-border);
    color: #e06070; font-size: .84rem; font-weight: 600; cursor: pointer;
    transition: background .15s;
  }
  .dt-wc-nav-item:hover { background: rgba(200,16,46,.14); }
}

/* ════════════════════════════════════════════════
   NEWS SECTION HEADER
   ════════════════════════════════════════════════ */
.news-section { padding-top: 4px; }
.news-header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.news-section-title {
  font-family: var(--font-en-display); font-size: 1.3rem; font-weight: 400; letter-spacing: -.01em;
  display: flex; align-items: center; gap: 8px;
}
.news-section-title::before { content: ''; display: inline-block; width: 14px; height: 2px; border-radius: 1px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
html[lang="ar"] .news-section-title { font-family: var(--font-ar-display); font-weight: 800; font-size: 1.2rem; letter-spacing: 0; }
.news-section-hint { font-size: .75rem; color: var(--muted); font-weight: 500; }
html[lang="ar"] .news-section-hint { font-family: var(--font-ar-body); font-size: .8rem; }

/* ════════════════════════════════════════════════
   HERO CARD  (first article slot, AI summary reserved)
   ════════════════════════════════════════════════ */
.news-card--hero {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: 1fr;
  border-radius: var(--r); overflow: hidden;
  background: var(--surface); border: 1px solid var(--border);
  cursor: pointer; transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s;
  position: relative;
}
.news-card--hero:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: var(--border-2); }
.news-card--hero:active { transform: scale(.995); }
@media (min-width: 600px) { .news-card--hero { grid-template-columns: 280px 1fr; } }
@media (min-width: 1280px) { .news-card--hero { grid-template-columns: 360px 1fr; } }

.nc-hero-img { height: 180px; min-height: 180px; overflow: hidden; position: relative; background: var(--surface-2); }
@media (min-width: 600px) { .nc-hero-img { height: auto; min-height: 160px; } }
.nc-hero-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s var(--ease); }
.news-card--hero:hover .nc-hero-img img { transform: scale(1.03); }
.nc-hero-fallback { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--surface-2), var(--surface-3)); }
.nc-hero-wameed-logo { width: 48px; height: 48px; border-radius: 12px; opacity: .35; }
.nc-hero-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; }
.nc-hero-ai {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .67rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--accent-2); padding: 3px 8px; border-radius: 4px;
  background: rgba(var(--accent2-rgb),.1); border: 1px solid rgba(var(--accent2-rgb),.22);
  align-self: flex-start;
}
html[lang="ar"] .nc-hero-ai { font-family: var(--font-ar-body); letter-spacing: 0; font-size: .74rem; text-transform: none; }
.nc-hero-ai-dot { width: 5px; height: 5px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); animation: aipulse 2s ease-in-out infinite; }
@keyframes aipulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.4;transform:scale(.65)} }
.nc-hero-title { font-family: var(--font-en-display); font-size: 1.15rem; font-weight: 400; line-height: 1.4; color: var(--text); }
html[lang="ar"] .nc-hero-title { font-family: var(--font-ar-display); font-weight: 800; font-size: 1.1rem; line-height: 1.5; }
.nc-hero-snippet { font-size: .82rem; color: var(--text-2); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
html[lang="ar"] .nc-hero-snippet { font-family: var(--font-ar-body); font-size: .86rem; }

/* ════════════════════════════════════════════════
   NEWS GRID + CARDS
   ════════════════════════════════════════════════ */
.news-grid {
  display: grid; grid-template-columns: 1fr; gap: 10px;
  opacity: 0; transform: translateY(6px);
  transition: opacity .2s ease, transform .2s ease;
}
.news-grid--visible { opacity: 1; transform: translateY(0); }
@media (min-width: 480px)  { .news-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }
@media (min-width: 900px)  { .news-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; } }
@media (min-width: 1400px) { .news-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; } }

.news-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); display: flex; flex-direction: column; gap: 0;
  cursor: pointer; transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s;
  position: relative; overflow: hidden; -webkit-tap-highlight-color: transparent; min-height: 100px;
}
.news-card:hover  { transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: var(--border-2); }
.news-card:active { transform: scale(.99); }
.news-card::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2px; background: var(--cat-color, var(--accent)); opacity: 0; transition: opacity .18s; }
.news-card:hover::after { opacity: .55; }

/* card image */
.nc-image { width: 100%; height: 130px; overflow: hidden; position: relative; background: var(--surface-2); border-radius: var(--r) var(--r) 0 0; }
.nc-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s var(--ease); }
.news-card:hover .nc-image img { transform: scale(1.04); }
.nc-image-fallback { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--surface-2), var(--surface-3)); }
.nc-fallback-logo { width: 32px; height: 32px; border-radius: 8px; opacity: .28; }

/* card body */
.nc-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.nc-top { display: flex; align-items: center; justify-content: space-between; }
.nc-category { display: inline-flex; align-items: center; gap: 4px; font-size: .62rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--cat-color, var(--accent)); }
html[lang="ar"] .nc-category { font-family: var(--font-ar-body); letter-spacing: 0; font-size: .7rem; }
.nc-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--cat-color, var(--accent)); flex-shrink: 0; }
.nc-read-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex-shrink: 0; opacity: .7; }
.nc-read .nc-read-dot { display: none; }
.nc-read { opacity: .62; }
.nc-title { font-size: .92rem; font-weight: 600; line-height: 1.5; color: var(--text); flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
html[lang="ar"] .nc-title { font-family: var(--font-ar-body); font-size: .96rem; font-weight: 700; line-height: 1.65; }
@media (min-width: 480px) { .nc-title { -webkit-line-clamp: 4; } }
.nc-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.nc-logo-wrap { display: flex; align-items: center; gap: 5px; min-width: 0; overflow: hidden; }
.nc-logo { width: 16px; height: 16px; border-radius: 4px; flex-shrink: 0; object-fit: contain; }
.nc-logo-fallback { width: 16px; height: 16px; border-radius: 4px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); display: flex; align-items: center; justify-content: center; font-size: .6rem; font-weight: 800; color: var(--bg); flex-shrink: 0; }
.nc-source { font-size: .68rem; font-weight: 700; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100px; }
html[lang="ar"] .nc-source { font-family: var(--font-ar-body); font-size: .74rem; }
.nc-time { font-size: .64rem; color: var(--muted); white-space: nowrap; flex-shrink: 0; }
.nc-time--fresh { color: var(--accent); font-weight: 700; }
html[lang="ar"] .nc-time { font-family: var(--font-ar-body); font-size: .68rem; }

/* Skeleton */
.news-card--skeleton { pointer-events: none; cursor: default; }
.skeleton { border-radius: 5px; background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.6s ease-in-out infinite; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.sk-tag   { height: 12px; width: 55px; }
.sk-title { height: 16px; width: 95%; margin-top: 4px; }
.sk-title--short { width: 70%; }
.sk-meta  { height: 11px; width: 40%; margin-top: 6px; }

/* Animations */
.fade-in { animation: fadeUp .3s var(--ease) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.glow { box-shadow: 0 0 0 2px rgba(var(--accent-rgb),.35), var(--shadow-sm); border-color: rgba(var(--accent-rgb),.5); }
.news-card--highlight { animation: cardHighlight 2.2s var(--ease) both; }
@keyframes cardHighlight {
  0%   { box-shadow: 0 0 0 3px rgba(var(--accent-rgb),.75); border-color: var(--accent); }
  45%  { box-shadow: 0 0 0 6px rgba(var(--accent-rgb),.25); }
  100% { box-shadow: none; border-color: var(--border); }
}

/* ════════════════════════════════════════════════
   NEW ARTICLES BANNER
   ════════════════════════════════════════════════ */
.new-articles-banner {
  position: sticky; top: calc(var(--chrome-h)); z-index: 100;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--bg); font-size: .82rem; font-weight: 700;
  animation: slideDown .3s var(--ease);
}
html[lang="ar"] .new-articles-banner { font-family: var(--font-ar-body); font-size: .88rem; }
@keyframes slideDown { from { transform: translateY(-100%); opacity: 0; } to { transform: none; opacity: 1; } }
.banner-icon { font-size: .85rem; }
.new-articles-banner button { padding: 4px 12px; border-radius: 999px; border: none; background: rgba(0,0,0,.2); color: inherit; font-size: .76rem; font-weight: 800; letter-spacing: .04em; transition: background .15s; min-height: 28px; }
.new-articles-banner button:hover { background: rgba(0,0,0,.3); }

/* ════════════════════════════════════════════════
   PULL TO REFRESH
   ════════════════════════════════════════════════ */
.pull-indicator {
  position: fixed; top: var(--chrome-h); left: 50%;
  transform: translateX(-50%) translateY(-110%); z-index: 180;
  display: flex; align-items: center; gap: 8px; padding: 8px 18px;
  background: var(--surface); border: 1px solid var(--border);
  border-top: none; border-radius: 0 0 18px 18px; box-shadow: var(--shadow-sm);
  pointer-events: none; opacity: 0; transition: opacity .18s ease, transform .18s ease;
  will-change: transform, opacity;
}
.pull-indicator.ptr--visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.ptr-icon { font-size: 1rem; line-height: 1; display: inline-block; transition: transform .15s ease; color: var(--text-2); }
.pull-indicator.ptr--ready .ptr-icon, .pull-indicator.ptr--ready .ptr-label { color: var(--accent); }
.pull-indicator.ptr--refreshing .ptr-icon { animation: ptrSpin .7s linear infinite; }
@keyframes ptrSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.ptr-label { font-size: .74rem; font-weight: 600; color: var(--text-2); white-space: nowrap; transition: color .15s; }
html[lang="ar"] .ptr-label { font-family: var(--font-ar-body); font-size: .78rem; }

/* ════════════════════════════════════════════════
   SEARCH BAR
   ════════════════════════════════════════════════ */
.search-bar { position: fixed; top: var(--chrome-h); left: 0; right: 0; z-index: 185; background: var(--surface); border-bottom: 1px solid var(--border); padding: 8px 14px; animation: slideDown .18s var(--ease) both; }
.search-bar.hidden { display: none; }
.search-bar-inner { display: flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 0 12px; height: 40px; }
.search-icon { font-size: .85rem; opacity: .5; }
.search-input { flex: 1; background: none; border: none; outline: none; color: var(--text); font-size: .9rem; font-family: var(--font-en-body); caret-color: var(--accent); }
html[lang="ar"] .search-input { font-family: var(--font-ar-body); direction: rtl; }
.search-input::placeholder { color: var(--muted); }
.search-clear { background: none; border: none; color: var(--text-2); cursor: pointer; font-size: .8rem; padding: 2px 4px; border-radius: 4px; }
.search-clear:hover { color: var(--text); }
.search-clear.hidden { display: none; }
body:has(#searchBar:not(.hidden)) main { padding-top: calc(var(--chrome-h) + 56px + 20px); }

/* ════════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════════ */
.footer { border-top: 1px solid var(--border); padding: 18px 0; margin-top: 16px; }
@media (max-width: 767px) { .footer { margin-bottom: var(--bottomnav-h); } }
.footer-inner { max-width: 1400px; margin: 0 auto; padding: 0 max(12px, env(safe-area-inset-left)); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.footer-brand { font-size: .78rem; color: var(--text-2); display: flex; align-items: center; }
.footer-legal { font-size: .72rem; color: var(--muted); }
html[lang="ar"] .footer-legal { font-family: var(--font-ar-body); }
.footer-links { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.footer-links a { font-size: .72rem; color: var(--text-2); transition: color .15s; }
.footer-links a:hover { color: var(--accent); }
.footer-links span { color: var(--muted); font-size: .65rem; }
@media (max-width: 480px) { .footer-inner { flex-direction: column; text-align: center; } }

/* ════════════════════════════════════════════════
   AUTH MODALS
   ════════════════════════════════════════════════ */
.modal-overlay { position: fixed; inset: 0; z-index: 500; background: rgba(0,0,0,.7); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-overlay.hidden { display: none; }
.modal-close { position: absolute; top: 14px; inset-inline-end: 14px; width: 32px; height: 32px; border-radius: 50%; border: none; background: var(--surface-2); color: var(--text); font-size: .95rem; display: flex; align-items: center; justify-content: center; transition: background .15s; }
.modal-close:hover { background: var(--surface-3); }
.signup-box { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); display: flex; width: 100%; max-width: 700px; overflow: hidden; }
.signup-left { background: linear-gradient(145deg, var(--surface-2), var(--surface-3)); padding: 40px 28px; min-width: 200px; display: flex; flex-direction: column; gap: 10px; }
@media (max-width: 560px) { .signup-box { flex-direction: column; } .signup-left { padding: 24px 20px 16px; } }
.auth-logo { width: 40px; height: 40px; border-radius: 11px; }
.auth-logo--center { display: block; margin: 0 auto 14px; }
.signup-headline { font-family: var(--font-en-display); font-size: 1.65rem; line-height: 1.1; font-weight: 400; }
html[lang="ar"] .signup-headline { font-family: var(--font-ar-display); font-weight: 900; }
.signup-tagline { font-size: .82rem; color: var(--text-2); line-height: 1.5; }
html[lang="ar"] .signup-tagline { font-family: var(--font-ar-body); }
.signup-features { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.signup-features li { display: flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--text-2); }
html[lang="ar"] .signup-features li { font-family: var(--font-ar-body); }
.sf-icon { font-size: 1rem; flex-shrink: 0; }
.signup-right { flex: 1; padding: 32px 28px; display: flex; flex-direction: column; gap: 12px; }
@media (max-width: 560px) { .signup-right { padding: 20px; } }
.auth-error  { font-size: .8rem; color: var(--accent-hot); min-height: 1.2em; }
.auth-status { font-size: .8rem; color: var(--accent); min-height: 1.2em; }
.auth-fields { display: flex; flex-direction: column; gap: 8px; }
.auth-input { width: 100%; padding: 11px 14px; min-height: 44px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font-size: .88rem; font-family: inherit; outline: none; transition: border-color .15s, box-shadow .15s; }
.auth-input:focus { border-color: var(--accent); box-shadow: var(--ring); }
.auth-input::placeholder { color: var(--muted); }
.btn-continue { padding: 13px; border-radius: var(--r-sm); border: none; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--bg); font-size: .9rem; font-weight: 700; min-height: 48px; transition: opacity .15s; }
.btn-continue:hover { opacity: .9; }
.btn-continue--full { width: 100%; }
.btn-continue--logout { background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); }
.auth-divider { display: flex; align-items: center; gap: 10px; font-size: .74rem; color: var(--muted); }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.auth-icons-row { display: flex; gap: 10px; justify-content: flex-start; }
.auth-icons-row--center { justify-content: center; }
.auth-icon-btn { width: 48px; height: 48px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--surface-2); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text); font-size: .88rem; transition: background .15s, border-color .15s; }
.auth-icon-btn:hover { background: var(--surface-3); border-color: var(--border-2); }
.auth-icon-btn--google { background: #fff; }
.auth-icon-btn--google:hover { background: #f5f5f5; }
.auth-switch { font-size: .78rem; color: var(--text-2); }
html[lang="ar"] .auth-switch { font-family: var(--font-ar-body); }
.auth-link { background: none; border: none; color: var(--accent); font-size: inherit; font-weight: 700; cursor: pointer; padding: 0; }
.auth-link:hover { color: var(--accent-2); }
.auth-terms { font-size: .72rem; color: var(--muted); line-height: 1.5; }
.auth-terms a { color: var(--accent); }
.auth-forgot { font-size: .78rem; }
.login-box { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); padding: 36px 28px; width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 12px; }
.login-headline { font-family: var(--font-en-display); font-size: 1.35rem; font-weight: 400; text-align: center; letter-spacing: -.01em; }

/* ════════════════════════════════════════════════
   PREFS DRAWER
   ════════════════════════════════════════════════ */
.drawer-overlay { position: fixed; inset: 0; z-index: 500; background: rgba(0,0,0,.5); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.drawer-overlay.hidden { display: none; }
.prefs-drawer { position: fixed; top: 0; bottom: 0; inset-inline-end: 0; z-index: 510; width: var(--drawer-w); max-width: 95vw; background: var(--surface); border-inline-start: 1px solid var(--border); display: flex; flex-direction: column; transition: transform .28s var(--ease); }
.prefs-drawer.hidden { transform: translateX(100%); display: flex; }
html[lang="ar"] .prefs-drawer.hidden { transform: translateX(-100%); }
.drawer-header { padding: 16px 20px; padding-top: calc(16px + env(safe-area-inset-top)); border-bottom: 1px solid var(--border); position: relative; }
.drawer-user { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; padding: 10px 12px; background: var(--surface-2); border-radius: var(--r-sm); }
.drawer-user-avatar { font-size: 1.4rem; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, rgba(var(--accent-rgb),.2), rgba(var(--accent2-rgb),.2)); border-radius: 50%; flex-shrink: 0; }
.drawer-user-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.drawer-user-name  { font-size: .88rem; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drawer-user-email { font-size: .72rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drawer-title { font-family: var(--font-en-display); font-size: 1.2rem; font-weight: 400; }
html[lang="ar"] .drawer-title { font-family: var(--font-ar-display); font-weight: 800; }
.drawer-subtitle { font-size: .78rem; color: var(--muted); margin-top: 2px; }
html[lang="ar"] .drawer-subtitle { font-family: var(--font-ar-body); }
.drawer-close { position: absolute; top: calc(16px + env(safe-area-inset-top)); inset-inline-end: 16px; width: 30px; height: 30px; border-radius: 50%; border: none; background: var(--surface-2); color: var(--text); font-size: .88rem; display: flex; align-items: center; justify-content: center; transition: background .15s; }
.drawer-close:hover { background: var(--surface-3); }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; scrollbar-width: thin; scrollbar-color: var(--border) transparent; -webkit-overflow-scrolling: touch; }
.pref-section-label { font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 10px; margin-bottom: 2px; }
html[lang="ar"] .pref-section-label { font-family: var(--font-ar-body); letter-spacing: 0; font-size: .76rem; }
.category-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.category-card { cursor: pointer; }
.category-card input { display: none; }
.cc-inner { display: flex; flex-direction: row; align-items: center; gap: 6px; padding: 8px 10px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--surface-2); transition: all .15s; }
.cc-icon { font-size: .95rem; flex-shrink: 0; }
.cc-name { font-size: .7rem; font-weight: 600; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html[lang="ar"] .cc-name { font-family: var(--font-ar-body); font-size: .72rem; }
.cc-check { display: none; }
.category-card input:checked ~ .cc-inner { background: rgba(var(--accent-rgb),.1); border-color: rgba(var(--accent-rgb),.4); }
.category-card input:checked ~ .cc-inner .cc-name { color: var(--text); }
.region-chips, .source-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.region-chip, .source-pill-toggle { cursor: pointer; }
.region-chip input, .source-pill-toggle input { display: none; }
.region-chip span, .source-pill-toggle span { display: inline-flex; align-items: center; padding: 5px 11px; min-height: 32px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); font-size: .74rem; font-weight: 600; color: var(--text-2); transition: all .15s; white-space: nowrap; }
html[lang="ar"] .region-chip span, html[lang="ar"] .source-pill-toggle span { font-family: var(--font-ar-body); font-size: .78rem; }
.region-chip input:checked ~ span { background: rgba(var(--accent-rgb),.1); border-color: rgba(var(--accent-rgb),.4); color: var(--text); }
.source-pill-toggle input:checked ~ span { background: rgba(var(--accent2-rgb),.1); border-color: rgba(var(--accent2-rgb),.4); color: var(--text); }
.source-group-label { font-size: .72rem; font-weight: 700; color: var(--text-2); margin-top: 8px; margin-bottom: 4px; }
html[lang="ar"] .source-group-label { font-family: var(--font-ar-body); }
.notif-prefs { display: flex; flex-direction: column; gap: 8px; }
.notif-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; padding: 8px 10px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--surface-2); }
.notif-row:hover { background: var(--surface-3); }
.notif-label { display: flex; flex-direction: column; gap: 2px; }
.notif-label strong { font-size: .82rem; color: var(--text); font-weight: 600; }
.notif-label small { font-size: .72rem; color: var(--text-2); }
.notif-toggle { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; flex-shrink: 0; }
.display-prefs { display: flex; flex-direction: column; gap: 9px; }
.display-pref-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.display-pref-label { font-size: .8rem; color: var(--text-2); font-weight: 500; }
html[lang="ar"] .display-pref-label { font-family: var(--font-ar-body); }
.pref-select { padding: 7px 11px; min-height: 36px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font-size: .8rem; font-family: inherit; outline: none; min-width: 120px; }
.pref-select:focus { border-color: var(--accent); box-shadow: var(--ring); }
.drawer-footer { padding: 14px 18px; padding-bottom: calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 7px; }
.btn-save { padding: 12px; border-radius: var(--r-sm); border: none; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--bg); font-size: .86rem; font-weight: 700; min-height: 44px; transition: opacity .15s; }
.btn-save:hover { opacity: .9; }
.btn-signout { padding: 10px; border-radius: var(--r-sm); border: 1px solid var(--border); background: transparent; color: var(--text-2); font-size: .82rem; font-weight: 600; min-height: 40px; transition: background .15s; }
.btn-signout:hover { background: var(--surface-2); }
html[lang="ar"] .btn-save, html[lang="ar"] .btn-signout { font-family: var(--font-ar-body); }
.prefs-status { font-size: .74rem; color: var(--accent); text-align: center; min-height: 1em; }

/* ════════════════════════════════════════════════
   ARTICLE MODAL
   ════════════════════════════════════════════════ */
.article-modal-overlay { position: fixed; inset: 0; z-index: 600; background: rgba(0,0,0,.75); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); display: flex; align-items: flex-end; justify-content: center; padding: 0; }
.article-modal-overlay.hidden { display: none; }
@media (min-width: 600px) { .article-modal-overlay { align-items: center; padding: 16px; } }
.article-modal { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 20px 20px 0 0; box-shadow: var(--shadow); padding: 0; width: 100%; display: flex; flex-direction: column; animation: sheetUp .25s var(--ease) both; max-height: 88vh; overflow-y: auto; }
@media (min-width: 600px) { .article-modal { border-radius: 18px; max-width: 540px; animation: modalPop .22s var(--ease) both; } }
@keyframes sheetUp  { from { transform: translateY(100%); } to { transform: none; } }
@keyframes modalPop { from { transform: scale(.95); opacity: 0; } to { transform: none; opacity: 1; } }
.article-modal-hero { position: relative; width: 100%; height: 180px; overflow: hidden; flex-shrink: 0; border-radius: 20px 20px 0 0; background: var(--surface-2); }
@media (min-width: 600px) { .article-modal-hero { height: 200px; border-radius: 18px 18px 0 0; } }
.modal-hero-img { width: 100%; height: 100%; object-fit: cover; }
.modal-hero-fallback { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--surface-2), var(--surface-3)); }
.modal-hero-wameed-logo { width: 52px; height: 52px; border-radius: 14px; opacity: .32; }
.modal-hero-scrim { position: absolute; bottom: 0; left: 0; right: 0; height: 60%; background: linear-gradient(to top, var(--surface), transparent); }
.article-modal-close { position: absolute; top: 12px; inset-inline-end: 12px; z-index: 2; width: 32px; height: 32px; border-radius: 50%; border: none; background: rgba(0,0,0,.4); backdrop-filter: blur(8px); color: #fff; font-size: .9rem; display: flex; align-items: center; justify-content: center; transition: background .15s; }
.article-modal-close:hover { background: rgba(0,0,0,.6); }
.modal-bm-btn { position: absolute; top: 12px; inset-inline-end: 52px; z-index: 2; width: 32px; height: 32px; border-radius: 50%; border: none; background: rgba(0,0,0,.4); backdrop-filter: blur(8px); color: #fff; font-size: .88rem; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background .15s, transform .12s; }
.modal-bm-btn:hover  { background: rgba(0,0,0,.6); transform: scale(1.08); }
.modal-bm-btn:active { transform: scale(.94); }
.modal-bm-btn--saved { background: rgba(var(--accent-rgb),.4); color: var(--accent); }
.article-modal-content { padding: 18px 20px calc(20px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 600px) { .article-modal-content { padding: 20px 28px 28px; } }
.article-modal-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.article-modal-source { font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
html[lang="ar"] .article-modal-source { font-family: var(--font-ar-body); letter-spacing: 0; }
.article-modal-category { font-size: .68rem; font-weight: 600; color: var(--muted); padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); }
html[lang="ar"] .article-modal-category { font-family: var(--font-ar-body); font-size: .74rem; }
.article-modal-title { font-family: var(--font-en-display); font-size: 1.25rem; font-weight: 400; line-height: 1.4; }
html[lang="ar"] .article-modal-title { font-family: var(--font-ar-display); font-weight: 900; font-size: 1.15rem; line-height: 1.5; }
.article-modal-time { font-size: .76rem; color: var(--muted); }
html[lang="ar"] .article-modal-time { font-family: var(--font-ar-body); }
.article-modal-read { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 14px; border-radius: var(--r-sm); background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--bg); font-size: .9rem; font-weight: 700; min-height: 48px; transition: opacity .15s; margin-top: 4px; }
.article-modal-read:hover { opacity: .9; }
html[lang="ar"] .article-modal-read { font-family: var(--font-ar-body); }
.article-modal-footer { font-size: .7rem; color: var(--muted); border-top: 1px solid var(--border); padding-top: 10px; margin-top: 4px; text-align: center; }

/* ════════════════════════════════════════════════
   SHARE
   ════════════════════════════════════════════════ */
.share-section { display: flex; align-items: center; gap: 10px; padding-top: 14px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.share-label { font-size: .72rem; font-weight: 700; color: var(--muted); letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; flex-shrink: 0; }
html[lang="ar"] .share-label { font-family: var(--font-ar-body); letter-spacing: 0; font-size: .78rem; }
.share-row { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.share-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); font-size: .78rem; font-weight: 600; font-family: inherit; cursor: pointer; transition: background .15s, color .15s, transform .12s; min-height: 36px; white-space: nowrap; -webkit-tap-highlight-color: transparent; }
.share-btn:hover  { background: var(--surface-3); color: var(--text); transform: translateY(-1px); }
.share-btn:active { transform: scale(.95); }
.share-btn--native { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: transparent; color: var(--bg); font-weight: 700; padding: 9px 18px; }
.share-btn--native:hover { opacity: .88; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.share-btn--whatsapp:hover { background: #25d366; border-color: #25d366; color: #fff; }
.share-btn--x:hover        { background: #000; border-color: #000; color: #fff; }
html[data-theme="dark"] .share-btn--x:hover { background: #e7e9ea; border-color: #e7e9ea; color: #000; }
.share-btn--fb:hover       { background: #1877f2; border-color: #1877f2; color: #fff; }
.share-btn--copy { min-width: 80px; }
.share-btn--copied { background: rgba(var(--accent2-rgb),.12) !important; border-color: var(--accent-2) !important; color: var(--accent-2) !important; }
html[lang="ar"] .share-btn { font-family: var(--font-ar-body); font-size: .82rem; }

/* ════════════════════════════════════════════════
   BOOKMARKS MODAL
   ════════════════════════════════════════════════ */
.bm-overlay { position: fixed; inset: 0; z-index: 600; background: rgba(0,0,0,.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; align-items: flex-end; justify-content: center; animation: fadeIn .18s ease both; }
.bm-overlay.hidden { display: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.bm-sheet { background: var(--surface); border-radius: 20px 20px 0 0; width: 100%; max-width: 680px; max-height: 82vh; display: flex; flex-direction: column; overflow: hidden; animation: sheetUp .22s var(--ease) both; }
.bm-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 12px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.bm-title { font-size: 1rem; font-weight: 700; color: var(--text); }
html[lang="ar"] .bm-title { font-family: var(--font-ar-body); }
.bm-close { background: var(--surface-2); border: 1px solid var(--border); border-radius: 50%; width: 30px; height: 30px; cursor: pointer; color: var(--text-2); font-size: .82rem; display: flex; align-items: center; justify-content: center; transition: background .15s; }
.bm-close:hover { background: var(--surface-3); color: var(--text); }
.bm-grid { overflow-y: auto; padding: 14px 14px calc(28px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 540px) { .bm-grid { grid-template-columns: repeat(2, 1fr); } }
.bm-empty { text-align: center; color: var(--text-2); font-size: .88rem; padding: 40px 16px; grid-column: 1/-1; line-height: 1.6; }
html[lang="ar"] .bm-empty { font-family: var(--font-ar-body); font-size: .92rem; }
.bm-remove-btn { position: absolute; top: 8px; right: 8px; background: var(--surface-2); border: none; border-radius: 6px; width: 22px; height: 22px; font-size: .72rem; cursor: pointer; color: var(--text-2); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .15s; z-index: 2; }
.news-card:hover .bm-remove-btn, .news-card:focus-within .bm-remove-btn { opacity: 1; }
@media (hover: none) { .bm-remove-btn { opacity: .7; } }
.bm-card--removing { animation: shrinkOut .22s ease both; pointer-events: none; }
@keyframes shrinkOut { to { transform: scale(.9); opacity: 0; } }

/* ════════════════════════════════════════════════
   EMPTY STATE
   ════════════════════════════════════════════════ */
.empty-state { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 56px 20px; text-align: center; animation: fadeUp .25s var(--ease) both; }
.empty-icon  { font-size: 2.8rem; line-height: 1; opacity: .3; margin-bottom: 4px; }
.empty-title { font-family: var(--font-en-display); font-size: 1.1rem; font-weight: 400; color: var(--text-2); letter-spacing: -.01em; }
html[lang="ar"] .empty-title { font-family: var(--font-ar-display); font-weight: 800; font-size: 1rem; }
.empty-sub   { font-size: .82rem; color: var(--muted); max-width: 280px; line-height: 1.6; }
html[lang="ar"] .empty-sub { font-family: var(--font-ar-body); font-size: .86rem; }
.we-retry { padding: 10px 22px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font-size: .82rem; font-weight: 600; font-family: inherit; cursor: pointer; min-height: 40px; transition: background .15s; }
.we-retry:hover { background: var(--surface-3); }
html[lang="ar"] .we-retry { font-family: var(--font-ar-body); }

/* ════════════════════════════════════════════════
   WEATHER TAB + MINI STRIP
   ════════════════════════════════════════════════ */
#weatherSection { padding-top: 4px; display: flex; justify-content: center; }
.weather-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 20px; width: 100%; max-width: 520px; display: flex; flex-direction: column; gap: 16px; animation: fadeUp .3s var(--ease) both; }
.wc-location { display: flex; align-items: center; gap: 7px; }
.wc-loc-dot  { font-size: .9rem; flex-shrink: 0; }
.wc-loc-name { font-size: .88rem; font-weight: 600; color: var(--text-2); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html[lang="ar"] .wc-loc-name { font-family: var(--font-ar-body); }
.wc-refresh { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); font-size: 1rem; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background .15s, transform .2s; flex-shrink: 0; }
.wc-refresh:hover { background: var(--surface-3); transform: rotate(180deg); }
.wc-hero { display: flex; align-items: center; gap: 18px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.wc-weather-icon { font-size: 4rem; line-height: 1; flex-shrink: 0; }
.wc-hero-right { display: flex; flex-direction: column; gap: 3px; }
.wc-temp { font-family: var(--font-en-display); font-size: 3.2rem; font-weight: 400; line-height: 1; color: var(--text); letter-spacing: -.02em; }
.wc-unit { font-size: 1.4rem; color: var(--text-2); }
.wc-condition { font-size: .88rem; font-weight: 600; color: var(--accent); letter-spacing: .02em; }
html[lang="ar"] .wc-condition { font-family: var(--font-ar-body); font-size: .92rem; }
.wc-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
@media (max-width: 400px) { .wc-stats { grid-template-columns: repeat(2, 1fr); } }
.ws-stat { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 10px; display: flex; flex-direction: column; gap: 3px; text-align: center; }
.ws-stat-label { font-size: .62rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
html[lang="ar"] .ws-stat-label { font-family: var(--font-ar-body); letter-spacing: 0; font-size: .68rem; text-transform: none; }
.ws-stat-val { font-size: .92rem; font-weight: 700; color: var(--text); }
.wc-forecast-header { font-size: .65rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
html[lang="ar"] .wc-forecast-header { font-family: var(--font-ar-body); letter-spacing: 0; font-size: .72rem; text-transform: none; }
.wc-forecast { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.wc-forecast::-webkit-scrollbar { display: none; }
.wf-hour { flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--surface-2); min-width: 58px; transition: background .15s; }
.wf-hour--now { border-color: rgba(var(--accent-rgb),.4); background: rgba(var(--accent-rgb),.07); }
.wf-label { font-size: .65rem; font-weight: 700; color: var(--muted); letter-spacing: .04em; }
html[lang="ar"] .wf-label { font-family: var(--font-ar-body); letter-spacing: 0; font-size: .7rem; }
.wf-hour--now .wf-label { color: var(--accent); }
.wf-icon  { font-size: 1.2rem; line-height: 1; }
.wf-temp  { font-size: .82rem; font-weight: 700; color: var(--text); }
/* 14-day daily forecast cards */
.wd-grid { display: flex; flex-direction: column; gap: 6px; }
.wd-day { display: grid; grid-template-columns: 80px 2rem 1fr auto; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--surface-2); transition: background .15s; }
.wd-day--today { border-color: rgba(var(--accent-rgb),.4); background: rgba(var(--accent-rgb),.07); }
.wd-day-label { font-size: .75rem; font-weight: 700; color: var(--text-2); white-space: nowrap; }
html[lang="ar"] .wd-day-label { font-family: var(--font-ar-body); font-size: .8rem; }
.wd-day--today .wd-day-label { color: var(--accent); font-weight: 800; }
.wd-day-icon { font-size: 1.4rem; line-height: 1; text-align: center; }
.wd-day-cond { font-size: .72rem; font-weight: 500; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html[lang="ar"] .wd-day-cond { font-family: var(--font-ar-body); font-size: .76rem; }
.wd-day-temps { display: flex; align-items: baseline; gap: 3px; justify-content: flex-end; }
.wd-tmax { font-size: .9rem; font-weight: 700; color: var(--text); }
.wd-sep  { font-size: .72rem; color: var(--muted); }
.wd-tmin { font-size: .8rem; font-weight: 500; color: var(--text-2); }
.wd-day-meta { display: contents; }
.wd-meta-item { font-size: .62rem; color: var(--muted); white-space: nowrap; }
html[lang="ar"] .wd-meta-item { font-family: var(--font-ar-body); font-size: .65rem; }
.wc-attribution { font-size: .68rem; color: var(--muted); text-align: center; border-top: 1px solid var(--border); padding-top: 10px; }
.wc-attribution a { color: var(--text-2); }
.wc-attribution a:hover { color: var(--accent); }

/* ── Weather location search modal ── */
.wlm-overlay { position: fixed; inset: 0; z-index: 600; background: rgba(0,0,0,.6); backdrop-filter: blur(4px); display: flex; align-items: flex-end; justify-content: center; padding: 0 0 env(safe-area-inset-bottom); }
.wlm-box { background: var(--surface); border-radius: 20px 20px 0 0; width: 100%; max-width: 520px; max-height: 80vh; display: flex; flex-direction: column; overflow: hidden; animation: fadeUp .25s var(--ease) both; }
.wlm-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 10px; border-bottom: 1px solid var(--border); }
.wlm-title { font-size: .95rem; font-weight: 700; color: var(--text); }
html[lang="ar"] .wlm-title { font-family: var(--font-ar-body); }
.wlm-close { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); font-size: .85rem; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.wlm-search-row { display: flex; gap: 8px; padding: 12px 16px; }
.wlm-input { flex: 1; padding: 10px 14px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font-size: .88rem; outline: none; }
.wlm-input:focus { border-color: var(--accent); }
html[lang="ar"] .wlm-input { font-family: var(--font-ar-body); direction: rtl; }
.wlm-search-btn { padding: 10px 16px; border-radius: var(--r-sm); background: var(--accent); color: #fff; font-size: .82rem; font-weight: 700; border: none; cursor: pointer; white-space: nowrap; }
.wlm-results { overflow-y: auto; flex: 1; padding: 0 16px 8px; }
.wlm-hint { font-size: .82rem; color: var(--muted); padding: 14px 0; text-align: center; }
.wlm-result-item { width: 100%; text-align: start; padding: 11px 12px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--surface-2); cursor: pointer; display: flex; flex-direction: column; gap: 2px; margin-bottom: 6px; transition: background .15s; }
.wlm-result-item:hover { background: var(--surface-3); border-color: var(--accent); }
.wlm-ri-name { font-size: .88rem; font-weight: 600; color: var(--text); }
.wlm-ri-sub  { font-size: .72rem; color: var(--muted); }
.wlm-divider { font-size: .65rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 8px 16px 4px; }
html[lang="ar"] .wlm-divider { font-family: var(--font-ar-body); letter-spacing: 0; font-size: .72rem; text-transform: none; }
.wlm-gps-btn { margin: 4px 16px 12px; padding: 11px 16px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font-size: .85rem; font-weight: 600; cursor: pointer; text-align: center; transition: background .15s; }
.wlm-gps-btn:hover { background: var(--surface-3); }
.wlm-saved-list { padding: 0 16px 12px; display: flex; flex-direction: column; gap: 6px; }
.wlm-saved-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--surface-2); }
.wlm-saved-name { font-size: .85rem; color: var(--text); }
html[lang="ar"] .wlm-saved-name { font-family: var(--font-ar-body); }
.wlm-saved-del { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface-3); color: var(--muted); font-size: .72rem; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.weather-card--loading { gap: 12px; }
.ws-skeleton { border-radius: 6px; background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.6s ease-in-out infinite; }
.ws-skeleton--loc { height: 16px; width: 40%; }
.ws-skeleton--temp { height: 64px; width: 55%; margin: 6px 0; }
.ws-skeleton--condition { height: 14px; width: 35%; }
.ws-skeleton-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 4px; }
.ws-skeleton--stat { height: 52px; }
.weather-error { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 40px 20px; text-align: center; max-width: 360px; margin: 0 auto; }
.we-icon  { font-size: 2.8rem; opacity: .5; }
.we-title { font-size: .96rem; font-weight: 700; color: var(--text); }
html[lang="ar"] .we-title { font-family: var(--font-ar-body); }
.we-sub   { font-size: .8rem; color: var(--text-2); }
html[lang="ar"] .we-sub { font-family: var(--font-ar-body); }
.wc-loc-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; margin-bottom: 4px; }
.wc-loc-tabs::-webkit-scrollbar { display: none; }
.wc-loc-tab { flex-shrink: 0; padding: 5px 13px; border-radius: 20px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); font-size: .75rem; font-weight: 600; cursor: pointer; transition: all .15s; white-space: nowrap; }
.wc-loc-tab:hover  { border-color: var(--accent); color: var(--accent); }
.wc-loc-tab.active { background: rgba(var(--accent-rgb),.1); border-color: var(--accent); color: var(--accent); }
/* ══ Weather Mini Card ═══════════════════════════════════════════════════════ */
.wx-mini-strip {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 6px;
  padding: 14px 18px 12px;
  margin-bottom: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 8px 32px rgba(41,98,210,.28), inset 0 1px 0 rgba(255,255,255,.22);
  cursor: pointer;
  user-select: none;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.wx-mini-strip:hover  { transform: translateY(-2px); box-shadow: 0 14px 40px rgba(41,98,210,.38), inset 0 1px 0 rgba(255,255,255,.26); }
.wx-mini-strip:active { transform: scale(.985); }

/* Glassy sheen overlay */
.wx-mini-glow {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(160deg, rgba(255,255,255,.14) 0%, rgba(255,255,255,0) 55%);
  border-radius: inherit;
}

/* Top row — location */
.wx-mini-top { display: flex; align-items: center; }
.wx-mini-location {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: .78rem; font-weight: 600; color: rgba(255,255,255,.9);
  letter-spacing: .01em;
}
html[lang="ar"] .wx-mini-location { font-family: var(--font-ar-body); }
.wx-mini-pin    { opacity: .8; flex-shrink: 0; }
.wx-mini-chevron { opacity: .7; flex-shrink: 0; }

/* Body — temp + icon */
.wx-mini-body { display: flex; align-items: flex-end; justify-content: space-between; }
.wx-mini-left { display: flex; flex-direction: column; gap: 1px; }
.wx-mini-temp-wrap { display: flex; align-items: flex-start; line-height: 1; }
.wx-mini-temp {
  font-size: 2.9rem; font-weight: 700; color: #fff;
  letter-spacing: -.04em; line-height: 1;
}
.wx-mini-unit {
  font-size: 1rem; font-weight: 500; color: rgba(255,255,255,.85);
  margin-top: .3rem; margin-inline-start: 2px;
}
.wx-mini-cond {
  font-size: .82rem; font-weight: 500; color: rgba(255,255,255,.85);
  margin-top: 2px;
}
html[lang="ar"] .wx-mini-cond { font-family: var(--font-ar-body); }

/* Weather icon — large, slightly glowing */
.wx-mini-icon-wrap {
  font-size: 3rem; line-height: 1;
  filter: drop-shadow(0 2px 12px rgba(255,200,50,.45));
  flex-shrink: 0; margin-bottom: 2px;
}

/* Footer row — stats */
.wx-mini-footer {
  display: flex; align-items: center; gap: 14px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,.15);
}
.wx-mini-stat {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: .74rem; font-weight: 500; color: rgba(255,255,255,.82);
  white-space: nowrap;
}
.wx-mini-stat svg { opacity: .75; flex-shrink: 0; }
html[lang="ar"] .wx-mini-stat { font-family: var(--font-ar-body); font-size: .78rem; }

@media (max-width: 380px) {
  .wx-mini-temp { font-size: 2.4rem; }
  .wx-mini-icon-wrap { font-size: 2.4rem; }
  .wx-mini-stat:last-child { display: none; }
}

/* ════════════════════════════════════════════════
   USER PAGE
   ════════════════════════════════════════════════ */
.up-overlay { position: fixed; inset: 0; z-index: 520; background: rgba(0,0,0,.75); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; align-items: flex-end; justify-content: center; opacity: 0; transition: opacity .25s var(--ease); padding-bottom: env(safe-area-inset-bottom); }
.up-overlay.up-visible { opacity: 1; }
.up-sheet { position: relative; width: 100%; max-width: 480px; max-height: 92dvh; background: var(--surface); border-radius: 24px 24px 0 0; overflow-y: auto; overscroll-behavior: contain; transform: translateY(40px); transition: transform .3s var(--ease); scrollbar-width: none; padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
.up-sheet::-webkit-scrollbar { display: none; }
.up-overlay.up-visible .up-sheet { transform: translateY(0); }
.up-close { position: absolute; top: 16px; inset-inline-end: 16px; z-index: 10; width: 32px; height: 32px; border-radius: 50%; border: none; background: rgba(0,0,0,.25); color: #fff; font-size: .82rem; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background .15s; backdrop-filter: blur(4px); }
.up-close:hover { background: rgba(0,0,0,.45); }
.up-hero { position: relative; padding: 48px 24px 24px; display: flex; align-items: flex-end; gap: 16px; overflow: hidden; }
.up-hero-bg { position: absolute; inset: 0; background: linear-gradient(135deg, color-mix(in oklab, var(--accent-2) 30%, var(--surface-2)), color-mix(in oklab, var(--accent) 18%, var(--surface-3))); }
.up-hero-bg::after { content: ''; position: absolute; top: -40px; inset-inline-end: -30px; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, color-mix(in oklab, var(--accent) 22%, transparent), transparent 70%); }
.up-avatar { position: relative; z-index: 1; width: 64px; height: 64px; border-radius: 50%; background: color-mix(in oklab, var(--accent) 25%, var(--surface)); border: 2.5px solid color-mix(in oklab, var(--accent) 50%, transparent); display: flex; align-items: center; justify-content: center; font-family: var(--font-en-display); font-size: 1.4rem; font-weight: 400; color: var(--text); flex-shrink: 0; box-shadow: 0 4px 16px rgba(0,0,0,.25); }
html[lang="ar"] .up-avatar { font-family: var(--font-ar-display); font-weight: 800; font-size: 1.2rem; }
.up-identity { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.up-name  { font-family: var(--font-en-display); font-size: 1.25rem; font-weight: 400; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.01em; }
html[lang="ar"] .up-name { font-family: var(--font-ar-display); font-weight: 800; font-size: 1.1rem; }
.up-email { font-size: .72rem; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-since { font-size: .68rem; color: var(--muted); margin-top: 2px; }
html[lang="ar"] .up-email, html[lang="ar"] .up-since { font-family: var(--font-ar-body); }
.up-streak-msg { text-align: center; font-size: .8rem; font-weight: 700; color: var(--accent); letter-spacing: .03em; padding: 10px 24px 0; }
html[lang="ar"] .up-streak-msg { font-family: var(--font-ar-body); letter-spacing: 0; }
.up-stats { display: flex; align-items: center; justify-content: center; gap: 0; padding: 18px 24px; border-bottom: 1px solid var(--border); }
.up-stat { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0; }
.up-stat-n { font-family: var(--font-en-display); font-size: 1.7rem; font-weight: 400; color: var(--text); line-height: 1; letter-spacing: -.02em; }
.up-stat-l { font-size: .67rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
html[lang="ar"] .up-stat-l { font-family: var(--font-ar-body); letter-spacing: 0; font-size: .72rem; text-transform: none; }
.up-stat-divider { width: 1px; height: 32px; background: var(--border); flex-shrink: 0; }
.up-section { padding: 18px 24px 0; }
.up-section-label { font-size: .68rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
html[lang="ar"] .up-section-label { font-family: var(--font-ar-body); letter-spacing: 0; font-size: .74rem; text-transform: none; }
.up-topics { display: flex; flex-wrap: wrap; gap: 7px; }
.up-topic-pill { display: inline-flex; align-items: center; padding: 5px 13px; border-radius: 999px; background: rgba(var(--accent-rgb),.1); border: 1px solid rgba(var(--accent-rgb),.25); color: var(--text-2); font-size: .76rem; font-weight: 600; transition: background .15s; }
.up-topic-pill:hover { background: rgba(var(--accent-rgb),.18); }
html[lang="ar"] .up-topic-pill { font-family: var(--font-ar-body); font-size: .82rem; }
.up-no-topics { font-size: .8rem; color: var(--muted); }
html[lang="ar"] .up-no-topics { font-family: var(--font-ar-body); }
.up-actions { display: flex; flex-direction: column; gap: 8px; padding: 22px 24px 32px; }
.up-btn { width: 100%; padding: 13px 20px; border-radius: var(--r); font-family: var(--font-en-body); font-size: .88rem; font-weight: 700; cursor: pointer; transition: opacity .15s, background .15s, transform .12s; min-height: 48px; letter-spacing: .01em; }
html[lang="ar"] .up-btn { font-family: var(--font-ar-body); font-size: .94rem; }
.up-btn:active { transform: scale(.98); }
.up-btn--primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--bg); border: none; }
.up-btn--primary:hover { opacity: .88; }
.up-btn--ghost { background: transparent; color: var(--text-2); border: 1px solid var(--border); }
.up-btn--ghost:hover { background: var(--surface-2); color: var(--accent-hot); border-color: var(--accent-hot); }

/* ══ Notification Inbox overlay (bottom sheet, override modal-overlay center) */
#notif-inbox-modal { align-items: flex-end; justify-content: center; padding: 0; z-index: 700; }

/* ══ Notification Badge ══════════════════════════════════════════════════ */
.chip--notif { position: relative; }
.notif-badge {
  position: absolute; top: 4px; right: 4px;
  min-width: 16px; height: 16px; padding: 0 4px;
  background: var(--accent-hot, #ef4444); color: #fff;
  border-radius: 99px; font-size: .65rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  line-height: 1; pointer-events: none;
}
.notif-badge.hidden { display: none; }

/* ══ Foreground Notification Toast ══════════════════════════════════════ */
.notif-toast {
  position: fixed; bottom: calc(env(safe-area-inset-bottom) + 72px); left: 50%;
  transform: translateX(-50%) translateY(20px);
  width: min(calc(100vw - 32px), 420px);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 12px 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
  display: flex; align-items: flex-start; gap: 10px;
  opacity: 0; pointer-events: none;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
  z-index: 900;
}
.notif-toast--visible { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.notif-toast-inner { flex: 1; cursor: pointer; }
.notif-toast-source { font-size: .72rem; font-weight: 700; color: var(--accent); display: block; margin-bottom: 3px; }
.notif-toast-body { font-size: .85rem; color: var(--text); margin: 0; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.notif-toast-close { background: none; border: none; color: var(--muted); font-size: 1rem; cursor: pointer; padding: 0 4px; line-height: 1; flex-shrink: 0; }

/* ══ Notification Inbox Modal ═══════════════════════════════════════════ */
.notif-inbox-box {
  background: var(--surface); border-radius: 20px 20px 0 0;
  width: 100%; max-width: 520px; max-height: 80vh;
  display: flex; flex-direction: column; overflow: hidden;
  animation: fadeUp .25s var(--ease) both;
}
.notif-inbox-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px 12px; border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.notif-inbox-title { font-size: 1rem; font-weight: 700; color: var(--text); margin: 0; }
html[lang="ar"] .notif-inbox-title { font-family: var(--font-ar-body); }
.notif-inbox-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; }
.notif-inbox-empty { padding: 32px 20px; text-align: center; color: var(--muted); font-size: .9rem; }
html[lang="ar"] .notif-inbox-empty { font-family: var(--font-ar-body); }
.notif-inbox-item {
  padding: 14px 20px; border-bottom: 1px solid var(--border);
  transition: background .15s;
}
.notif-inbox-item:hover { background: var(--surface-2); }
.nii-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.nii-source { font-size: .72rem; font-weight: 700; color: var(--accent); }
.nii-time   { font-size: .7rem; color: var(--muted); }
.nii-body   { font-size: .88rem; color: var(--text); margin: 0; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
html[lang="ar"] .nii-body { font-family: var(--font-ar-body); }
