/* ==========================================================================
   Masbahty — design system
   ========================================================================== */
:root {
  --font-ui: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-dhikr: "Amiri", "Noto Naskh Arabic", serif;
  --font-quran: "Amiri Quran", "Amiri", serif;
  --font-display-ar: "Aref Ruqaa", "Amiri", serif;
  --font-display-en: "Cormorant Garamond", Georgia, serif;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-soft: cubic-bezier(.4, 0, .2, 1);
  --radius: 22px;
  --tabbar-h: 0px; /* no bottom bar: navigation lives in the menu */
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

/* Themes ------------------------------------------------------------------ */
[data-theme="emerald"] {
  --bg-0: #021a14; --bg-1: #04261d; --bg-2: #0b3b2d; --bg-3: #125241;
  --ink: #f4ead2; --ink-2: #cbbf9f; --muted: #8fa596;
  --gold: #d9b45a; --gold-2: #f3dc98; --gold-3: #9c7a2e;
  --surface: rgba(255, 246, 220, .055); --surface-2: rgba(255, 246, 220, .09);
  --line: rgba(217, 180, 90, .22); --glow: rgba(243, 210, 120, .55);
  --accent: #3fb68b; --pattern-op: .07; --dim-text: rgba(244, 234, 210, .13);
  --star: #fff6dc; color-scheme: dark;
}
[data-theme="ivory"] {
  --bg-0: #efe4cf; --bg-1: #f7f0e3; --bg-2: #efe2c8; --bg-3: #e3d1ad;
  --ink: #2f2615; --ink-2: #5d4d31; --muted: #8b7a5c;
  --gold: #a57a26; --gold-2: #c99a3d; --gold-3: #7a5815;
  --surface: rgba(255, 255, 255, .55); --surface-2: rgba(255, 255, 255, .8);
  --line: rgba(122, 88, 21, .2); --glow: rgba(201, 154, 61, .45);
  --accent: #1f6b52; --pattern-op: .09; --dim-text: rgba(47, 38, 21, .11);
  --star: #a57a26; color-scheme: light;
}
[data-theme="midnight"] {
  --bg-0: #03050c; --bg-1: #070b17; --bg-2: #0e1528; --bg-3: #18213c;
  --ink: #f2ead8; --ink-2: #c4bba6; --muted: #7f8aa3;
  --gold: #e2c275; --gold-2: #fbe7b0; --gold-3: #a8873b;
  --surface: rgba(226, 194, 117, .055); --surface-2: rgba(226, 194, 117, .09);
  --line: rgba(226, 194, 117, .2); --glow: rgba(251, 222, 150, .55);
  --accent: #6c8cff; --pattern-op: .06; --dim-text: rgba(242, 234, 216, .12);
  --star: #fff3d6; color-scheme: dark;
}
[data-theme="celestial"] {
  --bg-0: #07061a; --bg-1: #0d0b2a; --bg-2: #1b1450; --bg-3: #2c1f6e;
  --ink: #eee9ff; --ink-2: #c3bce6; --muted: #8e88b8;
  --gold: #f1d39a; --gold-2: #fff0c9; --gold-3: #b79655;
  --surface: rgba(190, 180, 255, .06); --surface-2: rgba(190, 180, 255, .1);
  --line: rgba(196, 186, 255, .2); --glow: rgba(173, 214, 255, .55);
  --accent: #8fd3ff; --pattern-op: .05; --dim-text: rgba(238, 233, 255, .12);
  --star: #ffffff; color-scheme: dark;
}

/* Base -------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font-ui);
  background: var(--bg-1);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: manipulation;
}
html[lang="en"] body { letter-spacing: .005em; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
svg { display: block; }
.icon-btn svg, .ctl svg, .tabbar svg, .exp-switch svg { width: 22px; height: 22px; fill: currentColor; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Ambient background ------------------------------------------------------ */
.ambient { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  background:
    radial-gradient(120% 70% at 50% -10%, var(--bg-3) 0%, transparent 60%),
    radial-gradient(90% 60% at 50% 110%, var(--bg-2) 0%, transparent 70%),
    linear-gradient(180deg, var(--bg-1), var(--bg-0));
}
.ambient__pattern { position: absolute; inset: -20%; opacity: var(--pattern-op);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96' viewBox='0 0 96 96'%3E%3Cg fill='none' stroke='%23d9b45a' stroke-width='1'%3E%3Cpath d='M48 8l11.3 28.7L88 48 59.3 59.3 48 88 36.7 59.3 8 48l28.7-11.3z'/%3E%3Cpath d='M19.7 19.7L48 31.4l28.3-11.7L64.6 48l11.7 28.3L48 64.6 19.7 76.3 31.4 48z'/%3E%3Ccircle cx='48' cy='48' r='10'/%3E%3Cpath d='M0 0l8 8M96 0l-8 8M0 96l8-8M96 96l-8-8'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 96px 96px;
  mask-image: radial-gradient(70% 55% at 50% 35%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(70% 55% at 50% 35%, #000 0%, transparent 75%);
  animation: drift 120s linear infinite;
}
@keyframes drift { to { transform: translate3d(96px, 96px, 0); } }
.ambient__ray { position: absolute; left: 50%; top: -20vh; width: 140vw; height: 90vh; transform: translateX(-50%);
  background: conic-gradient(from 180deg at 50% 0%, transparent 160deg, var(--glow) 180deg, transparent 200deg);
  opacity: .12; filter: blur(30px); animation: breathe 9s var(--ease-soft) infinite alternate; }
@keyframes breathe { from { opacity: .07; } to { opacity: .16; } }
.ambient__stars { position: absolute; inset: 0; opacity: 0; transition: opacity 1s; }
[data-theme="celestial"] .ambient__stars, [data-theme="midnight"] .ambient__stars { opacity: 1; }
.ambient__stars::before, .ambient__stars::after { content: ""; position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at 12% 18%, var(--star), transparent), radial-gradient(1px 1px at 72% 9%, var(--star), transparent),
    radial-gradient(1.5px 1.5px at 34% 32%, var(--star), transparent), radial-gradient(1px 1px at 88% 41%, var(--star), transparent),
    radial-gradient(1px 1px at 52% 14%, var(--star), transparent), radial-gradient(1.2px 1.2px at 8% 58%, var(--star), transparent),
    radial-gradient(1px 1px at 63% 66%, var(--star), transparent), radial-gradient(1.4px 1.4px at 23% 82%, var(--star), transparent),
    radial-gradient(1px 1px at 93% 77%, var(--star), transparent), radial-gradient(1px 1px at 44% 92%, var(--star), transparent);
  animation: twinkle 6s ease-in-out infinite alternate; }
.ambient__stars::after { transform: translate(37%, 23%) rotate(40deg); animation-delay: -3s; opacity: .7; }
@keyframes twinkle { from { opacity: .35; } to { opacity: 1; } }
.ambient__vignette { position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(0,0,0,.35)); }
[data-theme="ivory"] .ambient__vignette { background: radial-gradient(120% 90% at 50% 40%, transparent 60%, rgba(122,88,21,.12)); }

/* Top bar ----------------------------------------------------------------- */
.topbar { position: fixed; top: 0; inset-inline: 0; z-index: 20; background: linear-gradient(180deg, var(--bg-1) 45%, transparent); display: flex; align-items: center; justify-content: space-between;
  padding: calc(var(--safe-t) + 10px) 16px 8px; transition: opacity .5s, transform .5s var(--ease-out); direction: rtl; }
.topbar .brand { direction: ltr; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2);
  background: var(--surface); border: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: transform .2s var(--ease-out), color .2s; }
.icon-btn:active { transform: scale(.92); }
.brand { display: flex; flex-direction: column; align-items: center; line-height: 1; }
.brand__ar { font-family: var(--font-display-ar); font-size: 26px; font-weight: 700; line-height: 1.7; padding: 0 6px; margin-top: 0;
  background: linear-gradient(180deg, var(--gold-2), var(--gold) 55%, var(--gold-3)); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 12px var(--glow)); }
.brand__en { font-family: var(--font-display-en); letter-spacing: .5em; font-size: 10px; color: var(--muted); margin-top: -4px; padding-inline-start: .5em; }

/* Views ------------------------------------------------------------------- */
#views { position: fixed; inset: 0; z-index: 5; }
.view { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch;
  padding: calc(var(--safe-t) + 72px) 16px calc(var(--tabbar-h) + var(--safe-b) + 24px);
  opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity .45s var(--ease-out), transform .45s var(--ease-out), visibility 0s .45s; }
.view.is-active { opacity: 1; visibility: visible; transform: none; transition: opacity .45s var(--ease-out), transform .45s var(--ease-out); }
.view > * { max-width: 560px; margin-inline: auto; }

/* Count view -------------------------------------------------------------- */
.view--count { display: flex; flex-direction: column; align-items: center; overflow: hidden; padding-bottom: calc(var(--safe-b) + 14px); }
.view--count > * { width: 100%; }
.dhikr-chip { display: flex; align-items: center; justify-content: center; gap: 8px; width: auto !important; margin: 0 auto;
  padding: 9px 18px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2);
  font-size: 14px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); max-width: 90%; }
.dhikr-chip__label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dhikr-chip .chev { width: 16px; height: 16px; opacity: .7; flex: none; }

.stage { position: relative; flex: 1 1 auto; min-height: 0; display: grid; place-items: center; margin: 6px 0;
  cursor: pointer; user-select: none; -webkit-user-select: none; outline: none; touch-action: manipulation; }
.stage__inner { position: relative; width: 100%; height: 100%; display: grid; place-items: center; }
.stage__ripples { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.ripple { position: absolute; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%;
  border: 1px solid var(--gold-2); box-shadow: 0 0 18px var(--glow); animation: ripple .9s var(--ease-out) forwards; }
@keyframes ripple { from { transform: scale(1); opacity: .7; } to { transform: scale(9); opacity: 0; } }

.counter { text-align: center; margin-top: 2px; }
.counter__num { font-family: var(--font-display-en); font-weight: 600; font-size: clamp(44px, 12vw, 60px); line-height: 1;
  font-variant-numeric: tabular-nums; color: var(--ink);
  text-shadow: 0 0 24px var(--glow); transition: transform .18s var(--ease-out); }
.counter__num.bump { transform: scale(1.06); }
.counter__meta { color: var(--muted); font-size: 13px; margin-top: 6px; display: flex; gap: 8px; justify-content: center; }
.counter__meta .dot { opacity: .5; }

.controls { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 14px; position: relative; z-index: 3; }
.dhikr-chip, .counter, .today-strip, .today-each { position: relative; z-index: 3; }
.stage { z-index: 1; }
.ctl { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2);
  background: var(--surface); border: 1px solid var(--line); transition: transform .18s var(--ease-out); }
.ctl:active { transform: scale(.9); }
.exp-switch { display: flex; padding: 4px; gap: 2px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.exp-switch button { width: 46px; height: 40px; border-radius: 999px; display: grid; place-items: center; color: var(--muted); transition: background .3s, color .3s; }
.exp-switch button[aria-selected="true"] { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: var(--bg-1); box-shadow: 0 4px 18px -4px var(--glow); }
.today-strip { margin-top: 12px; text-align: center; font-size: 13px; color: var(--muted); min-height: 18px; }
.today-each { display: flex; gap: 6px; margin-top: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 4px; justify-content: safe center; flex: none; }
.today-each::-webkit-scrollbar { display: none; }
.te { flex: none; display: inline-flex; align-items: center; gap: 7px; max-width: 70vw; padding: 5px 6px 5px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); font-size: 13px; }
[dir="rtl"] .te { padding: 5px 12px 5px 6px; }
.te__l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.te__l[lang="ar"] { font-family: var(--font-dhikr); font-size: 15px; line-height: 1.2; }
.te__n { min-width: 26px; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--ink); font-variant-numeric: tabular-nums; text-align: center; font-size: 12.5px; }
.te.is-on { border-color: var(--gold); color: var(--ink); }
.te.is-on .te__n { background: var(--gold); color: #1d1606; font-weight: 600; }
.te__n.tick { animation: te-tick .32s var(--ease-out); }
@keyframes te-tick { 0% { transform: translateY(-40%) rotateX(70deg); opacity: .3; } 100% { transform: none; opacity: 1; } }
.today-strip b { color: var(--gold); font-weight: 500; }
.focus-exit { display: none; }

/* Focus mode */
body.focus .topbar, body.focus .today-strip, body.focus .today-each, body.focus .exp-switch, body.focus .ambient__pattern,
body.focus .ambient__ray, body.focus .ambient__stars { opacity: 0; pointer-events: none; }
body.focus .topbar { transform: translateY(-20px); }
body.focus .focus-exit { display: block; position: fixed; top: calc(var(--safe-t) + 14px); inset-inline-end: 16px; width: auto;
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-size: 13px; background: var(--surface); z-index: 30; }
body.focus .view--count { padding-top: calc(var(--safe-t) + 60px); padding-bottom: calc(var(--safe-b) + 28px); }

/* Experience: calligraphy -------------------------------------------------- */
.callig { width: 100%; padding: 0 6px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.callig__frame { position: relative; width: min(92%, 440px); aspect-ratio: 1 / 1.05; display: grid; place-items: center; }
.callig__frame > svg.arch { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.callig__text { position: relative; direction: rtl; font-family: var(--font-dhikr); font-weight: 700; line-height: 1.75;
  font-size: var(--callig-size, 64px); padding: 0 8%; display: flex; flex-wrap: wrap; justify-content: center; column-gap: .22em; }
.cw { position: relative; display: inline-block; padding: .4em .08em; margin: -.28em 0; }
.cw__base { color: var(--dim-text); }
.cw__lit { position: absolute; inset: 0; padding: inherit; white-space: nowrap;
  background: linear-gradient(180deg, var(--gold-2) 10%, var(--gold) 55%, var(--gold-3) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  clip-path: inset(0 0 0 var(--clip, 100%)); }
.callig__sub { font-size: 14px; color: var(--muted); max-width: 30ch; line-height: 1.5; }
/* on completion a bright sheen passes through the letters (inside the glyphs only) */
.callig.done .cw__lit { background-image: linear-gradient(105deg, var(--gold-2) 0%, var(--gold) 38%, #fffaf0 50%, var(--gold) 62%, var(--gold-3) 100%);
  background-size: 300% 100%; animation: sheen 1.5s var(--ease-soft) 1; }
@keyframes sheen { from { background-position: 0 0; } to { background-position: 100% 0; } }

/* Experience: geometry ------------------------------------------------------ */
.geo { width: min(88vw, 52vh, 420px); aspect-ratio: 1; position: relative; }
.geo svg { width: 100%; height: 100%; overflow: visible; }
.geo .petal { fill: var(--surface-2); stroke: var(--line); stroke-width: .6; transition: fill .5s, filter .5s; }
.geo .petal.on { fill: var(--gold); stroke: var(--gold-2); filter: url(#glow); }
.geo .petal.head { fill: var(--gold-2); }
.geo .ray { stroke: var(--line); fill: none; stroke-width: 1; transition: stroke .6s, opacity .6s; }
.geo .ray.on { stroke: var(--gold); filter: url(#glow); }
.geo .rosette { transform-origin: 200px 200px; transition: transform 1.6s var(--ease-out); }
.geo .core-text { font-family: var(--font-dhikr); font-weight: 700; fill: var(--ink); }
.geo .wave { fill: none; stroke: var(--gold-2); stroke-width: 2; opacity: 0; transform-origin: 200px 200px; }
.geo.bloom .wave { animation: wave 1.8s var(--ease-out); }
@keyframes wave { from { opacity: .9; transform: scale(.3); } to { opacity: 0; transform: scale(1.35); } }
.geo .slow-spin { transform-origin: 200px 200px; animation: spin 90s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Experience: journey ------------------------------------------------------- */
.journey { width: min(92vw, 56vh, 440px); aspect-ratio: 3 / 4; position: relative; }
.journey svg { width: 100%; height: 100%; overflow: visible; }
.journey .path-base { fill: none; stroke: var(--line); stroke-width: 2; stroke-dasharray: 2 7; stroke-linecap: round; }
.journey .path-lit { fill: none; stroke: url(#jgrad); stroke-width: 3.2; stroke-linecap: round; filter: url(#jglow); }
.journey .lamp { fill: var(--surface-2); stroke: var(--line); transition: fill .6s; }
.journey .lamp.on { fill: var(--gold-2); filter: url(#jglow); }
.journey .arch { fill: none; stroke: var(--line); stroke-width: 1.2; }
.journey .silhouette { fill: var(--bg-0); opacity: .55; }
[data-theme="ivory"] .journey .silhouette { fill: var(--bg-3); opacity: .7; }
.journey .dome-glow { opacity: var(--dome, 0); transition: opacity 1s; }
.journey .orb { filter: url(#jglow); }

/* Generic UI -------------------------------------------------------------- */
.h-title { font-family: var(--font-display-ar); font-size: 28px; font-weight: 700; margin: 6px 0 4px; color: var(--ink);
  text-align: center; }
html[lang="en"] .h-title { font-family: var(--font-display-en); font-size: 30px; font-weight: 600; }
.h-sub { text-align: center; color: var(--muted); font-size: 13.5px; margin: 0 0 18px; line-height: 1.6; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 12px;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.card h3 { margin: 0 0 10px; font-size: 15px; font-weight: 500; color: var(--ink-2); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.seg { display: flex; padding: 3px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); gap: 2px; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: 1; padding: 8px 10px; border-radius: 11px; color: var(--muted); font-size: 13px; white-space: nowrap; transition: background .25s, color .25s; }
.seg button.is-on { background: var(--surface-2); color: var(--gold); box-shadow: inset 0 0 0 1px var(--line); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border-radius: 14px; font-size: 14px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--ink); transition: transform .15s; }
.btn:active { transform: scale(.97); }
.btn--gold { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #1d1606; border-color: transparent; font-weight: 600; box-shadow: 0 8px 24px -10px var(--glow); }
.btn--ghost { background: transparent; }
.btn--danger { color: #e88a7a; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.field { width: 100%; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); outline: none; }
.field:focus { border-color: var(--gold); }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 12px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px; }
.tile__k { font-size: 12px; color: var(--muted); }
.tile__v { font-family: var(--font-display-en); font-size: 30px; font-weight: 600; margin-top: 4px; font-variant-numeric: tabular-nums; color: var(--ink); }
.tile__v.gold { color: var(--gold); }
.list { display: flex; flex-direction: column; gap: 6px; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: var(--surface); border: 1px solid transparent; text-align: start; width: 100%; }
.list-item.is-on { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--line); }
.list-item__ar { font-family: var(--font-dhikr); font-size: 20px; font-weight: 700; color: var(--ink); direction: rtl; }
.list-item__en { font-size: 12.5px; color: var(--muted); }
.list-item__end { margin-inline-start: auto; font-variant-numeric: tabular-nums; color: var(--gold); font-size: 14px; }
.toggle { position: relative; width: 46px; height: 28px; flex: none; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); transition: background .25s; }
.toggle::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--ink-2); transition: transform .25s var(--ease-out), background .25s; }
.toggle[aria-checked="true"] { background: var(--gold); }
.toggle[aria-checked="true"]::after { background: #1d1606; transform: translateX(18px); }
[dir="rtl"] .toggle[aria-checked="true"]::after { transform: translateX(-18px); }
input[type=range] { width: 100%; accent-color: var(--gold); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; color: var(--ink-2); }
.chip.is-on { background: var(--gold); color: #1d1606; border-color: transparent; }
.theme-sw { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.theme-sw button { border-radius: 16px; padding: 6px; border: 1px solid var(--line); background: var(--surface); font-size: 11px; color: var(--ink-2); }
.theme-sw button.is-on { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.theme-sw i { display: block; height: 44px; border-radius: 11px; margin-bottom: 6px; }
.empty { text-align: center; padding: 28px 12px; color: var(--muted); font-size: 14px; line-height: 1.7; }

/* Sheet ------------------------------------------------------------------- */
.sheet { position: fixed; inset: 0; z-index: 50; visibility: hidden; }
.sheet.is-open { visibility: visible; }
.sheet__scrim { position: absolute; inset: 0; background: rgba(0,0,0,.45); opacity: 0; transition: opacity .35s; }
.sheet.is-open .sheet__scrim { opacity: 1; }
.sheet__panel { position: absolute; inset-inline: 0; bottom: 0; max-height: 88vh; max-width: 600px; margin-inline: auto; display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1)); border: 1px solid var(--line); border-bottom: 0;
  border-radius: 28px 28px 0 0; transform: translateY(102%); transition: transform .45s var(--ease-out); box-shadow: 0 -20px 60px -20px rgba(0,0,0,.6); }
.sheet.is-open .sheet__panel { transform: none; }
.sheet__grip { width: 44px; height: 5px; border-radius: 9px; background: var(--line); margin: 10px auto 4px; flex: none; }
.sheet__body { overflow-y: auto; padding: 8px 16px calc(var(--safe-b) + 24px); }
.sheet__body h2 { font-size: 18px; font-weight: 600; margin: 6px 0 14px; text-align: center; }
.sheet__section { margin-bottom: 18px; }
.sheet__section > label, .sheet__label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }

/* Celebrate + toast ------------------------------------------------------- */
.celebrate { position: fixed; inset: 0; z-index: 40; pointer-events: none; }
.spark-p { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--gold-2); box-shadow: 0 0 10px var(--glow);
  animation: sparkfly 1.6s var(--ease-out) forwards; }
@keyframes sparkfly { from { transform: translate(0,0) scale(1); opacity: 1; } to { transform: translate(var(--dx), var(--dy)) scale(.2); opacity: 0; } }
.celebrate__msg { position: absolute; left: 50%; top: 22%; transform: translateX(-50%); padding: 10px 18px; border-radius: 999px;
  background: color-mix(in srgb, var(--bg-1) 80%, transparent); border: 1px solid var(--gold); color: var(--gold-2); font-size: 14px; white-space: nowrap;
  animation: msg 2.6s var(--ease-out) forwards; }
@keyframes msg { 0% { opacity: 0; transform: translate(-50%, 10px); } 15%, 75% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }
.toast { position: fixed; z-index: 60; left: 50%; bottom: calc(var(--tabbar-h) + var(--safe-b) + 24px); transform: translate(-50%, 20px); opacity: 0;
  padding: 10px 16px; border-radius: 14px; background: var(--bg-3); border: 1px solid var(--line); color: var(--ink); font-size: 13.5px;
  transition: opacity .3s, transform .3s var(--ease-out); pointer-events: none; max-width: 88vw; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.haptic-shim { position: fixed; left: -100px; top: -100px; opacity: 0; pointer-events: none; }

/* Stats ------------------------------------------------------------------- */
.chart { width: 100%; height: 170px; }
.chart .bar { fill: var(--gold); opacity: .85; rx: 3; }
.chart .bar.zero { fill: var(--line); opacity: 1; }
.chart .bar.sel { fill: var(--gold-2); }
.chart text { fill: var(--muted); font-size: 9px; font-family: var(--font-ui); }
.chart .goal-line { stroke: var(--accent); stroke-dasharray: 3 4; stroke-width: 1; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal__dow { text-align: center; font-size: 10.5px; color: var(--muted); padding-bottom: 2px; }
.cal__d { aspect-ratio: 1; border-radius: 10px; display: grid; place-items: center; font-size: 12px; color: var(--ink-2); position: relative;
  background: var(--surface); border: 1px solid transparent; font-variant-numeric: tabular-nums; }
.cal__d[data-l="1"] { background: color-mix(in srgb, var(--gold) 22%, transparent); }
.cal__d[data-l="2"] { background: color-mix(in srgb, var(--gold) 42%, transparent); }
.cal__d[data-l="3"] { background: color-mix(in srgb, var(--gold) 66%, transparent); color: #1d1606; }
.cal__d[data-l="4"] { background: var(--gold); color: #1d1606; box-shadow: 0 0 14px -2px var(--glow); }
.cal__d.today { border-color: var(--gold-2); }
.cal__d.sel { outline: 2px solid var(--gold-2); outline-offset: 1px; }
.cal__d.out { opacity: .25; }
.cal-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-nav button { width: 36px; height: 36px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); }
[dir="rtl"] .flip { transform: scaleX(-1); }
.ring { width: 76px; height: 76px; flex: none; }
.ring circle { fill: none; stroke-width: 7; }
.ring .bg { stroke: var(--surface-2); }
.ring .fg { stroke: var(--gold); stroke-linecap: round; transition: stroke-dashoffset .8s var(--ease-out); filter: drop-shadow(0 0 4px var(--glow)); }
.bar-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; margin-bottom: 10px; }
.bar-row__label { font-size: 14px; }
.bar-row__label .ar { font-family: var(--font-dhikr); font-weight: 700; font-size: 17px; }
.bar-row__v { font-variant-numeric: tabular-nums; color: var(--gold); font-size: 13.5px; }
.bar-row__track { grid-column: 1 / -1; height: 6px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.bar-row__fill { height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--gold-3), var(--gold), var(--gold-2)); transition: width .8s var(--ease-out); }
[dir="rtl"] .bar-row__fill { background: linear-gradient(270deg, var(--gold-3), var(--gold), var(--gold-2)); margin-inline-start: auto; }

/* Global ------------------------------------------------------------------ */
.pulse { position: relative; width: min(70vw, 280px); aspect-ratio: 1; margin: 4px auto 18px; display: grid; place-items: center; }
.pulse__ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--gold); opacity: 0; animation: pulse 3.6s var(--ease-out) infinite; }
.pulse__ring:nth-child(2) { animation-delay: 1.2s; }
.pulse__ring:nth-child(3) { animation-delay: 2.4s; }
@keyframes pulse { 0% { transform: scale(.35); opacity: .8; } 100% { transform: scale(1); opacity: 0; } }
.pulse.idle .pulse__ring { animation-duration: 7s; }
.pulse__core { position: relative; width: 52%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; text-align: center;
  background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--gold) 30%, transparent), transparent 70%), var(--surface);
  border: 1px solid var(--line); box-shadow: 0 0 60px -10px var(--glow), inset 0 0 30px -10px var(--glow); }
.pulse__num { font-family: var(--font-display-en); font-size: clamp(22px, 7vw, 32px); font-weight: 600; color: var(--gold-2); font-variant-numeric: tabular-nums; }
.pulse__k { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.notice { border: 1px dashed var(--line); border-radius: 16px; padding: 14px; font-size: 13.5px; color: var(--ink-2); line-height: 1.7; text-align: center; margin-bottom: 12px; }
.country { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.country:last-child { border-bottom: 0; }
.country__flag { font-size: 20px; text-align: center; }

/* More / journeys --------------------------------------------------------- */
.more-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
.more-card { position: relative; border-radius: 22px; padding: 16px 14px; min-height: 118px; text-align: start; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; }
.more-card svg { position: absolute; top: 12px; inset-inline-end: 12px; width: 40px; height: 40px; color: var(--gold); opacity: .9; }
.more-card b { font-weight: 600; font-size: 15px; }
.more-card span { font-size: 12px; color: var(--muted); line-height: 1.4; }
.sky-wrap, .garden-wrap { position: relative; border-radius: 24px; overflow: hidden; border: 1px solid var(--line); margin-bottom: 12px; }
.sky-wrap canvas { display: block; width: 100%; height: 420px; }
.garden-wrap svg { display: block; width: 100%; height: auto; }
.milestone { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: var(--surface); margin-bottom: 8px; border: 1px solid var(--line); }
.milestone.locked { opacity: .45; }
.milestone__seal { width: 46px; height: 46px; flex: none; }
.milestone__t { font-size: 14.5px; font-weight: 500; }
.milestone__d { font-size: 12px; color: var(--muted); }
.milestone .btn { margin-inline-start: auto; padding: 8px 12px; font-size: 12.5px; }
.back-btn { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; padding: 6px 0; margin-bottom: 6px; }
.back-btn svg { width: 18px; height: 18px; }

/* Duas library ------------------------------------------------------------- */
.dua-search { position: relative; margin-bottom: 14px; }
.dua-search input { padding-inline-start: 40px; }
.dua-search svg { position: absolute; top: 50%; inset-inline-start: 13px; width: 18px; height: 18px; transform: translateY(-50%); color: var(--muted); }
.dua-shortcuts { display: flex; gap: 8px; margin-bottom: 14px; }
.dua-shortcuts .chip { display: inline-flex; gap: 6px; align-items: center; }
.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.cat-card { position: relative; aspect-ratio: 1 / 1.12; border-radius: 26px 26px 18px 18px; overflow: hidden; text-align: center; padding: 0;
  border: 1px solid color-mix(in srgb, var(--hue) 45%, var(--line)); isolation: isolate;
  background: radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--hue) 34%, transparent), transparent 70%), var(--surface);
  transition: transform .25s var(--ease-out); animation: rise .6s var(--ease-out) both; animation-delay: calc(var(--i) * 30ms); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.cat-card:active { transform: scale(.97); }
.cat-card > svg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.cat-card__t { position: absolute; inset-inline: 8px; bottom: 14px; font-size: 14.5px; font-weight: 600; line-height: 1.35; color: var(--ink); }
html[lang="ar"] .cat-card__t { font-size: 15.5px; }
.cat-card__n { position: absolute; top: 12px; inset-inline-start: 14px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; font-size: 12px; color: var(--muted); margin: 14px 0 6px; }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-inline-end: 6px; vertical-align: middle; }
.t-quran { background: #5fc9a6; } .t-sunnah { background: var(--gold); } .t-general { background: #9fb0d8; } .t-pending { background: #d58c6a; }

.reader { position: fixed; inset: 0; z-index: 45; display: flex; flex-direction: column; visibility: hidden; opacity: 0; transition: opacity .4s var(--ease-out), visibility 0s .4s;
  background: radial-gradient(120% 60% at 50% 0%, color-mix(in srgb, var(--hue, var(--gold)) 26%, transparent), transparent 60%), linear-gradient(180deg, var(--bg-1), var(--bg-0)); }
.reader.is-open { visibility: visible; opacity: 1; transition: opacity .4s var(--ease-out); }
.reader__bar { display: flex; align-items: center; gap: 10px; padding: calc(var(--safe-t) + 10px) 14px 8px; }
.reader__title { flex: 1; text-align: center; font-size: 14px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reader__track { flex: 1; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.reader__track::-webkit-scrollbar { display: none; }
.dua { flex: 0 0 100%; scroll-snap-align: center; overflow-y: auto; padding: 8px 18px 28px; display: flex; flex-direction: column; }
.dua__inner { max-width: 620px; margin: 0 auto; width: 100%; }
.dua__badges { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 6px 0 14px; }
.badge { font-size: 11.5px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2); background: var(--surface); display: inline-flex; align-items: center; gap: 6px; }
.badge i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.badge.pending { border-color: #d58c6a; color: #e7a585; }
.dua__frame { position: relative; padding: 26px 18px; border-radius: 30px; border: 1px solid var(--line); background: var(--surface); }
.dua__frame::before, .dua__frame::after { content: ""; position: absolute; width: 34px; height: 34px; border: 1.5px solid var(--gold); opacity: .55; }
.dua__frame::before { top: 10px; inset-inline-start: 10px; border-inline-end: 0; border-bottom: 0; border-start-start-radius: 16px; }
.dua__frame::after { bottom: 10px; inset-inline-end: 10px; border-inline-start: 0; border-top: 0; border-end-end-radius: 16px; }
.dua__ar { direction: rtl; text-align: center; font-family: var(--font-dhikr); font-size: calc(var(--dua-fs, 1) * 26px); line-height: 2.05; color: var(--ink); white-space: pre-line; }
.dua__ar.quran { font-family: var(--font-quran); line-height: 2.3; }
.dua__ar .hl { color: var(--gold-2); text-shadow: 0 0 18px var(--glow); }
.dua__ar .dim { opacity: .55; }
.dua__ar .vn { font-size: .7em; color: var(--gold); margin: 0 .2em; }
.dua__ar .inst { display: inline-block; font-family: var(--font-ui); font-size: .55em; color: var(--muted); line-height: 1.6; }
.dua__orn { display: block; width: 120px; height: 18px; margin: 14px auto; color: var(--gold); opacity: .7; }
.dua__translit { font-style: italic; color: var(--ink-2); font-size: calc(var(--dua-fs, 1) * 14px); line-height: 1.7; text-align: center; direction: ltr; }
.dua__en { color: var(--ink-2); font-size: calc(var(--dua-fs, 1) * 15px); line-height: 1.75; text-align: center; direction: ltr; white-space: pre-line; margin-top: 8px; }
.dua__note { margin-top: 14px; padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); font-size: 13.5px; line-height: 1.8; color: var(--ink-2); }
.dua__src { margin-top: 14px; font-size: 12.5px; color: var(--muted); line-height: 1.7; }
.dua__src summary { cursor: pointer; color: var(--ink-2); }
.dua__src p { margin: 6px 0; direction: ltr; text-align: left; }
.dua__actions { display: flex; justify-content: center; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.dua__actions .ctl.is-on { color: var(--gold); border-color: var(--gold); }
.rep { margin: 18px auto 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.rep__btn { width: 92px; height: 92px; border-radius: 50%; position: relative; display: grid; place-items: center; }
.rep__btn svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.rep__btn circle { fill: none; stroke-width: 5; }
.rep__btn .bg { stroke: var(--surface-2); }
.rep__btn .fg { stroke: var(--gold); stroke-linecap: round; transition: stroke-dashoffset .35s var(--ease-out); filter: drop-shadow(0 0 5px var(--glow)); }
.rep__n { font-family: var(--font-display-en); font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; }
.rep.done .rep__n { color: var(--gold-2); }
.rep__k { font-size: 12px; color: var(--muted); }
.reader__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 16px calc(var(--safe-b) + 12px); }
.reader__dots { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Reduced motion --------------------------------------------------------- */
body.reduce-motion *, body.reduce-motion *::before, body.reduce-motion *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }

@media (min-width: 720px) {
  .tiles { grid-template-columns: repeat(4, 1fr); }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .more-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-height: 640px) {
  .counter__num { font-size: 40px; }
  .controls { margin-top: 8px; }
  .today-strip { margin-top: 6px; }
}

/* Close button for sheets and the menu ------------------------------------ */
.sheet__x { position: absolute; top: 12px; right: 14px; z-index: 2; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  color: var(--ink-2); background: var(--bg-2); border: 1px solid var(--line); box-shadow: 0 4px 14px -6px rgba(0,0,0,.5); }
.sheet__x svg { width: 20px; height: 20px; }
.sheet__x:active { transform: scale(.92); }
.sheet__body h2 { padding-inline: 44px; }

/* Menu drawer (slides in from the right) ----------------------------------- */
.drawer { position: fixed; inset: 0; z-index: 45; visibility: hidden; transition: visibility 0s .4s; }
.drawer.is-open { visibility: visible; transition: none; }
.drawer__scrim { position: absolute; inset: 0; background: rgba(0,0,0,.45); opacity: 0; transition: opacity .35s; }
.drawer.is-open .drawer__scrim { opacity: 1; }
.drawer__panel { position: absolute; top: 0; bottom: 0; right: 0; width: min(320px, 84vw); display: flex; flex-direction: column; gap: 6px;
  padding: calc(var(--safe-t) + 14px) 14px calc(var(--safe-b) + 16px); overflow-y: auto;
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1)); border-left: 1px solid var(--line); box-shadow: -20px 0 60px -20px rgba(0,0,0,.6);
  transform: translateX(104%); transition: transform .4s var(--ease-out); }
.drawer.is-open .drawer__panel { transform: none; }
.drawer__head { position: relative; display: flex; justify-content: center; padding: 4px 0 14px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.drawer__x { top: 6px; right: 0; }
.drawer__list { display: flex; flex-direction: column; gap: 4px; }
.drawer__list--extra { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.drawer__item { display: flex; align-items: center; gap: 14px; padding: 13px 14px; border-radius: 16px; color: var(--ink-2); font-size: 15.5px; text-align: start; }
.drawer__item svg { width: 22px; height: 22px; flex: none; color: var(--gold); opacity: .85; }
.drawer__item.is-on { background: var(--surface-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.drawer__item:active { background: var(--surface); }

/* Custom count wheel ------------------------------------------------------ */
.picker { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px; background: rgba(0,0,0,.5);
  opacity: 0; transition: opacity .25s; }
.picker.is-open { opacity: 1; }
.picker__card { width: min(320px, 100%); padding: 18px 16px 16px; border-radius: 26px; background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--line); box-shadow: 0 30px 80px -20px rgba(0,0,0,.7); transform: scale(.94); transition: transform .3s var(--ease-out); }
.picker.is-open .picker__card { transform: none; }
.picker__card h3 { margin: 0 0 12px; text-align: center; font-size: 16px; font-weight: 600; }
.wheel { position: relative; height: 220px; border-radius: 18px; background: var(--surface); overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent); mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent); }
.wheel__band { position: absolute; inset-inline: 12px; top: 88px; height: 44px; border-radius: 12px; border: 1px solid var(--gold); background: var(--surface-2); pointer-events: none; }
.wheel__list { position: relative; height: 100%; overflow-y: auto; scroll-snap-type: y mandatory; padding: 88px 0; scrollbar-width: none; outline: none; }
.wheel__list::-webkit-scrollbar { display: none; }
.wheel__i { height: 44px; display: grid; place-items: center; scroll-snap-align: center; font-family: var(--font-display-en); font-size: 26px; font-weight: 600;
  font-variant-numeric: tabular-nums; color: var(--ink-2); cursor: pointer; transition: color .15s; }
.wheel__i.is-on { color: var(--gold-2); }
.wheel__input { position: absolute; inset-inline: 12px; top: 88px; height: 44px; width: calc(100% - 24px); border-radius: 12px; border: 1px solid var(--gold);
  background: var(--bg-1); text-align: center; font-family: var(--font-display-en); font-size: 26px; font-weight: 600; color: var(--gold-2); outline: none; z-index: 2; }
.wheel__input[hidden] { display: none; }

/* Wallet ------------------------------------------------------------------ */
.wallet__num { font-family: var(--font-display-en); font-size: 44px; font-weight: 600; line-height: 1.1; color: var(--gold); font-variant-numeric: tabular-nums; }
.wallet-list { margin-top: 8px; }
.wallet-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 2px; border-top: 1px solid var(--line); }
.wallet-row__l { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wallet-row__l .ar { font-family: var(--font-dhikr); font-size: 18px; }
.wallet-row__v { flex: none; color: var(--muted); font-size: 13px; }
.wallet-row__v b { color: var(--ink); font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.best-day__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 6px; }
.best-day__wd { font-size: 18px; font-weight: 600; color: var(--ink); }
.best-day__date { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.best-day__n { font-family: var(--font-display-en); font-size: 30px; font-weight: 600; color: var(--gold); }

/* Floating "back to tasbih" button on every page except the counter */
.fab-count { position: fixed; z-index: 30; bottom: calc(var(--safe-b) + 18px); left: 50%; transform: translate(-50%, 0); display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px 9px 14px; border-radius: 999px; font-size: 13.5px; color: var(--gold-2);
  background: color-mix(in srgb, var(--bg-1) 55%, transparent); border: 1px solid var(--line);
  backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3);
  box-shadow: 0 10px 30px -12px rgba(0,0,0,.55); transition: opacity .35s, transform .35s var(--ease-out); }
.fab-count svg { width: 22px; height: 22px; color: var(--gold); }
.fab-count:active { transform: translate(-50%, 0) scale(.95); }
body[data-view="count"] .fab-count, body:not([data-view]) .fab-count, body.focus .fab-count { opacity: 0; pointer-events: none; transform: translate(-50%, 16px); }
.view:not(.view--count) { padding-bottom: calc(var(--safe-b) + 84px); }
.btn-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn-pair .btn { padding: 11px 10px; font-size: 13.5px; }
.drawer__list--extra .btn-pair { margin-top: 8px; }
.setup-warn { color: var(--gold) !important; line-height: 1.7; padding: 0 8px; }

/* Wallet filters: five equal buttons, the last opens the calendar */
.wallet__head { text-align: center; padding: 4px 0 2px; }
.wallet__quick { display: grid; grid-template-columns: repeat(4, 1fr) 46px; gap: 6px; margin: 14px 0 4px; }
.wq { height: 40px; border-radius: 13px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: 13px;
  display: grid; place-items: center; padding: 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: background .25s, color .25s, border-color .25s; }
.wq.is-on { background: var(--gold); color: #1d1606; border-color: transparent; font-weight: 600; }
.wq--cal svg { width: 20px; height: 20px; }
.wq--cal.is-on { background: var(--surface-2); color: var(--gold); border-color: var(--gold); }
.wcal-wrap { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .45s var(--ease-out), opacity .35s; }
.wcal-wrap.is-open { grid-template-rows: 1fr; opacity: 1; }
.wcal-inner { overflow: hidden; min-height: 0; }
.wcal-wrap.is-open .wcal-inner { padding-top: 10px; }
.wcal__modes { margin-bottom: 10px; }
.wcal { gap: 4px; }
.wcal__d { aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; font-size: 13px; color: var(--ink-2); position: relative; border: 1px solid transparent; transition: background .2s; }
.wcal__d.has::after { content: ""; position: absolute; bottom: 12%; width: 4px; height: 4px; border-radius: 50%; background: var(--gold); }
.wcal__d.today { border-color: var(--gold-2); color: var(--ink); }
.wcal__d.in { background: color-mix(in srgb, var(--gold) 20%, transparent); }
.wcal__d.sel { background: var(--gold); color: #1d1606; font-weight: 600; }
.wcal__d.sel::after { background: #1d1606; }
.wcal__d.future { opacity: .3; }
.cal-nav button:disabled { opacity: .3; }
.wcal__hint { text-align: center; margin: 8px 0 4px; }
