/* ============================================================
   Ramadan hub theme — NadorCity.info
   Night-sky hero + clean cards, timetable table, Quran player.
   RTL-safe (logical properties only). Loaded with an.css.
   ============================================================ */

/* ---- Hero ---- */
.rm-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 34px 26px 28px;
  margin-top: 18px;
  color: #f4f2ff;
  background:
    radial-gradient(1px 1px at 12% 22%, rgba(255,255,255,.9) 50%, transparent 51%),
    radial-gradient(1px 1px at 28% 68%, rgba(255,255,255,.7) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 44% 18%, rgba(255,255,255,.8) 50%, transparent 51%),
    radial-gradient(1px 1px at 61% 34%, rgba(255,255,255,.6) 50%, transparent 51%),
    radial-gradient(1px 1px at 76% 62%, rgba(255,255,255,.7) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 88% 26%, rgba(255,255,255,.8) 50%, transparent 51%),
    radial-gradient(1px 1px at 94% 74%, rgba(255,255,255,.6) 50%, transparent 51%),
    linear-gradient(135deg, #121331 0%, #1e1b4e 45%, #312267 75%, #4c2a6e 100%);
}
.rm-hero::after {
  content: "☾";
  position: absolute;
  inset-inline-end: 18px;
  top: 6px;
  font-size: clamp(72px, 12vw, 128px);
  line-height: 1;
  color: #fcd34d;
  opacity: .9;
  text-shadow: 0 0 34px rgba(252,211,77,.55);
  pointer-events: none;
}
.rm-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 13px;
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #fcd34d;
  border: 1px solid rgba(252,211,77,.45);
  background: rgba(252,211,77,.12);
}
.rm-hero h1 {
  margin: 14px 0 0;
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.15;
  color: #fff;
  max-width: 16ch;
}
.rm-hero p.rm-hero-sub {
  margin: 10px 0 0;
  color: rgba(244,242,255,.82);
  font-size: var(--text-base);
  max-width: 58ch;
}
.rm-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  font-size: var(--text-sm);
  color: rgba(244,242,255,.88);
}
.rm-hero-meta bdi { font-variant-numeric: tabular-nums; }
.rm-hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.rm-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 12px;
  font-weight: 800;
  font-size: var(--text-sm);
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--duration) var(--ease), filter var(--duration) var(--ease), border-color var(--duration) var(--ease);
}
.rm-btn--gold { background: #fcd34d; color: #231a03; }
.rm-btn--gold:hover { filter: brightness(1.06); text-decoration: none; transform: translateY(-1px); }
.rm-btn--ghost { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.28); }
.rm-btn--ghost:hover { border-color: #fff; text-decoration: none; }
.rm-btn:focus-visible { outline: 2px solid #fcd34d; outline-offset: 2px; }

/* ---- Today strip ---- */
.rm-today {
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
  padding: 20px;
}
.rm-today-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.rm-today-head h2 { margin: 0; font-size: var(--text-lg); }
.rm-today-head p { margin: 0; color: var(--muted-foreground); font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
.rm-tiles { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; margin-top: 12px; }
.rm-tile {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 10px;
  text-align: center;
  background: var(--card);
}
.rm-tile .rm-tile-ico { font-size: 20px; line-height: 1; }
.rm-tile h3 { margin: 6px 0 2px; font-size: var(--text-xs); font-weight: 700; color: var(--muted-foreground); text-transform: uppercase; letter-spacing: .05em; }
.rm-tile p { margin: 0; font-size: var(--text-lg); font-weight: 800; font-variant-numeric: tabular-nums; }
.rm-tile.is-iftar { border-color: #f59e0b; background: color-mix(in srgb, #f59e0b 10%, var(--card)); }
.rm-tile-tag { display: inline-block; margin-top: 6px; padding: 2px 9px; border-radius: 999px; background: #f59e0b; color: #fff; font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }

/* ---- Shortcut cards ---- */
.rm-links { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; margin-top: 18px; }
.rm-link {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
  color: inherit;
  text-decoration: none;
  transition: border-color var(--duration) var(--ease), transform var(--duration) var(--ease);
}
.rm-link:hover { border-color: var(--ring); transform: translateY(-2px); text-decoration: none; }
.rm-link:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.rm-link-ico {
  flex: none; width: 48px; height: 48px; display: grid; place-items: center;
  font-size: 24px; border-radius: 14px;
  background: color-mix(in srgb, var(--primary) 12%, transparent);
}
.rm-link h3 { margin: 0; font-size: var(--text-base); }
.rm-link p { margin: 4px 0 8px; color: var(--muted-foreground); font-size: var(--text-sm); }
.rm-link-cta { font-size: var(--text-sm); font-weight: 800; color: var(--primary); }

/* ---- Guide ---- */
.rm-guide { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; margin-top: 18px; }
.rm-guide-card { border: 1px solid var(--border); border-radius: 16px; background: var(--card); padding: 20px; }
.rm-guide-card .rm-guide-ico { font-size: 26px; line-height: 1; }
.rm-guide-card h3 { margin: 10px 0 6px; font-size: var(--text-base); }
.rm-guide-card p { margin: 0; color: var(--muted-foreground); font-size: var(--text-sm); line-height: 1.6; }

/* ---- Subpage head / breadcrumb ---- */
.rm-crumb { display: flex; align-items: center; gap: 8px; padding: 18px 0 0; font-size: var(--text-sm); color: var(--muted-foreground); flex-wrap: wrap; }
.rm-crumb a { color: var(--muted-foreground); text-decoration: none; }
.rm-crumb a:hover { color: var(--foreground); text-decoration: underline; }
.rm-subhead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 14px 0 4px; }
.rm-subhead h1 { margin: 0; font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; letter-spacing: -.02em; }
.rm-subhead p { margin: 6px 0 0; color: var(--muted-foreground); max-width: 62ch; }

/* ---- Timetable table ---- */
.rm-monthnav { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 16px 0 0; }
.rm-monthnav a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--card); color: var(--foreground);
  font-size: var(--text-sm); font-weight: 700; text-decoration: none;
}
.rm-monthnav a:hover { border-color: var(--ring); text-decoration: none; }
.rm-monthnav strong { font-size: var(--text-base); font-variant-numeric: tabular-nums; }
.rm-table-wrap { overflow-x: auto; margin-top: 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--card); -webkit-overflow-scrolling: touch; }
.rm-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); min-width: 640px; }
.rm-table thead th {
  position: sticky; top: 0; z-index: 1;
  text-align: start;
  padding: 11px 12px;
  font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted-foreground);
  background: var(--bg-elev-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.rm-table tbody td, .rm-table tbody th {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.rm-table tbody tr:last-child td, .rm-table tbody tr:last-child th { border-bottom: 0; }
.rm-table tbody th { text-align: start; font-weight: 700; }
.rm-table tr.is-today td, .rm-table tr.is-today th { background: color-mix(in srgb, #fcd34d 14%, transparent); }
.rm-table tr.is-today th::after {
  content: "• " attr(data-today);
  color: #b45309; font-size: var(--text-xs); font-weight: 800; margin-inline-start: 6px;
}
.rm-table tr.is-past { opacity: .55; }
.rm-table td.is-iftar-col { font-weight: 800; color: #b45309; }
html[data-theme="dark"] .rm-table td.is-iftar-col { color: #fcd34d; }
.rm-note { margin: 12px 0 0; color: var(--muted-foreground); font-size: var(--text-sm); }

/* ---- Quran player — white card (night glass in dark mode, see below) ---- */
.rm-player {
  position: sticky; top: 64px; z-index: 25;
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 22px 22px 18px;
  color: var(--foreground);
  background: #fff;
  box-shadow: 0 18px 40px -24px rgba(0,0,0,.25);
}
.rm-player::before {
  content: "";
  position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, transparent, #f59e0b 30%, #f59e0b 70%, transparent);
  opacity: .9; pointer-events: none;
}
.rm-player-label {
  font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .14em; color: var(--muted-foreground);
}
.rm-player-title {
  margin: 6px 0 4px; font-size: clamp(1.05rem, 2.4vw, 1.3rem);
  font-weight: 800; letter-spacing: -.01em; line-height: 1.35; color: var(--foreground);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.rm-player-title .rm-warsh {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  background: rgba(245,158,11,.12); border: 1px solid rgba(245,158,11,.5);
  color: #b45309; font-size: 11px; font-weight: 800; vertical-align: middle;
  white-space: nowrap;
}
/* Animated equalizer — dances while audio plays, rests otherwise. */
.rm-eq { display: inline-flex; align-items: flex-end; gap: 2.5px; height: 18px; flex: none; }
.rm-eq span { width: 3.5px; border-radius: 2px; background: #f59e0b; height: 28%; opacity: .85; }
.rm-player.is-playing .rm-eq span { animation: rm-eq-b .9s ease-in-out infinite; }
.rm-player.is-playing .rm-eq span:nth-child(2) { animation-delay: .15s; }
.rm-player.is-playing .rm-eq span:nth-child(3) { animation-delay: .32s; }
.rm-player.is-playing .rm-eq span:nth-child(4) { animation-delay: .48s; }
@keyframes rm-eq-b { 0%, 100% { height: 26%; } 50% { height: 100%; } }
.rm-player audio { display: block; width: 100%; }
.rm-search {
  display: flex; align-items: center; gap: 8px;
  margin: 18px 0 10px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--card);
}
.rm-search:focus-within { border-color: var(--ring); }
.rm-search svg { width: 16px; height: 16px; color: var(--muted-foreground); flex: none; }
.rm-search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--foreground); font-size: var(--text-sm); padding: 10px 0; outline: 0; }
.rm-grid-label { margin: 18px 0 8px; font-size: var(--text-sm); font-weight: 800; color: var(--muted-foreground); text-transform: uppercase; letter-spacing: .05em; }
.rm-surahs { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 8px; }
/* Scrollable surah list — the search stays pinned above while 114 rows scroll. */
.rm-surahs--scroll {
  max-height: 400px; overflow-y: auto; overscroll-behavior: contain;
  padding: 4px; margin: 0 -4px; scroll-padding: 4px;
  scrollbar-width: thin; scrollbar-color: rgba(252,211,77,.55) transparent;
}
.rm-surahs--scroll::-webkit-scrollbar { width: 8px; }
.rm-surahs--scroll::-webkit-scrollbar-track { background: transparent; }
.rm-surahs--scroll::-webkit-scrollbar-thumb { background: rgba(252,211,77,.45); border-radius: 999px; }
/* Wizard back button (surah step → reciter step). */
.rm-back-row { margin: 10px 0 0; }
.rm-back {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--card); color: var(--foreground);
  font-size: var(--text-sm); font-weight: 700; text-decoration: none;
  transition: border-color var(--duration) var(--ease);
}
.rm-back:hover { border-color: var(--ring); text-decoration: none; }
.rm-back:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.rm-surah {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 10px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--card);
  color: var(--foreground); text-decoration: none; font-size: var(--text-sm);
}
.rm-surah:hover { border-color: var(--ring); text-decoration: none; }
.rm-surah.is-on { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.rm-surah-num {
  flex: none; min-width: 30px; height: 30px; padding: 0 6px;
  display: inline-grid; place-items: center;
  border-radius: 9px; font-weight: 800; font-size: var(--text-xs);
  background: var(--bg-elev-2); color: var(--muted-foreground);
  font-variant-numeric: tabular-nums;
}
.rm-surah.is-on .rm-surah-num { background: var(--primary); color: var(--primary-foreground); }
.rm-surah-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rm-live {
  padding: 2px 8px; border-radius: 999px; background: #dc2626; color: #fff;
  font-size: 10px; font-weight: 800; letter-spacing: .06em;
}

/* ---- FAQ (hub) ---- */
.rm-faq { border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px; margin: 0 0 8px; background: var(--card); }
.rm-faq summary { cursor: pointer; font-weight: 700; }
.rm-faq p { margin: 8px 0 2px; color: var(--muted-foreground); font-size: var(--text-sm); line-height: 1.6; }
.rm-section-h { margin: 26px 0 4px; font-size: var(--text-xl); }
.rm-section-sub { margin: 0 0 4px; color: var(--muted-foreground); font-size: var(--text-sm); }

/* ---- Quran hero variant ---- */
.rm-hero--quran::after { content: "📖"; text-shadow: 0 0 34px rgba(252,211,77,.35); }

/* ---- Quran step cards (radio first, then 1 reciter → 2 surahs) ---- */
.rm-step {
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
  padding: 20px;
  scroll-margin-top: 140px;
}
.rm-step-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 6px; }
.rm-step-num {
  flex: none; width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 14px; font-size: 20px; font-weight: 800;
  color: #fcd34d; border: 1px solid rgba(252,211,77,.45);
  background: rgba(252,211,77,.12);
}
.rm-step-ico {
  flex: none; width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 14px; font-size: 22px; line-height: 1;
  background: color-mix(in srgb, var(--primary) 12%, transparent);
}
.rm-step-head h2 { margin: 2px 0 0; font-size: var(--text-lg); }
.rm-step-head p { margin: 4px 0 0; color: var(--muted-foreground); font-size: var(--text-sm); }
.rm-prompt {
  margin: 18px 0 0;
  padding: 16px 18px;
  border: 1px dashed color-mix(in srgb, #fcd34d 55%, var(--border));
  border-radius: 14px;
  background: color-mix(in srgb, #fcd34d 8%, var(--card));
  font-size: var(--text-sm);
  font-weight: 600;
}
/* ---- Quran radio: station cards with live pulse + now-playing state ----
   One tap loads the stream into the sticky player above (plain links stay
   as the no-JS fallback). Active card = .is-on (synced by ramadan.js). */
.rm-count-badge {
  display: inline-block;
  vertical-align: middle;
  margin-inline-start: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #fcd34d;
  border: 1px solid rgba(252,211,77,.45);
  background: rgba(252,211,77,.12);
}
.rm-stations, .rm-reciters {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.rm-station, .rm-reciter {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  color: var(--foreground);
  text-decoration: none;
  transition: border-color var(--duration) var(--ease), transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease), background var(--duration) var(--ease);
}
.rm-station:hover, .rm-reciter:hover { border-color: var(--ring); transform: translateY(-1px); text-decoration: none; }
.rm-station:focus-visible, .rm-reciter:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.rm-station.is-on, .rm-reciter.is-on {
  border-color: #f59e0b;
  box-shadow: inset 0 0 0 1px #f59e0b, 0 10px 24px -14px rgba(245,158,11,.6);
  background: color-mix(in srgb, #f59e0b 8%, var(--card));
}
.rm-st-avatar {
  position: relative;
  flex: none;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 20px;
  font-weight: 800;
  color: #fcd34d;
  border: 1px solid rgba(252,211,77,.5);
  background:
    radial-gradient(1px 1px at 30% 25%, rgba(255,255,255,.7) 50%, transparent 51%),
    linear-gradient(140deg, #141536 0%, #2b2663 60%, #3a2a6e 100%);
  overflow: hidden;
}
.rm-st-letter { line-height: 1; }
.rm-st-eq { display: none; align-items: flex-end; gap: 2.5px; height: 18px; }
.rm-st-eq span { width: 3.5px; border-radius: 2px; background: #fcd34d; height: 30%; }
.rm-station.is-on .rm-st-letter, .rm-reciter.is-on .rm-st-letter { display: none; }
.rm-station.is-on .rm-st-eq, .rm-reciter.is-on .rm-st-eq { display: inline-flex; }
/* Equalizer rests while paused, dances while the sticky player plays
   (main page grids and the detachable popup list alike). */
.rm-station.is-on .rm-st-eq span, .rm-reciter.is-on .rm-st-eq span { height: 55%; }
.rm-player.is-playing ~ .rm-step .rm-station.is-on .rm-st-eq span,
.rm-player.is-playing ~ .rm-step .rm-reciter.is-on .rm-st-eq span,
.rm-player.is-playing ~ #rmPopRadioWrap .rm-station.is-on .rm-st-eq span { animation: rm-eq-b .9s ease-in-out infinite; }
.rm-player.is-playing ~ .rm-step .rm-station.is-on .rm-st-eq span:nth-child(2),
.rm-player.is-playing ~ .rm-step .rm-reciter.is-on .rm-st-eq span:nth-child(2),
.rm-player.is-playing ~ #rmPopRadioWrap .rm-station.is-on .rm-st-eq span:nth-child(2) { animation-delay: .15s; }
.rm-player.is-playing ~ .rm-step .rm-station.is-on .rm-st-eq span:nth-child(3),
.rm-player.is-playing ~ .rm-step .rm-reciter.is-on .rm-st-eq span:nth-child(3),
.rm-player.is-playing ~ #rmPopRadioWrap .rm-station.is-on .rm-st-eq span:nth-child(3) { animation-delay: .32s; }
.rm-player.is-playing ~ .rm-step .rm-station.is-on .rm-st-eq span:nth-child(4),
.rm-player.is-playing ~ .rm-step .rm-reciter.is-on .rm-st-eq span:nth-child(4),
.rm-player.is-playing ~ #rmPopRadioWrap .rm-station.is-on .rm-st-eq span:nth-child(4) { animation-delay: .48s; }
.rm-st-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rm-station-name {
  font-size: var(--text-sm);
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rm-station.is-on .rm-station-name, .rm-reciter.is-on .rm-station-name { color: var(--primary); }
.rm-st-warsh { font-size: 12px; }
.rm-st-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted-foreground);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rm-st-pulse { flex: none; width: 7px; height: 7px; border-radius: 50%; background: #dc2626; animation: rm-pulse 1.6s ease-in-out infinite; }
/* Reciter cards are on-demand voices, not live streams: static gold dot. */
.rm-reciter .rm-st-pulse { background: #f59e0b; animation: none; box-shadow: none; }
.rm-st-moshaft { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
@keyframes rm-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220,38,38,.5); opacity: 1; }
  50% { box-shadow: 0 0 0 5px rgba(220,38,38,0); opacity: .75; }
}
.rm-st-play {
  flex: none;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--muted-foreground);
  border: 1px solid var(--border);
  background: var(--bg-elev-2);
  transition: background var(--duration) var(--ease), color var(--duration) var(--ease), border-color var(--duration) var(--ease), transform var(--duration) var(--ease);
}
.rm-st-play svg { width: 16px; height: 16px; margin-inline-start: 2px; }
.rm-station:hover .rm-st-play, .rm-reciter:hover .rm-st-play { color: var(--primary); border-color: var(--ring); }
.rm-station.is-on .rm-st-play, .rm-reciter.is-on .rm-st-play {
  color: #231a03;
  border-color: transparent;
  background: linear-gradient(145deg, #ffe082, #fcd34d 55%, #f59e0b);
  box-shadow: 0 8px 20px -8px rgba(252,211,77,.8);
}
#rm-radio, #rm-reciter, #rm-surahs { scroll-margin-top: 140px; }

/* ---- Custom MP3 controls (JS-enhanced; native <audio> stays for no-JS) ---- */
.rm-player audio[hidden] { display: none; }
.rm-pcustom { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.rm-pcustom[hidden] { display: none; }
.rm-pc-play {
  position: relative;
  flex: none; width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center;
  background: #fff;
  border: 1.5px solid #f59e0b;
  color: #b45309; cursor: pointer;
  box-shadow: inset 0 0 0 5px rgba(245,158,11,.08), 0 12px 28px -12px rgba(0,0,0,.25);
  transition: background var(--duration) var(--ease), color var(--duration) var(--ease), transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease), border-color var(--duration) var(--ease);
}
.rm-pc-play:hover { transform: translateY(-2px); background: rgba(245,158,11,.12); }
.rm-pc-play:focus-visible { outline: 2px solid #f59e0b; outline-offset: 3px; }
.rm-pc-play svg {
  grid-area: 1 / 1; width: 24px; height: 24px;
  opacity: 0; transform: scale(.5);
  transition: opacity .18s var(--ease), transform .18s var(--ease);
}
.rm-pc-play[data-state="play"] [data-rm-ico-play],
.rm-pc-play[data-state="pause"] [data-rm-ico-pause] { opacity: 1; transform: scale(1); }
.rm-pc-play[data-state="play"] [data-rm-ico-play] { margin-inline-start: 3px; }
.rm-player.is-playing .rm-pc-play {
  background: linear-gradient(145deg, #ffe082, #fcd34d 55%, #f59e0b);
  color: #231a03; border-color: transparent;
  box-shadow: 0 10px 30px -8px rgba(252,211,77,.75), inset 0 1px 0 rgba(255,255,255,.5);
}
.rm-pc-mid { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rm-pc-seek {
  width: 100%; height: 22px; margin: 0; cursor: pointer;
  -webkit-appearance: none; appearance: none; background: transparent;
  accent-color: #f59e0b;
}
.rm-pc-seek::-webkit-slider-runnable-track { height: 5px; border-radius: 999px; background: var(--border); }
.rm-pc-seek::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 17px; height: 17px; margin-top: -6px; border-radius: 50%;
  background: #f59e0b; border: 2px solid #fff;
  box-shadow: 0 0 12px rgba(245,158,11,.5);
}
.rm-pc-seek::-moz-range-track { height: 5px; border-radius: 999px; background: var(--border); }
.rm-pc-seek::-moz-range-thumb { width: 13px; height: 13px; border-radius: 50%; background: #f59e0b; border: 2px solid #fff; }
.rm-pc-seek:disabled { opacity: .45; cursor: default; }
.rm-pc-times {
  display: flex; justify-content: space-between; gap: 8px;
  font-size: 11px; color: var(--muted-foreground); font-variant-numeric: tabular-nums;
}
.rm-pc-chip {
  flex: none; min-width: 46px; height: 38px; padding: 0 10px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--bg-elev-2); color: var(--foreground);
  font-size: var(--text-sm); font-weight: 800;
  font-variant-numeric: tabular-nums; cursor: pointer;
  transition: border-color var(--duration) var(--ease), background var(--duration) var(--ease);
}
.rm-pc-chip:hover { border-color: #f59e0b; background: rgba(245,158,11,.1); }
.rm-pc-chip:focus-visible { outline: 2px solid #f59e0b; outline-offset: 2px; }
.rm-pc-chip svg { width: 17px; height: 17px; }
.rm-player.is-loading .rm-pc-play { opacity: .65; }
/* Native fallback keeps a light panel where the engine allows it. */
.rm-player audio { display: block; width: 100%; margin-top: 10px; }
.rm-player audio::-webkit-media-controls-panel { background: #f6f3ea; border-radius: 10px; }
/* Playing-in-popup state: controls rest, take-back note takes over. */
.rm-popup-note[hidden] { display: none; }
.rm-popup-note {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 14px; padding: 12px 14px;
  border: 1px solid rgba(252,211,77,.5); border-radius: 14px;
  background: rgba(252,211,77,.1); font-size: var(--text-sm); font-weight: 600;
}
/* Audible-failure notice — silence always gets a visible reason. */
.rm-perr[hidden] { display: none; }
.rm-perr {
  margin: 10px 0 0; padding: 10px 14px;
  border: 1px solid rgba(220,38,38,.55); border-radius: 12px;
  background: rgba(220,38,38,.08); color: #b91c1c;
  font-size: var(--text-sm); font-weight: 600;
}
.rm-popup-note .rm-btn { padding: 8px 16px; font-size: var(--text-sm); }
.rm-player.is-popup .rm-pcustom { display: none; }

/* ---- Quran player in dark mode — night glass card ---- */
html[data-theme="dark"] .rm-player {
  color: #f4f2ff;
  border-color: rgba(252,211,77,.35);
  background:
    radial-gradient(1px 1px at 18% 20%, rgba(255,255,255,.7) 50%, transparent 51%),
    radial-gradient(1px 1px at 82% 78%, rgba(255,255,255,.55) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 64% 12%, rgba(255,255,255,.6) 50%, transparent 51%),
    linear-gradient(140deg, #141536 0%, #232058 55%, #3a2a6e 100%);
  box-shadow: 0 24px 50px -22px rgba(0,0,0,.55);
}
html[data-theme="dark"] .rm-player::before {
  background: linear-gradient(90deg, transparent, #fcd34d 30%, #fcd34d 70%, transparent);
}
html[data-theme="dark"] .rm-player-label { color: rgba(244,242,255,.6); }
html[data-theme="dark"] .rm-player-title { color: #fff; }
html[data-theme="dark"] .rm-player-title .rm-warsh {
  background: rgba(252,211,77,.16); border-color: rgba(252,211,77,.5); color: #fcd34d;
}
html[data-theme="dark"] .rm-eq span { background: #fcd34d; }
html[data-theme="dark"] .rm-pc-play {
  background: rgba(252,211,77,.07);
  border-color: rgba(252,211,77,.65);
  color: #fcd34d;
  box-shadow: inset 0 0 0 5px rgba(20,21,54,.55), 0 12px 28px -12px rgba(0,0,0,.7);
}
html[data-theme="dark"] .rm-pc-play:hover { background: rgba(252,211,77,.16); }
html[data-theme="dark"] .rm-pc-play:focus-visible { outline-color: #fff; }
html[data-theme="dark"] .rm-pc-seek::-webkit-slider-runnable-track,
html[data-theme="dark"] .rm-pc-seek::-moz-range-track { background: rgba(255,255,255,.22); }
html[data-theme="dark"] .rm-pc-seek::-webkit-slider-thumb,
html[data-theme="dark"] .rm-pc-seek::-moz-range-thumb {
  background: #fcd34d; border-color: rgba(255,255,255,.9);
  box-shadow: 0 0 12px rgba(252,211,77,.8);
}
html[data-theme="dark"] .rm-pc-times { color: rgba(244,242,255,.65); }
html[data-theme="dark"] .rm-pc-chip {
  border-color: rgba(255,255,255,.25);
  background: rgba(255,255,255,.08); color: #fff;
}
html[data-theme="dark"] .rm-pc-chip:hover { border-color: #fcd34d; background: rgba(255,255,255,.14); }
html[data-theme="dark"] .rm-pc-chip:focus-visible { outline-color: #fcd34d; }
html[data-theme="dark"] .rm-player audio::-webkit-media-controls-panel { background: #2a2660; }
html[data-theme="dark"] .rm-perr { background: rgba(220,38,38,.14); color: #fff; }

/* ---- Popup window (/ramadan/player/) ---- */
.rm-pop { max-width: 460px; margin-inline: auto; }
.rm-pop-kicker {
  margin: 22px 0 0; font-size: var(--text-sm); font-weight: 800;
  color: var(--muted-foreground); text-transform: uppercase; letter-spacing: .08em;
}
.rm-pop .rm-player { position: static; margin-top: 12px; }
.rm-pop [data-rm-detach] { display: none; }
/* Popup is a light surface — ghost buttons need dark text here
   (on the dark hero they stay white, see .rm-btn--ghost). */
.rm-pop .rm-btn--ghost { color: var(--foreground); border-color: var(--border); background: var(--card); }
.rm-pop .rm-btn--ghost:hover { border-color: var(--ring); }
html[data-theme="dark"] .rm-pop .rm-btn--ghost { color: #fff; border-color: rgba(255,255,255,.28); background: rgba(255,255,255,.08); }
html[data-theme="dark"] .rm-pop .rm-btn--ghost:hover { border-color: #fff; }
@media (max-width: 760px) {
  .rm-pcustom { gap: 10px; }
  .rm-pc-play { width: 56px; height: 56px; }
  .rm-surahs--scroll { max-height: 320px; }
}
@media (prefers-reduced-motion: reduce) {
  .rm-player.is-playing .rm-eq span { animation: none; }
  .rm-pc-play:hover { transform: none; }
  .rm-pc-play svg { transition: none; }
}

/* ---- Responsive ---- */
@media (max-width: 760px) {
  .rm-hero { padding: 26px 18px 22px; }
  .rm-hero::after { font-size: 84px; opacity: .55; }
  .rm-links, .rm-guide { grid-template-columns: minmax(0,1fr); }
  .rm-tiles { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .rm-player { top: 56px; padding: 12px 14px; }
  .rm-surahs { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
  .rm-reciters { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 400px) {
  .rm-tiles { gap: 8px; }
  .rm-tile p { font-size: var(--text-base); }
}
@media (prefers-reduced-motion: reduce) {
  .rm-btn, .rm-link, .rm-reciter, .rm-surah, .rm-station { transition: none; }
  .rm-link:hover, .rm-btn--gold:hover, .rm-station:hover, .rm-reciter:hover { transform: none; }
  .rm-station.is-on .rm-st-eq span, .rm-reciter.is-on .rm-st-eq span, .rm-st-pulse,
  .rm-player.is-playing ~ .rm-step .rm-station.is-on .rm-st-eq span,
  .rm-player.is-playing ~ .rm-step .rm-reciter.is-on .rm-st-eq span,
  .rm-player.is-playing ~ #rmPopRadioWrap .rm-station.is-on .rm-st-eq span { animation: none; }
}
