/* Narration player + word highlight (moved from blog/blog.css for the new article design). */
/* "Listen to this article" — word highlighted while spoken, gold to match
   the site's amber/gold accent already used across spiritual-theme pages. */
.tts-w { transition: background-color 0.15s ease, color 0.15s ease; border-radius: 3px; }
.tts-active {
  background-color: #f0d78c;
  color: #4a3510;
  box-shadow: 0 0 0 2px #f0d78c;
}


/* ── "Listen to this article" card ────────────────────────────────────────
   position:fixed — floats above the page, takes no layout space and stays
   put while scrolling. A real card (title + one-line explanation + big play
   button) so it's obvious what it does; the "–" button folds it down to just
   the round play button when it's in the way. */
.blog-audio-card {
  position: fixed;
  right: 20px;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  z-index: 1100;
  width: 340px;
  max-width: calc(100vw - 28px);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px 16px 16px;
  background: #fff;
  border: 1px solid #d5e9dd;
  border-radius: 22px;
  box-shadow: 0 12px 32px rgba(45, 122, 79, 0.16);
}
.blog-audio-card[hidden] { display: none; }
.blog-audio-card-play {
  position: relative;
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.blog-audio-card-play:active { transform: scale(0.93); }
.blog-audio-card-play i { position: relative; z-index: 1; font-size: 28px; line-height: 1; }
.blog-audio-card-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  pointer-events: none;
}
.blog-audio-card-ring circle { fill: none; stroke-width: 3; }
.blog-audio-card-ring circle:first-child { stroke: rgba(255, 255, 255, 0.32); }
.blog-audio-card-ring circle:last-child {
  stroke: #fff;
  stroke-linecap: round;
  stroke-dasharray: 157; /* 2 * PI * r(25), matches RING_CIRCUMFERENCE in blog-audio.js */
  stroke-dashoffset: 157;
  transition: stroke-dashoffset 0.15s linear;
}
.blog-audio-card-text { min-width: 0; flex: 1; }
.blog-audio-card-title {
  margin: 0 0 3px;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}
.blog-audio-card-hint {
  margin: 0 0 8px;
  font-size: 12.5px;
  line-height: 1.5;
  color: #64748b;
}
.blog-audio-card-rate {
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  color: #334155;
  background: #f1f5f9;
  border: none;
  cursor: pointer;
}
.blog-audio-card-rate:active { transform: scale(0.94); }
.blog-audio-card-min,
.blog-audio-card-expand {
  border: none;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  line-height: 1;
}
.blog-audio-card-min {
  position: absolute;
  top: 8px;
  right: 10px;
  padding: 4px;
  font-size: 14px;
}
.blog-audio-card-min:hover { color: #475569; }
.blog-audio-card-expand { display: none; }

/* Folded: only the round play button remains, with a tiny expand handle. */
.blog-audio-card.is-min {
  width: auto;
  padding: 8px;
  border-radius: 999px;
}
.blog-audio-card.is-min .blog-audio-card-text,
.blog-audio-card.is-min .blog-audio-card-min { display: none; }
.blog-audio-card.is-min .blog-audio-card-expand {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  position: absolute;
  top: -8px;
  left: -8px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #d5e9dd;
  color: #475569;
  font-size: 12px;
}

@media (max-width: 640px) {
  .blog-audio-card { right: 12px; left: 12px; width: auto; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  .blog-audio-card.is-min { left: auto; }
}
