/* ==========================================================================
   TuTap.vn - Tab Phật Pháp CSS (Pháp Bảo, Chuỗi 108 Hạt, Kinh Luân, Thiền Zen, Streak, Sổ Tay, Tự Viện)
   File: /include/css/tab_phatphap.css
   ========================================================================== */

/* ==========================================================================
   PHÁP BẢO TU TRÌ: CHUỖI 108 HẠT NÂNG CAO & KINH LUÂN CHUYỂN PHÁP (TAB PHẬT GIÁO)
   ========================================================================== */
.phapbao-card {
  padding: 16px 14px;
}
.phapbao-segmented-nav {
  display: flex;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--tt-card-border);
  border-radius: 14px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 14px;
}
html.theme-light .phapbao-segmented-nav,
body.theme-light .phapbao-segmented-nav {
  background: rgba(180, 131, 37, 0.08);
}
.phapbao-nav-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 6px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--tt-text-muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  white-space: nowrap;
}
.phapbao-nav-btn.active {
  background: var(--tt-card-bg);
  color: var(--tt-gold);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28), 0 0 0 1px var(--tt-card-border);
}
html.theme-light .phapbao-nav-btn.active,
body.theme-light .phapbao-nav-btn.active {
  background: #ffffff;
  color: #8c6314;
  box-shadow: 0 2px 8px rgba(140, 99, 20, 0.15);
}

.phapbao-pane {
  display: none;
  animation: phapbaoFadeIn 0.3s ease forwards;
}
.phapbao-pane.active {
  display: block;
}
@keyframes phapbaoFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* CHUỖI 108 HẠT NÂNG CAO - THANH CHỌN CÂU CHÚ */
.mantra-nav-wrap {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  gap: 4px;
}
.mantra-scroll-arrow {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--tt-card-border);
  background: rgba(240, 207, 117, 0.12);
  color: var(--tt-gold-bright);
  font-size: 15px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  transition: all 0.2s ease;
  user-select: none;
}
.mantra-scroll-arrow:hover {
  background: var(--tt-gold);
  color: #1a120b;
  transform: scale(1.08);
}
.mantra-selector-wrap {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 2px;
  flex: 1;
  scrollbar-width: none;
  cursor: grab;
  user-select: none;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
.mantra-selector-wrap.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}
.mantra-selector-wrap::-webkit-scrollbar {
  display: none;
}
.mantra-chip {
  flex-shrink: 0;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid var(--tt-card-border);
  background: rgba(240, 207, 117, 0.06);
  color: var(--tt-text-body);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.mantra-chip > span:first-child {
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
}
.mantra-chip.active {
  background: var(--tt-gold);
  color: #1a120b !important;
  border-color: var(--tt-gold);
  font-weight: 700;
  box-shadow: 0 0 12px var(--tt-gold-glow);
}
html.theme-light .mantra-chip.active,
body.theme-light .mantra-chip.active {
  background: #b48325;
  color: #ffffff !important;
}

/* =========================================================
   CHUỖI TRÀNG HẠT 108 PHÁP BẢO CỔ TRUYỀN NÂNG CẤP
   ========================================================= */

/* Thanh chọn 5 Pháp Bảo Chất Liệu */
.mala-material-bar {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 4px auto 14px auto;
  max-width: 480px;
}
.mala-mat-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 16px;
  border: 1px solid var(--tt-card-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--tt-text-muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}
.mala-mat-chip:hover {
  border-color: var(--tt-gold);
  color: var(--tt-gold-bright);
}
.mala-mat-chip.active {
  background: rgba(240, 207, 117, 0.15);
  border-color: var(--tt-gold);
  color: var(--tt-gold-bright);
  box-shadow: 0 0 10px var(--tt-gold-glow);
  font-weight: 700;
}
.mat-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 4px rgba(0,0,0,0.5);
}
.mat-bodhi { background: radial-gradient(circle at 35% 35%, #ffd27d, #ba7b44 60%, #4a2306); }
.mat-agarwood { background: radial-gradient(circle at 35% 35%, #8d6238, #3e220e 65%, #150902); }
.mat-white_jade { background: radial-gradient(circle at 35% 35%, #ffffff, #c9f5f0 60%, #4db6ac); box-shadow: 0 0 6px rgba(178,223,219,0.8); }
.mat-lapis { background: radial-gradient(circle at 35% 35%, #64b5f6, #1a237e 65%, #050b2e); box-shadow: 0 0 6px rgba(63,81,181,0.6); }
.mat-red_sandalwood { background: radial-gradient(circle at 35% 35%, #ff8a80, #b71c1c 65%, #3b030b); box-shadow: 0 0 6px rgba(229,57,53,0.6); }

/* Khung tràng hạt 108 hạt và Tháp Mẹ */
.mala-bead-box {
  position: relative;
  width: 196px;
  height: 236px;
  margin: 6px auto 10px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: none;
  user-select: none;
}
.mala-bead-ring-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}
.mala-thread-line {
  fill: none;
  stroke: rgba(212, 160, 23, 0.28);
  stroke-width: 0.9;
  stroke-dasharray: 2 1.5;
  transition: stroke 0.3s ease;
}
html.theme-light .mala-thread-line,
body.theme-light .mala-thread-line {
  stroke: rgba(160, 110, 30, 0.35);
}

/* 108 Hạt Bồ Đề trạng thái chờ (Chưa niệm) */
.mala-mini-bead {
  fill: rgba(160, 110, 50, 0.28);
  stroke: rgba(240, 207, 117, 0.45);
  stroke-width: 0.55;
  transition: fill 0.2s ease, stroke 0.2s ease, filter 0.2s ease;
}
html.theme-light .mala-mini-bead,
body.theme-light .mala-mini-bead {
  fill: rgba(140, 95, 40, 0.22);
  stroke: rgba(180, 130, 35, 0.5);
}

/* 4 Hạt mốc phân cách tứ thiên vương (Vị trí 1, 28, 55, 82) */
.mala-mini-bead.is-marker {
  fill: rgba(180, 60, 60, 0.3);
  stroke: rgba(255, 150, 150, 0.6);
  stroke-width: 0.75;
}

/* Hạt bồ đề đã niệm qua (Tô màu theo chất liệu được chọn) */
.mala-mini-bead.active {
  fill: url(#malaActiveGrad) !important;
  stroke: #ffffff !important;
  stroke-width: 0.65;
  filter: drop-shadow(0 0 2px rgba(255, 215, 0, 0.85));
}

/* Hạt mốc khi active (Ngọc chu sa đỏ ruby rạng ngời) */
.mala-mini-bead.is-marker.active {
  fill: url(#malaMarkerActiveGrad) !important;
  stroke: #fff0f0 !important;
  stroke-width: 0.85;
  filter: drop-shadow(0 0 3.5px rgba(229, 57, 53, 0.9));
}

/* Hạt vừa được chạm mới nhất (Glowing Pulse) */
.mala-mini-bead.latest-touched {
  fill: url(#malaLatestGrad) !important;
  stroke: #ffffff !important;
  stroke-width: 1.1;
  filter: drop-shadow(0 0 5px #ffd700) !important;
}

/* Tháp Mẹ & Dây Tua Rua Cát Tường */
.mala-tassel-group {
  transform-origin: 98px 186px;
  animation: tasselBreeze 4.5s ease-in-out infinite;
  transition: transform 0.2s ease;
}
@keyframes tasselBreeze {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(2.4deg); }
  75% { transform: rotate(-2.4deg); }
}
.mala-tassel-group.tassel-flick {
  animation: tasselFlickAnim 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes tasselFlickAnim {
  0% { transform: rotate(0deg); }
  30% { transform: rotate(7deg); }
  60% { transform: rotate(-5deg); }
  85% { transform: rotate(2deg); }
  100% { transform: rotate(0deg); }
}

/* Nút Chạm Niệm trung tâm */
.mala-center-bead {
  position: absolute;
  top: 37px;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 32%, #ba7b44 0%, #703f19 55%, #341a08 100%);
  border: 3px solid var(--tt-gold);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5), inset 0 2px 6px rgba(255, 255, 255, 0.4), 0 0 18px var(--tt-gold-glow);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  transition: transform 0.12s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  z-index: 2;
}
.mala-center-bead #rosary-counter {
  font-size: 28px;
  font-weight: 900;
  margin-top: 2px;
  line-height: 1;
  transition: color 0.25s ease, text-shadow 0.25s ease;
}
.mala-center-bead #mala-center-label,
.mala-center-bead span:last-child {
  font-size: 10px;
  font-weight: 800;
  margin-top: 3px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  transition: color 0.25s ease, text-shadow 0.25s ease;
}
.mala-center-bead:active {
  transform: translateX(-50%) scale(0.92);
}
.mala-center-bead.bead-pulse {
  animation: beadPulseAura 0.35s ease;
}
@keyframes beadPulseAura {
  0% { transform: translateX(-50%) scale(0.92); box-shadow: 0 0 0 0 rgba(240, 207, 117, 0.85); }
  50% { transform: translateX(-50%) scale(1.04); box-shadow: 0 0 32px 10px rgba(240, 207, 117, 0.65); }
  100% { transform: translateX(-50%) scale(1); box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5); }
}

/* Hào quang viên mãn khi tròn 108 hạt */
@keyframes roundCompleteGoldGlow {
  0% { filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.4)); }
  50% { filter: drop-shadow(0 0 18px rgba(255, 215, 0, 0.98)); }
  100% { filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.4)); }
}
.round-complete-pulse {
  animation: roundCompleteGoldGlow 1.4s ease-in-out;
}

/* Lớp hạt thần chú hoa sen bay bổng (Mantra Emanation Particles) */
.mala-particles-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
  z-index: 10;
}
.floating-mantra-item {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: none;
  white-space: nowrap;
  font-size: 10.5px;
  font-weight: 500;
  color: #fffde6;
  text-shadow: 0 0 6px #ffc837, 0 0 10px #ff9800;
  animation: mantraFloatUp 1.25s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
}
@keyframes mantraFloatUp {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5) translateY(0);
    filter: drop-shadow(0 0 2px #ffd700);
  }
  20% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.05) translateY(-8px);
    filter: drop-shadow(0 0 8px #ffd700);
  }
  75% {
    opacity: 0.95;
    transform: translate(-50%, -50%) scale(1) translateY(-26px);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.85) translateY(-40px);
  }
}

/* Modal / Thẻ Bài Hồi Hướng Công Đức Trang Nghiêm */
.mala-dedication-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10050;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transition: opacity 0.3s ease, visibility 0.3s ease !important;
  padding: 16px;
}
.mala-dedication-modal:not(.active) {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.mala-dedication-modal.active {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}
.mala-dedication-card {
  background: linear-gradient(145deg, #2b1a09 0%, #170d05 100%);
  border: 2px solid var(--tt-gold);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8), 0 0 30px var(--tt-gold-glow);
  border-radius: 18px;
  max-width: 380px;
  width: 100%;
  padding: 24px 20px;
  text-align: center;
  position: relative;
  transform: scale(0.9) translateY(12px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.mala-dedication-modal.active .mala-dedication-card {
  transform: scale(1) translateY(0);
}
.dedication-lotus {
  font-size: 38px;
  line-height: 1;
  filter: drop-shadow(0 2px 8px rgba(255, 215, 0, 0.7));
  margin-bottom: 6px;
  animation: lotusBreathe 2s ease-in-out infinite;
}
@keyframes lotusBreathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}
.dedication-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--tt-gold-bright);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}
.dedication-round-badge {
  display: inline-block;
  background: rgba(240, 207, 117, 0.16);
  border: 1px solid var(--tt-gold);
  color: var(--tt-gold);
  padding: 3px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 12px;
}
.dedication-verse {
  font-size: 13.5px;
  line-height: 1.65;
  color: #fff3cc;
  font-style: italic;
  background: rgba(0, 0, 0, 0.35);
  border: 1px dashed rgba(240, 207, 117, 0.35);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
}
.dedication-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dedication-close-btn {
  position: absolute;
  top: 10px;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--tt-text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.2s ease;
}
.dedication-close-btn:hover {
  color: #ffffff;
}

/* Chế độ Thiền Định Tối Giản (Zen Focus Mode) */
.rosary-zen-active {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 10050 !important;
  background: radial-gradient(circle at 50% 45%, #1c1208 0%, #0c0703 70%, #000000 100%) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 20px !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  animation: phapbaoFadeIn 0.4s ease forwards !important;
}
.rosary-zen-active .mantra-nav-wrap,
.rosary-zen-active .mantra-selector-wrap,
.rosary-zen-active .mala-material-bar,
.rosary-zen-active .rosary-stats-top-bar,
.rosary-zen-active #btn-quick-settings {
  display: none !important;
}
.zen-only-btn,
#btn-theme-rosary,
#btn-theme-wheel,
.zen-top-theme-btn {
  display: none !important;
}

.zen-top-exit-btn {
  display: none;
  position: absolute;
  top: 18px;
  right: 18px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.7);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10055;
  transition: all 0.2s ease;
}
.zen-top-exit-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  transform: scale(1.08);
}
.zen-top-theme-btn {
  position: absolute;
  top: 18px;
  right: 68px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.85);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10055;
  transition: all 0.2s ease;
}
.zen-top-theme-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  transform: scale(1.08);
}
.rosary-zen-active .zen-top-exit-btn,
.rosary-zen-active .zen-top-theme-btn,
.rosary-zen-active .zen-only-btn,
.rosary-zen-active #btn-theme-rosary,
.wheel-zen-active .zen-top-exit-btn,
.wheel-zen-active .zen-top-theme-btn,
.wheel-zen-active .zen-only-btn,
.wheel-zen-active #btn-theme-wheel {
  display: inline-flex !important;
}
.rosary-zen-active .mala-bead-box {
  transform: scale(1.15);
  margin: 12px auto !important;
}
.rosary-zen-active .rosary-mantra-text {
  font-size: 16px !important;
  font-weight: 400 !important;
  margin: 10px 0 14px 0 !important;
  text-shadow: 0 0 14px var(--tt-gold-glow) !important;
  max-width: 90vw !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  display: block !important;
  line-height: 1.6 !important;
  text-align: center !important;
}
.rosary-zen-active .rosary-stats-grid {
  max-width: 320px;
  width: 100%;
}
.rosary-zen-active .phapbao-action-btn-row {
  display: flex !important;
  gap: 12px !important;
  margin-top: 16px !important;
  z-index: 10052;
}
.rosary-zen-active .rosary-tool-icon-btn {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(212, 175, 55, 0.35);
  color: rgba(255, 235, 170, 0.85);
}
.rosary-zen-active .rosary-tool-icon-btn:hover {
  background: rgba(212, 175, 55, 0.22);
  border-color: var(--tt-gold);
  color: #ffffff;
  transform: translateY(-2px);
}

/* Chế độ Thiền Định Kinh Luân (Wheel Zen Focus Mode) */
.wheel-zen-active {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 10050 !important;
  background: radial-gradient(circle at 50% 45%, #1c1208 0%, #0c0703 70%, #000000 100%) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 20px !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  animation: phapbaoFadeIn 0.4s ease forwards !important;
}
.wheel-zen-active > p,
.wheel-zen-active .rosary-save-icon-btn,
.wheel-zen-active .mantra-save-status,
.wheel-zen-active .wheel-direction-hint,
.wheel-zen-active #btn-reset-wheel {
  display: none !important;
}
.wheel-zen-active .zen-top-exit-btn {
  display: inline-flex !important;
}
.wheel-zen-active .prayer-wheel-stage {
  transform: scale(1.15);
  margin: 12px auto !important;
}
.wheel-zen-active .rosary-stats-grid {
  max-width: 320px;
  width: 100%;
}
.wheel-zen-active .phapbao-action-btn-row {
  display: flex !important;
  gap: 12px !important;
  margin-top: 16px !important;
  z-index: 10052;
}
.wheel-zen-active .rosary-tool-icon-btn {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(212, 175, 55, 0.35);
  color: rgba(255, 235, 170, 0.85);
}
.wheel-zen-active .rosary-tool-icon-btn:hover {
  background: rgba(212, 175, 55, 0.22);
  border-color: var(--tt-gold);
  color: #ffffff;
  transform: translateY(-2px);
}

/* Nút Lưu chuỗi niệm đơn sắc ngay phía trên Hạt Hiện Tại */
.rosary-save-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 7px;
  color: var(--tt-text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  flex-shrink: 0;
}
.rosary-save-icon-btn:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--tt-gold);
  color: var(--tt-gold-bright);
  transform: translateY(-1px);
}
.rosary-save-icon-btn:active {
  transform: scale(0.92);
}
.rosary-save-icon-btn svg {
  display: block;
}

/* Khi có thay đổi chưa lưu: nút hiện sáng vừa phải, trang nhã, không gây chói */
.rosary-save-icon-btn.has-unsaved {
  background: rgba(212, 175, 55, 0.12) !important;
  border-color: rgba(212, 175, 55, 0.6) !important;
  color: var(--tt-gold-bright) !important;
  box-shadow: 0 0 5px rgba(212, 175, 55, 0.22) !important;
}
.rosary-save-icon-btn.has-unsaved:hover {
  background: rgba(212, 175, 55, 0.22) !important;
  border-color: var(--tt-gold) !important;
  color: #ffffff !important;
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.35) !important;
  transform: translateY(-1px);
}

/* Trạng thái chữ Chưa lưu hiển thị nhã nhặn, tĩnh tại */
.mantra-save-status {
  transition: all 0.25s ease;
}
.mantra-save-status.is-unsaved {
  color: var(--tt-gold) !important;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.mantra-save-status.is-unsaved::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--tt-gold);
  opacity: 0.85;
  flex-shrink: 0;
}

/* Bộ 4 Nút Icon Đơn Sắc Điều Khiển Pháp Bảo */
.rosary-tool-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(212, 175, 55, 0.28);
  border-radius: 11px;
  color: var(--tt-text-title);
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  user-select: none;
  flex-shrink: 0;
}
.rosary-tool-icon-btn:hover {
  background: rgba(212, 175, 55, 0.16);
  border-color: var(--tt-gold);
  color: var(--tt-gold-bright);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.25);
}
.rosary-tool-icon-btn:active {
  transform: scale(0.92);
}
.rosary-tool-icon-btn.active-toggle {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.9), rgba(184, 134, 11, 0.95)) !important;
  color: #1a120b !important;
  border-color: var(--tt-gold-bright) !important;
  box-shadow: 0 0 14px var(--tt-gold-glow) !important;
}
.rosary-tool-icon-btn svg {
  display: block;
  stroke: currentColor;
}

/* Nút 3 Chấm Tinh Chỉnh */
.btn-more-options {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid var(--tt-card-border) !important;
  color: var(--tt-text-title) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}
.btn-more-options:hover {
  background: rgba(240, 207, 117, 0.15) !important;
  border-color: var(--tt-gold) !important;
  color: var(--tt-gold-bright) !important;
}

/* Modal Bottom Sheet 3 Chấm (Chuẩn Native App) */
.mala-options-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2147483646 !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transition: opacity 0.25s ease, visibility 0.25s ease !important;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.mala-options-overlay:not(.active) {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.mala-options-overlay:not(.active) .mala-options-sheet {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(100vh) !important;
}
@media (min-width: 600px) {
  .mala-options-overlay {
    align-items: center;
  }
}
.mala-options-overlay.active {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}
.mala-options-sheet {
  background: linear-gradient(180deg, #24160a 0%, #150c05 100%);
  border: 1px solid rgba(240, 207, 117, 0.4);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.8), 0 0 25px var(--tt-gold-glow);
  width: 100%;
  max-width: 440px;
  border-radius: 20px 20px 0 0;
  padding: 16px 18px 24px 18px;
  box-sizing: border-box;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.3, 1);
  max-height: 85vh;
  overflow-y: auto;
}
@media (min-width: 600px) {
  .mala-options-sheet {
    border-radius: 20px;
    transform: scale(0.9) translateY(20px);
  }
  .mala-options-overlay.active .mala-options-sheet {
    transform: scale(1) translateY(0);
  }
}
.mala-options-overlay.active .mala-options-sheet {
  transform: translateY(0);
}
.sheet-drag-handle {
  width: 42px;
  height: 5px;
  background: rgba(240, 207, 117, 0.45);
  border-radius: 3px;
  margin: 0 auto 12px auto;
  cursor: grab;
  touch-action: none;
  position: relative;
  transition: background 0.2s ease, transform 0.2s ease;
}
.sheet-drag-handle:active {
  cursor: grabbing;
  background: var(--tt-gold, #f0cf75);
  transform: scaleX(1.15);
}
.sheet-drag-handle::before {
  content: '';
  position: absolute;
  top: -10px;
  bottom: -10px;
  left: -20px;
  right: -20px;
}
.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(240, 207, 117, 0.2);
}
.sheet-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--tt-gold-bright);
  display: flex;
  align-items: center;
  gap: 6px;
}
.sheet-close-btn {
  background: transparent;
  border: none;
  color: var(--tt-text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}
.sheet-close-btn:hover {
  color: #ffffff;
}
.sheet-group-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--tt-gold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 12px 0 6px 0;
  display: flex;
  align-items: center;
  gap: 5px;
}
.sheet-btn-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}
.sheet-action-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--tt-card-border);
  border-radius: 12px;
  color: var(--tt-text-title);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}
.sheet-action-item:hover {
  background: rgba(240, 207, 117, 0.12);
  border-color: var(--tt-gold);
  color: var(--tt-gold-bright);
}
.sheet-action-item span.icon {
  font-size: 17px;
  line-height: 1;
}

/* --- Thư Viện Câu Chú & Thanh Chọn Thông Minh (Giải Pháp 1) --- */
.mantra-control-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 4px 4px 8px 4px;
}
.mantra-open-picker-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(240, 207, 117, 0.16) 0%, rgba(184, 120, 32, 0.24) 100%);
  border: 1px solid var(--tt-gold);
  color: var(--tt-gold-bright, #ffd269);
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
.mantra-open-picker-btn:hover {
  background: linear-gradient(135deg, rgba(240, 207, 117, 0.3) 0%, rgba(184, 120, 32, 0.42) 100%);
  box-shadow: 0 0 14px var(--tt-gold-glow);
  transform: translateY(-1px);
}
.mantra-open-picker-btn .lib-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--tt-gold);
  color: #1a120b;
  font-size: 10.5px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 10px;
  line-height: 1.2;
}
.mantra-admin-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 8px;
  background: rgba(240, 207, 117, 0.14);
  border: 1px solid rgba(240, 207, 117, 0.35);
  color: var(--tt-gold-bright, #ffd269);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}
.mantra-admin-btn:hover {
  background: var(--tt-gold);
  color: #1a120b;
}

.rosary-mantra-badge-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 18px;
  border-radius: 16px;
  background: rgba(240, 207, 117, 0.08);
  border: 1px solid rgba(240, 207, 117, 0.35);
  cursor: pointer;
  margin: 6px auto;
  transition: all 0.25s ease;
  max-width: min(94vw, 560px);
  box-sizing: border-box;
}
.rosary-mantra-badge-btn:hover {
  background: rgba(240, 207, 117, 0.18);
  border-color: var(--tt-gold);
  box-shadow: 0 0 12px var(--tt-gold-glow);
  transform: translateY(-1px);
}
.rosary-mantra-badge-btn .rosary-mantra-text {
  font-size: 13.5px;
  font-weight: 400; /* Không in đậm */
  color: var(--tt-gold);
  line-height: 1.45;
  text-align: center;
  white-space: normal; /* Hiển thị đầy đủ */
  overflow: visible;
  text-overflow: clip;
  word-break: break-word;
}
.rosary-mantra-badge-btn .mantra-change-hint,
.rosary-mantra-badge-btn .mantra-change-pill {
  font-size: 10.5px;
  font-weight: 400;
  color: var(--tt-gold);
  opacity: 0.65;
  margin: 0;
  line-height: 1.2;
  text-align: center;
  flex-shrink: 0;
  align-self: center;
  transition: opacity 0.2s ease;
  user-select: none;
  background: none;
  border: none;
  padding: 0;
}
.rosary-mantra-badge-btn:hover .mantra-change-hint,
.rosary-mantra-badge-btn:hover .mantra-change-pill {
  opacity: 1;
}

/* --- Tối ưu hiển thị Câu Chú Dài (Chú Đại Bi, Chú Dược Sư...) & Teleprompter Tự Cuộn --- */
.rosary-mantra-badge-btn.is-long-mantra {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
  padding: 6px 10px 4px !important;
  cursor: default;
  transform: none !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
  border-radius: 14px;
  background: rgba(240, 207, 117, 0.07);
  border: 1px solid rgba(240, 207, 117, 0.32);
}
.rosary-mantra-badge-btn.is-long-mantra:hover {
  box-shadow: 0 4px 20px rgba(240, 207, 117, 0.2);
}
.rosary-mantra-badge-btn.is-long-mantra .rosary-mantra-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 4px;
  padding-bottom: 3px;
  border-bottom: 1px dashed rgba(240, 207, 117, 0.22);
}
.rosary-mantra-badge-btn.is-long-mantra .mantra-name-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--tt-gold-bright, #ffd269);
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.rosary-mantra-badge-btn.is-long-mantra .mantra-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.rosary-mantra-badge-btn.is-long-mantra .rosary-mantra-header .mantra-change-hint {
  font-size: 11px;
  color: var(--tt-gold);
  opacity: 0.85;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(240, 207, 117, 0.12);
  transition: all 0.2s ease;
  line-height: 1.2;
}
.rosary-mantra-badge-btn.is-long-mantra .rosary-mantra-header .mantra-change-hint:hover {
  opacity: 1;
  background: rgba(240, 207, 117, 0.28);
  border-color: var(--tt-gold);
}

/* Bỏ hoàn toàn khung trong dày: không viền kép, không nền riêng */
.rosary-mantra-badge-btn.is-long-mantra .rosary-mantra-scroll-wrap {
  width: 100%;
  height: 80px;
  position: relative;
  overflow: hidden;
  border: none !important;
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  transition: height 0.3s ease;
}
.rosary-mantra-badge-btn.is-long-mantra.expanded .rosary-mantra-scroll-wrap {
  height: 200px;
}
.rosary-mantra-badge-btn.is-long-mantra .rosary-mantra-scroll-wrap::before,
.rosary-mantra-badge-btn.is-long-mantra .rosary-mantra-scroll-wrap::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 14px;
  pointer-events: none;
  z-index: 2;
}
.rosary-mantra-badge-btn.is-long-mantra .rosary-mantra-scroll-wrap::before {
  top: 0;
  background: linear-gradient(to bottom, rgba(20, 16, 12, 0.8), transparent);
}
.rosary-mantra-badge-btn.is-long-mantra .rosary-mantra-scroll-wrap::after {
  bottom: 0;
  background: linear-gradient(to top, rgba(20, 16, 12, 0.8), transparent);
}

.rosary-mantra-badge-btn.is-long-mantra .rosary-mantra-text {
  display: block !important;
  height: 100% !important;
  width: 100% !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 2px 4px !important;
  margin: 0 !important;
  font-size: 13.5px !important;
  line-height: 1.62 !important;
  text-align: center;
  box-sizing: border-box;
  white-space: pre-wrap;
  word-break: break-word;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: auto !important;
}
.rosary-mantra-badge-btn.is-long-mantra .rosary-mantra-text::-webkit-scrollbar {
  width: 3px;
}
.rosary-mantra-badge-btn.is-long-mantra .rosary-mantra-text::-webkit-scrollbar-thumb {
  background: rgba(240, 207, 117, 0.35);
  border-radius: 4px;
}

/* Thanh điều khiển tốc độ cuộn */
.rosary-mantra-scroll-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: 4px;
  padding-top: 2px;
}
.rosary-mantra-scroll-controls .scroll-ctrl-btn-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.rosary-mantra-scroll-controls .scroll-ctrl-btn {
  width: 24px;
  height: 24px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--tt-gold);
  background: rgba(240, 207, 117, 0.1);
  border: 1px solid rgba(240, 207, 117, 0.28);
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}
.rosary-mantra-scroll-controls .scroll-ctrl-btn:hover {
  background: rgba(240, 207, 117, 0.25);
  border-color: var(--tt-gold);
  color: #ffffff;
}
.rosary-mantra-scroll-controls .scroll-slider-label {
  font-size: 10.5px;
  color: var(--tt-gold);
  opacity: 0.85;
  flex-shrink: 0;
  user-select: none;
}
.rosary-mantra-scroll-controls input[type="range"] {
  flex: 1;
  max-width: 220px;
  accent-color: var(--tt-gold, #f0cf75);
  height: 4px;
  cursor: pointer;
}
.rosary-mantra-scroll-controls .scroll-speed-status {
  font-size: 10px;
  font-weight: 600;
  color: var(--tt-gold-bright, #ffd269);
  min-width: 48px;
  text-align: left;
  user-select: none;
}

/* --- Thư Viện Câu Chú: Giao Diện Full Màn Hình Chuẩn Apple Native (Full Screen Modal) --- */
/* =========================================================
   MODAL THƯ VIỆN CÂU CHÚ & HỒNG DANH (CHUẨN APPLE NATIVE PRO)
   ========================================================= */
.mantra-library-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 2147483646 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transition: opacity 0.28s cubic-bezier(0.2, 0.9, 0.3, 1), visibility 0.28s cubic-bezier(0.2, 0.9, 0.3, 1) !important;
  padding: 16px;
  box-sizing: border-box;
}

.mantra-library-overlay:not(.active) {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.mantra-library-overlay:not(.active) .mantra-library-modal {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(100vh) !important;
}

.mantra-library-overlay.active {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

/* Hộp Modal Thư Viện: Centered Card trên Desktop, Bottom Sheet trên Mobile */
.mantra-library-modal {
  width: 100%;
  max-width: 580px;
  height: 680px;
  max-height: 88vh;
  max-height: 88dvh;
  background: linear-gradient(165deg, rgba(30, 20, 12, 0.98) 0%, rgba(16, 10, 5, 0.99) 100%);
  border: 1px solid rgba(240, 207, 117, 0.35);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.88), 0 0 35px rgba(240, 207, 117, 0.12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
  padding: 16px 18px 14px 18px;
  transform: scale(0.95) translateY(14px);
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mantra-library-overlay.active .mantra-library-modal {
  transform: scale(1) translateY(0);
}

/* Trên màn hình điện thoại (Apple iOS Bottom Sheet Detent) */
@media (max-width: 640px) {
  .mantra-library-overlay {
    align-items: flex-end;
    padding: 0;
  }
  .mantra-library-modal {
    max-width: 100%;
    width: 100%;
    height: 90vh;
    height: 90dvh;
    max-height: 92dvh;
    border-radius: 22px 22px 0 0;
    border-bottom: none;
    border-left: none;
    border-right: none;
    padding: 10px 16px max(18px, env(safe-area-inset-bottom, 16px)) 16px;
    transform: translateY(100%);
    transition: transform 0.32s cubic-bezier(0.2, 0.9, 0.3, 1);
  }
  .mantra-library-overlay.active .mantra-library-modal {
    transform: translateY(0);
  }
}

/* Apple Drag Handle */
.mantra-library-modal .sheet-drag-handle {
  display: none;
}
@media (max-width: 640px) {
  .mantra-library-modal .sheet-drag-handle {
    display: block;
    width: 38px;
    height: 5px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2.5px;
    margin: 2px auto 10px auto;
    flex-shrink: 0;
  }
}

/* Header Modal */
.mantra-library-modal .sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(240, 207, 117, 0.18);
  flex-shrink: 0;
}
.mantra-library-modal .sheet-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--tt-gold-bright, #ffd269);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.2px;
}
.mantra-library-modal .sheet-title .lib-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--tt-gold);
  color: #1a120b;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 10px;
  line-height: 1.2;
}
.mantra-library-modal .sheet-close-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--tt-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}
.mantra-library-modal .sheet-close-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  transform: scale(1.08);
}

/* Light Theme Support */
html.theme-light .mantra-library-overlay,
body.theme-light .mantra-library-overlay {
  background: rgba(30, 20, 10, 0.55);
}
html.theme-light .mantra-library-modal,
body.theme-light .mantra-library-modal {
  background: linear-gradient(165deg, rgba(255, 253, 248, 0.99) 0%, rgba(248, 243, 233, 0.99) 100%);
  border-color: rgba(184, 120, 32, 0.28);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18), 0 0 25px rgba(184, 120, 32, 0.08);
}
html.theme-light .mantra-library-modal .sheet-drag-handle {
  background: rgba(0, 0, 0, 0.22);
}
html.theme-light .mantra-library-modal .sheet-close-btn {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.1);
  color: #555;
}

/* Apple Native Search Field */
.mantra-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(240, 207, 117, 0.2);
  border-radius: 12px;
  height: 38px;
  padding: 0 12px;
  margin: 0 0 10px 0;
  flex-shrink: 0;
  transition: all 0.2s ease;
}
.mantra-search-wrap:focus-within {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--tt-gold);
  box-shadow: 0 0 0 1px var(--tt-gold), 0 2px 10px rgba(0, 0, 0, 0.25);
}
.mantra-search-wrap .search-icon {
  font-size: 13px;
  color: var(--tt-text-muted);
  margin-right: 8px;
  opacity: 0.8;
}
.mantra-search-wrap input {
  flex: 1;
  height: 100%;
  background: transparent;
  border: none;
  color: var(--tt-text-title, #ffffff);
  font-size: 13px;
  outline: none;
  font-family: inherit;
}
.mantra-search-wrap input::placeholder {
  color: var(--tt-text-muted);
  opacity: 0.7;
}
.mantra-search-wrap .search-clear-btn {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 0;
  font-size: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.mantra-search-wrap .search-clear-btn:hover {
  background: rgba(255, 255, 255, 0.35);
}
html.theme-light .mantra-search-wrap {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(184, 120, 32, 0.24);
}
html.theme-light .mantra-search-wrap input {
  color: #2b2318;
}

/* Apple Segmented Control Category Tabs */
.mantra-cat-tabs {
  display: flex;
  gap: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 3px;
  overflow-x: auto;
  flex-shrink: 0;
  margin-bottom: 10px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.mantra-cat-tabs::-webkit-scrollbar {
  display: none;
}
.mantra-tab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 11px;
  border-radius: 9px;
  border: none;
  background: transparent;
  color: var(--tt-text-muted);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
  flex: 0 0 auto;
}
.mantra-tab-btn:hover {
  color: var(--tt-text-title);
  background: rgba(255, 255, 255, 0.05);
}
.mantra-tab-btn.active {
  background: var(--tt-gold);
  color: #1a120b !important;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
html.theme-light .mantra-cat-tabs {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.06);
}
html.theme-light .mantra-tab-btn.active,
body.theme-light .mantra-tab-btn.active {
  background: #b48325;
  color: #ffffff !important;
}

/* Danh Sách Thẻ Câu Chú Tự Động Chiếm Trọn Chiều Cao (Flex-1) - Không Co Giật */
.mantra-cards-list {
  flex: 1 1 0%;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 4px;
  padding-bottom: 50px;
  margin-bottom: 6px;
}
.mantra-cards-list::-webkit-scrollbar {
  width: 4px;
}
.mantra-cards-list::-webkit-scrollbar-thumb {
  background: rgba(240, 207, 117, 0.25);
  border-radius: 4px;
}

/* Thẻ Câu Chú Chuẩn Apple Inset Row: Thoáng đãng, không icon, không in đậm, đọc mượt 3-4 dòng */
.mantra-card-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 13px 15px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(240, 207, 117, 0.16);
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}
.mantra-card-item:hover {
  background: rgba(240, 207, 117, 0.07);
  border-color: rgba(240, 207, 117, 0.38);
  transform: translateY(-1px);
}
.mantra-card-item:active {
  transform: scale(0.985);
  background: rgba(240, 207, 117, 0.12);
}
.mantra-card-item.active {
  background: rgba(240, 207, 117, 0.09);
  border-color: var(--tt-gold);
  box-shadow: 0 0 16px rgba(240, 207, 117, 0.2);
}
html.theme-light .mantra-card-item {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(184, 120, 32, 0.18);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
html.theme-light .mantra-card-item:hover {
  background: rgba(240, 207, 117, 0.14);
}
html.theme-light .mantra-card-item.active {
  background: rgba(240, 207, 117, 0.2);
  border-color: #b48325;
}

.mantra-card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.mantra-card-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.m-cat-tag {
  background: rgba(255, 255, 255, 0.07);
  color: var(--tt-text-muted);
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 500;
}
.m-name-tag {
  background: rgba(240, 207, 117, 0.12);
  color: var(--tt-gold-bright, #ffd269);
  border: 0.8px solid rgba(240, 207, 117, 0.25);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}
.m-count-tag {
  color: var(--tt-gold);
  font-weight: 600;
  background: rgba(240, 207, 117, 0.08);
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 10.5px;
}
.m-freq-tag {
  color: #ffb300;
  font-weight: 600;
  background: rgba(255, 179, 0, 0.12);
  border: 0.8px solid rgba(255, 179, 0, 0.3);
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 10.5px;
}
.m-active-tag {
  font-size: 10.5px;
  font-weight: 600;
  color: #1a120b;
  background: var(--tt-gold);
  padding: 2px 8px;
  border-radius: 6px;
  box-shadow: 0 0 8px var(--tt-gold-glow);
  white-space: nowrap;
  flex-shrink: 0;
}
html.theme-light .m-active-tag,
body.theme-light .m-active-tag {
  background: #b48325;
  color: #ffffff !important;
}

.mantra-card-body-text {
  font-size: 13.5px;
  font-weight: 400; /* Nhẹ nhàng, thanh thoát, không in đậm */
  color: var(--tt-text-title, #f5f0e8);
  line-height: 1.68; /* Thoáng đãng, đọc mượt 3 dòng */
  letter-spacing: 0.2px;
  display: -webkit-box;
  -webkit-line-clamp: 3; /* Chỉ tóm gọn dấu 3 chấm ở trong Thư Viện Câu Chú */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
}
.mantra-card-item.active .mantra-card-body-text {
  color: #ffffff;
}
html.theme-light .mantra-card-body-text {
  color: #2b2318;
}
html.theme-light .mantra-card-item.active .mantra-card-body-text {
  color: #8c5b05;
}

.mantra-empty-notice {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 100%;
  min-height: 180px;
  padding: 32px 16px;
  color: var(--tt-text-muted);
  font-size: 13px;
  line-height: 1.6;
}

.mantra-sheet-footer {
  flex-shrink: 0;
  padding-top: 8px;
  padding-bottom: max(4px, env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(240, 207, 117, 0.14);
  text-align: center;
}
.mantra-sheet-footer .footer-tip {
  font-size: 11px;
  color: var(--tt-text-muted);
  font-style: italic;
  opacity: 0.85;
}

.rosary-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 12px 0;
}
.rosary-stat-cell {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--tt-card-border);
  border-radius: 10px;
  padding: 8px 6px;
  text-align: center;
}
html.theme-light .rosary-stat-cell,
body.theme-light .rosary-stat-cell {
  background: rgba(180, 131, 37, 0.05);
}
.rosary-stat-num {
  font-size: 17px;
  font-weight: 800;
  color: var(--tt-gold);
  line-height: 1.2;
}
.rosary-stat-label {
  font-size: 10.5px;
  color: var(--tt-text-muted);
  margin-top: 3px;
}

/* KINH LUÂN (TIBETAN PRAYER WHEEL) */
.prayer-wheel-stage {
  position: relative;
  width: 260px;
  height: 284px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  user-select: none;
  touch-action: none;
  cursor: grab;
}
.prayer-wheel-stage:active {
  cursor: grabbing;
}
.wheel-aura-glow {
  position: absolute;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 230, 140, 0.42) 0%, rgba(212, 160, 23, 0.22) 50%, rgba(212, 160, 23, 0) 72%);
  pointer-events: none;
  opacity: 0.7;
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.wheel-aura-glow.glow-burst {
  opacity: 1;
  transform: scale(1.35);
}

/* Đỉnh tháp Bảo Châu Tây Tạng (Tibetan Stupa Finial) */
.wheel-finial-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 4;
  margin-bottom: -2px;
}
.wheel-jewel {
  width: 10px;
  height: 11px;
  border-radius: 50% 50% 38% 38%;
  background: radial-gradient(circle at 35% 28%, #ffaaaa 0%, #e82020 55%, #500505 100%);
  box-shadow: 0 0 8px rgba(255, 60, 60, 0.85), 0 0 14px rgba(245, 212, 122, 0.5);
  border: 0.8px solid #ffcccc;
  margin-bottom: -1px;
}
.wheel-jewel-seat {
  width: 14px;
  height: 3.5px;
  background: linear-gradient(90deg, #8c5b08, #f5d47a 50%, #8c5b08);
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.4);
  margin-bottom: -1px;
}
.wheel-finial-spire {
  width: 18px;
  height: 16px;
  background: linear-gradient(180deg, #fffbe0 0%, #f5d47a 25%, #d4a017 55%, #7a5409 100%);
  clip-path: polygon(50% 0%, 15% 100%, 85% 100%);
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.45));
}
.wheel-finial-base {
  width: 32px;
  height: 8px;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  background: linear-gradient(90deg, #593908, #f5d47a 30%, #fffbe0 50%, #d4a017 75%, #593908);
  border-radius: 4px;
  border: 1px solid rgba(255, 240, 180, 0.9);
  box-shadow: 0 2px 5px rgba(0,0,0,0.4);
}
.stupa-gem {
  display: inline-block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  box-shadow: 0 0 2px rgba(0,0,0,0.5);
}
.gem-coral {
  background: radial-gradient(circle at 35% 30%, #ff7675, #d63031 70%, #631212 100%);
}
.gem-turq {
  background: radial-gradient(circle at 35% 30%, #55efc4, #1abc9c 70%, #0c5748 100%);
}
.gem-gold {
  background: radial-gradient(circle at 35% 30%, #fff6cc, #f5d47a 70%, #8c5b08 100%);
}

/* Nắp trên dạng vòm bảo tán đính ngọc quý (Top Canopy Cap) */
.wheel-cap-top {
  width: 136px;
  height: 18px;
  background: linear-gradient(180deg, #fff0ba 0%, #cf9c25 45%, #5e3b07 100%);
  border-radius: 14px 14px 2px 2px;
  border: 1.2px solid rgba(255, 235, 170, 0.85);
  box-shadow: 0 4px 10px rgba(0,0,0,0.4), inset 0 2px 4px rgba(255,255,255,0.7);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  z-index: 3;
}
.wheel-cap-gems-row {
  position: absolute;
  width: 118px;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  z-index: 4;
}
.wheel-cap-top .wheel-cap-gems-row {
  bottom: 4.5px;
}
.wheel-cap-bottom .wheel-cap-gems-row {
  top: 4.5px;
}
.cap-gem {
  display: inline-block;
  width: 3.5px;
  height: 3.5px;
  border-radius: 50%;
  box-shadow: 0 0.8px 1.5px rgba(0,0,0,0.5);
}
.wheel-cap-rim {
  width: 100%;
  height: 2.8px;
  background: repeating-linear-gradient(90deg, #ffe699 0px, #ffe699 3px, #422803 3px, #422803 5px);
  opacity: 0.9;
}

/* Thân trụ kinh luân - Tỷ lệ vàng và nẹp đồng chạm nổi tinh xảo */
.wheel-drum-cylinder {
  position: relative;
  width: 126px;
  height: 122px;
  overflow: hidden;
  border-left: 2px solid #422603;
  border-right: 2px solid #422603;
  box-shadow: inset 24px 0 26px rgba(0, 0, 0, 0.82), inset -24px 0 26px rgba(0, 0, 0, 0.82), 0 8px 24px rgba(0,0,0,0.5);
  background: linear-gradient(90deg, #2b1803 0%, #63400b 10%, #d4a017 28%, #fff0b8 48%, #ffffff 52%, #e0ac2b 72%, #5c3a07 92%, #241402 100%);
  display: flex;
  align-items: center;
  z-index: 2;
}
.wheel-drum-trim-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  z-index: 4;
  pointer-events: none;
  background: repeating-linear-gradient(90deg, #ffeaa7 0px, #ffeaa7 2.5px, #784805 2.5px, #784805 4.5px);
  box-shadow: 0 1.5px 3px rgba(0,0,0,0.6);
  border-bottom: 0.5px solid rgba(255,255,255,0.4);
}
.wheel-drum-trim-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  z-index: 4;
  pointer-events: none;
  background: repeating-linear-gradient(90deg, #ffeaa7 0px, #ffeaa7 2.5px, #784805 2.5px, #784805 4.5px);
  box-shadow: 0 -1.5px 3px rgba(0,0,0,0.6);
  border-top: 0.5px solid rgba(255,255,255,0.4);
}
.wheel-cylinder-sheen {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(0,0,0,0.35) 0%, rgba(255,255,255,0.16) 47%, rgba(255,255,255,0.28) 52%, rgba(0,0,0,0.4) 100%);
  box-shadow: inset 0 3px 6px rgba(0,0,0,0.4), inset 0 -3px 6px rgba(0,0,0,0.4);
  z-index: 3;
}
.wheel-mantra-strip {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: max-content;
  height: 100%;
  padding: 3px 0;
  will-change: transform;
}
/* Dòng sát nhau hơn, chữ thanh thoát tinh tế */
.wheel-mantra-row {
  display: flex;
  white-space: nowrap;
  font-family: 'Devanagari MT', 'Nirmala UI', 'Mangal', 'Segoe UI', serif;
  font-size: 6.8px;
  line-height: 1.0;
  color: #331d04;
  text-shadow: 0 0.8px 0 rgba(255, 245, 195, 0.65);
  font-weight: 700;
  letter-spacing: 0.2px;
  padding: 0;
  margin: 0;
}
.wheel-mantra-row .m-part {
  display: inline-block;
  white-space: nowrap;
  flex-shrink: 0;
}
.wheel-mantra-row.stagger-1 { margin-left: -12px; }
.wheel-mantra-row.stagger-2 { margin-left: -24px; }
.wheel-mantra-row.stagger-3 { margin-left: -36px; }
.wheel-mantra-row.stagger-4 { margin-left: -18px; }
.wheel-mantra-row.stagger-5 { margin-left: -30px; }
.wheel-mantra-row.stagger-6 { margin-left: -42px; }
.wheel-mantra-row.stagger-7 { margin-left: -15px; }
.wheel-mantra-row.stagger-8 { margin-left: -28px; }
.wheel-mantra-row.stagger-9 { margin-left: -40px; }
.wheel-mantra-row.stagger-10 { margin-left: -22px; }
.wheel-mantra-row.stagger-11 { margin-left: -34px; }
.wheel-mantra-row.stagger-12 { margin-left: -14px; }
.wheel-mantra-row.stagger-13 { margin-left: -26px; }
.wheel-mantra-row.stagger-14 { margin-left: -38px; }

/* Nắp dưới gờ viền đồng chạm ngọc */
.wheel-cap-bottom {
  width: 136px;
  height: 18px;
  background: linear-gradient(180deg, #5e3b07 0%, #cf9c25 55%, #fff0ba 100%);
  border-radius: 2px 2px 14px 14px;
  border: 1.2px solid rgba(255, 235, 170, 0.85);
  box-shadow: 0 4px 10px rgba(0,0,0,0.4), inset 0 -2px 4px rgba(255,255,255,0.6);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  z-index: 3;
}

/* Chân đế Tòa sen nhiều tầng trang nghiêm hoàng gia (Tibetan Sacred Lotus Throne) */
.wheel-stand-assembly {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
  margin-top: -1px;
}

/* Cổ trục đồng khảm gờ kim loại và ngọc lam */
.wheel-handle-pillar {
  width: 20px;
  height: 11px;
  background: linear-gradient(90deg, #2b1704 0%, #704514 25%, #ffd285 50%, #704514 75%, #291406 100%);
  border-radius: 2px;
  box-shadow: inset 1px 0 2px rgba(255,230,150,0.35), 0 2px 4px rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  padding: 0 1px;
}
.pillar-collar-ring {
  width: 2.5px;
  height: 8px;
  background: linear-gradient(180deg, #fff0ba, #d49e1e 60%, #4a2b03);
  border-radius: 1px;
  box-shadow: 0 0 1.5px rgba(0,0,0,0.5);
}
.pillar-gem {
  width: 3.5px;
  height: 3.5px;
  border-radius: 50%;
  box-shadow: 0 0 2px rgba(0,0,0,0.6);
}

/* Đài Sen Đôi Ngửa - Úp (Double Visvapadma Lotus Throne) */
.wheel-lotus-assembly {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  margin-top: -1px;
}

/* Cánh sen ngửa */
.wheel-lotus-petals-up {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 1.5px;
  height: 7.5px;
}
.lotus-petal {
  width: 8px;
  height: 7px;
  background: linear-gradient(180deg, #fff8d6 0%, #e5b22b 45%, #633904 100%);
  border-radius: 50% 50% 18% 18%;
  border-top: 0.8px solid #ffffff;
  box-shadow: 0 -1px 2px rgba(0,0,0,0.3), inset 0 1px 1.5px rgba(255,255,255,0.85);
}
.lotus-petal.active {
  width: 9.5px;
  height: 7.8px;
  z-index: 1;
}
.lotus-petal.center-prominent {
  width: 11px;
  height: 8.5px;
  z-index: 2;
  border-top: 1px solid #ffffff;
  box-shadow: 0 -1.5px 3px rgba(0,0,0,0.4), inset 0 1.2px 2px rgba(255,255,255,0.95);
}

/* Vòng thắt eo đài sen đính chuỗi ngọc */
.wheel-lotus-bead-row {
  width: 62px;
  height: 4.5px;
  background: linear-gradient(90deg, #3d2002, #cf9c25 25%, #fff6cc 50%, #cf9c25 75%, #3d2002);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  box-shadow: 0 1px 3px rgba(0,0,0,0.45), inset 0 0.8px 1.5px rgba(255,255,255,0.7);
  z-index: 3;
  margin: -1px 0;
}
.lotus-gem {
  width: 2.8px;
  height: 2.8px;
  border-radius: 50%;
  box-shadow: 0 0.5px 1px rgba(0,0,0,0.5);
}

/* Cánh sen úp */
.wheel-lotus-petals-down {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 1.5px;
  height: 7.5px;
}
.lotus-petal-down {
  width: 9px;
  height: 7px;
  background: linear-gradient(180deg, #633904 0%, #e5b22b 55%, #fff8d6 100%);
  border-radius: 18% 18% 50% 50%;
  border-bottom: 0.8px solid #ffffff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.35), inset 0 -1px 1.5px rgba(255,255,255,0.75);
}
.lotus-petal-down.active {
  width: 10.5px;
  height: 7.8px;
  z-index: 1;
}
.lotus-petal-down.center-prominent {
  width: 12px;
  height: 8.5px;
  z-index: 2;
  border-bottom: 1px solid #ffffff;
  box-shadow: 0 1.5px 3.5px rgba(0,0,0,0.4), inset 0 -1.2px 2px rgba(255,255,255,0.9);
}

/* Thắt eo bệ báu chạm dải hạt nổi */
.wheel-base-neck {
  width: 44px;
  height: 5px;
  background: linear-gradient(90deg, #361c02, #b8860b 35%, #ffd875 50%, #b8860b 65%, #361c02);
  border-radius: 2px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -1px;
}
.neck-beaded-frieze {
  width: 38px;
  height: 2px;
  background: repeating-linear-gradient(90deg, #fff2be 0px, #fff2be 2.2px, #3d2203 2.2px, #3d2203 4px);
  border-radius: 1px;
  opacity: 0.9;
}

/* Bệ báu tầng 1 chạm khắc hoa văn kim cương */
.wheel-pedestal-tier1 {
  width: 108px;
  height: 10.5px;
  background: linear-gradient(180deg, #fff8d6 0%, #d4a017 38%, #784805 85%, #3b2002 100%);
  border-radius: 5px 5px 2px 2px;
  border: 1px solid rgba(255, 235, 170, 0.9);
  box-shadow: 0 3px 7px rgba(0,0,0,0.4), inset 0 1.5px 2px rgba(255,255,255,0.85);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.pedestal-relief-pattern {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, transparent 0px, transparent 6px, rgba(255,255,255,0.22) 6px, rgba(255,255,255,0.22) 8px, transparent 8px, transparent 14px, rgba(0,0,0,0.3) 14px, rgba(0,0,0,0.3) 16px);
  pointer-events: none;
}

/* Bệ báu tầng 2 khảm bảo ngọc phong thủy Tây Tạng */
.wheel-pedestal-tier2 {
  width: 148px;
  height: 15px;
  background: linear-gradient(90deg, #261200 0%, #633a05 10%, #d49e1e 26%, #fff6d8 48%, #ffffff 52%, #e0ac2b 74%, #633a05 90%, #261200 100%);
  border-radius: 3px 3px 5px 5px;
  border: 1.2px solid rgba(255, 235, 170, 0.85);
  box-shadow: 0 5px 14px rgba(0,0,0,0.52), inset 0 2px 3px rgba(255,255,255,0.75);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding-top: 2px;
}
.pedestal-gems-row {
  width: 122px;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
}
.pedestal-gem {
  width: 3.6px;
  height: 3.6px;
  border-radius: 50%;
  box-shadow: 0 0.8px 1.8px rgba(0,0,0,0.6);
}
.pedestal-base-rim {
  width: 100%;
  height: 2.5px;
  background: repeating-linear-gradient(90deg, #ffeaa7 0px, #ffeaa7 3px, #3b2003 3px, #3b2003 5px);
  opacity: 0.92;
}

/* Chân đế đồng đúc nguyên khối */
.wheel-pedestal-foot {
  width: 164px;
  height: 4.5px;
  background: linear-gradient(180deg, #5c3707 0%, #211201 100%);
  border-radius: 2px 2px 6px 6px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.6);
  border-top: 0.7px solid rgba(255,235,160,0.45);
  margin-top: -0.5px;
}

/* Bóng đổ hoàng kim phản chiếu xuống mặt sàn */
.wheel-base-shadow {
  width: 184px;
  height: 11px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.65) 0%, rgba(212,160,23,0.18) 40%, rgba(0,0,0,0) 75%);
  margin-top: -2.5px;
}

/* Quả lắc tạ kinh luân 3D văng ly tâm dài hơn, chân thực (3D Centrifugal Orbiting Pendulum) */
.wheel-pendulum-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 260px;
  height: 284px;
  pointer-events: none;
  overflow: visible;
  z-index: 5;
  will-change: filter;
  transition: filter 0.15s ease;
}

.wheel-direction-hint {
  font-size: 11px;
  color: var(--tt-gold);
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: rgba(240, 207, 117, 0.08);
  padding: 4px 12px;
  border-radius: 12px;
}

.phapbao-action-btn-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 12px;
}
.phapbao-btn {
  background: rgba(240, 207, 117, 0.1);
  border: 1px solid var(--tt-card-border);
  color: var(--tt-text-title);
  padding: 6px 13px;
  border-radius: 10px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
  user-select: none;
}
.phapbao-btn:active {
  transform: scale(0.95);
}
.phapbao-btn.primary {
  background: linear-gradient(135deg, rgba(240, 207, 117, 0.25), rgba(184, 134, 11, 0.35));
  border-color: var(--tt-gold);
  color: var(--tt-gold-bright);
}
.phapbao-btn.active-toggle {
  background: var(--tt-gold) !important;
  color: #1a120b !important;
  border-color: var(--tt-gold) !important;
  box-shadow: 0 0 14px var(--tt-gold-glow);
}
.phapbao-btn.btn-save-gold {
  background: linear-gradient(135deg, rgba(212, 160, 23, 0.28) 0%, rgba(255, 235, 160, 0.18) 100%);
  border: 1px solid rgba(245, 212, 122, 0.7);
  color: var(--tt-gold-bright, #ffd269);
  box-shadow: 0 2px 8px rgba(212, 160, 23, 0.2);
  font-weight: 800;
}
.phapbao-btn.btn-save-gold:hover {
  background: linear-gradient(135deg, rgba(212, 160, 23, 0.45) 0%, rgba(255, 235, 160, 0.35) 100%);
  border-color: #ffd269;
  box-shadow: 0 4px 14px rgba(212, 160, 23, 0.35);
}
.phapbao-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Badge số lần niệm trên từng danh hiệu */
.mantra-count-badge {
  display: inline-block;
  background: rgba(240, 207, 117, 0.22);
  border: 1px solid rgba(240, 207, 117, 0.45);
  color: var(--tt-gold-bright, #ffd269);
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 800;
  margin-left: 6px;
  line-height: 1.2;
}
.mantra-chip.active .mantra-count-badge {
  background: rgba(0, 0, 0, 0.4);
  border-color: #ffd269;
  color: #ffffff;
}

/* Khung chi tiết biến niệm theo từng câu chú */
.mantra-breakdown-box {
  margin-top: 10px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--tt-card-border);
  border-radius: 10px;
  padding: 10px 12px;
}
.mantra-breakdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.mantra-breakdown-title {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--tt-gold);
  display: flex;
  align-items: center;
  gap: 5px;
}
.mantra-save-status {
  font-size: 10.5px;
  color: var(--tt-text-muted);
}
.mantra-breakdown-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.mantra-breakdown-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 0.8px solid rgba(240, 207, 117, 0.12);
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 11px;
}
.mantra-breakdown-item .m-name {
  color: var(--tt-text-body);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-right: 6px;
}
.mantra-breakdown-item .m-count {
  color: var(--tt-gold);
  font-weight: 700;
  white-space: nowrap;
}

/* =========================================================
   PHÁP BẢO: ĐỊNH DẠNG MÀU SẮC CHUYÊN SÂU SÁNG / TỐI (LIGHT / DARK)
   ========================================================= */
/* 1. Tùy chọn Sáng / Tối trong Action Sheet */
.sheet-theme-options-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.sheet-theme-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--tt-card-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--tt-text-title);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.22s ease;
  user-select: none;
}
.sheet-theme-chip:hover {
  background: rgba(240, 207, 117, 0.14);
  border-color: var(--tt-gold);
  color: var(--tt-gold-bright);
  transform: translateY(-1px);
}
.sheet-theme-chip.active {
  background: linear-gradient(135deg, rgba(212, 160, 23, 0.35), rgba(240, 207, 117, 0.22));
  border-color: var(--tt-gold-bright);
  color: var(--tt-gold-bright);
  box-shadow: 0 0 12px var(--tt-gold-glow);
  font-weight: 700;
}
.sheet-theme-chip .chip-icon {
  font-size: 16px;
  line-height: 1;
}

/* 2. Chuỗi Bồ Đề (Mala Beads) - Chế độ Sáng (Theme Light) */
html.theme-light #card-phapbao-tutap,
body.theme-light #card-phapbao-tutap {
  background: #fffdf9;
  border-color: rgba(196, 142, 45, 0.28);
  box-shadow: 0 4px 22px rgba(180, 130, 30, 0.08);
}
/* Nút Chạm Niệm trong giao diện sáng: Kế thừa chất liệu và tương phản tự khắc */
html.theme-light .mala-center-bead,
body.theme-light .mala-center-bead {
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3), inset 0 2px 6px rgba(255, 255, 255, 0.5);
}
html.theme-light .mala-center-bead #rosary-counter,
body.theme-light .mala-center-bead #rosary-counter {
  font-size: 28px;
  font-weight: 900;
}
html.theme-light .mala-center-bead span:last-child,
body.theme-light .mala-center-bead span:last-child {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.8px;
}
html.theme-light .mala-center-bead #mala-center-icon,
body.theme-light .mala-center-bead #mala-center-icon {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45));
}
html.theme-light .mala-thread-line,
body.theme-light .mala-thread-line {
  stroke: rgba(180, 130, 30, 0.55);
  stroke-width: 1.1;
}

/* 108 Hạt Bồ Đề chưa niệm (êm dịu, tự nhiên) */
html.theme-light .mala-mini-bead,
body.theme-light .mala-mini-bead {
  fill: #f1ebd9 !important;
  stroke: #c2b295 !important;
  stroke-width: 0.65 !important;
  filter: none !important;
}

/* 4 Hạt mốc phân cách chưa niệm */
html.theme-light .mala-mini-bead.is-marker,
body.theme-light .mala-mini-bead.is-marker {
  fill: #ffe4e6 !important;
  stroke: #f43f5e !important;
  stroke-width: 0.8 !important;
}

/* Hạt bồ đề ĐÃ NIỆM QUA: Hiển thị đúng gradient của Pháp Bảo Chất Liệu kèm viền nổi tương phản rõ ràng */
html.theme-light .mala-mini-bead.active,
body.theme-light .mala-mini-bead.active {
  fill: url(#malaActiveGrad) !important;
  stroke: rgba(60, 35, 10, 0.72) !important;
  stroke-width: 0.85 !important;
  filter: drop-shadow(0 1.5px 3px rgba(0, 0, 0, 0.35)) !important;
}

/* Hạt mốc ĐÃ NIỆM QUA: Đỏ ruby đậm nét quý phái */
html.theme-light .mala-mini-bead.is-marker.active,
body.theme-light .mala-mini-bead.is-marker.active {
  fill: #dc2626 !important;
  stroke: #450a0a !important;
  stroke-width: 1.15 !important;
  filter: drop-shadow(0 1.5px 4.5px rgba(220, 38, 38, 0.95)) !important;
}

/* Hạt VỪA CHẠM MỚI NHẤT: Bừng sáng đốm lửa hoàng kim rực rỡ */
html.theme-light .mala-mini-bead.latest-touched,
body.theme-light .mala-mini-bead.latest-touched {
  fill: #fef08a !important;
  stroke: #b45309 !important;
  stroke-width: 1.4 !important;
  filter: drop-shadow(0 0 7px #ea580c) drop-shadow(0 0 12px #f59e0b) !important;
}

/* Chữ thần chú bay lên khi chạm: Màu đỏ chu sa thanh nhã, chữ nhỏ vừa phải, không in đậm */
html.theme-light .floating-mantra-item,
body.theme-light .floating-mantra-item {
  color: #991b1b !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  letter-spacing: 0.25px;
  text-shadow: 0 1px 1.5px #ffffff, 0 0 6px rgba(245, 158, 11, 0.65) !important;
  animation-name: mantraFloatUpLight !important;
}
@keyframes mantraFloatUpLight {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.6) translateY(0);
    filter: drop-shadow(0 1px 2px rgba(153, 27, 27, 0.35));
  }
  20% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.08) translateY(-8px);
    filter: drop-shadow(0 2px 5px rgba(153, 27, 27, 0.55));
  }
  75% {
    opacity: 0.98;
    transform: translate(-50%, -50%) scale(1) translateY(-26px);
    filter: drop-shadow(0 2px 5px rgba(153, 27, 27, 0.45));
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9) translateY(-40px);
  }
}
html.theme-light .rosary-mantra-badge-btn,
body.theme-light .rosary-mantra-badge-btn {
  background: rgba(212, 160, 23, 0.09);
  border-color: rgba(184, 120, 20, 0.38);
}
html.theme-light .rosary-mantra-badge-btn .rosary-mantra-text,
body.theme-light .rosary-mantra-badge-btn .rosary-mantra-text {
  color: #7a4f07 !important;
}
html.theme-light .rosary-mantra-badge-btn .mantra-change-hint,
body.theme-light .rosary-mantra-badge-btn .mantra-change-hint,
html.theme-light .rosary-mantra-badge-btn .mantra-change-pill,
body.theme-light .rosary-mantra-badge-btn .mantra-change-pill {
  background: none;
  border: none;
  color: #7a4f07;
  opacity: 0.75;
}
html.theme-light .rosary-mantra-badge-btn:hover .mantra-change-hint,
body.theme-light .rosary-mantra-badge-btn:hover .mantra-change-hint,
html.theme-light .rosary-mantra-badge-btn:hover .mantra-change-pill,
body.theme-light .rosary-mantra-badge-btn:hover .mantra-change-pill {
  opacity: 1;
}
html.theme-light .rosary-mantra-badge-btn.is-long-mantra,
body.theme-light .rosary-mantra-badge-btn.is-long-mantra {
  background: rgba(212, 160, 23, 0.09);
  border-color: rgba(184, 120, 20, 0.38);
}
html.theme-light .rosary-mantra-badge-btn.is-long-mantra .mantra-name-label {
  color: #7a4f07;
}
html.theme-light .rosary-mantra-badge-btn.is-long-mantra .rosary-mantra-scroll-wrap {
  background: rgba(255, 255, 255, 0.65);
  border-color: rgba(184, 120, 20, 0.25);
}
html.theme-light .rosary-mantra-badge-btn.is-long-mantra .rosary-mantra-scroll-wrap::before {
  background: linear-gradient(to bottom, rgba(255, 250, 240, 0.95), transparent);
}
html.theme-light .rosary-mantra-badge-btn.is-long-mantra .rosary-mantra-scroll-wrap::after {
  background: linear-gradient(to top, rgba(255, 250, 240, 0.95), transparent);
}
html.theme-light .rosary-mantra-scroll-controls .scroll-ctrl-btn {
  color: #7a4f07;
  background: rgba(184, 120, 20, 0.1);
  border-color: rgba(184, 120, 20, 0.28);
}
html.theme-light .rosary-mantra-scroll-controls .scroll-ctrl-btn:hover {
  background: rgba(184, 120, 20, 0.22);
  border-color: #b87814;
}
html.theme-light .rosary-mantra-badge-btn.is-long-mantra .rosary-mantra-header .mantra-change-hint {
  color: #7a4f07;
  background: rgba(184, 120, 20, 0.12);
  border-color: rgba(184, 120, 20, 0.28);
}
html.theme-light .rosary-mantra-scroll-controls .scroll-slider-label {
  color: #7a4f07;
}
html.theme-light .rosary-mantra-scroll-controls input[type="range"] {
  accent-color: #b87814;
}
html.theme-light .rosary-stat-cell,
body.theme-light .rosary-stat-cell {
  background: #ffffff;
  border-color: rgba(196, 142, 45, 0.28);
  box-shadow: 0 2px 6px rgba(180, 130, 30, 0.05);
}
html.theme-light .rosary-stat-num,
body.theme-light .rosary-stat-num {
  color: #8c5b05 !important;
}
html.theme-light .rosary-stat-label,
body.theme-light .rosary-stat-label {
  color: #6e5941 !important;
}
html.theme-light .rosary-tool-icon-btn,
body.theme-light .rosary-tool-icon-btn {
  background: #ffffff;
  border-color: rgba(196, 142, 45, 0.35);
  color: #5a3b06;
  box-shadow: 0 2px 6px rgba(160, 110, 20, 0.08);
}
html.theme-light .rosary-tool-icon-btn:hover,
body.theme-light .rosary-tool-icon-btn:hover {
  background: rgba(240, 207, 117, 0.28);
  border-color: #b8860b;
  color: #3a2202;
}
html.theme-light .rosary-tool-icon-btn.active-toggle,
body.theme-light .rosary-tool-icon-btn.active-toggle {
  background: linear-gradient(135deg, #e5b329, #c48b0a) !important;
  color: #ffffff !important;
  border-color: #ffd866 !important;
  box-shadow: 0 0 12px rgba(212, 160, 23, 0.5) !important;
}
html.theme-light .rosary-save-icon-btn,
body.theme-light .rosary-save-icon-btn {
  background: #ffffff;
  border-color: rgba(196, 142, 45, 0.35);
  color: #786045;
}

/* 3. Kinh Luân (Tibetan Prayer Wheel) - Chế độ Sáng (Theme Light) */
html.theme-light .prayer-wheel-stage,
body.theme-light .prayer-wheel-stage {
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.96) 0%, rgba(253, 248, 235, 0.85) 48%, rgba(245, 234, 207, 0.42) 68%, transparent 72%);
  border-radius: 24px;
}
html.theme-light .wheel-aura-glow,
body.theme-light .wheel-aura-glow {
  background: radial-gradient(circle, rgba(255, 215, 0, 0.45) 0%, rgba(240, 180, 30, 0.22) 46%, rgba(212, 160, 23, 0) 70%);
  opacity: 0.85;
}
html.theme-light .wheel-direction-hint,
body.theme-light .wheel-direction-hint {
  background: rgba(184, 134, 11, 0.12);
  border: 1px solid rgba(184, 134, 11, 0.25);
  color: #6b4306;
  font-weight: 600;
}
html.theme-light .wheel-drum-cylinder,
body.theme-light .wheel-drum-cylinder {
  box-shadow: inset 18px 0 22px rgba(60, 35, 3, 0.65), inset -18px 0 22px rgba(60, 35, 3, 0.65), 0 8px 24px rgba(180, 130, 30, 0.28);
}
html.theme-light .wheel-base-shadow,
body.theme-light .wheel-base-shadow {
  background: radial-gradient(ellipse at center, rgba(120, 80, 20, 0.42) 0%, rgba(212, 160, 23, 0.15) 45%, rgba(0,0,0,0) 75%);
}

/* 4. Action Sheet & Tinh Chỉnh trong Chế Độ Sáng */
html.theme-light .sheet-theme-chip,
body.theme-light .sheet-theme-chip {
  background: #ffffff;
  border-color: rgba(184, 120, 32, 0.24);
  color: #4a3418;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
html.theme-light .sheet-theme-chip:hover,
body.theme-light .sheet-theme-chip:hover {
  background: rgba(240, 207, 117, 0.22);
  border-color: #b8860b;
  color: #855307;
}
html.theme-light .sheet-theme-chip.active,
body.theme-light .sheet-theme-chip.active {
  background: linear-gradient(135deg, #b8860b, #9a6e18);
  border-color: #855307;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(154, 110, 24, 0.35);
}
html.theme-light .mala-options-overlay,
body.theme-light .mala-options-overlay {
  background: rgba(30, 20, 10, 0.52);
}
html.theme-light .mala-options-sheet,
body.theme-light .mala-options-sheet {
  background: linear-gradient(180deg, #fffdf8 0%, #f9f4ea 100%);
  border-color: rgba(184, 120, 32, 0.32);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.18), 0 0 25px rgba(184, 120, 32, 0.08);
  color: #2b1f11;
}
html.theme-light .mala-options-sheet .sheet-drag-handle {
  background: rgba(0, 0, 0, 0.22);
}
html.theme-light .mala-options-sheet .sheet-header {
  border-bottom-color: rgba(184, 120, 32, 0.18);
}
html.theme-light .mala-options-sheet .sheet-title {
  color: #8c5b05;
}
html.theme-light .mala-options-sheet .sheet-close-btn {
  color: #666;
}
html.theme-light .mala-options-sheet .sheet-close-btn:hover {
  color: #111;
}
html.theme-light .mala-options-sheet .sheet-group-label {
  color: #8c5b05;
}
html.theme-light .mala-options-sheet .sheet-action-item {
  background: #ffffff;
  border-color: rgba(184, 120, 32, 0.22);
  color: #3b2812;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
html.theme-light .mala-options-sheet .sheet-action-item:hover {
  background: rgba(184, 120, 32, 0.12);
  border-color: #b8860b;
  color: #8c5b05;
}
html.theme-light .mala-mat-chip {
  background: #ffffff;
  border-color: rgba(184, 120, 32, 0.22);
  color: #5c4322;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
html.theme-light .mala-mat-chip:hover {
  background: rgba(184, 120, 32, 0.12);
  border-color: #b8860b;
  color: #8c5b05;
}
html.theme-light .mala-mat-chip.active {
  background: rgba(184, 120, 32, 0.18);
  border-color: #b8860b;
  color: #8c5b05;
}

/* 5. Chế Độ Thiền Định Zen Mode trong Chế Độ Sáng */
html.theme-light .rosary-zen-active,
body.theme-light .rosary-zen-active,
html.theme-light .wheel-zen-active,
body.theme-light .wheel-zen-active,
html.theme-light .zen-meditation-active,
body.theme-light .zen-meditation-active {
  background: radial-gradient(circle at 50% 45%, #faf6ee 0%, #ede3d1 70%, #d8caa5 100%) !important;
}
html.theme-light .rosary-zen-active .zen-top-exit-btn,
body.theme-light .rosary-zen-active .zen-top-exit-btn,
html.theme-light .wheel-zen-active .zen-top-exit-btn,
body.theme-light .wheel-zen-active .zen-top-exit-btn,
html.theme-light .zen-meditation-active .zen-top-exit-btn,
body.theme-light .zen-meditation-active .zen-top-exit-btn,
html.theme-light .zen-meditation-active .zen-top-theme-btn,
body.theme-light .zen-meditation-active .zen-top-theme-btn {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(184, 134, 11, 0.3);
  color: #4a3318;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}
html.theme-light .rosary-zen-active .rosary-mantra-text,
body.theme-light .rosary-zen-active .rosary-mantra-text {
  color: #6b4306 !important;
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.8) !important;
}
html.theme-light .mala-dedication-modal,
body.theme-light .mala-dedication-modal {
  background: rgba(30, 20, 10, 0.52);
}
html.theme-light .mala-dedication-card,
body.theme-light .mala-dedication-card {
  background: linear-gradient(145deg, #fffdfa 0%, #f7f0e3 100%);
  border-color: #c48b0a;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2), 0 0 25px rgba(196, 139, 10, 0.15);
  color: #2b1d0c;
}
html.theme-light .dedication-title,
body.theme-light .dedication-title {
  color: #7a4a03;
}
html.theme-light .dedication-verse,
body.theme-light .dedication-verse {
  color: #4a3418;
  background: rgba(184, 120, 32, 0.06);
  border-color: rgba(184, 120, 32, 0.25);
}


/* ==========================================================================
   CSS PHONG CÁCH APPLE NATIVE CHO TAB PHẬT PHÁP (9 MỤC NÂNG CẤP)
   ========================================================================== */

/* 1. Header Chào & Tìm kiếm nhanh tối giản */
.phatgiao-hero-header {
  margin-bottom: 12px;
}
.phatgiao-greeting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 6px;
}
.phatgiao-greeting-text {
  font-size: 15px;
  font-weight: 800;
  color: var(--tt-text-title);
  letter-spacing: -0.2px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.phatgiao-date-pill {
  font-size: 11px;
  font-weight: 700;
  color: var(--tt-gold);
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid var(--tt-card-border);
  padding: 3px 9px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.phatgiao-search-wrap {
  position: relative;
  width: 100%;
}
.phatgiao-search-box {
  display: flex;
  align-items: center;
  background: var(--tt-card-bg-subtle, rgba(255, 255, 255, 0.06));
  border: 1px solid var(--tt-card-border);
  border-radius: 12px;
  padding: 8px 12px;
  gap: 8px;
  transition: all 0.25s ease;
}
.phatgiao-search-box:focus-within {
  border-color: var(--tt-gold);
  background: var(--tt-card-bg);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.18);
}
.phatgiao-search-icon {
  font-size: 15px;
  color: var(--tt-text-muted);
  flex-shrink: 0;
}
.phatgiao-search-input {
  border: none;
  background: transparent;
  color: var(--tt-text-title);
  font-size: 13px;
  width: 100%;
  outline: none;
  font-family: inherit;
}
.phatgiao-search-input::placeholder {
  color: var(--tt-text-muted);
  opacity: 0.85;
}

/* 2. Vòng Tinh Tấn 7 Ngày (Spiritual Streak & Habit Rings) */
.spiritual-streak-card {
  padding: 14px 16px;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
}
.streak-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.streak-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.streak-title-icon {
  font-size: 20px;
  filter: drop-shadow(0 2px 6px rgba(212, 175, 55, 0.4));
}
.streak-main-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--tt-text-title);
  line-height: 1.2;
}
.streak-subtitle {
  font-size: 10.5px;
  color: var(--tt-text-muted);
  margin-top: 2px;
}
.streak-badge-fire {
  font-size: 11.5px;
  font-weight: 800;
  color: #ff9f1c;
  background: rgba(255, 159, 28, 0.12);
  border: 1px solid rgba(255, 159, 28, 0.28);
  padding: 3px 8px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.streak-days-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}
.streak-day-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 2px;
  border-radius: 10px;
  background: var(--tt-card-bg-subtle, rgba(255, 255, 255, 0.03));
  border: 1px solid transparent;
  transition: all 0.25s ease;
}
.streak-day-item.today {
  border-color: rgba(212, 175, 55, 0.45);
  background: rgba(212, 175, 55, 0.08);
}
.streak-day-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--tt-text-muted);
}
.streak-day-item.today .streak-day-label {
  color: var(--tt-gold);
  font-weight: 800;
}
.streak-lotus-ring {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  background: var(--tt-card-bg);
  border: 1.5px dashed var(--tt-card-border);
  color: var(--tt-text-muted);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.streak-day-item.completed .streak-lotus-ring {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.25), rgba(240, 207, 117, 0.35));
  border: 1.5px solid var(--tt-gold);
  color: var(--tt-gold);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.35);
  transform: scale(1.05);
}
.streak-day-item.today.completed .streak-lotus-ring {
  animation: streakLotusPulse 2.4s infinite ease-in-out;
}
@keyframes streakLotusPulse {
  0%, 100% { box-shadow: 0 0 8px rgba(212, 175, 55, 0.35); }
  50% { box-shadow: 0 0 18px rgba(212, 175, 55, 0.65); transform: scale(1.1); }
}
.streak-progress-bar-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--tt-text-muted);
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed var(--tt-card-border);
}
.streak-progress-track {
  width: 120px;
  height: 6px;
  border-radius: 3px;
  background: var(--tt-card-bg-subtle, rgba(255, 255, 255, 0.1));
  overflow: hidden;
  position: relative;
}
.streak-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #d4af37, #f5d77f);
  border-radius: 3px;
  transition: width 0.4s ease;
}

/* 4. Không Gian Tụng Niệm (Kinh Chú Dạng Tên Gọn Gàng) */
.sutra-resume-box {
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 12px;
  padding: 8px 12px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-decoration: none;
  transition: all 0.2s ease;
}
.sutra-resume-box:hover {
  background: rgba(212, 175, 55, 0.14);
  border-color: var(--tt-gold);
}
.sutra-resume-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.sutra-resume-play {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--tt-gold);
  color: #1a140c;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}
.sutra-resume-info {
  min-width: 0;
}
.sutra-resume-tag {
  font-size: 9.5px;
  font-weight: 800;
  color: var(--tt-gold);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.sutra-resume-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--tt-text-title);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sutra-core-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}
.sutra-core-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 10px;
  background: var(--tt-card-bg-subtle, rgba(255, 255, 255, 0.04));
  border: 1px solid var(--tt-card-border);
  text-decoration: none;
  transition: all 0.2s ease;
  min-width: 0;
}
.sutra-core-btn:hover {
  border-color: var(--tt-gold);
  background: rgba(212, 175, 55, 0.08);
  transform: translateY(-1px);
}
.sutra-core-btn:active {
  transform: scale(0.98);
}
.sutra-core-icon {
  font-size: 18px;
  flex-shrink: 0;
}
.sutra-core-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--tt-text-title);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 5. Đồng Hồ Thiền Định Chánh Niệm (Zen Meditation Timer) */
.zen-meditation-card {
  padding: 16px;
  margin-bottom: 12px;
  text-align: center;
  position: relative;
}
#card-zen-meditation.phapbao-pane {
  padding: 0;
  margin-bottom: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

/* Chế độ Thiền Định Toàn Màn Hình Tối Giản (Zen Meditation Focus Mode) - Cấu Trúc Khung Cố Định */
.zen-meditation-active,
#card-zen-meditation.zen-meditation-active,
section#card-zen-meditation.zen-meditation-active,
body .zen-meditation-active,
body #card-zen-meditation.zen-meditation-active,
body section#card-zen-meditation.zen-meditation-active {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  inset: 0 !important;
  width: 100vw !important;
  max-width: 100vw !important;
  min-width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-height: 100vh !important;
  max-height: 100dvh !important;
  z-index: 10050 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 20px !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  animation: phapbaoFadeIn 0.4s ease forwards !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  transform: none !important;
  min-height: 100vh !important;
  min-height: 100dvh !important;
}

/* 1. Giao diện Tối (Dark Mode) - Nền Không Gian Tĩnh Mịch Giống Kinh Luân */
body:not(.theme-light) .zen-meditation-active,
body:not(.theme-light) #card-zen-meditation.zen-meditation-active,
body:not(.theme-light) section#card-zen-meditation.zen-meditation-active,
html:not(.theme-light) .zen-meditation-active,
html:not(.theme-light) #card-zen-meditation.zen-meditation-active,
html:not(.theme-light) section#card-zen-meditation.zen-meditation-active,
.zen-meditation-active {
  background: radial-gradient(circle at 50% 45%, #1c1208 0%, #0c0703 70%, #000000 100%) !important;
}

body:not(.theme-light) .zen-meditation-active::before,
body:not(.theme-light) .zen-meditation-active::after,
body:not(.theme-light) #card-zen-meditation.zen-meditation-active::before,
body:not(.theme-light) #card-zen-meditation.zen-meditation-active::after,
.zen-meditation-active::before,
.zen-meditation-active::after {
  display: none !important;
  content: none !important;
}

/* 2. Giao diện Sáng (Theme Light) - Sáng Cả Nền Chuẩn 100% Như Kinh Luân & Chuỗi Bồ Đề */
html.theme-light .zen-meditation-active,
body.theme-light .zen-meditation-active,
html.theme-light #card-zen-meditation.zen-meditation-active,
body.theme-light #card-zen-meditation.zen-meditation-active,
html.theme-light section#card-zen-meditation.zen-meditation-active,
body.theme-light section#card-zen-meditation.zen-meditation-active,
.theme-light .zen-meditation-active,
.theme-light #card-zen-meditation.zen-meditation-active,
.theme-light section#card-zen-meditation.zen-meditation-active {
  background: radial-gradient(circle at 50% 45%, #faf6ee 0%, #ede3d1 70%, #d8caa5 100%) !important;
}

.zen-meditation-top-btn {
  display: none !important;
}

.zen-meditation-active .zen-meditation-top-btn {
  display: inline-flex !important;
}

.zen-meditation-active .native-card-header,
.zen-meditation-active > p,
.zen-meditation-active .zen-presets-wrap,
.zen-meditation-active #zen-duration-pills,
.zen-meditation-active .zen-controls-row,
.zen-meditation-active .zen-quote-footer {
  display: none !important;
}

.zen-meditation-active .zen-breathe-stage {
  margin: 6px auto 14px auto !important;
  transform: none !important;
  width: 100% !important;
  max-width: 360px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
}

.zen-meditation-active .zen-phase-indicator-row {
  margin-top: 14px !important;
  justify-content: center !important;
}

/* Bảng thống kê Chế Độ Thiền Định (Đã ẩn theo yêu cầu) */
.zen-meditation-stats,
.zen-meditation-active .zen-meditation-stats {
  display: none !important;
}

/* Hàng nút công cụ điều khiển icon tròn 44px chuẩn Kinh Luân */
.zen-active-controls {
  display: none;
}
.zen-meditation-active .zen-active-controls {
  display: flex !important;
  gap: 12px !important;
  margin-top: 12px !important;
  z-index: 10052 !important;
}

.zen-meditation-active .rosary-tool-icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.35);
  color: rgba(255, 235, 170, 0.85);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.zen-meditation-active .rosary-tool-icon-btn:hover {
  background: rgba(212, 175, 55, 0.22);
  border-color: var(--tt-gold);
  color: #ffffff;
  transform: translateY(-2px);
}

.zen-meditation-active .zen-timer-digits {
  font-size: 32px;
  color: #ffd875 !important;
  text-shadow: 0 0 16px rgba(245, 215, 127, 0.45);
}

/* Sáng / Tối trong Chế Độ Thiền Định */
html.theme-light .zen-meditation-active .zen-timer-digits,
body.theme-light .zen-meditation-active .zen-timer-digits {
  color: #7a4a03 !important;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.9) !important;
}

html.theme-light .zen-meditation-active .zen-top-exit-btn,
body.theme-light .zen-meditation-active .zen-top-exit-btn,
html.theme-light .zen-meditation-active .zen-top-theme-btn,
body.theme-light .zen-meditation-active .zen-top-theme-btn {
  background: rgba(255, 255, 255, 0.85) !important;
  border-color: rgba(184, 134, 11, 0.3) !important;
  color: #4a3318 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06) !important;
}

html.theme-light .zen-meditation-active .rosary-stat-cell {
  background: rgba(255, 255, 255, 0.85) !important;
  border-color: rgba(196, 142, 45, 0.35) !important;
  box-shadow: 0 2px 8px rgba(100, 70, 30, 0.08) !important;
}
html.theme-light .zen-meditation-active .rosary-stat-num {
  color: #8c5b05 !important;
}
html.theme-light .zen-meditation-active .rosary-stat-label {
  color: #6d553b !important;
}

html.theme-light .zen-meditation-active .rosary-tool-icon-btn {
  background: rgba(255, 255, 255, 0.9) !important;
  border-color: rgba(184, 134, 11, 0.35) !important;
  color: #5c3e10 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06) !important;
}
html.theme-light .zen-meditation-active .rosary-tool-icon-btn:hover {
  background: #ffffff !important;
  border-color: #b8860b !important;
  color: #2e1a00 !important;
  transform: translateY(-2px);
}

/* Vòng tròn hơi thở & dải nhịp trong giao diện sáng */
html.theme-light .zen-meditation-active .zen-breathe-circle,
body.theme-light .zen-meditation-active .zen-breathe-circle {
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.96) 0%, rgba(253, 248, 235, 0.85) 60%, rgba(245, 234, 207, 0.35) 75%) !important;
  box-shadow: 0 0 35px rgba(184, 134, 11, 0.22) !important;
}
html.theme-light .zen-meditation-active .zen-ring-track,
body.theme-light .zen-meditation-active .zen-ring-track {
  stroke: rgba(184, 134, 11, 0.2) !important;
}
html.theme-light .zen-meditation-active .zen-breathe-instruction,
body.theme-light .zen-meditation-active .zen-breathe-instruction {
  color: #8c5b05 !important;
}
html.theme-light .zen-meditation-active .zen-phase-pill,
body.theme-light .zen-meditation-active .zen-phase-pill {
  background: rgba(255, 255, 255, 0.8) !important;
  border-color: rgba(184, 134, 11, 0.3) !important;
  color: #6b4306 !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05) !important;
}
html.theme-light .zen-meditation-active .zen-phase-pill.active,
body.theme-light .zen-meditation-active .zen-phase-pill.active {
  background: rgba(212, 175, 55, 0.35) !important;
  border-color: #b8860b !important;
  color: #4a2c00 !important;
  font-weight: 700 !important;
}

@media (max-height: 680px) {
  .zen-meditation-active .zen-breathe-stage {
    margin: 4px auto 8px auto !important;
  }
  .zen-meditation-active .zen-meditation-stats {
    margin: 4px auto 8px auto !important;
  }
  .zen-meditation-active .zen-active-controls {
    margin-top: 8px !important;
  }
}
.zen-breathe-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 14px 0 16px 0;
  position: relative;
}
.zen-breathe-circle {
  width: 164px;
  height: 164px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(212, 175, 55, 0.16) 0%, rgba(212, 175, 55, 0.03) 65%, transparent 75%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.15);
  transition: transform 0.08s linear, box-shadow 0.2s ease;
  will-change: transform, box-shadow;
  position: relative;
  user-select: none;
}
.zen-progress-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}
.zen-ring-track {
  fill: none;
  stroke: rgba(212, 175, 55, 0.15);
  stroke-width: 5;
}
.zen-ring-progress {
  fill: none;
  stroke: url(#zenRingGradInhale);
  stroke-width: 5.5;
  stroke-linecap: round;
  stroke-dasharray: 477.52;
  stroke-dashoffset: 477.52;
  transform: rotate(-90deg);
  transform-origin: 82px 82px;
  transition: stroke-dashoffset 0.08s linear, stroke 0.4s ease;
  filter: drop-shadow(0 0 8px rgba(245, 215, 127, 0.65));
}
.zen-breathe-circle.active-inhale {
  box-shadow: 0 0 45px rgba(212, 175, 55, 0.45);
}
.zen-breathe-circle.active-hold {
  box-shadow: 0 0 50px rgba(245, 215, 127, 0.6);
}
.zen-breathe-circle.active-exhale {
  box-shadow: 0 0 35px rgba(46, 196, 182, 0.35);
}
.zen-breathe-circle.active-pause {
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.15);
}
.zen-circle-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2;
  text-align: center;
  padding: 0 8px;
}
.zen-timer-digits {
  font-size: 28px;
  font-weight: 800;
  color: var(--tt-text-title);
  letter-spacing: 1px;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.zen-breathe-instruction {
  font-size: 11.5px;
  color: var(--tt-gold);
  font-weight: 700;
  margin-top: 4px;
  min-height: 16px;
  transition: all 0.25s ease;
}
.zen-breathe-seconds-badge {
  font-size: 10px;
  font-weight: 800;
  color: #1a140c;
  background: var(--tt-gold);
  padding: 1.5px 8px;
  border-radius: 10px;
  margin-top: 5px;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  transition: all 0.2s ease;
}
.zen-phase-indicator-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.zen-phase-break {
  flex-basis: 100%;
  width: 100%;
  height: 0;
  margin: 0;
}
.zen-phase-pill {
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 12px;
  background: var(--tt-card-bg-subtle, rgba(255, 255, 255, 0.05));
  border: 1px solid var(--tt-card-border);
  color: var(--tt-text-muted);
  transition: all 0.25s ease;
}
.zen-phase-pill.active {
  background: rgba(212, 175, 55, 0.2);
  border-color: var(--tt-gold);
  color: var(--tt-gold-bright, #ffd269);
  font-weight: 800;
  transform: scale(1.04);
}
.zen-phase-pill.active.exhale {
  background: rgba(46, 196, 182, 0.2);
  border-color: #2ec4b6;
  color: #2ec4b6;
}

/* Bộ chọn 9 nhịp hơi thở quy chuẩn thiền định chánh niệm */
.zen-presets-wrap {
  margin: 12px 0 14px 0;
  text-align: left;
}
.zen-presets-header {
  font-size: 11px;
  font-weight: 700;
  color: var(--tt-gold);
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.zen-presets-scroll {
  display: flex;
  gap: 6px;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  max-width: 100% !important;
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 2px 2px 8px 2px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x !important;
  overscroll-behavior-x: contain;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.zen-presets-scroll.is-dragging {
  cursor: grabbing !important;
}
.zen-presets-scroll::-webkit-scrollbar {
  display: none;
}
.zen-preset-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 14px;
  background: var(--tt-card-bg-subtle, rgba(255, 255, 255, 0.05));
  border: 1px solid var(--tt-card-border);
  color: var(--tt-text-body);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  transition: all 0.2s ease;
  user-select: none;
  -webkit-user-select: none;
}
.zen-preset-chip:hover {
  border-color: var(--tt-gold);
  color: var(--tt-gold);
}
.zen-preset-chip.active {
  background: rgba(212, 175, 55, 0.2);
  border-color: var(--tt-gold);
  color: var(--tt-gold-bright, #ffd269);
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.25);
  font-weight: 800;
}
.zen-preset-chip-formula {
  font-size: 9.5px;
  opacity: 0.8;
  font-weight: 500;
}
.zen-preset-desc-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--tt-text-muted);
  background: var(--tt-card-bg-subtle, rgba(255, 255, 255, 0.03));
  border: 1px dashed var(--tt-card-border);
  border-radius: 8px;
  padding: 6px 10px;
  margin-top: 6px;
  flex-wrap: wrap;
  gap: 4px;
}
.zen-pills-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.zen-pill-btn {
  background: var(--tt-card-bg-subtle, rgba(255, 255, 255, 0.05));
  border: 1px solid var(--tt-card-border);
  color: var(--tt-text-body);
  font-size: 10px;
  padding: 5px 12px;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  transition: all 0.2s ease;
  user-select: none;
  -webkit-user-select: none;
}
.zen-pill-btn:hover {
  border-color: var(--tt-gold);
  color: var(--tt-gold);
}
.zen-pill-btn.active {
  background: var(--tt-gold);
  border-color: var(--tt-gold);
  color: #1a140c;
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.35);
}
.zen-controls-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.zen-main-btn {
  background: linear-gradient(135deg, #d4af37, #b8860b);
  border: 1px solid #d4af37;
  color: #1a140c;
  font-size: 13px;
  font-weight: 800;
  padding: 9px 20px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.3);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.zen-main-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(212, 175, 55, 0.45);
}
.zen-main-btn:active {
  transform: scale(0.97);
}
.zen-btn-zen-mode {
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: var(--tt-gold);
  font-size: 12px;
  font-weight: 700;
  padding: 8.5px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.zen-btn-zen-mode:hover {
  background: rgba(212, 175, 55, 0.25);
  border-color: var(--tt-gold);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(212, 175, 55, 0.25);
}
.zen-btn-zen-mode:active {
  transform: scale(0.97);
}
html.theme-light .zen-btn-zen-mode,
body.theme-light .zen-btn-zen-mode {
  background: rgba(184, 134, 11, 0.1);
  border-color: rgba(184, 134, 11, 0.35);
  color: #8c5b05;
}
html.theme-light .zen-btn-zen-mode:hover,
body.theme-light .zen-btn-zen-mode:hover {
  background: rgba(184, 134, 11, 0.2);
  border-color: #b8860b;
  color: #4a2c00;
}
.zen-sec-btn {
  background: var(--tt-card-bg-subtle, rgba(255, 255, 255, 0.06));
  border: 1px solid var(--tt-card-border);
  color: var(--tt-text-muted);
  font-size: 12px;
  font-weight: 700;
  padding: 8.5px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.zen-sec-btn:hover {
  color: var(--tt-text-title);
  border-color: var(--tt-text-muted);
}

/* 7. Hành Thiện Tích Đức (Daily Checklist Apple Style) */
.karma-checklist-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.karma-check-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--tt-card-bg-subtle, rgba(255, 255, 255, 0.03));
  border: 1px solid var(--tt-card-border);
  transition: all 0.25s ease;
  cursor: pointer;
  user-select: none;
}
.karma-check-item:hover {
  border-color: rgba(212, 175, 55, 0.4);
  background: rgba(212, 175, 55, 0.04);
}
.karma-check-item.checked {
  background: rgba(212, 175, 55, 0.08);
  border-color: var(--tt-gold);
}
.karma-check-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.8px solid var(--tt-card-border);
  background: transparent;
  flex-shrink: 0;
  margin-top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: transparent;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.karma-check-item.checked .karma-check-circle {
  background: var(--tt-gold);
  border-color: var(--tt-gold);
  color: #1a140c;
  transform: scale(1.1);
}
.karma-check-content {
  flex: 1;
  min-width: 0;
}
.karma-check-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--tt-text-title);
  line-height: 1.35;
}
.karma-check-item.checked .karma-check-title {
  color: var(--tt-gold);
}
.karma-check-desc {
  font-size: 11.5px;
  color: var(--tt-text-body);
  margin-top: 2px;
  line-height: 1.4;
}

/* 8. Sổ Tay Ghi Chú Tu Tập (Apple Notes Style Chuyên Nghiệp) */
.apple-notes-card-wrap {
  padding: 16px 16px 18px !important;
  background: var(--tt-card-bg);
  border: 1px solid var(--tt-card-border);
  border-radius: 18px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.apple-notes-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 10px;
}

.apple-notes-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.apple-notes-icon-badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #ffc837 0%, #ff8008 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(255, 128, 8, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.apple-notes-icon-badge:hover {
  transform: scale(1.05);
}

.apple-notes-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--tt-text-title);
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.apple-notes-subtitle {
  font-size: 11px;
  color: var(--tt-text-muted);
  margin-top: 2px;
}

.apple-notes-status-badge {
  font-size: 10px;
  font-weight: 700;
  color: var(--tt-gold);
  background: rgba(240, 207, 117, 0.12);
  border: 1px solid rgba(240, 207, 117, 0.25);
  padding: 3px 9px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

/* Quick Tags Scroll Bar (Capsules đa sắc chuẩn Apple) */
.quick-tags-scroll-wrap {
  position: relative;
  margin-bottom: 10px;
}

.quick-tags-scroll {
  display: flex;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 2px 8px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
  cursor: grab;
  user-select: none;
}
.quick-tags-scroll.is-dragging {
  cursor: grabbing;
}
.quick-tags-scroll::-webkit-scrollbar {
  display: none;
}

.quick-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 16px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid transparent;
  outline: none;
}
.quick-tag-chip:active {
  transform: scale(0.94);
}
.quick-tag-chip .tag-emoji {
  font-size: 12px;
  line-height: 1;
}

/* Các biến thể màu sắc Apple Pill cho từng danh mục */
.quick-tag-chip.tag-amber {
  background: rgba(255, 179, 0, 0.12);
  color: #ffb300;
  border-color: rgba(255, 179, 0, 0.25);
}
.quick-tag-chip.tag-amber:hover {
  background: rgba(255, 179, 0, 0.22);
  border-color: #ffb300;
}

.quick-tag-chip.tag-blue {
  background: rgba(10, 132, 255, 0.12);
  color: #2997ff;
  border-color: rgba(10, 132, 255, 0.25);
}
.quick-tag-chip.tag-blue:hover {
  background: rgba(10, 132, 255, 0.22);
  border-color: #2997ff;
}

.quick-tag-chip.tag-teal {
  background: rgba(48, 209, 88, 0.12);
  color: #30d158;
  border-color: rgba(48, 209, 88, 0.25);
}
.quick-tag-chip.tag-teal:hover {
  background: rgba(48, 209, 88, 0.22);
  border-color: #30d158;
}

.quick-tag-chip.tag-green {
  background: rgba(52, 199, 89, 0.12);
  color: #34c759;
  border-color: rgba(52, 199, 89, 0.25);
}
.quick-tag-chip.tag-green:hover {
  background: rgba(52, 199, 89, 0.22);
  border-color: #34c759;
}

.quick-tag-chip.tag-purple {
  background: rgba(191, 90, 242, 0.12);
  color: #bf5af2;
  border-color: rgba(191, 90, 242, 0.25);
}
.quick-tag-chip.tag-purple:hover {
  background: rgba(191, 90, 242, 0.22);
  border-color: #bf5af2;
}

.quick-tag-chip.tag-rose {
  background: rgba(255, 55, 95, 0.12);
  color: #ff375f;
  border-color: rgba(255, 55, 95, 0.25);
}
.quick-tag-chip.tag-rose:hover {
  background: rgba(255, 55, 95, 0.22);
  border-color: #ff375f;
}

.quick-tag-chip.tag-cyan {
  background: rgba(100, 210, 255, 0.12);
  color: #64d2ff;
  border-color: rgba(100, 210, 255, 0.25);
}
.quick-tag-chip.tag-cyan:hover {
  background: rgba(100, 210, 255, 0.22);
  border-color: #64d2ff;
}

/* Editor Input */
.apple-note-input-container {
  margin-bottom: 10px;
}

.apple-note-textarea {
  width: 100%;
  height: 64px;
  min-height: 50px;
  background: var(--tt-card-bg-subtle);
  color: var(--tt-text-body);
  border: 1px solid var(--tt-card-border);
  border-radius: 12px;
  padding: 8px 11px;
  font-size: 12px !important;
  line-height: 1.5;
  font-family: inherit;
  box-sizing: border-box;
  outline: none;
  resize: vertical;
  transition: all 0.2s ease;
}
#note-content-tutap,
#note-content-dile,
#note-content-bita {
  font-size: 13px !important;
  line-height: 1.5;
}
.apple-note-textarea:focus {
  border-color: var(--tt-gold);
  box-shadow: 0 0 0 2.5px rgba(240, 207, 117, 0.18);
  background: rgba(0, 0, 0, 0.1);
}
.apple-note-textarea::placeholder {
  color: var(--tt-text-muted);
  opacity: 0.75;
  font-size: 11.5px;
}

/* Action Button Bar */
.apple-notes-btn-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.apple-note-save-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, #f0cf75 0%, #d4a237 50%, #b8860b 100%);
  color: #1e1612;
  font-weight: 700;
  font-size: 12px;
  padding: 8px 18px;
  border-radius: 12px;
  border: 1px solid rgba(255, 235, 175, 0.4);
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(184, 134, 11, 0.28);
  transition: all 0.2s ease;
}
.apple-note-save-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 16px rgba(184, 134, 11, 0.38);
}
.apple-note-save-btn:active {
  transform: scale(0.97);
}
.apple-note-save-btn.is-editing-mode {
  background: linear-gradient(135deg, #34c759 0%, #28a745 100%);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 3px 12px rgba(40, 167, 69, 0.35);
}

.apple-note-cancel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(142, 142, 147, 0.16);
  color: var(--tt-text-muted);
  font-size: 11.5px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid var(--tt-card-border);
  cursor: pointer;
  transition: all 0.2s ease;
}
.apple-note-cancel-btn:hover {
  background: rgba(142, 142, 147, 0.25);
  color: var(--tt-text-title);
}

/* Thẻ Nhật Ký Trong Danh Sách (Chuẩn Apple Inset Card) */
.apple-notes-list {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.apple-note-card {
  background: var(--tt-card-bg-subtle);
  border: 1px solid var(--tt-card-border);
  border-radius: 14px;
  padding: 11px 13px;
  transition: all 0.25s ease;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.apple-note-card:hover {
  border-color: rgba(240, 207, 117, 0.25);
  transform: translateY(-1px);
}

.apple-note-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  flex-wrap: wrap;
  gap: 6px;
}

.apple-note-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.apple-note-date {
  font-size: 11px;
  font-weight: 700;
  color: var(--tt-gold);
  display: inline-flex;
  align-items: center;
  letter-spacing: 0.2px;
}

.apple-note-tag-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 8px;
  line-height: 1.2;
}
.apple-note-tag-badge.apple-tag-amber { background: rgba(255, 179, 0, 0.15); color: #ffb300; }
.apple-note-tag-badge.apple-tag-blue  { background: rgba(10, 132, 255, 0.15); color: #2997ff; }
.apple-note-tag-badge.apple-tag-teal  { background: rgba(48, 209, 88, 0.15); color: #30d158; }
.apple-note-tag-badge.apple-tag-green { background: rgba(52, 199, 89, 0.15); color: #34c759; }
.apple-note-tag-badge.apple-tag-purple{ background: rgba(191, 90, 242, 0.15); color: #bf5af2; }
.apple-note-tag-badge.apple-tag-rose  { background: rgba(255, 55, 95, 0.15); color: #ff375f; }
.apple-note-tag-badge.apple-tag-cyan  { background: rgba(100, 210, 255, 0.15); color: #64d2ff; }

.apple-note-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.apple-note-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  outline: none;
}
.apple-note-action-btn.edit {
  background: rgba(10, 132, 255, 0.1);
  color: #2997ff;
  border-color: rgba(10, 132, 255, 0.2);
}
.apple-note-action-btn.edit:hover {
  background: rgba(10, 132, 255, 0.2);
}
.apple-note-action-btn.delete {
  background: rgba(255, 69, 58, 0.1);
  color: #ff453a;
  border-color: rgba(255, 69, 58, 0.2);
}
.apple-note-action-btn.delete:hover {
  background: rgba(255, 69, 58, 0.2);
}

.apple-note-body {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--tt-text-body);
  white-space: pre-wrap;
  word-break: break-word;
}

/* Empty State */
.apple-notes-empty-state {
  text-align: center;
  padding: 24px 16px;
  border: 1px dashed var(--tt-card-border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}
.apple-notes-empty-state .empty-icon {
  font-size: 26px;
  display: block;
  margin-bottom: 6px;
}
.apple-notes-empty-state .empty-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--tt-text-title);
  margin-bottom: 3px;
}
.apple-notes-empty-state .empty-desc {
  font-size: 11.5px;
  color: var(--tt-text-muted);
  max-width: 320px;
  margin: 0 auto;
  line-height: 1.45;
}

/* Modal Xác Nhận Xóa Apple Alert Sheet */
.spiritual-confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.22s ease;
}
.spiritual-confirm-overlay.visible {
  opacity: 1;
}

.spiritual-confirm-card {
  background: var(--tt-card-bg, #2f221a);
  border: 1px solid var(--tt-card-border, rgba(240, 207, 117, 0.15));
  border-radius: 20px;
  padding: 22px 20px;
  max-width: 380px;
  width: 100%;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  text-align: center;
  transform: scale(0.92);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--tt-text-body, #d6c4b2);
}
.spiritual-confirm-overlay.visible .spiritual-confirm-card {
  transform: scale(1);
}

.confirm-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 69, 58, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}

.confirm-title {
  margin: 0 0 8px 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--tt-text-title, #fff4dc);
}

.confirm-desc {
  margin: 0 0 20px 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--tt-text-body, #d6c4b2);
}

.confirm-btn-row {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.confirm-btn {
  flex: 1;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}
.confirm-btn.cancel {
  background: rgba(142, 142, 147, 0.16);
  color: var(--tt-text-title, #fff4dc);
  border-color: var(--tt-card-border);
}
.confirm-btn.cancel:hover {
  background: rgba(142, 142, 147, 0.26);
}
.confirm-btn.danger {
  background: linear-gradient(135deg, #ff453a 0%, #d32f2f 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(255, 69, 58, 0.3);
}
.confirm-btn.danger:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(255, 69, 58, 0.4);
}

/* ==========================================================================
   TÙY CHỈNH THEME SÁNG (LIGHT MODE) CHO SỔ TAY GHI CHÚ
   ========================================================================== */
html.theme-light .apple-notes-card-wrap,
body.theme-light .apple-notes-card-wrap {
  background: #ffffff !important;
  border-color: #dfd4c0 !important;
  box-shadow: 0 4px 20px rgba(60, 40, 20, 0.06) !important;
}

html.theme-light .apple-notes-icon-badge,
body.theme-light .apple-notes-icon-badge {
  background: linear-gradient(135deg, #f5a623 0%, #e07a00 100%);
  box-shadow: 0 4px 12px rgba(224, 122, 0, 0.25);
}

html.theme-light .apple-note-textarea,
body.theme-light .apple-note-textarea {
  background: #fbf9f5;
  color: #2e1f14;
  border-color: #dfd4c0;
}
html.theme-light .apple-note-textarea:focus,
body.theme-light .apple-note-textarea:focus {
  background: #ffffff;
  border-color: #9a6e18;
  box-shadow: 0 0 0 3px rgba(154, 110, 24, 0.15);
}

html.theme-light .apple-note-save-btn,
body.theme-light .apple-note-save-btn {
  background: linear-gradient(135deg, #96691e 0%, #7d5212 100%);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 3px 12px rgba(125, 82, 18, 0.25);
}

html.theme-light .apple-note-card,
body.theme-light .apple-note-card {
  background: #fbf9f5;
  border-color: #e8dfcf;
  box-shadow: 0 2px 8px rgba(60, 40, 20, 0.04);
}

html.theme-light .apple-note-body,
body.theme-light .apple-note-body {
  color: #3d2b1d;
}

html.theme-light .spiritual-confirm-card,
body.theme-light .spiritual-confirm-card {
  background: #ffffff;
  border-color: #dfd4c0;
  box-shadow: 0 20px 50px rgba(60, 40, 20, 0.18);
  color: #4d3829;
}

/* 9. Danh Sách Tự Viện Gần Bạn (GPS Geolocation) */
.nearby-temples-card {
  padding: 14px 16px;
  margin-bottom: 12px;
}
.nearby-gps-banner {
  background: rgba(212, 175, 55, 0.09);
  border: 1px dashed rgba(212, 175, 55, 0.35);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.nearby-gps-btn {
  background: linear-gradient(135deg, #d4af37, #b8860b);
  color: #1a140c;
  border: none;
  font-size: 12px;
  font-weight: 800;
  padding: 7px 14px;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.25);
  transition: all 0.2s ease;
}
.nearby-gps-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
}
.nearby-temple-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 11px 13px;
  border-radius: 12px;
  background: var(--tt-card-bg-subtle, rgba(255, 255, 255, 0.03));
  border: 1px solid var(--tt-card-border);
  margin-bottom: 8px;
  transition: all 0.2s ease;
}
.nearby-temple-item:hover {
  border-color: rgba(212, 175, 55, 0.4);
  background: rgba(212, 175, 55, 0.04);
}
.nearby-temple-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}
.nearby-temple-title-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  flex: 1;
}
.nearby-temple-name {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--tt-text-title);
  line-height: 1.3;
}
.nearby-temple-dist {
  font-size: 10.5px;
  font-weight: 800;
  color: #2ec4b6;
  background: rgba(46, 196, 182, 0.12);
  border: 1px solid rgba(46, 196, 182, 0.3);
  padding: 1.5px 6px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.nearby-temple-addr {
  font-size: 11.5px;
  color: var(--tt-text-muted);
  line-height: 1.45;
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 5px;
  word-break: break-word;
}
.nearby-temple-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.nearby-icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--tt-card-bg-subtle, rgba(255, 255, 255, 0.06));
  border: 1px solid var(--tt-card-border);
  color: var(--tt-gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  padding: 0;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.nearby-icon-btn:hover {
  background: var(--tt-gold);
  color: #1a140c;
  border-color: var(--tt-gold);
  transform: translateY(-1px);
}
.nearby-icon-btn:active {
  transform: scale(0.95);
}
.nearby-dir-btn {
  font-size: 11px;
  font-weight: 700;
  color: var(--tt-gold);
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid var(--tt-card-border);
  padding: 4px 8px;
  border-radius: 8px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: all 0.2s ease;
}
.nearby-dir-btn:hover {
  background: var(--tt-gold);
  color: #1a140c;
}

/* Modal Chi Tiết Chỉ Đường Đền Chùa (Apple Native Centered Modal) */
.temple-direction-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  z-index: 999999 !important;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  padding: 16px;
  box-sizing: border-box;
}
.temple-direction-card {
  width: 100%;
  max-width: 400px;
  background: linear-gradient(165deg, rgba(32, 22, 14, 0.98) 0%, rgba(18, 12, 6, 0.99) 100%);
  border: 1px solid rgba(240, 207, 117, 0.4);
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 25px rgba(212, 175, 55, 0.2);
  padding: 22px 20px 18px 20px;
  position: relative;
  box-sizing: border-box;
  animation: templeModalZoom 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes templeModalZoom {
  0% { opacity: 0; transform: scale(0.92) translateY(12px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
html.theme-light .temple-direction-overlay {
  background: rgba(30, 20, 10, 0.55);
}
html.theme-light .temple-direction-card {
  background: linear-gradient(165deg, rgba(255, 253, 248, 0.99) 0%, rgba(248, 243, 233, 0.99) 100%);
  border-color: rgba(184, 120, 32, 0.35);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18), 0 0 25px rgba(184, 120, 32, 0.1);
}
