/* 100.islamictimes.net — "100 Tasbih". Single brand-gold theme. Tracking: green=done, red=not done. */
@font-face { font-family: 'Amiri'; src: url('/fonts/Amiri-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/Inter-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/Inter-Medium.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/Inter-SemiBold.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/Inter-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }
:root {
  --bg: #0a0a00;
  --gold: #c9a84c;
  --gold-bright: #f0c040;
  --gold-muted: #7a6a30;
  --gold-dim: #3a3020;
  --label: #9a8845;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-ar: 'Amiri', 'Traditional Arabic', serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; margin: 0; padding: 0; min-height: 100%; background: var(--bg); color: var(--gold); font-family: var(--font-body); overscroll-behavior: none; }
body { min-height: 100dvh; display: flex; flex-direction: column; justify-content: safe center; gap: clamp(14px, 3vh, 26px); padding: calc(env(safe-area-inset-top) + 8px) 16px calc(env(safe-area-inset-bottom) + 12px); -webkit-user-select: none; user-select: none; touch-action: manipulation; }

.topbar { flex-shrink: 0; padding: 0; display: flex; justify-content: center; }
.logo { display: flex; flex-direction: column; align-items: center; line-height: 1; }
.logo-top, .logo-bottom { font-family: Georgia, serif; font-weight: bold; font-size: 0.72rem; letter-spacing: 0.24em; color: var(--gold); display: block; }
.logo-line { width: 100%; height: 1px; background: var(--gold-muted); opacity: 0.7; margin: 2px 0; display: block; border: none; }
.brand-ar { font-family: var(--font-ar); font-size: clamp(1.15rem, 5vw, 1.6rem); color: var(--gold-muted); line-height: 1; margin-bottom: 4px; }
.brand { margin: 0; font-family: var(--font-body); font-size: clamp(2rem, 9.5vw, 2.9rem); font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-bright); line-height: 1; }

.wrap { flex: 0 1 auto; width: 100%; max-width: 460px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(8px, 2vh, 16px); }

.seq-label { font-size: clamp(1rem, 4.6vw, 1.3rem); font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); min-height: 22px; text-align: center; }

.tap-zone { position: relative; width: min(80vw, 56vh, 360px); height: min(80vw, 56vh, 360px); border-radius: 50%; background: radial-gradient(circle at center, #161204 0%, #0a0a00 72%); display: flex; align-items: center; justify-content: center; }
#ring { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
#ring-prog { transition: stroke-dashoffset 0.18s ease-out, stroke 0.3s ease; }
#ring.no-anim #ring-prog { transition: none; }
.centre { position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px; pointer-events: none; padding: 0 9%; text-align: center; }
.centre.swap { animation: centreSwap 0.3s ease; }
@keyframes centreSwap { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.dua-ar { font-family: var(--font-ar); direction: rtl; font-size: clamp(1.05rem, 4.8vw, 1.5rem); line-height: 1.55; color: #f0c040; }
.dua-en { font-family: var(--font-body); font-size: clamp(0.82rem, 3.4vw, 0.96rem); line-height: 1.5; color: #c9a84c; text-align: center; text-wrap: balance; max-width: min(90vw, 420px); margin: 0 auto; padding: 0 6px; }
.dua-count { font-family: var(--font-body); font-weight: 600; font-size: clamp(1.3rem, 6vw, 1.8rem); line-height: 1; color: #f0c040; margin-top: 8px; font-variant-numeric: tabular-nums; }
.centre.gate .dua-ar { font-size: clamp(2.4rem, 11vw, 3.4rem); }
body.gated .dua-en { font-size: clamp(0.95rem, 4vw, 1.15rem); color: var(--gold-bright); }
.centre.gate .dua-count { display: none; }

.section-dots { display: flex; gap: 7px; justify-content: center; flex-wrap: wrap; }
.seq-pip { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--gold-dim); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; line-height: 1; color: var(--gold-muted); }
.seq-dot.done .seq-pip { background: var(--gold); border-color: var(--gold); color: #0a0a00; }
.seq-dot.active .seq-pip { border-color: var(--gold-bright); color: var(--gold-bright); box-shadow: 0 0 0 3px rgba(240,192,64,0.14); }

.controls { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.ctl-row { display: flex; gap: 8px; justify-content: center; flex-wrap: nowrap; }
.ctl { font-family: var(--font-body); font-size: 13px; font-weight: 500; letter-spacing: 0.04em; color: #0a0a00; background: var(--gold); border: none; padding: 9px 18px; border-radius: 999px; cursor: pointer; touch-action: manipulation; }
.ctl.ghost { background: transparent; color: var(--label); border: 1px solid var(--gold-dim); }
.ctl:active { transform: scale(0.97); }
body.stats-open .controls, body.duas-open .controls { position: sticky; bottom: 0; z-index: 5; background: var(--bg); padding-top: 12px; padding-bottom: calc(env(safe-area-inset-bottom) + 6px); box-shadow: 0 -12px 18px -8px var(--bg); }

.footer { flex-shrink: 0; width: 100%; max-width: 460px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; padding-top: 0; }

.stats-panel, .duas-panel { width: 100%; display: none; flex-direction: column; gap: 14px; }
body.stats-open .stats-panel { display: flex; }
body.duas-open .duas-panel { display: flex; }
body.stats-open .wrap, body.duas-open .wrap { display: none; }
body.stats-open .footer, body.duas-open .footer { padding-top: 18px; }
.st-block { border: 1px solid var(--gold-dim); border-radius: 14px; padding: 14px; }
.st-head { font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--label); margin-bottom: 3px; display: flex; justify-content: space-between; align-items: baseline; }
.st-pct { color: var(--gold); font-weight: 700; letter-spacing: 0; }
.st-sub { font-size: 12px; color: var(--gold); margin-bottom: 12px; }
.pb-row { display: flex; justify-content: space-between; align-items: baseline; padding: 7px 0; border-top: 1px solid var(--gold-dim); }
.pb-row:first-of-type { border-top: none; }
.pb-name { font-size: 14px; color: var(--gold-bright); }
.pb-stat { display: flex; align-items: baseline; gap: 12px; }
.pb-count { font-size: 13px; color: var(--label); font-variant-numeric: tabular-nums; }
.pb-pct { font-size: 14px; font-weight: 700; color: var(--gold); font-variant-numeric: tabular-nums; min-width: 40px; text-align: right; }


.trk { display: flex; gap: 5px; }
.trk-cell { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.trk-box { width: 100%; max-width: 36px; aspect-ratio: 1; border-radius: 4px; }
.trk-lab { font-size: 10px; color: var(--label); line-height: 1; }
.box-g { background: #34c759; }
.box-r { background: #e5484d; }
.box-n { background: #1a1509; }
.box-a { background: #f5a623; }
.ywrap { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.yblock { display: flex; flex-direction: column; gap: 4px; }
.ylab { font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--label); line-height: 1; }
.ygrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.ycell { width: 100%; aspect-ratio: 1; border-radius: 2px; min-height: 5px; }
.yleg { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--label); margin-top: 12px; flex-wrap: wrap; }
.yleg .lg { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.box-x { background: #241d10; }

.cal { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.cal-wd { font-size: 10px; font-weight: 600; color: var(--label); text-align: center; line-height: 1; padding-bottom: 2px; }
.cal-cell { aspect-ratio: 1; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 0.78rem; font-weight: 600; color: #0a0a00; }
.cal-cell.empty { background: transparent; }
.cal-cell.g { background: #34c759; }
.cal-cell.r { background: #e5484d; }
.cal-cell.n { background: #1a1509; }
.trk-box.man, .cal-cell.man { position: relative; }
.trk-box.man::after, .cal-cell.man::after { content: ''; position: absolute; top: 2px; right: 2px; width: 5px; height: 5px; border-radius: 50%; background: var(--bg); opacity: 0.5; }
.ctl.is-done { background: var(--gold-bright); color: #0a0a00; }
.ctl:disabled { opacity: 0.9; cursor: default; }

.dua-item { display: flex; gap: 12px; border: 1px solid var(--gold-dim); border-radius: 12px; padding: 13px 14px; }
.dua-num { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--gold); color: #0a0a00; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.dua-body { flex: 1; min-width: 0; }
.dua-iar { font-family: var(--font-ar); direction: rtl; text-align: right; font-size: 1.2rem; line-height: 1.85; color: var(--gold-bright); }
.dua-ien { font-size: 0.86rem; line-height: 1.5; color: var(--label); margin-top: 7px; }

.gate-bar { display: none; justify-content: center; width: 100%; }
body.gated .gate-bar { display: flex; }
.gate-btn { font-family: var(--font-body); font-size: 1.02rem; font-weight: 600; letter-spacing: 0.02em; color: #0a0a00; background: var(--gold-bright); border: none; padding: 15px 30px; border-radius: 999px; cursor: pointer; touch-action: manipulation; animation: gatePulse 1.5s ease-in-out infinite; }
.gate-btn:disabled { opacity: 0.45; animation: none; }
.gate-btn:active { transform: scale(0.97); }
@keyframes gatePulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(240,192,64,0.45); } 50% { box-shadow: 0 0 0 12px rgba(240,192,64,0); } }

body.stats-open, body.duas-open { justify-content: flex-start; }

.it-streak { position: fixed; top: calc(env(safe-area-inset-top) + 8px); right: 10px; z-index: 60; display: none; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px; background: rgba(201, 168, 76, 0.10); border: 1px solid var(--gold-dim); color: var(--gold-bright); font-size: 0.78rem; font-weight: 700; font-variant-numeric: tabular-nums; pointer-events: none; }
body.stats-open .it-streak, body.duas-open .it-streak { display: none !important; }
/* stability v1 */
.dua-count { white-space: nowrap; }

/* consistent header v3, audio-verbatim centred title */
.site-header { position: fixed; top: 0; left: 0; right: 0; height: calc(env(safe-area-inset-top, 0px) + 36px); background: var(--bg); border-bottom: 1px solid var(--gold-dim); z-index: 100; display: flex; flex-direction: column; padding-top: env(safe-area-inset-top, 0px); }
.header-inner { width: 100%; max-width: 900px; margin: 0 auto; display: flex; flex-direction: column; flex: 1; }
.header-row-top { display: flex; align-items: center; justify-content: space-between; padding: 0 1.25rem; flex: 1; }
.back-link { display: flex; align-items: center; gap: 0.4rem; color: var(--gold-muted); text-decoration: none; -webkit-text-decoration: none; border: none; outline: none; flex-shrink: 0; padding: 0.25rem 0; -webkit-tap-highlight-color: transparent; transition: color 0.2s; }
.back-link:hover, .back-link:active { color: var(--gold-bright); }
.back-link:visited { color: var(--gold-muted); }
.back-link:focus { outline: none; }
.site-header .logo-top, .site-header .logo-bottom { font-size: 0.58rem; letter-spacing: 0.2em; }
.header-title { font-family: Georgia, serif; font-size: 0.82rem; font-weight: bold; letter-spacing: 0.06em; color: var(--gold-bright); white-space: nowrap; position: absolute; left: 50%; transform: translateX(-50%); pointer-events: none; }
body { padding-top: calc(env(safe-area-inset-top, 0px) + 44px); }
.it-streak { z-index: 120; }
/* streak pill header-aligned v1 */
.it-streak { top: calc(env(safe-area-inset-top, 0px) + 6px); right: 1.25rem; padding: 4px 9px; font-size: 0.72rem; }
