/* Tụng Kinh — core layout, stage, merit panel, incense */
[hidden] { display: none !important; }

.tk-container { max-width: 720px; padding-top: 40px; }
.back-link { display: inline-block; font-size: 0.9rem; color: var(--text-muted); margin-bottom: 24px; transition: color 0.2s ease; }
.back-link:hover { color: var(--accent); }
.tk-hero { margin-bottom: 28px; }
.tk-hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.tk-hero .tagline { font-size: 0.95rem; }

/* ── Stage ────────────────────────────────────────────────────────── */
.tk-stage {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  padding: 32px 24px 36px;
  min-height: 640px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #1a0d05 url('/tools/tung-kinh/bg.webp') center top / cover no-repeat;
  border: 1px solid rgba(200, 140, 20, 0.28);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 200, 80, 0.06);
  user-select: none;
}
.tk-stage-overlay {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.78) 0%,
    rgba(0, 0, 0, 0.32) 35%,
    rgba(0, 0, 0, 0.30) 65%,
    rgba(0, 0, 0, 0.82) 100%
  );
}
.tk-stage-glow {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 55% at 50% 45%, rgba(200, 120, 10, 0.26) 0%, transparent 70%);
  animation: tk-breathe 6s ease-in-out infinite;
}
@keyframes tk-breathe { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }

.tk-stage > *:not(.tk-stage-overlay):not(.tk-stage-glow) {
  position: relative;
  z-index: 2;
}

/* ── Merit panel ──────────────────────────────────────────────────── */
.tk-merit-panel {
  width: 100%;
  max-width: 320px;
  text-align: center;
  padding: 18px 22px 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(30, 12, 0, 0.84) 0%, rgba(55, 22, 0, 0.78) 100%);
  border: 1px solid rgba(200, 140, 20, 0.36);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 200, 80, 0.08);
  backdrop-filter: blur(10px);
}
.tk-merit-label {
  margin: 0;
  font-size: 10px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: rgba(220, 160, 40, 0.85);
}
.tk-merit-count {
  margin: 4px 0 2px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 3rem;
  font-weight: 800;
  color: #f5d68a;
  text-shadow: 0 0 12px rgba(200, 130, 10, 0.6);
  transition: transform 0.12s ease, text-shadow 0.12s ease;
}
.tk-merit-count.is-strike {
  transform: scale(1.1);
  color: #fff5c0;
  text-shadow: 0 0 24px rgba(255, 200, 50, 0.9);
}
.tk-merit-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #f0bf60;
}
.tk-progress { margin-top: 14px; }
.tk-progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: rgba(200, 140, 40, 0.78);
  margin-bottom: 6px;
}
.tk-progress-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(40, 18, 0, 0.7);
  overflow: hidden;
}
.tk-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #c8860a, #f5d68a);
  width: 0%;
  transition: width 0.3s ease;
}
.tk-merit-final {
  margin: 10px 0 0;
  font-size: 0.85rem;
  color: #ffe27a;
}

/* ── Incense ──────────────────────────────────────────────────────── */
.tk-incense-row {
  display: flex;
  gap: 56px;
  margin: 28px 0 8px;
  align-items: flex-end;
}
.tk-incense { display: flex; flex-direction: column; align-items: center; }
.tk-smoke {
  height: 44px;
  width: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  position: relative;
}
.tk-puff {
  position: absolute;
  bottom: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(220, 190, 130, 0.55);
  filter: blur(3px);
  animation: tk-rise 2.4s ease-in-out infinite;
}
@keyframes tk-rise {
  0% { transform: translate(0, 0) scale(0.6); opacity: 0.7; }
  40% { transform: translate(3px, -16px) scale(1); opacity: 0.45; }
  80% { transform: translate(-2px, -36px) scale(1.3); opacity: 0.15; }
  100% { transform: translate(0, -44px) scale(0); opacity: 0; }
}
.tk-stick {
  width: 3px;
  height: 56px;
  background: linear-gradient(to bottom, #c8a060 0%, #6b3a10 60%, #3a1a05 100%);
  border-radius: 2px;
  position: relative;
}
.tk-stick::after {
  content: '';
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: radial-gradient(circle, #ff9922 30%, rgba(255, 100, 0, 0.4) 100%);
  box-shadow: 0 0 6px 2px rgba(255, 140, 20, 0.7);
}

@media (max-width: 480px) {
  .tk-stage { padding: 24px 16px 28px; min-height: 580px; }
  .tk-incense-row { gap: 36px; }
  .tk-merit-count { font-size: 2.4rem; }
}
