/* سلسلة الأثر. One quiet page: the text is the hero, framed by a manuscript double rule.
   Two type families: Amiri (texts, headings) and IBM Plex Sans Arabic (interface). */

:root {
  --paper: #FAF8F2; --surface: #FFFEFA; --ink: #17251E; --muted: #66736B; --line: #E3DFD3;
  --leaf: #1F6A45; --leaf-2: #5E9F72; --on-leaf: #FFFEFA; --bark: #6A4B32;
  --gold: #B08A32; --flower: #D4718A; --grain: #CB9A2E; --date: #7C4120; --date-2: #9C5A2C;
  --c-dua: #9A630F; --c-dhikr: #2C7448; --c-sunnah: #256A7E; --c-khuluq: #A14E38; --c-ayah: #4E4391;
  --font-text: 'Amiri', 'Traditional Arabic', serif;
  --font-quran: 'Amiri Quran', 'Amiri', serif;
  --font-ui: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
  --font-mark: 'Aref Ruqaa', 'Amiri', serif;
  --shadow: 0 10px 30px -18px rgba(23, 37, 30, .35);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #0C1512; --surface: #131F1A; --ink: #ECEFE6; --muted: #98A69C; --line: #25342C;
    --leaf: #74C794; --leaf-2: #3F8F5B; --on-leaf: #0C1512; --bark: #B08A66;
    --gold: #D9B35C; --flower: #F2A3B6; --grain: #E9BE5C; --date: #B8713F; --date-2: #D08E58;
    --c-dua: #E0A84A; --c-dhikr: #6CC58A; --c-sunnah: #6FB7CC; --c-khuluq: #E08E77; --c-ayah: #A59BEA;
    --shadow: 0 12px 30px -16px rgba(0, 0, 0, .8);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0C1512; --surface: #131F1A; --ink: #ECEFE6; --muted: #98A69C; --line: #25342C;
  --leaf: #74C794; --leaf-2: #3F8F5B; --on-leaf: #0C1512; --bark: #B08A66;
  --gold: #D9B35C; --flower: #F2A3B6; --grain: #E9BE5C; --date: #B8713F; --date-2: #D08E58;
  --c-dua: #E0A84A; --c-dhikr: #6CC58A; --c-sunnah: #6FB7CC; --c-khuluq: #E08E77; --c-ayah: #A59BEA;
  --shadow: 0 12px 30px -16px rgba(0, 0, 0, .8);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); font-family: var(--font-ui); font-size: 16px; line-height: 1.7; -webkit-text-size-adjust: 100%; padding-bottom: 68px; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--leaf); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.wrap { max-width: 1060px; margin: 0 auto; padding: 0 18px; }
.col { max-width: 620px; margin: 0 auto; }
.muted { color: var(--muted); }
.tiny { font-size: .8rem; color: var(--muted); margin: 0; }
.center { text-align: center; }

/* ---------- bar and navigation ---------- */
.bar { position: sticky; top: 0; z-index: 20; background: var(--paper); }
.bar .wrap { display: flex; align-items: center; gap: 12px; min-height: 54px; padding-block: 8px; }
.brand { display: flex; align-items: center; gap: 8px; font-family: var(--font-mark); font-weight: 700; font-size: 1.45rem; line-height: 1; margin-inline-end: auto; }
.brand svg { width: 26px; height: 26px; flex: none; }
.tabs { display: none; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.tabs button { border: 0; background: none; padding: 6px 16px; border-radius: 999px; font-weight: 500; font-size: .95rem; color: var(--muted); }
.tabs button[aria-current="page"] { background: var(--leaf); color: var(--on-leaf); }
.bottom { position: fixed; inset: auto 0 0 0; z-index: 30; display: flex; background: var(--surface); border-top: 1px solid var(--line); }
.bottom button { flex: 1; border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 4px 10px; font-size: .8rem; font-weight: 500; color: var(--muted); }
.bottom svg { width: 24px; height: 24px; }
.bottom button[aria-current="page"] { color: var(--leaf); font-weight: 600; }
@media (min-width: 960px) { .bottom { display: none; } .tabs { display: flex; } body { padding-bottom: 0; } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--leaf); background: var(--leaf); color: var(--on-leaf); padding: 12px 22px; border-radius: 10px; font-weight: 600; font-size: 1rem; text-decoration: none; text-align: center; }
.btn.ghost { background: transparent; color: var(--leaf); }
.btn.small { padding: 6px 14px; font-size: .9rem; }
.linkish { border: 0; background: none; color: var(--leaf); font-weight: 600; font-size: .92rem; padding: 4px 0; text-decoration: underline; text-underline-offset: 4px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.actions .btn { flex: 1 1 150px; }
.send { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; width: 100%; }
.send > span { font-size: .86rem; color: var(--muted); font-weight: 600; }
.pill { border: 1px solid var(--leaf); color: var(--leaf); background: none; border-radius: 999px; padding: 5px 11px; font-size: .86rem; font-weight: 600; text-decoration: none; line-height: 1.5; white-space: nowrap; }
.pill.more { border-color: var(--line); color: var(--muted); font-weight: 500; }

/* ---------- home ---------- */
.home { display: flex; flex-direction: column; gap: 18px; padding-block: 6px 4px; }
.kicker { text-align: center; font-size: .9rem; color: var(--muted); margin: 0; }
.kicker b { color: var(--ink); font-weight: 600; }
.done-line { text-align: center; margin: 6px 0 0; font-size: .9rem; color: var(--leaf); font-weight: 600; }
.today { border-block: 3px double var(--gold); padding: 22px 4px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.today .lbl { margin: 0; font-size: .82rem; font-weight: 600; color: var(--gold); }
.today h2 { font-family: var(--font-text); font-size: 1.55rem; font-weight: 700; line-height: 1.3; margin: 0; text-wrap: balance; }
.today .matn { font-size: clamp(1.5rem, 5.4vw, 2rem); line-height: 2.2; text-wrap: balance; }
.today .matn.q { line-height: 2.6; }
.today .matn.long { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.today .actions { width: 100%; max-width: 440px; margin-top: 6px; }
.src-link { border: 0; background: none; color: var(--muted); font-size: .88rem; padding: 2px 6px; }
.src-link::after { content: " ‹"; color: var(--leaf); }
.next-h { font-size: .82rem; font-weight: 600; color: var(--muted); margin: 8px 2px 0; }
.next { list-style: none; margin: 0; padding: 0; }
.next li { border-top: 1px solid var(--line); }
.next button { width: 100%; border: 0; background: none; display: flex; align-items: center; gap: 10px; padding: 12px 2px; text-align: start; }
.next b { flex: 1; min-width: 0; font-family: var(--font-text); font-size: 1.25rem; line-height: 1.4; }
.next .when-l { font-size: .8rem; color: var(--muted); white-space: nowrap; }
.next .chev { color: var(--muted); font-size: 1.2rem; line-height: 1; }
.strip { display: flex; align-items: center; gap: 12px; border: 0; border-top: 1px solid var(--line); background: none; padding: 12px 2px; text-align: start; width: 100%; }
.strip canvas { width: 86px; height: 70px; flex: none; display: block; }
.strip .t { flex: 1; min-width: 0; line-height: 1.5; }
.strip .t b { display: block; }
.strip .t span { font-size: .84rem; color: var(--muted); }
.strip .go { color: var(--leaf); font-weight: 600; font-size: .9rem; white-space: nowrap; }
.when > summary { cursor: pointer; color: var(--leaf); font-weight: 600; font-size: .92rem; list-style: none; display: inline-flex; align-items: center; gap: 6px; padding: 6px 0; }
.when > summary::-webkit-details-marker { display: none; }
.when > summary::after { content: "‹"; transform: rotate(-90deg); display: inline-block; font-size: 1.1rem; line-height: 1; }
.when[open] > summary::after { transform: rotate(90deg); }
.when .chips { margin: 6px 0; }

/* ---------- chips ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.chip { flex: none; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 14px; font-size: .9rem; display: flex; gap: 8px; align-items: center; white-space: nowrap; }
.chip i { font-style: normal; color: var(--muted); font-size: .78rem; font-variant-numeric: tabular-nums; }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.chip .mark { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip[aria-pressed="true"] i { color: inherit; opacity: .7; }
.chip.now { border-color: var(--leaf); }
.chip.now::after { content: "الآن"; font-size: .68rem; color: var(--leaf); font-weight: 600; }
.chip[aria-pressed="true"].now::after { color: inherit; }

/* ---------- library ---------- */
.origin { margin: 18px 0 0; border-inline-start: 3px solid var(--leaf); padding: 2px 16px 2px 0; }
.origin blockquote { margin: 0; font-family: var(--font-text); font-size: clamp(1.25rem, 3.4vw, 1.55rem); line-height: 2; }
.origin figcaption { font-size: .84rem; color: var(--muted); }
.tools { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 22px 0 14px; }
.tools h2 { font-family: var(--font-text); font-size: 1.5rem; font-weight: 700; margin: 0; line-height: 1.2; margin-inline-end: auto; }
.search { flex: 1 1 220px; max-width: 340px; display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; }
.search svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.search input { flex: 1; min-width: 0; border: 0; background: none; color: var(--ink); font: inherit; padding: 9px 0; outline: none; }
.search:focus-within { border-color: var(--leaf); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 12px; margin-top: 12px; }
.packet { text-align: start; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 14px 12px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.packet:hover { box-shadow: var(--shadow); }
.packet.did { border-color: var(--leaf); }
.packet .meta { display: flex; justify-content: space-between; align-items: center; font-size: .76rem; color: var(--muted); gap: 6px; }
.packet h3 { font-family: var(--font-text); font-weight: 700; font-size: 1.22rem; line-height: 1.4; margin: 0; text-wrap: balance; }
.packet .foot { margin-top: auto; padding-top: 4px; display: flex; justify-content: space-between; align-items: center; gap: 6px; flex-wrap: wrap; }
.cat { display: inline-flex; align-items: center; gap: 6px; color: var(--c); font-weight: 600; }
.cat::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.did-mark { color: var(--leaf); font-weight: 600; }
.stamp { display: inline-block; border: 1px solid currentColor; color: var(--leaf); font-size: .72rem; font-weight: 500; padding: 1px 9px; border-radius: 4px; }
.stamp.q { color: var(--c-ayah); }
.badge { font-size: .72rem; color: var(--muted); white-space: nowrap; }
.empty { padding: 28px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 8px; }
.principles { display: grid; grid-template-columns: 1fr; gap: 14px; margin: 34px 0 0; padding: 0; list-style: none; }
@media (min-width: 700px) { .principles { grid-template-columns: repeat(3, 1fr); } }
.principles li { border-top: 2px solid var(--ink); padding-top: 10px; min-width: 0; }
.principles b { font-family: var(--font-text); font-size: 1.2rem; display: block; line-height: 1.4; }
.principles span { color: var(--muted); font-size: .93rem; }
footer { margin-top: 34px; border-top: 1px solid var(--line); padding-block: 18px 30px; color: var(--muted); font-size: .84rem; }
footer p { margin: 0 0 6px; max-width: 70ch; }

/* ---------- sheet ---------- */
.scrim { position: fixed; inset: 0; z-index: 70; background: rgba(10, 18, 14, .55); display: none; align-items: flex-end; justify-content: center; }
.scrim.on { display: flex; }
@media (min-width: 700px) { .scrim { align-items: center; padding: 24px; } }
.sheet { background: var(--surface); color: var(--ink); width: 100%; max-width: 640px; max-height: 92vh; overflow: auto; border-radius: 16px 16px 0 0; border: 1px solid var(--line); box-shadow: var(--shadow); animation: rise .22s ease; }
@media (min-width: 700px) { .sheet { border-radius: 14px; } }
@keyframes rise { from { transform: translateY(18px); opacity: .6; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sheet { animation: none; } }
.sheet header { position: sticky; top: 0; z-index: 1; background: var(--surface); display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--line); font-size: .85rem; color: var(--muted); }
.x { border: 1px solid var(--line); background: none; border-radius: 50%; width: 34px; height: 34px; display: grid; place-items: center; font-size: 1.1rem; line-height: 1; flex: none; }
.sheet .body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.sheet .body > * { min-width: 0; }
.sheet h3 { font-family: var(--font-text); font-size: 1.7rem; font-weight: 700; line-height: 1.3; margin: 0; text-wrap: balance; }
.pre { color: var(--muted); margin: 0; font-size: .95rem; }
.matn { font-family: var(--font-text); font-size: clamp(1.4rem, 4.4vw, 1.7rem); line-height: 2.15; margin: 0; }
.matn.q { font-family: var(--font-quran); line-height: 2.6; }
.matn.sm { font-size: 1.25rem; line-height: 2.05; }
.nar { color: var(--muted); font-size: .9rem; margin: 0; }
.verified { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: .88rem; }
.verified svg { width: 22px; height: 22px; color: var(--leaf); flex: none; margin-top: 2px; }
.verified b { display: block; }
.verified span { color: var(--muted); }
.hint { background: var(--paper); border-radius: 8px; padding: 10px 14px; font-size: .95rem; }
.hint b { display: block; font-size: .8rem; color: var(--muted); font-weight: 500; }
.sec-l { font-size: .82rem; color: var(--muted); font-weight: 600; margin: 4px 0 -6px; }
.done { text-align: center; display: flex; flex-direction: column; gap: 10px; align-items: center; padding-block: 10px; }
.done svg { width: 74px; height: 74px; }
.done p { margin: 0; color: var(--muted); }
.ask { display: flex; flex-direction: column; gap: 8px; }
.intro { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; counter-reset: s; }
.intro li { counter-increment: s; display: flex; gap: 12px; align-items: flex-start; }
.intro li::before { content: counter(s, arabic-indic); font-family: var(--font-text); font-size: 2rem; font-weight: 700; line-height: 1; color: var(--leaf); flex: none; width: 1.1em; }
.intro b { display: block; font-size: 1.05rem; }
.intro span { color: var(--muted); font-size: .93rem; }

/* counter */
.phrase { text-align: center; font-family: var(--font-text); font-size: 1.45rem; line-height: 1.9; margin: 0; min-height: 1.9em; }
.tapper { align-self: center; width: 176px; height: 176px; border-radius: 50%; border: 0; padding: 9px; background: conic-gradient(var(--leaf) calc(var(--p, 0) * 1%), var(--line) 0); display: grid; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.tapper.free { background: var(--leaf); }
.tapper > span { border-radius: 50%; background: var(--paper); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.tapper b { font-family: var(--font-text); font-size: 2.6rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tapper i { font-style: normal; font-size: .82rem; color: var(--muted); }
.tapper:active > span { background: var(--surface); }
.tap-row { display: flex; gap: 18px; justify-content: center; align-items: center; }

/* verses on the page */
.verses { border-block: 3px double var(--gold); padding: 14px 2px; text-align: center; display: flex; flex-direction: column; gap: 6px; }
.verses .vh { margin: 0; font-size: .82rem; font-weight: 600; color: var(--gold); }
.verses .matn { line-height: 2.7; }
.verses .bsm { font-size: 1.3rem; }
.ay { color: var(--gold); font-family: var(--font-text); font-size: .8em; white-space: nowrap; }

/* sending */
.card-prev { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px 14px; display: flex; flex-direction: column; gap: 8px; }
.card-prev h4 { font-family: var(--font-text); font-size: 1.5rem; line-height: 1.3; margin: 0; }
.card-prev .matn { font-size: 1.2rem; line-height: 2; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-prev .base { display: flex; justify-content: space-between; align-items: center; gap: 8px; border-top: 1px solid var(--line); padding-top: 8px; flex-wrap: wrap; }
.card-prev .mark { display: flex; align-items: center; gap: 6px; font-family: var(--font-mark); font-size: 1.1rem; }
.card-prev .mark svg { width: 18px; height: 18px; }
.linkbox { display: flex; gap: 8px; align-items: center; border: 1px dashed var(--leaf); border-radius: 8px; padding: 8px 10px; flex-wrap: wrap; }
.linkbox code { flex: 1 1 180px; min-width: 0; direction: ltr; text-align: left; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .84rem; overflow-wrap: anywhere; }
.stories { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 10px; scrollbar-width: thin; }
.story { flex: none; width: min(64vw, 250px); aspect-ratio: 9 / 16; scroll-snap-align: center; margin: 0; background: #123A2A; border-radius: 14px; overflow: hidden; }
.story img { display: block; width: 100%; height: 100%; }
.st-msg { font-size: .9rem; color: var(--leaf); font-weight: 600; margin: 0; min-height: 1.6em; }

/* ---------- tree page ---------- */
.tree-layout { display: grid; grid-template-columns: 1fr; gap: 16px; padding-block: 12px 20px; }
@media (min-width: 800px) { .tree-layout { grid-template-columns: 1.25fr .75fr; align-items: start; } }
.tree-layout > * { min-width: 0; }
.tree-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.tree-card canvas { width: 100%; aspect-ratio: 1 / 1; display: block; max-height: 66vh; cursor: pointer; touch-action: manipulation; }
.seg { display: flex; gap: 3px; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 3px; margin-bottom: 8px; }
.seg button { flex: 1; min-width: 0; border: 0; background: none; border-radius: 999px; padding: 7px 6px; font-size: .92rem; font-weight: 500; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.viz-cap { font-size: .84rem; color: var(--muted); margin: 0 4px 4px; min-height: 1.7em; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .82rem; color: var(--muted); margin: 8px 4px 0; padding: 0; list-style: none; }
.legend li { display: flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }
.leaf-info { border-top: 1px solid var(--line); margin-top: 8px; padding: 10px 4px 2px; min-height: 4.6em; font-size: .95rem; }
.leaf-info b { font-family: var(--font-text); font-size: 1.2rem; }
.reach { font-family: var(--font-text); font-weight: 700; font-size: clamp(1.7rem, 5vw, 2.4rem); line-height: 1.35; margin: 0 0 4px; text-wrap: balance; }
.reach b { color: var(--leaf); font-variant-numeric: tabular-nums; }
.sub { color: var(--muted); margin: 0 0 14px; }
.rings { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; }
.rings li { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 8px; text-align: center; min-width: 0; }
.rings b { display: block; font-size: 1.5rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.rings span { font-size: .78rem; color: var(--muted); }
h2.sec { font-size: .95rem; font-weight: 600; margin: 0 0 8px; }
.mine { list-style: none; margin: 0 0 16px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.mine li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); align-items: center; }
.mine li:last-child { border-bottom: 0; }
.mine .t { font-family: var(--font-text); font-weight: 700; font-size: 1.15rem; min-width: 0; }
.mine .n { font-variant-numeric: tabular-nums; color: var(--leaf); font-weight: 600; white-space: nowrap; font-size: .92rem; }
.note { font-size: .86rem; color: var(--muted); border-inline-start: 3px solid var(--gold); padding: 2px 12px 2px 0; margin: 0 0 14px; }
.chain-box { padding: 8px 4px 4px; display: flex; flex-direction: column; gap: 12px; }
.c-title { margin: 0; font-size: .95rem; }
.c-title b { font-family: var(--font-text); font-size: 1.2rem; }
.chain { list-style: none; margin: 6px auto 0; padding: 0; display: flex; flex-direction: column; gap: 18px; width: 100%; max-width: 340px; }
.chain li { position: relative; border: 2px solid var(--line); border-radius: 999px; padding: 7px 20px; display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--paper); }
.chain li + li::before { content: ""; position: absolute; top: -26px; left: calc(50% - 8px); width: 16px; height: 30px; border: 2.5px solid var(--bark); border-radius: 9px; }
.chain li b { font-family: var(--font-text); font-size: 1.2rem; line-height: 1.5; }
.chain li span { font-size: .8rem; color: var(--muted); }
.chain li.src { border-style: dashed; }
.chain li.me { border-color: var(--leaf); }
.chain li.end { border-color: var(--gold); background: var(--surface); }

/* Sender line on a received seed, and the optional name on the tree page */
.from { margin: 0; padding: 10px 12px; border-inline-start: 3px solid var(--gold); background: color-mix(in srgb, var(--gold) 9%, transparent); border-radius: 6px; font-size: .93rem; }
.myname { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.myname label { font-weight: 600; font-size: .95rem; }
.myname .row { display: flex; gap: 8px; }
.myname input { flex: 1; min-width: 0; font: inherit; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; }
.myname input:focus-visible { outline: 2px solid var(--leaf); outline-offset: 1px; }

/* ---------- phase 3: large text ---------- */
html.big { font-size: 118%; }
.aa { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; min-width: 44px; height: 38px; padding: 0 12px; font-weight: 600; color: var(--ink); }
.aa[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.card h2 { font-family: var(--font-text); font-size: 1.35rem; margin: 0; line-height: 1.3; }
.card .pre { margin: 0; }
.card-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.row-links { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; }
.chips.wrap { flex-wrap: wrap; overflow: visible; }

/* place and prayer times */
.city { display: inline-flex; align-items: center; gap: 3px; border: 0; background: none; color: var(--leaf); font-weight: 600; font-size: inherit; padding: 2px 4px; text-decoration: underline dotted; text-underline-offset: 4px; }
.city:disabled { color: var(--muted); text-decoration: none; cursor: default; }
.city svg { width: 15px; height: 15px; }
.times { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; margin: 8px 0 0; padding: 0; list-style: none; }
.times li { text-align: center; border-radius: 8px; padding: 4px 2px; }
.times b { display: block; font-size: .74rem; color: var(--muted); font-weight: 500; }
.times span { font-variant-numeric: tabular-nums; font-size: .88rem; font-weight: 600; white-space: nowrap; }
.times li.now { background: var(--leaf); color: var(--on-leaf); }
.times li.now b { color: var(--on-leaf); opacity: .85; }

/* وِردي */
.prog { height: 6px; background: var(--line); border-radius: 6px; overflow: hidden; }
.prog i { display: block; height: 100%; background: var(--leaf); transition: width .3s; }
.wird { list-style: none; margin: 0; padding: 0; }
.wird li + li { border-top: 1px solid var(--line); }
.wird button { width: 100%; border: 0; background: none; display: flex; align-items: center; gap: 12px; padding: 10px 2px; text-align: start; min-height: 48px; }
.wird .ck { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; color: transparent; flex: none; font-size: .9rem; }
.wird .on .ck { background: var(--leaf); border-color: var(--leaf); color: var(--on-leaf); }
.wird b { flex: 1; min-width: 0; font-family: var(--font-text); font-size: 1.2rem; line-height: 1.4; }
.wird span.muted { font-size: .78rem; white-space: nowrap; }

/* how far a seed went */
.reach-box { width: 100%; max-width: 440px; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; text-align: start; }
.reach-h { font-size: .82rem; color: var(--muted); font-weight: 600; }
.nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 0; padding: 0; list-style: none; }
.nums li { text-align: center; }
.nums b { display: block; font-family: var(--font-text); font-size: 1.55rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.nums span { font-size: .76rem; color: var(--muted); }
.reach-box .flags { margin: 0; font-size: 1.05rem; line-height: 1.4; letter-spacing: 1px; }
.reach-box .last { margin: 0; font-size: .86rem; border-top: 1px solid var(--line); padding-top: 8px; }
.reach-box .last span { color: var(--muted); }

/* review */
.dots { display: flex; gap: 6px; justify-content: center; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.dots i.d { background: var(--leaf); }
.q-opts { display: flex; flex-direction: column; gap: 8px; }
.q-opts button { border: 1px solid var(--line); background: var(--paper); border-radius: 10px; padding: 11px 14px; text-align: start; font-size: 1rem; min-height: 46px; }
.q-opts button.ok { border-color: var(--leaf); background: color-mix(in srgb, var(--leaf) 10%, var(--surface)); color: var(--leaf); font-weight: 600; }
.q-opts button.no { border-color: #C9473F; color: #B03A33; }

/* hold to say */
.hold { position: relative; overflow: hidden; border: 1px solid var(--leaf); background: var(--surface); color: var(--leaf); border-radius: 12px; padding: 16px; font-weight: 600; font-size: 1rem; width: 100%; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; min-height: 56px; }
.hold .fill { position: absolute; inset: 0 0 0 auto; width: 0; background: var(--leaf); }
.hold .lab { position: relative; z-index: 1; transition: color .2s; }
.hold.go .lab { color: var(--on-leaf); }
.hold-msg { text-align: center; font-size: .84rem; color: var(--muted); margin: -6px 0 0; min-height: 1.5em; }

/* verses, read or heard */
.player { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; }
.play { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--leaf); color: var(--on-leaf); display: grid; place-items: center; flex: none; }
.play svg { width: 18px; height: 18px; }
.pl-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.pl-mid select { border: 0; background: none; font: inherit; font-size: .9rem; font-weight: 600; color: var(--ink); padding: 0; }
.player .track { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.player .track i { display: block; height: 100%; width: 0; background: var(--leaf); transition: width .25s linear; }
.vline { border: 0; background: none; font: inherit; color: inherit; line-height: inherit; padding: 0 4px; border-radius: 8px; cursor: pointer; transition: background .3s; display: inline; }
.vline.on { background: color-mix(in srgb, var(--gold) 22%, transparent); }
.vline.read { color: var(--leaf); }
.vline.read .ay::after { content: " ✓"; font-family: var(--font-ui); font-size: .6em; color: var(--leaf); }
.bsm.center, .nar.center { text-align: center; }

/* reminders */
.when-pick { display: flex; flex-direction: column; gap: 8px; }
.when-pick .chips { flex-wrap: wrap; overflow: visible; }

/* word meanings */
.matn .g { border: 0; background: none; font: inherit; color: inherit; padding: 0; line-height: inherit; text-decoration: underline dotted var(--gold); text-decoration-thickness: 2px; text-underline-offset: 7px; cursor: pointer; border-radius: 4px; }
.matn .g.on { background: color-mix(in srgb, var(--gold) 18%, transparent); }
.tip { width: 100%; background: var(--ink); color: var(--paper); border-radius: 10px; padding: 10px 14px; text-align: start; font-size: .95rem; margin: 0; }
.tip b { font-family: var(--font-text); font-size: 1.15rem; color: var(--gold); }
.tip span { display: block; font-size: .74rem; opacity: .75; }

/* voice message */
.pill svg { width: 14px; height: 14px; vertical-align: -2px; margin-inline-end: 3px; }
.prompt { font-family: var(--font-text); font-size: 1.45rem; line-height: 2.1; text-align: center; margin: 0; }
.prompt .w { color: color-mix(in srgb, var(--ink) 35%, transparent); transition: color .2s; }
.prompt .w.on { color: var(--ink); }
.rec { align-self: center; width: 84px; height: 84px; border-radius: 50%; border: 6px solid color-mix(in srgb, #C9473F 25%, transparent); background: #C9473F; color: #fff; display: grid; place-items: center; }
.rec svg { width: 30px; height: 30px; }
.rec.live { border-radius: 26px; animation: recpulse 1.2s infinite; }
@keyframes recpulse { 50% { box-shadow: 0 0 0 10px rgba(201, 71, 63, .15); } }
.rtime { text-align: center; color: var(--muted); margin: -4px 0 0; font-size: .9rem; font-variant-numeric: tabular-nums; }
#vback { display: flex; flex-direction: column; gap: 12px; }
#vback[hidden] { display: none; }

/* season card button */
.btn.season { background: linear-gradient(170deg, #1B2B4B, #0E1830); border-color: #1B2B4B; color: #F2D58A; }

/* toast */
.toast { position: fixed; z-index: 60; inset-inline: 12px; bottom: 84px; max-width: 520px; margin: 0 auto; background: var(--ink); color: var(--paper); border-radius: 14px; padding: 12px 16px; display: flex; gap: 12px; align-items: center; justify-content: space-between; box-shadow: var(--shadow); transform: translateY(160%); opacity: 0; transition: transform .4s cubic-bezier(.2, .9, .3, 1.2), opacity .3s; pointer-events: none; }
.toast.on { transform: none; opacity: 1; pointer-events: auto; }
.toast .linkish { color: var(--gold); white-space: nowrap; }
@media (min-width: 960px) { .toast { bottom: 24px; } }
@media (prefers-reduced-motion: reduce) { .toast, .hold .lab, .vline, .prog i { transition: none; } .rec.live { animation: none; } }

/* bot check: hidden unless Cloudflare asks the visitor to tick a box */
.captcha { position: fixed; z-index: 80; inset-inline: 0; bottom: 90px; display: flex; justify-content: center; }

/* English: the published translation under the Arabic text, and left-to-right layout. */
.tr { font-family: var(--font-ui); font-size: 1rem; line-height: 1.65; color: var(--ink); margin: 8px 0 0; text-align: start; text-wrap: pretty; }
.tr p { margin: 0 0 6px; }
.tr-by { display: block; margin-top: 4px; font-size: .78rem; color: var(--muted); }
.today .tr { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
html[lang="en"] .matn { text-align: right; }
html[lang="en"] .matn.center, html[lang="en"] .verses .matn { text-align: center; }
html[lang="en"] .brand { font-family: var(--font-text); letter-spacing: .2px; }
.lang { font-size: .82rem; min-width: 40px; padding: 0 10px; }
html[lang="en"] .src-link::after { content: " ›"; }
html[lang="en"] .origin blockquote { direction: rtl; text-align: right; }

/* ---------- batch 1: lighter home, clearer text (design review, Dec 2026) ---------- */
.send { gap: 8px; }
.pill.big { min-height: 44px; padding: 8px 16px; font-size: .92rem; display: inline-flex; align-items: center; gap: 6px; }
.pill.big svg { width: 18px; height: 18px; margin: 0; }
.pill.wa { background: var(--leaf); color: var(--on-leaf); border-color: var(--leaf); }
.pill.big.more { border-color: var(--line); color: var(--ink); font-weight: 600; }
.ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; width: 100%; }
.way { display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 76px; justify-content: center; border: 1px solid var(--line); background: var(--paper); border-radius: 14px; font-weight: 600; font-size: .9rem; color: var(--ink); }
.way svg { width: 24px; height: 24px; color: var(--leaf); }
.nextp { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin-top: 8px; padding: 8px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; font-size: .9rem; }
.nextp .np-l { color: var(--muted); font-size: .8rem; }
.nextp b { color: var(--leaf); font-variant-numeric: tabular-nums; }
.nextp .np-in { color: var(--ink); }
.nextp .np-all { margin-inline-start: auto; font-size: .84rem; min-height: 32px; }
/* readability: the source line and small text darker; shaded words easy to spot */
.nar, .src-link { color: color-mix(in srgb, var(--ink) 72%, var(--paper)); }
.src-link { font-size: .92rem; min-height: 40px; }
.matn .g { text-decoration: none; background: linear-gradient(transparent 66%, color-mix(in srgb, var(--gold) 26%, transparent) 66%); border-radius: 2px; }
.ghint { margin: 2px 0 0; font-size: .84rem; color: var(--gold); text-align: center; }
.ghint::before { content: "✦ "; }
.cv { position: relative; }
.cv canvas { position: relative; z-index: 1; }
.ghost-box { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.ghost-box svg { width: 100%; height: 100%; opacity: .2; }
.ghost-tag { position: absolute; top: 6px; inset-inline-start: 50%; transform: translateX(50%); background: var(--surface); border: 1px dashed var(--gold); color: var(--gold); border-radius: 999px; padding: 2px 12px; font-size: .8rem; font-weight: 600; white-space: nowrap; }
html[dir="ltr"] .ghost-tag { transform: translateX(-50%); }
.done svg.grow { width: 180px; height: 135px; }
.grow .new-root { stroke-dasharray: 1; stroke-dashoffset: 1; animation: root-in .9s .15s ease-out forwards; }
@keyframes root-in { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .grow .new-root { animation: none; stroke-dashoffset: 0; } }
.set-wrap { position: relative; }
.aa.gear { display: grid; place-items: center; padding: 0; width: 44px; height: 44px; }
.aa.gear svg { width: 21px; height: 21px; }
.menu { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; z-index: 30; width: 250px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 6px; }
.mrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 8px; font-size: .92rem; }
.mrow + .mrow { border-top: 1px solid var(--line); }
.mseg { display: inline-flex; gap: 4px; }
.mseg button { border: 1px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 9px; min-height: 36px; padding: 0 10px; font-size: .86rem; }
.mseg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.packet h3 { font-size: 1.08rem; line-height: 1.35; }
.packet .ex { margin: 0; font-family: var(--font-text); font-size: .98rem; line-height: 1.75; color: color-mix(in srgb, var(--ink) 70%, var(--paper)); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.grid { align-items: stretch; }
.tree-layout > * { min-width: 0; }
.myname > * { min-width: 0; } .myname input { width: 100%; }

/* ---------- batch 2: install card, daily reminders, counter, saved seeds, first visit ---------- */
.inst-card { border: 1.5px solid var(--gold); }
.inst-h { display: flex; align-items: center; gap: 10px; }
.inst-h h2 { font-family: var(--font-text); font-size: 1.15rem; margin: 0; line-height: 1.35; }
.inst-ic { width: 40px; height: 40px; flex: none; border-radius: 11px; background: var(--paper); border: 1px solid var(--line); display: grid; place-items: center; }
.inst-ic svg { width: 26px; height: 26px; }
.inst-card .sub { margin: 6px 0 10px; color: color-mix(in srgb, var(--ink) 72%, var(--paper)); font-size: .9rem; }
.inst-row { display: flex; gap: 8px; flex-wrap: wrap; }
.inst-steps { margin: 12px 0 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 8px; }
.inst-steps li { counter-increment: s; display: flex; align-items: center; gap: 8px; background: var(--paper); border-radius: 12px; padding: 8px 10px; font-size: .9rem; }
.inst-steps li::before { content: counter(s); flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--leaf); color: var(--on-leaf); font-size: .78rem; font-weight: 700; }
.inst-steps .ic { width: 18px; height: 18px; vertical-align: -4px; color: #0a7aff; }
.toggles { display: grid; border-top: 1px solid var(--line); }
.tog { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 54px; border-bottom: 1px solid var(--line); font-weight: 600; cursor: pointer; }
input.sw { appearance: none; width: 50px; height: 30px; border-radius: 999px; background: var(--line); position: relative; flex: none; cursor: pointer; transition: background .2s; margin: 0; }
input.sw::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: inset-inline-start .2s; }
input.sw:checked { background: var(--leaf); }
input.sw:checked::after { inset-inline-start: 23px; }
input.sw:disabled { opacity: .5; }
input.sw:focus-visible { outline: 2px solid var(--leaf); outline-offset: 2px; }
.resume { text-align: center; font-size: .9rem; margin: 0; color: var(--leaf); font-weight: 600; }
.undo { display: flex; justify-content: space-between; align-items: center; background: var(--ink); color: var(--paper); border-radius: 12px; padding: 6px 6px 6px 14px; margin: 0 0 6px; font-size: .9rem; }
html[dir="rtl"] .undo { padding: 6px 14px 6px 6px; }
.undo button { border: 0; background: none; color: var(--gold); font-weight: 700; min-height: 40px; padding: 0 12px; }
.linkish.fav[aria-pressed="true"] { color: var(--flower); }
.try .matn { font-size: 1.7rem; margin: 4px 0; }
.try-tap { margin: 6px auto 10px; width: 132px; height: 132px; }
.try .lead { font-size: 1rem; line-height: 1.8; margin: 4px 0 10px; }
html[lang="en"] .try .matn { text-align: center; }

/* ---------- batch 3 ---------- */
/* printable card (A6) */
.pseg { align-self: center; }
.pcard { width: min(100%, 340px); align-self: center; background: #fff; color: #17251E; border: 3px double #B08A32; border-radius: 6px; padding: 16px 16px 12px; display: grid; gap: 8px; text-align: center; box-shadow: var(--shadow); font-family: var(--font-text); }
.pc-t { font-size: 1.3rem; }
.pc-pre { margin: 0; font-size: .9rem; color: #4b5a51; font-family: var(--font-ui); }
.pc-m { margin: 0; font-size: 1.2rem; line-height: 1.9; }
.pc-m.long { font-size: 1rem; line-height: 1.75; }
.pc-s { margin: 0; font-size: .82rem; color: #4b5a51; font-family: var(--font-ui); }
.pc-q { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 4px; }
.pc-q .qr { width: 96px; height: 96px; flex: none; display: block; background: #f3f1ea; }
.pc-q .qr svg { width: 100%; height: 100%; display: block; background: #fff; }
.pc-l { font-family: var(--font-ui); font-size: .86rem; font-weight: 600; text-align: start; }
.pc-l small { font-weight: 400; font-size: .7rem; color: #4b5a51; word-break: break-all; }
.pc-f { font-family: var(--font-mark); font-size: 1rem; color: #1F6A45; }
#print-area { display: none; }
@media print {
  @page { size: A6; margin: 6mm; }
  body > *:not(#print-area) { display: none !important; }
  body { background: #fff; padding: 0; }
  #print-area { display: block; }
  #print-area .pcard { width: 100%; box-shadow: none; border-radius: 0; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
/* season a week ahead */
.season-card { position: relative; overflow: hidden; border-radius: 18px; padding: 16px; background: linear-gradient(135deg, #123B2A, #1F6A45); color: #fff; }
.season-card h2 { margin: 0; font-family: var(--font-text); font-size: 1.35rem; line-height: 1.3; position: relative; }
.season-card p { margin: 4px 0 10px; font-size: .86rem; opacity: .9; position: relative; }
.season-card .moon { position: absolute; inset-inline-end: -14px; top: -14px; width: 84px; height: 84px; border-radius: 50%; box-shadow: -14px 10px 0 0 #D9B35C; opacity: .85; }
.season-seeds { display: flex; flex-wrap: wrap; gap: 6px; position: relative; }
.season-seeds button { border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.12); color: #fff; border-radius: 999px; min-height: 40px; padding: 4px 14px; font-weight: 600; font-size: .86rem; }
/* "how are you now?" */
.feel { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 10px; }
.feel-l { width: 100%; font-size: .86rem; color: var(--muted); margin: 0; }
.feel button { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; min-height: 40px; padding: 4px 14px; font-size: .9rem; }
.feel button[aria-pressed="true"] { background: var(--leaf); color: var(--on-leaf); border-color: var(--leaf); }
/* computer screens: the seed on one side, everything around it on the other */
@media (min-width: 960px) {
  .col.home { max-width: none; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 18px 36px; align-items: start; }
  .home > * { grid-column: 2; }
  .home > div:first-child { grid-column: 1 / -1; }
  .home > #today { grid-column: 1; grid-row: 2 / span 8; position: sticky; top: 76px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 22px 28px; }
  .home > #season:empty, .home > #install:empty, .home > #wird:empty, .home > #review:empty { display: none; }
  .home .nextp { max-width: 560px; }
}
.seg.pseg { display: inline-flex; width: auto; gap: 4px; padding: 4px; }
.seg.pseg button { flex: none; padding: 0 18px; min-height: 40px; white-space: nowrap; }
.season-card .moon { top: -18px; bottom: auto; }
.pc-tr { margin: 0; font-family: var(--font-ui); font-size: .82rem; line-height: 1.55; color: #33413a; text-align: left; }
.pc-tr small { color: #6b776f; }

/* ---------- spacing, corners and sizes: one system (design review, Dec 2026) ----------
   Spacing steps 4 · 8 · 12 · 16 · 24 · 32. Corners: 12 small parts, 18 cards and big buttons,
   full round for small pills. Every block starts and ends on the same side margin (16px). */
:root { --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --r-sm: 12px; --r: 18px; }
.wrap { padding-inline: var(--s4); }
.home { gap: var(--s4); padding-block: var(--s1) var(--s2); }
.home > :empty, .home > div:empty { display: none; }
.home > div:first-child { display: grid; gap: var(--s2); }
.home > div:first-child > * { margin: 0; }
.done-line { margin: 0; }
/* header: the gear the size of the other round buttons, centred on the name */
.bar .wrap { min-height: 56px; padding-block: var(--s2); }
.aa.gear { width: 40px; height: 40px; }
.aa.gear svg { width: 20px; height: 20px; }
/* next prayer: one tidy line, "all times" right after the time */
.nextp { margin: 0; padding: var(--s3) var(--s4); border-radius: var(--r); gap: var(--s1) var(--s2); align-items: center; }
.nextp .np-all { margin-inline-start: 0; text-decoration: none; display: inline-flex; align-items: center; gap: 2px; min-height: 28px; font-size: .84rem; }
.nextp .np-all::after { content: "‹"; font-size: 1.1rem; line-height: 1; }
html[dir="ltr"] .nextp .np-all::after { content: "›"; }
.nextp .np-all[aria-expanded="true"]::after { content: "⌃"; font-size: .9rem; }
.times { margin: var(--s2) 0 0; }
/* the seed: equal room above and below the gold rules */
.today { padding-block: var(--s5); gap: var(--s3); }
.today .actions { margin-top: var(--s2); }
/* buttons: the big one and the send row share corners and height */
.btn { border-radius: var(--r); min-height: 52px; }
.btn.small { border-radius: var(--r-sm); min-height: 40px; }
.send { gap: var(--s2); }
.pill.big { border-radius: var(--r); min-height: 48px; padding-inline: var(--s4); }
/* cards and their parts */
.card, .inst-card, .season-card, .packet, .tree-card, .menu, .pcard { border-radius: var(--r); }
.way, .mseg button, .inst-steps li, .undo, .tip { border-radius: var(--r-sm); }
.card { padding: var(--s4); gap: var(--s3); }
.packet { padding: var(--s4); gap: var(--s2); }
.grid { gap: var(--s3); }
.sheet { border-radius: 22px 22px 0 0; }
.sheet:focus { outline: none; }
@media (min-width: 700px) { .sheet { border-radius: 22px; } }

/* ---------- every screen size (design review, Dec 2026) ----------
   phone < 700 · tablet 700–959 (one column, wider) · computer ≥ 960 (top tabs, two columns). */
/* tablet: header, page and footer share one width, so nothing hangs out at the edges */
@media (min-width: 700px) and (max-width: 959px) {
  .wrap { max-width: 760px; }
  .col { max-width: none; }
  .today { padding-inline: var(--s5); }
  .today .actions, .today .send { max-width: 520px; margin-inline: auto; width: 100%; }
}
/* small phones: the prayer line on one row */
@media (max-width: 389px) { .nextp .np-l { display: none; } .nextp { padding-inline: var(--s3); } }
/* computer: the next-prayer box as wide as its row, the seed card's buttons not stretched */
@media (min-width: 960px) {
  .home .nextp { max-width: none; }
  .home > #today .actions, .home > #today .send { max-width: 460px; margin-inline: auto; width: 100%; }
  .home > .strip { border: 1px solid var(--line); border-radius: var(--r); padding: var(--s3) var(--s4); background: var(--surface); }
}
/* library cards: never narrower than a readable card, at most four in a row */
.grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 168px), 1fr)); }
@media (min-width: 960px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* footer: same side margin, less empty space under it */
footer { margin-top: var(--s6); padding-block: var(--s4) var(--s5); }
footer p { line-height: 1.7; }

/* ---------- about, privacy, report, explanation ---------- */
.prose h4 { margin: var(--s3) 0 0; font-size: 1rem; }
.prose p, .prose li { font-size: .95rem; line-height: 1.8; margin: 0; }
.prose ul { margin: 0; padding-inline-start: 20px; display: grid; gap: var(--s1); }
.btn.danger { background: #9B1C1C; color: #fff; }
.rep { width: 100%; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper); color: var(--ink); padding: var(--s3); font: inherit; font-size: 1rem; resize: vertical; }
.rep:focus-visible { outline: 2px solid var(--leaf); outline-offset: 1px; }
.explain { border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper); padding: var(--s2) var(--s3); }
.explain summary { cursor: pointer; font-weight: 600; min-height: 36px; display: flex; align-items: center; }
.explain p { margin: var(--s2) 0 0; font-family: var(--font-text); font-size: 1.05rem; line-height: 1.9; }
.explain[lang="en"] p { font-family: var(--font-ui); font-size: .95rem; line-height: 1.65; }
.explain ul { margin: var(--s2) 0 0; padding-inline-start: 20px; font-size: .9rem; display: grid; gap: 4px; }
.explain .src-note { display: block; margin-top: var(--s2); font-size: .78rem; color: var(--muted); }
.tr.none { color: var(--muted); font-size: .88rem; font-style: italic; }
.foot-links { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); }

/* small gold text needs at least 4.5:1 against the page: a deeper gold in light mode
   (#8C6A1E is 4.7:1 on the paper); the big decorative gold stays as it was. */
:root { --gold-ink: #8C6A1E; }
:root[data-theme="dark"] { --gold-ink: var(--gold); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --gold-ink: var(--gold); } }
.today .lbl, .verses .vh, .ghint, .ghost-tag, .lbl, .season-card .lbl { color: var(--gold-ink); }
.ghost-tag { border-color: var(--gold-ink); }

/* ---------- adhkar: the four buttons on home, and the counting page ---------- */
.adh-strip { display: grid; gap: 8px; margin-top: var(--s3, 14px); }
.adh-strip .lbl { margin: 0; font-size: .82rem; font-weight: 600; color: var(--gold-ink, var(--gold)); }
.adh-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.adh-b { border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-sm, 14px); min-height: 64px; display: grid; place-content: center; justify-items: center; gap: 2px; padding: 8px 4px; font-size: .9rem; font-weight: 600; color: var(--ink); text-decoration: none; text-align: center; line-height: 1.3; }
.adh-b i { font-style: normal; font-size: .74rem; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.adh-b.now { background: var(--leaf); border-color: var(--leaf); color: var(--on-leaf); }
.adh-b.now i { color: var(--on-leaf); opacity: .9; }
.adh-b.done:not(.now) i { color: var(--leaf); }
.adh-b:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
@media (max-width: 360px) { .adh-b { font-size: .82rem; } }

/* «وضع التركيز»: the adhkar on a quiet full screen */
body.fx-open { overflow: hidden; }
#v-adhkar { padding: 0; }
.fx { position: fixed; inset: 0; z-index: 60; background: var(--paper); display: flex; flex-direction: column; gap: 6px; padding: max(16px, env(safe-area-inset-top)) 20px max(16px, env(safe-area-inset-bottom)); overflow: hidden; -webkit-user-select: none; user-select: none; touch-action: pan-y; }
@media (min-width: 700px) { .fx { padding-inline: max(20px, calc(50vw - 300px)); } }
.fx-ring { position: absolute; inset: 5px; width: calc(100% - 10px); height: calc(100% - 10px); pointer-events: none; }
.fx-ring rect { fill: none; stroke-width: 4; stroke-linecap: round; transition: stroke-dasharray .35s ease; }
.fx-ring .bg { stroke: var(--line); }
.fx-ring .fg { stroke: var(--leaf); stroke-dasharray: 0 100; }
.fx-segs { display: flex; gap: 4px; margin-top: 4px; }
.fx-segs i { flex: 1; height: 4px; border-radius: 9px; background: var(--line); overflow: hidden; }
.fx-segs b { display: block; height: 100%; background: var(--leaf); transition: width .3s ease; }
.fx-head { display: flex; align-items: center; gap: 12px; font-size: .88rem; color: var(--muted); margin-top: 6px; }
.fx-head b { color: var(--ink); font-weight: 600; }
.fx-x { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 1rem; display: grid; place-items: center; }
.fx-text { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: none; display: flex; flex-direction: column; justify-content: safe center; gap: 12px; text-align: center; padding: 14px 2px; transition: transform .32s ease, opacity .32s ease;
  -webkit-mask-image: linear-gradient(transparent, #000 16px, #000 calc(100% - 22px), transparent); mask-image: linear-gradient(transparent, #000 16px, #000 calc(100% - 22px), transparent); }
.fx-text::-webkit-scrollbar { display: none; }
.fx-text.in { transform: translateX(40px); opacity: 0; transition: none; }
.fx-text.out { transform: translateX(-40px); opacity: 0; }
[dir="ltr"] .fx-text.in { transform: translateX(-40px); }
[dir="ltr"] .fx-text.out { transform: translateX(40px); }
.fx-how { margin: 0; font-size: .88rem; color: var(--muted); }
.fx-tx { margin: 0; font-family: var(--font-text); font-size: clamp(1.55rem, 6.2vw, 2rem); line-height: 2.1; text-wrap: balance; }
.fx-tx.q { font-family: var(--font-quran); font-size: clamp(1.45rem, 5.8vw, 1.85rem); line-height: 2.5; }
.fx-tx .w { transition: color .35s ease; }
.fx-tx .w.on { color: var(--leaf); }
.fx-tx .ay { color: var(--gold-ink, var(--gold)); font-size: .8em; }
.fx-sura { display: block; font-family: var(--font-ui); font-size: .78rem; font-weight: 600; color: var(--muted); line-height: 1.6; }
.fx-bsm { display: block; }
.fx-src { margin: 0; font-size: .84rem; color: var(--muted); }
.fx-src b { color: var(--leaf); font-weight: 600; }
.fx-text .tr { text-align: start; }
.fx-count { border: 0; background: none; color: var(--ink); display: grid; justify-items: center; gap: 4px; padding: 6px 0 2px; min-height: 64px; }
.fx-count b { font-family: var(--font-text); font-weight: 700; font-size: 3.4rem; line-height: 1; font-variant-numeric: tabular-nums; }
.fx-count b.pop { animation: fx-pop .18s ease; }
@keyframes fx-pop { 50% { transform: scale(1.18); } }
.fx-of { font-size: .86rem; color: var(--muted); }
.fx-one { font-size: .95rem; font-weight: 600; color: var(--leaf); }
.fx-dots { display: flex; gap: 8px; margin-top: 2px; }
.fx-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); transition: background .25s, transform .25s; }
.fx-dots i.on { background: var(--leaf); transform: scale(1.15); }
.fx-nav { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .76rem; color: var(--muted); }
.fx-nav .linkish { min-height: 44px; text-decoration: none; font-size: .9rem; }
.fx-nav .linkish[hidden] { display: inline-block; visibility: hidden; }
.fx-flash { position: fixed; inset: 0; z-index: 61; pointer-events: none; opacity: 0; transition: opacity .45s ease; background: radial-gradient(circle at 50% 75%, color-mix(in srgb, var(--leaf) 24%, transparent), transparent 70%); }
.fx-flash.on { opacity: 1; transition: none; }
.fx-done { justify-content: center; align-items: center; text-align: center; gap: 12px; }
.fx-done .fx-x { position: absolute; top: max(16px, env(safe-area-inset-top)); inset-inline-start: 20px; }
.fx-done h1 { margin: 0; font-family: var(--font-text); font-size: 1.8rem; }
.fx-done p { margin: 0; color: var(--muted); }
.fx-others { justify-content: center; margin-top: 10px; }
.fx-others .chip { text-decoration: none; color: var(--ink); min-height: 40px; }
.adh-tick { width: 64px; height: 64px; border-radius: 50%; background: var(--leaf); color: var(--on-leaf); display: grid; place-items: center; font-size: 1.8rem; }
.adh-en summary { cursor: pointer; font-size: .88rem; color: var(--leaf); font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .fx-text, .fx-text.in, .fx-text.out { transform: none !important; transition: opacity .2s; } .fx-count b.pop { animation: none; } }
/* the screen once a list is done */
.fx.dn { overflow-y: auto; align-items: center; text-align: center; gap: 14px; touch-action: auto; padding-bottom: max(28px, env(safe-area-inset-bottom)); }
.fx.dn > .fx-x { align-self: flex-start; }
.dn-hero { width: 128px; height: 128px; margin-top: -10px; flex: none; }
.dn-hero svg { width: 100%; height: 100%; overflow: visible; }
.dn-hero .ring { fill: none; stroke: var(--leaf); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 100 100; transform: rotate(-90deg); transform-origin: 50% 50%; animation: dn-ring .7s ease-out both; }
.dn-hero .halo { fill: color-mix(in srgb, var(--leaf) 9%, var(--paper)); transform-origin: 50% 50%; animation: dn-halo .5s .55s ease-out both; }
.dn-hero .stem { stroke: var(--bark); stroke-width: 3; stroke-linecap: round; fill: none; stroke-dasharray: 30; stroke-dashoffset: 30; animation: dn-grow .4s .7s ease-out forwards; }
.dn-hero .l1, .dn-hero .l2 { transform-box: fill-box; transform: scale(0); animation: dn-pop .45s cubic-bezier(.3, 1.5, .5, 1) forwards; }
.dn-hero .l1 { fill: var(--leaf); transform-origin: 100% 100%; animation-delay: 1s; }
.dn-hero .l2 { fill: var(--leaf-2); transform-origin: 0% 100%; animation-delay: 1.15s; }
@keyframes dn-ring { from { stroke-dasharray: 0 100; } }
@keyframes dn-halo { from { transform: scale(.6); opacity: 0; } }
@keyframes dn-grow { to { stroke-dashoffset: 0; } }
@keyframes dn-pop { to { transform: scale(1); } }
@keyframes dn-up { from { opacity: 0; transform: translateY(10px); } }
.fx.dn h1 { margin: 0; font-family: var(--font-text); font-size: 1.9rem; line-height: 1.25; animation: dn-up .5s .4s both; }
.dn-sub { margin: -8px 0 0; color: var(--muted); animation: dn-up .5s .5s both; }
.dn-fadl { width: 100%; max-width: 560px; background: var(--surface); border: 1px solid var(--line); border-inline-start: 4px solid var(--gold); border-radius: var(--r, 18px); padding: 14px 16px; display: grid; gap: 6px; animation: dn-up .5s .7s both; }
.dn-fadl .lbl { margin: 0; font-size: .78rem; font-weight: 600; color: var(--gold-ink, var(--gold)); }
.dn-fadl q { font-family: var(--font-text); font-size: 1.35rem; line-height: 1.9; quotes: "«" "»"; }
.dn-s { margin: 0; font-size: .8rem; color: var(--muted); }
.dn-s b { color: var(--leaf); }
.dn-streak { width: 100%; display: grid; gap: 8px; animation: dn-up .5s .85s both; }
.dn-st { margin: 0; font-weight: 600; }
.dn-st span { color: var(--leaf); }
.dn-week { display: flex; justify-content: center; gap: 8px; }
.dn-week i { display: grid; justify-items: center; gap: 3px; font-style: normal; font-size: .72rem; color: var(--muted); }
.dn-week i::before { content: ""; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); }
.dn-week i.on::before { background: var(--leaf); border-color: var(--leaf); box-shadow: inset 0 0 0 4px var(--surface); }
.dn-week i.on.tdy::before { box-shadow: none; }
.dn-week i.tdy { color: var(--ink); font-weight: 600; }
.dn-priv { margin: -2px 0 0; font-size: .76rem; color: var(--muted); }
.dn-next { width: 100%; max-width: 560px; display: flex; align-items: center; gap: 12px; text-align: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r, 18px); padding: 12px 14px; animation: dn-up .5s 1s both; }
.dn-moon { width: 44px; height: 44px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 1.2rem; background: linear-gradient(160deg, #1B2B4B, #0E1830); color: #F2D58A; }
.dn-moon.morning { background: linear-gradient(160deg, #F6D98B, #E9A94A); color: #6A3E07; }
.dn-next .dt { flex: 1; display: grid; line-height: 1.4; min-width: 0; }
.dn-next .dt small { font-size: .76rem; color: var(--muted); }
.dn-next .dt b { font-size: 1rem; }
.dn-next .dt span { font-size: .82rem; color: var(--muted); }
.dn-bell { flex: none; border: 1px solid var(--leaf); background: transparent; color: var(--leaf); border-radius: 999px; min-height: 44px; padding: 0 16px; font-weight: 600; font-size: .88rem; }
.dn-bell[aria-pressed="true"] { background: var(--leaf); color: var(--on-leaf); }
.dn-share { width: 100%; max-width: 560px; display: grid; gap: 6px; animation: dn-up .5s 1.1s both; }
.dn-share p { margin: 0; font-size: .82rem; color: var(--muted); }
.dn-again { animation: dn-up .5s 1.2s both; }
@media (prefers-reduced-motion: reduce) { .fx.dn *, .fx.dn h1 { animation: none !important; } .dn-hero .stem { stroke-dashoffset: 0; } .dn-hero .l1, .dn-hero .l2 { transform: none; } }
.rem-row { border-bottom: 1px solid var(--line); }
.rem-row .tog { border-bottom: 0; }
.rem-time { display: grid; gap: 4px; padding: 0 0 12px; }
.rem-opt { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: .92rem; cursor: pointer; }
.rem-opt input[type=radio] { width: 20px; height: 20px; accent-color: var(--leaf); margin: 0; flex: none; }
.rem-opt i { font-style: normal; color: var(--muted); font-size: .85rem; }
.rem-at { margin-inline-start: auto; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; min-height: 40px; padding: 0 10px; }
.rem-note { margin: -6px 0 12px; }
/* the adhkar sit under the seed of the moment, one compact row */
.adh-strip { margin-top: 4px; gap: 6px; }
.adh-b { min-height: 50px; padding: 6px 4px; font-size: .86rem; }
.adh-b i { font-size: .7rem; }
.dn-share .send { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* home: the seed and its sending first; its reach a line under the buttons */
.reach-line { margin: 2px 0 0; display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 4px 14px; font-size: .9rem; color: var(--muted); }
.reach-line b { font-family: var(--font-text); font-size: 1.25rem; color: var(--leaf); font-variant-numeric: tabular-nums; }
.reach-line .rl-h { flex-basis: 100%; font-size: .76rem; font-weight: 600; color: var(--gold-ink, var(--gold)); }
.reach-line .flags { font-style: normal; letter-spacing: 1px; }
.reach-line.quiet { font-size: .84rem; max-width: 34ch; margin-inline: auto; text-wrap: balance; }
.reach-last { margin: 0; font-size: .82rem; color: var(--muted); }
.reach-last b { color: var(--ink); }
.next .kind { flex: none; font-size: .74rem; font-weight: 600; color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); border-radius: 999px; padding: 1px 9px; }
.adh-strip .next-h { margin: 0 2px; }
.adh-b.now i { font-weight: 600; }
.strip .sprout { display: none; width: 46px; height: 46px; margin: 12px 20px; flex: none; }
.strip.bare canvas { display: none; }
.strip.bare .sprout { display: block; animation: sway 4s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes sway { 50% { transform: rotate(-4deg); } }
@media (prefers-reduced-motion: reduce) { .strip.bare .sprout { animation: none; } }
#v-now .col.home > * + * { margin-top: 6px; }
/* a dhikr that is also a library seed */
.fx-seed { align-self: center; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 16px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--leaf) 40%, var(--line)); background: color-mix(in srgb, var(--leaf) 7%, var(--surface)); color: var(--ink); text-decoration: none; font-size: .86rem; }
.fx-seed svg { width: 18px; height: 18px; color: var(--leaf); flex: none; }
.fx-seed b { color: var(--leaf); }
/* the door to the adhkar in the library */
.adh-door { display: flex; align-items: center; gap: 12px; margin: 4px 0 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r, 18px); background: var(--surface); color: var(--ink); text-decoration: none; }
.adh-door[hidden] { display: none; }
.adh-door .ad-i { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--leaf) 12%, var(--surface)); font-size: 1.3rem; flex: none; }
.adh-door .ad-t { flex: 1; display: grid; line-height: 1.45; min-width: 0; }
.adh-door .ad-t span { font-size: .84rem; color: var(--muted); }
.adh-door .ad-go { color: var(--leaf); font-size: 1.4rem; font-weight: 600; }
.fx-head .fx-seed { margin-inline-start: auto; align-self: center; min-height: 36px; padding: 4px 12px; font-size: .8rem; }
.adh-door .ad-i svg { width: 28px; height: 28px; }
