

/* Image hover: keep the frame fixed so no black edge or re-layout is exposed. */
.reciter-row .avatar-wrap {
  transform: none !important;
  overflow: hidden;
  isolation: isolate;
  contain: paint;
}
.reciter-row .avatar-wrap img {
  transform: scale(1.001) translateZ(0) !important;
  transform-origin: center center;
  backface-visibility: hidden;
  will-change: transform, filter;
  transition: transform .28s cubic-bezier(.22,1,.36,1), filter .28s ease !important;
}
@media (hover: hover) and (pointer: fine) {
  .reciter-row:hover .avatar-wrap img {
    transform: scale(1.025) translateZ(0) !important;
    filter: brightness(.94) !important;
  }
  .reciter-row:hover .avatar-wrap { transform: none !important; }
}
.reciter-row:active .avatar-wrap,
.reciter-row:active .avatar-wrap img { transform: none !important; }

/* Adaptive carousel arrows and soft edge fades; the fade never covers the last card. */
.carousel-shell { position: relative; min-width: 0; }
.carousel-shell::before,
.carousel-shell::after {
  content: ""; position: absolute; z-index: 4; top: 0; bottom: 8px;
  width: 54px; pointer-events: none; opacity: 0; transition: opacity .24s ease;
}
.carousel-shell::before { left: 0; background: linear-gradient(90deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 72%, transparent) 48%, transparent 100%); }
.carousel-shell::after { right: 0; background: linear-gradient(270deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 72%, transparent) 48%, transparent 100%); }
.carousel-shell.has-left-overflow::before,
.carousel-shell.has-right-overflow::after { opacity: .9; }
.carousel-arrow {
  position: absolute; z-index: 6; top: 40%; width: 42px; height: 42px;
  display: grid; place-items: center; border: 1px solid var(--line-strong);
  border-radius: 50%; background: color-mix(in srgb, var(--surface) 92%, transparent);
  color: var(--text); box-shadow: 0 8px 24px rgba(0,0,0,.30);
  backdrop-filter: blur(10px); opacity: 0; pointer-events: none; transform: scale(.94);
  transition: opacity .22s ease, transform .22s ease, background .22s ease;
}
.carousel-arrow[hidden] { display: none; }
.carousel-shell:hover .carousel-arrow:not([hidden]),
.carousel-shell:focus-within .carousel-arrow:not([hidden]) { opacity: 1; pointer-events: auto; transform: scale(1); }
.carousel-arrow-left { left: 8px; }
.carousel-arrow-right { right: 8px; }
.carousel-arrow svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.carousel-arrow:hover { transform: scale(1.06); background: var(--surface-hover); }
.carousel-shell .cards-row { padding-inline: 8px; scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--text) 32%, transparent) transparent; }
.carousel-shell .cards-row::-webkit-scrollbar { display: block; height: 6px; }
.carousel-shell .cards-row::-webkit-scrollbar-track { background: transparent; }
.carousel-shell .cards-row::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--text) 30%, transparent); border-radius: 999px; }
.carousel-shell .cards-row::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, var(--text) 52%, transparent); }
@media (max-width: 900px) {
  .carousel-arrow { width: 36px; height: 36px; top: 39%; }
  .carousel-arrow-left { left: 4px; }
  .carousel-arrow-right { right: 4px; }
  .carousel-shell::before, .carousel-shell::after { width: 38px; }
}

/* Keep the page width stable while the full player locks the document. */
html { scrollbar-gutter: stable; }

/* Daylight theme: neutral paper surfaces with a restrained olive accent. */
body.light {
  background:
    radial-gradient(ellipse 70% 42% at 86% -8%, rgba(112, 128, 91, .09), transparent 70%),
    radial-gradient(ellipse 55% 34% at 12% 0%, rgba(111, 126, 150, .06), transparent 72%),
    var(--bg);
}
body.light .filter-chip.active,
body.light .moshaf-chip.active,
body.light .home-filter.active {
  background: #e2e7df;
  border-color: #b9c4b4;
  color: #263229;
}
body.light .moshaf-chip.active small { color: #526154; }
body.light .carousel-arrow { background: rgba(255,255,255,.9); border-color: rgba(38,50,41,.16); color: #34443a; box-shadow: 0 8px 22px rgba(38,50,41,.14); }
body.light .carousel-shell::before { background: linear-gradient(90deg, var(--bg) 0%, rgba(245,245,247,.82) 48%, transparent 100%); }
body.light .carousel-shell::after { background: linear-gradient(270deg, var(--bg) 0%, rgba(245,245,247,.82) 48%, transparent 100%); }
body.light .queue-item.active { background: rgba(92, 110, 90, .10); }

/* Mobile reader view: a full-bleed portrait hero with the identity anchored below it. */
@media (max-width: 600px) {
  .album-hero-shell {
    margin: 0 -14px 24px;
    padding: 0 0 18px;
    border: 0;
    border-radius: 0 0 28px 28px;
    background: #070809;
    overflow: hidden;
  }
  .selected-reciter-strip {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
    min-height: 0;
    direction: rtl;
  }
  .selected-reciter-strip .album-cover-wrap {
    position: relative;
    order: 1;
    width: 100%;
    height: min(92vw, 470px);
    flex: 0 0 auto;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: #050607;
  }
  .selected-reciter-strip .album-cover-wrap::after {
    content: "";
    position: absolute;
    inset: 35% 0 0;
    pointer-events: none;
    background: linear-gradient(180deg, transparent 0%, rgba(7,8,9,.16) 18%, rgba(7,8,9,.92) 90%, #070809 100%);
  }
  .selected-reciter-strip .album-cover-wrap img { object-position: center 18%; }
  .selected-reciter-strip .selected-copy {
    order: 2;
    z-index: 2;
    width: 100%;
    align-items: center;
    text-align: center;
    padding: 0 22px;
    margin-top: -92px;
    gap: 5px;
  }
  .selected-reciter-strip .selected-copy .album-kicker { color: rgba(255,255,255,.68); font-size: 10px; }
  .selected-reciter-strip .selected-copy h1 { width: 100%; margin: 0; color: #fff; font-size: 28px; line-height: 1.25; }
  .selected-reciter-strip .selected-copy .selected-meta { color: rgba(255,255,255,.68); font-size: 12px; }
  .selected-reciter-strip .selected-actions {
    order: 3;
    width: 100%;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
    padding: 0 18px;
    overflow: visible;
  }
  .selected-reciter-strip .selected-actions > button { min-height: 46px; padding-inline: 17px; font-size: 12px; }
  .selected-reciter-strip .preview-pill-btn { min-width: 132px; justify-content: center; background: #fff; color: #111214; }
  .selected-reciter-strip .strip-live-btn { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.18); color: #fff; }
  .selected-reciter-strip .change-reciter-btn { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.18); color: #fff; }
  .selected-reciter-strip .page-back-btn,
  .selected-reciter-strip .reciter-fav-action { z-index: 4; top: 14px; width: 42px; height: 42px; color: #fff; background: rgba(10,11,13,.52); border-color: rgba(255,255,255,.22); backdrop-filter: blur(14px); }
  .selected-reciter-strip .page-back-btn { left: 14px; }
  .selected-reciter-strip .reciter-fav-action { left: auto; right: 14px; }
  .surahs-fallback-intro { margin-top: 0; }
  .surah-list { padding: 8px; border: 0; border-radius: 24px; background: #1b1c1e; }
  body.light .album-hero-shell { background: #111315; }
  body.light .surah-list { background: #1b1c1e; color: #f5f5f7; }
}

/* Neutral product palette: no lime accents in either theme. */
:root { --lime: #f0f1ee; --lime-ink: #111214; --accent-rgb: 240,241,238; }
body.light { --lime: #1c1f22; --lime-ink: #f7f7f5; --accent-rgb: 28,31,34; }
body.light .filter-chip.active,
body.light .moshaf-chip.active,
body.light .home-filter.active,
body.light .tab.active { background: #1c1f22; border-color: #1c1f22; color: #f7f7f5; }
body.light .moshaf-chip.active small { color: rgba(247,247,245,.72); }
body.light .strip-live-btn,
body.light .text-action,
body.light .count-badge,
body.light .reciter-picker-more { background: rgba(28,31,34,.08); border-color: rgba(28,31,34,.18); color: #1c1f22; }
body.light .queue-item.active,
body.light .ayah-item.is-current { background: rgba(28,31,34,.08); border-color: rgba(28,31,34,.18); box-shadow: inset -3px 0 0 #1c1f22; }
body.light .live-progress-track,
body.light .live-progress-track span,
body.light .mini-player.is-live .mini-progress,
body.light .mini-player.is-live .mini-progress > span { background: #1c1f22 !important; }
body.light .surah-download-btn.is-downloaded,
body.light .reciter-row .row-fav.liked { color: #1c1f22; background: rgba(28,31,34,.08); }
body.light .search-box:focus-within { border-color: #1c1f22; box-shadow: 0 0 0 3px rgba(28,31,34,.08); }

/* Replace remaining hard-coded lime translucency with neutral white/charcoal surfaces. */
.queue-item.active, .ayah-item.is-current, .reciter-picker-more, .text-action { border-color: rgba(255,255,255,.18); }

/* Desktop player: centered metadata, moderate type, balanced spacing. */
@media (min-width: 901px) {
  .now-playing { padding: 24px 42px 36px; }
  .playing-header { position: relative; width: min(100%, 1180px); margin: 0 auto 12px; direction: ltr; }
  .playing-header .player-header-meta { position: absolute; left: 50%; top: 2px; transform: translateX(-50%); width: max-content; direction: rtl; text-align: center; }
  .playing-header .player-header-meta .eyebrow { font-size: 9px; }
  .playing-header .player-header-meta b { font-size: 11px; font-weight: 500; }
  .playing-header .header-spacer { display: none; }
  .playing-header .close-player-btn { position: absolute; right: 0; top: 0; margin: 0; width: 42px; height: 42px; }
  .now-playing-stage { width: min(100%, 620px); margin: auto; gap: 18px; }
  .art-frame { width: min(470px, 42vw, 52vh); }
  .playing-info-row { min-height: 66px; }
  .playing-info h1, #playerSurah { font-size: clamp(24px, 2.4vw, 32px) !important; line-height: 1.3; }
  .playing-info p, #playerReciter { font-size: 14px !important; line-height: 1.45; }
}

/* Press feedback only; never leave the previous/next ring focused on touch. */
.skip-btn:focus:not(:focus-visible) { outline: none !important; box-shadow: none !important; background: transparent !important; }
.skip-btn:focus-visible { outline: 2px solid var(--link-blue); outline-offset: 3px; }


/* v43-10: cards keep one intentional action — favorite; the card image opens playback. */
.reciter-row .row-play { display: none !important; }
.reciter-row .row-actions { gap: 0; }
.reciter-row { position: relative; overflow: visible; }
.reciter-row .live-badge-dot {
  top: -4px;
  right: -4px;
  z-index: 8;
  width: 12px;
  height: 12px;
  border: 2px solid var(--surface, #17181b);
  box-shadow: 0 0 0 2px rgba(255, 77, 87, .12), 0 0 12px rgba(255, 77, 87, .72);
}
body.light .reciter-row .live-badge-dot { border-color: #fff; }

/* Full player transport: compact, visible rings around skip controls. */
.skip-btn {
  width: 42px !important;
  height: 42px !important;
  flex: 0 0 42px;
  background: rgba(255,255,255,.055) !important;
  border: 1px solid rgba(255,255,255,.19) !important;
  box-shadow: 0 4px 14px rgba(0,0,0,.12);
}
.skip-btn:hover { background: rgba(255,255,255,.12) !important; }
.skip-btn svg { width: 21px !important; height: 21px !important; }
.big-play { width: 62px; height: 62px; }

/* One responsive switch: desktop above 900px, the mobile hero below it. */
@media (max-width: 900px) {
  #app { padding-top: 16px; }
  .album-hero-shell {
    width: auto;
    margin: -16px calc(50% - 50vw) 24px;
    padding: 0 0 18px;
    border: 0;
    border-radius: 0 0 28px 28px;
    overflow: hidden;
    background: #070809;
  }
  .selected-reciter-strip {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
    min-height: 0;
    direction: rtl;
  }
  .selected-reciter-strip .album-cover-wrap {
    order: 1;
    width: 100%;
    height: min(88vw, 500px);
    min-height: 330px;
    flex: 0 0 auto;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: #050607;
  }
  .selected-reciter-strip .album-cover-wrap::after {
    content: "";
    position: absolute;
    inset: 32% 0 0;
    pointer-events: none;
    background: linear-gradient(180deg, transparent 0%, rgba(7,8,9,.16) 20%, rgba(7,8,9,.88) 84%, #070809 100%);
  }
  .selected-reciter-strip .album-cover-wrap img { object-position: center 18%; }
  .selected-reciter-strip .selected-copy {
    order: 2;
    z-index: 2;
    width: 100%;
    align-items: center;
    text-align: center;
    padding: 0 22px;
    margin-top: -92px;
    gap: 5px;
  }
  .selected-reciter-strip .selected-copy h1 { width: 100%; margin: 0; font-size: clamp(25px, 6vw, 30px); line-height: 1.25; }
  .selected-reciter-strip .selected-actions {
    order: 3;
    width: 100%;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
    padding: 0 18px;
    overflow: visible;
  }
  .selected-reciter-strip .page-back-btn,
  .selected-reciter-strip .reciter-fav-action { z-index: 4; top: 14px; width: 42px; height: 42px; }
  .selected-reciter-strip .page-back-btn { left: 14px; }
  .selected-reciter-strip .reciter-fav-action { right: 14px; left: auto; }

  /* Light mode uses a warm paper hero, while preserving the full-bleed portrait. */
  body.light .album-hero-shell { background: #f1f2ef; border: 1px solid rgba(25,28,31,.08); }
  body.light .selected-reciter-strip .album-cover-wrap { background: #e8e9e5; }
  body.light .selected-reciter-strip .album-cover-wrap::after {
    background: linear-gradient(180deg, transparent 0%, rgba(241,242,239,.10) 18%, rgba(241,242,239,.82) 76%, #f1f2ef 100%);
  }
  body.light .selected-reciter-strip .selected-copy h1 { color: #17191b; }
  body.light .selected-reciter-strip .selected-copy .album-kicker,
  body.light .selected-reciter-strip .selected-copy .selected-meta { color: rgba(23,25,27,.62); }
  body.light .selected-reciter-strip .preview-pill-btn { background: #1c1f22; color: #f7f7f5; }
  body.light .selected-reciter-strip .strip-live-btn,
  body.light .selected-reciter-strip .change-reciter-btn { background: rgba(28,31,34,.07); border-color: rgba(28,31,34,.18); color: #1c1f22; }
  body.light .selected-reciter-strip .page-back-btn,
  body.light .selected-reciter-strip .reciter-fav-action { background: rgba(255,255,255,.72); border-color: rgba(28,31,34,.16); color: #1c1f22; }
  body.light .surah-list { background: #fff; color: #1c1f22; border: 1px solid rgba(28,31,34,.08); }
}

@media (min-width: 901px) {
  .mini-player {
    bottom: 12px !important;
    border-radius: 16px 0 0 16px;
  }
}


/* v43-11 audit fixes: the final mobile reader rules intentionally win over legacy layouts. */
@media (max-width: 900px) {
  .selected-reciter-strip .album-cover-wrap {
    width: 100vw !important;
    max-width: none !important;
    margin-inline: calc(50% - 50vw) !important;
    justify-self: stretch;
    align-self: stretch;
  }
  .selected-reciter-strip .album-cover-wrap img {
    width: 100% !important;
    max-width: none !important;
    object-position: 50% 18%;
  }
  .selected-reciter-strip .selected-copy {
    padding-inline: 18px;
  }
  .selected-reciter-strip .selected-copy .album-kicker {
    font-size: 9px;
    line-height: 1.3;
  }
  .selected-reciter-strip .selected-copy h1 {
    font-size: clamp(23px, 5.5vw, 28px);
    line-height: 1.2;
  }
  .selected-reciter-strip .selected-copy .selected-meta {
    max-width: 92%;
    font-size: 10.5px;
    line-height: 1.35;
  }
  .moshaf-bar {
    position: relative;
    width: calc(100% - 8px);
    margin-inline-start: auto;
    margin-inline-end: 8px;
    padding-top: 13px;
  }
  .moshaf-options {
    position: relative;
    left: -8px;
    max-width: calc(100% + 8px);
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }
  .moshaf-options::-webkit-scrollbar { display: none; }
  .moshaf-chip { flex: 0 0 auto; height: 31px; padding-inline: 12px; font-size: 11px; }
}

/* The live marker stays complete and calm inside the image corner on every card surface. */
.reciter-row > .live-badge-dot {
  top: 7px;
  right: 12px;
  left: auto;
  width: 12px;
  height: 12px;
  border-width: 2px;
}

/* Player overflow menu: one coherent surface in both themes. */
:root {
  --q-menu-bg: rgba(29, 31, 38, .975);
  --q-menu-text: #f4f5f7;
  --q-menu-muted: rgba(244,245,247,.68);
  --q-menu-hover: rgba(255,255,255,.095);
  --q-menu-divider: rgba(255,255,255,.12);
  --q-menu-border: rgba(255,255,255,.15);
}
body.light {
  --q-menu-bg: rgba(255,255,255,.985);
  --q-menu-text: #1c1f22;
  --q-menu-muted: #687078;
  --q-menu-hover: rgba(28,31,34,.07);
  --q-menu-divider: rgba(28,31,34,.11);
  --q-menu-border: rgba(28,31,34,.13);
}
.player-more-menu {
  background: var(--q-menu-bg) !important;
  color: var(--q-menu-text) !important;
  border-color: var(--q-menu-border) !important;
  box-shadow: 0 18px 48px rgba(0,0,0,.28), 0 4px 16px rgba(0,0,0,.12);
}
.menu-row-btn {
  color: var(--q-menu-text) !important;
}
.menu-row-btn:hover,
.menu-row-btn:focus-visible { background: var(--q-menu-hover) !important; }
.menu-row-btn svg,
.menu-mini-pill svg { color: var(--q-menu-muted); }
.menu-row-btn .menu-badge { color: var(--lime) !important; }
.menu-divider { background: var(--q-menu-divider) !important; }
.menu-mini-pill {
  background: color-mix(in srgb, var(--q-menu-text) 7%, transparent) !important;
  color: var(--q-menu-text) !important;
  border: 1px solid var(--q-menu-border);
}
.menu-mini-pill:hover,
.menu-mini-pill:focus-visible {
  background: var(--q-menu-hover) !important;
  border-color: color-mix(in srgb, var(--q-menu-text) 28%, transparent);
}
body.light .menu-row-btn .menu-badge { color: #1c1f22 !important; }


/* v43-11 audit: remove carousel edge washes that tint the reader/radio artwork. */
.carousel-shell::before,
.carousel-shell::after {
  content: none !important;
  display: none !important;
}

/* Arabic glyphs need real vertical breathing room in both the mobile and desktop player. */
.playing-info h1,
#playerSurah {
  line-height: 1.65 !important;
  padding-block: 2px 4px;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
}
.playing-info p,
#playerReciter {
  line-height: 1.7 !important;
  padding-block: 2px 4px;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
}

@media (max-width: 900px) {
  /* The old decorative pseudo-surfaces made the reader header look boxed-in. */
  .selected-reciter-strip::before,
  .selected-reciter-strip::after {
    content: none !important;
    display: none !important;
  }
  .album-hero-shell,
  body.light .album-hero-shell {
    margin: 0 0 14px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
  }
}

@media (max-width: 600px) {
  /* Keep the reader identity compact: one modest portrait, clear copy, no oversized gradient. */
  .selected-reciter-strip {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) clamp(92px, 29vw, 116px) !important;
    grid-template-areas: "copy cover" "actions actions" !important;
    align-items: center !important;
    justify-content: stretch !important;
    direction: ltr !important;
    width: 100% !important;
    min-height: 0 !important;
    gap: 8px 12px !important;
    padding: 8px 10px 10px !important;
    text-align: right !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }
  .selected-reciter-strip .album-cover-wrap {
    grid-area: cover !important;
    justify-self: end !important;
    align-self: center !important;
    width: clamp(92px, 29vw, 116px) !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
    min-height: 0 !important;
    flex: 0 0 auto !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 14px !important;
    box-shadow: none !important;
    overflow: hidden !important;
  }
  .selected-reciter-strip .album-cover-wrap::after { display: none !important; content: none !important; }
  .selected-reciter-strip .album-cover-wrap img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: 50% 18% !important;
  }
  .selected-reciter-strip .selected-copy {
    grid-area: copy !important;
    display: flex !important;
    align-self: center !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 4px !important;
    direction: rtl !important;
    align-items: flex-start !important;
    text-align: right !important;
  }
  .selected-reciter-strip .selected-copy .album-kicker {
    width: 100%;
    font-size: 9px;
    line-height: 1.55;
    white-space: normal;
  }
  .selected-reciter-strip .selected-copy h1 {
    width: 100%;
    max-width: 100%;
    margin: 0;
    font-size: clamp(16px, 4.5vw, 19px);
    line-height: 1.55;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
  }
  .selected-reciter-strip .selected-copy .selected-meta {
    width: 100%;
    max-width: 100%;
    font-size: 10px;
    line-height: 1.55;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }
  .selected-reciter-strip .selected-actions {
    grid-area: actions !important;
    display: flex !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    direction: rtl !important;
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    overflow: visible !important;
  }
  .selected-reciter-strip .selected-actions > button {
    min-height: 34px !important;
    height: auto !important;
    padding: 7px 10px !important;
    font-size: 10px !important;
    line-height: 1.5;
    white-space: nowrap;
  }
  .selected-reciter-strip .page-back-btn,
  .selected-reciter-strip .reciter-fav-action {
    z-index: 4;
    top: 8px !important;
    width: 36px !important;
    height: 36px !important;
  }
  .selected-reciter-strip .page-back-btn { left: 10px !important; }
  .selected-reciter-strip .reciter-fav-action { left: 54px !important; right: auto !important; }

  /* Move the Arabic section label and its options inward from the screen edge. */
  .moshaf-bar {
    width: 100% !important;
    margin: 8px 0 0 !important;
    padding: 8px 16px 0 !important;
    border: 0 !important;
    gap: 8px !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  .moshaf-bar-label { padding-inline-start: 8px; }
  .moshaf-options {
    position: static !important;
    left: auto !important;
    width: 100%;
    max-width: 100% !important;
    padding-inline-start: 8px;
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  /* New neutral interface palette for the selected bottom-navigation item. */
  body.light .pill-nav-item.active {
    background: rgba(28, 31, 34, .10) !important;
    color: #1c1f22 !important;
  }
}


/* v43-11 follow-up: mobile-only reader copy spacing, keep the desktop reader layout untouched. */
@media (max-width: 600px) {
  .selected-reciter-strip .selected-copy {
    box-sizing: border-box;
    padding-right: 8px !important;
  }
  body.light .selected-reciter-strip .selected-copy,
  body.light .selected-reciter-strip .selected-copy h1,
  body.light .selected-reciter-strip .selected-copy .album-kicker,
  body.light .selected-reciter-strip .selected-copy .selected-meta {
    background: transparent !important;
    box-shadow: none !important;
    filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    text-shadow: none !important;
  }
}

/* The Favorites cards use the same circular portrait treatment as reader and radio shelves. */
.favorite-section-list.reciter-list.cards-row .reciter-row .avatar-wrap {
  border-radius: 50% !important;
}

/* No fade, mask, shadow, or translucent wash at the ends of the home carousels. */
.carousel-shell,
.carousel-shell .cards-row {
  background: transparent !important;
  box-shadow: none !important;
  filter: none !important;
  -webkit-mask-image: none !important;
  mask-image: none !important;
}
.carousel-shell::before,
.carousel-shell::after {
  content: none !important;
  display: none !important;
  background: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Restore the rounded right edge of the floating desktop mini-player. */
@media (min-width: 901px) {
  .mini-player { border-radius: 16px !important; }
}

/* Small connection notices appear above navigation/player, never over the page heading. */
.offline-bar,
.online-bar {
  position: fixed !important;
  top: auto !important;
  bottom: calc(78px + env(safe-area-inset-bottom)) !important;
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%) !important;
  z-index: 100 !important;
  width: max-content !important;
  max-width: calc(100vw - 24px) !important;
  margin: 0 !important;
  padding: 7px 12px !important;
  border: 1px solid rgba(255,255,255,.2) !important;
  border-radius: 999px !important;
  color: #fff !important;
  font-family: inherit;
  font-size: 11px !important;
  font-weight: 500;
  line-height: 1.4 !important;
  text-align: center;
  box-shadow: 0 6px 20px rgba(0,0,0,.2) !important;
}
.offline-bar { background: rgba(183, 48, 57, .96) !important; }
.online-bar {
  display: block;
  cursor: pointer;
  background: rgba(35, 129, 74, .97) !important;
}
.online-bar:hover { background: #1b7040 !important; }
@media (max-width: 900px) {
  .offline-bar,
  .online-bar { bottom: calc(88px + env(safe-area-inset-bottom)) !important; }
}

.offline-bar[hidden],
.online-bar[hidden] { display: none !important; }


/* v43-11 follow-up 2: reader identity and controls form one compact RTL unit. */
@media (min-width: 601px) {
  #surahsPage .selected-reciter-strip {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) clamp(164px, 18vw, 220px) !important;
    grid-template-areas: "copy cover" "actions cover" !important;
    direction: ltr !important;
    align-items: center !important;
    min-height: 0 !important;
    gap: 8px 28px !important;
    padding: 22px 0 10px 56px !important;
    border-bottom: 0 !important;
    overflow: visible !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  #surahsPage .selected-reciter-strip .album-cover-wrap {
    position: relative !important;
    inset: auto !important;
    grid-area: cover !important;
    justify-self: end !important;
    align-self: center !important;
    width: clamp(164px, 18vw, 220px) !important;
    max-width: 220px !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
    flex: 0 0 auto !important;
    margin: 0 !important;
    border-radius: 50% !important;
  }
  #surahsPage .selected-reciter-strip .album-cover-wrap img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }
  #surahsPage .selected-reciter-strip .selected-copy {
    position: relative !important;
    grid-area: copy !important;
    direction: rtl !important;
    align-items: flex-start !important;
    justify-self: stretch !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: right !important;
  }
  #surahsPage .selected-reciter-strip .selected-actions {
    grid-area: actions !important;
    direction: rtl !important;
    justify-content: flex-start !important;
    justify-self: stretch !important;
    align-self: start !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    flex-wrap: wrap !important;
  }
  #surahsPage .moshaf-bar {
    margin-top: 8px !important;
    padding: 10px 0 0 !important;
    border-top: 0 !important;
    align-items: flex-start !important;
    text-align: right !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  #surahsPage .moshaf-options {
    direction: rtl !important;
    justify-content: flex-start !important;
  }
}

/* Tablet/medium widths use a compact two-column layout; do not inherit the old full-bleed image. */
@media (min-width: 601px) and (max-width: 900px) {
  #surahsPage .selected-reciter-strip {
    grid-template-columns: minmax(0, 1fr) clamp(148px, 22vw, 196px) !important;
    gap: 8px 20px !important;
  }
  #surahsPage .selected-reciter-strip .album-cover-wrap {
    position: relative !important;
    inset: auto !important;
    width: clamp(148px, 22vw, 196px) !important;
    max-width: 196px !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
    margin: 0 !important;
    justify-self: end !important;
    align-self: center !important;
  }
}

/* Phone reader header: align the portrait and copy unit to the same right edge as the filters. */
@media (max-width: 600px) {
  #surahsPage .selected-reciter-strip {
    padding-inline: 0 !important;
    border-bottom: 0 !important;
  }
  #surahsPage .selected-reciter-strip .album-cover-wrap {
    position: relative !important;
    inset: auto !important;
    width: clamp(92px, 29vw, 116px) !important;
    max-width: 116px !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
    margin: 0 !important;
    justify-self: end !important;
    align-self: center !important;
  }
  #surahsPage .moshaf-bar {
    padding-inline: 0 !important;
    border-top: 0 !important;
  }
  #surahsPage .moshaf-bar-label,
  #surahsPage .moshaf-options {
    padding-inline-start: 0 !important;
  }
}

/* Neutral light-mode selected navigation item for the complete mobile-nav range (through 900px). */
@media (max-width: 900px) {
  body.light .pill-nav-item.active {
    background: rgba(28, 31, 34, .10) !important;
    color: #1c1f22 !important;
  }
}

/* Light home shelves stay visually open: no translucent panel, border, or shadow around the rows. */
body.light #homeRecitersSection,
body.light #homeLiveSection,
body.light #homeRecitersSection .carousel-shell,
body.light #homeLiveSection .carousel-shell,
body.light #homeRecitersSection .cards-row,
body.light #homeLiveSection .cards-row,
body.light #homeRecitersSection .reciter-row,
body.light #homeLiveSection .reciter-row {
  background: transparent !important;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}
body.light #homeRecitersSection::before,
body.light #homeRecitersSection::after,
body.light #homeLiveSection::before,
body.light #homeLiveSection::after,
body.light #homeRecitersSection .carousel-shell::before,
body.light #homeRecitersSection .carousel-shell::after,
body.light #homeLiveSection .carousel-shell::before,
body.light #homeLiveSection .carousel-shell::after {
  content: none !important;
  display: none !important;
  background: none !important;
  box-shadow: none !important;
}


/* Keep reader portraits square while their grid cell spans identity and actions rows. */
@media (min-width: 601px) {
  #surahsPage .selected-reciter-strip .album-cover-wrap {
    height: clamp(164px, 18vw, 220px) !important;
    min-height: 0 !important;
    max-height: 220px !important;
  }
}
@media (min-width: 601px) and (max-width: 900px) {
  #surahsPage .selected-reciter-strip .album-cover-wrap {
    height: clamp(148px, 22vw, 196px) !important;
    max-height: 196px !important;
  }
}
@media (max-width: 600px) {
  #surahsPage .selected-reciter-strip .album-cover-wrap {
    height: clamp(92px, 29vw, 116px) !important;
    min-height: 0 !important;
  }
}


/* v43.12: clean circular reader portrait on desktop, and on medium light-mode layouts. */
@media (min-width: 901px) {
  .selected-reciter-strip .album-cover-wrap {
    border: 0 !important;
    border-radius: 50% !important;
    box-shadow: none !important;
    background: transparent !important;
    overflow: hidden !important;
  }
  .selected-reciter-strip .album-cover-wrap::before,
  .selected-reciter-strip .album-cover-wrap::after {
    display: none !important;
    content: none !important;
  }
  .selected-reciter-strip .selected-copy,
  .selected-reciter-strip .selected-copy h1,
  .selected-reciter-strip .selected-copy .album-kicker,
  .selected-reciter-strip .selected-copy .selected-meta {
    background: transparent !important;
    box-shadow: none !important;
    filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    text-shadow: none !important;
  }
}

@media (min-width: 601px) and (max-width: 900px) {
  body.light .selected-reciter-strip .album-cover-wrap {
    align-self: center !important;
    width: clamp(176px, 30vw, 248px) !important;
    max-width: 80vw !important;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 1 / 1 !important;
    margin: 24px auto 12px !important;
    border: 0 !important;
    border-radius: 50% !important;
    box-shadow: none !important;
    background: transparent !important;
    overflow: hidden !important;
  }
  body.light .selected-reciter-strip .album-cover-wrap::before,
  body.light .selected-reciter-strip .album-cover-wrap::after {
    display: none !important;
    content: none !important;
  }
  body.light .selected-reciter-strip .album-cover-wrap img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: 50% 18% !important;
  }
  body.light .selected-reciter-strip .selected-copy {
    margin-top: 0 !important;
    padding: 0 22px !important;
  }
  body.light .selected-reciter-strip .selected-copy,
  body.light .selected-reciter-strip .selected-copy h1,
  body.light .selected-reciter-strip .selected-copy .album-kicker,
  body.light .selected-reciter-strip .selected-copy .selected-meta {
    background: transparent !important;
    box-shadow: none !important;
    filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    text-shadow: none !important;
  }
  body.light .selected-reciter-strip .selected-copy h1 { color: #17191b !important; }
  body.light .selected-reciter-strip .selected-copy .album-kicker,
  body.light .selected-reciter-strip .selected-copy .selected-meta { color: rgba(23,25,27,.62) !important; }
}
