@font-face {font-family:Noto;src:url(assets/NotoSansArabic-Regular.woff) format("woff");font-display:swap}
@font-face {font-family:Amiri;src:url(assets/Amiri-Bold.woff) format("woff");font-weight:700;font-display:swap}
@font-face {font-family:Quran;src:url(assets/AmiriQuran.woff) format("woff");font-display:swap}

:root {
  --paper: #faf9f5; --card: #fffefb; --ink: #183f34; --muted: #53675d;
  --line: #dbe1d6; --soft: #e8efe6; --edge: #957a45; --accent: #155541;
  --active-ink: #fffdf5; --warm: #f5efe2; --warm-ink: #795c28; --outside: #e8ece5;
  --app-width: 560px; --gutter: clamp(12px,4.1vw,24px);
  --block-gap:clamp(15px,4.1vw,23px); --row-gap:clamp(7px,2vw,11px);
  --card-pad:clamp(12px,3.5vw,19px); --panel-radius:16px; --verse-size: 2.12rem;
  --top: env(safe-area-inset-top,0px); --safe-bottom: env(safe-area-inset-bottom,0px);
  --app-bar: calc(68px + var(--safe-bottom)); --header: calc(58px + var(--top));
  color-scheme: light;
}
:root[data-theme="dark"] {
  --paper: #14251f; --card: #1a3028; --ink: #eaf0df; --muted: #b4c5b8; --line: #364d41;
  --soft: #273f32; --edge: #c1a46b; --accent: #bfddc0; --active-ink: #163829;
  --warm: #363226; --warm-ink: #e0c48f; --outside: #0d1915; color-scheme: dark;
}
* {box-sizing: border-box}
html {scroll-padding-top: calc(var(--header) + 8px)}
body {
  margin: 0; color: var(--ink); background: var(--outside);
  font: 1rem/1.7 Noto,Tahoma,sans-serif;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1;
  background: url(assets/pattern.svg) center / 115px; opacity: .16; pointer-events: none;
}
.app-frame {
  max-width: var(--app-width); min-height: 100vh; min-height: 100dvh; margin-inline: auto;
  background: var(--paper); box-shadow: 0 0 0 1px var(--line), 0 0 80px #1d392214;
  padding-bottom: calc(var(--app-bar) + 10px);
}
.shell {margin-inline: var(--gutter)}
button, input, select {font: inherit; color: inherit}
button {background: none; border: 0; cursor: pointer}
button, a, select {touch-action: manipulation; -webkit-tap-highlight-color: transparent}
a {text-decoration: none; color: inherit}
:focus-visible {outline: 3px solid var(--edge); outline-offset: 3px}
main:focus:not(:focus-visible) {outline: 0}
main:focus-visible {outline: 0}
[hidden] {display: none !important}
.defs {width: 0; height: 0; position: absolute; overflow: hidden}
.ic {width: 22px; height: 22px; display: inline-block; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0}
.skip {position: absolute; top: -100px; z-index: 20; background: var(--card)}
.skip:focus {top: 0}
.site-head {
  position: sticky; top: 0; z-index: 4; padding-top: var(--top); background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.head-inner {height: 64px; display: flex; gap: 12px; align-items: center}
.brand {display: flex; gap: 9px; align-items: center}
.brand svg {width: 39px; height: 39px; color: var(--edge)}
.brand span {font: 700 2.15rem/1.2 Amiri,serif}
.screen-name {font: 700 1.5rem/1.5 Amiri,serif}
.theme-button, .nav-back, .dismiss, .font-controls button {
  background: var(--card); border: 1px solid var(--line); border-radius: 50%;
  display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 auto;
}
.theme-button {margin-inline-start: auto}
.theme-button .ic, .nav-back .ic {width: 20px; height: 20px}
h1,h2,h3,p {margin: 0}
h1,h2 {font-family: Amiri,serif; font-weight: 700}
h2 {font-size: 1.82rem; line-height: 1.5}
.hero {
  position:relative; isolation:isolate; display:grid; align-items:center; overflow:hidden;
  margin-top:var(--block-gap); min-height:clamp(182px,48vw,232px); border-radius:var(--panel-radius);
  background:#103e34; color:#fff8e7; --cover-flow:90deg;
}
html[dir=ltr] .hero {--cover-flow:270deg}
.cover-photo {position:absolute;z-index:-3;inset-block:0;inset-inline-end:0;width:61%;height:100%;object-fit:cover;object-position:51% 56%}
.hero::before {content:"";position:absolute;z-index:-2;inset:0;background:linear-gradient(var(--cover-flow),transparent 10%,#103e3440 28%,#103e34 60%)}
.hero::after {content:"";position:absolute;inset:6px;border:1px solid #f7e9c03b;border-radius:calc(var(--panel-radius) - 5px);pointer-events:none}
.hero-pattern {position:absolute;z-index:-1;inset:0;background:url(assets/pattern.svg) center / 74px;opacity:.11;mask-image:linear-gradient(var(--cover-flow),transparent 40%,black 90%);pointer-events:none}
.hero-content {padding:clamp(17px,5vw,29px);max-width:69%;position:relative}
.hero h1 {font-size:clamp(2.4rem,9.4vw,3.5rem);line-height:1.3;letter-spacing:normal}
.hero p {font-size:.92rem;line-height:1.65;color:#e4ebda;margin:.27rem 0 .95rem}
.hero-buttons {display:flex}
.hero .primary {border-radius:30px;padding-inline:16px}
.folio-home-hint {display:block;margin-top:7px;color:var(--muted);font-size:.84rem;line-height:1.6}
.flourish {display:flex;align-items:center;gap:6px;color:#d9bd7f;font:.89rem/1 Georgia,serif}
.flourish i {height:1px;width:23px;background:currentColor}
.flourish i:last-child {width:11px}
.primary,.action,.outlined {display:inline-flex; align-items:center; justify-content:center; gap:7px; border-radius:11px; min-height:44px; padding:6px 17px; font-size:.92rem}
.primary {background:#efdfb7; color:#123c2e; font-weight:bold}
.primary .ic {width:17px}
.action {color:var(--active-ink); background:var(--accent)}
.outlined {background:var(--card); border:1px solid var(--line)}
#home-links {margin-top:var(--row-gap)}
.home-section-title,.section-title {display:flex;align-items:center;justify-content:space-between;gap:8px}
.home-section-title {min-height:44px;margin:var(--block-gap) 0 5px}
.home-section-title h2,.card-heading h2 {font:700 clamp(1.45rem,5.6vw,1.88rem)/1.4 Amiri,serif}
.home-section-title a,.home-text-action {display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:44px;padding:2px 0;color:var(--accent);font-size:.88rem}
.home-text-action .ic {width:16px;height:16px}
.home-prayers {display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px;padding:12px var(--card-pad);border-radius:var(--panel-radius);background:var(--soft);border:1px solid var(--line)}
.home-mark,.library-mark {display:grid;place-items:center;width:36px;height:36px;flex:none;color:var(--accent)}
.home-mark {border-radius:50%;background:var(--card)}
.prayer-copy strong,.prayer-copy small,.library-links strong,.library-links small {display:block}
.prayer-copy strong {font:700 1.27rem/1.45 Amiri,serif}
.prayer-copy small,.library-links small {color:var(--muted);font-size:.84rem;line-height:1.6}
.next-time {font-size:clamp(.97rem,4.45vw,1.35rem);font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap;color:var(--ink)}
.library-links {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--row-gap)}
.library-links a {display:grid;grid-template-rows:auto 1fr auto;justify-items:center;text-align:center;align-items:start;gap:4px;padding:10px clamp(5px,1.8vw,10px);border:1px solid var(--line);border-radius:var(--panel-radius);background:var(--card)}
.library-mark {width:34px;height:34px;border-radius:10px;background:var(--soft);color:var(--accent)}
.library-links a:nth-child(2) .library-mark {background:var(--warm);color:var(--warm-ink)}
.library-mark .ic {width:21px;height:21px}
.library-links strong {font:700 clamp(1.02rem,4.65vw,1.4rem)/1.45 Amiri,serif;overflow-wrap:anywhere}
.cards:not(.ayah-results) {display:grid; background:var(--card); border:1px solid var(--line); border-radius:16px; overflow:hidden}
.cards:empty {display:none}
.surah-card {display:flex; align-items:center; gap:13px; min-height:69px; padding:8px 15px}
.surah-card + .surah-card {border-top:1px solid var(--line)}
a:active, button:active {filter:brightness(.94)}
.surah-card:hover,.ayah-result:hover {background:var(--soft)}
.surah-card:focus-visible {outline-offset:-3px}
.medal {position:relative; isolation:isolate; width:40px; height:40px; flex-shrink:0; display:grid; place-items:center; font:700 1.1rem/1 Amiri,serif}
.medal svg {position:absolute; inset:0; z-index:-1; width:100%; height:100%}
.medal path:first-child {fill:var(--soft); stroke:var(--edge); stroke-width:.85}
.medal path:last-child {fill:none; stroke:var(--edge); stroke-width:.55}
.card-copy {display:flex; flex-direction:column}
.card-copy strong {font:700 1.38rem/1.36 Amiri,serif}
.card-copy small {font-size:.81rem; color:var(--muted)}
.card-end {display:grid; margin-inline-start:auto; color:var(--edge)}
.card-end .ic {width:16px}
.index-section, .app-screen {padding-block:20px 8px}
.catalog-tabs {display:grid; grid-template-columns:1fr 1fr; gap:4px; padding:4px; border-radius:14px; background:var(--soft); margin-bottom:15px}
.catalog-tabs a {display:grid; place-items:center; min-height:44px; border-radius:10px; color:var(--muted)}
.catalog-tabs [aria-current] {background:var(--card); color:var(--ink); box-shadow:0 1px 5px #10282012}
.index-top {display:grid; gap:10px; margin-bottom:14px}
.count {font-size:.85rem; color:var(--muted)}
.search-box {display:flex; gap:9px; align-items:center; min-height:48px; padding:5px 14px; border-radius:12px; background:var(--card); border:1px solid var(--line); color:var(--muted)}
.search-box:focus-within {outline:2px solid var(--edge)}
.search-box input {width:100%; border:0; background:transparent; outline:0; min-width:0; font-size:1rem}
.search-box input::placeholder {color:var(--muted)}
.search-box .ic {width:19px}
.filters {display:flex; gap:8px; margin-bottom:12px}
.filters button {min-height:44px; padding:4px 17px; border-radius:30px; border:1px solid var(--line); font-size:.9rem}
.filters [aria-pressed=true] {background:var(--accent); border-color:var(--accent); color:var(--active-ink)}
#ayah-help p,.empty {color:var(--muted); font-size:.93rem}
.empty {padding:16px}
.ayah-results {display:grid; gap:9px; margin-top:15px}
.ayah-result,.saved-card {background:var(--card); border:1px solid var(--line); border-radius:15px; padding:14px 16px}
.ayah-result {display:grid; gap:7px}
.ayah-result strong {font-size:.9rem; color:var(--muted)}
.result-text {font:1.48rem/1.95 Quran,serif}
.more-row {text-align:center; margin-top:15px}
.surface-title {display:flex; align-items:center; gap:10px; margin-bottom:14px}
.surface-title h1 {font-size:2rem}
.saved-card h2 {font-size:1.6rem}
.saved-card p {margin:8px 0 18px}
.reader-head {margin:16px 0 4px; padding:16px; border-radius:18px; text-align:center; background:var(--soft); border:1px solid var(--line)}
.reader-head .flourish {justify-content:center; color:var(--edge)}
.reader-head .flourish i {width:21px}
.reader-head h1 {font-size:2.6rem; line-height:1.5}
.reader-head p {font-size:.86rem; color:var(--muted)}
.qtext {font:normal var(--verse-size)/2 Quran,serif}
#bismillah {text-align:center; margin-block:14px}
.verse {display:flex; gap:8px; align-items:flex-start; padding:16px 3px; border-bottom:1px solid var(--line); scroll-margin-top:4px}
.verse p {flex:1; min-width:0; overflow-wrap:break-word}
.verse .number {white-space:nowrap; font: .9rem/1.7 Noto,sans-serif; margin-inline-start:.4rem; color:var(--edge)}
.verse-actions {display:flex; flex-direction:column; flex:none}
.verse button {width:44px; height:44px; display:grid; place-items:center; border-radius:50%; color:var(--muted)}
.verse button .ic {width:18px}
.verse button[aria-pressed=true],.verse button:hover {color:var(--ink); background:var(--soft)}
.verse button[aria-pressed=true] .ic {fill:currentColor}
.target-verse,.playing-verse {background:var(--soft); border-radius:8px; padding-inline-start:9px}
.playing-verse {box-shadow:inset -3px 0 var(--edge)}
.surah-nav {display:flex; align-items:center; flex-wrap:wrap; gap:10px; margin-top:19px}
.surah-nav a:last-child {margin-inline-start:auto}
.app-tabs, .player {
  position:fixed; inset-inline:0; width:min(100%,var(--app-width)); margin-inline:auto;
  background:var(--card); border-top:1px solid var(--line);
}
.app-tabs {
  bottom:0; z-index:6; padding:3px 8px calc(3px + var(--safe-bottom));
  min-height:var(--app-bar); display:grid; grid-template-columns:repeat(4,minmax(0,1fr));
}
.app-tabs a,.app-tabs button {display:flex; flex-direction:column; gap:1px; align-items:center; justify-content:center; font-size:.81rem; line-height:1.5; color:var(--muted); border-radius:12px; padding:2px}
.app-tabs span {display:grid; place-items:center; min-width:46px; height:28px; border-radius:15px}
.app-tabs .ic {width:21px; height:21px}
.app-tabs [aria-current=page] {color:var(--ink); font-weight:bold}
.app-tabs [aria-current=page] span,.reader-tabs #listen span {background:var(--soft); color:var(--accent)}
.player {bottom:var(--app-bar); z-index:5; box-shadow:0 -5px 22px #1a382318; padding:9px var(--gutter); border-radius:15px 15px 0 0}
.player-inner {display:grid; grid-template-columns:minmax(0,1fr) auto auto; align-items:center; gap:6px}
.player-title,.reciter-label,.continue-label {display:flex; align-items:center; gap:6px}
.player-title {grid-column:1 / 3; grid-row:1}
.player-title .ic {color:var(--edge); width:19px}
.player-title strong {font-size:.95rem}
.reciter-label {grid-column:1; grid-row:2; min-width:0}
.reciter-label,.continue-label {font-size:.86rem; color:var(--muted)}
.continue-label {grid-column:2 / 4; grid-row:2; min-height:44px}
.continue-label input {accent-color:var(--accent)}
select {min-width:0; min-height:44px; max-width:100%; border:1px solid var(--line); border-radius:8px; padding-inline:6px; background:var(--card); font-size:1rem}
#close-player {grid-column:3; grid-row:1; justify-self:end}
.dismiss {font:1.4rem/1 sans-serif}
.player audio,#audio-message {grid-column:1 / -1}
.player audio {width:100%; height:36px; direction:ltr}
#audio-message {font-size:.87rem}
#retry-audio {justify-self:start}
.with-player .app-frame {padding-bottom:calc(var(--app-bar) + var(--player-height,175px) + 10px)}
#notice {position:fixed; z-index:7; inset-inline:0; margin:auto; bottom:calc(var(--app-bar) + 10px); max-width:90%; width:max-content; text-align:center; padding:8px 17px; border-radius:12px; background:var(--accent); color:var(--active-ink)}
.with-player #notice {bottom:calc(var(--app-bar) + var(--player-height,175px) + 8px)}
:is(#tools-sheet,#paper-jump-sheet,#practice-sheet) {box-sizing:border-box; position:fixed; inset:auto 0 0; margin:0 auto; width:min(100%,var(--app-width)); max-width:100%; max-height:85dvh; padding:16px var(--gutter) calc(21px + var(--safe-bottom)); border:1px solid var(--line); border-radius:22px 22px 0 0; background:var(--card); color:var(--ink)}
:is(#tools-sheet,#paper-jump-sheet,#practice-sheet)::backdrop {background:#0c21199c}
.sheet-header,.read-controls label,.font-controls {display:flex; align-items:center; gap:9px}
.sheet-header,.read-controls label {justify-content:space-between}
.sheet-header {margin-bottom:10px}
.read-controls label,.font-controls {min-height:64px; border-top:1px solid var(--line)}
.read-controls select {min-width:82px}
.font-controls span {margin-inline-end:auto}
.font-controls button {font:1.3rem system-ui}
.font-controls button:disabled {opacity:.42}
#notice:empty, #ayah-help p:empty {display:none}
#error {padding:18px 0}
footer {border-top:1px solid var(--line); display:flex; align-items:center; justify-content:center; gap:8px; flex-wrap:wrap; padding:14px 0; margin-top:24px; color:var(--muted); font-size:.77rem}
footer>span {display:none}
footer p {text-align:center}
footer a {text-decoration:underline; text-underline-offset:3px}
@media(max-width:359px) {
  .reciter-label,.continue-label {font-size:.86rem}
  .reciter-label {gap:3px}
  .player select {max-width:130px}
}
@media(max-height:470px) {
  .site-head {position:relative}
  html {scroll-padding-top:8px}
  .player {max-height:48dvh; overflow:auto}
}

.paper-entry {
  display:flex; align-items:center; gap:12px; padding:11px 15px; margin-block:8px;
  border:1px solid var(--line); border-radius:15px; background:var(--card);
}
.paper-entry-icon {display:grid; place-items:center; width:39px; height:44px; color:var(--edge)}
.paper-entry strong {display:block; font:700 1.44rem/1.35 Amiri,serif}
.paper-entry small {display:block; color:var(--muted); font-size:.83rem}
.paper-entry-chevron {margin-inline-start:auto; color:var(--edge); width:17px}
.catalog-tabs {grid-template-columns:1fr 1fr 1.5fr}
.catalog-tabs a {font-size:.91rem}
.paper-screen {padding-block:8px; text-align:center}
.paper-heading,.paper-controls,.paper-links {display:flex; justify-content:space-between; align-items:center; gap:8px}
.paper-heading {min-height:48px; margin-bottom:7px; color:var(--muted); font-size:.88rem}
.paper-heading label {display:flex; align-items:center; gap:5px}
.paper-heading select {min-width:49px}
.paper-stage {
  position:relative; isolation:isolate; margin-inline:auto; width:min(100%,max(248px,calc((100svh - var(--header) - var(--app-bar) - 157px) * .62032)));
  aspect-ratio:1160/1870; background:#fffcf3; overflow:hidden; direction:ltr;
  border-radius:2px 4px 4px 2px; box-shadow:0 0 0 1px #987d5140,2px 2px 0 #e1dac6,3px 3px 0 #bdb59e,0 6px 16px #48402424;
  touch-action:pan-y pinch-zoom; -webkit-user-select:none; user-select:none; cursor:grab;
}
.paper-stage.turning {cursor:grabbing}
.paper-stage img,.paper-stage canvas {display:block; position:absolute; inset:0; width:100%; height:100%; pointer-events:none}
.paper-controls {margin:12px auto 4px; max-width:380px}
.paper-controls button {padding:3px 16px}
.paper-controls button:disabled {opacity:.44; cursor:default}
#paper-counter {font-size:.9rem; color:var(--ink)}
#paper-hint,.paper-status {font-size:.84rem; color:var(--muted); margin:6px auto}
.paper-links {justify-content:center; flex-wrap:wrap; gap:12px; font-size:.81rem}
.paper-links a {min-height:40px; display:inline-flex; align-items:center; text-decoration:underline; text-underline-offset:3px}
@media(max-height:520px) and (orientation:landscape) {.paper-stage {width:min(70%,330px)}}

.reader-tabs {grid-template-columns:repeat(5,minmax(0,1fr))}
.reader-tabs #reader-paper span {color:var(--accent)}
.reader-tabs a, .reader-tabs button {line-height:1.35}
#paper-range {text-align:start; flex:1; min-width:0}
#paper-jump {flex:none}
#paper-number-form {padding-block:10px 17px; border-block:1px solid var(--line)}
.paper-number-row {display:flex; gap:8px; margin-top:6px}
#paper-number {min-width:0; width:100%; min-height:44px; border:1px solid var(--line); background:var(--card); border-radius:8px; padding-inline:12px}
#paper-number-error {font-size:.86rem; margin-top:5px}
.paper-surah-label {display:block; margin:12px 0 5px}
#paper-surah {width:100%}
@media(max-width:370px){.reader-tabs a,.reader-tabs button {font-size:.76rem}}

#saved-list {display:grid; gap:10px}
.saved-verse {display:flex; align-items:flex-start; gap:10px}
.saved-verse-link {flex:1; min-width:0; display:grid; gap:6px}
.saved-verse-link strong {font-size:.95rem; color:var(--accent)}
.saved-verse-link .result-text {display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden}
.remove-mark {min-height:44px; color:var(--muted); font-size:.9rem; text-decoration:underline; text-underline-offset:3px}
:is(.spoken-word,.replayed-word) {
  color:#fff; background:#196147; border-radius:.17em; outline:1px solid #196147;
  text-decoration:underline; text-decoration-thickness:1px; text-underline-offset:.13em;
  -webkit-box-decoration-break:clone; box-decoration-break:clone;
}
:root[data-theme="dark"] :is(.spoken-word,.replayed-word) {color:#14251f; background:#e5ce8e; outline-color:#e5ce8e}
#word-status {grid-column:1 / -1; font-size:.87rem; color:var(--muted)}
.reading-actions {display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; margin:10px 0}
.reading-actions>span {font-size:.88rem; color:var(--muted)}
.practice-trigger {display:inline-flex; gap:8px; align-items:center; justify-content:center; min-height:44px; border:1px solid var(--line); border-radius:10px; background:var(--card); padding:5px 13px; color:var(--accent); font-size:.9rem}
.practice-trigger .ic {width:18px; height:18px}
.recitation-word[role="button"] {cursor:pointer; touch-action:manipulation}
.recitation-word:focus-visible {outline:2px solid var(--edge); outline-offset:2px; border-radius:.13em}
@media (hover:hover){.recitation-word[role="button"]:hover {text-decoration:underline; text-underline-offset:.14em}}
#player-practice {grid-column:2; grid-row:1; padding:0; width:44px; border-radius:50%}
.player-title {grid-column:1; min-width:0}
#practice-live {grid-column:1/-1; display:flex; justify-content:space-between; align-items:center; gap:8px; background:var(--soft); border-radius:9px; padding:2px 10px; font-size:.86rem}
#practice-stop {color:var(--accent); min-height:40px; text-decoration:underline; white-space:nowrap}
.practice-fields {display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px 12px}
#practice-form label {display:grid; gap:4px; font-size:.92rem; color:var(--muted)}
#practice-form select {width:100%; color:var(--ink)}
.practice-reciter {margin-block:14px}
#practice-form .action {width:100%}

.feature-sheet {box-sizing:border-box; position:fixed; inset:auto 0 0; width:min(100%,var(--app-width)); max-width:100%; max-height:86dvh; margin:0 auto; padding:17px var(--gutter) calc(20px + var(--safe-bottom)); overflow:auto; overscroll-behavior:contain; color:var(--ink); background:var(--card); border:1px solid var(--line); border-radius:22px 22px 0 0}
.feature-sheet::backdrop {background:#0c2119a3}
.feature-sheet label {display:grid; gap:5px; min-width:0; color:var(--muted); font-size:.9rem}
.feature-sheet select,.feature-sheet input {width:100%; min-width:0; min-height:44px; color:var(--ink); background:var(--card); border:1px solid var(--line); border-radius:9px; padding-inline:9px}
.feature-card {background:var(--card); border:1px solid var(--line); border-radius:16px; padding:15px 17px; margin:15px 0 20px}
.card-heading,.action-row,.quiz-nav,.download-row {display:flex; align-items:center; justify-content:space-between; gap:8px; flex-wrap:wrap}
#home-links .card-heading h2 {margin:0}
#goal-summary,.feature-context,#quiz-state,#download-status,.source-note {color:var(--muted); font-size:.92rem; line-height:1.8; margin:.5em 0}
.quiet-link {padding:5px; min-height:42px; color:var(--accent); text-decoration:underline; text-underline-offset:3px}
.action-row {justify-content:flex-start}
#goal-actions {margin-top:8px}
.download-entry {width:100%; margin-top:10px; display:flex; align-items:center; gap:9px; justify-content:center; border:1px solid var(--line); background:var(--card); border-radius:12px; min-height:46px; color:var(--accent)}
.reading-actions {justify-content:flex-start; gap:6px}
.reading-actions .practice-trigger {padding-inline:10px}
.reading-actions>span {flex-basis:100%}
.verse button.meaning-link {display:inline-flex; vertical-align:middle; width:auto; height:auto; min-height:30px; font:normal .82rem/1.65 Noto,sans-serif; color:var(--accent); border-radius:6px; background:var(--soft); margin-inline-start:7px; padding:1px 7px}
.switch-two {display:grid; grid-template-columns:repeat(2,1fr); gap:4px; padding:4px; background:var(--soft); border-radius:12px}
.switch-two button {min-height:42px; border-radius:8px; color:var(--muted)}
.switch-two [aria-pressed=true] {background:var(--card); color:var(--accent); box-shadow:0 1px 4px #0001}
#meaning-body {font-size:1.13rem; line-height:2; white-space:pre-line; margin:15px 0}
#meaning-note {white-space:pre-line; font-size:.94rem; line-height:1.85}
.source-note {padding-top:9px; border-top:1px solid var(--line)}
.source-note a {text-decoration:underline}
.full-action {width:100%;margin-top:14px}
#goal-form {display:grid; gap:12px}
#quiz-text {font:normal var(--verse-size)/2 Quran,serif; min-height:92px; max-height:40dvh; overflow:auto; background:var(--soft); border-radius:12px; padding:10px 14px; margin:12px 0; white-space:pre-wrap}
#quiz-text:empty::after {content:'سمّع الآية من الذاكرة';font:1rem/2 Noto,sans-serif;color:var(--muted)}
.quiz-nav {border-top:1px solid var(--line);margin-top:12px;padding-top:12px}
#quiz-after {margin-block:8px}
#download-progress {width:100%; accent-color:var(--accent); margin-top:10px}
.download-row {border-top:1px solid var(--line);padding-block:8px}
.download-row strong,.download-row small {display:block}
.download-row small {font-size:.85rem;color:var(--muted)}
#quiz-after {grid-column:1/-1;margin:0}

.devotion-links {display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; margin-block:14px 20px}
.devotion-links a {display:flex; align-items:center; gap:10px; min-height:66px; padding:10px 12px; border:1px solid var(--line); border-radius:14px; background:var(--card)}
.devotion-links .ic {color:var(--edge); width:21px}
.devotion-links strong {font:700 1.16rem/1.5 Amiri,serif}
.guide-view {padding-block:16px 10px}
.guide-view h1 {font:700 2.2rem/1.5 Amiri,serif; margin:0 0 10px}
.guide-tabs {display:flex; background:var(--soft); padding:4px; border-radius:13px; margin-block:8px 16px}
.guide-tabs a {display:flex; justify-content:center; align-items:center; gap:8px; flex:1; min-height:44px; border-radius:10px; color:var(--muted)}
.guide-tabs [aria-current] {background:var(--card); color:var(--accent); font-weight:700}
.guide-tabs .ic {width:19px}
.dhikr-card,.prayer-step {border:1px solid var(--line); background:var(--card); border-radius:14px; margin-block:10px; overflow-wrap:break-word}
.dhikr-card {padding:15px}
.dhikr-card header,.dhikr-actions {display:flex; align-items:center; flex-wrap:wrap; gap:8px 12px}
.dhikr-card header {justify-content:space-between; margin-bottom:8px}
.dhikr-card h2 {font-size:1.36rem}
.dhikr-card header span,.dhikr-actions output {font-size:.9rem; color:var(--muted)}
.guide-words,.guide-quran,.guide-bismillah {font:normal 1.7rem/1.95 Quran,serif; color:var(--ink); padding-block:3px}
.guide-bismillah {font-size:1.34rem; color:var(--muted)}
.guide-ayah {color:var(--edge); font-size:.83em; white-space:nowrap}
.guide-source {display:flex; flex-wrap:wrap; align-items:center; gap:0 6px; color:var(--muted); font-size:.88rem; margin-block:4px 9px}
.guide-source a,.guide-inline {display:inline-flex; align-items:center; min-height:34px; text-decoration:underline; text-underline-offset:4px}
.dhikr-actions {border-block-start:1px solid var(--line); padding-top:10px}
.dhikr-actions .outlined {min-height:44px; padding-inline:16px}
.dhikr-actions button:disabled {background:var(--soft); color:var(--accent); cursor:default}
.guide-intro,.guide-note {line-height:1.95; margin-bottom:7px}
.prayer-counts {background:var(--soft); padding:9px 13px; border-radius:10px; margin:10px 0 15px; color:var(--ink); font-size:.94rem}
.prayer-step summary {cursor:pointer; min-height:48px; padding:11px 15px; font:700 1.28rem/1.6 Amiri,serif}
.prayer-step summary::marker {color:var(--edge); font-size:.78em}
.prayer-step[open] summary {color:var(--accent)}
.prayer-body {padding:10px 15px 12px; border-top:1px solid var(--line)}
.guide-inline {color:var(--accent)}

.dhikr-player {padding:16px; border:1px solid var(--line); border-radius:16px; background:var(--soft); margin-bottom:16px}
.dhikr-player h2 {display:flex; align-items:center; gap:9px; font-size:1.5rem; margin-bottom:10px}
.dhikr-player h2 .ic {color:var(--accent)}
.dhikr-settings {display:block}
.dhikr-settings label {font-size:.88rem; color:var(--muted)}
.dhikr-settings select {display:block; width:100%; margin-top:3px; padding-inline:8px; color:var(--ink)}
.dhikr-repeat {display:flex; align-items:center; gap:8px; min-height:44px; font-size:.94rem}
.dhikr-repeat input {width:18px; height:18px; accent-color:var(--accent); margin:0}
.dhikr-transport {display:flex; flex-wrap:wrap; align-items:center; gap:4px 8px}
.dhikr-player .quiet-link {min-height:44px}
.dhikr-status {font-size:.94rem; line-height:1.7; color:var(--ink)}
.dhikr-status:not(:empty) {margin-top:10px}
.dhikr-card[data-listening] {border-color:var(--accent); box-shadow:inset -3px 0 var(--accent)}
.dhikr-actions .dhikr-listen {display:inline-flex; align-items:center; gap:5px; min-height:44px; margin-inline-start:auto}
.dhikr-listen .ic,.dhikr-transport .ic {width:18px; height:18px}

.times-entry {display:flex; align-items:center; gap:13px; padding:14px 16px; border:1px solid var(--line); border-radius:14px; background:var(--soft); margin-block:12px}
.times-entry strong,.times-entry small {display:block}
.times-entry strong {font:700 1.35rem/1.4 Amiri,serif}
.times-entry small,.times-date {font-size:.9rem; color:var(--muted)}
.times-mark {display:grid; place-items:center; width:42px; height:42px; border-radius:50%; color:var(--accent); background:var(--card)}
.times-next {padding:15px 18px; border-radius:16px; background:var(--accent); color:var(--active-ink)}
.times-next div {display:flex; align-items:center; justify-content:space-between; gap:8px}
.times-next h2,.times-next strong {font-size:1.8rem}
.times-next p {font-size:.95rem}
.times-date {margin:14px 3px 7px}
.times-list {list-style:none; padding:0; margin:0 0 15px; border:1px solid var(--line); border-radius:14px; overflow:hidden}
.times-list li {display:flex; align-items:center; justify-content:space-between; padding:8px 15px; min-height:44px; background:var(--card)}
.times-list li+li {border-top:1px solid var(--line)}
.times-list [aria-current] {background:var(--soft); color:var(--accent); font-weight:bold}
.times-settings,.times-sound {border:1px solid var(--line); border-radius:14px; margin:10px 0; background:var(--card)}
.times-settings summary,.times-manual summary,#pt-calendar-help summary {min-height:44px; cursor:pointer; padding:10px 13px}
.times-settings>div,.times-sound {padding:14px}
.times-settings>div {border-top:1px solid var(--line)}
.times-settings label,.times-voice-row label {display:block; font-size:.94rem; margin-bottom:8px}
.times-settings select,.times-voice-row select,.times-settings input {display:block; width:100%; margin-top:3px; background:var(--card); color:var(--ink); border:1px solid var(--line); border-radius:9px; padding:4px 9px; min-height:44px}
.times-settings p,.times-sound p {font-size:.92rem; color:var(--muted); line-height:1.8}
.times-offsets {display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin-top:10px}
.times-voice-row {display:flex; gap:8px; align-items:end; margin:10px 0}
.times-voice-row label {flex:1; min-width:0; margin:0}
.times-switch {display:flex; align-items:center; gap:8px; min-height:44px; font-weight:700}
.times-switch input {width:20px; height:20px; accent-color:var(--accent)}
#pt-calendar-help {margin:8px 0; border-top:1px solid var(--line)}
#pt-calendar-help summary,.times-manual summary {padding-inline:0}
#pt-playing {position:fixed; bottom:calc(var(--app-bar) + 6px); inset-inline:0; margin-inline:auto; max-width:var(--app-width); z-index:7; display:flex; align-items:center; justify-content:space-between; gap:6px; padding:8px var(--gutter); background:var(--card); color:var(--ink); border:1px solid var(--line); border-radius:12px}

.reader-voice {display:flex; align-items:center; gap:12px; padding:9px 0 2px; color:var(--muted)}
.reader-voice select {min-height:44px; max-width:75%; flex:1; padding-inline:10px; font:inherit; color:var(--ink); background:var(--card); border:1px solid var(--line); border-radius:10px}

#pt-save-place {width:100%; margin-block:8px 2px; font-weight:700}

.hc-entry {background:var(--card)}
.hc-entry .times-mark {background:var(--warm);color:var(--warm-ink);flex:none}
.hc-chevron {margin-inline-start:auto;color:var(--muted);flex:none}
.hc-summary {display:flex;align-items:center;justify-content:space-between;gap:8px;padding:16px 20px;background:var(--soft);border:1px solid var(--line);border-radius:16px}
.hc-summary span,.hc-summary p,.hc-muted {color:var(--muted)}
.hc-summary h2 {font:700 clamp(1.65rem,7vw,2.2rem)/1.5 Amiri,serif;margin:2px 0}
.hc-summary p {margin:0}
.hc-emblem {width:48px;height:48px;flex:none;stroke:var(--warm-ink);fill:none;stroke-width:1.3}
.hc-month,.hc-events {background:var(--card);border:1px solid var(--line);border-radius:14px;margin:12px 0;padding:clamp(8px,2.6vw,16px)}
.hc-controls,.hc-navigation {display:flex;align-items:center;justify-content:space-between;gap:6px}
.hc-controls .switch-two {width:min(64%,225px)}
.hc-navigation {margin-top:12px}
.hc-navigation h2,.hc-events h2 {font:700 1.45rem/1.45 Amiri,serif;margin:0}
.hc-navigation button {display:grid;width:42px;height:42px;place-items:center;background:var(--soft);border-radius:50%}
.hc-navigation button:disabled,#hc-today:disabled {opacity:.45}
#hc-key {text-align:center;margin:4px 0 10px;font-size:.79rem}
.hc-grid {display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:2px}
.hc-week {color:var(--muted);font-size:.75rem;padding-bottom:4px;text-align:center}
.hc-day {position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-height:49px;padding:4px 1px;border:1px solid transparent;border-radius:9px;line-height:1.16}
.hc-day strong {font-size:1.02rem}.hc-day small {font-size:.78rem;color:var(--muted)}
.hc-day[aria-current=date] {border-color:var(--accent)}
.hc-day[aria-pressed=true] {background:var(--accent);color:var(--active-ink)}
.hc-day[aria-pressed=true] small {color:inherit}
.hc-day.has-event::after {content:'';position:absolute;top:4px;inset-inline-end:4px;width:5px;height:5px;border-radius:50%;background:var(--warm-ink)}
.hc-day.has-event[aria-pressed=true]::after {background:var(--active-ink)}
#hc-day-events {border-top:1px solid var(--line);margin:10px 0 0;padding-top:4px;scroll-margin-top:var(--header)}
#hc-day-events p {font-size:.85rem;margin:6px 0}
#hc-day-events article {padding:6px 4px}
#hc-day-events article strong {display:block}
#hc-day-events a,.hc-prayer-date {font-size:.86rem;text-decoration:underline;text-underline-offset:3px;color:var(--accent)}
.hc-prayer-date {display:inline-flex;align-items:center;min-height:36px}
.hc-events select {max-width:55%;padding:4px 8px;border:1px solid var(--line);border-radius:8px;background:var(--card);color:var(--ink);font:inherit;font-size:.85rem;min-height:42px}
#hc-events {list-style:none;margin:8px 0 0;padding:0}
#hc-events li+li {border-top:1px solid var(--line)}
.hc-event {width:100%;padding:9px 3px;text-align:start}
.hc-event strong,.hc-event-date {display:block}
.hc-event-date {display:flex;flex-wrap:wrap;align-items:baseline;gap:0 8px;color:var(--muted);font-size:.85rem}
.hc-event-date span+span::before {content:'·';margin-inline-end:8px}
.hc-fields {display:grid;grid-template-columns:minmax(44px,.65fr) minmax(95px,1.5fr) minmax(62px,1fr);gap:6px}
#hc-view [role=status]:empty {display:none}

.hc-event-note {color:var(--muted);font-size:.82rem;line-height:1.65;margin:8px 0 0}
@media (max-width:420px) {.hc-emblem {display:none}.hc-summary h2 {font-size:clamp(1.55rem,6.6vw,1.8rem)}}

/* The text column and the printed page share a quiet outer margin for the sole back control. */
body.in-mushaf {--leaf:#fffaf0;--leaf-edge:#e3d3ae;--leaf-ink:#312b20;--leaf-gold:#886934;--leaf-line:#b69960;--app-width:650px;background:#e5dfd1}
[data-theme=dark] body.in-mushaf {--leaf:#192922;--leaf-edge:#28392f;--leaf-ink:#e9ead6;--leaf-gold:#d5b77a;--leaf-line:#836f49;background:#101c17}
.in-mushaf .app-frame {position:relative;min-height:100dvh;padding-bottom:max(var(--safe-bottom),24px);background:linear-gradient(90deg,var(--leaf-edge) -25%,var(--leaf) 5%,var(--leaf) 96%,var(--leaf-edge) 125%);color:var(--leaf-ink)}
.in-mushaf main {margin-inline:0}
.in-mushaf .site-head {position:sticky;top:0;z-index:4;height:calc(var(--top) + 46px);border:none;background:linear-gradient(var(--leaf) 76%,transparent);pointer-events:none}
.in-mushaf .head-inner {margin-inline:8px;height:44px}
.in-mushaf .nav-back {pointer-events:auto;position:relative;color:var(--leaf-gold);background:none;border:none}
.in-mushaf .nav-back::before {content:'';position:absolute;inset:7px;border:1px solid var(--leaf-line);border-radius:50%;opacity:.62}
.in-mushaf .nav-back .ic {width:15px;height:15px}
.in-mushaf :is(.screen-name,.theme-button,footer,#main-tabs,#surah-info) {display:none}
#reader {margin:0 clamp(10px,3vw,22px);padding:15px clamp(11px,4.1vw,34px) 30px;min-height:calc(100svh - 72px);border:1px solid var(--leaf-line);outline:1px solid var(--leaf-line);outline-offset:-5px;border-radius:2px}
#reader .reader-head {position:relative;isolation:isolate;overflow:hidden;margin:0 0 12px;padding:5px 27px;border:1px solid var(--leaf-line);border-radius:1px;background:transparent}
#reader .reader-head::before,#reader .reader-head::after {content:'';position:absolute;inset-block:3px;width:19%;z-index:-1;background:url(assets/pattern.svg) center / 52px;opacity:.42}
#reader .reader-head::before {right:3px;mask-image:linear-gradient(to left,#000,transparent)}
#reader .reader-head::after {left:3px;mask-image:linear-gradient(to right,#000,transparent)}
.folio-rule {position:absolute;inset:3px;border:1px solid var(--leaf-line);opacity:.64;pointer-events:none}
#reader .reader-head h1 {font:700 clamp(1.8rem,6.7vw,2.45rem)/1.55 Amiri,serif;color:var(--leaf-ink)}
#reader #bismillah {margin:8px 0 12px;font-size:calc(var(--verse-size)*.93)}
#verses {direction:rtl;text-align:justify;text-align-last:center;font:normal var(--verse-size)/2.05 Quran,serif;overflow-wrap:break-word}
#reader .verse,#reader .verse .qtext {display:inline;padding:0;margin:0;border:0;border-radius:0;background:none;box-shadow:none;font:inherit}
#reader .verse-actions,#reader .meaning-link {display:none}
#reader .verse .number {display:inline-grid;place-items:center;vertical-align:.1em;position:relative;isolation:isolate;min-width:1.68em;height:1.68em;padding-inline:.12em;margin-inline:.20em;color:var(--leaf-gold);font:normal .51em/1 Noto,sans-serif;cursor:pointer}
#reader .number::before,#reader .number::after {content:'';position:absolute;inset:1px;z-index:-1;border:1px solid currentColor;border-radius:36%;pointer-events:none}
#reader .number::after {transform:rotate(45deg)}
#reader .recitation-word {cursor:pointer}
#reader .recitation-word:hover {text-decoration:none}
#reader .spoken-word {color:var(--accent);background:var(--soft);border-radius:.18em;box-shadow:0 2px 0 var(--leaf-gold)}
#reader.verse-audio-only .playing-verse .qtext {color:var(--accent);background:var(--soft)}
#reader .target-verse .number {background:none}
#reader .target-verse .number::before {background:var(--warm)}
#paper {padding:0 10px 6px;min-height:calc(100svh - 60px);align-content:center}
#paper .paper-stage {width:min(100%,calc((100svh - var(--top) - var(--safe-bottom) - 60px)*.62032));max-width:580px}

#folio-sheet {color:var(--ink);line-height:1.6}
#folio-sheet .sheet-header {margin:0 0 10px}
#folio-sheet h2 {font-size:1.6rem}
.folio-primary,.folio-verse-actions,.folio-links {display:flex;gap:8px;flex-wrap:wrap;margin-block:9px}
.folio-primary>button,.folio-verse-actions>button {flex:1}
.folio-links>* {display:inline-flex;align-items:center;justify-content:center;gap:4px;min-height:44px;padding:5px;color:var(--accent);font-size:.88rem}
.folio-links .ic {width:17px;height:17px}
#folio-sheet .player {position:static;width:100%;max-height:none;padding:8px 0;background:transparent}
#folio-sheet .player-inner {margin:0}
#folio-sheet .reader-voice {margin:10px 0}
#folio-sheet #word-tip {display:none}
#folio-sheet .surah-nav {margin-top:10px}
#folio-sheet .continue-label {display:flex;align-items:center;gap:4px}
#folio-sheet .continue-label input {width:17px;min-height:17px}
#reader .verse button.number {display:inline-grid;width:auto;height:1.68em;border-radius:0;color:var(--leaf-gold);background:transparent}
#reader .verse button.number:hover {background:transparent}
#folio-sheet #listen {display:none}

#tilawa-frame[aria-busy=true] :is(.site-head,footer) {visibility:hidden}

.scenes-entry img {object-fit:cover;border-radius:9px;flex:none}
#folio-scenes:not([hidden]) {display:flex;justify-content:center;margin-block:9px}
.in-scenes #reader {min-height:0;border:0;outline:0;margin:0 auto;padding:0 clamp(14px,4vw,28px) 22px}
.in-scenes #reader .reader-head,.in-scenes #bismillah,.in-scenes #reader .verse:not(.scene-current) {display:none}
#scene-figure {margin:0}
#scene-photo {display:grid;place-items:center;width:100%;aspect-ratio:4/3;max-height:45svh;overflow:hidden;background:var(--leaf-edge);color:var(--leaf-ink);border-radius:5px}
#scene-photo img {display:block;width:100%;height:100%;min-height:0;object-fit:cover}
#scene-ref {text-align:center;margin:18px 0 4px;font-size:.86rem;color:var(--leaf-gold)}
.in-scenes #verses {text-align:center;text-wrap:balance;padding:2px 0 16px;line-height:1.85}
.scene-nav {display:grid;grid-template-columns:1fr 1.3fr 1fr;gap:8px;padding-block:13px;border-block-start:1px solid var(--leaf-line)}
.scene-nav button {padding:6px;min-height:44px;border:1px solid var(--leaf-line);border-radius:24px;color:var(--leaf-ink);background:transparent;font:inherit}
.scene-nav #scene-play {border-color:var(--accent);background:var(--accent);color:var(--on-accent,#fff)}
[data-theme=dark] .scene-nav #scene-play {background:var(--leaf-ink);color:var(--leaf)}
.scene-nav button:disabled {opacity:.4;cursor:default}
.scene-details {display:flex;align-items:center;justify-content:center;gap:24px}
.scene-details>* {padding:8px 2px;min-height:44px;align-content:center;color:var(--leaf-gold);font:inherit;font-size:.86rem;background:none;border:0;text-decoration:underline;text-underline-offset:.25em;cursor:pointer}

.devotion-links .tasbih-entry {grid-column:1/-1;background:var(--soft)}
.tasbih-entry small {margin-inline-start:auto;font-size:.88rem;color:var(--muted)}
#tasbih-view {max-width:29rem;margin-inline:auto;padding:clamp(16px,4vh,35px) 0 24px;text-align:center}
.app-frame:has(#tasbih-view:not([hidden])) footer {display:none}
.tasbih-choice label,.tasbih-goals legend {font-size:.91rem;font-weight:600;color:var(--muted)}
.tasbih-choice label {display:block;margin-bottom:3px}
.tasbih-select {display:inline-grid;position:relative;max-width:100%}
.tasbih-select::after {content:'';position:absolute;inset-inline-end:12px;top:43%;width:7px;height:7px;transform:rotate(45deg);border:solid var(--edge);border-width:0 2px 2px 0;pointer-events:none}
.tasbih-select select {appearance:none;text-align:center;text-align-last:center;max-width:100%;width:auto;min-height:48px;padding:0 14px 0 35px;font:700 clamp(1.55rem,5.8vw,2.1rem)/1.6 Amiri,serif;color:var(--ink);background:transparent;border:none;border-radius:9px;cursor:pointer}
.tasbih-select option {background:var(--card);color:var(--ink);font:1rem Noto,sans-serif}
.tasbih-dial {width:min(64vw,255px);aspect-ratio:1;margin:clamp(12px,3vh,24px) auto 0;display:grid;padding:7px;border-radius:50%;background:var(--line);box-shadow:0 0 0 1px var(--line)}
.tasbih-dial.has-goal {background:conic-gradient(from 0deg,var(--edge) 0deg var(--tasbih-arc,0deg),var(--line) var(--tasbih-arc,0deg) 360deg)}
#tasbih-add {position:relative;isolation:isolate;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;min-width:0;border:4px solid var(--paper);border-radius:50%;color:#fff8e3;background:radial-gradient(ellipse at 30% 15%,#34634e,#164532 67%,#0e3326);user-select:none;-webkit-user-select:none;transition:transform .1s}
#tasbih-add::before {content:'';position:absolute;inset:7px;z-index:-1;border-radius:50%;border:1px solid #cbb47e80;background:url(assets/pattern.svg) center/66px;opacity:.3;pointer-events:none}
#tasbih-add:active {transform:scale(.975)}
#tasbih-count {font:500 4.4rem/1.3 Noto,sans-serif;white-space:nowrap;font-variant-numeric:tabular-nums;direction:ltr}
.tasbih-tap {font-size:.98rem;color:#f0e5cb}
#tasbih-progress {min-height:1.7rem;margin:10px 0;color:var(--muted);font-size:.92rem}
.tasbih-goals {border:0;margin:0 auto;padding:0;width:min(100%,300px)}
.tasbih-goals legend {margin:0 auto 5px}
.tasbih-goals>div {display:flex;gap:4px;padding:4px;background:var(--soft);border-radius:14px}
.tasbih-goals label {flex:1;position:relative;cursor:pointer}
.tasbih-goals input {position:absolute;opacity:0;inset:0;margin:0;cursor:pointer}
.tasbih-goals span {display:grid;place-items:center;min-height:44px;border-radius:10px;color:var(--muted)}
.tasbih-goals input:checked+span {background:var(--card);color:var(--accent);box-shadow:0 1px 4px #162a1819;font-weight:bold}
.tasbih-goals input:focus-visible+span {outline:3px solid var(--edge);outline-offset:1px}
.tasbih-tools {display:flex;justify-content:center;align-items:center;gap:15px;margin:16px 0 0}
.tasbih-tools button {min-height:44px;font-size:.91rem}
.tasbih-tools button:disabled {opacity:.45;cursor:default}
#tasbih-storage-note {margin:10px;color:var(--muted);font-size:.9rem}
#tasbih-confirm h2 {font-size:1.6rem}
#tasbih-confirm p {margin:6px 0 14px}
@media(prefers-reduced-motion:reduce){#tasbih-add{transition:none}}

.devotion-links .tasbih-entry {grid-column:auto}
.devotion-links .tasbih-entry small {display:none}
#qibla-view {text-align:center;max-width:30rem;margin:auto}
#qibla-view h1 {margin-bottom:0}
#qibla-place,.qibla-help,#qibla-status {color:var(--muted)}
.qibla-dial {box-sizing:border-box;position:relative;direction:ltr;width:min(66vw,250px);aspect-ratio:1;margin:20px auto;border-radius:50%;border:2px solid var(--edge);box-shadow:inset 0 0 0 7px var(--card),inset 0 0 0 8px var(--line);background:radial-gradient(circle,var(--soft),var(--card) 70%)}
#qibla-rose {position:absolute;inset:0;direction:ltr}
#qibla-rose b {display:block;font-weight:inherit;transform:rotate(var(--heading,0deg))}
#qibla-index {position:absolute;top:-5px;left:50%;width:10px;height:10px;background:var(--ink);clip-path:polygon(0 0,100% 0,50% 100%);transform:translateX(-50%)}
#qibla-motion {font-weight:600;color:var(--ink);margin:.45em auto}
#qibla-phone {margin:.25rem auto;font-size:1rem}
#qibla-phone-angle,#qibla-native-reference bdi {font-weight:700;font-variant-numeric:tabular-nums}
#qibla-recovery {margin:1rem auto;text-align:start;padding:.75rem 1rem;border:1px solid var(--edge);border-radius:.85rem}
#qibla-recovery summary {cursor:pointer;font-weight:600}
#qibla-recovery p {line-height:1.65;margin:.55rem 0}
#qibla-native-reference {border-top:1px solid var(--edge);margin-top:.8rem;padding-top:.3rem}
#qibla-browser {display:inline-block;margin-top:.75em;color:var(--ink);text-decoration:underline}
#qibla-browser[hidden] {display:none}
.qibla-dial span {position:absolute;color:var(--ink);font-size:.86rem}
.q-n,.q-s {left:50%;transform:translateX(-50%)}
.q-n {top:10px}.q-s {bottom:10px}.q-e,.q-w {top:50%;transform:translateY(-50%)}.q-e{right:10px}.q-w{left:10px}
#qibla-needle {position:absolute;inset:20% 43%;direction:ltr}
#qibla-needle::before,#qibla-needle::after {content:'';position:absolute;inset:0 0 50%;background:#b88632;clip-path:polygon(50% 0,100% 100%,0 100%)}
#qibla-needle::after {inset:50% 0 0;transform:rotate(180deg);background:#668578}
.qibla-value {display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px}
.qibla-value strong {font-size:2rem;color:var(--ink);font-variant-numeric:tabular-nums}
.qibla-help {max-width:30em;margin:8px auto 16px;line-height:1.7}
#qibla-view .action-row {justify-content:center}
#qibla-status {min-height:1.6em;margin-top:8px}

.app-language {margin-inline-start:auto;position:relative}
.app-language select {cursor:pointer;appearance:none;min-height:40px;border:1px solid var(--line);border-radius:11px;padding:4px 12px;background:var(--card);color:var(--ink);font-size:.88rem}
.app-language+button.theme-button {margin-inline-start:0}
.in-mushaf .app-language {display:none}
[dir=ltr] .hero h1 {font-size:clamp(1.65rem,6.9vw,2.6rem);line-height:1.1}
[dir=ltr] .nav-back .ic,[dir=ltr] .hc-chevron,[dir=ltr] .paper-entry-chevron,[dir=ltr] .card-end .ic,[dir=ltr] .hc-navigation button .ic {transform:scaleX(-1)}
[dir=ltr] .devotion-links strong {font-size:1.02rem}
[dir=ltr] :is(.guide-words,.result-text,#meaning-body,#meaning-note,#quiz-text){text-align:start}
#meaning-content [dir=ltr] {text-align:left;line-height:1.7}
[dir=ltr] .hero h1,[dir=ltr] h1,[dir=ltr] h2 {overflow-wrap:break-word}
[dir=ltr] .reader-head h1 {font-family:Georgia,serif}
[dir=ltr] .site-head .head-inner {gap:8px}
[dir=ltr] #quiz-text:empty::after {content:'Recite from memory'}
:lang(ckb)#quiz-text:empty::after,html[lang=ckb] #quiz-text:empty::after {content:'ئایەتەکە لەبەرەوە بخوێنەوە'}

html[dir=ltr] .screen-name {min-width:0;font-size:clamp(.95rem,3.9vw,1.23rem);line-height:1.22}
#meaning-content [dir=rtl] {text-align:right}

/* Keep the mobile shell aligned with the usable screen, including a side notch. */
.app-frame {padding-left:env(safe-area-inset-left,0px);padding-right:env(safe-area-inset-right,0px)}
.head-inner {min-height:58px;height:auto;gap:8px}
.head-inner .screen-name {flex:1;min-width:0;line-height:1.3;font-size:clamp(1.1rem,5.1vw,1.5rem);padding-block:6px;overflow-wrap:anywhere}
.app-language {display:inline-flex;flex:none;align-items:center}
.app-language>.ic {pointer-events:none;position:absolute;inset-inline-start:9px;width:15px;height:15px;color:var(--muted)}
.app-language select {padding-inline:30px 9px;min-height:44px;border-radius:23px}
.brand {gap:6px}
.head-inner .theme-button {width:44px;height:44px}
.in-mushaf .head-inner {min-height:44px}
.home-group,.home-group nav,.home-prayers,.card-copy,.sheet-header>:first-child {min-width:0}
#daily-card,.home-group .times-entry,.scenes-entry {border-radius:var(--panel-radius);padding:var(--card-pad);margin-block:var(--block-gap) 0}
#daily-card {background:var(--warm);border-color:color-mix(in srgb,var(--edge) 30%,var(--card))}
#daily-card .card-heading {gap:4px 8px}
#daily-card .quiet-link {padding-inline:0;min-height:44px;font-size:.88rem}
#goal-summary {margin:2px 0 0}
.home-group .devotion-links {gap:var(--row-gap);margin:0}
.home-group .devotion-links a {min-width:0;border-radius:var(--panel-radius);padding:10px var(--card-pad);min-height:60px;gap:8px}
.home-group .devotion-links strong {overflow-wrap:anywhere}
.home-group .times-entry {margin-top:var(--row-gap);background:var(--card);padding-block:11px}
.home-group .times-mark {width:36px;height:36px}
.scenes-entry {background:var(--card);padding-block:10px}
.scenes-entry img {width:52px;height:51px}
.devotion-links .ic {flex:0 0 21px}
:is(.guide-view,.app-screen,.index-section) {padding-block:var(--block-gap) 10px}
.guide-view>h1 {font-size:clamp(1.75rem,7vw,2.2rem);line-height:1.4;margin-bottom:12px}
:is(.feature-card,.dhikr-card,.dhikr-player,.times-sound,.hc-summary) {padding:var(--card-pad);border-radius:var(--panel-radius)}
:is(.times-settings,.times-list,.prayer-step,.hc-month,.hc-events,.saved-card,.surah-card:first-child:last-child) {border-radius:var(--panel-radius)}
.times-list time,#pt-next-time {font-variant-numeric:tabular-nums;white-space:nowrap}
.times-next {padding:var(--card-pad);border-radius:var(--panel-radius)}
.times-next div {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 12px;margin-block:4px}
.times-next h2 {font-size:clamp(1.35rem,5.8vw,1.85rem);line-height:1.45;overflow-wrap:anywhere}
.times-next strong {font-size:clamp(1.45rem,6.2vw,1.9rem);letter-spacing:-.025em}
#pt-countdown {padding-top:5px;border-top:1px solid color-mix(in srgb,currentColor 20%,transparent)}
.times-list [aria-current] {box-shadow:inset -3px 0 var(--accent)}
html[dir=ltr] .times-list [aria-current] {box-shadow:inset 3px 0 var(--accent)}
.times-settings label,.times-offsets input {min-width:0}
.times-settings input {font-size:1rem}
.action-row>:is(a,button),.folio-primary>button,.folio-verse-actions>button {max-width:100%;text-align:center}
.sheet-header h2,.surface-title h1 {line-height:1.4;overflow-wrap:anywhere}
.sheet-header form {flex:none}
.app-tabs {padding-left:max(6px,env(safe-area-inset-left,0px));padding-right:max(6px,env(safe-area-inset-right,0px));box-shadow:0 -3px 18px #10282008}
.app-tabs a,.app-tabs button {min-width:0;min-height:48px;padding:4px;line-height:1.4}
.app-tabs span {min-width:min(52px,100%);height:29px}
:is(.feature-sheet,#tools-sheet,#paper-jump-sheet,#practice-sheet) {overflow:auto;overscroll-behavior:contain;padding-left:max(var(--gutter),env(safe-area-inset-left,0px));padding-right:max(var(--gutter),env(safe-area-inset-right,0px));max-height:calc(100dvh - var(--top) - 12px)}
#folio-sheet .reader-voice {display:grid;grid-template-columns:minmax(0,1fr);gap:4px}
#folio-sheet .reader-voice select {max-width:100%;width:100%}
html[dir=ltr] .library-links strong {font:650 clamp(.94rem,3.6vw,1.09rem)/1.4 Noto,Tahoma,sans-serif}
@media (max-width:380px) {
  .head-inner,html[dir=ltr] .site-head .head-inner {gap:5px}
  .home-prayers {gap:7px}
  .home-mark {width:30px;height:30px}
  .home-group .devotion-links a {padding-inline:9px}
  .hero-content {max-width:75%}
  .folio-home-hint {line-height:1.5}
  #folio-sheet .player-inner {grid-template-columns:minmax(0,1fr) auto auto}
  #folio-sheet .reciter-label {grid-column:1/-1;grid-row:2}
  #folio-sheet .reciter-label select {max-width:none;flex:1}
  #folio-sheet .continue-label {grid-column:1/-1;grid-row:3}
  .hc-controls,.hc-navigation,.paper-heading {flex-wrap:wrap}
}
@media (max-height:490px) and (orientation:landscape) {
  :root {--app-bar:calc(50px + var(--safe-bottom));--header:calc(48px + var(--top))}
  .head-inner {min-height:48px}
  .app-tabs {min-height:50px}
  .app-tabs a,.app-tabs button {flex-direction:row;gap:4px;min-height:44px}
  .app-tabs a span,.app-tabs button span {min-width:34px}
}

#install-home {
  display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:44px;
  margin-block-end:var(--row-gap);padding:5px 12px;border:1px solid var(--line);border-radius:var(--panel-radius);
  background:var(--card);color:var(--accent);font-size:.94rem;line-height:1.5;
}
#install-home .ic {width:20px;height:20px}
#install-sheet ol {padding-inline-start:1.7em;margin:0}
#install-sheet li {padding-inline-start:.2em;margin-block:6px}
#install-sheet li::marker {color:var(--accent);font-weight:bold}
#install-sheet .action-row {margin-top:15px}
#install-url,#install-copy-status:not(:empty) {margin-top:9px}
