/* ==========================================================================
   Sơn Tự — Chùa Online 3D
   Extended Vietnamese Buddhist Rituals Suite Styles (sontu-rituals.css)
   ========================================================================== */

:root {
  --sontu-gold: #f5d061;
  --sontu-gold-bright: #ffe699;
  --sontu-gold-deep: #b88a28;
  --sontu-amber: #d98a3c;
  --sontu-lotus: #f29ca8;
  --sontu-jade: #7ce0c3;
  --sontu-wood: #59290c;
  --sontu-card-bg: rgba(18, 26, 23, 0.92);
  --sontu-glass-border: rgba(245, 208, 97, 0.32);
  --sontu-serif: 'Noto Serif', 'Be Vietnam Pro', Georgia, 'Segoe UI Emoji', 'Noto Color Emoji', serif;
  --sontu-sans: 'Be Vietnam Pro', 'Inter', 'Noto Sans', system-ui, -apple-system, 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
}

body,
button,
input,
select,
textarea,
dialog {
  font-family: var(--sontu-sans);
}

/* ==========================================================================
   1. Weather & Atmosphere Quick Toggle Button in Top Header
   ========================================================================== */
.sontu-weather-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(245, 208, 97, 0.32);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04)), rgba(18, 28, 23, 0.68);
  /* backdrop-filter removed for 60fps WebGL */
  /* backdrop-filter removed for 60fps WebGL */
  color: #f8f2e4;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22), inset 0 1px rgba(255, 255, 255, 0.22);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
  white-space: nowrap;
}

.sontu-weather-btn:hover {
  background: rgba(245, 208, 97, 0.2);
  border-color: rgba(245, 208, 97, 0.55);
}

.sontu-weather-btn:active {
  transform: scale(0.96);
}

.sontu-weather-icon {
  font-size: 15px;
  line-height: 1;
}

.sontu-weather-label {
  letter-spacing: -0.01em;
}

@media (max-width: 760px) {
  .sontu-weather-label {
    display: none;
  }
  .sontu-weather-btn {
    padding: 0 11px;
  }
}

/* ==========================================================================
   2. Extended Ritual Bar (.sontu-ritual-dock) in .game-bottom
   ========================================================================== */
.sontu-ritual-dock {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 8px;
  margin-bottom: 6px;
  border-radius: 999px;
  border: 1px solid var(--sontu-glass-border);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03)), rgba(16, 26, 21, 0.76);
  /* backdrop-filter removed for 60fps WebGL */
  /* backdrop-filter removed for 60fps WebGL */
  box-shadow: 0 10px 28px rgba(4, 12, 9, 0.34), inset 0 1px rgba(255, 255, 255, 0.24);
  pointer-events: auto;
  max-width: calc(100vw - 20px);
}

.is-beading .sontu-ritual-dock {
  display: none !important;
}

.sontu-ritual-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 13px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 560;
  color: #f6f0e2;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 248, 225, 0.14);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  transition: background 0.2s, transform 0.16s, border-color 0.2s, color 0.2s;
  white-space: nowrap;
}

.sontu-ritual-btn:hover {
  background: rgba(245, 208, 97, 0.22);
  border-color: rgba(245, 208, 97, 0.52);
  color: #fff9ea;
}

.sontu-ritual-btn:active {
  transform: scale(0.96);
}

.sontu-ritual-icon {
  font-size: 14px;
  line-height: 1;
}

.sontu-ritual-key {
  font-family: inherit;
  font-size: 10px;
  font-weight: 600;
  opacity: 0.65;
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.28);
  color: var(--sontu-gold);
}

@media (max-width: 680px) {
  .sontu-ritual-dock {
    gap: 4px;
    padding: 4px 6px;
    border-radius: 22px;
  }
  .sontu-ritual-btn {
    height: 32px;
    padding: 0 9px;
    font-size: 11.5px;
  }
  .sontu-ritual-key {
    display: none;
  }
}

/* ==========================================================================
   3. Live 108 Repentance Vows Banner (#sontu-vow-banner)
   ========================================================================== */
.sontu-vow-banner {
  position: fixed;
  z-index: 25;
  top: calc(env(safe-area-inset-top, 0px) + 132px);
  left: 50%;
  transform: translateX(-50%) translateY(-12px);
  width: min(640px, calc(100vw - 28px));
  padding: 14px 22px;
  border-radius: 22px;
  border: 1px solid rgba(245, 208, 97, 0.5);
  background: linear-gradient(155deg, rgba(24, 35, 29, 0.92), rgba(14, 22, 18, 0.96));
  /* backdrop-filter removed for 60fps WebGL */
  /* backdrop-filter removed for 60fps WebGL */
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.44), inset 0 1px rgba(255, 244, 214, 0.25);
  color: #f8f3e6;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s ease;
}

.sontu-vow-banner.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.is-beading .sontu-vow-banner {
  display: none !important;
}

.sontu-vow-counter {
  display: inline-block;
  margin-bottom: 6px;
  padding: 3px 12px;
  border-radius: 999px;
  background: rgba(245, 208, 97, 0.16);
  border: 1px solid rgba(245, 208, 97, 0.38);
  font-size: 12px;
  font-weight: 600;
  color: var(--sontu-gold);
  letter-spacing: 0.02em;
}

.sontu-vow-text {
  margin: 0;
  font-family: var(--sontu-serif);
  font-size: 15px;
  line-height: 1.55;
  color: #fffaf0;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.sontu-vow-sub {
  margin: 6px 0 0;
  font-size: 11.5px;
  color: rgba(235, 228, 208, 0.76);
  font-style: italic;
}

/* ==========================================================================
   4. Sacred Chant Selector Bar inside 3D Prayer Beads View
   ========================================================================== */
.sontu-beads-chant-bar {
  position: absolute;
  z-index: 10;
  top: max(68px, calc(env(safe-area-inset-top, 0px) + 60px));
  left: 50%;
  transform: translateX(-50%);
  width: min(780px, calc(100vw - 24px));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 24px;
  background: rgba(252, 248, 238, 0.84);
  border: 1px solid rgba(155, 127, 66, 0.3);
  /* backdrop-filter removed for 60fps WebGL */
  /* backdrop-filter removed for 60fps WebGL */
  box-shadow: 0 8px 24px rgba(55, 40, 20, 0.12);
  pointer-events: auto;
}

.is-night .sontu-beads-chant-bar {
  background: rgba(20, 29, 35, 0.86);
  border-color: rgba(245, 208, 97, 0.32);
}

.sontu-chant-chip {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #5a4632;
  background: rgba(172, 130, 65, 0.08);
  border: 1px solid rgba(155, 127, 66, 0.22);
  cursor: pointer;
  transition: all 0.2s ease;
}

.is-night .sontu-chant-chip {
  color: #e4dac8;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(245, 208, 97, 0.18);
}

.sontu-chant-chip:hover {
  background: rgba(172, 130, 65, 0.2);
}

.sontu-chant-chip.is-active {
  background: linear-gradient(135deg, #8b6a32, #6f5222);
  color: #fffdf8;
  border-color: rgba(255, 240, 200, 0.55);
  box-shadow: 0 3px 10px rgba(107, 80, 51, 0.3);
}

.is-night .sontu-chant-chip.is-active {
  background: linear-gradient(135deg, #d4a849, #a87f2a);
  color: #161d22;
}

.sontu-bead-float-text {
  position: fixed;
  z-index: 60;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  font-family: var(--sontu-serif);
  font-size: 21px;
  font-weight: 700;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.65), 0 0 20px rgba(245, 208, 97, 0.5);
  white-space: nowrap;
  animation: sontu-float-up 1.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes sontu-float-up {
  0% {
    opacity: 0;
    transform: translate(-50%, 12px) scale(0.92);
  }
  20% {
    opacity: 1;
    transform: translate(-50%, -8px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -72px) scale(1.05);
  }
}

/* ==========================================================================
   5. Great Temple Bell Shockwave & Verse Toast
   ========================================================================== */
.sontu-bell-wave-container {
  position: fixed;
  inset: 0;
  z-index: 55;
  pointer-events: none;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sontu-bell-ring {
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 2.5px solid rgba(245, 208, 97, 0.78);
  box-shadow: 0 0 40px rgba(245, 208, 97, 0.45), inset 0 0 30px rgba(245, 208, 97, 0.3);
  animation: sontu-bell-ripple 3.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.sontu-bell-ring:nth-child(2) {
  animation-delay: 0.35s;
}

.sontu-bell-ring:nth-child(3) {
  animation-delay: 0.7s;
}

@keyframes sontu-bell-ripple {
  0% {
    transform: scale(0.2);
    opacity: 0.95;
  }
  100% {
    transform: scale(15);
    opacity: 0;
  }
}

.sontu-bell-verse-toast {
  position: fixed;
  z-index: 58;
  top: calc(env(safe-area-inset-top, 0px) + 132px);
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  width: min(560px, calc(100vw - 28px));
  padding: 15px 22px;
  border-radius: 22px;
  border: 1px solid rgba(245, 208, 97, 0.55);
  background: linear-gradient(155deg, rgba(28, 25, 18, 0.94), rgba(18, 26, 22, 0.96));
  color: #fdf6e2;
  text-align: center;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.48);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}

.sontu-bell-verse-toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.sontu-bell-verse-title {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--sontu-gold);
  margin-bottom: 5px;
}

.sontu-bell-verse-text {
  margin: 0;
  font-family: var(--sontu-serif);
  font-size: 14.5px;
  line-height: 1.6;
  color: #f8f1df;
}

/* Rain Canvas Overlay */
#sontu-rain-canvas {
  position: fixed;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease;
}

#sontu-rain-canvas.is-active {
  opacity: 1;
}

/* ==========================================================================
   6. Sacred Ritual Modal Dialogs (.sontu-dialog)
   ========================================================================== */
.sontu-dialog {
  width: min(740px, calc(100vw - 24px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 1px solid rgba(245, 208, 97, 0.36);
  border-radius: 26px;
  background: var(--sontu-card-bg);
  color: #f4eee1;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.62), inset 0 1px rgba(255, 245, 215, 0.2);
  overflow: hidden;
}

.sontu-dialog::backdrop {
  background: rgba(6, 14, 11, 0.24);
  /* backdrop-filter removed for 60fps WebGL */
  /* backdrop-filter removed for 60fps WebGL */
}

.sontu-dialog-card {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 34px);
}

.sontu-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px 16px;
  border-bottom: 1px solid rgba(245, 208, 97, 0.18);
  background: linear-gradient(180deg, rgba(245, 208, 97, 0.08), transparent);
}

.sontu-dialog-eyebrow {
  margin: 0 0 4px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--sontu-gold);
}

.sontu-dialog-title {
  margin: 0;
  font-family: var(--sontu-serif);
  font-size: 20px;
  font-weight: 700;
  color: #fffaf0;
}

.sontu-dialog-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #f4eee1;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  flex-shrink: 0;
}

.sontu-dialog-close:hover {
  background: rgba(245, 208, 97, 0.2);
  border-color: rgba(245, 208, 97, 0.5);
}

.sontu-dialog-body {
  padding: 18px 24px 22px;
  overflow-y: auto;
}

/* ==========================================================================
   7. Wooden Fish & Sutra Chanting (#sutra-dialog)
   ========================================================================== */
.sontu-sutra-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.sontu-sutra-tab {
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid rgba(245, 208, 97, 0.24);
  background: rgba(255, 255, 255, 0.05);
  color: #dfd6c3;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sontu-sutra-tab:hover {
  background: rgba(245, 208, 97, 0.15);
  color: #fff;
}

.sontu-sutra-tab.is-active {
  background: linear-gradient(135deg, #c99b3b, #9c721c);
  color: #fffdf7;
  border-color: var(--sontu-gold-bright);
  box-shadow: 0 3px 12px rgba(201, 155, 59, 0.32);
}

.sontu-sutra-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 14px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: rgba(245, 208, 97, 0.09);
  border-left: 3px solid var(--sontu-gold);
  font-size: 12.5px;
  color: #e9e0ce;
}

.sontu-sutra-reader {
  max-height: 210px;
  overflow-y: auto;
  padding: 14px 16px;
  margin-bottom: 16px;
  border-radius: 16px;
  border: 1px solid rgba(245, 208, 97, 0.22);
  background: rgba(10, 16, 14, 0.68);
  scroll-behavior: smooth;
}

.sontu-sutra-line {
  margin: 0 0 6px;
  padding: 8px 12px;
  border-radius: 10px;
  font-family: var(--sontu-serif);
  font-size: 15.5px;
  line-height: 1.65;
  color: rgba(232, 224, 208, 0.62);
  transition: all 0.22s ease;
}

.sontu-sutra-line.is-passed {
  color: rgba(212, 198, 170, 0.42);
}

.sontu-sutra-line.is-active {
  background: linear-gradient(90deg, rgba(245, 208, 97, 0.22), rgba(245, 208, 97, 0.06));
  border-left: 3px solid var(--sontu-gold);
  color: #fff9e6;
  font-weight: 700;
  transform: translateX(4px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.sontu-wooden-fish-stage {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-radius: 18px;
  border: 1px solid rgba(245, 208, 97, 0.24);
  background: rgba(255, 255, 255, 0.04);
}

.sontu-wooden-fish-btn {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 22px;
  border-radius: 20px;
  border: 1.5px solid rgba(245, 208, 97, 0.5);
  background: radial-gradient(circle at 50% 35%, rgba(217, 138, 60, 0.28), rgba(89, 41, 12, 0.45));
  color: var(--sontu-gold-bright);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  overflow: hidden;
}

.sontu-wooden-fish-btn:hover {
  border-color: var(--sontu-gold-bright);
  box-shadow: 0 8px 24px rgba(217, 138, 60, 0.3);
}

.sontu-wooden-fish-btn.is-struck {
  transform: scale(0.92);
  box-shadow: 0 0 32px rgba(245, 208, 97, 0.65);
}

.sontu-wooden-fish-svg {
  width: 76px;
  height: 60px;
}

.sontu-wooden-fish-caption {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.sontu-mo-ripple {
  position: absolute;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--sontu-gold);
  animation: sontu-mo-ring 0.52s ease-out forwards;
  pointer-events: none;
}

@keyframes sontu-mo-ring {
  0% {
    transform: scale(0.5);
    opacity: 0.9;
  }
  100% {
    transform: scale(4.5);
    opacity: 0;
  }
}

.sontu-sutra-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.sontu-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 240, 195, 0.5);
  background: linear-gradient(135deg, #d4a441, #9e711b);
  color: #fffdf8;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, filter 0.2s;
}

.sontu-btn-primary:hover {
  filter: brightness(1.1);
}

.sontu-btn-primary:active {
  transform: scale(0.97);
}

.sontu-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 15px;
  border-radius: 999px;
  border: 1px solid rgba(245, 208, 97, 0.3);
  background: rgba(255, 255, 255, 0.07);
  color: #f2ead9;
  font-size: 13px;
  font-weight: 550;
  cursor: pointer;
  transition: background 0.2s;
}

.sontu-btn-secondary:hover {
  background: rgba(245, 208, 97, 0.18);
}

.sontu-bpm-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: #ded5c3;
}

/* ==========================================================================
   8. Incense, Lotus Lantern & Wishing Wall (#wish-dialog)
   ========================================================================== */
.sontu-wish-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 18px;
}

@media (max-width: 680px) {
  .sontu-wish-grid {
    grid-template-columns: 1fr;
  }
}

.sontu-wish-form {
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(245, 208, 97, 0.2);
  background: rgba(255, 255, 255, 0.03);
}

.sontu-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.sontu-field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--sontu-gold);
}

.sontu-field input,
.sontu-field select,
.sontu-field textarea {
  width: 100%;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid rgba(245, 208, 97, 0.26);
  background: rgba(10, 16, 14, 0.75);
  color: #f8f2e4;
  font-size: 13px;
  box-sizing: border-box;
}

.sontu-field textarea {
  min-height: 76px;
  resize: vertical;
  line-height: 1.5;
}

.sontu-wish-list {
  max-height: 310px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 4px;
}

.sontu-wish-card {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(245, 208, 97, 0.24);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
}

.sontu-wish-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 6px;
}

.sontu-wish-author {
  font-size: 13px;
  font-weight: 700;
  color: var(--sontu-gold-bright);
}

.sontu-wish-loc {
  font-size: 11.5px;
  color: rgba(232, 222, 205, 0.68);
}

.sontu-wish-badge {
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(245, 208, 97, 0.16);
  border: 1px solid rgba(245, 208, 97, 0.32);
  font-size: 11px;
  font-weight: 600;
  color: var(--sontu-gold);
}

.sontu-wish-content {
  margin: 0;
  font-family: var(--sontu-serif);
  font-size: 13.5px;
  line-height: 1.55;
  color: #f6efe0;
}

/* ==========================================================================
   9. Mindful Meditation & Breathing Lotus (#meditation-dialog)
   ========================================================================== */
.sontu-meditation-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.sontu-breath-orb {
  width: 154px;
  height: 154px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(245, 208, 97, 0.34), rgba(124, 224, 195, 0.1) 70%);
  border: 2px solid rgba(245, 208, 97, 0.62);
  box-shadow: 0 0 36px rgba(245, 208, 97, 0.28), inset 0 0 24px rgba(245, 208, 97, 0.22);
  transition: transform 1.2s ease-in-out, box-shadow 1.2s ease-in-out, border-color 0.8s ease;
  margin: 6px 0;
}

.sontu-breath-orb.is-inhale {
  transform: scale(1.18);
  border-color: var(--sontu-gold-bright);
  box-shadow: 0 0 56px rgba(245, 208, 97, 0.58), inset 0 0 32px rgba(245, 208, 97, 0.35);
}

.sontu-breath-orb.is-hold {
  transform: scale(1.18);
  border-color: var(--sontu-jade);
  box-shadow: 0 0 60px rgba(124, 224, 195, 0.5);
}

.sontu-breath-orb.is-exhale {
  transform: scale(0.9);
  border-color: rgba(245, 208, 97, 0.45);
  box-shadow: 0 0 22px rgba(124, 224, 195, 0.25);
}

.sontu-breath-phase {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--sontu-gold-bright);
}

.sontu-breath-timer {
  font-size: 26px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #ffffff;
  margin-top: 4px;
}

.sontu-breath-prompt {
  margin: 0;
  max-width: 520px;
  min-height: 44px;
  font-family: var(--sontu-serif);
  font-size: 15.5px;
  line-height: 1.6;
  color: #f8f1e2;
}

.sontu-duration-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.sontu-duration-pill {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(245, 208, 97, 0.28);
  background: rgba(255, 255, 255, 0.05);
  color: #e4dac7;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.sontu-duration-pill.is-active {
  background: rgba(245, 208, 97, 0.24);
  border-color: var(--sontu-gold);
  color: #fffdf6;
}

/* ==========================================================================
   10. Dharma Oracle (#oracle-dialog)
   ========================================================================== */
.sontu-oracle-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.sontu-oracle-cylinder {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1.5px solid rgba(245, 208, 97, 0.55);
  background: linear-gradient(135deg, rgba(212, 164, 65, 0.26), rgba(122, 84, 24, 0.38));
  color: var(--sontu-gold-bright);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.32);
  transition: transform 0.15s, box-shadow 0.2s;
}

.sontu-oracle-cylinder:hover {
  box-shadow: 0 10px 32px rgba(245, 208, 97, 0.32);
}

.sontu-oracle-cylinder.is-shaking {
  animation: sontu-shake 0.42s ease-in-out infinite;
}

@keyframes sontu-shake {
  0%, 100% { transform: rotate(0deg) translateY(0); }
  25% { transform: rotate(-8deg) translateY(-4px); }
  50% { transform: rotate(8deg) translateY(2px); }
  75% { transform: rotate(-6deg) translateY(-3px); }
}

.sontu-oracle-cylinder-icon {
  font-size: 24px;
}

.sontu-oracle-result {
  text-align: left;
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid rgba(245, 208, 97, 0.42);
  background: linear-gradient(155deg, rgba(32, 44, 38, 0.9), rgba(18, 27, 23, 0.95));
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.sontu-oracle-slip-title {
  margin: 0 0 4px;
  font-family: var(--sontu-serif);
  font-size: 17px;
  font-weight: 700;
  color: var(--sontu-gold-bright);
}

.sontu-oracle-source {
  display: block;
  margin-bottom: 12px;
  font-size: 12px;
  color: rgba(232, 222, 205, 0.72);
}

.sontu-oracle-verse {
  margin: 0 0 14px;
  padding: 14px 18px;
  border-radius: 14px;
  border-left: 3px solid var(--sontu-gold);
  background: rgba(245, 208, 97, 0.1);
  font-family: var(--sontu-serif);
  font-size: 15.5px;
  line-height: 1.7;
  color: #fffaf0;
  white-space: pre-line;
}

.sontu-oracle-commentary,
.sontu-oracle-practice {
  margin: 8px 0 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: #eee6d5;
}

.sontu-oracle-practice {
  padding: 10px 14px;
  margin-top: 10px;
  border-radius: 12px;
  background: rgba(124, 224, 195, 0.1);
  border: 1px solid rgba(124, 224, 195, 0.28);
}


/* =========================================================================
   Highlight Player's Own 3D Floating Name Label & Mobile Touch Optimizations
   ========================================================================= */
.visitor-labels {
  pointer-events: none;
}
.visitor-label {
  font-family: "Be Vietnam Pro", system-ui, -apple-system, sans-serif !important;
  font-weight: 600 !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.38) !important;
}
.visitor-label.is-self {
  pointer-events: auto !important;
  cursor: pointer !important;
  border: 1.5px solid #f5d061 !important;
  background: rgba(24, 28, 22, 0.92) !important;
  color: #fff8e7 !important;
  padding: 5px 11px !important;
  border-radius: 999px !important;
}
.visitor-label.is-self .visitor-label-me {
  background: #f5d061 !important;
  color: #1c1912 !important;
  font-weight: 700 !important;
}
.visitor-label.is-self .visitor-label-name::after {
  content: " ✏️";
  font-size: 11px;
  opacity: 0.85;
}

.sontu-name-btn {
  border-color: rgba(245, 208, 97, 0.55) !important;
  background: rgba(28, 33, 26, 0.92) !important;
}

@media (max-width: 820px), (pointer: coarse) {
  .sontu-ritual-key,
  .game-modes kbd {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .game-header {
    padding: max(8px, env(safe-area-inset-top)) 8px 0 !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
  }
  .game-entry-tools {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 5px !important;
    max-width: 100% !important;
  }
  .sontu-weather-btn {
    height: 34px !important;
    padding: 0 10px !important;
    font-size: 12px !important;
  }
  #sontu-myname-label {
    max-width: 96px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .game-bottom {
    padding-bottom: max(8px, env(safe-area-inset-bottom)) !important;
    gap: 6px !important;
  }
  .sontu-ritual-dock {
    width: calc(100vw - 16px) !important;
    max-width: 480px !important;
    padding: 5px 6px !important;
    gap: 4px !important;
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .sontu-ritual-dock::-webkit-scrollbar {
    display: none;
  }
  .sontu-ritual-btn {
    padding: 7px 10px !important;
    font-size: 12px !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
  }
  .sontu-dialog {
    width: calc(100vw - 14px) !important;
    max-height: 88dvh !important;
  }
  .sontu-dialog-header {
    padding: 14px 16px 10px !important;
  }
  .sontu-dialog-body {
    padding: 14px 16px 18px !important;
  }
  .sontu-vow-banner,
  .sontu-bell-verse-toast {
    top: 86px !important;
    width: calc(100vw - 20px) !important;
    padding: 10px 14px !important;
  }
  .sontu-vow-text {
    font-size: 13.5px !important;
  }
  .sontu-wish-grid {
    grid-template-columns: 1fr !important;
  }
}


/* =========================================================================
   Custom Golden Spiral Logo Styling (.sontu-brand-logo)
   ========================================================================= */
.sontu-brand-logo {
  display: inline-block;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 6px rgba(212, 180, 106, 0.35));
}
.game-brand .sontu-brand-logo {
  width: 24px !important;
  height: 24px !important;
}
.loading-mark .sontu-brand-logo,
.sansa-boot-mark .sontu-brand-logo,
.temple-exit-mark .sontu-brand-logo {
  width: 64px !important;
  height: 64px !important;
  animation: sontu-logo-spin 28s linear infinite;
}
@keyframes sontu-logo-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
