/* ─────────────────────────────────────────────────────────────
   Zatak (formerly Hayati / Beity) — "ink on paper"
   The household ledger: every expense is a receipt.
   Ink blue for text & structure, cool paper background, saffron only for the main action.
   Alexandria (display + numbers) · IBM Plex Sans Arabic (body). RTL/LTR via logical properties.
   ───────────────────────────────────────────────────────────── */

/* Fonts (bundled → work offline) */
@font-face { font-family: 'Alexandria'; font-weight: 600; font-display: swap; src: url(/fonts/alexandria-arabic-600-normal.woff2) format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: 'Alexandria'; font-weight: 800; font-display: swap; src: url(/fonts/alexandria-arabic-800-normal.woff2) format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: 'Alexandria'; font-weight: 600; font-display: swap; src: url(/fonts/alexandria-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: 'Alexandria'; font-weight: 800; font-display: swap; src: url(/fonts/alexandria-latin-800-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: 'Plex Arabic'; font-weight: 400; font-display: swap; src: url(/fonts/plex-arabic-400.woff2) format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: 'Plex Arabic'; font-weight: 500; font-display: swap; src: url(/fonts/plex-arabic-500.woff2) format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: 'Plex Arabic'; font-weight: 600; font-display: swap; src: url(/fonts/plex-arabic-600.woff2) format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: 'Plex Arabic'; font-weight: 400; font-display: swap; src: url(/fonts/plex-latin-400.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: 'Plex Arabic'; font-weight: 500; font-display: swap; src: url(/fonts/plex-latin-500.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: 'Plex Arabic'; font-weight: 600; font-display: swap; src: url(/fonts/plex-latin-600.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+2212; }

:root {
  --paper: #F3F5F8;      /* background */
  --sheet: #FFFFFF;      /* receipts, lists */
  --ink: #0A182E;        /* text + structure — Zatak midnight navy */
  --ink-2: #56627B;      /* secondary text */
  --ink-3: #98A2B6;      /* hints, disabled */
  --rule: #E2E6EE;       /* hairlines */
  --tint: #E9EDF4;       /* pressed / segmented bg */
  --saffron: #E9B85E;    /* the one accent: add / primary moments — Zatak signature gold */
  --saffron-ink: #2A1C00;
  --herb: #2F8F5B;       /* under budget, done */
  --pome: #C8372D;       /* over budget, delete */
  --amber: #C97A0A;      /* 80% warning */
  --sky: #2F6FD0;        /* "added by the other person" */
  --primary: var(--ink); --primary-ink: #FFFFFF;

  --f-display: 'Alexandria', 'Plex Arabic', system-ui, sans-serif;
  --f-body: 'Plex Arabic', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  /* type scale (1.25) */
  --t-xs: 12px; --t-s: 13.5px; --t-m: 15.5px; --t-l: 19px; --t-xl: 24px; --t-xxl: 40px;

  --r-sheet: 26px; --r-card: 18px; --r-ctl: 12px; --r-ico: 11px;
  --lift: 0 1px 0 rgb(10 24 46 / .04), 0 6px 20px -8px rgb(10 24 46 / .16);
  --tabs-h: 66px; --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
[data-theme="dark"] {
  --paper: #0A182E; --sheet: #132440; --ink: #EEF1F6; --ink-2: #A3AFC6; --ink-3: #66738E;
  --rule: #22355A; --tint: #1A2C4C; --saffron: #E9B85E; --herb: #4CB97E; --pome: #E2584D; --amber: #E39A2F; --sky: #7EA8F0;
  --primary: #FAF5EB; --primary-ink: #0A182E;
  --lift: 0 1px 0 rgb(0 0 0 / .25), 0 8px 24px -10px rgb(0 0 0 / .6);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--paper); color: var(--ink); }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
/* text size (Settings → General): the phone browser scales every text, layout stays as it is */
html[data-fs="90"] { -webkit-text-size-adjust: 90%; text-size-adjust: 90%; }
html[data-fs="115"] { -webkit-text-size-adjust: 115%; text-size-adjust: 115%; }
html[data-fs="130"] { -webkit-text-size-adjust: 130%; text-size-adjust: 130%; }
body {
  font: 400 var(--t-m)/1.55 var(--f-body);
  min-height: 100dvh; padding-bottom: calc(var(--tabs-h) + var(--safe-b) + 18px);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 600; letter-spacing: -.01em; margin: 0; line-height: 1.25; }
h2 { font-size: var(--t-xl); } h3 { font-size: var(--t-l); }
[hidden] { display: none !important; }
:focus-visible { outline: 2.5px solid var(--saffron); outline-offset: 2px; border-radius: 6px; }
body:not(.authed) #shell, body:not(.authed) .tabs { display: none; }
body:not(.authed) { padding-bottom: 0; }
.muted { color: var(--ink-2); } .tiny { font-size: var(--t-xs); } .center { text-align: center; }
b.bad, .bad { color: var(--pome); } b.warn, .warn { color: var(--amber); }
.num, .amt, .big, .r-num { font-variant-numeric: tabular-nums; }

/* ── Header ─────────────────────────────────────────────── */
.top {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 18px 10px; max-width: 760px; margin: 0 auto;
  background: color-mix(in srgb, var(--paper) 86%, transparent); backdrop-filter: blur(12px);
}
.brand { font: 800 var(--t-l)/1 var(--f-display); display: flex; align-items: center; gap: 8px; }
.brand-mark { width: 26px; height: 26px; border-radius: 8px; background: var(--ink); display: grid; place-items: center; }
.brand-mark svg { width: 16px; height: 16px; color: var(--paper); }
[data-theme="dark"] .brand-mark svg { color: var(--paper); }
.top-r { display: flex; align-items: center; gap: 14px; }
.gear { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px; color: var(--ink-2); }
.gear svg { width: 22px; height: 22px; }
.gear.active { background: var(--tint); color: var(--ink); }
.status { min-width: 8px; height: 8px; border-radius: 99px; background: var(--herb); font-size: 11px; line-height: 18px; text-align: center; font-weight: 600; }
.status.pending { background: var(--amber); color: #fff; height: 18px; padding: 0 6px; }
.status.off { background: var(--pome); color: #fff; height: 18px; padding: 0 6px; }

.view { max-width: 760px; margin: 0 auto; padding: 6px 14px 0; display: flex; flex-direction: column; gap: 14px; }
.page-h { display: flex; flex-direction: column; gap: 4px; padding: 6px 4px 0; }
.page-h p { margin: 0; font-size: var(--t-s); }

/* ── Receipt (Home hero) — the one bold element ─────────── */
.receipt-wrap { filter: drop-shadow(0 10px 18px rgb(10 24 46 / .12)); padding-bottom: 12px; }
[data-theme="dark"] .receipt-wrap { filter: drop-shadow(0 12px 20px rgb(0 0 0 / .45)); }
.receipt {
  position: relative; background: var(--sheet); border-radius: var(--r-card) var(--r-card) 0 0; padding: 18px 20px 14px;
  display: flex; flex-direction: column; gap: 12px;
}
.receipt::after {     /* torn zig-zag edge */
  content: ''; position: absolute; inset-inline: 0; bottom: -11px; height: 12px;
  background:
    linear-gradient(135deg, var(--sheet) 50%, transparent 50.5%) 0 0 / 14px 12px repeat-x,
    linear-gradient(225deg, var(--sheet) 50%, transparent 50.5%) 0 0 / 14px 12px repeat-x;
}
.r-head { display: flex; justify-content: space-between; align-items: baseline; color: var(--ink-2); font-size: var(--t-s); }
.r-head b { font: 600 var(--t-m)/1.2 var(--f-display); color: var(--ink); }
.r-total { display: flex; align-items: baseline; gap: 8px; }
.r-num { font: 800 var(--t-xxl)/1 var(--f-display); letter-spacing: -.02em; }
.r-cur { font: 600 var(--t-m)/1 var(--f-display); color: var(--ink-2); }
.r-delta { font-size: var(--t-s); color: var(--ink-2); }
.r-delta.up { color: var(--pome); } .r-delta.down { color: var(--herb); }
.days { display: flex; align-items: flex-end; gap: 2px; height: 44px; direction: ltr; }
[dir="rtl"] .days { flex-direction: row-reverse; }   /* day 1 sits at the reading start */
.days i { flex: 1; min-height: 2px; border-radius: 2px 2px 0 0; background: var(--ink); opacity: .82; }
.days i.zero { background: var(--rule); opacity: 1; }
.days i.future { background: transparent; border-bottom: 2px dotted var(--rule); opacity: 1; border-radius: 0; }
.days i.today { background: var(--saffron); opacity: 1; }
.r-lines { margin: 0; display: flex; flex-direction: column; gap: 4px; border-top: 1.5px dashed var(--rule); padding-top: 10px; }
.r-line { display: flex; align-items: baseline; gap: 8px; font-size: var(--t-s); margin: 0; }
.r-line dt { color: var(--ink-2); }
.r-line i { flex: 1; border-bottom: 2px dotted var(--rule); transform: translateY(-4px); }
.r-line dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.receipt.print { animation: print .7s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes print { from { clip-path: inset(0 0 100% 0); transform: translateY(-14px); } to { clip-path: inset(0 0 -20px 0); transform: none; } }

/* ── Surfaces ───────────────────────────────────────────── */
.card { background: var(--sheet); border-radius: var(--r-card); padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--lift); }
.card.flush { padding: 0; gap: 0; overflow: hidden; }
.card-h { display: flex; justify-content: space-between; align-items: center; font: 600 var(--t-m)/1.3 var(--f-display); }
.card-h.pad { padding: 16px 18px 8px; }
.link { color: var(--ink-2); font: 500 var(--t-s)/1 var(--f-body); }
.hero .big { font: 800 var(--t-xl)/1.1 var(--f-display); }
.hero .big small { font: 500 var(--t-s)/1 var(--f-body); color: var(--ink-2); }
.people { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: var(--t-s); color: var(--ink-2); }
.people b { color: var(--ink); }
.pill { font-size: var(--t-xs); padding: 2px 10px; border-radius: 99px; background: var(--tint); color: var(--ink-2); }
.pill.ok { background: color-mix(in srgb, var(--herb) 16%, transparent); color: var(--herb); }

/* Bars */
.brow { display: flex; flex-direction: column; gap: 7px; }
.card.flush .brow { padding: 13px 18px; border-top: 1px solid var(--rule); }
.card.flush .brow:first-child { border-top: 0; }
.brow.tap { background: none; border: 0; text-align: start; width: 100%; }
.brow.tap:active { background: var(--tint); }
.brow-h { display: flex; justify-content: space-between; gap: 8px; font-size: var(--t-s); }
.brow-h > span:first-child { font-weight: 500; }
.bar { height: 6px; background: var(--tint); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--ink); border-radius: 99px; transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.bar.warn i { background: var(--amber); } .bar.over i { background: var(--pome); }

/* Rows */
.exp-row, .rc-main {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 18px; background: none; border: 0;
  border-top: 1px solid var(--rule); text-align: start;
}
.exp-row:active, .rc-main:active { background: var(--tint); }
.ico { width: 40px; height: 40px; border-radius: var(--r-ico); display: grid; place-items: center; font-size: 19px; flex: none; background: var(--tint); }
.mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
.sub { font-size: var(--t-xs); color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who { color: var(--sky); }
.amt { display: flex; flex-direction: column; align-items: flex-end; font: 600 var(--t-m)/1.3 var(--f-display); white-space: nowrap; }
.pm { font: 400 11px/1.2 var(--f-body); display: flex; align-items: center; gap: 3px; color: var(--ink-3); }
.dot { width: 7px; height: 7px; background: var(--amber); border-radius: 99px; display: inline-block; }
.badge { font: 500 11px/1.6 var(--f-body); background: var(--tint); color: var(--ink-2); border-radius: 6px; padding: 0 6px; }
.badge.car { background: color-mix(in srgb, #ea580c 14%, transparent); color: #c2410c; }
[data-theme="dark"] .badge.car { color: #fb923c; }
.day-h { display: flex; justify-content: space-between; padding: 14px 18px 6px; font-size: var(--t-xs); color: var(--ink-2); font-weight: 600; }
.day .exp-row:first-of-type, .day-h + .exp-row { border-top: 0; }
.card-h.pad + .exp-row, .card-h.pad + .rc-row .rc-main { border-top: 0; }
.empty { padding: 34px 18px; text-align: center; color: var(--ink-2); display: flex; flex-direction: column; gap: 6px; align-items: center; }
.empty b { color: var(--ink); font-family: var(--f-display); font-weight: 600; }
.e-ico { font-size: 34px; }

/* ── Filters / month nav ────────────────────────────────── */
.month-nav { display: flex; align-items: center; justify-content: space-between; padding: 2px 0; }
.month-nav strong { font: 600 var(--t-l)/1.2 var(--f-display); }
.icon-btn { width: 40px; height: 40px; border-radius: var(--r-ctl); border: 1px solid var(--rule); background: var(--sheet); font-size: 20px; display: grid; place-items: center; }
.icon-btn:disabled { opacity: .35; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; align-items: center; }
.chips::-webkit-scrollbar { display: none; }
.chip { border: 1px solid var(--rule); background: var(--sheet); border-radius: 99px; padding: 6px 13px; white-space: nowrap; font-size: var(--t-s); line-height: 1.4; }
.chip.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chips .inp { width: auto; padding: 6px 10px; }
.sep { width: 1px; height: 22px; background: var(--rule); flex: none; }
.filters { margin-top: 8px; }
.sumline { display: flex; justify-content: space-between; font-size: var(--t-s); color: var(--ink-2); padding: 0 4px; }
.sumline b { color: var(--ink); font-family: var(--f-display); font-weight: 600; }

/* ── Forms ──────────────────────────────────────────────── */
.form { display: flex; flex-direction: column; gap: 14px; }
label, .fld { display: flex; flex-direction: column; gap: 6px; font-size: var(--t-s); color: var(--ink-2); font-weight: 500; }  /* .fld: like a label, for groups of buttons (a <label> would forward every tap to its first button) */
.inp, .sel {
  width: 100%; padding: 12px 13px; border-radius: var(--r-ctl); border: 1px solid var(--rule); background: var(--sheet);
  font-size: 16px; color: var(--ink); min-width: 0; font-weight: 400;
}
.inp:focus, .sel:focus { outline: 2px solid var(--ink); outline-offset: -1px; }
.inp:disabled { opacity: .6; }
.big-inp { font: 800 26px/1.2 var(--f-display); }
.row { display: flex; } .gap { gap: 8px; } .grow { flex: 1; min-width: 0; }
.btn { border: 0; border-radius: var(--r-ctl); padding: 13px 18px; font-weight: 600; background: var(--tint); display: inline-flex; justify-content: center; align-items: center; gap: 6px; }
.btn.primary { background: var(--ink); color: var(--paper); }
.btn.danger { background: color-mix(in srgb, var(--pome) 12%, transparent); color: var(--pome); }
.btn.ghost { background: var(--tint); color: var(--ink); }
.btn.ok { color: var(--herb); }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .45; }
.btn:active { transform: scale(.98); }
.link-btn { background: none; border: 0; color: var(--ink-2); padding: 8px; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--rule); }
.err { color: var(--pome); font-size: var(--t-s); min-height: 1em; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: var(--t-xs); color: var(--ink-2); }
.seg { display: inline-flex; background: var(--tint); border-radius: var(--r-ctl); padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 7px 12px; border-radius: 9px; font-size: var(--t-s); color: var(--ink-2); }
.seg button.on { background: var(--sheet); color: var(--ink); box-shadow: 0 1px 2px rgb(10 24 46 / .12); font-weight: 600; }
.seg.small button { padding: 5px 10px; }
.set-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.set-link { flex-direction: row; align-items: center; gap: 12px; }
.set-link .chev { color: var(--ink-3); font-size: 22px; }
.me { display: flex; align-items: center; gap: 12px; }
.avatar { width: 46px; height: 46px; border-radius: 14px; background: var(--ink); color: var(--paper); display: grid; place-items: center; font: 800 20px/1 var(--f-display); }
.modes { display: flex; flex-direction: column; gap: 6px; }
.mode { display: flex; flex-direction: column; gap: 2px; text-align: start; padding: 11px 14px; border-radius: var(--r-ctl); border: 1.5px solid var(--rule); background: var(--sheet); }
.mode b { color: var(--ink); font-weight: 600; } .mode span { font-size: var(--t-xs); color: var(--ink-2); }
.mode.on { border-color: var(--ink); background: color-mix(in srgb, var(--ink) 5%, var(--sheet)); }

/* ── Login ─────────────────────────────────────────────── */
.login { min-height: 92dvh; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 10px; padding: 24px; max-width: 380px; margin: 0 auto; width: 100%; }
.login .logo { width: 72px; height: 72px; border-radius: 22px; background: var(--ink); display: grid; place-items: center; box-shadow: var(--lift); }
.login .logo svg { width: 40px; height: 40px; color: var(--saffron); }
.login h1 { font: 800 30px/1.2 var(--f-display); margin: 6px 0 14px; }
.login .form { width: 100%; }

/* ── Bottom tabs ────────────────────────────────────────── */
.tabs {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 10; height: calc(var(--tabs-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; max-width: 760px; margin: 0 auto;
  background: color-mix(in srgb, var(--sheet) 94%, transparent); backdrop-filter: blur(14px); border-top: 1px solid var(--rule);
}
.tabs a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; color: var(--ink-3); font-weight: 500; }
.tabs svg { width: 24px; height: 24px; }
.tabs a.active { color: var(--ink); font-weight: 600; }
.tabs a.active::after { content: ''; position: absolute; top: -9px; width: 18px; height: 3px; border-radius: 0 0 3px 3px; background: var(--ink); }
.fab {
  justify-self: center; width: 60px; height: 60px; margin-top: -30px; border-radius: 20px; border: 0;
  background: var(--saffron); color: var(--saffron-ink); display: grid; place-items: center;
  box-shadow: 0 10px 22px -6px rgb(232 163 23 / .6), inset 0 -3px 0 rgb(0 0 0 / .1);
}
.fab svg { width: 28px; height: 28px; }
.fab:active { transform: scale(.94); }
.tab-badge {
  position: absolute; top: -4px; inset-inline-start: calc(50% + 5px); min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 99px; background: var(--pome); color: #fff; font: 600 11px/18px var(--f-body); font-style: normal; text-align: center;
  border: 2px solid var(--sheet); box-sizing: content-box;
}

/* ── Sheets ─────────────────────────────────────────────── */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; }
.sheet-back { position: absolute; inset: 0; background: rgb(14 22 38 / .45); opacity: 0; transition: opacity .2s; }
.sheet {
  position: absolute; inset-inline: 0; bottom: 0; margin: 0 auto; max-width: 640px; max-height: 92dvh; overflow-y: auto;
  background: var(--paper); border-radius: var(--r-sheet) var(--r-sheet) 0 0; padding: 8px 18px calc(18px + var(--safe-b));
  transform: translateY(100%); transition: transform .26s cubic-bezier(.2, .8, .2, 1); overscroll-behavior: contain;
}
.sheet.tall { min-height: 70dvh; }
.sheet-wrap.open .sheet-back { opacity: 1; }
.sheet-wrap.open .sheet { transform: none; }
.grab { width: 42px; height: 5px; border-radius: 99px; background: var(--rule); margin: 0 auto 12px; }
.confirm p { font-size: var(--t-m); margin: 6px 0 16px; }
@media (min-width: 700px) {
  .sheet { bottom: auto; top: 50%; border-radius: var(--r-sheet); transform: translateY(-46%) scale(.98); opacity: 0; transition: .22s; }
  .sheet-wrap.open .sheet { transform: translateY(-50%); opacity: 1; }
  .sheet.tall { min-height: 0; }
}

/* ── Quick add ──────────────────────────────────────────── */
.qa { display: flex; flex-direction: column; gap: 12px; }
.qa-top { display: flex; justify-content: space-between; align-items: center; }
.qa-top b { font: 600 var(--t-l)/1.2 var(--f-display); }
.qa-amt { text-align: center; font: 800 48px/1.1 var(--f-display); font-variant-numeric: tabular-nums; direction: ltr; padding: 6px 0 2px; letter-spacing: -.02em; }
.qa-amt .ph { color: var(--ink-3); }
.qa-amt small { font: 600 var(--t-m)/1 var(--f-display); color: var(--ink-2); margin-inline-start: 8px; letter-spacing: 0; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; direction: ltr; }
.key { height: 52px; border: 0; border-radius: 14px; background: var(--sheet); font: 600 22px/1 var(--f-display); box-shadow: 0 1px 0 var(--rule); }
.key:active { background: var(--tint); transform: scale(.97); }
.qa-details { display: flex; flex-direction: column; gap: 8px; }
.qa-details:empty { display: none; }
.lbl { font-size: var(--t-xs); color: var(--ink-2); font-weight: 600; margin-top: 4px; }
.cat-grid, .sub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 7px; }
.sub-grid { background: var(--tint); padding: 8px; border-radius: 16px; }
.cat-chip {
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 4px 9px; border-radius: 14px; border: 0;
  background: var(--sheet); font-size: 12.5px; position: relative; line-height: 1.25; text-align: center;
  box-shadow: inset 0 -3px 0 color-mix(in srgb, var(--c, var(--ink)) 70%, transparent), 0 1px 0 var(--rule);
}
.cat-chip .ci { font-size: 22px; }
.cat-chip:active { transform: scale(.96); }
.cat-chip.open { outline: 2px solid var(--c); }
.cat-chip .more { position: absolute; top: 4px; inset-inline-end: 7px; font-size: 10px; color: var(--ink-3); }
.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@media (max-height: 700px) { .key { height: 45px; } .qa-amt { font-size: 40px; } }

/* ── Toast ──────────────────────────────────────────────── */
.toast {
  position: fixed; inset-inline: 12px; bottom: calc(var(--tabs-h) + var(--safe-b) + 46px); z-index: 60; margin: 0 auto; max-width: 520px;
  background: var(--ink); color: var(--paper); border-radius: 14px; padding: 12px 16px; display: flex; gap: 10px; align-items: center; justify-content: space-between;
  transform: translateY(16px); opacity: 0; pointer-events: none; transition: .2s; box-shadow: 0 12px 28px -8px rgb(14 22 38 / .45); font-size: var(--t-s);
}
.toast.show { transform: none; opacity: 1; }
.toast.show .toast-act { pointer-events: auto; }
.toast.bad { background: var(--pome); color: #fff; } .toast.warn { background: var(--amber); color: #fff; }
.toast-act { background: none; border: 0; color: var(--saffron); font-weight: 700; white-space: nowrap; }
.toast.bad .toast-act, .toast.warn .toast-act { color: #fff; text-decoration: underline; }

/* ── Grocery ────────────────────────────────────────────── */
.g-head { position: sticky; top: calc(52px + env(safe-area-inset-top, 0px)); z-index: 4; background: var(--paper); padding: 2px 0 4px; }
.g-lists .count { background: color-mix(in srgb, currentColor 16%, transparent); border-radius: 99px; padding: 0 7px; margin-inline-start: 6px; font-size: 12px; }
.g-lists .chip.add, .chip.add { border-style: dashed; color: var(--ink-2); }
.g-lists .more { opacity: .7; }
.g-add { padding: 10px; gap: 8px; }
.g-add .btn { padding: 0 18px; font-size: 22px; background: var(--saffron); color: var(--saffron-ink); }
.g-suggest:empty { display: none; }
.g-suggest .lbl { margin: 0 4px; white-space: nowrap; }
.g-from { align-self: flex-start; padding: 2px 4px; font-size: var(--t-s); }
.g-start { border: 1.5px dashed var(--rule); background: transparent; color: var(--ink); }
.g-trip {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-radius: var(--r-card);
  background: color-mix(in srgb, var(--sky) 10%, var(--sheet)); color: var(--ink); border-inline-start: 4px solid var(--sky);
}
.g-trip.mine { background: color-mix(in srgb, var(--herb) 10%, var(--sheet)); border-color: var(--herb); }
.g-sec .day-h { font-weight: 600; }
.g-item { display: flex; align-items: center; border-top: 1px solid var(--rule); min-height: 54px; }
.g-sec .day-h + .g-item { border-top: 0; }
.g-check {
  flex: none; width: 28px; height: 28px; margin-inline: 16px 4px; border-radius: 9px; border: 2px solid var(--ink-3);
  background: var(--sheet); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: 15px;
}
.g-item.done .g-check, .pick.on .g-check { background: var(--herb); border-color: var(--herb); }
.g-main { flex: 1; min-width: 0; background: none; border: 0; text-align: start; padding: 10px 16px 10px 6px; display: flex; flex-direction: column; position: relative; }
.g-name { font-weight: 600; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.g-qty { font: 500 12.5px/1.6 var(--f-body); color: var(--ink-2); background: var(--tint); padding: 0 8px; border-radius: 6px; }
.g-item.done .g-name { text-decoration: line-through; text-decoration-thickness: 1.5px; color: var(--ink-3); font-weight: 500; }
.g-main .dot { position: absolute; inset-inline-end: 14px; top: 50%; }
.g-foot { position: fixed; inset-inline: 0; bottom: calc(var(--tabs-h) + var(--safe-b) + 12px); z-index: 9; padding: 0 14px; max-width: 760px; margin: 0 auto; }
.g-foot:empty { display: none; }
.g-finish { box-shadow: 0 12px 26px -8px rgb(10 24 46 / .5); padding: 15px; }
body.has-gfoot { padding-bottom: calc(var(--tabs-h) + var(--safe-b) + 88px); }
body.has-gfoot .toast { bottom: calc(var(--tabs-h) + var(--safe-b) + 88px); }
.g-bought { display: flex; flex-wrap: wrap; gap: 6px; }
.g-bought .chip { font-size: 12.5px; padding: 4px 10px; }
.g-card .chips { flex-wrap: wrap; }

/* Saved-lists picker */
.pick-list { display: flex; flex-direction: column; gap: 6px; }
.pick-all { justify-content: flex-end; }
.pick { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 13px; border: 0; border-radius: 14px; background: var(--sheet); box-shadow: 0 1px 0 var(--rule); text-align: start; }
.pick .g-check { margin: 0; }
.pick.dis { opacity: .5; }
.pick .grow { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-weight: 600; }
.pick-ico { font-size: 18px; }
.icon-btn.small { width: 32px; height: 32px; font-size: 14px; margin-inline-end: 12px; background: var(--tint); border: 0; flex: none; }

/* ── Recurring ──────────────────────────────────────────── */
.rc-row { display: flex; align-items: center; }
.rc-row + .rc-row .rc-main { border-top: 1px solid var(--rule); }
.rc-row .rc-main { border-top: 0; }
.rc-row.off { opacity: .55; }
.rc-row.due .title::before { content: ''; width: 8px; height: 8px; border-radius: 99px; background: var(--saffron); flex: none; }
.rc-pay { margin-inline-end: 14px; padding: 9px 16px; background: var(--saffron); color: var(--saffron-ink); }
.rc-auto { color: var(--herb); }
.rc-sum { display: flex; justify-content: space-between; align-items: baseline; padding: 0 4px; font-size: var(--t-s); color: var(--ink-2); }
.rc-sum b { font: 600 var(--t-l)/1.2 var(--f-display); color: var(--ink); }

/* ── Laptop ─────────────────────────────────────────────── */
@media (min-width: 900px) {
  .view.v-home { display: grid; grid-template-columns: 1fr 1fr; align-items: start; max-width: 1100px; column-gap: 18px; }
  .view.v-home > .recent { grid-column: 2; grid-row: 1 / span 6; }
  .view.v-home > :not(.recent) { grid-column: 1; }
  .top { max-width: 1100px; }
}

/* ── Laptop desk (home on a wide window): tasks first, the day beside them ── */
@media (min-width: 900px) {
  .view.desk { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr); grid-template-rows: auto 1fr; align-items: start; max-width: 1180px; column-gap: 26px; row-gap: 18px; padding-top: 14px; }
  .view.desk > .desk-head { grid-column: 1 / -1; grid-row: 1; }
  .view.desk > .desk-main { grid-column: 1; grid-row: 2; }
  .view.desk > .desk-side { grid-column: 2; grid-row: 2; }
  .desk-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
  .dk-hello { font: 600 26px/1.2 var(--f-display); margin: 0 0 4px; }
  .dk-tools { display: flex; align-items: center; gap: 18px; font-size: var(--t-s); }
  .dk-key { white-space: nowrap; }
  .desk-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
  .desk-main .page-h { display: none; }
  .desk-main .tk-add { font-size: 17px; padding-block: 14px; }
  .desk-main .tk-row { padding: 13px 18px; }
  .desk-main .tk-title { font-size: 16px; }
  .desk-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 12px; min-width: 0; }
  .dk-bell { display: flex; flex-direction: column; gap: 8px; }
  .dk-bell-h { font-size: 16px; }
  .dk-bell.warn { border: 1.5px solid var(--saffron); }
  .dk-bell .btn { align-self: flex-start; }
  .dk-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 6px; }
  .dk-link { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px; border-radius: 14px; background: var(--tint); color: var(--ink); text-decoration: none; font-size: var(--t-s); text-align: center; line-height: 1.25; }
  .dk-link:hover { background: var(--rule); }
  .dk-link .ico { font-size: 20px; }
  .dk-next { font-size: var(--t-s); padding-top: 8px; border-top: 1px solid var(--rule); overflow-wrap: anywhere; }
}

.tk-pop-wrap { position: fixed; inset: 0; z-index: 200; background: rgb(14 22 38 / .35); display: flex; align-items: flex-start; justify-content: center; padding: calc(12vh + env(safe-area-inset-top, 0px)) 16px 16px; }
.tk-pop { background: var(--sheet); border-radius: 22px; padding: 22px 22px 18px; width: min(440px, 100%); display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; box-shadow: 0 24px 48px -12px rgb(14 22 38 / .45); border-top: 4px solid var(--saffron); animation: pop .4s cubic-bezier(.2, 1.4, .4, 1); }
.tk-pop-ico { font-size: 34px; }
.tk-pop-title { font: 600 22px/1.3 var(--f-display); overflow-wrap: anywhere; }
.tk-pop-btns { width: 100%; margin-top: 10px; flex-wrap: wrap; }
.tk-pop-btns > .btn { flex: 1 1 calc(50% - 8px); }

.hb-kp { display: flex; flex-direction: column; gap: 6px; margin: 6px 0; }
.hb-kp .chips { align-items: center; }
.hb-kp-date { width: auto !important; flex: 1; min-width: 140px; }
.hb-kp-now { font-size: var(--t-s); padding: 8px 10px; background: var(--tint); border-radius: 12px; line-height: 1.6; }
.tile small.good { color: var(--s1); font-weight: 600; }
.tile small.warnc { color: var(--pome); font-weight: 600; }
.pk-login { margin-top: 10px; }
.pk-card { display: flex; flex-direction: column; gap: 8px; }
.pk-here { color: var(--s1); font-weight: 600; font-size: var(--t-s); padding: 6px 0 2px; }
.pk-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--rule); }
.g-hint { color: var(--ink-2); margin: 6px 2px 0; line-height: 1.5; }
.g-hint:empty { display: none; }
.ap-hero { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ap-hero .ap-ico { font-size: 38px; }
.ap-hero p { margin: 0; line-height: 1.6; }
.ap-key { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--rule); }
.ap-fresh { border: 1.5px solid var(--saffron); }
.ap-copy { display: flex; align-items: center; gap: 8px; margin: 8px 0; padding: 8px 10px; background: var(--tint); border-radius: 12px; }
.ap-copy-l { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ap-copy code { font-size: 13px; overflow-wrap: anywhere; user-select: all; }
.ap-steps ol { padding-inline-start: 20px; margin: 8px 0; display: flex; flex-direction: column; gap: 10px; line-height: 1.6; }
.ap-json { margin-top: 6px; padding: 8px 10px; background: var(--tint); border-radius: 12px; font-size: 13px; display: grid; gap: 2px; }
.btn.block { width: 100%; margin: 4px 0 12px; }

/* ── Welcome tour ── */
.tour { position: fixed; inset: 0; z-index: 300; transition: background .3s; }
.tour.dim { background: rgb(14 22 38 / .62); }
.tour-spot { position: fixed; border-radius: 16px; box-shadow: 0 0 0 9999px rgb(14 22 38 / .62); outline: 2px solid var(--saffron); outline-offset: 2px; transition: all .3s cubic-bezier(.2, .8, .2, 1); pointer-events: none; }
.tour-card { position: fixed; inset-inline: 16px; max-width: 420px; margin-inline: auto; background: var(--sheet); border-radius: 20px; padding: 18px 18px 14px;
  box-shadow: 0 24px 48px -12px rgb(14 22 38 / .5); display: flex; flex-direction: column; gap: 6px; animation: pop .35s cubic-bezier(.2, 1.3, .4, 1); }
.tour-card.mid { top: 50%; transform: translateY(-50%); text-align: center; align-items: center; }
.tour-card p { margin: 0; line-height: 1.65; color: var(--ink-2); }
.tour-ico { font-size: 28px; }
.tour-title { font: 600 19px/1.3 var(--f-display); }
.tour-dots { display: flex; gap: 5px; justify-content: center; margin: 8px 0 2px; }
.tour-dots i { width: 6px; height: 6px; border-radius: 9px; background: var(--rule); transition: width .2s; }
.tour-dots i.on { width: 18px; background: var(--saffron); }
.tour-btns { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; margin-top: 4px; }
@media (prefers-reduced-motion: reduce) { .tour-spot, .tour-card { transition: none; animation: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Toast moves to the top while a sheet is open (keep last: overrides footer offsets) */
body:has(.sheet-wrap) .toast, body.has-gfoot:has(.sheet-wrap) .toast { bottom: auto; top: calc(10px + env(safe-area-inset-top, 0px)); }

/* ── Rent cheques ───────────────────────────────────────── */
.chq-wrap { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.chq-ico { background: transparent; border: 1.5px dashed var(--ink-3); }
.chq-ico b { font: 600 12px/1 var(--f-display); }
.chq.cleared .chq-ico { border-style: solid; border-color: var(--herb); color: var(--herb); }
.chq.bounced .chq-ico { border-style: solid; border-color: var(--pome); color: var(--pome); }
.chq-track { display: flex; gap: 4px; padding: 0 18px 10px; }
.chq-track i { flex: 1; height: 5px; border-radius: 99px; background: var(--tint); }
.chq-track i.cleared { background: var(--herb); } .chq-track i.bounced { background: var(--pome); }
.pill.st-pending { background: var(--tint); color: var(--ink-2); }
.pill.st-cleared { background: color-mix(in srgb, var(--herb) 15%, transparent); color: var(--herb); }
.pill.st-bounced { background: color-mix(in srgb, var(--pome) 15%, transparent); color: var(--pome); }
.amt .pill { font: 500 11px/1.6 var(--f-body); margin-top: 2px; padding: 0 8px; }
.pv-row { display: flex; justify-content: space-between; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--rule); font-size: var(--t-s); }
.pv-row:first-child { border-top: 0; }
.pv-row span:first-child { color: var(--ink-2); min-width: 40px; }

/* ── Charts (validated series pair: indigo = spending, burnt orange = income) ── */
:root { --s1: #4A63C8; --s2: #CC6A2C; }
[data-theme="dark"] { --s1: #7B92E8; --s2: #D9773A; }
.ch { display: flex; flex-direction: column; gap: 6px; }
.chart { width: 100%; height: auto; overflow: visible; touch-action: manipulation; }
.ch-bar.s1 { fill: var(--s1); } .ch-bar.s2 { fill: var(--s2); }
.ch-g .ch-bar { opacity: .55; transition: opacity .15s; }
.ch-g.on .ch-bar { opacity: 1; }
.ch-hit { fill: transparent; cursor: pointer; }
.ch-g:focus-visible { outline: none; } .ch-g:focus-visible .ch-bar { opacity: 1; stroke: var(--ink); stroke-width: 1.5; }
.ch-grid { stroke: var(--rule); stroke-width: 1; stroke-dasharray: 2 4; }
.ch-base { stroke: var(--ink-3); stroke-width: 1; }
.ch-avg { stroke: var(--ink-2); stroke-width: 1.5; stroke-dasharray: 5 4; }
.ch-axis, .ch-x { fill: var(--ink-3); font: 500 10px var(--f-body); }
.ch-val { fill: var(--ink); font: 600 11px var(--f-display); }
.ch-cap { font-size: var(--t-s); color: var(--ink-2); min-height: 1.5em; }
.ch-legend { display: flex; gap: 14px; font-size: var(--t-xs); color: var(--ink-2); }
.ch-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 6px; vertical-align: -1px; }
.ch-legend i.s1 { background: var(--s1); } .ch-legend i.s2 { background: var(--s2); }

/* ── Reports ───────────────────────────────────────────── */
.r-tabs { position: sticky; top: calc(52px + env(safe-area-inset-top, 0px)); z-index: 4; background: var(--paper); padding: 4px 0 6px; }
.r-body { display: flex; flex-direction: column; gap: 14px; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tile.wide { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: baseline; column-gap: 12px; }
.tile.wide span { flex-basis: 100%; }
@media (min-width: 700px) { .tiles { grid-template-columns: repeat(3, 1fr); } .tile.wide { grid-column: auto; flex-direction: column; } }
.tile { background: var(--sheet); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; box-shadow: var(--lift); }
.tile span { font-size: var(--t-xs); color: var(--ink-2); }
.tile b { font: 800 var(--t-l)/1.2 var(--f-display); font-variant-numeric: tabular-nums; }
.tile small { font-size: 11px; color: var(--ink-2); }
.tile.neg b { color: var(--pome); }
.delta-tag { font: 600 11px/1.6 var(--f-body); padding: 0 7px; border-radius: 6px; background: var(--tint); color: var(--ink-2); margin-inline-start: 6px; }
.delta-tag.up { color: var(--pome); background: color-mix(in srgb, var(--pome) 12%, transparent); }
.delta-tag.down { color: var(--herb); background: color-mix(in srgb, var(--herb) 12%, transparent); }
.delta-tag.new { color: var(--sky); background: color-mix(in srgb, var(--sky) 12%, transparent); }
.brow.cmp .bar i { background: var(--s1); }
.ytable { width: 100%; border-collapse: collapse; font-size: var(--t-s); font-variant-numeric: tabular-nums; }
.ytable th { text-align: start; font-weight: 600; color: var(--ink-2); font-size: var(--t-xs); padding: 12px 14px 8px; }
.ytable td { padding: 10px 14px; border-top: 1px solid var(--rule); }
.ytable td.neg { color: var(--pome); }
.svc { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.svc > div { display: flex; flex-direction: column; gap: 2px; }
.svc b { font: 600 var(--t-m)/1.3 var(--f-display); }
.svc-set { align-items: center; flex-wrap: wrap; }
.svc-set .inp { width: 90px; padding: 8px 10px; }

/* Income */
.amt.inc, .exp-row.inc .amt { color: var(--s2); }
.qa-amt.inc { color: var(--s2); }
.qa-mode button.on { font-weight: 700; }
.r-line.r-inc dd { color: var(--s2); }
.r-line.r-neg dd { color: var(--pome); }
.r-line.r-pos dd { color: var(--herb); }
.store-row { padding: 6px 0; border-top: 1px solid var(--rule); }
.tile b { font-size: 20px; white-space: nowrap; display: flex; align-items: baseline; gap: 4px; }
.tile b .cur { font: 600 11px/1 var(--f-display); color: var(--ink-2); }
@media (max-width: 360px) { .tile b { font-size: 16px; } }

/* ── Habits: "يومنا" ───────────────────────────────────────
   The day as a line from Fajr to Isha; prayers are beads on it; you and your partner on parallel rows. */
.hb-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; padding: 4px 4px 0; }
.hb-date { display: flex; flex-direction: column; gap: 2px; }
.hb-date b { font: 600 var(--t-l)/1.25 var(--f-display); }
.hb-next { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; text-align: end; }
.hb-next b { font: 800 var(--t-xl)/1 var(--f-display); }
.hb-next span:last-child { font-size: var(--t-s); color: var(--ink-2); }

.tl-card { padding: 18px 16px 14px; gap: 6px; overflow: hidden; }
.tl-sky { position: relative; height: 64px; }
.tl-line { position: absolute; inset-inline: 0; top: 46px; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, #8FA3C7, #E8C468 30%, #F0B23A 55%, #C97A5A 78%, #2B3A63); opacity: .55; }
[dir="rtl"] .tl-line { background: linear-gradient(-90deg, #8FA3C7, #E8C468 30%, #F0B23A 55%, #C97A5A 78%, #2B3A63); }
.tl-label { position: absolute; top: 0; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; white-space: nowrap; }
[dir="rtl"] .tl-label { transform: translateX(50%); }
.tl-label b { font: 600 12.5px/1.3 var(--f-display); }
.tl-label span { font-size: 11px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.tl-sun { position: absolute; top: 38px; transform: translateX(-50%); font-size: 13px; color: var(--amber); }
[dir="rtl"] .tl-sun { transform: translateX(50%); }
.tl-now { position: absolute; top: 34px; width: 2px; height: 26px; background: var(--saffron); border-radius: 2px; transform: translateX(-1px); }
.tl-now::after { content: ''; position: absolute; top: -4px; left: -3px; width: 8px; height: 8px; border-radius: 99px; background: var(--saffron); }
.tl-row { position: relative; height: 46px; border-top: 1px dashed var(--rule); }
.tl-who { position: absolute; inset-inline-start: 0; top: 4px; font-size: 10.5px; color: var(--ink-3); z-index: 1; }
.tl-node {
  position: absolute; top: 9px; transform: translateX(-50%); width: 32px; height: 32px; border-radius: 99px;
  display: grid; place-items: center; font-size: 14px; font-weight: 800; border: 2px solid var(--ink-3); background: var(--sheet); color: var(--paper);
  transition: transform .15s;
}
[dir="rtl"] .tl-node { transform: translateX(50%); }
button.tl-node { cursor: pointer; padding: 0; }
button.tl-node:active { transform: translateX(-50%) scale(.9); }
[dir="rtl"] button.tl-node:active { transform: translateX(50%) scale(.9); }
.tl-node.future { opacity: .45; border-style: dashed; }
.tl-node.ontime { background: var(--ink); border-color: var(--ink); }
.tl-node.jamaah { background: var(--saffron); border-color: var(--saffron); color: var(--saffron-ink); font-size: 15px; }
.tl-node.late { background: var(--tint); border-color: var(--amber); color: var(--amber); font-size: 13px; }
span.tl-node { width: 26px; height: 26px; top: 11px; font-size: 12px; }
.tl-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 11px; color: var(--ink-2); padding-top: 4px; }
.tl-legend .tl-node { position: static; transform: none; width: 18px; height: 18px; font-size: 10px; display: inline-grid; vertical-align: middle; margin-inline-end: 4px; border-width: 1.5px; }

.hb-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 16px; background: none; border: 0; border-top: 1px solid var(--rule); text-align: start; }
.card-h.pad + .hb-row, .hb-row:first-child { border-top: 0; }
.hb-ico { width: 38px; height: 38px; border-radius: 12px; background: var(--tint); display: grid; place-items: center; font-size: 19px; flex: none; }
.hb-name { flex: 1; min-width: 0; font-weight: 600; display: flex; flex-direction: column; gap: 3px; }
.hb-name small { font: 500 12px/1.2 var(--f-body); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.hb-check { width: 28px; height: 28px; border-radius: 9px; border: 2px solid var(--ink-3); display: grid; place-items: center; color: var(--paper); font-weight: 800; flex: none; }
.hb-row.done .hb-check { background: var(--herb); border-color: var(--herb); }
.hb-row.done:not(.count) .hb-name { color: var(--ink-2); }
.hb-bar { height: 5px; background: var(--tint); border-radius: 99px; overflow: hidden; max-width: 160px; }
.hb-bar i { display: block; height: 100%; background: var(--ink); border-radius: 99px; transition: width .3s; }
.hb-row.count.done .hb-bar i { background: var(--herb); }
.hb-step { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; justify-content: flex-end; max-width: 52%; }
.hb-step .icon-btn.small { margin: 0; }
.hb-q { padding: 4px 9px; font-size: 12.5px; }
.hb-row.set { padding: 10px 14px; }
.hb-target { width: 76px; padding: 7px 8px; }
.switch { width: 44px; height: 26px; border-radius: 99px; border: 0; background: var(--rule); position: relative; flex: none; transition: background .15s; padding: 0; }
.switch i { position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 99px; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .25); transition: inset-inline-start .15s; }
.switch.on { background: var(--ink); } .switch.on i { inset-inline-start: 21px; }

.pt-card { gap: 12px; }
.pt-head { display: flex; align-items: center; gap: 12px; }
.pt-head > div:nth-child(2) { flex: 1; }
.avatar.sm { width: 40px; height: 40px; border-radius: 12px; font-size: 17px; background: var(--s2); color: #fff; }
.pt-ring { --p: 0; width: 48px; height: 48px; border-radius: 99px; display: grid; place-items: center;
  background: conic-gradient(var(--herb) calc(var(--p) * 1%), var(--tint) 0); }
.pt-ring span { width: 38px; height: 38px; border-radius: 99px; background: var(--sheet); display: grid; place-items: center; font: 600 11px/1 var(--f-display); }
.pt-chip.on { border-color: var(--herb); color: var(--herb); }
.cheer-row { display: flex; gap: 8px; justify-content: space-between; }
.cheer-btn { flex: 1; height: 48px; border-radius: 14px; border: 0; background: var(--tint); font-size: 22px; transition: transform .12s; }
.cheer-btn:active { transform: scale(.88); background: var(--rule); }
/* «الصحبة» friend page: the same conversation look */
.sh-chat { gap: 10px; }
.sh-chat-thread { max-height: 52vh; }
.ch-sys { align-self: center; text-align: center; font-size: var(--t-xs); color: var(--ink-2); margin: 4px 0 8px; max-width: 80%; }
.ch-bub.pray { border: 1px solid color-mix(in srgb, var(--herb) 45%, transparent); }
.ch-bub.later { opacity: .7; border: 1px dashed var(--ink-3); }
.ch-msg.mine .ch-bub.later { background: var(--tint); color: var(--ink); }
.ch-replies { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.ch-time .link { font-size: inherit; padding: 0; }
.ch-compose .inp { flex: 1; min-width: 0; }
.ch-msg .avatar.xs { overflow: hidden; }
/* more than one person in the house → pick whose card/conversation */
.pt-tabs { margin: -2px 0 2px; }
.pt-tab { display: inline-flex; align-items: center; gap: 7px; padding: 4px 12px 4px 5px; }
[dir="rtl"] .pt-tab { padding: 4px 5px 4px 12px; }
.pt-tab .avatar.xs { width: 24px; height: 24px; border-radius: 8px; font-size: 11px; background: var(--s2); color: #fff; }
.pt-unread { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--sky); color: var(--sheet); font-size: 11px; font-weight: 600; display: inline-grid; place-items: center; }
/* the two of you, as a conversation */
.ch-thread { display: flex; flex-direction: column; gap: 3px; padding: 12px 10px; margin-inline: -4px; border-radius: 16px; background: var(--paper); max-height: 360px; overflow-y: auto; overscroll-behavior: contain; }
.ch-more { align-self: center; font-size: var(--t-xs); margin-bottom: 4px; }
.ch-day { display: flex; justify-content: center; margin: 8px 0 6px; }
.ch-day:first-child, .ch-more + .ch-day { margin-top: 0; }
.ch-day span { font-size: 11.5px; color: var(--ink-2); background: var(--tint); padding: 2px 10px; border-radius: 99px; }
.ch-msg { display: flex; align-items: flex-end; gap: 7px; max-width: 82%; }
.ch-msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.ch-msg.tail { margin-bottom: 6px; }
.ch-msg .avatar.xs, .ch-gap { width: 26px; height: 26px; border-radius: 9px; font-size: 12px; flex: none; background: var(--s2); color: #fff; }
.ch-gap { background: none; }
.ch-col { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.ch-msg.mine .ch-col { align-items: flex-end; }
.ch-bub { padding: 8px 13px; border-radius: 18px; background: var(--sheet); color: var(--ink); line-height: 1.45; overflow-wrap: anywhere; box-shadow: 0 1px 0 rgb(10 24 46 / .06); }
.ch-msg:not(.mine).tail .ch-bub { border-end-start-radius: 6px; }
.ch-msg.mine .ch-bub { background: var(--ink); color: var(--paper); }
.ch-msg.mine.tail .ch-bub { border-end-end-radius: 6px; }
.ch-bub.emo, .ch-msg.mine .ch-bub.emo { background: none; box-shadow: none; padding: 0 2px; font-size: 34px; line-height: 1.15; }
.ch-bub.fresh:not(.emo) { box-shadow: 0 0 0 2px color-mix(in srgb, var(--sky) 55%, transparent); }
.ch-time { font-size: 11px; color: var(--ink-3); margin: 2px 4px 0; font-variant-numeric: tabular-nums; }

.kh-row { display: flex; flex-direction: column; gap: 6px; }
.kh-bar { display: grid; grid-template-columns: repeat(30, 1fr); gap: 2px; direction: ltr; }
[dir="rtl"] .kh-bar { direction: rtl; }
.kh-bar i { height: 10px; border-radius: 2px; background: var(--tint); }
.kh-bar i.on { background: var(--s1); } .kh-bar i.cur { background: var(--saffron); }

.heat-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.heat-wrap > div { display: flex; flex-direction: column; gap: 4px; }
.heat { display: grid; grid-template-columns: repeat(8, 1fr); grid-auto-flow: column; grid-template-rows: repeat(7, 1fr); gap: 3px; }
.heat i { aspect-ratio: 1; border-radius: 3px; background: var(--s1); }
.heat i.z { background: var(--tint); opacity: 1; }
.rate-list { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }

/* Home card */
.hb-home { gap: 8px; }
.hb-home-rows { display: flex; gap: 18px; flex-wrap: wrap; }
.hb-home-rows > div { display: flex; flex-direction: column; gap: 4px; }
.beads { display: flex; gap: 6px; }
.beads i { width: 16px; height: 16px; border-radius: 99px; border: 2px solid var(--ink-3); }
.beads i.ontime { background: var(--ink); border-color: var(--ink); }
.beads i.jamaah { background: var(--saffron); border-color: var(--saffron); }
.beads i.late { background: var(--tint); border-color: var(--amber); }

/* Cheer burst */
.burst { position: fixed; inset: 0; z-index: 80; pointer-events: auto; overflow: hidden; display: grid; place-items: center; background: rgb(14 22 38 / .18); transition: opacity .5s; }
.burst.out { opacity: 0; }
.b-e { position: absolute; bottom: -60px; animation: floatup 3.2s cubic-bezier(.2, .7, .3, 1) forwards; }
@keyframes floatup { 0% { transform: translateY(0) scale(.6); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(-110vh) scale(1.1) rotate(12deg); opacity: 0; } }
.b-card { background: var(--sheet); border-radius: 22px; padding: 22px 26px; display: flex; flex-direction: column; align-items: center; gap: 4px; box-shadow: 0 20px 40px -10px rgb(14 22 38 / .4); max-width: 80vw; text-align: center; animation: pop .45s cubic-bezier(.2, 1.4, .4, 1); }
.b-big { font-size: 46px; line-height: 1.1; }
.b-card b { font: 800 var(--t-l)/1.3 var(--f-display); }
@keyframes pop { from { transform: scale(.7); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 380px) { .tl-label b { font-size: 11px; } .tl-node { width: 28px; height: 28px; } }
/* timeline: row names live in the first 14%, links in card headers are plain text */
.tl-line { inset-inline-start: 14%; }
.tl-who { top: 50%; transform: translateY(-50%); font-size: 11px; font-weight: 600; color: var(--ink-2); max-width: 13%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button.link { background: none; border: 0; padding: 0; cursor: pointer; font: 500 var(--t-s)/1 var(--f-body); color: var(--ink-2); }
.hb-date b { font-size: 17px; } .hb-next b { font-size: 22px; }
/* Friday */
.fri-card { border-top: 3px solid var(--ink); }
.fri-card .card-h.pad span:first-child { font-weight: 700; }
.tl-label.jum b { color: var(--ink); }
.tl-label.jum span { color: var(--amber); font-weight: 600; }

/* ── v9 ─────────────────────────────────────────── */
/* season card: same family as Friday, one step quieter */
.season-card { border-top-color: var(--s1); }

/* shared khatma: me = s1, partner = s2 (validated pair); filled = finished, outlined = reserved */
.sk-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin: 4px 0 2px; }
.sk-j { aspect-ratio: 1; border-radius: 10px; border: 1.5px solid var(--rule); background: var(--sheet); color: var(--ink-2);
  font: 600 var(--t-s)/1 var(--f-body); display: grid; place-items: center; padding: 0; font-variant-numeric: tabular-nums; }
.sk-j.me { border: 2px dashed var(--s1); color: var(--s1); }
.sk-j.pt { border: 2px dashed var(--s2); color: var(--s2); }
.sk-j.done.me { background: var(--s1); border: 2px solid var(--s1); color: #fff; }
.sk-j.done.pt { background: var(--s2); border: 2px solid var(--s2); color: #fff; }
.sk-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: var(--t-xs); color: var(--ink-2); }
.sk-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sk-legend i.sk-j { width: 14px; height: 14px; border-radius: 4px; aspect-ratio: auto; }

/* home reminders */
.rc-row.rem .rc-main { flex: 1; min-width: 0; }
.rem-when { font-size: var(--t-s); font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.rem-when.warn { color: var(--amber); } .rem-when.bad { color: var(--pome); }
.rem-done { margin-inline: 4px 12px; border: 1.5px solid var(--rule); border-radius: 10px; color: var(--herb); font-weight: 700; }
.rc-row.rem + .rc-row.rem { border-top: 1px solid var(--rule); }
.rc-row.rem + .rc-row.rem .rc-main { border-top: 0; }
.rc-row.muted { opacity: .6; }

/* savings goals */
.goal { gap: 10px; }
.goal-h { display: flex; align-items: center; gap: 12px; background: none; border: 0; padding: 0; text-align: start; width: 100%; color: inherit; }
.goal-h .mid { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.goal-ico { width: 42px; height: 42px; border-radius: var(--r-ico); background: var(--tint); display: grid; place-items: center; font-size: 22px; flex: none; }
.goal-pct { font: 800 var(--t-l)/1 var(--f-display); font-variant-numeric: tabular-nums; }
.goal .bar { height: 8px; }
.goal.won .bar i { background: var(--herb); }
.goal-st.on_track, .goal-st.ok { color: var(--herb); } .goal-st.behind { color: var(--amber); } .goal-st.late { color: var(--pome); }
.amt.neg { color: var(--pome); }

/* grocery: prices + running low */
.g-cheap { color: var(--herb) !important; }
.chip.low { border-style: dashed; }
.g-prices { border: 1px solid var(--rule); border-radius: var(--r-ctl); padding: 10px 12px; background: var(--sheet); }
.g-prices summary { cursor: pointer; font-weight: 600; font-size: var(--t-s); }
.g-prices[open] summary { margin-bottom: 6px; }
.g-prow { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--rule); flex-direction: row !important; }
.g-pin { width: 96px; flex: none; text-align: center; }
.g-pr { padding: 12px 16px; border-top: 1px solid var(--rule); display: flex; flex-direction: column; gap: 8px; }
.g-pr:first-child { border-top: 0; }
.g-pr-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.g-price-box { display: flex; flex-wrap: wrap; gap: 6px; }

/* quick add: receipt reading */
.qa-links { justify-content: space-between; gap: 8px; }
.qa-ocr { color: var(--ink-2); padding: 2px 2px 0; } .qa-ocr.ok { color: var(--herb); }

/* system health */
.hl-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--rule); }
.card-h.pad + .hl-row { border-top: 0; }
.hl-row .mid { display: flex; flex-direction: column; min-width: 0; }
.hl-row .sub { font-size: var(--t-s); color: var(--ink-2); overflow-wrap: anywhere; }
.hl-dot { width: 24px; height: 24px; border-radius: 99px; display: grid; place-items: center; font-size: 13px; font-weight: 700; flex: none; background: var(--tint); color: var(--ink-2); }
.hl-row.ok .hl-dot { background: color-mix(in srgb, var(--herb) 16%, transparent); color: var(--herb); }
.hl-row.bad .hl-dot { background: color-mix(in srgb, var(--pome) 16%, transparent); color: var(--pome); }
.hl-row.warn .hl-dot { background: color-mix(in srgb, var(--amber) 18%, transparent); color: var(--amber); }
.hl-log pre { font-size: 11px; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--tint); border-radius: 10px; padding: 10px; margin: 8px 0 0; text-align: left; }
.hl-pad { padding: 12px 16px; }

/* ── v10 ─────────────────────────────────────────── */
/* receipt: whole dirhams big, fils small; the day-to-day / fixed split */
.r-frac { font-size: .45em; font-weight: 700; color: var(--ink-2); letter-spacing: 0; }
.r-split { display: flex; flex-direction: column; gap: 6px; }
.r-split-bar { display: flex; height: 8px; border-radius: 99px; overflow: hidden; background: var(--tint); gap: 2px; }
.r-split-bar i { display: block; height: 100%; }
.r-split-bar i.d { background: var(--ink); }
.r-split-bar i.f { background: repeating-linear-gradient(135deg, var(--ink-3) 0 2px, transparent 2px 5px); opacity: .75; }
.r-split-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: var(--t-s); color: var(--ink-2); }
.r-split-legend span { display: inline-flex; align-items: center; gap: 6px; }
.r-split-legend b { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.r-split-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.r-split-legend i.d { background: var(--ink); }
.r-split-legend i.f { background: repeating-linear-gradient(135deg, var(--ink-3) 0 2px, transparent 2px 4px); outline: 1px solid var(--ink-3); outline-offset: -1px; }
.r-days-cap { font-size: var(--t-xs); color: var(--ink-3); margin-top: -4px; }
.brow-h .pct { font-variant-numeric: tabular-nums; }
.brow-h .pct.warn { color: var(--amber); } .brow-h .pct.bad { color: var(--pome); }
.more-link { display: block; text-align: center; padding-top: 2px; }

/* home layout */
.home-edit { align-self: center; margin: 4px auto 0; display: block; color: var(--ink-3); }
.lay-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--rule); }
.lay-row:first-child { border-top: 0; }
.lay-row.off .grow { color: var(--ink-3); text-decoration: line-through; }
.lay-tog { width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--ink); background: var(--ink); color: var(--paper); font-weight: 800; padding: 0; flex: none; }
.lay-row.off .lay-tog { background: transparent; border-color: var(--ink-3); }
button.set-link { width: 100%; text-align: start; border: 0; font: inherit; color: inherit; }
.recap-cta { flex-direction: row; align-items: center; gap: 12px; margin-top: -4px; }
.recap-cta .mid { flex: 1; display: flex; flex-direction: column; }
.recap-cta .sub { font-size: var(--t-s); color: var(--ink-2); }
.recap-cta .ico { font-size: 24px; }
.recap-cta .chev { color: var(--ink-3); font-size: 22px; }

/* habits home card: prayers across, the two of us down */
.hb-grid { display: grid; grid-template-columns: auto repeat(5, 1fr); gap: 6px 4px; align-items: center; justify-items: center; }
.hb-gn { font-size: 10.5px; font-weight: 600; color: var(--ink-3); white-space: nowrap; }
.hb-gw { justify-self: start; padding-inline-end: 6px; }
.hb-grid > i { width: 18px; height: 18px; border-radius: 99px; border: 2px solid var(--ink-3); }
.hb-grid > i.ontime { background: var(--ink); border-color: var(--ink); }
.hb-grid > i.jamaah { background: var(--saffron); border-color: var(--saffron); }
.hb-grid > i.late { background: var(--tint); border-color: var(--amber); }

/* reports: income invitation tile */
.tile-cta { border: 1.5px dashed var(--rule); box-shadow: none; background: transparent; text-align: start; font: inherit; color: inherit; cursor: pointer; }
.tile-cta b { font: 800 var(--t-l)/1 var(--f-display); color: var(--ink-2); }
.tile small { font-size: var(--t-xs); color: var(--ink-2); }

/* swipe rows */
.sw { position: relative; overflow: hidden; }
.sw > .exp-row { position: relative; z-index: 1; background: var(--sheet); touch-action: pan-y; }
.sw-acts { position: absolute; inset-block: 0; inset-inline-end: 0; display: flex; z-index: 0; }
.sw-act { width: 76px; border: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; background: var(--tint); color: var(--ink); font: 600 var(--t-xs)/1.2 var(--f-body); }
.sw-act span { font-size: 18px; }
.sw-act.del { background: var(--pome); color: #fff; }

/* pull to refresh */
.ptr { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 6px); left: 50%; transform: translate(-50%, 0); width: 34px; height: 34px; border-radius: 99px;
  background: var(--sheet); box-shadow: var(--lift); display: grid; place-items: center; color: var(--ink-2); opacity: 0; z-index: 60; pointer-events: none; font-weight: 700; }
.ptr.ready { color: var(--ink); }
.ptr.spin { opacity: 1 !important; transform: translate(-50%, 56px) !important; }
.ptr.spin span { animation: ptr-spin .8s linear infinite; display: inline-block; }
.ptr.spin span::before { content: '↻'; } .ptr.spin span { font-size: 0; } .ptr.spin span::before { font-size: 18px; }
@keyframes ptr-spin { to { transform: rotate(360deg); } }

/* month recap */
.recap { background: var(--sheet); border-radius: 22px; box-shadow: var(--lift); padding: 22px 20px 18px; display: flex; flex-direction: column; gap: 14px; }
.rc-month { font: 600 var(--t-m)/1.2 var(--f-display); color: var(--ink-2); }
.rc-month small { font: inherit; font-size: var(--t-s); color: var(--ink-3); }
.rc-total { font: 800 52px/1 var(--f-display); letter-spacing: -.02em; display: flex; align-items: baseline; gap: 8px; font-variant-numeric: tabular-nums; }
.rc-total small { font: 600 var(--t-m)/1 var(--f-display); color: var(--ink-2); letter-spacing: 0; }
.rc-split { color: var(--ink-2); font-size: var(--t-s); display: flex; gap: 8px; flex-wrap: wrap; }
.dotsep { color: var(--ink-3); }
.rc-delta { font-size: var(--t-s); font-weight: 600; color: var(--ink-2); }
.rc-delta.up { color: var(--pome); } .rc-delta.down { color: var(--herb); }
.rc-save { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--herb) 10%, transparent); }
.rc-save span { flex-basis: 100%; font-size: var(--t-xs); color: var(--ink-2); }
.rc-save b { font: 800 var(--t-l)/1 var(--f-display); color: var(--herb); }
.rc-save.neg { background: color-mix(in srgb, var(--pome) 10%, transparent); } .rc-save.neg b { color: var(--pome); }
.rc-save small { color: var(--ink-2); font-size: var(--t-xs); }
.rc-sec { display: flex; flex-direction: column; gap: 8px; border-top: 1.5px dashed var(--rule); padding-top: 12px; }
.rc-sec h4 { margin: 0; font: 700 var(--t-s)/1.2 var(--f-body); color: var(--ink-2); }
.rc-top { display: flex; align-items: baseline; gap: 10px; }
.rc-top b { font-variant-numeric: tabular-nums; }
.rc-top small { color: var(--ink-3); font-size: var(--t-xs); width: 34px; text-align: end; }
.rc-rank { width: 22px; height: 22px; border-radius: 99px; background: var(--ink); color: var(--paper); display: grid; place-items: center; font: 700 12px/1 var(--f-body); flex: none; align-self: center; }
.rc-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; border-top: 1.5px dashed var(--rule); padding-top: 12px; }
.rc-fact { background: var(--paper); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rc-fact b { font: 800 var(--t-l)/1.15 var(--f-display); overflow-wrap: anywhere; }
.rc-fact span:not(.rc-ico) { font-size: var(--t-xs); color: var(--ink-2); }
.rc-fact small { font-size: 11px; color: var(--ink-3); }
.rc-ico { font-size: 18px; }
.rc-pr { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: baseline; }
.rc-pr .bar { grid-column: 1 / -1; }
.rc-foot { text-align: center; font-size: var(--t-xs); color: var(--ink-3); }
a.icon-btn.disabled { opacity: .35; pointer-events: none; }

/* ── v11: stores ─────────────────────────────────── */
.st-map-card { overflow: hidden; }
.st-map { height: 260px; background: var(--tint); z-index: 0; }
.st-map.small { height: 230px; border-radius: 14px; overflow: hidden; }
.st-map-wrap { display: flex; flex-direction: column; gap: 4px; }
[data-theme="dark"] .st-map .leaflet-tile { filter: invert(1) hue-rotate(180deg) brightness(.85) contrast(.9) saturate(.6); }
.st-map .leaflet-container, .st-map.leaflet-container { font: inherit; }
.st-pin { background: none; border: 0; }
.st-pin span { position: relative; width: 34px; height: 34px; border-radius: 99px; background: var(--sheet); border: 2px solid var(--ink); display: grid; place-items: center; font-size: 17px; box-shadow: var(--lift); }
.st-pin span::after { content: ''; position: absolute; bottom: -7px; left: 50%; transform: translateX(-50%); border: 6px solid transparent; border-top-color: var(--ink); border-bottom: 0; }
.st-pin.edit span { border-width: 3px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--ink) 18%, transparent), var(--lift); }
.st-row { width: 100%; }
.st-row .sub.warn { color: var(--amber); }
.st-r { font-size: var(--t-s); color: var(--ink-2); font-weight: 600; }
.st-lt { display: flex; flex-direction: column; gap: 6px; padding-top: 10px; border-top: 1px solid var(--rule); }
.chips.wrap { flex-wrap: wrap; overflow: visible; }
.st-ways .btn { font-size: var(--t-s); }
.st-search { display: flex; flex-direction: column; gap: 6px; }
.st-search[hidden] { display: none; }
.st-results { display: flex; flex-direction: column; gap: 4px; max-height: 210px; overflow: auto; }
.st-res { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: start; background: var(--paper); border: 1px solid var(--rule); border-radius: 12px; padding: 8px 12px; color: inherit; font: inherit; }
.st-where { font-variant-numeric: tabular-nums; }
[data-theme="dark"] .st-map.leaflet-container { background: var(--tint); }
[data-theme="dark"] .leaflet-bar a { background: var(--sheet); color: var(--ink); border-color: var(--rule); }
[data-theme="dark"] .leaflet-control-attribution { background: rgb(14 22 38 / .75); color: var(--ink-2); }
[data-theme="dark"] .leaflet-control-attribution a { color: var(--ink-2); }
.ch-line { fill: none; stroke: var(--s1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.ch-pt { fill: var(--s1); stroke: var(--sheet); stroke-width: 2; }
.ch-pt.on { fill: var(--sheet); stroke: var(--s1); stroke-width: 2.5; }
.ch-cross { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 3 3; }

/* ── v12: tasks + own habits ─────────────────────── */
.gear { position: relative; }
.gear .tab-badge { top: -2px; inset-inline-start: auto; inset-inline-end: -4px; }
.tk-day.tk-none .card-h { padding-block: 10px; }
.tk-day.tk-none .card-h > span:first-child { color: var(--ink-2); font-weight: 500; }
.tk-day .card-h > .muted { font: 400 var(--t-s)/1.3 var(--f-body); color: var(--ink-3); }
.tk-day.today { box-shadow: inset 0 0 0 2px var(--saffron); }
.tk-addbox { display: flex; flex-direction: column; gap: 6px; }
.tk-add { flex: 1; }
.tk-plus { width: 52px; padding: 0; font-size: 22px; flex: none; }
.tk-preview { display: flex; gap: 6px; flex-wrap: wrap; min-height: 0; }
.tk-preview:empty { display: none; }
.tk-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--sheet); border-top: 1px solid var(--rule); }
.sw:first-of-type .tk-row, .card-h + .sw .tk-row { border-top: 0; }
.tk-check { width: 26px; height: 26px; border-radius: 99px; border: 2px solid var(--ink-3); background: transparent; flex: none; display: grid; place-items: center;
  color: var(--paper); font-weight: 800; font-size: 14px; padding: 0; }
.tk-check:active { transform: scale(.9); }
.tk-row.done .tk-check { background: var(--herb); border-color: var(--herb); }
.tk-row.done .tk-title { text-decoration: line-through; color: var(--ink-3); }
.tk-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; background: none; border: 0; padding: 0; text-align: start; color: inherit; font: inherit; }
.tk-title { font-weight: 500; overflow-wrap: anywhere; }
.tk-sub { font-size: var(--t-xs); color: var(--ink-2); }
.tk-row.late .tk-sub { color: var(--pome); }
.tk-star { background: none; border: 0; font-size: 20px; color: var(--ink-3); padding: 4px; }
.tk-star.on { color: var(--amber); }
.sw > .tk-row { position: relative; z-index: 1; touch-action: pan-y; }
.tk-late .card-h span:first-child { color: var(--pome); }
.tk-done-h { width: 100%; background: none; border: 0; font: inherit; color: inherit; cursor: pointer; }

.hb-own-cta { flex-direction: row; align-items: center; gap: 12px; border: 1.5px dashed var(--rule); box-shadow: none; background: transparent; text-align: start; font: inherit; color: inherit; width: 100%; }
.hb-own-cta .mid { display: flex; flex-direction: column; } .hb-own-cta .sub { font-size: var(--t-s); color: var(--ink-2); } .hb-own-cta .ico { font-size: 22px; }
.hb-row.measure { text-align: start; }
.hb-check.plus { font-weight: 800; color: var(--ink-2); }
.hb-row.measure.done .hb-check.plus { color: var(--paper); }
.hb-delta { font-weight: 600; color: var(--ink-2); } .hb-delta.good { color: var(--herb); } .hb-delta.bad { color: var(--pome); }
.hb-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.hb-days .chip { justify-content: center; padding-inline: 0; font-size: var(--t-xs); }
.hb-week { gap: 8px; }
.hbw-head, .hbw-row { display: grid; grid-template-columns: minmax(0, 1fr) repeat(7, 16px) 34px; gap: 6px; align-items: center; direction: inherit; }
.hbw-head b { font-size: 9.5px; font-weight: 600; color: var(--ink-3); text-align: center; white-space: nowrap; overflow: hidden; }
.hbw-name { font-size: var(--t-s); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbw-row i { width: 14px; height: 14px; border-radius: 99px; justify-self: center; }
.hbw-row i.ok { background: var(--ink); }
.hbw-row i.miss { border: 2px solid var(--ink-3); opacity: .55; }
.hbw-row i.today { border: 2px dashed var(--ink-3); }
.hbw-row i.fut { border: 2px solid var(--ink-3); opacity: .25; }
.hbw-row i.na { width: 4px; height: 4px; background: var(--rule); }
.hbw-n { font-size: var(--t-xs); color: var(--ink-2); text-align: end; font-variant-numeric: tabular-nums; }

/* ── brand: the Zatak lockup (svg; ذاتك in Arabic, Zatak in English; light + dark) */
html[lang="ar"] .lg-en, html:not([lang="ar"]) .lg-ar { display: none !important; }
.brand img { height: 34px; width: auto; display: block; }
.logo-d { display: none !important; }
[data-theme="dark"] .logo-l { display: none !important; }
[data-theme="dark"] .logo-d { display: block !important; }
.login-logo { margin: 0 0 8px; line-height: 0; }
.moved h2 { margin: 0 0 8px; } .moved p { color: var(--ink-2); margin: 0 0 10px; }
.moved-steps { margin: 0 0 18px; padding-inline-start: 22px; line-height: 1.7; }
.moved .btn { margin-top: 8px; }
.tagline { margin: 0 0 24px; font: 500 var(--t-m)/1.4 var(--f-display); color: var(--ink-2); letter-spacing: .01em; }
.login-logo img { height: 54px; width: auto; }

/* profile photos */
.avatar { position: relative; overflow: hidden; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar.xl { width: 112px; height: 112px; border-radius: 34px; font-size: 44px; }
.avatar-btn { position: relative; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 14px; }
.avatar-edit { position: absolute; inset-block-end: -4px; inset-inline-end: -4px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  font-size: 11px; background: var(--card, var(--paper)); box-shadow: 0 0 0 2px var(--paper); }
.pf-big { display: grid; place-items: center; padding: 8px 0 4px; }

/* ── Mushaf ─────────────────────────────────────────────── */
@font-face { font-family: 'Amiri Quran'; font-display: swap; src: url(/fonts/amiri-quran.woff2) format('woff2'); }
@font-face { font-family: 'Scheherazade New'; font-display: swap; src: url(/fonts/scheherazade-new.woff2) format('woff2'); }
@font-face { font-family: 'Noto Naskh Arabic'; font-display: swap; src: url(/fonts/noto-naskh-arabic.woff2) format('woff2'); }
.qr-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.qr-title { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; background: none; border: 0; padding: 4px 0; color: var(--ink); text-align: start; }
.qr-title b { font: 800 var(--t-l)/1.2 var(--f-display); }
.qr-title small { color: var(--ink-2); font-size: var(--t-xs); }
.qr-bar .icon-btn { width: auto; padding: 0 10px; font-family: "Amiri Quran", serif; font-size: 17px; }
.qr-bar .qr-big { font-size: 21px; }
.qr-page {
  --qsize: 1; background: var(--sheet); border-radius: var(--r-card); box-shadow: var(--lift); padding: 18px 16px 22px;
  direction: rtl; border-inline: 3px double var(--rule); min-height: 62vh; touch-action: pan-y pinch-zoom;
}
.qr-text { font-family: var(--qfont, 'Amiri Quran'), 'Amiri Quran', 'Plex Arabic', serif; font-size: calc(23px * var(--qsize)); line-height: 2.15; text-align: justify; text-align-last: center; margin: 0; color: var(--ink); word-spacing: .04em; }
.qr-num { font-family: var(--qfont, 'Amiri Quran'), 'Amiri Quran', serif; color: var(--ink-2); white-space: nowrap; }
.qr-surah { display: flex; flex-direction: column; align-items: center; margin: 14px 0 6px; padding: 8px 10px; border: 1.5px solid var(--ink-3); border-radius: 12px;
  background: var(--tint); font-family: 'Amiri Quran', serif; font-size: calc(21px * var(--qsize)); color: var(--ink); line-height: 1.5; }
.qr-surah small { font-family: var(--f-body); font-size: var(--t-xs); color: var(--ink-2); }
.qr-page > .qr-surah:first-child { margin-top: 0; }
.qr-basmala { text-align: center; font-family: var(--qfont, 'Amiri Quran'), serif; font-size: calc(22px * var(--qsize)); line-height: 2; color: var(--ink); }
.qr-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.qr-nav { min-width: 110px; }
.qr-pn { font: 400 20px/1 "Amiri Quran", serif; color: var(--ink-2); }
.qr-today { text-align: center; margin-top: 10px; }
.qr-index { display: flex; flex-direction: column; max-height: 52vh; overflow: auto; margin-inline: -4px; }
.qr-row { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border: 0; border-bottom: 1px solid var(--rule); background: none; color: var(--ink); text-align: start; }
.qr-row.cur { background: var(--tint); border-radius: 10px; }
.qr-row .mid { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.qr-sn { font-family: 'Amiri Quran', var(--f-body); font-size: 18px; font-weight: 400; }
.qr-n { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border: 1.5px solid var(--ink-3); border-radius: 9px; font: 800 12px/1 var(--f-display); color: var(--ink-2); }
.qr-jump { max-width: 130px; }

/* ── Adhkar ─────────────────────────────────────────────── */
.adh-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 8px; scrollbar-width: none; }
.adh-tabs::-webkit-scrollbar { display: none; }
.adh-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.adh-head b { font: 800 var(--t-l)/1.3 var(--f-display); }
.adh-bar { height: 4px; border-radius: 4px; background: var(--tint); margin-bottom: 12px; overflow: hidden; }
.adh-bar i { display: block; height: 100%; background: var(--ink); transition: width .3s; }
.adh-item { display: block; width: 100%; text-align: start; position: relative; overflow: hidden; color: var(--ink); cursor: pointer; padding-bottom: 14px; }
.adh-item.done { opacity: .5; }
.adh-item:active { transform: scale(.99); }
.adh-title { color: var(--ink-2); margin-bottom: 4px; font-weight: 600; }
.adh-t { font-size: 18px; line-height: 1.95; margin: 0 0 6px; direction: rtl; text-align: right; }
.adh-q { font-family: 'Amiri Quran', serif; font-size: 21px; line-height: 2.1; margin: 0 0 6px; direction: rtl; text-align: right; }
.adh-en { margin-bottom: 6px; }
.adh-foot { display: flex; justify-content: space-between; align-items: center; }
.adh-n { direction: ltr; min-width: 46px; height: 34px; padding: 0 10px; border-radius: 99px; border: 1.5px solid var(--ink); display: inline-flex; align-items: center; justify-content: center; font: 800 15px/1 var(--f-display); }
.adh-n small { font-weight: 600; color: var(--ink-3); font-size: 11px; }
.adh-item.done .adh-n { background: var(--ink); color: var(--paper); }
.adh-track { position: absolute; inset-inline: 0; bottom: 0; height: 3px; background: var(--tint); }
.adh-fill { display: block; height: 100%; background: var(--ink); transition: width .2s; }
.adh-link { display: flex; flex-direction: column; gap: 2px; text-decoration: none; }
.adh-hint { margin: 10px 0 20px; }

/* ── Habits: shortcuts, rawatib, tasbih, own habits ─────── */
.hb-quick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: row dense; gap: 10px; margin-bottom: 12px; }   /* dense: a half card never leaves a hole next to a full-width one */
.hb-q-card { display: flex; align-items: center; gap: 10px; padding: 12px; text-decoration: none; color: var(--ink); margin: 0; }
.hb-q-card .ico { font-size: 22px; }
.hb-q-card .mid { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.hb-q-card small { color: var(--ink-2); font-size: var(--t-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-sun-row { height: 30px; }
.tl-mini { position: absolute; top: 6px; transform: translateX(-50%); width: 18px; height: 18px; border-radius: 6px; padding: 0; border: 1.5px dashed var(--ink-3);
  background: var(--sheet); color: var(--paper); font-size: 10px; font-weight: 800; display: grid; place-items: center; cursor: pointer; }
[dir="rtl"] .tl-mini { transform: translateX(50%); }
.tl-mini.on { background: var(--ink); border: 1.5px solid var(--ink); }
.tl-mini::after { content: ''; position: absolute; inset: -9px -5px; }   /* bigger tap target */
.tsb { align-items: center; text-align: center; }
.tsb-steps { display: flex; gap: 6px; justify-content: center; }
.tsb-steps i { width: 26px; height: 5px; border-radius: 4px; background: var(--tint); }
.tsb-steps i.ok { background: var(--ink); } .tsb-steps i.cur { background: var(--ink-3); }
.tsb-ring { width: 210px; height: 210px; margin: 6px auto; border-radius: 50%; border: 3px solid var(--ink); background: var(--sheet); color: var(--ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 18px; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.tsb-ring:active { transform: scale(.97); }
.tsb-ring { position: relative; overflow: hidden; }
.tsb-ring.next { animation: tsb-next .55s ease-out; }
.tsb-ring.next .tsb-word { animation: tsb-word .45s ease-out; }
@keyframes tsb-next { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--herb) 60%, transparent); border-color: var(--herb); } 100% { box-shadow: 0 0 0 18px transparent; } }
@keyframes tsb-word { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: 0 0; } }
.tsb-ring.done { background: var(--ink); color: var(--paper); }
.tsb-word { font: 600 19px/1.6 var(--f-body); }
.tsb-count { font: 800 var(--t-xl)/1 var(--f-display); }
.row.center { justify-content: center; } .row.wrap { flex-wrap: wrap; }
.hb-row.off-day .hb-ico, .hb-row.off-day .hb-name > :first-child { opacity: .6; }
.hbw-hint { margin: -4px 0 10px; line-height: 1.5; }
.hbw-d { width: 16px; height: 16px; border-radius: 99px; justify-self: center; padding: 0; border: 2px solid var(--ink-3); background: none; cursor: pointer; position: relative; }
.hbw-d::after { content: ''; position: absolute; inset: -6px -3px; }
.hbw-d.ok { background: var(--ink); border-color: var(--ink); }
.hbw-d.miss { opacity: .55; }
.hbw-d.today { border-style: dashed; }
.hbw-d.na { border-color: var(--rule); }

/* iPhone: no double-tap zoom anywhere (pinch still works for accessibility), and no auto-zoom when a field gets focus */
html, body { touch-action: pan-x pan-y; }            /* no pinch-zoom … */
html.zoom-ok, html.zoom-ok body { touch-action: manipulation; }   /* … except the mushaf and adhkar */
@supports (-webkit-touch-callout: none) { input, select, textarea { font-size: max(16px, 1em) !important; } }

/* ── Mushaf pages (QCF V4) ─────────────────────────────── */
.mp-stage { position: relative; touch-action: pan-y pinch-zoom; }
.mp-spread { display: flex; gap: 14px; justify-content: center; direction: rtl; transition: transform .18s ease-out; }
.mp-spread.in-next { animation: mp-in-next .26s ease-out; }
.mp-spread.in-prev { animation: mp-in-prev .26s ease-out; }
@keyframes mp-in-next { from { transform: translateX(-28%); opacity: .2; } to { transform: none; opacity: 1; } }
@keyframes mp-in-prev { from { transform: translateX(28%); opacity: .2; } to { transform: none; opacity: 1; } }
.mp-page {
  --frame: color-mix(in srgb, var(--ink) 22%, transparent);
  flex: 1; max-width: 560px; position: relative; direction: rtl;
  background: var(--sheet); border-radius: 14px; box-shadow: var(--lift);
  padding: 14px 12px 40px; outline: 1px solid var(--frame); outline-offset: -7px;
}
.mp-page::before { content: ''; position: absolute; inset: 10px 10px 34px; border: 2px solid var(--frame); border-radius: 9px; pointer-events: none; }
[data-theme="light"] .mp-page { background: #FFFDF8; }
.mp-lines { padding: 8px 16px 0; color: var(--ink); line-height: 1; }
.mp-line { height: 1.78em; display: flex; align-items: center; justify-content: space-between; white-space: nowrap; direction: rtl; }
.mp-line.short { justify-content: center; gap: .14em; }
.mp-lines.measuring .mp-line.words { display: inline-flex; justify-content: flex-start; width: max-content; }
.mp-w { cursor: pointer; border-radius: 6px; transition: background-color .15s; }
.mp-w.hl { background: color-mix(in srgb, var(--s1) 22%, transparent); box-shadow: 0 2px 0 color-mix(in srgb, var(--s1) 60%, transparent); }
.mp-w.sel { background: color-mix(in srgb, var(--ink) 12%, transparent); outline: 1px dashed var(--ink-3); }
.mp-head { justify-content: center; font-family: 'Amiri Quran', serif; font-size: .82em; }
.mp-head span { min-width: 72%; height: 1.5em; display: inline-flex; align-items: center; justify-content: center; line-height: 1; padding: 0 1.4em .32em; box-sizing: border-box; border: 1.5px solid var(--frame); border-radius: .5em;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--ink) 6%, transparent), transparent); }
.mp-bas { justify-content: center; font-family: 'Amiri Quran', serif; font-size: .9em; }
.mp-page.opening .mp-lines { padding-top: 18%; }
.mp-pn { position: absolute; bottom: 12px; inset-inline: 0; text-align: center; font: 400 15px/1 'Amiri Quran', serif; color: var(--ink-2); }
.mp-spread.two .mp-page:first-child { border-start-start-radius: 4px; border-end-start-radius: 4px; }
.mp-spread.two .mp-page:last-child { border-start-end-radius: 4px; border-end-end-radius: 4px; }
.qr-page { position: relative; padding-bottom: 34px; }
.qr-page .mp-pn { bottom: 10px; }
.qr-ayah.mp-w, .qr-num.mp-w { padding: 0 .06em; }

/* ayah actions + player */
.qr-ayahbar { position: fixed; inset-inline: 12px; bottom: calc(var(--tabs-h) + var(--safe-b) + 12px); z-index: 30; max-width: 620px; margin: 0 auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 12px; border-radius: 16px; background: var(--sheet); box-shadow: var(--lift); }
.qr-ayahbar b { font-family: 'Amiri Quran', serif; font-size: 18px; font-weight: 400; margin-inline-end: auto; }
.qr-ayahbar .btn { padding: 8px 12px; }
.qr-player { margin-bottom: 12px; display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 18px; background: var(--ink); color: var(--paper); box-shadow: var(--lift); }
.qr-player .mid { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.qr-player b { font-family: 'Amiri Quran', var(--f-body); font-size: 16px; font-weight: 400; }
.qr-player small { font-size: var(--t-xs); opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qr-player .icon-btn { background: color-mix(in srgb, var(--paper) 14%, transparent); color: var(--paper); margin: 0; }
.qr-play { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 0; background: var(--saffron); color: #1B2A4A; font-size: 15px; font-weight: 800; cursor: pointer; }
.qr-reciters { display: flex; flex-wrap: wrap; gap: 6px; }
@media (min-width: 900px) { .qr-ayahbar { bottom: 20px; } }

/* ── Adhkar: one card at a time ─────────────────────────── */
.adh-segs { display: flex; gap: 3px; margin: 4px 0 12px; }
.adh-segs button { flex: 1; height: 5px; border: 0; padding: 0; border-radius: 3px; background: var(--tint); cursor: pointer; position: relative; }
.adh-segs button::after { content: ''; position: absolute; inset: -8px 0; }
.adh-segs button.ok { background: var(--ink-3); }
.adh-segs button.cur { background: var(--ink); }
.adh-card {
  --band: color-mix(in srgb, var(--ink) 5%, transparent);
  position: relative; display: flex; flex-direction: column; gap: 14px; min-height: 56vh; padding: 18px 18px 16px;
  border-radius: 26px; background: linear-gradient(180deg, var(--band), transparent 140px), var(--sheet); box-shadow: var(--lift);
  cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: pan-y pinch-zoom; -webkit-tap-highlight-color: transparent; outline-offset: 3px;
}
.adh-card.adh-morning { --band: color-mix(in srgb, #E9B85C 22%, transparent); }
.adh-card.adh-evening { --band: color-mix(in srgb, #6C6BB5 22%, transparent); }
.adh-card.adh-sleep { --band: color-mix(in srgb, #2E3F6E 26%, transparent); }
.adh-card.adh-prayer { --band: color-mix(in srgb, #4E8C6B 18%, transparent); }
.adh-card.in-next { animation: adh-in-next .32s cubic-bezier(.2, .8, .2, 1); }
.adh-card.in-prev { animation: adh-in-prev .32s cubic-bezier(.2, .8, .2, 1); }
@keyframes adh-in-next { from { transform: translateX(-22%) rotate(-1.5deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes adh-in-prev { from { transform: translateX(22%) rotate(1.5deg); opacity: 0; } to { transform: none; opacity: 1; } }
[dir="ltr"] .adh-card.in-next { animation-name: adh-in-prev; } [dir="ltr"] .adh-card.in-prev { animation-name: adh-in-next; }
.adh-card.done .adh-body { opacity: .55; transition: opacity .3s; }
.adh-meta { display: flex; justify-content: space-between; gap: 10px; font-size: var(--t-xs); color: var(--ink-2); font-weight: 600; }
.adh-body { flex: 1; display: flex; align-items: center; justify-content: center; }
.adh-card .adh-t { font: 500 clamp(21px, 5.6vw, 27px)/2 var(--f-body); text-align: center; margin: 0; }
.adh-card .adh-q { font-size: clamp(23px, 6vw, 30px); line-height: 2.15; text-align: center; margin: 0; }
.adh-fadl { font-size: var(--t-s); color: var(--ink-2); text-align: center; padding: 10px 12px; border-radius: 14px; background: var(--tint); line-height: 1.7; }
.adh-card .adh-foot { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 10px; }
.adh-card .adh-src { text-align: start; }
.adh-ring {
  --p: 0%; width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; align-content: center;
  background: radial-gradient(closest-side, var(--sheet) 82%, transparent 83% 100%), conic-gradient(var(--ink) var(--p), var(--tint) 0);
  transition: --p .2s;
}
.adh-ring b { font: 800 26px/1 var(--f-display); }
.adh-ring small { font-size: 10px; color: var(--ink-3); margin-top: 2px; }
.adh-ring.tick { animation: adh-tick .18s ease-out; }
@keyframes adh-tick { 50% { transform: scale(.92); } }
.adh-card.done .adh-ring { background: var(--herb); color: #fff; }
.adh-card.done .adh-ring small { display: none; }
.adh-finish { align-items: center; justify-content: center; text-align: center; cursor: default; }
.adh-big-check { width: 88px; height: 88px; border-radius: 50%; display: grid; place-items: center; font-size: 40px; font-weight: 800; background: var(--herb); color: #fff; }
.adh .adh-item .adh-fadl { margin: 4px 0 8px; text-align: start; }

/* the invisible real switch that the finger flips (iPhone haptics) */
.hx-surf { position: absolute; inset: 0; z-index: 3; display: block; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.adh-card { position: relative; }
.adh-card .adh-nav, .adh-card a { position: relative; z-index: 4; }
.hx-switch { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; appearance: auto; }
/* ── Sebha ──────────────────────────────────────────────── */
.sb-chips { margin-bottom: 12px; }
.sb-pad {
  position: relative; width: 100%; min-height: 62vh; border: 0; border-radius: 28px; padding: 120px 18px 26px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--ink);
  background: radial-gradient(120% 70% at 50% 0%, color-mix(in srgb, #4E8C6B 14%, transparent), transparent 60%), var(--sheet); box-shadow: var(--lift);
  touch-action: manipulation; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; overflow: hidden;
}
.sb-pad:active .sb-ring { transform: scale(.97); }
.sb-string { position: absolute; top: 34px; left: 50%; width: 0; height: 80px; pointer-events: none; }
.sb-thread { position: absolute; left: -260px; top: -14px; width: 520px; height: 70px; overflow: visible; }
.sb-thread path { fill: none; stroke: color-mix(in srgb, var(--ink-3) 70%, transparent); stroke-width: 1.4; }
.sb-string i {
  position: absolute; left: -12px; top: -12px; width: 24px; height: 24px; border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, color-mix(in srgb, #5E9C7B 45%, white) 0, #3B7D5A 45%, #23533B 100%);
  box-shadow: inset -2px -3px 5px rgb(0 0 0 / .28), 0 3px 5px -1px rgb(0 0 0 / .3); will-change: transform; transition: opacity .3s;
}
.sb-string i::after { content: ''; position: absolute; left: 6px; top: 4px; width: 7px; height: 4px; border-radius: 50%; background: rgb(255 255 255 / .55); filter: blur(.6px); }
.sb-string i.sep { left: -9px; top: -17px; width: 18px; height: 34px; border-radius: 9px;
  background: radial-gradient(circle at 34% 25%, #F8DD98 0, #D9A43A 45%, #9A6A12 100%); }
.sb-string i.ghost { opacity: .25; }
.sb-string i.in, .sb-string i.out { opacity: 0; }
.sb-string i.hit { animation: sb-hit .26s ease-out 95ms; }
@keyframes sb-hit { 0% { scale: 1.12 .9; } 40% { scale: .94 1.06; } 100% { scale: 1; } }
.sb-ring { --p: 0%; position: absolute; inset: auto; width: 230px; height: 230px; border-radius: 50%; top: calc(50% - 115px + 46px);
  background: radial-gradient(closest-side, transparent 92%, transparent 0), conic-gradient(var(--ink) var(--p), var(--tint) 0);
  -webkit-mask: radial-gradient(closest-side, transparent 93%, #000 94%); mask: radial-gradient(closest-side, transparent 93%, #000 94%); transition: transform .1s; pointer-events: none; }
.sb-pad.lap .sb-ring { background: var(--herb); }
.sb-word { font: 600 clamp(20px, 5.4vw, 26px)/1.7 var(--f-body); text-align: center; max-width: 250px; position: relative; }
.sb-count { font: 800 clamp(54px, 15vw, 72px)/1 var(--f-display); font-variant-numeric: tabular-nums; position: relative; }
.sb-sub { font-size: var(--t-s); color: var(--ink-2); position: relative; }
.sb + .row, .sb .row.center { margin-top: 12px; }
.sb .tiny.center { margin-top: 10px; }
.hb-link { color: inherit; text-decoration: none; cursor: pointer; }
.hb-link small { text-decoration: underline dotted; text-underline-offset: 3px; }
button.hb-check { background: none; padding: 0; cursor: pointer; }
.hb-row.done button.hb-check { background: var(--herb); }
.hb-alerts { grid-column: 1 / -1; width: 100%; border: 0; text-align: start; cursor: pointer; font: inherit; }

/* ── «الصحبة» ─────────────────────────────────────────── */
.sh-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.sh-head h2 { margin: 0; font: 800 var(--t-xl)/1.2 var(--f-display); }
.sh-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--rule); color: var(--ink); text-decoration: none;
  background: none; border-inline: 0; border-bottom: 0; width: 100%; text-align: start; font: inherit; cursor: pointer; }
.card > .sh-row:first-of-type { border-top: 0; }
.card-h + .sh-row { border-top: 1px solid var(--rule); }
.sh-row .mid { display: flex; flex-direction: column; flex: 1; min-width: 0; gap: 2px; }
.sh-row .mid small, .sh-row .mid > span { color: var(--ink-2); font-size: var(--t-xs); overflow: hidden; text-overflow: ellipsis; }
.sh-row.unread b::after { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ink); margin-inline-start: 6px; vertical-align: middle; }
.sh-req summary, .sh-settings summary, .sh-more summary, .sh-danger summary { cursor: pointer; padding: 2px 0; }
.sh-req[open] summary { margin-bottom: 6px; }
.sh-req .sh-row { padding-inline: 0; }
.sh-req .btn { padding: 8px 12px; }
.sh-inbox-cta { display: flex; justify-content: space-between; align-items: center; text-decoration: none; color: var(--ink); }
.sh-goal-ico { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--tint); font-size: 18px; flex: none; }
.sh-streak { font: 800 var(--t-s)/1 var(--f-display); color: var(--ink-3); white-space: nowrap; }
.sh-streak.on { color: var(--ink); }
.sh-time { font: 800 var(--t-s)/1 var(--f-display); color: var(--ink-2); min-width: 46px; font-variant-numeric: tabular-nums; }
.sh-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; margin: 10px 0; }
.sh-stats div { padding: 10px 4px; border-radius: 14px; background: var(--tint); display: flex; flex-direction: column; gap: 4px; }
.sh-stats b { font: 800 var(--t-l)/1 var(--f-display); }
.sh-stats small { font-size: var(--t-xs); color: var(--ink-2); }
.sh-suggest { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: var(--t-s); }
.sh-code { font: 800 clamp(30px, 9vw, 40px)/1.2 var(--f-display); letter-spacing: .12em; text-align: center; direction: ltr; padding: 14px; border: 2px dashed var(--ink-3);
  border-radius: 16px; margin: 6px 0; user-select: all; -webkit-user-select: all; }
.sh-code.small { font-size: 22px; }
.sh-code-in { text-align: center; direction: ltr; letter-spacing: .1em; font-weight: 800; text-transform: uppercase; }
.back { display: inline-block; margin-bottom: 8px; color: var(--ink-2); text-decoration: none; font-size: var(--t-s); }
.sh-friend-head { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 4px 0 14px; }
.sh-friend-head h2 { margin: 0; font: 800 var(--t-xl)/1.2 var(--f-display); }
.sh-big { font-size: 19px; padding: 16px; margin-bottom: 10px; }
.sh-actions { margin: 10px 0 12px; }
.sh-actions .btn { padding: 12px 10px; }
.sh-danger .btn { margin-top: 8px; }
.btn.danger.ghost, .btn.ghost.danger { color: var(--pome); }
.sh-num b { min-width: 30px; text-align: center; font: 800 var(--t-l)/1 var(--f-display); }
.sh-goal-preview { padding: 12px; border-radius: 14px; background: var(--tint); font-weight: 700; text-align: center; }
.sh-goal h2 { margin: 6px 0 4px; font: 800 var(--t-xl)/1.25 var(--f-display); }
.sh-ppl { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.sh-p { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; background: var(--tint); }
.sh-p > span:not(.avatar) { flex: 1; } .sh-p b { color: var(--ink-3); font-size: var(--t-s); }
.sh-p.ok b { color: var(--herb); }
.sh-progress { font-size: var(--t-m); margin: 8px 0; }
.avatar.xl { width: 84px; height: 84px; border-radius: 26px; font-size: 34px; }
.lbl-block { display: flex; flex-direction: column; gap: 6px; }
.ch-count { align-items: stretch; }
.ch-other { width: 84px; flex: none; text-align: center; }

/* mushaf: search, tafsir, downloads, memorization */
.qr-hit .mid { gap: 2px; }
.qr-snip { font-family: 'Amiri Quran', serif; font-size: 16px; line-height: 1.8; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.qr-tafsir-ayah { font-family: 'Amiri Quran', serif; font-size: 21px; line-height: 2.1; text-align: center; padding: 10px; border-radius: 14px; background: var(--tint); margin: 0 0 10px; }
.qr-tafsir-text { font-size: 17px; line-height: 2; margin: 0; text-align: start; }
.qr-snip { direction: rtl; text-align: start; }
.qr-dl { display: flex; flex-direction: column; gap: 8px; }
.qr-hifzbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.qr-hifzbar .btn { padding: 8px 12px; }
.qr-hifzbar .btn.on { background: var(--herb); color: #fff; }
.mp-stage.hifz .mp-w:not(.shown):not(.mp-end) .mp-g { visibility: hidden; }
.mp-stage.hifz .mp-w:not(.shown):not(.mp-end) { background: repeating-linear-gradient(90deg, var(--tint) 0 70%, transparent 70% 100%); border-radius: 6px; }
.icon-btn.on { background: var(--ink); color: var(--paper); }

/* group khatma */
.gk h2 { margin: 2px 0 10px; }
.gk-bar { height: 8px; border-radius: 99px; background: var(--tint); overflow: hidden; }
.gk-bar i { display: block; height: 100%; background: var(--herb); border-radius: 99px; transition: width .4s; }
.gk-meta { display: flex; justify-content: space-between; gap: 8px; margin: 6px 0 12px; }
.gk > .btn.wide { margin-bottom: 12px; }
.gk-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.gk-cell { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 54px; padding: 4px 2px; border-radius: 12px;
  border: 1.5px dashed var(--rule); background: transparent; color: var(--ink); font: inherit; cursor: pointer; }
.gk-cell b { font-size: 16px; }
.gk-cell small { font-size: 11px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gk-cell.taken { border-style: solid; border-color: var(--ink-3); background: var(--tint); }
.gk-cell.done { border: 1.5px solid transparent; background: var(--herb); color: #fff; }
.gk-cell.done small { color: #fff; }
.gk-cell.me:not(.done) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.gk-cell:disabled { cursor: default; opacity: .7; }
.gk-invite, .gk-done { padding: 12px; border-radius: 14px; background: var(--tint); margin-bottom: 12px; display: flex; flex-direction: column; gap: 8px; }
.gk-done p { margin: 0; }
.gk-ring { --p: 0%; width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: radial-gradient(closest-side, var(--sheet) 76%, transparent 78%), conic-gradient(var(--herb) var(--p), var(--tint) 0); }
.gk-ring b { font-size: 13px; }
.gk-pick { max-height: 40vh; overflow: auto; border: 1px solid var(--rule); border-radius: 14px; }
.gk-pick .sh-row:first-child { border-top: 0; }
.gk-pick input { width: 20px; height: 20px; accent-color: var(--ink); }
.form .gk-pick label.sh-row { flex-direction: row; align-items: center; text-align: start; margin: 0; }
.gk-pick .sh-row .mid { flex: 1; }

/* Ramadan */
.rm-card { gap: 12px; }
.rm-card.last10 { box-shadow: var(--lift), inset 0 0 0 1.5px var(--ink-3); }
.rm-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.rm-top .btn { padding: 8px 12px; }
.rm-times { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rm-times > div { display: flex; flex-direction: column; gap: 2px; padding: 10px; border-radius: 12px; background: var(--tint); }
.rm-times small { color: var(--ink-2); font-size: var(--t-xs); }
.rm-times b { font-size: 18px; }
.rm-times .rm-cd { background: var(--ink); color: var(--paper); }
.rm-times .rm-cd small { color: inherit; opacity: .8; }
.rm-log { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rm-chip { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--rule); background: var(--sheet); color: var(--ink); font: inherit; font-weight: 600; text-align: start; }
.rm-chip small { font-weight: 400; color: var(--ink-2); font-size: var(--t-xs); }
.rm-chip.on { border-color: var(--herb); background: color-mix(in srgb, var(--herb) 12%, var(--sheet)); }
.rm-plan { color: var(--ink); text-decoration: none; font-size: var(--t-s); }
.rm-night { font-size: var(--t-s); color: var(--ink-2); }
.rm-night.odd { color: var(--ink); font-weight: 600; }
.rm-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.rm-table th { font-weight: 600; color: var(--ink-2); font-size: 12px; text-align: start; padding: 6px 4px; border-bottom: 1px solid var(--rule); position: sticky; top: 0; background: var(--sheet); }
.rm-table td { padding: 8px 4px; border-bottom: 1px solid var(--rule); }
.rm-table tr.today td { background: var(--tint); font-weight: 700; }
.rm-table tr.odd td:first-child::after { content: ' ✨'; }

/* Qibla */
.hb-qibla { width: 100%; border: 0; text-align: start; cursor: pointer; font: inherit; color: inherit; }
.hb-quick .hb-alerts, .hb-quick > :first-child, .hb-quick .hb-umrah { grid-column: 1 / -1; }
/* worship cards with a picture: the art fills the card, a shade from the bottom keeps the words readable */
.hb-q-card.bg { position: relative; overflow: hidden; isolation: isolate; min-height: 128px; align-items: flex-end; color: #fff; background: #0e1626; }
.hb-q-card.bg::before { content: ''; position: absolute; inset: 0; z-index: -2; background: var(--bg) center / cover no-repeat; transition: transform .4s ease; }
.hb-q-card.bg::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgb(6 10 20 / .88) 0%, rgb(6 10 20 / .55) 45%, rgb(6 10 20 / .05) 80%); }
.hb-q-card.bg:active::before { transform: scale(1.04); }
.hb-q-card.bg .ico { display: none; }
.hb-quick .card.hb-q-card.bg { flex-direction: row; align-items: flex-end; justify-content: flex-start; text-align: start; padding: 14px; }
.hb-q-card.bg .mid { text-align: start; align-items: flex-start; overflow: hidden; max-width: 100%; }
.hb-q-card.bg small { max-width: 100%; }
.hb-q-card.bg b { color: #fff; text-shadow: 0 1px 6px rgb(0 0 0 / .5); }
.hb-q-card.bg small { color: rgb(255 255 255 / .82); }
.hb-q-card.bg .hb-bar { background: rgb(255 255 255 / .25); }
.hb-quick > .bg:first-child, .hb-quick .hb-umrah.bg { min-height: 150px; }
.hb-swipe { position: relative; border-radius: 18px; }
.hb-swipe > .hb-row { position: relative; z-index: 1; touch-action: pan-y; -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; }
/* the delete button waits under the row, on the side the row was pushed away from */
.hb-swipe-del { position: absolute; top: 0; bottom: 0; width: 96px; border: 0; border-radius: 18px; background: var(--pome); color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font: 600 var(--t-xs)/1.2 var(--f-body); opacity: 0; transition: opacity .15s; }
.hb-swipe-del { right: 0; left: auto; }
.hb-swipe.right .hb-swipe-del { left: 0; right: auto; }
.hb-swipe:has(.hb-row[style*="translateX"]) .hb-swipe-del { opacity: 1; }
.hb-swipe-del small { font-size: 12px; }
.hb-swipe-hint { padding: 4px 12px 12px; }
/* ── Umrah ── */
.um-tabs { margin: 4px 0 12px; }
.um-counter { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.um-pad { position: relative; overflow: hidden; width: 100%; min-height: 42vh; border: 0; border-radius: 28px; background: var(--sheet); box-shadow: var(--lift); color: var(--ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; touch-action: manipulation; user-select: none; -webkit-user-select: none; cursor: pointer; }
.um-pad:active { transform: scale(.99); }
.um-pad small { color: var(--ink-2); font-size: var(--t-s); }
.um-n { font: 800 clamp(72px, 22vw, 110px)/1 var(--f-display); font-variant-numeric: tabular-nums; }
.um-where { font: 600 var(--t-l)/1.4 var(--f-body); }
.um-pad.done { background: color-mix(in srgb, var(--herb) 16%, var(--sheet)); }
.um-pad.done .um-n { color: var(--herb); }
.um-dots { display: flex; justify-content: center; gap: 8px; }
.um-dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--ink-3); }
.um-dots i.ok { background: var(--herb); border-color: var(--herb); }
.um-dots i.cur { border-color: var(--ink); }
.um-dua { display: flex; flex-direction: column; gap: 6px; }
.um-dua-t { font-size: var(--t-s); color: var(--ink-2); }
.um-dua-ar { margin: 0; font: 500 var(--t-l)/1.9 var(--f-body); }
.um-step summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; }
.um-step summary::-webkit-details-marker { display: none; }
.um-step-n { width: 26px; height: 26px; border-radius: 50%; background: var(--tint); display: grid; place-items: center; font-size: var(--t-xs); font-weight: 600; flex: none; }
.um-step-ic { font-size: 20px; }
.um-step ul { margin: 10px 0 8px; padding-inline-start: 20px; display: flex; flex-direction: column; gap: 6px; line-height: 1.65; }
.um-step .um-dua { box-shadow: none; background: var(--paper); margin: 6px 0; }
.um-note { margin-top: 12px; }
.sb-pick { display: flex; flex-direction: column; gap: 8px; }
.sb-pick-row { display: flex; align-items: center; gap: 6px; padding: 0 6px 0 0; border: 1px solid var(--rule); border-radius: 14px; background: var(--sheet); color: var(--ink); }
[dir="rtl"] .sb-pick-row { padding: 0 0 0 6px; }
.sb-pick-go { flex: 1; display: flex; align-items: center; gap: 12px; padding: 13px 14px; border: 0; background: none; color: inherit; text-align: start; font: inherit; border-radius: 14px; min-width: 0; }
.sb-stat { margin-top: 6px; }
.sb-pick-row:active { background: var(--tint); }
.sb-pick-row .mid { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.sb-pick-row b { font: 600 var(--t-m)/1.4 var(--f-display); }
.sb-pick-row small { color: var(--ink-2); font-size: var(--t-xs); }
.sb-pick-n { font-size: var(--t-xs); color: var(--ink-2); background: var(--tint); padding: 3px 9px; border-radius: 99px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sb-pick-row.done .sb-pick-n { color: var(--herb); background: color-mix(in srgb, var(--herb) 14%, transparent); }
.qb { align-items: center; }
.qb-dial { width: min(86vw, 340px); aspect-ratio: 1; margin: 0 auto; }
.qb-dial svg { width: 100%; height: 100%; display: block; overflow: visible; }
.qb-dial .qb-face, .qb-dial .qb-rug { transition: transform .12s linear; }
.qb-l { font: 800 24px/1 var(--f-display, system-ui); fill: var(--ink); }
.qb-l.n { fill: #d64545; }
.qb-dial .qb-ring { transition: stroke .25s; }
.qb-dial.aligned .qb-ring { stroke: #3fa45b; filter: drop-shadow(0 0 10px rgb(63 164 91 / .6)); }
.qb-deg { font-size: 20px; text-align: center; }
.qa-items { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.qa-items li { display: flex; justify-content: space-between; gap: 10px; }
.qa-items li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qa-items b { font-variant-numeric: tabular-nums; flex: none; }
.qa-ocr-acts { display: flex; gap: 14px; margin-top: 6px; }
.pg-title { margin: 0 0 12px; font-size: 22px; }
.hb-life, .list-reports { margin-bottom: 12px; }
.hb-quick .hb-q-card { min-width: 0; overflow: hidden; }
.hb-quick .hb-q-card .mid { max-width: 100%; }
a.card.list-reports, a.card.hb-life { flex-direction: row; text-align: start; justify-content: flex-start; padding: 12px 14px; }
a.card.list-reports .mid, a.card.hb-life .mid { align-items: flex-start; }
.hb-quick .hb-q-card > .muted:last-child { display: none; }
.adh-tabs-wrap { margin-bottom: 8px; }
.adh-tabs-wrap .adh-tabs { margin-bottom: 2px; align-items: center; }
.adh-g { flex: none; font-size: var(--t-xs); color: var(--ink-2); font-weight: 700; min-width: 40px; }
.adh-tabs .chip { flex: none; }

/* Tajweed colours (the usual Dar al-Ma'rifah scheme quran.com uses); lighter steps on the dark theme */
.tj-ham_wasl, .tj-slnt, .tj-laam_shamsiyah { color: #9a9a9a; }
.tj-madda_normal { color: #537fff; }
.tj-madda_permissible { color: #4050ff; }
.tj-madda_obligatory { color: #2144c1; }
.tj-madda_necessary { color: #000ebc; }
.tj-qalaqah { color: #dd0008; }
.tj-ikhafa_shafawi { color: #d500b7; }
.tj-ikhafa { color: #9400a8; }
.tj-idgham_shafawi { color: #58b800; }
.tj-iqlab { color: #26bffd; }
.tj-idgham_ghunnah { color: #169777; }
.tj-idgham_wo_ghunnah { color: #169200; }
.tj-idgham_mutajanisayn, .tj-idgham_mutaqaribayn { color: #a1a1a1; }
.tj-ghunnah { color: #ff7e1e; }
[data-theme="dark"] .tj-ham_wasl, [data-theme="dark"] .tj-slnt, [data-theme="dark"] .tj-laam_shamsiyah { color: #8a93a6; }
[data-theme="dark"] .tj-madda_normal { color: #8fa8ff; }
[data-theme="dark"] .tj-madda_permissible { color: #7d89ff; }
[data-theme="dark"] .tj-madda_obligatory { color: #6b8cff; }
[data-theme="dark"] .tj-madda_necessary { color: #5d6dff; }
[data-theme="dark"] .tj-qalaqah { color: #ff5a5f; }
[data-theme="dark"] .tj-ikhafa_shafawi { color: #f25ddc; }
[data-theme="dark"] .tj-ikhafa { color: #c86ad8; }
[data-theme="dark"] .tj-idgham_shafawi { color: #7fd33a; }
[data-theme="dark"] .tj-iqlab { color: #5fd0ff; }
[data-theme="dark"] .tj-idgham_ghunnah { color: #3cc3a0; }
[data-theme="dark"] .tj-idgham_wo_ghunnah { color: #4cbf3a; }
[data-theme="dark"] .tj-ghunnah { color: #ffa060; }
.tj-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
.tj-row b { font-weight: 600; }

/* page turn */
.mp-turn { z-index: 3; pointer-events: none; backface-visibility: hidden; will-change: transform; }
.mp-turn .mp-shade { position: absolute; inset: 0; border-radius: 14px; background: linear-gradient(90deg, rgb(0 0 0 / .45), transparent 60%); opacity: 0; pointer-events: none; }
.mp-stage { overflow-x: clip; }

/* a past day */
.tl-past { display: block; margin: 8px auto 0; font-size: var(--t-xs); }
.past-days { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; align-items: center; }
.past-days .chip { flex: none; }
.past-in { width: auto; flex: none; padding: 6px 8px; }
.past-date { display: flex; flex-direction: column; gap: 2px; margin: 4px 0 2px; }
.past-row { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-top: 1px solid var(--rule); }
.past-row:first-child { border-top: 0; }
.past-name { font-weight: 700; }
.past-row .seg { width: 100%; }
.past-row .seg button { flex: 1; font-size: 13px; padding: 7px 2px; white-space: nowrap; }
.heat i.ed { cursor: pointer; }
.hb-home { cursor: pointer; touch-action: pan-y; transition: transform .15s ease-out; color: var(--ink); }
.hb-home-dots { display: flex; justify-content: center; gap: 5px; margin-top: 2px; }
.hb-home-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--rule); }
.hb-home-dots i.on { background: var(--ink-2); width: 14px; border-radius: 3px; }

/* Sohba streaks + notifications */
.sk-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.sk-tile { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border-radius: 14px; background: var(--tint); text-align: center; }
.sk-tile .sk-ic { font-size: 20px; filter: grayscale(1); opacity: .55; }
.sk-tile.on .sk-ic { filter: none; opacity: 1; }
.sk-tile b { font-size: 22px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.sk-tile small { font-size: 11px; color: var(--ink-2); line-height: 1.25; }
.sk-card .card-h { margin-bottom: 10px; }
.sk-share { margin-top: 10px; }
.sk-chips { display: flex; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); }
.sk-chip { font-variant-numeric: tabular-nums; }
.sh-dev-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--tint); font-size: var(--t-s); }
.sh-dev-row.ok { color: var(--herb); }
.sh-settings .hb-row.set .hb-name small { display: block; color: var(--ink-2); font-size: var(--t-xs); font-weight: 400; margin-top: 2px; }
.pt-choice { display: flex; align-items: center; gap: 12px; padding: 14px; text-decoration: none; color: var(--ink); margin: 0; }
.pt-choice .pt-ic { font-size: 28px; }
.pt-choice .mid { display: flex; flex-direction: column; gap: 3px; }
.pt-choice small { color: var(--ink-2); font-size: var(--t-xs); line-height: 1.5; }
.pt-list { margin: 8px 0 0; padding-inline-start: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: var(--t-s); }
a.card.pt-choice { flex-direction: row; text-align: start; align-items: center; margin-bottom: 10px; }
.sh-user-in { display: flex; align-items: center; gap: 6px; direction: ltr; }
.sh-user-in span { font-weight: 700; color: var(--ink-2); }
.sh-user-in .inp { flex: 1; }
/* iPhone gives date/time inputs a wide built-in minimum — keep them inside their column */
input[type="date"].inp, input[type="time"].inp, input[type="datetime-local"].inp { min-width: 0; max-width: 100%; width: 100%; -webkit-appearance: none; appearance: none; }

.receipt-drop, .expense-table { display: none; }
@media (min-width: 900px) {
  .receipt-drop { display: block; width: 100%; padding: 16px; border: 2px dashed var(--ink-3); background: transparent; color: var(--ink-2); cursor: pointer; font: inherit; }
  .receipt-drop:hover, .receipt-drop.over { border-color: var(--saffron); color: var(--ink); background: var(--tint); }
  .expense-cards { display: none; }
  .expense-table { display: block; overflow-x: auto; }
  .expense-table table { width: 100%; border-collapse: collapse; }
  .expense-table th, .expense-table td { text-align: start; padding: .6rem; border-bottom: 1px solid var(--rule); }
  .expense-table th { color: var(--ink-2); font-weight: 600; font-size: var(--t-s); }
  .expense-table td:last-child, .expense-table th:last-child { text-align: end; white-space: nowrap; }
}

.qa-review { display:flex; gap:.6rem; align-items:flex-start; margin-block:.6rem; }
.qa-thumb { flex:none; background:none; border:0; cursor:zoom-in; padding:0; }
.qa-thumb img { width:clamp(40px,12vw,80px); max-height:110px; object-fit:contain; }
.qa-large { display:block; width:100%; height:auto; }
.qa-lines { flex:1; min-width:0; }
.qa-line { display:grid; grid-template-columns:minmax(0,1fr) 6.2rem auto; gap:.3rem; margin-block:.3rem; }
.qa-line .inp { min-width:0; padding-block:8px; }
.qa-del { align-self:center; color: var(--pome); }
.qa-review .tiny { color: var(--pome); margin-top:4px; }

/* ── InBody (#/inbody) */
.ib { display: flex; flex-direction: column; gap: 12px; }
.ib-hero { text-align: center; padding: 18px 16px; } .ib-ico { font-size: 34px; }
.ib-how { margin: 6px 0 0; padding-inline-start: 20px; text-align: start; font-size: var(--t-s); color: var(--ink-2); display: flex; flex-direction: column; gap: 6px; }
.ib-last-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.ib-t { box-shadow: none; background: var(--tint); }
.ib-t b i { font: 600 var(--t-xs) var(--f-body); color: var(--ink-2); font-style: normal; margin-inline-start: 2px; }
.ib-t small { font-size: var(--t-xs); color: var(--ink-2); }
.ib-t small.ib-d.good { color: var(--herb); font-weight: 600; } .ib-t small.ib-d.bad { color: var(--pome); font-weight: 600; }
.ib-goal { display: flex; flex-direction: column; gap: 6px; }
.ib-goal > div { display: flex; justify-content: space-between; align-items: baseline; }
.ib-goal b { font: 800 var(--t-l) var(--f-display); font-variant-numeric: tabular-nums; }
.ib-goal p { margin: 0; }
.ib-bar { max-width: none; height: 8px; } .ib-bar i { display: block; height: 100%; background: var(--s1); border-radius: 99px; }
.ib-chart { display: flex; flex-direction: column; gap: 10px; } .ib-wait { margin: 6px 0; }
.ib-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 16px; background: none; border: 0; border-top: 1px solid var(--rule); color: var(--ink); text-align: start; font: inherit; cursor: pointer; }
.ib-row-d { font-weight: 600; min-width: 7.5em; } .ib-row-v { flex: 1; color: var(--ink-2); font-size: var(--t-s); font-variant-numeric: tabular-nums; }
.ib-link { font: 500 var(--t-xs) ui-monospace, monospace; word-break: break-all; }
.ib-form .row label { min-width: 0; } .ib-form input { width: 100%; }
.ib-del { color: var(--pome); }
.ib-row-v { display: flex; flex-direction: column; } .ib-row-v b { color: var(--ink); font-weight: 600; } .ib-row-v small { font-size: var(--t-xs); }
.hb-life-home { display: flex; flex-direction: column; gap: inherit; }
/* settings: grouped lists */
.set-group { display: flex; flex-direction: column; gap: 6px; }
.set-gh { font-size: var(--t-xs); font-weight: 700; color: var(--ink-2); padding: 0 6px; letter-spacing: .2px; }
.set-list { gap: 0; overflow: hidden; }
.set-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; min-height: 56px; width: 100%; background: none; border: 0; color: var(--ink); text-align: start; font: inherit; text-decoration: none; cursor: pointer; }
div.set-item { cursor: default; }
.set-list > :empty { display: none; }
.set-list > :not(:empty) ~ :not(:empty) { border-top: 1px solid var(--rule); }
.set-item .ico { width: 34px; height: 34px; border-radius: 10px; background: var(--tint); display: grid; place-items: center; font-size: 17px; flex: none; }
.set-item .mid { display: flex; flex-direction: column; min-width: 0; flex: 1; gap: 2px; }
.set-item .mid b { font-weight: 600; font-size: var(--t-m); }
.set-item .mid .sub { font-size: var(--t-xs); color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.set-item .chev { color: var(--ink-3); font-size: 20px; flex: none; }
.set-item .seg { flex: none; }
.set-item.danger-row b { color: var(--pome); }
/* shortcut recipes (#/applepay) */
.pad-x { padding: 0 16px; margin: 0 0 6px; }
.sc-r { border-top: 1px solid var(--rule); }
.sc-r summary { display: flex; align-items: center; gap: 12px; padding: 12px 16px; cursor: pointer; list-style: none; }
.sc-r summary::-webkit-details-marker { display: none; }
.sc-r summary .ico { width: 34px; height: 34px; border-radius: 10px; background: var(--tint); display: grid; place-items: center; font-size: 17px; flex: none; }
.sc-r summary .mid { display: flex; flex-direction: column; flex: 1; min-width: 0; } .sc-r summary small { color: var(--ink-2); font-size: var(--t-xs); }
.sc-r summary::after { content: '▾'; color: var(--ink-3); } .sc-r[open] summary::after { content: '▴'; }
.sc-r ol { padding: 0 16px 14px; padding-inline-start: 36px; margin: 0; display: flex; flex-direction: column; gap: 10px; line-height: 1.6; font-size: var(--t-s); }
/* year in review (#/year/<y>) */
.yr { display: flex; flex-direction: column; gap: 12px; }
.yr-hero { text-align: center; padding: 20px; } .yr-hero p { margin: 0; }
.yr-y { font: 800 56px/1 var(--f-display); letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.yr-t small { color: var(--ink-2); font-size: var(--t-xs); }
.yr-ib-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.yr-ib-row div { display: flex; flex-direction: column; } .yr-ib-row b { font: 800 var(--t-l) var(--f-display); font-variant-numeric: tabular-nums; }
.yr-money { display: flex; align-items: baseline; justify-content: space-between; } .yr-money b { font: 800 var(--t-xl) var(--f-display); font-variant-numeric: tabular-nums; }
.yr-cats { display: flex; flex-direction: column; gap: 6px; }
.yr-nav { margin-top: 4px; }
/* loans (#/debts) */
.db-ico { font-size: 18px; } .db-amt { font: 700 var(--t-m) var(--f-display); font-variant-numeric: tabular-nums; } .db-row.muted .db-amt { color: var(--ink-3); text-decoration: line-through; }
.r-rot { flex-direction: row; align-items: center; gap: 10px; color: var(--ink); font-size: var(--t-m); } .r-rot input { width: 20px; height: 20px; accent-color: var(--ink); }
/* zakat, meals */
.zk-res { gap: 6px; } .zk-line { display: flex; justify-content: space-between; font-size: var(--t-s); color: var(--ink-2); } .zk-line b { color: var(--ink); }
.zk-due { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--rule); padding-top: 8px; } .zk-due b { font: 800 var(--t-xl) var(--f-display); font-variant-numeric: tabular-nums; }
.ml-day { display: grid; grid-template-columns: 6.5em 1fr 1fr; gap: 8px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--rule); }
.ml-day:first-child { border-top: 0; } .ml-dn { font-size: var(--t-s); }
.ml-slot { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 10px; border-radius: 12px; border: 1px dashed var(--rule); background: none; color: var(--ink-3); font: inherit; text-align: start; min-height: 52px; cursor: pointer; }
.ml-slot small { font-size: var(--t-xs); color: var(--ink-2); } .ml-slot.on { border-style: solid; background: var(--tint); color: var(--ink); } .ml-slot span { font-size: var(--t-s); font-weight: 600; }
.vt-img { width: 100%; border-radius: 12px; } .vt-warn { color: var(--pome) !important; font-weight: 600; }
/* «اسأل حياتي» */
.ask-bar { flex-direction: row; align-items: center; gap: 10px; text-decoration: none; padding: 14px 16px; }
.ask-list { display: flex; flex-direction: column; gap: 8px; min-height: 30vh; }
.ask-q { align-self: flex-end; background: var(--ink); color: var(--paper); padding: 9px 14px; border-radius: 16px 16px 4px 16px; max-width: 85%; }
[dir="rtl"] .ask-q { border-radius: 16px 16px 16px 4px; }
.ask-a { align-self: flex-start; background: var(--sheet); box-shadow: var(--lift); padding: 10px 14px; border-radius: 16px 16px 16px 4px; max-width: 92%; display: flex; flex-direction: column; gap: 6px; line-height: 1.6; }
[dir="rtl"] .ask-a { border-radius: 16px 16px 4px 16px; }
.ask-open { align-self: flex-start; }
.ask-form { display: flex; gap: 8px; position: sticky; bottom: 92px; background: var(--paper); padding: 8px 0; }
.ask-form .inp { flex: 1; min-width: 0; } .ask-mic.on { background: var(--pome); color: #fff; }
.ask-sug { margin-top: 4px; } .ask-sug .chip { white-space: normal; text-align: start; }
.ask-list .chips { flex-wrap: wrap; overflow: visible; } .ask-list .chip { white-space: normal; text-align: start; max-width: 100%; }
/* «دليل حياتي» */
.gd { display: flex; flex-direction: column; gap: 14px; }
.gd-item { align-items: flex-start; } .gd-item .ico { margin-top: 2px; }
.gd-d { font-size: var(--t-s); color: var(--ink-2); line-height: 1.55; } .gd-w { font-size: var(--t-xs); color: var(--ink-3); margin-top: 2px; }
.gd-cta { border-radius: var(--r-card); background: var(--sheet); box-shadow: var(--lift); }
.card.gd-cta { flex-direction: row; align-items: center; gap: 12px; padding: 12px 16px; text-decoration: none; color: var(--ink); }
/* pause / excuse, qada */
.hb-pause { gap: 8px; border: 1.5px dashed var(--rule); box-shadow: none; } .hb-pause .row { align-items: center; font-size: var(--t-s); }
.hb-grid i.ex { opacity: .35; border-style: dashed; }
.qd-row { gap: 8px; } .qd-row .hb-name { flex: 1; }
/* ayah marks + share */
.mp-w.mk { box-shadow: inset 0 -.16em 0 var(--mk); background: color-mix(in srgb, var(--mk) 13%, transparent); }
.mk-green { --mk: #2E9E6B; } .mk-gold { --mk: #D99A12; } .mk-blue { --mk: #3A78D0; } .mk-rose { --mk: #D0587E; }
.qr-mkchips { flex-wrap: wrap; } .qr-mkc { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 99px; border: 1.5px solid var(--rule); background: var(--card); color: var(--ink); font: inherit; }
.qr-mkc i, .qr-mkdot { width: 14px; height: 14px; border-radius: 99px; background: var(--mk); flex: none; } .qr-mkc.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.qr-note { display: block; font-size: var(--t-s); color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qr-ayahbar .btn.on { border-color: var(--ink); }
.qr-share-img { width: 100%; max-height: 60vh; object-fit: contain; border-radius: 12px; border: 1px solid var(--rule); background: #F7F4EC; }
textarea.inp { font: inherit; line-height: 1.5; }
/* زاد اليوم, occasions, names, timetable */
.zad-head { align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.zad-tabs button { padding: 4px 10px; font-size: var(--t-s); }
.zad-text { margin: 4px 0; font-size: 17px; line-height: 1.9; color: var(--ink); }
.zad-q { font-family: 'Amiri Quran', serif; font-size: 21px; line-height: 2.1; text-align: center; }
.zad-en { margin: 0 0 6px; color: var(--ink-2); font-size: var(--t-s); }
.zad-foot { justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.occ-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--rule); }
.occ-row:first-of-type { border-top: 0; } .occ-row .mid { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.occ-h { color: var(--ink-2); } .occ-n { font-weight: 700; white-space: nowrap; font-size: var(--t-s); } .occ-n.soon { color: var(--ink); background: var(--tint); padding: 2px 8px; border-radius: 99px; }
.nm-today { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.nm-today .nm-ar { font-size: 34px; }
.nm-ar { font-family: 'Amiri Quran', serif; font-weight: 400; font-size: 22px; line-height: 1.6; color: var(--ink); }
.nm-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 12px 0; }
.nm { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px 10px; border-radius: 14px; border: 1px solid var(--rule); background: var(--card); color: var(--ink); font: inherit; text-align: center; }
.nm.today { border-color: var(--ink-3); } .nm.open { grid-column: 1 / -1; padding: 14px; }
.nm-n { position: absolute; inset-inline-start: 8px; top: 6px; font-size: 11px; color: var(--ink-3); }
.nm-en { color: var(--ink-2); font-size: 12px; } .nm-mean { color: var(--ink-2); font-size: var(--t-s); line-height: 1.6; }
.tt-top { align-items: center; gap: 8px; } .tt-nav { align-items: center; gap: 8px; margin-bottom: 10px; } .tt-month { text-align: center; }
.tt-wrap { overflow-x: auto; } .tt-print-title { display: none; }
.tt { width: 100%; border-collapse: collapse; font-size: 13px; background: var(--card); border-radius: 12px; overflow: hidden; }
.tt th, .tt td { padding: 7px 4px; text-align: center; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.tt th { font-size: 12px; color: var(--ink-2); font-weight: 600; } .tt td small { color: var(--ink-3); }
.tt tr.fri td { background: color-mix(in srgb, var(--ink) 4%, transparent); } .tt tr.now td { background: var(--tint); font-weight: 700; }
@media print {
  body * { visibility: hidden; } .tt-wrap, .tt-wrap * { visibility: visible; }
  .tt-wrap { position: absolute; inset: 0; overflow: visible; } .tt-print-title { display: block; font-weight: 700; font-size: 16px; color: #000; }
  .tt { font-size: 11px; background: #fff; color: #000; } .tt th, .tt td { border-bottom: 1px solid #bbb; padding: 3px; color: #000; } .tt tr.now td, .tt tr.fri td { background: none; }
}
.tt th, .tt td { padding: 6px 2px; } .tt { font-size: 12.5px; font-variant-numeric: tabular-nums; }
.tt-h { display: block; font-size: 11px; color: var(--ink-3); font-weight: 400; } .tt-d { text-align: start; padding-inline-start: 8px !important; }
.ap-fresh.warn { border-color: var(--amber, var(--ink-3)); } .ap-fresh code { display: block; margin-top: 6px; }
.qr-eds { display: flex; flex-wrap: wrap; gap: 6px; }
.sc-desc { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin: 4px 16px 8px; } .ap-steps .sc-desc { margin: 0 0 10px; }
.ap-have { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 8px; }
/* Health (Apple Health readings) */
.hl-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; }
.hl-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--rule); background: transparent; color: var(--ink); font: inherit; text-align: start; min-width: 0; }
.hl-ico { font-size: 20px; } .hl-v { font-size: 20px; font-variant-numeric: tabular-nums; white-space: nowrap; } .hl-v small { font-size: 12px; font-weight: 500; color: var(--ink-2); }
.hl-tile > small { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.hl-tile.off { text-decoration: none; border-style: dashed; } .hl-tile.off .hl-v { color: var(--ink-3); } .hl-tile.off > small:last-child { white-space: normal; }
.hl-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .hl-stats > div { display: flex; flex-direction: column; padding: 8px 10px; border: 1px solid var(--rule); border-radius: 12px; } .hl-stats b { font-size: 17px; font-variant-numeric: tabular-nums; }
.hl-days { max-height: 40vh; overflow: auto; } .hl-day { display: flex; justify-content: space-between; padding: 9px 14px; border-top: 1px solid var(--rule); } .hl-day:first-child { border-top: 0; } .hl-day b { font-variant-numeric: tabular-nums; }
.hl-raw { display: flex; flex-direction: column; gap: 4px; padding: 10px; border: 1px dashed var(--rule); border-radius: 12px; } .hl-raw code { white-space: pre-wrap; word-break: break-word; font-size: 12px; }
/* colour rows — each habit its own colour; a done row fills with it */
.hb-row.hb-tint { margin: 6px 10px; width: calc(100% - 20px); border: 0; border-top: 0; border-radius: 16px; background: color-mix(in srgb, var(--ink) 5%, transparent); transition: background .25s ease, color .25s ease; position: relative; }
.hb-row.hb-tint { border-inline-start: 4px solid var(--hc); }
.hb-row.hb-tint.done { border-inline-start-color: transparent; }
.hb-row.hb-tint .hb-check { border-radius: 99px; }
.hb-row.hb-tint.done { background: var(--hc); color: var(--hc-ink); }
.hb-row.hb-tint.done .hb-name, .hb-row.hb-tint.done .hb-name small, .hb-row.hb-tint.done .hb-link { color: var(--hc-ink); }
.hb-row.hb-tint.done .hb-name small { opacity: .85; }
.hb-row.hb-tint.done .hb-check, .hb-row.hb-tint.done button.hb-check { background: color-mix(in srgb, var(--hc-ink) 22%, transparent); border-color: transparent; color: var(--hc-ink); }
.hb-row.hb-tint.done .hb-ico { background: color-mix(in srgb, var(--hc-ink) 16%, transparent); }
.hb-row.hb-tint.count.done .hb-bar { background: color-mix(in srgb, var(--hc-ink) 25%, transparent); } .hb-row.hb-tint.count.done .hb-bar i { background: var(--hc-ink); }
.hb-row.hb-tint.count .hb-bar i { background: var(--hc); }
.hb-row.hb-tint.done .chip, .hb-row.hb-tint.done .icon-btn { color: var(--hc-ink); border-color: color-mix(in srgb, var(--hc-ink) 40%, transparent); background: transparent; }
.hb-run { display: block; }
.card.flush > .hb-row.hb-tint:last-child { margin-bottom: 10px; }
@media (prefers-reduced-motion: reduce) { .hb-row.hb-tint { transition: none; } }
.hb-colors { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hb-col { width: 34px; height: 34px; border-radius: 99px; border: 2px solid transparent; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 15%, transparent); cursor: pointer; }
.hb-col.on { border-color: var(--ink); box-shadow: 0 0 0 2px var(--paper) inset; }
.hb-col.auto { width: auto; padding: 0 12px; background: transparent; color: var(--ink); font: inherit; font-size: var(--t-s); border: 1.5px dashed var(--ink-3); }
.hb-col.auto.on { border-style: solid; border-color: var(--ink); }
/* «كل عاداتي» */
.hb-all-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hb-all-date { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .hb-all-date b { font-size: 26px; line-height: 1.2; } .hb-all-date small { font-size: var(--t-s); }
.hb-all-goals { margin-top: 6px; align-self: flex-start; font-size: var(--t-s); padding: 3px 10px; border-radius: 99px; background: color-mix(in srgb, var(--ink) 7%, transparent); color: var(--ink); text-decoration: none; }
.hb-all-ring { width: 84px; height: 84px; flex: none; display: grid; place-items: center; align-content: center; } .hb-all-ring span { font-weight: 800; font-size: 20px; } .hb-all-ring small { font-size: 11px; color: var(--ink-2); }
.hb-all-link { color: inherit; text-decoration: none; }
.hb-all-list { padding-bottom: 6px; }
.hb-all-ring span { width: 68px; height: 68px; flex-direction: column; display: flex; align-items: center; justify-content: center; font: 800 20px/1 var(--f-display); gap: 3px; } .hb-all-ring span small { font: 500 11px/1 var(--f-body, inherit); color: var(--ink-2); }
.card.hb-all-head { display: flex; flex-direction: row; align-items: center; }
.hb-sug:empty { display: none; } .hb-sug { display: flex; flex-direction: column; gap: 6px; }
.hb-pstrip { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 2px 10px 6px; padding: 10px 14px; border-radius: 16px; background: color-mix(in srgb, var(--ink) 5%, transparent); }
.hb-ps-t { font-weight: 600; white-space: nowrap; } .hb-ps-t b { font-variant-numeric: tabular-nums; }
.hb-ps-beads { display: flex; gap: 8px; }
.hb-ps-beads .tl-node { position: relative; width: 30px; height: 30px; border-radius: 99px; border: 2px solid var(--ink-3); background: none; display: grid; place-items: center; font-size: 13px; color: var(--paper); padding: 0; margin-bottom: 14px; }
.hb-ps-beads .tl-node small { position: absolute; top: 100%; margin-top: 2px; font-size: 9.5px; color: var(--ink-2); white-space: nowrap; font-weight: 500; }
.hb-ps-beads .tl-node.ontime { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.hb-ps-beads .tl-node.jamaah { background: var(--saffron); border-color: var(--saffron); color: var(--saffron-ink); }
.hb-ps-beads .tl-node.late { background: var(--tint); border-color: var(--amber); color: var(--amber); }
.sel-sm { width: auto; max-width: 170px; padding: 6px 10px; font-size: var(--t-s); }

/* ── Expense categories editor ── */
.ct-card { border-inline-start: 4px solid var(--c); display: flex; flex-direction: column; gap: 10px; }
.ct-main { display: flex; align-items: center; gap: 8px; }
.ct-name { flex: 1; display: flex; align-items: center; gap: 10px; border: 0; background: none; color: var(--ink); font: inherit; text-align: start; padding: 0; min-width: 0; }
.ct-name b { font-size: var(--t-m); }
.ct-name small { color: var(--ink-3); }
.ct-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; background: color-mix(in srgb, var(--c, #64748b) 22%, transparent); flex: none; }
.ct-ord { display: flex; gap: 4px; }
.ct-ord button:disabled { opacity: .3; }
.ct-subs .chip.ghost { border-style: dashed; color: var(--ink-2); }
.ct-hidden summary { cursor: pointer; color: var(--ink-2); }
.ct-hrow { padding: 8px 0; border-top: 1px solid var(--rule); align-items: center; }
.ct-prev { display: flex; align-items: center; gap: 12px; padding: 6px 0 4px; }
.ct-prev b { font-size: var(--t-l); }
.ct-icrow { align-items: center; justify-content: space-between; }
.ct-icin { width: 70px; text-align: center; font-size: 22px; }
.ct-icons { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.ct-icons button { aspect-ratio: 1; border: 1px solid transparent; border-radius: 10px; background: var(--tint); font-size: 20px; padding: 0; }
.ct-icons button.on { border-color: var(--ink); background: var(--sheet); }
.ct-colors { display: flex; flex-wrap: wrap; gap: 8px; }
.ct-colors button { width: 32px; height: 32px; border-radius: 50%; border: 3px solid transparent; padding: 0; }
.ct-colors button.on { border-color: var(--ink); box-shadow: 0 0 0 2px var(--sheet) inset; }
.ct-subs { flex-wrap: wrap; overflow: visible; }

/* Apple Pay: tidy older expenses */
.ap-recat { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: start; width: 100%; border: 1px dashed var(--rule); color: var(--ink); font: inherit; }
.ap-rc-list { display: flex; flex-direction: column; max-height: 55vh; overflow-y: auto; margin: 0 -4px; }
.form .ap-rc, .ap-rc { display: flex; flex-direction: row; align-items: center; text-align: start; margin: 0; gap: 10px; padding: 10px 4px; border-bottom: 1px solid var(--rule); }
.ap-rc input { width: 20px; height: 20px; flex: none; accent-color: var(--ink); }
.ap-rc-mid { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.ap-rc-mid b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-rc-mid small { color: var(--ink-2); font-size: var(--t-xs); }
.ap-rc-mid strong { color: var(--ink); font-weight: 600; }
.ap-rc-amt { display: flex; flex-direction: column; align-items: flex-end; font-variant-numeric: tabular-nums; font-size: var(--t-s); }
.ap-rc-amt small { color: var(--ink-3); font-size: 11px; }
/* spotted subscriptions on the recurring page */
.rc-spot { display: flex; flex-direction: column; gap: 6px; }
.rc-spot-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--rule); }
.rc-spot-row .grow { display: flex; flex-direction: column; min-width: 0; }
.rc-spot-row b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tag-row { margin-top: -4px; }
.tag-row .chip.ghost { border-style: dashed; color: var(--ink-2); }
.tag-list { display: flex; flex-direction: column; max-height: 55vh; overflow-y: auto; }

/* «زياراتي» */
.vs-sum { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: center; }
.vs-sum small { display: block; color: var(--ink-2); font-size: var(--t-xs); }
.vs-sum b { font-size: var(--t-l); }
.vs-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 18px; border: 0; border-top: 1px solid var(--rule); background: none; color: var(--ink); font: inherit; text-align: start; }
.vs-day .day-h + .vs-row { border-top: 0; }
.vs-t { font-weight: 600; min-width: 74px; }
.vs-m { flex: 1; color: var(--ink-2); }
.vs-e { color: var(--ink-3); }
.hl-errs { padding: 0 18px 8px; display: grid; gap: 8px; }
.hl-err small { display: block; color: var(--ink-2); font-size: var(--t-xs); }
.hl-err code { display: block; font-size: var(--t-xs); white-space: pre-wrap; word-break: break-word; color: var(--pome); }
/* «ميزانيتك» */
.row.between { justify-content: space-between; align-items: center; }
.tiny.bad, b.bad { color: var(--pome); } .tiny.warn, b.warn { color: var(--amber); } .tiny.ok { color: var(--herb); }
.bd-savecard { display: grid; gap: 8px; }
.bd-lines { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.bd-lines > div { display: flex; flex-direction: column; gap: 2px; }
.bd-lines span { font-size: var(--t-xs); }
.bd-alert { text-align: center; }
.bd-alert .bd-ico { font-size: 46px; line-height: 1; animation: bd-shake .5s ease 2; }
.bd-alert h3 { color: var(--pome); margin: 6px 0 2px; }
.bd-alert .bd-one { display: grid; gap: 6px; text-align: start; }
.bd-alert .bd-save { color: var(--amber); font-weight: 600; }
@keyframes bd-shake { 0%, 100% { transform: rotate(0) } 25% { transform: rotate(-12deg) } 75% { transform: rotate(12deg) } }
@media (prefers-reduced-motion: reduce) { .bd-alert .bd-ico { animation: none; } }

/* ── install guide (#/install): drawn phone screens, iPhone + Android */
.ig h2 { margin: 0 0 6px; } .ig > .muted { margin: 0 0 14px; }
.ig-seg { display: flex; width: 100%; margin-bottom: 16px; } .ig-seg button { flex: 1; padding: 9px 6px; font-size: var(--t-m); }
.ig-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.ig-steps li { display: grid; grid-template-columns: 30px 1fr; gap: 6px 10px; align-items: start; }
.ig-steps li > p { margin: 3px 0 0; font-weight: 500; line-height: 1.5; }
.ig-steps li > .ig-phone { grid-column: 2; }
.ig-num { width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.ig-phone { position: relative; width: min(230px, 100%); height: 160px; border: 2px solid var(--rule); border-radius: 22px; background: var(--paper); overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; direction: ltr; font-size: 12px; color: var(--ink); }
.ig-page { flex: 1; display: flex; flex-direction: column; padding: 10px; gap: 8px; }
.ig-urlbar, .ig-url { background: var(--tint); border-radius: 8px; padding: 5px 8px; font-size: 11px; color: var(--ink-2); text-align: center; }
.ig-lines { flex: 1; background: repeating-linear-gradient(var(--tint) 0 7px, transparent 7px 15px); opacity: .7; border-radius: 4px; }
.ig-safari-bar { display: flex; justify-content: space-around; align-items: center; padding: 8px 6px 12px; border-top: 1px solid var(--rule); background: var(--sheet); font-size: 18px; color: #2F7BF6; }
.ig-chrome-bar { display: flex; align-items: center; gap: 6px; padding: 8px; border-bottom: 1px solid var(--rule); background: var(--sheet); order: -1; }
.ig-chrome-bar .ig-url { flex: 1; text-align: start; } .ig-phone:has(.ig-chrome-bar) { justify-content: flex-start; }
.ig-dots { font-size: 20px; font-weight: 700; padding: 0 6px; }
.ig-sheet, .ig-menu { margin: 10px 8px 8px; background: var(--sheet); border-radius: 14px; box-shadow: var(--lift); padding: 6px 0; }
.ig-menu { position: absolute; top: 8px; right: 8px; left: auto; width: 62%; margin: 0; }
.ig-sheet-head { display: flex; align-items: center; gap: 8px; padding: 6px 10px 8px; border-bottom: 1px solid var(--rule); }
.ig-sheet-head small, .ig-dialog small { display: block; color: var(--ink-3); font-size: 10px; }
.ig-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; gap: 8px; }
.ig-dialog { margin: 0 8px 10px; background: var(--sheet); border-radius: 14px; box-shadow: var(--lift); padding: 8px 10px 12px; }
.ig-dialog.center { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-bottom: 24px; }
.ig-dialog-head { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: #2F7BF6; margin-bottom: 8px; } .ig-dialog-head b { color: var(--ink); }
.ig-dialog-body { display: flex; align-items: center; gap: 10px; }
.ig-dialog-btns { display: flex; gap: 22px; margin-top: 8px; color: #1A73E8; font-weight: 600; }
.ig-appicon { width: 40px; height: 40px; border-radius: 10px; display: block; } .ig-appicon.sm { width: 28px; height: 28px; border-radius: 7px; }
.ig-svg { display: inline-flex; }
.ig-hl { display: inline-flex; align-items: center; border-radius: 8px; outline: 2px solid var(--saffron); outline-offset: 2px; background: color-mix(in srgb, var(--saffron) 22%, transparent); padding: 1px 4px; }
.ig-hl.block { display: block; margin: 2px 6px; padding: 0; }
.ig-pulse { animation: igPulse 1.6s ease-in-out infinite; }
@keyframes igPulse { 50% { outline-offset: 5px; outline-color: color-mix(in srgb, var(--saffron) 35%, transparent); } }
.ig-home { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px 10px; padding: 16px 14px; align-content: start; background: linear-gradient(160deg, #22355A, #0A182E); }
.ig-dummy { width: 34px; height: 34px; border-radius: 9px; background: rgb(255 255 255 / .16); justify-self: center; }
.ig-home-app { display: flex; flex-direction: column; align-items: center; gap: 3px; color: #fff; justify-self: center; } .ig-home-app .ig-appicon { width: 34px; height: 34px; border-radius: 9px; }
.ig-pop { animation: igPop 2.4s ease-in-out infinite; } @keyframes igPop { 0%, 60%, 100% { transform: scale(1); } 75% { transform: scale(1.18); } }
.ig-warn { background: color-mix(in srgb, var(--saffron) 18%, transparent); border-radius: var(--r-ctl); padding: 10px 12px; margin: 0 0 14px; }
.ig-foot { color: var(--ink-3); font-size: var(--t-s); text-align: center; margin: 20px 0 4px; }
.ig-open { margin-top: 6px; }
@media (prefers-reduced-motion: reduce) { .ig-pulse, .ig-pop { animation: none; } }

/* e-mail confirmation (My details) */
.ev-ok { color: var(--good, #2E7D4F); margin-top: -4px; }
.ev-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: color-mix(in srgb, var(--saffron) 16%, transparent); border-radius: var(--r-ctl); padding: 8px 10px; }
.ev-row .btn { padding: 6px 12px; font-size: var(--t-s); white-space: nowrap; flex: none; }
