/* ============================================
   DHIKR & TASBIH: /zikr and /zikr/{slug}
   A deep green hero holds the tasbih (a bead ring around a big tactile bead), the library below is a grid of
   cards to choose from, and the dhikr page keeps the full card with its own counter. Cards reuse the design's
   .dua-* blocks; only what the tasbih adds is defined here. Only transform and opacity animate.
   ============================================ */

.zk-flip { display: inline-block; }
[dir="rtl"] .zk-flip { transform: scaleX(-1); }

/* ---- Hero ---- */
.zk-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(1.25rem, 1rem + 1.4vw, 2.25rem) 0 clamp(1.5rem, 1rem + 2vw, 2.75rem);
  color: #fff;
  background:
    radial-gradient(900px 420px at 80% 10%, rgba(230, 184, 92, .2), transparent 60%),
    radial-gradient(700px 360px at 0% 100%, rgba(46, 184, 114, .22), transparent 60%),
    linear-gradient(160deg, #062419 0%, #0b3324 45%, #10503a 100%);
}
.zk-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: var(--ip-pattern-light);
  background-size: 120px 120px;
  opacity: .85;
}
.zk-crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  font-size: .85rem;
  color: rgba(255, 255, 255, .72);
}
.zk-crumbs li + li::before { content: "/"; margin-inline-end: .35rem; opacity: .5; }
.zk-crumbs a { color: rgba(255, 255, 255, .88); text-decoration: none; }
.zk-crumbs a:hover { color: #f3d991; text-decoration: underline; }
.zk-crumbs--light ol { color: var(--ip-muted); }
.zk-crumbs--light a { color: var(--ip-ink-2); }
.zk-crumbs--light a:hover { color: var(--ip-primary); }

.zk-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  align-items: center;
}
@media (min-width: 992px) {
  .zk-hero-grid { grid-template-columns: minmax(0, .9fr) minmax(420px, 1.1fr); gap: 3rem; }
}
.zk-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .3rem .8rem;
  border-radius: 999px;
  background: rgba(230, 184, 92, .16);
  border: 1px solid rgba(243, 217, 145, .35);
  color: #f3d991;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
html[lang="ar"] .zk-eyebrow, html[lang="ur"] .zk-eyebrow { letter-spacing: 0; font-size: .9rem; }
.zk-title {
  margin: .8rem 0 .6rem;
  font-family: var(--ip-font-display);
  font-size: clamp(2rem, 1.5rem + 2.4vw, 3.2rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.02em;
  color: #fff;
}
html[lang="ar"] .zk-title { font-family: var(--ip-font-arabic); line-height: 1.4; letter-spacing: 0; }
html[lang="ur"] .zk-title { font-family: var(--ip-font-urdu); line-height: 1.9; letter-spacing: 0; }
.zk-lead { max-width: 36rem; margin: 0 0 1.25rem; color: rgba(255, 255, 255, .82); font-size: 1.02rem; line-height: 1.65; }
.zk-stats {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}
.zk-stats li {
  display: flex;
  align-items: baseline;
  gap: .45rem;
  padding: .55rem .9rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .07);
}
.zk-stats strong { font-family: var(--ip-font-display); font-size: 1.35rem; font-weight: 800; font-variant-numeric: tabular-nums; color: #f3d991; }
.zk-stats span { font-size: .8rem; color: rgba(255, 255, 255, .75); }
.zk-reset-all {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem .2rem;
  border: 0;
  background: none;
  color: rgba(255, 255, 255, .7);
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
}
.zk-reset-all:hover { color: #fff; text-decoration: underline; }

/* ---- The studio ---- */
.zk-studio {
  position: relative;
  padding: 1.1rem 1.2rem 1.2rem;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: linear-gradient(160deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .04));
  box-shadow: 0 30px 60px -34px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .12);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  text-align: center;
}
.zk-studio.is-switching .zk-studio-title,
.zk-studio.is-switching .zk-studio-arabic { animation: zk-in .35s var(--ip-ease) both; }
@keyframes zk-in { from { opacity: 0; transform: translateY(6px); } }
.zk-studio-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.zk-studio-label {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #f3d991;
}
html[lang="ar"] .zk-studio-label, html[lang="ur"] .zk-studio-label { letter-spacing: 0; font-size: .88rem; }
.zk-live-dot { width: 8px; height: 8px; border-radius: 50%; background: #2eb872; box-shadow: 0 0 0 4px rgba(46, 184, 114, .25); }
.zk-studio-nav { display: flex; gap: .35rem; }
.zk-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .08);
  color: #fff;
  cursor: pointer;
  transition: background-color .2s ease;
}
.zk-icon:hover { background: rgba(255, 255, 255, .18); }
.zk-icon:focus-visible { outline: 2px solid #f3d991; outline-offset: 2px; }
.zk-studio-title { margin: .4rem 0 .2rem; font-size: 1.15rem; font-weight: 700; color: #fff; }
.zk-studio-arabic {
  margin: 0 auto .55rem;
  max-width: 34rem;
  font-family: var(--ip-font-quran);
  font-size: clamp(1.45rem, 1.2rem + 1vw, 2rem);
  line-height: 2;
  color: #fff;
}
.zk-studio-toggles { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem; margin-bottom: .4rem; }
.zk-toggle {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  min-height: 32px;
  padding: .2rem .7rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .2);
  background: transparent;
  color: rgba(255, 255, 255, .85);
  font-size: .8rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.zk-toggle:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.zk-toggle[aria-pressed="true"] { background: #f3d991; border-color: #f3d991; color: #2b1d02; }
.zk-toggle[hidden] { display: none; }
.zk-studio-latin, .zk-studio-meaning { max-width: 34rem; margin: .2rem auto .4rem; font-size: .92rem; line-height: 1.55; color: rgba(255, 255, 255, .85); }
.zk-studio-latin { font-style: italic; }
.zk-studio-latin[hidden], .zk-studio-meaning[hidden] { display: none; }

/* The tasbih itself */
.zk-tasbih {
  position: relative;
  display: grid;
  justify-items: center;
  gap: .55rem;
  margin-top: .5rem;
}
.zk-beads {
  position: relative;
  grid-area: 1 / 1;
  width: min(260px, 70vw);
  aspect-ratio: 1;
  pointer-events: none;
}
.zk-beads svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.zk-ring-svg { transform: rotate(-90deg) scale(.66); }
.zk-ring-svg .zikr-ring-track { fill: none; stroke: rgba(255, 255, 255, .1); stroke-width: 3; }
.zk-ring-svg .zikr-ring-fill {
  fill: none;
  stroke: #f3d991;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 326.73;
  stroke-dashoffset: 326.73;
  transition: stroke-dashoffset .25s ease;
}
.zk-b {
  fill: rgba(255, 255, 255, .14);
  stroke: rgba(255, 255, 255, .25);
  stroke-width: 1;
  transform-box: fill-box;
  transform-origin: center;
  transition: fill .2s ease, transform .3s var(--ip-spring);
}
.zk-b.is-lit { fill: #e6b85c; stroke: #f8e3b0; }
.zk-b.is-last { transform: scale(1.35); fill: #f8e3b0; }
.zk-bead {
  position: relative;
  grid-area: 1 / 1;
  align-self: center;
  display: grid;
  place-items: center;
  align-content: center;
  width: min(156px, 42vw);
  aspect-ratio: 1;
  overflow: hidden;
  border: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #3fd08a 0%, #1f7a63 52%, #0d3b29 100%);
  color: #fff;
  box-shadow: 0 22px 40px -16px rgba(0, 0, 0, .7), inset 0 2px 0 rgba(255, 255, 255, .3), inset 0 -10px 24px rgba(0, 0, 0, .3);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  transition: transform .09s ease, box-shadow .2s ease;
}
.zk-bead:hover { box-shadow: 0 26px 46px -16px rgba(0, 0, 0, .75), 0 0 0 8px rgba(46, 184, 114, .18), inset 0 2px 0 rgba(255, 255, 255, .3), inset 0 -10px 24px rgba(0, 0, 0, .3); }
.zk-bead:active { transform: scale(.94); }
.zk-bead:focus-visible { outline: 3px solid #f3d991; outline-offset: 6px; }
.zk-bead.is-pulsing { animation: zk-press .22s ease; }
@keyframes zk-press { 40% { transform: scale(.92); } }
.zk-bead .zikr-count { font-family: var(--ip-font-display); font-size: 2.8rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.zk-bead .zikr-target { font-size: .8rem; font-weight: 600; opacity: .85; }
.zk-ripple {
  position: absolute;
  left: var(--rx, 50%);
  top: var(--ry, 50%);
  width: 20px;
  height: 20px;
  margin: -10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .45);
  opacity: 0;
  pointer-events: none;
}
.zk-ripple.is-on { animation: zk-ripple .5s ease-out; }
@keyframes zk-ripple { from { opacity: .8; transform: scale(1); } to { opacity: 0; transform: scale(12); } }
.zk-tasbih.is-complete .zk-bead { background: radial-gradient(circle at 32% 28%, #f8e3b0 0%, #e6b85c 50%, #a77a1f 100%); color: #2b1d02; }
.zk-tasbih.is-complete .zk-bead[aria-disabled="true"] { cursor: default; }
.zk-burst { position: absolute; left: 50%; top: min(130px, 35vw); width: 0; height: 0; pointer-events: none; }
.zk-burst i {
  position: absolute;
  width: 8px;
  height: 8px;
  margin: -4px;
  border-radius: 2px;
  background: #f3d991;
  opacity: 0;
}
.zk-burst i:nth-child(3n) { background: #2eb872; border-radius: 50%; }
.zk-burst i:nth-child(3n + 1) { background: #fff; }
.zk-burst.is-on i { animation: zk-spark .9s var(--ip-ease) forwards; }
@keyframes zk-spark {
  0% { opacity: 1; transform: translate(0, 0) scale(.6) rotate(0); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1.1) rotate(160deg); }
}
.zk-tasbih .zk-status { min-height: 1.4em; font-weight: 700; font-size: .95rem; color: #fff; margin: 0; }
.zk-tasbih.is-complete .zk-status { color: #f3d991; }
.zk-tasbih .zk-progress { width: min(260px, 80%); height: 6px; margin: 0; background: rgba(255, 255, 255, .12); }
.zk-studio .zk-studio-title, .zk-studio .zk-studio-arabic, .zk-studio .zk-studio-latin, .zk-studio .zk-studio-meaning { text-align: center; }
.zk-controls { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem; margin-top: .2rem; }
.zk-ctrl {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  min-height: 38px;
  padding: .3rem .8rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .2s ease;
}
.zk-ctrl:hover { background: rgba(255, 255, 255, .16); }
.zk-ctrl:disabled { opacity: .45; cursor: not-allowed; }
.zk-ctrl:focus-visible { outline: 2px solid #f3d991; outline-offset: 2px; }
.zk-ctrl[aria-pressed="false"], .zk-ctrl.is-off { opacity: .6; }
.zk-ctrl[hidden] { display: none; }
.zk-ctrl--light { border-color: var(--ip-line); background: var(--ip-surface); color: var(--ip-ink-2); }
.zk-ctrl--light:hover { background: var(--ip-surface-2); }
.zk-hint { margin: .2rem 0 0; font-size: .75rem; color: rgba(255, 255, 255, .6); }
.zk-hint kbd { padding: 0 .35rem; border-radius: 4px; background: rgba(255, 255, 255, .14); color: #fff; font-size: .7rem; }
@media (pointer: coarse) { .zk-hint { display: none; } }

/* ---- Library ---- */
.zk-library { padding: 2rem 0 2.5rem; }
.zk-list-head { margin-bottom: .9rem; }
.zk-list-title { margin: 0; font-family: var(--ip-font-display); font-size: var(--ip-text-2xl); font-weight: 800; color: var(--ip-ink); }
html[lang="ar"] .zk-list-title { font-family: var(--ip-font-arabic); }
html[lang="ur"] .zk-list-title { font-family: var(--ip-font-urdu); line-height: 1.9; }
.zk-list-lead { margin: .25rem 0 0; color: var(--ip-muted); }
.zk-bar {
  position: sticky;
  top: calc(var(--ip-header-h) - 6px);
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  gap: .6rem 1rem;
  align-items: center;
  padding: .6rem;
  margin-bottom: .9rem;
  border: 1px solid var(--ip-line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--ip-surface) 92%, transparent);
  box-shadow: var(--ip-shadow-sm);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.zk-search { position: relative; display: flex; align-items: center; margin: 0; }
.zk-search .bi { position: absolute; inset-inline-start: .85rem; color: var(--ip-primary); pointer-events: none; }
.zk-search input {
  width: 100%;
  min-height: 42px;
  padding: .45rem .9rem;
  padding-inline-start: 2.4rem;
  border: 1px solid var(--ip-line);
  border-radius: 12px;
  background: var(--ip-bg-elevated);
  color: var(--ip-ink);
}
.zk-search input:focus { outline: none; border-color: var(--ip-primary); box-shadow: 0 0 0 4px var(--ip-primary-soft); }
.zk-chips {
  display: flex;
  gap: .35rem;
  overflow-x: auto;
  padding: 2px;
  scrollbar-width: none;
}
.zk-chips::-webkit-scrollbar { display: none; }
.zk-chip {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: .4rem;
  min-height: 40px;
  padding: .3rem .5rem;
  padding-inline-start: .75rem;
  border: 1px solid var(--ip-line);
  border-radius: 999px;
  background: var(--ip-surface);
  color: var(--ip-ink);
  font-size: .86rem;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
}
.zk-chip .bi { color: var(--cat, var(--ip-primary)); }
.zk-chip small { padding: 1px 7px; border-radius: 999px; background: var(--ip-surface-2); color: var(--ip-muted); font-size: .72rem; font-weight: 700; }
.zk-chip:hover { border-color: var(--ip-primary); color: var(--ip-primary); }
.zk-chip.active { background: var(--ip-primary); border-color: var(--ip-primary); color: var(--ip-primary-ink); }
.zk-chip.active .bi { color: inherit; }
.zk-chip.active small { background: rgba(0, 0, 0, .2); color: inherit; }
.zk-chip:focus-visible { outline: 2px solid var(--ip-focus); outline-offset: 2px; }
.zk-results { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .45rem; margin-bottom: .8rem; }
.zk-results-title { font-weight: 800; color: var(--ip-ink); }
.zk-results-count { color: var(--ip-muted); font-size: .88rem; }
.zk-dot { color: var(--ip-line-strong); }
.zk-cat-text { color: var(--ip-muted); font-size: .9rem; margin: -.3rem 0 .8rem; }

.dua-list.zk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 12px; }
.zk-grid .zikr-card {
  display: flex;
  flex-direction: column;
  padding: 14px 16px 12px;
  border-start-start-radius: 0; border-start-end-radius: 18px; border-end-end-radius: 18px; border-end-start-radius: 0;
  border-inline-start-width: 4px;
  cursor: pointer;
  transition: transform .25s var(--ip-ease), box-shadow .25s var(--ip-ease);
}
[dir="rtl"] .zk-grid .zikr-card { border-radius: 18px 0 0 18px; }
.zk-grid .zikr-card:hover { transform: translateY(-3px); box-shadow: var(--ip-shadow-md); }
.zk-grid .zikr-card :is(.dua-latin-block, .dua-trans-block, .dua-note, .zikr-counter, .dua-card-footer, .dua-repeat) { display: none; }
.zk-grid .zikr-card .dua-card-top { margin-bottom: 6px; }
.zk-grid .zikr-card .dua-card-title { font-size: 1rem; margin-bottom: 4px; }
.zk-grid .zikr-card .dua-when { margin-bottom: 8px; }
.zk-grid .zikr-card .dua-arabic-block { padding: 8px 12px; margin-bottom: 10px; }
.zk-grid .zikr-card .dua-arabic { font-size: 1.2rem; line-height: 1.9; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.zk-grid .zikr-card.zk-hide, .zk-grid .zikr-card.zk-page-hide { display: none; }
.zk-grid .zikr-card.is-current { box-shadow: 0 0 0 2px var(--ip-primary), var(--ip-shadow-md); }
.zk-mini { display: none; }
.zk-grid .zk-mini {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: .6rem;
  margin-top: auto;
}
.zk-mini-bar { height: 6px; border-radius: 99px; background: var(--ip-surface-3); overflow: hidden; }
.zk-mini-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--dua-color, var(--ip-primary)), #e6b85c); transform: scaleX(0); transform-origin: left center; transition: transform .3s var(--ip-ease); }
[dir="rtl"] .zk-mini-bar span { transform-origin: right center; }
.zk-mini-count { font-size: .8rem; color: var(--ip-muted); font-variant-numeric: tabular-nums; }
.zk-mini-count b { color: var(--ip-ink); }
.zk-mini-go {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .2rem .6rem;
  border-radius: 999px;
  background: var(--ip-primary-soft);
  color: var(--ip-primary);
  font-size: .76rem;
  font-weight: 700;
}
.zikr-card.is-complete .zk-mini-go { background: var(--ip-tile-gold-bg); color: var(--ip-tile-gold-fg); }
.zk-more-wrap { display: flex; justify-content: center; margin-top: 1rem; }
.zk-more {
  min-height: 42px;
  padding: .45rem 1.2rem;
  border-radius: 999px;
  border: 1px solid var(--ip-line);
  background: var(--ip-surface);
  color: var(--ip-primary);
  font-weight: 700;
  cursor: pointer;
}
.zk-more[hidden] { display: none; }
.zk-empty { display: grid; justify-items: center; gap: .4rem; padding: 2.5rem 1rem; margin-top: .5rem; border: 1px dashed var(--ip-line-strong); border-radius: 20px; background: var(--ip-surface); text-align: center; color: var(--ip-muted); }
.zk-empty[hidden] { display: none; }
.zk-empty h3 { margin: .4rem 0 0; font-size: 1.15rem; font-weight: 800; color: var(--ip-ink); }
.zk-empty p { margin: 0 0 .5rem; }
.zk-empty-icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; background: var(--ip-primary-soft); color: var(--ip-primary); font-size: 1.6rem; }
.zk-next { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 1.75rem; }
.zk-next-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--ip-line);
  border-radius: 16px;
  background: var(--ip-surface);
  color: var(--ip-ink);
  text-decoration: none;
  transition: transform .2s var(--ip-ease), box-shadow .2s var(--ip-ease);
}
.zk-next-link > .bi { display: grid; place-items: center; flex: 0 0 auto; width: 42px; height: 42px; border-radius: 12px; background: var(--ip-primary-soft); color: var(--ip-primary); font-size: 1.15rem; }
.zk-next-link span { display: flex; flex-direction: column; min-width: 0; }
.zk-next-link small { color: var(--ip-muted); font-size: .8rem; }
.zk-next-link:hover { transform: translateY(-2px); box-shadow: var(--ip-shadow-md); color: var(--ip-ink); }

/* ---- Card additions (library and the dhikr page) ---- */
.zikr-card { scroll-margin-top: 90px; }
.zikr-card.is-complete { border-left-color: var(--ip-area); }
.zikr-title-link { color: inherit; text-decoration: none; }
.zikr-title-link:hover { color: var(--dua-color, var(--ip-area-strong)); }
.zikr-detail-title { font-size: 1.6rem; }
.zikr-virtue-label { font-weight: 700; }
.zikr-time-badge,
.zikr-featured-badge,
.zikr-done-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 50rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.zikr-time-badge { background: var(--ip-surface-2); color: var(--ip-ink-2); }
.zikr-featured-badge { background: #fef3c7; color: #b45309; }
.zikr-done-badge { background: #d1fae5; color: #047857; }

/* The card's own counter, used on the dhikr page */
.zikr-counter {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 16px;
  padding: 16px 18px;
  border: 1px solid var(--ip-line);
  border-radius: 16px;
  background: var(--ip-surface-2);
}
.zikr-ring { position: relative; width: 136px; height: 136px; flex-shrink: 0; }
.zikr-ring-svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); pointer-events: none; }
.zikr-ring .zikr-ring-track, .zikr-ring .zikr-ring-fill { fill: none; stroke-width: 8; }
.zikr-ring .zikr-ring-track { stroke: var(--ip-line); }
.zikr-ring .zikr-ring-fill {
  stroke: var(--dua-color, var(--ip-area-strong));
  stroke-linecap: round;
  stroke-dasharray: 326.73;
  stroke-dashoffset: 326.73;
  transition: stroke-dashoffset .25s ease;
}
.zikr-tap {
  position: absolute;
  inset: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: none;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #3fd08a 0%, #1f7a63 55%, #0d3b29 100%);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 10px 22px -8px rgba(13, 59, 41, .7), inset 0 2px 0 rgba(255, 255, 255, .3);
  transition: transform .08s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}
.zikr-tap:active { transform: scale(.95); }
.zikr-tap:focus-visible { outline: 3px solid #f59e0b; outline-offset: 3px; }
.zikr-tap.is-pulsing { animation: zk-press .22s ease; }
.zikr-tap[aria-disabled="true"] { cursor: default; }
.zikr-count { font-size: 2rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.zikr-target { font-size: 12px; font-weight: 600; opacity: .85; }
.zikr-counter-side { flex: 1; min-width: 0; }
.zikr-counter-status { margin-bottom: 8px; font-size: 14px; font-weight: 700; color: var(--ip-ink); }
.zikr-progress { height: 8px; margin-bottom: 12px; border-radius: 8px; background: var(--ip-line); overflow: hidden; }
.zikr-progress-fill {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--ip-area-fill), #e6b85c);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .25s ease;
}
[dir="rtl"] .zikr-progress-fill { transform-origin: right center; }
.zikr-counter-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.zikr-counter-actions .dua-action-btn:disabled { opacity: .5; cursor: not-allowed; }
.zikr-counter.is-complete { background: var(--ip-success-soft); border-color: color-mix(in srgb, var(--ip-success) 30%, transparent); }
.zikr-counter.is-complete .zikr-tap { background: radial-gradient(circle at 32% 28%, #f8e3b0 0%, #e6b85c 50%, #a77a1f 100%); color: #2b1d02; }
.zikr-counter.is-complete .zikr-counter-status { color: var(--ip-success); }

/* ---- The dhikr page ---- */
.zk-detail { position: relative; padding: 1.5rem 0 3rem; }
.zk-detail-band {
  position: absolute;
  inset: 0 0 auto;
  height: 220px;
  z-index: -1;
  background: radial-gradient(700px 240px at 80% 0%, rgba(230, 184, 92, .16), transparent 60%), linear-gradient(180deg, var(--ip-primary-soft), transparent);
}
.zk-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; align-items: start; }
@media (min-width: 992px) {
  .zk-detail-grid { grid-template-columns: minmax(0, 1fr) 320px; gap: 1.75rem; }
}
.zk-detail-card .zikr-card { box-shadow: var(--ip-shadow-md); }
.zk-detail-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: 1rem; }
.zk-related {
  position: sticky;
  top: calc(var(--ip-header-h) + 16px);
  padding: 1rem;
  border: 1px solid var(--ip-line);
  border-radius: 20px;
  background: var(--ip-surface);
  box-shadow: var(--ip-shadow-sm);
}
.zk-related-title { margin: 0 0 .6rem; font-size: .95rem; font-weight: 800; color: var(--ip-ink); }
.zk-related ul { display: grid; gap: .25rem; margin: 0; padding: 0; list-style: none; }
.zk-related a { display: flex; align-items: center; gap: .55rem; padding: .55rem .65rem; border-radius: 12px; color: var(--ip-ink); text-decoration: none; }
.zk-related a:hover { background: var(--ip-surface-2); }
.zk-related a .bi { color: var(--cat, var(--ip-primary)); }
.zk-related a span { flex: 1; min-width: 0; font-weight: 600; font-size: .9rem; }
.zk-related a small { padding: 0 .45rem; border-radius: 999px; background: var(--ip-surface-2); color: var(--ip-muted); font-size: .72rem; font-weight: 700; }

/* ---- Dark mode ---- */
body.dark .zikr-time-badge { background: #1e2a30; color: var(--ip-muted); }
body.dark .zikr-featured-badge { background: #1c1306; color: #d97706; }
body.dark .zikr-done-badge { background: var(--ip-surface); color: var(--ip-area-strong); }
body.dark .zikr-counter { background: var(--ip-bg); border-color: #1e2a30; }
body.dark .zikr-counter-status { color: #e5e7eb; }
body.dark .zk-chip.active, body.dark .zk-chip.active small { color: #03140b; }

/* ---- Responsive ---- */
@media (max-width: 991.98px) {
  .zk-bar { grid-template-columns: minmax(0, 1fr); }
  .zk-related { position: static; }
}
@media (max-width: 575.98px) {
  .zk-hero-copy { text-align: start; }
  .zk-title { margin: .5rem 0 .6rem; }
  .zk-lead { display: none; }
  .zk-stats { gap: .4rem; margin-bottom: .5rem; }
  .zk-stats li { padding: .35rem .6rem; }
  .zk-stats strong { font-size: 1.1rem; }
  .zk-stats span { font-size: .74rem; }
  .zk-studio { padding: .9rem .8rem 1rem; border-radius: 22px; margin-inline: -4px; }
  .zk-bead .zikr-count { font-size: 2.4rem; }
  .zk-bar { top: calc(var(--ip-header-h) - 14px); padding: .5rem; }
  .zk-next { grid-template-columns: minmax(0, 1fr); }
  .zk-grid .zikr-card .dua-arabic { -webkit-line-clamp: 1; }
  .zikr-counter { flex-direction: column; align-items: stretch; text-align: center; gap: 14px; }
  .zikr-ring { width: 160px; height: 160px; margin: 0 auto; }
  .zikr-count { font-size: 2.4rem; }
  .zikr-counter-actions { justify-content: center; }
  .zikr-detail-title { font-size: 1.3rem; }
}

@media (prefers-reduced-motion: reduce) {
  .zikr-tap, .zikr-tap.is-pulsing, .zk-bead, .zk-bead.is-pulsing, .zk-b, .zikr-ring-fill, .zikr-progress-fill, .zk-mini-bar span,
  .zk-grid .zikr-card, .zk-next-link { transition: none; animation: none; }
  .zk-studio.is-switching .zk-studio-title, .zk-studio.is-switching .zk-studio-arabic { animation: none; }
}
/* The legacy dark theme colours every paragraph (dark.css); the tasbih's own text keeps its colours. */
body.dark .zk-studio-arabic { color: #fff; }
body.dark .zk-studio-latin,
body.dark .zk-studio-meaning,
body.dark .zk-lead { color: rgba(255, 255, 255, .85); }
body.dark .zk-hint { color: rgba(255, 255, 255, .6); }
body.dark .zk-list-lead,
body.dark .zk-cat-text,
body.dark .zk-empty p { color: var(--ip-muted); }
