/* zaher.me/quran: light, calm, typographic. No dark mode by design. */
@font-face {
  font-family: "DigitalKhatt";
  src: url("fonts/dk.3278d1110c.woff2") format("woff2");
  font-display: block;
}
@font-face {
  font-family: "Readex Pro";
  src: url("fonts/ui.6729933e5b.woff2") format("woff2");
  font-weight: 300 600;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #fbf9f4;
  --paper-2: #f4f0e6;
  --card: #fffdf9;
  --ink: #201c17;
  --ink-2: #57504a;
  --ink-3: #8a8277;
  --line: #e8e1d3;
  --line-2: #d8cfbd;
  --gold: #9b7535;
  --gold-2: #b89250;
  --gold-soft: #efe3c7;
  --hl: #f0dfb0;
  --hl-ayah: rgba(212, 180, 110, 0.13);
  --sel: rgba(155, 117, 53, 0.1);
  --shadow: 0 18px 40px -22px rgba(52, 38, 16, 0.35), 0 2px 8px -3px rgba(52, 38, 16, 0.12);
  --ui: "Readex Pro", system-ui, -apple-system, "Segoe UI", "Noto Sans Arabic", "Geeza Pro", Tahoma, sans-serif;
  --quran: "DigitalKhatt", "KFGQPC Uthmanic Script HAFS", "Amiri Quran", serif;
  --qsize: clamp(1.6rem, 1.05rem + 1.7vw, 2.2rem);
  --top-h: 58px;
  --player-h: 0px;
  --wrap: 47rem;
  --r: 14px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}
:root[data-paper="white"] {
  --paper: #ffffff;
  --paper-2: #f5f4f1;
  --card: #ffffff;
  --line: #e9e6e0;
  --line-2: #dbd6cc;
}

/* Disable double-tap zoom on every surface, including nested panels.
   Scrolling and pinch zoom remain available; artwork gesture rules override this. */
* { box-sizing: border-box; touch-action: manipulation; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding-bottom: calc(var(--player-h) + 40px + env(safe-area-inset-bottom));
}
::selection { background: rgba(184, 146, 80, 0.25); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { cursor: default; opacity: 0.45; }
:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 2px; border-radius: 8px; }
svg { display: block; }
[hidden] { display: none !important; }
.skip { position: fixed; inset-inline-start: 10px; top: 10px; transform: translateY(-160%); background: var(--card); padding: 8px 12px; border-radius: 10px; z-index: 100; box-shadow: var(--shadow); }
.skip:focus { transform: none; }
body { overflow-x: clip; }
/* Keep Quran reading scrolls inside the card instead of its outer feed.
   The homepage's separate viewport lock remains in effect. */
html.tweet-embed:has(body.reader-dock-active) { height:100%; overflow:hidden; }
.tweet-embed body.reader-dock-active { height:100dvh; overflow-y:auto; overflow-x:hidden; overscroll-behavior-y:contain; -webkit-overflow-scrolling:touch; touch-action:pan-y; }
.tweet-embed body.reader-dock-active .reader { touch-action:pan-y; }
.quran { font-family: var(--quran); font-weight: normal; direction: rtl; }

/* ------------------------------------------------------------ top bar */
.top {
  position: sticky; top: 0; z-index: 30;
  height: var(--top-h);
  background: rgba(251, 249, 244, 0.93);
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.top.scrolled { border-bottom-color: var(--line); }
.top-in {
  height: 100%; max-width: 72rem; margin: 0 auto; padding: 0 14px;
  display: flex; align-items: center; gap: 6px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 500; font-size: 15px; padding: 6px 8px; border-radius: 10px; }
.brand .star { width: 24px; height: 24px; color: var(--gold); }
.brand small { color: var(--ink-3); font-weight: 400; font-size: 12.5px; }
.top-title { flex: 1; min-width: 0; text-align: center; line-height: 1.2; }
.top-title b { display: block; font-weight: 500; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page-top { direction:ltr; max-width:none; width:100%; }
.page-navigation { display:flex; align-items:center; gap:4px; flex:none; direction:ltr; }
.page-navigation .ib { flex:none; }
.developer-link { margin:12px 0 24px; color:var(--ink-2); font-size:13px; }
@media(max-width:480px) {
  .page-top { padding-inline:10px; column-gap:4px; }
  .page-top > .ib { width:32px; flex:0 0 32px; }
  .page-navigation { gap:2px; }
  .page-navigation .ib { width:34px; }
}
.top-title span { display: block; font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.reader-heading { display:flex; flex-direction:column; align-items:center; gap:0; }
.reader-heading > .surah-picker { max-width:100%; padding:2px 5px; }
body.reader-dock-active:has(.reader-top) { --top-h:96px; }
.reader-top { flex-wrap:wrap; align-content:center; row-gap:2px; }
.reader-presence { display:flex; justify-content:center; flex:0 0 100%; }
.presence-badge { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:36px; padding:5px 14px; border:1px solid #c5d6be; border-radius:30px; background:#edf4e8; color:#385332; font-size:13px; font-weight:500; line-height:1.5; white-space:nowrap; }
.presence-badge:hover { background:#e5efdf; border-color:#a4bd98; }
.presence-badge > i { width:7px; height:7px; flex:none; background:#64864e; border-radius:50%; box-shadow:0 0 0 3px #dde9d6; }
.presence-badge strong { font-size:15px; font-weight:600; font-variant-numeric:tabular-nums; }
.presence-badge[data-presence-state="unavailable"] { color:var(--ink-3); background:var(--paper); border-color:var(--line); }
.presence-badge[data-presence-state="unavailable"] > i,.presence-badge[data-presence-state="loading"] > i { background:#a6a69a; box-shadow:none; }
.presence-compact { min-height:32px; max-width:100%; padding:3px 12px; font-size:12px; }
.presence-compact strong { font-size:14px; }
@media(max-width:360px) {
  .reader-top { padding-inline:10px; column-gap:4px; }
  .reader-top > .ib { flex:0 0 36px; width:36px; }
}
.home-place:has(.presence-badge) { display:flex; justify-content:center; align-items:center; flex-wrap:wrap; column-gap:16px; row-gap:5px; }
.reading-summary { display:grid; grid-template-columns:minmax(0,1.3fr) minmax(0,2fr); gap:6px; width:min(480px,100%); }
.reading-summary > .presence-badge { flex-direction:column; gap:0; min-width:0; min-height:48px; padding:4px 6px; border-radius:12px; font-size:12px; }
.reading-summary .presence-badge > i { display:none; }
.reading-summary .presence-badge strong { font-size:14px; }
.reading-summary .presence-badge[data-presence-state="ready"] strong::before { content:''; display:inline-block; width:5px; height:5px; margin-inline-end:5px; border-radius:50%; background:#64864e; vertical-align:middle; }
.presence-badge[data-presence-real-active] > i { background:#a76d13; box-shadow:0 0 0 3px #f4e1b6; }
.reading-summary .presence-badge[data-presence-real-active] strong::before { background:#a76d13; }
.reading-stats { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; min-width:0; }
.reading-time { position:relative; display:flex; flex-direction:column; align-items:center; justify-content:center; min-width:0; min-height:48px; padding:4px 6px; border:1px solid var(--line); border-radius:12px; background:var(--card); color:var(--ink-2); line-height:1.5; }
.reading-time > span { font-size:11px; white-space:nowrap; }
.reading-time strong { font-size:13px; font-weight:500; color:var(--ink); font-variant-numeric:tabular-nums; white-space:nowrap; }
.reading-time:hover { background:var(--paper-2); }
.reading-value-row { display:flex; align-items:center; justify-content:center; gap:3px; max-width:100%; }
.reading-value-row strong { min-width:0; overflow:hidden; text-overflow:ellipsis; }
.reading-goal-check { display:inline-flex; flex:none; width:12px; height:12px; color:#496e3b; }
.reading-goal-check svg { width:100%; height:100%; }
.reading-goal-progress { position:absolute; inset-inline:7px; bottom:2px; height:2px; border-radius:4px; background:#eae1cf; overflow:hidden; }
.reading-goal-fill { display:block; height:100%; border-radius:inherit; background:var(--gold); }
.reading-goal-complete { border-color:#c5d6be; background:#f3f7ee; }
.reading-goal-complete .reading-goal-fill { background:#64864e; }
.reading-goal-form { margin:18px 0; padding:14px; border:1px solid var(--line); border-radius:14px; background:var(--paper); }
.reading-goal-form h3 { margin:0 0 5px; font-size:15px; font-weight:500; }
.reading-goal-form .hint { margin:6px 0 10px; }
.reading-goal-options { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:5px; margin:12px 0; }
.reading-goal-options button { min-height:40px; padding:4px 2px; border:1px solid var(--line); border-radius:10px; background:var(--card); font-size:12px; white-space:nowrap; }
.reading-goal-options button[aria-pressed="true"] { background:var(--gold-soft); border-color:var(--gold-2); color:#624719; }
.reading-goal-label { display:flex; align-items:center; justify-content:space-between; gap:10px; font-size:13px; }
.reading-goal-label input { width:86px; min-height:42px; padding:6px 10px; border:1px solid var(--line-2); border-radius:10px; background:var(--card); color:var(--ink); font:inherit; text-align:center; }
.reading-goal-label input[aria-invalid="true"] { border-color:#a34232; }
.reading-goal-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
.reading-goal-actions .btn { flex:1; min-height:42px; font-size:12px; }
.reading-calendar { margin:18px 0; padding:12px; border:1px solid var(--line); border-radius:14px; background:var(--paper); }
.reading-calendar h3 { margin:0 0 8px; font-size:15px; font-weight:500; }
.reading-calendar-nav { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.reading-calendar-nav h4 { margin:0; font-size:14px; font-weight:500; }
.reading-calendar-nav button { display:grid; place-items:center; width:40px; height:40px; border-radius:10px; color:var(--ink-2); }
.reading-calendar-nav svg { width:18px; height:18px; transform:rotate(90deg); }
.reading-calendar-nav button:last-child svg { transform:rotate(-90deg); }
[dir="rtl"] .reading-calendar-nav svg { transform:rotate(-90deg); }
[dir="rtl"] .reading-calendar-nav button:last-child svg { transform:rotate(90deg); }
.reading-calendar button:disabled { opacity:.35; cursor:default; }
.reading-calendar-week,.reading-calendar-days { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:2px; text-align:center; }
.reading-calendar-week { margin:6px 0; font-size:10px; color:var(--ink-3); }
.reading-calendar-day { display:flex; flex-direction:column; align-items:center; justify-content:center; min-width:0; min-height:44px; padding:2px 0; border:1px solid transparent; border-radius:10px; font-size:12px; line-height:1.4; }
.reading-calendar-day.is-today { border-color:var(--gold-2); }
.reading-calendar-day[aria-pressed="true"] { background:var(--gold-soft); }
.reading-calendar-day:not(:disabled):hover,.reading-calendar-nav button:not(:disabled):hover { background:var(--paper-2); }
.reading-calendar-mark { position:relative; display:flex; align-items:center; justify-content:center; height:16px; width:100%; }
.reading-calendar-mark i { display:block; border-radius:50%; background:var(--gold); }
.reading-calendar-check { position:absolute; inset-inline-end:0; bottom:0; width:10px; height:10px; color:#496e3b; }
.reading-calendar-check svg { width:100%; height:100%; }
.reading-calendar-detail { min-height:25px; margin:12px 0 4px; font-size:12px; line-height:1.8; }
.reading-calendar-count { margin:4px 0; font-size:12px; color:var(--ink-2); }
.reading-calendar-note { margin:8px 0 0; font-size:11px; line-height:1.8; color:var(--ink-3); }
.reminder-entry { width:100%; justify-content:center; }
.reminder-body > p { font-size:14px; line-height:1.9; }
.reminder-time { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:18px; }
.reminder-time input { min-height:44px; min-width:125px; padding:7px 12px; border:1px solid var(--line-2); border-radius:12px; background:var(--card); color:var(--ink); font:16px var(--ui); direction:ltr; }
.reminder-actions { display:flex; flex-wrap:wrap; gap:8px; }
.reminder-actions .btn { flex:1 1 140px; min-height:44px; font-size:13px; }
.reminder-status { min-height:30px; font-size:13px; line-height:1.9; color:#496e3b; }
.reminder-status.is-error { color:#994932; }
.reminder-guide { padding:12px; border:1px solid var(--line); border-radius:12px; background:var(--paper); font-size:13px; line-height:1.9; }
.reminder-guide .btn { width:100%; }
.home-place:has(.reading-summary) { width:100%; max-width:480px; row-gap:6px; }
.reading-time-details dl { margin:0 0 18px; display:grid; gap:8px; }
.reading-time-details dl > div { display:flex; justify-content:space-between; gap:12px; padding:12px; border:1px solid var(--line); border-radius:12px; background:var(--paper); }
.reading-time-details dt { color:var(--ink-2); }
.reading-time-details dd { margin:0; font-weight:500; white-space:nowrap; }
.spacer { flex: 1; }
.ib {
  width: 40px; height: 40px; border-radius: 12px; display: inline-grid; place-items: center; color: var(--ink-2);
  transition: background 0.15s, color 0.15s;
}
.ib:hover { background: var(--paper-2); color: var(--ink); }
.ib svg { width: 21px; height: 21px; }

/* ------------------------------------------------------------ home */
.home { max-width: 72rem; margin: 0 auto; padding: 0 16px 40px; }
.hero { text-align: center; padding: 34px 0 26px; }
.hero .orn { width: 64px; height: 64px; margin: 0 auto 6px; color: var(--gold); }
.hero h1 { margin: 0; font-size: clamp(2.6rem, 1.8rem + 3vw, 4rem); line-height: 1.9; color: var(--ink); word-spacing: 0.22em; }
.hero p { margin: 0 auto; max-width: 34rem; color: var(--ink-2); font-size: 15.5px; }
.hero .rule { width: 120px; height: 12px; margin: 16px auto 0; color: var(--gold-2); }
.searchbox {
  margin: 22px auto 0; max-width: 34rem; width: 100%;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line);
  color: var(--ink-3); text-align: start; box-shadow: 0 1px 0 rgba(0,0,0,0.02);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.searchbox:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.searchbox svg { width: 19px; height: 19px; flex: none; }
.searchbox span { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.searchbox kbd { font: 11px/1 var(--ui); border: 1px solid var(--line-2); border-radius: 6px; padding: 4px 6px; color: var(--ink-3); }

.resume {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 4px 0 26px;
}
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); font-size: 13.5px; color: var(--ink-2);
  transition: border-color 0.15s, background 0.15s;
}
.chip:hover { border-color: var(--gold-2); color: var(--ink); }
.chip svg { width: 16px; height: 16px; color: var(--gold); }
.chip.primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip.primary svg { color: var(--gold-soft); }
.chip.primary:hover { background: #000; }

.tabs { display: flex; justify-content: center; gap: 4px; margin: 6px 0 18px; }
.tab { padding: 8px 18px; border-radius: 999px; color: var(--ink-3); font-size: 14px; }
.tab[aria-selected="true"] { background: var(--paper-2); color: var(--ink); font-weight: 500; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 10px; }
.card {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px; min-height: 68px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  transition: border-color 0.15s, transform 0.15s var(--ease), box-shadow 0.15s;
}
.card:hover { border-color: var(--gold-2); transform: translateY(-1px); box-shadow: var(--shadow); }
.badge { position: relative; width: 38px; height: 38px; flex: none; display: grid; place-items: center; color: var(--gold-2); }
.badge svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.badge b { position: relative; font-weight: 500; font-size: 12.5px; color: var(--ink); }
.card .names { flex: 1; min-width: 0; line-height: 1.35; }
.card .names b { display: block; font-weight: 500; font-size: 16px; }
.card .names span { display: block; font-size: 12.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .side { text-align: end; font-size: 12px; color: var(--ink-3); line-height: 1.4; white-space: nowrap; }
.card .side .qn { font-family: var(--quran); font-size: 21px; color: var(--ink-2); line-height: 1.5; display: block; }

.foot { margin: 48px auto 0; max-width: 46rem; text-align: center; color: var(--ink-3); font-size: 12.5px; line-height: 1.8; }
.foot a { text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.foot a:hover { color: var(--ink); }

/* ------------------------------------------------------------ reader */
.reader { max-width: var(--wrap); margin: 0 auto; padding: 8px 18px 20px; }
.shead { text-align: center; padding: 18px 0 6px; }
.frame { position: relative; max-width: 520px; margin: 0 auto; color: var(--gold-2); }
.frame svg { width: 100%; height: auto; }
.frame h1 {
  position: absolute; inset: 0; margin: 0; display: grid; place-items: center;
  font-size: clamp(1.45rem, 1.1rem + 1.2vw, 1.95rem); color: var(--ink); line-height: 1; padding-top: 0.2em;
}
.smeta { margin: 10px 0 0; color: var(--ink-3); font-size: 13px; }
.sacts { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 16px 0 4px; }
.basmala {
  text-align: center; font-size: calc(var(--qsize) * 1.02); line-height: 2.2; margin: 18px 0 6px;
  font-feature-settings: "bism" 1; color: var(--ink); border-radius: 12px; transition: background 0.3s;
}
.basmala.on { background: var(--hl-ayah); }

.qtext {
  font-family: var(--quran);
  font-size: var(--qsize);
  line-height: 2.32;
  word-spacing: 0.14em;
  text-align: justify;
  text-justify: inter-word;
  margin: 0;
  direction: rtl;
  isolation: isolate;
  color: var(--ink);
}
.w { position: relative; cursor: pointer; border-radius: 0.3em; }
.w::before {
  content: ""; position: absolute; inset: 0.46em -0.1em 0.3em; border-radius: 0.3em;
  background: var(--hl); opacity: 0; transition: opacity 0.14s; z-index: -1; pointer-events: none;
}
.w.on::before { opacity: 1; }
.w:hover::before { opacity: 0.45; }
.w.on:hover::before { opacity: 1; }
.no-word-hl .w.on::before { opacity: 0; }
.ayah { border-radius: 0.35em; transition: background 0.3s; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.ayah.on { background: var(--hl-ayah); }
.ayah.sel { background: var(--sel); }
.ayah.flash { animation: flash 5s ease-in-out; }
.ayah.on.flash { --flash-rest:var(--hl-ayah); }
.ayah.sel.flash { --flash-rest:var(--sel); }
@keyframes flash {
  0%, 100% { background:var(--flash-rest,transparent); }
  12%, 38% { background:rgba(212,180,110,.3); }
}
.end { color: var(--gold); cursor: pointer; white-space: nowrap; }
.verse-tail { display:inline-block; white-space:nowrap; }
.ayah.bm .end { color: #a4452c; }
.rub, .sajda { color: var(--gold); }

.pg-foot {
  display: flex; align-items: center; justify-content: center; margin: 14px 0 20px; color: var(--ink-3);
  font-size: 12px; user-select: none;
  background: linear-gradient(to right, transparent, var(--line-2) 22%, var(--line-2) 78%, transparent) center / 100% 1px no-repeat;
}
.pg-foot .pn { display: inline-grid; place-items: center; min-width: 32px; height: 26px; padding: 0 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2); background: var(--paper); font-variant-numeric: tabular-nums; }
.card .side.bmk { color: var(--gold); }
.card .side.bmk svg { width: 18px; height: 18px; }
.size .aa.sm { font-size: 18px; }
.size .aa.lg { font-size: 30px; }

.vlist .vrow { padding: 12px 4px 14px; border-bottom: 1px solid var(--line); }
.vlist .vrow:last-child { border-bottom: 0; }
.vlist .qtext { text-align: start; }
.vref { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-3); margin-bottom: 2px; }

.snav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 34px 0 8px; }
.snav a { display: block; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); transition: border-color 0.15s; }
.snav a:hover { border-color: var(--gold-2); }
.snav small { display: block; color: var(--ink-3); font-size: 12px; }
.snav b { font-weight: 500; }
.snav .next { text-align: end; }

.loading { display: grid; place-items: center; min-height: 40vh; color: var(--ink-3); }
.spin { width: 22px; height: 22px; animation: rot 0.9s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }
.err { text-align: center; padding: 60px 10px; color: var(--ink-2); }

/* ------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); font-size: 14px; color: var(--ink);
  transition: border-color 0.15s, background 0.15s;
}
.btn:hover { border-color: var(--gold-2); }
.btn svg { width: 18px; height: 18px; }
.btn.dark { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn.dark:hover { background: #000; }
.btn .sub { color: var(--ink-3); font-size: 12.5px; }

/* ------------------------------------------------------------ player */
.player {
  position: fixed; z-index: 40; left: 50%; bottom: calc(12px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(760px, calc(100% - 20px));
  background: rgba(255, 253, 249, 0.97);
  background: color-mix(in srgb, var(--card) 94%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow);
  padding: 10px 12px 10px; overflow: hidden;
  animation: rise 0.28s var(--ease);
}
@keyframes rise { from { transform: translate(-50%, 16px); opacity: 0; } }
.p-track { position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--line); }
.p-fill { position: absolute; top: 0; bottom: 0; left: 0; width: 0; background: var(--gold-2); }
.p-seek { position: absolute; left: 0; right: 0; top: -6px; height: 16px; width: 100%; margin: 0; opacity: 0; cursor: pointer; }
.p-row { display: flex; align-items: center; gap: 10px; }
.p-info { flex: 1; min-width: 0; line-height: 1.3; }
.p-info b { display: block; font-weight: 500; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-info button { display: block; max-width: 100%; font-size: 12.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: start; }
.p-info button:hover { color: var(--ink); }
.p-transport { display: flex; align-items: center; gap: 4px; direction: ltr; }
.p-play {
  width: 48px; height: 48px; border-radius: 50%; background: var(--ink); color: var(--paper);
  display: grid; place-items: center; transition: transform 0.15s var(--ease), background 0.15s;
}
.p-play:hover { background: #000; transform: scale(1.04); }
.p-play svg { width: 22px; height: 22px; }
.p-tools { display: flex; align-items: center; gap: 2px; }
.p-tools .ib { width: 36px; height: 36px; }
.p-tools .ib[aria-pressed="true"] { color: var(--gold); background: var(--paper-2); }
.p-speed { font-size: 12.5px; font-weight: 500; min-width: 40px; height: 32px; border-radius: 10px; color: var(--ink-2); }
.p-speed:hover { background: var(--paper-2); }
.p-time { font-size: 11.5px; color: var(--ink-3); min-width: 74px; text-align: center; font-variant-numeric: tabular-nums; }

.fab {
  position: fixed; z-index: 35; left: 50%; transform: translateX(-50%);
  bottom: calc(18px + env(safe-area-inset-bottom));
  display: inline-flex; align-items: center; gap: 10px; height: 50px; padding: 0 20px 0 16px;
  background: var(--ink); color: var(--paper); border-radius: 999px; box-shadow: var(--shadow);
  font-size: 14.5px; transition: transform 0.15s var(--ease), background 0.15s;
}
.fab:hover { background: #000; transform: translateX(-50%) translateY(-1px); }
.fab svg { width: 20px; height: 20px; }
.fab span { white-space: nowrap; }
.fab small { color: #cfc6b6; font-size: 12.5px; white-space: nowrap; max-width: 48vw; overflow: hidden; text-overflow: ellipsis; }

/* ------------------------------------------------------------ selection bar */
.selbar {
  position: fixed; z-index: 45; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--player-h) + 20px + env(safe-area-inset-bottom));
  width: min(820px, calc(100% - 20px)); max-width: calc(100% - 20px);
  display: flex; flex-direction: column; align-items: stretch; gap: 6px; padding: 6px; border-radius: 16px;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
  animation: rise 0.22s var(--ease); overflow: hidden;
}
.fab:not([hidden]) ~ .selbar { bottom: calc(80px + env(safe-area-inset-bottom)); }
.selbar .ref { padding: 0 10px; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.selbar button { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border-radius: 11px; font-size: 13.5px; white-space: nowrap; }
.selbar button:hover { background: var(--paper-2); }
.selbar button svg { width: 18px; height: 18px; color: var(--gold); }
.selbar button.x svg { color: var(--ink-3); }
.sel-actions { display:flex; align-items:center; gap:4px; overflow-x:auto; }
.sel-actions button { flex-shrink:0; }
.sel-experiences { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:6px; padding-top:6px; border-top:1px solid var(--line); }
.sel-experiences button { justify-content:center; min-height:38px; height:auto; white-space:normal; border:1px solid var(--line); background:var(--paper-2); }
.sel-experiences button svg { flex-shrink:0; }
@media (max-width:600px) { .sel-experiences { grid-template-columns:repeat(2,minmax(0,1fr)); } }

/* ------------------------------------------------------------ overlays */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(40, 33, 24, 0.22); animation: fade 0.18s; }
@keyframes fade { from { opacity: 0; } }
.panel {
  position: fixed; z-index: 61; left: 50%; top: 9vh; transform: translateX(-50%);
  width: min(640px, calc(100% - 20px)); max-height: 82vh; display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow);
  animation: drop 0.22s var(--ease); overflow: hidden;
}
@keyframes drop { from { transform: translate(-50%, -8px); opacity: 0; } }
.panel-h { display: flex; align-items: center; gap: 8px; padding: 12px 12px 10px 18px; border-bottom: 1px solid var(--line); }
[dir="rtl"] .panel-h { padding: 12px 18px 10px 12px; }
.panel-h h2 { flex: 1; margin: 0; font-size: 16px; font-weight: 500; }
.panel-b { overflow-y: auto; padding: 8px 18px 18px; }
.sfield { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.sfield svg { width: 20px; height: 20px; color: var(--ink-3); flex: none; }
.sfield input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: 16px var(--ui); color: var(--ink); -webkit-appearance: none; appearance: none; }
.sfield input::-webkit-search-cancel-button, .sfield input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; display: none; }
.sfield input::placeholder { color: var(--ink-3); }
.hint { color: var(--ink-3); font-size: 12.5px; padding: 12px 2px 4px; line-height: 1.9; }
.hint b { font-weight: 500; color: var(--ink-2); }
.rsec { margin: 12px 0 4px; font-size: 12px; color: var(--ink-3); }
.ritem { display: flex; align-items: center; gap: 12px; padding: 10px 10px; border-radius: 12px; cursor: pointer; }
.ritem:hover, .ritem.act { background: var(--paper-2); }
.ritem .badge { width: 32px; height: 32px; }
.ritem .rt { flex: 1; min-width: 0; }
.ritem .rt b { display: block; font-weight: 500; }
.ritem .rt span { display: block; font-size: 12.5px; color: var(--ink-3); }
.aitem { display: block; padding: 12px 10px; border-radius: 12px; cursor: pointer; }
.aitem:hover, .aitem.act { background: var(--paper-2); }
.aitem .ar { font-family: var(--quran); font-size: 23px; line-height: 2.15; word-spacing: 0.16em; direction: rtl; text-align: right; isolation: isolate; }
.aitem .ar mark { position: relative; background: none; color: inherit; }
.aitem .ar mark::before { content: ""; position: absolute; inset: 0.46em -0.1em 0.3em; border-radius: 0.3em; background: var(--hl); z-index: -1; }
.aitem .rf { font-size: 12px; color: var(--gold); }
.empty { color: var(--ink-3); padding: 20px 4px; font-size: 14px; }

.set { padding: 14px 0; border-bottom: 1px solid var(--line); }
.set:last-child { border-bottom: 0; }
.set > label, .set > .lbl { display: block; font-size: 13px; color: var(--ink-3); margin-bottom: 10px; }
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--paper-2); gap: 2px; flex-wrap: wrap; }
.seg button { padding: 7px 14px; border-radius: 9px; font-size: 13.5px; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 14.5px; }
.sw { position: relative; width: 44px; height: 26px; flex: none; border-radius: 999px; background: var(--line-2); transition: background 0.18s; }
.sw::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,0.2); transition: transform 0.18s var(--ease); }
.sw[aria-checked="true"] { background: var(--gold-2); }
.sw[aria-checked="true"]::after { transform: translateX(18px); }
[dir="rtl"] .sw[aria-checked="true"]::after { transform: translateX(-18px); }
.size { display: flex; align-items: center; gap: 12px; }
.size input { flex: 1; accent-color: var(--gold); }
.size .aa { font-family: var(--quran); color: var(--ink-2); }
.preview { font-family: var(--quran); text-align: center; line-height: 2.1; margin-top: 8px; color: var(--ink); word-spacing: 0.14em; font-feature-settings: "bism" 1; }
.rlist .ritem .chk { width: 20px; height: 20px; color: var(--gold); visibility: hidden; }
.rlist .ritem[aria-selected="true"] .chk { visibility: visible; }
.rlist .ritem[aria-selected="true"] .rt b { color: var(--gold); }
.tagl { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink-2); margin-inline-start: 6px; vertical-align: 1px; }

.toast {
  position: fixed; z-index: 70; left: 50%; transform: translate(-50%, 10px); opacity: 0; pointer-events: none;
  bottom: calc(var(--player-h) + 24px + env(safe-area-inset-bottom));
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 12px; font-size: 13.5px;
  transition: opacity 0.2s, transform 0.2s var(--ease); box-shadow: var(--shadow); max-width: calc(100% - 30px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ------------------------------------------------------------ about */
.about { max-width: 42rem; margin: 0 auto; padding: 20px 18px 40px; font-size: 15px; line-height: 1.85; }
.about h1 { font-weight: 500; font-size: 24px; margin: 18px 0 6px; }
.about h2 { font-weight: 500; font-size: 17px; margin: 28px 0 6px; }
.about p, .about li { color: var(--ink-2); }
.about a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--gold-2); text-underline-offset: 3px; }
.about ul { padding-inline-start: 20px; }
.about .dev { margin-top: 26px; padding: 4px 0 6px; scroll-margin-top: 74px; }
.about .dev h2 { margin-top: 0; }
.dev-card { display: flex; align-items: center; gap: 14px; margin: 10px 0 8px; }
.dev-n { display: block; font-size: 18px; font-weight: 500; color: var(--ink); line-height: 1.4; }
.dev-r { display: block; font-size: 13.5px; color: var(--ink-3); line-height: 1.5; }
.about .dev-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.about .dev-links a.chipb { text-decoration: none; color: var(--ink-2); }
.about .dev-links a.chipb:hover { color: var(--ink); }
.about kbd { font: 12px var(--ui); border: 1px solid var(--line-2); border-radius: 6px; padding: 1px 6px; background: var(--card); }

/* ------------------------------------------------------------ small screens */

/* ---------- rosette (shared) */
.ros { overflow: visible; }
.ros { display: block; width: 100%; height: 100%; }
.ros .ros-g { fill: none; stroke: var(--gold-2); stroke-width: 5; opacity: 0.3; }
.ros .ros-p { fill: none; stroke: var(--gold); stroke-width: 6; opacity: 0.85; transition: opacity 1.2s, filter 1.2s; }
.ros .ros-p path { stroke-dasharray: 1 1; stroke-dashoffset: 1; }

/* ---------- ink layers (live recital and home) */
.ink-box { position: relative; font-family: var(--quran); direction: rtl; text-align: center; line-height: 2.05; word-spacing: 0.16em; }
.ink-l.gold, .ink-l.ink { position: absolute; inset: 0; }
.ink-l.ghost { color: rgba(40, 33, 24, 0.13); -webkit-user-select: none; user-select: none; }
.ink-l.gold { color: #b8862e; -webkit-user-select: none; user-select: none; }
.ink-l.ink { color: var(--ink); }
.ink-l .end { color: var(--gold); }
.ink-l.ghost .end { color: rgba(155, 117, 53, 0.24); }
.pen {
  position: absolute; left: 0; top: 0; width: 1.4em; height: 1.4em; margin: -0.7em 0 0 -0.7em; border-radius: 50%;
  pointer-events: none; opacity: 0; transition: opacity 0.35s; will-change: transform, opacity;
  background: radial-gradient(closest-side, rgba(236, 188, 90, 0.5), rgba(236, 188, 90, 0.16) 55%, rgba(236, 188, 90, 0));
}

/* ---------- live recital */
body.reciting { overflow: hidden; }
body.reciting .top, body.reciting .player, body.reciting .fab, body.reciting .selbar { display: none !important; }
.rec { position: fixed; inset: 0; z-index: 20; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: var(--paper); overflow: hidden; }
.rec-bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.bloom { position: absolute; border-radius: 50%; will-change: transform; }
.bloom.b1 { width: 70vmax; height: 70vmax; left: -24vmax; top: -36vmax; background: radial-gradient(closest-side, rgba(240, 214, 156, 0.62), rgba(240, 214, 156, 0)); animation: drift1 26s ease-in-out infinite alternate; }
.bloom.b2 { width: 62vmax; height: 62vmax; right: -22vmax; bottom: -32vmax; background: radial-gradient(closest-side, rgba(233, 204, 184, 0.5), rgba(233, 204, 184, 0)); animation: drift2 31s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(8vmax, 6vmax) scale(1.08); } }
@keyframes drift2 { to { transform: translate(-7vmax, -5vmax) scale(1.1); } }
.rec-seal { display: block; width: 30px; height: 30px; margin: 2px auto -4px; }
.rec.done .rec-seal .ros-p { opacity: 1; filter: drop-shadow(0 0 3px rgba(226, 180, 90, 0.55)); }
.rv.sealed .ink-l.ink .end { animation: sealed 1.8s var(--ease) 1; }
@keyframes sealed { 0%, 100% { text-shadow: 0 0 0 rgba(226, 180, 90, 0); } 35% { text-shadow: 0 0 0.3em rgba(226, 180, 90, 0.6); } }
.rec-top { position: relative; z-index: 2; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; direction:ltr; align-items: center; gap: 8px; padding: max(10px, env(safe-area-inset-top)) 14px 0; }
.rec-top > .page-navigation { align-self:start; }
.rec-title { direction:rtl; }
html[lang="en"] .rec-title { direction:ltr; }
@media(max-width:480px) {
  .rec-top { grid-template-columns:auto minmax(0,1fr); gap:2px 8px; }
  .rec-top > .page-navigation { grid-column:1; grid-row:1; }
  .rec-top > .rec-top-actions { grid-column:2; grid-row:1; justify-self:end; }
  .rec-top > .rec-title { grid-column:1/-1; grid-row:2; }
  .rec-top .rec-seal { display:none; }
  .rec-top .rec-title b { font-size:22px; line-height:1.5; }
}
.rec-top-actions { display:flex; align-items:center; gap:4px; }
.rec-tv-link { display:flex; align-items:center; justify-content:center; gap:6px; min-width:44px; min-height:44px; padding:0 10px; border:1px solid #e0d8c7; border-radius:24px; background:#fffcf1e6; color:#65552f; font-size:12px; }
.rec-tv-link svg { width:20px; height:20px; }
@media(max-width:480px) { .rec-tv-link { padding:0; } .rec-tv-link span { display:none; } }
.rec-title { text-align: center; min-width: 0; }
.rec-title b { display: block; font-size: 30px; line-height: 1.75; word-spacing: 0.2em; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-title span { display: block; min-height: 1.3em; font-size: 12.5px; line-height: 1.3; color: var(--ink-3); }
.rec-stage { position: relative; z-index: 1; min-height: 0; padding: 2vh 6vw 3vh; }
.rv { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.rv.enter { opacity: 0; transform: translate(-50%, calc(-50% + 18px)); }
.rv.leave { opacity: 0; transform: translate(-50%, calc(-50% - 18px)); pointer-events: none; }
.rv.scroll { overflow-y: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(transparent, #000 7%, #000 93%, transparent); mask-image: linear-gradient(transparent, #000 7%, #000 93%, transparent); }
.rv.scroll::-webkit-scrollbar { display: none; }
.rv.bas .ink-l.ink { color: var(--ink-2); }
.rec-cta {
  position: absolute; z-index: 5; left: 50%; bottom: calc(112px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 14px; padding: 9px 24px 9px 9px; border-radius: 999px; max-width: calc(100% - 28px);
  background: var(--ink); color: var(--paper); box-shadow: 0 18px 40px -16px rgba(52, 38, 16, 0.55); animation: rise 0.4s var(--ease);
}
.rec-cta-i { flex: none; width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #d7ad5c, #a97c30); animation: pulse 2.4s infinite; }
.rec-cta-i svg { width: 24px; height: 24px; }
.rec-cta-t { display: grid; min-width: 0; text-align: start; line-height: 1.4; }
.rec-cta-t b { font-weight: 500; font-size: 16px; white-space: nowrap; }
.rec-cta-t small { color: #d9cfbd; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(215, 173, 92, 0.55); } 70% { box-shadow: 0 0 0 16px rgba(215, 173, 92, 0); } 100% { box-shadow: 0 0 0 0 rgba(215, 173, 92, 0); } }
.rec-end {
  position: absolute; z-index: 5; left: 50%; bottom: calc(108px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  width: min(540px, calc(100% - 28px)); padding: 14px 18px 16px; text-align: center; border-radius: 22px;
  background: rgba(255, 253, 249, 0.94); border: 1px solid var(--line); box-shadow: var(--shadow); animation: rise 0.5s var(--ease);
}
.rec-end .star { display: block; width: 30px; height: 30px; margin: 0 auto 2px; color: var(--gold); }
.rec-end .star svg { width: 100%; height: 100%; }
.rec-end b { display: block; font-weight: 500; font-size: 17px; margin-bottom: 12px; }
.rec-end-b { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.rec-ctl {
  position: relative; z-index: 3; width: min(620px, calc(100% - 20px)); margin: 0 auto calc(12px + env(safe-area-inset-bottom));
  padding: 9px 10px 8px; border-radius: 20px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow);
  background: rgba(255, 253, 249, 0.9); -webkit-backdrop-filter: blur(12px) saturate(1.2); backdrop-filter: blur(12px) saturate(1.2);
}
.rec-prog { position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--line); }
.rec-prog i { position: absolute; top: 0; bottom: 0; inset-inline-start: 0; width: 0; background: var(--gold-2); transition: width 0.25s linear; }
.rec-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; }
.rec-rc { justify-self: start; display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-width: 0; height: 36px; padding: 0 10px; border-radius: 10px; font-size: 13px; color: var(--ink-2); }
.rec-rc span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec-rc svg { flex: none; width: 18px; height: 18px; color: var(--gold); }
.rec-rc:hover { background: var(--paper-2); }
.rec-tools { justify-self: end; display: flex; align-items: center; gap: 2px; }
.rec-tools .ib { width: 36px; height: 36px; }
.rec-tools .ib[aria-pressed="true"] { color: var(--gold); background: var(--paper-2); }

/* ---------- home */
.hero2 { position: relative; isolation: isolate; text-align: center; padding: 22px 0 14px; }
.hero-bg { position: absolute; z-index: -1; inset: -30px -16px 0; overflow: hidden; pointer-events: none; background: radial-gradient(60% 55% at 50% 36%, rgba(240, 214, 156, 0.4), rgba(240, 214, 156, 0) 72%); }
.hero-seal { display: block; width: 40px; height: 40px; margin: 0 auto 6px; }
.hero-lbl { margin: 0 0 2px; font-size: 13px; color: var(--gold); }
.hero-stage { min-height: clamp(130px, 27vh, 240px); display: grid; place-items: center; }
/* the pen glow starts at the edge of the verse and must not widen the page on a phone */
.home { overflow-x: clip; }
.hero-stage { overflow-x: clip; overflow-clip-margin: 0; }
.hero-demo { margin: 0 auto; transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.hero-demo.enter { opacity: 0; transform: translateY(10px); }
.hero-demo.leave { opacity: 0; transform: translateY(-10px); }
.hero2 h1 { margin: 6px auto; max-width: 31rem; font-size: clamp(21px, 1.05rem + 1.1vw, 29px); font-weight: 500; line-height: 1.6; color: var(--ink); }
.hero-sub { margin: 0 auto; font-size: 13.5px; color: var(--ink-3); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 18px 0 14px; }
.btn.big { height: 50px; padding: 0 22px; font-size: 15px; }
.btn.live svg { color: #e2bd6f; }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.votd { position: relative; max-width: 46rem; margin: 20px auto 6px; padding: 16px 22px 16px; text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); }
.votd .lbl { margin: 0; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--gold); }
.votd .lbl .star { display: inline-block; width: 18px; height: 18px; }
.votd .lbl .star svg { width: 100%; height: 100%; }
.votd .v { margin: 6px 0 2px; min-height: 2.2em; font-size: clamp(22px, 1.1rem + 0.8vw, 28px); line-height: 2.15; word-spacing: 0.14em; color: var(--ink); }
.votd .ref { margin: 0; font-size: 13px; color: var(--ink-3); }
.votd .acts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 12px; }

/* ---------- share sheet */
.panel.wide { width: min(900px, calc(100% - 20px)); }
.share { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 18px; padding-top: 14px; }
.sh-prev { position: relative; display: grid; place-items: center; min-height: 200px; padding: 12px; border-radius: 16px; background: var(--paper-2); }
.sh-c { display: block; width: auto; height: auto; max-width: 100%; max-height: 60vh; border-radius: 10px; box-shadow: 0 10px 30px -14px rgba(52, 38, 16, 0.45); }
.sh-rec { position: absolute; left: 12px; right: 12px; bottom: 12px; display: grid; gap: 8px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 253, 249, 0.95); box-shadow: var(--shadow); }
.sh-bar { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.sh-bar i { display: block; height: 100%; width: 0; background: var(--gold-2); transition: width 0.2s linear; }
.sh-msg { margin: 0; font-size: 12.5px; color: var(--ink-2); }
.sh-rec .btn { justify-self: start; }
.sh-side { display: grid; align-content: start; gap: 12px; }
.sh-acts { display: grid; gap: 8px; }
.sh-acts .btn { width: 100%; justify-content: flex-start; }
.sh-note { margin: 0; font-size: 12.5px; line-height: 1.6; color: var(--ink-3); }
.sh-done { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); }
.sh-ok { margin: 0; display: flex; align-items: center; gap: 6px; }
.sh-ok svg { width: 18px; height: 18px; color: var(--gold); }
.sh-v { width: 100%; max-height: 34vh; border-radius: 10px; background: var(--paper-2); }
.measure { position: fixed; left: 0; top: 0; z-index: -1; visibility: hidden; pointer-events: none; font-family: var(--quran); direction: rtl; text-align: center; line-height: 2.05; word-spacing: 0.16em; }
.measure .bl { display: inline-block; width: 0; height: 0; }
.measure-svg { position: fixed; left: 0; top: 0; width: 0; height: 0; overflow: hidden; visibility: hidden; }
/* ---------- rhythm poster */
.pp { max-width: 78rem; margin: 0 auto; padding: 8px 16px 40px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 24rem); gap: 28px; align-items: start; }
.pp-stage { position: relative; display: grid; place-items: start center; padding: 16px; border-radius: 22px; background: var(--paper-2); }
.pp-c { display: block; width: 100%; max-width: 620px; height: auto; border-radius: 10px; background: #fbf8f1; box-shadow: 0 16px 40px -22px rgba(52, 38, 16, 0.5); }
.pp-tip { position: absolute; z-index: 3; transform: translate(-50%, -100%); padding: 6px 10px; border-radius: 9px; background: var(--ink); color: var(--paper); font-size: 12.5px; white-space: nowrap; pointer-events: none; }
.pp-load { position: absolute; inset: 0; display: grid; place-items: center; color: var(--gold); pointer-events: none; }
.pp-load svg { width: 30px; height: 30px; animation: rot 1s linear infinite; }
.pp-load[hidden] { display: none; }
.pp-side { display: grid; gap: 14px; align-content: start; }
.pp-side h1 { margin: 0; font-size: 20px; font-weight: 500; }
.pp-name { margin: -6px 0 0; font-size: 44px; line-height: 1.7; word-spacing: 0.18em; }
.pp-lead { margin: 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.8; }
.pp-acts { display: grid; gap: 8px; }
.pp-acts .btn { width: 100%; justify-content: flex-start; }
.pp-note { margin: 0; min-height: 1em; font-size: 12.5px; color: var(--ink-3); }
@media (max-width: 860px) { .pp { grid-template-columns: 1fr; gap: 16px; } .pp-side { order: -1; } .pp-name { font-size: 36px; } }
/* ---------- shared pills */
.grid > .card, .grid .card .names { min-width: 0; }
.grid .card .names > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chipb { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); font-size: 13.5px; transition: border-color 0.15s, background 0.15s, color 0.15s; }
.chipb svg { width: 16px; height: 16px; color: var(--gold); }
.chipb:hover { border-color: var(--gold-2); color: var(--ink); }
.chipb[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.hero-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 2px 0 6px; }

/* ---------- people, places and concepts */
.ppl, .ent { max-width: 62rem; margin: 0 auto; padding: 6px 16px 48px; }
.ppl .tabs { justify-content: center; }
.ppl-lead { margin: 6px auto 14px; max-width: 42rem; text-align: center; color: var(--ink-2); font-size: 14.5px; line-height: 1.9; }
.ppl-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; margin-bottom: 16px; }
.ppl-q { flex: 1 1 220px; max-width: 320px; height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font: inherit; font-size: 14px; color: var(--ink); }
.ppl-q:focus { outline: 2px solid var(--gold-2); outline-offset: 1px; }
.ppl-f { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); gap: 10px; }
.pcard { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "dk dk" "n c"; gap: 2px 10px; align-items: end; padding: 12px 16px 12px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); transition: border-color 0.15s, transform 0.15s var(--ease), box-shadow 0.15s; }
.pcard:hover { border-color: var(--gold-2); transform: translateY(-1px); box-shadow: var(--shadow); }
.pc-dk { grid-area: dk; font-size: 34px; line-height: 1.9; color: var(--ink); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; word-spacing: 0.14em; }
.ccard .pc-dk { font-family: var(--ui); font-size: 22px; line-height: 2; font-weight: 500; }
.pc-n { grid-area: n; display: grid; min-width: 0; line-height: 1.5; }
.pc-n b { font-weight: 500; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-n small { color: var(--ink-3); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-c { grid-area: c; text-align: end; color: var(--ink-3); font-size: 12px; line-height: 1.5; white-space: nowrap; }
.ppl-empty { grid-column: 1 / -1; text-align: center; color: var(--ink-3); }
.ppl-credit { margin: 26px auto 0; max-width: 44rem; text-align: center; font-size: 12px; line-height: 1.8; color: var(--ink-3); }
.ent-back { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-3); font-size: 13.5px; margin: 6px 0 0; }
.ent-back svg { width: 16px; height: 16px; transform: rotate(-90deg); }
[dir="rtl"] .ent-back svg { transform: rotate(90deg); }
.ent-h { text-align: center; padding: 6px 0 14px; }
.ent-h h1 { margin: 0; font-size: clamp(46px, 8vw, 72px); line-height: 1.7; font-weight: normal; word-spacing: 0.16em; }
.ent-h .ent-sub { margin: 0; font-size: 16px; color: var(--ink-2); }
.ent-h .ent-stat { margin: 4px 0 0; font-size: 13.5px; color: var(--gold); }
.ent-h .ent-note { margin: 8px auto 0; max-width: 40rem; font-size: 13px; line-height: 1.8; color: var(--ink-3); }
.ent-h .ent-note .quran { color: var(--ink-2); font-size: 18px; }
.ent-acts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 14px; }
.vl { max-width: 48rem; margin: 6px auto 0; }
.vl-s { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 26px 0 4px; padding-bottom: 6px; border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 500; }
.vl-s small { color: var(--ink-3); font-weight: 400; font-size: 12.5px; }
.vl-r { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid rgba(232, 225, 211, 0.6); }
.vl-ref { font-size: 12.5px; color: var(--ink-3); text-align: center; }
.vl-t { margin: 0; font-size: 25px; line-height: 2.2; word-spacing: 0.14em; color: var(--ink); }
.vl-t mark { background: none; color: var(--gold); font-weight: normal; border-radius: 6px; box-shadow: 0 0 0 3px rgba(240, 223, 176, 0.75); background-color: rgba(240, 223, 176, 0.75); }
.vl-e { color: var(--gold-2); }
.vl-a { display: flex; gap: 2px; }
.vl-a .ib { width: 36px; height: 36px; color: var(--gold); }
.vl .more { display: flex; margin: 18px auto 0; justify-content: center; }
.vl .more[hidden] { display: none; }
@media (max-width: 640px) { .vl-r { grid-template-columns: 1fr auto; grid-template-areas: "ref a" "t t"; } .vl-ref { grid-area: ref; text-align: start; } .vl-a { grid-area: a; } .vl-t { grid-area: t; font-size: 23px; } }

/* ---------- map */
body.mapview { overflow: hidden; }
body.mapview .fab, body.mapview .selbar { display: none !important; }
.mp { position: fixed; z-index: 10; inset: var(--top-h) 0 0 0; background: var(--paper); overflow: hidden; touch-action: none; }
.mp-c { display: block; touch-action: none; cursor: grab; }
.mp-c:active { cursor: grabbing; }
.mp-p { position: absolute; z-index: 3; top: 12px; inset-inline-start: 12px; width: min(360px, 42vw); max-height: calc(100% - 24px); overflow-y: auto; padding: 16px 18px 18px; border-radius: 20px; background: rgba(255, 253, 249, 0.95); border: 1px solid var(--line); box-shadow: var(--shadow); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.mp-p h1 { margin: 0 0 2px; font-size: 19px; font-weight: 500; }
.mp-p h1.quran { font-size: 40px; line-height: 1.7; text-align: center; word-spacing: 0.16em; font-weight: normal; }
.mp-lead, .mp-how { margin: 6px 0 10px; font-size: 13px; line-height: 1.85; color: var(--ink-2); }
.mp-how { font-size: 12px; color: var(--ink-3); }
.mp-sub { margin: 0 0 10px; text-align: center; font-size: 13px; color: var(--ink-3); }
h1:not(.quran) + .mp-sub { text-align: start; }
.mp-x { position: absolute; top: 8px; inset-inline-end: 8px; width: 34px; height: 34px; }
.mp-q { width: 100%; height: 40px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); font: inherit; font-size: 13.5px; color: var(--ink); }
.mp-q:focus { outline: 2px solid var(--gold-2); outline-offset: 1px; }
.mp-res { margin-top: 8px; }
.mp-lay { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 6px; }
.mp-lay .chipb { height: 32px; padding: 0 12px; font-size: 12.5px; }
.mp-leg { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.mp-leg li { display: flex; align-items: center; gap: 8px; }
.mp-leg .d { flex: none; width: 14px; height: 14px; border-radius: 50%; }
.mp-leg .d.s { background: var(--card); border: 2px solid var(--gold); }
.mp-leg .d.s.med { border-color: #4a5f57; }
.mp-leg .d.n { background: #b86a4e; width: 10px; height: 10px; margin: 2px; }
.mp-leg .d.c { background: #6f8f6a; width: 10px; height: 10px; margin: 2px; }
.mp-links { margin: 8px 0 0; font-size: 13px; color: var(--ink-3); }
.mp-links a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.mp-acts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 4px; }
.mp-acts .btn { height: 36px; padding: 0 12px; font-size: 13px; }
.mp-h { margin: 14px 0 6px; font-size: 12.5px; font-weight: 500; color: var(--ink-3); }
.mp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mchip { display: inline-flex; align-items: baseline; gap: 6px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-size: 12.5px; color: var(--ink); }
.mchip small { color: var(--ink-3); font-size: 11px; }
.mchip[data-k="n"] { border-color: rgba(184, 106, 78, 0.5); background: rgba(184, 106, 78, 0.07); }
.mchip[data-k="c"] { border-color: rgba(111, 143, 106, 0.55); background: rgba(111, 143, 106, 0.08); }
.mchip[data-k="s"] { border-color: rgba(184, 134, 46, 0.5); }
.mchip:hover { border-color: var(--ink); }
.mp-zoom { position: absolute; z-index: 2; bottom: calc(var(--player-h) + 16px); inset-inline-end: 14px; display: grid; gap: 6px; }
.mp-zoom .ib { width: 40px; height: 40px; border-radius: 12px; background: rgba(255, 253, 249, 0.95); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 20px; line-height: 1; color: var(--ink-2); }
@media (max-width: 760px) {
  .mp-p { top: auto; bottom: calc(var(--player-h) + 8px); inset-inline: 8px; width: auto; max-height: 42%; padding: 14px 14px 14px; border-radius: 18px; }
  .mp-p .mp-lead, .mp-p .mp-how { display: none; }
  .mp-p h1.quran { font-size: 32px; }
  .mp-zoom { bottom: auto; top: 12px; }
}
@media (max-width: 700px) {
  .share { grid-template-columns: 1fr; }
  .sh-c { max-height: 40vh; }
}

@media (max-width: 640px) {
  :root { --top-h: 54px; --qsize: clamp(1.45rem, 1.1rem + 1.6vw, 1.75rem); }
  .brand small { display: none; }
  .grid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .hero { padding-top: 22px; }
  .reader { padding: 4px 14px 20px; }
  .p-time, .p-tools .opt { display: none; }
  .panel { top: auto; bottom: 0; width: 100%; max-height: 88vh; border-radius: 20px 20px 0 0; animation: up 0.24s var(--ease); padding-bottom: env(safe-area-inset-bottom); }
  @keyframes up { from { transform: translate(-50%, 30px); opacity: 0; } }
  .selbar .lbl { display: none; }
  .selbar { gap: 0; padding: 5px; }
  .selbar button { padding: 0 9px; }
  .selbar .ref { padding: 0 6px 0 4px; font-size: 12.5px; }
  .snav { grid-template-columns: 1fr; }
  .rec-title b { font-size: 24px; }
  .rec-stage { padding: 1vh 4vw 2vh; }
  .rec-rc span { max-width: 24vw; }
  .rec-tools .p-speed { min-width: 34px; }
  .btn.big { height: 46px; padding: 0 18px; font-size: 14.5px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .ayah.flash { background:rgba(212,180,110,.24); }
}
@media print {
  .top, .player, .fab, .selbar, .sacts, .snav { display: none !important; }
  body { padding: 0; background: #fff; }
}

/* ------------------------------------------------------------ accounts and library */
.acct-btn .avatar { width: 28px; height: 28px; }
.avatar { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--gold-soft); color: var(--ink); font-size: 13px; font-weight: 500; line-height: 1; font-family: var(--ui); }
.avatar.big { width: 56px; height: 56px; font-size: 22px; flex: none; }
.acct { max-width: 34rem; margin: 0 auto; padding: 18px 16px 56px; }
.acct h1 { margin: 6px 0 6px; font-size: 26px; font-weight: 500; line-height: 1.5; overflow-wrap: anywhere; }
.acct-lead { margin: 0 0 16px; color: var(--ink-2); font-size: 14.5px; line-height: 1.9; }
.acct-tabs { justify-content: flex-start; margin: 0 0 16px; }
.fm { display: grid; gap: 14px; }
.fl label { display: block; margin-bottom: 6px; font-size: 13px; color: var(--ink-3); }
.fl-in { position: relative; }
.fl-in input, .fl-in textarea {
  width: 100%; height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-2);
  background: var(--card); font: 16px var(--ui); color: var(--ink); -webkit-appearance: none; appearance: none;
}
.fl-in textarea { height: auto; padding: 12px 14px; line-height: 1.7; resize: vertical; }
.fl-in input:focus, .fl-in textarea:focus { outline: 2px solid var(--gold-2); outline-offset: 1px; border-color: var(--gold-2); }
.fl-in input::placeholder, .fl-in textarea::placeholder { color: var(--ink-3); }
.fl-in.pw input { padding-inline-end: 76px; }
.pw-t { position: absolute; inset-inline-end: 6px; top: 6px; height: 36px; padding: 0 12px; border-radius: 9px; font-size: 12.5px; color: var(--ink-2); }
.pw-t:hover { background: var(--paper-2); }
.fl-h { margin: 6px 0 0; font-size: 12.5px; color: var(--ink-3); }
.fm-msg { margin: 0; font-size: 13.5px; line-height: 1.7; }
.fm-msg:empty { display: none; }
.fm-msg.bad { color: #a4452c; }
.fm-msg.ok { color: #6d5320; background: var(--gold-soft); border-radius: 10px; padding: 10px 12px; }
.lnk { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; font: inherit; padding: 0; }
.acct-alt { margin: 14px 0 0; font-size: 13.5px; }
.acct-priv { margin: 22px 0 0; font-size: 12.5px; line-height: 1.9; color: var(--ink-3); }
.acct-card { margin: 14px 0; padding: 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); }
.acct-card h2 { margin: 0 0 10px; font-size: 15px; font-weight: 500; }
.acct-card.danger { border-color: rgba(164, 69, 44, 0.35); }
.acct-card.danger p { margin: 0 0 12px; font-size: 13.5px; color: var(--ink-2); line-height: 1.8; }
.acct-det summary { cursor: pointer; font-size: 15px; font-weight: 500; }
.acct-det form { margin-top: 14px; }
.prof-h { display: flex; align-items: center; gap: 14px; margin: 8px 0 12px; min-width: 0; }
.prof-h > div { min-width: 0; }
.prof-h h1 { margin: 0; font-size: 22px; }
.prof-e, .prof-s { margin: 0; font-size: 13px; color: var(--ink-3); overflow-wrap: anywhere; }
.prof-sync { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 13.5px; color: var(--ink-2); line-height: 1.7; }
.prof-sync svg { width: 20px; height: 20px; color: var(--gold); flex: none; }
.prof-acts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.prof-acts.main { margin: 18px 0 4px; }
.prof-n { margin: 12px 0 0; font-size: 13px; color: var(--ink-3); }
.lib-st { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); font-size: 13.5px; color: var(--ink-2); line-height: 1.7; }
.lib-st svg { width: 20px; height: 20px; color: var(--gold); flex: none; }
.lib-st > span:first-of-type { flex: 1; min-width: 11rem; }
.lib-st.warn { background: #fbf3e2; border-color: #ead9ae; }
.lib-st-a { display: flex; gap: 8px; flex-wrap: wrap; }
.btn.sm { height: 34px; padding: 0 14px; font-size: 13px; }
.lib { max-width: 48rem; margin: 0 auto; padding: 10px 16px 56px; }
.lib-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 8px 0 14px; }
.lib-top h1 { margin: 0; font-size: 26px; font-weight: 500; }
.lib-n2 { color: var(--ink-3); font-size: 13.5px; }
.lib-tools { display: grid; gap: 10px; margin: 6px 0 14px; }
.lib-q { width: 100%; height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font: 16px var(--ui); color: var(--ink); -webkit-appearance: none; appearance: none; }
.lib-q:focus { outline: 2px solid var(--gold-2); outline-offset: 1px; }
.lib-sort { justify-self: start; }
.lib-cols { display: flex; flex-wrap: wrap; gap: 6px; }
.lib-cols .cn { margin-inline-start: 8px; padding: 0 7px; min-width: 22px; border-radius: 999px; background: rgba(155, 117, 53, 0.13); font-size: 12px; line-height: 20px; text-align: center; }
.lib-cols .chipb[aria-pressed="true"] .cn { background: rgba(255, 255, 255, 0.22); }
.lib-c { margin-bottom: 10px; padding: 14px 16px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); }
.lib-h2 { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lib-ref b { display: block; font-weight: 500; font-size: 15px; }
.lib-ref small { color: var(--ink-3); font-size: 12px; }
.lib-a { display: flex; gap: 2px; flex: none; }
.lib-a .ib { width: 36px; height: 36px; color: var(--gold); }
.lib-v { margin: 8px 0 4px; font-size: 25px; line-height: 2.2; word-spacing: 0.14em; color: var(--ink); }
.lib-n { margin: 6px 0 4px; padding: 8px 12px; border-radius: 10px; background: var(--paper-2); font-size: 14px; line-height: 1.8; color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.lib-col { display: inline-block; margin-top: 4px; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 12px; color: var(--ink-2); }
.lib-empty { padding: 34px 10px; text-align: center; color: var(--ink-3); line-height: 1.9; }
.lib .more { display: flex; margin: 16px auto 0; }
.lib .more[hidden] { display: none; }
#tabbody .lib { padding: 0; }
.nt { padding-top: 12px; }
.nt-ref { margin: 0 0 6px; font-size: 13px; color: var(--ink-3); }
.nt-v { margin: 0 0 12px; font-size: 24px; line-height: 2.1; word-spacing: 0.14em; max-height: 9.5em; overflow-y: auto; }
.nt .fl { margin-bottom: 12px; }
.nt-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: -2px 0 14px; }
.nt-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.pn-t { margin: 8px 0 14px; font-size: 14px; line-height: 1.9; color: var(--ink-2); }
.chk { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 14px; }
.chk input { width: 20px; height: 20px; accent-color: var(--gold); }
.btn.danger-b { background: #a4452c; border-color: #a4452c; color: #fff; }
.btn.danger-b:hover { background: #8b3a24; }
.toast.has-act { pointer-events: auto; display: flex; align-items: center; gap: 16px; }
.toast-act { color: var(--gold-soft); text-decoration: underline; text-underline-offset: 3px; font-size: 13.5px; white-space: nowrap; }
@media (max-width: 640px) { .lib-v { font-size: 23px; } .acct h1 { font-size: 23px; } }

/* ------------------------------------------------------------ Ayah Studio */
.studying { --player-h: 0px; }
.studying .player { display: none; }
.studio { max-width: 68rem; margin: 0 auto; padding: 36px 28px 0; }
.studio h1, .studio h2, .studio-teaser h2 { font-weight: 500; letter-spacing: -.025em; }
.studio h2 { font-size: 20px; margin: 0 0 14px; }
.studio-primary { background: #e8efea; border: 1px solid #c8d7cc; color: #214936; }
.studio-primary:hover { background: #dce8df; }
.studio-teaser { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 24px 0 32px; padding: 26px; border: 1px solid #dce3d9; background: #f0f4ed; border-radius: 18px; }
.studio-teaser .lbl { margin: 0 0 8px; color: #456449; }
.studio-teaser h2 { font-size: 23px; margin: 0 0 8px; }
.studio-teaser p:last-child { max-width: 36rem; margin: 0; color: var(--ink-2); font-size: 14px; }
.studio-teaser .btn { flex-shrink: 0; }
.studio-intro { max-width: 46rem; padding: 22px 0 30px; }
.studio-intro .lbl { color: #456449; }
.studio-intro h1 { font-size: clamp(30px, 4vw, 46px); line-height: 1.25; margin: 12px 0 18px; }
.studio-intro > p:last-child { font-size: 18px; color: var(--ink-2); line-height: 1.8; }
.studio-start { padding: 26px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; }
.studio-form { display: flex; flex-wrap: wrap; align-items: end; gap: 16px; }
.studio-form label { display: flex; flex-direction: column; gap: 8px; flex: 1 1 160px; color: var(--ink-2); font-size: 13px; }
.studio-form label:first-child { flex: 2 1 240px; }
.studio-form select, .studio-form input { font: inherit; font-size: 15px; color: var(--ink); border: 1px solid var(--line-2); background: var(--paper); border-radius: 10px; padding: 12px; width: 100%; min-width: 0; }
.studio-form .btn { min-height: 48px; }
.studio-form-error { width: 100%; color: #963c27; margin: 0; }
.studio-form-error:empty { display: none; }
.studio-example-title { margin: 32px 0 18px !important; }
.studio-examples { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.studio-example { display: grid; grid-template-columns: 34px minmax(0,1fr); gap: 6px 14px; padding: 23px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); transition: border-color .15s; }
.studio-example:hover { border-color: var(--gold); }
.studio-step { grid-row: span 2; width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid #c8d7cc; border-radius: 50%; color: #456449; }
.studio-example b { font-weight: 500; }
.studio-example > span:last-child { color: var(--ink-2); display: flex; align-items: center; gap: 10px; font-size: 13px; }
.studio-example svg { width: 16px; height: 16px; margin-inline-start: auto; }
.studio-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.studio-back { font-size: 13px; color: #456449; }
.studio-heading h1 { font-size: 32px; margin: 6px 0 8px; }
.studio-heading h1 span { font-size: 17px; color: var(--ink-2); display: inline-block; direction: ltr; margin-inline-start: 12px; }
.studio-context { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-2); text-decoration: underline; text-underline-offset: 4px; }
.studio-context svg { width: 17px; height: 17px; }
.studio-heading-actions { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.studio-heading-actions .btn { justify-content: center; }
.studio-audio-note { font-size: 12px; color: var(--ink-2); margin: 20px 0 12px; text-align: end; }
.studio-focus { padding: 30px clamp(16px, 4vw, 48px); border: 1px solid var(--line); border-radius: 18px; background: var(--card); }
.studio-verse { margin: 0; text-align: center; font-size: var(--qsize); line-height: 2.3; overflow-wrap: anywhere; }
.studio-verse-end { white-space: nowrap; }
.studio-match, .studio mark { background: #f0e4c9; color: inherit; border-radius: 4px; }
.studio-speaking { background: #dce8df !important; outline: 1px solid #789782; border-radius: 4px; }
.studio-tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--line); margin: 30px 0; }
.studio-tabs button { padding: 12px 4px 16px; font-size: 15px; color: var(--ink-2); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.studio-tabs [aria-selected="true"] { color: #214936; border-bottom-color: #52755a; }
.studio-lead { max-width: 46rem; font-size: 17px; color: var(--ink-2); line-height: 1.8; margin: 0 0 22px; }
.studio-family-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 16px; }
.studio-family-chips small { color: var(--ink-2); margin-inline-start: 8px; }
.studio-family-chips [aria-pressed="true"], .studio-modes [aria-pressed="true"] { background: #e8efea; color: #214936; border-color: #789782; }
.studio-evidence { color: var(--ink-2); font-size: 13px; margin-bottom: 12px; }
.studio-evidence summary { cursor: pointer; width: fit-content; }
.studio-evidence p { max-width: 44rem; }
.studio-note { max-width: 52rem; color: var(--ink-2); font-size: 13px; line-height: 1.8; margin: 16px 0 24px; }
.studio-echo-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.studio-echo { display: flex; flex-direction: column; gap: 16px; text-align: start; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); min-width: 0; }
.studio-echo:hover, .studio-echo[aria-pressed="true"] { border-color: #789782; background: #f6f8f3; }
.studio-echo-ref { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--ink-2); }
.studio-echo-ref b { font-weight: 400; direction: ltr; }
.studio-echo-text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 23px; line-height: 2.2; width: 100%; }
.studio-sample { font-size: 12px; color: var(--ink-2); margin: 16px 0 28px; }
.studio-sample a { text-decoration: underline; text-underline-offset: 3px; }
.studio-compare { padding: 24px; border: 1px solid #dce3d9; background: #f0f4ed; border-radius: 18px; }
.studio-pair { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 26px; margin-bottom: 18px; }
.studio-pair-ref { color: #456449; font-size: 13px; text-decoration: underline; text-underline-offset: 4px; }
.studio-pair p { font-size: clamp(25px,2vw,30px); line-height: 2.2; margin: 14px 0 0; overflow-wrap: anywhere; }
.studio-modes { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 20px; }
.studio-recall-words { padding: 28px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; font-size: var(--qsize); line-height: 2.7; text-align: center; }
.studio-recall-word { font: inherit; line-height: 1.8; vertical-align: middle; margin: 4px 2px; max-width: 100%; overflow-wrap: anywhere; }
.studio-recall-word.revealed { border: 1px solid transparent; padding: 0 3px; }
.studio-recall-word.concealed { width: var(--word-width); min-height: 1.4em; border: 1px dashed #b8caba; border-radius: 6px; background: #edf2e9; color: #456449; }
.studio-recall-word.concealed span { font: 12px var(--ui); vertical-align: middle; }
.studio-hint-count { font-size: 13px; color: var(--ink-2); margin: 14px 0 18px; }
.studio-recall-actions, .studio-check, .studio-reflection-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.studio-check { border-top: 1px solid var(--line); padding-top: 22px; }
.studio-session { color: #456449; font-size: 13px; min-height: 20px; }
.studio-prompts { list-style: none; padding: 0; counter-reset: prompt; display: grid; gap: 14px; margin: 0 0 26px; }
.studio-prompts li { counter-increment: prompt; display: flex; align-items: center; gap: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.studio-prompts li::before { content: counter(prompt); font-size: 12px; color: #456449; min-width: 22px; }
.studio-saved-note { padding: 22px; background: #f0f4ed; border: 1px solid #dce3d9; border-radius: 14px; margin-bottom: 24px; }
.studio-saved-note > p:last-child { white-space: pre-wrap; overflow-wrap: anywhere; }
.studio-neighbours { display: flex; justify-content: space-between; gap: 16px; margin: 30px 0; padding-top: 24px; border-top: 1px solid var(--line); }
.studio-trail { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; color: var(--ink-2); }
.studio-trail > span { width: 100%; margin-bottom: 4px; }
.studio-trail a { border: 1px solid var(--line); border-radius: 20px; padding: 6px 10px; }
.studio-trail [aria-current="page"] { color: #214936; background: #e8efea; }
.studio-empty { padding: 20px 0; color: var(--ink-2); }
@media (max-width: 720px) {
  .studio { padding: 24px 16px 0; }
  .studio-teaser { flex-direction: column; align-items: start; gap: 18px; padding: 22px; }
  .studio-heading { flex-direction: column; align-items: start; gap: 18px; }
  .studio-heading-actions { flex-direction: row; flex-wrap: wrap; width: 100%; }
  .studio-heading-actions .btn { font-size: 12px; flex: 1 1 auto; }
  .studio-audio-note { text-align: start; }
  .studio-echo-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .studio-pair { grid-template-columns: 1fr; }
  .studio-pair > div + div { border-top: 1px solid #dce3d9; padding-top: 18px; }
  .studio-tabs { gap: 12px; justify-content: space-between; }
  .studio-tabs button { font-size: 14px; }
  .studio-recall-words { padding: 22px 14px; }
  .studio-compare { padding: 20px 16px; }
}
@media (max-width: 420px) {
  .studio-examples { grid-template-columns: 1fr; }
  .studio-echo-grid { gap: 10px; }
  .studio-echo { padding: 12px; }
  .studio-echo-text { font-size: 21px; }
  .studio-start { padding: 20px; }
  .studio-form label:first-child { flex-basis: 100%; }
  .studio-form label { flex-basis: 90px; }
}

/* The Recitation Loom: artwork and readable Quran text occupy separate surfaces. */
.loom-teaser { display: flex; align-items: center; gap: 34px; padding: 30px; margin: 28px 0; border: 1px solid #deded1; border-radius: 22px; background: #f3f5ee; }
.loom-emblem { width: 160px; flex: 0 0 160px; }
.loom-teaser h2 { font-size: 25px; font-weight: 400; margin: 8px 0; }
.loom-teaser p:not(.lbl) { color: var(--ink-2); max-width: 500px; margin-bottom: 22px; }
body.looming #main { max-width: none; }
.loom-page { max-width: 1360px; margin: 0 auto; padding: 34px 32px 0; }
.loom-intro { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin: 0 0 28px; }
.loom-intro .lbl { color: #45695d; letter-spacing: .1em; }
.loom-intro h1 { font-size: clamp(24px, 2.8vw, 38px); font-weight: 300; margin: 10px 0 0; line-height: 1.25; }
.loom-surah-label, .loom-verse-label { display: grid; gap: 8px; font-size: 11px; color: var(--ink-2); }
.loom-surah-label select, .loom-verse-label select { border: 1px solid var(--line-2); border-radius: 9px; background: var(--card); color: var(--ink); padding: 10px 12px; font: 13px var(--ui); max-width: 100%; }
.loom-surah-label { min-width: 200px; }
.loom-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(310px, 1fr); align-items: start; gap: 28px; }
.loom-art { background: #f8f6f0; border: 1px solid #e2ded2; border-radius: 20px; overflow: hidden; }
.loom-art-toolbar { display: flex; align-items: center; gap: 4px; margin: 18px 20px 0; }
.loom-art-toolbar { flex-wrap: wrap; }
.loom-art-toolbar button { font: 12px var(--ui); padding: 9px 14px; color: var(--ink-2); border: 1px solid transparent; border-radius: 30px; background: transparent; cursor: pointer; }
.loom-art-toolbar [aria-pressed="true"] { background: #fffdf9; border-color: #d9dccc; color: #315f55; }
.loom-art-toolbar .loom-save { margin-inline-start: auto; padding: 9px; display: flex; border-color: #e2ded2; }
.loom-save svg { width: 18px; height: 18px; }
.loom-canvas-wrap { position: relative; width: 100%; aspect-ratio: 1; }
.loom-canvas { display: block; width: 100%; height: 100%; cursor: pointer; touch-action: manipulation; }
.loom-stage-loading { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; background: #f8f6f0; font-size: 13px; color: var(--ink-2); }
.loom-stage-loading[hidden] { display: none; }
.loom-stage-loading svg { width: 25px; height: 25px; }
.loom-art-caption { border-top: 1px solid #e5e0d5; padding: 16px 22px; min-height: 92px; font-size: 11px; color: #645e54; }
.loom-art-caption p { margin: 0; max-width: 450px; }
.loom-art-caption span { display: block; color: #426b5f; min-height: 18px; margin-top: 6px; font-variant-numeric: tabular-nums; }
.loom-sheet { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 24px; }
.loom-sheet-head { display: flex; justify-content: space-between; align-items: start; gap: 20px; }
.loom-sheet-head .lbl { margin: 4px 0; color: #45695d; }
.loom-sheet-head .lbl span { display: block; font-size: 11px; color: var(--ink-2); margin-top: 8px; }
.loom-verse-label { min-width: 95px; }
.loom-text { font-family: var(--quran); font-size: clamp(27px,2.7vw,36px); line-height: 2.25; margin: 26px 0 16px; text-align: center; overflow-wrap: anywhere; }
.loom-text button { font: inherit; line-height: inherit; color: var(--ink); background: transparent; border: 0; border-radius: 6px; padding: 0 2px; cursor: pointer; }
.loom-text button:disabled { color: var(--ink); opacity: 1; cursor: default; }
.loom-text button:hover:not(:disabled), .loom-text .loom-word-active { background: #e9efe5; color: #264e41; }
.loom-verse-end { white-space: nowrap; }
.loom-measures { font-size: 11px; color: #645e54; text-align: center; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.loom-scrub { padding: 22px 0 18px; }
.loom-scrub label { font-size: 11px; color: var(--ink-2); }
.loom-scrub input { width: 100%; accent-color: #52786a; margin: 13px 0 0; }
.loom-main-controls { display: flex; flex-wrap: wrap; gap: 8px; }
.loom-main-controls .btn { justify-content: center; flex: 1 1 125px; font-size: 11px; padding: 11px 10px; }
.btn.loom-primary { background: #e4ece0; color: #294f40; border: 1px solid #cbdac4; }
.btn.loom-primary:hover { background: #d9e6d4; }
.loom-play-status { font-size: 10px; color: var(--ink-2); min-height: 16px; margin: 12px 0; }
.loom-play-options { font-size: 11px; color: var(--ink-2); margin-bottom: 20px; }
.loom-play-options input { accent-color: #52786a; vertical-align: middle; }
.loom-reciter { display: grid; grid-template-columns: 1fr auto; width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 14px; text-align: start; background: #fbfaf5; cursor: pointer; color: var(--ink); font: 12px var(--ui); }
.loom-reciter span { font-size: 10px; color: var(--ink-2); grid-column: 1; margin-bottom: 7px; }
.loom-reciter b { font-size: 12px; font-weight: 400; grid-column: 1; }
.loom-reciter svg { width: 17px; height: 17px; grid-column: 2; grid-row: 1 / 3; align-self: center; }
.loom-echo-box { margin: 20px 0; }
.loom-echo-action { display: flex; align-items: center; gap: 12px; background: #f3f1e7; border: 1px solid #e6dfc9; border-radius: 12px; padding: 15px; width: 100%; color: #66512e; text-align: start; font: 12px var(--ui); cursor: pointer; }
.loom-echo-action > svg { width: 22px; height: 22px; flex: 0 0 22px; }
.loom-echo-action > svg:last-child { width: 15px; flex-basis: 15px; margin-inline-start: auto; }
.loom-echo-action small { display: block; font-size: 10px; margin-top: 7px; }
.loom-echo-box details { font-size: 11px; margin-top: 12px; color: var(--ink-2); }
.loom-echo-refs { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 12px; }
.loom-echo-refs button { background: #fffdf9; border: 1px solid var(--line); border-radius: 6px; font: 11px var(--ui); padding: 5px 8px; cursor: pointer; color: var(--ink-2); }
.loom-echo-refs [aria-current] { background: #e7eddf; color: #315f55; }
.loom-no-echo { font-size: 11px; color: var(--ink-2); }
.loom-reading-links { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 18px; border-top: 1px solid var(--line); }
.loom-reading-links a { display: flex; align-items: center; gap: 6px; font-size: 10px; color: #45695d; }
.loom-reading-links svg { width: 14px; height: 14px; }
.loom-method { margin: 24px 0; color: var(--ink-2); font-size: 12px; }
.loom-method summary { cursor: pointer; }
.loom-method p { max-width: 750px; line-height: 1.85; }
@media (max-width: 850px) {
  .loom-page { padding: 24px 18px 0; }
  .loom-layout { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .loom-art { max-width: 660px; width: 100%; margin: auto; }
  .loom-intro { align-items: start; }
  .loom-intro h1 { max-width: 360px; }
}
@media (max-width: 540px) {
  .loom-intro { flex-direction: column; gap: 16px; }
  .loom-surah-label { width: 100%; }
  .loom-page { padding: 22px 12px 0; }
  .loom-sheet { padding: 20px; }
  .loom-art-toolbar { margin: 12px 10px 0; }
  .loom-art-toolbar button { font-size: 11px; padding: 8px 12px; }
  .loom-art-caption { padding: 12px 16px; min-height: 82px; }
  .loom-teaser { flex-direction: column; align-items: start; gap: 10px; padding: 22px; }
  .loom-emblem { width: 130px; flex-basis: 130px; align-self: center; }
}

/* Verse in Bloom: softly lit 3D petals with quiet, plain reading surfaces. */
.loom-art { border-color: #e1e7db; box-shadow: 0 18px 60px -45px #91ae9a; }
.loom-canvas-wrap { background: #f8f6f0; }
.loom-render-note { margin: 0; padding: 12px 20px; color: #625d52; background: #f4f1e6; font-size: 11px; }
.loom-render-note[hidden] { display: none; }
.loom-text .loom-word-active { background: #e2f0e6; transition: background-color .18s ease; }
.loom-sheet { box-shadow: 0 15px 45px -42px #b6baa9; }
@media (prefers-reduced-motion: reduce) { .loom-text .loom-word-active { transition: none; } }
.loom-art-toolbar .loom-tool { display: flex; padding: 9px; }
.loom-tool svg { width: 18px; height: 18px; }
.loom-art-toolbar .loom-save { margin-inline-start: 0; }
.loom-art-toolbar [data-loom="motion"] { margin-inline-start: auto; }
.tide-teaser { display: flex; align-items: center; gap: 34px; padding: 30px; margin: 28px 0; border: 1px solid #dce3db; border-radius: 22px; background: linear-gradient(115deg,#f3f7f1,#f9f5ed); }
.tide-teaser h2 { font-size: 25px; font-weight: 400; margin: 8px 0; }
.tide-teaser p:not(.lbl) { color: var(--ink-2); max-width: 500px; line-height: 1.8; margin-bottom: 22px; }
.tide-emblem { width: 200px; flex: 0 0 200px; }
.tide-emblem svg { width: 100%; }
.tide-controls { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 20px 18px; }
.tide-controls[hidden] { display: none; }
.tide-controls p { margin: 0 0 6px; font-size: 12px; color: #315f55; }
.tide-controls small { display: block; font-size: 10px; color: var(--ink-2); line-height: 1.6; }
.tide-controls .btn { flex-shrink: 0; font-size: 11px; background: #fffdf8; }
.tide-controls [aria-pressed="true"] { border-color: #8eb2a2; background: #eef4ee; }
.tide-page .loom-canvas { cursor: grab; touch-action: none; }
.tide-page .loom-canvas:active { cursor: grabbing; }
@media (max-width: 540px) {
 .tide-teaser { flex-direction: column; align-items: start; padding: 22px; gap: 8px; }
 .tide-emblem { width: 170px; flex-basis: auto; align-self: center; }
 .tide-controls { padding: 0 14px 15px; align-items: start; flex-direction: column; gap: 12px; }
 .tide-controls .btn { align-self: flex-end; }
}
body.bloom-immersed { overflow: hidden; }
.bloom-immersed .loom-art { position: fixed; inset: 12px; z-index: 100; display: flex; flex-direction: column; max-width: none; width: auto; background: #f8f6f0; }
.bloom-immersed .loom-canvas-wrap { flex: 1; min-height: 0; width: min(100%, calc(100dvh - 145px)); margin: auto; aspect-ratio: auto; }
.bloom-immersed .loom-art-caption { min-height: 62px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.bloom-immersed .loom-art-caption span { margin: 0; }
@media (max-width: 540px) {
 .loom-art-toolbar button { padding: 8px 9px; }
 .loom-art-toolbar .loom-tool, .loom-art-toolbar .loom-save { padding: 7px; }
 .bloom-immersed .loom-art { inset: 6px; }
 .bloom-immersed .loom-art-caption { font-size: 10px; }
}

/* Persistent destinations, direct verse navigation and local discovery. */
:root { --nav-space: 0px; }
#site-nav { position:fixed; z-index:38; inset-inline-start:12px; top:50%; transform:translateY(-50%); width:76px; display:grid; gap:4px; padding:7px; border:1px solid var(--line); background:#fffdf9; border-radius:22px; box-shadow:var(--shadow); }
#site-nav a { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:5px; min-height:59px; font-size:10px; border-radius:15px; color:var(--ink-2); }
#site-nav svg { width:20px; height:20px; }
#site-nav a:hover, #site-nav [aria-current] { background:#ece9dd; color:#65552f; }
body.reciting #site-nav, .bloom-immersed #site-nav { display:none; }
.ux-page { max-width:1080px; margin:0 auto; padding:42px 24px 64px; }
.ux-page h1 { font-size:clamp(28px,3.8vw,48px); font-weight:500; line-height:1.4; letter-spacing:-.035em; margin:10px 0 20px; }
.ux-page h2 { font-weight:500; }
.ux-lead { max-width:730px; font-size:16px; line-height:1.9; color:var(--ink-2); }
.ux-actions { display:flex; flex-wrap:wrap; gap:9px; align-items:center; margin:22px 0; }
.ux-filter { display:grid; gap:8px; margin:28px 0 14px; max-width:640px; }
.ux-filter input, .ux-jump input, .ux-jump select, .ux-discovery-form input { padding:13px 15px; min-width:0; width:100%; border-radius:13px; border:1px solid var(--line-2); background:#fffefa; color:var(--ink); font:inherit; }
.ux-jump { display:grid; grid-template-columns:1fr 100px; gap:16px; padding:20px; }
.ux-jump label { display:grid; gap:8px; }
.ux-jump label:nth-child(3) { grid-column:1/-1; }
.ux-recent { padding:0 20px 24px; display:flex; flex-wrap:wrap; gap:7px; }
.ux-recent p { flex-basis:100%; }
.ux-surahs .card > span:nth-child(2) { display:grid; gap:4px; }
.ux-surahs .card small { color:var(--ink-3); font-size:11px; }
.ux-surahs .card > svg { width:18px; margin-inline-start:auto; }
.reader-tools { position:sticky; top:var(--top-h); z-index:15; display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:2px; padding:4px; border:1px solid var(--line); border-radius:14px; background:rgba(255,253,249,.97); margin:8px auto 18px; max-width:var(--wrap); }
.reader-tools .btn { font-size:12px; padding:8px 10px; }
.reader-tools .ib { width:32px; height:32px; }
.ux-home-resume { margin-top:16px; }
.ux-home-listen { position:relative; overflow:hidden; display:grid; grid-template-columns:1fr 1fr; min-height:310px; background:#edece2; border:1px solid var(--line); border-radius:26px; margin:26px 0; }
.ux-home-listen > div:first-child { padding:30px; position:relative; z-index:1; }
.ux-home-listen h2 { font-size:30px; font-weight:500; }
.ux-listen-cards { display:grid; grid-template-columns:1.3fr 1fr; gap:20px; margin-top:30px; }
.ux-listen-cards > a { overflow:hidden; border-radius:25px; border:1px solid var(--line); background:#fffefa; display:block; padding:0 24px 27px; transition:transform .25s; }
.ux-listen-cards > a:hover { transform:translateY(-3px); }
.ux-listen-cards p { color:var(--ink-2); line-height:1.8; }
.ux-tv-preview { display:grid; place-items:center; text-align:center; font-size:clamp(28px,3vw,43px); height:280px; margin:0 -24px 24px; padding:20px; background:#f8f5eb; color:#b8862e; }
.ux-discovery-form { display:flex; gap:8px; margin:30px 0 16px; }
.ux-discovery-form input { flex:1; }
.ux-explore-links { display:flex; flex-wrap:wrap; gap:9px; margin:38px 0 20px; }
.ux-discovered-verses { margin:20px 0; }
.sr { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }

/* Recital variants share the same exact source-clock and letter geometry. */
.rec-cinema { grid-template-rows:auto 1fr auto; }
.cinema-scene { position:absolute; inset:0 0 35% 0; overflow:hidden; background:linear-gradient(#f5eee1,#e4e7dc); }
.cinema-scene canvas { display:block; width:100%; height:100%; }
.rec-cinema .rec-stage { position:absolute; inset:65% 0 102px; padding:12px 6vw; background:var(--paper); border-top:1px solid #e1d7c2; }
.rec-cinema .rec-title { padding:2px 18px 8px; justify-self:center; border-radius:0 0 24px 24px; background:rgba(255,253,246,.86); }
.rec-cinema .rec-title b { font-size:23px; }
.rec-cinema .rec-seal { display:none; }
.rec-cinema .rec-ctl { position:absolute; bottom:0; left:50%; transform:translateX(-50%); margin-bottom:10px; }
.rec-cinema .rec-cta { bottom:125px; }
.rec-cinema .rec-end { bottom:110px; }
.cinema-tools { position:absolute; top:90px; inset-inline-end:16px; display:flex; gap:7px; z-index:3; }
.cinema-tools .btn { font-size:11px; background:rgba(255,253,246,.92); padding:8px 11px; }
.cinema-tools [aria-pressed=true] { background:#dce6da; }
.cinema-fallback { padding:120px 24px 0; text-align:center; color:#655c4e; }
.rec-cinema .rv .ink-l.ghost { color:rgba(40,33,24,.28); }
.rec-tv { background:#fcfaf5; --hl:#f0dfb0; --gold:#b8862e; }
.rec-tv .rec-stage { padding:5vh 6vw 8vh; }
.rec-tv .ink-l.ghost { color:#30281e; }
.rec-tv .ink-l.gold { color:#b8862e; text-shadow:0 0 .04em #d4a24a26; }
.rec-tv .ink-l.ink { color:#30281e; }
.rec-tv .pen { display:none; }
.rec-tv .ink-l { z-index:1; }
.rec-tv .ink-l.ghost { position:relative; }
.tv-gold-canvas { position:absolute; inset:0; width:100%; height:100%; pointer-events:none; z-index:0; }
.rec-tv .rv.enter, .rec-tv .rv.leave { filter:none; }
.rec-tv .rv { transition:opacity .4s,transform .4s; }
.tv-help { position:absolute; bottom:100px; inset-inline:20px; text-align:center; z-index:4; font-size:12px; color:var(--ink-2); pointer-events:none; }
.rec-tv.tv-running { display:block; cursor:none; }
.rec-tv.tv-running > :not(.rec-stage) { display:none !important; }
.rec-tv.tv-running > .rec-top { display:block !important; position:fixed; top:0; left:0; padding:10px; cursor:auto; }
.rec-tv.tv-running .rec-top > :not(.page-navigation) { display:none; }
.rec-tv.tv-running .page-navigation { border-radius:12px; background:var(--card); }
.rec-tv.tv-running .rec-stage { position:absolute; inset:0; padding:7vh 7vw; }
body.tv-active .toast { display:none; }
@media (min-width:1101px) { #main { padding-inline:90px; } }
@media (max-width:1100px) {
  :root { --nav-space:68px; }
  body { padding-bottom:calc(var(--player-h) + var(--nav-space) + 40px + env(safe-area-inset-bottom)); }
  #site-nav { top:auto; bottom:0; inset-inline:0; transform:none; width:auto; display:grid; grid-template-columns:repeat(6,1fr); border-radius:18px 18px 0 0; padding:5px 7px calc(5px + env(safe-area-inset-bottom)); }
  #site-nav a { min-height:56px; font-size:10px; gap:4px; }
  .player { bottom:calc(var(--nav-space) + 12px + env(safe-area-inset-bottom)); }
  .fab { bottom:calc(var(--nav-space) + 18px + env(safe-area-inset-bottom)); }
  .selbar { bottom:calc(var(--nav-space) + var(--player-h) + 20px + env(safe-area-inset-bottom)); }
  .fab:not([hidden]) ~ .selbar { bottom:calc(var(--nav-space) + 80px + env(safe-area-inset-bottom)); }
  .toast { bottom:calc(var(--nav-space) + var(--player-h) + 24px + env(safe-area-inset-bottom)); }
  .mp { bottom:calc(var(--nav-space) + env(safe-area-inset-bottom)); }
}
@media (max-width:640px) {
  .ux-page { padding:26px 17px 38px; }
  .ux-listen-cards { grid-template-columns:1fr; }
  .ux-home-listen { grid-template-columns:1fr; }
  .cinema-scene { bottom:43%; }
  .rec-cinema .rec-stage { top:57%; bottom:103px; padding:5px 4vw; }
  .cinema-tools { top:85px; inset-inline:10px; justify-content:center; }
  .cinema-tools .btn { font-size:10px; padding:7px 9px; }
  .ux-discovery-form { flex-wrap:wrap; }
  .ux-discovery-form input { flex-basis:100%; }
  .rec-tv.tv-running .rec-stage { padding:6vh 5vw; }
}
@media (prefers-reduced-motion:reduce) { .ux-listen-cards > a { transition:none; } }
@media print { #site-nav, .reader-tools, .cinema-tools { display:none !important; } }
.reader .surah + .surah { margin-top:48px; padding-top:32px; border-top:1px solid var(--line); }
.reader-continuation { text-align:center; padding:32px 16px; color:var(--ink-2); }
.reader, .rec-stage, .loom-sheet, .studio-verse { touch-action:pan-y pinch-zoom; }
/* On touch devices disable page pinch zoom as well as double-tap zoom.
   Directional reading swipes and custom artwork gestures keep their rules. */
@media (hover: none) and (pointer: coarse) {
  * { touch-action: pan-x pan-y; }
  .loom-canvas { touch-action: pan-x pan-y; }
  .reader, .rec-stage, .loom-sheet, .studio-verse { touch-action: pan-y; }
  :root :is(input, select, textarea) { font-size: max(16px, 1em); }
}
.loom-art-toolbar a.loom-tv { align-items:center; gap:5px; min-height:40px; border:1px solid #e2ded2; border-radius:24px; font:12px var(--ui); color:var(--ink-2); }
.loom-tv svg { width:18px; height:18px; }
.rec-cinema .rec-title { background:rgba(255,252,245,.82); border:1px solid #e9e0d0; border-top:0; }
.rec-cinema .rec-stage { background:#fffdf8; }
.rec-cinema .rv .ink-l.ghost { color:#4b493e; }
.rec-cinema .rec-cta { bottom:30px; box-shadow:none; background:#f4ecd9; color:#4d493d; border:1px solid #dbcfb4; padding:6px 20px 6px 6px; }
.rec-cinema .rec-cta-i { width:38px; height:38px; animation:none; background:#a28c55; }
.rec-cinema .rec-cta-t small { color:#746b58; }
.rec-cinema:has(.rec-cta:not([hidden])) .rec-ctl { opacity:0; pointer-events:none; }
.rec-cinema .rec-title b { font-size:20px; }
.rec-cinema .rec-title span { font-size:10px; }
.cinema-tools .btn { font-size:10px; background:#fffdf5dd; border-color:#ded8c7; }
.seo-content { max-width:900px; margin:0 auto; padding:32px 24px; }
.seo-content h1 { font-weight:500; font-size:28px; }
.seo-content .seo-verse h2 { font-size:13px; font-weight:400; color:var(--gold); }
.seo-content .seo-verse .quran { font-size:clamp(27px,3vw,44px); line-height:2.1; }
.seo-content .seo-verse { margin:24px 0 32px; }
.seo-content .seo-directory { columns:3 220px; line-height:2.2; }
.seo-verse-links { font-size:12px; }
.cinema-trail { align-self:center; max-width:30vw; font-size:11px; background:#fffcf1eb; color:#534c3b; padding:8px 12px; border-radius:999px; }
.rec-cinema .rec-top > .ib { background:#fffcf1e6; border:1px solid #e0d8c7; }
.rec-cinema .rec-top > .ib:hover { background:#fffdf7; }
@media(max-width:640px) { .cinema-trail { max-width:90vw; flex-basis:100%; text-align:center; } .cinema-tools { flex-wrap:wrap; } }
.rec-cinema .rv.enter, .rec-cinema .rv.leave { filter:none; }
.rec-cinema .rv { transition:opacity .45s,transform .45s; }
.rec-cinema .pen { display:none; }
.ux-art-preview { display:block; width:100%; height:280px; object-fit:contain; background:#faf9f5; }
.ux-listen-cards .ux-art-preview { width:calc(100% + 48px); max-width:none; margin:0 -24px 24px; }
.ux-home-listen .ux-art-preview { height:100%; object-fit:cover; align-self:stretch; }
.rec-cinema:has(.cinema-trail) [data-r=repeat] { display:none; }

/* Compact reading and recitation groups on the homepage. */
body.home-active { padding:0; --nav-space:0px; }
body.home-active #site-nav, body.home-active .player, body.home-active .fab { display:none; }
.home.home-simple { max-width:940px; padding:36px 24px 56px; display:flex; flex-direction:column; align-items:center; text-align:center; }
.home-mark { width:48px; height:48px; display:block; color:var(--gold); margin-bottom:18px; }
.home-mark svg { width:100%; height:100%; }
.home-simple h1 { font-size:clamp(30px,4vw,42px); font-weight:500; margin:0; }
.home-prompt { color:var(--ink-2); margin:10px 0 28px; font-size:15px; }
.home-choices { width:100%; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; }
.home-group { min-width:0; display:grid; grid-template-rows:minmax(128px,auto) 1fr; gap:10px; }
.home-shortcuts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.home-choice { display:flex; align-items:center; gap:12px; padding:14px; background:var(--card); border:1px solid var(--line); border-radius:14px; text-align:start; transition:background .15s,border-color .15s; }
.home-choice:hover { background:var(--paper-2); border-color:var(--gold); }
.home-choice:focus-visible { outline:2px solid var(--gold); outline-offset:4px; }
.home-choice > svg { flex-shrink:0; width:21px; height:21px; color:var(--gold); }
.home-choice > svg:last-child { width:14px; height:14px; color:var(--ink-3); transform:rotate(90deg); }
[dir=rtl] .home-choice > svg:last-child { transform:rotate(-90deg); }
.home-choice > span { flex:1; min-width:0; }
.home-choice b { display:block; font-size:14px; font-weight:500; line-height:1.6; }
.home-choice small { display:block; color:var(--ink-2); font-size:12px; line-height:1.7; margin-top:4px; }
.home-main-choice { min-height:128px; padding:24px; gap:18px; border-radius:18px; }
.home-main-choice > svg:first-child { width:30px; height:30px; }
.home-main-choice b { font-size:24px; }
.home-recitation { background:var(--paper-2); border-color:var(--line); }
.home-place { color:var(--ink-3); font-size:12px; line-height:1.8; margin:22px 0 0; }
.home-place:has(.home-sources) { display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:6px 12px; }
.home-sources { display:inline-flex; align-items:center; justify-content:center; gap:6px; min-height:44px; padding:5px 12px; border:1px solid var(--line); border-radius:12px; background:var(--card); color:var(--ink-2); font-size:12px; }
.home-sources svg { width:16px; height:16px; color:var(--gold); }
.home-sources:hover { background:var(--paper-2); border-color:var(--gold); }
.home-sources:focus-visible { outline:2px solid var(--gold); outline-offset:3px; }
.about #sources { scroll-margin-top:calc(var(--top-h) + 16px); }
.home-juz-list small { text-align:end; }
.home-static-index { position:relative; padding:0; display:block; }
.home-static-index summary { display:flex; align-items:center; gap:10px; padding:14px; cursor:pointer; list-style:none; font-size:14px; }
.home-static-index summary::-webkit-details-marker { display:none; }
.home-static-index summary > svg { width:21px; height:21px; color:var(--gold); flex:none; }
.home-static-index .seo-directory { columns:1; max-height:45vh; overflow:auto; font-size:14px; margin:0; padding:0 14px 14px; list-style:none; }
@media (max-width:700px) {
  .home.home-simple { max-width:520px; padding:24px 18px 36px; }
  .home-choices { grid-template-columns:1fr; gap:18px; }
  .home-group { grid-template-rows:minmax(104px,auto) 1fr; }
  .home-main-choice { min-height:104px; padding:20px; }
  .home-main-choice b { font-size:22px; }
  .home-shortcuts .home-choice { gap:8px; padding:13px 10px; }
  .home-shortcuts .home-choice > svg:last-child { display:none; }
}

.seo-content .home-mark { font-size:42px; line-height:52px; }
.seo-content .seo-directory { columns:3 220px; line-height:2.2; padding-inline-start:24px; }

.seo-content:has(.home-simple) { max-width:none; padding:0; }

.home-top { max-width:none; width:100%; gap:10px; padding:0 20px; height:var(--top-h); direction:rtl; }
.home-identity { display:flex; align-items:center; flex-wrap:nowrap; gap:8px; direction:ltr; min-width:0; }
.home-identity .home-account { max-width:180px; min-width:0; flex:0 1 auto; direction:rtl; }
.home-identity .language-switch { flex:none; }
.home-reading-summary { width:100%; display:flex; justify-content:center; margin:0 0 18px; }
.brand-mark { width:38px; height:38px; object-fit:contain; flex:none; }
.home-brand { gap:9px; flex-shrink:0; font-size:14px; }
.home-brand small { display:block; direction:ltr; font-size:10px; line-height:1.3; letter-spacing:.03em; }
@media(max-width:650px){
  .home-top { padding:0 12px; gap:8px; }
  .home-brand { padding-inline:4px; }
  .home-brand > span { display:none; }
  .brand-mark { width:32px; height:32px; }
}
.home-account { display:inline-flex; align-items:center; gap:8px; height:40px; max-width:65%; padding:6px 12px; border:1px solid var(--line); border-radius:12px; background:var(--card); font-size:13px; }
.home-account:hover, .home-signup:hover { background:var(--paper-2); }
.home-account > svg { width:20px; height:20px; flex:none; color:var(--gold); }
.home-account > span:not(.avatar) { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.home-account .avatar { flex:none; }
.home-signup { padding:10px 8px; border-radius:10px; color:var(--ink-2); font-size:13px; white-space:nowrap; }
body:has(.seo-content .home-top) > .top:empty { display:none; }

/* Unified reader controls. Quran type and word/verse geometry stay unchanged. */
.surah-picker { border:0; background:none; border-radius:12px; padding:5px 8px; }
.surah-picker:hover { background:var(--paper-2); }
.surah-picker b::after { content:'⌄'; font:14px sans-serif; margin-inline-start:7px; color:var(--gold); }
.reader-boundary { display:block; height:1px; }
.reader-progress { position:sticky; top:var(--top-h); z-index:15; margin:8px auto 20px; padding:12px 18px; border:1px solid var(--line); border-radius:16px; background:rgba(255,253,249,.97); max-width:var(--wrap); }
.progress-place { font-size:13px; color:var(--ink-2); margin-bottom:9px; }
.progress-bars { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px; }
.progress-label { display:flex; align-items:baseline; justify-content:space-between; gap:8px; font-size:12px; margin-bottom:6px; }
.progress-label b { font-weight:500; }
.progress-label span { color:var(--ink-3); font-variant-numeric:tabular-nums; white-space:nowrap; }
.progress-track { height:4px; background:#ece5d6; border-radius:9px; overflow:hidden; }
.progress-track i { display:block; height:100%; background:var(--gold); border-radius:9px; }
.reading-tools { display:contents; }
.reader-idle { display:none; }
.reader-dock-active .reading-tools { display:block; position:fixed; z-index:40; bottom:calc(var(--nav-space) + 10px + env(safe-area-inset-bottom)); left:50%; transform:translateX(-50%); width:min(820px,calc(100% - 24px)); border:1px solid var(--line); border-radius:20px; background:rgba(255,253,249,.98); box-shadow:0 8px 32px #40351e14; overflow:hidden; }
.reader-dock-active .reading-tools .player,.reader-dock-active .reading-tools .selbar { position:relative; inset:auto; width:100%; max-width:none; transform:none; border:0; border-radius:0; box-shadow:none; animation:none; margin:0; }
.reader-dock-active .reading-tools .player { padding:9px 12px 7px; overflow:visible; }
.reader-dock-active .reading-tools .selbar { padding:4px 8px 6px; }
.reader-dock-active .reading-tools .selbar .lbl { display:inline; }
.reader-dock-active .reading-tools .selbar button,.dock-tv { height:34px; padding:0 9px; font-size:12.5px; border-radius:9px; }
.reader-dock-active .dock-primary { border-top:1px solid var(--line); padding-top:4px; }
.reader-dock-active .dock-secondary { gap:3px; padding-top:2px; }
.reader-dock-active .sync-choice { background:var(--paper-2); }
.reader-dock-active .sel-actions { scrollbar-width:thin; }
.dock-tv { display:inline-flex; align-items:center; gap:6px; white-space:nowrap; flex-shrink:0; }
.dock-tv:hover { background:var(--paper-2); }
.dock-tv svg { width:18px; height:18px; color:var(--gold); }
.reader-dock-active .reader-idle:not([hidden]) { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 16px; }
.idle-start,.idle-rec { display:inline-flex; align-items:center; gap:8px; font-size:13px; min-height:36px; }
.idle-start { background:var(--paper-2); border-radius:12px; padding:0 12px; }
.idle-rec { min-width:0; color:var(--ink-2); }
.idle-rec span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.reader-idle svg { width:18px; height:18px; flex-shrink:0; color:var(--gold); }
.p-follow { display:inline-flex; align-items:center; gap:5px; padding:0 8px; height:36px; font-size:12px; border-radius:9px; white-space:nowrap; }
.p-follow svg { width:18px; height:18px; }
.p-follow[aria-pressed="true"] { color:var(--gold); background:var(--paper-2); }
.reader-surah-list { display:grid; gap:4px; max-height:60vh; overflow:auto; margin-top:16px; }
.reader-surah-list button { display:flex; align-items:center; gap:12px; padding:12px; text-align:start; border-radius:12px; }
.reader-surah-list button:hover,.reader-surah-list button[aria-current] { background:var(--paper-2); }
.reader-surah-list b { flex:1; font-weight:500; }
.reader-surah-list small { color:var(--ink-3); }
.list-number { min-width:30px; color:var(--gold); }
.surah-filter { width:100%; padding:12px; border:1px solid var(--line); border-radius:12px; background:var(--paper); }
@media(max-width:650px){
  .reader-progress { padding:10px 12px; margin:6px 12px 16px; }
  .progress-bars { gap:12px; }
  .progress-label { display:block; font-size:11px; line-height:1.6; }
  .progress-label b,.progress-label span { display:block; }
  .progress-place { font-size:12px; margin-bottom:5px; }
  .reader-dock-active .reading-tools { width:calc(100% - 16px); bottom:calc(var(--nav-space) + 6px + env(safe-area-inset-bottom)); border-radius:16px; }
  .reader-dock-active .p-row { flex-wrap:wrap; gap:5px; }
  .reader-dock-active .p-transport { gap:0; }
  .reader-dock-active .p-play { width:38px; height:38px; }
  .reader-dock-active .p-transport .ib { width:30px; height:34px; }
  .reader-dock-active .p-info { flex-basis:calc(100% - 110px); }
  .reader-dock-active .p-info b { font-size:12px; }
  .reader-dock-active .p-info button { font-size:12px; }
  .reader-dock-active .p-tools { width:100%; justify-content:flex-end; }
  .reader-dock-active .p-tools .ib { width:30px; height:30px; }
  .reader-dock-active .p-follow { height:30px; margin-inline-end:auto; }
  .reader-dock-active .reading-tools .player { padding:7px 9px 3px; }
  .reader-dock-active .reading-tools .selbar button { padding:0 7px; font-size:12px; }
  .reader-dock-active .selbar .ref { font-size:11px; }
  .reader-dock-active .reader-idle:not([hidden]) { padding:7px 10px; gap:8px; }
}
@media print { .reading-tools,.reader-progress { display:none!important; } }

@media(max-width:650px){
  .reader-dock-active .dock-primary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:3px; overflow:visible; }
  .reader-dock-active .dock-primary .ref { grid-column:1/-1; line-height:18px; }
  .reader-dock-active .dock-primary button { justify-content:center; gap:4px; padding:0 3px; font-size:11.5px; }
  .reader-dock-active .dock-primary button svg { width:15px; height:15px; }
  .reader-dock-active .dock-primary .x { position:absolute; inset-inline-end:8px; top:4px; width:24px; height:20px; }
  .reader-dock-active .dock-secondary { flex-wrap:wrap; overflow:visible; row-gap:0; }
}

/* Compact default: one transport row, direct actions, optional detail rows. */
.p-options { display:none; }
.reader-dock-active .p-options { display:inline-flex; width:32px; height:32px; flex-shrink:0; }
.reader-dock-active .p-row { flex-wrap:wrap; gap:7px; }
.reader-dock-active .p-tools { display:none; }
.reader-dock-active .options-open .p-tools { display:flex; flex-basis:100%; border-top:1px solid var(--line); padding-top:4px; justify-content:flex-end; }
.reader-dock-active .reading-tools .selbar { display:flex; flex-direction:row; flex-wrap:wrap; align-items:center; gap:3px; padding:5px 8px 7px; border-top:1px solid var(--line); }
.reader-dock-active .dock-primary,.reader-dock-active .dock-secondary { display:contents; border:0; padding:0; }
.reader-dock-active .dock-more:not([hidden]) { display:flex; flex-basis:100%; flex-wrap:wrap; border-top:1px solid var(--line); padding-top:4px; }
.reader-dock-active .dock-more-toggle { color:var(--ink-2); }
.reader-dock-active .dock-primary .ref { display:none; }
@media(max-width:650px){
  .reader-dock-active .p-info { flex-basis:0; }
  .reader-dock-active .p-transport { flex-shrink:0; }
  .reader-dock-active .p-info b { font-size:11px; }
  .reader-dock-active .reading-tools .selbar { display:block; padding:4px 6px 5px; }
  .reader-dock-active .dock-primary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:4px; }
  .reader-dock-active .dock-secondary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:2px; padding-top:2px; }
  .reader-dock-active .dock-secondary button,.reader-dock-active .dock-tv { justify-content:center; padding:0 2px; font-size:10.5px; gap:3px; }
  .reader-dock-active .dock-secondary svg { width:14px; height:14px; }
  .reader-dock-active .dock-primary button { font-size:11px; }
  .reader-dock-active .idle-start { font-size:12px; min-height:32px; }
  .reader-dock-active .idle-rec { font-size:12px; }
}
.reader-progress { padding:7px 12px; margin-top:6px; margin-bottom:14px; border-radius:12px; }
.progress-bars { gap:18px; }
.progress-label { margin-bottom:4px; }
.progress-track { height:3px; }
@media(max-width:650px){
  .reader-progress { padding:6px 10px; margin:4px 12px 12px; }
  .progress-bars { gap:10px; }
  .progress-label { line-height:1.35; font-size:11px; }
}
.p-follow span { display:none; }
.reader-dock-active .p-follow span { display:inline; }

/* Reader: one fixed dock and a header that follows scroll direction. */
.reader-dock-active .top { transition:clip-path .22s ease,border-color .2s; overflow:hidden; clip-path:inset(0); }
.reader-dock-active .reader-top { height:96px; align-content:start; padding-top:2px; }
.reader-header-hidden .top { clip-path:inset(0 0 max(0px,calc(var(--top-h) - 44px)) 0); }
.reader-dock-active .reader-progress { top:var(--top-h); transition:top .22s ease; width:calc(100% + 24px); max-width:none; margin-inline:-12px; padding:4px 10px; margin-top:4px; margin-bottom:12px; border-radius:10px; background:#fffdf9; }
.reader-dock-active .reader:has(.vlist) > .reader-progress { width:calc(100% + 16px); margin-inline:-8px; }
.reader-header-hidden .reader-progress { top:44px; }
.reader-dock-active .progress-bars { gap:14px; }
.reader-dock-active .progress-label { display:flex; align-items:baseline; justify-content:space-between; gap:4px; line-height:1.25; margin-bottom:4px; font-size:12px; }
.reader-dock-active .progress-label b,.reader-dock-active .progress-label span { display:inline; }
.reader-dock-active .progress-label b { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.reader-dock-active .progress-label span { flex-shrink:0; }
.reader-resume { position:absolute; z-index:1; top:calc(100% + 10px); right:0; display:flex; align-items:center; gap:7px; direction:ltr; max-width:calc(100vw - 24px); color:#77551e; }
.reader-resume-link { display:flex; align-items:center; min-width:0; padding:7px 10px; border:1px solid #dec99e; border-radius:12px; background:#fff9ed; box-shadow:0 3px 12px #40351e14; color:inherit; text-decoration:none; direction:rtl; }
html[dir="ltr"] .reader-resume-link { direction:ltr; }
.reader-resume-link > span { min-width:0; }
.reader-resume-link b,.reader-resume-link small { display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.reader-resume-link b { font-size:12px; font-weight:600; line-height:1.4; }
.reader-resume-link small { color:var(--ink-2); font-size:10px; line-height:1.4; }
.reader-resume svg { width:22px; height:22px; flex:none; }
.reader-resume-toggle { display:grid; place-items:center; width:42px; height:42px; flex:none; padding:8px; border:1px solid #b48b3d; border-radius:50%; background:#fff9ed; box-shadow:0 3px 12px #40351e24; color:inherit; cursor:pointer; }
.reader-resume-toggle[aria-expanded="true"] { background:#f5e8cb; }
.reader-resume-toggle:hover,.reader-resume-link[href]:hover { background:#f3e6ca; }
.reader-resume-toggle:focus-visible,.reader-resume-link:focus-visible { outline:2px solid #85580d; outline-offset:3px; }
.reader-dock-active .reading-tools { bottom:calc(6px + env(safe-area-inset-bottom)); background:#fffdf9; transition:transform .36s cubic-bezier(.22,1,.36,1),visibility 0s; }
.reader-dock-active .reading-tools .selbar { display:block; }
.reader-dock-active .dock-primary { display:grid; grid-template-columns:minmax(0,1fr) auto auto; align-items:center; gap:4px; overflow:visible; }
.reader-dock-active .dock-primary button { justify-content:center; }
.reader-dock-active .dock-secondary { display:flex; justify-content:space-between; padding-left:0; }
.reader-dock-active #site-nav { position:static; inset:auto; transform:none; width:auto; display:flex; justify-content:center; gap:3px; padding:0; border:0; border-radius:0; background:none; box-shadow:none; }
.reader-dock-active #site-nav a { flex:none; flex-direction:row; gap:5px; min-height:34px; padding:0 7px; max-width:none; font-size:12px; border-radius:9px; }
.reader-dock-active #site-nav svg { width:17px; height:17px; }
.reader-dock-toggle { position:fixed; z-index:41; right:calc(50% + min(410px,calc(50% - 8px)) - 42px); bottom:calc(13px + env(safe-area-inset-bottom)); width:36px; height:36px; display:grid; place-items:center; border:1px solid var(--line); border-radius:50%; background:#fffdf9; color:var(--gold); box-shadow:0 2px 8px #40351e14; transition:right .36s cubic-bezier(.22,1,.36,1),bottom .36s cubic-bezier(.22,1,.36,1); }
.reading-tools .reader-dock-toggle { position:static; flex-shrink:0; box-shadow:none; width:30px; height:30px; }
.reader-dock-toggle svg { width:20px; height:20px; }
.reader-dock-collapsed .reading-tools { transform:translateX(50vw); visibility:hidden; pointer-events:none; transition:transform .36s cubic-bezier(.22,1,.36,1),visibility 0s .36s; }
.reader-dock-collapsed .reader-dock-toggle { right:8px; bottom:calc(20px + env(safe-area-inset-bottom)); }
@media(max-width:650px){
  .reader-dock-active .dock-secondary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)) auto auto; }
  .reader-dock-active #site-nav a { width:32px; padding:0; }
  .reader-dock-active #site-nav span { display:none; }
  .reader-dock-active .progress-bars { gap:9px; }
  .reader-dock-active .progress-label { font-size:11px; column-gap:3px; margin-bottom:3px; }
  .reader-dock-active .progress-label span { font-size:10px; }
  .reader-dock-active .reader-progress { width:calc(100% + 16px); margin-inline:-8px; padding:4px 8px; }
  .reader-dock-active .reader:has(.vlist) > .reader-progress { width:calc(100% + 8px); margin-inline:-4px; }
  .reader-dock-active .progress-label .progress-count { display:none; }
  .reader-dock-active .dock-secondary .reading-share { padding:0 5px; }
  .reader-dock-active .dock-secondary .reading-share span { display:none; }
}
@media(prefers-reduced-motion:reduce){
  .reader-dock-active .top,.reader-dock-active .reader-progress,.reader-dock-active .reading-tools,.reader-dock-toggle { transition:none; }
}

/* Letter following: compact transport, reciter, bookmark and return. */
@media(max-width:650px){
  .reader-dock-active .dock-primary { grid-template-columns:minmax(0,1fr) auto auto; }
}
.reading-bookmark { display:inline-flex; align-items:center; justify-content:center; gap:5px; height:30px; padding:0 7px; border:1px solid var(--line); border-radius:9px; background:var(--paper-2); color:var(--gold); font-size:11.5px; white-space:nowrap; flex-shrink:0; }
.reading-bookmark svg { width:16px; height:16px; }
.reading-bookmark[aria-pressed="true"] { background:var(--gold-soft); border-color:var(--gold-2); }
.reading-share { display:inline-flex; align-items:center; justify-content:center; gap:4px; height:30px; padding:0 7px; border:1px solid var(--line); border-radius:9px; color:var(--ink-2); font-size:11.5px; white-space:nowrap; flex-shrink:0; }
.reading-share svg { width:16px; height:16px; color:var(--gold); }
.p-rec-group .reading-share { display:none; }
.reader-dock-active .p-rec-group .reading-share { display:inline-flex; }
.reader-dock-active .p-rec-group .p-rec { flex:1; }
.reader-dock-active .p-info b { display:none; }
@media(max-width:650px){
  .reader-dock-active .p-info { flex-basis:100%; order:-1; }
  .reader-dock-active .p-row { gap:3px; }
  .reader-dock-active .reader-speed { margin-inline-start:auto; }
}
.idle-rec-group { display:flex; align-items:center; gap:8px; min-width:0; }
.reader-dock-position { display:none; }
.reader-dock-active .reader-dock-position { display:inline-flex; align-items:center; gap:4px; flex-shrink:0; color:var(--ink-2); font-size:12px; line-height:1.3; white-space:nowrap; }
.reader-position-surah { max-width:140px; overflow:hidden; text-overflow:ellipsis; }
.reader-position-ayah { font-variant-numeric:tabular-nums; }
@media(max-width:650px){
  .reader-dock-active .reader-dock-position { font-size:10.5px; gap:3px; }
  .reader-position-surah { max-width:70px; }
}
.p-rec-group { display:flex; align-items:center; gap:6px; min-width:0; }
.p-rec-group .p-rec { min-width:0; }
.p-rec-group .reading-bookmark { display:none; }
.reader-dock-active .p-rec-group .reading-bookmark { display:inline-flex; color:var(--gold); font-size:11.5px; }
.rec-letter .rec-ctl { width:min(740px,calc(100% - 20px)); padding:8px 10px; border-radius:16px; background:rgba(255,253,249,.97); box-shadow:0 6px 24px #40351e12; }
.rec-letter .rec-row { grid-template-columns:minmax(0,1fr) auto auto; gap:8px; }
.rec-letter .rec-identity { display:flex; align-items:center; gap:7px; min-width:0; }
.rec-letter .rec-rc { flex:1; padding:0 4px; gap:5px; height:38px; }
.rec-letter .rec-rc span { max-width:none; }
.rec-letter .rec-rc svg:last-child { width:14px; height:14px; color:var(--ink-3); }
.rec-letter .rec-options { flex-shrink:0; width:30px; height:32px; }
.rec-letter .p-transport { grid-column:2; grid-row:1; gap:1px; }
.rec-letter .p-play { width:42px; height:42px; }
.rec-letter .rec-tools { display:none; }
.rec-letter.rec-options-open .rec-tools { display:flex; grid-column:1/-1; grid-row:2; border-top:1px solid var(--line); width:100%; justify-content:flex-end; padding-top:4px; }
.rec-letter .rec-back-reader { grid-column:3; grid-row:1; display:inline-flex; align-items:center; justify-content:center; gap:6px; padding:0 9px; height:36px; border:1px solid var(--line); border-radius:10px; background:var(--paper-2); font-size:12px; white-space:nowrap; }
.rec-letter .rec-back-reader svg { width:17px; height:17px; color:var(--gold); flex-shrink:0; }
.rec-letter .rec-back-reader:hover { background:var(--gold-soft); }
@media(max-width:600px){
  .reader-dock-active .reader-idle:not([hidden]) { gap:6px; }
  .reader-dock-active .idle-rec-group { flex:1; }
  .reader-dock-active .idle-rec { flex:1; gap:4px; }
  .reader-dock-active .idle-start { padding:0 7px; gap:5px; }
  .reader-dock-active .idle-rec-group { gap:4px; }
  .reader-dock-active .reading-bookmark { height:28px; padding:0 5px; font-size:11px; }
  .reader-dock-active .p-rec-group .reading-bookmark { font-size:11px; }
  .rec-letter .rec-ctl { width:calc(100% - 16px); margin-bottom:calc(8px + env(safe-area-inset-bottom)); padding:7px 9px; }
  .rec-letter .rec-row { grid-template-columns:minmax(0,1fr) auto; gap:4px 6px; }
  .rec-letter .rec-identity { grid-column:1/-1; grid-row:1; }
  .rec-letter .rec-rc { padding:0; font-size:12px; }
  .rec-letter .p-transport { grid-column:2; grid-row:2; }
  .rec-letter .p-transport .ib { width:30px; height:36px; }
  .rec-letter .p-play { width:40px; height:40px; }
  .rec-letter.rec-options-open .rec-tools { grid-column:1/-1; grid-row:3; }
  .rec-letter .rec-back-reader { grid-column:1; grid-row:2; justify-self:start; padding:0 7px; font-size:11.5px; height:32px; gap:5px; }
  .rec-letter .rec-tools .ib { width:30px; height:32px; }
  .rec-letter .rec-tools .p-speed { min-width:34px; }
}

@media(max-width:600px){
  .reader-dock-active .idle-start span { display:none; }
  .reader-dock-active .idle-start { width:32px; flex-shrink:0; justify-content:center; padding:0; }
}

/* Source-clock recital preview above the compact homepage choices. */
.home-demo { width:100%; margin-bottom:22px; }
.home-demo-heading { display:flex; justify-content:center; gap:12px; color:var(--ink-2); font-size:12px; }
.home-demo-heading > span:first-child { color:var(--gold); }
.home-demo-stage { display:grid; place-items:center; height:190px; overflow:hidden; margin:0 -6px; }
.home-demo-ink { width:100%; }
.home-demo .ink-l.ink { color:#b8862e; }
.home-demo .ink-l.ghost { color:rgba(40,33,24,.28); }
.home-demo .ink-box { line-height:1.85; }
.home-demo-reciter { color:var(--ink-2); font-size:12px; margin:4px 0 12px; }
.home-demo-reciter span { display:inline-block; margin-inline-start:6px; color:var(--gold); }
.home-demo-controls { display:flex; justify-content:center; gap:8px; flex-wrap:wrap; }
.home-demo-controls button { display:inline-flex; align-items:center; justify-content:center; gap:6px; min-height:38px; padding:8px 12px; border:1px solid var(--line); border-radius:12px; background:var(--card); font-size:12px; }
.home-demo-controls button svg { width:17px; height:17px; flex:none; color:var(--gold); }
.home-demo-controls [data-demo="mute"] { background:var(--paper-2); }
.home-demo-controls button:hover { border-color:var(--gold); }
.home-demo-controls button:focus-visible { outline:2px solid var(--gold); outline-offset:3px; }
.home-demo-controls button:disabled { opacity:.5; cursor:default; }
.home-demo-message { min-height:20px; margin:8px 0 0; font-size:11px; line-height:1.8; color:var(--ink-3); }
@media(max-width:700px){.home.home-simple { padding-top:12px; }.home-demo { margin-bottom:14px; }.home-demo-stage { height:165px; }.home-demo-controls button { padding:8px 10px; }}
.home-demo .sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.home-demo-static { font-size:clamp(32px,4.5vw,70px); line-height:1.85; margin:0; }
.home-demo-controls a { display:inline-flex; align-items:center; justify-content:center; gap:6px; min-height:38px; padding:8px 12px; border:1px solid var(--line); border-radius:12px; background:var(--card); font-size:12px; }

/* The homepage stays in the viewport; index dialogs scroll independently. */
html:has(body.home-active) { height:100%; overflow:hidden; overscroll-behavior:none; }
body.home-active { position:fixed; inset:0; height:100dvh; overflow:hidden; overscroll-behavior:none; display:flex; flex-direction:column; }
body.home-active > .top { flex:none; }
body.home-active #main { flex:1; min-height:0; overflow:hidden; }
body.home-active .home-simple { height:100%; min-height:0; padding-block:12px max(12px,env(safe-area-inset-bottom)); }
body.home-active .home-demo { flex:1; min-height:0; max-height:360px; display:flex; flex-direction:column; margin-bottom:14px; }
body.home-active .home-demo-stage { flex:1; height:auto; min-height:0; max-height:190px; }
body.home-active .home-choices { flex:none; }
body.home-active .home-place { flex:none; margin-top:12px; }
.app-install { display:inline-flex; flex:none; align-items:center; justify-content:center; gap:6px; min-height:36px; padding:5px 10px; border:1px solid #b48b3d; border-radius:20px; background:#f7ebd2; color:#624719; font:inherit; font-size:12px; white-space:nowrap; cursor:pointer; }
.app-install svg { width:19px; height:19px; flex:none; }
.app-install:hover { background:#f1dfba; }
.app-install:focus-visible { outline:3px solid #85580d; outline-offset:3px; }
.app-install:disabled { opacity:.65; cursor:wait; }
.install-guide { width:min(500px,calc(100% - 24px)); }
.install-guide .panel-h h2 { font-size:18px; font-weight:600; }
.install-guide .panel-h h2:focus { outline:none; }
.install-guide-body { padding:16px 18px 18px; }
.install-guide-intro { margin:0 0 14px; color:var(--ink-2); font-size:14px; line-height:1.8; }
.install-guide-platforms { display:flex; gap:6px; margin-bottom:14px; padding:4px; border-radius:12px; background:var(--paper-2,#f3f0e8); }
.install-guide-platforms button { flex:1; min-height:40px; border:1px solid transparent; border-radius:9px; background:none; color:var(--ink-2); font:inherit; font-size:13px; cursor:pointer; }
.install-guide-platforms button[aria-pressed="true"] { background:#fffdf7; border-color:var(--line); color:var(--ink); box-shadow:0 1px 3px #4b39160b; }
.install-guide-caption { margin:-7px 0 16px; color:var(--ink-3); font-size:12px; line-height:1.7; }
.install-guide-steps { list-style:none; margin:0; padding:0; display:grid; gap:16px; counter-reset:install-step; }
.install-guide-steps li { counter-increment:install-step; display:grid; grid-template-columns:28px minmax(0,1fr); gap:10px; padding:12px; border:1px solid var(--line); border-radius:14px; background:#fffdf7; }
.install-guide-steps li::before { content:counter(install-step); width:28px; height:28px; display:grid; place-items:center; border-radius:50%; background:var(--gold-soft); color:#6f4f17; font-size:14px; font-weight:600; }
.install-guide-steps b { display:block; color:var(--ink); font-size:14px; font-weight:600; line-height:1.7; }
.install-guide-steps p { margin:4px 0 0; color:var(--ink-2); font-size:13px; line-height:1.8; }
.install-guide-steps svg { display:inline-block; width:20px; height:20px; color:#6f4f17; vertical-align:middle; }
.install-guide-picture { display:block; grid-column:1/-1; width:100%; height:auto; border:1px solid #dfdfdf; border-radius:11px; background:#f1f2f5; }
.install-help-link { padding:0; border:0; background:none; color:inherit; font:inherit; text-decoration:underline; text-decoration-color:var(--line-2); text-underline-offset:3px; cursor:pointer; }
.install-guide-tip { margin-top:13px; color:var(--ink-2); font-size:13px; line-height:1.8; }
.install-guide-tip summary { cursor:pointer; }
.install-guide-tip p { margin:7px 0 0; }
.install-guide-tip a { color:#6f4f17; text-decoration:underline; text-underline-offset:3px; }
.install-guide-done { display:block; width:100%; margin-top:16px; }
@media(max-width:650px) {
  .home-top.install-ready { grid-template-columns:minmax(0,1fr) auto auto; }
  .home-top.install-ready .brand { min-width:0; font-size:13px; }
  .home-top.install-ready .brand > span,.home-top.install-ready .brand small { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .home-top.install-ready .app-install { grid-column:2; grid-row:1; }
  .home-top.install-ready .language-switch { grid-column:3; grid-row:1; }
  .home-top.install-ready .home-account { grid-column:2/4; grid-row:2; }
}
/* Keep the account and language together in the physical upper-left corner. */
@media(max-width:650px) {
  .home-top,.home-top.install-ready { grid-template-columns:minmax(0,1fr) auto; grid-template-rows:44px auto; }
  .home-top .home-identity,.home-top.install-ready .home-identity { grid-column:2; grid-row:1; justify-self:end; max-width:calc(100vw - 80px); }
  .home-top .home-identity .home-account { max-width:min(180px,calc(100vw - 165px)); margin:0; }
  .home-top .home-identity .language-switch { grid-column:auto; grid-row:auto; }
  .home-top .brand,.home-top.install-ready .brand { grid-column:1; grid-row:1; }
  .home-top .brand > span,.home-top.install-ready .brand > span { display:none; }
  .home-top .app-install,.home-top.install-ready .app-install { grid-column:1; grid-row:2; justify-self:start; }
  .home-top .home-signup { grid-column:2; grid-row:2; }
}
@media(max-width:360px) {
  .home-demo-controls { gap:4px; flex-wrap:nowrap; }
  .home-demo-controls button { padding:6px 7px; gap:4px; font-size:11px; }
}
@media(orientation:landscape) and (max-height:500px) {
  body.home-active .home-reading-summary { grid-column:2; grid-row:1; align-self:start; margin:0 0 8px; }
  body.home-active .home-choices { grid-row:2; }
  body.home-active .home-place { grid-row:3; }
}
@media (max-height:780px) {
  body.home-active .home-demo { margin-bottom:8px; }
  body.home-active .home-main-choice { min-height:78px; padding:14px; }
  body.home-active .home-group { grid-template-rows:auto auto; gap:8px; }
  body.home-active .home-choices { gap:12px; }
  body.home-active .home-main-choice small { display:none; }
  body.home-active .home-place { margin-top:8px; }
  body.home-active .home-demo-reciter { margin:2px 0 8px; }
}
@media (max-width:700px) and (max-height:700px) {
  body.home-active .home-choices { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  body.home-active .home-main-choice { min-height:70px; padding:10px; gap:6px; }
  body.home-active .home-main-choice b { font-size:17px; }
  body.home-active .home-main-choice > svg:first-child { width:22px; height:22px; }
  body.home-active .home-main-choice > svg:last-child { display:none; }
  body.home-active .home-shortcuts { gap:6px; }
  body.home-active .home-shortcuts .home-choice { flex-direction:column; justify-content:center; text-align:center; padding:8px 4px; gap:4px; }
  body.home-active .home-shortcuts .home-choice b { font-size:12.5px; }
  body.home-active .home-shortcuts .home-choice > svg:first-child { width:17px; height:17px; }
}
@media (max-width:480px) and (max-height:700px) and (orientation:portrait) {
  html:not(.tweet-embed) body.home-active #main { overflow-y:auto; }
  html:not(.tweet-embed) body.home-active .home-simple { height:auto; min-height:100%; }
  html:not(.tweet-embed) body.home-active .home-demo { flex:none; min-height:220px; }
  html:not(.tweet-embed) body.home-active .home-demo-stage { flex:none; height:110px; min-height:110px; }
}
@media (orientation:landscape) and (max-height:500px) {
  body.home-active { --top-h:48px; }
  body.home-active #main { padding-inline:0; }
  body.home-active .home-simple { max-width:1100px; display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); grid-template-rows:auto minmax(0,1fr) auto; column-gap:20px; padding:8px 18px max(8px,env(safe-area-inset-bottom)); }
  body.home-active .home-demo { grid-column:1; grid-row:1/4; height:100%; margin:0; }
  body.home-active .home-demo-stage { max-height:none; }
  body.home-active .home-demo-controls { gap:6px; }
  body.home-active .home-demo-controls button { padding:6px 8px; font-size:11px; }
  body.home-active .home-choices { grid-column:2; grid-row:2; grid-template-columns:1fr; gap:8px; align-self:center; }
  body.home-active .home-main-choice { min-height:52px; padding:8px 12px; gap:8px; }
  body.home-active .home-main-choice b { font-size:17px; }
  body.home-active .home-main-choice > svg:first-child { width:22px; height:22px; }
  body.home-active .home-main-choice > svg:last-child { display:none; }
  body.home-active .home-shortcuts .home-choice { flex-direction:row; text-align:start; padding:7px 8px; gap:6px; }
  body.home-active .home-shortcuts .home-choice b { font-size:12px; }
  body.home-active .home-shortcuts .home-choice > svg:last-child { display:none; }
  body.home-active .home-place { grid-column:2; grid-row:3; margin:6px 0 0; font-size:11px; }
}
@media (orientation:landscape) and (max-height:500px) and (max-width:620px) {
  body.home-active .home-demo-controls [data-demo="play"] span { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; }
}

/* Reserve room for the live Al-Alaq demo in the rectangular X player. */
@media (max-width:650px) and (min-height:521px) {
  .tweet-embed body.home-active .home-simple { padding:10px 14px; }
  .tweet-embed body.home-active .home-demo { min-height:180px; margin-bottom:10px; }
  .tweet-embed body.home-active .home-demo-stage { min-height:100px; }
  .tweet-embed body.home-active .home-demo-reciter { font-size:11px; margin:2px 0 8px; }
  .tweet-embed body.home-active .home-demo-controls button { min-height:32px; padding:6px 9px; }
  .tweet-embed body.home-active .home-choices { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .tweet-embed body.home-active .home-group,
  .tweet-embed body.home-active .home-shortcuts { display:contents; }
  .tweet-embed body.home-active .home-choice,
  .tweet-embed body.home-active .home-shortcuts .home-choice { flex-direction:row; text-align:start; min-width:0; min-height:44px; padding:8px 10px; gap:8px; order:1; }
  .tweet-embed body.home-active .home-main-choice { min-height:58px; order:0; }
  .tweet-embed body.home-active .home-choice b,
  .tweet-embed body.home-active .home-shortcuts .home-choice b { font-size:15px; line-height:1.5; }
  .tweet-embed body.home-active .home-choice > svg:first-child { width:20px; height:20px; }
  .tweet-embed body.home-active .home-choice > svg:last-child,
  .tweet-embed body.home-active .home-main-choice small { display:none; }
  .tweet-embed body.home-active .home-place { margin-top:8px; font-size:11px; }
}

/* X can supply a small square viewport regardless of the requested height.
   Keep the full app, but do not use the phone-landscape split in this card. */
@media (max-width:650px) and (max-height:520px) {
  .tweet-embed body.home-active { --top-h:32px; }
  .tweet-embed .home-top { height:32px; padding:0 10px; }
  .tweet-embed .home-top .brand-mark { width:24px; height:24px; }
  .tweet-embed body.home-active .home-simple { display:flex; width:100%; max-width:none; padding:4px 10px 6px; gap:0; }
  .tweet-embed body.home-active .home-demo { width:100%; height:auto; min-height:0; max-height:none; margin:0 0 6px; grid-column:auto; grid-row:auto; }
  .tweet-embed body.home-active .home-demo-heading { font-size:10px; line-height:16px; flex:none; }
  .tweet-embed body.home-active .home-demo-stage { min-height:0; max-height:170px; margin:0; }
  .tweet-embed body.home-active .home-demo-reciter { display:none; }
  .tweet-embed body.home-active .home-demo-controls { flex:none; gap:4px; flex-wrap:nowrap; }
  .tweet-embed body.home-active .home-demo-controls button { min-height:28px; padding:4px 6px; font-size:11px; border-radius:9px; }
  .tweet-embed body.home-active .home-demo-controls button svg { width:15px; height:15px; }
  .tweet-embed body.home-active .home-demo-controls [data-demo="play"] span { position:static; width:auto; height:auto; overflow:visible; clip:auto; white-space:nowrap; }
  .tweet-embed body.home-active .home-demo-message { min-height:0; max-height:28px; margin:2px 0 0; line-height:1.35; font-size:10px; }
  .tweet-embed body.home-active .home-choices { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:5px; align-self:stretch; grid-column:auto; grid-row:auto; }
  .tweet-embed body.home-active .home-group,
  .tweet-embed body.home-active .home-shortcuts { display:contents; }
  .tweet-embed body.home-active .home-choice,
  .tweet-embed body.home-active .home-shortcuts .home-choice { flex-direction:row; justify-content:flex-start; text-align:start; min-width:0; min-height:34px; padding:6px 8px; gap:6px; border-radius:10px; order:1; }
  .tweet-embed body.home-active .home-main-choice { order:0; }
  .tweet-embed body.home-active .home-choice b,
  .tweet-embed body.home-active .home-shortcuts .home-choice b { font-size:12px; line-height:1.4; }
  .tweet-embed body.home-active .home-choice > svg:first-child { width:17px; height:17px; }
  .tweet-embed body.home-active .home-choice > svg:last-child,
  .tweet-embed body.home-active .home-main-choice small { display:none; }
  .tweet-embed body.home-active .home-place { margin:5px 0 0; line-height:1.4; font-size:10px; grid-column:auto; grid-row:auto; }
}

/* Tweet guests read and listen without TV controls. */
.tweet-embed .home-shortcuts:has(> .home-choice:only-child) { grid-template-columns:1fr; }
.tweet-embed .ux-listen-cards { grid-template-columns:1fr; }
@media (max-width:650px) {
  .tweet-embed body.home-active [data-home-index="juz"] { grid-column:1 / -1; }
  .tweet-embed body.reader-dock-active .dock-secondary { grid-template-columns:repeat(2,minmax(0,1fr)) auto; }
}

/* Letter following is the gold primary action; ordinary recitation sits above. */
.reader-dock-active .reader-sync-cta {
  display:inline-flex; align-items:center; justify-content:center; gap:7px;
  flex:none; min-width:36px; min-height:36px; height:36px; padding:0 10px;
  border:1px solid #b78121; border-radius:12px;
  background:linear-gradient(125deg,#ffe6a5,#efc05c); color:#342508;
  box-shadow:0 3px 12px #aa762025,inset 0 1px 0 #fff7da;
  text-align:start; cursor:pointer;
}
.reader-sync-cta > span { display:flex; align-items:center; }
.reader-sync-cta b { font-size:13px; font-weight:600; line-height:1.5; white-space:nowrap; }
.reader-dock-active .reader-sync-cta svg { flex:none; width:22px; height:22px; color:#62450f; }
.reader-dock-active .p-info { display:flex; align-items:center; gap:8px; }
.reader-dock-active .p-rec-group { flex:1; min-width:0; }
.reader-dock-active .reader-sync-cta:hover { background:linear-gradient(125deg,#ffeabc,#edb74b); border-color:#956514; }
.reader-sync-cta:focus-visible { outline:3px solid #85580d; outline-offset:3px; }
.reader-dock-active .dock-primary .reader-sync-cta { width:auto; min-width:0; justify-self:stretch; }
.reader-dock-active .reader-idle .idle-start { width:36px; height:36px; min-height:36px; flex:none; justify-content:center; padding:0; }
/* Playback details expand only through More; starting audio keeps the dock still. */
.reader-dock-active .reading-tools .player { display:none; }
.reader-dock-active .reading-tools.reader-more-open .player:not([hidden]) { display:block; padding:9px 10px 6px; border-top:1px solid var(--line); }
.reader-dock-active .reading-tools .player .p-info,
.reader-dock-active .reading-tools .player .p-play,
.reader-dock-active .reading-tools .player .p-options,
.reader-dock-active .reading-tools .player .reader-speed { display:none; }
.reader-dock-active .reading-tools .player .p-row { gap:6px; }
.reader-dock-active .reading-tools .player .p-tools { display:flex; flex:1; flex-wrap:wrap; justify-content:flex-end; padding:0; border:0; }
.reader-dock-active .reading-tools .player .p-time { min-width:64px; }
@media(max-width:600px) {
  .reader-dock-active .reader-idle .idle-start { width:36px; padding:0; }
  .reader-dock-active .p-info { gap:6px; }
}

/* The selected verse stays sharp above its tafsir, over a quiet blurred page. */
/* Live surah map stays inside its own listening view. */
.reader-dock-active .dock-primary { grid-template-columns:minmax(0,1fr) auto auto auto; }
.reader-dock-active .reader-map-cta { display:flex; align-items:center; justify-content:center; gap:7px; min-width:38px; height:36px; padding:0 10px; border:1px solid #dec99e; border-radius:11px; background:#fbf6e9; color:#77551e; cursor:pointer; }
.reader-map-cta svg { width:21px; height:21px; flex:none; }
.reader-map-cta span { white-space:nowrap; font-size:12px; }
.reader-map-cta:hover { background:#f4ead2; }
.reader-map-cta:focus-visible { outline:2px solid #85580d; outline-offset:2px; }
.rec-structure { background:#fcfaf5; }
.rec-structure:not(.has-translation) { grid-template-rows:auto minmax(0,1fr) auto auto; }
.rec-structure:not(.has-translation) .rec-stage { grid-row:2; }
.rec-structure:not(.has-translation) .rec-cta { grid-row:3; position:relative; left:auto; bottom:auto; transform:none; justify-self:center; margin:6px 0; animation:none; }
.rec-structure:not(.has-translation) .rec-ctl { grid-row:4; }
.rec-structure .rec-cta { background:#fff8e8; color:#40331b; border:1px solid #dfc48c; box-shadow:0 4px 16px #80602014; }
.rec-structure .rec-cta-t small { color:#806c45; }
.rec-structure .rec-bg { display:none; }
.rec-structure .rec-stage { --map-stack:0; display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:40px; padding:20px 32px; direction:ltr; align-items:center; }
.rec-structure .rv { position:relative; grid-column:2; grid-row:1; justify-self:center; left:auto; top:auto; transform:none; max-width:100%; }
.rec-structure .rv.enter { opacity:0; transform:translateY(10px); }
.rec-structure .rv.leave { opacity:0; transform:translateY(-10px); }
.surah-map-panel { grid-column:1; grid-row:1; display:flex; flex-direction:column; min-width:0; min-height:0; max-height:100%; width:100%; height:100%; align-items:center; justify-content:center; direction:rtl; }
html[lang="en"] .surah-map-panel { direction:ltr; }
.surah-map-heading { display:flex; align-items:center; justify-content:space-between; width:min(100%,520px); gap:12px; padding:0 16px; font-size:12px; color:#706953; }
.surah-map-heading > span { display:flex; align-items:center; gap:7px; color:#8b682c; }
.surah-map-heading svg { width:20px; height:20px; }
.surah-map-heading b { font-size:11px; font-weight:400; }
.surah-map-drawing { position:relative; display:flex; align-items:center; justify-content:center; min-height:0; width:100%; flex:1; }
.surah-map-svg { display:block; width:100%; height:100%; max-width:560px; max-height:560px; overflow:visible; }
.surah-map-guides circle { fill:none; stroke:#e8dfcd; stroke-width:1; }
.surah-map-links path { fill:none; stroke:#b49b67; stroke-width:1.2; opacity:.35; animation:surah-map-link-in .8s ease both; }
.surah-map-node { cursor:pointer; outline:none; }
.surah-map-node .map-hit { fill:transparent; }
.surah-map-node .map-bead { fill:#e9e4d8; stroke:#c5baa3; stroke-width:1; transition:fill .5s ease,stroke .5s ease; }
.surah-map-node.is-past .map-bead { fill:#c1d1bb; stroke:#8ca583; }
.surah-map-node.is-echo .map-bead { fill:#e8d2a2; stroke:#b48938; }
.surah-map-node.is-current .map-bead { fill:#b88325; stroke:#9a6a18; stroke-width:2; }
.surah-map-node:hover .map-bead,.surah-map-node:focus-visible .map-bead { stroke:#715315; stroke-width:4; }
.surah-map-node text { fill:#92836b; font-family:var(--ui); font-size:14px; pointer-events:none; }
.surah-map-halo { fill:#f3d594; fill-opacity:.22; stroke:none; pointer-events:none; }
.surah-map-clock { fill:none; stroke:#a27321; stroke-width:2; stroke-dasharray:0 1; stroke-linecap:round; pointer-events:none; }
.surah-map-center { position:absolute; inset:0; display:flex; flex-direction:column; justify-content:center; align-items:center; pointer-events:none; color:#8a774e; }
.surah-map-center::before { content:""; position:absolute; width:23%; aspect-ratio:1; border-radius:50%; background:radial-gradient(circle,#fcfaf5 50%,#fcfaf5e6 75%,#fcfaf500 100%); }
.surah-map-center > * { position:relative; }
.surah-map-center > span { font-size:11px; }
.surah-map-center strong { font-size:clamp(28px,3.4vw,48px); font-weight:400; line-height:1.5; color:#946c23; }
.surah-map-center small { font-size:10px; }
.surah-map-caption { margin:4px 0; text-align:center; font-size:12px; color:#806538; min-height:20px; }
.surah-map-help { margin:0; text-align:center; font-size:10px; color:#8a8474; }
@keyframes surah-map-link-in { from { opacity:0; } to { opacity:.35; } }
@media(max-width:700px) {
  .reader-map-cta span { display:block; max-width:62px; white-space:normal; font-size:11px; line-height:1.35; }
  .reader-dock-active .reader-map-cta { width:72px; padding:0 5px; }
  .reader-map-cta svg { display:none; }
  .reader-dock-active .reader-sync-cta { gap:4px; padding:0 7px; }
  .reader-dock-active .reader-sync-cta svg { width:17px; height:17px; }
  .rec-structure .rec-stage { --map-stack:1; grid-template-columns:minmax(0,1fr); grid-template-rows:minmax(0,1.1fr) minmax(0,1fr); gap:8px; padding:8px 14px; }
  .rec-structure .rv { grid-column:1; grid-row:2; }
  .surah-map-heading { padding:0 6px; font-size:11px; }
  .surah-map-caption { margin:2px 0; font-size:11px; }
  .surah-map-help { font-size:9px; }
}
@media(max-width:350px) {
  .reader-dock-active .reader-sync-cta svg { display:none; }
  .reader-sync-cta b { font-size:11px; }
  .reader-dock-active .reader-map-cta { width:60px; min-width:34px; padding:0 4px; }
}
@media(max-height:500px) and (min-width:560px) {
  .rec-structure .rec-stage { --map-stack:0; grid-template-columns:minmax(0,1fr) minmax(0,1fr); grid-template-rows:minmax(0,1fr); padding:4px 22px; gap:26px; }
  .rec-structure .rv { grid-column:2; grid-row:1; }
  .surah-map-heading,.surah-map-help { display:none; }
}
@media(prefers-reduced-motion:reduce) {
  .surah-map-links path,.surah-map-node .map-bead { animation:none; transition:none; }
}
/* A stable letter diagram, illuminated only by the recorded letter intervals. */
.reader-dock-active .dock-primary { grid-template-columns:minmax(0,1fr) auto auto auto auto; }
.reader-dock-active .reader-fingerprint-cta { display:flex; align-items:center; justify-content:center; gap:7px; height:36px; min-width:0; padding:0 10px; border:1px solid #d6bf91; border-radius:11px; background:#fff9ea; color:#80591c; cursor:pointer; }
.reader-fingerprint-cta svg { width:21px; height:21px; flex:none; }
.reader-fingerprint-cta span { font-size:12px; white-space:nowrap; }
.reader-fingerprint-cta:hover { background:#f5ead1; }
.reader-fingerprint-cta:focus-visible { outline:2px solid #85580d; outline-offset:2px; }
.rec-fingerprint { background:#fcfaf5; }
.rec-fingerprint:not(.has-translation) { grid-template-rows:auto minmax(0,1fr) auto auto; }
.rec-fingerprint:not(.has-translation) .rec-stage { grid-row:2; }
.rec-fingerprint:not(.has-translation) .rec-cta { grid-row:3; position:relative; left:auto; bottom:auto; transform:none; justify-self:center; margin:4px 0; animation:none; }
.rec-fingerprint:not(.has-translation) .rec-ctl { grid-row:4; }
.rec-fingerprint .rec-bg { display:none; }
.rec-fingerprint .rec-stage { display:block; padding:10px 20px; min-height:0; }
.rec-fingerprint .rv { left:50%; top:50%; transform:translate(-50%,-50%); max-width:none; }
.rec-fingerprint .rv .ink-box { line-height:1.85; }
.rec-fingerprint .rv.scroll { scrollbar-width:thin; scrollbar-color:#d8c7a5 transparent; overscroll-behavior:contain; }
.rec-fingerprint .rec-cta { background:#fff8e8; color:#40331b; border:1px solid #dfc48c; box-shadow:0 4px 16px #80602014; }
.rec-fingerprint .rec-cta-t small { color:#806c45; }
.fingerprint-panel { height:100%; min-height:0; display:flex; flex-direction:column; align-items:center; direction:rtl; }
html[lang="en"] .fingerprint-panel { direction:ltr; }
.fingerprint-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; width:min(100%,680px); padding:0 8px; color:#8b682c; font-size:13px; }
.fingerprint-heading > span { display:flex; align-items:center; gap:7px; white-space:nowrap; }
.fingerprint-heading svg { width:20px; height:20px; }
.fingerprint-heading small { font-size:11px; color:#8b816e; text-align:end; }
.fingerprint-drawing { flex:1; position:relative; width:100%; min-height:0; display:flex; justify-content:center; align-items:center; }
.fingerprint-svg { width:100%; height:100%; max-width:700px; display:block; overflow:visible; }
.fp-paper { stroke:#eee6d6; stroke-width:.6; }
.fp-guide { fill:none; stroke:#e4dbc8; stroke-width:.7; }
.fp-threads { pointer-events:none; }
.fp-threads path { fill:none; stroke-linecap:round; }
.fp-edge-guide { stroke:#c8b38c; stroke-width:.8; opacity:.12; }
.fp-edge-ink { stroke:#b48a42; stroke-width:1.25; opacity:0; transition:opacity .35s ease; }
.fp-threads .is-past .fp-edge-ink { opacity:var(--fp-weight,.24); }
.is-preview .fp-edge-guide { opacity:.25; }
.fp-edge-live { stroke:#bb8123; stroke-width:2.3; stroke-dasharray:1; stroke-dashoffset:1; opacity:0; }
.fp-threads .is-current .fp-edge-live { opacity:.85; }
.fp-letter-wash { fill:#efe4cd; opacity:0; transition:opacity .3s ease; }
.fp-letter text { fill:#b7ad99; font-family:var(--quran),serif; font-size:23px; transition:fill .3s ease; }
.fp-letter.is-used text { fill:#877a62; }
.fp-letter.is-past text { fill:#a67a33; }
.fp-letter.is-current text { fill:#704a0e; }
.fp-letter.is-current .fp-letter-wash { opacity:.85; }
.fp-letter-clock { fill:none; stroke:#b78025; stroke-width:1.5; stroke-dasharray:0 1; opacity:0; }
.fp-letter.is-current .fp-letter-clock { opacity:.85; }
.fingerprint-status { min-height:26px; display:flex; align-items:center; justify-content:center; gap:9px; color:#8e784f; font-size:11px; }
.fingerprint-status b { font-family:var(--quran),serif; font-weight:400; color:#92651c; font-size:25px; line-height:1; }
.fingerprint-caption { margin:2px 0 0; color:#8e8575; font-size:10px; text-align:center; }
@media(max-width:700px) {
  .reader-dock-active .reader-fingerprint-cta { width:68px; padding:0 4px; }
  .reader-fingerprint-cta svg { display:none; }
  .reader-fingerprint-cta span { white-space:normal; font-size:11px; line-height:1.35; }
  .reader-dock-active .reader-map-cta { width:60px; }
  .reader-sync-cta b { white-space:normal; font-size:12px; line-height:1.3; }
  .reader-dock-active .reader-sync-cta svg { display:none; }
  .rec-fingerprint .rec-stage { padding:6px 6px; }
  .fingerprint-heading { padding:0 10px; font-size:12px; }
  .fingerprint-heading small { max-width:140px; font-size:10px; }
  .fingerprint-caption { padding:0 5px; font-size:9px; }
}
@media(max-width:350px) {
  .reader-dock-active .reader-fingerprint-cta { width:66px; }
  .reader-dock-active .reader-map-cta { width:50px; }
  .reader-fingerprint-cta span,.reader-map-cta span { font-size:10px; }
  .reader-dock-active .reader-sync-cta { padding:0 3px; }
  .reader-sync-cta b { font-size:10.5px; }
  .reader-dock-active #site-nav { gap:0; }
  .reader-dock-active #site-nav a { padding:0 4px; }
}
@media(max-height:500px) and (min-width:560px) {
  .rec-fingerprint .rec-stage { padding:0 12px; }
  .rec-fingerprint .rec-top { padding:4px 22px; }
  .rec-fingerprint .rec-seal { display:none; }
  .rec-fingerprint .rec-title b { font-size:20px; line-height:1.25; }
  .rec-fingerprint .rec-title > span { font-size:10px; }
  .rec-fingerprint .rec-cta { display:none; }
  .fingerprint-heading,.fingerprint-caption { display:none; }
  .fingerprint-status { min-height:18px; }
}
@media(prefers-reduced-motion:reduce) {
  .fp-edge-ink,.fp-letter-wash,.fp-letter text { transition:none; }
}
/* Word echo keeps each word's route visible without changing playback. */
.fp-word-trail { pointer-events:none; }
.fp-word-trail path { fill:none; stroke-linecap:round; stroke-linejoin:round; }
.fp-word-guide { stroke:#c7b188; stroke-width:1.3; opacity:.3; }
.fp-word-ink { stroke:#b78026; stroke-width:2.8; stroke-dasharray:1; stroke-dashoffset:1; }
.fp-word-shared .fp-word-guide { stroke:#8aa087; opacity:.38; }
.fp-word-shared .fp-word-ink { stroke:#6e8b73; }
.fp-word-branch { fill:#8aa087; fill-opacity:.08; stroke:#7f9a80; stroke-width:1; stroke-opacity:.55; }
.fp-word-route { opacity:.9; animation:fp-word-in .18s ease both; }
.fp-word-route.is-leaving { animation:fp-word-out .55s ease both; }
.has-word .fp-threads .is-current .fp-edge-live { opacity:.22; }
.is-word-pinned .fp-threads { opacity:.28; transition:opacity .5s ease; }
.fingerprint-heading small { min-height:30px; max-width:55%; }
.fp-echo-word { display:block; font-family:var(--quran); font-weight:400; font-size:22px; line-height:1.3; color:#866021; }
.fp-echo-relation { display:block; font-family:var(--ui); font-size:10px; line-height:1.5; color:#7a8370; }
.rec-fingerprint .rv .w[data-w] { cursor:pointer; -webkit-tap-highlight-color:transparent; }
.rec-fingerprint .rv .fp-word-selected { background:#e7eddfb3; border-radius:4px; box-shadow:0 0 0 .045em #e7eddfb3; }
.rec-fingerprint .rv .ghost .fp-word-selected { color:#526649; }
.rec-fingerprint .rv .w[data-w]:focus-visible { outline:1px solid #8a9d79; outline-offset:2px; border-radius:3px; }
@keyframes fp-word-in { from { opacity:0; } to { opacity:.9; } }
@keyframes fp-word-out { from { opacity:.9; } to { opacity:0; } }
@media(max-width:700px) {
  .fp-echo-word { font-size:20px; }
  .fp-echo-relation { font-size:9px; }
}
@media(prefers-reduced-motion:reduce) {
  .fp-word-route,.fp-word-route.is-leaving { animation:none; }
  .is-word-pinned .fp-threads { transition:none; }
}
/* End word echo. */
/* End live letter fingerprint. */
/* Source letters travel into native shaped words on the existing audio clock. */
.reader-dock-active .dock-primary { grid-template-columns:minmax(0,1fr) auto auto auto auto auto; }
.reader-dock-active .reader-formation-cta { display:flex; align-items:center; justify-content:center; gap:7px; height:36px; min-width:0; padding:0 9px; border:1px solid #d6c8a8; border-radius:11px; background:#f8f4e9; color:#76602f; cursor:pointer; }
.reader-formation-cta svg { width:21px; height:21px; flex:none; }
.reader-formation-cta span { font-size:12px; white-space:nowrap; }
.reader-formation-cta:hover { background:#f0e8d6; }
.reader-formation-cta:focus-visible { outline:2px solid #85580d; outline-offset:2px; }
.rec-formation { background:#fcfaf5; grid-template-columns:minmax(0,1fr); }
.rec-formation:not(.has-translation) { grid-template-rows:auto minmax(0,1fr) auto auto; }
.rec-formation:not(.has-translation) .rec-stage { grid-row:2; }
.rec-formation:not(.has-translation) .rec-cta { grid-row:3; position:relative; left:auto; bottom:auto; transform:none; justify-self:center; margin:4px 0; animation:none; }
.rec-formation:not(.has-translation) .rec-ctl { grid-row:4; }
.rec-formation .rec-bg { display:none; }
.rec-formation .rec-stage { min-width:0; padding:6px 24px 10px; }
.rec-formation .rv { width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; pointer-events:none; }
.rec-formation .rec-cta { background:#fff8e8; color:#40331b; border:1px solid #dfc48c; box-shadow:0 4px 16px #80602014; }
.rec-formation .rec-cta-t small { color:#806c45; }
.formation-panel { position:relative; width:min(100%,1000px); height:100%; min-height:0; margin:auto; display:flex; flex-direction:column; isolation:isolate; }
.formation-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; color:#80632f; font-size:13px; }
.formation-heading > span { display:flex; align-items:center; gap:7px; white-space:nowrap; }
.formation-heading svg { width:20px; height:20px; }
.formation-heading small { color:#847d6c; font-size:11px; text-align:end; }
.formation-bank-wrap { flex:0 1 auto; min-height:40px; max-height:34%; padding:8px 10px; border:1px solid #e8dfcc; border-radius:18px; background:linear-gradient(145deg,#fffdf8,#f7f2e5); }
.formation-bank { display:flex; flex-wrap:wrap; align-content:flex-start; justify-content:center; gap:0 5px; max-height:min(140px,24vh); overflow:auto; overscroll-behavior:contain; scrollbar-width:thin; scrollbar-color:#d4c3a1 transparent; font-family:var(--quran),serif; font-size:26px; line-height:1.8; }
.formation-slot { flex:none; min-width:25px; height:1.8em; text-align:center; color:#8c7d62; }
.formation-slot.is-departed { visibility:hidden; }
.formation-divider { flex:none; display:flex; justify-content:center; align-items:center; gap:10px; height:34px; color:#c7b790; }
.formation-divider span { width:36px; height:1px; background:#e3dac7; }
.formation-divider svg { width:17px; height:21px; }
.formation-sheet { flex:1; min-width:0; min-height:65px; overflow:auto; overscroll-behavior:contain; padding:10px 14px; scrollbar-width:thin; scrollbar-color:#d4c3a1 transparent; display:grid; grid-template-columns:minmax(0,1fr); align-items:safe center; }
.formation-verse { min-width:0; font-family:var(--quran),serif; font-size:40px; font-weight:400; line-height:1.95; text-align:center; word-spacing:.16em; white-space:normal; }
.formation-word { position:relative; display:inline-block; vertical-align:baseline; white-space:nowrap; word-spacing:normal; }
.formation-native { display:inline-block; color:transparent; }
.formation-slices { position:absolute; inset:0; pointer-events:none; }
.formation-piece { position:absolute; inset:0; display:block; white-space:nowrap; color:#433b2a; opacity:0; }
.formation-word.is-formed .formation-native { color:#302b21; }
.formation-word.is-formed .formation-slices { visibility:hidden; }
.formation-end { color:transparent; }
.formation-end.is-formed { color:#ac823c; }
.formation-flights { position:absolute; inset:0; z-index:2; overflow:hidden; pointer-events:none; font-family:var(--quran),serif; line-height:1.95; }
.formation-flight { position:absolute; left:0; top:0; display:block; width:max-content; white-space:nowrap; color:#8c7d62; opacity:0; transform-origin:center; }
.formation-flight.is-moving { color:#b17b22; }
.formation-status { flex:none; height:40px; margin-top:5px; display:flex; align-items:center; justify-content:center; gap:9px; color:#88754f; font-size:11px; white-space:nowrap; }
.formation-status b { max-width:60%; overflow:hidden; text-overflow:ellipsis; font-family:var(--quran),serif; font-weight:400; font-size:24px; line-height:1.4; color:#90691f; }
@media(max-width:700px) {
  .reader-dock-active .reader-formation-cta { width:58px; padding:0 3px; }
  .reader-formation-cta svg { display:none; }
  .reader-formation-cta span { white-space:normal; font-size:10px; line-height:1.35; }
  .reader-dock-active .reader-fingerprint-cta { width:58px; }
  .reader-dock-active .reader-map-cta { width:52px; }
  .reader-fingerprint-cta span,.reader-map-cta span { font-size:10px; }
  .reader-sync-cta b { font-size:10.5px; }
  .rec-formation .rec-stage { padding:5px 12px; }
  .formation-heading { font-size:12px; margin-bottom:8px; gap:8px; }
  .formation-heading small { max-width:48%; font-size:10px; }
  .formation-bank { font-size:24px; gap:0 4px; max-height:min(130px,22vh); }
  .formation-bank-wrap { padding:7px; border-radius:14px; }
  .formation-sheet { padding:2px 4px; }
  .formation-divider { height:28px; }
}
@media(max-width:350px) {
  .reader-dock-active .reader-fingerprint-cta { width:49px; }
  .reader-dock-active .reader-formation-cta { width:46px; }
  .reader-dock-active .reader-map-cta { width:44px; }
  .reader-dock-active .dock-primary { grid-template-columns:minmax(48px,1fr) auto auto auto auto auto; }
  .reader-dock-active #site-nav a:first-child { display:none; }
  .reader-dock-active .reading-tools .selbar :is(.reader-sync-cta,.reader-fingerprint-cta,.reader-formation-cta,.reader-map-cta) { padding-inline:2px; }
  .reader-sync-cta b { font-size:10px; }
}
@media(max-height:500px) and (min-width:560px) {
  .rec-formation .rec-top { padding:3px 22px; }
  .rec-formation .rec-seal,.rec-formation .rec-cta,.formation-heading { display:none; }
  .rec-formation .rec-title b { font-size:20px; line-height:1.25; }
  .rec-formation .rec-stage { padding:2px 16px; }
  .formation-bank { max-height:48px; font-size:22px; }
  .formation-bank-wrap { padding:2px 10px; }
  .formation-divider { height:12px; }
  .formation-divider svg { height:12px; }
  .formation-sheet { min-height:35px; padding:0 8px; }
  .formation-status { height:28px; margin:0; }
  .formation-status b { font-size:20px; }
}
/* End live verse formation. */
/* Word meanings shape a light, source-clocked scene above the native verse. */
.reader-dock-active .reading-tools .dock-primary { grid-template-columns:minmax(0,1fr) auto auto; }
.reader-views { display:flex; align-items:center; min-width:0; gap:4px; overflow-x:auto; overflow-y:hidden; padding:0 0 3px; scrollbar-width:thin; scrollbar-color:#dbcaa7 transparent; scroll-padding-inline:3px; overscroll-behavior-x:contain; touch-action:pan-x; }
.reader-dock-active .reading-tools .reader-views > button { flex:none; width:auto; min-width:62px; height:36px; padding:0 8px; }
.reader-dock-active .reading-tools .reader-views .reader-sync-cta { min-width:100px; }
.reader-dock-active .reading-tools #site-nav span { display:none; }
.reader-dock-active .reading-tools #site-nav a { width:28px; padding:0; }
.reader-dock-active .reader-meaning-cta { display:flex; align-items:center; justify-content:center; gap:7px; border:1px solid #c8d3c1; border-radius:11px; background:#f2f5ed; color:#596f4b; cursor:pointer; }
.reader-meaning-cta svg { width:20px; height:20px; flex:none; }
.reader-meaning-cta span { font-size:12px; white-space:nowrap; }
.reader-meaning-cta:hover { background:#e9efdf; }
.reader-meaning-cta:focus-visible { outline:2px solid #71865e; outline-offset:2px; }
.rec-meaning { background:#fcfaf5; grid-template-columns:minmax(0,1fr); }
.rec-meaning:not(.has-translation) { grid-template-rows:auto minmax(0,1fr) auto auto; }
.rec-meaning:not(.has-translation) .rec-stage { grid-row:2; }
.rec-meaning:not(.has-translation) .rec-cta { grid-row:3; position:relative; left:auto; bottom:auto; transform:none; justify-self:center; margin:4px 0; animation:none; }
.rec-meaning:not(.has-translation) .rec-ctl { grid-row:4; }
.rec-meaning .rec-bg { display:none; }
.rec-meaning .rec-stage { min-width:0; display:flex; flex-direction:column; align-items:center; gap:5px; padding:5px 22px 10px; }
.rec-meaning .rv { position:relative; flex:none; max-width:100%; left:auto; top:auto; transform:none; }
.rec-meaning .rv.enter,.rec-meaning .rv.leave { transform:none; }
.rec-meaning .rv .ink-box { line-height:1.85; }
.rec-meaning .rv .ink-l.ghost,.rec-meaning .rv .ink-l.gold,.rec-meaning .rv .pen { visibility:hidden; }
.rec-meaning .rv .ink-l.ink { clip-path:none; mask:none; -webkit-mask:none; color:#453f32; }
.rec-meaning .rv .meaning-current { color:#966c29; background:#efe5cf99; border-radius:5px; box-shadow:0 0 0 .045em #efe5cf99; }
.rec-meaning .rv.scroll { scrollbar-width:thin; scrollbar-color:#d8c7a5 transparent; overscroll-behavior:contain; }
.rec-meaning .rec-cta { background:#fff8e8; color:#40331b; border:1px solid #dfc48c; box-shadow:0 4px 16px #80602014; }
.rec-meaning .rec-cta-t small { color:#806c45; }
.meaning-panel { position:relative; display:flex; flex-direction:column; width:min(100%,1000px); min-height:80px; flex:1; }
.meaning-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; color:#7b724f; font-size:13px; }
.meaning-heading > span { display:flex; align-items:center; gap:7px; white-space:nowrap; }
.meaning-heading svg { width:20px; height:20px; }
.meaning-source { display:flex; align-items:center; gap:5px; min-height:34px; padding:4px 7px; color:#8f8774; font-size:11px; border:1px solid #e9e1d0; border-radius:20px; background:#fffdf680; }
.meaning-source svg { width:14px; height:14px; }
.meaning-source:hover { background:#f3eddf; }
.meaning-source:focus-visible { outline:2px solid #9a8352; outline-offset:2px; }
.meaning-drawing { flex:1; min-height:0; display:flex; align-items:center; justify-content:center; }
.meaning-svg { display:block; width:100%; height:100%; max-height:610px; overflow:visible; }
.meaning-word { font-family:var(--quran),serif; font-weight:400; fill:#453a28; }
.meaning-word-clock { stroke:#c7b083; stroke-width:1.5; fill:none; stroke-dasharray:0 1; stroke-linecap:round; }
.meaning-caption { flex:none; display:flex; align-items:center; justify-content:center; gap:9px; height:32px; margin:0 0 5px; color:#8e8268; font-size:11px; }
.meaning-caption b { font-family:var(--ui); font-size:12px; font-weight:500; }
.meaning-error { position:absolute; inset:50% 0 auto; display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:12px; color:#85785c; font-size:12px; }
.meaning-error[hidden] { display:none; }
.meaning-about { color:#4d4c40; font-size:14px; line-height:1.9; }
.meaning-about a { color:#8b6528; text-decoration:underline; text-underline-offset:3px; }
@media(max-width:700px) {
  .reader-dock-active .reading-tools .reader-views > button { min-width:62px; width:62px; padding:0 4px; }
  .reader-dock-active .reading-tools .reader-views .reader-sync-cta { width:76px; min-width:76px; }
  .reader-meaning-cta svg { display:none; }
  .reader-meaning-cta span { white-space:normal; font-size:11px; line-height:1.35; }
  .reader-dock-active .reading-tools .reader-views .reader-sync-cta b { font-size:11px; }
  .rec-meaning .rec-stage { padding:4px 12px 7px; }
  .meaning-heading { font-size:12px; }
  .meaning-source { font-size:10px; min-height:30px; }
  .meaning-caption { height:28px; font-size:10px; }
}
@media(max-height:500px) and (min-width:560px) {
  .rec-meaning .rec-top { padding:3px 22px; }
  .rec-meaning .rec-seal,.rec-meaning .rec-cta { display:none; }
  .rec-meaning .rec-title b { font-size:20px; line-height:1.25; }
  .rec-meaning .rec-stage { padding:0 18px 3px; gap:0; }
  .meaning-heading { min-height:20px; font-size:10px; }
  .meaning-heading svg { width:16px; height:16px; }
  .meaning-source { min-height:20px; padding:0 6px; font-size:9px; }
  .meaning-caption { height:18px; margin:0; font-size:9px; }
  .meaning-caption b { font-size:10px; }
}
/* End live meaning scene. */
.tafsir-hint { position:fixed; inset:0; z-index:55; pointer-events:none; color:#77551e; opacity:1; animation:tafsir-hint-in .5s ease both; }
.tafsir-hint.is-leaving { animation:tafsir-hint-out .7s ease both; }
.tafsir-hint-finger { position:absolute; width:36px; height:40px; animation:tafsir-hint-press 2s ease-in-out 3; transform-origin:50% 0; }
.tafsir-hint-finger svg { display:block; width:36px; height:40px; fill:#fff9ed; stroke:#a76d13; stroke-width:1.6; filter:drop-shadow(0 2px 3px #40351e1a); }
.tafsir-hint-finger::before { content:""; position:absolute; top:-3px; left:9px; width:14px; height:14px; border:1px solid #bf974e; border-radius:50%; animation:tafsir-hint-ring 2s ease-in-out 3; }
.tafsir-hint-card { position:absolute; display:flex; align-items:center; gap:9px; width:max-content; max-width:calc(100vw - 24px); padding:10px 12px; border:1px solid #dec99e; border-radius:14px; background:#fff9ed; box-shadow:0 4px 18px #40351e14; font-size:13px; line-height:1.8; text-align:start; }
.tafsir-hint-card::before { content:""; position:absolute; left:calc(var(--tip-x) - 5px); top:-6px; width:10px; height:10px; background:#fff9ed; border-top:1px solid #dec99e; border-left:1px solid #dec99e; transform:rotate(45deg); }
.tafsir-hint-card.is-above::before { top:auto; bottom:-6px; transform:rotate(225deg); }
.tafsir-hint-card span { max-width:255px; }
.tafsir-hint-card button { display:grid; place-items:center; flex:none; width:28px; height:28px; padding:5px; border-radius:50%; color:inherit; background:transparent; pointer-events:auto; }
.tafsir-hint-card button svg { width:16px; height:16px; }
.tafsir-hint-card button:hover { background:#f3e6ca; }
.tafsir-hint-card button:focus-visible { outline:2px solid #85580d; outline-offset:2px; }
@keyframes tafsir-hint-in { from { opacity:0; transform:translateY(5px); } to { opacity:1; transform:translateY(0); } }
@keyframes tafsir-hint-out { from { opacity:1; transform:translateY(0); } to { opacity:0; transform:translateY(5px); } }
@keyframes tafsir-hint-press { 0%,80%,100% { transform:translateY(4px); } 25%,60% { transform:translateY(0); } }
@keyframes tafsir-hint-ring { 0%,75%,100% { opacity:0; transform:scale(.65); } 25%,55% { opacity:.7; transform:scale(1.15); } }
@media(prefers-reduced-motion:reduce) {
  .tafsir-hint,.tafsir-hint-finger,.tafsir-hint-finger::before { animation:none; transition:none; }
}
.reader .ayah { -webkit-touch-callout:none; -webkit-user-select:none; user-select:none; }
.tafsir-focus {
  position:fixed; inset:0; width:100%; max-width:none; height:100%; max-height:none;
  margin:0; border:0; padding: max(16px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  background:transparent; color:var(--ink); overflow:hidden;
}
.tafsir-focus[open] { display:grid; place-items:center; }
.tafsir-focus::backdrop {
  background:rgba(251,249,244,.48); -webkit-backdrop-filter:blur(3px); backdrop-filter:blur(3px);
  animation:tafsir-backdrop-in .4s var(--ease) both;
}
.tafsir-focus-content {
  width:min(100%, 720px); max-height:100%; min-height:0; display:flex; flex-direction:column;
  border:1px solid var(--line-2); border-radius:24px; background:var(--card);
  box-shadow:0 22px 70px -24px rgba(69,49,16,.25), 0 2px 12px rgba(69,49,16,.05);
  overflow:hidden; animation:tafsir-focus-in .4s var(--ease) both;
}
.tafsir-focus-header { position:relative; display:flex; align-items:center; min-height:80px; padding:17px 24px 14px 76px; gap:16px; border-bottom:1px solid var(--line); }
.tafsir-focus-header > div { min-width:0; flex:1; }
.tafsir-focus-kicker { display:block; margin-bottom:5px; color:var(--gold); font-size:11px; }
.tafsir-focus-header h2 { margin:0; font-size:15px; line-height:1.6; font-weight:500; }
.tafsir-focus-close { position:absolute; left:18px; top:50%; transform:translateY(-50%); display:grid; place-items:center; width:42px; height:42px; border:1px solid var(--line); border-radius:50%; color:var(--ink-2); background:var(--card); transition:background .2s, color .2s; }
.tafsir-focus-close:hover { background:var(--paper-2); color:var(--gold); }
.tafsir-focus-close svg { width:19px; height:19px; }
.tafsir-focus-scroll { min-height:0; overflow-y:auto; overscroll-behavior:contain; -webkit-overflow-scrolling:touch; padding:23px; }
.tafsir-focus-verse { padding:3px 7px 24px; font-size:var(--qsize); line-height:2.2; text-align:center; word-spacing:.1em; overflow-wrap:break-word; }
.tafsir-focus-verse .ayah { color:var(--ink); background:none; }
.tafsir-focus-verse .end { color:var(--gold); white-space:nowrap; }
.tafsir-focus-explanation { padding:20px 22px 16px; border:1px solid var(--line); border-radius:17px; background:var(--paper); }
.tafsir-focus-explanation h3 { margin:0 0 13px; color:var(--gold); font-size:12px; line-height:1.8; font-weight:500; }
.tafsir-focus-text { min-height:60px; font-size:16px; line-height:2.15; text-align:start; white-space:pre-line; overflow-wrap:anywhere; }
.tafsir-focus-text p { margin:0; }
.tafsir-focus-text .tafsir-focus-notes { margin-top:14px; padding-top:12px; border-top:1px solid var(--line); color:var(--ink-2); font-size:14px; }
.tafsir-focus-retry { display:block; margin-top:12px; padding:7px 14px; border:1px solid var(--line-2); border-radius:9px; color:var(--gold); background:var(--card); }
.tafsir-focus-credit { margin-top:18px; padding-top:12px; border-top:1px solid var(--line); font-size:10px; line-height:1.9; color:var(--ink-2); }
.tafsir-focus-credit a { text-decoration:underline; text-underline-offset:3px; }
.tafsir-focus.is-closing .tafsir-focus-content { animation:tafsir-focus-out .3s ease both; }
.tafsir-focus.is-closing::backdrop { animation:tafsir-backdrop-out .3s ease both; }
@keyframes tafsir-focus-in { from { opacity:0; transform:translateY(12px) scale(.985); } to { opacity:1; transform:translateY(0) scale(1); } }
@keyframes tafsir-focus-out { from { opacity:1; transform:translateY(0); } to { opacity:0; transform:translateY(8px); } }
@keyframes tafsir-backdrop-in { from { opacity:0; } to { opacity:1; } }
@keyframes tafsir-backdrop-out { from { opacity:1; } to { opacity:0; } }
@media(max-width:480px) {
  .tafsir-focus-content { border-radius:21px; }
  .tafsir-focus-header { padding-right:18px; min-height:74px; }
  .tafsir-focus-scroll { padding:18px 14px; }
  .tafsir-focus-explanation { padding:16px 16px 13px; }
  .tafsir-focus-text { font-size:15px; }
}
@media(prefers-reduced-motion:reduce) {
  .tafsir-focus .tafsir-focus-content, .tafsir-focus::backdrop, .tafsir-focus.is-closing .tafsir-focus-content, .tafsir-focus.is-closing::backdrop { animation:none; }
}

/* English interface and the sourced translation of meanings. */
.language-switch { flex:none; min-height:40px; padding:6px 12px; border:1px solid #d9cfbc; border-radius:20px; background:#fffdf7; color:#393a30; font:inherit; font-size:13px; cursor:pointer; }
.language-switch:hover { background:#f1ebdc; }
.language-switch:focus-visible { outline:2px solid #826226; outline-offset:3px; }
.home-top { flex-wrap:wrap; }
.translation { margin:12px 0 0; color:#34372e; font-family:var(--ui); font-size:18px; line-height:1.75; text-align:left; overflow-wrap:anywhere; }
.translation-ref { font-size:12px; color:#655b42; margin-inline-end:5px; white-space:nowrap; }
.translation-credit { margin:10px auto; color:#655b42; font-size:12px; line-height:1.6; text-align:center; }
.translation-credit a { text-decoration:underline; text-underline-offset:3px; }
.bilingual .vrow { padding-block:22px; }
.bilingual .vrow .qtext { text-align:right; }
.rec.has-translation { grid-template-rows:auto minmax(0,1fr) auto auto auto; }
.rec.has-translation .rec-top { grid-row:1; }
.rec.has-translation .rec-title b { font-family:var(--ui); font-size:17px; line-height:1.7; }
.rec.has-translation .rec-stage { grid-row:2; }
.rec.has-translation .rec-translation { grid-row:3; }
.rec.has-translation .rec-cta { grid-row:4; position:relative; left:auto; bottom:auto; transform:none; justify-self:center; margin:8px 0; animation:none; }
.rec.has-translation .rec-ctl { grid-row:5; }
.rec-tv.has-translation.tv-running { display:grid; grid-template-rows:minmax(0,1fr) auto; }
.rec-tv.has-translation.tv-running .rec-stage { position:relative; inset:auto; grid-row:1; padding:5vh 5vw; }
.rec-tv.has-translation.tv-running > .rec-translation { display:block !important; grid-row:2; margin-bottom:5vh; }
.rec-cinema.has-translation { grid-template-rows:42vh minmax(0,1fr) auto auto auto; }
.rec-cinema.has-translation .rec-top { align-self:start; }
.rec-cinema.has-translation .rec-stage { position:relative; inset:auto; padding:10px 5vw; }
.rec-cinema.has-translation .cinema-scene { top:0; bottom:auto; height:42vh; }
.rec-cinema.has-translation .rec-ctl { position:relative; bottom:auto; left:auto; transform:none; margin-bottom:10px; }
.rec-translation { position:relative; z-index:2; width:min(900px,calc(100% - 32px)); max-height:28vh; justify-self:center; overflow:auto; overscroll-behavior:contain; padding:0 10px 8px; scrollbar-width:thin; background:#fffdf6eb; border-radius:12px; }
.rec-translation .translation { margin:8px 0; text-align:center; font-size:clamp(16px,1.7vw,21px); }
.rec-translation .translation-credit { margin:4px 0; }
.rec.has-translation .rec-cta { background:#fffaf0; color:#34372e; border:1px solid #d9cfbc; }
.rec.has-translation .rec-cta-t small { color:#655b42; }
.home-demo-translation { width:100%; max-height:120px; overflow:auto; padding:0 10px; }
.home-demo-translation .translation { margin:4px 0 0; font-size:16px; text-align:center; }
.studio-translation { padding:0 14px 18px; }
.studio-translation .translation { text-align:left; }
.loom-translation .translation { font-size:16px; }
html[lang="en"]:not(.tweet-embed) body.home-active { height:auto; min-height:100svh; overflow-y:auto; }
html[lang="en"]:not(.tweet-embed) body.home-active .home-simple { max-height:none; overflow:visible; }
@media(max-width:480px) {
  body.home-active { --top-h:60px; }
  body.home-active:has(.home-top.install-ready),body.home-active:has(.home-signup:not([hidden])) { --top-h:100px; }
  body.home-active .top { height:var(--top-h); }
  .home-top { display:grid; grid-template-columns:minmax(0,1fr) auto; grid-template-rows:40px auto; padding:8px 12px; }
  .home-top .spacer { display:none; }
  .home-top .brand { grid-column:1; grid-row:1; }
  .home-top .brand > span { display:none; }
  .home-top .language-switch { grid-column:2; grid-row:1; justify-self:end; }
  .home-top .home-signup { grid-column:2; grid-row:2; justify-self:end; }
  .home-top .home-identity { grid-column:2; grid-row:1; }
  .tweet-embed .home-top { display:flex; }
  .tweet-embed .home-top .spacer { display:block; }
  .tweet-embed .home-top .brand > span { display:none; }
  .tweet-embed body.home-active > .top { height:var(--top-h); }
  .home-top { gap:8px; }
  .home-top .language-switch { padding-inline:10px; }
  .translation { font-size:17px; }
  .rec-top-actions .language-switch { min-height:36px; padding:4px 8px; font-size:12px; }
  .rec-translation { width:calc(100% - 20px); max-height:26vh; }
}
@media(max-width:650px) and (max-height:520px) {
  .tweet-embed .home-top .language-switch { min-height:26px; padding:2px 9px; font-size:11px; }
  .tweet-embed body.home-active .home-demo-translation { flex:none; max-height:54px; padding:0 6px; margin:3px 0 0; }
  .tweet-embed body.home-active .home-demo-translation .translation { margin:0; font-size:13px; line-height:1.5; }
  .tweet-embed body.home-active .home-demo .translation-credit { flex:none; margin:2px 0 4px; font-size:10px; line-height:1.4; }
  .tweet-embed .rec.has-translation .rec-cta { display:none; }
}
