/* ==========================================================================
   NIỆM - DESIGN SYSTEM & STYLESHEET
   Phật Giáo Thiền Môn & Mỹ Thuật Thanh Tịnh
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400;1,600&family=Gentium+Book+Plus:ital,wght@0,400;0,700;1,400;1,700&family=Noto+Serif:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap');

:root {
  /* Typography System - 100% Chuẩn Thuần Việt & Phạn Ngữ IAST Chuyên Dụng (Gentium Book Plus & Noto Serif) */
  --mantra-font-size: 20px;
  --font-sanskrit: 'Gentium Book Plus', 'Noto Serif', Georgia, serif;
  --font-serif: 'Noto Serif', 'Lora', 'Merriweather', serif;
  --font-sans: 'Be Vietnam Pro', 'Segoe UI', Arial, sans-serif;
  --font-display: 'Be Vietnam Pro', 'Segoe UI', Arial, sans-serif;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 9999px;
  
  --transition-fast: 0.18s ease;
  --transition-base: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.15);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.25);
  --shadow-lg: 0 16px 40px rgba(0,0,0,0.35);
}

/* ==========================================================================
   THEME 1: GỖ TRẦM (WOOD ZEN) - Mặc định
   ========================================================================== */
body, body[data-theme="wood"] {
  --bg-app: #15100e;
  --bg-surface: #1e1714;
  --bg-surface-elevated: #281f1b;
  --bg-surface-translucent: rgba(30, 23, 20, 0.85);
  --border-subtle: #3d2e27;
  --border-strong: #5c453a;
  
  --text-primary: #f2e2cf;
  --text-secondary: #c9b49e;
  --text-muted: #8c7866;
  --text-accent: #e5b364;      /* Vàng hổ phách */
  --text-sanskrit: #d9935f;    /* Cam đất thiền */
  
  --accent-gold: #e5b364;
  --accent-gold-glow: rgba(229, 179, 100, 0.25);
  --accent-red: #b33927;
  
  --mo-gradient-1: #4a2817;
  --mo-gradient-2: #24140b;
  --chuong-gradient-1: #b88628;
  --chuong-gradient-2: #6e4e13;
  --card-glow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* ==========================================================================
   THEME 2: OLED THIỀN TỊNH (OLED DARK)
   ========================================================================== */
body[data-theme="oled"] {
  --bg-app: #080808;
  --bg-surface: #121212;
  --bg-surface-elevated: #1a1a1a;
  --bg-surface-translucent: rgba(18, 18, 18, 0.9);
  --border-subtle: #242424;
  --border-strong: #383838;
  
  --text-primary: #f5f5f5;
  --text-secondary: #b0b0b0;
  --text-muted: #666666;
  --text-accent: #ffd166;
  --text-sanskrit: #ecc273;
  
  --accent-gold: #ffd166;
  --accent-gold-glow: rgba(255, 209, 102, 0.25);
  --accent-red: #c0392b;
  
  --mo-gradient-1: #2a2a2a;
  --mo-gradient-2: #111111;
  --chuong-gradient-1: #d4af37;
  --chuong-gradient-2: #574410;
  --card-glow: 0 8px 32px rgba(0, 0, 0, 0.7);
}

/* ==========================================================================
   THEME 3: GIẤY KINH CỔ (SEPIA PARCHMENT)
   ========================================================================== */
body[data-theme="sepia"] {
  --bg-app: #f4ecdf;
  --bg-surface: #fdfaf4;
  --bg-surface-elevated: #ede2cf;
  --bg-surface-translucent: rgba(253, 250, 244, 0.92);
  --border-subtle: #ded1bd;
  --border-strong: #c2af93;
  
  --text-primary: #382717;
  --text-secondary: #5f4833;
  --text-muted: #8c735c;
  --text-accent: #a33820;      /* Đỏ chu sa */
  --text-sanskrit: #8a4823;
  
  --accent-gold: #a67329;
  --accent-gold-glow: rgba(166, 115, 41, 0.2);
  --accent-red: #9e2a1b;
  
  --mo-gradient-1: #7d4427;
  --mo-gradient-2: #4f2512;
  --chuong-gradient-1: #b88628;
  --chuong-gradient-2: #735111;
  --card-glow: 0 4px 20px rgba(56, 39, 23, 0.08);
}

/* ==========================================================================
   THEME 4: THANH BẠCH (PURE LIGHT)
   ========================================================================== */
body[data-theme="light"] {
  --bg-app: #f7f9fb;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #eef2f6;
  --bg-surface-translucent: rgba(255, 255, 255, 0.92);
  --border-subtle: #e1e6ed;
  --border-strong: #ccd4de;
  
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #8595a8;
  --text-accent: #0284c7;
  --text-sanskrit: #4338ca;
  
  --accent-gold: #b48328;
  --accent-gold-glow: rgba(180, 131, 40, 0.2);
  --accent-red: #dc2626;
  
  --mo-gradient-1: #5c3822;
  --mo-gradient-2: #382012;
  --chuong-gradient-1: #caa042;
  --chuong-gradient-2: #8a6a24;
  --card-glow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

/* ==========================================================================
   RESET & BASE SETUP
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-primary);
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  transition: background-color var(--transition-base), color var(--transition-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

/* ==========================================================================
   QUYỀN SAO CHÉP KINH VĂN TỰ NHIÊN (PHÁP THÍ VÔ LƯỢNG)
   Bảo đảm văn bản kinh văn luôn được sao chép tự do, tôn nghiêm
   ========================================================================== */
::selection {
  background: rgba(229, 179, 100, 0.4) !important;
  color: inherit !important;
}
::-moz-selection {
  background: rgba(229, 179, 100, 0.4) !important;
  color: inherit !important;
}

.reader-container,
.mantra-scroll-container,
.mantra-content-body,
.mantra-section,
.verses-list,
.verse-item,
.verse-text-group,
.verse-vn,
.verse-sa,
.verse-phonetic,
.phonetic-text,
.verse-mean,
.mantra-header-block,
.mantra-title,
.mantra-sa-title,
.mantra-desc,
.section-heading,
.continuous-flow,
.hoihuong-box {
  user-select: text !important;
  -webkit-user-select: text !important;
}

.verse-item,
.verse-text-group,
.verse-vn,
.verse-sa,
.verse-phonetic,
.phonetic-text,
.verse-mean {
  cursor: text !important;
}

.verse-num {
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  transition: all var(--transition-fast);
}

input, select {
  font-family: inherit;
  color: inherit;
}

/* ==========================================================================
   HEADER & NAVIGATION BAR
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: var(--bg-surface-translucent);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.65rem 1.5rem;
}

.header-inner {
  max-width: min(99vw, 1860px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
  white-space: nowrap;
}

.brand-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 2px 8px var(--accent-gold-glow));
  flex-shrink: 0;
}

.brand-lotus-svg {
  display: block;
}

.brand-text {
  white-space: nowrap;
}

.brand-text h1 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--text-accent);
  line-height: 1.1;
  margin: 0;
}

.brand-tagline {
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  white-space: nowrap;
  line-height: 1.2;
}

/* Bộ Lọc Tông Phái (Tradition Filter Bar) */
.tradition-filter-bar {
  display: flex;
  align-items: center;
  gap: 3px;
  background: var(--bg-surface);
  padding: 3px 5px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
  white-space: nowrap;
}

.tradition-pill {
  padding: 4px 11px;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.tradition-pill:hover {
  color: var(--text-primary);
}

.tradition-pill.active {
  background: var(--accent-gold-glow);
  color: var(--text-accent);
  border: 1px solid var(--accent-gold);
}

/* Quick Tools Bar bên phải Header */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
  flex-wrap: nowrap;
}

.btn-expand-header {
  width: 34px !important;
  height: 34px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md, 8px);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  box-sizing: border-box;
  flex-shrink: 0;
  font-size: 0.95rem;
  transition: all var(--transition-fast);
}

.btn-expand-header:hover {
  border-color: var(--accent-gold);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.btn-expand-header.active {
  background: var(--accent-gold);
  color: #1a1107;
  border-color: var(--accent-gold);
  box-shadow: 0 2px 10px var(--accent-gold-glow);
}

.tool-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md, 8px);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  color: var(--text-secondary);
  box-sizing: border-box;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.tool-btn:hover {
  background: var(--border-subtle);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.tool-btn.btn-active, .tool-btn.active {
  background: var(--accent-gold);
  color: #1a1107;
  border-color: var(--accent-gold);
}

/* Theme selector dropdown / pills */
.theme-selector-group {
  display: flex;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 2px 3px;
  gap: 3px;
  height: 34px;
  align-items: center;
  box-sizing: border-box;
  flex-shrink: 0;
}

.theme-btn {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  transition: transform var(--transition-fast);
  flex-shrink: 0;
}

.theme-btn:hover {
  transform: scale(1.15);
}

.theme-btn.active {
  box-shadow: 0 0 0 2px var(--accent-gold);
}

.theme-btn[data-theme="wood"] { background: #3a2518; color: #f2d6a2; }
.theme-btn[data-theme="oled"] { background: #111111; color: #ffd166; }
.theme-btn[data-theme="sepia"] { background: #dfd2be; color: #5f4833; }
.theme-btn[data-theme="light"] { background: #ffffff; color: #1e293b; }

/* ==========================================================================
   THANH KỆ CHỌN KINH CHÚ RỘNG RÃI (HIỂN THỊ 100% ĐẦY ĐỦ KHÔNG BỊ CẮT)
   ========================================================================== */
.sutra-nav-shelf {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.55rem 1.5rem;
  position: relative;
  z-index: 90;
}

.sutra-shelf-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
}

.mantra-tabs-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 7px 9px;
  width: 100%;
}

.mantra-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 13px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
  user-select: none;
}

.mantra-tab-btn:hover {
  border-color: var(--accent-gold);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.mantra-tab-btn.active {
  background: var(--accent-gold);
  color: #1a1107;
  border-color: var(--accent-gold);
  box-shadow: 0 2px 10px var(--accent-gold-glow);
  font-weight: 700;
}

/* Tinh giản các bản chùa & sưu tập đặc thù để tránh rối mắt */
.mantra-tab-btn[title*="sưu tập"],
.mantra-tab-btn[title*="bản chùa"],
.mantra-tab-btn[title*="Bộ sưu tập"],
.mantra-tab-btn[title*="Không gian thực tế"],
.mantra-tab-btn[title*="Bản Chùa Cổ Phạn"],
.mantra-tab-btn[data-mantra="banchua"],
.mantra-tab-btn[data-mantra="batnha_banchua"],
.mantra-tab-btn[data-mantra="adida_banchua"],
.mantra-tab-btn[data-mantra="langnghiem_banchua"],
.mantra-tab-btn[data-mantra="metta_banchua"] {
  background: rgba(229, 179, 100, 0.06);
  border: 1px dashed rgba(229, 179, 100, 0.3);
  font-size: 0.79rem;
}

.mantra-tab-btn[data-mantra="banchua"].active,
.mantra-tab-btn[data-mantra="batnha_banchua"].active,
.mantra-tab-btn[data-mantra="adida_banchua"].active,
.mantra-tab-btn[data-mantra="langnghiem_banchua"].active,
.mantra-tab-btn[data-mantra="metta_banchua"].active {
  background: var(--accent-gold);
  border-style: solid;
  color: #1a1107;
}

/* Nút Thu Gọn Kệ Kinh Chú - Đặt gọn gàng ở dưới */
.btn-toggle-shelf {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 12px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(229, 179, 100, 0.18);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  flex-shrink: 0;
  user-select: none;
  opacity: 0.75;
}

.btn-toggle-shelf:hover {
  opacity: 1;
  color: var(--accent-gold);
  border-color: var(--accent-gold);
  background: rgba(229, 179, 100, 0.12);
}

/* Thanh Kệ Kinh Thu Nhỏ Tinh Gọn (Hiển thị khi thu gọn hoặc trong Chuyên Tâm) */
.sutra-shelf-compact-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
  margin: 0 auto;
  padding: 2px 10px;
}

.shelf-compact-info {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
}

.shelf-compact-badge {
  color: var(--accent-gold);
  font-weight: 600;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.shelf-compact-title {
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.2px;
}

.shelf-compact-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-expand-shelf-compact {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 12px;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--accent-gold);
  background: rgba(229, 179, 100, 0.1);
  border: 1px solid rgba(229, 179, 100, 0.35);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-expand-shelf-compact:hover {
  background: var(--accent-gold);
  color: #1a1107;
  box-shadow: 0 2px 10px var(--accent-gold-glow);
  transform: translateY(-1px);
}

.shelf-shortcut-badge {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(229, 179, 100, 0.4);
  color: inherit;
  line-height: 1.2;
}

/* Khi Kệ Kinh Ở Trạng Thái Thu Gọn (is-collapsed) */
.sutra-nav-shelf.is-collapsed {
  padding-top: 3px !important;
  padding-bottom: 3px !important;
}

.sutra-nav-shelf.is-collapsed .sutra-shelf-inner {
  display: none !important;
}

.sutra-nav-shelf.is-collapsed .sutra-shelf-compact-bar {
  display: flex !important;
}

/* ==========================================================================
   MAIN LAYOUT (SPLIT VIEW & CHẾ ĐỘ MỞ RỘNG TỐI ƯU TOÀN MÀN HÌNH)
   ========================================================================== */
.main-container {
  max-width: min(1560px, 98vw);
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  flex: 1;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 310px;
  gap: 1.25rem;
  align-items: stretch;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   CHẾ ĐỘ CHUYÊN TÂM TRÌ TỤNG (ZEN FOCUS CHANTING MODE)
   Tối ưu hóa tuyệt đối cho màn hình Laptop & Máy tính để bàn
   Căn giữa hoàn mỹ, loại bỏ hoàn toàn khoảng trống lệch bên trái
   Tập trung 100% thị giác vào câu kinh đang trì niệm
   ========================================================================== */
.main-container.focus-mode,
.main-container.zen-expanded {
  grid-template-columns: 1fr !important;
  max-width: min(98.5vw, 1920px) !important;
  width: 98.5vw !important;
  margin: 0 auto !important;
  padding: 0.25rem 0.5rem !important;
  gap: 0 !important;
}

.main-container.focus-mode .sanctuary-sidebar,
.main-container.zen-expanded .sanctuary-sidebar {
  display: none !important;
}

.main-container.focus-mode .reader-container,
.main-container.zen-expanded .reader-container {
  height: calc(100vh - 106px) !important;
  min-height: 620px !important;
  max-width: 100% !important;
  width: 100% !important;
  margin: 0 auto !important;
  padding: 0.85rem 1.75rem 1rem !important;
  border-color: rgba(229, 179, 100, 0.45) !important;
  border-radius: var(--radius-lg, 22px) !important;
  box-shadow: 0 16px 60px rgba(0, 0, 0, 0.7), 0 0 40px var(--accent-gold-glow) !important;
}

/* Thu gọn header & kệ kinh khi ở chế độ phóng to để dồn 100% diện tích cho phần đọc */
body.is-focus-mode .site-header {
  padding-top: 4px !important;
  padding-bottom: 4px !important;
}

body.is-focus-mode .brand-tagline {
  display: none !important;
}

/* Thu gọn kệ kinh khi ở Chế độ Chuyên Tâm Trì Tụng */
body.is-focus-mode .sutra-nav-shelf {
  padding: 2px 14px !important;
  margin-bottom: 2px !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

body.is-focus-mode .sutra-shelf-inner {
  max-width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
}

body.is-focus-mode .mantra-tabs-nav {
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(229, 179, 100, 0.3) transparent;
  justify-content: flex-start !important;
  gap: 6px !important;
  padding: 2px 0 !important;
}

body.is-focus-mode .mantra-tabs-nav::-webkit-scrollbar {
  height: 3px;
}

body.is-focus-mode .mantra-tabs-nav::-webkit-scrollbar-thumb {
  background: rgba(229, 179, 100, 0.3);
  border-radius: 2px;
}

body.is-focus-mode .mantra-tab-btn {
  padding: 3px 11px !important;
  font-size: 0.78rem !important;
  height: 26px !important;
  line-height: 1.2 !important;
  flex-shrink: 0 !important;
  box-shadow: none !important;
}

body.is-focus-mode .btn-toggle-shelf {
  padding: 3px 10px !important;
  font-size: 0.74rem !important;
  height: 26px !important;
}

body.is-focus-mode .sutra-nav-shelf.is-collapsed {
  padding: 2px 12px !important;
}

/* Khi kệ kinh thu gọn trong Chuyên Tâm: Tăng tối đa chiều cao cho khu vực đọc kinh */
body.is-focus-mode.shelf-collapsed .reader-container,
body.is-focus-mode .sutra-nav-shelf.is-collapsed ~ .main-container .reader-container {
  height: calc(100vh - 80px) !important;
}

body.is-focus-mode .mantra-scroll-container {
  padding-bottom: 85px !important;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

body.is-focus-mode .site-footer {
  padding-bottom: 80px !important;
}

/* Thân bài kinh phóng to rộng tối đa gần đầy hết màn hình */
.main-container.focus-mode .mantra-content-body {
  max-width: min(97vw, 1800px) !important;
  margin: 0 auto !important;
  width: 100% !important;
  padding: 0 0.5rem 2rem !important;
}

.main-container.focus-mode .mantra-header-block {
  max-width: min(97vw, 1800px) !important;
  margin: 0 auto 1.25rem !important;
}

/* Phóng to chữ và độ rộng khi ở chế độ Dồn đoạn (Kiết ấn) - tràn viền trang nghiêm */
.main-container.focus-mode #mantra-content-body.continuous-flow {
  max-width: 100% !important;
  width: 100% !important;
  padding: 2rem 2.8rem !important;
  border-radius: var(--radius-lg, 22px) !important;
  line-height: 2.35 !important;
  box-shadow: 0 8px 36px rgba(0, 0, 0, 0.35) !important;
  font-size: calc(var(--mantra-font-size, 20px) * 1.18) !important;
}

.main-container.focus-mode #mantra-content-body.continuous-flow .verse-vn,
.main-container.focus-mode #mantra-content-body.continuous-flow .verse-sa,
.main-container.focus-mode #mantra-content-body.continuous-flow .verse-phonetic,
.main-container.focus-mode #mantra-content-body.continuous-flow .phonetic-text {
  font-size: calc(var(--mantra-font-size, 20px) * 1.18) !important;
  line-height: 2.35 !important;
}

/* Phóng to các câu thơ khi đọc từng câu */
.main-container.focus-mode .verse-item {
  padding: 15px 24px !important;
  margin-bottom: 12px !important;
  border-radius: var(--radius-md, 14px) !important;
}

.main-container.focus-mode .verse-vn {
  font-size: calc(var(--mantra-font-size, 20px) * 1.15) !important;
  line-height: 1.65 !important;
}

.main-container.focus-mode .verse-sa {
  font-size: calc(var(--mantra-font-size, 20px) * 1.08) !important;
}

.main-container.focus-mode .verse-item.highlighted {
  background: var(--bg-surface-elevated);
  border-color: var(--accent-gold);
  box-shadow: 0 0 28px var(--accent-gold-glow), inset 0 0 14px rgba(229, 179, 100, 0.12);
  transform: scale(1.006);
}

/* Phóng to bộ sưu tập ảnh Chùa Phật Lớn & Bản Chùa */
.main-container.focus-mode .banchua-gallery-wrapper {
  max-width: min(97vw, 1800px) !important;
  width: 100% !important;
  margin: 0 auto !important;
}

.main-container.focus-mode .banchua-cards-container {
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)) !important;
  gap: 1.5rem !important;
}

/* ==========================================================================
   CỘT TRÁI: KHÔNG GIAN ĐỌC KINH VĂN (READER - TỐI ĐA CHIỀU CAO & DIỆN TÍCH)
   ========================================================================== */
.reader-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1rem 1.75rem 1.25rem;
  box-shadow: var(--card-glow);
  display: flex;
  flex-direction: column;
  height: calc(100vh - 145px);
  min-height: 580px;
  position: relative;
  overflow: hidden;
}

/* Thanh điều khiển đọc (Reading Toolbar) - Tinh gọn tối đa chiều cao */
.reader-controls-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.control-pill {
  display: flex;
  align-items: center;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 2px 4px;
}

.lang-mode-btn {
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.lang-mode-btn.active {
  background: var(--border-strong);
  color: var(--text-primary);
}

.btn-toggle-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.btn-toggle-switch.active {
  background: var(--accent-gold-glow);
  border-color: var(--accent-gold);
  color: var(--text-accent);
}

/* Điều chỉnh cỡ chữ đa trình duyệt (Font Size Controls) */
.font-size-control-pill {
  display: inline-flex;
  align-items: center;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 1px 3px;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.btn-font-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 30px;
  padding: 0 6px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

.btn-font-step:hover {
  background: var(--border-subtle);
  color: var(--accent-gold);
}

.btn-font-step:active {
  transform: scale(0.92);
  background: var(--border-strong);
}

.font-size-val-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 28px;
  padding: 0 4px;
  border: none;
  background: transparent;
  color: var(--accent-gold);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  border-radius: var(--radius-sm);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

.font-size-val-btn:hover {
  background: var(--border-subtle);
}

/* Auto-scroll controls */
.autoscroll-panel {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 2px 6px;
}

.btn-autoscroll {
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
}

.speed-select {
  background: transparent;
  border: none;
  font-size: 0.78rem;
  color: var(--text-muted);
  outline: none;
  cursor: pointer;
  padding: 2px 4px;
}

.btn-zen-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

/* Khung cuộn câu kinh (Toàn bộ chiều cao dành cho việc đọc tụng, không bị giới hạn 360px) */
.mantra-scroll-container {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  padding-right: 0.75rem;
  padding-bottom: 2.5rem;
  scroll-behavior: auto;
  user-select: text;
}

.mantra-scroll-container.is-autoscrolling {
  scroll-behavior: auto !important;
}

/* Tiêu đề bản kinh (Đặt trong dòng cuộn, trôi lên khi đọc tụng để nhường chỗ cho kinh văn) */
.mantra-header-block {
  text-align: center;
  padding: 0.4rem 0 1rem;
  border-bottom: 1px dashed var(--border-subtle);
  margin-bottom: 1.25rem;
}

.tradition-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 3px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 0.4rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-accent);
}

.tradition-badge.tradition-mahayana {
  background: rgba(229, 179, 100, 0.12);
  border-color: rgba(229, 179, 100, 0.35);
  color: var(--text-accent);
}

.tradition-badge.tradition-theravada {
  background: rgba(217, 147, 95, 0.15);
  border-color: rgba(217, 147, 95, 0.4);
  color: #e59d64;
}

.tradition-badge.tradition-vajrayana {
  background: rgba(179, 57, 39, 0.15);
  border-color: rgba(179, 57, 39, 0.4);
  color: #ff7b66;
}

.mantra-title {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--text-accent);
  letter-spacing: 0.02em;
  margin-bottom: 0.2rem;
}

.mantra-sa-title {
  font-family: var(--font-sanskrit);
  font-style: italic;
  font-size: 1rem;
  color: var(--text-sanskrit);
  margin-bottom: 0.4rem;
  line-height: 1.4;
  letter-spacing: 0.01em;
}

.mantra-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto;
  line-height: 1.5;
}

/* Sub-nav nhảy nhanh giữa các Hội / Phẩm Kinh Điển - Tự động xuống hàng, hiển thị 100% không bị tràn */
.sub-nav-container {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg-surface-translucent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 8px 12px;
  margin-bottom: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  justify-content: center;
  align-items: center;
}

.sub-nav-item {
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}

.sub-nav-item:hover {
  border-color: var(--accent-gold);
  color: var(--text-primary);
  background: var(--bg-surface);
  transform: translateY(-1px);
}

.sub-nav-item.active {
  background: var(--accent-gold);
  color: #1a1107;
  border-color: var(--accent-gold);
  box-shadow: 0 2px 8px var(--accent-gold-glow);
  font-weight: 700;
}

/* Custom Scrollbar thanh lịch */
.mantra-scroll-container::-webkit-scrollbar {
  width: 6px;
}
.mantra-scroll-container::-webkit-scrollbar-track {
  background: transparent;
}
.mantra-scroll-container::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: var(--radius-full);
}

.mantra-section {
  margin-bottom: 2rem;
}

.section-heading {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--text-accent);
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lotus-bullet {
  font-size: 1rem;
}

.verses-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.verse-item {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 0.85rem 1.15rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.verse-item:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--border-subtle);
}

.verse-item.highlighted {
  background: var(--bg-surface-elevated);
  border-color: var(--accent-gold);
  box-shadow: 0 0 16px var(--accent-gold-glow);
}

.verse-num {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.verse-item.highlighted .verse-num {
  background: var(--accent-gold);
  color: #1a1107;
  border-color: var(--accent-gold);
}

.verse-text-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.verse-vn {
  font-family: var(--font-serif);
  font-size: var(--mantra-font-size);
  font-weight: 500;
  line-height: 1.5;
  color: var(--text-primary);
  letter-spacing: 0.015em;
  white-space: pre-line;
}

.verse-sa {
  font-family: var(--font-sanskrit);
  font-style: italic;
  font-size: calc(var(--mantra-font-size) * 0.95);
  color: var(--text-sanskrit);
  line-height: 1.55;
  letter-spacing: 0.015em;
  white-space: pre-line;
  font-feature-settings: "kern" 1, "liga" 1;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.verse-mean {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 2px;
}

.mean-label {
  font-weight: 600;
  color: var(--text-secondary);
}

/* Dòng hướng dẫn cách đọc tiếng Phạn bằng tiếng Việt */
.verse-phonetic {
  font-family: var(--font-sans);
  font-size: calc(var(--mantra-font-size) * 0.84);
  line-height: 1.5;
  background: var(--bg-surface-elevated);
  border-left: 3px solid var(--accent-gold);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 4px 10px;
  margin: 3px 0 4px;
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  transition: all var(--transition-fast);
}

.phonetic-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-gold);
  letter-spacing: 0.04em;
  white-space: nowrap;
  user-select: none;
}

.phonetic-text {
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

/* Visibility toggles based on view mode */
.mode-vietnamese .verse-sa,
.mode-vietnamese .verse-phonetic { display: none !important; }
.mode-sanskrit .verse-vn,
.mode-sanskrit .verse-phonetic { display: none !important; }
.hide-meaning .verse-mean { display: none; }
.hide-phonetic .verse-phonetic { display: none; }

/* Khi chọn chế độ Phạn: Chữ Phạn là dòng tụng chính, hiển thị rõ nét, thẳng chữ để dễ đọc liên tục */
.mode-sanskrit .verse-sa {
  font-size: var(--mantra-font-size);
  font-style: normal;
  color: var(--text-primary);
  font-weight: 500;
  line-height: 1.6;
}

/* ==========================================================================
   CHẾ ĐỘ THUẦN PHIÊN ÂM (MODE-PHONETIC)
   Ẩn hoàn toàn chữ chú gốc và Hán-Việt, chỉ đọc thuần phiên âm liên tục 1 mạch không ngắt dòng
   ========================================================================== */
.mode-phonetic .verse-item.has-phonetic .verse-vn,
.mode-phonetic .verse-sa {
  display: none !important;
}

.mode-phonetic .verse-phonetic {
  display: block !important;
  background: transparent !important;
  border-left: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  font-family: var(--font-serif);
  font-size: var(--mantra-font-size);
  font-weight: 500;
  line-height: 1.55;
  color: var(--text-primary);
  letter-spacing: 0.015em;
}

.mode-phonetic .verse-phonetic .phonetic-badge {
  display: none !important;
}

.mode-phonetic .verse-phonetic .phonetic-text {
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
}

/* ==========================================================================
   CHẾ ĐỘ DỒN LIỀN CÁC CÂU KINH THÀNH ĐOẠN VĂN LIÊN TỤC (KIẾT ẤN)
   Tối ưu hóa không gian hiển thị, loại bỏ ngắt dòng và khoảng cách thừa
   Giúp hành giả kết ấn trì tụng liền mạch mà không phải buông tay điều chỉnh màn hình
   ========================================================================== */
#mantra-content-body {
  font-size: var(--mantra-font-size, 20px);
  transition: font-size 0.15s ease-out;
}

#mantra-content-body.continuous-flow {
  display: block;
  background: var(--bg-surface-elevated);
  padding: 1.35rem 1.65rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.15);
  line-height: 2.2;
  text-align: justify;
  text-justify: inter-word;
  font-size: var(--mantra-font-size, 20px) !important;
}

/* Khi ở chế độ Dồn đoạn: Ẩn triệt để Sub-nav và thu gọn tối đa tiêu đề để nhường 100% không gian cho kinh văn */
.is-continuous #mantra-sub-nav,
body.is-continuous-mode #mantra-sub-nav,
.reader-container.is-continuous #mantra-sub-nav,
#mantra-content-body.continuous-flow ~ #mantra-sub-nav {
  display: none !important;
}

.is-continuous .tradition-badge,
.is-continuous .mantra-desc,
.is-continuous .mantra-sa-title {
  display: none !important;
}

.is-continuous .mantra-header-block {
  padding: 0.15rem 0 0.35rem !important;
  margin-bottom: 0.35rem !important;
  border-bottom: 1px dashed var(--border-subtle) !important;
}

.is-continuous .mantra-title {
  font-size: 1.15rem !important;
  margin: 0 !important;
}

.continuous-flow .mantra-section {
  display: inline !important;
  margin: 0 !important;
  padding: 0 !important;
}

.continuous-flow .section-heading {
  display: none !important; /* Ẩn toàn bộ tiêu đề các Hội khi dồn để giữ trọn vẹn mạch tụng */
}

.continuous-flow .verses-list {
  display: inline !important;
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  box-shadow: none !important;
  line-height: inherit !important;
}

.continuous-flow .verse-item {
  display: inline !important;
  padding: 0 !important;
  margin: 0 0.28rem 0 0 !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  cursor: text;
}

.continuous-flow .verse-item.highlighted {
  background: var(--accent-gold-glow) !important;
  border-radius: 3px;
  box-shadow: 0 0 6px var(--accent-gold);
}

.continuous-flow .verse-num {
  display: none !important;
}

.continuous-flow .verse-text-group {
  display: inline !important;
}

.continuous-flow .verse-vn,
.continuous-flow .verse-sa,
.continuous-flow .verse-phonetic,
.continuous-flow .phonetic-text {
  white-space: normal !important;
  line-height: inherit !important;
  font-size: var(--mantra-font-size, 20px) !important;
}

/* Ẩn mặc định phần hướng dẫn đọc và giải nghĩa khi bấm vào dồn để giữ trọn vẹn mạch kinh */
.continuous-flow .verse-phonetic,
.continuous-flow .verse-mean {
  display: none !important;
}

/* 1. Chế độ Song Ngữ khi dồn: Hiển thị cả Hán-Việt và Phạn ngữ liên tục */
.mode-bilingual.continuous-flow .verse-vn,
.mode-bilingual.continuous-flow .verse-sa {
  display: inline !important;
}

/* 2. Chế độ Hán-Việt khi dồn: Chỉ hiển thị chữ Hán-Việt, ẩn triệt để Phạn ngữ và phiên âm */
.mode-vietnamese.continuous-flow .verse-vn {
  display: inline !important;
}
.mode-vietnamese.continuous-flow .verse-sa,
.mode-vietnamese.continuous-flow .verse-phonetic {
  display: none !important;
}

/* 3. Chế độ Phạn IAST khi dồn: Chỉ hiển thị chữ Phạn, ẩn triệt để tiếng Hán-Việt và phiên âm */
.mode-sanskrit.continuous-flow .verse-sa {
  display: inline !important;
}
.mode-sanskrit.continuous-flow .verse-vn,
.mode-sanskrit.continuous-flow .verse-phonetic {
  display: none !important;
}

/* 4. Chế độ Thuần Phiên Âm khi dồn: Chỉ hiển thị chữ phiên âm dạng inline liên tục, ẩn chữ chú gốc */
.mode-phonetic.continuous-flow .verse-sa,
.mode-phonetic.continuous-flow .verse-item.has-phonetic .verse-vn {
  display: none !important;
}
.mode-phonetic.continuous-flow .verse-item:not(.has-phonetic) .verse-vn {
  display: inline !important;
}
.mode-phonetic.continuous-flow .verse-phonetic {
  display: inline !important;
  border: none !important;
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
}
.mode-phonetic.continuous-flow .verse-phonetic .phonetic-badge {
  display: none !important;
}
.mode-phonetic.continuous-flow .verse-phonetic .phonetic-text {
  display: inline !important;
}

/* Loại bỏ hoàn toàn dấu chấm vàng giữa các câu khi dồn để câu chữ liền nhau */
.continuous-flow .verse-item::after,
.continuous-flow .verse-item:not(:last-child)::after {
  content: "" !important;
  display: none !important;
}

@media (max-width: 768px) {
  #mantra-content-body.continuous-flow {
    padding: 0.9rem 1.05rem;
    line-height: 2.1;
    text-align: left;
  }
}

/* ==========================================================================
   CHẾ ĐỘ CĂN GIỮA CÂU KINH (CENTER TEXT MODE)
   Tạo nhịp điệu thiền môn trang trọng, đối xứng tuyệt mỹ
   ========================================================================== */
.center-text-flow .verses-list {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.center-text-flow .verse-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  gap: 0.4rem;
}

.center-text-flow .verse-num {
  margin: 0 auto 0.25rem;
}

.center-text-flow .verse-text-group {
  align-items: center;
  text-align: center;
  width: 100%;
}

.center-text-flow .verse-vn {
  text-align: center;
}

.center-text-flow .verse-sa {
  text-align: center;
}

.center-text-flow .verse-mean {
  text-align: center;
}

.center-text-flow .verse-phonetic {
  margin: 4px auto;
  justify-content: center;
}

.center-text-flow .section-heading {
  justify-content: center;
  text-align: center;
}

/* Các nút công cụ mới: Sao chép chú, Chuyên tâm trì tụng */
.btn-copy-mantra,
.btn-share-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.btn-copy-mantra:hover,
.btn-share-link:hover {
  border-color: var(--accent-gold);
  color: var(--text-accent);
  background: var(--accent-gold-glow);
  transform: translateY(-1px);
}

.btn-copy-mantra:active,
.btn-share-link:active {
  transform: scale(0.95);
}

.btn-focus-highlight {
  border-color: var(--border-subtle);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.btn-focus-highlight:hover {
  border-color: var(--accent-gold);
  color: var(--text-accent);
  background: var(--accent-gold-glow);
}

.btn-focus-highlight.active {
  background: var(--accent-gold) !important;
  color: #1a1107 !important;
  border-color: var(--accent-gold) !important;
  font-weight: 700;
  box-shadow: 0 0 14px var(--accent-gold-glow);
}

/* Khi ở Chế độ Chuyên Tâm: Hiển thị Dock nổi công phu tinh tế ở đáy màn hình Laptop / PC */
body.is-focus-mode .mobile-floating-dock {
  display: block !important;
  position: fixed !important;
  bottom: 20px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: auto !important;
  min-width: 380px !important;
  max-width: 520px !important;
  background: var(--bg-surface-elevated) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  border: 1px solid var(--border-strong) !important;
  border-radius: var(--radius-full) !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7), 0 0 24px var(--accent-gold-glow) !important;
  padding: 7px 16px !important;
  z-index: 999 !important;
  animation: fadeInFocus 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

@keyframes fadeInFocus {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ==========================================================================
   CỘT PHẢI: KHÔNG GIAN CÔNG PHU (MÕ ẢO, CHUÔNG, BỘ ĐẾM BIẾN)
   ========================================================================== */
.sanctuary-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: sticky;
  top: 80px;
}

.sanctuary-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--card-glow);
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-accent);
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.6rem;
}

/* Vùng Tương Tác Mõ & Chuông */
.instrument-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 0 1rem;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: radial-gradient(circle, var(--bg-surface-elevated) 0%, transparent 70%);
}

.sound-wave-area {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.instrument-buttons-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  z-index: 2;
}

/* Nút Mõ Ảo 3D */
.virtual-mo-btn {
  width: 130px;
  height: 130px;
  border-radius: var(--radius-full);
  background: radial-gradient(circle at 35% 30%, #6d3a1f 0%, var(--mo-gradient-1) 50%, var(--mo-gradient-2) 100%);
  border: 3px solid #854b2a;
  box-shadow: 0 12px 28px rgba(0,0,0,0.5), inset 0 2px 6px rgba(255,255,255,0.2), inset 0 -6px 12px rgba(0,0,0,0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #f7e6cf;
  position: relative;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
  outline: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

.virtual-mo-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 16px 32px rgba(0,0,0,0.6), 0 0 20px var(--accent-gold-glow);
}

.virtual-mo-btn:active, .virtual-mo-btn.active-hit {
  transform: translateY(4px) scale(0.95);
  box-shadow: 0 4px 12px rgba(0,0,0,0.7), inset 0 4px 8px rgba(0,0,0,0.8);
}

.mo-real-icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full, 50%);
  overflow: hidden;
  border: 2px solid rgba(229, 179, 100, 0.65);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6), 0 0 14px rgba(229, 179, 100, 0.3), inset 0 2px 4px rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #140d09;
  flex-shrink: 0;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.virtual-mo-btn:hover .mo-real-icon-wrap {
  border-color: var(--accent-gold, #ffd700);
  box-shadow: 0 6px 18px rgba(229, 179, 100, 0.45), inset 0 2px 6px rgba(255, 255, 255, 0.3);
}

.virtual-mo-btn:active .mo-real-icon-wrap,
.virtual-mo-btn.active-hit .mo-real-icon-wrap {
  transform: scale(0.92);
}

.mo-real-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.22);
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.congduc-stat-mo-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(229, 179, 100, 0.6);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  transform: scale(1.15);
  display: block;
}

.milestone-mo-thumb {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(229, 179, 100, 0.5);
  transform: scale(1.15);
  display: block;
}

.stat-pill-mo-img, .mini-mo-img {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
  vertical-align: -3px;
  border: 1px solid rgba(229, 179, 100, 0.5);
  margin-right: 4px;
  display: inline-block;
}

.instrument-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Nút Chuông Đồng Huế */
.virtual-chuong-btn {
  width: 90px;
  height: 90px;
  border-radius: var(--radius-full);
  background: radial-gradient(circle at 35% 30%, #e8ba55 0%, var(--chuong-gradient-1) 50%, var(--chuong-gradient-2) 100%);
  border: 2px solid #dfb047;
  box-shadow: 0 10px 22px rgba(0,0,0,0.4), inset 0 2px 6px rgba(255,255,255,0.3), inset 0 -4px 10px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: #1a1205;
  position: relative;
  transition: transform 0.08s ease;
  outline: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

.virtual-chuong-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 14px 28px rgba(0,0,0,0.5), 0 0 18px var(--accent-gold-glow);
}

.virtual-chuong-btn:active, .virtual-chuong-btn.active-hit {
  transform: translateY(3px) scale(0.94);
}

.chuong-icon-svg {
  width: 38px;
  height: 38px;
  fill: currentColor;
}

/* Huy hiệu đếm số lần gõ Mõ & Chuông */
.strike-count-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(18, 12, 10, 0.88);
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold);
  font-size: 0.7rem;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: var(--radius-full);
  min-width: 22px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
  pointer-events: none;
  font-family: var(--font-sans);
  letter-spacing: 0.02em;
}

/* Hàng thống kê Mõ & Chuông trong Mala Card */
.instrument-stats-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px dashed var(--border-subtle);
}

.stat-pill {
  font-size: 0.8rem;
  color: var(--text-secondary);
  background: var(--bg-surface-elevated);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.stat-pill strong {
  color: var(--accent-gold);
  font-weight: 700;
}

.keyboard-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 1rem;
}

.kbd-badge {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.7rem;
  font-family: monospace;
  color: var(--text-secondary);
}

/* Bộ Chọn Âm Sắc Mõ Đại Thừa */
.mo-tone-selector-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.85rem;
  padding: 4px 10px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
}

.mo-tone-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.mo-tone-select {
  background: transparent;
  border: none;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-accent);
  outline: none;
  cursor: pointer;
}

.mo-tone-select option {
  background: var(--bg-surface);
  color: var(--text-primary);
}

/* Auto-beat metronome controls */
.metronome-controls {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.metronome-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.slider-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.range-slider {
  flex: 1;
  accent-color: var(--accent-gold);
  cursor: pointer;
}

.slider-val-badge {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-accent);
  min-width: 58px;
  text-align: right;
}

/* ==========================================================================
   BỘ ĐẾM BIẾN TỤNG (MALA COUNTER)
   ========================================================================== */
.counter-main-display {
  text-align: center;
  padding: 1rem 0 0.5rem;
}

.counter-numbers {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.4rem;
  margin-bottom: 0.25rem;
}

.current-count-num {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--text-accent);
  line-height: 1;
  text-shadow: 0 2px 12px var(--accent-gold-glow);
  cursor: pointer;
  transition: opacity var(--transition-fast);
}

.current-count-num:hover {
  opacity: 0.85;
}

.btn-edit-count-icon {
  font-size: 0.85rem;
  opacity: 0.55;
  padding: 3px 5px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: opacity var(--transition-fast), transform 0.1s ease;
  line-height: 1;
}

.btn-edit-count-icon:hover {
  opacity: 1;
  transform: scale(1.15);
}

.target-count-text {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition-fast);
}

.target-count-text:hover {
  color: var(--accent-gold);
}

/* Progress Bar */
.counter-progress-container {
  margin: 0.75rem 0 1rem;
}

.progress-track {
  width: 100%;
  height: 8px;
  background: var(--bg-surface-elevated);
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-gold) 0%, #ffdf9e 100%);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

.progress-info-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Target Selector Pills */
.target-selector-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}

.target-pill-btn {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.target-pill-btn.active {
  background: var(--accent-gold);
  color: #1a1107;
  border-color: var(--accent-gold);
}

.target-pill-custom {
  font-size: 0.74rem;
  padding: 4px 8px;
  border-style: dashed;
}

/* Khung Nhập Số Biến Cụ Thể */
.custom-target-box {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.85rem;
  margin-bottom: 0.85rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.35);
  animation: fadeIn 0.15s ease-out;
}

.custom-target-inputs {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
}

.custom-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.custom-field label {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
}

.custom-field input {
  width: 100%;
  padding: 5px 8px;
  font-size: 0.88rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition-fast);
}

.custom-field input:focus {
  border-color: var(--accent-gold);
}

.btn-apply-custom {
  padding: 5px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  background: var(--accent-gold);
  color: #1a1107;
  border-radius: var(--radius-sm);
  cursor: pointer;
  height: 31px;
  flex-shrink: 0;
  transition: transform 0.08s ease, filter var(--transition-fast);
}

.btn-apply-custom:hover {
  filter: brightness(1.1);
}

.btn-apply-custom:active {
  transform: scale(0.95);
}

/* Counter action buttons (+, -, reset) */
.counter-actions-grid {
  display: grid;
  grid-template-columns: 1fr 2.5fr 1fr;
  gap: 0.6rem;
}

.btn-counter-act {
  padding: 0.75rem;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 700;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

.btn-counter-act:hover {
  background: var(--border-subtle);
}

.btn-counter-act.btn-main-increment {
  background: var(--accent-gold);
  color: #1a1107;
  border-color: var(--accent-gold);
  font-size: 1.15rem;
  box-shadow: 0 4px 14px var(--accent-gold-glow);
}

.btn-counter-act.btn-main-increment:active,
.btn-counter-act.btn-main-increment.active-hit {
  transform: scale(0.95);
}

/* Thống kê nhỏ bên dưới */
.counter-stats-bar {
  display: flex;
  justify-content: space-around;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.stat-item strong {
  color: var(--text-secondary);
  font-weight: 600;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-muted);
  cursor: pointer;
  margin-top: 0.85rem;
  justify-content: center;
}

/* ==========================================================================
   MODAL CHÚC MỪNG HOÀN THÀNH & HỒI HƯỚNG
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

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

.modal-card {
  position: relative;
  background: var(--bg-surface);
  border: 2px solid var(--accent-gold);
  border-radius: var(--radius-lg);
  padding: 2.2rem 2rem;
  max-width: 520px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6), 0 0 30px var(--accent-gold-glow);
  transform: scale(0.9);
  transition: transform var(--transition-base);
}

.modal-close-corner {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  transition: all var(--transition-fast);
  z-index: 10;
}

.modal-close-corner:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #ef4444;
  transform: rotate(90deg);
}

.modal-overlay.active .modal-card {
  transform: scale(1);
}

.modal-lotus-icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
  display: inline-block;
  animation: floatLotus 3s ease-in-out infinite;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--text-accent);
  margin-bottom: 0.5rem;
}

.modal-body-text {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.hoihuong-box {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  text-align: left;
  font-family: var(--font-serif);
  font-size: 0.9rem;
  color: var(--text-primary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.hoihuong-title {
  font-weight: 700;
  color: var(--text-accent);
  margin-bottom: 0.4rem;
}

.btn-modal-action {
  padding: 0.75rem 2rem;
  border-radius: var(--radius-full);
  background: var(--accent-gold);
  color: #1a1107;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 4px 15px var(--accent-gold-glow);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 1.25rem 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--bg-surface);
}

.footer-quote {
  font-family: var(--font-serif);
  font-style: italic;
  margin-bottom: 0.8rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Khung Tác Giả & Liên Hệ ở Footer */
.footer-author-box {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 0.85rem 1.25rem;
  margin: 0.75rem auto 1rem;
  max-width: 780px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.author-title {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.author-title strong {
  color: var(--text-accent);
}

.author-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.author-link-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.author-link-pill:hover {
  background: var(--border-subtle);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.author-link-pill.fb:hover {
  background: rgba(24, 119, 242, 0.15);
  border-color: #1877f2;
  color: #5b9eff;
}

.author-link-pill.zalo:hover {
  background: rgba(0, 104, 255, 0.15);
  border-color: #0068ff;
  color: #5bb2ff;
}

.author-link-pill.wa:hover {
  background: rgba(37, 211, 102, 0.15);
  border-color: #25d366;
  color: #25d366;
}

.author-link-pill.donate {
  background: var(--accent-gold-glow);
  border-color: var(--accent-gold);
  color: var(--text-accent);
}

.author-link-pill.donate:hover {
  background: var(--accent-gold);
  color: #1a1107;
  box-shadow: 0 2px 10px var(--accent-gold-glow);
}

/* Cụm Thống Kê & Bộ Đếm Khách Trực Tuyến / Viếng Thăm Toàn Cầu */
.footer-visitor-counter {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0.5rem auto 1.25rem;
  width: 100%;
}

.visitor-counter-inner {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  padding: 6px 18px;
  border-radius: var(--radius-full);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.16);
  font-size: 0.82rem;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  cursor: pointer;
  user-select: none;
}

.visitor-counter-inner:hover {
  border-color: var(--accent-gold);
  box-shadow: 0 4px 16px var(--accent-gold-glow);
  transform: translateY(-1px);
}

.counter-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.counter-separator {
  color: var(--accent-gold);
  opacity: 0.6;
  font-size: 0.75rem;
  line-height: 1;
}

.visitor-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.visitor-lotus-svg {
  display: inline-block;
  vertical-align: middle;
  filter: drop-shadow(0 1px 3px rgba(229, 179, 100, 0.4));
}

.counter-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}

.counter-sub-label {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-left: -2px;
}

.counter-value {
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  min-width: 18px;
  display: inline-block;
  text-align: center;
}

.counter-value.online-val {
  color: #34d399; /* Sắc lục phỉ thúy thanh thoát */
}

.counter-value.total-val {
  color: var(--text-accent);
}

.counter-value.num-pop {
  animation: numPop 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes numPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.22); filter: brightness(1.3); }
  100% { transform: scale(1); }
}

/* Đốm Nhấp Nháy Trực Tuyến (Live Online Pulse Dot) */
.online-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6c757d;
  position: relative;
  transition: background var(--transition-fast);
  flex-shrink: 0;
}

.online-pulse-dot.active {
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.7);
}

.online-pulse-dot.active::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 50%;
  border: 1.5px solid #10b981;
  animation: pulseDot 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

@keyframes pulseDot {
  0% { transform: scale(0.95); opacity: 0.85; }
  70% { transform: scale(2.4); opacity: 0; }
  100% { transform: scale(2.4); opacity: 0; }
}

/* Toast Thông Báo Khách Trực Tuyến & Viếng Thăm */
.niem-toast-notification {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(40px);
  background: rgba(26, 17, 7, 0.95);
  color: #fce7b0;
  border: 1px solid var(--accent-gold);
  border-radius: var(--radius-full);
  padding: 10px 22px;
  font-size: 0.85rem;
  font-family: var(--font-serif);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 16px var(--accent-gold-glow);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10000;
  pointer-events: none;
  text-align: center;
  max-width: 90vw;
  line-height: 1.4;
}

.niem-toast-notification.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  visibility: visible;
}

@media (max-width: 540px) {
  .visitor-counter-inner {
    gap: 8px;
    padding: 6px 12px;
    font-size: 0.78rem;
  }
  .counter-label {
    font-size: 0.74rem;
  }
  .counter-value {
    font-size: 0.86rem;
  }
  .counter-sub-label {
    display: none;
  }
}

/* Nút Xem Top 10 Quốc Gia trên thanh Counter */
.counter-countries-btn {
  background: rgba(229, 179, 100, 0.08);
  border: 1px solid rgba(229, 179, 100, 0.3);
  border-radius: var(--radius-full);
  padding: 2px 10px;
  cursor: pointer;
  color: var(--text-accent);
  transition: all var(--transition-fast);
}

.counter-countries-btn:hover {
  background: rgba(229, 179, 100, 0.2);
  border-color: var(--accent-gold);
  transform: translateY(-1px);
}

.counter-countries-btn .globe-icon {
  font-size: 0.9rem;
}

.counter-countries-btn .counter-label {
  color: var(--text-accent);
  font-weight: 600;
}

/* Dải Hiển Thị Trực Tiếp Top 10 Quốc Gia Kèm Số Lượng */
.countries-live-strip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  width: 100%;
  max-width: 980px;
  padding: 0 8px;
}

.countries-live-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  color: var(--accent-gold);
  letter-spacing: 0.5px;
  font-weight: 600;
  text-transform: uppercase;
  opacity: 0.9;
}

.globe-mini-icon {
  font-size: 0.85rem;
  line-height: 1;
}

.countries-live-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 8px;
  width: 100%;
}

.country-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  cursor: pointer;
  user-select: none;
  font-family: inherit;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.country-pill:hover {
  border-color: var(--accent-gold);
  background: rgba(229, 179, 100, 0.12);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px var(--accent-gold-glow);
}

.country-pill.is-active {
  background: rgba(16, 185, 129, 0.12);
  border-color: #10b981;
  color: #34d399;
  font-weight: 600;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.25);
}

.country-pill .pill-flag {
  font-size: 0.95rem;
  line-height: 1;
}

.country-pill .pill-name {
  color: inherit;
}

.country-pill .pill-count {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.82rem;
  min-width: 12px;
  text-align: center;
}

.country-pill.is-active .pill-count {
  color: #34d399;
}

.country-pill:not(.is-active) .pill-count {
  color: var(--text-muted);
  opacity: 0.65;
}

.country-pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.8);
  animation: pulseDot 2s infinite ease-in-out;
  flex-shrink: 0;
}

/* Modal Top 10 Quốc Gia */
.countries-modal-card {
  max-width: 580px;
  width: 92vw;
  max-height: 90vh;
  overflow-y: auto;
}

.countries-intro {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  text-align: center;
}

.current-user-location-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-full);
  padding: 6px 16px;
  margin: 0 auto 1.25rem;
  font-size: 0.85rem;
  color: var(--text-primary);
  width: fit-content;
}

.location-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
  flex-shrink: 0;
}

.location-label {
  color: var(--text-muted);
}

.location-name {
  color: #34d399;
  font-weight: 600;
}

.location-status {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Thống Kê Tổng Lượt & Người Dùng Realtime */
.stats-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 1.25rem;
}

.stat-card {
  background: rgba(229, 179, 100, 0.08);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  transition: all var(--transition-fast);
}

.stat-card:hover {
  background: rgba(229, 179, 100, 0.12);
  border-color: var(--accent-gold);
  transform: translateY(-2px);
}

.stat-card-icon {
  font-size: 1.35rem;
  line-height: 1;
  flex-shrink: 0;
}

.stat-card-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.stat-card-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-card-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-gold);
  font-family: var(--font-sans);
}

@media (max-width: 540px) {
  .stats-overview-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

/* Bảng Danh Sách Top 10 */
.countries-table-wrapper {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 1rem;
}

.countries-table-header {
  display: grid;
  grid-template-columns: 44px 1fr 120px 90px;
  padding: 8px 12px;
  background: rgba(229, 179, 100, 0.1);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-gold);
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
}

.countries-table-header .col-online,
.countries-table-header .col-visits {
  text-align: right;
}

.country-row {
  display: grid;
  grid-template-columns: 44px 1fr 120px 90px;
  padding: 9px 12px;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.85rem;
  transition: background var(--transition-fast);
}

.country-row:last-child {
  border-bottom: none;
}

.country-row:hover {
  background: rgba(229, 179, 100, 0.05);
}

.country-row.is-self {
  background: rgba(16, 185, 129, 0.06);
  border-left: 3px solid #10b981;
}

.col-rank {
  font-family: var(--font-sans);
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.col-rank.rank-1 { color: #f59e0b; }
.col-rank.rank-2 { color: #94a3b8; }
.col-rank.rank-3 { color: #d97706; }

.col-country {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: var(--text-primary);
  overflow: hidden;
}

.country-flag {
  font-size: 1.1rem;
  line-height: 1;
}

.country-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.self-location-chip {
  font-size: 0.68rem;
  background: #10b981;
  color: #064e3b;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  margin-left: 4px;
}

.col-online {
  text-align: right;
}

.country-online-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.country-online-tag.live {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.country-online-tag.zero {
  color: var(--text-muted);
  opacity: 0.6;
}

.country-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.7);
  animation: pulseDot 2s infinite ease-in-out;
}

.col-visits {
  text-align: right;
  font-family: var(--font-sans);
  color: var(--text-muted);
  font-size: 0.82rem;
}

.countries-truth-notice {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  margin: 0.75rem 0 0.5rem;
  line-height: 1.4;
}

/* Thanh chuyển đổi tab: Xếp hạng vs Nhật ký gần nhất */
.countries-view-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 4px;
  margin: 0 auto 1rem;
  width: fit-content;
  max-width: 100%;
}

.view-switch-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.view-switch-btn:hover {
  color: var(--text-primary);
  background: rgba(229, 179, 100, 0.08);
}

.view-switch-btn.active {
  background: rgba(229, 179, 100, 0.18);
  border-color: rgba(229, 179, 100, 0.45);
  color: var(--accent-gold);
  box-shadow: 0 0 10px rgba(229, 179, 100, 0.2);
}

/* Bảng Nhật Ký Gần Nhất (Top 10) */
.recent-logs-table-wrapper {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 1rem;
  animation: fadeIn 0.25s ease;
}

.recent-logs-table-header {
  display: grid;
  grid-template-columns: 28px 110px 1fr 125px 85px;
  padding: 8px 12px;
  background: rgba(229, 179, 100, 0.1);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-gold);
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
  align-items: center;
}

.recent-logs-table-header .log-col-duration {
  text-align: center;
}

.recent-logs-table-header .log-col-time {
  text-align: right;
}

.recent-log-row {
  display: grid;
  grid-template-columns: 28px 110px 1fr 125px 85px;
  padding: 9px 12px;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.85rem;
  transition: background var(--transition-fast);
}

.recent-log-row:last-child {
  border-bottom: none;
}

.recent-log-row:hover {
  background: rgba(229, 179, 100, 0.05);
}

.recent-log-row.is-self {
  background: rgba(16, 185, 129, 0.06);
  border-left: 3px solid #10b981;
}

.log-col-rank {
  font-family: var(--font-sans);
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.log-col-country {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  color: var(--text-primary);
  overflow: hidden;
}

.log-country-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.83rem;
}

.log-col-section {
  display: flex;
  align-items: center;
  min-width: 0;
}

.log-section-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(229, 179, 100, 0.09);
  border: 1px solid rgba(229, 179, 100, 0.22);
  color: #f6d89b;
  padding: 2px 9px;
  border-radius: var(--radius-full);
  font-size: 0.79rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.log-col-duration {
  display: flex;
  justify-content: center;
  align-items: center;
}

.log-duration-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.log-duration-badge.live {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.log-duration-badge.offline {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  font-weight: 500;
}

.log-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.8);
  animation: pulseDot 2s infinite ease-in-out;
}

.log-col-time {
  text-align: right;
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.recent-logs-empty {
  padding: 24px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Ẩn các thẻ mobile trên giao diện máy tính */
.recent-log-mobile-top,
.recent-log-mobile-bottom {
  display: none !important;
}

@media (max-width: 560px) {
  .countries-table-header,
  .country-row {
    grid-template-columns: 32px 1fr 90px 60px;
    padding: 8px;
    font-size: 0.78rem;
  }
  .country-online-tag {
    font-size: 0.72rem;
    padding: 1px 6px;
  }

  .recent-logs-table-header {
    display: none !important;
  }

  .recent-log-row {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 7px !important;
    padding: 10px 12px !important;
  }

  .recent-log-row > .log-col-rank,
  .recent-log-row > .log-col-country,
  .recent-log-row > .log-col-section,
  .recent-log-row > .log-col-duration,
  .recent-log-row > .log-col-time {
    display: none !important;
  }

  .recent-log-mobile-top {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }

  .recent-log-mobile-bottom {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 8px;
  }

  .view-switch-btn {
    padding: 5px 10px;
    font-size: 0.76rem;
  }
}

.footer-safety-disclaimer {
  max-width: 820px;
  margin: 1.15rem auto 0.85rem;
  padding: 0.75rem 1.25rem;
  background: var(--bg-surface-elevated, rgba(0, 0, 0, 0.22));
  border: 1px solid var(--border-subtle, rgba(229, 179, 100, 0.2));
  border-radius: var(--radius-md, 8px);
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.footer-safety-disclaimer p {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--text-secondary, #dcd2c4);
  font-style: italic;
  letter-spacing: 0.01em;
}

.footer-copyright {
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* ==========================================================================
   DONATE BUTTON & DONATE MODAL
   ========================================================================== */
.btn-donate-header {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  padding: 0 11px;
  background: linear-gradient(135deg, rgba(229, 179, 100, 0.2), rgba(217, 147, 95, 0.1));
  border: 1px solid var(--accent-gold);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-accent);
  box-shadow: 0 2px 8px var(--accent-gold-glow);
  transition: all var(--transition-fast);
  cursor: pointer;
  white-space: nowrap !important;
  flex-shrink: 0;
  box-sizing: border-box;
}

.btn-donate-header:hover {
  background: var(--accent-gold);
  color: #1a1107;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px var(--accent-gold-glow);
}

.btn-donate-header .btn-donate-icon {
  font-size: 1rem;
}

/* Donate Modal Card */
.donate-modal-card {
  max-width: 560px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-close-corner {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.modal-close-corner:hover {
  background: var(--border-subtle);
  color: var(--text-primary);
}

.donate-intro {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 1.2rem;
}

/* Donate Tabs Nav */
.donate-tabs-nav {
  display: flex;
  align-items: center;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 3px;
  gap: 3px;
  margin-bottom: 1.25rem;
}

.donate-tab-btn {
  flex: 1;
  padding: 6px 8px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.donate-tab-btn:hover {
  color: var(--text-primary);
}

.donate-tab-btn.active {
  background: var(--accent-gold);
  color: #1a1107;
  box-shadow: 0 2px 8px var(--accent-gold-glow);
}

/* Tab Content 1: Việt Nam (VietQR) */
.qr-card-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.2rem;
}

.qr-image-wrapper {
  background: #ffffff;
  padding: 10px;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.vietqr-img {
  max-width: 200px;
  height: auto;
  display: block;
  border-radius: var(--radius-sm);
}

.bank-info-box {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  text-align: left;
  font-size: 0.88rem;
}

.bank-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px dashed var(--border-subtle);
}

.bank-info-row:last-child {
  border-bottom: none;
}

.bank-info-row .info-label {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.bank-info-row .info-value {
  color: var(--text-primary);
}

.bank-info-row .info-value.highlight {
  color: #10b981;
  font-weight: 700;
}

.bank-info-row .info-value.bold {
  font-weight: 700;
}

.bank-info-row .info-value.stk {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--text-accent);
  letter-spacing: 0.04em;
}

.bank-info-row .info-value.muted {
  color: var(--text-muted);
  font-style: italic;
}

.info-copy-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-copy-chip {
  padding: 3px 9px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-accent);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-copy-chip:hover {
  background: var(--accent-gold);
  color: #1a1107;
}

/* Tab Content 2: PayPal */
.paypal-card-container {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  margin-bottom: 1.2rem;
}

.paypal-badge-icon {
  font-size: 2.2rem;
  margin-bottom: 0.4rem;
}

.paypal-card-container h4 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--text-accent);
  margin-bottom: 0.4rem;
}

.paypal-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.paypal-email-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.8rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.paypal-email {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: #38bdf8;
}

.paypal-action-row {
  margin-top: 0.5rem;
}

.btn-paypal-direct {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  background: #0070ba;
  color: #ffffff;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 12px rgba(0, 112, 186, 0.3);
}

.btn-paypal-direct:hover {
  background: #005ea6;
  transform: translateY(-1px);
}

/* Tab Content 3: Kênh liên hệ */
.contact-card-container {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.2rem;
}

.author-avatar-badge {
  font-size: 2.2rem;
  margin-bottom: 0.3rem;
}

.contact-card-container h4 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--text-accent);
  margin-bottom: 0.3rem;
}

.contact-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.contact-links-grid {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.contact-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.contact-item:hover {
  background: var(--border-subtle);
  transform: translateX(3px);
}

.contact-icon {
  font-size: 1.3rem;
  margin-right: 10px;
}

.contact-text {
  flex: 1;
  text-align: left;
  display: flex;
  flex-direction: column;
}

.contact-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
}

.contact-detail {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.contact-arrow {
  font-size: 1.1rem;
  color: var(--text-muted);
}

/* Toast Thông Báo Sao Chép */
.copy-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #10b981;
  color: #ffffff;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  z-index: 100002;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
}

.copy-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ==========================================================================
   MOBILE & FOCUS FLOATING DOCK (THANH CÔNG CỤ NỔI DI ĐỘNG & CHẾ ĐỘ CHUYÊN TÂM)
   Tối ưu hóa hiển thị đồng bộ tuyệt đối trên cả Laptop/PC và Di động
   ========================================================================== */
.mobile-floating-dock {
  display: none;
}

.mobile-dock-inner {
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
}

.mobile-dock-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 6px 8px;
  min-width: 58px;
  color: var(--text-primary);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 0.08s ease, background-color var(--transition-fast), border-color var(--transition-fast);
  cursor: pointer;
  font-family: inherit;
}

.mobile-dock-btn:hover {
  border-color: var(--accent-gold);
  background: rgba(229, 179, 100, 0.12);
}

.mobile-dock-btn:active,
.mobile-dock-btn.active-hit {
  transform: scale(0.92);
}

.mobile-dock-mo {
  background: radial-gradient(circle at 35% 30%, #5a2e16 0%, var(--mo-gradient-1) 100%);
  border-color: #854b2a;
  color: #f7e6cf;
}

.mobile-dock-chuong {
  background: radial-gradient(circle at 35% 30%, #d4a33a 0%, var(--chuong-gradient-1) 100%);
  border-color: #dfb047;
  color: #1a1205;
}

.dock-icon-wrap {
  position: relative;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dock-icon-svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.dock-badge {
  position: absolute;
  top: -4px;
  right: -8px;
  background: var(--accent-red);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0 4px;
  border-radius: var(--radius-full);
  min-width: 16px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.5);
  font-family: var(--font-sans);
}

.dock-badge-gold {
  background: var(--accent-gold);
  color: #1a1205;
}

.dock-label {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.mobile-dock-scroll-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.mobile-dock-scroll {
  padding: 4px 8px;
  min-width: 64px;
}

.mobile-dock-scroll.btn-active {
  background: var(--accent-gold-glow);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.dock-scroll-icon {
  font-size: 0.95rem;
}

.mobile-speed-stepper {
  display: flex;
  align-items: center;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 1px 4px;
  gap: 4px;
}

.stepper-btn {
  font-size: 0.85rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-gold);
  touch-action: manipulation;
  background: transparent;
  border: none;
  cursor: pointer;
}

.stepper-val {
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--text-secondary);
  min-width: 26px;
  text-align: center;
}

.mobile-dock-mala {
  background: var(--bg-surface-elevated);
  border-color: var(--accent-gold);
}

.dock-mala-icon {
  font-size: 1.05rem;
}

/* Nút Thoát Chuyên Tâm trên Dock */
.mobile-dock-exit {
  display: none;
}

body.is-focus-mode .mobile-dock-exit {
  display: flex !important;
  border-color: rgba(239, 68, 68, 0.4);
}

body.is-focus-mode .mobile-dock-exit:hover {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
}

.dock-exit-icon {
  font-size: 0.95rem;
  font-weight: 800;
  color: #f87171;
  line-height: 1;
}

/* ==========================================================================
   RESPONSIVE DESIGN (MOBILE & TABLET)
   ========================================================================== */
@media (max-width: 1024px) {
  .main-container {
    grid-template-columns: 1fr;
  }
  
  .sanctuary-sidebar {
    position: static;
  }

  .reader-container {
    min-height: auto;
  }
}

@media (max-width: 768px) {
  body {
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  }

  .site-header {
    position: relative; /* Không còn sticky cố định, tự động trôi đi khi cuộn đọc kinh */
    padding: 0.35rem 0.65rem;
  }

  .header-inner {
    flex-wrap: wrap;
    gap: 0.4rem;
  }

  .tradition-filter-bar {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 2px 0;
  }

  .tradition-filter-bar::-webkit-scrollbar {
    display: none;
  }

  .tradition-pill {
    padding: 3px 8px;
    font-size: 0.72rem;
    flex-shrink: 0;
  }

  .sutra-nav-shelf {
    padding: 0.25rem 0.5rem;
  }

  .mantra-tabs-nav {
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap;
    gap: 5px;
    padding-bottom: 2px;
  }

  .mantra-tabs-nav::-webkit-scrollbar {
    display: none;
  }

  .mantra-tab-btn {
    padding: 4px 10px;
    font-size: 0.78rem;
    flex-shrink: 0;
  }

  .btn-expand-header .expand-text {
    display: none;
  }

  .btn-expand-header {
    width: 34px;
    height: 34px;
    padding: 0;
    justify-content: center;
  }

  /* Toàn bộ chiều cao và bề ngang dành cho kinh văn, không viền lồng viền */
  .main-container {
    padding: 0.25rem 0.4rem;
    gap: 0;
  }

  .reader-container {
    height: calc(100dvh - 78px - env(safe-area-inset-bottom, 0px));
    min-height: 500px;
    padding: 0.35rem 0.45rem;
    background: transparent;
    border: none;
    box-shadow: none;
  }

  .mantra-scroll-container {
    padding-right: 0.2rem;
    padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
  }

  /* Toolbar cuộn ngang mượt mà trên mobile, siêu tinh gọn */
  .reader-controls-bar {
    overflow-x: auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 0.35rem;
    padding: 2px 0 4px;
    margin-bottom: 0.35rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .reader-controls-bar::-webkit-scrollbar {
    display: none;
  }

  .control-group {
    flex-shrink: 0;
  }

  /* Ẩn các thông tin phụ rườm rà trên di động để nhường chỗ tối đa cho câu kinh */
  .tradition-badge,
  .mantra-desc {
    display: none !important;
  }

  .mantra-header-block {
    padding: 0.15rem 0 0.35rem !important;
    margin-bottom: 0.35rem !important;
  }

  .mantra-title {
    font-size: 1.2rem !important;
    margin-bottom: 0.15rem !important;
  }

  .mantra-sa-title {
    font-size: 0.8rem !important;
  }

  /* Sub-nav các Hội trên di động: 1 hàng ngang duy nhất vuốt cuộn êm ái, KHÔNG BAO GIỜ gãy thành 3 hàng */
  .sub-nav-container {
    display: flex;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    justify-content: flex-start !important;
    padding: 3px 4px !important;
    margin-bottom: 0.35rem !important;
    gap: 5px !important;
    border-radius: var(--radius-full);
  }

  .sub-nav-container::-webkit-scrollbar {
    display: none;
  }

  .sub-nav-item {
    padding: 3px 9px !important;
    font-size: 0.72rem !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
  }

  /* Khung văn bản Dồn đoạn trên di động: Tràn viền tự nhiên, chữ to rõ ràng, không bị đóng khung hộp nhỏ */
  #mantra-content-body.continuous-flow {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0.2rem 0;
    line-height: 2.05;
    text-align: left;
    font-size: var(--mantra-font-size, 20px) !important;
  }

  .verse-item {
    padding: 0.45rem 0.35rem;
    gap: 0.55rem;
  }

  .virtual-mo-btn {
    width: 110px;
    height: 110px;
  }

  .virtual-chuong-btn {
    width: 80px;
    height: 80px;
  }

  /* Hiển thị Mobile Floating Dock trên màn hình di động */
  .mobile-floating-dock {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 990;
    background: var(--bg-surface-translucent);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-strong);
    padding: 6px 10px calc(6px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.5);
    user-select: none;
  }

  .main-container.focus-mode .reader-container,
  .main-container.zen-expanded .reader-container {
    height: auto;
    min-height: auto;
  }
}

@media (max-width: 480px) {
  .brand-tagline {
    display: none;
  }

  .header-actions {
    gap: 0.35rem;
  }

  .theme-selector-group {
    gap: 3px;
  }

  .theme-btn {
    width: 20px;
    height: 20px;
  }

  .btn-donate-label {
    display: none;
  }

  .btn-donate-header {
    padding: 6px 9px;
  }
}

/* ==========================================================================
   BẢN CHÙA - HIỂN THỊ ẢNH GỐC ẤN TỐNG TRUYỀN THỐNG (2 MẶT TỜ GẤP)
   ========================================================================== */
.banchua-gallery-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 0.5rem 0 2rem;
  width: 100%;
}

.banchua-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-surface-elevated, rgba(42, 31, 25, 0.7));
  border: 1px solid var(--border-subtle, rgba(229, 179, 100, 0.25));
  border-left: 4px solid var(--accent-gold, #e5b364);
  padding: 12px 16px;
  border-radius: 8px;
}

.banchua-banner-icon {
  font-size: 1.8rem;
  line-height: 1;
}

.banchua-banner-text strong {
  display: block;
  font-size: 1rem;
  color: var(--accent-gold, #e5b364);
  margin-bottom: 2px;
}

.banchua-banner-text p {
  font-size: 0.84rem;
  color: var(--text-secondary, #d2bba0);
  margin: 0;
  line-height: 1.4;
}

/* Thanh bộ lọc danh mục ấn bản */
.banchua-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 4px 0;
}

.banchua-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 15px;
  background: var(--bg-surface-elevated, rgba(42, 31, 25, 0.65));
  border: 1px solid var(--border-subtle, rgba(229, 179, 100, 0.25));
  color: var(--text-secondary, #d2bba0);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.banchua-filter-btn:hover {
  background: rgba(229, 179, 100, 0.15);
  border-color: var(--accent-gold, #e5b364);
  color: var(--text-primary, #fff);
  transform: translateY(-1px);
}

.banchua-filter-btn.active {
  background: linear-gradient(135deg, rgba(229, 179, 100, 0.28), rgba(229, 179, 100, 0.12));
  border-color: var(--accent-gold, #e5b364);
  color: var(--accent-gold, #e5b364);
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(229, 179, 100, 0.2);
}

.banchua-filter-btn .filter-icon {
  font-size: 1rem;
  line-height: 1;
}

.banchua-cards-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.banchua-card {
  background: var(--bg-surface-elevated, rgba(30, 22, 18, 0.8));
  border: 1px solid var(--border-subtle, rgba(229, 179, 100, 0.25));
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.banchua-card:hover {
  border-color: var(--accent-gold, #e5b364);
  box-shadow: 0 8px 30px rgba(229, 179, 100, 0.18);
}

.banchua-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid var(--border-subtle, rgba(229, 179, 100, 0.15));
}

.banchua-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 240px;
}

.banchua-cat-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.banchua-cat-badge.badge-togap {
  background: rgba(229, 179, 100, 0.15);
  border: 1px solid rgba(229, 179, 100, 0.4);
  color: #f7d28c;
}

.banchua-cat-badge.badge-poster {
  background: rgba(230, 81, 0, 0.15);
  border: 1px solid rgba(230, 81, 0, 0.4);
  color: #ffb74d;
}

.banchua-cat-badge.badge-co {
  background: rgba(76, 175, 80, 0.15);
  border: 1px solid rgba(76, 175, 80, 0.4);
  color: #81c784;
}

.banchua-cat-badge.badge-phan {
  background: rgba(156, 39, 176, 0.18);
  border: 1px solid rgba(186, 104, 200, 0.45);
  color: #ce93d8;
}

.banchua-card-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary, #fff);
  margin: 0;
}

.banchua-card-desc {
  padding: 8px 16px;
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-secondary, #d2bba0);
  background: rgba(0, 0, 0, 0.15);
  border-bottom: 1px solid var(--border-subtle, rgba(229, 179, 100, 0.1));
}

.banchua-zoom-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(229, 179, 100, 0.15);
  border: 1px solid rgba(229, 179, 100, 0.35);
  color: var(--accent-gold, #e5b364);
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.banchua-zoom-btn:hover {
  background: var(--accent-gold, #e5b364);
  color: #1a1310;
  box-shadow: 0 2px 8px rgba(229, 179, 100, 0.3);
}

.banchua-card-btn-share {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(229, 179, 100, 0.28);
  color: var(--text-secondary, #d2bba0);
  padding: 5px 11px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.banchua-card-btn-share:hover {
  background: rgba(229, 179, 100, 0.22);
  border-color: var(--accent-gold, #e5b364);
  color: var(--accent-gold, #e5b364);
  transform: translateY(-1px);
}

.banchua-img-box {
  position: relative;
  padding: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #0d0a08;
  overflow-x: auto;
}

.banchua-sheet-img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
  cursor: zoom-in;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.banchua-sheet-img:hover {
  filter: brightness(1.03);
}

.banchua-img-zoom-hint {
  position: absolute;
  bottom: 16px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(229, 179, 100, 0.4);
  color: var(--accent-gold, #e5b364);
  padding: 5px 12px;
  border-radius: 16px;
  font-size: 0.76rem;
  pointer-events: none;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.banchua-card:hover .banchua-img-zoom-hint {
  opacity: 1;
}

.banchua-text-details {
  background: var(--bg-surface-elevated, rgba(30, 22, 18, 0.6));
  border: 1px solid var(--border-subtle, rgba(229, 179, 100, 0.2));
  border-radius: 10px;
  overflow: hidden;
  margin-top: 1rem;
}

.banchua-text-toggle {
  padding: 12px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-gold, #e5b364);
  cursor: pointer;
  user-select: none;
  background: rgba(0, 0, 0, 0.15);
}

.banchua-text-toggle:hover {
  background: rgba(229, 179, 100, 0.1);
}

.banchua-text-content {
  padding: 1rem 1rem 1.5rem;
}

/* Banner gợi ý chuyển qua xem 11 bản chùa trong trang Chú Đại Bi */
.daibi-referral-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: linear-gradient(135deg, rgba(42, 31, 25, 0.85), rgba(60, 42, 30, 0.65));
  border: 1px solid var(--border-subtle, rgba(229, 179, 100, 0.3));
  border-left: 4px solid var(--accent-gold, #e5b364);
  padding: 12px 18px;
  border-radius: 10px;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  animation: fadeInDown 0.3s ease-out;
}

.daibi-referral-banner .referral-content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 260px;
}

.daibi-referral-banner .referral-icon {
  font-size: 2rem;
  line-height: 1;
}

.daibi-referral-banner .referral-text strong {
  display: block;
  font-size: 0.95rem;
  color: var(--accent-gold, #e5b364);
  margin-bottom: 3px;
}

.daibi-referral-banner .referral-text p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-secondary, #d2bba0);
  line-height: 1.4;
}

.daibi-referral-banner .referral-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--accent-gold, #e5b364), #d19a45);
  color: #1a1310;
  border: none;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 8px 18px;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(229, 179, 100, 0.3);
}

.daibi-referral-banner .referral-action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(229, 179, 100, 0.45);
  filter: brightness(1.08);
}

/* ==========================================================================
   BANCHUA LIGHTBOX & CHANTING STUDIO (CHẾ ĐỘ XEM ẢNH LỚN & TRÌ TỤNG TOÀN CẢNH)
   ========================================================================== */
.banchua-lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(10, 7, 5, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: banchuaFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes banchuaFadeIn {
  from { opacity: 0; transform: scale(0.99); }
  to { opacity: 1; transform: scale(1); }
}

.banchua-lightbox-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* Header Bar */
.banchua-lh-header {
  height: 56px;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: rgba(22, 16, 13, 0.95);
  border-bottom: 1px solid rgba(229, 179, 100, 0.25);
  gap: 12px;
  z-index: 10;
}

.banchua-lh-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.banchua-lh-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 12px;
  background: rgba(229, 179, 100, 0.18);
  border: 1px solid rgba(229, 179, 100, 0.4);
  color: var(--accent-gold, #e5b364);
  white-space: nowrap;
  letter-spacing: 0.5px;
}

.banchua-lh-badge.badge-poster {
  background: rgba(230, 81, 0, 0.2);
  border-color: rgba(230, 81, 0, 0.45);
  color: #ffb74d;
}

.banchua-lh-badge.badge-co {
  background: rgba(76, 175, 80, 0.2);
  border-color: rgba(76, 175, 80, 0.45);
  color: #81c784;
}

.banchua-lh-badge.badge-phan {
  background: rgba(156, 39, 176, 0.2);
  border-color: rgba(186, 104, 200, 0.45);
  color: #ce93d8;
}

.banchua-lh-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary, #fff);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Center Actions */
.banchua-lh-actions-center {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.banchua-lh-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(42, 31, 25, 0.75);
  border: 1px solid rgba(229, 179, 100, 0.3);
  color: var(--text-secondary, #d2bba0);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  text-decoration: none;
}

.banchua-lh-btn:hover {
  background: rgba(229, 179, 100, 0.2);
  border-color: var(--accent-gold, #e5b364);
  color: var(--text-primary, #fff);
  transform: translateY(-1px);
}

.banchua-lh-btn.icon-only {
  padding: 6px 10px;
  min-width: 34px;
  justify-content: center;
}

.banchua-lh-btn.close-btn {
  background: rgba(180, 40, 40, 0.2);
  border-color: rgba(220, 80, 80, 0.4);
  color: #ff9999;
}

.banchua-lh-btn.close-btn:hover {
  background: rgba(220, 50, 50, 0.7);
  color: #fff;
  border-color: #ff6666;
}

/* Nút Chia sẻ liên kết bản in */
.banchua-lh-btn.share-btn {
  background: rgba(229, 179, 100, 0.15);
  border-color: rgba(229, 179, 100, 0.4);
  color: var(--accent-gold, #e5b364);
}

.banchua-lh-btn.share-btn:hover {
  background: var(--accent-gold, #e5b364);
  color: #1a1310;
  border-color: var(--accent-gold, #e5b364);
  box-shadow: 0 0 12px rgba(229, 179, 100, 0.35);
}

/* Nút Bật/Tắt Bài Tụng */
.banchua-lh-btn.chanting-toggle.active {
  background: linear-gradient(135deg, rgba(229, 179, 100, 0.3), rgba(229, 179, 100, 0.12));
  border-color: var(--accent-gold, #e5b364);
  color: var(--accent-gold, #e5b364);
  box-shadow: 0 0 12px rgba(229, 179, 100, 0.25);
  font-weight: 700;
}

/* Cụm Zoom */
.banchua-zoom-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.35);
  padding: 3px 6px;
  border-radius: 20px;
  border: 1px solid rgba(229, 179, 100, 0.2);
}

.banchua-zoom-level {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary, #d2bba0);
  min-width: 44px;
  text-align: center;
  user-select: none;
}

/* Right Actions */
.banchua-lh-actions-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.banchua-nav-pager {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.35);
  padding: 3px 6px;
  border-radius: 20px;
  border: 1px solid rgba(229, 179, 100, 0.2);
}

.banchua-img-counter {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-gold, #e5b364);
  padding: 0 6px;
  user-select: none;
}

/* Lightbox Body (Split View) */
.banchua-lightbox-body {
  display: flex;
  flex: 1;
  height: calc(100% - 56px);
  position: relative;
  overflow: hidden;
}

/* Image Viewport */
.banchua-image-viewport {
  flex: 1;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #060403;
  cursor: grab;
  user-select: none;
}

.banchua-image-viewport:active {
  cursor: grabbing;
}

.banchua-image-canvas {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.08s ease-out;
  transform-origin: center center;
}

.banchua-lightbox-img {
  max-width: 96%;
  max-height: 96%;
  object-fit: contain;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
  border-radius: 6px;
  pointer-events: none;
}

.banchua-viewport-hint {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 10, 8, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(229, 179, 100, 0.25);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.75rem;
  color: var(--text-secondary, #d2bba0);
  pointer-events: none;
  opacity: 0.8;
  transition: opacity 0.3s ease;
  white-space: nowrap;
}

.banchua-image-viewport:hover .banchua-viewport-hint {
  opacity: 1;
}

/* Chanting Side Panel */
.banchua-chanting-panel {
  width: 440px;
  min-width: 320px;
  max-width: 45%;
  height: 100%;
  background: rgba(24, 17, 13, 0.98);
  border-left: 1px solid rgba(229, 179, 100, 0.3);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), margin-right 0.3s ease, opacity 0.3s ease;
  box-shadow: -6px 0 25px rgba(0, 0, 0, 0.5);
  z-index: 5;
}

.banchua-chanting-panel:not(.active) {
  display: none !important;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.banchua-lh-btn *,
.banchua-mini-mo-btn *,
.banchua-tool-btn *,
.chanting-ctrl-btn * {
  pointer-events: none;
}

.banchua-mini-mo-btn.active-hit,
.banchua-tool-btn.active-hit {
  transform: scale(0.92) !important;
  filter: brightness(1.25);
  box-shadow: 0 0 15px rgba(229, 179, 100, 0.6) !important;
}

.banchua-chanting-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid rgba(229, 179, 100, 0.2);
}

.chanting-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chanting-icon {
  font-size: 1.4rem;
  color: var(--accent-gold, #e5b364);
}

.chanting-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-gold, #e5b364);
}

.chanting-subtitle {
  font-size: 0.76rem;
  color: var(--text-secondary, #d2bba0);
}

.chanting-font-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.chanting-ctrl-btn {
  background: rgba(229, 179, 100, 0.15);
  border: 1px solid rgba(229, 179, 100, 0.3);
  color: var(--accent-gold, #e5b364);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chanting-ctrl-btn:hover {
  background: var(--accent-gold, #e5b364);
  color: #1a1310;
}

/* Chanting Content */
.banchua-chanting-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px 16px 20px;
  scroll-behavior: auto;
  font-size: 18px;
}

.banchua-chanting-content.is-autoscrolling {
  scroll-behavior: auto !important;
}

.banchua-chanting-content .mantra-section {
  margin-bottom: 1.25rem;
}

.banchua-chanting-content .section-heading {
  font-size: 1rem;
  color: var(--accent-gold, #e5b364);
  margin-bottom: 10px;
  padding-bottom: 4px;
  border-bottom: 1px dashed rgba(229, 179, 100, 0.25);
}

.banchua-chanting-content .verse-item {
  display: flex;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 8px;
  margin-bottom: 4px;
  transition: background 0.15s ease;
  border-left: 2px solid transparent;
}

.banchua-chanting-content .verse-item:hover {
  background: rgba(229, 179, 100, 0.08);
}

.banchua-chanting-content .verse-item.highlighted {
  background: rgba(229, 179, 100, 0.18);
  border-left-color: var(--accent-gold, #e5b364);
}

.banchua-chanting-content .verse-num {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-gold, #e5b364);
  opacity: 0.8;
  min-width: 22px;
  padding-top: 3px;
}

.banchua-chanting-content .verse-vn {
  font-size: 1.05em;
  line-height: 1.6;
  font-weight: 500;
  color: var(--text-primary, #fff);
}

.banchua-chanting-content .verse-mean {
  font-size: 0.82em;
  color: var(--text-secondary, #d2bba0);
  margin-top: 3px;
  line-height: 1.4;
  font-style: italic;
}

/* Chanting Toolbar (Mõ gõ & actions) */
.banchua-chanting-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(16, 11, 8, 0.95);
  border-top: 1px solid rgba(229, 179, 100, 0.25);
  gap: 8px;
}

.banchua-mini-mo-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #c78635, #9b5a1b);
  border: 1px solid #e5b364;
  color: #fff;
  padding: 8px 16px;
  border-radius: 24px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(199, 134, 53, 0.35);
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.banchua-mini-mo-btn:active {
  transform: scale(0.95);
  box-shadow: 0 2px 6px rgba(199, 134, 53, 0.5);
}

.mini-mo-counter {
  background: rgba(0, 0, 0, 0.4);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.78rem;
  color: #ffeb3b;
}

.mini-tool-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.banchua-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(42, 31, 25, 0.7);
  border: 1px solid rgba(229, 179, 100, 0.25);
  color: var(--text-secondary, #d2bba0);
  padding: 6px 10px;
  border-radius: 16px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.banchua-tool-btn:hover {
  background: rgba(229, 179, 100, 0.2);
  color: var(--text-primary, #fff);
  border-color: var(--accent-gold, #e5b364);
}

.banchua-tool-btn.active {
  background: rgba(229, 179, 100, 0.25);
  border-color: var(--accent-gold, #e5b364);
  color: var(--accent-gold, #e5b364);
}

/* Mobile & Tablet Responsiveness */
@media (max-width: 900px) {
  .banchua-lh-title {
    max-width: 140px;
  }
  .banchua-chanting-panel {
    width: 360px;
    max-width: 50%;
  }
}

@media (max-width: 680px) {
  .banchua-lh-header {
    height: auto;
    min-height: auto;
    padding: 8px 10px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }
  .banchua-lh-info {
    flex: 1;
    min-width: 160px;
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
  }
  .banchua-lh-info .banchua-lh-title {
    font-size: 0.85rem;
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .banchua-lh-actions-right {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
  }
  .banchua-lh-actions-center {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(229, 179, 100, 0.15);
  }
  .banchua-lh-btn {
    padding: 5px 9px;
    font-size: 0.76rem;
  }
  .banchua-zoom-controls {
    padding: 2px 4px;
    gap: 2px;
  }
  .banchua-zoom-level {
    font-size: 0.72rem;
    min-width: 36px;
  }
  .banchua-nav-pager {
    padding: 2px 4px;
    gap: 2px;
  }
  .banchua-img-counter {
    font-size: 0.72rem;
    padding: 0 4px;
  }
  .banchua-chanting-panel {
    position: absolute;
    inset: 0;
    width: 100%;
    max-width: 100%;
    z-index: 20;
    box-shadow: none;
  }
  .banchua-chanting-panel:not(.active) {
    display: none !important;
    pointer-events: none;
  }
  .banchua-chanting-panel.active {
    display: flex !important;
    pointer-events: auto;
  }
  .banchua-viewport-hint {
    display: none;
  }
}

/* ==========================================================================
   KINH KIM CANG - NGUYÊN VĂN BẢN GỐC PDF & MODAL VIEWER
   ========================================================================== */
.kimcang-pdf-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: linear-gradient(135deg, rgba(38, 28, 22, 0.9), rgba(58, 38, 25, 0.75));
  border: 1px solid var(--border-subtle, rgba(229, 179, 100, 0.35));
  border-left: 4px solid var(--accent-gold, #e5b364);
  padding: 14px 20px;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  animation: fadeInDown 0.35s ease-out;
}

.kimcang-pdf-banner .referral-content {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 270px;
}

.kimcang-pdf-banner .referral-icon {
  font-size: 2.2rem;
  line-height: 1;
  filter: drop-shadow(0 2px 8px rgba(229, 179, 100, 0.3));
}

.kimcang-pdf-banner .referral-text strong {
  display: block;
  font-size: 1rem;
  color: var(--accent-gold, #e5b364);
  margin-bottom: 4px;
  font-family: var(--font-serif);
  letter-spacing: 0.2px;
}

.kimcang-pdf-banner .referral-text p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-secondary, #d2bba0);
  line-height: 1.45;
}

.kimcang-banner-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.kimcang-banner-actions .referral-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--accent-gold, #e5b364), #d19a45);
  color: #1a1310;
  border: none;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 8px 18px;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 10px rgba(229, 179, 100, 0.3);
}

.kimcang-banner-actions .referral-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(229, 179, 100, 0.5);
  filter: brightness(1.08);
}

.kimcang-banner-actions .referral-action-btn.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary, #f2e2cf);
  border: 1px solid var(--border-subtle, rgba(229, 179, 100, 0.4));
  box-shadow: none;
}

.kimcang-banner-actions .referral-action-btn.secondary:hover {
  background: rgba(229, 179, 100, 0.16);
  border-color: var(--accent-gold, #e5b364);
  color: var(--accent-gold, #e5b364);
}

.kimcang-banner-actions .referral-action-btn.outline {
  background: transparent;
  color: var(--accent-gold, #e5b364);
  border: 1px dashed var(--accent-gold, #e5b364);
  box-shadow: none;
}

.kimcang-banner-actions .referral-action-btn.outline:hover {
  background: rgba(229, 179, 100, 0.12);
  border-style: solid;
}

/* Nút Bản Gốc PDF trên thanh Sub-Nav mục lục */
.sub-nav-item.sub-nav-pdf-btn {
  background: rgba(229, 179, 100, 0.14) !important;
  border-color: var(--accent-gold, #e5b364) !important;
  color: var(--accent-gold, #e5b364) !important;
  font-weight: 700 !important;
  box-shadow: 0 0 10px rgba(229, 179, 100, 0.2);
}

.sub-nav-item.sub-nav-pdf-btn:hover {
  background: rgba(229, 179, 100, 0.26) !important;
  transform: translateY(-1px);
}

/* Modal xem toàn màn hình PDF */
body.pdf-modal-open {
  overflow: hidden !important;
}

.kimcang-pdf-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(10, 7, 5, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.25s ease-out;
}

.kimcang-pdf-container {
  width: 100%;
  max-width: 1150px;
  height: 94vh;
  background: var(--bg-surface-elevated, #241a15);
  border: 1px solid var(--border-subtle, #4a382e);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
}

.kimcang-pdf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: rgba(20, 14, 11, 0.92);
  border-bottom: 1px solid var(--border-subtle, rgba(229, 179, 100, 0.25));
  gap: 12px;
  flex-wrap: wrap;
}

.kimcang-pdf-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.kimcang-pdf-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(229, 179, 100, 0.18);
  color: var(--accent-gold, #e5b364);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid rgba(229, 179, 100, 0.35);
}

.kimcang-pdf-title {
  margin: 0;
  font-size: 1.05rem;
  color: var(--text-primary, #f2e2cf);
  font-family: var(--font-serif);
  font-weight: 600;
}

.kimcang-pdf-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.kimcang-pdf-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.15));
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary, #f2e2cf);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.kimcang-pdf-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: var(--accent-gold, #e5b364);
  color: var(--accent-gold, #e5b364);
  transform: translateY(-1px);
}

.kimcang-pdf-btn.highlight {
  background: linear-gradient(135deg, var(--accent-gold, #e5b364), #d19a45);
  color: #1a1310;
  font-weight: 700;
  border: none;
  box-shadow: 0 2px 8px rgba(229, 179, 100, 0.35);
}

.kimcang-pdf-btn.highlight:hover {
  filter: brightness(1.1);
  box-shadow: 0 4px 14px rgba(229, 179, 100, 0.5);
}

.kimcang-pdf-btn.close-btn {
  padding: 7px 14px;
  font-size: 1.1rem;
  background: rgba(210, 60, 45, 0.18);
  border-color: rgba(210, 60, 45, 0.4);
  color: #ff9e94;
}

.kimcang-pdf-btn.close-btn:hover {
  background: rgba(210, 60, 45, 0.4);
  color: #ffffff;
}

.kimcang-pdf-body {
  flex: 1;
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  background: #1f1f1f;
  overflow: hidden;
}

.kimcang-pdf-iframe {
  flex: 1;
  width: 100%;
  height: 100%;
  border: none;
  background: #2a2a2a;
}

.kimcang-pdf-mobile-tip {
  padding: 8px 16px;
  background: rgba(15, 10, 8, 0.95);
  border-top: 1px solid var(--border-subtle, rgba(229, 179, 100, 0.2));
  font-size: 0.8rem;
  color: var(--text-secondary, #d2bba0);
  text-align: center;
  line-height: 1.4;
}

.kimcang-pdf-mobile-tip strong {
  color: var(--accent-gold, #e5b364);
}

@media (max-width: 680px) {
  .kimcang-pdf-overlay {
    padding: 0;
  }
  .kimcang-pdf-container {
    height: 100vh;
    border-radius: 0;
    border: none;
  }
  .kimcang-pdf-header {
    padding: 8px 12px;
  }
  .kimcang-pdf-title {
    font-size: 0.92rem;
  }
  .kimcang-banner-actions {
    width: 100%;
  }
  .kimcang-banner-actions .referral-action-btn {
    flex: 1;
    justify-content: center;
    font-size: 0.8rem;
    padding: 7px 12px;
  }
}

/* ==========================================================================
   BẢNG VÀNG CÔNG ĐỨC & NHẬT KÝ HÀNH TRÌ (TOP 10 ĐẠO HỮU TINH TẤN)
   ========================================================================== */

/* Nút Header */
.btn-congduc-header {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  background: linear-gradient(135deg, rgba(229, 179, 100, 0.22), rgba(184, 134, 40, 0.12));
  border: 1px solid rgba(229, 179, 100, 0.55);
  color: var(--accent-gold, #e5b364);
  padding: 0 11px;
  border-radius: var(--radius-full, 9999px);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base, 0.28s ease);
  box-shadow: 0 2px 10px rgba(229, 179, 100, 0.15);
  position: relative;
  overflow: hidden;
  white-space: nowrap !important;
  flex-shrink: 0;
  box-sizing: border-box;
}

.btn-congduc-header:hover {
  background: linear-gradient(135deg, rgba(229, 179, 100, 0.35), rgba(184, 134, 40, 0.25));
  border-color: var(--accent-gold, #e5b364);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(229, 179, 100, 0.3);
}

.btn-congduc-icon {
  font-size: 1rem;
}

/* Nút Quick Access Trong Sanctuary Card */
.btn-open-congduc-sanctuary {
  width: 100%;
  margin-top: 12px;
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(229, 179, 100, 0.18), rgba(139, 69, 19, 0.15));
  border: 1px solid rgba(229, 179, 100, 0.45);
  border-radius: var(--radius-md, 14px);
  color: var(--accent-gold, #e5b364);
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base, 0.28s ease);
}

.btn-open-congduc-sanctuary:hover {
  background: linear-gradient(135deg, rgba(229, 179, 100, 0.28), rgba(139, 69, 19, 0.25));
  border-color: var(--accent-gold, #e5b364);
  box-shadow: 0 4px 15px rgba(229, 179, 100, 0.2);
  transform: translateY(-1px);
}

/* Modal Card Sổ Tay Công Đức (100% Số Liệu Thật) */
.congduc-modal-card {
  max-width: 860px;
  width: 94vw;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px 28px;
  background: var(--bg-surface, #1e1714);
  border: 1px solid rgba(229, 179, 100, 0.35);
  border-radius: var(--radius-lg, 22px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), 0 0 40px rgba(229, 179, 100, 0.12);
  text-align: left;
}

.congduc-modal-card .modal-title,
.congduc-modal-card .congduc-intro,
.congduc-modal-card .modal-lotus-icon {
  text-align: center;
}

/* Tabs Bar */
.congduc-tabs-bar {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-subtle, #3d2e27);
  padding-bottom: 12px;
  margin-bottom: 18px;
  overflow-x: auto;
}

.congduc-tab-btn {
  flex: 1;
  min-width: 140px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle, #3d2e27);
  border-radius: var(--radius-md, 14px);
  color: var(--text-secondary, #c9b49e);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast, 0.18s ease);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}

.congduc-tab-btn:hover {
  background: rgba(229, 179, 100, 0.08);
  color: var(--text-primary, #f2e2cf);
  border-color: rgba(229, 179, 100, 0.3);
}

.congduc-tab-btn.active {
  background: linear-gradient(135deg, rgba(229, 179, 100, 0.2), rgba(184, 134, 40, 0.1));
  color: var(--accent-gold, #e5b364);
  border-color: var(--accent-gold, #e5b364);
  box-shadow: 0 2px 12px rgba(229, 179, 100, 0.15);
}

/* Banner Hồ Sơ & Hành Giả Cá Nhân */
.congduc-profile-banner {
  background: linear-gradient(135deg, rgba(229, 179, 100, 0.12), rgba(30, 23, 20, 0.85));
  border: 1px solid rgba(229, 179, 100, 0.3);
  border-radius: var(--radius-md, 16px);
  padding: 14px 18px;
  margin-bottom: 18px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.congduc-profile-main {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.congduc-profile-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd700, #ff8c00);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  box-shadow: 0 0 16px rgba(229, 179, 100, 0.35);
  border: 2px solid rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
}

.congduc-profile-meta {
  flex: 1;
  min-width: 260px;
}

.congduc-dharma-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.congduc-dharma-label {
  font-size: 0.8rem;
  color: var(--text-secondary, #c9b49e);
  font-weight: 500;
}

.congduc-dharma-input-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.congduc-dharma-input {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(229, 179, 100, 0.35);
  color: var(--text-primary, #f2e2cf);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-sm, 8px);
  width: 210px;
  transition: border-color var(--transition-fast, 0.18s ease);
}

.congduc-dharma-input:focus {
  outline: none;
  border-color: var(--accent-gold, #e5b364);
  box-shadow: 0 0 8px rgba(229, 179, 100, 0.3);
}

.congduc-btn-save-dharma {
  background: var(--accent-gold, #e5b364);
  color: #15100e;
  border: none;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-sm, 8px);
  cursor: pointer;
  transition: all var(--transition-fast, 0.18s ease);
}

.congduc-btn-save-dharma:hover {
  background: #ffdb80;
  transform: translateY(-1px);
}

.congduc-btn-save-dharma.saved {
  background: #10b981;
  color: #fff;
}

.congduc-profile-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.congduc-badge {
  font-size: 0.74rem;
  padding: 4px 10px;
  border-radius: var(--radius-full, 9999px);
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary, #c9b49e);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.streak-badge {
  background: rgba(255, 140, 0, 0.12);
  border-color: rgba(255, 140, 0, 0.35);
  color: #ff9800;
}

.streak-badge strong {
  color: #ffd700;
}

.session-badge {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
  color: #10b981;
}

.session-badge strong {
  color: #34d399;
}

.diaries-badge {
  background: rgba(229, 179, 100, 0.12);
  border-color: rgba(229, 179, 100, 0.35);
  color: var(--accent-gold, #e5b364);
}

/* 4 Thẻ Thống Kê Thực Tế */
.congduc-real-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}

.congduc-stat-box {
  background: var(--bg-surface-elevated, #281f1b);
  border: 1px solid var(--border-subtle, #3d2e27);
  border-radius: var(--radius-md, 14px);
  padding: 14px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all var(--transition-base, 0.28s ease);
}

.congduc-stat-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  border-color: rgba(229, 179, 100, 0.35);
}

.stat-box-icon {
  font-size: 1.8rem;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm, 10px);
  background: rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-box-data {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.stat-box-label {
  font-size: 0.74rem;
  color: var(--text-muted, #8c7866);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-box-num {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary, #f2e2cf);
  line-height: 1.2;
  margin: 2px 0;
}

.stat-box-num.gold {
  color: var(--accent-gold, #e5b364);
}

.stat-box-num.green {
  color: #10b981;
}

.stat-box-sub {
  font-size: 0.7rem;
  color: var(--text-muted, #8c7866);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-box-sub strong {
  color: var(--text-secondary, #c9b49e);
}


/* Bảng Lịch Sử Hành Trì Theo Ngày (Số Liệu Thật 100%) */
.congduc-history-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}

.history-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.history-header-titles {
  flex: 1;
  min-width: 240px;
}

.history-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.05rem;
  color: var(--text-primary, #f2e2cf);
  margin: 0 0 4px 0;
  font-weight: 600;
}

.history-count-badge {
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(229, 179, 100, 0.15);
  color: var(--accent-gold, #e5b364);
  border: 1px solid rgba(229, 179, 100, 0.3);
  padding: 2px 8px;
  border-radius: var(--radius-full, 9999px);
}

.history-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted, #8c7866);
  margin: 0;
  line-height: 1.4;
}

.history-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn-history-action {
  background: var(--bg-surface-elevated, #281f1b);
  border: 1px solid var(--border-subtle, #3d2e27);
  color: var(--text-secondary, #c9b49e);
  font-family: var(--font-sans);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-sm, 8px);
  cursor: pointer;
  transition: all var(--transition-fast, 0.18s ease);
}

.btn-history-action:hover {
  background: rgba(229, 179, 100, 0.12);
  color: var(--accent-gold, #e5b364);
  border-color: rgba(229, 179, 100, 0.4);
}

.btn-history-action.danger:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.4);
}

/* Bảng Dữ Liệu Ngày */
.history-table-card {
  background: var(--bg-surface-elevated, #281f1b);
  border: 1px solid var(--border-subtle, #3d2e27);
  border-radius: var(--radius-md, 12px);
  overflow: hidden;
}

.history-table-header {
  display: grid;
  grid-template-columns: 2.2fr 1.2fr 1.2fr 1.2fr 1.5fr;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid var(--border-subtle, #3d2e27);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted, #8c7866);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.history-table-body {
  max-height: 280px;
  overflow-y: auto;
}

.history-table-row {
  display: grid;
  grid-template-columns: 2.2fr 1.2fr 1.2fr 1.2fr 1.5fr;
  padding: 11px 14px;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.15s ease;
  font-size: 0.82rem;
}

.history-table-row:last-child {
  border-bottom: none;
}

.history-table-row:hover {
  background: rgba(229, 179, 100, 0.05);
}

.history-table-row.today-row {
  background: rgba(229, 179, 100, 0.08);
  border-left: 3px solid var(--accent-gold, #e5b364);
}

.col-date {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.date-main {
  font-weight: 600;
  color: var(--text-primary, #f2e2cf);
}

.date-sub {
  font-size: 0.7rem;
  color: var(--text-muted, #8c7866);
}

.today-row .date-sub {
  color: var(--accent-gold, #e5b364);
  font-weight: 600;
}

.col-mo, .col-bien, .col-chuong {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.num-mo {
  color: #ffd700;
  font-size: 0.95rem;
}

.num-bien {
  color: #6ee7b7;
  font-size: 0.95rem;
}

.num-chuong {
  color: #93c5fd;
  font-size: 0.95rem;
}

.unit-text {
  font-size: 0.68rem;
  color: var(--text-muted, #8c7866);
}

.status-pill {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-full, 9999px);
  white-space: nowrap;
}

.status-pill.done {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-pill.waiting {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted, #8c7866);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.history-empty-row {
  padding: 24px 14px;
  text-align: center;
  color: var(--text-muted, #8c7866);
  font-size: 0.82rem;
}

@media (max-width: 600px) {
  .history-table-header,
  .history-table-row {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
  .col-status {
    display: none;
  }
}

.congduc-authenticity-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(229, 179, 100, 0.07);
  border: 1px solid rgba(229, 179, 100, 0.25);
  border-radius: var(--radius-sm, 10px);
  padding: 10px 14px;
  font-size: 0.78rem;
  color: var(--text-secondary, #c9b49e);
  line-height: 1.45;
}

.congduc-authenticity-notice .notice-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* Tab 2: Form Ghi Nhận */
.congduc-form-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-intro-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-subtle, #3d2e27);
  border-radius: var(--radius-md, 14px);
  padding: 12px 16px;
}

.intro-icon {
  font-size: 1.8rem;
}

.intro-text h4 {
  font-family: var(--font-serif, 'Noto Serif', serif);
  font-size: 1.05rem;
  color: var(--text-primary, #f2e2cf);
  margin-bottom: 2px;
}

.intro-text p {
  font-size: 0.8rem;
  color: var(--text-muted, #8c7866);
  margin: 0;
}

.congduc-entry-form {
  background: var(--bg-surface-elevated, #281f1b);
  border: 1px solid rgba(229, 179, 100, 0.25);
  border-radius: var(--radius-lg, 18px);
  padding: 18px 20px;
}

.form-grid-2cols {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.form-control-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-control-group.full-width {
  grid-column: 1 / -1;
}

.form-control-group label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary, #c9b49e);
}

.entry-input-text, .entry-textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle, #3d2e27);
  border-radius: var(--radius-sm, 8px);
  padding: 8px 12px;
  color: var(--text-primary, #f2e2cf);
  font-family: var(--font-sans);
  font-size: 0.86rem;
  transition: all var(--transition-fast, 0.18s ease);
}

.entry-input-text:focus, .entry-textarea:focus {
  outline: none;
  border-color: var(--accent-gold, #e5b364);
  box-shadow: 0 0 8px rgba(229, 179, 100, 0.25);
}

.btn-primary-save-diary {
  width: 100%;
  background: linear-gradient(135deg, #e5b364, #b88628);
  color: #15100e;
  border: none;
  border-radius: var(--radius-md, 14px);
  padding: 12px 20px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-base, 0.28s ease);
  box-shadow: 0 4px 16px rgba(229, 179, 100, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary-save-diary:hover {
  background: linear-gradient(135deg, #ffdb80, #c89530);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(229, 179, 100, 0.35);
}

/* Tab 3: Sổ Nhật Ký */
.congduc-diaries-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.diaries-top-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-subtle, #3d2e27);
  border-radius: var(--radius-md, 12px);
  padding: 10px 14px;
}

.toolbar-stats {
  font-size: 0.84rem;
  color: var(--text-secondary, #c9b49e);
}

.toolbar-stats strong {
  color: var(--accent-gold, #e5b364);
}

.toolbar-actions {
  display: flex;
  gap: 8px;
}

.btn-sub-action {
  background: rgba(229, 179, 100, 0.1);
  border: 1px solid rgba(229, 179, 100, 0.3);
  color: var(--accent-gold, #e5b364);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-sm, 8px);
  cursor: pointer;
  transition: all var(--transition-fast, 0.18s ease);
}

.btn-sub-action:hover {
  background: rgba(229, 179, 100, 0.2);
  border-color: var(--accent-gold, #e5b364);
}

.btn-sub-action.highlight {
  background: var(--accent-gold, #e5b364);
  color: #15100e;
}

.btn-sub-action.highlight:hover {
  background: #ffdb80;
}

.diaries-empty-state {
  text-align: center;
  padding: 36px 20px;
  background: rgba(0, 0, 0, 0.15);
  border: 1px dashed var(--border-subtle, #3d2e27);
  border-radius: var(--radius-lg, 18px);
  color: var(--text-muted, #8c7866);
}

.empty-lotus {
  font-size: 2.4rem;
  margin-bottom: 8px;
}

.empty-title {
  font-family: var(--font-serif, 'Noto Serif', serif);
  font-size: 1.1rem;
  color: var(--text-primary, #f2e2cf);
  margin-bottom: 6px;
}

.empty-desc {
  font-size: 0.84rem;
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.5;
}

.diaries-timeline-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.diary-card-item {
  background: var(--bg-surface-elevated, #281f1b);
  border: 1px solid var(--border-subtle, #3d2e27);
  border-radius: var(--radius-md, 14px);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  transition: border-color var(--transition-fast, 0.18s ease);
}

.diary-card-item:hover {
  border-color: rgba(229, 179, 100, 0.35);
}

.diary-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
  padding-bottom: 8px;
}

.diary-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.diary-date-badge {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-gold, #e5b364);
}

.diary-sutra-tag {
  font-size: 0.76rem;
  background: rgba(229, 179, 100, 0.12);
  color: var(--text-primary, #f2e2cf);
  padding: 3px 8px;
  border-radius: var(--radius-sm, 6px);
}

.diary-header-right {
  display: flex;
  gap: 6px;
}

.btn-copy-single-log {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary, #c9b49e);
  font-family: var(--font-sans);
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: var(--radius-sm, 6px);
  cursor: pointer;
}

.btn-copy-single-log:hover {
  color: var(--accent-gold, #e5b364);
  border-color: var(--accent-gold, #e5b364);
}

.btn-delete-single-log {
  background: transparent;
  border: none;
  color: var(--text-muted, #8c7866);
  font-family: var(--font-sans);
  font-size: 0.72rem;
  padding: 3px 8px;
  cursor: pointer;
  border-radius: var(--radius-sm, 6px);
}

.btn-delete-single-log:hover {
  color: #ff5252;
  background: rgba(255, 82, 82, 0.1);
}

.diary-card-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pill-stat {
  font-size: 0.76rem;
  background: rgba(0, 0, 0, 0.3);
  padding: 3px 8px;
  border-radius: var(--radius-full, 9999px);
  color: var(--text-secondary, #c9b49e);
}

.pill-stat strong {
  color: var(--text-primary, #f2e2cf);
}

.pill-stat.author strong {
  color: var(--accent-gold, #e5b364);
}

.diary-reflection-box, .diary-dedication-box {
  background: rgba(0, 0, 0, 0.22);
  border-radius: var(--radius-sm, 8px);
  padding: 8px 12px;
  font-size: 0.82rem;
  line-height: 1.45;
}

.diary-reflection-box {
  border-left: 3px solid var(--accent-gold, #e5b364);
}

.diary-dedication-box {
  border-left: 3px solid #ff9800;
}

.box-tag {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted, #8c7866);
  margin-bottom: 2px;
}

.diary-reflection-box .box-content {
  font-style: italic;
  color: var(--text-primary, #f2e2cf);
  margin: 0;
}

.diary-dedication-box .box-content {
  color: var(--text-secondary, #c9b49e);
  margin: 0;
}

/* Responsive Cho Sổ Công Đức */
@media (max-width: 768px) {
  .congduc-real-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .milestones-grid {
    grid-template-columns: 1fr;
  }
  .form-grid-2cols {
    grid-template-columns: 1fr;
  }
  .congduc-dharma-input {
    width: 160px;
  }
}

/* ==========================================================================
   PĀḶI CHANTING AUDIO PLAYER (TRUYỀN THỐNG NAM TÔNG THERAVĀDA)
   ========================================================================== */
.pali-audio-player-card {
  margin: 1.2rem 0 1.8rem;
  background: linear-gradient(135deg, rgba(38, 25, 14, 0.95) 0%, rgba(55, 36, 20, 0.92) 50%, rgba(45, 29, 16, 0.96) 100%);
  border: 1.5px solid rgba(229, 179, 100, 0.35);
  border-radius: var(--radius-lg, 16px);
  padding: 1.25rem 1.4rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), 0 0 20px rgba(229, 179, 100, 0.12);
  color: var(--text-primary, #f2e2cf);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.pali-audio-player-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(229, 179, 100, 0.12) 0%, rgba(229, 179, 100, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

.pali-audio-player-card.is-playing {
  border-color: rgba(229, 179, 100, 0.7);
  box-shadow: 0 8px 36px rgba(0, 0, 0, 0.5), 0 0 28px rgba(229, 179, 100, 0.22);
}

.pali-player-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.9rem;
  position: relative;
  z-index: 1;
}

.pali-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pali-player-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(229, 179, 100, 0.15);
  border: 1px solid rgba(229, 179, 100, 0.4);
  padding: 0.28rem 0.7rem;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--accent-gold, #e5b364);
  letter-spacing: 0.5px;
}

.pali-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffaa33;
  box-shadow: 0 0 8px #ffaa33;
}

.pali-audio-player-card.is-playing .pali-badge-dot {
  background: #4ade80;
  box-shadow: 0 0 10px #4ade80;
  animation: pulse-dot 1.4s infinite;
}

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

/* Equalizer animated bars */
.pali-equalizer-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 16px;
  padding: 0 4px;
}

.pali-equalizer-bars .eq-bar {
  width: 3px;
  height: 4px;
  background: var(--accent-gold, #e5b364);
  border-radius: 2px;
  transition: height 0.2s ease;
}

.pali-audio-player-card.is-playing .pali-equalizer-bars .bar-1 {
  animation: eq-anim 0.8s ease-in-out infinite alternate;
}
.pali-audio-player-card.is-playing .pali-equalizer-bars .bar-2 {
  animation: eq-anim 1.1s ease-in-out infinite 0.2s alternate;
}
.pali-audio-player-card.is-playing .pali-equalizer-bars .bar-3 {
  animation: eq-anim 0.7s ease-in-out infinite 0.4s alternate;
}
.pali-audio-player-card.is-playing .pali-equalizer-bars .bar-4 {
  animation: eq-anim 1.0s ease-in-out infinite 0.1s alternate;
}

@keyframes eq-anim {
  0% { height: 4px; opacity: 0.6; }
  100% { height: 16px; opacity: 1; }
}

.pali-source-tag {
  font-size: 0.72rem;
  color: var(--text-muted, #a89480);
  background: rgba(0, 0, 0, 0.25);
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

/* Playlist selector tabs */
.pali-tracks-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
  position: relative;
  z-index: 1;
}

.pali-track-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(229, 179, 100, 0.25);
  border-radius: 8px;
  padding: 0.45rem 0.8rem;
  color: var(--text-secondary, #d2bba0);
  font-size: 0.84rem;
  cursor: pointer;
  transition: all 0.25s ease;
}

.pali-track-btn:hover {
  background: rgba(229, 179, 100, 0.15);
  border-color: rgba(229, 179, 100, 0.5);
  color: #fff;
}

.pali-track-btn.active {
  background: linear-gradient(135deg, rgba(229, 179, 100, 0.28) 0%, rgba(171, 122, 43, 0.35) 100%);
  border-color: var(--accent-gold, #e5b364);
  color: var(--accent-gold, #e5b364);
  font-weight: 700;
  box-shadow: 0 0 12px rgba(229, 179, 100, 0.2);
}

.pali-track-btn .track-btn-dur {
  font-size: 0.74rem;
  opacity: 0.8;
}

/* Track info card */
.pali-current-track-info {
  background: rgba(0, 0, 0, 0.28);
  border-left: 3.5px solid var(--accent-gold, #e5b364);
  border-radius: 0 8px 8px 0;
  padding: 0.65rem 0.95rem;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.pali-track-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.pali-track-now-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary, #fffdf8);
}

.pali-track-type-badge {
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(229, 179, 100, 0.2);
  color: var(--accent-gold, #e5b364);
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
  white-space: nowrap;
}

.pali-track-desc {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-secondary, #c9b49e);
  line-height: 1.4;
}

/* Controls row */
.pali-player-controls-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

/* Play button */
.pali-play-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(135deg, #f5c87a 0%, #d49838 50%, #9e6417 100%);
  border: 2px solid rgba(255, 255, 255, 0.4);
  color: #1a1005;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(212, 152, 56, 0.45);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
  user-select: none;
}

.pali-play-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 22px rgba(212, 152, 56, 0.65);
}

.pali-play-btn:active {
  transform: scale(0.96);
}

.pali-play-btn .play-icon {
  margin-left: 3px;
  line-height: 1;
}

.pali-audio-player-card.is-playing .pali-play-btn .play-icon {
  margin-left: 0;
}

/* Timeline & slider */
.pali-timeline-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 140px;
}

.pali-time-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.74rem;
  font-weight: 600;
  font-family: monospace, var(--font-primary, sans-serif);
  color: var(--text-secondary, #d2bba0);
}

.pali-timeline-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.15);
  outline: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.pali-timeline-slider:hover {
  background: rgba(255, 255, 255, 0.25);
}

.pali-timeline-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--accent-gold, #f5c87a);
  box-shadow: 0 0 10px rgba(245, 200, 122, 0.8);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.pali-timeline-slider::-webkit-slider-thumb:hover {
  transform: scale(1.25);
}

.pali-timeline-slider::-moz-range-thumb {
  width: 15px;
  height: 15px;
  border: none;
  border-radius: 50%;
  background: var(--accent-gold, #f5c87a);
  box-shadow: 0 0 10px rgba(245, 200, 122, 0.8);
  cursor: pointer;
}

/* Secondary controls */
.pali-secondary-controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.pali-ctrl-btn {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(229, 179, 100, 0.25);
  border-radius: 6px;
  padding: 0.35rem 0.6rem;
  color: var(--text-secondary, #d2bba0);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.pali-ctrl-btn:hover {
  background: rgba(229, 179, 100, 0.15);
  color: #fff;
  border-color: rgba(229, 179, 100, 0.45);
}

.pali-ctrl-btn.active {
  background: var(--accent-gold, #e5b364);
  color: #1a1005;
  border-color: var(--accent-gold, #e5b364);
  font-weight: 700;
}

.pali-speed-group {
  display: flex;
  gap: 2px;
}

/* Study actions row */
.pali-study-actions-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
  padding-top: 0.5rem;
  border-top: 1px dashed rgba(229, 179, 100, 0.2);
  position: relative;
  z-index: 1;
}

.pali-study-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(229, 179, 100, 0.12);
  border: 1px solid rgba(229, 179, 100, 0.3);
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
  color: var(--accent-gold, #e5b364);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pali-study-btn:hover {
  background: rgba(229, 179, 100, 0.25);
  color: #fff;
  border-color: var(--accent-gold, #e5b364);
  transform: translateY(-1px);
}

.pali-study-btn.jump-btn {
  background: linear-gradient(135deg, rgba(229, 179, 100, 0.2) 0%, rgba(171, 122, 43, 0.3) 100%);
  border-color: var(--accent-gold, #e5b364);
  color: #fff;
}

.pali-study-btn.source-link {
  color: var(--text-muted, #a89480);
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.2);
}

.pali-study-btn.source-link:hover {
  color: var(--accent-gold, #e5b364);
  border-color: var(--accent-gold, #e5b364);
}

/* Citation footer */
.pali-source-citation {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  font-size: 0.74rem;
  color: var(--text-muted, #9c8a78);
  line-height: 1.45;
  background: rgba(0, 0, 0, 0.2);
  padding: 0.4rem 0.65rem;
  border-radius: 6px;
  position: relative;
  z-index: 1;
}

.pali-source-citation .citation-icon {
  flex-shrink: 0;
  margin-top: 1px;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .pali-audio-player-card {
    padding: 1rem;
    margin: 0.8rem 0 1.2rem;
  }
  .pali-player-controls-row {
    flex-wrap: wrap;
  }
  .pali-timeline-group {
    order: 2;
    width: 100%;
    min-width: 100%;
  }
  .pali-play-btn {
    order: 1;
  }
  .pali-secondary-controls {
    order: 1;
    margin-left: auto;
  }
  .btn-text-desktop {
    display: none;
  }
}

/* ==========================================================================
   CHANTING VIDEO EMBED & MULTI-VERSION AUDIO (DIỆU ÂM TỊNH TUẤN)
   ========================================================================== */

.chanting-video-embed-container {
  margin: 0.9rem 0 1.1rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(229, 179, 100, 0.3);
  background: #000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  position: relative;
  z-index: 1;
}

.chanting-video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
}

.chanting-video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.chanting-video-caption {
  padding: 0.45rem 0.8rem;
  background: rgba(22, 16, 12, 0.92);
  font-size: 0.76rem;
  color: var(--text-muted, #c4b5a2);
  display: flex;
  align-items: center;
  border-top: 1px solid rgba(229, 179, 100, 0.15);
  line-height: 1.4;
}

/* Google Drive Action Button */
.pali-study-btn.drive-link {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(22, 163, 74, 0.35) 100%);
  border-color: rgba(74, 222, 128, 0.4);
  color: #86efac;
}

.pali-study-btn.drive-link:hover {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.35) 0%, rgba(22, 163, 74, 0.5) 100%);
  border-color: #4ade80;
  color: #bbf7d0;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.3);
}

/* Flash animation when jumping to section */
@keyframes jumpFlashAnimation {
  0% {
    background-color: rgba(229, 179, 100, 0.35);
    box-shadow: 0 0 20px rgba(229, 179, 100, 0.4);
  }
  50% {
    background-color: rgba(229, 179, 100, 0.2);
    box-shadow: 0 0 10px rgba(229, 179, 100, 0.2);
  }
  100% {
    background-color: transparent;
    box-shadow: none;
  }
}

.jump-flash {
  animation: jumpFlashAnimation 2.5s ease-out;
  border-radius: 8px;
}

/* ==========================================================================
   UNIVERSAL SEARCH MODAL & OMNIBOX COMPONENT
   ========================================================================== */

/* ==========================================================================
   HEADER WEB SEARCH PILL (THANH TÌM KIẾM TINH GỌN, SANG TRỌNG)
   ========================================================================== */
.header-web-search-bar {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(229, 179, 100, 0.28);
  border-radius: var(--radius-full, 9999px);
  padding: 0 8px 0 10px;
  gap: 5px;
  width: 165px;
  max-width: 195px;
  height: 34px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  flex-shrink: 0;
  box-sizing: border-box;
}

.header-web-search-bar:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(229, 179, 100, 0.45);
  box-shadow: 0 0 10px rgba(229, 179, 100, 0.15);
}

.header-web-search-bar:focus-within {
  width: 205px;
  border-color: var(--accent-gold, #e5b364);
  box-shadow: 0 0 12px var(--accent-gold-glow, rgba(229, 179, 100, 0.35));
  background: var(--bg-surface-elevated, #281d17);
}

.header-search-icon {
  font-size: 0.85rem;
  color: var(--accent-gold, #e5b364);
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.header-web-search-input {
  flex: 1;
  min-width: 50px;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary, #f3ead7);
  font-size: 0.8rem;
  font-family: inherit;
  padding: 0;
  cursor: pointer;
}

.header-web-search-input:focus {
  cursor: text;
}

.header-web-search-input::placeholder {
  color: var(--text-muted, #9c8a75);
  font-size: 0.76rem;
}

.header-search-kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(229, 179, 100, 0.25);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.68rem;
  font-family: inherit;
  color: var(--accent-gold, #e5b364);
  line-height: 1.2;
  flex-shrink: 0;
  user-select: none;
  cursor: pointer;
}

.header-search-kbd:hover {
  background: rgba(229, 179, 100, 0.2);
  border-color: var(--accent-gold, #e5b364);
}

/* Nút Cổng Thư Viện Kinh Mật Giáo (Tool Button 36x36px) */
.btn-portal-header {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md, 8px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--accent-gold, #e5b364);
  background: rgba(229, 179, 100, 0.12);
  border: 1px solid rgba(229, 179, 100, 0.3);
  text-decoration: none;
  flex-shrink: 0;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.btn-portal-header:hover {
  background: rgba(229, 179, 100, 0.25);
  border-color: var(--accent-gold, #e5b364);
  transform: translateY(-1px);
  box-shadow: 0 0 10px rgba(229, 179, 100, 0.2);
}

.btn-portal-header:active {
  transform: scale(0.96);
}

/* Overlay */
.universal-search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 60px 20px 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

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

/* Container */
.universal-search-container {
  background: var(--bg-surface, #1e1612);
  border: 2px solid var(--accent-gold, #e5b364);
  border-radius: 16px;
  width: 100%;
  max-width: 780px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(229, 179, 100, 0.25);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 82vh;
  transform: scale(0.96) translateY(-10px);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.universal-search-overlay.active .universal-search-container {
  transform: scale(1) translateY(0);
}

/* Search Header & Input */
.search-input-header {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  background: var(--bg-surface-elevated, #281d17);
  border-bottom: 1px solid rgba(229, 179, 100, 0.2);
  gap: 12px;
}

.search-modal-icon {
  font-size: 1.35rem;
  color: var(--accent-gold, #e5b364);
  flex-shrink: 0;
}

.universal-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 1.12rem;
  font-family: inherit;
}

.universal-search-input::placeholder {
  color: var(--text-muted, #9c8a75);
  font-size: 0.96rem;
}

.search-modal-clear {
  background: transparent;
  border: none;
  color: var(--text-muted, #9c8a75);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px 6px;
  display: none;
}

.search-modal-clear:hover {
  color: #fff;
}

.search-shortcut-badge {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-muted, #c4b5a2);
  font-size: 0.72rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
}

.search-modal-web-btn {
  background: rgba(229, 179, 100, 0.15);
  border: 1px solid var(--accent-gold, #e5b364);
  color: var(--accent-gold, #e5b364);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.search-modal-web-btn:hover {
  background: var(--accent-gold, #e5b364);
  color: #1a1310;
}

/* Web Engines Bar inside Modal */
.search-engines-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid rgba(229, 179, 100, 0.12);
  overflow-x: auto;
}

.engines-bar-label {
  font-size: 0.75rem;
  color: var(--accent-gold, #e5b364);
  font-weight: 600;
  white-space: nowrap;
}

.engines-pills {
  display: flex;
  gap: 6px;
  align-items: center;
}

.engine-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(229, 179, 100, 0.2);
  color: var(--text-secondary, #d6c8b4);
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.74rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.engine-pill:hover {
  border-color: var(--accent-gold, #e5b364);
  color: #fff;
}

.engine-pill.active {
  background: rgba(229, 179, 100, 0.22);
  border-color: var(--accent-gold, #e5b364);
  color: var(--accent-gold, #e5b364);
  font-weight: 600;
}

.web-primary-item {
  border-left: 3px solid var(--accent-gold, #e5b364) !important;
  background: rgba(229, 179, 100, 0.08) !important;
}

.web-direct-item {
  border-left: 3px solid #3b82f6 !important;
  background: rgba(59, 130, 246, 0.08) !important;
}

.badge-web-enter {
  background: rgba(229, 179, 100, 0.2);
  border: 1px solid var(--accent-gold, #e5b364);
  color: var(--accent-gold, #e5b364);
  font-family: monospace;
}

.search-section-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-gold, #e5b364);
  margin-top: 10px;
  margin-bottom: 6px;
}

.web-quick-tags .tag-google {
  border-color: #4285f4;
  color: #93c5fd;
}
.web-quick-tags .tag-youtube {
  border-color: #ef4444;
  color: #fca5a5;
}
.web-quick-tags .tag-wiki {
  border-color: #a855f7;
  color: #d8b4fe;
}
.web-quick-tags .tag-hoasen {
  border-color: #e5b364;
  color: #fde68a;
}

/* Filter Pills */
.search-filter-pills {
  display: flex;
  gap: 8px;
  padding: 10px 18px;
  background: var(--bg-surface, #1e1612);
  border-bottom: 1px solid rgba(229, 179, 100, 0.12);
  overflow-x: auto;
  flex-shrink: 0;
}

.search-filter-btn {
  background: var(--bg-surface-elevated, #281d17);
  border: 1px solid rgba(229, 179, 100, 0.2);
  color: var(--text-secondary, #d6c8b4);
  padding: 4px 12px;
  border-radius: 14px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.search-filter-btn:hover {
  border-color: var(--accent-gold, #e5b364);
  color: #fff;
}

.search-filter-btn.active {
  background: var(--accent-gold, #e5b364);
  color: #1a1107;
  font-weight: 700;
  border-color: var(--accent-gold, #e5b364);
  box-shadow: 0 2px 8px rgba(229, 179, 100, 0.3);
}

/* Results List */
.universal-search-results {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.search-result-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
  width: 100%;
}

.search-result-item:hover,
.search-result-item.selected {
  background: var(--bg-surface-elevated, #281d17);
  border-color: rgba(229, 179, 100, 0.35);
  transform: translateX(2px);
}

.search-result-item.web-item:hover,
.search-result-item.web-item.selected {
  border-color: #60a5fa;
  background: rgba(59, 130, 246, 0.1);
}

.res-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.res-info {
  flex: 1;
  min-width: 0;
}

.res-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
  flex-wrap: wrap;
}

.res-title {
  font-size: 0.96rem;
  color: #fbf7ee;
  line-height: 1.35;
}

.res-title mark {
  background: rgba(229, 179, 100, 0.35);
  color: #ffdf9e;
  border-radius: 2px;
  padding: 0 2px;
}

.res-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 4px;
  letter-spacing: 0.3px;
}

.badge-sutra {
  background: rgba(229, 179, 100, 0.2);
  color: #e5b364;
  border: 1px solid rgba(229, 179, 100, 0.4);
}

.badge-verse {
  background: rgba(186, 68, 56, 0.2);
  color: #f87171;
  border: 1px solid rgba(186, 68, 56, 0.4);
}

.badge-taisho {
  background: rgba(212, 175, 55, 0.2);
  color: #ffd700;
  border: 1px solid rgba(212, 175, 55, 0.4);
}

.badge-pdf {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.4);
}

.badge-web {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

.res-subtitle {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted, #9c8a75);
  margin-bottom: 4px;
  font-family: var(--font-serif, serif);
  font-style: italic;
}

.res-desc {
  font-size: 0.82rem;
  color: var(--text-secondary, #d6c8b4);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Empty State / Welcome in Search */
.search-empty-welcome {
  padding: 30px 20px;
  text-align: center;
  color: var(--text-muted, #9c8a75);
}

.welcome-icon {
  font-size: 2.8rem;
  margin-bottom: 10px;
  animation: floatLotus 3s ease-in-out infinite;
}

.search-empty-welcome h4 {
  font-size: 1.15rem;
  color: var(--accent-gold, #e5b364);
  margin-bottom: 6px;
}

.search-empty-welcome p {
  font-size: 0.88rem;
  margin-bottom: 18px;
}

.search-quick-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  max-width: 540px;
  margin: 0 auto;
}

.quick-tag {
  background: var(--bg-surface-elevated, #281d17);
  border: 1px solid rgba(229, 179, 100, 0.25);
  color: var(--text-secondary, #d6c8b4);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.quick-tag:hover {
  background: rgba(229, 179, 100, 0.2);
  color: #fff;
  border-color: var(--accent-gold, #e5b364);
  transform: translateY(-1px);
}

/* Footer Hints */
.search-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: var(--bg-surface-elevated, #281d17);
  border-top: 1px solid rgba(229, 179, 100, 0.15);
  font-size: 0.75rem;
  color: var(--text-muted, #9c8a75);
}

.search-footer-hint {
  display: flex;
  gap: 12px;
}

.search-footer-hint kbd {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 3px;
  padding: 1px 4px;
  margin-right: 3px;
}

/* Flash highlight on jumped verse */
.verse-flash-highlight {
  animation: flashGoldenHighlight 2.5s ease-out !important;
}

@keyframes flashGoldenHighlight {
  0% {
    background-color: rgba(229, 179, 100, 0.55);
    box-shadow: 0 0 25px rgba(229, 179, 100, 0.7);
    transform: scale(1.02);
  }
  50% {
    background-color: rgba(229, 179, 100, 0.25);
    box-shadow: 0 0 12px rgba(229, 179, 100, 0.4);
  }
  100% {
    background-color: transparent;
    box-shadow: none;
    transform: scale(1);
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .universal-search-overlay {
    padding: 20px 10px 10px;
  }
  .universal-search-container {
    max-height: 92vh;
  }
  .btn-search-header kbd {
    display: none;
  }
  .search-footer-hint span:nth-child(1) {
    display: none;
  }
}

/* ==========================================================================
   HỆ THỐNG THỦ ẤN (MUDRA SANCTUARY) & CHẾ ĐỘ KIẾT ẤN TRÌ TỤNG RẢNH TAY
   ========================================================================== */

/* Nút Thủ Ấn trên Toolbar */
.btn-mudra-highlight {
  background: linear-gradient(135deg, rgba(229, 179, 100, 0.18), rgba(184, 134, 11, 0.28)) !important;
  border: 1px solid rgba(229, 179, 100, 0.5) !important;
  color: #ffd700 !important;
  font-weight: 600;
  box-shadow: 0 0 10px rgba(229, 179, 100, 0.2);
  transition: all 0.25s ease;
}

.btn-mudra-highlight:hover {
  background: linear-gradient(135deg, rgba(229, 179, 100, 0.35), rgba(184, 134, 11, 0.45)) !important;
  border-color: #ffe082 !important;
  box-shadow: 0 0 16px rgba(229, 179, 100, 0.45);
  transform: translateY(-1px);
}

.mudra-icon {
  font-size: 1.15rem;
  margin-right: 4px;
  filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.6));
}

/* Mudra Modal */
.mudra-modal-card {
  max-width: 980px;
  width: 95%;
  height: 92vh;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at 50% 0%, #2b1f15, #150f0a 85%);
  border: 1px solid rgba(229, 179, 100, 0.4);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(229, 179, 100, 0.2);
  border-radius: 18px;
  overflow: hidden;
  padding: 0.85rem 1.4rem 0.75rem;
}

.mudra-modal-card .modal-lotus-icon {
  margin-bottom: 2px;
}

.mudra-modal-card .modal-lotus-icon svg {
  width: 28px;
  height: 28px;
}

.mudra-modal-card .modal-title {
  font-size: 1.15rem;
  margin-bottom: 2px;
}

.mudra-intro {
  color: #ffd54f;
  font-size: 0.8rem;
  letter-spacing: 0.3px;
  margin-bottom: 0.35rem;
  text-align: center;
}

.mudra-modal-content {
  flex: 1;
  overflow-y: auto;
  padding-right: 6px;
  margin-bottom: 0.75rem;
}

.mudra-modal-content::-webkit-scrollbar {
  width: 6px;
}
.mudra-modal-content::-webkit-scrollbar-thumb {
  background: rgba(229, 179, 100, 0.3);
  border-radius: 3px;
}

/* Shelf Selector */
.mudra-shelf-selector {
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(229, 179, 100, 0.2);
}

.mudra-shelf-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #ffecb3;
  margin-bottom: 0.35rem;
  font-weight: 600;
}

.mudra-shelf-pills {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 0.45rem;
  padding-bottom: 4px;
}

.mudra-shelf-pills::-webkit-scrollbar {
  height: 4px;
}
.mudra-shelf-pills::-webkit-scrollbar-thumb {
  background: rgba(229, 179, 100, 0.35);
  border-radius: 2px;
}

.mudra-shelf-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(229, 179, 100, 0.25);
  color: #e0e0e0;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.mudra-shelf-pill:hover {
  background: rgba(229, 179, 100, 0.15);
  border-color: #ffd54f;
  color: #fff;
}

.mudra-shelf-pill.active {
  background: linear-gradient(135deg, #ffd700, #ffb300);
  color: #1a0f05;
  font-weight: 700;
  border-color: #fff8e1;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.4);
}

/* Header Box */
.mudra-header-box {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 10px;
  padding: 0.45rem 0.85rem;
  margin-bottom: 0.5rem;
  border-left: 4px solid #ffd700;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.mudra-title-col {
  display: flex;
  flex-direction: column;
}

.mudra-header-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.mudra-badge {
  background: rgba(255, 215, 0, 0.15);
  color: #ffe082;
  border: 1px solid rgba(255, 215, 0, 0.3);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.mudra-mantra-tag {
  font-size: 0.85rem;
  color: #ccc;
}

.mudra-mantra-tag strong {
  color: #fff;
}

.mudra-main-title {
  margin: 0;
  font-size: 1.25rem;
  color: #fff8e1;
  font-family: inherit;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.mudra-sanskrit-title {
  font-size: 0.85rem;
  font-style: italic;
  color: #ffecb3;
  margin-top: 0.1rem;
}

/* Nav Tabs */
.mudra-nav-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid rgba(229, 179, 100, 0.25);
  margin-bottom: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.mudra-tab-btn {
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: #bbb;
  padding: 0.6rem 1rem;
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.mudra-tab-btn:hover {
  color: #ffd54f;
}

.mudra-tab-btn.active {
  color: #ffd700;
  border-bottom-color: #ffd700;
  font-weight: 700;
}

/* Diagram Layout */
.mudra-diagram-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.mudra-image-column {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mudra-img-frame {
  position: relative;
  width: 100%;
  max-width: 340px;
  aspect-ratio: 1/1;
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid rgba(229, 179, 100, 0.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  background: #110b06;
}

.mudra-photo-display {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.mudra-img-frame:hover .mudra-photo-display {
  transform: scale(1.03);
}

.mudra-position-tag {
  margin-top: 0.75rem;
  background: rgba(255, 215, 0, 0.1);
  border: 1px solid rgba(255, 215, 0, 0.3);
  color: #ffe082;
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  font-size: 0.85rem;
  text-align: center;
  width: 100%;
}

.mudra-sub-title {
  margin: 0 0 0.85rem;
  font-size: 1.1rem;
  color: #ffe082;
  font-weight: 600;
}

.mudra-step-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.mudra-step-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  border-left: 2px solid rgba(229, 179, 100, 0.3);
}

.mudra-step-num {
  background: #ffd700;
  color: #1a0f05;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

.mudra-step-text {
  color: #e6e6e6;
  font-size: 0.95rem;
  line-height: 1.5;
}

.mudra-callout-benefit {
  background: rgba(229, 179, 100, 0.08);
  border: 1px solid rgba(229, 179, 100, 0.3);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  color: #fff8e1;
  font-size: 0.9rem;
  line-height: 1.55;
}

.mudra-callout-benefit strong {
  color: #ffd700;
  display: block;
  margin-bottom: 0.25rem;
}

/* Visualization Tab */
.mudra-visualization-card {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.mudra-vis-section {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.vis-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.vis-header h4 {
  margin: 0;
  color: #ffd700;
  font-size: 1.05rem;
}

.vis-seed-box {
  background: radial-gradient(circle, rgba(255, 215, 0, 0.15), transparent 70%);
  border: 1px dashed rgba(255, 215, 0, 0.4);
  border-radius: 8px;
  padding: 0.75rem 1.25rem;
  text-align: center;
  margin-top: 0.5rem;
}

.vis-seed-char {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: #fff9c4;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
}

.vis-desc {
  margin: 0;
  font-size: 0.95rem;
  color: #e0e0e0;
  line-height: 1.6;
}

.instruction-highlight {
  color: #fff8e1;
  background: rgba(229, 179, 100, 0.08);
  padding: 0.75rem;
  border-radius: 6px;
  border-left: 3px solid #ffb300;
}

/* Etiquette Tab */
.mudra-etiquette-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.etiquette-box {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  border-left: 3px solid #ffd700;
}

.etiquette-heading {
  margin: 0 0 0.5rem;
  color: #ffe082;
  font-size: 1rem;
  font-weight: 600;
}

.etiquette-list {
  margin: 0;
  padding-left: 1.25rem;
  color: #ddd;
  font-size: 0.9rem;
  line-height: 1.6;
}

.etiquette-text {
  margin: 0;
  color: #ddd;
  font-size: 0.9rem;
  line-height: 1.6;
}

.etiquette-callout {
  background: rgba(255, 215, 0, 0.1);
  border: 1px solid rgba(255, 215, 0, 0.3);
  padding: 1rem;
  border-radius: 8px;
  color: #fff9c4;
  font-size: 0.95rem;
  line-height: 1.6;
}

.etiquette-callout strong {
  color: #ffd700;
  display: block;
  margin-bottom: 0.25rem;
}

/* 42 Thủ Nhãn Tab */
.thunhan-intro-box {
  margin-bottom: 1rem;
}

.thunhan-intro-box p {
  color: #ccc;
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.thunhan-search-wrap {
  width: 100%;
}

.thunhan-search-input {
  width: 100%;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(229, 179, 100, 0.4);
  color: #fff;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.thunhan-search-input:focus {
  border-color: #ffd700;
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
}

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

.thunhan-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(229, 179, 100, 0.2);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  transition: all 0.2s ease;
}

.thunhan-card:hover {
  background: rgba(229, 179, 100, 0.08);
  border-color: rgba(229, 179, 100, 0.5);
  transform: translateY(-2px);
}

.thunhan-num-badge {
  display: inline-block;
  background: rgba(255, 215, 0, 0.15);
  color: #ffe082;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-bottom: 0.35rem;
}

.thunhan-name {
  margin: 0 0 0.4rem;
  color: #fff8e1;
  font-size: 1rem;
  font-weight: 600;
}

.thunhan-purpose {
  font-size: 0.85rem;
  color: #ddd;
  line-height: 1.45;
  margin-bottom: 0.35rem;
}

.thunhan-verse {
  font-size: 0.8rem;
  color: #ffecb3;
  font-style: italic;
  line-height: 1.4;
}

.thunhan-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 2rem;
  color: #888;
}

/* Mudra Modal Footer */
.mudra-modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  border-top: 1px solid rgba(229, 179, 100, 0.2);
  padding-top: 1rem;
  margin-top: 0.5rem;
}

.btn-mudra-primary-action {
  background: linear-gradient(135deg, #ffd700, #ff9800);
  color: #1a0f05;
  border: none;
  font-weight: 700;
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(255, 152, 0, 0.35);
  transition: all 0.2s ease;
  font-size: 0.95rem;
}

.btn-mudra-primary-action:hover {
  background: linear-gradient(135deg, #ffe082, #ffa726);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 152, 0, 0.5);
}

/* Floating Mudra Widget (Hands-Free Chanting Studio) */
.floating-mudra-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  max-width: 320px;
  width: calc(100vw - 32px);
  animation: floatIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.fl-mudra-card {
  position: relative;
  background: rgba(21, 15, 10, 0.92);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(229, 179, 100, 0.5);
  border-radius: 16px;
  padding: 0.85rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.75), 0 0 20px rgba(229, 179, 100, 0.2);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.fl-mudra-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #ccc;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s ease;
}

.fl-mudra-close:hover {
  background: rgba(255, 50, 50, 0.6);
  color: #fff;
}

.fl-mudra-thumb-wrap {
  width: 100%;
  height: 120px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(229, 179, 100, 0.3);
  background: #000;
}

.fl-mudra-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fl-mudra-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.fl-mudra-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff8e1;
}

.fl-mudra-pos {
  font-size: 0.78rem;
  color: #ffecb3;
}

.fl-mudra-badge-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.2rem;
}

.fl-mudra-mode-tag {
  font-size: 0.75rem;
  background: rgba(76, 175, 80, 0.2);
  color: #81c784;
  border: 1px solid rgba(76, 175, 80, 0.4);
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.fl-mudra-count {
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffd700;
  transition: transform 0.2s ease;
}

.fl-mudra-count.pulse {
  transform: scale(1.3);
  color: #fff;
  text-shadow: 0 0 12px #ffd700;
}

.fl-mudra-actions {
  display: flex;
  gap: 0.5rem;
}

.fl-btn-action {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(229, 179, 100, 0.3);
  color: #fff;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.fl-btn-action:hover {
  background: rgba(229, 179, 100, 0.25);
  border-color: #ffd700;
}

/* Responsive adjustments for Mudra */
@media (max-width: 768px) {
  .mudra-modal-card {
    padding: 1.25rem 1rem 1rem;
    max-height: 95vh;
  }
  .mudra-diagram-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .mudra-img-frame {
    max-width: 260px;
  }
  .mudra-modal-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .floating-mudra-widget {
    bottom: 12px;
    right: 12px;
    max-width: 280px;
  }
  .fl-mudra-thumb-wrap {
    height: 90px;
  }
}

/* ==========================================================================
   1. MUDRA 3 GÓC NHÌN (3-ANGLE PERSPECTIVES)
   ========================================================================== */
.mudra-persp-bar {
  width: 100%;
  max-width: 300px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}

.persp-title-hint {
  font-size: 0.8rem;
  color: #ffe6a3;
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.3;
}

.persp-btn-group {
  display: flex;
  gap: 6px;
  width: 100%;
}

.persp-btn {
  flex: 1;
  padding: 8px 6px;
  background: rgba(30, 20, 15, 0.7);
  border: 1px solid rgba(229, 179, 100, 0.3);
  border-radius: 8px;
  color: #d8c7b8;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.persp-btn:hover {
  border-color: #ffd700;
  background: rgba(229, 179, 100, 0.15);
  color: #fff;
}

.persp-btn.active {
  background: linear-gradient(135deg, rgba(229, 179, 100, 0.35), rgba(171, 122, 43, 0.3));
  border-color: #ffd700;
  color: #ffe6a3;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(229, 179, 100, 0.3);
}

.persp-icon {
  font-size: 0.85rem;
}

.persp-desc-box {
  width: 100%;
  max-width: 300px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(20, 14, 10, 0.75);
  border-left: 3px solid #e5b364;
  border-radius: 6px;
  margin-top: 8px;
}

.pdesc-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: #ffe6a3;
  background: rgba(229, 179, 100, 0.2);
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.pdesc-text {
  font-size: 0.8rem;
  color: #dcd2c9;
  line-height: 1.4;
}

/* ==========================================================================
   2. MUDRA ZOOM & PAN VIEWPORT
   ========================================================================== */
.mudra-zoom-container {
  position: relative;
  width: 100%;
  max-width: 300px;
  aspect-ratio: 1/1;
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid rgba(229, 179, 100, 0.45);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  background: #0d0906;
}

.mudra-zoom-toolbar {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(18, 12, 8, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 3px 6px;
  border-radius: 20px;
  border: 1px solid rgba(229, 179, 100, 0.35);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.mudra-zoom-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(45, 30, 20, 0.8);
  border: 1px solid rgba(229, 179, 100, 0.3);
  color: #ffe6a3;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  user-select: none;
}

.mudra-zoom-btn:hover {
  background: rgba(229, 179, 100, 0.3);
  border-color: #ffd700;
  color: #fff;
  transform: scale(1.1);
}

.mudra-zoom-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: #e5b364;
  min-width: 38px;
  text-align: center;
}

.mudra-img-viewport {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
  touch-action: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mudra-img-canvas {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 0.08s ease-out;
  transform-origin: center center;
  user-select: none;
}

.mudra-photo-display {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.mudra-zoom-hint {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, transparent, rgba(13, 9, 6, 0.95) 40%);
  padding: 16px 8px 6px;
  font-size: 0.72rem;
  color: rgba(255, 230, 163, 0.75);
  text-align: center;
  pointer-events: none;
}

.mudra-quick-actions {
  margin-top: 1rem;
}

.mudra-btn-switch-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 8px;
  background: rgba(229, 179, 100, 0.12);
  border: 1px solid rgba(229, 179, 100, 0.4);
  color: #ffe6a3;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mudra-btn-switch-tab:hover {
  background: rgba(229, 179, 100, 0.25);
  border-color: #ffd700;
  transform: translateX(3px);
}

/* ==========================================================================
   3. THỦ TỤC XẢ ẤN CHUẨN MẬT TÔNG (RELEASE RITUAL TAB)
   ========================================================================== */
.mudra-release-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 860px;
  margin: 0 auto;
}

.release-warning-banner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 18px;
  background: linear-gradient(135deg, rgba(140, 30, 30, 0.35), rgba(70, 15, 15, 0.5));
  border: 1.5px solid rgba(230, 80, 80, 0.45);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(100, 0, 0, 0.2);
}

.rw-icon {
  font-size: 1.8rem;
  line-height: 1;
}

.rw-content {
  flex: 1;
}

.rw-title {
  font-size: 0.95rem;
  color: #ff9999;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin: 0 0 4px 0;
}

.rw-text {
  font-size: 0.86rem;
  color: #f7d5d5;
  line-height: 1.5;
  margin: 0;
}

.release-intro-header {
  text-align: center;
  padding: 6px 0;
}

.release-main-title {
  font-size: 1.25rem;
  color: #ffe6a3;
  font-weight: 800;
  margin: 0 0 6px 0;
}

.release-sub-title {
  font-size: 0.88rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.4;
}

.release-steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
}

.release-step-card {
  background: rgba(30, 20, 15, 0.75);
  border: 1px solid rgba(229, 179, 100, 0.25);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.release-step-card:hover {
  border-color: rgba(229, 179, 100, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.release-step-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.release-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd700, #ab7a2b);
  color: #1a1107;
  font-weight: 800;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(229, 179, 100, 0.4);
}

.release-step-name {
  font-size: 0.95rem;
  color: #fff;
  font-weight: 700;
  margin: 0;
}

.release-step-desc {
  font-size: 0.85rem;
  color: #d8cec5;
  line-height: 1.5;
  margin: 0;
}

.release-mantra-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(229, 179, 100, 0.12);
  border-left: 3px solid #ffd700;
  border-radius: 6px;
  font-size: 0.82rem;
  color: #ffe6a3;
}

.release-tip-box {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 0.8rem;
  color: #b3a69a;
  background: rgba(255, 255, 255, 0.03);
  padding: 6px 10px;
  border-radius: 6px;
}

.release-closing-card {
  padding: 16px 20px;
  background: rgba(229, 179, 100, 0.08);
  border: 1px dashed rgba(229, 179, 100, 0.35);
  border-radius: 12px;
  text-align: center;
}

.rc-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 6px;
}

.rc-header h4 {
  margin: 0;
  color: #ffe6a3;
  font-size: 1rem;
}

.rc-text {
  font-size: 0.86rem;
  color: #d8cec5;
  margin: 0 0 10px 0;
  line-height: 1.5;
}

.rc-verse-box {
  display: inline-block;
  padding: 8px 16px;
  background: rgba(30, 20, 15, 0.6);
  border-radius: 8px;
  border: 1px solid rgba(229, 179, 100, 0.2);
  color: #ffe6a3;
  font-family: 'Gentium Book Plus', serif;
  font-size: 0.95rem;
}

/* ==========================================================================
   4. KHUNG GÕ MÕ DI ĐỘNG (FLOATING MOVABLE & RESIZABLE MÕ WIDGET)
   ========================================================================== */
.btn-popout-mo {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(229, 179, 100, 0.15);
  border: 1px solid rgba(229, 179, 100, 0.35);
  color: #ffe6a3;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: auto;
}

.btn-popout-mo:hover {
  background: rgba(229, 179, 100, 0.3);
  border-color: #ffd700;
  transform: translateY(-1px);
}

.floating-mo-widget {
  position: fixed;
  z-index: 1005;
  width: 270px;
  background: rgba(24, 16, 12, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid rgba(229, 179, 100, 0.5);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7), 0 0 20px rgba(229, 179, 100, 0.2);
  display: flex;
  flex-direction: column;
  user-select: none;
  touch-action: none;
  transition: box-shadow 0.2s ease;
}

.floating-mo-widget.is-dragging {
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.85), 0 0 30px rgba(229, 179, 100, 0.4);
  border-color: #ffd700;
}

.floating-mo-header {
  padding: 8px 12px;
  background: linear-gradient(180deg, rgba(55, 38, 25, 0.95), rgba(30, 20, 15, 0.95));
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
  border-bottom: 1px solid rgba(229, 179, 100, 0.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: grab;
}

.floating-mo-header:active,
.floating-mo-widget.is-dragging .floating-mo-header {
  cursor: grabbing;
}

.floating-mo-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #ffe6a3;
}

.fmo-drag-dots {
  color: rgba(229, 179, 100, 0.45);
  font-size: 0.9rem;
  letter-spacing: -2px;
}

.fmo-icon {
  font-size: 0.85rem;
}

.floating-mo-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.fmo-ctrl-btn {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  border: 1px solid rgba(229, 179, 100, 0.25);
  background: rgba(20, 14, 10, 0.6);
  color: #e5b364;
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1;
}

.fmo-ctrl-btn:hover {
  background: rgba(229, 179, 100, 0.3);
  border-color: #ffd700;
  color: #fff;
}

.fmo-ctrl-btn.fmo-close:hover {
  background: rgba(220, 50, 50, 0.4);
  border-color: #ff6666;
  color: #fff;
}

.fmo-scale-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: #e5b364;
  min-width: 32px;
  text-align: center;
}

.floating-mo-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.floating-mo-stage {
  display: flex;
  gap: 10px;
}

.floating-instrument-btn {
  flex: 1;
  height: 95px;
  border-radius: 12px;
  border: 1px solid rgba(229, 179, 100, 0.35);
  background: linear-gradient(145deg, rgba(45, 30, 20, 0.85), rgba(25, 18, 12, 0.95));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  position: relative;
  cursor: pointer;
  transition: transform 0.08s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.floating-instrument-btn:hover {
  border-color: rgba(229, 179, 100, 0.7);
  box-shadow: 0 6px 18px rgba(229, 179, 100, 0.25);
}

.floating-instrument-btn:active,
.floating-instrument-btn.active-hit {
  transform: scale(0.92);
  border-color: #ffd700;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
}

.floating-strike-badge {
  position: absolute;
  top: 4px;
  right: 6px;
  padding: 1px 6px;
  border-radius: 10px;
  background: rgba(229, 179, 100, 0.2);
  border: 1px solid rgba(229, 179, 100, 0.4);
  font-size: 0.68rem;
  font-weight: 700;
  color: #ffe6a3;
}

.fmo-img-wrap {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fmo-real-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
}

.fmo-chuong-svg {
  width: 38px;
  height: 38px;
  color: #e5b364;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.fmo-btn-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #d4c5b9;
}

.floating-mo-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 6px;
  border-top: 1px solid rgba(229, 179, 100, 0.15);
}

.fmo-footer-btn {
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(229, 179, 100, 0.3);
  background: rgba(35, 25, 18, 0.7);
  color: #d8cec5;
  font-size: 0.74rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.fmo-footer-btn:hover {
  background: rgba(229, 179, 100, 0.2);
  border-color: #ffd700;
  color: #fff;
}

.fmo-footer-btn.active-auto {
  background: rgba(229, 179, 100, 0.3);
  border-color: #ffd700;
  color: #ffe6a3;
  font-weight: 700;
  box-shadow: 0 0 10px rgba(229, 179, 100, 0.3);
}

.fmo-auto-icon {
  font-size: 0.75rem;
}

.fmo-drag-hint {
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* Bong bóng nổi khi thu nhỏ / ẩn */
.floating-mo-bubble {
  position: fixed;
  z-index: 1004;
  bottom: 24px;
  right: 24px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: radial-gradient(circle, #3d281a 0%, #1a110a 100%);
  border: 2px solid #e5b364;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 15px rgba(229, 179, 100, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  padding: 0;
}

.floating-mo-bubble:hover {
  transform: scale(1.1);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.7), 0 0 24px rgba(229, 179, 100, 0.55);
}

.fmo-bubble-inner {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fmo-bubble-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.fmo-bubble-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  background: #ab7a2b;
  border: 1.5px solid #ffe6a3;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.floating-mo-bubble.bubble-hit {
  animation: bubblePulse 0.4s ease-out;
}

@keyframes bubblePulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.18); box-shadow: 0 0 25px #ffd700; }
  100% { transform: scale(1); }
}

/* ==========================================================================
   5. VIDEO THỊ PHẠM KIẾT ẤN (KÊNH VIÊN THÔNG YOUTUBE INTEGRATION)
   ========================================================================== */
.mudra-quick-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.mudra-btn-switch-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 8px;
  background: rgba(229, 179, 100, 0.12);
  border: 1px solid rgba(229, 179, 100, 0.35);
  color: #ffe6a3;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.mudra-btn-switch-tab:hover {
  background: rgba(229, 179, 100, 0.22);
  border-color: #ffd700;
  color: #ffffff;
  transform: translateY(-1px);
}

.mudra-btn-switch-tab.btn-video-accent {
  background: linear-gradient(135deg, rgba(230, 33, 23, 0.2), rgba(229, 179, 100, 0.18));
  border-color: rgba(255, 68, 68, 0.45);
  color: #ffcdd2;
  box-shadow: 0 2px 10px rgba(230, 33, 23, 0.15);
}

.mudra-btn-switch-tab.btn-video-accent:hover {
  background: linear-gradient(135deg, rgba(230, 33, 23, 0.35), rgba(255, 215, 0, 0.25));
  border-color: #ff5252;
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(230, 33, 23, 0.3);
}

/* Video Tab Layout */
.mudra-video-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: fadeInMudra 0.25s ease-out;
}

.video-main-card {
  background: rgba(25, 17, 12, 0.85);
  border: 1.5px solid rgba(229, 179, 100, 0.35);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.video-header-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.vhi-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 240px;
}

.vhi-tag {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(229, 179, 100, 0.18);
  color: #ffe6a3;
  border: 1px solid rgba(229, 179, 100, 0.3);
}

.vhi-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff6e5;
  line-height: 1.35;
}

.vhi-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.vhi-duration {
  font-size: 0.82rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.5);
  color: #e5b364;
  border: 1px solid rgba(229, 179, 100, 0.25);
}

.vhi-yt-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(204, 0, 0, 0.18);
  border: 1px solid rgba(255, 50, 50, 0.35);
  color: #ffcdd2;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.vhi-yt-link:hover {
  background: rgba(204, 0, 0, 0.35);
  border-color: #ff5252;
  color: #ffffff;
  transform: translateY(-1px);
}

/* 16:9 Frame Player */
.mudra-video-player-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 280px;
  max-height: 520px;
  background: #0d0805;
  border-radius: 12px;
  overflow: hidden;
  border: 1.5px solid rgba(229, 179, 100, 0.3);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.7), 0 0 15px rgba(229, 179, 100, 0.15);
}

.mudra-video-iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: none;
}

/* Video Credit & Attribution Bar */
.video-credit-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  margin-top: 12px;
  background: rgba(35, 23, 16, 0.6);
  border: 1px solid rgba(229, 179, 100, 0.2);
  border-radius: 8px;
  flex-wrap: wrap;
}

.vc-channel {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #d8cec5;
  font-size: 0.86rem;
}

.vc-icon {
  font-size: 1.1rem;
  color: #ffd700;
}

.vc-channel strong {
  color: #ffe6a3;
}

.vc-sub-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 6px;
  background: linear-gradient(135deg, #cc0000, #990000);
  border: 1px solid #ff4444;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(204, 0, 0, 0.35);
}

.vc-sub-btn:hover {
  background: linear-gradient(135deg, #ff1a1a, #cc0000);
  border-color: #ff6666;
  box-shadow: 0 4px 14px rgba(255, 26, 26, 0.5);
  transform: translateY(-1px);
  color: #ffffff;
}

/* Foundation Videos Section */
.video-foundation-section {
  background: rgba(22, 15, 10, 0.7);
  border: 1px solid rgba(229, 179, 100, 0.25);
  border-radius: 12px;
  padding: 14px 16px;
}

.vfs-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.vfs-icon {
  font-size: 1.1rem;
}

.vfs-title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
  color: #ffe6a3;
}

.vfs-sub {
  margin: 0 0 12px 0;
  font-size: 0.82rem;
  color: #b3a69a;
  line-height: 1.4;
}

.vfs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.foundation-video-card {
  display: flex;
  gap: 10px;
  background: rgba(35, 24, 17, 0.75);
  border: 1px solid rgba(229, 179, 100, 0.2);
  border-radius: 10px;
  padding: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  align-items: center;
  position: relative;
}

.foundation-video-card:hover {
  background: rgba(45, 30, 20, 0.95);
  border-color: #e5b364;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5), 0 0 10px rgba(229, 179, 100, 0.25);
}

.foundation-video-card.active-video {
  background: rgba(55, 36, 22, 0.95);
  border-color: #ffd700;
  box-shadow: 0 0 16px rgba(255, 215, 0, 0.35);
}

.foundation-video-card.active-video::after {
  content: '▶ Đang phát';
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: 0.65rem;
  font-weight: 700;
  color: #ffd700;
  background: rgba(0, 0, 0, 0.6);
  padding: 1px 6px;
  border-radius: 4px;
}

.fvc-thumb-wrap {
  position: relative;
  width: 108px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
  background: #000;
}

.fvc-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}

.foundation-video-card:hover .fvc-thumb {
  transform: scale(1.06);
}

.fvc-duration {
  position: absolute;
  bottom: 2px;
  right: 2px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
}

.fvc-play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 215, 0, 0.8);
  color: #ffd700;
  font-size: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.foundation-video-card:hover .fvc-play-overlay {
  background: #cc0000;
  border-color: #ff5252;
  color: #fff;
  transform: translate(-50%, -50%) scale(1.15);
}

.fvc-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fvc-name {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fvc-desc {
  margin: 0;
  font-size: 0.72rem;
  color: #b3a69a;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 600px) {
  .mudra-video-player-frame {
    min-height: 200px;
  }
  .vfs-grid {
    grid-template-columns: 1fr;
  }
}

/* Nút Thủ Ấn nổi bật trên Header */
.btn-mudra-header {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.25), rgba(229, 179, 100, 0.12));
  border: 1px solid rgba(255, 215, 0, 0.6);
  color: #ffe6a3;
  padding: 0 12px;
  border-radius: var(--radius-full, 9999px);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(229, 179, 100, 0.2);
}

.btn-mudra-header:hover {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.45), rgba(229, 179, 100, 0.25));
  border-color: #ffd700;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(255, 215, 0, 0.35);
}

.btn-mudra-icon {
  font-size: 0.95rem;
  filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.7));
}

/* Nút Thủ Ấn trên Sidebar */
.btn-mudra-action {
  background: linear-gradient(135deg, rgba(229, 179, 100, 0.25), rgba(255, 215, 0, 0.15)) !important;
  border-color: rgba(255, 215, 0, 0.5) !important;
  color: #ffe6a3 !important;
}

.btn-mudra-action:hover {
  background: linear-gradient(135deg, rgba(229, 179, 100, 0.4), rgba(255, 215, 0, 0.3)) !important;
  border-color: #ffd700 !important;
  color: #ffffff !important;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

/* Nút Thủ Ấn trên Mobile Dock */
.mobile-dock-mudra:hover,
.mobile-dock-mudra:active {
  color: #ffd700;
}




