:root {
  --bg: #fbf6f1;
  --bg-2: #f5ece4;
  --card: #fffdfb;
  --ink: #2c2330;
  --ink-2: #574b5a;
  --line: #ecdfd6;
  --accent: #a8662a;
  --accent-soft: #f6e7d6;
  --done: #4f8a64;
  --done-bg: #e2f0e6;

  --dhikr: #a8662a;  --dhikr-bg: #f6e7d6;
  --quran: #2f7d78;  --quran-bg: #dcefec;
  --dua: #7c4f93;    --dua-bg: #efe4f4;
  --prayer: #4d6488; --prayer-bg: #e3e9f3;
  --qada: #5a4fa3;   --qada-bg: #e9e6f8;   /* Qaḍāʾ's own purple (../qada/styles.css) */

  --shadow: 0 1px 2px rgba(60, 30, 50, .05), 0 8px 24px rgba(60, 30, 50, .07);
  --radius: 18px;
  color-scheme: light;
}

/* Light unless the device is dark or the header button picks dark (data-theme="dark", saved as "theme") */
:root[data-theme="dark"] {
  --bg: #19141c; --bg-2: #211a25; --card: #261f2b; --ink: #f3ecf2; --ink-2: #cdc1ce;
  --line: #3a3040; --accent: #e3a465; --accent-soft: #3a2a1c; --done: #87c79c; --done-bg: #1f3326;
  --dhikr: #e3a465; --dhikr-bg: #3a2a1c; --quran: #6cc2b9; --quran-bg: #1d3634;
  --dua: #c39ad8; --dua-bg: #322539; --prayer: #9db4da; --prayer-bg: #222c3d;
  --qada: #a59cf0; --qada-bg: #2a2747;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: radial-gradient(1200px 500px at 85% -10%, var(--accent-soft), transparent 60%), var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  font: 16px/1.55 "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  min-height: 100vh;
}
button { font: inherit; color: inherit; }
a { color: var(--accent); }
svg { fill: currentColor; stroke: currentColor; }
svg [fill="none"] { fill: none; }

.wrap { max-width: 640px; margin: 0 auto; padding: 0 16px 96px; }

/* ── Header */
header.top {
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--line);
}
header.top .wrap { padding-bottom: 0; display: flex; align-items: center; gap: 12px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; text-decoration: none; color: var(--ink); }
.brand svg { width: 34px; height: 34px; stroke: none; }
.brand svg circle[fill="none"] { stroke: var(--accent); }
.brand b { font: 600 24px/1 "Noto Serif", "Fraunces", Georgia, serif; letter-spacing: .2px; }
.brand small { display: block; font-size: 13.5px; color: var(--ink-2); letter-spacing: .3px; margin-top: 2px; }
.theme-btn {
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--bg-2); color: var(--ink); cursor: pointer; display: grid; place-items: center; padding: 0;
}
.theme-btn:hover { border-color: var(--accent); }
.theme-btn svg { width: 18px; height: 18px; stroke: none; }
.theme-btn .sun path { stroke: currentColor; }
.theme-btn .sun { display: none; }
:root[data-theme="dark"] .theme-btn .sun { display: block; }
:root[data-theme="dark"] .theme-btn .moon { display: none; }
.home-btn { color: var(--ink-2); text-decoration: none; }
.home-btn svg { width: 17px; height: 17px; }
.home-btn + .theme-btn { margin-left: 6px; }

/* ── Intro and tiers */
.intro { margin: 28px 0 16px; }
.intro h1 { font: 600 30px/1.15 "Noto Serif", "Fraunces", Georgia, serif; margin: 0 0 6px; }
.intro p { margin: 0; color: var(--ink-2); }
.intro .link { font-size: inherit; margin: 0; }
.intro .tr-card { margin: 12px 0 0; }
/* Āyāt a day: − / + and a number, on the Qurʾān item's page */
.ayat { display: grid; gap: 6px; margin: 0 0 16px; padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.ayat label { font-weight: 600; }
.ayat-set { display: flex; align-items: center; gap: 8px; }
.ayat-set button { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: 600 20px/1 "DM Sans", sans-serif; cursor: pointer; padding: 0; }
.ayat-set button:disabled { opacity: .35; cursor: default; }
.ayat-set input { width: 76px; padding: 7px 8px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); font: 600 17px "DM Sans", sans-serif; text-align: center; }
.ayat-set input:focus { outline: none; border-color: var(--accent); }
.ayat small { color: var(--ink-2); font-size: 15px; }
.ayat small .link { margin-left: 6px; }

.tierbox { margin: 0 0 16px; }
.tierbox > summary { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); cursor: pointer; list-style: none; }
.tierbox > summary::-webkit-details-marker { display: none; }
.tierbox[open] > summary { margin-bottom: 10px; }
.tb-n { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--card); font-weight: 700; font-size: 15px; }
.tb-t { flex: 1; }
.tb-t b { display: block; font: 600 16px/1.15 "Noto Serif", "Fraunces", Georgia, serif; }
.tb-t small { color: var(--ink-2); font-size: 14px; }
.tb-c { color: var(--accent); font-weight: 600; font-size: 15px; }
.tierbox[open] .tb-c { visibility: hidden; }
.tiers { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.tier {
  position: relative; text-align: left; padding: 12px 12px 11px; border-radius: 14px; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--card);
}
.tier b { display: block; font: 600 17px/1.1 "Noto Serif", "Fraunces", Georgia, serif; }
.tier small { display: block; font-size: 14px; color: var(--ink-2); margin-top: 3px; line-height: 1.3; }
.tier em { display: block; font-style: normal; font-size: 13.5px; font-weight: 600; color: var(--accent); margin-top: 6px; }
.blurb .mins { display: block; margin-top: 4px; font-weight: 600; color: var(--ink); }
.tier-n {
  display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; margin-bottom: 6px;
  font-size: 13.5px; font-weight: 700; background: var(--bg-2); color: var(--ink-2);
}
.tier[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); }
.tier[aria-checked="true"] .tier-n { background: var(--accent); color: var(--card); }
.blurb { color: var(--ink-2); font-size: 16px; margin: 10px 2px 18px; }
.blurb summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.blurb summary .mins { display: inline; margin: 0; font-weight: 500; color: var(--ink-2); }
.blurb p { margin: 8px 0 0; }
.custom { margin-top: -8px; }
.offlist { list-style: none; margin: 8px 0 6px; padding: 0; display: grid; gap: 2px; }
.offlist label { display: flex; align-items: baseline; gap: 8px; padding: 5px 0; color: var(--ink); cursor: pointer; }
.offlist input { accent-color: var(--accent); width: 17px; height: 17px; flex: 0 0 auto; transform: translateY(3px); }
.offlist small { color: var(--ink-2); }

/* ── Day bar and summary */
.daybar { display: flex; align-items: center; gap: 10px; }
.daymid { flex: 1; text-align: center; }
.daymid b { display: block; font: 600 20px/1.2 "Noto Serif", "Fraunces", Georgia, serif; }
.daymid small { color: var(--ink-2); font-size: 15px; }
.nav {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--card);
  font-size: 22px; line-height: 1; cursor: pointer; color: var(--ink);
}
.nav:disabled { opacity: .35; cursor: default; }

.summary {
  display: flex; align-items: center; gap: 16px; margin: 14px 0 12px; padding: 14px 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.summary b { display: block; font-size: 16px; }
.summary small { color: var(--ink-2); font-size: 15px; }
.ring {
  --p: 0; flex: 0 0 auto; width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--done) calc(var(--p) * 360deg), var(--bg-2) 0);
}
.ring span {
  width: 50px; height: 50px; border-radius: 50%; background: var(--card); display: grid; place-items: center;
  font-weight: 700; font-size: 16px;
}
.ring small { font-size: 13.5px; font-weight: 500; }
.ring span { grid-auto-flow: column; align-content: center; }
.link { border: 0; background: none; padding: 0; color: var(--accent); font-weight: 600; font-size: 15px; cursor: pointer; margin-top: 2px; }

.record { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 12px; }
.record .stat { padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.record .stat b { display: block; font: 600 26px/1.1 "Noto Serif", "Fraunces", Georgia, serif; }
.record .stat span { display: block; font-size: 15px; line-height: 1.35; margin-top: 2px; }
.record .stat small { display: block; margin-top: 4px; color: var(--ink-2); font-size: 14px; }
.daymid .dots { flex-basis: 100%; display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; }
.daymid .dots i { height: 10px; border-radius: 4px; background: var(--bg-2); border: 1px solid var(--line); }
.daymid .dots i.l1 { background: color-mix(in srgb, var(--done) 40%, var(--bg-2)); border-color: transparent; }
.daymid .dots i.l2 { background: var(--done); border-color: transparent; }
.daymid .dots i.sel { outline: 2px solid var(--accent); outline-offset: 1px; }
.bytier { grid-column: 1 / -1; padding: 10px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); font-size: 15px; }
.bytier summary { cursor: pointer; font-weight: 600; }
.bytier table { width: 100%; margin-top: 8px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.bytier th, .bytier td { padding: 5px 4px; text-align: right; border-top: 1px solid var(--line); }
.bytier th { font-weight: 500; font-size: 14px; color: var(--ink-2); }
.bytier th:first-child, .bytier td:first-child { text-align: left; }
.bytier tr.cur td { font-weight: 600; }
.bytier p { margin: 8px 0 0; color: var(--ink-2); font-size: 14px; }
.tickall { margin-left: 8px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 99px; background: var(--card); color: var(--accent); font: 600 14px "DM Sans", sans-serif; cursor: pointer; }
.tickall:hover { border-color: var(--accent); }
.keep { margin: 8px 0 0; padding: 12px 14px; border-radius: 14px; border: 1px dashed var(--line); font-size: 15px; color: var(--ink-2); }
.keep p { margin: 0 0 8px; }
.keep b { color: var(--ink); }
.keep .link { margin-right: 16px; font-size: 15px; }
.keep #keepmsg { display: block; margin-top: 6px; color: var(--done); }
.stepup { padding: 12px 14px; border-radius: 14px; background: var(--done-bg); font-size: 16px; margin: 0 0 12px; }
.note { padding: 10px 14px; border-radius: 12px; background: var(--prayer-bg); font-size: 16px; margin: 0 0 12px; }

.toggle { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 16px; font-weight: 500; margin: 0 2px 12px; cursor: pointer; }
.toggle input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.toggle small { flex-basis: 100%; padding-left: 26px; color: var(--ink-2); font-size: 14px; font-weight: 400; }
.toggle.small { margin: 0; font-size: 15px; flex-wrap: nowrap; white-space: nowrap; }

/* ── Checklist */
.slot { margin-top: 22px; }
.slot h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px 2px; font: 600 18px/1.2 "Noto Serif", "Fraunces", Georgia, serif; }
.slot h2 small { margin-left: auto; font: 600 14px "DM Sans", sans-serif; color: var(--ink-2); }
.slot-ic { display: grid; place-items: center; width: 26px; height: 26px; color: var(--accent); }
.slot-ic svg { width: 22px; height: 22px; }
.slot-ic { --cut: var(--bg); }
.slot.folded .slot-ic { --cut: var(--card); }
.items { list-style: none; margin: 0; padding: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.items li { display: flex; align-items: center; border-top: 1px solid var(--line); }
.items li:first-child { border-top: 0; }
.check { position: relative; display: grid; place-items: center; width: 56px; align-self: stretch; cursor: pointer; flex: 0 0 auto; }
.check input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.check .box {
  width: 32px; height: 32px; border-radius: 9px; border: 2px solid var(--ink-2); background: var(--bg);
  transition: background .15s, border-color .15s;
}
.check input:focus-visible + .box { outline: 2px solid var(--accent); outline-offset: 2px; }
.check input:checked + .box {
  border-color: var(--done); background: var(--done)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/22px no-repeat;
}
.item { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 0; text-decoration: none; color: inherit; }
.item:hover .go { color: var(--accent); }
.txt { flex: 1; min-width: 0; }
.txt b { display: block; font-weight: 600; font-size: 16px; line-height: 1.3; }
.txt small { display: block; color: var(--ink-2); font-size: 15px; line-height: 1.35; margin-top: 1px; }
.go { color: var(--ink-2); font-size: 22px; line-height: 1; }
/* The daily Qurʾān's page: every bookmark in Dhikr's Qurʾān */
.qmarks .item { padding-left: 14px; min-height: 56px; }
.qm-all { margin: 8px 2px 0; }
.qm-all a { color: var(--accent); font-weight: 600; text-decoration: none; }
.items li.done .txt b { color: var(--ink-2); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--ink-2) 50%, transparent); }

.ic { flex: 0 0 auto; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; }
.ic svg { width: 22px; height: 22px; }
/* The icons (svg.fi): lines by default; .f filled, .t a soft fill, .k and .kf cut in the colour behind them (--cut) */
svg.fi { fill: none; stroke: none; }
svg.fi * { fill: none; stroke: currentColor; stroke-width: var(--sw, 1.8); stroke-linecap: round; stroke-linejoin: round; }
svg.fi .f { fill: currentColor; stroke: none; }
svg.fi .t { fill: currentColor; fill-opacity: var(--tint, .28); stroke: none; }
svg.fi .k { stroke: var(--cut); }
svg.fi .kf { fill: var(--cut); stroke: none; }
.ic.dhikr { background: var(--dhikr-bg); color: var(--dhikr); }
.ic.quran { background: var(--quran-bg); color: var(--quran); }
.ic.dua { background: var(--dua-bg); color: var(--dua); }
.ic.prayer { background: var(--prayer-bg); color: var(--prayer); }
.ic.big { width: 54px; height: 54px; border-radius: 16px; }
.ic.big svg { width: 30px; height: 30px; }

.foot { color: var(--ink-2); font-size: 14px; margin-top: 28px; }

/* ── Reader */
.back { display: inline-block; margin: 20px 0 6px; font-weight: 600; text-decoration: none; }
.read-head { display: flex; align-items: center; gap: 14px; margin: 8px 0 6px; }
.read-head h1 { font: 600 28px/1.15 "Noto Serif", "Fraunces", Georgia, serif; margin: 0; }
.ar-title { margin: 2px 0 0; font: 500 19px/1.5 "Noto Naskh Arabic", serif; color: var(--ink-2); text-align: left; }
.meta { margin: 6px 0 4px; font-weight: 600; color: var(--accent); }
.about { margin: 0 0 14px; }
.loading { color: var(--ink-2); margin-top: 40px; }

.rulings { margin: 6px 0 18px; display: grid; gap: 8px; }
.ruling { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 0 14px; }
.ruling summary { cursor: pointer; padding: 11px 0; font-weight: 600; font-size: 16px; }
.ruling p { margin: 0 0 10px; font-size: 16px; }
.ruling .ar { font: 400 19px/2 "Noto Naskh Arabic", serif; text-align: right; }
.ruling .src { font-size: 14px; color: var(--ink-2); }

/* the heading, then Transliteration and Translation; on a narrow phone the two go under the heading */
.text-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 22px 0 10px; }
.text-head h2 { margin-right: auto !important; }
.text-head .toggles { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.text-head h2 { margin: 0; font: 600 20px/1.25 "Noto Serif", "Fraunces", Georgia, serif; }
.lines { list-style: none; margin: 0; padding: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.lines li { padding: 14px 16px; border-top: 1px solid var(--line); }
.lines li:first-child { border-top: 0; }
/* Duʿāʾ Arabic: a clear naskh, large, with room between lines for the vowel marks */
.lines .ar { margin: 0 0 8px; font: 400 26px/2.15 "Noto Naskh Arabic", serif; word-spacing: .08em; text-align: right; }
.lines .tr { margin: 0 0 3px; font-size: 16px; font-style: italic; color: var(--ink-2); }
.lines .en { margin: 0; font-size: 16px; }
.lines.no-tr .tr { display: none; }
.lines.no-en .en { display: none; }
.lines .lnote { background: var(--bg-2); font-size: 15px; font-weight: 600; color: var(--ink-2); }

h2.sub { margin: 22px 0 8px; font: 600 19px/1.25 "Noto Serif", "Fraunces", Georgia, serif; }
.steps, .good { margin: 0; padding: 14px 16px 14px 38px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.steps li, .good li { margin: 0 0 8px; padding-left: 4px; }
.steps li:last-child, .good li:last-child { margin-bottom: 0; }
.steps li::marker { font-weight: 700; color: var(--accent); }
.good { background: var(--bg-2); font-size: 16px; }
/* Qurʾān: Uthmānī text in a font drawn for it, with room for its marks */
.lines .ar.q { font: 400 27px/2.5 "Amiri Quran", "Noto Naskh Arabic", serif; word-spacing: 0; }

/* ── Tasbīḥ counter */
.counter { display: grid; justify-items: center; gap: 8px; margin: 8px 0 18px; }
.tap {
  width: 100%; min-height: 200px; border-radius: 24px; border: 1.5px solid var(--line); background: var(--card);
  box-shadow: var(--shadow); cursor: pointer; display: grid; place-items: center; align-content: center; gap: 4px; padding: 20px;
  user-select: none; -webkit-user-select: none; touch-action: manipulation; transition: transform .06s;
}
.tap:active { transform: scale(.985); }
.tap .ar { font: 500 32px/1.6 "Scheherazade New", "Noto Naskh Arabic", serif; }
.tap b { font: 600 44px/1 "Noto Serif", "Fraunces", Georgia, serif; }
.tap b small { font-size: 18px; color: var(--ink-2); }
.tap > small { color: var(--ink-2); font-size: 15px; }
.tap .bar { width: 70%; height: 5px; border-radius: 3px; background: var(--bg-2); overflow: hidden; margin-top: 8px; }
.tap .bar i { display: block; height: 100%; background: var(--accent); }
.tap.complete { background: var(--done-bg); border-color: var(--done); }
.tap.complete b { font-size: 26px; }

/* ── Step-by-step prayer (ṣalāt al-layl) */
.fbar { position: sticky; top: 64px; z-index: 5; margin: 18px -16px 10px; padding: 10px 16px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.seg { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--bg-2); }
.seg button { flex: 1; border: 0; border-radius: 10px; padding: 9px 8px; background: none; color: var(--ink-2); font: 600 16px/1.2 "DM Sans", system-ui, sans-serif; cursor: pointer; }
.seg button small { font-weight: 400; font-size: 14px; }
.seg button[aria-checked="true"] { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.fprog { margin: 8px 2px 0; font-size: 15px; color: var(--ink-2); }
.fprog b { color: var(--ink); }
.ftools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 0 0 12px; }
.ftools .link { margin: 0 0 0 auto; }
.fpart { margin: 0 0 14px; padding: 16px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); scroll-margin-top: 150px; }
.fpart header { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin-bottom: 8px; }
.fpart h3 { margin: 0; font: 600 20px/1.25 "Noto Serif", "Fraunces", Georgia, serif; }
.fpart header small { color: var(--ink-2); font-size: 15px; }
.fpart.done { border-color: var(--done); background: color-mix(in srgb, var(--done-bg) 45%, var(--card)); }
.fpart.done h3::after { content: " ✓"; color: var(--done); }
.fniy { margin: 0 0 6px; font-size: 16px; }
.fniy b { display: block; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.fh { margin: 14px 0 6px; font: 600 16px/1.3 "DM Sans", system-ui, sans-serif; color: var(--prayer); }
.fh small { font-weight: 400; color: var(--ink-2); }
.fdo { margin: 8px 0; font-size: 16px; }
.fnote { margin: 0 0 8px; font-size: 15px; color: var(--ink-2); }
.rec { display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: 99px; background: var(--bg-2); color: var(--ink-2); font: 500 13.5px/1.6 "DM Sans", system-ui, sans-serif; vertical-align: 1px; }
.fsura { margin: 6px 0; border: 1px solid var(--line); border-radius: 12px; }
.fsura summary { padding: 10px 12px; font-size: 16px; font-weight: 600; cursor: pointer; }
.fsura summary small { font-weight: 400; color: var(--ink-2); }
.fsura .lines { border: 0; border-top: 1px solid var(--line); border-radius: 0 0 12px 12px; }
.fqunut .lines, .fsay .lines, .fclose .lines { margin: 4px 0; }
.fsay { margin: 10px 0; }
.fcount { display: block; width: 100%; margin-top: 6px; padding: 14px; border: 0; border-radius: 14px; background: var(--prayer-bg); color: var(--prayer); font: 500 16px/1 "DM Sans", system-ui, sans-serif; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.fcount b { font-size: 26px; font-variant-numeric: tabular-nums; }
.fcount:active { transform: scale(.99); }
.fcount.full { background: var(--done-bg); color: var(--done); }
.fclose { margin: 12px 0 0; }
.fclose summary { font-size: 16px; color: var(--ink-2); cursor: pointer; }
.ftaps { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.ftaps span { flex-basis: 100%; font-size: 15px; color: var(--ink-2); }
.pip { min-width: 52px; height: 48px; padding: 0 14px; border: 1.5px solid var(--prayer); border-radius: 14px; background: none; color: var(--prayer); font: 600 17px/1 "DM Sans", system-ui, sans-serif; cursor: pointer; }
.pip.on { background: var(--done); border-color: var(--done); color: #fff; }

@media (max-width: 520px) {
  .tiers { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; }
  .tiers::-webkit-scrollbar { display: none; }
  .tier { flex: 0 0 132px; scroll-snap-align: start; }
  .intro h1 { font-size: 26px; }
}
.printlink { display: block; margin-top: 6px; font-weight: 600; font-size: 16px; text-decoration: none; }
.fwhat { margin: 14px 2px 6px; font-weight: 600; font-size: 16px; }
.guidelink { display: block; margin: 0 0 14px; padding: 13px 16px; border-radius: var(--radius); background: var(--prayer-bg); color: var(--ink); text-decoration: none; border: 1px solid var(--line); }
.guidelink b { display: block; color: var(--prayer); }
.guidelink small { display: block; color: var(--ink-2); font-size: 15px; margin-top: 2px; }
.ptime { display: block; margin: -4px 2px 8px 34px; font-size: 14px; color: var(--ink-2); }
.ptime.now { color: var(--accent); font-weight: 700; }
.ptime.now::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--accent); vertical-align: 1px; }
.ptime.past { opacity: .75; }
.ptimes-ask { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.ptimes-ask .tickall { margin-left: 0; }
.ptimes-ask span { font-size: 14px; color: var(--ink-2); }
/* Today's progress in one line, with the bar; the ring, streaks and record open under "Details" */
.statbox { margin: 0 0 14px; }
.statbox > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 11px 14px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); cursor: pointer; list-style: none; }
.statbox > summary::-webkit-details-marker { display: none; }
.statbox[open] > summary { margin-bottom: 10px; }
.statbox .sl { flex: 1; font-size: 16px; color: var(--ink-2); }
.statbox .sl b { font: 600 18px "Noto Serif", "Fraunces", Georgia, serif; color: var(--ink); margin-right: 2px; }
.statbox .sl b small { font-size: 15px; color: var(--ink-2); }
.statbox .sl-more { color: var(--accent); font-weight: 600; font-size: 15px; }
.statbox[open] .sl-more { visibility: hidden; }
.statbox .sl-bar { flex-basis: 100%; height: 6px; border-radius: 3px; background: var(--bg-2); overflow: hidden; }
.statbox .sl-bar i { display: block; height: 100%; border-radius: 3px; background: var(--accent); transition: width .3s; }
.center { text-align: center; }
.qpick { flex: 0 0 auto; margin-right: 12px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); font: 600 15px "DM Sans", sans-serif; }
.qsel { margin: 0 0 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.qsel summary { cursor: pointer; padding: 11px 14px; font-weight: 600; font-size: 16px; }
.qsel summary span { float: right; color: var(--accent); font-size: 15px; }
.qsel[open] summary span { display: none; }
.qsel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 14px; padding: 0 14px 14px; }
.qsel-grid label { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.qsel-grid input { width: 18px; height: 18px; accent-color: var(--accent); }
/* The Arabic large enough to read at a glance by default (IndoPak's Lateef draws small, so it is 1.25× again below) */
:root { --ar-base: 30px; --en-base: 15px; }
@media (max-width: 520px) { :root { --ar-base: 28px; } }

/* ── Arabic (all fonts open source, SIL OFL): IndoPak (default) or Uthmānī, and the reader's text size (--ls, set by ../reading.js) */
.lines li { min-width: 0; overflow-wrap: anywhere; }
/* A line too long for the screen wraps as one sentence: lines close together (the space between lines is the item's
   own), split evenly so no word is left alone */
.lines .ar, .lines .ar.q { font-size: calc(var(--ar-base) * var(--ls, 1)); text-wrap: balance; }
.lines .tr { font-size: calc(14px * var(--ls, 1)); }
.lines .en { font-size: calc(var(--en-base) * var(--ls, 1)); }
/* IndoPak: Lateef (SIL, Open Font Licence), drawn for South Asian Arabic script; it runs small, so a quarter larger */
html[data-script="indopak"] .lines .ar, html[data-script="indopak"] .lines .ar.q { font-family: "Lateef", "Noto Naskh Arabic", serif; font-size: calc(var(--ar-base) * 1.25 * var(--ls, 1)); line-height: 1.6; word-spacing: .04em; }
html:not([data-script="indopak"]) .lines .ar { font-family: "Scheherazade New", "Noto Naskh Arabic", serif; line-height: 1.75; }
html:not([data-script="indopak"]) .lines .ar.q { font-family: "Amiri Quran", "Noto Naskh Arabic", serif; line-height: 2.45; }
html[data-script="indopak"] .s-uth, html:not([data-script="indopak"]) .s-ip { display: none; }
.cu-time { margin: 4px 0 8px; color: var(--ink-2); }
.cu-time b { color: var(--ink); }
.cu-h { margin: 14px 0 2px; font-size: 16px; }
.packlist label > span { display: grid; gap: 1px; }
.packlist .ramadan { margin: 2px 0 8px 25px; font-size: 16px; color: var(--ink-2); }
.packlist .ramadan p { margin: 0 0 6px; }
.packlist .ramadan label { display: block; padding: 0; cursor: default; }
.packlist .ramadan select { font: inherit; margin: 2px 4px; }

/* First-visit setup (tier, add-ons, prayer times, reading), in place of the "New here?" card */
.setup { margin: 14px 0 0; padding: 14px 16px 12px; border: 1px solid var(--accent); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.setup p { margin: 0 0 10px; color: var(--ink-2); font-size: 16px; }
.setup p b { color: var(--ink); }
.su-top { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.su-top h2 { margin: 0; font: 600 19px/1.2 "Noto Serif", "Fraunces", Georgia, serif; }
.su-dots { display: flex; gap: 5px; margin-left: auto; }
.su-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.su-dots i.on, .su-dots i.done { background: var(--accent); }
.su-dots i.done { opacity: .45; }
.su-opts { display: grid; gap: 6px; margin: 0 0 10px; }
.su-opt { display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left; padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--bg); color: var(--ink); font: inherit; cursor: pointer; }
.su-opt b { display: block; font-size: 16px; }
.su-opt small { display: block; color: var(--ink-2); font-size: 15px; line-height: 1.35; }
.su-opt[aria-pressed="true"], .su-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.su-opt input { accent-color: var(--accent); width: 17px; height: 17px; margin-top: 2px; flex: 0 0 auto; }
.su-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 16px; }
.su-row input { accent-color: var(--accent); width: 18px; height: 18px; }
.su-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.su-seg button { border: 0; padding: 6px 12px; background: var(--card); color: var(--ink); font: 600 15px "DM Sans", sans-serif; cursor: pointer; }
.su-seg button[aria-pressed="true"] { background: var(--accent); color: var(--card); }
.su-foot { display: flex; align-items: center; gap: 10px; justify-content: flex-end; margin-top: 4px; }
.su-foot .link:first-child { margin-right: auto; }
.su-next { border: 0; border-radius: 999px; padding: 9px 16px; background: var(--accent); color: var(--card); font: 600 16px "DM Sans", sans-serif; cursor: pointer; }
button.su-opt { flex-direction: column; gap: 1px; }

/* duas.org's introduction to a text (Dhikr.introHtml), folded away */
.src-about { margin: 0 0 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.src-about summary { cursor: pointer; padding: 10px 14px; font-weight: 600; font-size: 16px; color: var(--accent); }
.src-about p { margin: 0 14px 10px; color: var(--ink-2); font-size: 16px; line-height: 1.55; }
.lines li.lhead h3 { margin: 6px 0 0; font: 600 17px/1.3 "Noto Serif", Fraunces, Georgia, serif; color: var(--accent); }
.lines .lnote.long { font-weight: 400; font-size: 16px; line-height: 1.55; color: var(--ink); }
/* Instructions: notes in a row read as one block (no rule between them, one style), so a prayer's method reads like a
   short paragraph list rather than a stack of cards */
.lines .lnote, .lines .lnote.long { font-weight: 400; font-size: calc(15px * var(--ls, 1)); line-height: 1.55; color: var(--ink); }
.lines .lnote + .lnote { border-top: 0; padding-top: 0; margin-top: -6px; }

/* ── My Wird: checks beside each row (one, or one per prayer where a section holds two), counts, the list editor,
   adding, and suggestions */
.checks { display: flex; align-self: stretch; flex: 0 0 auto; }
.check.mini { width: 36px; }
.check.mini:first-child { margin-left: 8px; }
.check.mini .box { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; }
.check.mini .box i { font: 700 13.5px "DM Sans", sans-serif; font-style: normal; color: var(--ink-2); }
.check.mini input:checked + .box i { display: none; }
.cnt { align-self: center; margin: 0 8px 0 12px; min-width: 46px; padding: 6px 8px; border-radius: 12px; border: 1.5px solid var(--accent);
  background: var(--card); color: var(--accent); font: 700 16px "DM Sans", sans-serif; cursor: pointer; }
.cnt small { font-weight: 600; font-size: 13.5px; color: var(--ink-2); }
.cnt.full { background: var(--done); border-color: var(--done); color: var(--card); }
.ic.goal { background: var(--accent-soft); color: var(--accent); }
/* A row from Qaḍāʾ: its icon is a button to the item in Qaḍāʾ, in Qaḍāʾ's purple and with its tally mark. The tap area is
   44px; the icon sits where every row's icon sits, the same 12px from the name. */
.qbtn { flex: 0 0 auto; display: grid; place-items: center; width: 44px; height: 44px; margin: 0 8px 0 -4px; border-radius: 13px;
  text-decoration: none; -webkit-tap-highlight-color: transparent; }
.qbtn + .item { padding-left: 0; }
.ic.qada { background: var(--qada-bg); color: var(--qada); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--qada) 45%, transparent);
  transition: transform .12s ease, background-color .12s ease; }
.qbtn:hover .ic.qada { background: color-mix(in srgb, var(--qada) 18%, var(--qada-bg)); }
.qbtn:active .ic.qada { transform: scale(.92); }
.qbtn:focus-visible { outline: 2px solid var(--qada); outline-offset: 1px; }
span.item { cursor: default; }
.listbox .le { padding: 4px 2px 6px; }
.le-add { display: block; width: 100%; margin: 0 0 10px; }
.le-list { list-style: none; margin: 0 0 6px; padding: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--card); overflow: hidden; }
.le-list li { display: flex; align-items: center; gap: 8px; padding: 8px 6px 8px 12px; border-top: 1px solid var(--line); }
.le-list li:first-child { border-top: 0; }
.le-list .txt b { font-size: 16px; }
.le-list .txt small { font-size: 14px; }
.le-x { flex: 0 0 auto; width: 32px; height: 32px; border: 0; border-radius: 50%; background: none; color: var(--ink-2); font-size: 16px; cursor: pointer; }
.le-x:hover { background: var(--bg-2); color: var(--ink); }
.le-note { margin: 0 0 10px; font-size: 14px; color: var(--ink-2); }
.le-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 2px; border-top: 1px solid var(--line); font-size: 16px; }
.le-row select, .le-row input { font: 16px "DM Sans", sans-serif; padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); max-width: 60%; }
.le-row small { color: var(--ink-2); font-size: 14px; }
.le-tpl { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 2px; border-top: 1px solid var(--line); font-size: 16px; }
.le-tpl > span { flex-basis: 100%; color: var(--ink-2); }
.le-tpl .tickall { margin: 0; }
.le-tpl small { flex-basis: 100%; color: var(--accent); }
.addp { margin: 0 0 12px; padding: 12px; border: 1.5px solid var(--accent); border-radius: 14px; background: var(--card); }
.addp input[type="search"] { width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); font: 16px "DM Sans", sans-serif; }
.ad-res { list-style: none; margin: 8px 0; padding: 0; max-height: calc(46vh / var(--z, 1)); overflow-y: auto; }
.ad-pick { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 4px; border: 0; border-top: 1px solid var(--line); background: none; color: var(--ink); text-align: left; font: inherit; cursor: pointer; }
.ad-res li:first-child .ad-pick { border-top: 0; }
.ad-pick .go { color: var(--accent); font-weight: 700; }
.ad-none, .ad-hint { color: var(--ink-2); font-size: 16px; margin: 8px 0; }
.ad-own { margin: 6px 0 8px; }
.ad-own .tickall { margin: 0; }
.ad-title { margin: 0 0 4px; }
.suggest .sug li { flex-wrap: wrap; }
.suggest .sug .item { padding-left: 12px; }
.sg-b { display: flex; align-items: center; gap: 8px; padding: 0 12px 10px 58px; width: 100%; }
.sg-b .tickall { margin: 0; }
.rec-note { grid-column: 1 / -1; margin: 0; font-size: 14px; color: var(--ink-2); }

/* Dawām's motto: Imam ʿAlī (ʿa) on keeping a little up */
.motto { margin: 4px 0 12px; padding: 10px 14px; border: 1.5px solid color-mix(in srgb, var(--accent) 35%, transparent); border-radius: 12px; background: var(--accent-soft); }
.motto .ar { margin: 0 0 4px; font: 500 19px/1.8 "Scheherazade New", "Noto Naskh Arabic", serif; color: var(--ink); text-align: right; }
.motto p { margin: 0; font-size: 16px; color: var(--ink-2); }
.motto cite { display: block; margin-top: 2px; font-style: normal; font-size: 14px; }

/* Reordering a section, and the days of the week when adding */
.slot h2 .reorder { margin-left: auto; font-size: 15px; }
.slot h2 .reorder + .tickall { margin-left: 8px; }
.items li.moving { padding: 4px 0; }
.mv { display: flex; gap: 4px; padding: 0 8px 0 10px; }
.mv button { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); font-size: 16px; cursor: pointer; }
.mv button:disabled { opacity: .3; cursor: default; }
.day-chips { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.day-chips button { min-width: 38px; padding: 6px 0; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); font: 600 15px "DM Sans", sans-serif; cursor: pointer; }
.day-chips button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--card); }
.le-fixed { color: var(--ink-2); font-size: 16px; }
.ad-err { margin: 4px 0 0; color: var(--accent); font-size: 15px; }
.ad-err:empty { display: none; }
.addp .su-seg button { padding: 6px 10px; }
.ad-sug { margin: 2px 2px 4px; font-size: 15px; color: var(--ink-2); }

/* No zoom on a double tap (pinch to zoom still works) */
html, body { touch-action: manipulation; }

/* ── Dawām, lighter top: the title with Tour and Edit list, the motto folded to one line after the first visit, and the
   date and progress in one bar that opens the record */
.intro { margin: 20px 0 12px; }
.intro-top { display: flex; align-items: center; gap: 10px; }
.intro-top h1 { flex: 1; margin: 0; }
.intro-b { display: flex; align-items: center; gap: 10px; }
.intro-b .link { margin: 0; }
.intro-b .tickall { margin: 0; padding: 7px 14px; font-size: 15px; }
details.motto { margin: 10px 0; }
details.motto > summary { list-style: none; cursor: pointer; }
details.motto > summary::-webkit-details-marker { display: none; }
details.motto .ar { display: block; margin: 0; font: 500 18px/1.7 "Scheherazade New", "Noto Naskh Arabic", serif; color: var(--ink); text-align: right; }
details.motto:not([open]) .ar { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 16px; }
details.motto[open] > p { margin-top: 4px; }
.daybar { margin: 0 0 12px; }
button.daymid { display: block; min-width: 0; padding: 8px 10px 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink); font: inherit; cursor: pointer; }
.daymid b { font-size: 18px; }
.dprog { display: block; margin-top: 4px; font-size: 15px; color: var(--ink-2); }
.dprog b { display: inline; font: 600 15px "DM Sans", sans-serif; color: var(--accent); }
div.statbox { margin: 0 0 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
/* A part with two prayers: the first prayer's items, then the second's */
.subhead { margin: 12px 4px 6px; font: 600 15px "DM Sans", sans-serif; color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; }
.slot h2 + .ptime + .subhead, .slot h2 + .subhead { margin-top: 4px; }
/* Edit list */
.editpanel { margin: 0 0 18px; padding: 12px 14px; border: 1.5px solid var(--accent); border-radius: 16px; background: var(--card); }
.ep-sum { margin: 0 0 4px; font-size: 16px; color: var(--ink-2); }
.ep-sum b { color: var(--ink); }
.ep-hint { margin: 0 0 12px; font-size: 15px; color: var(--ink-2); }
.drag-i { font-weight: 700; color: var(--ink); letter-spacing: -2px; }
.le-again { margin-top: 6px; border-top: 1px solid var(--line); padding-top: 8px; }
.le-again > summary { cursor: pointer; color: var(--ink-2); font-size: 16px; }
.le-again p { margin: 6px 0 0; }
.items.editing li.ed { display: flex; align-items: center; gap: 6px; padding: 6px 8px 6px 0; background: var(--card); }
.drag { flex: 0 0 auto; display: grid; place-items: center; width: 44px; align-self: stretch; color: var(--ink-2); cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.drag svg { width: 20px; height: 20px; fill: currentColor; }
li.ed.dragging { position: relative; z-index: 2; box-shadow: 0 6px 20px rgba(0,0,0,.18); outline: 2px solid var(--accent); border-radius: 12px; }
li.ed.dragging .drag { cursor: grabbing; color: var(--accent); }
.ed .txt b { font-size: 16px; }
.ed .txt small { font-size: 14px; }
.ed-b { flex: 0 0 auto; width: 36px; height: 36px; border: 0; border-radius: 50%; background: none; color: var(--accent); font-size: 16px; cursor: pointer; }
.ed-b.le-x { color: var(--ink-2); }
.ed-b:hover { background: var(--bg-2); }
.addhere { display: block; width: 100%; margin: 8px 0 0; padding: 10px; border: 1.5px dashed var(--line); border-radius: 12px; background: none; color: var(--accent); font: 600 16px "DM Sans", sans-serif; cursor: pointer; }
.addhere:hover { border-color: var(--accent); }
.slot .addp { margin-top: 8px; }
.ep-more { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--ink-2); font-size: 16px; }
.ep-more .tickall { margin: 0; }
body.is-editing main { padding-bottom: 90px; }
.editbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px max(16px, calc((100vw - 640px) / 2)) calc(12px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(0,0,0,.08); }
.editbar span { font-weight: 600; }
/* Undo, at the foot of the screen */
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 40; display: flex; align-items: center; gap: 14px; max-width: calc(100vw - 32px);
  padding: 10px 12px 10px 16px; border-radius: 14px; background: var(--ink); color: var(--card); font-size: 16px; box-shadow: 0 8px 24px rgba(0,0,0,.25);
  transform: translate(-50%, 140%); opacity: 0; transition: transform .2s, opacity .2s; pointer-events: none; }
.toast.on { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.toast.up { bottom: calc(84px + env(safe-area-inset-bottom)); }
.toast button { border: 0; background: none; color: var(--accent-soft); font: 700 16px "DM Sans", sans-serif; cursor: pointer; padding: 4px 6px; }
/* Coming up: the days ahead */
.upcoming { margin: 18px 0 6px; }
.upcoming h2 { margin: 0 0 8px 2px; font: 600 16px/1.2 "Noto Serif", "Fraunces", Georgia, serif; }
.upcoming ul { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--card); overflow: hidden; }
.upcoming li + li { border-top: 1px solid var(--line); }
.upcoming a, .upcoming li > span { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 10px 14px; color: inherit; text-decoration: none; }
.upcoming b { font-weight: 600; font-size: 16px; }
.upcoming small { flex: 0 0 auto; color: var(--accent); font-weight: 600; font-size: 15px; }
.when-chips { max-width: 72%; }
.when-chips button { padding: 6px 10px; }
.when-chips .link { margin: 4px 0 0 4px; font-size: 14px; }
.le-when { align-items: flex-start; }
.le-row[hidden], .addp [hidden] { display: none; }
/* Reordering: ▲ ▼ beside each row, a clearer handle, and a moved row lit for a moment */
.drag { color: var(--accent); }
.ep-how { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); font-size: 15px; }
.ep-how p { margin: 0; }
.ep-how p + p { margin-top: 6px; color: var(--ink-2); }
@keyframes moved { from { background: var(--accent-soft); } to { background: var(--card); } }
li.ed.moved { animation: moved 1.2s ease-out; }
.su-note { margin: 8px 0 6px; font-size: 16px; }
.su-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 6px; }
.su-chips .tickall { margin: 0; padding: 6px 12px; font-size: 15px; }
.su-chips .tickall[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); }

/* ── Changing an item where it is: ⋯ on each row opens its options in a sheet from the foot of the screen, over the list,
   which stays where it was; Edit list floats in the corner */
.items li > .more { flex: 0 0 auto; align-self: stretch; width: 40px; border: 0; background: none; color: var(--ink-2); font-size: 20px; line-height: 1; cursor: pointer; }
.items li > .more:hover { color: var(--accent); }
.items .item { padding-right: 4px; }
.fab { position: fixed; right: max(16px, calc((100vw - 640px) / 2 + 16px)); bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 25;
  padding: 12px 18px; border: 0; border-radius: 999px; background: var(--accent); color: var(--card); font: 600 16px "DM Sans", sans-serif;
  box-shadow: 0 6px 18px rgba(0,0,0,.22); cursor: pointer; transform: translateZ(0); }
main { padding-bottom: 84px; }
.toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
.editbar { gap: 8px; }
.editbar .eb-hint { flex: 1; font-weight: 500; font-size: 15px; color: var(--ink-2); }
.editbar .tickall { margin: 0; padding: 8px 12px; font-size: 15px; }
.sheet-bg { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.4); animation: fade .15s ease-out; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 51; max-height: calc(86vh / var(--z, 1)); overflow-y: auto; overscroll-behavior: contain;
  margin: 0 auto; max-width: 640px; padding: 8px 12px calc(14px + env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; background: var(--card);
  box-shadow: 0 -8px 30px rgba(0,0,0,.25); animation: rise .2s ease-out; }
.sheet::before { content: ""; display: block; width: 40px; height: 4px; margin: 2px auto 8px; border-radius: 2px; background: var(--line); }
.sheet .addp { margin: 0; border: 0; padding: 4px 2px; }
.sheet .ad-res { max-height: calc(50vh / var(--z, 1)); }
body.sheet-open { overflow: hidden; }
.ad-rm { margin: 10px 0 0; padding-top: 10px; border-top: 1px solid var(--line); text-align: center; }
.ad-rm .link { color: #c0392b; font-size: 16px; }
@keyframes rise { from { transform: translateY(100%); } to { transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
li.moved { animation: moved 1.4s ease-out; }
/* Above the phone's keyboard (wird/app.js sets --kb and --vvh from the visible area) */
/* (divided by --z: ../ui.js's text size zooms the page, and with it these lengths) */
.sheet { bottom: calc(var(--kb, 0px) / var(--z, 1)); max-height: calc(var(--vvh, 100vh) * 0.9 / var(--z, 1)); }
.sheet .ad-res { max-height: calc(var(--vvh, 100vh) * 0.5 / var(--z, 1)); }
.su-note.small { font-size: 15px; color: var(--ink-2); }
/* Adding: the search fills the screen, with a header to close it */
.sheet.full { top: 0; bottom: calc(var(--kb, 0px) / var(--z, 1)); max-height: none; height: auto; border-radius: 0; padding-top: calc(6px + env(safe-area-inset-top)); animation: fade .15s ease-out; }
.sheet.full::before { display: none; }
.sheet.full .ad-res { max-height: none; }
.sh-head { position: sticky; top: -6px; z-index: 1; display: flex; align-items: center; justify-content: space-between; padding: 8px 2px 10px; background: var(--card); }
.sh-head b { font: 600 18px "Noto Serif", "Fraunces", Georgia, serif; }
.sh-head .link { font-size: 16px; margin: 0; }
.ad-group { margin: 6px 0 2px; font: 600 14px "DM Sans", sans-serif; color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; list-style: none; }
.su-opt .rec { margin-left: 6px; padding: 1px 7px; border-radius: 99px; background: var(--accent); color: var(--card); font: 600 13.5px "DM Sans", sans-serif; vertical-align: 2px; }
/* Adding, as a page of its own */
.addpage { margin: 12px 0 0; }
.addpage .addp { margin: 0; padding: 0; border: 0; background: none; }
.addpage .ad-res { max-height: none; }
.addpage .sh-head { position: static; background: none; }

/* ── Dawām, simpler: a slim day bar; sections that fold to one line, with the prayer whose time it is open; a second tap
   for Check all; rows tapped for their options in Edit list */
.daybar.slim { margin: 10px 0 6px; gap: 8px; }
.daybar.slim .daymid { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px; padding: 10px 14px; text-align: left; }
.daybar.slim .daymid .dl b { display: inline; font: 600 17px "Noto Serif", Fraunces, Georgia, serif; }
.daybar.slim .daymid .dl small { font-size: 15px; }
.daybar.slim .dprog { margin: 0; font-size: 15px; font-weight: 600; color: var(--accent); text-align: right; }
.daybar.slim .dstreak { grid-column: 1 / -1; margin-top: 4px; font-size: 14px; color: var(--ink-2); }
.daybar.slim .dots { grid-column: 1 / -1; margin-top: 8px; }
.slot.folded { margin-top: 10px; }
.slot h2 .sec-t { flex: 1; display: flex; align-items: center; gap: 8px; min-height: 48px; margin: 0 -4px; padding: 6px 4px; border: 0; border-radius: 12px;
  background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.slot.folded h2 .sec-t { padding: 10px 14px; margin: 0; border: 1px solid var(--line); background: var(--card); }
.slot h2 .sec-t:hover { color: var(--accent); }
.slot h2 .sec-l { flex: 1; min-width: 0; }
.slot h2 .sec-t small { margin-left: auto; font: 600 15px "DM Sans", sans-serif; color: var(--ink-2); }
.slot h2 .sec-t small.all { color: var(--done); }
.slot h2 .chev { width: 9px; height: 9px; margin: 0 4px 4px 6px; border: solid var(--ink-2); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .15s; }
.slot h2 .sec-t[aria-expanded="true"] .chev { transform: rotate(-135deg); margin-bottom: -4px; }
.slot.folded h2 { margin-bottom: 0; }
.sec-all { margin: 6px 4px 0; text-align: right; }
.sec-all .link { font-size: 15px; }
.tickall.armed, .link.armed { color: var(--card) !important; background: var(--accent); border-color: var(--accent); padding: 4px 10px; border-radius: 999px; }
.slot h2 .tickall { margin-left: auto; }
.subhead .tickall { margin-left: 10px; text-transform: none; letter-spacing: 0; }
li.ed .ed-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; padding: 10px 4px; border: 0; background: none; color: inherit;
  font: inherit; text-align: left; cursor: pointer; }
li.ed .ed-txt small { color: var(--ink-2); }
.le-switch { cursor: pointer; }
.le-switch input { width: 26px; height: 26px; flex: 0 0 auto; accent-color: var(--accent); }
.le-row span small { display: block; }
.ad-try { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 6px; }
.ad-try .tickall { margin: 0; padding: 8px 14px; font-size: 15px; }
.ad-hint .small { margin: 6px 2px 14px; color: var(--ink-2); font-size: 15px; }
.ad-hint .suggest h3 { margin: 6px 2px 8px; font: 600 17px "Noto Serif", Fraunces, Georgia, serif; }
.ram-ask { margin: 10px 0; }
.ram-ask p { margin: 0 0 6px; }
details.howto { margin-top: 12px; }
details.howto .steps { margin: 0 14px 12px; }
.le-row.ramadan select { max-width: none; min-width: 10.5em; }
/* The one-screen setup, and "a little more" after a week kept */
.su-q { margin: 14px 0 8px; font-weight: 600; }
.su-opts.two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stepup { margin: 10px 0; padding: 14px 16px; border-radius: var(--radius); border: 1.5px solid var(--accent); background: var(--card); }
.stepup > p { margin: 0 0 8px; }
.stepup ul { list-style: none; margin: 0 0 10px; padding: 0; }
.stepup li label { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); cursor: pointer; }
.stepup li:first-child label { border-top: 0; }
.stepup input { width: 24px; height: 24px; flex: 0 0 auto; accent-color: var(--accent); }
.stepup li span { display: flex; flex-direction: column; }
.stepup li small { color: var(--ink-2); font-size: 15px; }
/* Example days: the fuller lists to look through */
.ex-head p { color: var(--ink-2); }
.ex-steps { display: flex; gap: 6px; margin: 4px -16px 8px; padding: 2px 16px 6px; overflow-x: auto; scrollbar-width: none; }
.ex-steps::-webkit-scrollbar { display: none; }
.ex-steps a { flex: 0 0 auto; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; }
.ex-steps a b { color: var(--accent); margin-right: 2px; }
.ex-steps a[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: var(--card); }
.ex-steps a[aria-current="page"] b { color: var(--card); }
.ex-sum { margin: 4px 2px 0; color: var(--ink-2); }
.ex-sum b { color: var(--ink); }
.ex-new { margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: var(--accent); color: var(--card); font: 700 12px "DM Sans", sans-serif; vertical-align: 2px; }
.ex-have { flex: 0 0 auto; margin-right: 12px; color: var(--done); font-weight: 600; font-size: 14px; }
.items li > .tickall[data-ex-add] { flex: 0 0 auto; margin-right: 12px; }
.ex-link { margin-top: 0 !important; }
/* List options: a few rows, the rest under More */
a.le-row.le-link, button.le-row.le-link { width: 100%; color: var(--ink); text-decoration: none; background: none; border-left: 0; border-right: 0; border-bottom: 0; font: inherit; font-size: 16px; text-align: left; cursor: pointer; min-height: 48px; }
.le-link > span:last-child { color: var(--accent); font-size: 22px; }
details.le-more { border-top: 1px solid var(--line); }
details.le-more > summary { padding: 12px 2px; font-weight: 600; color: var(--accent); cursor: pointer; }
.le-row.le-col { flex-direction: column; align-items: flex-start; gap: 6px; }
.le-col .le-tpl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.le-col .le-tpl .tickall { margin: 0; }

/* The print icon on a reading page, as in Dhikr */
.read-head .fav.print { margin-left: auto; flex: 0 0 auto; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink-2); }
.read-head .fav.print svg { width: 22px; height: 22px; }
.read-head .fav.print:hover { color: var(--accent); border-color: var(--accent); }

/* ── Edit list looks like the checklist: the same rows, ⋮⋮ where the box is and ✕ where ⋯ is */
.items.editing li.ed { padding: 0; gap: 0; }
li.ed .checks .drag { width: 56px; }
li.ed .ed-txt { flex: 1; min-width: 0; display: flex; flex-direction: row; align-items: center; gap: 12px; padding: 12px 14px 12px 0; border: 0; background: none;
  color: inherit; font: inherit; text-align: left; cursor: pointer; }
li.ed .ed-txt .txt { display: flex; flex-direction: column; min-width: 0; }
li.ed .more.le-x { font-size: 17px; }
.slot h2 .add-in { margin-left: 8px; flex: 0 0 auto; }
/* The Qurʾān row's − / + for āyāt a day */
.ayat-step { flex: 0 0 auto; align-self: center; display: flex; gap: 4px; }
.ayat-step button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: 600 18px/1 "DM Sans", sans-serif; cursor: pointer; }
.ayat-step button:hover { border-color: var(--accent); color: var(--accent); }
/* Add: titled for its section, with what suits it */
.ad-fits { margin-top: 10px; }
.ad-have { padding: 10px 4px; color: var(--ink-2); font-size: 15px; list-style: none; }
.ad-have span { color: var(--done); font-weight: 700; }
/* The options sheet: name and a summary, then Place, then When and how often folded */
.ad-title small { display: block; margin-top: 2px; color: var(--ink-2); font-size: 15px; font-weight: 400; }
details.ad-more { margin-top: 6px; border-top: 1px solid var(--line); }
details.ad-more > summary { padding: 12px 2px; font-weight: 600; color: var(--accent); cursor: pointer; }
details.ad-more[open] > summary { padding-bottom: 6px; }
/* List options: each row with an icon */
.lo .lo-row { display: flex; align-items: center; gap: 12px; min-height: 52px; }
.lo .lo-row > span:not(.lo-ic):not(.lo-go):not(.lo-b):not(.le-tpl) { flex: 1; min-width: 0; }
.lo-ic { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c); }
.lo-ic svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.lo .lo-go { color: var(--ink-2); font-size: 24px; }
.lo .lo-sw { width: 26px; height: 26px; accent-color: var(--accent); }
.lo .lo-col { flex-wrap: wrap; }
.lo .lo-col .le-tpl { flex-basis: 100%; padding-left: 46px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lo .lo-b { display: flex; gap: 14px; }
.lo-msg:empty { display: none; }
.lo .lo-row small { display: block; color: var(--ink-2); font-size: 14px; }
.items li > .more { display: grid; place-items: center; }
.items.editing.drop-to { outline: 2px dashed var(--accent); outline-offset: 3px; }
/* A line between sections, so each section's Check all clearly belongs to the one above it */
.slot + .slot { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.sec-all { margin-bottom: 2px; }

/* A row's ✎ (into Edit list), and Edit list at the end of the day's list; in Edit list each row's ⋯ and ✕ */
.items li > .more.pen { display: grid; place-items: center; }
.items li > .more.pen svg { width: 18px; height: 18px; }
.edit-end { margin: 18px 0 0; text-align: center; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
/* Example days, beside Edit list: easy to find for someone new */
.edit-end .ex-go { text-decoration: none; color: var(--accent); border-color: var(--accent); }
/* and first in List options, highlighted */
.lo a.lo-ex { background: var(--accent-soft); border: 1.5px solid var(--accent); border-radius: 12px; margin: 4px 0 8px; padding: 8px 12px; }
.lo a.lo-ex b, .lo a.lo-ex > span:not(.lo-go) { font-weight: 600; }
.edit-end .tickall { display: inline-flex; align-items: center; gap: 6px; }
.edit-end .tickall svg { width: 16px; height: 16px; }
li.ed .more.le-o { font-size: 20px; }
/* Edit list's row buttons: big enough to tap, the bin in a muted red */
li.ed > .more.le-o, li.ed > .more.le-x, li.ed > .more.le-gap { display: grid; place-items: center; width: 44px; height: 44px; min-height: 0; align-self: center; border-radius: 12px; padding: 0; }
li.ed > .more.le-o svg, li.ed > .more.le-x svg { width: 21px; height: 21px; }
li.ed > .more.le-o { color: var(--accent); }
li.ed > .more.le-x { color: #b3483c; }
:root[data-theme="dark"] li.ed > .more.le-x { color: #ec8a7c; }
li.ed > .more.le-o:hover, li.ed > .more.le-x:hover { background: var(--bg-2); }
/* The pencil, sliders and bin are line drawings: not filled in (svg { fill } above would fill them) */
li > .more svg, .edit-end svg { fill: none; }
/* The scrollbar's room is kept while a sheet locks the page (body.sheet-open), so the list doesn't re-wrap and move */
html { scrollbar-gutter: stable; }

/* No place saved: one line asking for it */
.ptimes-ask { display: flex; align-items: center; gap: 8px; margin: 10px 0 4px; padding: 6px 8px 6px 12px; border-radius: 14px; white-space: nowrap;
  border: 1.5px dashed color-mix(in srgb, var(--accent) 45%, var(--line)); background: color-mix(in srgb, var(--accent) 7%, var(--card)); }
.ptimes-ask .pa-ic { width: 20px; height: 20px; color: var(--accent); flex: 0 0 auto; fill: none; }
.ptimes-ask .pa-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-weight: 600; font-size: 15px; }
.ptimes-ask .tickall { flex: 0 0 auto; }

/* The top row of today: Prayer times (while no place is set, or it seems to have moved) and Quick add beside it, or
   Quick add alone in its place */
.toprow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 4px; }
.toprow .ptimes-ask { flex: 0 1 auto; min-width: 0; margin: 0; }
.toprow .pa-t:empty { display: none; }
.toprow { justify-content: space-between; }
.toprow.qa-only { justify-content: center; }
.qa-go { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; min-height: 36px; padding: 0 12px; border-radius: 999px;
  border: 1.5px solid var(--accent); color: var(--accent); background: var(--card); text-decoration: none; font: 600 15px "DM Sans", sans-serif; white-space: nowrap; }
.qa-go .qa-ic { width: 16px; height: 16px; }
.qa-pair { display: inline-flex; flex: 0 0 auto; gap: 8px; }   /* + Add beside Quick add, kept together */
button.qa-go { cursor: pointer; }
.qa-go:active { background: var(--accent-soft, var(--bg)); }
.slot h2 .sec-t.drop-to { outline: 2px dashed var(--accent); outline-offset: 3px; }

/* Lists: the tabs at the top (scrolling sideways, + at the end), the bar under them for a list other than Your list,
   the list on a past day, and the paused day */
.ltabs { display: flex; gap: 8px; margin: 0 -16px 10px; padding: 2px 16px 6px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-padding: 0 16px; }
.ltabs::-webkit-scrollbar { display: none; }
.ltab { flex: 0 0 auto; min-height: 44px; max-width: 70vw; padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); font: 500 16px "DM Sans", sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.ltab[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--card); font-weight: 600; }
.ltab-add { min-width: 48px; padding: 6px 14px; font-size: 16px; font-weight: 600; line-height: 1; color: var(--accent); white-space: nowrap; }
.list-on { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; margin: 0 0 10px; padding: 8px 12px; border-radius: 14px; background: var(--accent-soft); font-size: 16px; }
.list-on > span:not(.lo-ic):not(.lb-t) { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.list-on small { color: var(--ink-2); font-size: 14px; }
.list-on .link { margin: 0; padding: 2px 0; font-size: 15px; }
.list-on .tickall { margin: 0; min-height: 40px; padding: 6px 14px; }
.list-on .lb-sw input { width: 24px; height: 24px; accent-color: var(--accent); }
.list-on .lb-sw { display: flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; }
.list-on .lb-t { color: var(--ink-2); font-size: 15px; }
.list-on .lb-rm { margin-left: auto; }
.lo-ic + span b { font-weight: 600; }
.list-on .lo-ic { width: 30px; height: 30px; }
.paused { margin: 14px 0; padding: 18px 16px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); text-align: center; }
.paused h2 { margin: 0 0 8px; font: 600 20px "Noto Serif", "Fraunces", Georgia, serif; }
.paused p { margin: 0 0 12px; color: var(--ink-2); font-size: 16px; }
.paused p:last-child { margin-bottom: 0; }
.paused .su-next { min-height: 48px; padding: 10px 22px; }
/* a paused day: an empty dot with a dashed edge, plain against the days that count */
.daymid .dots i.lp { background: transparent; border: 1.5px dashed color-mix(in srgb, var(--ink-2) 55%, var(--line)); }
/* The lists sheet: a heading over each group; a new list's form; Bring over's ticks */
.lo .lo-h { margin: 16px 2px 2px; color: var(--ink-2); font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.lo button.le-row[aria-pressed="true"] b, .lo button.le-row[aria-pressed="true"] > span:not(.lo-ic):not(.lo-go) { font-weight: 600; }
.lo button.le-row[aria-pressed="true"] .lo-go { color: var(--done); font-size: 20px; }
.mk .mk-f { display: block; margin: 12px 2px; font-size: 16px; border: 0; padding: 0; }
.mk .mk-f input[type=text], .mk .mk-f input:not([type]), .mk .mk-f select { display: block; width: 100%; max-width: none; margin-top: 6px; font: 16px "DM Sans", sans-serif; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); box-sizing: border-box; }
.mk fieldset.mk-f legend { padding: 0; margin-bottom: 4px; }
.mk fieldset.mk-f label, .mk .mk-chk { display: flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; }
.mk input[type=radio], .mk input[type=checkbox] { width: 24px; height: 24px; flex: 0 0 auto; accent-color: var(--accent); margin: 0; }
.mk .mk-chk small { display: block; color: var(--ink-2); font-size: 14px; }
.mk .mk-adds { color: var(--ink-2); font-size: 15px; }
.bring { list-style: none; margin: 4px 0 12px; padding: 0; }
.bring label { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 2px; border-top: 1px solid var(--line); cursor: pointer; }
.bring li:first-child label { border-top: 0; }
.bring input { width: 24px; height: 24px; flex: 0 0 auto; accent-color: var(--accent); }
.bring span { display: flex; flex-direction: column; }
.bring small { color: var(--ink-2); font-size: 14px; }
/* Opened from a Dawām row: at the end, check that row and go back to the list where it was */
.done-go-p { margin: 26px 0 10px; text-align: center; }
.done-go { width: 100%; max-width: 420px; min-height: 52px; padding: 12px 20px; border: 0; border-radius: 999px; background: var(--accent); color: var(--card); font: 600 17px/1.25 inherit; font-family: inherit; cursor: pointer; }

/* The saying, shown for a moment after the welcome */
.saying { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(10, 14, 15, .45); animation: sayIn .25s cubic-bezier(.25, 1, .5, 1) both; }
.saying-box { width: min(380px, 100%); padding: 22px 20px 18px; border-radius: 22px; background: var(--card); color: var(--ink); box-shadow: var(--shadow); text-align: center; }
.saying-box .ar { margin: 0 0 10px; font: 500 24px/1.8 "Scheherazade New", "Noto Naskh Arabic", serif; }
.saying-box .en { margin: 0 0 6px; font: 600 18px/1.45 "Noto Serif", Georgia, serif; }
.saying-box .by { margin: 0 0 16px; color: var(--ink-2); font-size: 14px; }
.saying-box .su-next { min-width: 160px; }
@keyframes sayIn { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .saying { animation: none; } }

/* ── Your record (#record): the whole list this week, month or year, and each thing on it */
.record .rec-all { grid-column: 1 / -1; display: flex; justify-content: center; min-height: 48px; text-decoration: none; }
.rec-seg { margin: 0 0 12px; border: 1px solid var(--line); }
.rec-card { margin: 0 0 14px; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.rec-card h2, .rec-h { margin: 0 0 10px; font: 600 18px/1.25 "Noto Serif", "Fraunces", Georgia, serif; }
.rec-h { margin: 22px 2px 10px; }
.rec-big { display: grid; grid-template-columns: auto 1fr; align-items: baseline; margin: 0; }
.rec-big dt { padding: 10px 14px 10px 0; text-align: right; white-space: nowrap; }
.rec-big dd { margin: 0; padding: 10px 0; font-size: 16px; line-height: 1.3; }
.rec-big dt:not(:first-of-type), .rec-big dt:not(:first-of-type) + dd { border-top: 1px solid var(--line); }
.rec-big b { font: 600 26px/1 "Noto Serif", "Fraunces", Georgia, serif; font-variant-numeric: tabular-nums; }
.rec-big small { margin-left: 4px; color: var(--ink-2); font-size: 14px; }
.record .stat b, .rec-n b, .rec-tbl b { font-variant-numeric: tabular-nums; }
.rec-items li { display: block; }
.rec-it { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 12px 10px 14px; color: inherit; text-decoration: none; }
.rec-it .txt { flex: 1; min-width: 0; }
.rec-it .txt b { display: block; font-weight: 600; }
.rec-it .txt small { display: block; color: var(--ink-2); font-size: 14px; line-height: 1.3; }
.rec-n { flex: 0 0 auto; text-align: right; font-size: 14px; color: var(--ink-2); line-height: 1.25; }
.rec-n b { display: block; font: 600 19px/1.1 "Noto Serif", "Fraunces", Georgia, serif; color: var(--ink); }
.rec-it:hover .txt b { color: var(--accent); }
.rec-items + .rec-note { margin: 10px 2px 0; }
.rec-title { display: flex; align-items: center; gap: 12px; }
.rec-title h1 { margin: 0; }
.rec-tbl { width: 100%; border-collapse: collapse; font-size: 16px; }
.rec-tbl thead th { padding: 0 0 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); text-align: right; }
.rec-tbl tbody th { padding: 9px 8px 9px 0; font-weight: 500; text-align: left; }
.rec-tbl td { padding: 9px 0 9px 12px; text-align: right; white-space: nowrap; }
.rec-tbl tbody tr > * { border-top: 1px solid var(--line); }
.rec-tbl td b { font: 600 19px/1 "Noto Serif", "Fraunces", Georgia, serif; }
.rec-tbl td small { color: var(--ink-2); font-size: 14px; }
.rec-card .rec-note { margin-top: 10px; }
.rec-wk { display: grid; grid-template-columns: 2.2em repeat(12, 1fr); gap: 4px; align-items: center; font-size: 13px; color: var(--ink-2); }
.rec-wk i { height: 15px; border-radius: 4px; background: var(--bg-2); border: 1px solid var(--line); }
.rec-wk i.y, .rec-key .y::before { background: var(--done); border-color: transparent; }
.rec-wk i.x, .rec-key .x::before { background: transparent; border: 1.5px dashed color-mix(in srgb, var(--ink-2) 40%, var(--line)); }
.rec-key { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 12px 0 0; font-size: 14px; color: var(--ink-2); }
.rec-key span::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 6px; vertical-align: -1px; border-radius: 3px; background: var(--bg-2); border: 1px solid var(--line); }
/* Go back to a date: a button over the phone's own date picker (the input, invisible, takes the tap on phones) */
.goto { position: relative; display: flex; justify-content: center; margin: 0 0 12px; }
.goto .tickall { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 18px; }
.goto .tickall svg { width: 20px; height: 20px; }
.goto input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; padding: 0; cursor: pointer; }
.goto .tickall svg { fill: none; }
