@import "https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;800&display=swap";
@import "https://fonts.googleapis.com/css2?family=Amiri:wght@700&display=swap";
:root {
  --primary:#1e3a8a;
  --secondary:#2563eb;
  --accent:#facc15;
  --accent2:#f472b6;
  --light-bg:#f9f9f9;
  --dark-bg:#0f172a;
  --text-light:#222;
  --text-dark:#f5f5f5;
  --border-light:#e5e7eb;
  --border-dark:#334155;
  --success:#22c55e;
  --error:#ef4444;
  --shadow:0 8px 20px rgba(0,0,0,.07);
  --radius:10px;
  --transition:.3s cubic-bezier(.4,0,.2,1);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family:
    Cairo,
    Amiri,
    serif;
  line-height: 1.7;
  background: var(--light-bg);
  color: var(--text-light);
  transition: background var(--transition), color var(--transition);
}
.dark-theme {
  background: var(--dark-bg);
  color: var(--text-dark);
}
nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  padding: 12px 20px;
  background: var(--light-bg);
  border-bottom: 1px solid var(--border-light);
  box-shadow: 0 2px 8px #1e3a8a0a;
}
.nav-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.nav-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.nav-center {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}
.nav-login {
  background:
    linear-gradient(
      135deg,
      var(--secondary),
      var(--primary));
  box-shadow: 0 4px 14px #2563eb40;
}
.dark-theme nav {
  background: #1e293b;
  border-color: var(--border-dark);
}
nav a {
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}
.dark-theme nav a {
  color: var(--text-dark);
}
nav a.nav-link {
  padding: 6px 12px;
  border-radius: 6px;
  transition: background var(--transition), color var(--transition);
}
nav a.nav-link.active {
  background: var(--border-light);
  color: var(--text-light);
}
.dark-theme nav a.nav-link.active {
  background: var(--border-dark);
  color: var(--text-dark);
}
.theme-toggle {
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  padding: 6px 10px;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
}
.dark-theme .theme-toggle {
  color: var(--text-dark);
}
.hero {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: url(/assets/hero-light.jpg) center/cover no-repeat;
  padding: 40px 16px;
}
.dark-theme .hero {
  background: url(/assets/hero-dark.jpg) center/cover no-repeat;
}
.hero-content {
  max-width: 760px;
  padding: 22px;
  border-radius: 16px;
  background: #00000059;
  color: #fff;
  box-shadow: 0 18px 45px #0000002e;
}
.hero-content.overlay {
  box-shadow: var(--shadow);
}
.hero-title {
  font-size: clamp(2rem, 4.4vw, 2.9rem);
  margin: 0;
  font-weight: 800;
  letter-spacing: .02em;
  font-family:
    Cairo,
    Amiri,
    serif;
  text-transform: none;
  animation: floatIn 1s ease forwards;
}
.fade-slide {
  animation: fadeSlide .6s ease forwards;
}
@keyframes fadeSlide {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes floatIn {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.container {
  width: 95%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 0;
}
.container.narrow {
  max-width: 840px;
}
.grid {
  display: grid;
  gap: 24px;
  margin-top: 20px;
}
.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.card {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.dark-theme .card {
  background: #1e293b;
  border-color: var(--border-dark);
  color: var(--text-dark);
}
form {
  background: #fff;
  padding: 22px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}
.dark-theme form {
  background: #1e293b;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover {
  background: var(--secondary);
}
.btn.ghost {
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
}
.btn.ghost:hover {
  background: var(--primary);
  color: #fff;
}
.dark-theme .btn.ghost {
  border-color: var(--text-dark);
  color: var(--text-dark);
}
input,
select,
textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  font-family: inherit;
  font-size: 1rem;
  max-width: 420px;
}
form .two-col input,
form .two-col select {
  max-width: 100%;
}
.auth-form input,
.auth-form select {
  max-width: 340px;
}
.auth-form .two-col {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}
.agree-box {
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: nowrap;
}
.agree-text {
  white-space: nowrap;
}
.auth-form .btn.ghost {
  margin-top: 6px;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent2);
}
.dark-theme input,
.dark-theme select,
.dark-theme textarea {
  background: #0f172a;
  border-color: var(--border-dark);
  color: var(--text-dark);
}
input,
select,
textarea {
  color: inherit;
}
.dark-theme .card,
.dark-theme .glass,
.dark-theme .location-card {
  color: var(--text-dark);
}
.success,
.error {
  padding: 12px;
  border-radius: 6px;
  font-weight: 700;
  margin-bottom: 14px;
  border: 1px solid transparent;
}
.success {
  background: #dcfce7;
  border-color: var(--success);
  color: #065f46;
}
.error {
  background: #fee2e2;
  border-color: var(--error);
  color: #991b1b;
}
.eyebrow {
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: .8rem;
  color: var(--accent2);
}
.lead {
  font-size: 1.05rem;
  max-width: 720px;
  margin: 12px auto 18px;
}
.cta-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 14px;
}
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 12px;
}
.pill {
  background: var(--border-light);
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: .9rem;
}
.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.password-rules {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 6px;
}
.rule {
  color: #6b7280;
  font-size: .95rem;
}
.rule.ok {
  color: var(--success);
  font-weight: 700;
}
.password-hint {
  margin-top: 6px;
  color: #b91c1c;
  font-size: .95rem;
  line-height: 1.4;
}
.user-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
}
.user-table th,
.user-table td {
  padding: 10px;
  border-bottom: 1px solid var(--border-light);
  text-align: left;
}
.user-table tbody tr:hover {
  background: #facc151a;
}
.status-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 700;
  font-size: .85rem;
}
.chip-approved {
  background: #d1fae5;
  color: #065f46;
}
.chip-pending {
  background: #fef3c7;
  color: #92400e;
}
.chip-rejected {
  background: #fee2e2;
  color: #991b1b;
}
.doc-thumb {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
}
.doc-thumb.small {
  height: 100px;
}
.doc-thumb.tiny {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
}
.doc-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.doc-card.thumb-sm .doc-thumb {
  height: 140px;
}
.doc-card.list {
  flex-direction: row;
  align-items: flex-start;
}
.doc-card.list .doc-body {
  flex: 1;
}
.doc-card.list h3 {
  margin-top: 0;
}
.doc-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.view-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.doc-grid {
  display: grid;
  gap: 12px;
}
.doc-grid.thumb-lg {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.doc-grid.thumb-sm {
  grid-template-columns: repeat(8, minmax(0, 1fr));
}
.library-explorer {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
  align-items: start;
}
.library-sidebar {
  background: var(--light-bg);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 12px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 80px;
  max-height: 70vh;
  overflow: auto;
}
.dark-theme .library-sidebar {
  background: #1e293b;
  border-color: var(--border-dark);
}
.sidebar-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.sidebar-filter input {
  width: 100%;
}
.folder-tree {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 10px;
}
.folder-row {
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  display: block;
  white-space: nowrap;
}
.folder-row.active {
  background: var(--border-light);
  font-weight: 700;
}
.dark-theme .folder-row.active {
  background: var(--border-dark);
}
.library-content {
  background: var(--light-bg);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 12px;
  box-shadow: var(--shadow);
}
.dark-theme .library-content {
  background: #0f172a;
  border-color: var(--border-dark);
}
.explorer-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 8px 0 12px;
}
.explorer-table-wrap {
  overflow: auto;
}
.explorer-table {
  width: 100%;
  border-collapse: collapse;
}
.explorer-table th,
.explorer-table td {
  padding: 10px;
  border-bottom: 1px solid var(--border-light);
  text-align: left;
}
.dark-theme .explorer-table th,
.dark-theme .explorer-table td {
  border-color: var(--border-dark);
}
.dark-theme .folder-row {
  color: var(--text-dark);
}
.breadcrumb {
  font-size: .9rem;
}
.search {
  max-width: 320px;
  padding: 10px 12px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
}
.dark-theme .search {
  background: #0f172a;
  border-color: var(--border-dark);
  color: var(--text-dark);
}
.action-cell {
  position: relative;
}
.action-dot {
  border: none;
  background: transparent;
  font-size: 1.2rem;
  cursor: pointer;
}
.action-menu {
  position: absolute;
  right: 0;
  top: 120%;
  background: var(--light-bg);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-width: 140px;
  z-index: 20;
}
.action-menu button,
.action-menu a {
  border: none;
  background: transparent;
  padding: 8px 12px;
  text-align: left;
  width: 100%;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
}
.action-menu button:hover,
.action-menu a:hover {
  background: var(--border-light);
}
.dark-theme .action-menu {
  background: #1e293b;
  border-color: var(--border-dark);
}
.library-cards {
  display: grid;
  gap: 12px;
}
.library-cards.large {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.library-cards.small {
  grid-template-columns: repeat(8, minmax(0, 1fr));
}
@media (max-width: 1200px) {
  .library-cards.small {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .library-cards.large {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 900px) {
  .library-cards.small {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .library-cards.large {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .library-cards.small,
  .library-cards.large {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.library-card {
  padding: 0;
  overflow: visible;
}
.card-thumb {
  height: 140px;
  background-size: cover;
  background-position: center;
  position: relative;
}
.library-card.thumb-small .card-thumb {
  height: 80px;
}
.library-card.thumb-large .card-thumb {
  height: 140px;
}
.folder-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  background: var(--border-light);
}
.dark-theme .folder-thumb {
  background: var(--border-dark);
}
.card-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.card-title {
  font-weight: 800;
}
.pill.ghost {
  background: var(--border-light);
}
.dark-theme .pill.ghost {
  background: var(--border-dark);
}
.profile-top {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 16px;
  align-items: start;
}
.avatar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.avatar-wrap img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-light);
  box-shadow: var(--shadow);
}
.profile-main {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.stacked {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.context-menu {
  position: fixed;
  background: var(--light-bg);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  box-shadow: var(--shadow);
  z-index: 1000;
  min-width: 160px;
}
.context-item {
  padding: 10px 14px;
  cursor: pointer;
}
.context-item:hover {
  background: var(--border-light);
}
.dark-theme .context-menu {
  background: #1e293b;
  border-color: var(--border-dark);
}
.btn-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.modal-popup {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: #0009;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 50;
}
.modal-content {
  background: var(--light-bg);
  color: var(--text-light);
  padding: 20px;
  border-radius: 10px;
  width: 100%;
  max-width: 900px;
  max-height: 85vh;
  overflow: auto;
  position: relative;
}
.modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  border: none;
  background: transparent;
  font-size: 1.2rem;
  cursor: pointer;
}
.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 12px 0 16px;
}
.filters label {
  font-weight: 700;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.checkbox-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 8px;
}
.quran-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
}
.player {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 0;
}
.player-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.sticky-player {
  position: sticky;
  top: 0;
  background: var(--light-bg);
  padding: 12px 16px;
  border-radius: 12px;
  box-shadow: 0 4px 14px #0000001a;
  z-index: 30;
}
.dark-theme .sticky-player {
  background: #1e293b;
  color: var(--text-dark);
  border: 1px solid var(--border-dark);
}
.link-btn {
  background: transparent;
  border: none;
  color: var(--secondary);
  cursor: pointer;
  padding: 0;
  font: inherit;
}
.link-btn:hover {
  text-decoration: underline;
}
.progress {
  background: var(--border-light);
  height: 6px;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}
.progress-bar {
  background: var(--secondary);
  height: 100%;
  width: 0;
  transition: width .2s ease;
}
.progress-time {
  display: flex;
  justify-content: space-between;
  font-size: .85rem;
  color: #6b7280;
  margin-top: 4px;
}
.ayah {
  border: 1px solid var(--border-light);
  padding: 14px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  background: inherit;
}
.dark-theme .ayah {
  border-color: var(--border-dark);
}
.ayah.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px #facc1566;
}
.ayah-num {
  font-weight: 800;
  color: var(--secondary);
}
.ayah-text {
  font-size: 1.15rem;
  font-family: Amiri, serif;
  margin: 6px 0;
}
.ayah-translit {
  color: #6b7280;
  font-style: italic;
}
.bismillah-inline {
  font-family: Amiri, serif;
  font-size: 1.15rem;
  color: var(--secondary);
  margin: 4px 0 2px;
  text-align: center;
}
.dark-theme .bismillah-inline {
  color: #cbd5f5;
}
.footnote-bar {
  position: sticky;
  bottom: 0;
  background: var(--light-bg);
  padding: 10px;
  border-top: 1px solid var(--border-light);
  box-shadow: 0 -4px 12px #0000000f;
  z-index: 20;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.footnote-chip {
  background: var(--border-light);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: .9rem;
}
.dark-theme .footnote-bar {
  background: #0f172a;
  border-color: var(--border-dark);
}
.dark-theme .footnote-chip {
  background: var(--border-dark);
}
.asma-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px #facc1566;
  animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
  to {
    transform: translateY(0);
  }
}
.site-footer {
  margin-top: auto;
  padding: 20px;
  text-align: center;
  background: var(--primary);
  color: #fff;
}
.prayer-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.location-card {
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 14px;
  box-shadow: var(--shadow);
  background: var(--light-bg);
}
.dark-theme .location-card {
  background: #1e293b;
  border-color: var(--border-dark);
  color: var(--text-dark);
}
.location-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.location-text {
  font-weight: 700;
}
.prayer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
.glass {
  background: #ffffffe6;
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}
.dark-theme .prayer-row span,
.dark-theme .prayer-row strong,
.dark-theme .location-text {
  color: var(--text-dark);
}
.dark-theme .muted {
  color: #cbd5e1;
}
.prayer-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.prayer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-light);
  padding: 6px 0;
}
.prayer-row:last-child {
  border-bottom: none;
}
.prayer-row.active {
  background: #2563eb14;
  border-radius: 8px;
  padding: 8px;
}
.dark-theme .prayer-row.active {
  background: #2563eb2e;
}
.quran-controls-toggle {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}
.quran-controls-drawer {
  margin-top: 8px;
  padding: 12px;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  background: var(--light-bg);
  box-shadow: var(--shadow);
}
.dark-theme .quran-controls-drawer {
  background: #1e293b;
  border-color: var(--border-dark);
}
.current-time {
  font-weight: 800;
  font-size: 1.1rem;
}
.folder-tree {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.folder-node {
  padding: 8px 0;
  border-left: 2px solid var(--border-light);
}
.dark-theme .folder-node {
  border-color: var(--border-dark);
}
.folder-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-left: 8px;
}
@media (max-width:640px) {
  .hero {
    padding: 24px 8px;
  }
  .hero-content {
    padding: 18px;
  }
  .cta-row {
    flex-direction: column;
  }
  .agree-box {
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .agree-text {
    white-space: normal;
  }
}
@media (max-width:720px) {
  nav {
    padding: 8px 12px;
  }
  .nav-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
  }
  .nav-left,
  .nav-right {
    flex: 0 0 auto;
  }
  .nav-center {
    flex: 1 1 auto;
    justify-content: flex-start;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
  }
  .nav-center::-webkit-scrollbar {
    height: 0;
  }
  .nav-center a {
    flex: 0 0 auto;
  }
}
@media (max-width:720px) {
  nav {
    flex-wrap: nowrap;
    overflow: hidden;
  }
  .nav-bar {
    flex-wrap: nowrap;
  }
  .nav-left,
  .nav-center,
  .nav-right {
    flex-wrap: nowrap;
    min-width: 0;
  }
  .nav-left,
  .nav-left *,
  .nav-right,
  .nav-right * {
    white-space: nowrap;
  }
}
.player-top-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.player-top-row audio {
  flex: 1 1 auto;
  min-width: 0;
}
.player-toggle-btn {
  padding: 6px 10px;
  font-size: 1rem;
  line-height: 1;
  min-width: 36px;
}
@media (max-width:720px) {
  .player-top-row {
    gap: 6px;
  }
  .player-toggle-btn {
    padding: 6px 8px;
  }
}
nav.nav-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background:
    linear-gradient(
      90deg,
      #eff6ff,
      #fef3c7);
  border-bottom: 1px solid rgba(15, 23, 42, .08);
  backdrop-filter: blur(6px);
}
.dark-theme nav.nav-bar {
  background:
    linear-gradient(
      90deg,
      #0f172a,
      #1e293b);
  border-color: var(--border-dark);
}
.nav-left {
  align-items: center;
  gap: 10px;
}
.nav-brand {
  font-weight: 800;
  letter-spacing: .02em;
  color: var(--primary);
}
.nav-mobile-toggle {
  display: none;
  border: 1px solid var(--primary);
  background: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 700;
}
.dark-theme .nav-mobile-toggle {
  background: #0f172a;
  border-color: var(--border-dark);
  color: var(--text-dark);
}
.nav-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  background:
    linear-gradient(
      135deg,
      #2563eb,
      #0ea5e9);
  color: #fff;
  box-shadow: 0 6px 16px rgba(37, 99, 235, .25);
}
.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}
.nav-logout {
  padding: 8px 12px;
}
@media (max-width:820px) {
  .nav-bar {
    flex-wrap: wrap;
  }
  .nav-mobile-toggle {
    display: inline-flex;
  }
  .nav-center {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 6px;
    padding: 8px 0;
  }
  .nav-center.open {
    display: flex;
  }
  .nav-right {
    gap: 8px;
  }
  .nav-logout {
    display: inline-flex;
    padding: 6px 10px;
    font-size: .9rem;
  }
}
.library-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.library-actions .btn {
  border-radius: 999px;
}
.library-explorer {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
  padding: 12px;
  border-radius: 16px;
  background:
    linear-gradient(
      135deg,
      #f0f9ff,
      #fef9c3);
}
.dark-theme .library-explorer {
  background:
    linear-gradient(
      135deg,
      #0f172a,
      #1e293b);
}
.library-content {
  background: rgba(255, 255, 255, .9);
  border-radius: 12px;
  border: 1px solid var(--border-light);
}
.dark-theme .library-content {
  background: #0f172a;
  border-color: var(--border-dark);
}
.library-sidebar {
  border-radius: 12px;
  transition: transform .3s ease, opacity .3s ease;
}
.library-explorer.sidebar-collapsed .library-sidebar {
  display: none;
}
.library-backdrop {
  display: none;
}
@media (max-width:900px) {
  .library-explorer {
    grid-template-columns: 1fr;
  }
  .library-sidebar {
    position: fixed;
    left: 0;
    top: 64px;
    bottom: 0;
    width: 85%;
    max-width: 320px;
    transform: translateX(-110%);
    z-index: 90;
  }
  .library-sidebar.open {
    transform: translateX(0);
  }
  .library-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, .35);
    z-index: 80;
  }
}
.explorer-table th {
  text-transform: uppercase;
  font-size: .75rem;
  letter-spacing: .08em;
  color: #64748b;
}
.explorer-table tbody tr:hover {
  background: #e0f2fe;
}
.dark-theme .explorer-table tbody tr:hover {
  background: #1e293b;
}
.folder-row {
  font-weight: 600;
}
.folder-row:hover {
  background: #e0f2fe;
}
.dark-theme .folder-row:hover {
  background: #1e293b;
}
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.admin-actions .btn {
  border-radius: 999px;
}
.user-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin: 12px 0 24px;
}
.user-card {
  background:
    linear-gradient(
      135deg,
      #ffffff,
      #f0f9ff);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--shadow);
}
.dark-theme .user-card {
  background: #0f172a;
  border-color: var(--border-dark);
}
.user-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.user-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-light);
}
.user-badges {
  margin-left: auto;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.chip-role {
  background: #e0f2fe;
  color: #0369a1;
}
.dark-theme .chip-role {
  background: #1e293b;
  color: #93c5fd;
}
.user-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.user-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.btn.danger {
  background: #ef4444;
  color: #fff;
}
.btn.danger:hover {
  background: #dc2626;
}
.modal-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.player-controls-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.icon-btn {
  border: 1px solid var(--primary);
  background: #fff;
  color: var(--primary);
  border-radius: 8px;
  padding: 8px 10px;
  min-width: 40px;
  font-weight: 800;
  cursor: pointer;
}
.icon-btn.active {
  background: var(--primary);
  color: #fff;
}
.dark-theme .icon-btn {
  background: #0f172a;
  border-color: var(--border-dark);
  color: var(--text-dark);
}
.translation-label {
  display: block;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 4px;
}
.sticky-player {
  top: 86px;
  z-index: 60;
}
.quran-filters {
  gap: 8px;
  margin: 8px 0 12px;
}
.quran-filters label {
  gap: 4px;
}
.quran-filters select {
  padding: 8px 10px;
  font-size: .95rem;
}
.sticky-filters {
  position: sticky;
  top: 72px;
  z-index: 50;
  background: var(--light-bg);
  padding: 10px 12px;
  border-radius: 12px;
  box-shadow: 0 4px 14px #00000012;
}
.dark-theme .sticky-filters {
  background: #0f172a;
  border: 1px solid var(--border-dark);
}
@media (max-width:900px) {
  .library-explorer {
    position: relative;
    overflow: hidden;
  }
  .library-sidebar {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 85%;
    max-width: 320px;
  }
  .library-backdrop {
    position: absolute;
    inset: 0;
  }
}
.quran-controls-drawer {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.player-controls-row.primary-controls {
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}
.player-controls-row.primary-controls::-webkit-scrollbar {
  height: 6px;
}
.player-controls-row.primary-controls::-webkit-scrollbar-thumb {
  background: rgba(30, 58, 138, .2);
  border-radius: 999px;
}
.player-controls-row.primary-controls .icon-btn {
  flex: 0 0 auto;
  min-width: 36px;
  padding: 6px 8px;
}
.player-controls-row-secondary {
  align-items: center;
  gap: 10px;
}
.player-controls-row-secondary .progress.compact {
  flex: 1 1 auto;
  min-width: 160px;
}
.icon-cluster {
  display: flex;
  gap: 8px;
  margin-left: auto;
}
.progress.compact {
  height: 6px;
}
.progress.compact .progress-time {
  font-size: .75rem;
  margin-top: 2px;
}
.icon-btn.subtle {
  border-color: var(--border-light);
  background: transparent;
  color: var(--text-light);
  min-width: 28px;
  padding: 4px 6px;
  font-weight: 700;
}
.dark-theme .icon-btn.subtle {
  border-color: var(--border-dark);
  color: var(--text-dark);
}
.drawer {
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 12px;
  background: var(--light-bg);
  box-shadow: var(--shadow);
  margin: 12px 0;
}
.dark-theme .drawer {
  background: #1e293b;
  border-color: var(--border-dark);
}
.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.drawer-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.drawer-section {
  margin-top: 12px;
}
.drawer-title {
  font-weight: 800;
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 6px;
}
.drawer-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.drawer-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  background: #ffffffb3;
}
.dark-theme .drawer-item {
  background: #0f172a;
  border-color: var(--border-dark);
}
.drawer-link {
  background: transparent;
  border: none;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
  flex: 1;
}
.drawer-link:hover {
  text-decoration: underline;
}
.modal-popup {
  z-index: 200;
}
.sticky-filters {
  z-index: 70;
}
.sticky-player {
  top: 120px;
  z-index: 60;
}
@media (max-width:720px) {
  .quran-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .quran-filters label {
    font-size: .85rem;
  }
  .quran-filters select {
    padding: 6px 8px;
    font-size: .9rem;
  }
  .sticky-filters {
    top: 66px;
    padding: 8px 10px;
  }
  .sticky-player {
    top: 132px;
  }
}
:root {
  --nav-height:72px;
  --quran-filters-height:52px;
  --quran-sticky-gap:10px;
  --quran-sticky-offset:140px;
}
.sticky-filters {
  position: sticky;
  top: calc(var(--nav-height) + var(--quran-sticky-gap));
  z-index: 58;
  background: var(--light-bg);
  padding: 8px 12px;
  border-radius: 12px;
  box-shadow: 0 6px 18px #00000014;
}
.dark-theme .sticky-filters {
  background: #1e293b;
  border: 1px solid var(--border-dark);
}
.sticky-player {
  top: var(--quran-sticky-offset);
  z-index: 57;
}
.quran-density-compact .quran-filters select {
  padding: 6px 8px;
  font-size: .85rem;
}
.quran-density-compact .quran-filters label {
  gap: 3px;
}
.quran-density-compact .player {
  gap: 6px;
}
.quran-density-compact .quran-controls-drawer {
  padding: 8px;
}
.quran-density-compact .player-controls-row {
  gap: 6px;
}
.quran-density-compact .icon-btn {
  padding: 6px 8px;
  font-size: .9rem;
}
.quran-density-compact .drawer-item {
  gap: 6px;
}
.floating-player {
  position: fixed !important;
  right: auto;
  bottom: auto;
  z-index: 80;
  max-width: calc(100% - 24px);
  box-shadow: 0 18px 40px #00000026;
}
.floating-player .quran-controls-drawer {
  max-height: 40vh;
  overflow: auto;
}
.quran-drawer .drawer-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.drawer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}
.drawer-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.drawer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.bookmark-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
  color: #1f2937;
  background: #fde68a;
}
.bookmark-tag-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
}
.bookmark-note {
  font-size: .85rem;
  color: #4b5563;
}
.dark-theme .bookmark-note {
  color: #cbd5e1;
}
.bookmark-editor {
  margin-top: 8px;
  width: 100%;
  display: grid;
  gap: 8px;
}
.bookmark-editor textarea {
  min-height: 70px;
  max-width: 100%;
}
.move-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.move-grid .icon-btn {
  justify-content: center;
}
.ayah.bookmarked {
  border-color: var(--bookmark-color,var(--accent));
  box-shadow: 0 0 0 2px var(--bookmark-color,var(--accent));
}
.quran-density-compact .quran-grid {
  gap: 10px;
}
.quran-density-compact .ayah {
  padding: 10px;
}
.player-controls-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.player-controls-row .icon-btn {
  flex: 0 0 auto;
}
.quran-controls-drawer {
  overflow: hidden;
}
.quran-controls-drawer .player-controls-row-secondary {
  justify-content: space-between;
}
.quran-controls-drawer .progress.compact {
  min-width: 140px;
}
@media (max-width:720px) {
  .quran-controls-drawer {
    overflow: auto;
  }
  .player-controls-row {
    gap: 6px;
  }
  .player-controls-row-secondary {
    flex-direction: column;
    align-items: flex-start;
  }
}
.quran-grid.dir-rtl {
  direction: rtl;
}
.quran-grid.dir-rtl .ayah {
  direction: ltr;
}
.quran-grid.dir-rtl .ayah .ayah-text,
.quran-grid.dir-rtl .ayah .bismillah-inline {
  direction: rtl;
  text-align: right;
}
.prayer-settings {
  margin-top: 12px;
}
.prayer-settings .alarm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.prayer-settings .alarm-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--border-light);
}
.dark-theme .prayer-settings .alarm-grid label {
  background: var(--border-dark);
}
.prayer-settings .alarm-note {
  font-size: .85rem;
  color: #6b7280;
}
.dark-theme .prayer-settings .alarm-note {
  color: #cbd5e1;
}
.prayer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.prayer-settings-btn {
  min-width: 40px;
  justify-content: center;
}
.prayer-settings-modal {
  max-width: 720px;
}
.prayer-settings-modal h4 {
  margin: 0;
  font-size: 1rem;
}
.prayer-settings-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}
.prayer-settings-section + .prayer-settings-section {
  border-top: 1px solid var(--border-light);
  padding-top: 12px;
}
.dark-theme .prayer-settings-section + .prayer-settings-section {
  border-color: var(--border-dark);
}
.permission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}
.permission-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.permission-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--border-light);
  font-weight: 700;
  font-size: .85rem;
}
.permission-chip.ok {
  background: #dcfce7;
  color: #065f46;
}
.permission-chip.warn {
  background: #fef3c7;
  color: #92400e;
}
.permission-chip.bad {
  background: #fee2e2;
  color: #991b1b;
}
.dark-theme .permission-chip {
  background: var(--border-dark);
  color: var(--text-dark);
}
.dark-theme .permission-chip.ok {
  background: #14532d;
  color: #dcfce7;
}
.dark-theme .permission-chip.warn {
  background: #7c2d12;
  color: #fef3c7;
}
.dark-theme .permission-chip.bad {
  background: #7f1d1d;
  color: #fee2e2;
}
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.setting-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
}
.dark-theme .setting-card {
  background: #1e293b;
  border-color: var(--border-dark);
}
.setting-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.toggle-pill {
  border: 1px solid var(--primary);
  background: transparent;
  color: var(--primary);
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 800;
  min-width: 72px;
  cursor: pointer;
}
.toggle-pill.on {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 6px 14px rgba(37, 99, 235, .3);
}
.dark-theme .toggle-pill {
  border-color: var(--text-dark);
  color: var(--text-dark);
}
.dark-theme .toggle-pill.on {
  background: #0ea5e9;
  border-color: #0ea5e9;
  color: #fff;
}
.prayer-chip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}
.prayer-chip {
  border: 1px solid var(--border-light);
  background: var(--light-bg);
  color: var(--text-light);
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
}
.prayer-chip.on {
  border-color: var(--secondary);
  background:
    linear-gradient(
      135deg,
      rgba(37, 99, 235, .15),
      rgba(14, 165, 233, .2));
  color: var(--primary);
}
.dark-theme .prayer-chip {
  background: #0f172a;
  border-color: var(--border-dark);
  color: var(--text-dark);
}
.dark-theme .prayer-chip.on {
  border-color: #38bdf8;
  background: #0b1220;
  color: #e0f2fe;
}
.alarm-note {
  font-size: .85rem;
  color: #6b7280;
}
.dark-theme .alarm-note {
  color: #cbd5e1;
}
.settings-actions {
  justify-content: flex-end;
}
@media (max-width:600px) {
  .setting-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .toggle-pill {
    width: 100%;
    text-align: center;
  }
}
.prayer-toggle {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0 6px;
}
.prayer-extras {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.moon-phase {
  font-weight: 800;
  font-size: 1.05rem;
}
.forecast-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}
.forecast-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  background: #ffffffb3;
}
.dark-theme .forecast-row {
  background: #0f172a;
  border-color: var(--border-dark);
}
.forecast-date {
  min-width: 160px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.forecast-times {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 6px;
  font-weight: 700;
}
.upcoming-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.upcoming-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  border-bottom: 1px dashed var(--border-light);
  padding-bottom: 6px;
}
.upcoming-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.player-now {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.player-title {
  font-weight: 800;
}
.player-verse {
  font-size: .85rem;
}
.player-reciter {
  font-size: .8rem;
}
.quran-controls-drawer {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.icon-btn.quran-icon-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid var(--border-light);
  background: #fff;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  position: relative;
}
.icon-btn.quran-icon-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}
.icon-btn.quran-icon-btn.active {
  border-color: var(--secondary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, .15);
}
.dark-theme .icon-btn.quran-icon-btn {
  background: #0f172a;
  border-color: var(--border-dark);
  color: var(--text-dark);
}
.icon-btn.quran-icon-btn .icon {
  width: 18px;
  height: 18px;
}
.icon-btn.quran-icon-btn.is-muted::after {
  content: "";
  position: absolute;
  width: 2px;
  height: 24px;
  background: currentColor;
  transform: rotate(45deg);
}
.icon-label {
  display: none;
  font-size: .75rem;
  font-weight: 700;
}
.quran-mini-btn {
  padding: 6px 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.quran-mini-btn .icon {
  width: 14px;
  height: 14px;
}
.quran-mini-btn .icon-label {
  font-size: .7rem;
}
.quran-seek {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.quran-seek input[type=range] {
  flex: 1;
}
.quran-time {
  font-variant-numeric: tabular-nums;
  font-size: .8rem;
  color: #6b7280;
  min-width: 48px;
  text-align: center;
}
.dark-theme .quran-time {
  color: #cbd5e1;
}
.quran-volume {
  display: flex;
  align-items: center;
  gap: 8px;
}
.quran-volume input[type=range] {
  width: 140px;
}
.ayah-text {
  font-size: calc(1.15rem*var(--quran-font-scale,1));
}
.ayah-translit {
  font-size: calc(.95rem*var(--quran-font-scale,1));
}
.ayah-translation {
  font-size: calc(1rem*var(--quran-font-scale,1));
}
.bismillah-inline {
  font-size: calc(1.15rem*var(--quran-font-scale,1));
}
@media (max-width:720px) {
  .player-top-row {
    flex-wrap: wrap;
  }
  .player-now {
    width: 100%;
  }
  .icon-label {
    display: inline;
  }
  .player-controls-row.primary-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .quran-volume {
    width: 100%;
  }
  .quran-volume input[type=range] {
    width: 100%;
  }
  .forecast-row {
    flex-direction: column;
  }
  .forecast-date {
    min-width: 0;
  }
  .forecast-times {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.player-selects {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-end;
}
.player-selects label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-weight: 700;
  font-size: .8rem;
  min-width: 160px;
}
.player-selects select {
  max-width: 200px;
  padding: 8px 10px;
  font-size: .9rem;
}
.quran-settings-modal {
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background:
    linear-gradient(
      180deg,
      #ffffff 0,
      #f3f4f6 100%);
}
.dark-theme .quran-settings-modal {
  background: #0f172a;
  border-color: var(--border-dark);
}
.quran-settings-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.quran-settings-grid label {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 10px;
}
.dark-theme .quran-settings-grid label {
  background: #111827;
  border-color: var(--border-dark);
}
.icon-btn.quran-icon-btn.active {
  background: #e0e7ff;
  color: var(--primary);
}
.dark-theme .icon-btn.quran-icon-btn.active {
  background: #0f172a;
  color: var(--text-dark);
  border-color: var(--border-dark);
  box-shadow: none;
}
@media (min-width:960px) {
  .quran-controls-drawer {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    overflow-x: auto;
  }
  .quran-controls-drawer .player-controls-row {
    display: contents;
  }
  .quran-controls-drawer .quran-seek {
    min-width: 260px;
    flex: 1 1 260px;
  }
  .quran-controls-drawer .quran-volume {
    min-width: 200px;
    flex: 0 0 auto;
  }
  .quran-controls-drawer .quran-volume input[type=range] {
    width: 160px;
  }
  .icon-label {
    display: inline;
  }
  .icon-btn.quran-icon-btn {
    padding: 10px 12px;
    min-width: 44px;
  }
}
@media (max-width:720px) {
  .icon-label {
    display: none;
  }
  .player-controls-row.primary-controls {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
  .quran-controls-drawer {
    padding: 8px;
    gap: 8px;
  }
  .icon-btn.quran-icon-btn {
    padding: 6px 8px;
    font-size: .85rem;
  }
  .player-controls-row {
    gap: 6px;
  }
}
@media (max-width:720px) {
  .player-selects select {
    max-width: 100%;
  }
}
.prayer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.prayer-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.prayer-day-card {
  border: 1px solid var(--border-light);
  background:
    linear-gradient(
      180deg,
      #ffffff 0,
      #f8fafc 100%);
}
.dark-theme .prayer-day-card {
  border-color: var(--border-dark);
  background: #0f172a;
}
.prayer-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.prayer-day-list {
  display: grid;
  gap: 10px;
}
.prayer-row {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 10px 12px;
}
.dark-theme .prayer-row {
  background: #111827;
  border-color: var(--border-dark);
}
.prayer-row.active {
  background:
    linear-gradient(
      135deg,
      #dbeafe,
      #eef2ff);
  border-color: #93c5fd;
}
.dark-theme .prayer-row.active {
  background: #1e293b;
  border-color: #60a5fa;
}
.prayer-name {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.current-time-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.next-prayer {
  font-weight: 700;
  color: var(--secondary);
}
.prayer-date-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
}
.prayer-date-header .weekday {
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--secondary);
}
.islamic-banner {
  margin-top: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 800;
  color: #3b2f00;
  background:
    linear-gradient(
      135deg,
      #facc15,
      #f59e0b);
  box-shadow: 0 8px 18px rgba(245, 158, 11, .35);
  animation: goldPulse 2.4s ease-in-out infinite;
}
.islamic-day {
  box-shadow: 0 0 0 2px rgba(250, 204, 21, .35);
}
.islamic-day-cell {
  box-shadow: inset 0 0 0 2px rgba(250, 204, 21, .25);
}
.moon-row .moon-cell {
  display: flex;
  align-items: center;
  justify-content: center;
}
.moon-visual.animated {
  animation: moonFloat 3s ease-in-out infinite;
}
@keyframes goldPulse {
  0%, 100% {
    transform: translateY(0);
    filter: brightness(1);
  }
  50% {
    transform: translateY(-1px);
    filter: brightness(1.12);
  }
}
@keyframes moonFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}
.prayer-table-card {
  border: 1px solid var(--border-light);
  background:
    linear-gradient(
      180deg,
      #ffffff 0,
      #f8fafc 100%);
}
.dark-theme .prayer-table-card {
  border-color: var(--border-dark);
  background: #0f172a;
}
.prayer-table-wrap {
  overflow-x: auto;
  overflow-y: visible;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 6px;
}
.prayer-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
}
.prayer-table th {
  background: #e0e7ff;
  color: #1e3a8a;
  padding: 10px;
  border-radius: 10px;
  text-align: center;
  font-weight: 800;
  min-width: 110px;
}
.prayer-table td {
  background: #fff;
  border: 1px solid var(--border-light);
  padding: 10px;
  text-align: center;
  border-radius: 10px;
  font-weight: 700;
  min-width: 110px;
  white-space: nowrap;
}
.prayer-table th:first-child,
.prayer-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
}
.prayer-table th:first-child {
  z-index: 3;
}
.prayer-table.is-month th,
.prayer-table.is-month td {
  min-width: 90px;
  font-size: .8rem;
  padding: 6px;
}
.prayer-table.is-month .prayer-name-cell {
  min-width: 140px;
}
.dark-theme .prayer-table th {
  background: #1e293b;
  color: #e2e8f0;
}
.dark-theme .prayer-table td {
  background: #0f172a;
  border-color: var(--border-dark);
  color: var(--text-dark);
}
.prayer-name-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-start;
  text-align: left;
  min-width: 150px;
}
.prayer-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.prayer-dot-fajr {
  background: #60a5fa;
}
.prayer-dot-dhuhr {
  background: #f59e0b;
}
.prayer-dot-asr {
  background: #f97316;
}
.prayer-dot-maghrib {
  background: #ef4444;
}
.prayer-dot-isha {
  background: #a855f7;
}
.prayer-extras {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}
.half-card {
  min-height: 240px;
}
.moon-summary {
  display: grid;
  gap: 12px;
}
.moon-today {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}
.moon-visual {
  width: var(--size,56px);
  height: var(--size,56px);
  border-radius: 999px;
  background:
    radial-gradient(
      circle at 30% 30%,
      rgba(255, 255, 255, .95) 0%,
      rgba(255, 255, 255, .95) calc(var(--illum,.5)*100%),
      rgba(15, 23, 42, .9) calc(var(--illum,.5)*100% + 1%),
      #0b1020 100%);
  box-shadow: 0 10px 18px rgba(15, 23, 42, .2);
}
.moon-forecast {
  display: grid;
  gap: 12px;
  margin-top: 10px;
}
.moon-day {
  display: flex;
  gap: 12px;
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 10px;
}
.dark-theme .moon-day {
  background: #0f172a;
  border-color: var(--border-dark);
}
.moon-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.upcoming-card {
  border: 1px solid var(--border-light);
  background:
    linear-gradient(
      180deg,
      #ffffff 0,
      #f8fafc 100%);
}
.dark-theme .upcoming-card {
  border-color: var(--border-dark);
  background: #0f172a;
}
@media (max-width:720px) {
  .prayer-day-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .current-time-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .prayer-table th,
  .prayer-table td {
    font-size: .85rem;
    padding: 8px;
    min-width: 84px;
  }
  .prayer-table.is-month th,
  .prayer-table.is-month td {
    min-width: 70px;
    font-size: .75rem;
  }
  .prayer-name-cell {
    font-size: .9rem;
  }
  .moon-today {
    justify-content: flex-start;
  }
}
.font-size-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.font-size-controls .btn {
  padding: 6px 10px;
}
.prayer-extras {
  grid-template-columns: 1fr;
  gap: 18px;
}
.half-card {
  min-height: auto;
}
.moon-lunar-card {
  border: 1px solid var(--border-light);
  background:
    linear-gradient(
      135deg,
      #fff7ed 0,
      #e0f2fe 45%,
      #f8fafc 100%);
  box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
  padding: 18px;
}
.dark-theme .moon-lunar-card {
  background:
    linear-gradient(
      135deg,
      #0f172a 0,
      #111827 60%,
      #1e293b 100%);
  border-color: var(--border-dark);
  box-shadow: none;
}
.moon-summary {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  align-items: center;
}
.moon-forecast {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 12px;
}
.moon-day {
  background: rgba(255, 255, 255, .8);
  border-color: var(--border-light);
}
.dark-theme .moon-day {
  background: rgba(15, 23, 42, .7);
}
.quran-controls-drawer {
  padding: 8px;
  gap: 8px;
}
.sticky-player {
  margin-top: 0;
}
.dark-theme .icon-btn.quran-icon-btn,
.dark-theme .icon-btn.subtle.quran-mini-btn,
.dark-theme .player-toggle-btn {
  color: #e2e8f0 !important;
  background: #0b1220 !important;
  border-color: #475569 !important;
}
.dark-theme .icon-btn.quran-icon-btn.active {
  background:
    linear-gradient(
      135deg,
      #1d4ed8,
      #0ea5e9) !important;
  color: #fff !important;
  border-color: #60a5fa !important;
  box-shadow: 0 0 0 2px rgba(96, 165, 250, .35) !important;
}
.dark-theme .ayah.active {
  border-color: #facc15 !important;
  box-shadow: 0 0 0 2px rgba(250, 204, 21, .7) !important;
}
.icon-btn.quran-icon-btn:focus-visible,
.player-toggle-btn:focus-visible,
.drawer-link:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: 2px;
}
@media (max-width:720px) {
  .quran-grid {
    grid-template-columns: 1fr;
  }
  .icon-btn.quran-icon-btn {
    min-height: 40px;
  }
  .drawer-item {
    padding: 10px;
  }
}
.hero {
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      circle at 20% 20%,
      rgba(14, 165, 233, .2),
      transparent 45%),
    radial-gradient(
      circle at 80% 30%,
      rgba(250, 204, 21, .18),
      transparent 40%);
  pointer-events: none;
}
.hero-content {
  position: relative;
  backdrop-filter: blur(3px);
}
.hero-title {
  animation: floatIn 1s ease forwards, heroGlow 8s ease-in-out infinite;
}
@keyframes heroGlow {
  0%, 100% {
    text-shadow: 0 0 0 rgba(255, 255, 255, 0);
  }
  50% {
    text-shadow: 0 8px 28px rgba(255, 255, 255, .35);
  }
}
:root {
  --primary:#17356c;
  --secondary:#1f5bc6;
  --accent:#f5c542;
  --light-bg:#f5f7fb;
  --text-light:#0f172a;
  --panel:#ffffffd6;
  --panel-dark:#0b1529d9;
  --radius:14px;
  --radius-sm:10px;
  --shadow:0 10px 30px rgba(15,23,42,.08);
}
body {
  background:
    radial-gradient(
      900px 380px at 92% -8%,
      rgba(37, 99, 235, .12),
      transparent 65%),
    radial-gradient(
      900px 380px at -10% 120%,
      rgba(245, 197, 66, .15),
      transparent 58%),
    var(--light-bg);
  color: var(--text-light);
}
.dark-theme body,
.dark-theme {
  background:
    radial-gradient(
      900px 380px at 92% -8%,
      rgba(37, 99, 235, .24),
      transparent 65%),
    radial-gradient(
      900px 380px at -10% 120%,
      rgba(30, 64, 175, .22),
      transparent 58%),
    #081122;
}
nav.nav-bar {
  position: sticky;
  top: 0;
  z-index: 70;
  padding: 10px 14px;
  border-radius: 0 0 14px 14px;
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--panel) 88%, #fff 12%);
  border: 1px solid rgba(148, 163, 184, .25);
}
.dark-theme nav.nav-bar {
  background: color-mix(in srgb, var(--panel-dark) 88%, #0f172a 12%);
  border-color: rgba(100, 116, 139, .28);
}
.nav-brand {
  font-weight: 800;
  letter-spacing: .01em;
}
.nav-center .nav-link {
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 999px;
}
.nav-center .nav-link.active {
  background: rgba(37, 99, 235, .16);
}
.container {
  width: min(1200px, 94%);
  padding: 26px 0 38px;
}
.card,
form,
.modal-content,
.location-card,
.library-content,
.library-sidebar,
.sticky-player,
.quran-controls-drawer {
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow) !important;
  border: 1px solid rgba(148, 163, 184, .24) !important;
  background: var(--panel);
}
.dark-theme .card,
.dark-theme form,
.dark-theme .modal-content,
.dark-theme .location-card,
.dark-theme .library-content,
.dark-theme .library-sidebar,
.dark-theme .sticky-player,
.dark-theme .quran-controls-drawer {
  background: var(--panel-dark);
  border-color: rgba(100, 116, 139, .34) !important;
}
.btn {
  border-radius: 999px;
  min-height: 42px;
  padding: 10px 16px;
}
.btn.ghost {
  border-width: 1.5px;
}
.hero {
  min-height: 64vh;
  border-radius: 20px;
  overflow: hidden;
  margin: 14px auto 10px;
  width: min(1240px, 96%);
  background: url(/assets/hero-light.jpg) center/cover no-repeat !important;
}
.dark-theme .hero {
  background: url(/assets/hero-dark.jpg) center/cover no-repeat !important;
}
.hero-content {
  max-width: 820px;
  border-radius: 18px;
  background:
    linear-gradient(
      140deg,
      rgba(2, 6, 23, .63),
      rgba(15, 23, 42, .4));
  border: 1px solid rgba(255, 255, 255, .24);
}
.hero-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.18;
}
.hadith-shell .hadith-toolbar {
  display: grid;
  gap: 14px;
}
.hadith-toolbar-top {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.hadith-filters {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  align-items: end;
}
.hadith-filters label {
  gap: 6px;
}
.hadith-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  margin-top: 14px;
}
.hadith-sidebar {
  position: sticky;
  top: 88px;
  max-height: 72vh;
  overflow: auto;
  display: grid;
  gap: 8px;
}
.hadith-chapter-list {
  display: grid;
  gap: 8px;
}
.hadith-chapter-btn {
  border: 1px solid var(--border-light);
  background: transparent;
  color: inherit;
  border-radius: 10px;
  padding: 8px 10px;
  text-align: left;
  cursor: pointer;
  font: inherit;
}
.hadith-chapter-btn.active {
  background: rgba(37, 99, 235, .14);
  border-color: rgba(37, 99, 235, .45);
  font-weight: 700;
}
.dark-theme .hadith-chapter-btn {
  border-color: var(--border-dark);
}
.hadith-results {
  display: grid;
  gap: 12px;
}
.hadith-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.hadith-card {
  display: grid;
  gap: 10px;
  content-visibility: auto;
  contain-intrinsic-size: 420px;
}
.hadith-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.hadith-pill {
  background: #dbeafe;
  color: #1e3a8a;
}
.dark-theme .hadith-pill {
  background: #1e3a8a33;
  color: #dbeafe;
}
.hadith-text {
  margin: 0;
  line-height: 1.85;
}
.hadith-arabic {
  margin: 0;
  font-family: Amiri, serif;
  font-size: 1.24rem;
  line-height: 2.05;
  text-align: right;
  direction: rtl;
  border-top: 1px dashed rgba(148, 163, 184, .35);
  padding-top: 10px;
}
.hadith-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.quran-grid .ayah {
  content-visibility: auto;
  contain-intrinsic-size: 360px;
}
.player-selects {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 10px;
  align-items: end;
  width: 100%;
}
.quran-verse-search {
  max-width: none;
}
.library-explorer {
  border-radius: 16px;
}
.explorer-table th {
  font-size: .9rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.explorer-table td,
.explorer-table th {
  padding: 12px 10px;
}
@media (max-width:960px) {
  .hadith-layout {
    grid-template-columns: 1fr;
  }
  .hadith-sidebar {
    position: static;
    max-height: none;
  }
  .player-selects {
    grid-template-columns: 1fr;
  }
  .hero {
    min-height: 52vh;
    width: min(1240px, 98%);
  }
}
@media (max-width:720px) {
  nav.nav-bar {
    padding: 8px 10px;
  }
  .container {
    width: 95%;
    padding: 20px 0 28px;
  }
  .hero-content {
    padding: 16px;
  }
  .card,
  form,
  .modal-content {
    padding: 14px;
  }
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
img,
svg,
video,
canvas {
  max-width: 100%;
  height: auto;
}
button,
input,
select,
textarea {
  font: inherit;
}
*:focus-visible {
  outline: 2px solid rgba(14, 165, 233, .95);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
:root {
  --primary:#0b4ab3;
  --secondary:#0ea5e9;
  --accent:#f6b90f;
  --accent2:#ef5da8;
  --light-bg:#f3f7ff;
  --text-light:#08162b;
  --panel:#ffffffea;
  --panel-dark:#0a162bd9;
  --shadow:0 12px 30px rgba(8,22,43,.12);
}
body {
  background:
    radial-gradient(
      950px 420px at 88% -10%,
      rgba(14, 165, 233, .18),
      transparent 62%),
    radial-gradient(
      820px 360px at -12% 110%,
      rgba(246, 185, 15, .2),
      transparent 58%),
    var(--light-bg);
}
.dark-theme,
.dark-theme body {
  background:
    radial-gradient(
      980px 440px at 92% -14%,
      rgba(14, 165, 233, .2),
      transparent 64%),
    radial-gradient(
      840px 360px at -10% 114%,
      rgba(30, 64, 175, .24),
      transparent 58%),
    #050d1b;
}
.nav-center .nav-link.active {
  background:
    linear-gradient(
      135deg,
      rgba(14, 165, 233, .2),
      rgba(37, 99, 235, .2));
  color: #0b2d75;
}
.dark-theme .nav-center .nav-link.active {
  color: #dbeafe;
  background:
    linear-gradient(
      135deg,
      rgba(14, 165, 233, .22),
      rgba(59, 130, 246, .18));
}
.btn {
  background:
    linear-gradient(
      135deg,
      var(--primary),
      #1d4ed8);
  box-shadow: 0 8px 18px rgba(29, 78, 216, .28);
}
.btn:hover {
  background:
    linear-gradient(
      135deg,
      #0a3f9a,
      #1e40af);
}
.btn.ghost {
  background: rgba(255, 255, 255, .5);
}
.hero {
  min-height: 66vh;
}
.hero-content {
  background:
    linear-gradient(
      140deg,
      rgba(2, 6, 23, .7),
      rgba(15, 23, 42, .44));
}
.hadith-toolbar-top {
  justify-content: space-between;
}
.hadith-filters {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
.hadith-card {
  grid-template-rows: auto auto auto auto auto;
  align-content: start;
}
.hadith-narrator {
  margin: 0;
  font-weight: 700;
  color: #1e3a8a;
}
.dark-theme .hadith-narrator {
  color: #bfdbfe;
}
.hadith-grade {
  margin: 4px 0 0;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .01em;
  background:
    linear-gradient(
      135deg,
      rgba(14, 165, 233, .16),
      rgba(34, 197, 94, .2));
  color: #0f3b74;
  border: 1px solid rgba(14, 165, 233, .35);
}
.dark-theme .hadith-grade {
  color: #dbeafe;
  background:
    linear-gradient(
      135deg,
      rgba(14, 165, 233, .22),
      rgba(59, 130, 246, .24));
  border-color: rgba(96, 165, 250, .35);
}
.player-selects {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}
.player-selects .muted.small {
  grid-column: 1/-1;
}
.quran-grid .ayah-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(14, 165, 233, .12);
}
.dark-theme .quran-grid .ayah-num {
  background: rgba(14, 165, 233, .2);
  color: #e0f2fe;
}
@media (max-width:960px) {
  .hero {
    min-height: 52vh;
  }
  .nav-center {
    gap: 8px;
  }
}
@media (max-width:720px) {
  .hero {
    min-height: 48vh;
  }
  .hero-title {
    font-size: clamp(1.7rem, 7vw, 2.2rem);
  }
  .hadith-filters {
    grid-template-columns: 1fr;
  }
  .player-selects {
    grid-template-columns: 1fr;
  }
}
.player-selects {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}
.quran-search-toggle,
.quran-panel-toggle {
  align-self: end;
  justify-self: start;
  border: 1px solid rgba(14, 165, 233, .35);
  border-radius: 999px;
  background:
    linear-gradient(
      135deg,
      rgba(14, 165, 233, .12),
      rgba(59, 130, 246, .14));
  color: #0f3b74;
  font-weight: 800;
  padding: 10px 14px;
  min-height: 42px;
  cursor: pointer;
}
.dark-theme .quran-search-toggle,
.dark-theme .quran-panel-toggle {
  color: #dbeafe;
  border-color: rgba(96, 165, 250, .4);
  background:
    linear-gradient(
      135deg,
      rgba(14, 165, 233, .22),
      rgba(59, 130, 246, .22));
}
.quran-panel-toggle span {
  letter-spacing: .01em;
}
.quran-search-drawer {
  margin-top: 10px;
  display: grid;
  gap: 12px;
  border: 1px solid rgba(14, 165, 233, .28) !important;
}
.quran-search-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 220px) auto;
  gap: 10px;
  align-items: end;
}
.quran-search-controls label {
  display: grid;
  gap: 6px;
  font-weight: 700;
}
.quran-search-results {
  display: grid;
  gap: 10px;
  max-height: 420px;
  overflow: auto;
  padding-right: 2px;
}
.quran-search-result {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(148, 163, 184, .24) !important;
  box-shadow: none !important;
}
.quran-search-result-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.quran-search-result-head .btn.ghost {
  min-height: 34px;
  padding: 6px 12px;
}
.quran-search-arabic,
.quran-search-translation {
  margin: 0;
  line-height: 1.75;
}
.quran-search-arabic {
  font-family: Amiri, serif;
  font-size: 1.1rem;
  direction: rtl;
  text-align: right;
}
.quran-search-result mark {
  background: #fde68a;
  color: #7c2d12;
  border-radius: 4px;
  padding: 0 3px;
}
.dark-theme .quran-search-result mark {
  background: #f59e0b;
  color: #0f172a;
}
.hadith-toolbar,
.hadith-sidebar,
.hadith-card {
  border: 1px solid rgba(148, 163, 184, .28) !important;
}
.hadith-filters select,
.hadith-filters input {
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, .38);
  background: #ffffffd9;
}
.dark-theme .hadith-filters select,
.dark-theme .hadith-filters input {
  background: #0f172acc;
  border-color: rgba(100, 116, 139, .6);
}
.hadith-chapter-btn {
  border-radius: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, .4);
  background: #ffffffb8;
}
.hadith-chapter-btn.active {
  background:
    linear-gradient(
      135deg,
      rgba(14, 165, 233, .18),
      rgba(37, 99, 235, .2));
  border-color: rgba(37, 99, 235, .5);
}
.dark-theme .hadith-chapter-btn {
  background: #0f172ab8;
  border-color: rgba(100, 116, 139, .45);
}
.hadith-grade {
  font-weight: 700;
}
@media (max-width:900px) {
  .quran-search-controls {
    grid-template-columns: 1fr;
  }
  .quran-search-results {
    max-height: 52vh;
  }
}
.hero {
  background-position: center center !important;
}
.hero::before {
  background:
    linear-gradient(
      120deg,
      rgba(7, 22, 51, .36),
      rgba(9, 32, 69, .1) 38%,
      rgba(2, 132, 199, .2) 100%),
    radial-gradient(
      circle at 84% 12%,
      rgba(249, 115, 22, .26),
      transparent 42%) !important;
}
.hero-content {
  border: 1px solid rgba(255, 255, 255, .28);
  background:
    linear-gradient(
      145deg,
      rgba(6, 19, 40, .62),
      rgba(10, 29, 60, .48)) !important;
}
.card,
form {
  transition:
    transform .2s ease,
    box-shadow .2s ease,
    border-color .2s ease;
}
.card:hover,
form:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(2, 6, 23, .11);
}
.player-selects {
  gap: 12px;
}
.player-selects select {
  min-height: 42px;
  border-radius: 10px;
}
.quran-search-toggle,
.quran-panel-toggle {
  min-height: 42px;
  border-radius: 999px;
}
.quran-panel-toggle span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.quran-panel-toggle .icon {
  width: 16px;
  height: 16px;
}
.quran-search-drawer {
  border-radius: 14px;
  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, .92),
      rgba(255, 255, 255, .86));
}
.dark-theme .quran-search-drawer {
  background:
    linear-gradient(
      145deg,
      rgba(15, 23, 42, .92),
      rgba(15, 23, 42, .84));
}
.quran-search-result {
  border-radius: 12px;
}
.quran-search-result-head strong {
  color: #0f3b74;
}
.dark-theme .quran-search-result-head strong {
  color: #dbeafe;
}
.quran-grid .ayah {
  border-radius: 12px;
}
.quran-grid .ayah-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  border-radius: 999px;
  background:
    linear-gradient(
      145deg,
      rgba(14, 165, 233, .18),
      rgba(37, 99, 235, .2));
  border: 1px solid rgba(37, 99, 235, .32);
}
.dark-theme .quran-grid .ayah-num {
  background:
    linear-gradient(
      145deg,
      rgba(14, 165, 233, .34),
      rgba(37, 99, 235, .28));
  border-color: rgba(147, 197, 253, .4);
}
.hadith-toolbar-top strong {
  font-size: 1.05rem;
}
.hadith-sidebar {
  border-radius: 14px;
}
.hadith-chapter-list {
  max-height: 62vh;
  overflow: auto;
  padding-right: 4px;
}
.hadith-chapter-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-wrap: balance;
}
.hadith-card {
  border-radius: 14px;
}
.hadith-head strong {
  color: #0f3b74;
}
.dark-theme .hadith-head strong {
  color: #e0f2fe;
}
.hadith-grade {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(59, 130, 246, .26);
  background:
    linear-gradient(
      135deg,
      rgba(219, 234, 254, .62),
      rgba(186, 230, 253, .45));
}
.dark-theme .hadith-grade {
  border-color: rgba(96, 165, 250, .45);
  background:
    linear-gradient(
      135deg,
      rgba(30, 58, 138, .42),
      rgba(14, 116, 144, .34));
}
@media (max-width:900px) {
  .quran-panel-toggle,
  .quran-search-toggle {
    width: 100%;
    justify-content: center;
  }
  .hadith-chapter-list {
    max-height: unset;
  }
}
:root {
  --primary:#0f766e;
  --secondary:#f59e0b;
  --accent:#22d3ee;
  --accent2:#fb923c;
  --light-bg:#f4fbfb;
}
body {
  background:
    radial-gradient(
      circle at 8% 5%,
      rgba(34, 211, 238, .1),
      transparent 30%),
    radial-gradient(
      circle at 88% 9%,
      rgba(245, 158, 11, .14),
      transparent 36%),
    var(--light-bg);
}
.dark-theme body,
.dark-theme {
  background:
    radial-gradient(
      circle at 10% 6%,
      rgba(34, 211, 238, .1),
      transparent 36%),
    radial-gradient(
      circle at 86% 10%,
      rgba(251, 146, 60, .12),
      transparent 34%),
    #07141f;
}
nav.nav-bar {
  background:
    linear-gradient(
      135deg,
      rgba(240, 253, 250, .94),
      rgba(236, 253, 245, .9),
      rgba(255, 247, 237, .9)) !important;
  border-color: rgba(15, 118, 110, .22) !important;
  box-shadow: 0 14px 32px rgba(2, 132, 199, .11) !important;
}
.dark-theme nav.nav-bar {
  background:
    linear-gradient(
      135deg,
      rgba(8, 30, 44, .95),
      rgba(12, 38, 55, .94),
      rgba(20, 47, 66, .92)) !important;
  border-color: rgba(45, 212, 191, .25) !important;
}
.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(15, 118, 110, .36);
  background:
    linear-gradient(
      145deg,
      #fff,
      #ecfeff);
  color: #0f766e !important;
  box-shadow: 0 8px 22px rgba(14, 116, 144, .18);
  font-size: 1.05rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.dark-theme .theme-toggle {
  border-color: rgba(56, 189, 248, .35);
  background:
    linear-gradient(
      145deg,
      #0f2a3a,
      #12354a);
  color: #dbeafe !important;
}
.nav-center .nav-link.active {
  background:
    linear-gradient(
      135deg,
      rgba(34, 211, 238, .2),
      rgba(245, 158, 11, .2)) !important;
  color: #0b3f60 !important;
}
.dark-theme .nav-center .nav-link.active {
  background:
    linear-gradient(
      135deg,
      rgba(14, 116, 144, .44),
      rgba(180, 83, 9, .34)) !important;
  color: #e0f2fe !important;
}
.site-footer {
  background:
    linear-gradient(
      135deg,
      #0f3b4b 0%,
      #115e59 44%,
      #7c2d12 100%) !important;
  color: #f8fafc !important;
}
.site-footer a {
  color: #fde68a !important;
}
.sticky-player {
  padding: 8px 10px !important;
  border-radius: 12px;
}
.player-top-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}
.player-selects {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
}
.player-selects label {
  min-width: 0 !important;
  font-size: .67rem !important;
  gap: 3px !important;
}
.player-selects select {
  max-width: 100% !important;
  min-height: 30px !important;
  padding: 5px 8px !important;
  border-radius: 8px !important;
  font-size: .82rem !important;
}
.quran-panel-toggle {
  width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 !important;
  border-radius: 999px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.quran-panel-toggle span {
  display: contents !important;
}
.quran-panel-toggle .icon {
  width: 14px;
  height: 14px;
}
.quran-controls-drawer {
  padding: 8px !important;
  gap: 8px !important;
}
.icon-btn.quran-icon-btn {
  min-height: 31px !important;
  border-radius: 9px !important;
  padding: 5px 8px !important;
}
.icon-btn.quran-icon-btn .icon {
  width: 15px !important;
  height: 15px !important;
}
.quran-search-drawer {
  margin-top: 8px !important;
  padding: 10px !important;
}
.quran-search-controls {
  gap: 8px !important;
}
.quran-search-controls label {
  font-size: .72rem !important;
}
.quran-search-controls input,
.quran-search-controls select {
  min-height: 30px;
  padding: 5px 8px;
}
.hadith-shell h2 {
  margin-bottom: 8px;
}
.hadith-toolbar {
  position: sticky;
  top: calc(var(--nav-height,72px) + 6px);
  z-index: 56;
  padding: 10px 12px !important;
  gap: 8px !important;
}
.hadith-toolbar-top {
  gap: 8px !important;
}
.hadith-filters {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 8px !important;
}
.hadith-filters label {
  font-size: .69rem;
}
.hadith-filters select,
.hadith-filters input {
  min-height: 30px !important;
  padding: 5px 8px !important;
  font-size: .82rem !important;
}
.hadith-sidebar {
  top: calc(var(--nav-height,72px) + 70px) !important;
}
.library-explorer {
  border: 1px solid rgba(34, 211, 238, .24) !important;
  background:
    linear-gradient(
      140deg,
      rgba(240, 253, 250, .88),
      rgba(236, 254, 255, .88),
      rgba(255, 247, 237, .86)) !important;
}
.dark-theme .library-explorer {
  background:
    linear-gradient(
      140deg,
      rgba(8, 30, 44, .9),
      rgba(9, 36, 55, .88),
      rgba(44, 25, 17, .82)) !important;
}
.library-sidebar,
.library-content {
  border-radius: 14px !important;
  border: 1px solid rgba(148, 163, 184, .3) !important;
}
.library-card {
  border-radius: 14px !important;
  transition: transform .18s ease, box-shadow .18s ease;
}
.library-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(2, 132, 199, .18);
}
.auth-form {
  width: 100%;
  max-width: 640px;
  padding: 18px !important;
  gap: 10px !important;
  border-radius: 16px !important;
  border: 1px solid rgba(34, 211, 238, .26) !important;
  background:
    linear-gradient(
      150deg,
      rgba(255, 255, 255, .95),
      rgba(236, 254, 255, .9),
      rgba(255, 247, 237, .88)) !important;
}
.dark-theme .auth-form {
  background:
    linear-gradient(
      150deg,
      rgba(15, 23, 42, .94),
      rgba(14, 37, 56, .9),
      rgba(55, 35, 22, .74)) !important;
}
.auth-form input,
.auth-form select {
  max-width: 100% !important;
}
.agree-box {
  display: grid !important;
  grid-template-columns: auto 1fr;
  align-items: start !important;
  gap: 8px !important;
  white-space: normal !important;
}
.agree-box input {
  width: 18px !important;
  height: 18px !important;
  margin-top: 1px !important;
}
.agree-text {
  white-space: normal !important;
  line-height: 1.35;
}
@media (max-width:900px) {
  .player-selects {
    grid-template-columns: 1fr !important;
  }
  .hadith-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .quran-panel-toggle {
    width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
  }
}
@media (max-width:720px) {
  .quran-controls-drawer .icon-label {
    display: none !important;
  }
  .quran-panel-toggle {
    width: 30px !important;
    height: 30px !important;
    min-height: 30px !important;
  }
  .quran-panel-toggle .icon {
    width: 13px;
    height: 13px;
  }
}
@media (max-width:560px) {
  .hadith-filters {
    grid-template-columns: 1fr !important;
  }
}
.quran-search-controls .quran-clear-btn,
.hadith-clear-btn {
  min-height: 31px !important;
  height: 31px !important;
  min-width: 31px !important;
  width: 31px !important;
  padding: 0 !important;
  border-radius: 9px !important;
  line-height: 1 !important;
  font-size: 1rem !important;
  justify-content: center !important;
  align-self: end !important;
}
.quran-search-controls .quran-clear-btn .icon-label,
.hadith-clear-btn .icon-label {
  display: none !important;
}
.hadith-toolbar {
  padding: 6px 8px !important;
  gap: 6px !important;
  border-radius: 12px !important;
}
.hadith-toolbar-top {
  min-height: 20px;
  gap: 6px !important;
  font-size: .88rem;
}
.hadith-filters {
  display: grid !important;
  grid-template-columns: 1.25fr 1fr 1.5fr auto !important;
  gap: 6px !important;
  align-items: end !important;
}
.hadith-filters label {
  font-size: .66rem !important;
  letter-spacing: .01em;
}
.hadith-filters select,
.hadith-filters input {
  min-height: 28px !important;
  height: 28px !important;
  padding: 4px 8px !important;
  font-size: .78rem !important;
}
.hadith-sidebar {
  top: calc(var(--nav-height,72px) + 58px) !important;
}
.hadith-card mark,
.hadith-narrator mark,
.hadith-grade mark,
.hadith-arabic mark {
  background: rgba(251, 191, 36, .45);
  color: inherit;
  border-radius: 4px;
  padding: 0 .12em;
}
.dark-theme .hadith-card mark,
.dark-theme .hadith-narrator mark,
.dark-theme .hadith-grade mark,
.dark-theme .hadith-arabic mark {
  background: rgba(250, 204, 21, .35);
  color: #fef08a;
}
.library-quick-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.library-control-group {
  display: inline-flex;
  gap: 6px;
}
.library-control-group .btn.ghost {
  min-height: 30px;
  height: 30px;
  padding: 0 10px;
  border-radius: 10px;
  font-size: .76rem;
}
.library-control-group .btn.ghost.active {
  background:
    linear-gradient(
      135deg,
      #0891b2,
      #0284c7) !important;
  color: #f8fafc !important;
  border-color: transparent !important;
}
.library-quick-controls select,
.library-quick-controls .search {
  min-height: 30px !important;
  height: 30px !important;
  font-size: .78rem !important;
  padding: 4px 8px !important;
}
.library-quick-controls .search {
  min-width: 220px;
}
.library-content .explorer-toolbar {
  gap: 10px !important;
  margin-bottom: 10px !important;
}
.container.narrow .auth-form {
  max-width: 520px !important;
  margin: 0 auto !important;
}
@media (max-width:900px) {
  .hadith-filters {
    grid-template-columns: 1fr 1fr auto !important;
  }
  .hadith-filters label:last-of-type {
    grid-column: 1 / span 2;
  }
  .library-quick-controls {
    justify-content: flex-start;
  }
}
@media (max-width:720px) {
  .hadith-filters {
    grid-template-columns: 1fr auto !important;
  }
  .hadith-filters label {
    grid-column: 1 / 2;
  }
  .hadith-clear-btn {
    grid-column: 2 / 3;
    grid-row: 3;
  }
  .library-quick-controls .search {
    min-width: 0;
    width: 100%;
  }
  .library-quick-controls select {
    flex: 1 1 140px;
  }
}
@media (max-width:900px) {
  body {
    line-height: 1.58 !important;
  }
  .container {
    width: 96% !important;
    padding: 24px 0 !important;
  }
  .card {
    padding: 14px !important;
    border-radius: 12px !important;
  }
  nav.nav-bar {
    padding: 8px 10px !important;
    gap: 8px !important;
  }
  .nav-center {
    gap: 6px !important;
  }
  .nav-link {
    padding: 5px 9px !important;
    font-size: .84rem !important;
  }
  .theme-toggle {
    width: 34px !important;
    height: 34px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .hero {
    min-height: 62vh !important;
    padding: 18px 10px !important;
  }
  .hero-content {
    padding: 14px 16px !important;
    border-radius: 14px !important;
  }
  .hero-title {
    font-size: clamp(1.55rem, 7vw, 2.1rem) !important;
    line-height: 1.18 !important;
  }
  .player-selects label {
    font-size: .64rem !important;
  }
  .player-selects select {
    min-height: 28px !important;
    height: 28px !important;
    font-size: .78rem !important;
  }
  .icon-btn.quran-icon-btn,
  .quran-search-controls .quran-clear-btn,
  .hadith-clear-btn {
    min-width: 30px !important;
    width: 30px !important;
    min-height: 30px !important;
    height: 30px !important;
    border-radius: 8px !important;
  }
  .quran-search-controls {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 132px auto !important;
    gap: 6px !important;
    align-items: end !important;
  }
  .quran-search-controls label:first-child {
    grid-column: 1 / -1 !important;
  }
  .quran-search-controls label:nth-child(2) {
    grid-column: 2 / 3 !important;
  }
  .quran-search-controls .quran-clear-btn {
    grid-column: 3 / 4 !important;
  }
  .hadith-toolbar-top {
    font-size: .83rem !important;
    min-height: 18px !important;
  }
  .hadith-filters {
    grid-template-columns: 1fr 1fr minmax(0, 1.15fr) auto !important;
    gap: 6px !important;
  }
  .hadith-filters label {
    font-size: .63rem !important;
  }
  .hadith-filters select,
  .hadith-filters input {
    min-height: 27px !important;
    height: 27px !important;
    font-size: .76rem !important;
  }
  .hadith-sidebar {
    top: calc(var(--nav-height,72px) + 52px) !important;
  }
  .library-content .explorer-toolbar {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
  }
  .library-quick-controls {
    width: 100% !important;
    justify-content: flex-start !important;
    gap: 6px !important;
  }
  .library-quick-controls .search {
    width: 100% !important;
    min-width: 0 !important;
  }
  .library-quick-controls select,
  .library-control-group {
    flex: 1 1 150px;
  }
  .container.narrow .auth-form {
    max-width: 500px !important;
    padding: 16px !important;
    gap: 8px !important;
  }
  .container.narrow .auth-form .btn,
  .container.narrow .auth-form .btn.ghost {
    min-height: 34px !important;
    padding: 6px 10px !important;
  }
}
@media (max-width:720px) {
  .container {
    padding: 20px 0 !important;
  }
  .nav-brand {
    font-size: 1rem !important;
  }
  .hero {
    min-height: 56vh !important;
  }
  .hero-content {
    padding: 12px 14px !important;
  }
  .player-selects {
    gap: 6px !important;
  }
  .quran-search-controls {
    grid-template-columns: minmax(0, 1fr) auto !important;
  }
  .quran-search-controls label:first-child {
    grid-column: 1 / -1 !important;
  }
  .quran-search-controls label:nth-child(2) {
    grid-column: 1 / 2 !important;
  }
  .quran-search-controls .quran-clear-btn {
    grid-column: 2 / 3 !important;
    align-self: end !important;
  }
  .hadith-filters {
    grid-template-columns: 1fr auto !important;
  }
  .hadith-filters label:nth-child(1),
  .hadith-filters label:nth-child(2),
  .hadith-filters label:nth-child(3) {
    grid-column: 1 / 2 !important;
  }
  .hadith-clear-btn {
    grid-column: 2 / 3 !important;
    grid-row: 3 !important;
  }
  .library-control-group .btn.ghost {
    min-width: 0 !important;
    width: 100% !important;
  }
  .container.narrow .auth-form {
    max-width: 460px !important;
  }
}
@media (max-width:520px) {
  .container {
    width: 95% !important;
    padding: 16px 0 !important;
  }
  .hero-title {
    font-size: clamp(1.4rem, 8vw, 1.85rem) !important;
  }
  .library-quick-controls select,
  .library-control-group,
  .library-control-group .btn.ghost {
    flex: 1 1 100% !important;
  }
  .container.narrow .auth-form {
    max-width: 100% !important;
  }
}

/* Quran readability + tajweed coloring */
.ayah-text {
  font-size: calc(1.4rem * var(--quran-arabic-font-scale, 1)) !important;
  font-weight: 400 !important;
  line-height: 2.1;
  letter-spacing: 0;
  text-align: right;
  direction: rtl;
}
.bismillah-inline {
  font-size: calc(1.3rem * var(--quran-arabic-font-scale, 1)) !important;
  font-weight: 400 !important;
  line-height: 2;
}
.ayah-text .tajweed {
  font-weight: inherit;
}
.ayah-text .tajweed.tajweed-ham_wasl,
.ayah-text .tajweed.tajweed-ham-wasl,
.ayah-text .tajweed.tajweed-slnt,
.ayah-text .tajweed.tajweed-laam_shamsiyah,
.ayah-text .tajweed.tajweed-laam-shamsiyah {
  color: #aaa;
}
.ayah-text .tajweed.tajweed-madda_normal,
.ayah-text .tajweed.tajweed-madda-normal {
  color: #537fff;
}
.ayah-text .tajweed.tajweed-madda_permissible,
.ayah-text .tajweed.tajweed-madda-permissible {
  color: #4050ff;
}
.ayah-text .tajweed.tajweed-madda_obligatory,
.ayah-text .tajweed.tajweed-madda-obligatory {
  color: #2144c1;
}
.ayah-text .tajweed.tajweed-madda_necessary,
.ayah-text .tajweed.tajweed-madda-necessary {
  color: #000ebc;
}
.ayah-text .tajweed.tajweed-qlq,
.ayah-text .tajweed.tajweed-qalaqah {
  color: #dd0008;
}
.ayah-text .tajweed.tajweed-ikhf_shfw,
.ayah-text .tajweed.tajweed-ikhf-shfw,
.ayah-text .tajweed.tajweed-ikhafa_shafawi,
.ayah-text .tajweed.tajweed-ikhafa-shafawi {
  color: #d500b7;
}
.ayah-text .tajweed.tajweed-ikhf,
.ayah-text .tajweed.tajweed-ikhafa {
  color: #9400a8;
}
.ayah-text .tajweed.tajweed-idghm_shfw,
.ayah-text .tajweed.tajweed-idghm-shfw,
.ayah-text .tajweed.tajweed-idgham_shafawi,
.ayah-text .tajweed.tajweed-idgham-shafawi {
  color: #58b800;
}
.ayah-text .tajweed.tajweed-iqlb,
.ayah-text .tajweed.tajweed-iqlab {
  color: #26bffd;
}
.ayah-text .tajweed.tajweed-idgh_ghn,
.ayah-text .tajweed.tajweed-idgh-ghn,
.ayah-text .tajweed.tajweed-idgham_ghunnah,
.ayah-text .tajweed.tajweed-idgham-ghunnah {
  color: #169777;
}
.ayah-text .tajweed.tajweed-idgh_w_ghn,
.ayah-text .tajweed.tajweed-idgh-w-ghn,
.ayah-text .tajweed.tajweed-idgham_wo_ghunnah,
.ayah-text .tajweed.tajweed-idgham-wo-ghunnah {
  color: #169200;
}
.ayah-text .tajweed.tajweed-idgh_mus,
.ayah-text .tajweed.tajweed-idgh-mus,
.ayah-text .tajweed.tajweed-idgham_mutajanisayn,
.ayah-text .tajweed.tajweed-idgham-mutajanisayn {
  color: #a1a1a1;
}
.ayah-text .tajweed.tajweed-ghn,
.ayah-text .tajweed.tajweed-ghunnah {
  color: #ff7e1e;
}
.ayah-text .tajweed.tajweed-madda_normal,
.ayah-text .tajweed.tajweed-madda-normal,
.ayah-text .tajweed.tajweed-madda_permissible,
.ayah-text .tajweed.tajweed-madda-permissible,
.ayah-text .tajweed.tajweed-madda_necessary,
.ayah-text .tajweed.tajweed-madda-necessary,
.ayah-text .tajweed.tajweed-madda_obligatory,
.ayah-text .tajweed.tajweed-madda-obligatory {
  font-weight: inherit;
}
.ayah-text span.end {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.55em;
  height: 1.55em;
  margin-inline-start: .35em;
  padding: 0 .28em;
  border-radius: 999px;
  border: 1px solid rgba(37, 99, 235, .35);
  background:
    linear-gradient(
      145deg,
      rgba(14, 165, 233, .16),
      rgba(37, 99, 235, .2));
  color: inherit;
  font-size: .62em;
  line-height: 1;
  vertical-align: baseline;
}
.dark-theme .ayah-text span.end {
  border-color: rgba(147, 197, 253, .42);
  background:
    linear-gradient(
      145deg,
      rgba(14, 165, 233, .34),
      rgba(37, 99, 235, .28));
}

/* Hadith mobile: keep sticky top filters + section dropdown only */
@media (max-width:900px) {
  .hadith-layout {
    grid-template-columns: 1fr !important;
  }
  .hadith-sidebar {
    display: none !important;
  }
}

/* Quran mobile layout: chapter+verse same line, cleaner controls */
@media (max-width:900px) {
  .player-top-row {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: flex-end !important;
    gap: 6px !important;
  }
  .player-selects {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto !important;
    gap: 6px !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }
  .player-selects label {
    min-width: 0 !important;
    text-align: left !important;
    align-items: stretch !important;
  }
  .player-selects select {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    text-align: left !important;
  }
  .quran-controls-drawer .player-controls-row.primary-controls {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    gap: 6px !important;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  .quran-controls-drawer .player-controls-row.primary-controls .icon-btn.quran-icon-btn {
    flex: 0 0 auto !important;
    min-width: 32px !important;
    width: 32px !important;
    min-height: 32px !important;
    height: 32px !important;
    padding: 0 !important;
  }
  .quran-controls-drawer .player-controls-row.primary-controls .icon-label {
    display: none !important;
  }
}

.quran-info-btn {
  grid-column: 3;
  align-self: end;
  min-height: 32px;
  min-width: 32px;
  width: 32px;
  padding: 0 !important;
  gap: 0;
}
.quran-info-dot {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .74rem;
  font-weight: 700;
  background: rgba(14, 165, 233, .18);
  color: #0f3b74;
}
.dark-theme .quran-info-dot {
  background: rgba(96, 165, 250, .24);
  color: #dbeafe;
}
.quran-tajweed-guide {
  margin-top: 8px;
  padding: 10px 12px !important;
}
.quran-tajweed-guide-list {
  margin: 8px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
}
.quran-tajweed-guide-list .tajweed {
  font-weight: 700;
}
.quran-tajweed-guide .tajweed.tajweed-ham_wasl,
.quran-tajweed-guide .tajweed.tajweed-ham-wasl,
.quran-tajweed-guide .tajweed.tajweed-slnt,
.quran-tajweed-guide .tajweed.tajweed-laam_shamsiyah,
.quran-tajweed-guide .tajweed.tajweed-laam-shamsiyah {
  color: #aaa;
}
.quran-tajweed-guide .tajweed.tajweed-madda_normal,
.quran-tajweed-guide .tajweed.tajweed-madda-normal {
  color: #537fff;
}
.quran-tajweed-guide .tajweed.tajweed-madda_permissible,
.quran-tajweed-guide .tajweed.tajweed-madda-permissible {
  color: #4050ff;
}
.quran-tajweed-guide .tajweed.tajweed-madda_obligatory,
.quran-tajweed-guide .tajweed.tajweed-madda-obligatory {
  color: #2144c1;
}
.quran-tajweed-guide .tajweed.tajweed-madda_necessary,
.quran-tajweed-guide .tajweed.tajweed-madda-necessary {
  color: #000ebc;
}
.quran-tajweed-guide .tajweed.tajweed-qlq,
.quran-tajweed-guide .tajweed.tajweed-qalaqah {
  color: #dd0008;
}
.quran-tajweed-guide .tajweed.tajweed-ikhf_shfw,
.quran-tajweed-guide .tajweed.tajweed-ikhf-shfw,
.quran-tajweed-guide .tajweed.tajweed-ikhafa_shafawi,
.quran-tajweed-guide .tajweed.tajweed-ikhafa-shafawi {
  color: #d500b7;
}
.quran-tajweed-guide .tajweed.tajweed-ikhf,
.quran-tajweed-guide .tajweed.tajweed-ikhafa {
  color: #9400a8;
}
.quran-tajweed-guide .tajweed.tajweed-idghm_shfw,
.quran-tajweed-guide .tajweed.tajweed-idghm-shfw,
.quran-tajweed-guide .tajweed.tajweed-idgham_shafawi,
.quran-tajweed-guide .tajweed.tajweed-idgham-shafawi {
  color: #58b800;
}
.quran-tajweed-guide .tajweed.tajweed-iqlb,
.quran-tajweed-guide .tajweed.tajweed-iqlab {
  color: #26bffd;
}
.quran-tajweed-guide .tajweed.tajweed-idgh_ghn,
.quran-tajweed-guide .tajweed.tajweed-idgh-ghn,
.quran-tajweed-guide .tajweed.tajweed-idgham_ghunnah,
.quran-tajweed-guide .tajweed.tajweed-idgham-ghunnah {
  color: #169777;
}
.quran-tajweed-guide .tajweed.tajweed-idgh_w_ghn,
.quran-tajweed-guide .tajweed.tajweed-idgh-w-ghn,
.quran-tajweed-guide .tajweed.tajweed-idgham_wo_ghunnah,
.quran-tajweed-guide .tajweed.tajweed-idgham-wo-ghunnah {
  color: #169200;
}
.quran-tajweed-guide .tajweed.tajweed-idgh_mus,
.quran-tajweed-guide .tajweed.tajweed-idgh-mus,
.quran-tajweed-guide .tajweed.tajweed-idgham_mutajanisayn,
.quran-tajweed-guide .tajweed.tajweed-idgham-mutajanisayn {
  color: #a1a1a1;
}
.quran-tajweed-guide .tajweed.tajweed-ghn,
.quran-tajweed-guide .tajweed.tajweed-ghunnah {
  color: #ff7e1e;
}
.quran-tajweed-guide .tajweed.tajweed-madda_normal,
.quran-tajweed-guide .tajweed.tajweed-madda-normal,
.quran-tajweed-guide .tajweed.tajweed-madda_permissible,
.quran-tajweed-guide .tajweed.tajweed-madda-permissible,
.quran-tajweed-guide .tajweed.tajweed-madda_necessary,
.quran-tajweed-guide .tajweed.tajweed-madda-necessary,
.quran-tajweed-guide .tajweed.tajweed-madda_obligatory,
.quran-tajweed-guide .tajweed.tajweed-madda-obligatory {
  font-weight: 700;
}
@media (max-width:900px) {
  .quran-info-btn {
    min-height: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    width: 30px !important;
    padding: 0 !important;
  }
  .quran-info-dot {
    width: 15px;
    height: 15px;
    font-size: .7rem;
  }
}
@media (max-width:900px) {
  .player-top-row {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 6px !important;
  }
  .player-selects {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto !important;
    gap: 6px !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }
  .player-selects label {
    min-width: 0 !important;
    width: 100% !important;
  }
  .player-selects select {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 32px !important;
    height: 32px !important;
    line-height: 1.25 !important;
    padding: 4px 22px 4px 8px !important;
    text-align: left !important;
    text-align-last: left !important;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
  }
  .quran-panel-toggle {
    align-self: center !important;
    justify-self: auto !important;
    min-width: 30px !important;
    width: 30px !important;
    min-height: 30px !important;
    height: 30px !important;
    padding: 0 !important;
    flex: 0 0 30px !important;
  }
  .quran-panel-toggle span {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .quran-controls-drawer .player-controls-row.primary-controls {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 2px !important;
    overflow: hidden !important;
  }
  .quran-controls-drawer .player-controls-row.primary-controls .icon-btn.quran-icon-btn {
    flex: 0 0 24px !important;
    min-width: 24px !important;
    width: 24px !important;
    min-height: 24px !important;
    height: 24px !important;
    padding: 0 !important;
    border-radius: 7px !important;
  }
  .quran-controls-drawer .player-controls-row.primary-controls .icon-btn.quran-icon-btn .icon {
    width: 12px !important;
    height: 12px !important;
  }
  .quran-controls-drawer .player-controls-row.primary-controls .icon-label {
    display: none !important;
  }
  .hadith-shell .hadith-layout,
  .hadith-shell .hadith-results,
  .hadith-shell .hadith-list,
  .hadith-shell .hadith-card,
  .hadith-shell .hadith-toolbar {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}
@media (max-width:900px) {
  .quran-search-controls .quran-verse-search,
  .hadith-filters input.search {
    font-size: 16px !important;
    min-height: 34px !important;
    height: 34px !important;
    line-height: 1.25 !important;
    padding: 6px 10px !important;
  }
}
