/* ==========================================================================
   1. Reset + design tokens
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

:root {
  /* Neutrals & Surfaces - Inherited from tokens.css */
  --bg: var(--bg, #F9FAFB);
  --bg-alt: var(--bg-alt, #F3F4F6);
  --surface: var(--surface, #FFFFFF);
  --surface-2: var(--surface-card, #FFFFFF);
  --ink: var(--ink, #111827);
  --ink-soft: var(--ink-soft, #4B5563);
  --ink-faint: var(--ink-faint, #9CA3AF);
  --border: var(--border, #E5E7EB);
  --border-strong: var(--border-strong, #D1D5DB);

  /* Classic Medina Green - matching Siraj Android truth */
  --primary: var(--primary, #059669);
  --primary-light: var(--primary-light, #10B981);
  --primary-ink: var(--primary-ink, #064E3B);
  --primary-deep: #047857;
  --primary-tint: var(--primary-tint, #D1FAE5);
  --on-primary: var(--on-primary, #FFFFFF);

  --secondary: var(--secondary, #10B981);
  --secondary-ink: var(--secondary-ink, #064E3B);
  --secondary-deep: #059669;
  --secondary-tint: var(--secondary-tint, #ECFDF5);
  --on-secondary: #FFFFFF;

  --danger: #A6362C;

  --shadow-xs: 0 1px 2px rgba(34, 31, 25, .06);
  --shadow-sm: 0 2px 8px rgba(34, 31, 25, .07);
  --shadow-md: 0 10px 28px rgba(34, 31, 25, .10);
  --shadow-lg: 0 22px 48px rgba(34, 31, 25, .15);
  --shadow-xl: 0 36px 80px rgba(34, 31, 25, .20);
  --shadow-gold: 0 3px 10px rgba(147, 105, 37, .22);
  --shadow-gold-lg: 0 16px 34px rgba(147, 105, 37, .26);
  --ring: rgba(147, 105, 37, .34);

  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 28px;
  --radius-xl: 32px;
  --radius-2xl: 38px;
  --radius-full: 999px;

  --easing: cubic-bezier(.2, .8, .2, 1);
  --ease-spring: cubic-bezier(.22, 1, .36, 1);

  --font-heading: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Lora', Georgia, serif;
  --font-ar-sacred: 'Amiri', 'Traditional Arabic', serif;

  /* Fluid type scale: 360px -> 1440px */
  --step--1: clamp(.78rem, .75rem + .13vw, .85rem);
  --step-0: clamp(.94rem, .9rem + .18vw, 1.02rem);
  --step-1: clamp(1.05rem, .98rem + .32vw, 1.2rem);
  --step-2: clamp(1.2rem, 1.08rem + .52vw, 1.5rem);
  --step-3: clamp(1.45rem, 1.2rem + 1.05vw, 2.05rem);
  --step-4: clamp(1.8rem, 1.35rem + 1.95vw, 2.9rem);
  --step-5: clamp(2.3rem, 1.5rem + 3.4vw, 4rem);
  --step-6: clamp(2.5rem, 1.4rem + 4.9vw, 4.9rem);

  --gutter: clamp(16px, 4vw, 32px);
  --section-y: clamp(56px, 8vw, 112px);
  --container: 1240px;
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: var(--bg, #09090B);
  --bg-alt: var(--bg-alt, #121215);
  --surface: var(--surface, #18181B);
  --surface-2: var(--surface-card, #18181B);
  --ink: var(--ink, #F4F4F5);
  --ink-soft: var(--ink-soft, #A1A1AA);
  --ink-faint: var(--ink-faint, #52525B);
  --border: var(--border, #27272A);
  --border-strong: var(--border-strong, #3F3F46);

  --primary: var(--primary, #34D399);
  --primary-ink: var(--primary-ink, #A7F3D0);
  --primary-deep: #059669;
  --primary-tint: var(--primary-tint, rgba(52, 211, 153, 0.14));
  --on-primary: var(--on-primary, #062E22);

  --secondary: var(--secondary, #064E3B);
  --secondary-ink: var(--secondary-ink, #A7F3D0);
  --secondary-deep: #043327;
  --secondary-tint: rgba(6, 78, 59, 0.45);
  --on-secondary: #E6FDF4;

  --danger: #FFB4AB;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, .32);
  --shadow-md: 0 12px 30px rgba(0, 0, 0, .38);
  --shadow-lg: 0 24px 52px rgba(0, 0, 0, .46);
  --shadow-xl: 0 40px 84px rgba(0, 0, 0, .55);
  --shadow-gold: 0 3px 10px rgba(52, 211, 153, .16);
  --shadow-gold-lg: 0 16px 34px rgba(52, 211, 153, .20);
  --ring: rgba(52, 211, 153, .34);
  color-scheme: dark;
}

/* Dark mode chips & tabs calm Google Material 3 styling */
html[data-theme="dark"] .chip-gold {
  background: rgba(52, 211, 153, 0.12) !important;
  color: #6EE7B7 !important;
  border: 1px solid rgba(52, 211, 153, 0.25) !important;
}

html[data-theme="dark"] .chip-gold .icon {
  color: #34D399 !important;
}

html[data-theme="dark"] .chip-green {
  background: rgba(52, 211, 153, 0.12) !important;
  color: #A7F3D0 !important;
  border: 1px solid rgba(52, 211, 153, 0.22) !important;
}

html[data-theme="dark"] .reciter-tab.active {
  background: #34D399 !important;
  color: #062E22 !important;
  font-weight: 700 !important;
  border-color: #34D399 !important;
  box-shadow: 0 2px 10px rgba(52, 211, 153, 0.22) !important;
}

html[data-theme="dark"] .showcase-filter-btn.active {
  background: #34D399 !important;
  color: #062E22 !important;
  font-weight: 700 !important;
  border-color: #34D399 !important;
  box-shadow: 0 2px 10px rgba(52, 211, 153, 0.22) !important;
}

html[data-theme="dark"] .reciter-chip {
  background: #171D1B;
  border-color: rgba(255, 255, 255, 0.08);
  color: #ECEEEA;
}

html[data-theme="dark"] .reciter-chip:hover {
  border-color: var(--primary);
  background: #1E2522;
}

html[data-theme="dark"] .reciter-card {
  background: #171D1B;
  border-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .voice {
  background: #171D1B;
  border-color: rgba(255, 255, 255, 0.08);
}


/* Script-specific typography. Keeping this in one place means a language switch
   never needs a per-section override. */
html[lang="ar"] {
  --font-heading: 'Noto Sans Arabic', Tahoma, sans-serif;
  --font-body: 'Noto Sans Arabic', Tahoma, sans-serif;
  --font-serif: 'Amiri', 'Traditional Arabic', serif;
}

html[lang="ur"] {
  --font-heading: 'Noto Nastaliq Urdu', 'Noto Sans Arabic', serif;
  --font-body: 'Noto Nastaliq Urdu', 'Noto Sans Arabic', serif;
  --font-serif: 'Noto Nastaliq Urdu', 'Noto Sans Arabic', serif;
}

/* Nastaliq hangs well below the baseline - it needs the room. */
html[lang="ur"] body {
  line-height: 2.15;
}

html[lang="ur"] h1,
html[lang="ur"] h2,
html[lang="ur"] h3 {
  line-height: 1.9;
}

/* Uppercasing and italics are Latin conventions; they misrender other scripts. */
html[lang="ar"] .u-caps,
html[lang="ur"] .u-caps {
  text-transform: none;
  letter-spacing: 0;
}

html[lang="ar"] .u-italic,
html[lang="ur"] .u-italic {
  font-style: normal;
}

html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ur"] h1,
html[lang="ur"] h2 {
  letter-spacing: 0;
}

/* The ayah and hadith stay in Arabic on ar, and are glossed everywhere else. */
.ar-only {
  display: none;
}

html[lang="ar"] .ar-only {
  display: block;
}

html[lang="ar"] .not-ar {
  display: none;
}

.brand-arabic {
  display: none;
}

html[lang="ar"] .brand-latin {
  display: none;
}

html[lang="ar"] .brand-arabic {
  display: inline;
}

@media (prefers-reduced-motion:reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ==========================================================================
   2. Layout primitives + shared atoms
   ========================================================================== */
.wrap {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

section {
  padding-block: var(--section-y);
  position: relative;
}

/* Skip layout and paint for sections still far below the fold. The size hint
   keeps the scrollbar honest so anchors and the scroll-spy do not jump. */
/* Replaced buggy content-visibility */
.defer {
  contain: style;
}

.alt-bg {
  background: var(--bg-alt);
}

.skip-link {
  position: absolute;
  inset-inline-start: 16px;
  top: -70px;
  background: var(--primary);
  color: var(--on-primary);
  padding: 12px 20px;
  border-radius: var(--radius-full);
  z-index: 1000;
  font-weight: 700;
  text-decoration: none;
  transition: top .2s var(--easing);
}

.skip-link:focus-visible {
  top: 16px;
}

:focus-visible {
  outline: 2.5px solid var(--primary);
  outline-offset: 3px;
  border-radius: 6px;
  box-shadow: 0 0 0 6px var(--ring);
}

::selection {
  background: var(--primary);
  color: var(--on-primary);
}

html {
  scrollbar-color: var(--border-strong) var(--bg-alt);
  scrollbar-width: thin;
}

::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: var(--bg-alt);
}

::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: var(--radius-full);
  border: 3px solid var(--bg-alt);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

.icon {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: -.15em;
  fill: currentColor;
  stroke: none;
  flex-shrink: 0;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--step--1);
  letter-spacing: .02em;
  color: var(--primary-ink);
  background: var(--primary-tint);
  padding: 7px 16px 7px 12px;
  border-radius: var(--radius-full);
}

.eyebrow .icon {
  width: .95em;
  height: .95em;
  vertical-align: -.12em;
}

.eyebrow.secondary {
  color: var(--secondary-ink);
  background: var(--secondary-tint);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--step-0);
  padding: 14px 26px;
  min-height: 48px;
  border-radius: var(--radius-full);
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform .2s var(--easing), box-shadow .2s var(--easing), background .2s var(--easing), border-color .2s var(--easing), color .2s var(--easing);
  white-space: nowrap;
}

.btn:active {
  transform: scale(.97);
}

.btn-filled {
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: var(--shadow-gold);
}

.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--border-strong);
}

.btn-lg {
  padding: 16px 32px;
  min-height: 54px;
  font-size: var(--step-1);
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-size: 1.15rem;
  transition: border-color .2s var(--easing), color .2s var(--easing), background .2s var(--easing), transform .2s var(--easing);
  flex-shrink: 0;
  text-decoration: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--step--1);
  font-weight: 700;
  font-family: var(--font-heading);
  padding: 7px 14px;
  border-radius: var(--radius-full);
  background: var(--surface);
  color: var(--ink-soft);
  border: 1px solid var(--border);
}

.chip .icon {
  width: .9em;
  height: .9em;
  vertical-align: -.1em;
  color: var(--secondary-ink);
}

.chip-gold {
  background: var(--primary-tint);
  color: var(--primary-ink);
  border-color: transparent;
}

.chip-gold .icon {
  color: var(--primary-ink);
}

.chip-green {
  background: var(--secondary-tint);
  color: var(--secondary-ink);
  border-color: transparent;
}

.ripple {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.ripple-dot {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, .45);
  transform: scale(0);
  animation: rippleAnim .6s var(--easing);
  pointer-events: none;
}

@keyframes rippleAnim {
  to {
    transform: scale(2.6);
    opacity: 0;
  }
}

.section-head {
  max-width: 680px;
  margin: 0 auto clamp(36px, 5vw, 64px);
  text-align: center;
}

.section-head h2 {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: var(--step-4);
  line-height: 1.12;
  letter-spacing: -.015em;
  margin: 16px 0 14px;
  color: var(--ink);
  text-wrap: balance;
}

.section-head p {
  font-size: var(--step-1);
  color: var(--ink-soft);
  line-height: 1.6;
  text-wrap: pretty;
}

.section-head .accent,
h1 .accent,
h2 .accent {
  color: var(--primary-ink);
}

/* Reveal on scroll. The `.js` guard means that if the script never runs, nothing
   here can hide content permanently. */
.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .7s var(--easing), transform .7s var(--easing);
}

.js .reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion:reduce) {
  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ==========================================================================
   3. Brand mark
   ========================================================================== */
.brand-icon-img {
  background-image: url("../icons/logo-192.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06), 0 6px 16px rgba(16, 22, 16, .12);
  flex-shrink: 0;
}

@supports (background-image:image-set(url("data:image/webp;base64,") type("image/webp"))) {
  .brand-icon-img {
    background-image: image-set(url("../icons/logo-192.webp") type("image/webp"), url("../icons/logo-192.png") type("image/png"));
  }
}

.brand-emblem-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #8A6A16;
  transition: color .25s var(--easing), transform .25s var(--easing);
}

[data-theme="dark"] .brand-emblem-icon,
[data-amoled="true"] .brand-emblem-icon {
  color: #D4AF37;
}

.brand-emblem-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
  display: block;
}

.nav-brand:hover .brand-emblem-icon {
  transform: scale(1.06);
}

.widget-icon.brand-emblem-icon {
  width: 36px;
  height: 36px;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 6px;
  box-sizing: border-box;
}

.store-listing-icon.brand-emblem-icon {
  width: 84px;
  height: 84px;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 16px;
  box-sizing: border-box;
  box-shadow: var(--shadow-md);
}

.footer-brand-icon.brand-emblem-icon {
  width: 34px;
  height: 34px;
}

/* ==========================================================================
   4. Scroll progress + navbar
   ========================================================================== */
.scroll-progress {
  position: fixed;
  inset-block-start: 0;
  inset-inline-start: 0;
  height: 3px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  z-index: 120;
  pointer-events: none;
  will-change: transform;
}

html[dir="rtl"] .scroll-progress {
  transform-origin: 100% 50%;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  padding-block: 12px;
  background: linear-gradient(var(--bg) 55%, rgba(0, 0, 0, 0));
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 8px 10px;
  padding-inline-start: 18px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .3s var(--easing), border-color .3s var(--easing);
}

.navbar.scrolled .nav-inner {
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}

.nav-brand-icon {
  width: 34px;
  height: 34px;
}

.nav-brand-word {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.1rem;
  letter-spacing: -.01em;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  justify-content: center;
}

.nav-links a {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: .87rem;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 9px 13px;
  border-radius: var(--radius-full);
  transition: background .2s var(--easing), color .2s var(--easing);
  white-space: nowrap;
}

.nav-links a.active {
  background: var(--bg-alt);
  color: var(--ink);
  font-weight: 700;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.nav-hamburger {
  display: none;
}

#themeToggle .icon {
  transition: transform .4s var(--easing);
}

.lang-switch {
  position: relative;
  flex-shrink: 0;
}

.lang-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .02em;
  transition: border-color .2s var(--easing), color .2s var(--easing);
}

.lang-toggle-btn[aria-expanded="true"] {
  border-color: var(--primary);
  color: var(--primary-ink);
}

.lang-toggle-btn .icon {
  width: 1.05em;
  height: 1.05em;
}

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--border);
  padding: 6px;
  min-width: 178px;
  max-width: calc(100vw - 32px);
  display: flex;
  flex-direction: column;
  gap: 1px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .18s var(--easing), transform .18s var(--easing), visibility 0s linear .18s;
  z-index: 150;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.lang-menu.open {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity .18s var(--easing), transform .18s var(--easing), visibility 0s;
}

.lang-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  text-align: start;
  border: none;
  background: none;
  color: var(--ink);
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: .92rem;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  min-height: 44px;
}

.lang-menu-item[aria-checked="true"] {
  color: var(--primary-ink);
  font-weight: 700;
  background: var(--primary-tint);
}

.lang-menu-item .check {
  width: 16px;
  height: 16px;
  opacity: 0;
  color: var(--primary-ink);
}

.lang-menu-item[aria-checked="true"] .check {
  opacity: 1;
}

.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 200;
  display: flex;
  flex-direction: column;
  padding: 20px var(--gutter) 40px;
  transform: translateY(-100%);
  visibility: hidden;
  transition: transform .35s var(--easing), visibility 0s linear .35s;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.mobile-menu.open {
  transform: none;
  visibility: visible;
  transition: transform .35s var(--easing), visibility 0s;
}

.mobile-menu-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.mobile-menu-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-menu nav {
  display: flex;
  flex-direction: column;
}

.mobile-menu nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.15rem, 5vw, 1.45rem);
  color: var(--ink);
  text-decoration: none;
  padding: 15px 4px;
  border-bottom: 1px solid var(--border);
}

.mobile-menu nav a .icon {
  color: var(--ink-faint);
  width: .75em;
  height: .75em;
}

html[dir="rtl"] .mobile-menu nav a .icon {
  transform: scaleX(-1);
}

.mobile-menu-cta {
  margin-top: 26px;
}

.mobile-menu-cta .btn {
  width: 100%;
}

@media (max-width:1080px) {
  .nav-links a {
    padding: 9px 10px;
    font-size: .83rem;
  }
}

@media (max-width:920px) {
  .nav-links {
    display: none;
  }

  .nav-hamburger {
    display: inline-flex;
  }

  .nav-inner {
    gap: 10px;
    justify-content: space-between;
  }

  .nav-actions {
    margin-inline-start: auto;
  }
}

@media (max-width:560px) {
  .lang-toggle-label {
    display: none;
  }

  .lang-toggle-btn {
    width: 44px;
    padding: 0;
    justify-content: center;
  }

  .nav-inner {
    padding-inline-start: 12px;
  }

  .nav-brand-word {
    font-size: 1rem;
  }

  .lang-menu {
    inset-inline-end: 0;
  }
}

@media (max-width:359px) {
  .nav-brand-word {
    display: none;
  }
}

/* ==========================================================================
   5. Hero
   ========================================================================== */
.hero {
  padding-block: clamp(28px, 5vw, 64px) clamp(56px, 8vw, 104px);
  overflow: hidden;
}

.hero-pattern {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  color: var(--primary);
  opacity: .085;
  z-index: 0;
  pointer-events: none;
}

html[data-theme="dark"] .hero-pattern {
  opacity: .11;
}

.hero-glow,
.hero-glow-2 {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.hero-glow {
  top: -180px;
  inset-inline-end: -150px;
  width: min(58vw, 600px);
  aspect-ratio: 1;
  background: radial-gradient(circle, var(--primary-tint) 0%, rgba(0, 0, 0, 0) 68%);
  opacity: .95;
}

.hero-glow-2 {
  bottom: -200px;
  inset-inline-start: -170px;
  width: min(48vw, 480px);
  aspect-ratio: 1;
  background: radial-gradient(circle, var(--secondary-tint) 0%, rgba(0, 0, 0, 0) 70%);
  opacity: .7;
}

html[data-theme="dark"] .hero-glow {
  opacity: .4;
}

html[data-theme="dark"] .hero-glow-2 {
  opacity: .3;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr);
  gap: clamp(24px, 3vw, 52px);
  align-items: center;
}

/* Grid tracks default to an auto minimum, which is the item's min-content - a
   text input inside the card was forcing the whole column past the viewport at
   320px. min-width:0 lets the track shrink to the space actually available. */
.hero-grid>* {
  min-width: 0;
}

.hero-title {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: var(--step-5);
  line-height: 1.04;
  letter-spacing: -.025em;
  margin: 18px 0;
  color: var(--ink);
  text-wrap: balance;
}

.hero-ayah {
  font-family: var(--font-ar-sacred);
  font-size: clamp(1.25rem, 3.6vw, 1.6rem);
  line-height: 2.05;
  color: var(--ink);
  direction: rtl;
  margin: 0 0 8px;
}

.hero-ayah-gloss {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--step--1);
  color: var(--ink-soft);
  margin: 0 0 24px;
}

.hero-sub {
  font-size: var(--step-1);
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 56ch;
  margin: 0 0 28px;
  text-wrap: pretty;
}

.siraj-name {
  display: inline-block;
  color: var(--primary-ink);
  font-family: 'Lora', 'Amiri', serif;
  font-weight: 600;
}

.hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.hero-trust {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.hero-stats {
  display: flex;
  gap: clamp(20px, 4vw, 38px);
  flex-wrap: wrap;
}

.hero-stat b {
  display: block;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: var(--step-3);
  line-height: 1.1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.hero-stat span {
  font-size: var(--step--1);
  color: var(--ink-soft);
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 420px;
}

.widget-deco {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.widget-deco-1 {
  width: 70px;
  height: 70px;
  background: var(--secondary-tint);
  top: 6%;
  inset-inline-start: 4%;
  animation: floaty 7s ease-in-out infinite;
}

.widget-deco-2 {
  width: 34px;
  height: 34px;
  background: var(--primary);
  opacity: .26;
  bottom: 9%;
  inset-inline-end: 2%;
  animation: floaty 6s ease-in-out infinite reverse;
}

.widget-deco-3 {
  width: 18px;
  height: 18px;
  background: var(--secondary);
  opacity: .32;
  top: 44%;
  inset-inline-end: -1%;
  animation: floaty 5s ease-in-out infinite;
}

@keyframes floaty {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-16px);
  }
}

/* ==========================================================================
   5. Enhanced Live Prayer Dashboard Card (Expanded PC Desktop Redesign)
   ========================================================================== */
.widget-card {
  position: relative;
  z-index: 2;
  width: min(100%, 580px);
  flex: 1 1 500px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 32px;
  padding: 24px 22px 20px;
  box-shadow: 0 24px 60px -12px rgba(34, 31, 25, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04);
  text-align: start;
  transition: all 0.3s var(--easing);
  container-type: inline-size;
  container-name: widget;
}

html[data-theme="dark"] .widget-card {
  background: rgba(21, 24, 28, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 28px 70px -12px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.widget-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

html[data-theme="dark"] .widget-topbar {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.widget-brand-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.widget-icon {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  box-shadow: var(--shadow-sm);
  background-size: cover;
}

.widget-brand {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.05rem;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 6px;
}

.widget-location {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--ink-soft);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  max-width: 60%;
  transition: all 0.2s var(--easing);
  cursor: pointer;
}

.widget-location:hover {
  border-color: var(--primary);
  color: var(--primary-deep);
  background: var(--primary-tint);
}

html[data-theme="dark"] .widget-location {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: #d4d4d8;
}

html[data-theme="dark"] .widget-location:hover {
  border-color: rgba(52, 211, 153, 0.4);
  color: #A7F3D0;
  background: rgba(52, 211, 153, 0.12);
}

.widget-location span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.widget-location .icon {
  width: 0.95em;
  height: 0.95em;
  color: var(--primary);
  flex-shrink: 0;
}

/* Expanded 2-Column Body Layout on Desktop */
.widget-body-row {
  display: grid;
  grid-template-columns: 156px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin-bottom: 20px;
}

.widget-ring-wrap {
  position: relative;
  width: 156px;
  height: 156px;
  margin: 0 auto;
  flex-shrink: 0;
}

.widget-ring-wrap svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  filter: drop-shadow(0 4px 12px rgba(5, 150, 105, 0.14));
}

html[data-theme="dark"] .widget-ring-wrap svg {
  filter: drop-shadow(0 4px 16px rgba(52, 211, 153, 0.25));
}

.widget-ring-track {
  fill: none;
  stroke: var(--bg-alt);
  stroke-width: 9;
}

html[data-theme="dark"] .widget-ring-track {
  stroke: rgba(255, 255, 255, 0.07);
}

.widget-ring-fill {
  fill: none;
  stroke: var(--primary);
  stroke-width: 9;
  stroke-linecap: round;
  stroke-dasharray: 565.49;
  stroke-dashoffset: 565.49;
  transition: stroke-dashoffset 1s var(--easing);
}

.widget-ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 2px;
}

.widget-ring-label {
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--font-heading);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

html[data-theme="dark"] .widget-ring-label {
  color: #a1a1aa;
}

.widget-ring-name {
  font-size: clamp(1.7rem, 3.8vw, 2.1rem);
  font-weight: 900;
  font-family: var(--font-heading);
  color: var(--ink);
  line-height: 1.15;
}

.widget-ring-time {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

html[data-theme="dark"] .widget-ring-time {
  color: #a1a1aa;
}

/* Side Info inside widget body */
.widget-side-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.widget-countdown-card {
  background: linear-gradient(135deg, var(--primary-tint) 0%, rgba(5, 150, 105, 0.04) 100%);
  border: 1px solid rgba(5, 150, 105, 0.20);
  border-radius: 16px;
  padding: 10px 16px;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.06);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

html[data-theme="dark"] .widget-countdown-card {
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.14) 0%, rgba(6, 78, 59, 0.16) 100%);
  border-color: rgba(52, 211, 153, 0.25);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

.widget-countdown-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary-ink);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

html[data-theme="dark"] .widget-countdown-tag {
  color: #6EE7B7;
}

.countdown-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
  animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.4;
    transform: scale(0.85);
  }
}

.widget-countdown {
  margin: 0;
  padding: 0;
  background: none;
  border: none;
  box-shadow: none;
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1.15;
  color: var(--ink);
  font-family: var(--font-heading);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  display: block;
  text-align: start;
}

html[data-theme="dark"] .widget-countdown {
  color: #fff;
}

/* Modern Pill Location Search */
.widget-location-prompt {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.widget-location-prompt form {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-alt);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  padding: 3px 4px 3px 12px;
  min-height: 38px;
  transition: border-color 0.2s var(--easing), box-shadow 0.2s var(--easing), background 0.2s var(--easing);
}

html[dir="rtl"] .widget-location-prompt form {
  padding: 3px 12px 3px 4px;
}

html[data-theme="dark"] .widget-location-prompt form {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
}

.widget-location-prompt form:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.16);
  background: var(--surface);
}

html[data-theme="dark"] .widget-location-prompt form:focus-within {
  background: rgba(255, 255, 255, 0.08);
  border-color: #34D399;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.25);
}

.widget-location-prompt input {
  background: transparent;
  border: none;
  outline: none;
  font-size: 0.82rem;
  color: var(--ink);
  flex: 1;
  min-width: 0;
  padding: 4px 2px;
  font-family: inherit;
  line-height: 1.3;
}

.widget-location-prompt input::placeholder {
  color: var(--ink-faint);
  opacity: 0.85;
}

html[data-theme="dark"] .widget-location-prompt input {
  color: #fff;
}

/* Specifically style form submit button ONLY (citySubmit) */
.widget-location-prompt form button,
.city-submit-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s var(--easing), background 0.2s var(--easing), box-shadow 0.2s var(--easing);
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.25);
}

.widget-location-prompt form button:hover,
.city-submit-btn:hover {
  background: var(--primary-deep);
  transform: scale(1.08);
  box-shadow: 0 3px 10px rgba(5, 150, 105, 0.38);
}

.widget-location-prompt form button:active,
.city-submit-btn:active {
  transform: scale(0.95);
}

.city-submit-btn .icon {
  width: 14px;
  height: 14px;
}

/* Dedicated, bulletproof styling for use-location-btn */
.use-location-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  margin-top: 0;
  padding: 7px 12px;
  min-height: 34px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--primary-deep);
  background: rgba(5, 150, 105, 0.07);
  border: 1px solid rgba(5, 150, 105, 0.22);
  border-radius: var(--radius-full);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s var(--easing);
}

.use-location-btn .icon {
  width: 13px;
  height: 13px;
  color: var(--primary);
  flex-shrink: 0;
  transition: transform 0.2s var(--easing);
}

.use-location-btn:hover {
  background: rgba(5, 150, 105, 0.14);
  border-color: var(--primary);
  color: var(--primary-ink);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.15);
}

.use-location-btn:hover .icon {
  transform: scale(1.18);
}

.use-location-btn:active {
  transform: scale(0.98);
}

.use-location-btn:disabled,
.use-location-btn.is-locating {
  opacity: 0.65;
  cursor: wait;
}

html[data-theme="dark"] .use-location-btn {
  color: #6EE7B7;
  background: rgba(52, 211, 153, 0.08);
  border-color: rgba(52, 211, 153, 0.22);
}

html[data-theme="dark"] .use-location-btn .icon {
  color: #34D399;
}

html[data-theme="dark"] .use-location-btn:hover {
  background: rgba(52, 211, 153, 0.16);
  border-color: rgba(52, 211, 153, 0.45);
  color: #A7F3D0;
  box-shadow: 0 2px 10px rgba(52, 211, 153, 0.2);
}

.widget-location-error {
  font-size: 0.74rem;
  color: var(--danger);
  margin-top: 2px;
  display: none;
  line-height: 1.35;
}

.widget-location-error.show {
  display: block;
  animation: fadeIn 0.2s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@container widget (max-width: 410px) {
  .widget-body-row {
    grid-template-columns: 1fr;
    gap: 16px;
    text-align: center;
  }

  .widget-ring-wrap {
    margin: 0 auto 4px;
  }

  .widget-countdown {
    text-align: center;
  }

  .widget-countdown-tag {
    justify-content: center;
  }

  .widget-strip {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 6-Prayer Tiles Strip */
.widget-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 20px;
}

.widget-strip-cell {
  position: relative;
  text-align: center;
  padding: 12px 4px 11px;
  border-radius: 16px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.25s var(--easing);
  overflow: hidden;
}

.widget-strip-cell:hover {
  transform: translateY(-2px);
  border-color: rgba(147, 105, 37, 0.35);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.widget-strip-cell .strip-icon {
  width: 18px;
  height: 18px;
  color: var(--ink-soft);
  transition: all 0.25s var(--easing);
  display: block;
  flex-shrink: 0;
}

.widget-strip-cell .strip-name {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--ink-soft);
  white-space: nowrap;
  line-height: 1.2;
}

.widget-strip-cell .strip-time {
  display: block;
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  font-family: var(--font-heading);
}

/* Active / Next Prayer Highlight */
.widget-strip-cell.is-next {
  background: linear-gradient(150deg, var(--primary-tint) 0%, rgba(5, 150, 105, 0.08) 100%);
  border: 1.5px solid var(--primary);
  box-shadow: 0 6px 18px rgba(5, 150, 105, 0.16);
  transform: translateY(-2px);
}

.widget-strip-cell.is-next .strip-icon {
  color: var(--primary-ink);
  transform: scale(1.1);
  filter: drop-shadow(0 0 5px rgba(16, 185, 129, 0.4));
}

.widget-strip-cell.is-next .strip-name {
  color: var(--primary-ink);
  font-weight: 800;
}

.widget-strip-cell.is-next .strip-time {
  color: var(--primary-ink);
  font-weight: 900;
}

/* Dark Theme Variant */
html[data-theme="dark"] .widget-strip-cell {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.09);
}

html[data-theme="dark"] .widget-strip-cell .strip-icon {
  color: #a1a1aa;
}

html[data-theme="dark"] .widget-strip-cell .strip-name {
  color: #a1a1aa;
}

html[data-theme="dark"] .widget-strip-cell .strip-time {
  color: #ffffff;
}

html[data-theme="dark"] .widget-strip-cell:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.18);
}

html[data-theme="dark"] .widget-strip-cell:hover .strip-icon {
  color: #f4f4f5;
  transform: scale(1.08);
}

html[data-theme="dark"] .widget-strip-cell.is-next {
  background: linear-gradient(150deg, rgba(52, 211, 153, 0.22) 0%, rgba(5, 150, 105, 0.12) 100%);
  border-color: rgba(52, 211, 153, 0.55);
  box-shadow: 0 0 20px rgba(52, 211, 153, 0.22), 0 6px 16px rgba(0, 0, 0, 0.45);
}

html[data-theme="dark"] .widget-strip-cell.is-next .strip-icon {
  color: #34D399;
  filter: drop-shadow(0 0 6px rgba(52, 211, 153, 0.5));
  transform: scale(1.12);
}

html[data-theme="dark"] .widget-strip-cell.is-next .strip-name {
  color: #A7F3D0;
}

html[data-theme="dark"] .widget-strip-cell.is-next .strip-time {
  color: #ffffff;
}

/* Daily Ayah / Inspiration Quote Card */
.widget-inspiration {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px 18px;
  transition: all 0.25s var(--easing);
}

html[data-theme="dark"] .widget-inspiration {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
}

.widget-inspiration-badge {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--primary-tint);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

html[data-theme="dark"] .widget-inspiration-badge {
  background: rgba(52, 211, 153, 0.14);
  color: #34D399;
}

.widget-inspiration-badge .icon {
  width: 15px;
  height: 15px;
}

.widget-inspiration-body {
  flex: 1;
  min-width: 0;
}

.widget-inspiration-text {
  font-family: var(--font-ar-sacred);
  font-size: 0.94rem;
  line-height: 1.7;
  color: var(--ink);
  margin: 0 0 4px;
}

html[data-theme="dark"] .widget-inspiration-text {
  color: #e4e4e7;
}

.widget-inspiration-cite {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--ink-soft);
  margin: 0;
}

html[data-theme="dark"] .widget-inspiration-cite {
  color: #a1a1aa;
}

@media (max-width: 580px) {
  .widget-body-row {
    grid-template-columns: 1fr;
    gap: 16px;
    text-align: center;
  }

  .widget-ring-wrap {
    margin: 0 auto 10px;
  }

  .widget-countdown {
    text-align: center;
  }

  .widget-strip {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
}

@media (max-width:920px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(34px, 7vw, 52px);
    text-align: center;
  }

  .hero-sub {
    margin-inline: auto;
  }

  .hero-ctas,
  .hero-trust,
  .hero-stats {
    justify-content: center;
  }

  .hero-text {
    order: 1;
  }

  .hero-visual {
    min-height: 0;
    order: 2;
    margin-top: clamp(20px, 4vw, 32px);
  }

  .widget-deco {
    display: none;
  }

  .widget-card {
    margin-inline: auto;
  }
}

@media (max-width:520px) {
  .hero-title {
    font-size: clamp(2.05rem, 9vw, 2.6rem);
  }

  .widget-card {
    width: 100%;
    max-width: 100%;
    padding: 18px 14px 16px;
    border-radius: var(--radius-xl);
    margin-inline: auto;
  }

  .hero-ctas .btn {
    flex: 1 1 100%;
  }
}

@media (max-width:440px) {
  .widget-strip {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .widget-strip-cell {
    padding: 9px 6px;
    border-radius: var(--radius-md);
  }

  .widget-strip-cell b {
    font-size: .78rem;
  }

  .widget-strip-cell small {
    font-size: .78rem;
    margin-top: 4px;
  }
}

/* Landscape phones: the hero must not take three swipes to clear. */
@media (max-height:520px) and (orientation:landscape) {
  .hero {
    padding-block: 24px 40px;
  }

  .hero-visual {
    min-height: 0;
  }

  .widget-ring-wrap {
    width: 150px;
  }
}

/* ==========================================================================
   6. Marquee band - the feature roll-call
   ========================================================================== */
.marquee {
  border-block: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marqueeScroll 46s linear infinite;
}

/* marquee continuous scroll */
@keyframes marqueeScroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

html[dir="rtl"] .marquee-track {
  animation-name: marqueeScrollRtl;
}

@keyframes marqueeScrollRtl {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(50%);
  }
}

.marquee-group {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 17px 20px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(.85rem, 1.6vw, 1rem);
  color: var(--ink-soft);
  white-space: nowrap;
}

.marquee-item .icon {
  color: var(--primary-ink);
  width: 1.1em;
  height: 1.1em;
}

.marquee-item::after {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--border-strong);
  margin-inline-start: 20px;
}

@media (prefers-reduced-motion:reduce) {
  .marquee {
    overflow-x: auto;
  }

  .marquee-track {
    animation: none;
    width: auto;
  }

  .marquee-group:nth-child(2) {
    display: none;
  }
}

/* ==========================================================================
   7. Flagship Device Chassis - Engineering & Hardware Mockup
   Crafted with realistic dual-finish aerospace aluminum chamfer, centered
   optical punch-hole lens, front-glass reflection sheen, and tactile buttons.
   ========================================================================== */
.phone {
  --phone-radius: 44px;
  --phone-bezel: 9px;
  --phone-screen-radius: 35px;
  --mk-bg: var(--bg-alt);
  --mk-surface: var(--surface);
  --mk-ink: var(--ink);
  --mk-soft: var(--ink-soft);
  --mk-primary: var(--primary);
  --mk-primary-ink: var(--primary-ink);
  --mk-on-primary: var(--on-primary);
  --mk-tint: var(--primary-tint);
  --mk-border: var(--border);

  position: relative;
  width: min(100%, 318px);
  aspect-ratio: 9 / 19.5;
  border-radius: var(--phone-radius);
  padding: var(--phone-bezel);

  /* Multi-stop metallic chassis: dark titanium edge highlight */
  background: linear-gradient(155deg, #3a3c42 0%, #17181c 28%, #0f1013 70%, #292b30 100%);

  /* Physically accurate layered shadows and metallic perimeter bevel */
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.16),
    0 2px 5px rgba(255, 255, 255, 0.10) inset,
    0 -2px 5px rgba(0, 0, 0, 0.65) inset,
    0 28px 64px -12px rgba(0, 0, 0, 0.52),
    0 12px 28px -6px rgba(0, 0, 0, 0.32);
  flex-shrink: 0;
  transition: transform 0.4s var(--ease-spring), box-shadow 0.4s var(--easing);
  isolation: isolate;
}

html[data-theme="dark"] .phone {
  background: linear-gradient(155deg, #44474e 0%, #16171a 30%, #0d0e10 70%, #2c2e34 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.18),
    0 2px 5px rgba(255, 255, 255, 0.12) inset,
    0 -2px 5px rgba(0, 0, 0, 0.7) inset,
    0 32px 72px -12px rgba(0, 0, 0, 0.7),
    0 14px 32px -6px rgba(0, 0, 0, 0.5);
}

/* Subtle elevation on hover for interactive pointer devices */
@media (hover: hover) and (pointer: fine) {
  .phone:hover {
    transform: translateY(-4px);
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.22),
      0 2px 6px rgba(255, 255, 255, 0.14) inset,
      0 36px 76px -14px rgba(0, 0, 0, 0.62),
      0 16px 36px -6px rgba(0, 0, 0, 0.40);
  }
}

/* Tactile physical buttons on chassis */
.phone::before {
  /* Volume rocker */
  content: "";
  position: absolute;
  top: 112px;
  right: -3px;
  width: 3px;
  height: 54px;
  background: linear-gradient(180deg, #4b4f57, #1e2025);
  border-radius: 0 2px 2px 0;
  box-shadow: 1px 0 2px rgba(0, 0, 0, 0.6);
}

.phone::after {
  /* Power / Wake button */
  content: "";
  position: absolute;
  top: 66px;
  right: -3px;
  width: 3px;
  height: 32px;
  background: linear-gradient(180deg, #575c66, #26282e);
  border-radius: 0 2px 2px 0;
  box-shadow: 1px 0 2px rgba(0, 0, 0, 0.6);
}

/* RTL layout keeps buttons positioned naturally */
html[dir="rtl"] .phone::before,
html[dir="rtl"] .phone::after {
  right: -3px;
  left: auto;
}

/* Top ear-piece stereo speaker grille */
.phone-speaker {
  position: absolute;
  top: 5.5px;
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 3px;
  background: #111317;
  border-radius: 2px;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.9), 0 0 0.5px rgba(255, 255, 255, 0.12);
  z-index: 12;
  pointer-events: none;
}

/* Centered optical punch-hole selfie camera / notch (screenshots have native punch-hole embedded) */
.phone-camera {
  display: none !important;
}

/* Diagonal optical glass reflection sheen */
.phone-glare {
  position: absolute;
  inset: var(--phone-bezel);
  border-radius: var(--phone-screen-radius);
  background: linear-gradient(130deg, rgba(255, 255, 255, 0.11) 0%, rgba(255, 255, 255, 0.02) 36%, transparent 60%);
  pointer-events: none;
  z-index: 10;
}

/* Active phone display screen */
.phone-screen {
  position: absolute;
  inset: var(--phone-bezel);
  border-radius: var(--phone-screen-radius);
  background: #121316;
  color: var(--mk-ink);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

html[data-theme="light"] .phone-screen {
  background: #f8f7f4;
}

/* Full-bleed promotional screenshot container */
.phone-screen-media {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #121316;
}

html[data-theme="light"] .phone-screen-media {
  background: #f8f7f4;
}

.phone-screen picture,
.phone-screen-media picture {
  display: block;
  width: 100%;
  height: 100%;
  flex: 1 1 100%;
}

.phone-screen-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: opacity 0.34s cubic-bezier(0.16, 1, 0.3, 1), transform 0.34s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.phone-screen-img.anim {
  animation: mkIn 0.38s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes mkIn {
  from {
    opacity: 0.15;
    transform: scale(0.975);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Floating feature pill badge inside device preview */
.phone-badge-pill {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(14, 17, 23, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 700;
  color: #f3f5f8;
  white-space: nowrap;
  z-index: 11;
  pointer-events: none;
}

.phone-badge-pill .icon {
  width: 13px;
  height: 13px;
  color: var(--primary);
}

/* Hero stage consolidated */
.hero-phone:hover {
  transform: rotate(-1deg) translateY(-2px) scale(1.02);
}

html[dir="rtl"] .hero-phone {
  transform: rotate(3.5deg) translateY(6px);
}

@media (min-width: 1100px) {
  html[dir="rtl"] .hero-phone:hover {
    transform: rotate(1deg) translateY(-2px) scale(1.02);
  }
}

/* Floating contextual feature badges on hero phone (Muslim Pro style) */
.hero-float-pill {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(14, 18, 26, 0.90);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(255, 255, 255, 0.08) inset;
  border-radius: var(--radius-full);
  padding: 8px 14px;
  z-index: 15;
  pointer-events: none;
  animation: heroPillFloat 4.5s ease-in-out infinite;
}

.hero-float-pill-top {
  top: 14%;
  left: -28px;
  animation-delay: 0s;
}

.hero-float-pill-bottom {
  bottom: 18%;
  right: -32px;
  animation-delay: 2.2s;
}

html[dir="rtl"] .hero-float-pill-top {
  left: auto;
  right: -28px;
}

html[dir="rtl"] .hero-float-pill-bottom {
  right: auto;
  left: -32px;
}

@keyframes heroPillFloat {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-7px);
  }
}

.hero-float-icon {
  font-size: 1.15rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-float-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.hero-float-text strong {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 800;
  color: #FFFFFF;
  white-space: nowrap;
}

.hero-float-text small {
  font-size: 0.58rem;
  color: #BEDCCD;
  white-space: nowrap;
}

@media (max-width: 1200px) {
  .hero-float-pill-top {
    left: -12px;
  }

  .hero-float-pill-bottom {
    right: -12px;
  }

  html[dir="rtl"] .hero-float-pill-top {
    right: -12px;
  }

  html[dir="rtl"] .hero-float-pill-bottom {
    left: -12px;
  }
}

.mk-status {
  position: absolute;
  top: 15px;
  inset-inline: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-heading);
  font-size: .6rem;
  font-weight: 700;
  color: var(--mk-ink);
  opacity: .75;
  z-index: 2;
}

.mk-appbar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mk-appbar-title {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: .9rem;
  color: var(--mk-ink);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mk-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mk-primary);
  flex-shrink: 0;
}

.mk-sub {
  font-size: .65rem;
  color: var(--mk-soft);
  margin-top: -3px;
}

.mk-card {
  background: var(--mk-surface);
  border: 1px solid var(--mk-border);
  border-radius: 16px;
  padding: 11px 12px;
}

.mk-ring {
  position: relative;
  width: 116px;
  aspect-ratio: 1;
  margin: 2px auto;
}

.mk-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.mk-ring-track {
  fill: none;
  stroke: var(--mk-tint);
  stroke-width: 9;
}

.mk-ring-fill {
  fill: none;
  stroke: var(--mk-primary);
  stroke-width: 9;
  stroke-linecap: round;
  stroke-dasharray: 264;
  stroke-dashoffset: 74;
}

.mk-ring-mid {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
}

.mk-ring-mid b {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: .95rem;
  color: var(--mk-ink);
}

.mk-ring-mid small {
  font-size: .6rem;
  color: var(--mk-soft);
  font-variant-numeric: tabular-nums;
}

.mk-row {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--mk-surface);
  border: 1px solid var(--mk-border);
  border-radius: 14px;
  padding: 8px 10px;
  min-width: 0;
}

.mk-row.on {
  background: var(--mk-tint);
  border-color: transparent;
}

.mk-row-ic {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--mk-tint);
  color: var(--mk-primary-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mk-row.on .mk-row-ic {
  background: var(--mk-surface);
}

.mk-row-ic .icon {
  width: 14px;
  height: 14px;
}

.mk-row-tx {
  flex: 1;
  min-width: 0;
}

.mk-row-tx b {
  display: block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: .73rem;
  color: var(--mk-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mk-row-tx small {
  display: block;
  font-size: .61rem;
  color: var(--mk-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mk-row-end {
  font-size: .62rem;
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--mk-primary-ink);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.mk-ar {
  font-family: var(--font-ar-sacred);
  direction: rtl;
}

.mk-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
}

.mk-chips {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.mk-chip {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: .62rem;
  padding: 5px 9px;
  border-radius: var(--radius-full);
  background: var(--mk-tint);
  color: var(--mk-primary-ink);
  white-space: nowrap;
}

.mk-chip-ghost {
  background: transparent;
  border: 1px solid var(--mk-border);
  color: var(--mk-ink);
}

.mk-wave {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 20px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.mk-wave i {
  display: block;
  width: 2.5px;
  border-radius: 2px;
  background: var(--mk-primary);
  opacity: .45;
  height: 30%;
}

.mk-wave i.on {
  opacity: 1;
  animation: mkWave 1.1s ease-in-out infinite;
}

@keyframes mkWave {

  0%,
  100% {
    height: 26%;
  }

  50% {
    height: 100%;
  }
}

/* Rich Full-Height Mushaf Reader for Theme Preview Mockup */
#themeScreen {
  background: var(--mk-bg);
  padding: 32px 12px 12px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  overflow: hidden;
  transition: background 0.3s var(--easing);
}

.mk-mushaf-card {
  flex: 1;
  background: var(--mk-surface);
  border: 1px solid var(--mk-border);
  border-radius: 16px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  direction: rtl;
  gap: 5px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transition: background 0.3s var(--easing), border-color 0.3s var(--easing);
}

.mk-mushaf-top-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-heading);
  font-size: 0.58rem;
  font-weight: 700;
  color: var(--mk-soft);
  padding-inline: 4px;
}

.mk-mushaf-frame {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--mk-tint);
  border: 1px solid var(--mk-primary);
  border-radius: 9px;
  padding: 3px 8px;
  text-align: center;
}

.mk-frame-title {
  font-family: var(--font-ar-sacred);
  font-size: 0.84rem;
  font-weight: 900;
  color: var(--mk-primary-ink);
  line-height: 1.2;
}

.mk-frame-sub {
  font-family: var(--font-heading);
  font-size: 0.54rem;
  font-weight: 700;
  color: var(--mk-soft);
  opacity: 0.9;
}

.mk-ayah-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: center;
}

.mk-bismillah {
  font-family: var(--font-ar-sacred);
  font-size: 0.76rem;
  color: var(--mk-ink);
  opacity: 0.92;
  margin-bottom: 2px;
}

.mk-ayah-text {
  font-family: var(--font-ar-sacred);
  font-size: 0.72rem;
  line-height: 1.8;
  color: var(--mk-ink);
  margin: 0;
}

.mk-ayah-text .mk-mark {
  color: var(--mk-primary);
  font-size: 0.85em;
  padding-inline: 1px;
}

.mk-ayah-active {
  background: var(--mk-tint);
  border-radius: 4px;
  padding: 1px 4px;
  box-shadow: 0 0 0 1px var(--mk-primary);
  color: var(--mk-ink);
  display: inline;
}

.mk-trans-box {
  background: var(--mk-tint);
  border: 1px dashed var(--mk-border);
  border-radius: 9px;
  padding: 5px 8px;
  margin-top: 1px;
}

.mk-trans-box.ltr {
  direction: ltr;
  text-align: left;
}

.mk-trans-box.rtl {
  direction: rtl;
  text-align: right;
}

.mk-trans-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}

.mk-trans-chip {
  font-family: var(--font-heading);
  font-size: 0.52rem;
  font-weight: 800;
  color: var(--mk-primary-ink);
  text-transform: uppercase;
}

.mk-trans-ref {
  font-family: var(--font-heading);
  font-size: 0.52rem;
  font-weight: 700;
  color: var(--mk-soft);
  font-variant-numeric: tabular-nums;
}

.mk-trans-txt {
  font-size: 0.60rem;
  line-height: 1.35;
  color: var(--mk-ink);
  margin: 0;
  opacity: 0.95;
}

.mk-audio-mini {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--mk-surface);
  border: 1px solid var(--mk-border);
  border-radius: 10px;
  padding: 4px 8px;
  direction: ltr;
}

.mk-audio-play-pill {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--mk-primary);
  color: var(--mk-on-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: none;
}

.mk-audio-play-pill .icon {
  width: 11px;
  height: 11px;
}

.mk-audio-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  text-align: left;
}

.mk-audio-reciter {
  font-family: var(--font-heading);
  font-size: 0.60rem;
  font-weight: 800;
  color: var(--mk-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mk-audio-time {
  font-size: 0.50rem;
  color: var(--mk-soft);
  font-variant-numeric: tabular-nums;
}

.mk-audio-mini .mk-wave {
  height: 14px;
  width: 42px;
  flex: none;
}

.mk-compass {
  position: relative;
  width: 128px;
  aspect-ratio: 1;
  margin: 4px auto;
  border-radius: 50%;
  background: var(--mk-surface);
  border: 1px solid var(--mk-border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.mk-compass::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  border: 1px dashed var(--mk-border);
}

.mk-needle {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  animation: mkSway 6s ease-in-out infinite;
}

.mk-needle span {
  display: block;
  width: 0;
  height: 0;
  border-inline: 8px solid transparent;
  border-bottom: 32px solid var(--mk-primary);
  margin-top: 13px;
}

@keyframes mkSway {

  0%,
  100% {
    transform: rotate(45deg);
  }

  50% {
    transform: rotate(51deg);
  }
}

.mk-compass b {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: .92rem;
  color: var(--mk-ink);
  z-index: 1;
}

.mk-compass-deg {
  position: absolute;
  bottom: 13px;
  font-size: .57rem;
  color: var(--mk-soft);
  z-index: 1;
}

.mk-counter {
  text-align: center;
  padding: 8px 0;
}

.mk-counter b {
  display: block;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 2rem;
  line-height: 1;
  color: var(--mk-primary-ink);
  font-variant-numeric: tabular-nums;
}

.mk-counter small {
  font-size: .62rem;
  color: var(--mk-soft);
}

.mk-beads {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 9px;
  flex-wrap: wrap;
}

.mk-beads i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mk-tint);
  display: block;
}

.mk-beads i.on {
  background: var(--mk-primary);
}

.mk-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.mk-grid span {
  background: var(--mk-surface);
  border: 1px solid var(--mk-border);
  border-radius: 11px;
  padding: 8px 3px;
  text-align: center;
  font-family: var(--font-ar-sacred);
  font-size: .72rem;
  color: var(--mk-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mk-bar {
  height: 5px;
  border-radius: 3px;
  background: var(--mk-tint);
  overflow: hidden;
}

.mk-bar i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--mk-primary);
}

.mk-btns {
  display: flex;
  gap: 6px;
}

.mk-btn {
  flex: 1;
  text-align: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: .65rem;
  padding: 9px 6px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mk-btn-fill {
  background: var(--mk-primary);
  color: var(--mk-on-primary);
}

.mk-btn-out {
  border: 1.5px solid var(--mk-border);
  color: var(--mk-ink);
}

.mk-nav {
  margin-top: auto;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding-top: 9px;
  border-top: 1px solid var(--mk-border);
}

.mk-nav i {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mk-soft);
}

.mk-nav i .icon {
  width: 15px;
  height: 15px;
}

.mk-nav i.on {
  background: var(--mk-tint);
  color: var(--mk-primary-ink);
}

/* ==========================================================================
   7b. Interactive Features Showcase & Lightbox Modal
   ========================================================================== */
#features,
#showcase {
  padding: clamp(70px, 9vw, 110px) 0;
  position: relative;
  background: var(--bg);
}

.showcase-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 36px 0 44px;
}

.showcase-filter-btn {
  appearance: none;
  -webkit-appearance: none;
  background: var(--surface);
  border: 1.5px solid var(--border);
  color: var(--ink-soft);
  padding: 10px 22px;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.22s var(--easing);
  box-shadow: var(--shadow-xs);
}

.showcase-filter-btn:hover {
  border-color: var(--primary);
  color: var(--ink);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.showcase-filter-btn.active,
.showcase-filter-btn[aria-selected="true"] {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 4px 16px rgba(147, 105, 37, 0.32);
  transform: translateY(-1px);
}

html[data-theme="dark"] .showcase-filter-btn {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
  color: #d4d4d8;
}

html[data-theme="dark"] .showcase-filter-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--primary);
  color: #fff;
}

html[data-theme="dark"] .showcase-filter-btn.active,
html[data-theme="dark"] .showcase-filter-btn[aria-selected="true"] {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 4px 20px rgba(147, 105, 37, 0.45);
}

.showcase-track-wrap {
  width: 100%;
  position: relative;
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 280px));
  gap: clamp(18px, 2.2vw, 28px);
  width: 100%;
  max-width: 896px;
  margin-inline: auto;
  perspective: 1200px;
}

.showcase-card {
  background: linear-gradient(160deg, var(--surface) 0%, var(--bg-alt) 100%);
  border: 1px solid color-mix(in srgb, var(--border) 82%, var(--primary) 18%);
  border-radius: 24px;
  padding: 18px 14px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: default;
  position: relative;
  outline: none;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.3s var(--easing), box-shadow 0.3s var(--easing), border-color 0.3s var(--easing);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.showcase-card.reveal {
  transition-delay: var(--showcase-delay, 0ms);
}

.showcase-card::before {
  content: "";
  position: absolute;
  inset: 0 18% auto;
  height: 3px;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0.72;
  transform: scaleX(0.6);
  transition: transform 0.3s var(--easing), opacity 0.3s var(--easing);
}

.showcase-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--primary-tint) 65%, transparent), transparent 48%);
  opacity: 0.48;
  pointer-events: none;
  transition: opacity 0.3s var(--easing);
}

.showcase-card:hover,
.showcase-card:focus-visible {
  transform: translateY(-7px) rotateX(1deg);
  transition-delay: 0ms;
  border-color: var(--primary);
  box-shadow: 0 22px 42px -14px rgba(147, 105, 37, 0.32), 0 0 0 2px rgba(147, 105, 37, 0.12);
}

.js .showcase-card.reveal.in:hover,
.js .showcase-card.reveal.in:focus-visible {
  transform: translateY(-7px) rotateX(1deg);
}

.showcase-card:hover::before,
.showcase-card:focus-visible::before {
  opacity: 1;
  transform: scaleX(1);
}

.showcase-card:hover::after,
.showcase-card:focus-visible::after {
  opacity: 0.78;
}

html[data-theme="dark"] .showcase-card {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.018));
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

html[data-theme="dark"] .showcase-card:hover,
html[data-theme="dark"] .showcase-card:focus-visible {
  border-color: var(--primary);
  box-shadow: 0 24px 50px -10px rgba(0, 0, 0, 0.7), 0 0 0 2px rgba(147, 105, 37, 0.25);
}

.showcase-phone-mini {
  width: 100%;
  max-width: 168px;
  aspect-ratio: 9 / 19.5;
  border-radius: 25px;
  overflow: hidden;
  border: 5px solid #171a1f;
  background: #000;
  margin: 0 auto 14px;
  box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.28);
  position: relative;
  transition: transform 0.35s var(--easing), box-shadow 0.35s var(--easing);
  transform: translateZ(0);
}

.showcase-card:hover .showcase-phone-mini,
.showcase-card:focus-visible .showcase-phone-mini {
  transform: scale(1.035) translateY(-2px);
  box-shadow: 0 22px 44px -8px rgba(0, 0, 0, 0.36);
}

.showcase-phone-mini::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(112deg, transparent 28%, rgba(255, 255, 255, 0.18) 48%, transparent 64%);
  transform: translateX(-135%);
  transition: transform 0.7s var(--easing);
  pointer-events: none;
}

.showcase-card:hover .showcase-phone-mini::after,
.showcase-card:focus-visible .showcase-phone-mini::after {
  transform: translateX(135%);
}

.showcase-phone-mini img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.showcase-card-title {
  font-size: 0.96rem;
  font-weight: 800;
  font-family: var(--font-heading);
  color: var(--ink);
  margin: 0 0 8px;
  line-height: 1.3;
}

html[data-theme="dark"] .showcase-card-title {
  color: #f4f4f5;
}

.showcase-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--primary-ink);
  background: var(--primary-tint);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  margin-top: auto;
}

.showcase-card-badge .icon {
  width: 13px;
  height: 13px;
  color: var(--primary);
}

html[data-theme="dark"] .showcase-card-badge {
  color: #F0D6A2;
  background: rgba(147, 105, 37, 0.22);
  border: 1px solid rgba(240, 214, 162, 0.15);
}

/* Showcase Lightbox Modal */
.showcase-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(12, 14, 18, 0.90);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s var(--easing), visibility 0.25s var(--easing);
}

.showcase-lightbox.active,
.showcase-lightbox[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.showcase-lightbox-close {
  position: absolute;
  top: 24px;
  inset-inline-end: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s var(--easing);
  z-index: 10;
}

.showcase-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.24);
  transform: scale(1.08);
}

.showcase-lightbox-close .icon {
  width: 22px;
  height: 22px;
  stroke: #ffffff;
  stroke-width: 2.2;
}

.showcase-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s var(--easing);
  z-index: 10;
}

.showcase-lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-50%) scale(1.08);
}

.showcase-lightbox-nav .icon {
  width: 24px;
  height: 24px;
  stroke: #ffffff;
  stroke-width: 2.5;
}

.showcase-lightbox-prev {
  inset-inline-start: 24px;
}

.showcase-lightbox-next {
  inset-inline-end: 24px;
}

.showcase-lightbox-prev .icon {
  transform: scaleX(-1);
}

.showcase-lightbox-next .icon {
  transform: none;
}

html[dir="rtl"] .showcase-lightbox-prev .icon {
  transform: none;
}

html[dir="rtl"] .showcase-lightbox-next .icon {
  transform: scaleX(-1);
}

.showcase-lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.showcase-lightbox-phone {
  height: min(72vh, 620px);
  aspect-ratio: 9 / 19.5;
  border-radius: 36px;
  overflow: hidden;
  border: 6px solid #1c2024;
  background: #000;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.75);
}

.showcase-lightbox-phone img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.showcase-lightbox-caption {
  text-align: center;
  max-width: 480px;
  color: #fff;
}

.showcase-lightbox-caption h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #F0D6A2;
  margin-bottom: 6px;
  font-family: var(--font-heading);
}

.showcase-lightbox-caption p {
  font-size: 0.9rem;
  color: #d4d4d8;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .showcase-lightbox-nav {
    display: none;
  }

  .showcase-lightbox-phone {
    height: min(65vh, 520px);
  }
}

@media (max-width: 900px) {
  .showcase-grid {
    grid-template-columns: repeat(2, minmax(0, 280px));
    max-width: 588px;
  }
}

@media (max-width: 640px) {
  .showcase-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {

  .showcase-card,
  .showcase-phone-mini,
  .showcase-card::before,
  .showcase-card::after,
  .showcase-phone-mini::after {
    transition: none;
  }
}



/* ==========================================================================
   9. Content cards - editions, reciters, voices, methods
   ========================================================================== */
.grid-auto {
  display: grid;
  gap: clamp(14px, 2vw, 20px);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 214px), 1fr));
}

.grid-3 {
  display: grid;
  gap: clamp(14px, 2vw, 20px);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width:900px) {
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width:620px) {
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 22px;
  transition: transform .25s var(--easing), box-shadow .25s var(--easing), border-color .25s var(--easing);
}

.card h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--step-1);
  margin: 0 0 8px;
  color: var(--ink);
}

.card p {
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0;
  text-wrap: pretty;
}

.card-ic {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 16px;
}

.role-primary {
  background: var(--primary-tint);
  color: var(--primary-ink);
}

.role-secondary {
  background: var(--secondary-tint);
  color: var(--secondary-ink);
}

.edition-card {
  display: flex;
  flex-direction: column;
  gap: 11px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.edition-spine {
  height: 74px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary-tint), var(--surface));
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-ar-sacred);
  font-size: 1.45rem;
  color: var(--primary-ink);
}

.edition-card h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--step-0);
  margin: 0;
  color: var(--ink);
}

.edition-ar {
  font-family: var(--font-ar-sacred);
  font-size: 1.05rem;
  color: var(--primary-ink);
  direction: rtl;
}

.edition-card p {
  font-size: var(--step--1);
  color: var(--ink-soft);
  line-height: 1.5;
  margin: 0;
}

.edition-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 4px;
}

/* Reciter roll */
.reciter-rail {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
  direction: ltr;
  padding: 12px 0;
  margin: -12px 0;
  -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0), #000 6%, #000 94%, rgba(0, 0, 0, 0));
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0), #000 6%, #000 94%, rgba(0, 0, 0, 0));
}

.reciter-line {
  display: flex;
  width: max-content;
  gap: 10px;
  animation: marqueeScroll 64s linear infinite;
}

.reciter-line.rev {
  animation-direction: reverse;
  animation-duration: 78s;
}

/* reciter rail continuous scroll */
.reciter-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 6px 20px 6px 6px;
  padding-inline-start: 6px;
  padding-inline-end: 20px;
  white-space: nowrap;
  cursor: pointer;
}

.reciter-av {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary-tint);
  color: var(--primary-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: .76rem;
  flex-shrink: 0;
}

.reciter-tx {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.reciter-tx b {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: .82rem;
  color: var(--ink);
}

.reciter-tx small {
  font-family: var(--font-ar-sacred);
  font-size: .85rem;
  color: var(--ink-soft);
  direction: rtl;
}

@media (prefers-reduced-motion:reduce) {
  .reciter-rail {
    -webkit-mask-image: none;
    mask-image: none;
  }

  .reciter-line {
    animation: none;
    flex-wrap: wrap;
    width: auto;
  }
}

/* Adhan voices */
.voice-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  max-width: 1080px;
  margin-inline: auto;
}

.voice-list>.voice:last-child {
  grid-column: 2;
}

.voice {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 78px;
  background: linear-gradient(145deg, var(--surface), var(--bg-alt));
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 13px 15px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: opacity .7s var(--easing), transform .3s var(--easing), box-shadow .3s var(--easing), border-color .3s var(--easing), background .3s var(--easing);
  transition-delay: var(--voice-delay, 0ms);
  box-shadow: 0 8px 20px rgba(15, 23, 42, .045);
}

.voice::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--primary);
  opacity: .3;
  transition: opacity .3s var(--easing), transform .3s var(--easing);
}

.voice::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at 100% 0, color-mix(in srgb, var(--primary-tint) 75%, transparent), transparent 52%);
  opacity: .42;
  pointer-events: none;
  transition: opacity .3s var(--easing);
}

.voice:hover,
.voice:focus-within {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--primary) 68%, var(--border));
  box-shadow: 0 18px 32px -14px rgba(15, 23, 42, .28);
}

.voice:hover::before,
.voice:focus-within::before {
  opacity: 1;
  transform: scaleY(.72);
}

.voice:hover::after,
.voice:focus-within::after {
  opacity: .8;
}

.voice.is-haram {
  border-color: color-mix(in srgb, var(--primary) 72%, var(--border));
  background: linear-gradient(145deg, var(--primary-tint), var(--surface));
  box-shadow: 0 10px 24px color-mix(in srgb, var(--primary) 13%, transparent);
}

.voice.is-haram::before {
  opacity: .9;
}

.voice.is-haram:hover,
.voice.is-haram:focus-within {
  box-shadow: 0 20px 38px -14px color-mix(in srgb, var(--primary) 32%, transparent);
}

.js .voice.reveal {
  transition: opacity .7s var(--easing), transform .3s var(--easing), box-shadow .3s var(--easing), border-color .3s var(--easing), background .3s var(--easing);
  transition-delay: var(--voice-delay, 0ms);
}

.js .voice.reveal.in:hover,
.js .voice.reveal.in:focus-within {
  transform: translateY(-5px);
  transition-delay: 0ms;
}

.voice-ic {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  color: var(--primary-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.voice.is-haram .voice-ic {
  background: var(--surface);
}

.voice-tx {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.voice-tx b {
  display: block;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: var(--step--1);
  color: var(--ink);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

.voice-tx small {
  display: block;
  font-family: var(--font-ar-sacred);
  font-size: .92rem;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

html[dir="rtl"] .voice-tx b,
html[dir="rtl"] .voice-tx small {
  text-align: right;
}

.voice.is-haram .voice-tx small {
  color: var(--primary-ink);
}

@media (max-width: 900px) {
  .voice-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .voice-list>.voice:last-child {
    grid-column: auto;
  }
}

@media (max-width: 620px) {
  .voice-list {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {

  .voice,
  .js .voice.reveal {
    transition: none;
    transition-delay: 0s;
  }
}

/* Method pills */
.pill-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.pill {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--step--1);
  padding: 9px 15px;
  border-radius: var(--radius-full);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink-soft);
}

/* ==========================================================================
   10. Themes (Startup Color Palettes Showcase)
   ========================================================================== */
.themes-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 36px;
  max-width: 1080px;
  margin-inline: auto;
}

.themes-header {
  max-width: 680px;
  margin: 0 auto;
}

.themes-title {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: var(--step-4);
  line-height: 1.12;
  color: var(--ink);
  margin: 16px 0 12px;
  text-wrap: balance;
}

.themes-subtitle {
  font-size: var(--step-1);
  color: var(--ink-soft);
  line-height: 1.6;
  margin: 0 0 24px;
}

/* Palette Swatches Row */
.swatch-row {
  display: flex;
  gap: clamp(10px, 2vw, 16px);
  flex-wrap: wrap;
  justify-content: center;
  margin: 20px 0 26px;
}

.swatch-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  width: 82px;
  border-radius: var(--radius-md);
  transition: transform 0.2s var(--easing);
}

.swatch-btn:hover {
  transform: translateY(-2px);
}

.swatch-dot {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid transparent;
  transition: border-color .2s var(--easing), transform .2s var(--easing);
  position: relative;
  box-shadow: var(--shadow-sm);
}

.swatch-btn[aria-pressed="true"] .swatch-dot {
  border-color: var(--ink);
  transform: scale(1.1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.swatch-label {
  font-size: 0.76rem;
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--ink-soft);
  text-align: center;
  line-height: 1.25;
}

.swatch-btn[aria-pressed="true"] .swatch-label {
  color: var(--ink);
}

/* Theme Mode Tabs (Light / Dark / AMOLED Black) */
.theme-mode-tabs {
  display: inline-flex;
  align-items: center;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 5px;
  gap: 6px;
  margin: 0 auto;
}

.theme-mode-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  background: transparent;
  border: none;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--step--1);
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.2s var(--easing);
}

.theme-mode-tab:hover {
  color: var(--ink);
}

.theme-mode-tab.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.theme-mode-tab .icon {
  width: 16px;
  height: 16px;
}

.amoled-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #000000;
  border: 1.5px solid #666;
}

/* Startup-Style Palette Showcase Display */
.palette-showcase-panel {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 32px 32px 28px;
  box-shadow: 0 20px 48px -12px rgba(34, 31, 25, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.03);
  text-align: start;
  transition: all 0.3s var(--easing);
}

html[data-theme="dark"] .palette-showcase-panel {
  background: rgba(22, 26, 30, 0.94);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 28px 64px -14px rgba(0, 0, 0, 0.65);
}

.palette-showcase-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.palette-title-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.palette-chip-indicator {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.palette-current-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--ink);
  margin: 0 0 3px;
}

.palette-current-desc {
  font-size: 0.86rem;
  color: var(--ink-soft);
  margin: 0;
}

.palette-current-mode-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--ink);
}

.mode-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
}

/* 3 Swatch Cards: Primary, Secondary, Surface */
.palette-tiers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}

@media (max-width: 768px) {
  .palette-tiers-grid {
    grid-template-columns: 1fr;
  }
}

.tier-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.2s var(--easing), transform 0.2s var(--easing);
}

.tier-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.tier-swatch {
  height: 84px;
  border-radius: 14px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) inset;
  transition: background-color 0.3s var(--easing);
}

.tier-label {
  background: rgba(0, 0, 0, 0.38);
  color: #FFFFFF;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.7rem;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tier-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tier-role {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--ink);
}

.tier-code-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tier-hex {
  font-family: monospace;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 6px;
}

.tier-copy-btn {
  background: transparent;
  border: none;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s var(--easing);
}

.tier-copy-btn:hover {
  color: var(--primary);
}

.tier-copy-btn .icon {
  width: 15px;
  height: 15px;
}

.tier-usage {
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin: 2px 0 0;
  line-height: 1.35;
}


.preview-action-tag .icon {
  width: 14px;
  height: 14px;
  color: var(--prev-primary);
}

/* ==========================================================================
   11. Numbers band + privacy band
   ========================================================================== */
.numbers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
  gap: clamp(12px, 2vw, 20px);
}

.number {
  text-align: center;
  padding: 20px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.number b {
  display: block;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: var(--step-4);
  line-height: 1;
  color: var(--primary-ink);
  font-variant-numeric: tabular-nums;
}

.number span {
  display: block;
  font-size: var(--step--1);
  color: var(--ink-soft);
  margin-top: 8px;
  line-height: 1.35;
}

.privacy-band {
  background: var(--secondary-deep);
  color: #EAF7F0;
  overflow: hidden;
}

html[data-theme="dark"] .privacy-band {
  background: #0D2A1D;
}

.privacy-shout {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: var(--step-6);
  line-height: 1;
  letter-spacing: -.03em;
  text-align: center;
  margin: 0 0 14px;
  text-wrap: balance;
}

.privacy-shout em {
  display: block;
  font-style: normal;
  color: #F0D6A2;
}

.privacy-sub {
  text-align: center;
  font-size: var(--step-1);
  color: #BEDCCD;
  max-width: 58ch;
  margin: 0 auto 34px;
  text-wrap: pretty;
}

.privacy-points {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 14px;
}

.privacy-point {
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.privacy-point b {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--step-0);
  margin-bottom: 7px;
  color: #FFF;
}

.privacy-point b .icon {
  color: #F0D6A2;
}

.privacy-point p {
  font-size: var(--step--1);
  line-height: 1.55;
  color: #BEDCCD;
  margin: 0;
}

/* ==========================================================================
   12. Community + FAQ + download + footer
   ========================================================================== */
.hadith-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: clamp(24px, 4vw, 40px);
  box-shadow: var(--shadow-sm);
  max-width: 760px;
  margin-inline: auto;
}

.hadith-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--step--1);
  color: var(--secondary-ink);
  background: var(--secondary-tint);
  padding: 7px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 20px;
}

.hadith-ar {
  font-family: var(--font-ar-sacred);
  font-size: clamp(1.1rem, 3vw, 1.35rem);
  line-height: 2.05;
  color: var(--ink);
  direction: rtl;
  margin: 0 0 16px;
}

.hadith-gloss {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--step-1);
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0 0 18px;
  text-wrap: pretty;
}

.hadith-source {
  font-size: var(--step--1);
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--ink);
  margin-bottom: 22px;
}

.hadith-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 12px;
}

.hadith-share {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: none;
  border: 1.5px solid var(--border-strong);
  color: var(--ink-soft);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--step--1);
  padding: 10px 18px;
  min-height: 44px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: border-color .2s var(--easing), color .2s var(--easing);
}

.faq {
  max-width: 820px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq details[open] {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-xs);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 20px;
  min-height: 56px;
  cursor: pointer;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--step-0);
  color: var(--ink);
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary .icon {
  color: var(--primary-ink);
  transition: transform .25s var(--easing);
  flex-shrink: 0;
}

.faq details[open] summary .icon {
  transform: rotate(90deg);
}

html[dir="rtl"] .faq summary .icon {
  transform: scaleX(-1);
}

html[dir="rtl"] .faq details[open] summary .icon {
  transform: scaleX(-1) rotate(-90deg);
}

.faq-body {
  padding: 0 20px 18px;
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.download-grid {
  max-width: 660px;
  margin-inline: auto;
  text-align: center;
}

.store-listing-card {
  display: flex;
  align-items: center;
  gap: 18px;
  text-align: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 22px;
  box-shadow: var(--shadow-md);
  margin-bottom: 26px;
}

.store-listing-icon {
  width: 84px;
  height: 84px;
  border-radius: 22px;
}

.store-listing-name {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: var(--step-2);
  color: var(--ink);
  margin: 0 0 4px;
}

.store-listing-meta {
  font-size: var(--step--1);
  color: var(--ink-soft);
  margin: 0 0 10px;
}

.store-listing-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .74rem;
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--secondary-ink);
  background: var(--secondary-tint);
  padding: 6px 12px;
  border-radius: var(--radius-full);
}

@media (max-width:520px) {
  .store-listing-card {
    flex-direction: column;
    text-align: center;
  }
}

.store-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #1d1d1d, #0e0f10);
  color: #fff;
  padding: 12px 22px;
  min-height: 60px;
  border-radius: 18px;
  text-decoration: none;
  transition: transform .2s var(--easing), box-shadow .2s var(--easing);
  box-shadow: 0 18px 34px rgba(4, 6, 8, .22);
  border: 1px solid rgba(255, 255, 255, .1);
  overflow: hidden;
}

.store-badge::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(255, 255, 255, .12), rgba(0, 0, 0, 0) 34%);
  pointer-events: none;
}

.store-badge .icon {
  font-size: 1.7rem;
  position: relative;
  z-index: 1;
}

.store-badge-text {
  text-align: start;
  line-height: 1.25;
  position: relative;
  z-index: 1;
}

.store-badge-text small {
  display: block;
  font-size: .68rem;
  opacity: .82;
  letter-spacing: .1em;
}

.store-badge-text strong {
  display: block;
  font-size: 1.05rem;
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -.02em;
}

.download-note {
  font-size: var(--step--1);
  color: var(--ink-soft);
  margin-top: 18px;
}

/* ==========================================================================
   Downloads Transparency Section
   ========================================================================== */
.downloads-transparency {
  margin-top: clamp(48px, 6vw, 72px);
  padding-top: clamp(36px, 5vw, 56px);
  border-top: 1px solid var(--border);
}

.downloads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(16px, 2.5vw, 24px);
  margin-top: clamp(24px, 3.5vw, 36px);
}

.downloads-card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3vw, 28px);
  text-align: start;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.25s var(--easing), box-shadow 0.25s var(--easing);
}

.downloads-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.downloads-card-ic {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.downloads-card-ic.role-primary {
  background: var(--primary-tint);
  color: var(--primary-ink);
}

.downloads-card-ic.role-secondary {
  background: var(--secondary-tint);
  color: var(--secondary-ink);
}

.downloads-card h4 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}

.downloads-card p {
  font-size: var(--step--1);
  color: var(--ink-soft);
  line-height: 1.55;
  margin: 0;
}

footer {
  padding-block: clamp(40px, 6vw, 64px) 28px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr);
  gap: clamp(28px, 5vw, 56px);
  margin-bottom: 36px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

.footer-brand-icon {
  width: 34px;
  height: 34px;
}

.footer-brand-word {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.08rem;
}

.footer-tagline {
  font-size: var(--step--1);
  color: var(--ink-soft);
  margin-top: 10px;
  max-width: 36ch;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.footer-col h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 12px;
}

.footer-col a {
  display: block;
  font-size: var(--step--1);
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 500;
  padding-block: 10px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.footer-bottom p {
  font-size: .82rem;
  color: var(--ink-soft);
  margin: 0;
}

.footer-social {
  display: flex;
  gap: 10px;
}

.footer-social .website-icon {
  background-image: url("../icons/portofillio-96.png");
  background-size: cover;
  background-position: center;
}

@supports (background-image:image-set(url("data:image/webp;base64,") type("image/webp"))) {
  .footer-social .website-icon {
    background-image: image-set(url("../icons/portofillio-96.webp") type("image/webp"), url("../icons/portofillio-96.png") type("image/png"));
  }
}

@media (max-width:820px) {
  .footer-top {
    grid-template-columns: 1fr;
  }
}

@media (max-width:520px) {
  .footer-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ==========================================================================
   13. Toast + back to top
   ========================================================================== */
.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translate(-50%, 120px);
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--step--1);
  padding: 13px 24px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg);
  z-index: 300;
  opacity: 0;
  transition: transform .35s var(--easing), opacity .35s var(--easing);
  pointer-events: none;
  max-width: calc(100vw - 32px);
  text-align: center;
}

.toast.show {
  transform: translate(-50%, 0);
  opacity: 1;
}

.to-top {
  position: fixed;
  inset-block-end: 24px;
  inset-inline-end: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: var(--shadow-gold-lg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 110;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .25s var(--easing), transform .25s var(--easing), visibility .25s, background .2s var(--easing);
}

.to-top.show {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.to-top .icon {
  transform: rotate(-90deg);
}

/* ==========================================================================
   14. Hover states - pointer devices only
   ========================================================================== */
@media (hover:hover) and (pointer:fine) {
  .btn-filled:hover {
    background: var(--primary-deep);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
  }

  .btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary-ink);
    background: var(--primary-tint);
  }

  .icon-button:hover {
    border-color: var(--primary);
    color: var(--primary-ink);
    transform: translateY(-1px);
  }

  .lang-toggle-btn:hover {
    border-color: var(--primary);
    color: var(--primary-ink);
  }

  .lang-menu-item:hover {
    background: var(--bg-alt);
  }

  .nav-links a:hover {
    background: var(--bg-alt);
    color: var(--ink);
  }

  #themeToggle:hover .icon {
    transform: rotate(18deg);
  }

  .card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-strong);
  }

  .ex-item:hover:not([aria-selected="true"]) {
    border-color: var(--border-strong);
    background: var(--surface-2);
  }

  .hadith-share:hover {
    border-color: var(--primary);
    color: var(--primary-ink);
  }

  .store-badge:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
  }

  .footer-col a:hover {
    color: var(--primary-ink);
  }

  .faq summary:hover {
    background: var(--bg-alt);
  }

  .to-top:hover {
    background: var(--primary-deep);
  }

  .swatch-btn:hover .swatch-dot {
    transform: scale(1.06);
  }
}

/* Forced colours: let the OS palette win rather than fighting it. */
@media (forced-colors:active) {

  .btn,
  .icon-button,
  .card,
  .ex-item,
  .phone-screen {
    border: 1px solid CanvasText;
  }

  .hero-glow,
  .hero-glow-2,
  .hero-pattern {
    display: none;
  }
}

/* ==========================================================================
   ENHANCED COMPONENTS: Mushafs, Reciters Showcase & Adhan Soundboard
   ========================================================================== */

/* Mushaf Cards with Cover Artwork */
.edition-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  transition: transform .28s var(--ease-spring), box-shadow .28s var(--ease-spring), border-color .28s var(--easing);
  position: relative;
  overflow: hidden;
}

.edition-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 12px 32px rgba(147, 105, 37, .14);
}

.edition-cover-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.edition-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s var(--easing);
}

.edition-card:hover .edition-cover-img {
  transform: scale(1.04);
}

.edition-badge {
  position: absolute;
  top: 10px;
  inset-inline-end: 10px;
  background: rgba(16, 20, 19, .85);
  backdrop-filter: blur(6px);
  color: #F5E9D6;
  font-size: .72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(147, 105, 37, .4);
}

.edition-preview-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 9px 12px;
  margin-top: 4px;
  background: var(--primary-tint);
  color: var(--primary-ink);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .84rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s var(--easing), color .2s var(--easing), border-color .2s var(--easing);
}

.edition-preview-btn:hover {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
}

/* ==========================================================================
   Bismillah Calligraphic Emblem & Quran Header
   ========================================================================== */
.quran-bismillah-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: clamp(16px, 2.5vw, 24px);
}

.quran-bismillah-icon {
  width: clamp(130px, 16vw, 170px);
  height: auto;
  color: var(--primary);
  fill: currentColor;
  opacity: 0.88;
  transition: opacity .3s var(--easing), transform .3s var(--easing);
}

.quran-bismillah-icon:hover {
  opacity: 1;
  transform: scale(1.03);
}

/* ==========================================================================
   Khatma Reading Planner Card
   ========================================================================== */
.khatma-card {
  margin-top: clamp(28px, 4vw, 44px);
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3vw, 32px);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.khatma-card::before {
  content: "";
  position: absolute;
  top: 0;
  inset-inline-start: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--primary), var(--secondary));
}

.khatma-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.khatma-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.khatma-body-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(20px, 3vw, 36px);
  align-items: center;
}

@media (max-width: 768px) {
  .khatma-body-row {
    grid-template-columns: 1fr;
  }
}

.khatma-text h3 {
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 8px;
}

.khatma-text p {
  font-size: var(--step-0);
  color: var(--ink-soft);
  line-height: 1.6;
  margin: 0;
}

.khatma-meter-wrap {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
}

.khatma-meter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}

.khatma-meter-pct {
  color: var(--primary);
  font-family: var(--font-heading);
}

.khatma-progress-bar {
  width: 100%;
  height: 8px;
  background: var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 10px;
}

.khatma-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: var(--radius-full);
  transition: width 0.8s var(--easing);
}

.khatma-meter-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.76rem;
  color: var(--ink-muted);
}

.khatma-status-badge {
  color: var(--primary-ink);
  background: var(--primary-tint);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.7rem;
}

/* Reciter Controls: Search Box, Category Tabs & View Toggle */
.reciter-controls {
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.reciter-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.reciter-search-box {
  position: relative;
  flex: 1;
  min-width: min(100%, 320px);
}

.reciter-search-box .search-ic {
  position: absolute;
  top: 50%;
  inset-inline-start: 14px;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--ink-soft);
  pointer-events: none;
}

.reciter-search-input {
  width: 100%;
  padding: 10px 38px;
  padding-inline-start: 40px;
  padding-inline-end: 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--ink);
  font-size: .92rem;
  font-family: inherit;
  outline: none;
  transition: border-color .2s var(--easing), box-shadow .2s var(--easing);
}

.reciter-search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(147, 105, 37, .15);
}

.reciter-clear-btn {
  position: absolute;
  top: 50%;
  inset-inline-end: 12px;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 4px;
}

.reciter-clear-btn:hover {
  color: var(--ink);
}

.reciter-view-toggle {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 3px;
  gap: 2px;
}

.reciter-view-toggle .view-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all .2s var(--easing);
}

.reciter-view-toggle .view-btn.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(147, 105, 37, .3);
}

.reciter-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.reciter-tabs::-webkit-scrollbar {
  display: none;
}

.reciter-tab {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: .84rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all .2s var(--easing);
}

.reciter-tab:hover {
  border-color: var(--primary);
  color: var(--ink);
}

.reciter-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(147, 105, 37, .25);
}

/* Reciters Grid Showcase */
.reciter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 12px;
  margin-top: 10px;
}

.reciter-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  transition: transform .2s var(--easing), border-color .2s var(--easing), box-shadow .2s var(--easing);
  position: relative;
  cursor: default;
}

.voice.no-audio {
  cursor: default;
}

.reciter-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 6px 20px rgba(147, 105, 37, .12);
}

.reciter-card.is-playing {
  border-color: var(--primary);
  background: var(--primary-tint);
}

.reciter-card-av {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  overflow: hidden;
  border: 1.5px solid var(--primary);
  flex-shrink: 0;
  background: var(--bg-alt);
}

.reciter-card-av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reciter-card-tx {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.reciter-card-tx b {
  font-size: .92rem;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  text-align: left;
}

.reciter-card-tx small {
  font-size: .78rem;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  text-align: left;
}

html[dir="rtl"] .reciter-card-tx b,
html[dir="rtl"] .reciter-card-tx small {
  text-align: right;
}

.reciter-tag-chip {
  display: inline-block;
  align-self: flex-start;
  font-size: .68rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: var(--radius-full);
  background: rgba(147, 105, 37, .12);
  color: var(--primary-ink);
  margin-top: 2px;
}

.reciter-play-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all .2s var(--easing);
}

.reciter-play-btn:hover,
.reciter-card.is-playing .reciter-play-btn {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.reciter-no-sample {
  font-size: .72rem;
  color: var(--ink-soft);
  font-weight: 600;
  padding: 4px 9px;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  white-space: nowrap;
  flex-shrink: 0;
}

.reciter-chip.no-audio {
  cursor: default;
  opacity: 0.88;
}

.reciter-chip.no-audio:hover {
  transform: none;
  border-color: var(--border);
}

/* Reciter Marquee Ticker circular photos */
.reciter-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 6px 20px 6px 6px;
  padding-inline-start: 6px;
  padding-inline-end: 20px;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .25s var(--easing), border-color .25s var(--easing), box-shadow .25s var(--easing), background .25s var(--easing), padding .25s var(--easing);
}

.reciter-chip:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--primary) 18%, transparent);
}

.reciter-av {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 1.5px solid var(--primary);
}

.reciter-av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Adhan Soundboard Cards */
.voice-cover {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1.5px solid var(--border);
  flex-shrink: 0;
  background: var(--bg-alt);
}

.voice.is-haram .voice-cover {
  border-color: var(--primary);
}

.voice-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.voice-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-inline-start: auto;
}

.voice-play-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .2s var(--easing);
  flex-shrink: 0;
}

.voice-play-btn:hover,
.voice.is-playing .voice-play-btn {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: scale(1.06);
}

.voice-wave-mini {
  display: none;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}

.voice.is-playing .voice-wave-mini {
  display: flex;
}

.voice-wave-mini span {
  width: 2.5px;
  background: var(--primary);
  border-radius: 1px;
  animation: miniWaveBounce .7s ease-in-out infinite alternate;
}

.voice-wave-mini span:nth-child(1) {
  height: 40%;
  animation-delay: .0s;
}

.voice-wave-mini span:nth-child(2) {
  height: 80%;
  animation-delay: .15s;
}

.voice-wave-mini span:nth-child(3) {
  height: 100%;
  animation-delay: .3s;
}

.voice-wave-mini span:nth-child(4) {
  height: 60%;
  animation-delay: .45s;
}

@keyframes miniWaveBounce {
  0% {
    height: 20%;
  }

  100% {
    height: 100%;
  }
}



/* Mushaf Preview Modal */
.mushaf-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 13, .82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s var(--easing), visibility .3s;
}

.mushaf-modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.mushaf-modal-dialog {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  max-width: 580px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xl);
  transform: scale(.94);
  transition: transform .3s var(--ease-spring);
  overflow: hidden;
}

.mushaf-modal-backdrop.is-open .mushaf-modal-dialog {
  transform: scale(1);
}

.mushaf-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.mushaf-modal-head h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  margin: 0;
  color: var(--ink);
}

.mushaf-modal-close {
  background: var(--bg-alt);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.2rem;
  color: var(--ink-soft);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mushaf-modal-body {
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.mushaf-modal-img {
  max-width: 100%;
  max-height: 60vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

.mushaf-modal-pager {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mushaf-pager-btn {
  padding: 7px 16px;
  border-radius: var(--radius-full);
  background: var(--primary-tint);
  color: var(--primary-ink);
  font-size: .84rem;
  font-weight: 600;
  border: 1px solid rgba(147, 105, 37, .25);
  cursor: pointer;
}

.mushaf-pager-btn:hover {
  background: var(--primary);
  color: #fff;
}

/* Flagship Device Chassis in Hero Visual */
.hero-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 2.2vw, 32px);
  width: 100%;
  max-width: 920px;
  margin-inline: auto;
}

.hero-phone {
  display: none;
  width: clamp(210px, 18vw, 236px);
  flex-shrink: 0;
  transform: rotate(-3.5deg) translateY(6px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.18),
    0 2px 5px rgba(255, 255, 255, 0.10) inset,
    0 32px 72px -14px rgba(0, 0, 0, 0.58),
    0 12px 28px -6px rgba(0, 0, 0, 0.38);
  transition: transform 0.5s var(--ease-spring), box-shadow 0.4s var(--easing);
  z-index: 1;
}

html[dir="rtl"] .hero-phone {
  transform: rotate(3.5deg) translateY(6px);
}

@media (min-width: 1024px) {
  .hero-phone {
    display: block;
  }

  .hero-phone:hover {
    transform: rotate(-1deg) translateY(0) scale(1.02);
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.24),
      0 2px 6px rgba(255, 255, 255, 0.14) inset,
      0 38px 84px -14px rgba(0, 0, 0, 0.65),
      0 18px 36px -6px rgba(0, 0, 0, 0.45);
  }

  html[dir="rtl"] .hero-phone:hover {
    transform: rotate(1deg) translateY(0) scale(1.02);
  }
}

@media (max-width: 1023px) {
  .hero-stage {
    flex-direction: column;
    gap: 28px;
    justify-content: center;
  }

  .hero-phone {
    display: block;
    transform: none;
    width: min(100%, 260px);
    margin: 0 auto;
  }

  html[dir="rtl"] .hero-phone {
    transform: none;
  }
}

/* ==========================================================================
   Dedicated Mobile UX Polish (Google-Style)
   ========================================================================== */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

@media (max-width: 768px) {

  /* On small screens, keep hero phone beautifully scaled and centered */
  .phone.hero-phone {
    display: block !important;
    width: min(85vw, 240px) !important;
    margin: 0 auto 24px !important;
    transform: none !important;
  }

  .hero-stage {
    display: flex;
    justify-content: center;
    width: 100%;
  }

  .widget-card {
    width: 100% !important;
    max-width: 480px !important;
    margin: 0 auto !important;
  }

  .palette-tiers-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  .hero-ctas {
    flex-direction: column;
    width: 100%;
    max-width: 380px;
    margin-inline: auto;
  }

  .hero-ctas .btn {
    width: 100%;
    min-height: 48px;
  }

  .store-listing-card {
    flex-direction: column;
    text-align: center;
    padding: 20px;
  }

  .store-badge {
    width: 100%;
    max-width: 360px;
    justify-content: center;
    min-height: 52px;
  }

  .faq summary {
    padding: 16px 18px;
    min-height: 52px;
  }

  .reciter-toolbar {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }

  .reciter-search-box {
    flex: 1;
    min-width: 0;
  }

  .reciter-view-toggle {
    display: flex;
    flex-shrink: 0;
  }
}

/* ==========================================================================
   Mushaf Editions Showcase
   ========================================================================== */
.mushaf-editions-section {
  margin-top: clamp(48px, 6vw, 84px);
  margin-bottom: clamp(48px, 6vw, 84px);
}

.mushaf-editions-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.mushaf-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  background: var(--bg-alt);
  padding: 8px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.mushaf-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--step--1);
  cursor: pointer;
  transition: all .2s var(--easing);
  min-height: 44px;
}

.mushaf-tab-btn:hover {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--border);
}

.mushaf-tab-btn.active {
  background: var(--primary);
  color: #ffffff !important;
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.25);
}

html[data-theme="dark"] .mushaf-tab-btn.active {
  color: #062E22 !important;
  box-shadow: 0 4px 14px rgba(52, 211, 153, 0.3);
}

.mushaf-tab-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.08);
}

.mushaf-tab-btn.active .mushaf-tab-badge {
  background: rgba(255, 255, 255, 0.24);
  color: inherit;
}

html[data-theme="dark"] .mushaf-tab-badge {
  background: rgba(255, 255, 255, 0.1);
}

.mushaf-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: clamp(24px, 4vw, 40px);
  box-shadow: var(--shadow-sm);
  transition: border-color .25s var(--easing);
}

.mushaf-card-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 24px;
}

.mushaf-card-titles {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mushaf-card-heading {
  font-family: var(--font-heading);
  font-size: var(--step-2);
  font-weight: 800;
  color: var(--ink);
  margin: 0;
}

.mushaf-card-chips {
  display: flex;
  gap: 8px;
  align-items: center;
}

.mushaf-card-desc {
  font-size: var(--step-0);
  color: var(--ink-soft);
  line-height: 1.65;
  max-width: 820px;
  margin: 0;
}

.mushaf-previews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: clamp(20px, 3vw, 36px);
}

.mushaf-preview-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.mushaf-preview-frame {
  width: 100%;
  max-width: 440px;
  aspect-ratio: 1 / 1.48;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  box-shadow: var(--shadow-md);
  transition: transform .3s var(--easing), box-shadow .3s var(--easing), border-color .3s var(--easing);
  display: flex;
  align-items: center;
  justify-content: center;
}

.mushaf-preview-frame:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary);
}

.mushaf-preview-frame picture,
.mushaf-preview-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.mushaf-preview-label {
  font-family: var(--font-heading);
  font-size: var(--step--1);
  font-weight: 700;
  color: var(--ink-soft);
  text-align: center;
}

/* ==========================================================================
   Floating Audio Player Subsystem
   ========================================================================== */
.floating-audio-bar {
  position: fixed;
  inset-inline-start: 50%;
  bottom: 24px;
  transform: translate(-50%, 140%);
  width: min(calc(100% - 32px), 760px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: 0 16px 48px -8px rgba(0, 0, 0, 0.32), 0 0 0 1px rgba(255, 255, 255, 0.08);
  padding: 12px 20px;
  z-index: 950;
  opacity: 0;
  pointer-events: none;
  transition: transform .35s var(--ease-spring), opacity .3s var(--easing);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

html[dir="rtl"] .floating-audio-bar {
  transform: translate(50%, 140%);
}

.floating-audio-bar.active {
  transform: translate(-50%, 0);
  opacity: 1;
  pointer-events: auto;
}

html[dir="rtl"] .floating-audio-bar.active {
  transform: translate(50%, 0);
}

.floating-audio-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.floating-audio-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.floating-audio-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--primary-tint);
  color: var(--primary-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.floating-audio-icon .icon {
  width: 20px;
  height: 20px;
}

.floating-audio-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.floating-audio-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.floating-audio-sub {
  font-size: 0.78rem;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.floating-audio-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1.5;
  justify-content: flex-end;
}

.floating-audio-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .2s var(--easing);
  flex-shrink: 0;
}

.floating-audio-btn .icon {
  width: 18px;
  height: 18px;
}

.floating-audio-btn:hover {
  background: var(--bg-alt);
  border-color: var(--primary);
  color: var(--primary);
}

.floating-audio-btn.play-btn {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.3);
}

html[data-theme="dark"] .floating-audio-btn.play-btn {
  color: #062E22;
  box-shadow: 0 4px 14px rgba(52, 211, 153, 0.35);
}

.floating-audio-btn .pause-ic {
  display: none;
}

.floating-audio-btn.playing .play-ic {
  display: none;
}

.floating-audio-btn.playing .pause-ic {
  display: block;
}

.floating-audio-timeline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 120px;
}

.floating-audio-time {
  font-size: 0.76rem;
  font-family: var(--font-heading);
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
  min-width: 32px;
  text-align: center;
}

.floating-audio-progress-wrap {
  flex: 1;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--border);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  outline: none;
}

.floating-audio-progress-wrap:focus-visible {
  box-shadow: 0 0 0 2px var(--primary);
}

.floating-audio-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--primary);
  border-radius: var(--radius-full);
  transition: width .1s linear;
}

.floating-audio-btn.close-btn {
  width: 34px;
  height: 34px;
  color: var(--ink-soft);
  background: transparent;
  border-color: transparent;
}

.floating-audio-btn.close-btn:hover {
  background: var(--bg-alt);
  color: var(--ink);
}

@media (max-width: 680px) {
  .floating-audio-bar {
    bottom: 16px;
    width: calc(100% - 24px);
    padding: 10px 14px;
  }

  .floating-audio-timeline {
    display: none;
  }
}

/* ==========================================================================
   Voice & Reciter Cards Audio Interactions & Animations
   ========================================================================== */
.voice {
  cursor: pointer;
  transition: opacity .7s var(--easing), transform .25s var(--easing), box-shadow .25s var(--easing), border-color .25s var(--easing), background .25s var(--easing);
  transition-delay: var(--voice-delay, 0ms);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.voice:active {
  transform: scale(0.985);
}

.voice.is-playing {
  border-color: var(--primary) !important;
  background: linear-gradient(145deg, var(--primary-tint), var(--surface)) !important;
  box-shadow: 0 12px 28px -6px color-mix(in srgb, var(--primary) 28%, transparent) !important;
}

/* Voice Cover & Hover/Play Overlay */
.voice-cover {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1.5px solid var(--border);
  flex-shrink: 0;
  background: var(--bg-alt);
}

.voice.is-haram .voice-cover {
  border-color: var(--primary);
}

.voice-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.voice-cover-play {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  opacity: 0;
  transition: opacity .2s var(--easing);
  pointer-events: none;
}

.voice:hover .voice-cover-play,
.voice:focus-visible .voice-cover-play,
.voice.is-playing .voice-cover-play {
  opacity: 1;
}

.voice-cover-play .icon {
  width: 20px;
  height: 20px;
}

.voice-cover-play .pause-ic {
  display: none;
}

.voice.is-playing .voice-cover-play .play-ic {
  display: none;
}

.voice.is-playing .voice-cover-play .pause-ic {
  display: block;
}

/* Voice Actions & Play Button */
.voice-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-inline-start: auto;
  flex-shrink: 0;
}

.voice-play-btn {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  background: var(--surface);
  border: 1.5px solid var(--border);
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all .25s var(--easing);
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.voice:hover .voice-play-btn,
.voice-play-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: scale(1.06);
}

.voice.is-playing .voice-play-btn,
.voice-play-btn.active {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--primary) 40%, transparent);
  transform: scale(1.06);
}

html[data-theme="dark"] .voice.is-playing .voice-play-btn,
html[data-theme="dark"] .voice-play-btn.active {
  color: #0b1411 !important;
}

.voice-play-btn .icon,
.reciter-play-btn .icon {
  width: 15px;
  height: 15px;
}

.voice-play-btn .pause-ic,
.reciter-play-btn .pause-ic {
  display: none;
}

.voice.is-playing .voice-play-btn .play-ic,
.voice-play-btn.active .play-ic,
.reciter-card.is-playing .reciter-play-btn .play-ic,
.reciter-play-btn.active .play-ic {
  display: none;
}

/* Equalizer Dancing Bars */
.voice-eq-bars {
  display: none;
  align-items: flex-end;
  justify-content: center;
  gap: 2.5px;
  width: 16px;
  height: 16px;
}

.voice.is-playing .voice-eq-bars,
.voice-play-btn.active .voice-eq-bars,
.reciter-card.is-playing .voice-eq-bars,
.reciter-play-btn.active .voice-eq-bars {
  display: flex;
}

.voice-eq-bars span {
  width: 2.5px;
  background: currentColor;
  border-radius: 1px;
  animation: eqBounce .75s ease-in-out infinite alternate;
}

.voice-eq-bars span:nth-child(1) {
  height: 35%;
  animation-delay: 0s;
}

.voice-eq-bars span:nth-child(2) {
  height: 95%;
  animation-delay: 0.18s;
}

.voice-eq-bars span:nth-child(3) {
  height: 60%;
  animation-delay: 0.36s;
}

.voice-eq-bars span:nth-child(4) {
  height: 80%;
  animation-delay: 0.54s;
}

/* In playing button: show EQ bars normally, swap to Pause icon on button hover */
.voice.is-playing .voice-play-btn:not(:hover) .pause-ic,
.voice-play-btn.active:not(:hover) .pause-ic,
.reciter-card.is-playing .reciter-play-btn:not(:hover) .pause-ic,
.reciter-play-btn.active:not(:hover) .pause-ic {
  display: none;
}

.voice.is-playing .voice-play-btn:hover .voice-eq-bars,
.voice-play-btn.active:hover .voice-eq-bars,
.reciter-card.is-playing .reciter-play-btn:hover .voice-eq-bars,
.reciter-play-btn.active:hover .voice-eq-bars {
  display: none;
}

.voice.is-playing .voice-play-btn:hover .pause-ic,
.voice-play-btn.active:hover .pause-ic,
.reciter-card.is-playing .reciter-play-btn:hover .pause-ic,
.reciter-play-btn.active:hover .pause-ic {
  display: block;
}

/* Reciter Marquee Ticker & Chips */
.reciter-rail:hover .reciter-line,
.reciter-rail.is-paused .reciter-line {
  animation-play-state: paused;
}

.reciter-chip {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  padding: 6px 20px 6px 6px;
  padding-inline-start: 6px;
  padding-inline-end: 20px;
  transition: transform .25s var(--easing), border-color .25s var(--easing), box-shadow .25s var(--easing), background .25s var(--easing), padding .25s var(--easing);
}

.reciter-chip:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--primary) 18%, transparent);
}

.reciter-chip:active {
  transform: scale(0.97);
}

.reciter-chip.is-playing {
  border-color: var(--primary) !important;
  background: var(--primary-tint) !important;
  box-shadow: 0 4px 16px color-mix(in srgb, var(--primary) 24%, transparent) !important;
}

/* Reciter Avatar & Play Overlay */
.reciter-av {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 1.5px solid var(--primary);
  background: var(--bg-alt);
}

.reciter-av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.reciter-av-play {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  opacity: 0;
  transition: opacity .2s var(--easing);
  pointer-events: none;
}

.reciter-chip:hover .reciter-av-play,
.reciter-chip:focus-visible .reciter-av-play,
.reciter-chip.is-playing .reciter-av-play {
  opacity: 1;
}

.reciter-av-play .icon {
  width: 15px;
  height: 15px;
}

.reciter-av-play .pause-ic {
  display: none;
}

.reciter-chip.is-playing .reciter-av-play .play-ic {
  display: none;
}

.reciter-chip.is-playing .reciter-av-play .pause-ic {
  display: block;
}

/* Reciter Chip Equalizer Wave */
.reciter-chip-wave {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
  width: 0;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  margin-inline-start: 0;
  transition: width .25s var(--easing), max-width .25s var(--easing), opacity .2s var(--easing), margin .25s var(--easing);
  pointer-events: none;
  flex-shrink: 0;
}

.reciter-chip.is-playing .reciter-chip-wave {
  width: 14px;
  max-width: 14px;
  opacity: 1;
  margin-inline-start: 8px;
}

.reciter-chip-wave span {
  width: 2.5px;
  background: var(--primary);
  border-radius: 1px;
  animation: eqBounce .7s ease-in-out infinite alternate;
}

.reciter-chip-wave span:nth-child(1) {
  height: 30%;
  animation-delay: 0s;
}

.reciter-chip-wave span:nth-child(2) {
  height: 100%;
  animation-delay: .18s;
}

.reciter-chip-wave span:nth-child(3) {
  height: 60%;
  animation-delay: .36s;
}

/* Reciter Card in Grid */
.reciter-card {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.reciter-card:active {
  transform: scale(0.985);
}

.reciter-card-av {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  border: 1.5px solid var(--primary);
  flex-shrink: 0;
  background: var(--bg-alt);
}

.reciter-card-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  opacity: 0;
  transition: opacity .2s var(--easing);
  pointer-events: none;
}

.reciter-card:hover .reciter-card-play-overlay,
.reciter-card:focus-visible .reciter-card-play-overlay,
.reciter-card.is-playing .reciter-card-play-overlay {
  opacity: 1;
}

.reciter-card-play-overlay .icon {
  width: 20px;
  height: 20px;
}

.reciter-card-play-overlay .pause-ic {
  display: none;
}

.reciter-card.is-playing .reciter-card-play-overlay .play-ic {
  display: none;
}

.reciter-card.is-playing .reciter-card-play-overlay .pause-ic {
  display: block;
}

.reciter-play-btn {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .2s var(--easing);
  flex-shrink: 0;
}

.reciter-card:hover .reciter-play-btn,
.reciter-play-btn:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.reciter-card.is-playing .reciter-play-btn,
.reciter-play-btn.active {
  background: var(--primary) !important;
  color: #ffffff !important;
  border-color: var(--primary) !important;
  box-shadow: 0 2px 10px color-mix(in srgb, var(--primary) 35%, transparent);
}

html[data-theme="dark"] .reciter-card.is-playing .reciter-play-btn,
html[data-theme="dark"] .reciter-play-btn.active {
  color: #0b1411 !important;
}

@keyframes eqBounce {
  0% {
    height: 20%;
  }

  50% {
    height: 100%;
  }

  100% {
    height: 35%;
  }
}

@media (max-width: 620px) {
  .voice {
    padding: 11px 13px;
    gap: 11px;
    min-height: 72px;
  }

  .voice-cover {
    width: 48px;
    height: 48px;
  }

  .voice-tx b {
    font-size: .88rem;
  }

  .voice-actions {
    gap: 6px;
  }

  .voice-play-btn {
    width: 38px;
    height: 38px;
    min-width: 38px;
  }

  .reciter-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Site Toast Notification
   ========================================================================== */
.site-toast {
  position: fixed;
  inset-inline-start: 50%;
  bottom: 84px;
  transform: translate(-50%, 20px);
  background: #18181B;
  color: #F4F4F5;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 10px 22px;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  z-index: 1050;
  opacity: 0;
  pointer-events: none;
  transition: transform .25s var(--ease-spring), opacity .25s var(--easing);
  text-align: center;
  max-width: 90vw;
  white-space: nowrap;
}

html[dir="rtl"] .site-toast {
  transform: translate(50%, 20px);
}

.site-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

html[dir="rtl"] .site-toast.show {
  transform: translate(50%, 0);
}

/* ==========================================================================
   Mobile layout pass
   Keep the narrow layout calm, readable, and easy to use with touch.
   ========================================================================== */
@media (max-width: 640px) {
  :root {
    --gutter: 16px;
    --section-y: 56px;
  }

  html {
    scroll-padding-top: 76px;
  }

  section {
    padding-block: var(--section-y);
  }

  .navbar {
    padding-block: 8px;
  }

  .nav-inner {
    min-height: 52px;
  }

  .section-head {
    margin-bottom: 30px;
  }

  .section-head h2,
  .themes-title {
    font-size: clamp(1.7rem, 8vw, 2.2rem);
    line-height: 1.2;
  }

  .section-head p,
  .themes-subtitle {
    font-size: .95rem;
    line-height: 1.7;
  }

  .hero {
    padding-block: 24px 64px;
  }

  .hero-title {
    font-size: clamp(2rem, 10vw, 2.55rem);
    line-height: 1.1;
  }

  .hero-sub {
    font-size: .95rem;
    line-height: 1.7;
  }

  .hero-ctas {
    gap: 10px;
  }

  .hero-ctas .btn {
    min-height: 50px;
  }

  #features,
  #showcase {
    padding-block: 56px;
  }

  .showcase-filters {
    gap: 8px;
    margin-block: 28px 32px;
    padding-inline: 2px;
  }

  .showcase-filter-btn {
    min-height: 42px;
    padding: 9px 15px;
  }

  .showcase-grid {
    gap: 12px;
    padding-inline: 2px;
  }

  .showcase-card {
    padding: 12px 9px 14px;
    border-radius: 20px;
  }

  .showcase-phone-mini {
    max-width: 142px;
    border-width: 4px;
    border-radius: 21px;
    margin-bottom: 10px;
  }

  .showcase-card-title {
    font-size: .84rem;
    line-height: 1.3;
  }

  .showcase-card-badge {
    gap: 4px;
    font-size: .68rem;
    padding: 4px 8px;
  }

  .reciter-controls {
    gap: 12px;
    margin-bottom: 20px;
  }

  .reciter-toolbar {
    gap: 10px;
  }

  .reciter-search-box {
    min-width: 0;
    width: 100%;
  }

  .reciter-search-input {
    min-height: 46px;
    font-size: .9rem;
  }

  .reciter-tabs {
    gap: 7px;
    margin-inline: -2px;
    padding: 2px 2px 7px;
    scroll-snap-type: x proximity;
  }

  .reciter-tab {
    min-height: 42px;
    padding: 8px 13px;
    scroll-snap-align: start;
  }

  .voice-list {
    gap: 10px;
  }

  .voice {
    min-height: 72px;
    gap: 10px;
    padding: 11px 12px;
    border-radius: 16px;
  }

  .voice-play-btn,
  .reciter-play-btn {
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
    padding: 6px 10px;
  }

  .voice-actions {
    gap: 6px;
  }

  .voice-tx b {
    line-height: 1.4;
  }

  .privacy-shout {
    font-size: clamp(2.15rem, 12vw, 3.1rem);
    line-height: 1.08;
  }

  .privacy-sub {
    font-size: .95rem;
    line-height: 1.7;
    margin-bottom: 26px;
  }

  .privacy-point,
  .card,
  .downloads-card {
    padding: 18px;
    border-radius: 20px;
  }

  .hadith-card {
    padding: 22px 18px;
    border-radius: 22px;
  }

  .hadith-footer {
    align-items: stretch;
  }

  .hadith-footer .chip,
  .hadith-share {
    justify-content: center;
    min-height: 44px;
  }

  .hadith-footer .chip {
    display: inline-flex;
  }

  .faq {
    gap: 8px;
  }

  .faq summary {
    gap: 10px;
    padding: 15px 16px;
  }

  .faq-body {
    padding-inline: 16px;
    line-height: 1.7;
  }

  .store-listing-card {
    padding: 18px;
    border-radius: 22px;
  }

  .store-listing-icon {
    width: 72px;
    height: 72px;
  }

  .store-badge {
    width: 100%;
    justify-content: center;
    min-height: 56px;
    padding-inline: 16px;
  }

  .footer-links {
    gap: 18px 14px;
  }

  .mobile-menu {
    padding-inline: var(--gutter);
  }
}

@media (max-width: 359px) {
  .showcase-grid {
    gap: 10px;
  }

  .showcase-card {
    padding-inline: 7px;
  }

  .showcase-phone-mini {
    max-width: 126px;
  }

  .showcase-card-title {
    font-size: .8rem;
  }

  .voice {
    padding-inline: 10px;
  }
}

@media (hover: none) and (pointer: coarse) {

  .showcase-card:hover,
  .js .showcase-card.reveal.in:hover,
  .voice:hover,
  .js .voice.reveal.in:hover {
    transform: none;
  }

  .showcase-card:hover .showcase-phone-mini,
  .showcase-card:focus-visible .showcase-phone-mini {
    transform: none;
  }
}

/* ==========================================================================
   Full AMOLED True Black (#000000) Mode System
   ========================================================================== */
html[data-amoled="true"],
html[data-theme="black"] {
  background-color: #000000 !important;
}

html[data-amoled="true"] body,
html[data-theme="black"] body {
  background-color: #000000 !important;
  color: #f4f4f5;
}

html[data-amoled="true"] .alt-bg,
html[data-theme="black"] .alt-bg {
  background: #000000 !important;
  background-color: #000000 !important;
}

html[data-amoled="true"] .navbar,
html[data-theme="black"] .navbar {
  background: linear-gradient(to bottom, #000000 65%, transparent) !important;
}

html[data-amoled="true"] .nav-inner,
html[data-theme="black"] .nav-inner {
  background: #000000 !important;
  border-color: #1a1a1a !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8) !important;
}

html[data-amoled="true"] .card,
html[data-theme="black"] .card,
html[data-amoled="true"] .edition-card,
html[data-theme="black"] .edition-card,
html[data-amoled="true"] .hadith-card,
html[data-theme="black"] .hadith-card,
html[data-amoled="true"] .store-listing-card,
html[data-theme="black"] .store-listing-card,
html[data-amoled="true"] .faq details,
html[data-theme="black"] .faq details,
html[data-amoled="true"] .widget-card,
html[data-theme="black"] .widget-card,
html[data-amoled="true"] .palette-panel,
html[data-theme="black"] .palette-panel {
  background: #050505 !important;
  border-color: #1a1a1a !important;
}

html[data-amoled="true"] .showcase-card,
html[data-theme="black"] .showcase-card {
  background: #050505 !important;
  border-color: #1a1a1a !important;
  box-shadow: none !important;
}

html[data-amoled="true"] .showcase-card::after,
html[data-theme="black"] .showcase-card::after {
  opacity: 0.12 !important;
}

html[data-amoled="true"] .phone-bezel,
html[data-theme="black"] .phone-bezel,
html[data-amoled="true"] .showcase-phone-mini,
html[data-theme="black"] .showcase-phone-mini {
  background: #000000 !important;
  border-color: #141414 !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.95) !important;
}

html[data-amoled="true"] .hero-glow,
html[data-theme="black"] .hero-glow {
  opacity: 0.12 !important;
}

html[data-amoled="true"] .footer,
html[data-theme="black"] .footer {
  background-color: #000000 !important;
  border-top: 1px solid #1a1a1a !important;
}

html[data-amoled="true"] .mobile-menu,
html[data-theme="black"] .mobile-menu {
  background-color: #000000 !important;
}

html[data-amoled="true"] .lang-menu,
html[data-theme="black"] .lang-menu {
  background-color: #080808 !important;
  border-color: #1a1a1a !important;
}

html[data-amoled="true"] .floating-audio-bar,
html[data-theme="black"] .floating-audio-bar {
  background-color: #050505 !important;
  border-color: #1a1a1a !important;
}

html[data-amoled="true"] .widget-strip-cell,
html[data-theme="black"] .widget-strip-cell {
  background: #000000 !important;
  border-color: #1a1a1a !important;
}

html[data-amoled="true"] .widget-strip-cell.is-next,
html[data-theme="black"] .widget-strip-cell.is-next {
  background: rgba(52, 211, 153, 0.12) !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 16px rgba(52, 211, 153, 0.25) !important;
}