:root,
[data-theme='dark'] {
  --bg-page: #0f1311;
  --bg-panel: #161b18;
  --bg-card: #1a2120;
  --text-main: #ecede7;
  --text-secondary: #9aa09c;
  --text-muted: #6a6f6c;
  --border: rgba(255, 255, 255, 0.07);
  --shadow: rgba(0, 0, 0, 0.5);
  --accent: #3b8068;
  --accent-soft: #4fa688;
  --accent-ink: #d4eddf;
  --accent-bg: rgba(59, 128, 104, 0.1);
  --accent-glow: rgba(59, 128, 104, 0.35);

  /* kept for widget compat */
  --accent-bright: #4fa688;
  --accent-warm: #d88758;
  --accent-gold: #d4b176;
  --accent-danger: #e25c50;
  --serif: 'Instrument Serif', georgia, serif;
  --mono: 'Geist Mono', ui-monospace, sfmono-regular, menlo, monospace;
  --shadow-soft: 0 1px 0 rgba(255, 255, 255, 0.04), 0 6px 18px rgba(0, 0, 0, 0.4);
  --shadow-lift: 0 1px 0 rgba(255, 255, 255, 0.04), 0 4px 18px rgba(0, 0, 0, 0.45);
  --radius-xl: 22px;
  --radius-lg: 22px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --homepage-stack-gap: 18px;
  --page-left-inset: 18px;
  --safe-area-inset-top: env(safe-area-inset-top, 0);
  --safe-area-inset-bottom: env(safe-area-inset-bottom, 0);
  --for-you-heading-gap: 16px;
  --search-section-padding-y: 0;
  --search-section-padding-top: 0;
  --widget-card-body-padding: 12px 14px;
  --bg-chip: rgba(245, 242, 234, 0.06);
}

[data-theme='light'] {
  --bg-page: #f6f4ee;
  --bg-panel: #fff;
  --bg-card: #fff;
  --text-main: #15181a;
  --text-secondary: #5c6168;
  --text-muted: #8e9298;
  --border: rgba(15, 20, 18, 0.08);
  --shadow: rgba(15, 30, 25, 0.08);
  --accent: #1e5f4f;
  --accent-soft: #2c8068;
  --accent-ink: #0b2e25;
  --accent-bg: rgba(30, 95, 79, 0.08);
  --accent-glow: rgba(30, 95, 79, 0.3);
  --accent-bright: #2c8068;
  --accent-warm: #c97b4f;
  --accent-gold: #a88147;
  --accent-danger: #d4384a;
  --shadow-soft: 0 1px 0 rgba(15, 20, 18, 0.03), 0 6px 18px rgba(15, 20, 18, 0.05);
  --shadow-lift: 0 1px 0 rgba(15, 20, 18, 0.04), 0 4px 18px rgba(15, 20, 18, 0.06);
  --bg-chip: rgba(15, 20, 18, 0.06);
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family:
    'Inter',
    'Noto Sans Arabic',
    'Geeza Pro',
    Tahoma,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    sans-serif;
  color: var(--text-main);
  background: transparent;
  overflow-x: hidden;
  font-weight: 430;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scrollbar-width: none;
}

html[dir='rtl'] body {
  text-align: right;
}

body[data-language='ar'] {
  font-family:
    'Inter',
    'Noto Sans Arabic',
    'Geeza Pro',
    Tahoma,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    sans-serif;
}

* {
  scrollbar-width: none;
}

*::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
}

button,
a,
[role='button'],
.autocomplete-item,
.dropdown-item,
.favorite-item,
.dailystar-rss-card {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.hidden {
  display: none !important;
}

.background {
  position: fixed;
  inset: 0;
  background: var(--bg-page);
  z-index: -2;
}

.background-overlay {
  position: absolute;
  inset: 0;
  background: none;
}

.build-stamp {
  position: fixed;
  right: max(10px, env(safe-area-inset-right, 0));
  bottom: calc(10px + var(--safe-area-inset-bottom));
  z-index: 5;
  max-width: min(72vw, 280px);
  padding: 6px 9px;
  border-radius: 999px;
  background: rgb(249 249 251 / 88%);
  color: var(--text-secondary);
  font-size: 10px;
  line-height: 1.3;
  letter-spacing: 0.01em;
  text-align: right;
  box-shadow: 0 8px 24px rgb(27 36 54 / 8%);
  backdrop-filter: blur(10px);
  pointer-events: none;
}

.app-container {
  width: min(430px, 100%);
  margin: 0 auto;
  background: var(--bg-page);
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.home-scroll {
  flex: 1;
  overflow-x: hidden;
}

.home-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(12px, env(safe-area-inset-top)) 20px 8px;
  background: var(--bg-page);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.home-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.home-logo-icon {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--accent);

  /* color: var(--accent-ink); */
  color: #83f5c6;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px var(--accent-glow);
}

.home-logo-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: -0.2px;
}

.home-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: none;
  background: var(--bg-panel);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.15s ease;
}

.home-icon-btn:hover,
.home-icon-btn:active {
  opacity: 0.8;
}

.surface-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: visible;
  isolation: isolate;
  box-shadow: var(--shadow-soft);
}

.surface-card > [id^='widget-'] {
  /* padding: 14px 16px; */
}

.hero-zone {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 20px 0;
}

.content-sections {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px 20px calc(24px + env(safe-area-inset-bottom));
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.section-header h2 {
  font-size: 13px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-main);
}

.section-header .section-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  opacity: 0.7;
}

.privacy-stats-card {
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
}

.privacy-stats-icon {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--accent-bg);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.privacy-stats-label {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.privacy-stats-counts {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.privacy-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.privacy-stat-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.privacy-stat-unit {
  font-size: 9px;
  color: var(--text-muted);
  line-height: 1.3;
}

.favorites-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.favorites-tabs {
  display: none;
}

.favorites-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0 8px;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: 0.02em;
}

.favorites-tab svg {
  width: 14px;
  height: 14px;
}

.favorites-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.favorites-edit-btn {
  display: none;
}

.favorites-grid {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  flex-wrap: nowrap;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 10px;
  margin: 0 -10px;
}

.favorites-grid::-webkit-scrollbar {
  display: none;
}

.favorites-grid.is-switching {
  opacity: 0;
  transform: translateX(-50%) translateY(6px) scale(0.985);
}

.favorites-grid.is-entering {
  animation: favoritesEnter 220ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

@keyframes favoritesEnter {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(8px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

.favorite-item {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
}

.favorite-icon {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.favorite-icon img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.favorite-name {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  text-align: center;
  max-width: 56px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.favorite-add-tile {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  border: none;
  background: transparent;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

.favorite-add-tile svg {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  border: 1.5px dashed var(--border);
  color: var(--text-muted);
  padding: 14px;
  box-sizing: border-box;
}

.favorites-empty {
  width: 100%;
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

.search-section {
  position: relative;
  z-index: 260;
}

.search-glow-wrapper {
  position: relative;
  z-index: 0;
}

.search-typewriter {
  position: absolute;
  left: 46px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  font-weight: 430;
  color: var(--text-secondary);
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  z-index: 2;
}

.search-typewriter.typing-done {
  display: none;
}

.search-typewriter::after {
  content: '|';
  display: inline-block;
  margin-left: 1px;
  color: var(--text-secondary);
  animation: typewriter-cursor-blink 1s step-end infinite;
}

.search-typewriter.typing-done::after {
  display: none;
}

@keyframes typewriter-cursor-blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

.search-container {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 56px;
  background: var(--bg-panel);
  border-radius: 28px;
  border: 1px solid var(--border);
  padding: 0 14px;
  box-shadow:
    0 1px 0 var(--border),
    0 8px 30px var(--shadow);
  transition:
    box-shadow 220ms cubic-bezier(0.2, 0.7, 0.3, 1),
    border-color 220ms cubic-bezier(0.2, 0.7, 0.3, 1);
  overflow: hidden;
}

.search-container:focus-within {
  border-color: var(--accent);
  box-shadow:
    0 0 0 4px var(--accent-bg),
    0 8px 24px var(--shadow);
}

.search-engine-btn,
.voice-search-btn {
  border: none;
  background: transparent;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  flex-shrink: 0;
  cursor: pointer;
}

.search-engine-btn svg {
  width: 24px;
  height: 24px;
}

.voice-search-btn svg {
  width: 24px;
  height: 24px;
}

.qr-scan-btn {
  margin-left: 4px;
}

.qr-scan-btn.is-scanning {
  opacity: 1;
  color: var(--accent-primary, #0f3d2e);
  animation: qr-scan-pulse 0.8s ease-in-out infinite alternate;
}

@keyframes qr-scan-pulse {
  from {
    opacity: 0.5;
  }
  to {
    opacity: 1;
  }
}

.clear-search-btn svg {
  width: 22px;
  height: 22px;
}

.search-input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text-main);
  font-family: inherit;
  font-size: 16px;
  font-weight: 430;
}

.search-input::placeholder {
  color: var(--text-secondary);
}

.recent-visits-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 10px 4px 4px;
  min-height: 44px;
}

.recent-visits-bar:empty {
  display: none;
}

.recent-visit-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  flex-shrink: 0;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
  padding: 0;
}

.recent-visit-item:hover,
.recent-visit-item:active {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lift);
}

.recent-visit-favicon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  pointer-events: none;
}

.deen-ai-section {
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.deen-ai-hero {
  position: relative;
  background: linear-gradient(135deg, #0d2e24 0%, #1a3a2e 50%, #0f2a22 100%);
  padding: 16px 16px 18px;
  overflow: hidden;
}

.deen-ai-hero-bg {
  position: absolute;
  inset: 0;
  opacity: 0.09;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Cpath d='M20 0 L40 20 L20 40 L0 20Z' fill='none' stroke='%23fff' stroke-width='0.6'/%3E%3Cpath d='M20 8 L32 20 L20 32 L8 20Z' fill='none' stroke='%23fff' stroke-width='0.4'/%3E%3Ccircle cx='20' cy='20' r='5' fill='none' stroke='%23fff' stroke-width='0.4'/%3E%3C/svg%3E");
  background-size: 40px 40px;
  pointer-events: none;
}

.deen-ai-hero-glow {
  position: absolute;
  right: -20px;
  bottom: -20px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(59 128 104 / 22%) 0%, transparent 70%);
  pointer-events: none;
}

.deen-ai-header {
  margin-bottom: 13px;
  position: relative;
  z-index: 1;
}

.deen-ai-title-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.deen-ai-sparkle {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  color: var(--accent-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 3px 12px rgb(59 128 104 / 55%);
}

.deen-ai-sparkle svg {
  width: 14px;
  height: 14px;
}

.deen-ai-hero .deen-ai-header h2 {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1;
  color: #e8f5ef;
}

.deen-ai-beta {
  font-size: 9px;
  font-weight: 700;
  color: #c2e8d8;
  letter-spacing: 0.6px;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgb(255 255 255 / 12%);
}

.deen-ai-launcher {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgb(0 0 0 / 32%);
  border-radius: 11px;
  border: 1px solid rgb(255 255 255 / 10%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: relative;
  z-index: 1;
}

.deen-ai-launcher-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: rgb(255 255 255 / 70%);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
}

.deen-ai-launcher-input::placeholder {
  color: rgb(255 255 255 / 55%);
  opacity: 1;
}

.deen-ai-launcher-send {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--accent);
  color: var(--accent-ink);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgb(59 128 104 / 50%);
}

.deen-ai-launcher-send svg {
  width: 14px;
  height: 14px;
}

.deen-ai-topics {
  background: var(--bg-card);
  padding: 11px 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.deen-ai-topic {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  background: rgb(255 255 255 / 4%);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 11px;
  cursor: pointer;
  font-family: inherit;
  transition:
    background 0.15s,
    color 0.15s;
}

.deen-ai-topic:hover {
  background: var(--accent-bg);
  color: var(--accent-soft);
}

.deen-ai-topic-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-soft);
  flex-shrink: 0;
}

.autocomplete-dropdown {
  position: fixed;
  left: 0;
  top: 0;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  z-index: 340;
}

@media (max-width: 767px) {
  body.search-focus-mode {
    overflow: hidden;
  }

  body.search-focus-mode .app-container {
    width: 100%;
    min-height: 100dvh;
    margin: 0;
    padding: 0;
    gap: 0;
    background: transparent;
  }

  /*
   * Fade the rest of the page out instead of cutting it instantly.
   * NB: #section-search lives inside .hero-zone, so we must NOT hide
   * .hero-zone itself (that would also hide/blur the search). Hide only
   * the hero-zone's non-search siblings.
   */
  .home-header,
  #section-protection,
  #section-favorites,
  .content-sections,
  .scroll-to-top,
  .build-stamp {
    transition:
      opacity 0.2s ease,
      transform 0.2s ease,
      display 0.2s allow-discrete;
  }

  body.search-focus-mode .home-header,
  body.search-focus-mode #section-protection,
  body.search-focus-mode #section-favorites,
  body.search-focus-mode .content-sections,
  body.search-focus-mode .scroll-to-top,
  body.search-focus-mode .build-stamp {
    display: none !important;
    opacity: 0;
    transform: translateY(6px);
  }

  /*
   * .hero-zone keeps a lingering `transform: translateY(0)` from its
   * pageFadeIn load animation (animation-fill-mode: both). A non-none
   * transform makes .hero-zone the containing block for the fixed search
   * bar below, so `top: 0` resolves to the hero-zone box (not the viewport)
   * and the bar snaps as the hero siblings collapse. Drop it in focus mode
   * so the fixed bar is anchored to the viewport from the first frame.
   */
  body.search-focus-mode .hero-zone {
    animation: none;
    transform: none;
  }

  body.search-focus-mode #section-search {
    position: fixed;
    inset: 0 0 auto;
    z-index: 360;
    padding: calc(var(--safe-area-inset-top) + var(--search-section-padding-y)) 9px
      var(--search-section-padding-y);
    animation: search-focus-enter 0.22s ease-out both;
  }

  body.search-focus-mode #section-search .search-section {
    padding: 0;
  }

  @keyframes search-focus-enter {
    from {
      opacity: 0;
      transform: translateY(-6px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .home-header,
    #section-protection,
    #section-favorites,
    .content-sections,
    .scroll-to-top,
    .build-stamp {
      transition: none;
    }

    body.search-focus-mode #section-search {
      animation: none;
    }
  }
}

.search-engine-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  z-index: 280;
}

.autocomplete-section {
  border-bottom: 1px solid var(--border);
}

.autocomplete-section:last-child {
  border-bottom: 0;
}

.autocomplete-item,
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  color: inherit;
  text-decoration: none;
}

html[dir='rtl'] .autocomplete-item,
html[dir='rtl'] .dropdown-item {
  text-align: right;
}

.autocomplete-item.selected,
.dropdown-item.active {
  background: var(--accent-soft);
}

.autocomplete-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--bg-chip);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.autocomplete-icon img {
  width: 18px;
  height: 18px;
}

.autocomplete-text {
  font-size: 14px;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.autocomplete-text mark {
  background: transparent;
  color: var(--accent);
  font-weight: 640;
}

.autocomplete-subtitle,
.autocomplete-entity-description {
  font-size: 12px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.autocomplete-content {
  flex: 1;
  min-width: 0;
}

.autocomplete-entity-image {
  width: 60px;
  max-width: 60px;
  height: 60px;
  max-height: 60px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
}

.autocomplete-entity-image img {
  width: 100%;
  max-width: 60px;
  height: 100%;
  max-height: 60px;
  object-fit: cover;
  display: block;
}

.autocomplete-entity-title {
  font-size: 14px;
  font-weight: 560;
}

.autocomplete-action {
  border: none;
  background: transparent;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.dailystar-rss-section,
.kahf-ad-section,
.youtube-feed-section,
.mahfil-horizontal-feed-section,
.mahfil-feed-section {
  padding: 8px 0;
}

.islamic-carousel-section {
  padding: 10px;
}

.islamic-carousel-wrapper {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
}

.islamic-carousel-track {
  display: flex;
  align-items: stretch;
  gap: 10px;
  overflow: auto hidden;
  padding: 0 12px 28px 0;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
  direction: ltr;
}

.islamic-carousel-track.dragging {
  cursor: grabbing;
}

.islamic-widget-card {
  flex: 0 0 240px;
  border-radius: 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-soft);
  transition: box-shadow 220ms ease;
}

.islamic-widget-card:hover {
  box-shadow: 0 8px 16px rgba(24, 28, 46, 0.1);
}

.islamic-widget-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--icon-color) 20%, white);
  color: var(--icon-color);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.islamic-widget-icon svg {
  width: 20px;
  height: 20px;
}

.islamic-widget-text h3 {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.islamic-widget-text p {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.3;
  color: var(--text-secondary);
  opacity: 0.65;
}

/* ── Unified Islamic Carousel ── */

.ic-card {
  height: 150px;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
}

.ic-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.32s ease,
    transform 0.32s ease;
  transform: translateY(5px);
}

.ic-slide.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* ── Prayer slide ── */

.ic-prayer {
  display: flex;
  align-items: center;
  padding: 0 18px;
  gap: 14px;
  background: linear-gradient(180deg, #04060c 0%, #080f1e 30%, #0d1830 60%, #142040 100%);
}

.ic-prayer.sky-isha {
  background: linear-gradient(180deg, #04060c 0%, #080f1e 30%, #0d1830 60%, #142040 100%);
}

.ic-prayer.sky-fajr {
  background: linear-gradient(
    180deg,
    #06080f 0%,
    #0c1128 40%,
    #1a1840 65%,
    #2d1e4a 80%,
    #4a2a3a 90%,
    #6b3330 100%
  );
}

.ic-prayer.sky-morning {
  background: linear-gradient(
    180deg,
    #1a3a6a 0%,
    #2a5a9a 25%,
    #4a80c0 50%,
    #e8a050 80%,
    #f0c878 100%
  );
}

.ic-prayer.sky-dhuhr {
  background: linear-gradient(
    180deg,
    #1a6ab8 0%,
    #2e8ad8 30%,
    #4aabe0 60%,
    #7ac8f0 85%,
    #b8e4f8 100%
  );
}

.ic-prayer.sky-asr {
  background: linear-gradient(
    180deg,
    #2a5888 0%,
    #4a7aaa 25%,
    #8aaa80 50%,
    #d4a840 75%,
    #e8c060 100%
  );
}

.ic-prayer.sky-maghrib {
  background: linear-gradient(
    180deg,
    #1a0c28 0%,
    #3d1a40 15%,
    #7a2c28 40%,
    #c94a1e 65%,
    #e8803a 80%,
    #f5b060 100%
  );
}

.ic-prayer-info {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.ic-prayer-label {
  font-size: 10px;
  font-weight: 600;
  color: rgba(160, 190, 255, 0.85);
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.ic-prayer-time {
  font-size: 36px;
  font-weight: 700;
  color: #e8edf8;
  letter-spacing: -0.8px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  margin: 5px 0 4px;
}

.ic-prayer-skeleton {
  opacity: 0.3;
}

.ic-prayer-sub {
  font-size: 11px;
  color: rgba(140, 170, 220, 0.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ic-prayer-hijri {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 3px 18px;
  font-size: 10px;
  color: rgba(140, 170, 220, 0.5);
  background: rgba(0, 0, 0, 0.2);
  z-index: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ic-prayer-link {
  position: absolute;
  bottom: 4px;
  right: 14px;
  font-size: 10px;
  font-weight: 600;
  color: rgba(160, 190, 255, 0.6);
  text-decoration: none;
  z-index: 2;
}

.ic-prayer-link:hover {
  color: rgba(160, 190, 255, 0.9);
}

/* Prayer sky text colour overrides */

.ic-prayer.sky-morning .ic-prayer-label,
.ic-prayer.sky-maghrib .ic-prayer-label {
  color: rgba(255, 210, 140, 0.9);
}

.ic-prayer.sky-morning .ic-prayer-time,
.ic-prayer.sky-maghrib .ic-prayer-time {
  color: #fff;
}

.ic-prayer.sky-morning .ic-prayer-sub,
.ic-prayer.sky-maghrib .ic-prayer-sub {
  color: rgba(255, 225, 170, 0.75);
}

.ic-prayer.sky-morning .ic-prayer-hijri,
.ic-prayer.sky-maghrib .ic-prayer-hijri {
  color: rgba(255, 210, 140, 0.55);
}

.ic-prayer.sky-morning .ic-prayer-link,
.ic-prayer.sky-maghrib .ic-prayer-link {
  color: rgba(255, 210, 140, 0.55);
}

.ic-prayer.sky-dhuhr .ic-prayer-label {
  color: rgba(220, 240, 255, 0.9);
}

.ic-prayer.sky-dhuhr .ic-prayer-time {
  color: #eaf4ff;
}

.ic-prayer.sky-dhuhr .ic-prayer-sub {
  color: rgba(220, 240, 255, 0.75);
}

.ic-prayer.sky-dhuhr .ic-prayer-hijri {
  color: rgba(220, 240, 255, 0.55);
}

.ic-prayer.sky-dhuhr .ic-prayer-link {
  color: rgba(220, 240, 255, 0.6);
}

.ic-prayer.sky-asr .ic-prayer-label {
  color: rgba(255, 255, 255, 0.9);
}

.ic-prayer.sky-asr .ic-prayer-time {
  color: #fff;
}

.ic-prayer.sky-asr .ic-prayer-sub {
  color: rgba(255, 255, 255, 0.75);
}

.ic-prayer.sky-asr .ic-prayer-hijri {
  color: rgba(255, 255, 255, 0.55);
}

.ic-prayer.sky-asr .ic-prayer-link {
  color: rgba(255, 255, 255, 0.6);
}

/* ── Content slides (verse / hadith / dua) ── */

.ic-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 14px 16px 0;
  gap: 5px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.ic-content::-webkit-scrollbar {
  display: none;
}

.ic-type {
  font-size: 9px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  flex-shrink: 0;
}

.ic-arabic {
  font-family: 'SF Arabic', 'Geeza Pro', 'Amiri', 'Arabic Typesetting', serif;
  font-size: 15px;
  color: var(--text-main);
  direction: rtl;
  text-align: right;
  line-height: 1.5;
  flex-shrink: 0;
}

.ic-translation {
  font-size: 11px;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.4;
  flex-shrink: 0;
}

.ic-footer {
  position: sticky;
  bottom: 0;
  margin-top: auto;
  padding: 4px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-radius: 0 0 18px 18px;
}

.ic-ref {
  font-size: 9px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.6px;
  text-transform: uppercase;
  opacity: 0.55;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60%;
}

.ic-readmore {
  font-size: 10px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  flex-shrink: 0;
  opacity: 0.75;
}

.ic-readmore:hover {
  opacity: 1;
}

/* ── Progress bar ── */

@keyframes icProgress {
  from {
    width: 0%;
  }
  to {
    width: 100%;
  }
}

.ic-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--accent);
  opacity: 0.35;
  border-radius: 0 0 0 18px;
  animation: icProgress var(--ic-dur, 5s) linear;
}

/* ── Dots ── */

.ic-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
}

.ic-dot {
  width: 5px;
  height: 5px;
  border-radius: 3px;
  background: var(--border);
  border: none;
  padding: 0;
  cursor: pointer;
  transition:
    width 0.25s ease,
    background 0.25s ease;
}

.ic-dot.active {
  width: 14px;
  background: var(--accent);
}

.dailystar-rss-carousel-wrapper {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
}

.dailystar-rss-carousel {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 0 var(--page-left-inset) 20px var(--page-left-inset);
  scrollbar-width: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
  direction: ltr;
}

.dailystar-rss-carousel::-webkit-scrollbar {
  display: none;
}

.dailystar-rss-carousel.dragging {
  cursor: grabbing;
}

.dailystar-rss-card {
  flex: 0 0 280px;
  color: inherit;
  text-decoration: none;
  -webkit-user-drag: none;
  user-drag: none;
}

.dailystar-rss-card-content {
  border-radius: 18px;
  background: var(--bg-card);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  transition:
    transform 220ms ease,
    box-shadow 220ms ease;
}

.dailystar-rss-card:hover .dailystar-rss-card-content {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(24, 28, 46, 0.11);
}

.dailystar-rss-card-media {
  width: 100%;
  aspect-ratio: 16 / 10;
  height: auto;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.dailystar-rss-card-text {
  padding: var(--widget-card-body-padding);
}

.dailystar-rss-card-title {
  font-size: 15px;
  line-height: 1.35;
  font-weight: 500;
  color: var(--text-main);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dailystar-rss-card-description,
.dailystar-rss-card-time {
  display: none;
}

.carousel-scroll-btn {
  position: absolute;
  top: 50%;
  right: 8px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--text-main);
  box-shadow: 0 10px 24px rgba(24, 28, 46, 0.18);
  transform: translateY(-50%);
  cursor: pointer;
}

.carousel-scroll-btn:hover {
  background: #fff;
}

.carousel-scroll-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.carousel-scroll-btn svg {
  width: 18px;
  height: 18px;
}

.dailystar-rss-loader,
.mahfil-feed-loader {
  display: flex;
  justify-content: center;
  padding: 16px;
}

.mahfil-feed-loader.is-idle {
  padding: 0;
  min-height: 32px;
  opacity: 0;
}

.spinner {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid rgba(15, 61, 46, 0.18);
  border-top-color: var(--accent);
  animation: spin 0.85s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.kahf-ad-container {
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-sm);
}

.kahf-ad-container iframe {
  width: 100%;
  border: none;
  display: block;
  border-radius: var(--radius-sm);
}

.mahfil-feed-container {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mahfil-horizontal-feed-carousel-wrapper {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
}

.wafilife-books-section {
  padding: 6px;
}

.wafilife-books-carousel-wrapper {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
}

.youtube-feed-carousel-wrapper {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
}

.youtube-feed-container {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 0 var(--page-left-inset) 20px;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
  direction: ltr;
}

.youtube-feed-loader.mahfil-feed-loader.is-idle {
  display: none;
  min-height: 0;
}

#mahfilFeedLoader.mahfil-feed-loader.is-idle,
#mahfilHorizontalFeedLoader.mahfil-feed-loader.is-idle,
.wafilife-books-loader.mahfil-feed-loader.is-idle {
  display: none;
  min-height: 0;
}

.youtube-feed-container.dragging {
  cursor: grabbing;
}

.youtube-video-card {
  flex: 0 0 280px;
  height: auto;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  -webkit-user-drag: none;
  user-drag: none;
}

.youtube-video-content {
  height: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-soft);
  transition:
    transform 220ms ease,
    box-shadow 220ms ease;
}

.youtube-video-card:hover .youtube-video-content {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(24, 28, 46, 0.11);
}

.youtube-video-thumb-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
}

.youtube-video-thumb {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  pointer-events: none;
}

.youtube-video-play-btn {
  display: none !important;
}

.youtube-video-duration {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 10px;
}

.youtube-video-text {
  flex: 1;
  padding: var(--widget-card-body-padding);
}

.youtube-video-title {
  font-size: 14px;
  line-height: 1.16;
  font-weight: 570;
  color: var(--text-main);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.youtube-video-date {
  margin-top: 4px;
  font-size: 13px;
  color: var(--text-secondary);
}

.mahfil-horizontal-feed-container {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 0 var(--page-left-inset) 20px var(--page-left-inset);
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
  direction: ltr;
}

.mahfil-horizontal-feed-container.dragging {
  cursor: grabbing;
}

.mahfil-horizontal-video-card {
  flex: 0 0 192px;
  width: 192px;
  height: 212px;
  text-decoration: none;
  color: inherit;
  -webkit-user-drag: none;
  user-drag: none;
}

.mahfil-horizontal-video-content {
  height: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition:
    transform 220ms ease,
    box-shadow 220ms ease;
}

.mahfil-horizontal-video-card:hover .mahfil-horizontal-video-content {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(24, 28, 46, 0.11);
}

.wafilife-books-container {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 0 var(--page-left-inset) 20px var(--page-left-inset);
  direction: ltr;
}

.wafilife-book-card {
  flex: 0 0 180px;
  text-decoration: none;
  color: inherit;
}

.wafilife-book-card-inner {
  height: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition:
    transform 220ms ease,
    box-shadow 220ms ease;
}

.wafilife-book-card:hover .wafilife-book-card-inner {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(24, 28, 46, 0.11);
}

.wafilife-book-cover-wrap {
  position: relative;
  height: 189px;
  overflow: hidden;
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-panel) 100%);
}

.wafilife-book-cover {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
}

.wafilife-book-cover-fallback {
  background:
    linear-gradient(135deg, rgba(182, 139, 76, 0.18), rgba(126, 85, 33, 0.1)),
    linear-gradient(180deg, var(--bg-panel), var(--bg-card));
}

.wafilife-book-discount {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1;
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--accent-warm);
  color: #fff8f1;
  font-size: 10px;
  font-weight: 600;
}

.wafilife-book-content {
  padding: 8px 10px 10px;
}

.wafilife-book-title {
  min-height: 2em;
  font-size: 13px;
  line-height: 1.25;
  font-weight: 650;
  color: var(--text-main);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.wafilife-book-author {
  min-height: 1rem;
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wafilife-book-author-empty {
  visibility: hidden;
}

.wafilife-book-price-row {
  display: flex;
  gap: 4px;
  align-items: baseline;
  flex-wrap: wrap;
  margin-top: 4px;
}

.wafilife-book-price {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-warm);
}

.wafilife-book-original-price {
  font-size: 12px;
  color: var(--text-secondary);
}

.mahfil-horizontal-video-thumb-wrap {
  position: relative;
  height: 108px;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
}

.mahfil-horizontal-video-thumb {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  pointer-events: none;
}

.mahfil-horizontal-video-duration {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 10px;
}

.mahfil-horizontal-video-text {
  flex: 1;
  padding: var(--widget-card-body-padding);
  overflow: hidden;
  min-height: 0;
}

.mahfil-horizontal-video-title {
  font-size: 12px;
  line-height: 1.35;
  font-weight: 500;
  color: var(--text-main);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mahfil-horizontal-video-meta {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.mahfil-video-item {
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  transition:
    transform 220ms ease,
    box-shadow 220ms ease;
}

.mahfil-video-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(24, 28, 46, 0.1);
}

.mahfil-video-thumbnail-wrapper {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #111;
}

.mahfil-video-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mahfil-video-duration {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 10px;
}

.mahfil-video-play-icon {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #1c2238;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mahfil-video-info {
  padding: var(--widget-card-body-padding);
}

.mahfil-video-title {
  font-size: 11px;
  line-height: 1.25;
  font-weight: 560;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mahfil-video-meta {
  margin-top: 4px;
  display: flex;
  gap: 4px;
  color: var(--text-secondary);
  font-size: 9px;
}

.mahfil-feed-error,
.dailystar-rss-error {
  border-radius: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  padding: 14px;
  color: var(--text-secondary);
  text-align: center;
}

.hero-zone,
.search-section,
.surface-card,
.mahfil-feed-section {
  animation: pageFadeIn 480ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.search-section {
  animation-delay: 40ms;
}

.content-sections .surface-card:nth-child(1) {
  animation-delay: 110ms;
}

.content-sections .surface-card:nth-child(2) {
  animation-delay: 150ms;
}

@keyframes pageFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.scroll-to-top {
  position: fixed;
  right: 22px;
  bottom: calc(18px + var(--safe-area-inset-bottom));
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-soft);
  z-index: 50;
}

html[dir='rtl'] .scroll-to-top {
  right: auto;
  left: 22px;
}

.scroll-to-top.visible {
  display: inline-flex;
}

.scroll-to-top svg {
  width: 22px;
  height: 22px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 350;
  display: flex;
  align-items: flex-end;
}

.customize-modal {
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.customize-modal .modal-backdrop {
  opacity: 0;
  transition: opacity 220ms ease;
}

.customize-modal .customize-content {
  transform: translateY(18px) scale(0.985);
  opacity: 0;
  transition:
    transform 260ms cubic-bezier(0.2, 0.7, 0.2, 1),
    opacity 220ms ease;
}

.customize-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.customize-modal.is-open .modal-backdrop {
  opacity: 1;
}

.customize-modal.is-open .customize-content {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 17, 26, 0.5);
}

.modal-content {
  position: relative;
  width: min(720px, 100%);
  margin: 0 auto;
  background: #fff;
  border-radius: 22px 22px 0 0;
  padding: 20px;
}

.modal-content h3 {
  font-size: 20px;
  margin-bottom: 14px;
}

html[dir='rtl'] .modal-content,
html[dir='rtl'] .customize-content,
html[dir='rtl'] .favorites-empty,
html[dir='rtl'] .dailystar-rss-error,
html[dir='rtl'] .mahfil-feed-error {
  text-align: right;
}

.form-group {
  margin-bottom: 12px;
}

.form-group label {
  font-size: 13px;
  color: var(--text-secondary);
}

.form-group input {
  width: 100%;
  margin-top: 6px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  font-family: inherit;
}

html[dir='rtl'] .form-group input,
html[dir='rtl'] .search-input,
html[dir='rtl'] .deen-ai-launcher-input {
  text-align: right;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

html[dir='rtl'] .form-actions {
  flex-direction: row-reverse;
}

.btn-cancel,
.btn-primary {
  flex: 1;
  border: none;
  border-radius: 12px;
  padding: 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 620;
}

.btn-cancel {
  background: #eff1f6;
  color: var(--text-main);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.context-menu {
  position: fixed;
  min-width: 148px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  z-index: 370;
}

.context-menu-item {
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  color: var(--text-main);
}

html[dir='rtl'] .context-menu-item {
  text-align: right;
}

html[dir='rtl'] .dailystar-rss-card-text,
html[dir='rtl'] .youtube-video-text,
html[dir='rtl'] .mahfil-horizontal-video-text,
html[dir='rtl'] .mahfil-video-info,
html[dir='rtl'] .islamic-widget-text,
html[dir='rtl'] .section-header,
html[dir='rtl'] .customize-row,
html[dir='rtl'] .customize-text {
  text-align: right;
}

html[dir='rtl'] .deen-ai-launcher-send svg {
  transform: scaleX(-1);
}

.context-menu-item.delete {
  color: #d7263d;
}

@media (max-width: 840px) {
  .favorites-tab {
    font-size: clamp(12px, 3.2vw, 13px);
  }

  .section-header h2 {
    font-size: clamp(14px, 4.3vw, 16px);
  }

  .mahfil-feed-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  :root {
    --page-left-inset: 9px;
  }
}

.homepage-section-hidden {
  display: none !important;
}

.islamic-widget-section {
  padding: 10px;
}

.islamic-widget-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.islamic-widget-standalone {
  border-radius: 14px;
  background: var(--bg-card);
  text-decoration: none;
  color: inherit;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: box-shadow 220ms ease;
}

.islamic-widget-standalone:hover {
  box-shadow: 0 8px 16px rgba(24, 28, 46, 0.1);
}

.customize-content {
  max-height: 82vh;
  overflow-y: auto;
  background: var(--bg-card);
  color: var(--text-main);
}

.customize-group {
  background: rgba(255, 255, 255, 0.42);
  border-radius: 14px;
  padding: 10px;
  margin-bottom: 12px;
}

.customize-group h4 {
  font-size: 12px;
  font-weight: 620;
  margin-bottom: 8px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.customize-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
}

.customize-row + .customize-row {
  border-top: 1px solid rgba(136, 144, 168, 0.15);
}

.customize-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.customize-label {
  font-size: 13px;
  font-weight: 560;
  color: var(--text-main);
}

.customize-subtext {
  font-size: 11px;
  color: var(--text-secondary);
}

.switch {
  position: relative;
  width: 44px;
  height: 24px;
  display: inline-block;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #c7cede;
  transition: background 180ms ease;
}

.switch-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  transition: transform 180ms ease;
}

.switch input:checked + .switch-slider {
  background: var(--accent);
}

.switch input:checked + .switch-slider::before {
  transform: translateX(20px);
}

body.theme-dark .surface-card,
body.theme-dark .dailystar-rss-card-content,
body.theme-dark .youtube-video-content,
body.theme-dark .modal-content,
body.theme-dark .context-menu,
body.theme-dark .customize-group {
  background: var(--bg-card);
  color: var(--text-main);
  border-color: var(--border);
}

body.theme-dark .surface-card {
  box-shadow: none;
}

body.theme-dark .section-header .section-link {
  color: var(--text-secondary);
}

body.theme-dark .carousel-scroll-btn {
  background: rgba(245, 242, 234, 0.1);
  border: 1px solid var(--border);
  color: var(--text-main);
  box-shadow: none;
}

body.theme-dark .carousel-scroll-btn:hover {
  background: rgba(245, 242, 234, 0.16);
}

/* Islamic horizontal tall cards override */
.islamic-widget-section {
  --islamic-carousel-max-height: 190px;

  padding: 4px 0;
}

.islamic-carousel-wrapper {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  max-height: calc(var(--islamic-carousel-max-height) + 30px);
}

.islamic-carousel-track {
  display: flex;
  align-items: stretch;
  gap: 10px;
  overflow: auto hidden;
  padding: 2px max(var(--page-left-inset), calc(50vw - 201px)) 28px;
  max-height: calc(var(--islamic-carousel-max-height) + 10px);
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
}

.islamic-carousel-track.dragging {
  cursor: grabbing;
}

.islamic-widget-tall {
  flex: 0 0 auto;
  width: 210px;
  height: 190px;
  margin-bottom: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(22px) saturate(145%);
  -webkit-backdrop-filter: blur(22px) saturate(145%);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow:
    0 4px 20px rgba(20, 40, 30, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  text-decoration: none;
  color: var(--text-main);
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  transition: box-shadow 220ms ease;
}

.islamic-widget-tall:hover {
  box-shadow:
    0 8px 24px rgba(20, 40, 30, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.islamic-widget-featured {
  position: relative;
  overflow: hidden;
}

.islamic-widget-featured::before {
  content: none;
}

.islamic-widget-featured::after {
  content: none;
}

.islamic-widget-featured > * {
  position: relative;
  z-index: 1;
}

.islamic-widget-featured .islamic-widget-icon {
  background: rgba(255, 255, 255, 0.4);
  color: var(--text-main);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.islamic-widget-featured .islamic-widget-text h3,
.islamic-widget-featured .islamic-widget-text p {
  color: var(--text-main);
  text-shadow: none;
}

.islamic-widget-featured .islamic-widget-text p {
  color: var(--text-secondary);
}

.islamic-widget-quran {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.18)),
    rgba(176, 140, 60, 0.18);
}

.islamic-widget-hadith {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.18)),
    rgba(63, 122, 240, 0.16);
}

.islamic-widget-tall .islamic-widget-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
}

.islamic-widget-tall .islamic-widget-text h3 {
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1;
  font-weight: 400;
  letter-spacing: -0.025em;
}

.islamic-widget-tall .islamic-widget-text p {
  font-family: inherit;
  font-size: 13px;
  line-height: 1.35;
  margin-top: 4px;
  opacity: 0.6;
}

.switch input:disabled + .switch-slider {
  background: #b9bfd0;
  opacity: 0.7;
}

.switch input:disabled + .switch-slider::before {
  box-shadow: none;
}

@media (max-width: 840px) {
  .islamic-widget-tall {
    width: 210px;
    height: 190px;
  }
}

/* Prayer widget — tinted-glass */
.islamic-widget-prayer {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.15)),
    rgba(46, 139, 127, 0.22);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.55);
  overflow: hidden;
  position: relative;
}

.islamic-widget-prayer::before {
  content: none;
}

.islamic-widget-prayer::after {
  content: none;
}

.islamic-widget-prayer[data-prayer='Maghrib'] {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.15)),
    rgba(184, 92, 74, 0.2);
}

.islamic-widget-prayer[data-prayer='Isha'],
.islamic-widget-prayer[data-prayer='Dawn'] {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.15)),
    rgba(107, 74, 138, 0.18);
}

.islamic-widget-prayer .prayer-gold-label {
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.islamic-widget-prayer .prayer-gold-bar {
  display: none;
}

.islamic-widget-prayer .prayer-name-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: #0d3b33;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.islamic-widget-prayer .prayer-name-label::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #c8a84b;
  box-shadow: 0 0 0 3px rgba(200, 168, 75, 0.25);
}

.islamic-widget-prayer .prayer-contextual-icon {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 22px;
  height: 22px;
  opacity: 0.35;
  color: #0d3b33;
  z-index: 1;
  pointer-events: none;
}

.islamic-widget-prayer .islamic-widget-text {
  position: relative;
  z-index: 1;
  width: 100%;
}

.islamic-widget-prayer .islamic-widget-text h3 {
  font-family: var(--serif);
  font-size: 40px;
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1;
  color: #0d3b33;
}

.islamic-widget-prayer .islamic-widget-text p {
  font-size: 12px;
  margin-top: 4px;
  color: rgba(13, 59, 51, 0.7);
}

.widget-prayer-waqt {
  margin-top: 10px;
  width: 100%;
}

.widget-prayer-waqt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.widget-prayer-waqt-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(13, 59, 51, 0.55);
}

.widget-prayer-waqt-time {
  font-size: 11px;
  font-weight: 700;
  color: #0d3b33;
  font-variant-numeric: tabular-nums;
}

.widget-prayer-waqt-track {
  height: 3px;
  background: rgba(13, 59, 51, 0.12);
  border-radius: 2px;
  overflow: hidden;
}

.widget-prayer-waqt-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #c8a84b, #e8c86a);
  border-radius: 2px;
  box-shadow: 0 0 6px rgba(200, 168, 75, 0.5);
  transition: width 1000ms linear;
}

.islamic-widget-prayer.waqt-active .widget-prayer-waqt-fill {
  animation: widgetGoldShimmer 2s ease-in-out infinite;
}

@keyframes widgetGoldShimmer {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.65;
  }
}

/* Match customize sheet width to app container */
.customize-modal .customize-content {
  width: min(430px, 100% - 18px);
  margin: 0 auto;
}

@media (max-width: 840px) {
  .customize-modal .customize-content {
    width: min(410px, 100% - 14px);
  }
}

@media (max-width: 480px) {
  .customize-modal .customize-content {
    width: calc(100% - 12px);
  }
}

.islamic-widget-dua {
  position: relative;
  overflow: hidden;
  padding: 0;
  width: 210px;
  justify-content: stretch;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.18)),
    rgba(123, 93, 246, 0.16);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.55);
}

.islamic-widget-dua::after {
  content: '';
  position: absolute;
  top: -6px;
  right: -6px;
  width: 70px;
  height: 70px;
  pointer-events: none;
  opacity: 0.3;
  background: radial-gradient(circle, rgba(123, 93, 246, 0.35), transparent 65%);
}

.islamic-widget-dua .islamic-widget-dua-preview {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
  width: 100%;
  display: grid;
  grid-template-rows: 1fr 1fr;
  overflow: hidden;
}

.islamic-widget-dua #duaPreviewArabic {
  margin: 0;
  padding: 10px 12px 6px;
  align-self: end;
  color: #2a1f5a;
  font-family: 'Amiri', 'Scheherazade New', 'Noto Naskh Arabic', serif;
  font-size: 13pt;
  line-height: 1.5;
  font-weight: 400;
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.islamic-widget-dua-translation {
  margin: 0;
  padding: 6px 12px 10px;
  align-self: start;
  color: rgba(42, 31, 90, 0.72);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 400;
  text-align: left;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.islamic-widget-dua .islamic-widget-dua-label {
  display: none;
}

.dua-read-more {
  position: absolute;
  bottom: 8px;
  right: 12px;
  font-size: 10px;
  color: rgba(42, 31, 90, 0.55);
  letter-spacing: 0.03em;
  z-index: 2;
}

.islamic-widget-quran {
  padding: 0;
  flex-direction: column;
  justify-content: stretch;
  gap: 0;
}

.quran-verse-arabic {
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px 12px 6px;
  font-family: 'Amiri', 'Scheherazade New', 'Traditional Arabic', 'Noto Naskh Arabic', serif;
  font-size: 28px;
  line-height: 1.65;
  color: #5a4310;
  direction: rtl;
  overflow-wrap: break-word;
  box-sizing: border-box;
}

.quran-verse-footer {
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 0 12px 10px;
  box-sizing: border-box;
  justify-content: flex-end;
}

.quran-verse-divider {
  width: 100%;
  height: 1px;
  background: rgba(90, 67, 16, 0.18);
  margin-bottom: 5px;
}

.quran-verse-translation {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  color: rgba(90, 67, 16, 0.72);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.quran-verse-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.quran-verse-ref {
  font-size: 10px;
  color: rgba(90, 67, 16, 0.55);
  letter-spacing: 0.05em;
  font-variant-numeric: tabular-nums;
}

.quran-read-more {
  font-size: 10px;
  color: rgba(90, 67, 16, 0.65);
  letter-spacing: 0.03em;
}

.islamic-widget-tall {
  cursor: pointer;
}

.islamic-widget-tall:hover {
  cursor: pointer;
}

body {
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

body.page-transition-out {
  opacity: 0;
  transform: translateY(8px);
}

/* ═══ LAYOUT: Glass Minimal ═══════════════════════════════════ */
body.layout-glass .app-container {
  background: transparent;
}

body.layout-glass .background {
  background: var(--bg-page);
}

body.layout-glass .background-overlay {
  background: none;
}

body.layout-glass.theme-dark .background {
  background: var(--bg-page);
}

body.layout-glass.theme-dark .background-overlay {
  background: none;
}

body.layout-glass .deen-ai-launcher-send {
  background: rgb(15 61 46 / 85%);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}

body.layout-glass .favorite-icon {
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 35%),
    0 6px 14px rgb(15 61 46 / 15%);
  position: relative;
  overflow: hidden;
}

body.layout-glass .favorite-icon::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgb(255 255 255 / 22%) 0%, rgb(255 255 255 / 0%) 45%);
  pointer-events: none;
}

/* Glass: favorites as "Your sites" shortcut row without card */
body.layout-glass #section-favorites {
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 0;
}

/*
body.layout-glass .favorites-section::before {
  content: 'Your sites';
  display: block;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: none;
  opacity: 1;
  color: var(--text-main);
  padding: 0 2px;
}

body.layout-glass[data-language='bn'] .favorites-section::before {
  content: 'আপনার সাইট';
}

body.layout-glass[data-language='ar'] .favorites-section::before {
  content: 'مواقعك';
} */

body.layout-glass .favorites-tabs {
  display: none;
}

body.layout-glass .content-sections,
body.layout-glass .hero-zone {
  gap: 18px;
}

body.layout-glass .section-header {
  margin-bottom: 8px;
}

/* body.layout-glass .section-header h2 {
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.012em;
  text-transform: none;
  color: var(--text-main);
} */

body.layout-glass {
  --page-left-inset: 25px;
}

body.layout-glass .favorites-grid {
  gap: 14px;
  justify-content: flex-start;
}

/* Glass: islamic carousel → horizontal scroll (matches design) */
body.layout-glass .islamic-carousel-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  cursor: grab;
}

body.layout-glass .islamic-carousel-track > * {
  flex: 0 0 auto;
  min-width: 0;
}

body.layout-glass .islamic-carousel-track > *:nth-child(n + 3) {
  display: flex;
}

body.layout-glass .islamic-carousel-wrapper .horizontal-carousel__arrow {
  display: none;
}

/* Glass: section labels — match design's 13px/600 SectionLabel */
body.layout-glass .favorites-section::before {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.012em;
  padding-bottom: 0;
}

/* Glass: floating orb overlays for wallpaper depth */
body.layout-glass .background-overlay {
  background: none;
}

/* Glass: use Geist UI font (matches design) */
body.layout-glass {
  font-family:
    'Geist',
    'Inter',
    'Noto Sans Arabic',
    'Geeza Pro',
    Tahoma,
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
}

/* Glass: islamic carousel cards — fixed width */
body.layout-glass .islamic-widget-card {
  flex: 0 0 200px;
}

/* Glass: islamic carousel inner items height matches design (180px) */
body.layout-glass .islamic-carousel-track {
  align-items: stretch;
}

/* Glass: tighter gaps to match design's spacing rhythm */
body.layout-glass .hero-zone {
  gap: 14px;
}

body.layout-glass .content-sections {
  gap: 20px;
}

/* Glass: islamic carousel wrapper — inherits full-bleed from base */

/* Glass: deen-ai hero is full-bleed — no outer padding */
body.layout-glass .deen-ai-section {
  padding: 0;
}

/* Glass: dark mode orb overlays */
body.layout-glass.theme-dark .background-overlay {
  background: none;
}

/* ==============================================
   Content Feed Widget
   ============================================== */

.content-feed-section {
  display: contents;
}

.content-feed-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: -0.2px;
  margin-bottom: 10px;
  padding: 0 2px;
}

.content-feed-list {
  display: flex;
  flex-direction: column;
}

.content-feed-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.content-feed-card:last-child {
  border-bottom: none;
}

.content-feed-card-avatar {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  flex-shrink: 0;
  background: var(--bg-page);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
}

.content-feed-card-body {
  flex: 1;
  min-width: 0;
}

.content-feed-card-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 2px;
}

.content-feed-card-source {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
}

.content-feed-card-time {
  font-size: 11px;
  color: var(--text-muted);
}

.content-feed-card-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.content-feed-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 0;
  color: var(--text-muted);
  font-size: 13px;
}

.content-feed-error {
  cursor: pointer;
}

.content-feed-status-text {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.content-feed-loader {
  width: 24px;
  height: 24px;
  border: 2.5px solid var(--border);
  border-top-color: var(--text-main);
  border-radius: 50%;
  animation: content-feed-spin 0.7s linear infinite;
  margin-bottom: 10px;
}

@keyframes content-feed-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Sentinel (infinite scroll trigger) */
.content-feed-sentinel {
  height: 1px;
}

/* Quick View Modal */
.content-feed-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}

.content-feed-modal.hidden {
  display: none;
}

.content-feed-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.content-feed-modal-content {
  position: relative;
  width: 85%;
  max-width: 400px;
  max-height: 85vh;
  background: var(--bg-card);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
}

.content-feed-modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.content-feed-modal-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.content-feed-modal-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  border-radius: 16px 16px 0 0;
}

.content-feed-modal-text {
  padding: 14px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.content-feed-modal-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  line-height: 1.35;
}

.content-feed-modal-summary {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.4;
}

.content-feed-modal-content {
  font-size: 13px;
  color: var(--text-main);
  margin: 0;
  line-height: 1.5;
  white-space: pre-line;
}

.content-feed-modal-link {
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--accent, #1a8a5c);
  text-decoration: none;
  margin-top: 4px;
}

/* Dark mode overrides */
body.theme-dark .content-feed-modal-content {
  background: var(--bg-card);
}

/* ─── Prayer / Sky Shared Animations ─── */
@keyframes pc-twinkle {
  0%,
  100% {
    opacity: 0.9;
    transform: scale(1);
  }
  50% {
    opacity: 0.2;
    transform: scale(0.6);
  }
}

@keyframes pc-moon-glow {
  0%,
  100% {
    opacity: 0.12;
  }
  50% {
    opacity: 0.24;
  }
}

@keyframes pc-horizon-shimmer {
  0%,
  100% {
    opacity: 0.45;
  }
  50% {
    opacity: 0.7;
  }
}

@keyframes pc-ray-shimmer {
  0%,
  100% {
    opacity: 0.18;
  }
  50% {
    opacity: 0.32;
  }
}

.pc-star {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  pointer-events: none;
}

.pc-moon {
  position: absolute;
  top: 5px;
  right: 8px;
  pointer-events: none;
  z-index: 0;
}

.pc-moon-glow {
  animation: pc-moon-glow 4s ease-in-out infinite;
}

.pc-ray-shimmer {
  animation: pc-ray-shimmer 3s ease-in-out infinite;
}

.pc-horizon {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 22px;
  pointer-events: none;
  animation: pc-horizon-shimmer 5s ease-in-out infinite;
}
