/* ==========================================================================
   CocoMeo Pagoda - Chùa Online & Không Gian Tâm Linh Chánh Niệm
   Stylesheet: app.css
   ========================================================================== */

:root {
  --gold-100: #fff9e6;
  --gold-200: #ffecb3;
  --gold-300: #ffe082;
  --gold-400: #ffd54f;
  --gold-500: #ffca28;
  --gold-primary: #d4a857;
  --gold-dark: #8c6a28;
  --gold-glow: rgba(212, 168, 87, 0.45);
  
  --bg-dark: #0f0b07;
  --bg-card: rgba(26, 19, 13, 0.88);
  --bg-card-hover: rgba(42, 31, 21, 0.95);
  --bg-modal: #18110b;
  
  --border-gold: rgba(212, 168, 87, 0.35);
  --border-gold-bright: rgba(255, 215, 0, 0.65);
  
  --text-main: #f5eedb;
  --text-muted: #bdae95;
  --text-gold: #ffd679;
  
  --crimson: #a62b2b;
  --crimson-light: #d33838;
  
  --font-serif: "Noto Serif", "Playfair Display", "Times New Roman", serif;
  --font-sans: "Be Vietnam Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  --shadow-gold: 0 4px 20px rgba(212, 168, 87, 0.25);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  min-height: 100vh;
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Background canvas / fixed layer */
.pagoda-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-color: #0b0704;
  background-image: 
    radial-gradient(135% 95% at 50% 30%, transparent 25%, rgba(6, 4, 2, 0.78) 95%),
    linear-gradient(180deg, rgba(12, 8, 4, 0.35) 0%, rgba(10, 7, 3, 0.7) 60%, rgba(8, 5, 2, 0.95) 100%),
    url('assets/chua-bg.webp');
  background-position: center 25%;
  background-size: cover;
  background-repeat: no-repeat;
  transition: filter 0.5s ease, background-image 0.5s ease;
}

/* Day/Night/Sunset ambience overrides */
body.ambience-sunset .pagoda-bg {
  filter: sepia(0.35) hue-rotate(-20deg) brightness(0.9);
}
body.ambience-night .pagoda-bg {
  filter: brightness(0.55) contrast(1.15) saturate(0.85);
}
body.ambience-morning .pagoda-bg {
  filter: brightness(1.15) contrast(0.95) saturate(1.1);
}

/* God-light particles container */
.mote-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.god-mote {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 235, 170, 0.9), rgba(212, 168, 87, 0.2) 70%, transparent);
  box-shadow: 0 0 8px rgba(255, 220, 120, 0.6);
  pointer-events: none;
  animation: floatMote linear infinite;
}

@keyframes floatMote {
  0% {
    transform: translateY(100vh) translateX(0) scale(0.8);
    opacity: 0;
  }
  20% { opacity: 0.8; }
  80% { opacity: 0.8; }
  100% {
    transform: translateY(-10vh) translateX(40px) scale(1.2);
    opacity: 0;
  }
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.pagoda-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 11, 7, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-gold);
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.7);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-decoration: none;
}

.brand-lotus-icon {
  width: 44px;
  height: 44px;
  filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
  animation: pulseLotus 4s ease-in-out infinite;
}

@keyframes pulseLotus {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.4)); }
  50% { transform: scale(1.06); filter: drop-shadow(0 0 16px rgba(255, 215, 0, 0.8)); }
}

.brand-text h1 {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--gold-200);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9), 0 0 20px var(--gold-glow);
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-text .brand-tagline {
  font-size: 11px;
  color: var(--gold-primary);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  opacity: 0.9;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-header {
  background: rgba(42, 31, 21, 0.7);
  border: 1px solid var(--border-gold);
  color: var(--gold-200);
  padding: 8px 14px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-header:hover {
  background: rgba(212, 168, 87, 0.25);
  border-color: var(--gold-400);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 3px 12px rgba(212, 168, 87, 0.3);
}

.btn-header.active {
  background: linear-gradient(135deg, #a62b2b, #731b1b);
  border-color: #ff6666;
  color: #fff;
  box-shadow: 0 0 12px rgba(211, 56, 56, 0.5);
}

.btn-header-config {
  background: linear-gradient(135deg, rgba(212, 168, 87, 0.3), rgba(140, 106, 40, 0.5));
  border: 1px solid var(--gold-primary);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 0 14px rgba(212, 168, 87, 0.35);
}

.btn-header-config:hover {
  background: linear-gradient(135deg, rgba(212, 168, 87, 0.5), rgba(180, 140, 50, 0.7));
  border-color: #ffe082;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
}

/* ==========================================================================
   Navigation Tabs
   ========================================================================== */

.nav-tabs-bar {
  background: rgba(20, 14, 9, 0.95);
  border-bottom: 1px solid rgba(212, 168, 87, 0.2);
  position: sticky;
  top: 65px;
  z-index: 99;
}

.nav-tabs-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 0 10px;
}

.nav-tabs-container::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  padding: 12px 18px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.25s ease;
}

.tab-btn:hover {
  color: var(--gold-200);
  background: rgba(212, 168, 87, 0.08);
}

.tab-btn.active {
  color: var(--gold-300);
  border-bottom-color: var(--gold-400);
  background: rgba(212, 168, 87, 0.12);
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

/* ==========================================================================
   Main App Container
   ========================================================================== */

.app-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px 80px;
  min-height: calc(100vh - 140px);
}

.tab-pane {
  display: none;
  animation: fadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.tab-pane.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Tab 1: Chánh Điện Chùa (Viếng Chùa Online)
   ========================================================================== */

.sanctuary-stage {
  position: relative;
  min-height: clamp(500px, 75vh, 760px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
  padding: 20px 10px 30px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), inset 0 0 60px rgba(0, 0, 0, 0.6);
  border: 1px solid var(--border-gold);
  background: radial-gradient(circle at 50% 35%, rgba(40, 26, 14, 0.35) 0%, rgba(12, 8, 4, 0.85) 85%);
}

.sanctuary-title {
  padding-top: 10px;
  position: relative;
  z-index: 5;
}

.sanctuary-title h2 {
  font-family: var(--font-serif);
  font-size: clamp(26px, 5vw, 42px);
  color: #fff6da;
  text-shadow: 0 2px 18px rgba(0,0,0,0.9), 0 0 35px var(--gold-glow);
  letter-spacing: 1px;
}

.sanctuary-subtitle {
  color: var(--gold-200);
  font-size: clamp(13px, 2.8vw, 16px);
  font-style: italic;
  margin-top: 6px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9);
}

.golden-divider {
  width: 120px;
  height: 2px;
  margin: 12px auto 0;
  background: linear-gradient(90deg, transparent, var(--gold-300), transparent);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
}

/* Buddhist Halo & Glow */
.buddha-halo {
  position: absolute;
  left: 50%;
  top: 24%;
  transform: translateX(-50%);
  width: clamp(260px, 45vw, 380px);
  height: clamp(260px, 45vw, 380px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 230, 160, 0.35) 0%, rgba(255, 190, 80, 0.15) 45%, transparent 72%);
  z-index: 2;
  pointer-events: none;
  animation: haloBreath 6s ease-in-out infinite;
}

@keyframes haloBreath {
  0%, 100% { opacity: 0.6; transform: translateX(-50%) scale(0.96); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.08); filter: drop-shadow(0 0 30px rgba(255, 215, 0, 0.6)); }
}

/* Buddha Statue Display */
.altar-center {
  position: relative;
  z-index: 3;
  margin: auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.buddha-statue-img {
  width: clamp(180px, 32vw, 290px);
  height: auto;
  filter: drop-shadow(0 8px 25px rgba(0, 0, 0, 0.95)) drop-shadow(0 0 25px rgba(212, 168, 87, 0.5));
  transition: all 0.5s ease;
}

/* Smoke rising from altar */
.altar-incense-burner {
  position: relative;
  margin-top: -20px;
  z-index: 4;
}

.smoke-cloud-container {
  position: absolute;
  left: 50%;
  bottom: 60px;
  transform: translateX(-50%);
  width: 80px;
  height: 120px;
  pointer-events: none;
}

.smoke-puff {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 230, 210, 0.35), transparent 70%);
  filter: blur(8px);
  animation: smokeRise 7s ease-in infinite;
  opacity: 0;
}

.smoke-puff.p2 { animation-delay: 2.3s; animation-duration: 8s; transform: translateX(-10px); }
.smoke-puff.p3 { animation-delay: 4.6s; animation-duration: 7.5s; transform: translateX(8px); }

@keyframes smokeRise {
  0% { transform: translate(-50%, 0) scale(0.5); opacity: 0; }
  20% { opacity: 0.7; }
  60% { opacity: 0.45; }
  100% { transform: translate(-50%, -160px) scale(2.8); opacity: 0; }
}

/* Ripple effect on bowing */
.cd-ripple {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(255, 215, 0, 0.8);
  pointer-events: none;
  animation: rippleExpand 1.6s ease-out forwards;
}

@keyframes rippleExpand {
  0% { width: 30px; height: 30px; opacity: 1; }
  100% { width: 450px; height: 450px; opacity: 0; border-width: 1px; }
}

/* Verse Banner (Khắc Lời Phật Dạy) */
.verse-banner {
  margin: 15px auto;
  max-width: 720px;
  min-height: 48px;
  padding: 10px 20px;
  background: rgba(18, 12, 8, 0.82);
  border: 1px solid var(--border-gold);
  border-radius: 30px;
  color: var(--gold-100);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(13px, 2.4vw, 15px);
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.8);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease;
  z-index: 5;
}

/* 4 Rites Progress Bar */
.rite-progress-box {
  margin: 10px auto;
  padding: 8px 18px;
  background: rgba(26, 18, 12, 0.8);
  border-radius: 20px;
  border: 1px solid rgba(212, 168, 87, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--gold-200);
  z-index: 5;
}

.rite-dots {
  display: flex;
  gap: 6px;
}

.rite-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: inline-block;
  transition: all 0.3s ease;
}

.rite-dots i.on {
  background: var(--gold-400);
  box-shadow: 0 0 8px var(--gold-glow);
}

/* Rite Action Buttons */
.sanctuary-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 15px;
  z-index: 5;
}

.btn-rite {
  background: linear-gradient(180deg, rgba(46, 32, 20, 0.95), rgba(28, 19, 12, 0.98));
  border: 1px solid var(--border-gold);
  color: #fff2d1;
  padding: 12px 22px;
  border-radius: 35px;
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
}

.btn-rite:hover {
  background: linear-gradient(180deg, rgba(74, 52, 32, 0.95), rgba(46, 32, 20, 0.98));
  border-color: var(--gold-400);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 168, 87, 0.4);
}

.btn-rite.done {
  border-color: #55bb55;
  color: #aaffaa;
}

.btn-rite.done::after {
  content: " ✓";
  font-size: 13px;
  color: #55dd55;
}

/* Sanctuary Completed Message */
.sanctuary-completed-notice {
  margin: 15px auto 0;
  padding: 14px 24px;
  background: linear-gradient(135deg, rgba(74, 48, 20, 0.9), rgba(46, 30, 12, 0.95));
  border: 1px solid var(--gold-400);
  border-radius: var(--radius-md);
  max-width: 680px;
  font-family: var(--font-serif);
  font-size: 14px;
  color: #fff6da;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.7);
  display: none;
  animation: fadeIn 0.4s ease forwards;
  z-index: 5;
}

.sanctuary-completed-notice.show {
  display: block;
}

/* Bowing animation */
.sanctuary-stage.bowing .altar-center {
  animation: bowAltar 1.35s ease-in-out;
}

@keyframes bowAltar {
  0% { transform: translateY(0); }
  45% { transform: translateY(35px) scale(0.97); }
  100% { transform: translateY(0) scale(1); }
}

/* Falling lotus petals */
.cd-petal {
  position: absolute;
  top: -30px;
  font-size: 20px;
  pointer-events: none;
  z-index: 10;
  animation: fallPetal linear forwards;
}

@keyframes fallPetal {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(680px) rotate(360deg); opacity: 0; }
}

/* ==========================================================================
   Tab 2: Thắp Hương Trọn Nghi Thức (Incense Altar)
   ========================================================================== */

.incense-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
}

.incense-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 28px;
}

@media (max-width: 860px) {
  .incense-grid {
    grid-template-columns: 1fr;
  }
}

.incense-altar-view {
  background: #140d08;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-gold);
  min-height: 480px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-bottom: 26px;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.8);
}

.incense-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
  z-index: 1;
  filter: brightness(0.95) contrast(1.05);
}

.incense-sticks-visual {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 12px;
  position: relative;
  z-index: 3;
  margin-bottom: -18px;
}

.stick-item {
  width: 5px;
  height: 180px;
  background: linear-gradient(180deg, #d33838 0%, #a62b2b 25%, #6a4e32 26%, #4a3420 100%);
  border-radius: 3px 3px 0 0;
  position: relative;
  transition: all 0.5s ease;
}

.stick-item.burning::before {
  content: '';
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff, #ff6600 60%, #cc0000 100%);
  box-shadow: 0 0 10px #ff7700, 0 0 20px #ff3300;
  animation: glowEmber 1.5s ease-in-out infinite alternate;
}

@keyframes glowEmber {
  from { filter: brightness(0.9); }
  to { filter: brightness(1.35) drop-shadow(0 0 6px #ffcc00); }
}

.stick-smoke-canvas {
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 4;
}

.incense-burner-svg {
  width: 160px;
  height: auto;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.9));
}

.incense-control-box {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group-custom label {
  display: block;
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 600;
  color: var(--gold-200);
  margin-bottom: 8px;
}

.pill-selector {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pill-option {
  flex: 1;
  min-width: 90px;
  padding: 10px 14px;
  background: rgba(36, 26, 17, 0.8);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
}

.pill-option:hover {
  background: rgba(56, 40, 27, 0.9);
  color: #fff;
}

.pill-option.active {
  background: linear-gradient(135deg, rgba(212, 168, 87, 0.35), rgba(160, 120, 40, 0.45));
  border-color: var(--gold-400);
  color: #fff6da;
  font-weight: 600;
  box-shadow: 0 0 10px rgba(212, 168, 87, 0.3);
}

.pill-option .sub-desc {
  display: block;
  font-size: 11px;
  opacity: 0.75;
  margin-top: 2px;
}

.incense-meaning-box {
  background: rgba(20, 14, 9, 0.75);
  border-left: 3px solid var(--gold-primary);
  padding: 10px 14px;
  font-size: 13px;
  color: var(--gold-100);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
}

.khan-textarea {
  width: 100%;
  min-height: 85px;
  padding: 12px 14px;
  background: rgba(18, 12, 8, 0.85);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 14px;
  resize: vertical;
  line-height: 1.5;
}

.khan-textarea:focus {
  outline: none;
  border-color: var(--gold-400);
  box-shadow: 0 0 10px rgba(212, 168, 87, 0.3);
}

.incense-steps-btns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-incense-action {
  flex: 1;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-gold);
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.25s ease;
  background: rgba(42, 30, 20, 0.85);
  color: var(--gold-200);
}

.btn-incense-action:hover:not(:disabled) {
  background: rgba(70, 50, 32, 0.95);
  border-color: var(--gold-400);
  color: #fff;
  transform: translateY(-2px);
}

.btn-incense-action:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-incense-action.primary-ignite {
  background: linear-gradient(135deg, #a62b2b, #731b1b);
  border-color: #ff6666;
  color: #fff;
  box-shadow: 0 4px 15px rgba(166, 43, 43, 0.4);
}

.btn-incense-action.primary-ignite:hover:not(:disabled) {
  background: linear-gradient(135deg, #c73636, #8e2323);
  box-shadow: 0 6px 20px rgba(211, 56, 56, 0.6);
}

/* ==========================================================================
   Tab 3: Gõ Mõ Tích Đức Online
   ========================================================================== */

.moyu-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 0 40px;
  position: relative;
}

.merit-counter-display {
  background: rgba(22, 15, 10, 0.85);
  border: 1px solid var(--border-gold);
  padding: 12px 30px;
  border-radius: 40px;
  margin-bottom: 25px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.merit-counter-display .counter-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
}

.merit-counter-display .counter-val {
  font-family: var(--font-serif);
  font-size: clamp(32px, 7vw, 48px);
  font-weight: 700;
  color: var(--gold-300);
  line-height: 1.1;
  text-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.moyu-stage {
  position: relative;
  width: clamp(260px, 60vw, 360px);
  height: clamp(260px, 60vw, 360px);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px 0 25px;
  cursor: pointer;
}

.moyu-cushion {
  position: absolute;
  bottom: 10px;
  width: 85%;
  height: 45px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, #a62b2b 0%, #681717 65%, #3c0b0b 100%);
  border: 2px solid #d4a857;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.9), inset 0 2px 8px rgba(255, 215, 0, 0.5);
  z-index: 1;
}

.moyu-svg-wrap {
  position: relative;
  z-index: 2;
  width: 80%;
  height: 80%;
  transition: transform 0.08s ease;
}

.moyu-stage:active .moyu-svg-wrap,
.moyu-stage.hit .moyu-svg-wrap {
  transform: scale(0.93) translateY(6px);
}

/* Dùi gõ mõ */
.moyu-mallet-wrap {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 70px;
  height: 150px;
  z-index: 5;
  pointer-events: none;
  transform-origin: bottom right;
  transform: rotate(25deg);
  transition: transform 0.08s ease;
}

.moyu-stage.hit .moyu-mallet-wrap {
  transform: rotate(-12deg) translate(-10px, 20px);
}

/* Float text animation on knock */
.merit-float-item {
  position: absolute;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--gold-300);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9), 0 0 15px rgba(255, 215, 0, 0.8);
  pointer-events: none;
  z-index: 10;
  animation: floatUpMerit 1.25s cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
}

@keyframes floatUpMerit {
  0% { transform: translateY(0) scale(0.85); opacity: 0.9; }
  50% { opacity: 1; transform: translateY(-40px) scale(1.1); }
  100% { transform: translateY(-90px) scale(0.95); opacity: 0; }
}

/* Auto-knock control box */
.auto-knock-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  background: rgba(26, 19, 13, 0.9);
  border: 1px solid var(--border-gold);
  border-radius: 40px;
  padding: 10px 24px;
  max-width: 580px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.btn-auto-toggle {
  background: linear-gradient(135deg, rgba(212, 168, 87, 0.3), rgba(160, 120, 40, 0.5));
  border: 1px solid var(--gold-primary);
  color: #fff;
  padding: 8px 18px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s ease;
}

.btn-auto-toggle.on {
  background: linear-gradient(135deg, #a62b2b, #841f1f);
  border-color: #ff6666;
  box-shadow: 0 0 14px rgba(211, 56, 56, 0.6);
}

.speed-chips {
  display: flex;
  gap: 6px;
}

.speed-chip {
  padding: 6px 12px;
  background: rgba(45, 33, 22, 0.8);
  border: 1px solid var(--border-gold);
  border-radius: 20px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.speed-chip.active {
  background: var(--gold-primary);
  color: #1a0f07;
  font-weight: 700;
  border-color: var(--gold-400);
}

/* ==========================================================================
   Tab 4: Gieo Quẻ Quan Âm / Rút Xăm
   ========================================================================== */

.fortune-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 0;
}

.fortune-tube-wrap {
  width: 140px;
  height: 220px;
  position: relative;
  margin: 20px 0 30px;
  cursor: pointer;
}

.fortune-tube-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.85));
  transition: transform 0.1s ease;
}

.fortune-tube-wrap.shaking {
  animation: shakeTube 0.2s ease-in-out infinite;
}

@keyframes shakeTube {
  0%, 100% { transform: rotate(0deg) translateY(0); }
  25% { transform: rotate(-8deg) translateY(-8px); }
  75% { transform: rotate(8deg) translateY(-8px); }
}

.fortune-card-result {
  max-width: 640px;
  width: 100%;
  background: linear-gradient(135deg, #22180f 0%, #160e09 100%);
  border: 2px solid var(--gold-primary);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.85), inset 0 0 25px rgba(212, 168, 87, 0.15);
  margin-top: 20px;
  text-align: left;
  display: none;
  animation: fadeIn 0.4s ease forwards;
}

.fortune-card-result.show {
  display: block;
}

.fortune-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-gold);
  padding-bottom: 14px;
  margin-bottom: 18px;
}

.fortune-hexagram {
  font-size: 38px;
  color: var(--gold-300);
}

.fortune-title h3 {
  font-family: var(--font-serif);
  font-size: 24px;
  color: var(--gold-200);
}

.fortune-title .fortune-cat-badge {
  font-size: 12px;
  color: #fff;
  background: var(--crimson);
  padding: 2px 10px;
  border-radius: 12px;
  display: inline-block;
  margin-top: 4px;
}

.fortune-meaning-quote {
  font-family: var(--font-serif);
  font-size: 16px;
  font-style: italic;
  color: #fff7e0;
  border-left: 3px solid var(--gold-primary);
  padding-left: 14px;
  margin-bottom: 16px;
}

.fortune-body-text {
  font-size: 14px;
  color: var(--text-main);
  line-height: 1.7;
  margin-bottom: 18px;
}

.fortune-advice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  background: rgba(12, 8, 5, 0.6);
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(212, 168, 87, 0.2);
}

.advice-col h5 {
  font-size: 13px;
  color: var(--gold-400);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.advice-col p {
  font-size: 13px;
  color: var(--text-muted);
}

/* ==========================================================================
   Tab 5: Thả Đèn Hoa Đăng Cầu An
   ========================================================================== */

.lantern-river-stage {
  height: clamp(420px, 65vh, 600px);
  background: linear-gradient(180deg, #070912 0%, #0d1222 40%, #15162b 100%);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(212, 168, 87, 0.35);
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.9);
}

.moon-view {
  position: absolute;
  top: 30px;
  right: 50px;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: radial-gradient(circle, #fffdf2 0%, #ffefa6 60%, transparent 100%);
  box-shadow: 0 0 40px rgba(255, 235, 140, 0.7);
  pointer-events: none;
}

.river-water-waves {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.015), transparent 40px);
  pointer-events: none;
}

.floating-lantern-item {
  position: absolute;
  pointer-events: auto;
  cursor: pointer;
  transition: transform 0.3s ease;
  animation: driftLantern linear infinite;
}

.floating-lantern-item:hover {
  transform: scale(1.15);
  z-index: 20;
}

@keyframes driftLantern {
  0% { transform: translateY(0) translateX(0); }
  50% { transform: translateY(-8px) translateX(25px); }
  100% { transform: translateY(0) translateX(50px); }
}

.lantern-release-bar {
  margin-top: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 18px 24px;
  display: flex;
  gap: 15px;
  align-items: center;
  flex-wrap: wrap;
}

.lantern-release-bar input {
  flex: 1;
  min-width: 240px;
  padding: 10px 16px;
  background: rgba(14, 9, 6, 0.85);
  border: 1px solid var(--border-gold);
  border-radius: 25px;
  color: #fff;
  font-size: 14px;
}

.lantern-release-bar input:focus {
  outline: none;
  border-color: var(--gold-400);
}

/* ==========================================================================
   Tab 6: Sổ Tâm Nguyện & Lịch Vạn Niên
   ========================================================================== */

.ledger-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 24px;
}

@media (max-width: 860px) {
  .ledger-grid {
    grid-template-columns: 1fr;
  }
}

.calendar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 22px;
}

.calendar-header {
  border-bottom: 1px solid var(--border-gold);
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.calendar-header h3 {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--gold-300);
}

.calendar-lunar-highlight {
  background: rgba(166, 43, 43, 0.25);
  border: 1px solid rgba(211, 56, 56, 0.4);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
  margin-bottom: 16px;
}

.lunar-day-large {
  font-family: var(--font-serif);
  font-size: 42px;
  font-weight: 700;
  color: #ffdd88;
  line-height: 1;
}

.lunar-details-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
}

.lunar-details-list li {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dashed rgba(212, 168, 87, 0.15);
  padding-bottom: 4px;
}

.lunar-details-list li span:first-child {
  color: var(--text-muted);
}

.lunar-details-list li span:last-child {
  color: var(--gold-200);
  font-weight: 500;
}

.ledger-card {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
}

.ledger-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-gold);
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.ledger-header h3 {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--gold-300);
}

.ledger-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 6px;
}

.ledger-item {
  background: rgba(18, 12, 8, 0.7);
  border: 1px solid rgba(212, 168, 87, 0.25);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  transition: all 0.2s ease;
}

.ledger-item:hover {
  border-color: var(--gold-primary);
  background: rgba(30, 20, 13, 0.85);
}

.ledger-item-top {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 6px;
}

.ledger-author {
  font-weight: 600;
  color: var(--gold-300);
}

.ledger-branch-badge {
  font-size: 11px;
  background: rgba(212, 168, 87, 0.18);
  color: var(--gold-200);
  padding: 1px 8px;
  border-radius: 10px;
}

.ledger-content {
  font-size: 13px;
  color: var(--text-main);
  line-height: 1.5;
}

/* ==========================================================================
   GIAO DIỆN CẤU HÌNH COCOMEO PAGODA (Modal Settings Panel)
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 4, 2, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.2s ease forwards;
}

.modal-backdrop.open {
  display: flex;
}

.config-modal-window {
  background: var(--bg-modal);
  border: 2px solid var(--border-gold-bright);
  border-radius: var(--radius-lg);
  max-width: 820px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.95), 0 0 30px rgba(212, 168, 87, 0.3);
  overflow: hidden;
}

.config-modal-header {
  padding: 18px 24px;
  background: linear-gradient(135deg, rgba(46, 32, 20, 0.98), rgba(24, 16, 10, 0.98));
  border-bottom: 1px solid var(--border-gold);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.config-modal-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.config-modal-title h3 {
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--gold-200);
  letter-spacing: 0.5px;
}

.config-modal-title .badge-pagoda {
  font-size: 11px;
  background: var(--crimson);
  color: #fff;
  padding: 3px 8px;
  border-radius: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.btn-close-modal {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.2s ease;
}

.btn-close-modal:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* Config Navigation Tabs inside modal */
.config-tabs-nav {
  display: flex;
  background: rgba(18, 12, 7, 0.95);
  border-bottom: 1px solid rgba(212, 168, 87, 0.25);
  overflow-x: auto;
  scrollbar-width: none;
}

.config-tab-item {
  padding: 12px 18px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.config-tab-item:hover {
  color: var(--gold-200);
  background: rgba(212, 168, 87, 0.08);
}

.config-tab-item.active {
  color: var(--gold-300);
  border-bottom-color: var(--gold-400);
  background: rgba(212, 168, 87, 0.12);
}

.config-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.config-pane {
  display: none;
}

.config-pane.active {
  display: block;
}

.config-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 680px) {
  .config-form-grid {
    grid-template-columns: 1fr;
  }
}

.config-group {
  margin-bottom: 18px;
}

.config-group label {
  display: block;
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 600;
  color: var(--gold-200);
  margin-bottom: 8px;
}

.config-select, .config-input {
  width: 100%;
  padding: 10px 14px;
  background: rgba(12, 8, 5, 0.85);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 13px;
}

.config-select:focus, .config-input:focus {
  outline: none;
  border-color: var(--gold-400);
  box-shadow: 0 0 10px rgba(212, 168, 87, 0.3);
}

.config-slider-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.config-slider {
  flex: 1;
  accent-color: var(--gold-primary);
}

.slider-val-badge {
  font-size: 12px;
  color: var(--gold-200);
  min-width: 40px;
}

.config-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px dashed rgba(212, 168, 87, 0.2);
}

.switch-label-desc {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.15);
  transition: 0.3s;
  border-radius: 24px;
  border: 1px solid var(--border-gold);
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: #fff;
  transition: 0.3s;
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background-color: var(--gold-primary);
}

input:checked + .toggle-slider:before {
  transform: translateX(22px);
  background-color: #1a0f07;
}

.config-modal-footer {
  padding: 16px 24px;
  background: rgba(18, 12, 7, 0.98);
  border-top: 1px solid var(--border-gold);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-actions-left {
  display: flex;
  gap: 8px;
}

.footer-actions-right {
  display: flex;
  gap: 10px;
}

.btn-config-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-config-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.btn-config-save {
  background: linear-gradient(135deg, var(--gold-primary), #a37c30);
  border: 1px solid var(--gold-400);
  color: #1a0f07;
  font-weight: 700;
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 15px rgba(212, 168, 87, 0.4);
  transition: all 0.2s ease;
}

.btn-config-save:hover {
  background: linear-gradient(135deg, #e4b968, #b88d3a);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
}

/* Toast notifications */
.pagoda-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: linear-gradient(135deg, #1f140c, #2b1b10);
  border: 1px solid var(--gold-400);
  color: #fff6da;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 15px var(--gold-glow);
  font-family: var(--font-serif);
  font-size: 14px;
  z-index: 2000;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes toastSlideUp {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Zen Meditation Overlay */
.zen-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 3, 2, 0.94);
  backdrop-filter: blur(15px);
  z-index: 1500;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
}

.zen-overlay.active {
  display: flex;
}

.zen-timer-ring {
  font-family: var(--font-serif);
  font-size: clamp(48px, 10vw, 76px);
  color: var(--gold-300);
  margin-bottom: 18px;
  text-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
}

.zen-breath-guide {
  font-family: var(--font-serif);
  font-size: clamp(18px, 4vw, 24px);
  color: #fff;
  font-style: italic;
  max-width: 600px;
  min-height: 60px;
  transition: opacity 0.5s ease;
}

.btn-exit-zen {
  margin-top: 35px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-gold);
  color: var(--gold-200);
  padding: 10px 24px;
  border-radius: 30px;
  cursor: pointer;
  font-size: 14px;
}


/* ==========================================================================
   MOBILE-FIRST OPTIMIZATIONS (Smartphones, iOS Safari, Android)
   ========================================================================== */
@media (max-width: 768px) {
  /* Hide desktop top tab bar */
  .nav-tabs-bar {
    display: none !important;
  }

  /* Sticky App Header Mobile */
  .pagoda-header {
    padding: 4px 0;
  }

  .header-inner {
    padding: 8px 12px;
    gap: 8px;
  }

  .brand-wrapper {
    gap: 8px;
  }

  .brand-lotus-icon {
    width: 32px;
    height: 32px;
  }

  .brand-text h1 {
    font-size: 16px;
    letter-spacing: 0.5px;
  }

  .brand-tagline {
    display: none !important;
  }

  .header-controls {
    gap: 6px;
  }

  .btn-header {
    padding: 6px 10px;
    font-size: 13px;
    border-radius: 20px;
  }

  .btn-header .hide-mobile {
    display: none !important;
  }

  .btn-header-config {
    padding: 6px 12px;
    font-size: 13px;
  }

  /* App container adjustments for bottom navigation */
  .app-container {
    padding: 10px 10px calc(80px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* Mobile Bottom Navigation Bar */
  .mobile-bottom-nav {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(14, 10, 6, 0.96);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-top: 1px solid rgba(212, 168, 87, 0.35);
    box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.85);
    z-index: 999;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    justify-content: space-around;
    align-items: center;
  }

  .m-nav-item {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #9c8e79;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 4px 1px;
    -webkit-tap-highlight-color: transparent;
  }

  .m-nav-icon {
    font-size: 18px;
    line-height: 1.1;
    margin-bottom: 2px;
    transition: transform 0.2s ease;
  }

  .m-nav-label {
    font-size: 10px;
    font-family: var(--font-sans);
    font-weight: 500;
    letter-spacing: 0.2px;
  }

  .m-nav-item.active {
    color: #ffd700;
  }

  .m-nav-item.active .m-nav-icon {
    transform: scale(1.18);
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.75));
  }

  .m-nav-item.active .m-nav-label {
    font-weight: 700;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
  }

  /* Tab 1: Chánh Điện Mobile */
  .sanctuary-stage {
    min-height: auto;
    padding: 16px 10px 20px;
    border-radius: var(--radius-md);
  }

  .sanctuary-title h2 {
    font-size: 20px !important;
    line-height: 1.25;
  }

  .sanctuary-subtitle {
    font-size: 12px !important;
  }

  .buddha-statue-img {
    max-height: 200px !important;
    border-radius: 14px !important;
  }

  .buddha-halo {
    width: 240px !important;
    height: 240px !important;
    top: 20% !important;
  }

  .verse-banner {
    font-size: 12px;
    padding: 8px 14px;
    margin: 10px auto;
  }

  .rite-progress-box {
    padding: 6px 14px;
    font-size: 11px;
    gap: 8px;
  }

  .sanctuary-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
    margin-top: 10px;
  }

  .btn-rite {
    padding: 10px 12px !important;
    font-size: 13px !important;
    justify-content: center;
    border-radius: 25px !important;
  }

  /* Tab 2: Thắp Hương Mobile */
  .incense-panel {
    padding: 14px;
    border-radius: var(--radius-md);
  }

  .incense-grid {
    gap: 16px;
  }

  .incense-altar-view {
    min-height: 280px !important;
    padding-bottom: 18px;
  }

  .incense-burner-svg {
    width: 125px !important;
  }

  .stick-item {
    height: 140px !important;
  }

  .pill-selector {
    gap: 6px;
  }

  .pill-option {
    min-width: 65px;
    padding: 8px 6px;
    font-size: 12px;
  }

  .pill-option .sub-desc {
    font-size: 10px;
  }

  .khan-textarea {
    font-size: 13px;
    min-height: 70px;
  }

  .incense-steps-btns {
    flex-direction: column;
    gap: 8px;
  }

  .btn-incense-action {
    width: 100%;
    padding: 11px;
    font-size: 14px;
  }

  /* Tab 3: Gõ Mõ Mobile */
  .merit-counter-display {
    padding: 10px 24px;
    margin-bottom: 15px;
  }

  .merit-counter-display .counter-val {
    font-size: 38px;
  }

  .moyu-stage {
    width: 250px !important;
    height: 250px !important;
    margin: 5px 0 15px;
  }

  .auto-knock-bar {
    width: 100%;
    padding: 8px 14px;
    gap: 8px;
  }

  .btn-auto-toggle {
    padding: 7px 14px;
    font-size: 12px;
  }

  .speed-chips {
    gap: 4px;
  }

  .speed-chip {
    padding: 5px 9px;
    font-size: 11px;
  }

  /* Tab 4: Gieo Quẻ Mobile */
  .fortune-section h2 {
    font-size: 20px !important;
  }

  .fortune-tube-wrap {
    width: 110px;
    height: 180px;
    margin: 15px 0 20px;
  }

  .fortune-card-result {
    padding: 18px 16px;
  }

  .fortune-title h3 {
    font-size: 18px;
  }

  .fortune-meaning-quote {
    font-size: 14px;
  }

  .fortune-advice-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  /* Tab 5: Thả Hoa Đăng Mobile */
  .lantern-river-stage {
    height: 380px !important;
    border-radius: var(--radius-md);
  }

  .moon-view {
    width: 50px;
    height: 50px;
    top: 20px;
    right: 25px;
  }

  .lantern-release-bar {
    padding: 12px 14px;
    flex-direction: column;
    gap: 10px;
  }

  .lantern-release-bar input {
    width: 100%;
    min-width: 0;
  }

  .lantern-release-bar button {
    width: 100%;
    justify-content: center;
  }

  /* Tab 6: Tâm Nguyện Mobile */
  .calendar-card, .ledger-card {
    padding: 16px;
  }

  .lunar-day-large {
    font-size: 36px;
  }

  /* Modal Cấu Hình Mobile Drawer/Sheet */
  .modal-backdrop {
    padding: 0;
    align-items: flex-end;
  }

  .config-modal-window {
    max-height: 92vh;
    border-radius: 22px 22px 0 0;
    border-bottom: none;
    border-left: none;
    border-right: none;
  }

  .config-modal-header {
    padding: 14px 18px;
  }

  .config-modal-title h3 {
    font-size: 17px;
  }

  .config-tabs-nav {
    padding: 0 6px;
  }

  .config-tab-item {
    padding: 10px 12px;
    font-size: 12px;
  }

  .config-modal-body {
    padding: 16px;
  }

  .config-form-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .config-modal-footer {
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  }

  .footer-actions-left, .footer-actions-right {
    width: 100%;
  }

  .btn-config-save {
    width: 100%;
    justify-content: center;
    padding: 11px;
    font-size: 14px;
  }

  .btn-config-secondary {
    width: 100%;
    justify-content: center;
  }
}
