/* Nur tokens (res/values/colors.xml nur_*). Keep in sync with the app. */
.theme-night { --bg: #121316; --card: #1F2125; --border: #2A2C31; --border-strong: #3A3D43; --text: #ECECEF; --muted: #B8BAC1; --faint: #8A8D95; --arabic: #E07A6B; --gloss: #E0904A; --gold: #D6AC5E; --gold-soft: #8A6F3A; }
.theme-light { --bg: #FAFAF8; --card: #F2F2EF; --border: #E3E3DF; --border-strong: #D0D0CB; --text: #1C1C1E; --muted: #48484D; --faint: #48484D; --arabic: #C2362A; --gloss: #C2691C; --gold: #BB8F3F; --gold-soft: #DDC07E; }
.theme-sepia { --bg: #F0E0C7; --card: #EBDABF; --border: #D8C6A6; --border-strong: #C9B38F; --text: #1C1C1E; --muted: #48484D; --faint: #48484D; --arabic: #C2362A; --gloss: #C2691C; --gold: #BB8F3F; --gold-soft: #DDC07E; }

/* The app's reading faces are licensed; put their files in fonts/ on the host. Fallbacks draw otherwise. */
@font-face { font-family: "Herkul Mushaf"; src: url("fonts/shaikh_hamdullah_mushaf.ttf"); }
@font-face { font-family: "Herkul Souvenir"; font-weight: 300; src: url("fonts/souven_light.ttf"); }
@font-face { font-family: "Herkul Souvenir"; font-weight: 600; src: url("fonts/souven_demi.ttf"); }

html, body { margin: 0; height: 100%; background: #000; overflow: hidden; }
cast-media-player { --splash-image: none; }

#stage {
  position: absolute; left: 50%; top: 50%; width: 1280px; height: 720px; overflow: hidden;
  transform-origin: center; box-sizing: border-box;
  background: var(--bg); color: var(--text);
  font-family: Roboto, "Google Sans", "Noto Sans", system-ui, sans-serif;
  --scale: 1; --fit: 1;
  display: flex; flex-direction: column;
}
#stage[hidden] { display: none; }

.ar { font-family: "Herkul Mushaf", Amiri, "Noto Naskh Arabic", serif; color: var(--arabic); direction: rtl; }
.serif { font-family: "Herkul Souvenir", Georgia, serif; }
.num { font-variant-numeric: tabular-nums; }

.top { flex: 0 0 auto; padding: 36px 56px 0; display: flex; align-items: baseline; justify-content: space-between; gap: 24px; }
.eyebrow { font-size: 17px; font-weight: 600; letter-spacing: 2.4px; color: var(--faint); text-transform: uppercase; }
.top-right { font-size: 20px; color: var(--muted); }

.body { flex: 1 1 0; min-height: 0; overflow: hidden; box-sizing: border-box; }
.foot { flex: 0 0 auto; }
.progress { flex: 0 0 auto; height: 4px; background: var(--border); }
.progress > i { display: block; height: 4px; background: var(--gold); }

/* ---------- Idle ---------- */
.idle { padding: 72px 88px 64px; display: flex; flex-direction: column; justify-content: center; gap: 22px; }
.idle h1 { margin: 0; font-size: 64px; line-height: 70px; font-weight: 600; letter-spacing: -0.5px; max-width: 800px; }
.idle p { margin: 0; font-size: 26px; line-height: 38px; font-weight: 300; color: var(--muted); max-width: 760px; }

/* ---------- Tesbihat ---------- */
.tes-body { padding: 0 72px; display: flex; align-items: center; gap: 64px; }
.tes-text { flex: 1 1 0; min-width: 0; max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; }
.tes-title { font-size: 26px; font-weight: 600; }
.tes-ar { font-size: calc(var(--ar, 60px) * var(--scale) * var(--fit)); line-height: 1.7; text-wrap: balance; }
.tes-ar .dim { opacity: 0.4; }
.tes-lead { font-size: calc(40px * var(--scale) * var(--fit)); line-height: 1.6; color: var(--muted); }
.tes-mean { font-size: calc(24px * var(--scale) * var(--fit)); line-height: 1.45; font-weight: 300; color: var(--muted); max-width: 1040px; text-wrap: pretty; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; flex: 0 0 auto; }
.ring { flex: 0 0 auto; width: 320px; height: 320px; border-radius: 999px; display: flex; align-items: center; justify-content: center; }
.ring > div { width: 296px; height: 296px; border-radius: 999px; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.ring b { font-size: 132px; line-height: 136px; font-weight: 600; }
.ring span { font-size: 26px; color: var(--faint); }

.tes-foot { padding: 0 56px 40px; }
.steps { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 12px; }
.steps > div { display: flex; flex-direction: column; gap: 12px; }
.steps i { height: 4px; border-radius: 999px; background: var(--border); }
.steps span { font-size: 18px; line-height: 24px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.steps .done i { background: var(--gold-soft); }
.steps .done span { color: var(--muted); }
.steps .on i { background: var(--gold); }
.steps .on span { color: var(--text); font-weight: 600; }
.beads { display: flex; align-items: center; justify-content: center; gap: 28px; }
.beads > div { display: flex; align-items: center; gap: 14px; }
.beads i { width: 30px; height: 30px; box-sizing: border-box; border-radius: 999px; border: 3px solid var(--border-strong); }
.beads i.long { width: 64px; }
.beads i.done { background: var(--gold); border-color: var(--gold); }
.beads i.on { border-color: var(--gold); }
.beads b { font-size: 30px; font-weight: 600; }
.beads b span { font-weight: 400; color: var(--faint); }
.bars { display: flex; align-items: center; gap: 20px; }
.bars > div { flex: 1 1 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; }
.bars i { height: 4px; border-radius: 999px; background: var(--border); }
.bars i.done { background: var(--gold-soft); }
.bars i.on { background: var(--gold); }
.bars span { font-size: 20px; color: var(--muted); }

/* ---------- Cevşen ---------- */
.cev-body { padding: 12px 56px 0; display: flex; flex-direction: column; gap: 12px; }
.cev-intro { flex: 0 0 auto; font-size: 31px; line-height: 46px; text-align: center; color: var(--muted); }
.cev-grid { flex: 0 0 auto; direction: rtl; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 20px; }
.cev-cell { height: 70px; box-sizing: border-box; padding: 0 22px; border-radius: 16px; border: 1px solid transparent; display: flex; align-items: center; gap: 18px; }
.cev-cell .no { direction: ltr; width: 26px; font-size: 17px; color: var(--faint); text-align: center; }
.cev-cell .ar { font-size: 52px; line-height: 70px; white-space: nowrap; }
.cev-grid.follow .cev-cell { opacity: 0.42; }
.cev-grid.follow .cev-cell.on { opacity: 1; background: var(--card); border-color: var(--gold); }
.cev-mean { flex: 1 1 0; min-height: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.cev-mean > div { font-size: 25px; line-height: 34px; font-weight: 300; text-align: center; max-width: 1080px; text-wrap: balance; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cev-ref { flex: 0 0 auto; height: 84px; box-sizing: border-box; border-radius: 999px; border: 1px solid var(--border-strong); display: flex; align-items: center; justify-content: center; font-size: 43px; line-height: 84px; white-space: nowrap; margin-bottom: 14px; }
.cev-ref.dim { opacity: 0.55; }
.cev-ref.on { background: var(--card); border-color: var(--gold); }
.cev-window { flex: 0 0 auto; display: flex; flex-direction: column; gap: 6px; text-align: center; white-space: nowrap; }
.cev-window > div { overflow: hidden; }
.cev-window .far { height: 50px; font-size: 28px; line-height: 50px; opacity: 0.28; }
.cev-window .near { height: 64px; font-size: 38px; line-height: 64px; opacity: 0.5; }
.cev-window .cur { height: 108px; box-sizing: border-box; border-radius: 20px; border: 1px solid var(--gold); background: var(--card); font-size: 54px; line-height: 104px; }
.cev-dots { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 16px; }
.cev-dots i { width: 12px; height: 12px; border-radius: 999px; background: var(--border); }
.cev-dots i.ref { width: 36px; }
.cev-dots i.done { background: var(--gold-soft); }
.cev-dots i.on { width: 28px; background: var(--gold); }
.cev-dots i.ref.on { width: 36px; }
.cev-dots span { margin-left: 12px; font-size: 20px; color: var(--muted); }
.cev-list { flex: 1 1 0; min-height: 0; overflow: hidden; display: flex; flex-direction: column; justify-content: center; text-align: center; white-space: nowrap; }
.cev-list > div { font-size: calc(36px * var(--fit)); line-height: calc(52px * var(--fit)); }

/* ---------- Reader ---------- */
.rd-body { padding: 26px 64px 0; display: flex; flex-direction: column; gap: 20px; font-size: calc(28px * var(--scale) * var(--fit)); line-height: 1.5; font-weight: 300; }
.rd-body > * { margin: 0; flex: 0 0 auto; text-wrap: pretty; }
.rd-body .h { font-size: 1.3em; line-height: 1.25; font-weight: 600; color: var(--arabic); text-align: center; }
.rd-body .a { font-size: 1.45em; line-height: 1.8; text-align: center; }
.rd-body.follow > * { opacity: 0.34; }
.rd-body.follow > .on { opacity: 1; }
.rd-body .g { color: var(--gloss); }
.rd-gloss { position: absolute; left: 64px; right: 64px; bottom: 36px; box-sizing: border-box; padding: 18px 28px; border-radius: 20px; background: var(--card); border: 1px solid var(--border); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18); display: flex; align-items: baseline; gap: 20px; }
.rd-gloss b { flex: 0 0 auto; font-size: 30px; line-height: 40px; font-weight: 600; color: var(--gloss); }
.rd-gloss span { font-size: 26px; line-height: 36px; font-weight: 300; }
