/* ==========================================================================
   قُرآني — التصميم الرسمي المطابق لهوية التطبيق
   Light: Emerald #124c34 | Gold #ba8e30 | Cream #fbf9f3 | Ink #161c19
   Dark:  Emerald #2e8b57 | Gold #cda444 | Night #101714 | Ink #f5f2eb
   ========================================================================== */

:root {
  --green: #124c34;
  --green-strong: #0c3826;
  --green-soft: rgba(18, 76, 52, 0.1);
  --gold: #ba8e30;
  --gold-bright: #d7ab47;
  --gold-soft: rgba(186, 142, 48, 0.16);
  --surface: #fbf9f3;
  --surface-alt: #f2eee2;
  --panel: #ffffff;
  --panel-border: rgba(18, 76, 52, 0.14);
  --ink: #161c19;
  --muted: #55625c;
  --danger: #942828;
  --shadow-sm: 0 3px 12px rgba(18, 76, 52, 0.07);
  --shadow-md: 0 10px 30px rgba(18, 76, 52, 0.12);
  --shadow-lg: 0 18px 46px rgba(10, 42, 29, 0.18);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --font-sans: "Segoe UI", "Cairo", "Noto Naskh Arabic", Tahoma, Arial, sans-serif;
  --font-quran: "Amiri", "Traditional Arabic", "Scheherazade New", "Noto Naskh Arabic", serif;
  --font-scale: 1;
  --focus-ring: 0 0 0 3px #ffffff, 0 0 0 6px #ba8e30;
}

html[data-theme="dark"] {
  --green: #2e8b57;
  --green-strong: #1e623d;
  --green-soft: rgba(46, 139, 87, 0.18);
  --gold: #cda444;
  --gold-bright: #e5be5f;
  --gold-soft: rgba(205, 164, 68, 0.2);
  --surface: #101714;
  --surface-alt: #17201c;
  --panel: #1d2722;
  --panel-border: rgba(205, 164, 68, 0.22);
  --ink: #f5f2eb;
  --muted: #b0bdb6;
  --danger: #e26d6d;
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 20px 52px rgba(0, 0, 0, 0.6);
  --focus-ring: 0 0 0 3px #101714, 0 0 0 6px #e5be5f;
}

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

[hidden] {
  display: none !important;
}

h1, h2, h3, h4, .ayah-card, .item-card, .dash-card {
  scroll-margin-top: 24px;
}

html {
  font-size: calc(16px * var(--font-scale));
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--surface);
  background-image:
    radial-gradient(circle at 12% 8%, var(--gold-soft), transparent 36%),
    radial-gradient(circle at 88% 18%, var(--green-soft), transparent 40%);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -120px;
  right: 16px;
  z-index: 9999;
  background: var(--green);
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-decoration: none;
  border: 2px solid var(--gold);
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 12px;
  outline: none;
  box-shadow: var(--focus-ring);
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

a {
  color: var(--green);
  text-underline-offset: 4px;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: 1rem;
  color: inherit;
}

button {
  cursor: pointer;
}

.mt-sm {
  margin-top: 14px;
}

.mb-sm {
  margin-bottom: 14px;
}

/* Header top bar layout */
.top-header {
  position: relative;
  z-index: 900;
  background: var(--panel);
  border-bottom: 2px solid var(--panel-border);
  box-shadow: var(--shadow-sm);
}

.header-top-bar {
  max-width: 1320px;
  margin: 0 auto;
  padding: 10px 16px 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.header-primary-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.btn-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 8px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--green), var(--green-strong));
  color: #ffffff;
  font-weight: 800;
  text-decoration: none;
  border: 2px solid var(--gold);
  box-shadow: 0 4px 14px rgba(18, 76, 52, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-home:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 20px rgba(18, 76, 52, 0.32);
}

.btn-home[aria-current="page"] {
  background: linear-gradient(135deg, var(--gold), #a67c22);
  color: #101714;
  border-color: var(--green);
}

.home-icon {
  font-size: 1.2rem;
  line-height: 1;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface-alt);
  border: 1.5px solid var(--panel-border);
  color: var(--ink);
  font-weight: 700;
  transition: background 0.2s ease, transform 0.2s ease;
}

.btn-ghost:hover {
  background: var(--gold-soft);
  transform: translateY(-1px);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}

.brand-mark {
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-size: 1.18rem;
  color: var(--green);
}

.brand-sub {
  font-size: 0.72rem;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.header-links {
  max-width: 1320px;
  margin: 0 auto;
  padding: 2px 16px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.nav-pill {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 6px 13px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 0.92rem;
  white-space: nowrap;
  border: 1.5px solid transparent;
  transition: all 0.2s ease;
}

.nav-pill:hover {
  background: var(--green-soft);
  border-color: var(--panel-border);
}

.nav-pill[aria-current="page"] {
  background: var(--green);
  color: #ffffff;
  border-color: var(--gold);
}

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

.btn-icon-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  min-width: 44px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  border: 1.5px solid var(--panel-border);
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.btn-icon-label:hover {
  background: var(--gold-soft);
  border-color: var(--gold);
  transform: translateY(-1px);
}

.btn-settings-unified {
  background: var(--green-soft);
  border-color: rgba(18, 76, 52, 0.28);
}

.btn-settings-unified:hover {
  background: var(--green);
  color: #ffffff;
  border-color: var(--gold);
}

/* Search Bar */
.header-search-bar {
  position: relative;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 16px 10px;
}

.search-field-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  width: 100%;
  min-height: 46px;
  padding: 10px 18px 10px 48px;
  border-radius: 999px;
  border: 1.5px solid var(--panel-border);
  background: var(--surface);
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input:focus {
  border-color: var(--gold);
}

.search-clear-btn {
  position: absolute;
  left: 8px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--surface-alt);
  color: var(--ink);
  font-weight: 700;
}

.global-search-dropdown {
  position: absolute;
  top: calc(100% - 2px);
  right: 16px;
  left: 16px;
  max-height: 440px;
  overflow-y: auto;
  background: var(--panel);
  border: 2px solid var(--gold);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 12px;
  z-index: 950;
}

.search-hit-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink);
  text-align: right;
  cursor: pointer;
}

.search-hit-item:hover, .search-hit-item:focus {
  background: var(--green-soft);
  border-color: var(--gold);
}

/* ==========================================================================
   Main Container & Animations
   ========================================================================== */
.main-container {
  flex: 1 0 auto;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 20px 16px 130px;
}

.view-stage {
  animation: quraaniViewIn 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}

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

@keyframes quraaniGlow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(186, 142, 48, 0.28);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(186, 142, 48, 0);
  }
}

@keyframes eqPulse {
  0%, 100% { transform: scaleY(0.35); }
  50% { transform: scaleY(1); }
}

/* ==========================================================================
   Hero Live Radio Card & Dashboard Cards (Qurani Signature Look)
   ========================================================================== */
.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.page-title {
  margin: 0;
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  color: var(--green);
  font-weight: 800;
}

.page-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.bismillah-banner {
  text-align: center;
  font-family: var(--font-quran);
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  font-weight: 700;
  color: var(--gold);
  margin: 14px 0 18px;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.cairo-hero-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: 24px 22px;
  background: linear-gradient(135deg, var(--green) 0%, #093020 65%, #164933 100%);
  color: #ffffff;
  border: 2px solid var(--gold);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.cairo-hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 85% 20%, rgba(228, 190, 99, 0.22), transparent 45%);
  pointer-events: none;
}

.cairo-hero-info {
  position: relative;
  flex: 1 1 320px;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(228, 190, 99, 0.65);
  color: #fce5a6;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.eq-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}

.eq-bar {
  width: 3px;
  height: 100%;
  border-radius: 2px;
  background: #fce5a6;
  animation: eqPulse 0.9s ease-in-out infinite;
}

.eq-bar:nth-child(2) { animation-delay: 0.2s; }
.eq-bar:nth-child(3) { animation-delay: 0.4s; }

.cairo-hero-title {
  margin: 0 0 6px;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  font-weight: 800;
  color: #ffffff;
}

.cairo-hero-desc {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.98rem;
}

.cairo-hero-actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 22px;
  border-radius: 999px;
  border: 2px solid #f7dc8d;
  background: linear-gradient(135deg, #d7ab47, #b38424);
  color: #101714;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.btn-gold:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 20px;
  border-radius: 999px;
  border: 2px solid var(--gold);
  background: linear-gradient(135deg, var(--green), var(--green-strong));
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--panel-border);
  background: var(--panel);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.btn-secondary:hover {
  border-color: var(--gold);
  background: var(--gold-soft);
  transform: translateY(-1px);
}

/* Dashboard Stack & 2-Column Grid */
.section-heading {
  margin: 22px 0 12px;
  font-size: 1.25rem;
  color: var(--green);
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

.quick-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

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

.dash-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  min-height: 82px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: var(--panel);
  border: 1.5px solid var(--panel-border);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  text-align: right;
  text-decoration: none;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.dash-card:hover, .dash-card:focus-within {
  transform: translateY(-3px);
  border-color: var(--gold);
  box-shadow: var(--shadow-md);
}

.dash-card-accent {
  border-right: 5px solid var(--gold);
}

.dash-card-main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1 1 auto;
}

.dash-icon {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--green-soft), var(--gold-soft));
  border: 1.5px solid var(--panel-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--green);
}

.dash-texts {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.dash-title {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--ink);
}

.dash-card-trigger {
  display: block;
  text-decoration: none;
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  text-align: right;
  cursor: pointer;
}

.dash-card-trigger::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.dash-sub {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.dash-badge {
  flex: 0 0 auto;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--gold-soft);
  color: var(--ink);
  border: 1px solid rgba(186, 142, 48, 0.35);
}

/* ==========================================================================
   Panels, Lists, Filters, Cards, & Forms
   ========================================================================== */
.panel {
  background: var(--panel);
  border: 1.5px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}

.tabs-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.tab-btn {
  min-height: 44px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--panel);
  border: 1.5px solid var(--panel-border);
  color: var(--ink);
  font-weight: 700;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  border-color: var(--gold);
  background: var(--gold-soft);
}

.tab-btn[aria-selected="true"], .tab-btn.is-active {
  background: var(--green);
  color: #ffffff;
  border-color: var(--gold);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  align-items: end;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.field-label {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--green);
}

.field-hint {
  font-size: 0.84rem;
  color: var(--muted);
}

.field-error {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--danger);
}

.field-input, .field-select, .field-textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--panel-border);
  background: var(--surface);
  color: var(--ink);
  transition: border-color 0.2s ease;
}

.field-textarea {
  min-height: 110px;
  resize: vertical;
}

.field-input:focus, .field-select:focus, .field-textarea:focus {
  border-color: var(--gold);
}

.cards-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.item-card {
  position: relative;
  background: var(--panel);
  border: 1.5px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.item-card:hover, .item-card:focus-within {
  transform: translateY(-2px);
  border-color: var(--gold);
  box-shadow: var(--shadow-md);
}

.item-card-link {
  color: inherit;
  text-decoration: none;
  display: inline-block;
}

.item-card-link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.item-card-title {
  margin: 0;
  font-size: 1.06rem;
  font-weight: 800;
  color: var(--ink);
}

.item-card-meta {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.item-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.btn-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--panel-border);
  background: var(--surface-alt);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
}

.btn-sm:hover {
  border-color: var(--gold);
  background: var(--gold-soft);
}

.btn-sm-primary {
  background: var(--green);
  color: #ffffff;
  border-color: var(--gold);
}

.btn-sm-primary:hover {
  background: var(--green-strong);
  color: #ffffff;
}

/* Quran Mushaf Reading Canvas */
.mushaf-ayahs-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ayah-card {
  background: var(--panel);
  border: 1.5px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.ayah-card.is-playing {
  border-color: var(--gold);
  background: var(--gold-soft);
  animation: quraaniGlow 2.2s infinite;
}

.ayah-arabic {
  font-family: var(--font-quran);
  font-size: clamp(1.45rem, 2.8vw, 1.95rem);
  line-height: 2.15;
  color: var(--ink);
  margin: 0 0 10px;
}

.ayah-arabic.is-masked {
  filter: blur(8px);
  user-select: none;
}

.ayah-badge {
  display: inline-block;
  margin: 0;
  margin-inline-start: 8px;
  padding: 2px 10px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 800;
  line-height: 1.5;
  background: var(--green-soft);
  color: var(--green);
  border: 1px solid var(--panel-border);
}

.ayah-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--panel-border);
}

.ayah-page-info {
  font-size: 0.86rem;
  color: var(--muted);
  font-weight: 700;
}

.ayah-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.inline-drawer {
  margin-top: 12px;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  border-right: 4px solid var(--gold);
  white-space: pre-line;
}

/* Progress & Bars */
.progress-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 800;
}

.native-progress {
  width: 100%;
  height: 10px;
  accent-color: var(--gold);
}

/* ==========================================================================
   Full-Screen Audio Player (Matches Qurani Phone App) + Compact Inline Mode
   ========================================================================== */
.audio-dock {
  position: fixed;
  z-index: 980;
  background: linear-gradient(155deg, #0d3a27 0%, #092619 52%, #061810 100%);
  color: #ffffff;
}

.audio-dock.is-fullscreen {
  inset: 0;
  overflow-y: auto;
  padding: 20px 16px 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.audio-dock.is-fullscreen .audio-dock-inner {
  width: 100%;
  max-width: 720px;
  margin: auto;
  background: rgba(16, 62, 42, 0.72);
  border: 2px solid var(--gold);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.audio-dock:not(.is-fullscreen) {
  bottom: 12px;
  right: 12px;
  left: 12px;
  max-width: 980px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  border: 2px solid var(--gold);
  box-shadow: var(--shadow-lg);
  padding: 12px 18px;
}

.audio-dock:not(.is-fullscreen) .audio-dock-inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.audio-dock:not(.is-fullscreen) .player-disc-wrap,
.audio-dock:not(.is-fullscreen) .dock-movement-row,
.audio-dock:not(.is-fullscreen) .dock-options-row,
.audio-dock:not(.is-fullscreen) .dock-shortcuts-hint {
  display: none;
}

.dock-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dock-header-tag {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dock-mode-label {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--gold-bright);
}

.dock-badge {
  flex: 0 0 auto;
  padding: 3px 10px;
  border-radius: 999px;
  background: #b93838;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
}

.player-artwork-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}

.player-disc-wrap {
  width: 124px;
  height: 124px;
  border-radius: 50%;
  padding: 5px;
  background: linear-gradient(135deg, var(--gold-bright), #7c5812);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-disc-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

@keyframes quraaniSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.audio-dock.is-playing .player-disc-wrap {
  animation: quraaniSpin 26s linear infinite;
}

.dock-title {
  margin: 0;
  font-size: 1.38rem;
  font-weight: 800;
  color: #ffffff;
}

.audio-dock:not(.is-fullscreen) .dock-title {
  font-size: 1rem;
}

.dock-subtitle {
  margin: 0;
  font-size: 0.96rem;
  color: rgba(255, 255, 255, 0.86);
}

.dock-status-pill {
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 0.82rem;
  font-weight: 700;
  color: #f9e49e;
}

.dock-controls-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dock-transport-row,
.dock-movement-row,
.dock-options-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.dock-transport-row .dock-btn {
  flex: 1 1 110px;
  min-height: 52px;
  font-size: 1rem;
}

.dock-movement-row .dock-btn {
  flex: 1 1 100px;
  min-height: 46px;
}

.dock-options-row .dock-btn {
  flex: 1 1 125px;
  min-height: 44px;
  font-size: 0.88rem;
}

.dock-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 46px;
  min-width: 46px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.11);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.92rem;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.15s ease;
}

.dock-btn:hover:not(:disabled) {
  background: rgba(215, 171, 71, 0.32);
  border-color: var(--gold-bright);
  transform: translateY(-1px);
}

.dock-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.dock-btn-primary {
  background: var(--gold-bright);
  color: #101714;
  border-color: #f7dc8d;
  font-size: 1.08rem;
  font-weight: 800;
}

.dock-btn[aria-pressed="true"] {
  background: rgba(215, 171, 71, 0.35);
  border-color: var(--gold-bright);
  color: #fff5ce;
}

.dock-close-btn {
  background: rgba(185, 56, 56, 0.3);
  border-color: rgba(255, 180, 180, 0.55);
  color: #ffffff;
  padding: 8px 16px;
}

.dock-close-btn:hover {
  background: #b93838;
  border-color: #ffffff;
}

.dock-progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dock-seeker {
  width: 100%;
  min-height: 28px;
  accent-color: var(--gold-bright);
  cursor: pointer;
}

.dock-times {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
}

.dock-shortcuts-hint {
  margin: 4px 0 0;
  text-align: center;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.72);
}

/* ==========================================================================
   Context Menu (Apps Key / Shift+F10 / Right-Click / Long-Press) & Modals
   ========================================================================== */
.context-menu {
  position: fixed;
  z-index: 1100;
  min-width: 230px;
  max-width: 320px;
  background: var(--panel);
  border: 2px solid var(--gold);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  animation: quraaniViewIn 0.14s ease-out both;
}

.context-menu[hidden], .modal-backdrop[hidden], .audio-dock[hidden], .global-search-dropdown[hidden] {
  display: none !important;
}

.context-menu-item {
  width: 100%;
  min-height: 44px;
  padding: 8px 14px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink);
  text-align: right;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.context-menu-item:hover, .context-menu-item:focus {
  background: var(--green);
  color: #ffffff;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1050;
  background: rgba(8, 24, 17, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-dialog {
  width: 100%;
  max-width: 660px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 2px solid var(--gold);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--green);
  color: #ffffff;
  border-bottom: 2px solid var(--gold);
}

.modal-title {
  margin: 0;
  font-size: 1.2rem;
}

.btn-icon-close {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  background: transparent;
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 800;
}

.modal-body {
  padding: 18px;
  overflow-y: auto;
  flex: 1 1 auto;
}

.modal-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--panel-border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* About / Intro Card on Home */
.about-hero-card {
  background: var(--panel);
  border: 1.5px solid var(--panel-border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.about-grid-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(240px, 1fr);
  gap: 20px;
  align-items: center;
}

.about-media-col {
  margin: 0;
  display: flex;
  justify-content: center;
}

.about-banner-img {
  width: 100%;
  max-width: 420px;
  height: auto;
  border-radius: var(--radius-md);
  border: 2px solid var(--gold);
  box-shadow: var(--shadow-md);
}

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

.about-hero-title {
  margin: 0 0 8px;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--green);
}

.about-hero-lead {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.75;
}

.about-highlights {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.about-highlights li {
  background: var(--surface);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 0.92rem;
  color: var(--ink);
}

/* Footer */
.site-footer {
  background: var(--panel);
  border-top: 2px solid var(--panel-border);
  padding: 22px 16px 34px;
  margin-top: auto;
}

body.has-audio-dock .site-footer {
  padding-bottom: 120px;
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.footer-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-brand {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-copyright {
  margin: 0;
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 700;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-nav a {
  font-weight: 700;
  text-decoration: none;
}

.footer-nav a:hover {
  text-decoration: underline;
}

/* Status banner & Pagination */
.status-alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--gold-soft);
  border-right: 4px solid var(--gold);
  margin: 10px 0;
  font-weight: 700;
}

.status-error {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: rgba(148, 40, 40, 0.12);
  border-right: 4px solid var(--danger);
  color: var(--danger);
  margin: 10px 0;
  font-weight: 700;
}

.pagination-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

/* Responsive */
@media (max-width: 820px) {
  .dash-grid {
    grid-template-columns: 1fr;
  }
  .hide-sm {
    display: none;
  }
  .header-top-bar {
    gap: 8px;
  }
  .btn-icon-label {
    padding: 8px 10px;
    font-size: 0.85rem;
  }
}

/* Mandatory Accessibility Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
