/* ==========================================================================
   TakeAMindBreak.com — Site-Wide Feature Styles
   Features: My Sanctuary Shelf, Mood Filters, Grid Capper, Roulette,
             Ambient Audio Bar, Micro-Break Timer, Calm Journal, Breathing Overlay
   Botanical Sanctuary Palette — Pure CSS3, Zero Frameworks
   ========================================================================== */

/* ─────────────────────────────────────────────────────────────────────────
   A. MINDBREAK ROULETTE — "Instant Reset" Glow CTA in Header
   ───────────────────────────────────────────────────────────────────────── */

.roulette-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.85rem;
  font-family: 'Outfit', sans-serif;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  box-shadow: 0 4px 18px rgba(107, 158, 130, 0.4), 0 0 0 0 rgba(107, 158, 130, 0.35);
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s var(--ease-elastic), box-shadow 0.25s var(--ease-elastic);
  animation: roulettePulseGlow 3.5s ease-in-out infinite;
  flex-shrink: 0;
}

.roulette-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.18) 0%, transparent 60%);
  border-radius: inherit;
  pointer-events: none;
}

.roulette-btn:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 8px 28px rgba(107, 158, 130, 0.55), 0 0 0 4px rgba(107, 158, 130, 0.18);
}

.roulette-btn:active {
  transform: scale(0.97);
}

.roulette-btn svg {
  transition: transform 0.4s var(--ease-elastic);
}

.roulette-btn:hover svg,
.roulette-btn.spinning svg {
  transform: rotate(360deg);
}

@keyframes roulettePulseGlow {
  0%, 100% { box-shadow: 0 4px 18px rgba(107, 158, 130, 0.35), 0 0 0 0 rgba(107, 158, 130, 0.3); }
  50%       { box-shadow: 0 4px 24px rgba(107, 158, 130, 0.55), 0 0 0 6px rgba(107, 158, 130, 0.12); }
}

@media (max-width: 768px) {
  .roulette-btn span.roulette-label { display: none; }
  .roulette-btn { padding: 0.5rem 0.75rem; }
}

/* Roulette Toast Notification */
.roulette-toast {
  position: fixed;
  top: calc(var(--header-height, 80px) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(-12px);
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.35s var(--ease-elastic);
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
  max-width: calc(100vw - 2rem);
}

.roulette-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.roulette-toast-icon {
  font-size: 1.4rem;
  animation: rouletteSpinEmoji 0.6s var(--ease-elastic);
}

@keyframes rouletteSpinEmoji {
  0%   { transform: rotate(0deg) scale(0.5); opacity: 0; }
  100% { transform: rotate(360deg) scale(1);  opacity: 1; }
}


/* ─────────────────────────────────────────────────────────────────────────
   B. MY SANCTUARY SHELF — Favorites Top Section
   ───────────────────────────────────────────────────────────────────────── */

.sanctuary-shelf {
  background: linear-gradient(135deg,
    rgba(var(--bg-card-rgb), 0.95),
    rgba(var(--bg-card-rgb), 0.75));
  border: 1px solid rgba(226, 184, 107, 0.28);
  border-radius: var(--radius-xl);
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  position: relative;
  overflow: hidden;
  transition: all 0.4s var(--ease-elastic);
}

.sanctuary-shelf::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg,
    var(--accent-secondary) 0%,
    var(--accent-primary) 50%,
    var(--accent-secondary) 100%);
  border-radius: var(--radius-full) var(--radius-full) 0 0;
}

/* Single-Line Compact Empty State (Saves vertical space) */
.sanctuary-shelf.is-empty {
  padding: 0.65rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 44px;
}

.sanctuary-shelf.is-empty .shelf-header {
  margin-bottom: 0;
  flex-shrink: 0;
}

.sanctuary-shelf.is-empty .shelf-empty-state {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0;
  text-align: left;
  min-width: 0;
  flex: 1;
}

.sanctuary-shelf.is-empty .shelf-empty-icon {
  font-size: 1.15rem;
  margin-bottom: 0;
  display: inline-block;
  opacity: 0.8;
  flex-shrink: 0;
}

.sanctuary-shelf.is-empty .shelf-empty-text {
  font-size: 0.85rem;
  margin: 0;
  max-width: none;
  color: var(--text-muted);
  min-width: 0;
  word-break: break-word;
  line-height: 1.4;
}

.sanctuary-shelf.is-empty .shelf-grid {
  display: none;
}

@media (max-width: 680px) {
  .sanctuary-shelf.is-empty {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    padding: 0.75rem 1rem;
  }
  .sanctuary-shelf.is-empty .shelf-empty-state {
    width: 100%;
  }
}

.shelf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.1rem;
  gap: 0.75rem;
}

.shelf-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-main);
}

.shelf-title-icon {
  font-size: 1.2rem;
  animation: gentleGlow 3s ease-in-out infinite alternate;
}

@keyframes gentleGlow {
  from { filter: drop-shadow(0 0 2px rgba(226, 184, 107, 0.4)); }
  to   { filter: drop-shadow(0 0 8px rgba(226, 184, 107, 0.7)); }
}

.shelf-count-badge {
  background: var(--accent-secondary-light);
  color: var(--accent-secondary);
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.15rem 0.55rem;
  letter-spacing: 0.03em;
}

.shelf-empty-state {
  text-align: center;
  padding: 1.5rem 1rem;
  color: var(--text-muted);
}

.shelf-empty-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  opacity: 0.5;
  display: block;
}

.shelf-empty-text {
  font-size: 0.9rem;
  line-height: 1.55;
  max-width: 340px;
  margin: 0 auto;
}

.shelf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 0.85rem;
}

@media (max-width: 520px) {
  .shelf-grid { grid-template-columns: 1fr; gap: 0.65rem; }
}

.shelf-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-main);
  transition: all 0.25s var(--ease-elastic);
  position: relative;
  overflow: hidden;
  min-width: 0;
  animation: shelfCardEntrance 0.4s var(--ease-elastic) both;
}

@keyframes shelfCardEntrance {
  from { opacity: 0; transform: scale(0.9) translateY(8px); }
  to   { opacity: 1; transform: scale(1)    translateY(0); }
}

.shelf-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-secondary);
  box-shadow: 0 6px 20px rgba(226, 184, 107, 0.18);
}

.shelf-card-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--accent-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.shelf-card-info {
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.shelf-card-title {
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-main);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  word-break: break-word;
}

.shelf-card-cat {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─────────────────────────────────────────────────────────────────────────
   Card Header Tags & Non-Overlapping Favorite Button
   ───────────────────────────────────────────────────────────────────────── */
.activity-card {
  position: relative;
  cursor: pointer;
  transition: transform 0.25s var(--ease-elastic), box-shadow 0.25s var(--ease-elastic), border-color 0.2s ease;
}

.card-top {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.85rem;
}

.card-top-tags {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-right: 2.35rem; /* Clean room for .favorite-btn without overlap */
}

.card-pill-category {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  background: var(--accent-primary-light);
  color: var(--accent-primary);
  border: 1px solid rgba(107, 158, 130, 0.25);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.card-pill-duration {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  white-space: nowrap;
}

/* Prominent Card Tag Badge Row */
.card-tag-badge-row {
  margin-bottom: 0.45rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.card-tag-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-primary);
  background: var(--accent-primary-light);
  border: 1px solid rgba(107, 158, 130, 0.3);
  padding: 0.18rem 0.55rem;
  border-radius: var(--radius-full);
}

/* Directory Expander Toggle (Show Less / Show All) */
.directory-expander-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.btn-toggle-directory {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.65rem;
  background: var(--bg-card);
  border: 1.5px solid var(--accent-primary);
  border-radius: var(--radius-full);
  color: var(--accent-primary);
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(107, 158, 130, 0.15);
  transition: all 0.25s var(--ease-elastic);
}

.btn-toggle-directory:hover {
  background: var(--accent-primary);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(107, 158, 130, 0.3);
}

.btn-toggle-directory .toggle-btn-icon {
  font-size: 0.75rem;
  transition: transform 0.2s ease;
}

/* Favourite Star Button — positioned in top right with ample clearance */
.favorite-btn {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 8;
  transition: all 0.25s var(--ease-elastic);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.favorite-btn:hover {
  transform: scale(1.15);
  border-color: var(--accent-secondary);
  color: var(--accent-secondary);
}

.favorite-btn.active {
  background: var(--accent-secondary-light);
  border-color: var(--accent-secondary);
  color: var(--accent-secondary);
  box-shadow: 0 4px 12px rgba(226, 184, 107, 0.3);
}

.favorite-btn.active svg { fill: var(--accent-secondary); stroke: var(--accent-secondary); }

@keyframes favoritePop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.45); }
  70%  { transform: scale(0.88); }
  100% { transform: scale(1); }
}

.favorite-btn.pop-anim { animation: favoritePop 0.45s var(--ease-elastic); }


/* ─────────────────────────────────────────────────────────────────────────
   C. MOOD-BASED INTENT FILTER PILLS
   ───────────────────────────────────────────────────────────────────────── */

.mood-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  padding: 0.25rem 0 0.75rem 0;
}

.mood-filter-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-right: 0.25rem;
  flex-shrink: 0;
}

.mood-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  border: 1.5px solid var(--border-soft);
  background: var(--bg-card);
  color: var(--text-muted);
  transition: all 0.22s var(--ease-elastic);
  white-space: nowrap;
  user-select: none;
}

.mood-pill:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background: var(--accent-primary-light);
  transform: translateY(-1px);
}

.mood-pill.active {
  background: linear-gradient(135deg, var(--accent-primary) 0%, #5A8C71 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 16px rgba(107, 158, 130, 0.35);
  transform: translateY(-1px);
}

@media (max-width: 640px) {
  .mood-filter-bar { gap: 0.4rem; padding-bottom: 0.5rem; }
  .mood-pill { font-size: 0.78rem; padding: 0.4rem 0.75rem; }
  .mood-filter-label { display: none; }
}


/* ─────────────────────────────────────────────────────────────────────────
   D. GRID CAPPER — Expand/Collapse
   ───────────────────────────────────────────────────────────────────────── */

.activity-card.grid-hidden { display: none; }

.activity-card.grid-revealed {
  display: flex;
  animation: gridReveal 0.5s cubic-bezier(0.25, 1, 0.5, 1) both;
}

@keyframes gridReveal {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.grid-expander-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding-top: 0.75rem;
  margin-top: 0.25rem;
}

.grid-fade-mask { position: relative; }

.grid-fade-mask::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 100px;
  background: linear-gradient(to bottom, transparent, var(--bg-surface));
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.grid-fade-mask.expanded::after { opacity: 0; }

.grid-expand-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.75rem;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border-soft);
  background: var(--bg-card);
  color: var(--text-main);
  font-weight: 700;
  font-size: 0.9rem;
  font-family: 'Outfit', sans-serif;
  cursor: pointer;
  transition: all 0.25s var(--ease-elastic);
  box-shadow: var(--shadow-sm);
}

.grid-expand-btn:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.grid-expand-btn svg { transition: transform 0.35s var(--ease-elastic); }
.grid-expand-btn[aria-expanded="true"] svg.expand-arrow { transform: rotate(180deg); }

.grid-expand-meta { font-size: 0.78rem; color: var(--text-muted); }


/* ─────────────────────────────────────────────────────────────────────────
   E. PERSISTENT AMBIENT AUDIO BAR
   ───────────────────────────────────────────────────────────────────────── */

.ambient-audio-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 80;
  background: rgba(var(--bg-card-rgb), 0.93);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--border-soft);
  box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.1);
  transform: translateY(calc(100% - 48px));
  transition: transform 0.4s var(--ease-elastic);
  will-change: transform;
}

.ambient-audio-bar.expanded { transform: translateY(0); }

.audio-bar-handle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  height: 48px;
  cursor: pointer;
  user-select: none;
  gap: 0.75rem;
}

.audio-bar-grip {
  width: 24px;
  height: 3px;
  background: var(--border-soft);
  border-radius: var(--radius-full);
  transition: all 0.2s ease;
  margin: 0 auto;
}

.audio-bar-handle:hover .audio-bar-grip {
  background: var(--accent-primary);
  width: 32px;
}

.audio-bar-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-main);
}

.audio-bar-active-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-primary);
  opacity: 0;
  transition: opacity 0.3s ease;
  animation: audioActivePulse 2s ease-in-out infinite;
}

.audio-bar-active-dot.playing { opacity: 1; }

@keyframes audioActivePulse {
  0%, 100% { transform: scale(1);    opacity: 0.7; }
  50%       { transform: scale(1.35); opacity: 1; }
}

.audio-bar-toggle-icon {
  color: var(--text-muted);
  transition: transform 0.35s var(--ease-elastic), color 0.2s ease;
}

.ambient-audio-bar.expanded .audio-bar-toggle-icon { transform: rotate(180deg); }

.audio-bar-body {
  padding: 0 1.25rem 1rem 1.25rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

@media (max-width: 600px) {
  .audio-bar-body {
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
    padding: 0 0.75rem 0.85rem 0.75rem;
  }
}

.audio-track-tile {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.audio-track-tile.track-active {
  border-color: var(--accent-primary);
  background: var(--accent-primary-light);
}

.track-tile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.track-tile-info {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.track-tile-emoji { font-size: 1.1rem; line-height: 1; }
.track-tile-name  { font-size: 0.82rem; font-weight: 700; color: var(--text-main); }

/* Toggle Switch */
.track-toggle-switch {
  position: relative;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
}

.track-toggle-switch input {
  opacity: 0; width: 0; height: 0; position: absolute;
}

.track-toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border-soft);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background 0.2s ease;
}

.track-toggle-slider::before {
  content: '';
  position: absolute;
  height: 14px; width: 14px;
  left: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.track-toggle-switch input:checked + .track-toggle-slider { background: var(--accent-primary); }
.track-toggle-switch input:checked + .track-toggle-slider::before { transform: translateX(16px); }

/* Volume Slider */
.track-volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: var(--radius-full);
  background: var(--border-soft);
  outline: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.track-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent-primary);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(107, 158, 130, 0.35);
  transition: transform 0.15s ease;
}

.track-volume-slider::-webkit-slider-thumb:hover { transform: scale(1.25); }

.track-volume-slider::-moz-range-thumb {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent-primary);
  cursor: pointer;
  border: none;
}

.audio-track-tile.track-active .track-volume-slider {
  background: rgba(107, 158, 130, 0.25);
}


/* ─────────────────────────────────────────────────────────────────────────
   F. MICRO-BREAK TIMER — Singing Bowl Bell
   ───────────────────────────────────────────────────────────────────────── */

.microbreak-timer-widget {
  background: linear-gradient(135deg,
    rgba(var(--bg-card-rgb), 0.9),
    rgba(var(--bg-card-rgb), 0.7));
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.timer-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.timer-options { display: flex; gap: 0.65rem; }

.timer-option-btn {
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border-soft);
  background: var(--bg-surface);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s var(--ease-elastic);
}

.timer-option-btn:hover { border-color: var(--accent-primary); color: var(--accent-primary); }

.timer-option-btn.active {
  background: var(--accent-primary);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 12px rgba(107, 158, 130, 0.3);
}

/* Circular Progress Ring */
.timer-ring-wrapper {
  position: relative;
  width: 110px; height: 110px;
  display: none;
  align-items: center;
  justify-content: center;
}

.timer-ring-wrapper.running { display: flex; }

.timer-ring-svg {
  position: absolute;
  inset: 0;
  transform: rotate(-90deg);
}

.timer-ring-track { fill: none; stroke: var(--border-soft); stroke-width: 4; }

.timer-ring-progress {
  fill: none;
  stroke: var(--accent-primary);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 283;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear;
}

.timer-ring-label {
  position: relative;
  z-index: 1;
  font-family: 'Outfit', sans-serif;
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--text-main);
}

.timer-stop-btn {
  background: none;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-full);
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.timer-stop-btn:hover { border-color: var(--accent-primary); color: var(--accent-primary); }

.timer-completion-msg {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  animation: timerCompletionFade 0.6s var(--ease-elastic);
}

.timer-completion-msg.visible { display: flex; }

@keyframes timerCompletionFade {
  from { opacity: 0; transform: translateY(10px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.timer-bowl-icon {
  font-size: 2.5rem;
  animation: bowlRing 1s var(--ease-elastic) 0.1s both;
}

@keyframes bowlRing {
  0%   { transform: scale(0.6) rotate(-15deg); opacity: 0; }
  60%  { transform: scale(1.15) rotate(5deg);  opacity: 1; }
  100% { transform: scale(1) rotate(0deg);     opacity: 1; }
}

.timer-completion-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 280px;
  font-style: italic;
}


/* ─────────────────────────────────────────────────────────────────────────
   G. CALM JOURNAL STATS
   ───────────────────────────────────────────────────────────────────────── */

.calm-journal-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 1.25rem;
  background: var(--accent-primary-light);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-primary);
  opacity: 0;
  transition: opacity 0.5s ease, transform 0.4s var(--ease-elastic);
  transform: translateY(4px);
  max-width: fit-content;
  margin: 0 auto;
}

.calm-journal-stats.has-stats { opacity: 1; transform: translateY(0); }

[data-theme="dark"] .calm-journal-stats { background: rgba(107, 158, 130, 0.15); }


/* ─────────────────────────────────────────────────────────────────────────
   H. BREATHING TRANSITION OVERLAY
   ───────────────────────────────────────────────────────────────────────── */

.breathing-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  background: rgba(var(--bg-surface-rgb), 0.97);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.breathing-overlay.active { opacity: 1; pointer-events: auto; }

.breathing-circle-wrapper {
  position: relative;
  width: 120px; height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.breathing-circle-outer {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--accent-primary-light);
  animation: breatheExpand 2s ease-in-out infinite;
}

.breathing-circle-inner {
  position: absolute;
  inset: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  box-shadow: 0 0 24px rgba(107, 158, 130, 0.45);
  animation: breatheExpand 2s ease-in-out infinite;
  animation-delay: 0.15s;
}

@keyframes breatheExpand {
  0%, 100% { transform: scale(0.9); opacity: 0.7; }
  50%       { transform: scale(1.1); opacity: 1; }
}

.breathing-overlay-text {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  text-align: center;
  letter-spacing: -0.01em;
}

.breathing-overlay-sub {
  font-size: 0.88rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: -0.75rem;
}

.ad-placeholder-transition {
  width: min(100%, 468px);
  min-height: 60px;
  background: var(--bg-card);
  border: 1px dashed var(--border-soft);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 12;
  contain: layout;
  overflow: hidden;
}

.ad-placeholder-transition .ad-badge-label {
  font-size: 0.65rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}


/* ─────────────────────────────────────────────────────────────────────────
   I. BODY PADDING for docked audio bar
   ───────────────────────────────────────────────────────────────────────── */

body.audio-bar-present { padding-bottom: 48px; }

/* ─────────────────────────────────────────────────────────────────────────
   J. DEEP SCIENCE & STRESS RELIEF SECTION (Activity Runner Pages)
   ───────────────────────────────────────────────────────────────────────── */
.activity-deep-science-section {
  margin-top: 2.5rem;
  margin-bottom: 2rem;
  background: linear-gradient(135deg,
    rgba(var(--bg-card-rgb), 0.95),
    rgba(var(--bg-card-rgb), 0.75));
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
}

.deep-science-header {
  margin-bottom: 1.5rem;
}

.deep-science-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--accent-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--accent-primary-light);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.5rem;
}

.deep-science-title {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.3rem, 2.2vw, 1.65rem);
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.45rem;
}

.deep-science-subtitle {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 680px;
}

.deep-science-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.deep-science-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: transform 0.25s var(--ease-elastic), border-color 0.2s ease;
}

.deep-science-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-primary);
}

.deep-science-card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--accent-primary-light);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.deep-science-card h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.deep-science-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
}

.deep-science-takeaway {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, rgba(226, 184, 107, 0.12), rgba(107, 158, 130, 0.1));
  border-left: 4px solid var(--accent-secondary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.deep-science-takeaway-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.deep-science-takeaway p {
  font-size: 0.88rem;
  color: var(--text-main);
  margin: 0;
  line-height: 1.5;
}


.mobile-sticky-ad { bottom: 48px !important; }

@media (min-width: 992px) {
  .mobile-sticky-ad { display: none !important; }
  body.audio-bar-present { padding-bottom: 48px; }
}


/* ─────────────────────────────────────────────────────────────────────────
   J. MOOD FILTER STATES
   ───────────────────────────────────────────────────────────────────────── */

.activity-card.mood-hidden { display: none !important; }

.activity-card.mood-visible {
  display: flex;
  animation: moodFilterReveal 0.35s var(--ease-elastic) both;
}

@keyframes moodFilterReveal {
  from { opacity: 0; transform: scale(0.95) translateY(8px); }
  to   { opacity: 1; transform: scale(1)    translateY(0); }
}

.mood-no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  display: none;
}

.mood-no-results.visible { display: block; }


/* ─────────────────────────────────────────────────────────────────────────
   K. ACCESSIBILITY — Focus Rings
   ───────────────────────────────────────────────────────────────────────── */

.roulette-btn:focus-visible,
.mood-pill:focus-visible,
.grid-expand-btn:focus-visible,
.timer-option-btn:focus-visible,
.favorite-btn:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}
