/* Qurany — Redesigned Apple Music + YouTube Music Hybrid UI */

[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }

:root {
  color-scheme: dark;
  --bg: #121215;
  --bg-elevated: #1c1c20;
  --sidebar-bg: #1c1c1f;
  --surface: #232328;
  --surface-hover: #2c2c33;
  --text: #f5f5f7;
  --muted: #9b9ba5;
  --line: rgba(255, 255, 255, 0.085);
  --line-strong: rgba(255, 255, 255, 0.16);
  --lime: #c9f04b;
  --lime-ink: #121608;
  --lav: #d4a6ef;
  --danger: #ff5c6c;
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.52);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.36);
  --sidebar-w: 240px;
  --radius-card: 10px;
  --ease-ios: cubic-bezier(0.22, 1, 0.36, 1);
}

body.light {
  color-scheme: light;
  --bg: #f5f5f7;
  --bg-elevated: #ffffff;
  --sidebar-bg: #ededf0;
  --surface: #ffffff;
  --surface-hover: #f0f0f4;
  --text: #1c1c1e;
  --muted: #6c6c74;
  --line: rgba(0, 0, 0, 0.08);
  --line-strong: rgba(0, 0, 0, 0.15);
  --lime: #5a7a0e;
  --lime-ink: #ffffff;
  --lav: #7a42a0;
  --shadow-lg: 0 20px 52px rgba(0, 0, 0, 0.12);
  --shadow-md: 0 10px 26px rgba(0, 0, 0, 0.08);
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "IBM Plex Sans Arabic", "Alexandria", -apple-system, BlinkMacSystemFont, sans-serif;
  overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

body {
  background:
    radial-gradient(ellipse 65% 40% at 85% -6%, rgba(84, 48, 92, 0.24), transparent 70%),
    radial-gradient(ellipse 55% 35% at 15% 0%, rgba(26, 68, 74, 0.26), transparent 70%),
    var(--bg);
  background-attachment: fixed;
}

body.light {
  background:
    radial-gradient(ellipse 65% 40% at 85% -6%, rgba(var(--accent-rgb), 0.12), transparent 70%),
    var(--bg);
}

button, input, select { font: inherit; color: inherit; }
button {
  cursor: pointer;
  border: 0;
  background: transparent;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
a { color: inherit; text-decoration: none; }
svg { display: block; flex-shrink: 0; }
button:focus-visible, a:focus-visible, select:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 2px;
}

/* ==========================================================================
   Desktop Left Sidebar (Apple Music Style)
   ========================================================================== */
.sidebar {
  position: fixed;
  z-index: 60;
  top: 0;
  bottom: 0;
  left: 0;
  width: var(--sidebar-w);
  padding: 22px 14px 20px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
  direction: rtl;
}

.sidebar .brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 4px 10px 6px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #211e2b, #111116);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #f5f5f7;
  flex-shrink: 0;
}
.brand-mark svg { width: 23px; height: 23px; }
.brand-text {
  font: 700 18px/1.1 "Alexandria", "IBM Plex Sans Arabic", sans-serif;
  letter-spacing: -0.3px;
}
.brand-text small {
  display: block;
  font: 400 10px "IBM Plex Sans Arabic", sans-serif;
  color: var(--muted);
  margin-top: 2px;
}

.sidebar-nav, .sidebar-tools {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar .nav-item {
  width: 100%;
  height: 40px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
  text-align: right;
  transition: background 0.16s ease, color 0.16s ease;
}
.sidebar .nav-item svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sidebar .nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}
body.light .sidebar .nav-item:hover {
  background: rgba(0, 0, 0, 0.05);
}
.sidebar .nav-item.active {
  background: rgba(255, 255, 255, 0.11);
  color: var(--text);
  font-weight: 600;
}
body.light .sidebar .nav-item.active {
  background: rgba(0, 0, 0, 0.08);
}
.sidebar .nav-item.active svg {
  color: var(--lime);
}

.sidebar-divider {
  height: 1px;
  background: var(--line);
  margin: 0 6px;
}
.sidebar-tools { margin-top: auto; }

#themeBtn .icon-moon,
#mobileThemeTrigger .icon-moon { display: none; }
body.light #themeBtn .icon-sun,
body.light #mobileThemeTrigger .icon-sun { display: none; }
body.light #themeBtn .icon-moon,
body.light #mobileThemeTrigger .icon-moon { display: block; }

/* Mobile Top Header (Hidden on Desktop) */
.mobile-topbar {
  display: none;
}

.offline-bar {
  position: sticky;
  top: 0;
  z-index: 55;
  margin: 10px auto 0;
  width: min(calc(100% - 28px), 960px);
  padding: 9px 14px;
  border-radius: 10px;
  background: rgba(255, 92, 108, 0.16);
  border: 1px solid rgba(255, 92, 108, 0.42);
  color: #ff9da7;
  font-size: 12px;
  text-align: center;
}

/* ==========================================================================
   Main App Container
   ========================================================================== */
#app {
  margin-left: var(--sidebar-w);
  padding: 26px clamp(24px, 3.6vw, 48px) 115px;
  min-height: 100vh;
}
#app main {
  max-width: 1380px;
  margin: 0 auto;
}
.page {
  display: none;
  animation: pageIn 0.24s var(--ease-ios);
}
.page.active { display: block; }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* ==========================================================================
   Home Top: YouTube Music Search + Filter Chips
   ========================================================================== */
.home-top-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 26px;
}

.welcome-row { padding: 4px 0 0; }
.kicker, .eyebrow {
  font-size: 11px;
  font-weight: 600;
  color: var(--lav);
  letter-spacing: 0.4px;
}
.welcome-row h1 {
  margin: 4px 0 0;
  font: 700 clamp(24px, 2.5vw, 34px)/1.25 "Alexandria", "IBM Plex Sans Arabic", sans-serif;
  letter-spacing: -0.5px;
}
.welcome-row h1 em {
  font-style: normal;
  color: var(--lime);
}

.search-box {
  height: 44px;
  max-width: 560px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  transition: background 0.18s ease, border-color 0.18s ease;
}
body.light .search-box {
  background: #ffffff;
  border-color: var(--line-strong);
}
.search-box:focus-within {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.24);
}
body.light .search-box:focus-within {
  background: #ffffff;
  border-color: var(--lime);
}
.search-box .search-icon {
  display: grid;
  place-items: center;
  color: var(--muted);
}
.search-box .search-icon svg,
.search-box button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.search-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 13.5px;
  color: var(--text);
}
.search-box input::placeholder { color: var(--muted); }
.search-box input:focus-visible { outline: none; }
.search-box button {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--muted);
}
.search-box button:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.global-search-results {
  max-width: 720px;
  background: var(--bg-elevated);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  padding: 12px;
  box-shadow: var(--shadow-lg);
  display: grid;
  gap: 12px;
}
.gs-group-title { font-size: 11px; color: var(--lav); font-weight: 600; margin: 2px 6px 6px; }
.gs-items { display: grid; gap: 6px; }
.gs-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--surface);
  text-align: right;
  transition: background 0.15s ease;
}
.gs-item:hover { background: var(--surface-hover); }
.gs-item img { width: 40px; height: 40px; border-radius: 7px; object-fit: cover; flex-shrink: 0; }
.gs-item b { display: block; font-size: 13px; font-weight: 600; }
.gs-item small { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }

/* Filter Chips (YouTube Music Style) */
.home-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0;
  scrollbar-width: none;
}
.home-filters::-webkit-scrollbar { display: none; }

.home-filter {
  flex: 0 0 auto;
  height: 34px;
  padding: 0 15px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  transition: background 0.16s ease, color 0.16s ease;
}
body.light .home-filter {
  background: rgba(0, 0, 0, 0.06);
  border-color: transparent;
}
.home-filter:hover {
  background: rgba(255, 255, 255, 0.16);
}
body.light .home-filter:hover {
  background: rgba(0, 0, 0, 0.11);
}
.home-filter.active {
  background: #f2f2f2;
  color: #111111;
  font-weight: 600;
}
body.light .home-filter.active {
  background: #1c1c1e;
  color: #ffffff;
}
.live-dot-mini {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 8px var(--danger);
  animation: livePulse 1.6s infinite;
}
@keyframes livePulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: 0.65; }
}

/* ==========================================================================
   Sections & Headings
   ========================================================================== */
.section-block { margin: 0 0 34px; }
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.section-heading h2 {
  margin: 0;
  font: 700 20px/1.3 "Alexandria", "IBM Plex Sans Arabic", sans-serif;
  letter-spacing: -0.3px;
}
.see-all {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  padding: 4px 6px;
  border-radius: 8px;
  transition: color 0.15s ease, background 0.15s ease;
}
.see-all svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.see-all:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

/* ==========================================================================
   1. Compact Top Section ("Best New Songs" 4-Column Style)
   ========================================================================== */
.compact-songs-grid,
.surah-chips {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px 20px;
}

.pick-card,
.surah-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  width: 100%;
  padding: 8px 6px;
  border-radius: 8px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  transition: background 0.15s ease;
}
.pick-card:hover,
.surah-chip:hover {
  background: rgba(255, 255, 255, 0.06);
}
body.light .pick-card:hover,
body.light .surah-chip:hover {
  background: rgba(0, 0, 0, 0.045);
}

.pick-card img {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 6px;
  object-fit: cover;
  object-position: center 20%;
  background: var(--surface);
  border: 1px solid var(--line);
}
.pick-card span {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chip-num {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--lime);
  font: 600 12px "Alexandria", sans-serif;
}
.surah-chip-copy {
  flex: 1;
  min-width: 0;
}
.surah-chip b {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.surah-chip small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   2 & 3. Large Square Reciter & Radio Cards ("New This Week" / "Recent Releases")
   ========================================================================== */
.reciter-list.cards-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(168px, calc((100% - 90px) / 6));
  gap: 18px;
  overflow-x: auto;
  padding: 2px 2px 12px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.reciter-list.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 22px 18px;
}

.reciter-row {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: right;
  cursor: pointer;
  scroll-snap-align: start;
}

.avatar-wrap {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
}
.reciter-row img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
  transition: transform 0.25s var(--ease-ios), filter 0.25s ease;
}
.reciter-row:hover .avatar-wrap img {
  transform: scale(1.03);
  filter: brightness(0.84);
}
.reciter-row.is-active .avatar-wrap {
  border-color: var(--lime);
  box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.28), 0 10px 28px rgba(0, 0, 0, 0.36);
}

.live-badge-dot {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--danger);
  border: 2px solid rgba(15, 15, 18, 0.9);
  box-shadow: 0 0 10px var(--danger);
  animation: livePulse 1.6s infinite;
}

.row-actions {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.reciter-row:hover .row-actions,
.reciter-row:focus-within .row-actions,
.reciter-row.is-active .row-actions {
  opacity: 1;
  transform: none;
}

.row-fav,
.row-play {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(18, 18, 22, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #ffffff;
  transition: transform 0.15s ease, background 0.15s ease;
}
.row-fav svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
}
.row-fav.liked { color: var(--danger); }
.row-fav.liked svg { fill: var(--danger); stroke: var(--danger); }
.row-play svg { width: 13px; height: 13px; fill: currentColor; }
.row-play:hover,
.reciter-row.is-active .row-play {
  background: var(--lime);
  color: var(--lime-ink);
  border-color: var(--lime);
  transform: scale(1.06);
}

.row-info {
  padding: 9px 2px 0;
  min-width: 0;
}
.reciter-row strong {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.reciter-row small {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.badge-24 {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--lime);
  font-size: 11px;
  font-weight: 600;
}
.badge-riwaya {
  color: var(--muted);
  font-size: 11px;
}

/* ==========================================================================
   Subpages Intro & Controls
   ========================================================================== */
.page-intro { padding: 6px 0 18px; }
.page-intro h1 {
  margin: 4px 0 6px;
  font: 700 clamp(24px, 3vw, 32px)/1.25 "Alexandria", "IBM Plex Sans Arabic", sans-serif;
}
.page-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.result-count {
  font-size: 13px;
  color: var(--lime);
  font-weight: 600;
  margin-inline-start: 6px;
}

.page-controls-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}
.page-controls-bar .search-box.always {
  max-width: 420px;
  margin: 0;
}
.surah-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.filter-chip {
  height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
}
body.light .filter-chip { background: rgba(0, 0, 0, 0.05); }
.filter-chip:hover { color: var(--text); }
.filter-chip.active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
  font-weight: 600;
}

/* ==========================================================================
   Reciter Detail / Surahs Page (Apple Music Album View)
   ========================================================================== */
.album-hero-shell {
  padding: 18px 22px 20px;
  margin: 0 0 22px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(23, 55, 62, 0.55) 0%, rgba(28, 28, 34, 0.65) 100%);
  border: 1px solid var(--line);
}
body.light .album-hero-shell {
  background: linear-gradient(135deg, rgba(215, 232, 226, 0.65) 0%, rgba(255, 255, 255, 0.9) 100%);
}

.selected-reciter-strip {
  display: flex;
  align-items: flex-end;
  gap: 24px;
}
.album-cover-wrap {
  width: 200px;
  height: 200px;
  flex: 0 0 200px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.44);
}
.selected-reciter-strip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}
.selected-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.album-kicker {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--lime);
}
.selected-copy h1 {
  margin: 0;
  font: 700 clamp(22px, 3vw, 34px)/1.2 "Alexandria", "IBM Plex Sans Arabic", sans-serif;
}
.selected-meta {
  font-size: 13.5px;
  color: var(--muted);
}
.selected-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.preview-pill-btn {
  height: 38px;
  padding: 0 20px;
  border-radius: 999px;
  background: #f5f5f7;
  color: #111114;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
body.light .preview-pill-btn { background: #1c1c1e; color: #ffffff; }
.preview-pill-btn:hover { transform: scale(1.03); }
.preview-pill-btn svg { width: 15px; height: 15px; }

.strip-live-btn {
  height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.16);
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  color: var(--lime);
  font-size: 12.5px;
  font-weight: 600;
}
.change-reciter-btn {
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 12.5px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
body.light .change-reciter-btn { background: rgba(0, 0, 0, 0.06); }
.change-reciter-btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }

.moshaf-bar {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.moshaf-bar-label {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 600;
}
.moshaf-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.moshaf-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 33px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 12px;
  transition: background 0.15s ease, border-color 0.15s ease;
}
body.light .moshaf-chip { background: rgba(0, 0, 0, 0.05); }
.moshaf-chip small { color: var(--muted); font-size: 10.5px; }
.moshaf-chip.active {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--lime-ink);
  font-weight: 600;
}
.moshaf-chip.active small { color: var(--lime-ink); opacity: 0.82; }

.surah-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.surah-toolbar .surah-search { max-width: 360px; margin: 0; }

/* Full-width Apple Music Album Tracklist */
.surah-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--line);
}
.surah-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 14px;
  min-height: 54px;
  border-bottom: 1px solid var(--line);
  border-radius: 6px;
  text-align: right;
  cursor: pointer;
  transition: background 0.14s ease;
}
.surah-row:hover { background: rgba(255, 255, 255, 0.055); }
body.light .surah-row:hover { background: rgba(0, 0, 0, 0.04); }
.surah-row.is-active { background: rgba(var(--accent-rgb), 0.09); }

.surah-row .num {
  width: 32px;
  flex: 0 0 32px;
  text-align: center;
  color: var(--muted);
  font: 500 13px "Alexandria", sans-serif;
}
.surah-row.is-active .num {
  color: var(--lime);
  font-weight: 700;
}
.surah-row .sname {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 500;
}
.surah-row small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}
.surah-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.surah-play-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  transition: background 0.15s ease, color 0.15s ease;
}
body.light .surah-play-btn { background: rgba(0, 0, 0, 0.06); }
.surah-play-btn svg { width: 13px; height: 13px; fill: currentColor; }
.surah-row:hover .surah-play-btn,
.surah-row.is-active .surah-play-btn {
  background: var(--lime);
  color: var(--lime-ink);
}

/* ==========================================================================
   Floating Capsule Mini Player (Apple Music Desktop & Mobile)
   ========================================================================== */
.mini-player {
  position: fixed;
  z-index: 65;
  bottom: 16px;
  left: calc(var(--sidebar-w) + (100% - var(--sidebar-w)) / 2);
  transform: translateX(-50%);
  width: min(600px, calc(100% - var(--sidebar-w) - 48px));
  height: 56px;
  border-radius: 16px;
  background: rgba(32, 32, 37, 0.88);
  backdrop-filter: blur(28px) saturate(1.65);
  -webkit-backdrop-filter: blur(28px) saturate(1.65);
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  overflow: hidden;
}
body.light .mini-player {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(0, 0, 0, 0.1);
}

.mini-controls-start,
.mini-controls-end {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.mini-open {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: right;
  padding: 0 4px;
}
.mini-open img {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 7px;
  object-fit: cover;
  object-position: center 20%;
  background: var(--surface);
}
.mini-meta { flex: 1; min-width: 0; }
.mini-meta b,
.mini-meta small {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mini-meta b { font-size: 13px; font-weight: 600; }
.mini-meta small { font-size: 11px; color: var(--muted); }
.mini-live-badge {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 92, 108, 0.18);
  color: #ff8e99;
  font-size: 10px;
  font-weight: 600;
  flex-shrink: 0;
}

.mini-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--text);
  opacity: 0.85;
  transition: background 0.15s ease, opacity 0.15s ease;
}
.mini-icon-btn:hover { background: rgba(255, 255, 255, 0.1); opacity: 1; }
.mini-icon-btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.mini-icon-btn.liked { color: var(--danger); opacity: 1; }
.mini-icon-btn.liked svg { fill: var(--danger); stroke: var(--danger); }

.mini-play {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--text);
  color: var(--bg);
}
.mini-play svg { width: 15px; height: 15px; fill: currentColor; }

.mini-progress {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  overflow: hidden;
  pointer-events: none;
}
.mini-progress > span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--lime);
  transition: width 0.25s linear;
}
.mini-player.is-live .mini-progress > span {
  width: 40%;
  animation: liveSweep 2s linear infinite;
}
@keyframes liveSweep {
  from { transform: translateX(-110%); }
  to { transform: translateX(260%); }
}

/* ==========================================================================
   Mobile Floating Pill Navigation (Hidden on Desktop)
   ========================================================================== */
.mobile-pill-nav {
  display: none;
}

/* ==========================================================================
   Full-Screen Now Playing View (Apple Music Minimalist Style)
   ========================================================================== */
.now-playing {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  flex-direction: column;
  align-items: center;
  background: #0d161b;
  color: #f5f5f7;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: max(16px, env(safe-area-inset-top)) 22px max(22px, env(safe-area-inset-bottom));
  transform: translate3d(0, 100%, 0);
  opacity: 0;
  transition: transform 0.36s var(--ease-ios), opacity 0.24s ease;
}
.now-playing.open {
  display: flex;
  transform: translate3d(0, 0, 0);
  opacity: 1;
}
.now-playing.is-closing {
  display: flex;
  transform: translate3d(0, 100%, 0);
  opacity: 0;
}
.now-playing.is-dragging {
  transition: none !important;
  transform: translate3d(0, var(--player-drag-y, 0px), 0) !important;
}

.now-bg {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 25%, rgba(28, 72, 82, 0.55), rgba(10, 14, 20, 0.96) 72%);
  pointer-events: none;
  z-index: 0;
}
.now-ambient-img {
  position: fixed;
  inset: -12%;
  width: 124%;
  height: 124%;
  object-fit: cover;
  filter: blur(72px) saturate(1.45) brightness(0.46);
  opacity: 0.72;
  pointer-events: none;
  z-index: 0;
}

.playing-header {
  position: relative;
  z-index: 2;
  width: min(100%, 960px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  margin-bottom: 8px;
}
.close-player-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.1);
  transition: background 0.15s ease, color 0.15s ease;
}
.close-player-btn:hover { background: rgba(255, 255, 255, 0.18); color: #ffffff; }
.close-player-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.player-header-meta { text-align: center; }
.player-header-meta .eyebrow { display: block; font-size: 10.5px; color: rgba(255, 255, 255, 0.6); }
.player-header-meta b { display: block; font-size: 12.5px; font-weight: 500; color: rgba(255, 255, 255, 0.88); }
.header-spacer { width: 36px; }

.now-playing-stage {
  position: relative;
  z-index: 2;
  width: min(100%, 420px);
  margin: auto 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
}

.playing-art {
  position: relative;
  display: grid;
  place-items: center;
}
.art-frame {
  width: min(355px, 76vw, 40dvh);
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  overflow: hidden;
  background: #1b1d24;
  box-shadow: 0 28px 74px rgba(0, 0, 0, 0.56);
  transform: scale(0.95);
  transition: transform 0.4s var(--ease-ios);
}
.now-playing.is-playing .art-frame {
  transform: scale(1);
}
.art-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}

.player-live-pill {
  position: absolute;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(15, 16, 22, 0.82);
  border: 1px solid rgba(255, 92, 108, 0.5);
  color: #ff99a4;
  font-size: 11px;
  font-weight: 600;
  backdrop-filter: blur(10px);
}
.player-live-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--danger);
  animation: livePulse 1.5s infinite;
}

/* Title Row + 2 Circular Buttons (Favorite & •••) */
.playing-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 2px;
}
.playing-info {
  flex: 1;
  min-width: 0;
  text-align: right;
}
.playing-info h1 {
  margin: 0;
  font: 700 clamp(18px, 4.5vw, 22px)/1.3 "Alexandria", "IBM Plex Sans Arabic", sans-serif;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.playing-info p {
  margin: 2px 0 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.68);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.playing-info-circles {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.circle-action-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.13);
  color: rgba(255, 255, 255, 0.9);
  transition: background 0.15s ease, transform 0.15s ease;
}
.circle-action-btn:hover { background: rgba(255, 255, 255, 0.22); }
.circle-action-btn:active { transform: scale(0.93); }
.circle-action-btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.player-favorite.liked { color: var(--danger); background: rgba(255, 92, 108, 0.2); }
.player-favorite.liked svg { fill: var(--danger); stroke: var(--danger); }

/* Dropdown Menu from (•••) Button */
.more-menu-anchor { position: relative; }
.player-more-menu {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 0;
  z-index: 30;
  width: 224px;
  max-height: 60dvh;
  overflow-y: auto;
  padding: 6px;
  border-radius: 14px;
  background: rgba(28, 30, 38, 0.96);
  backdrop-filter: blur(28px) saturate(1.6);
  -webkit-backdrop-filter: blur(28px) saturate(1.6);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.58);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.menu-row-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 9px;
  font-size: 13px;
  color: #f5f5f7;
  text-align: right;
  transition: background 0.14s ease;
}
.menu-row-btn:hover { background: rgba(255, 255, 255, 0.1); }
.menu-row-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.85;
}
.menu-row-btn .menu-badge {
  margin-inline-start: auto;
  font-size: 11px;
  color: var(--lime);
}
.menu-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 4px 6px;
}
.menu-seek-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
}
.menu-mini-pill {
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 12px;
  font-weight: 600;
  color: #f5f5f7;
}
.menu-mini-pill:hover { background: rgba(255, 255, 255, 0.16); }

/* Scrubber & Time */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.timeline input[type="range"],
.volume-control input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0.9) 0%,
    rgba(255, 255, 255, 0.9) var(--val, 0%),
    rgba(255, 255, 255, 0.22) var(--val, 0%),
    rgba(255, 255, 255, 0.22) 100%
  );
  cursor: pointer;
}
.timeline input[type="range"]::-webkit-slider-thumb,
.volume-control input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  cursor: pointer;
}
.time-readout {
  display: flex;
  justify-content: space-between;
  direction: ltr;
  font: 500 11px "Alexandria", sans-serif;
  color: rgba(255, 255, 255, 0.58);
}

.live-stream-bar { padding: 4px 0; }
.live-progress-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  overflow: hidden;
  position: relative;
}
.live-progress-track span {
  position: absolute;
  inset: 0;
  width: 40%;
  background: var(--lime);
  animation: liveSweep 2.1s linear infinite;
}
.live-stream-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.72);
}
.live-stream-meta i {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
  margin-inline-end: 5px;
}

/* Main Transport Controls */
.main-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 10px;
}
.player-tool {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.65);
  transition: color 0.15s ease, background 0.15s ease;
}
.player-tool:hover { color: #ffffff; background: rgba(255, 255, 255, 0.08); }
.player-tool.active { color: var(--lime); }
.player-tool.repeat-one::after {
  content: "1";
  position: absolute;
  bottom: 2px;
  right: 2px;
  font: 700 8px "Alexandria", sans-serif;
  color: var(--lime);
}
.player-tool svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skip-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #ffffff;
  transition: transform 0.15s ease, background 0.15s ease;
}
.skip-btn:hover { background: rgba(255, 255, 255, 0.1); }
.skip-btn:active { transform: scale(0.9); }
.skip-btn svg { width: 24px; height: 24px; }

.big-play {
  position: relative;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  transition: transform 0.15s ease, background 0.15s ease;
}
.big-play:hover { background: rgba(255, 255, 255, 0.2); transform: scale(1.04); }
.big-play:active { transform: scale(0.94); }
.big-play svg { width: 28px; height: 28px; fill: currentColor; }

.is-buffering .big-play::after,
.is-buffering .mini-play::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--lime);
  animation: qspin 0.7s linear infinite;
}
@keyframes qspin { to { transform: rotate(360deg); } }

/* Volume Control Slider */
.volume-control {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 6px;
}
.vol-icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: rgba(255, 255, 255, 0.62);
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* ==========================================================================
   Overlays: Ayahs Sheet & Queue Drawer
   ========================================================================== */
.ayah-overlay,
.queue-drawer {
  position: fixed;
  inset: 0;
  z-index: 105;
  background: rgba(0, 0, 0, 0.64);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.ayah-sheet,
.queue-sheet {
  width: min(560px, 100%);
  max-height: 78dvh;
  background: #181920;
  color: #f5f5f7;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px 24px 0 0;
  padding: 16px 18px max(20px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
  animation: sheetUp 0.28s var(--ease-ios);
}
body.light .ayah-sheet,
body.light .queue-sheet {
  background: #ffffff;
  color: #1c1c1e;
}
@keyframes sheetUp {
  from { transform: translateY(30px); opacity: 0.4; }
  to { transform: none; opacity: 1; }
}
.ayah-sheet::before,
.queue-sheet::before {
  content: "";
  width: 38px;
  height: 4px;
  border-radius: 99px;
  background: rgba(155, 155, 165, 0.45);
  margin: -4px auto 4px;
  flex-shrink: 0;
}

.ayah-sheet-head,
.queue-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}
.ayah-sheet-head h2 { margin: 2px 0 0; font: 700 20px "Alexandria", sans-serif; }
.queue-sheet-head b { display: block; font-size: 16px; }
.queue-sheet-head small { display: block; font-size: 11.5px; color: var(--muted); }
.round-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.1);
  color: inherit;
}
body.light .round-icon { background: rgba(0, 0, 0, 0.07); }
.round-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; }

.ayah-status { text-align: center; font-size: 12px; color: var(--muted); }
.ayah-list,
.queue-sheet-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overscroll-behavior: contain;
}

.ayah-item {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  text-align: right;
  color: rgba(245, 245, 247, 0.62);
}
body.light .ayah-item { color: rgba(28, 28, 30, 0.65); }
.ayah-item.is-current {
  background: rgba(var(--accent-rgb), 0.12);
  border-color: rgba(var(--accent-rgb), 0.35);
  color: var(--lime);
}
.ayah-number {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: 1px solid currentColor;
  display: grid;
  place-items: center;
  font: 600 11px "Alexandria", sans-serif;
  margin-top: 4px;
}
.ayah-text {
  font: 400 clamp(19px, 4.5vw, 24px)/1.95 "Amiri", "IBM Plex Sans Arabic", serif;
  overflow-wrap: anywhere;
}

.queue-section-label { font-size: 11px; font-weight: 600; color: var(--muted); padding: 6px 4px 2px; }
.queue-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid transparent;
  text-align: right;
}
body.light .queue-item { background: rgba(0, 0, 0, 0.045); }
.queue-item.active { border-color: var(--lime); background: rgba(var(--accent-rgb), 0.12); }
.queue-item b { display: block; font-size: 13px; }
.queue-item small { display: block; font-size: 11px; color: var(--muted); }
.queue-item i { font-style: normal; font-size: 11px; color: var(--lime); }

/* ==========================================================================
   States, Skeletons, Toast
   ========================================================================== */
.empty-state {
  padding: 36px 18px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
}
.loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 110px;
  color: var(--muted);
  font-size: 13px;
}
.loading-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(var(--accent-rgb), 0.25);
  border-top-color: var(--lime);
  border-radius: 50%;
  animation: qspin 0.7s linear infinite;
}
.load-error {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
}
.load-error button {
  margin-inline-start: auto;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 12px;
}

.skeleton-card {
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-card);
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-hover) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite;
}
.skeleton-compact {
  height: 58px;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-hover) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

.toast {
  position: fixed;
  z-index: 120;
  top: max(16px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(28, 29, 36, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.toast.show { opacity: 1; }

/* ==========================================================================
   Admin Screen
   ========================================================================== */
.admin-screen {
  position: fixed;
  inset: 0;
  z-index: 110;
  overflow: auto;
  background: var(--bg);
  padding: 0 22px 48px;
}
.admin-shell { max-width: 1040px; margin: 0 auto; }
.admin-top {
  height: 70px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.back-site {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--lime);
  font-size: 12.5px;
  font-weight: 600;
}
.back-site svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.admin-title { padding: 26px 0 18px; }
.admin-title h1 { margin: 4px 0; font-size: 28px; }
.admin-title p { color: var(--muted); font-size: 13px; }
.login-card {
  max-width: 420px;
  margin: 28px auto;
  padding: 26px;
  border-radius: 18px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
}
.login-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: rgba(var(--accent-rgb), 0.14);
  color: var(--lime);
  display: grid;
  place-items: center;
}
.login-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.login-card label, .admin-card label { display: block; font-size: 12px; color: var(--muted); margin: 14px 0; }
.login-card input, .admin-card input, .admin-card select {
  width: 100%;
  margin-top: 6px;
  padding: 11px 12px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  font-size: 13px;
}
.admin-primary {
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--lime);
  color: var(--lime-ink);
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.admin-primary svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.auth-message { color: var(--danger); font-size: 12px; margin-top: 10px; }
.admin-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 10px; flex-wrap: wrap; }
.admin-tabs { display: flex; gap: 8px; }
.tab, .logout-btn, .cancel-btn {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 12px;
}
.tab.active { background: var(--lime); color: var(--lime-ink); font-weight: 600; }
.logout-btn { color: var(--danger); }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.admin-card { background: var(--bg-elevated); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.admin-wide { grid-column: 1 / -1; }
.card-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.card-symbol svg { width: 22px; height: 22px; fill: none; stroke: var(--lime); stroke-width: 1.8; }
.count-badge { padding: 4px 10px; border-radius: 999px; background: rgba(var(--accent-rgb), 0.16); color: var(--lime); font-size: 12px; }
.form-actions { display: flex; gap: 8px; }
.admin-check { display: flex !important; align-items: center; gap: 8px; color: var(--text) !important; }
.admin-check input { width: 16px !important; height: 16px; margin: 0 !important; accent-color: var(--lime); }
.admin-list, .admin-track-list { display: grid; gap: 8px; max-height: 420px; overflow-y: auto; }
.admin-row, .admin-track-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
}
.admin-row img { width: 42px; height: 42px; border-radius: 8px; object-fit: cover; }
.admin-row span { flex: 1; font-size: 12.5px; }
.admin-row button, .admin-track-actions button { padding: 6px 10px; border-radius: 7px; background: var(--surface); font-size: 11px; }
.admin-row button[data-delete], .admin-track-actions .danger { color: var(--danger); }

/* ==========================================================================
   Tablet & Mobile Responsive Layout
   ========================================================================== */
@media (max-width: 1180px) {
  .compact-songs-grid,
  .surah-chips {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .reciter-list.cards-row {
    grid-auto-columns: minmax(160px, calc((100% - 54px) / 4));
  }
}

@media (max-width: 900px) {
  .sidebar { display: none; }

  .mobile-topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    height: calc(58px + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) 16px 0;
    background: rgba(18, 18, 21, 0.84);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  body.light .mobile-topbar { background: rgba(245, 245, 247, 0.88); }

  .mobile-topbar .brand {
    display: flex;
    align-items: center;
    gap: 9px;
  }
  .mobile-topbar .brand-mark { width: 32px; height: 32px; border-radius: 9px; }
  .mobile-topbar .brand-text { font-size: 17px; }
  .mobile-top-actions { display: flex; align-items: center; gap: 8px; }

  .icon-circle-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--line);
  }
  body.light .icon-circle-btn { background: rgba(0, 0, 0, 0.06); }
  .icon-circle-btn svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.85;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  #app {
    margin-left: 0;
    padding: 16px 16px calc(158px + env(safe-area-inset-bottom));
  }

  .desktop-only { display: none; }

  /* Floating Pill Bottom Nav (Matching Reference #6) */
  .mobile-pill-nav {
    position: fixed;
    z-index: 70;
    left: 50%;
    transform: translateX(-50%);
    bottom: max(12px, env(safe-area-inset-bottom));
    width: min(420px, calc(100% - 24px));
    height: 62px;
    padding: 5px;
    border-radius: 999px;
    background: rgba(24, 24, 28, 0.92);
    backdrop-filter: blur(26px) saturate(1.7);
    -webkit-backdrop-filter: blur(26px) saturate(1.7);
    border: 1px solid rgba(255, 255, 255, 0.11);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.52);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2px;
  }
  body.light .mobile-pill-nav {
    background: rgba(255, 255, 255, 0.94);
    border-color: rgba(0, 0, 0, 0.09);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
  }

  .pill-nav-item {
    flex: 1;
    min-width: 0;
    height: 100%;
    border-radius: 999px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 500;
    transition: background 0.18s ease, color 0.18s ease;
  }
  .pill-nav-item svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.85;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .pill-nav-item.active {
    background: rgba(255, 255, 255, 0.13);
    color: var(--lime);
    font-weight: 600;
  }
  body.light .pill-nav-item.active {
    background: rgba(90, 122, 14, 0.12);
    color: var(--lime);
  }

  /* Mobile Mini Player floating right above Pill Nav */
  .mini-player {
    left: 12px;
    right: 12px;
    transform: none;
    width: auto;
    bottom: calc(82px + env(safe-area-inset-bottom));
    height: 56px;
    border-radius: 18px;
    padding: 6px 10px;
  }

  .reciter-list.cards-row {
    grid-auto-columns: minmax(146px, 43vw);
    gap: 12px;
  }
  .reciter-list.cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 12px;
  }
  .compact-songs-grid,
  .surah-chips {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 10px;
  }
  .pick-card { gap: 8px; padding: 7px 4px; }
  .pick-card img { width: 40px; height: 40px; flex-basis: 40px; }
  .pick-card span { font-size: 11.5px; }

  /* Touch devices: keep subtle corner actions usable */
  @media (hover: none) {
    .row-actions { opacity: 1; transform: none; }
  }

  /* Mobile Reciter Album View */
  .album-hero-shell { padding: 18px 16px; }
  .selected-reciter-strip {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
  }
  .album-cover-wrap { width: 168px; height: 168px; flex: 0 0 168px; }
  .selected-actions { justify-content: center; }

  .admin-grid { grid-template-columns: 1fr; }
  .admin-wide { grid-column: auto; }
}

@media (max-height: 700px) and (max-width: 600px) {
  .art-frame { width: min(215px, 56vw, 33dvh); }
  .now-playing-stage { gap: 11px; }
}

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

/* Desktop Apple Music-style dock: full-width across the content pane. */
@media (min-width: 901px) {
  .mini-player {
    left: var(--sidebar-w);
    right: 0;
    bottom: 0;
    transform: none;
    width: auto;
    height: 70px;
    border-radius: 12px 0 0 0;
    padding: 8px 22px;
    background: rgba(28, 28, 31, 0.96);
  }
  body.light .mini-player { background: rgba(255, 255, 255, 0.97); }
  .mini-player .mini-progress { left: 0; right: 0; }
}


/* v31: viewport-locked player, compact overlays, consistent LTR media timeline. */
.now-playing {
  inset: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  overscroll-behavior: none;
  scrollbar-width: none;
  padding-top: max(12px, env(safe-area-inset-top));
  padding-bottom: max(12px, env(safe-area-inset-bottom));
}
.now-playing::-webkit-scrollbar { display: none; }
.now-playing-stage { min-height: 0; flex: 0 1 auto; }
.now-ambient-img { position: absolute; inset: 0; width: 100%; height: 100%; }
#seek { direction: ltr; }

/* Live radio has no elapsed-duration scrubber: show a stable live indicator instead. */
.live-progress-track span {
  left: 0;
  right: auto;
  top: 0;
  bottom: 0;
  width: 40%;
  background: var(--lime);
  animation: none !important;
}
.mini-player.is-live .mini-progress > span {
  width: 40%;
  animation: none !important;
  transform: none !important;
  background: var(--lime);
}

/* The overlay's own list scrolls; gestures here must never close the whole player. */
.ayah-overlay,
.queue-drawer { overscroll-behavior: none; touch-action: pan-y; }
.ayah-sheet,
.queue-sheet {
  width: min(680px, 100%);
  max-height: min(80dvh, 720px);
  padding: 14px 18px max(16px, env(safe-area-inset-bottom));
  gap: 8px;
}
.ayah-sheet-head h2 { font-size: 18px; }
.ayah-status { font-size: 11px; line-height: 1.45; }
.ayah-list,
.queue-sheet-list {
  overscroll-behavior: contain;
  touch-action: pan-y;
  scrollbar-gutter: stable;
}
.ayah-list { gap: 0; }
.ayah-item {
  gap: 8px;
  padding: 7px 6px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 7px;
  background: transparent;
}
.ayah-item.is-current {
  background: rgba(var(--accent-rgb), 0.09);
  border-bottom-color: rgba(var(--accent-rgb), 0.2);
}
.ayah-number {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  font-size: 10px;
  margin-top: 3px;
}
.ayah-text { font-size: clamp(17px, 3vw, 21px); line-height: 1.72; }

/* A calmer album-tracklist style for the queue instead of floating chunky tiles. */
.queue-sheet { max-height: min(84dvh, 760px); }
.queue-sheet-head { padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.queue-item {
  min-height: 50px;
  padding: 9px 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
}
.queue-item:hover { background: rgba(255, 255, 255, 0.055); }
body.light .queue-item:hover { background: rgba(0, 0, 0, 0.04); }
.queue-item.active { background: rgba(var(--accent-rgb), 0.09); border-bottom-color: rgba(var(--accent-rgb), 0.24); }
.queue-section-label { padding: 12px 4px 5px; }

/* Admin catalogue: searchable source-aware list and a clear image preview. */
.admin-list-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 9px;
  margin: 0 0 12px;
}
.admin-list-tools input,
.admin-list-tools select {
  min-width: 0;
  width: 100%;
  padding: 9px 11px;
  border-radius: 9px;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  font-size: 12px;
}
.admin-list { max-height: min(62dvh, 680px); }
.admin-row { min-height: 64px; }
.admin-row img { width: 48px; height: 48px; flex: 0 0 48px; }
.admin-row-copy { flex: 1; min-width: 0; display: grid; gap: 3px; }
.admin-row-copy small { display: block; color: var(--muted); font-size: 10.5px; }
.admin-source-badge {
  display: inline-flex;
  align-self: start;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.1);
  color: var(--lime);
  font-size: 9.5px;
}
.admin-row button[data-image-edit] { color: var(--lime); white-space: nowrap; }
.admin-image-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 10px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  color: var(--muted);
  font-size: 11px;
}
.admin-image-preview img {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  border-radius: 9px;
  object-fit: cover;
  background: var(--surface);
}
.admin-image-preview img:not([src]),
.admin-image-preview img[src=""] { display: none; }
.admin-row-empty { padding: 22px 12px; text-align: center; color: var(--muted); font-size: 12px; }

@media (max-width: 600px) {
  .admin-list-tools { grid-template-columns: 1fr; }
  .admin-row { flex-wrap: wrap; }
  .admin-row-copy { min-width: calc(100% - 100px); }
  .ayah-sheet { max-height: 76dvh; padding-inline: 14px; }
  .queue-sheet { max-height: 82dvh; padding-inline: 14px; }
}

@media (max-height: 680px) {
  .now-playing { padding-top: max(8px, env(safe-area-inset-top)); padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  .now-playing-stage { gap: 10px; }
  .art-frame { width: min(260px, 62vw, 32dvh); }
  .playing-header { margin-bottom: 2px; }
}

.pick-card .pick-card-copy { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; line-height: 1.3; }
.pick-card .pick-card-copy b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 650; }
.pick-card .pick-card-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 10px; }
@media (max-width: 900px) {
  .pick-card .pick-card-copy b { font-size: 11px; }
  .pick-card .pick-card-copy small { font-size: 9.5px; }
}


/* Qurany polish: clearer active states in light mode and a calmer player language. */
body.light .filter-chip.active,
body.light .moshaf-chip.active,
body.light .home-filter.active {
  background: #dcebb0;
  border-color: #b8d46b;
  color: #1c2410;
  font-weight: 700;
}
body.light .moshaf-chip.active small { color: #1c2410; opacity: .72; }

/* Keep the live indicator intentionally monochrome instead of splitting the bar into two colors. */
.live-progress-track span { background: var(--lime); }

/* Lift the artwork slightly so the title/control area breathes on compact screens. */
.playing-art { transform: translateY(-12px); }

/* The active reader control uses the same readable pause mark as the full player. */
.row-play svg rect { fill: currentColor; }

/* Refined sheets: quiet surfaces, stronger hierarchy, and less visual weight. */
.ayah-sheet, .queue-sheet {
  background: color-mix(in srgb, var(--bg-elevated) 94%, var(--lime) 6%);
  border-color: color-mix(in srgb, var(--line-strong) 78%, var(--lime) 22%);
  box-shadow: 0 24px 70px rgba(0,0,0,.28);
}
.ayah-sheet-head, .queue-sheet-head { padding-bottom: 12px; }
.ayah-status { color: var(--text); opacity: .72; }
.queue-item.active { box-shadow: inset 3px 0 0 var(--lime); }

@media (max-width: 900px) {
  .mini-player .mini-controls-start { gap: 1px; }
  .mini-player .mini-icon-btn { width: 30px; height: 30px; }
  .mini-player .mini-play { width: 34px; height: 34px; }
  .playing-art { transform: translateY(-8px); }
}


/* Official Qurany dome mark used consistently in sidebar, mobile header and admin. */
.brand-mark { overflow: hidden; background: #08080b; }
.brand-mark img { width: 100%; height: 100%; display: block; object-fit: cover; }

/* Mini player: media identity stays on the right; transport controls stay on the left. */
.mini-player { direction: ltr; }
.mini-player .mini-controls-start { order: 1; }
.mini-player .mini-open { order: 2; direction: rtl; }
.mini-player .mini-controls-end { order: 3; }
.mini-player .mini-open { text-align: right; }

/* Compact reader picker shown when a user starts from the general Quran list. */
.reciter-picker-overlay {
  position: fixed; inset: 0; z-index: 120; display: flex; align-items: flex-end; justify-content: center;
  padding: 14px; background: rgba(0,0,0,.58); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.reciter-picker-sheet {
  width: min(520px, 100%); max-height: min(78dvh, 680px); overflow: auto; padding: 20px;
  border: 1px solid var(--line-strong); border-radius: 26px; background: var(--bg-elevated);
  box-shadow: 0 28px 80px rgba(0,0,0,.42); animation: sheetUp .26s var(--ease-ios);
}
.reciter-picker-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:14px; }
.reciter-picker-head h2 { margin: 4px 0 3px; font: 700 20px "Alexandria", sans-serif; }
.reciter-picker-head p { margin:0; color:var(--muted); font-size:11.5px; }
.reciter-picker-list { display:grid; gap:7px; }
.reciter-picker-item { display:flex; align-items:center; gap:11px; width:100%; padding:9px; border:1px solid var(--line); border-radius:15px; background:var(--surface); color:var(--text); text-align:right; transition: transform .18s ease, border-color .18s ease, background .18s ease; }
.reciter-picker-item:hover { transform:translateY(-1px); border-color:rgba(var(--accent-rgb),.55); background:rgba(var(--accent-rgb),.08); }
.reciter-picker-item img { width:42px; height:42px; border-radius:12px; object-fit:cover; background:var(--bg); }
.reciter-picker-item span { flex:1; min-width:0; display:grid; gap:3px; }
.reciter-picker-item b { font-size:12.5px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.reciter-picker-item small { color:var(--muted); font-size:10px; }
.reciter-picker-item svg, .reciter-picker-more svg { width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:1.8; }
.reciter-picker-more { display:flex; align-items:center; justify-content:center; gap:7px; width:100%; margin-top:12px; padding:11px; border-radius:12px; background:rgba(var(--accent-rgb),.13); color:var(--lime); font-size:12px; font-weight:700; }

/* Anghami-inspired lyrics mode: a small player identity header and a full reading canvas. */
.ayah-overlay { align-items:stretch; background:rgba(8,8,11,.78); }
.ayah-sheet { width:min(820px,100%); height:100%; max-height:none; border:0; border-radius:0; padding: max(16px,env(safe-area-inset-top)) clamp(18px,4vw,42px) max(18px,env(safe-area-inset-bottom)); background:linear-gradient(180deg, color-mix(in srgb, var(--bg-elevated) 96%, var(--lime) 4%), var(--bg)); }
.ayah-sheet::before { display:none; }
.ayah-sheet-head { min-height:54px; padding-bottom:13px; border-bottom:1px solid var(--line); }
.ayah-compact-player { display:flex; align-items:center; gap:10px; min-width:0; }
.ayah-compact-player img { width:44px; height:44px; flex:0 0 44px; border-radius:11px; object-fit:cover; box-shadow:0 7px 20px rgba(0,0,0,.24); }
.ayah-compact-player h2 { margin:2px 0 1px; font-size:18px; }
.ayah-compact-player small { color:var(--muted); font-size:10px; }
.ayah-status { margin:14px 0 2px; text-align:right; font-size:10.5px; opacity:.62; }
.ayah-list { gap:0; padding: 12px 0 28px; scroll-behavior:smooth; }
.ayah-item { grid-template-columns:30px minmax(0,1fr); padding:14px 8px; border:0; border-bottom:1px solid var(--line); border-radius:0; color:color-mix(in srgb, var(--text) 58%, transparent); }
.ayah-item.is-near { color:color-mix(in srgb, var(--text) 76%, transparent); }
.ayah-item.is-current { background:rgba(var(--accent-rgb),.09); border-color:rgba(var(--accent-rgb),.22); color:var(--text); box-shadow:inset 3px 0 0 var(--lime); }
.ayah-text { font-size:clamp(18px,2.7vw,25px); line-height:1.95; }
body.light .ayah-item { color:rgba(28,28,30,.62); }
body.light .ayah-item.is-current { color:#1c1c1e; }

/* More editorial queue: numbered rows, quiet dividers, and a single active accent. */
.queue-sheet { width:min(620px,100%); }
.queue-item { min-height:62px; padding:10px 8px; border-radius:14px; background:rgba(255,255,255,.035); border:1px solid transparent; }
.queue-item:hover { transform:translateX(-2px); }
.queue-item span { min-width:0; }
.queue-item b { font-size:13px; }
.queue-item small { display:block; margin-top:4px; color:var(--muted); font-size:10.5px; }
.queue-item i { padding:4px 8px; border-radius:999px; background:rgba(var(--accent-rgb),.14); color:var(--lime); font-size:9.5px; font-style:normal; white-space:nowrap; }
.queue-item.active { box-shadow:inset -3px 0 0 var(--lime); background:rgba(var(--accent-rgb),.09); }
@media (max-width:600px) {
  .reciter-picker-overlay { padding: 0; }
  .reciter-picker-sheet { border-radius:26px 26px 0 0; padding-bottom:max(18px,env(safe-area-inset-bottom)); }
  .ayah-text { font-size:20px; line-height:1.9; }
}


/* Offline downloads and refreshed tracklist styling. */
.surah-row-actions { gap: 6px; }
.surah-download-btn {
  width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center;
  color: var(--muted); background: transparent; transition: color .18s ease, background .18s ease, transform .18s ease;
}
.surah-download-btn:hover { color: var(--lime); background: rgba(var(--accent-rgb),.12); transform: translateY(-1px); }
.surah-download-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.surah-download-btn.is-downloaded { color: var(--lime); background: rgba(var(--accent-rgb),.12); }
.surah-download-btn:disabled { opacity: .72; cursor: wait; }
.download-spinner { width: 14px; height: 14px; border: 2px solid rgba(var(--accent-rgb),.24); border-top-color: var(--lime); border-radius: 50%; animation: qspin .7s linear infinite; }

/* Lift the artwork away from the title so the player breathes on mobile and desktop. */
.now-playing-stage { transform: translateY(-16px); }
.art-frame { box-shadow: 0 24px 64px rgba(0,0,0,.48); border: 0; }
@media (max-width:600px) { .now-playing-stage { transform: translateY(-10px); } }

/* Calm reading surface: less green cast, more neutral ink-like contrast. */
.ayah-sheet { background: linear-gradient(180deg, #151a20 0%, #101419 48%, #0c1014 100%) !important; }
body.light .ayah-sheet { background: linear-gradient(180deg, #f7f8f6 0%, #f0f3ef 100%) !important; }
.ayah-sheet-head { border-bottom-color: rgba(255,255,255,.12); }
body.light .ayah-sheet-head { border-bottom-color: rgba(0,0,0,.09); }

/* Refined queue: a quiet list with a distinct current row instead of heavy cards. */
.queue-drawer { background: rgba(3,7,10,.68); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.queue-sheet { background: linear-gradient(180deg,#171d22 0%,#10161b 100%); border: 1px solid rgba(255,255,255,.1); border-radius: 28px 28px 0 0; padding: 18px 16px max(20px,env(safe-area-inset-bottom)); }
.queue-sheet-head { padding: 2px 4px 14px; border-bottom: 1px solid rgba(255,255,255,.1); }
.queue-sheet-head b { font-size: 18px; letter-spacing: -.02em; }
.queue-sheet-head small { margin-top: 4px; }
.queue-sheet-list { gap: 3px; padding-top: 9px; }
.queue-item { position: relative; min-height: 58px; border: 0; border-bottom: 1px solid rgba(255,255,255,.07); border-radius: 12px; background: transparent; padding: 11px 10px; transition: background .18s ease, transform .18s ease; }
.queue-item:hover { background: rgba(255,255,255,.055); transform: none; }
.queue-item.active { background: rgba(var(--accent-rgb),.1); box-shadow: inset -3px 0 0 var(--lime); border-bottom-color: transparent; }
.queue-item.active b { color: var(--lime); }
.queue-item i { background: transparent; padding: 0; font-size: 10px; }
body.light .queue-sheet { background: linear-gradient(180deg,#ffffff 0%,#f5f7f5 100%); border-color: rgba(0,0,0,.1); }
body.light .queue-item { border-bottom-color: rgba(0,0,0,.08); }
body.light .queue-item:hover { background: rgba(0,0,0,.035); }
body.light .queue-item.active { background: rgba(86,116,12,.1); }

/* Downloads navigation and offline library. */
.search-close-hidden { display: none !important; }
.downloads-intro { margin-bottom: 18px; }
.downloads-toolbar { display:flex; align-items:center; justify-content:space-between; min-height:28px; margin-bottom:10px; }
.section-count { color:var(--muted); font-size:11px; }
.text-action { color:var(--lime); font-size:11px; padding:7px 10px; border-radius:9px; background:rgba(var(--accent-rgb),.1); }
.text-action:hover { background:rgba(var(--accent-rgb),.18); }
.download-list { display:grid; gap:8px; }
.download-item { display:flex; align-items:center; gap:12px; min-height:72px; padding:10px 12px; border:1px solid var(--line); border-radius:16px; background:var(--surface); }
.download-item > img { width:48px; height:48px; flex:0 0 48px; border-radius:13px; object-fit:cover; background:var(--bg); }
.download-item-copy { flex:1; min-width:0; display:grid; gap:5px; }
.download-item-copy b { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:13px; }
.download-item-copy small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--muted); font-size:10.5px; }
.download-item-actions { display:flex; align-items:center; gap:5px; }
.download-play-btn, .download-remove-btn { width:32px; height:32px; border-radius:10px; display:grid; place-items:center; }
.download-play-btn { background:var(--lime); color:var(--lime-ink); }
.download-play-btn svg { width:14px; height:14px; fill:currentColor; }
.download-remove-btn { color:var(--muted); font-size:21px; font-weight:300; }
.download-remove-btn:hover { color:var(--danger); background:rgba(255,92,108,.1); }
.downloads-empty { display:grid; place-items:center; gap:8px; min-height:220px; text-align:center; }
.downloads-empty svg { width:34px; height:34px; fill:none; stroke:var(--lime); stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.downloads-empty b { font-size:14px; }
.downloads-empty span { color:var(--muted); font-size:11px; }
/* A live radio has no elapsed progress: make the mini bar a single calm lime line. */
.mini-player.is-live .mini-progress { background:var(--lime) !important; }
.mini-player.is-live .mini-progress > span { width:100% !important; background:var(--lime) !important; animation:none !important; }
@media (max-width:600px) {
  .download-item { padding-inline:10px; }
  .download-item > img { width:44px; height:44px; flex-basis:44px; }
}

/* The mini player keeps the same previous/next actions; only the visual arrow direction is corrected. */


/* Full live player: one uninterrupted lime progress line, matching the mini player. */
.live-stream-bar .live-progress-track { background: var(--lime) !important; }
.live-stream-bar .live-progress-track span { width:100% !important; background:var(--lime) !important; animation:none !important; }
.player-header-meta { display:flex; flex-direction:column; align-items:center; gap:4px; }
.player-header-meta .player-live-pill { position:static; bottom:auto; margin:0; background:rgba(35, 10, 15, .82); border-color:rgba(255, 92, 108, .72); color:#ff9ba5; }
.player-header-meta .player-live-pill[hidden] { display:none; }

/* Native-app interaction polish: no browser blue tap flash or accidental text selection. */
html, body, button, a, [role="button"] { -webkit-user-select:none; user-select:none; -webkit-tap-highlight-color:transparent; }
button:focus, a:focus, [role="button"]:focus { outline:none; }
/* Keep the Quran interface calm while preserving normal text entry in search fields. */
input, textarea { -webkit-tap-highlight-color:transparent; }
.surah-page-backbar { display:flex; align-items:center; min-height:34px; margin-bottom:4px; }
.page-back-btn { display:inline-flex; align-items:center; gap:6px; padding:7px 11px; border:1px solid var(--line); border-radius:11px; color:var(--muted); background:var(--surface); font-size:11px; }
.page-back-btn:hover { color:var(--text); border-color:rgba(var(--accent-rgb),.45); background:rgba(var(--accent-rgb),.08); }
.page-back-btn svg { width:15px; height:15px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.page-back-btn:focus-visible { outline:2px solid var(--lime); outline-offset:2px; }

/* First-run Quran screen: choose a reciter before revealing the surah catalogue. */
.surah-reciter-chooser { display:grid; gap:16px; }
.chooser-heading { padding:4px 0 2px; }
.chooser-heading h2 { margin:6px 0 5px; font-size:20px; letter-spacing:-.03em; }
.chooser-heading p { margin:0; color:var(--muted); font-size:12px; }
.chooser-reciter-grid { display:grid; gap:8px; }
.chooser-reciter-grid .reciter-row { background:var(--surface); }
.chooser-reciter-grid .reciter-row:hover { transform:translateY(-1px); border-color:rgba(var(--accent-rgb),.35); }
.chooser-reciter-grid .row-fav, .reciter-row .row-fav { display:grid; place-items:center; width:30px; height:30px; border-radius:10px; color:var(--muted); }
.reciter-row .row-fav.liked { color:var(--lime); background:rgba(var(--accent-rgb),.12); }
.reciter-row .row-fav svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:1.8; }
.reciter-row .row-fav.liked svg { fill:currentColor; }
@media (min-width:700px) {
  .chooser-reciter-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

/* Compact first-run reciter choices. */
.surah-reciter-chooser .reciter-row { min-height:62px; padding:8px 10px; gap:10px; }
.surah-reciter-chooser .reciter-row .avatar-wrap { width:44px; height:44px; flex-basis:44px; }
.surah-reciter-chooser .reciter-row .row-info strong { font-size:12px; }
.surah-reciter-chooser .reciter-row .row-info small { font-size:9.5px; }
.surah-reciter-chooser .reciter-row .row-actions { gap:4px; }
/* The reader page uses the same hero card on desktop and mobile: artwork/data on the right, back circle on the far left. */
.selected-reciter-strip { position:relative; align-items:center; min-height:168px; padding-left:52px; }
.selected-reciter-strip .page-back-btn { position:absolute; left:2px; top:50%; transform:translateY(-50%); width:38px; height:38px; padding:0; justify-content:center; border-radius:50%; }
.selected-reciter-strip .page-back-btn svg { width:18px; height:18px; }
@media (max-width:600px) {
  .selected-reciter-strip { align-items:stretch; text-align:right; padding-left:48px; gap:12px; }
  .selected-reciter-strip .album-cover-wrap { margin-right:0; margin-left:auto; width:132px; height:132px; flex-basis:132px; }
  .selected-reciter-strip .selected-copy { align-items:flex-start; width:100%; }
  .selected-reciter-strip .selected-actions { justify-content:flex-start; }
  .selected-reciter-strip .page-back-btn { left:0; top:66px; }
}
/* Favorites are grouped by purpose instead of mixing radios, readers, and recitations. */
.favorite-section { grid-column:1 / -1; display:grid; gap:8px; }
.favorite-section-head { display:flex; align-items:center; justify-content:space-between; padding:8px 2px 2px; }
.favorite-section-head h2 { margin:0; font-size:14px; }
.favorite-section-head span { color:var(--muted); font-size:11px; }
.favorite-section-list { display:grid; gap:8px; }

/* Refined compact reader list: horizontal glass rows instead of oversized tiles. */
.chooser-reciter-grid .reciter-row,
.favorite-section-list .reciter-row {
  display:grid;
  grid-template-columns:52px minmax(0,1fr) auto;
  align-items:center;
  min-height:68px;
  padding:8px 10px;
  gap:11px;
  border:1px solid var(--line);
  border-radius:15px;
  background:linear-gradient(135deg, rgba(255,255,255,.055), rgba(255,255,255,.018));
  text-align:right;
}
body.light .chooser-reciter-grid .reciter-row,
body.light .favorite-section-list .reciter-row { background:rgba(255,255,255,.72); }
.chooser-reciter-grid .reciter-row .avatar-wrap,
.favorite-section-list .reciter-row .avatar-wrap {
  width:52px; height:52px; flex:0 0 52px; aspect-ratio:auto; border-radius:13px; box-shadow:none;
}
.chooser-reciter-grid .reciter-row .row-info,
.favorite-section-list .reciter-row .row-info { padding:0; min-width:0; }
.chooser-reciter-grid .reciter-row .row-actions,
.favorite-section-list .reciter-row .row-actions {
  position:static; opacity:1; transform:none; display:flex; gap:5px;
}
.chooser-reciter-grid .reciter-row .row-fav,
.favorite-section-list .reciter-row .row-fav,
.chooser-reciter-grid .reciter-row .row-play,
.favorite-section-list .reciter-row .row-play { width:30px; height:30px; }
.chooser-reciter-grid .reciter-row:hover,
.favorite-section-list .reciter-row:hover { transform:translateY(-1px); border-color:rgba(var(--accent-rgb),.42); }
.chooser-reciter-grid .reciter-row .row-info strong,
.favorite-section-list .reciter-row .row-info strong { font-size:12px; }
.chooser-reciter-grid .reciter-row .row-info small,
.favorite-section-list .reciter-row .row-info small { font-size:9.5px; }
.chooser-reciter-grid { gap:9px; }
.favorite-section-list { gap:7px; }
.favorite-section { gap:4px; }
.favorite-section-head { padding:6px 3px 1px; }
.favorite-section-head h2 { font-size:13px; }
/* A more intentional top-left back control inside the reader hero. */
.selected-reciter-strip .page-back-btn {
  top:14px; left:14px; transform:none; width:42px; height:42px;
  color:var(--text); background:rgba(8,10,14,.66); border-color:rgba(var(--accent-rgb),.38);
  box-shadow:0 8px 24px rgba(0,0,0,.28), inset 0 0 0 1px rgba(255,255,255,.05);
  backdrop-filter:blur(14px); -webkit-backdrop-filter:blur(14px);
}
body.light .selected-reciter-strip .page-back-btn { color:#263019; background:rgba(255,255,255,.82); border-color:rgba(74,94,24,.3); box-shadow:0 6px 18px rgba(30,40,20,.12); }
.selected-reciter-strip .page-back-btn:hover { color:var(--lime); border-color:var(--lime); transform:translateY(-1px); }
@media (max-width:600px) {
  .chooser-reciter-grid .reciter-row,
  .favorite-section-list .reciter-row { grid-template-columns:48px minmax(0,1fr) auto; min-height:62px; padding:7px 8px; gap:9px; }
  .chooser-reciter-grid .reciter-row .avatar-wrap,
  .favorite-section-list .reciter-row .avatar-wrap { width:48px; height:48px; flex-basis:48px; }
  .selected-reciter-strip .page-back-btn { top:12px; left:12px; transform:none; }
}

/* Player menu: refined seek controls with a calm, icon-led treatment. */
.menu-seek-pair { gap:8px; padding:8px 6px 5px; }
.menu-mini-pill {
  min-height:48px; height:auto; padding:7px 8px; border-radius:13px;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px;
  background:linear-gradient(145deg, rgba(255,255,255,.09), rgba(255,255,255,.035));
  border:1px solid rgba(255,255,255,.1); color:var(--text); font-size:10px; font-weight:600;
  transition:transform .18s ease, border-color .18s ease, background .18s ease, color .18s ease;
}
.menu-mini-pill svg { width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; color:var(--muted); }
.menu-mini-pill:hover { background:rgba(var(--accent-rgb),.12); border-color:rgba(var(--accent-rgb),.42); color:var(--lime); transform:translateY(-1px); }
.menu-mini-pill:hover svg { color:var(--lime); }
body.light .menu-mini-pill { background:rgba(0,0,0,.035); border-color:rgba(0,0,0,.1); color:#272d20; }
body.light .menu-mini-pill:hover { background:rgba(99,130,30,.1); border-color:rgba(99,130,30,.35); color:#4d671b; }
/* Polished reader back button: luminous glass circle, not a generic bordered icon. */
.selected-reciter-strip .page-back-btn {
  width:44px; height:44px; border:1px solid rgba(var(--accent-rgb),.5); border-radius:50%;
  background:radial-gradient(circle at 35% 30%, rgba(var(--accent-rgb),.2), rgba(25,28,32,.9) 68%);
  color:#e9f7bd; box-shadow:0 7px 22px rgba(0,0,0,.34), 0 0 0 5px rgba(var(--accent-rgb),.06);
}
.selected-reciter-strip .page-back-btn svg { width:19px; height:19px; stroke-width:2.25; }
.selected-reciter-strip .page-back-btn:hover { color:#fff; background:radial-gradient(circle at 35% 30%, rgba(var(--accent-rgb),.38), rgba(25,28,32,.94) 68%); box-shadow:0 8px 26px rgba(0,0,0,.4), 0 0 0 6px rgba(var(--accent-rgb),.1); transform:translateY(-2px); }
body.light .selected-reciter-strip .page-back-btn { color:#405416; background:radial-gradient(circle at 35% 30%, rgba(var(--accent-rgb),.28), rgba(255,255,255,.96) 70%); border-color:rgba(77,103,27,.42); }

/* Quiet, compact seek controls. */
.menu-seek-pair { gap:5px; padding:5px 4px 3px; }
.menu-mini-pill { min-height:36px; padding:4px 6px; border-radius:10px; gap:2px; font-size:9px; }
.menu-mini-pill svg { width:15px; height:15px; stroke-width:1.7; }
/* Neutral reader back control: subdued glass, no bright lime glow. */
.selected-reciter-strip .page-back-btn {
  width:40px; height:40px; border:1px solid rgba(255,255,255,.16); color:rgba(255,255,255,.72);
  background:rgba(20,22,27,.72); box-shadow:0 4px 14px rgba(0,0,0,.22); backdrop-filter:blur(12px); -webkit-backdrop-filter:blur(12px);
}
.selected-reciter-strip .page-back-btn:hover { color:rgba(255,255,255,.95); background:rgba(255,255,255,.12); border-color:rgba(255,255,255,.28); box-shadow:0 5px 16px rgba(0,0,0,.26); transform:none; }
body.light .selected-reciter-strip .page-back-btn { color:rgba(25,29,24,.7); background:rgba(255,255,255,.7); border-color:rgba(0,0,0,.13); box-shadow:0 4px 12px rgba(0,0,0,.1); }
body.light .selected-reciter-strip .page-back-btn:hover { color:rgba(25,29,24,.95); background:rgba(255,255,255,.9); border-color:rgba(0,0,0,.2); }
/* Favorites follow the compact homepage "listen to who you love" rows. */
.favorite-section-list .reciter-row {
  display:flex; flex-direction:row; align-items:center; gap:12px; min-height:0; padding:8px 6px;
  border:0; border-bottom:1px solid var(--line); border-radius:8px; background:transparent; text-align:right;
}
.favorite-section-list .reciter-row .avatar-wrap { width:46px; height:46px; flex:0 0 46px; aspect-ratio:auto; border-radius:6px; box-shadow:none; }
.favorite-section-list .reciter-row .row-info { flex:1; padding:0; min-width:0; }
.favorite-section-list .reciter-row .row-info strong { font-size:13px; }
.favorite-section-list .reciter-row .row-info small { font-size:10px; }
.favorite-section-list .reciter-row .row-actions { position:static; opacity:1; transform:none; display:flex; gap:4px; }
.favorite-section-list .reciter-row .row-fav,
.favorite-section-list .reciter-row .row-play { width:28px; height:28px; }
.favorite-section-list .reciter-row:hover { transform:none; border-color:var(--line); background:rgba(255,255,255,.06); }
body.light .favorite-section-list .reciter-row:hover { background:rgba(0,0,0,.045); }

/* Library shortcut under the reciter chooser. */
.chooser-more-btn { display:flex; align-items:center; gap:9px; width:100%; margin-top:3px; padding:11px 13px; border:1px solid var(--line); border-radius:12px; background:rgba(255,255,255,.035); color:var(--text); text-align:right; }
.chooser-more-btn span { color:var(--muted); font-size:10px; }
.chooser-more-btn b { font-size:11px; font-weight:600; }
.chooser-more-btn svg { width:16px; height:16px; margin-inline-start:auto; fill:none; stroke:var(--muted); stroke-width:2; }
.chooser-more-btn:hover { background:rgba(255,255,255,.08); border-color:var(--line-strong); }
/* Match Favorites to the exact vertical square cards used by the home sections. */
.favorite-section-list.reciter-list.cards-row { display:grid; grid-auto-flow:column; grid-auto-columns:minmax(168px, calc((100% - 90px) / 6)); gap:18px; overflow-x:auto; padding:2px 2px 12px; scroll-snap-type:x mandatory; scrollbar-width:thin; }
.favorite-section-list.reciter-list.cards-row .reciter-row { display:flex; flex-direction:column; align-items:stretch; min-width:0; padding:0; border:0; border-radius:0; background:transparent; gap:0; text-align:right; }
.favorite-section-list.reciter-list.cards-row .reciter-row .avatar-wrap { width:100%; height:auto; flex:0 0 auto; aspect-ratio:1/1; border-radius:var(--radius-card); box-shadow:0 8px 24px rgba(0,0,0,.24); }
.favorite-section-list.reciter-list.cards-row .reciter-row .row-info { padding:9px 2px 0; }
.favorite-section-list.reciter-list.cards-row .reciter-row .row-info strong { font-size:13px; }
.favorite-section-list.reciter-list.cards-row .reciter-row .row-info small { font-size:10px; }
.favorite-section-list.reciter-list.cards-row .reciter-row .row-actions { position:absolute; top:10px; left:10px; opacity:0; transform:translateY(-2px); }
.favorite-section-list.reciter-list.cards-row .reciter-row:hover .row-actions,
.favorite-section-list.reciter-list.cards-row .reciter-row:focus-within .row-actions { opacity:1; transform:none; }
.favorite-section-list.reciter-list.cards-row .reciter-row:hover { background:transparent; transform:none; border-color:transparent; }
/* iPhone-style seek buttons: icon beside a compact 15− / 15+ value. */
.menu-mini-pill { min-height:34px; flex-direction:row; gap:5px; padding:5px 8px; font-size:11px; }
.menu-mini-pill svg { width:16px; height:16px; }
@media (max-width:600px) { .favorite-section-list.reciter-list.cards-row { grid-auto-columns:150px; gap:12px; } }

/* Mobile header order: brand at physical left, theme/favorites at physical right. */
@media (max-width:900px) {
  .mobile-topbar { direction:ltr; }
  .mobile-topbar .brand { direction:ltr; }
  .mobile-top-actions { direction:ltr; }
  .offline-bar { position:fixed; top:calc(58px + env(safe-area-inset-top) + 8px); left:14px; right:14px; width:auto; margin:0; z-index:45; box-shadow:0 8px 24px rgba(0,0,0,.18); }
}
/* Centered reader hero with quiet controls at both upper corners. */
.selected-reciter-strip { flex-direction:column; align-items:center; justify-content:center; text-align:center; gap:12px; min-height:0; padding:8px 58px 4px; }
.selected-reciter-strip .album-cover-wrap { width:168px; height:168px; flex:0 0 168px; }
.selected-reciter-strip .selected-copy { align-items:center; text-align:center; width:100%; }
.selected-reciter-strip .selected-actions { justify-content:center; flex-wrap:nowrap; margin-top:8px; }
.selected-reciter-strip .page-back-btn { top:14px; left:14px; }
.reciter-fav-action { position:absolute; top:14px; right:14px; width:40px; height:40px; display:grid; place-items:center; border:1px solid rgba(255,255,255,.16); border-radius:50%; color:rgba(255,255,255,.72); background:rgba(20,22,27,.72); box-shadow:0 4px 14px rgba(0,0,0,.22); }
.reciter-fav-action svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.8; }
.reciter-fav-action.liked { color:#ff8290; background:rgba(255,92,108,.12); }
.reciter-fav-action.liked svg { fill:currentColor; }
body.light .reciter-fav-action { color:rgba(25,29,24,.7); background:rgba(255,255,255,.7); border-color:rgba(0,0,0,.13); }
@media (max-width:600px) {
  .selected-reciter-strip { padding:8px 48px 4px; }
  .selected-reciter-strip .album-cover-wrap { width:148px; height:148px; flex-basis:148px; }
  .selected-reciter-strip .selected-actions { gap:6px; }
  .selected-reciter-strip .selected-actions > button { padding-inline:10px; font-size:11px; }
  .reciter-fav-action { top:12px; right:12px; }
}

/* Final reader card layout: horizontal on every screen, portrait on the physical right. */
.selected-reciter-strip {
  position:relative; display:flex; flex-direction:row; direction:rtl; align-items:center; justify-content:flex-start;
  min-height:168px; padding:12px 58px 12px 104px; gap:14px; text-align:right;
}
.selected-reciter-strip .album-cover-wrap { order:1; width:168px; height:168px; flex:0 0 168px; margin:0; }
.selected-reciter-strip .selected-copy { order:2; flex:1 1 auto; min-width:0; width:auto; align-items:flex-start; text-align:right; }
.selected-reciter-strip .selected-copy h1,
.selected-reciter-strip .selected-copy .selected-meta { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:100%; }
.selected-reciter-strip .selected-actions { display:flex; flex-direction:row; align-items:center; justify-content:flex-start; flex-wrap:nowrap; gap:7px; margin-top:10px; white-space:nowrap; }
.selected-reciter-strip .selected-actions > button { flex:0 0 auto; white-space:nowrap; }
.selected-reciter-strip .page-back-btn { left:14px; top:50%; transform:translateY(-50%); }
.reciter-fav-action { top:50%; right:auto; left:66px; transform:translateY(-50%); }
.reciter-fav-action:hover { transform:translateY(-50%); }
@media (max-width:600px) {
  .selected-reciter-strip { min-height:124px; padding:10px 45px 10px 100px; gap:10px; }
  .selected-reciter-strip .album-cover-wrap { width:104px; height:104px; flex-basis:104px; border-radius:14px; }
  .selected-reciter-strip .selected-copy { align-items:flex-start; }
  .selected-reciter-strip .selected-copy .album-kicker { font-size:9px; }
  .selected-reciter-strip .selected-copy h1 { font-size:16px; }
  .selected-reciter-strip .selected-meta { font-size:10px; }
  .selected-reciter-strip .selected-actions { gap:4px; margin-top:7px; }
  .selected-reciter-strip .selected-actions > button { padding:6px 7px; font-size:10px; }
  .selected-reciter-strip .selected-actions svg { width:13px; height:13px; }
  .selected-reciter-strip .page-back-btn { left:12px; top:50%; }
  .reciter-fav-action { left:58px; top:50%; width:36px; height:36px; }
}


/* Final reader card correction: keep v43's visual identity, use a stable responsive layout. */
.selected-reciter-strip {
  position:relative; display:flex; flex-direction:row; direction:rtl; align-items:center;
  min-height:168px; padding:12px 58px 12px 112px; gap:16px; text-align:right;
}
.selected-reciter-strip .album-cover-wrap { order:1; width:168px; height:168px; flex:0 0 168px; margin:0; }
.selected-reciter-strip .selected-copy { order:2; flex:1 1 auto; min-width:0; width:auto; align-items:flex-start; text-align:right; }
.selected-reciter-strip .selected-copy h1 { white-space:normal; overflow:visible; text-overflow:clip; word-break:normal; }
.selected-reciter-strip .selected-copy .selected-meta { white-space:normal; overflow:visible; text-overflow:clip; }
.selected-reciter-strip .selected-actions { display:flex; flex-direction:row; align-items:center; justify-content:flex-start; flex-wrap:nowrap; gap:7px; margin-top:10px; white-space:nowrap; }
.selected-reciter-strip .selected-actions > button { flex:0 0 auto; white-space:nowrap; }
.selected-reciter-strip .page-back-btn,
.reciter-fav-action { position:absolute; top:14px; width:40px; height:40px; transform:none; }
.selected-reciter-strip .page-back-btn { left:14px; }
.reciter-fav-action { left:64px; right:auto; }
.selected-reciter-strip .page-back-btn:hover,
.reciter-fav-action:hover { transform:none; }

@media (max-width:600px) {
  /* Two-column header: full-width copy on the left, portrait fixed to the right. */
  .selected-reciter-strip {
    display:grid; grid-template-columns:minmax(0,1fr) 112px; grid-template-areas:"copy cover" "actions actions";
    align-items:center; min-height:0; padding:62px 14px 12px 14px; gap:10px 12px; text-align:right;
  }
  .selected-reciter-strip .album-cover-wrap { grid-area:cover; width:112px; height:112px; flex-basis:112px; border-radius:14px; }
  .selected-reciter-strip .selected-copy { grid-area:copy; width:100%; min-width:0; align-items:flex-start; text-align:right; }
  .selected-reciter-strip .selected-copy h1 { max-width:100%; font-size:18px; line-height:1.35; }
  .selected-reciter-strip .selected-copy .album-kicker { font-size:9px; white-space:nowrap; }
  .selected-reciter-strip .selected-meta { font-size:10px; line-height:1.5; }
  .selected-reciter-strip .selected-actions { grid-area:actions; width:100%; justify-content:flex-start; gap:5px; margin-top:0; overflow:visible; }
  .selected-reciter-strip .selected-actions > button { min-width:0; padding:7px 9px; font-size:10px; }
  .selected-reciter-strip .selected-actions > button span { white-space:nowrap; }
  .selected-reciter-strip .page-back-btn,
  .reciter-fav-action { top:14px; width:40px; height:40px; }
  .selected-reciter-strip .page-back-btn { left:14px; }
  .reciter-fav-action { left:64px; }
}

/* Mobile grid direction is explicit so the portrait stays on the physical right. */
@media (max-width:600px) {
  .selected-reciter-strip { direction:ltr; grid-template-columns:minmax(0,1fr) 112px; grid-template-areas:"copy cover" "actions actions"; }
  .selected-reciter-strip .selected-copy { direction:rtl; }
  .selected-reciter-strip .selected-actions { direction:rtl; }
}

/* Mobile reader card: stack the controls below the image/copy area to eliminate crowding. */
@media (max-width:600px) {
  .selected-reciter-strip {
    display:flex; flex-direction:column; align-items:stretch; direction:rtl;
    min-height:0; padding:62px 14px 14px; gap:12px;
  }
  .selected-reciter-strip .album-cover-wrap {
    order:1; align-self:flex-start; width:112px; height:112px; flex:0 0 112px;
  }
  .selected-reciter-strip .selected-copy {
    order:2; display:flex; width:100%; min-width:0; align-items:flex-start; text-align:right;
  }
  .selected-reciter-strip .selected-copy h1 { width:100%; max-width:none; font-size:19px; line-height:1.4; white-space:normal; overflow:visible; }
  .selected-reciter-strip .selected-copy .selected-meta { width:100%; white-space:normal; overflow:visible; }
  .selected-reciter-strip .selected-actions {
    order:3; width:100%; display:flex; flex-direction:row; justify-content:flex-start; align-items:center;
    flex-wrap:nowrap; gap:6px; margin-top:2px; overflow-x:auto; scrollbar-width:none;
  }
  .selected-reciter-strip .selected-actions::-webkit-scrollbar { display:none; }
  .selected-reciter-strip .selected-actions > button { flex:0 0 auto; white-space:nowrap; }
  .selected-reciter-strip .page-back-btn,
  .reciter-fav-action { top:14px; width:40px; height:40px; transform:none; }
  .selected-reciter-strip .page-back-btn { left:14px; }
  .reciter-fav-action { left:64px; }
  .selected-reciter-strip .page-back-btn:hover,
  .reciter-fav-action:hover { transform:none; }
}


/* v43.2 restored skin + mobile reader card aligned to the supplied reference. */
@media (max-width:600px) {
  .album-hero-shell { padding:14px; }
  .selected-reciter-strip {
    display:grid; direction:ltr;
    grid-template-columns:minmax(0,1fr) 132px;
    grid-template-areas:"copy cover";
    align-items:start; min-height:0;
    padding:28px 2px 6px; gap:12px;
  }
  .selected-reciter-strip .album-cover-wrap {
    grid-area:cover; justify-self:end; align-self:start;
    width:132px; height:132px; flex:0 0 132px; border-radius:12px;
  }
  .selected-reciter-strip .selected-copy {
    grid-area:copy; direction:rtl; width:100%; min-width:0;
    align-items:flex-start; text-align:right; padding-top:8px;
  }
  .selected-reciter-strip .selected-copy .album-kicker {
    width:100%; font-size:9px; line-height:1.4; white-space:normal;
  }
  .selected-reciter-strip .selected-copy h1 {
    width:100%; max-width:none; margin:2px 0 2px;
    font-size:20px; line-height:1.3; white-space:normal;
    overflow:visible; text-overflow:clip; word-break:normal;
  }
  .selected-reciter-strip .selected-copy .selected-meta {
    width:100%; font-size:10.5px; line-height:1.5; white-space:normal;
    overflow:visible; text-overflow:clip;
  }
  .selected-reciter-strip .selected-actions {
    width:100%; display:flex; flex-direction:row; direction:rtl;
    justify-content:flex-start; align-items:center; flex-wrap:nowrap;
    gap:5px; margin-top:10px; overflow:visible;
  }
  .selected-reciter-strip .selected-actions > button {
    flex:0 0 auto; height:34px; padding:0 9px; font-size:10px; white-space:nowrap;
  }
  .selected-reciter-strip .selected-actions > button svg { width:13px; height:13px; }
  .selected-reciter-strip .page-back-btn,
  .selected-reciter-strip .reciter-fav-action {
    top:12px; width:38px; height:38px; transform:none;
  }
  .selected-reciter-strip .page-back-btn { left:14px; }
  .selected-reciter-strip .reciter-fav-action { left:60px; right:auto; }
  .selected-reciter-strip .page-back-btn:hover,
  .selected-reciter-strip .reciter-fav-action:hover { transform:none; }
}
