@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@300;400;500;600;700&family=Noto+Sans+SC:wght@400;500;700&family=Noto+Serif+SC:wght@400;600;700&display=swap');

:root {
  /* Digital Sanctuary Design Tokens (Light Mode - Daylight Sanctuary & Pure Light) */
  --bg-light: #FFF9F2;
  --bg-soft: #F7F1E9;
  --bg: #FFF9F2;
  --surface: #ffffff;
  --surface-strong: #F7F1E9;
  --ink: #1F2937;
  --muted: #4B5563;
  --line: #E5E7EB;
  --border: #E5E7EB;
  --vermilion: #8c2417;
  --coral: #8d2518;
  --primary: #2E7D6B;
  --gold: #EFBC78;
  --gold-light: #f5d49c;
  --gold-bright: #ffd885;
  --soft-pink: #FAD1D1;
  --sky-blue: #CFE9F7;
  --cream: #FFF9F2;
  --text-dark: #1F2937;
  --text-light: #4B5563;
  --jade: #2E7D6B;
  --jade-light: #e0f2ec;
  --lotus: #a83856;
  --lapis: #26547c;
  --saffron: #a35912;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  --radius: 20px;
  color-scheme: light;

  --bg-deep: #F7F1E9;
  --bg-dark: #eee7dd;
  --bg-card: rgba(255, 255, 255, 0.88);
  --bg-card-strong: #ffffff;
  --text-primary: #1F2937;
  --text-secondary: #4B5563;
  --border-glass: rgba(0, 0, 0, 0.08);
  --border-gold: rgba(239, 188, 120, 0.45);
  --radius-card: 20px;
  --ease-premium: cubic-bezier(0.22, 1, 0.36, 1);
}

body.dark {
  /* Midnight Sanctuary (Deep Teal & Moonlit Waters) */
  --bg: #031e20;
  --surface: #05292b;
  --surface-strong: #073436;
  --ink: #fffaf0;
  --muted: #aaf0d6;
  --line: rgba(255, 255, 255, 0.18);
  --vermilion: #efc978;
  --coral: #f4b8a8;
  --gold: #efc978;
  --gold-light: #ffe7ad;
  --gold-bright: #fff0c7;
  --jade: #70d6b0;
  --jade-light: #aaf0d6;
  --lotus: #f4b8a8;
  --lapis: #70d6b0;
  --saffron: #ffe7ad;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.60);
  color-scheme: dark;

  --bg-deep: #052f31;
  --bg-dark: #07383a;
  --bg-card: rgba(8, 58, 58, 0.60);
  --bg-card-strong: rgba(7, 46, 47, 0.84);
  --text-primary: #fffaf0;
  --text-secondary: rgba(255, 250, 240, 0.76);
  --border-glass: rgba(255, 255, 255, 0.16);
  --border-gold: rgba(239, 201, 120, 0.44);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #FFF9F2 0%, #F7F1E9 45%, #FAF5ED 100%);
  color: var(--ink);
  font-family: Inter, "Noto Sans SC", -apple-system, BlinkMacSystemFont, sans-serif;
  transition: color 300ms ease, background 400ms ease;
}

body.dark {
  background: linear-gradient(180deg, var(--bg-deep), var(--bg));
}

/* Slow ambient washes that drift like light through water. */
body::before {
  content: "";
  position: fixed;
  inset: -22%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 12%, rgba(239, 188, 120, 0.10), transparent 30rem),
    radial-gradient(circle at 84% 6%, rgba(46, 125, 107, 0.08), transparent 26rem),
    radial-gradient(circle at 70% 88%, rgba(250, 209, 209, 0.12), transparent 30rem);
  animation: ambient-drift 52s ease-in-out infinite alternate;
}

body.dark::before {
  background:
    radial-gradient(circle at 18% 12%, rgba(239, 201, 120, 0.12), transparent 30rem),
    radial-gradient(circle at 84% 6%, rgba(112, 214, 176, 0.10), transparent 26rem),
    radial-gradient(circle at 70% 88%, rgba(239, 201, 120, 0.08), transparent 30rem);
}

@keyframes ambient-drift {
  from {
    transform: translate3d(-1.5%, -1%, 0) scale(1);
  }
  to {
    transform: translate3d(1.5%, 2%, 0) scale(1.06);
  }
}

::selection {
  background: rgba(239, 201, 120, 0.35);
  color: #fffaf0;
}

.cinematic-backdrop {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
  background: #FFF9F2;
  transition: background 500ms ease;
}

body.dark .cinematic-backdrop {
  background: var(--bg-deep);
}

.cinematic-backdrop-group {
  position: absolute;
  inset: 0;
  pointer-events: none;
  transition: opacity 650ms cubic-bezier(0.22, 1, 0.36, 1);
}

.cinematic-backdrop-group.light-group {
  opacity: 1;
}

.cinematic-backdrop-group.dark-group {
  opacity: 0;
}

body.dark .cinematic-backdrop-group.light-group {
  opacity: 0;
}

body.dark .cinematic-backdrop-group.dark-group {
  opacity: 1;
}

.cinematic-backdrop-layer {
  position: absolute;
  inset: -20px;
  background-position: center bottom;
  background-repeat: no-repeat;
  background-size: cover;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 650ms cubic-bezier(0.22, 1, 0.36, 1), transform 850ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.cinematic-backdrop-layer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Light mode layer active - vibrant blue sky & clouds clearly visible */
.light-group .cinematic-backdrop-layer.active {
  opacity: 0.72;
  transform: scale(1);
}

.light-group .cinematic-backdrop-layer::before {
  background:
    radial-gradient(ellipse at 50% 10%, rgba(255, 255, 255, 0.25) 0%, transparent 60%),
    radial-gradient(circle at 50% 90%, rgba(255, 249, 242, 0.20) 0%, transparent 70%);
}

/* Dark mode layer active - deep teal & illuminated lotuses clearly visible */
.dark-group .cinematic-backdrop-layer.active {
  opacity: 0.68;
  transform: scale(1);
}

.dark-group .cinematic-backdrop-layer::before {
  background:
    radial-gradient(ellipse at 50% 10%, rgba(239, 201, 120, 0.16) 0%, transparent 60%),
    radial-gradient(circle at 50% 90%, rgba(112, 214, 176, 0.18) 0%, transparent 70%);
}

.brand-lotus-mini {
  width: 20px;
  height: 20px;
  object-fit: contain;
  margin-right: 2px;
  filter: drop-shadow(0 2px 5px rgba(239, 201, 120, 0.5));
}

.global-kindness-card {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 14px 18px;
  margin-top: 14px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

body.dark .global-kindness-card {
  background: rgba(8, 56, 58, 0.72);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid rgba(239, 201, 120, 0.28);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.kindness-metric-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 3px;
  flex: 1;
}

.kindness-metric-num {
  font-family: 'Cormorant Garamond', 'Noto Serif SC', Georgia, serif;
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.02em;
}

.kindness-metric-num.gold-glow {
  color: var(--gold);
  text-shadow: 0 0 16px rgba(239, 201, 120, 0.4);
}

.kindness-metric-label {
  font-size: 0.74rem;
  color: var(--muted);
  font-weight: 500;
}

.kindness-metric-divider {
  width: 1px;
  height: 32px;
  background: var(--line);
  opacity: 0.7;
}

button,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--gold) 76%, white);
  outline-offset: 3px;
}

.app-shell {
  width: min(100%, 460px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px 14px 96px;
  position: relative;
}

.topbar,
.section-heading,
.profile-head,
.top-actions,
.layer-row,
.badge-row,
.donation-options {
  display: flex;
  align-items: center;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 16px;
  margin: -18px -14px 12px;
  background: rgba(255, 255, 255, 0.88);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(16, 42, 46, 0.10);
  box-shadow: 0 4px 20px rgba(18, 50, 56, 0.08);
  transition: background 300ms ease, border-color 300ms ease;
}

body.dark .topbar {
  background: rgba(5, 47, 49, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.app-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, #efc978, #d4af37);
  color: #072a2b;
  font-size: 1.2rem;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(239, 201, 120, 0.35);
}

.brand-word {
  font-family: 'Cormorant Garamond', 'Noto Serif SC', Georgia, serif;
  font-size: 1.32rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.brand-word em {
  font-style: normal;
  color: var(--gold);
  margin-left: 4px;
  font-weight: 600;
}

.top-nav {
  display: none;
  align-items: center;
  gap: 6px;
}

.top-nav-item {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--muted);
  font-family: Inter, "Noto Sans SC", sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 200ms ease;
}

.top-nav-item:hover {
  color: var(--ink);
  background: rgba(239, 201, 120, 0.18);
}

.top-nav-item.active {
  color: #072a2b;
  background: linear-gradient(135deg, #ffe7ad, #efc978);
  box-shadow: 0 0 16px rgba(239, 201, 120, 0.35);
  font-weight: 700;
}

.lang-select {
  min-height: 44px;
  max-width: 120px;
  flex-shrink: 0;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.86rem;
  cursor: pointer;
  transition: border-color 200ms ease, background 200ms ease;
}

body.dark .lang-select {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(8, 56, 58, 0.85);
  color: #fffaf0;
}

.lang-select:hover {
  border-color: rgba(239, 201, 120, 0.5);
}

.profile-menu {
  position: relative;
}

.profile-trigger {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(239, 201, 120, 0.4);
  background: linear-gradient(135deg, rgba(239, 201, 120, 0.25), rgba(112, 214, 176, 0.18));
  color: #ffe7ad;
  font-size: 1.2rem;
  display: grid;
  place-items: center;
  transition: all 200ms ease;
}

.profile-trigger:hover {
  border-color: #efc978;
  box-shadow: 0 0 14px rgba(239, 201, 120, 0.35);
  transform: scale(1.05);
}

.profile-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 260px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(7, 46, 47, 0.95);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(239, 201, 120, 0.35);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55), 0 0 20px rgba(239, 201, 120, 0.15);
  display: grid;
  gap: 12px;
  z-index: 40;
}

.profile-dropdown[hidden] {
  display: none;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar-lg {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--vermilion), var(--gold));
  color: #fffaf1;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.profile-name {
  font-weight: 800;
  font-size: 1rem;
}

.profile-sub {
  color: var(--muted);
  font-family: "Trebuchet MS", Verdana, sans-serif;
  font-size: 0.8rem;
  margin-top: 2px;
}

.menu-link {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-strong);
  color: var(--ink);
  font-family: "Trebuchet MS", Verdana, sans-serif;
  font-weight: 700;
  text-align: center;
}

.menu-note {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

@media (min-width: 800px) {
  .top-nav {
    display: flex;
  }
}

/* Keep the sticky top bar from overflowing narrow screens: the 福 mark
   stands in for the full wordmark and the locale select tightens up. */
@media (max-width: 560px) {
  .brand-word {
    display: none;
  }

  .lang-select {
    max-width: 92px;
    padding: 0 6px;
    font-size: 0.8rem;
  }

  .topbar {
    gap: 8px;
  }

  .top-actions {
    gap: 6px;
  }
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 2rem;
  line-height: 0.9;
  letter-spacing: 0;
}

h2 {
  font-size: clamp(1.5rem, 8vw, 2.35rem);
  line-height: 1.02;
  letter-spacing: 0;
}

h3 {
  font-size: 1.05rem;
  line-height: 1.2;
}

.eyebrow {
  color: var(--vermilion);
  font-family: "Trebuchet MS", Verdana, sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.top-actions {
  gap: 8px;
}

.icon-button,
.text-button,
.nav-item,
.layer,
.blessing button,
.donation-options button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.icon-button {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-weight: 800;
}

.screen {
  display: none;
  padding-inline: 2px;
}

.screen.active {
  display: block;
  animation: screenVividEnter 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes screenVividEnter {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-panel,
.panel,
.deed-focus,
.spot-detail,
.ritual-panel,
.calm-ritual-card,
.blessing-form,
.profile-head,
.pray-card,
.lamp-card,
.incense-card,
.muyu-card,
.wheel-card,
.almanac-panel,
.map-deck-panel {
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  backdrop-filter: blur(24px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 16px 40px rgba(18, 50, 56, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  transition: background 300ms ease, border-color 300ms ease, box-shadow 300ms ease;
}

body.dark .hero-panel,
body.dark .panel,
body.dark .deed-focus,
body.dark .spot-detail,
body.dark .ritual-panel,
body.dark .calm-ritual-card,
body.dark .blessing-form,
body.dark .profile-head,
body.dark .pray-card,
body.dark .lamp-card,
body.dark .incense-card,
body.dark .muyu-card,
body.dark .wheel-card,
body.dark .almanac-panel,
body.dark .map-deck-panel {
  background: rgba(8, 56, 58, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

@media (hover: hover) {
  .panel:hover,
  .hero-panel:hover,
  .pray-card:hover,
  .lamp-card:hover,
  .incense-card:hover,
  .muyu-card:hover,
  .wheel-card:hover,
  .almanac-panel:hover,
  .deed-focus:hover,
  .spot-detail:hover {
    border-color: rgba(239, 201, 120, 0.38);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45), 0 0 24px rgba(239, 201, 120, 0.12);
  }
}

.primary-action {
  background: linear-gradient(135deg, #ffe7ad 0%, #efc978 50%, #d4af37 100%);
  color: #072a2b;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(239, 201, 120, 0.28);
  border-radius: 999px;
  border: 0;
}

.primary-action:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.015);
  box-shadow: 0 12px 30px rgba(239, 201, 120, 0.42);
}

.bottom-nav {
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  backdrop-filter: blur(24px) saturate(140%);
  border: 1px solid rgba(16, 42, 46, 0.12);
  border-bottom: 0;
  box-shadow: 0 -8px 32px rgba(18, 50, 56, 0.10);
  transition: background 300ms ease, border-color 300ms ease;
}

body.dark .bottom-nav {
  background: rgba(5, 47, 49, 0.90);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 0;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.45);
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(239, 201, 120, 0.35), rgba(112, 214, 176, 0.20));
  color: #102a2e;
  border: 1px solid rgba(150, 107, 30, 0.40);
  box-shadow: 0 0 16px rgba(150, 107, 30, 0.20);
  font-weight: 700;
}

body.dark .nav-item.active {
  background: linear-gradient(135deg, rgba(239, 201, 120, 0.22), rgba(112, 214, 176, 0.16));
  color: #ffe7ad;
  border: 1px solid rgba(239, 201, 120, 0.45);
  box-shadow: 0 0 16px rgba(239, 201, 120, 0.25);
}

.mood,
.deed-item,
.layer,
.blessing,
.icon-button,
.nav-item,
.primary-action,
.text-button,
.donation-options button,
.blessing button {
  transition:
    transform 240ms ease,
    box-shadow 240ms ease,
    background-color 240ms ease,
    border-color 240ms ease,
    color 240ms ease;
}

@media (hover: hover) {
  .mood:hover,
  .deed-item:hover,
  .blessing:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(52, 44, 31, 0.14);
  }

  .icon-button:hover,
  .layer:hover,
  .text-button:hover {
    transform: translateY(-1px);
  }

  .primary-action:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(157, 43, 32, 0.28);
  }
}

button:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
}

.hero-panel {
  min-height: 196px;
  padding: 22px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 18px;
  overflow: hidden;
  position: relative;
}

.hero-panel::before {
  content: "";
  position: absolute;
  inset: auto -30px -55px 32%;
  height: 140px;
  background:
    radial-gradient(circle at 70% 80%, rgba(239, 201, 120, 0.18) 0%, transparent 65%),
    radial-gradient(circle at 30% 90%, rgba(112, 214, 176, 0.15) 0%, transparent 70%);
  transform: rotate(-5deg);
  border-radius: 50%;
  pointer-events: none;
}

.hero-copy {
  color: var(--muted);
  max-width: 21rem;
  margin-top: 12px;
  line-height: 1.45;
}

.karma-ring {
  width: 92px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  align-content: center;
  background:
    radial-gradient(circle, var(--surface) 0 54%, transparent 55%),
    conic-gradient(var(--gold) 0 68%, rgba(239, 201, 120, 0.16) 68% 100%);
  box-shadow: 0 0 24px rgba(239, 201, 120, 0.25);
  position: relative;
  z-index: 1;
}

.karma-ring span {
  font-size: 1.55rem;
  font-weight: 800;
  color: #ffe7ad;
}

.karma-ring.glow {
  animation: karma-glow 1100ms ease;
}

@keyframes karma-glow {
  35% {
    transform: scale(1.06);
    filter: drop-shadow(0 0 20px rgba(239, 201, 120, 0.8));
  }
  100% {
    transform: scale(1);
    filter: none;
  }
}

.daily-thought {
  margin-top: 12px;
  max-width: 21rem;
  padding-left: 12px;
  border-left: 3px solid rgba(239, 201, 120, 0.7);
  color: #ffe7ad;
  font-style: italic;
  font-size: 0.95rem;
  line-height: 1.5;
}

.sound-control {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sound-volume-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 4px;
}

.volume-icon {
  font-size: 0.95rem;
  color: var(--gold);
}

.sound-volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 72px;
  height: 6px;
  border-radius: 3px;
  background: var(--line);
  outline: none;
  cursor: pointer;
}

.sound-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gold);
  border: 1.5px solid #fff;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.sound-volume-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gold);
  border: 1.5px solid #fff;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.sound-wave {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 20px;
  opacity: 0.25;
  transition: opacity 400ms ease;
}

.sound-wave i {
  width: 3px;
  height: 8px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--gold), var(--vermilion));
}

.sound-wave i:nth-child(2),
.sound-wave i:nth-child(4) {
  height: 14px;
}

.sound-wave i:nth-child(3) {
  height: 18px;
}

.sound-wave.playing {
  opacity: 1;
}

.sound-wave.playing i {
  animation: sound-bar 1.8s ease-in-out infinite;
}

.sound-wave.playing i:nth-child(2) {
  animation-delay: 220ms;
}

.sound-wave.playing i:nth-child(3) {
  animation-delay: 440ms;
}

.sound-wave.playing i:nth-child(4) {
  animation-delay: 660ms;
}

.sound-wave.playing i:nth-child(5) {
  animation-delay: 880ms;
}

@keyframes sound-bar {
  0%,
  100% {
    transform: scaleY(0.5);
  }
  50% {
    transform: scaleY(1.5);
  }
}

.breath-orb {
  width: 76px;
  aspect-ratio: 1;
  margin: 4px auto;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 250, 241, 0.92), transparent 58%),
    radial-gradient(circle, color-mix(in srgb, var(--vermilion) 62%, transparent), color-mix(in srgb, var(--gold) 30%, transparent));
  box-shadow:
    0 0 36px rgba(157, 43, 32, 0.3),
    0 0 80px rgba(198, 155, 63, 0.18);
  animation: breathe 8s ease-in-out infinite;
}

@keyframes breathe {
  0%,
  100% {
    transform: scale(0.85);
    opacity: 0.82;
  }
  50% {
    transform: scale(1.1);
    opacity: 1;
  }
}

.karma-ring small {
  color: var(--muted);
  font-family: "Trebuchet MS", Verdana, sans-serif;
  font-size: 0.7rem;
}

.panel,
.deed-focus,
.spot-detail,
.ritual-panel,
.calm-ritual-card,
.blessing-form,
.profile-head {
  margin-top: 14px;
  padding: 16px;
}

.section-heading {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.soft-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-family: "Trebuchet MS", Verdana, sans-serif;
  font-size: 0.72rem;
  padding: 6px 10px;
  white-space: nowrap;
}

.mood-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mood {
  min-height: 54px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(10, 70, 72, 0.5);
  color: #fffaf0;
  text-align: left;
  padding: 14px 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 200ms ease;
}

.mood.selected,
.layer.active,
.deed-item.selected {
  border-color: rgba(239, 201, 120, 0.65);
  background: rgba(239, 201, 120, 0.18);
  box-shadow: 0 0 16px rgba(239, 201, 120, 0.25);
  color: #ffe7ad;
}

.deed-focus,
.ritual-panel {
  display: grid;
  gap: 14px;
}

.calm-ritual-card {
  display: grid;
  gap: 12px;
}

textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-strong);
  color: var(--ink);
  padding: 14px;
  line-height: 1.45;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

textarea::placeholder {
  color: var(--muted);
  opacity: 0.85;
}

textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 16px rgba(239, 201, 120, 0.25);
  outline: none;
}

body.dark textarea {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(5, 38, 40, 0.65);
  color: #fffaf0;
}

body.dark textarea::placeholder {
  color: rgba(255, 250, 240, 0.6);
}

.map-stage {
  min-height: 430px;
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(5, 47, 49, 0.78), rgba(7, 56, 58, 0.90)),
    url('../assets/foobow/backgrounds/world-map-bg.png') center/cover no-repeat;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow);
}

.map-stage::before,
.map-stage::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(239, 201, 120, 0.20);
  border-radius: 45% 55% 50% 50%;
  background: rgba(112, 214, 176, 0.08);
}

.map-stage::before {
  width: 230px;
  height: 126px;
  left: -26px;
  top: 142px;
  transform: rotate(-17deg);
}

.map-stage::after {
  width: 260px;
  height: 150px;
  right: -48px;
  bottom: 60px;
  transform: rotate(20deg);
}

.map-copy {
  position: relative;
  z-index: 2;
  padding: 22px;
  max-width: 330px;
}

.map-copy .eyebrow {
  color: #efc978;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.map-copy h2,
.map-copy #map-title {
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.65);
}

.map-copy p {
  color: rgba(255, 255, 255, 0.9);
}

.world-map {
  position: absolute;
  inset: 0;
  z-index: 3;
}

.map-pin {
  position: absolute;
  width: 28px;
  height: 28px;
  border: 3px solid var(--surface);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.26);
}

.map-pin::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: var(--surface);
}

.map-pin.lake {
  background: var(--lapis);
  left: 58%;
  top: 43%;
}

.map-pin.street {
  background: var(--coral);
  left: 25%;
  top: 36%;
}

.map-pin.forest {
  background: var(--saffron);
  left: 41%;
  top: 67%;
}

.map-pin.lantern {
  background: var(--gold);
  left: 72%;
  top: 71%;
}

.map-pin.active {
  outline: 8px solid rgba(255, 250, 241, 0.35);
}

.spot-detail p {
  color: var(--muted);
  line-height: 1.45;
}

.layer-row {
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.soundscape-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.layer {
  border-radius: 999px;
  min-height: 36px;
  padding: 0 12px;
}

.deed-filter-row {
  margin: 0 0 12px;
}

.map-pin.hidden,
.deed-item.hidden {
  display: none !important;
}

.deed-list {
  display: grid;
  gap: 10px;
}

.deed-item {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 14px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 14px 16px;
  background: rgba(8, 56, 58, 0.62);
  color: #fffaf0;
  cursor: pointer;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease, background-color 220ms ease;
}

.deed-item p,
.ritual-panel p,
.profile-head p {
  color: var(--muted);
  line-height: 1.4;
}

.deed-mark {
  width: 36px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: block;
}

.deed-mark.water {
  background: linear-gradient(135deg, var(--lapis), #a9b6dd);
}

.deed-mark.elder {
  background: linear-gradient(135deg, var(--coral), #e8b79c);
}

.deed-mark.blessing {
  background: linear-gradient(135deg, var(--gold), #f1dd9c);
}

.deed-mark.earth {
  background: linear-gradient(135deg, var(--saffron), #e0b36a);
}

.deed-mark.paw { background: linear-gradient(135deg, var(--vermilion), var(--coral)); }
.deed-mark.bird { background: linear-gradient(135deg, var(--gold), var(--saffron)); }
.deed-mark.phone { background: linear-gradient(135deg, var(--lapis), var(--gold)); }
.deed-mark.flower { background: linear-gradient(135deg, var(--lotus), var(--gold)); }
.deed-mark.leaf { background: linear-gradient(135deg, var(--saffron), var(--gold)); }
.deed-mark.meal { background: linear-gradient(135deg, var(--saffron), var(--coral)); }
.deed-mark.hands { background: linear-gradient(135deg, var(--vermilion), var(--gold)); }
.deed-mark.book { background: linear-gradient(135deg, var(--lapis), var(--lotus)); }

.map-pin.reading {
  background: var(--lotus);
  left: 40%;
  top: 22%;
}

/* Project-category groups in the deed catalog */
.deed-group {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
  animation: rise 320ms ease both;
}

.deed-group-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.deed-group-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(239, 201, 120, 0.18);
  border: 1px solid rgba(239, 201, 120, 0.35);
  color: #ffe7ad;
  font-size: 1.1rem;
}

.deed-group-title {
  font-family: 'Cormorant Garamond', 'Noto Serif SC', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fffaf0;
}

.deed-group-count {
  margin-left: auto;
  color: var(--muted);
  font-family: Inter, sans-serif;
  font-size: 0.8rem;
}

@media (hover: hover) {
  .deed-item:hover {
    transform: translateY(-2px);
    border-color: rgba(239, 201, 120, 0.4);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35), 0 0 16px rgba(239, 201, 120, 0.1);
  }
}

.deed-item.selected {
  border-color: #efc978;
  background: rgba(239, 201, 120, 0.15);
  box-shadow: 0 0 18px rgba(239, 201, 120, 0.25);
}

.ritual-panel {
  grid-template-columns: 140px 1fr;
  align-items: center;
}

.ritual-scene {
  min-height: 160px;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #8b9ad0, #3a4a8a);
}

.ripple {
  position: absolute;
  width: 96px;
  aspect-ratio: 1;
  left: 28px;
  top: 35px;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  animation: pulse 2.2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(0.55);
    opacity: 0.85;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

.fish-shape {
  position: absolute;
  width: 38px;
  height: 18px;
  left: 52px;
  top: 72px;
  border-radius: 60% 45% 45% 60%;
  background: #fff7d0;
}

.fish-shape::after {
  content: "";
  position: absolute;
  right: -13px;
  top: 3px;
  border-left: 14px solid #fff7d0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}

.shoreline {
  position: absolute;
  inset: auto -10px -24px;
  height: 62px;
  background: #e6d3a3;
  transform: rotate(-4deg);
}

.ritual-scene.completed .fish-shape {
  animation: release 1200ms cubic-bezier(0.25, 1, 0.5, 1) both;
}

.ritual-scene.completed::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 45% 45%, rgba(246, 211, 122, 0.35), transparent 70%);
  animation: ritualAura 1200ms ease-out forwards;
  pointer-events: none;
}

@keyframes release {
  0% {
    transform: translate(0, 0) scale(1) rotate(0deg);
    opacity: 1;
  }
  30% {
    transform: translate(-15px, -12px) scale(1.1) rotate(-12deg);
  }
  65% {
    transform: translate(-36px, -34px) scale(0.95) rotate(-6deg);
    opacity: 0.85;
  }
  100% {
    transform: translate(-65px, -60px) scale(0.6) rotate(-18deg);
    opacity: 0;
  }
}

@keyframes ritualAura {
  0% {
    opacity: 0;
    transform: scale(0.7);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
  100% {
    opacity: 0;
    transform: scale(1.3);
  }
}

.ritual-dedication {
  margin-top: 8px;
  padding: 8px 12px;
  background: color-mix(in srgb, var(--gold) 12%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--gold) 35%, transparent);
  border-radius: 8px;
  font-family: var(--font-serif);
  font-size: 0.85rem;
  color: var(--vermilion);
  text-align: center;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 400ms ease, transform 400ms ease;
}

.ritual-dedication.active {
  opacity: 1;
  transform: translateY(0);
}

.focus-meter {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--vermilion) 12%, var(--surface));
}

.focus-meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--vermilion), var(--gold));
  transition: width 500ms ease;
}

.guided-steps {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.42;
}

.calm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.calm-actions .primary-action:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.calm-copy,
.safety-note {
  color: var(--muted);
  line-height: 1.45;
}

.safety-note {
  font-size: 0.86rem;
}

@keyframes release {
  0% {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateX(48px) scale(0.72);
    opacity: 0.18;
  }
}

.blessing-form {
  display: grid;
  gap: 10px;
}

.blessing-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.blessing {
  border-left: 4px solid var(--gold);
  background: var(--surface);
  border-radius: 8px;
  padding: 14px;
}

.blessing p {
  line-height: 1.45;
}

.blessing button {
  margin-top: 10px;
  border-radius: 999px;
  min-height: 34px;
  padding: 0 12px;
}

.avatar {
  width: 68px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--vermilion), var(--gold));
  color: white;
  font-size: 2rem;
  font-weight: 900;
}

.profile-head {
  gap: 14px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.stat-grid div {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 10px;
  text-align: center;
}

.stat-grid strong,
.stat-grid span {
  display: block;
}

.stat-grid strong {
  font-size: 1.45rem;
}

.stat-grid span {
  color: var(--muted);
  font-family: "Trebuchet MS", Verdana, sans-serif;
  font-size: 0.75rem;
}

.text-button {
  border-radius: 999px;
  min-height: 34px;
  padding: 0 12px;
}

.text-button.danger {
  color: var(--coral);
}

.badge-row {
  gap: 8px;
  flex-wrap: wrap;
}

.badge-row span {
  border-radius: 999px;
  background: rgba(198, 155, 63, 0.18);
  padding: 8px 10px;
  font-size: 0.85rem;
}

.settings-panel {
  display: grid;
  gap: 12px;
}

.settings-panel label {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--muted);
}

.privacy-actions,
.blessing-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.blessing.reported {
  opacity: 0.7;
  border-left-color: var(--muted);
}

.blessing button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, 460px);
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 3px;
  padding: 6px 4px max(env(safe-area-inset-bottom, 8px), 8px);
  margin: 0;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
  z-index: 100;
}

.nav-item {
  min-width: 0;
  min-height: 52px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 4px 2px;
  cursor: pointer;
  transition: all 180ms ease;
  font-family: "Trebuchet MS", Verdana, sans-serif;
  font-size: clamp(0.64rem, 2.2vw, 0.72rem);
  font-weight: 600;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-item::before {
  font-size: 1.2rem;
  line-height: 1;
  transition: transform 180ms ease;
}

.nav-item[data-target="today"]::before { content: "☀️"; }
.nav-item[data-target="blessings"]::before { content: "🪔"; }
.nav-item[data-target="map"]::before { content: "🗺️"; }
.nav-item[data-target="deeds"]::before { content: "🪷"; }
.nav-item[data-target="community"]::before { content: "👥"; }
.nav-item[data-target="profile"]::before { content: "👤"; }

.nav-item:hover {
  color: var(--ink);
}

.nav-item:active {
  transform: scale(0.92);
}

.nav-item.active {
  background: var(--ink);
  color: var(--surface);
  box-shadow: 0 2px 10px rgba(184, 137, 42, 0.28);
}

.nav-item.active::before {
  transform: scale(1.15);
}

dialog {
  border: 0;
  border-radius: 8px;
  padding: 0;
  width: min(92vw, 380px);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(12, 18, 18, 0.48);
}

.dialog-body {
  padding: 22px;
}

.dialog-body p {
  color: var(--muted);
  line-height: 1.45;
}

.donation-options {
  gap: 10px;
  margin: 18px 0;
}

.donation-options button {
  flex: 1;
  min-height: 46px;
  border-radius: 8px;
  font-weight: 800;
}

@media (min-width: 800px) {
  .app-shell {
    width: min(100%, 1160px);
    min-height: auto;
    padding: 24px 32px 110px;
  }

  .topbar {
    margin: -24px -32px 18px;
    padding: 12px 32px;
  }

  main {
    min-height: 0;
  }

  .bottom-nav {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: min(calc(100% - 48px), 760px);
    border-radius: 24px;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  }

  .zen-mini-player {
    bottom: 84px;
  }

  #screen-today.active {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 20px;
    align-items: start;
  }

  #screen-today .hero-panel,
  #screen-today .global-kindness-card {
    grid-column: 1 / -1;
  }

  #screen-blessings.active {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
  }

  #screen-blessings > .section-heading,
  #screen-blessings > .safety-note {
    grid-column: 1 / -1;
  }

  #screen-map.active {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 20px;
    align-items: start;
  }

  #screen-map .map-stage {
    min-height: 480px;
  }

  #screen-deeds.active {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 20px;
    align-items: start;
  }

  #screen-deeds > .section-heading,
  #screen-deeds > .deed-filter-row {
    grid-column: 1 / -1;
  }

  #screen-deeds .calm-ritual-card {
    grid-column: 1 / -1;
  }

  #screen-community.active {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 20px;
    align-items: start;
  }

  #screen-community > .section-heading {
    grid-column: 1 / -1;
  }

  #screen-profile.active {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
  }

  #screen-profile .profile-head,
  #screen-profile .account-card,
  #screen-profile .stat-grid {
    grid-column: 1 / -1;
  }
}

@media (max-width: 390px) {
  .hero-panel {
    grid-template-columns: 1fr;
  }

  .karma-ring {
    width: 78px;
  }

  .ritual-panel {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }

  .water-click-ripple {
    display: none !important;
  }
}

/* --- Blessings (祈福) --- */
.pray-card,
.lamp-card {
  margin-top: 14px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
}

.pray-copy {
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

.pray-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pray-cat {
  min-height: 40px;
  padding: 0 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 200ms ease, border-color 200ms ease, color 200ms ease;
}

.pray-cat.active {
  background: var(--vermilion);
  border-color: var(--vermilion);
  color: #fffaf1;
}

.pray-input {
  width: 100%;
  min-height: 46px;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--ink);
  font: inherit;
  resize: vertical;
}

.blessing-reply {
  border-radius: 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  background: color-mix(in srgb, var(--gold) 8%, var(--surface));
  padding: 18px;
  display: grid;
  gap: 8px;
  justify-items: center;
  text-align: center;
  animation: reply-rise 500ms ease both;
}

.blessing-reply[hidden] {
  display: none;
}

@keyframes reply-rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.reply-orb {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 30%, rgba(255, 250, 241, 0.95), transparent 60%),
    radial-gradient(circle, color-mix(in srgb, var(--gold) 60%, transparent), transparent);
  display: none;
}

.blessing-reply.loading .reply-orb {
  display: block;
  animation: breathe 3.5s ease-in-out infinite;
}

.reply-text {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.55;
  color: var(--ink);
  font-family: Cambria, "Iowan Old Style", Georgia, serif;
}

.reply-source {
  margin: 0;
  color: var(--muted);
  font-family: "Trebuchet MS", Verdana, sans-serif;
  font-size: 0.76rem;
  letter-spacing: 0.03em;
}

.token-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--gold) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--gold) 35%, transparent);
  color: var(--gold);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}

.blessing-seal-stamp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 6px auto;
  padding: 4px 14px;
  border: 2px solid #8d2518;
  border-radius: 4px;
  color: #8d2518;
  background: color-mix(in srgb, #8d2518 6%, transparent);
  font-family: "Kaiti", "STKaiti", "KaiTi", "Songti SC", "SimSun", Georgia, serif;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-shadow: 0 0 1px rgba(141, 37, 24, 0.25);
  box-shadow: 0 0 0 1px rgba(141, 37, 24, 0.2), inset 0 0 0 1px rgba(141, 37, 24, 0.15);
  transform: rotate(-1.5deg);
  user-select: none;
  animation: seal-stamp 400ms cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

body.dark .blessing-seal-stamp {
  border-color: #f4b8a8;
  color: #f4b8a8;
  background: color-mix(in srgb, #f4b8a8 10%, transparent);
  box-shadow: 0 0 0 1px rgba(244, 184, 168, 0.2), inset 0 0 0 1px rgba(244, 184, 168, 0.15);
}

@keyframes seal-stamp {
  0% {
    opacity: 0;
    transform: scale(1.6) rotate(6deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(-1.5deg);
  }
}

.lamp-stage {
  height: 120px;
  border-radius: 14px;
  background: radial-gradient(circle at 50% 120%, rgba(198, 155, 63, 0.28), rgba(20, 24, 24, 0.9) 70%);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.lamp-flame {
  width: 26px;
  height: 40px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: linear-gradient(180deg, #fff3c4, var(--gold) 60%, var(--coral));
  box-shadow: 0 0 24px rgba(230, 185, 92, 0.7), 0 0 60px rgba(230, 185, 92, 0.4);
  transform-origin: 50% 90%;
  animation: flicker 2.6s ease-in-out infinite;
}

@keyframes flicker {
  0%, 100% { transform: scale(1) rotate(-1deg); opacity: 0.92; }
  50% { transform: scale(1.08) rotate(1.5deg); opacity: 1; }
}

.lamp-stage.lit .lamp-flame {
  animation: flare 900ms ease, flicker 2.6s ease-in-out 900ms infinite;
}

@keyframes flare {
  0% { transform: scale(0.4); opacity: 0.4; }
  55% { transform: scale(1.35); opacity: 1; box-shadow: 0 0 44px rgba(230, 185, 92, 0.9), 0 0 100px rgba(230, 185, 92, 0.6); }
  100% { transform: scale(1); opacity: 0.95; }
}

.lamp-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.lamp-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--ink);
  font-size: 0.92rem;
}

.lamp-dot {
  font-size: 1.1rem;
}

/* A short warm line that answers something the user just did. Text comes
   from the pre-generated content pack (no runtime AI cost). */
.action-whisper {
  position: sticky;
  bottom: 84px;
  z-index: 25;
  margin: 0 auto;
  max-width: 22rem;
  padding: 0 16px;
  text-align: center;
  color: var(--muted);
  font-style: italic;
  font-size: 0.95rem;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 500ms ease, transform 500ms ease;
}

.action-whisper.show {
  opacity: 1;
  transform: translateY(0);
}

/* --- Community feed --- */
.feed-composer {
  margin-top: 14px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
}

.post-kind-row,
.post-tag-row,
.feed-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.feed-filter-row {
  margin: 16px 0 10px;
}

.post-kind,
.post-tag,
.feed-filter {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--ink);
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease;
}

.post-kind.active,
.feed-filter.active {
  background: var(--vermilion);
  border-color: var(--vermilion);
  color: #fffaf1;
}

.post-tag.active {
  background: var(--gold);
  border-color: var(--gold);
  color: #2b1f18;
}

.feed-list {
  display: grid;
  gap: 12px;
}

.feed-post {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  background: var(--surface);
  display: grid;
  gap: 10px;
  animation: rise 320ms ease both;
}

.post-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.post-kind-badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-family: "Trebuchet MS", Verdana, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
}

.post-kind-badge.share {
  background: color-mix(in srgb, var(--vermilion) 14%, transparent);
  color: var(--vermilion);
}

.post-kind-badge.ask {
  background: color-mix(in srgb, var(--gold) 20%, transparent);
  color: var(--gold);
}

.post-tag-badge {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: "Trebuchet MS", Verdana, sans-serif;
  font-size: 0.72rem;
}

.post-when {
  margin-left: auto;
  color: var(--muted);
  font-family: "Trebuchet MS", Verdana, sans-serif;
  font-size: 0.74rem;
}

.post-body {
  margin: 0;
  line-height: 1.5;
  color: var(--ink);
}

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

.post-support,
.post-reply-toggle,
.post-report {
  min-height: 38px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--muted);
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  transition: color 200ms ease, border-color 200ms ease, background-color 200ms ease;
}

.post-support.active {
  color: var(--vermilion);
  border-color: color-mix(in srgb, var(--vermilion) 55%, transparent);
  background: color-mix(in srgb, var(--vermilion) 10%, transparent);
}

.post-report {
  margin-left: auto;
}

.post-reply-list {
  display: grid;
  gap: 8px;
}

.post-reply {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface-strong);
  border-left: 3px solid var(--vermilion);
  color: var(--ink);
  font-size: 0.94rem;
  line-height: 1.45;
  animation: rise 300ms ease both;
}

.post-reply-form {
  display: flex;
  gap: 8px;
}

.post-reply-form[hidden] {
  display: none;
}

.reply-input {
  flex: 1;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--ink);
  font: inherit;
}

.reply-submit {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 10px;
  border: 0;
  background: var(--vermilion);
  color: #fffaf1;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.feed-empty {
  color: var(--muted);
  font-style: italic;
  padding: 18px 4px;
  text-align: center;
}

/* Kindness Card — an app-generated visual share (no user uploads).
   RedNote-style card feel with Foobow's own illustration. */
.kindness-card {
  border-left-color: var(--vermilion);
}

.kindness-card-visual {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 14px;
  background:
    radial-gradient(circle at 82% -10%, var(--gold-soft, rgba(184, 137, 40, 0.16)), transparent 60%),
    linear-gradient(135deg, color-mix(in srgb, var(--vermilion) 12%, var(--surface-strong)), var(--surface-strong));
  border: 1px solid var(--line);
}

.kindness-card-mark {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(70, 45, 25, 0.18);
}

.kindness-card-title {
  margin: 0;
  font-family: Cambria, "Iowan Old Style", Georgia, serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
}

.kindness-card-note {
  margin: 4px 2px 0;
  color: var(--muted);
  line-height: 1.5;
}

#postDeedSelect[hidden],
.post-deed-label[hidden] {
  display: none;
}

.post-deed-label {
  color: var(--muted);
  font-family: "Trebuchet MS", Verdana, sans-serif;
  font-size: 0.82rem;
  margin-bottom: -4px;
}

/* --- Profile: progress + activity --- */
.progress-track {
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: color-mix(in srgb, var(--vermilion) 12%, var(--surface-strong));
  margin-bottom: 14px;
}

.progress-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--vermilion), var(--gold));
  transition: width 700ms ease;
}

.milestone-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.milestone {
  min-width: 42px;
  min-height: 32px;
  display: grid;
  place-items: center;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--muted);
  font-family: "Trebuchet MS", Verdana, sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
}

.milestone.reached {
  background: linear-gradient(135deg, var(--vermilion), var(--gold));
  border-color: transparent;
  color: #fffaf1;
}

.activity-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}

.activity-item {
  display: grid;
  grid-template-columns: 14px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 11px 4px;
  border-bottom: 1px solid var(--line);
}

.activity-item:last-child {
  border-bottom: 0;
}

.activity-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--vermilion), var(--gold));
}

.activity-text {
  color: var(--ink);
}

.activity-when {
  color: var(--muted);
  font-family: "Trebuchet MS", Verdana, sans-serif;
  font-size: 0.78rem;
}

.activity-empty {
  color: var(--muted);
  font-style: italic;
  padding: 14px 4px;
}

/* Senior / high-readability mode boosts size AND contrast. */
body.senior-mode {
  font-size: 1.15rem;
  --ink: #000000;
  --muted: #1c3834;
  --surface: #ffffff;
}

body.dark.senior-mode {
  --ink: #ffffff;
  --muted: #c8f5e5;
  --surface: #07383a;
}

body.senior-mode button,
body.senior-mode .nav-item {
  min-height: 52px;
  font-size: 1rem;
}

/* Six tabs cannot also carry the senior font bump without clipping the
   longest label, so the bar keeps a readable-but-compact size. */
body.senior-mode .nav-item {
  font-size: clamp(0.62rem, 2.2vw, 0.84rem);
  padding-inline: 1px;
  letter-spacing: -0.01em;
}

body.senior-mode h1 {
  font-size: 2.4rem;
}

body.senior-mode h2 {
  font-size: 2.1rem;
}

/* --- Zen Muyu (Electronic Wooden Fish) Card & Animations --- */
.muyu-card {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 18px;
  padding: 20px;
  margin-top: 14px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.muyu-card:hover {
  border-color: rgba(184, 137, 40, 0.4);
  box-shadow: 0 16px 48px rgba(184, 137, 40, 0.15), var(--shadow);
}

.muyu-copy {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
  margin-bottom: 16px;
}

.muyu-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 0 16px;
  position: relative;
}

.muyu-btn {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  position: relative;
  width: 140px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  outline: none;
  transition: transform 0.14s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.muyu-btn:hover {
  transform: scale(1.05);
}

.muyu-btn:active,
.muyu-btn.tapped {
  transform: scale(0.92);
}

.muyu-icon {
  width: 130px;
  height: 110px;
  filter: drop-shadow(0 12px 24px rgba(78, 23, 16, 0.35));
  transition: filter 0.2s ease;
}

.muyu-btn:hover .muyu-icon {
  filter: drop-shadow(0 14px 28px rgba(184, 137, 40, 0.5));
}

.muyu-halo {
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(184, 137, 40, 0.3) 0%, rgba(184, 137, 40, 0) 70%);
  pointer-events: none;
  animation: muyuHaloPulse 3s ease-in-out infinite alternate;
}

@keyframes muyuHaloPulse {
  from { transform: scale(0.92); opacity: 0.5; }
  to { transform: scale(1.22); opacity: 0.95; }
}

.muyu-ripple-track {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
}

.muyu-ripple {
  position: absolute;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  pointer-events: none;
  animation: muyuRippleExpand 0.65s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}

@keyframes muyuRippleExpand {
  0% {
    transform: scale(0.6);
    opacity: 0.9;
  }
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

.muyu-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  gap: 12px;
}

.muyu-hint {
  font-size: 0.82rem;
  color: var(--muted);
  font-style: italic;
}

/* Floating Merit text animation */
.floating-merit {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  font-family: "Iowan Old Style", Georgia, "Songti SC", "SimSun", serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: #b8892a;
  text-shadow: 0 0 12px rgba(230, 185, 92, 0.75), 0 2px 4px rgba(0, 0, 0, 0.25);
  animation: floatingMeritAnim 0.95s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  will-change: transform, opacity;
}

body.dark .floating-merit {
  color: #f0c978;
  text-shadow: 0 0 16px rgba(240, 201, 120, 0.9), 0 2px 8px rgba(0, 0, 0, 0.6);
}

@keyframes floatingMeritAnim {
  0% {
    opacity: 0;
    transform: translate3d(-50%, 0, 0) scale(0.6);
  }
  18% {
    opacity: 1;
    transform: translate3d(-50%, -16px, 0) scale(1.2);
  }
  40% {
    transform: translate3d(-50%, -32px, 0) scale(1.05);
  }
  100% {
    opacity: 0;
    transform: translate3d(-50%, -75px, 0) scale(0.9);
  }
}

/* Golden Halo Shimmer for Karma Ring */
.karma-ring {
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}

.karma-ring:hover {
  transform: scale(1.05);
  box-shadow: 0 0 24px rgba(184, 137, 40, 0.4);
}

.karma-ring:active {
  transform: scale(0.95);
}

/* --- Virtual Incense (电子焚香) --- */
.incense-card {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.incense-card:hover {
  border-color: rgba(184, 137, 40, 0.45);
  box-shadow: 0 12px 36px rgba(184, 137, 40, 0.12), var(--shadow);
}

.incense-copy {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
  margin: 0;
}

.incense-intentions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.incense-stage {
  min-height: 150px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  position: relative;
  padding-bottom: 8px;
  background: radial-gradient(ellipse at 50% 90%, rgba(184, 137, 40, 0.08) 0%, transparent 70%);
  border-radius: var(--radius-md);
}

.incense-censer-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.incense-censer-svg {
  width: 140px;
  height: 70px;
  filter: drop-shadow(0 8px 16px rgba(52, 36, 16, 0.45));
  z-index: 3;
}

/* Incense Sticks inserted into censer */
.incense-sticks {
  position: absolute;
  bottom: 42px;
  display: flex;
  gap: 14px;
  z-index: 2;
}

.incense-stick {
  width: 3.5px;
  height: 52px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform-origin: bottom center;
}

.stick-1 { transform: rotate(-8deg); }
.stick-2 { transform: rotate(0deg); height: 56px; }
.stick-3 { transform: rotate(8deg); }

.stick-shaft {
  width: 100%;
  flex: 1;
  background: linear-gradient(180deg, #944428 0%, #6e2e18 100%);
  border-radius: 1px;
}

.ember {
  width: 5.5px;
  height: 5.5px;
  border-radius: 50%;
  background: #ff5400;
  box-shadow: 0 0 6px #ff5400, 0 0 12px #ff9e00;
  opacity: 0.4;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.incense-stage.burning .ember {
  opacity: 1;
  animation: emberGlowPulse 1.8s ease-in-out infinite alternate;
}

@keyframes emberGlowPulse {
  0% { transform: scale(0.9); box-shadow: 0 0 5px #ff5400, 0 0 10px #ff9e00; }
  100% { transform: scale(1.35); box-shadow: 0 0 10px #ff3800, 0 0 20px #ffaa00; }
}

/* Ascending smoke curls */
.incense-smoke-layer {
  position: absolute;
  bottom: 84px;
  width: 120px;
  height: 100px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s ease;
  z-index: 1;
}

.incense-stage.burning .incense-smoke-layer {
  opacity: 1;
}

.smoke-ribbon {
  position: absolute;
  bottom: 0;
  width: 28px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(220, 215, 205, 0.45) 0%, rgba(220, 215, 205, 0) 75%);
  filter: blur(4px);
  will-change: transform, opacity;
}

.smoke-left {
  left: 20px;
  animation: smokeRiseLeft 3.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.smoke-mid {
  left: 46px;
  animation: smokeRiseMid 4.2s cubic-bezier(0.35, 0, 0.25, 1) 0.8s infinite;
}

.smoke-right {
  right: 20px;
  animation: smokeRiseRight 3.8s cubic-bezier(0.4, 0, 0.2, 1) 1.5s infinite;
}

@keyframes smokeRiseLeft {
  0% {
    transform: translateY(10px) translateX(0) scaleX(0.4) scaleY(0.5);
    opacity: 0;
  }
  25% {
    opacity: 0.65;
  }
  50% {
    transform: translateY(-40px) translateX(-14px) scaleX(1.1) scaleY(1);
    opacity: 0.5;
  }
  100% {
    transform: translateY(-90px) translateX(12px) scaleX(1.8) scaleY(1.4);
    opacity: 0;
  }
}

@keyframes smokeRiseMid {
  0% {
    transform: translateY(10px) translateX(0) scaleX(0.5) scaleY(0.6);
    opacity: 0;
  }
  30% {
    opacity: 0.7;
  }
  60% {
    transform: translateY(-45px) translateX(10px) scaleX(1) scaleY(1.1);
    opacity: 0.45;
  }
  100% {
    transform: translateY(-95px) translateX(-10px) scaleX(1.9) scaleY(1.5);
    opacity: 0;
  }
}

@keyframes smokeRiseRight {
  0% {
    transform: translateY(10px) translateX(0) scaleX(0.4) scaleY(0.5);
    opacity: 0;
  }
  25% {
    opacity: 0.6;
  }
  55% {
    transform: translateY(-42px) translateX(16px) scaleX(1.2) scaleY(1);
    opacity: 0.4;
  }
  100% {
    transform: translateY(-88px) translateX(-8px) scaleX(1.7) scaleY(1.3);
    opacity: 0;
  }
}

.incense-status-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--gold);
  font-style: italic;
  padding: 6px 12px;
  background: var(--gold-glow);
  border-radius: var(--radius-sm);
}

.incense-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
  animation: pulseDot 1.5s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(0.85); opacity: 0.6; }
  50% { transform: scale(1.2); opacity: 1; }
}

/* --- Striker Mallet (木鱼槌) --- */
.muyu-mallet {
  position: absolute;
  top: 10px;
  right: calc(50% - 95px);
  width: 58px;
  height: 68px;
  pointer-events: none;
  transform-origin: 48px 62px;
  transform: rotate(0deg);
  transition: transform 0.15s ease-out;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.28));
  z-index: 4;
}

.muyu-mallet svg {
  width: 100%;
  height: 100%;
}

.muyu-mallet.striking {
  animation: malletStrike 0.24s cubic-bezier(0.25, 1.2, 0.5, 1);
}

@keyframes malletStrike {
  0% { transform: rotate(0deg); }
  30% { transform: rotate(-34deg) translate(-10px, 8px); }
  65% { transform: rotate(8deg) translate(3px, -2px); }
  100% { transform: rotate(0deg); }
}

/* --- Zen Lotus Pond (荷塘游鲤) --- */
.ritual-scene.pond-scene {
  background: radial-gradient(circle at 45% 40%, #1e4d58 0%, #0d2830 65%, #07171d 100%);
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1.5px solid rgba(246, 211, 122, 0.35);
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.5), 0 10px 30px rgba(13, 40, 48, 0.35);
}

.pond-water-shimmer {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 35% 30%, rgba(79, 172, 194, 0.18) 0%, transparent 60%);
  animation: pondShimmer 6s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes pondShimmer {
  0% { opacity: 0.4; transform: scale(1); }
  100% { opacity: 0.85; transform: scale(1.15) translate(4px, 4px); }
}

.pond-ripple-ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid rgba(246, 211, 122, 0.22);
  pointer-events: none;
}

.pond-ripple-ring.ring-1 {
  width: 90px;
  height: 90px;
  top: 25%;
  left: 20%;
  animation: rippleSpread 5s ease-out infinite;
}

.pond-ripple-ring.ring-2 {
  width: 120px;
  height: 120px;
  top: 35%;
  left: 45%;
  animation: rippleSpread 6.5s ease-out 2.5s infinite;
}

@keyframes rippleSpread {
  0% { transform: scale(0.3); opacity: 0.7; }
  100% { transform: scale(1.8); opacity: 0; }
}

/* Floating Lily Pad & Lotus */
.pond-lilypad {
  position: absolute;
  border-radius: 50%;
  background: #1b5e3b;
  border: 1px solid rgba(80, 200, 120, 0.3);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
  animation: lotusFloat 7s ease-in-out infinite alternate;
}

.pond-lilypad::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -2px;
  width: 0;
  height: 0;
  border-right: 10px solid #144432;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}

.pad-1 {
  width: 44px;
  height: 38px;
  top: 18px;
  left: 24px;
  animation-delay: 0s;
}

.pad-2 {
  width: 32px;
  height: 28px;
  bottom: 24px;
  right: 48px;
  animation-delay: 1.5s;
}

.pond-lotus {
  position: absolute;
  top: 10px;
  left: 48px;
  width: 48px;
  height: 40px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
  animation: lotusFloat 6s ease-in-out infinite alternate;
  animation-delay: 0.8s;
  z-index: 2;
}

.pond-lotus svg {
  width: 100%;
  height: 100%;
}

@keyframes lotusFloat {
  0% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-4px) rotate(2deg); }
  100% { transform: translateY(3px) rotate(-1.5deg); }
}

/* Swimming Koi Fish Track */
.swimming-koi-track {
  position: absolute;
  width: 70px;
  height: 34px;
  pointer-events: none;
  z-index: 3;
}

.koi-main {
  top: 42%;
  left: 45%;
  animation: koiOrbit 14s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

.koi-body-wrap {
  width: 100%;
  height: 100%;
}

.koi-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.45));
}

.koi-tail {
  transform-origin: 12px 17px;
  animation: koiTailWiggle 0.5s ease-in-out infinite alternate;
}

.koi-fin-top {
  transform-origin: 36px 10px;
  animation: koiFinFlapTop 0.8s ease-in-out infinite alternate;
}

.koi-fin-bot {
  transform-origin: 36px 24px;
  animation: koiFinFlapBot 0.8s ease-in-out infinite alternate;
}

@keyframes koiTailWiggle {
  from { transform: rotate(-14deg); }
  to { transform: rotate(14deg); }
}

@keyframes koiFinFlapTop {
  from { transform: rotate(-10deg); }
  to { transform: rotate(12deg); }
}

@keyframes koiFinFlapBot {
  from { transform: rotate(10deg); }
  to { transform: rotate(-12deg); }
}

@keyframes koiOrbit {
  0% {
    transform: translate(-30px, -15px) rotate(20deg);
  }
  25% {
    transform: translate(35px, -20px) rotate(85deg);
  }
  50% {
    transform: translate(45px, 20px) rotate(190deg);
  }
  75% {
    transform: translate(-25px, 25px) rotate(260deg);
  }
  100% {
    transform: translate(-30px, -15px) rotate(380deg);
  }
}

/* Released Golden Koi - swoops in gracefully on perform ritual */
.koi-released {
  top: 50%;
  left: 50%;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.4) rotate(-30deg);
}

.ritual-scene.completed .koi-released {
  animation: koiReleaseSwoop 3.5s cubic-bezier(0.2, 0.8, 0.25, 1) forwards;
}

@keyframes koiReleaseSwoop {
  0% {
    opacity: 0;
    transform: translate(20px, 30px) scale(0.3) rotate(-50deg);
  }
  20% {
    opacity: 1;
    transform: translate(-10px, 0px) scale(1.15) rotate(-15deg);
    filter: drop-shadow(0 0 16px rgba(246, 211, 122, 0.9));
  }
  50% {
    opacity: 0.95;
    transform: translate(-55px, -35px) scale(1) rotate(-40deg);
  }
  80% {
    opacity: 0.8;
    transform: translate(-90px, -60px) scale(0.85) rotate(-55deg);
  }
  100% {
    opacity: 0;
    transform: translate(-120px, -85px) scale(0.6) rotate(-70deg);
  }
}

/* --- Zen Prayer Wheel (菩提转经轮) --- */
.wheel-card {
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--card-border);
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  padding: 20px;
  margin-top: 14px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.wheel-card:hover {
  border-color: rgba(184, 137, 40, 0.4);
  box-shadow: 0 16px 48px rgba(184, 137, 40, 0.15), var(--shadow);
}

.wheel-copy {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
  margin-bottom: 12px;
}

.wheel-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 0 10px;
  position: relative;
  background: radial-gradient(circle at 50% 45%, rgba(184, 137, 40, 0.1) 0%, transparent 65%);
  border-radius: var(--radius-md);
  user-select: none;
  touch-action: pan-y;
}

.wheel-halo {
  position: absolute;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(246, 211, 122, 0.28) 0%, rgba(184, 137, 40, 0) 70%);
  pointer-events: none;
  animation: wheelHaloBreathe 4s ease-in-out infinite alternate;
}

@keyframes wheelHaloBreathe {
  0% { transform: scale(0.9); opacity: 0.45; }
  100% { transform: scale(1.18); opacity: 0.85; }
}

.wheel-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
}

.wheel-container:active {
  cursor: grabbing;
}

.wheel-drum {
  width: 160px;
  height: 210px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
  transition: transform 0.05s linear;
}

.wheel-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 10px 22px rgba(60, 20, 10, 0.4));
  transition: filter 0.2s ease;
}

.wheel-drum:hover .wheel-svg {
  filter: drop-shadow(0 12px 28px rgba(184, 137, 40, 0.55));
}

/* Swinging weighted pendulum */
.wheel-pendulum {
  position: absolute;
  top: 92px;
  left: 102px;
  width: 50px;
  height: 40px;
  pointer-events: none;
  transform-origin: 0 0;
  transform: rotate(0deg);
  transition: transform 0.12s ease-out;
  z-index: 5;
}

.pendulum-cord {
  width: 2px;
  height: 28px;
  background: linear-gradient(180deg, #d4af37, #8b6834);
  transform-origin: top center;
  transform: rotate(25deg);
  position: absolute;
  top: 0;
  left: 0;
}

.pendulum-bead {
  position: absolute;
  top: 22px;
  left: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffd97d, #b8892a 60%, #5a3808 100%);
  border: 1px solid #ffe8a3;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
}

.wheel-mantra-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  margin: 10px auto 4px;
  max-width: 280px;
  background: var(--gold-glow);
  border: 1px solid rgba(184, 137, 40, 0.25);
  border-radius: 999px;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--vermilion);
  letter-spacing: 0.15em;
}

.mantra-char {
  color: var(--vermilion);
  transition: transform 0.2s ease;
}

.mantra-dot {
  color: var(--gold);
  font-size: 0.9rem;
}

.wheel-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.wheel-hint {
  font-size: 0.82rem;
  color: var(--muted);
  font-style: italic;
}

/* Reduced motion handling */
@media (prefers-reduced-motion: reduce) {
  .muyu-halo,
  .muyu-ripple,
  .floating-merit,
  .smoke-ribbon,
  .smoke-left,
  .smoke-mid,
  .smoke-right,
  .ember,
  .muyu-mallet.striking,
  .pond-water-shimmer,
  .pond-ripple-ring,
  .pond-lilypad,
  .pond-lotus,
  .koi-main,
  .koi-tail,
  .koi-fin-top,
  .koi-fin-bot,
  .ritual-scene.completed .koi-released,
  .wheel-halo,
  .wheel-pendulum {
    animation: none !important;
    transition: none !important;
  }
  .floating-merit {
    display: none;
  }
}

/* --- Zen Dialogs & Modal Overlays --- */
.zen-dialog {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 16px;
  max-width: 480px;
  width: 92vw;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.28);
  padding: 0;
  overflow: hidden;
}

.zen-dialog::backdrop {
  background: rgba(18, 17, 15, 0.65);
  backdrop-filter: blur(4px);
}

.dialog-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 4px;
}

.icon-close-btn {
  border: none;
  background: transparent;
  font-size: 1.25rem;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.15s ease;
}

.icon-close-btn:hover {
  color: var(--ink);
}

.ethical-badge-callout {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: rgba(198, 155, 63, 0.12);
  border: 1px solid var(--gold);
  border-radius: 10px;
  padding: 12px;
  margin: 4px 0;
  font-size: 0.88rem;
  line-height: 1.4;
}

.ethical-seal {
  font-size: 1.5rem;
  line-height: 1;
}

.donation-options {
  display: flex;
  gap: 10px;
  margin: 8px 0;
}

.donation-tier {
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: var(--surface-strong);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.2s ease;
}

.donation-tier:hover {
  border-color: var(--gold);
}

.donation-tier.active {
  border-color: var(--gold);
  background: rgba(198, 155, 63, 0.18);
  color: var(--gold);
}

.payment-methods-block {
  margin: 4px 0;
}

.payment-method-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

.pay-method-chip {
  text-align: left;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.15s ease;
}

.pay-method-chip:hover {
  border-color: var(--jade);
}

.pay-method-chip.active {
  border-color: var(--jade);
  background: rgba(56, 128, 102, 0.12);
  font-weight: 600;
}

.dialog-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--ink);
  font-size: 0.9rem;
  margin-top: 4px;
}

.donation-receipt-card {
  border: 1.5px solid var(--gold);
  background: rgba(198, 155, 63, 0.08);
  border-radius: 12px;
  padding: 16px;
  margin: 8px 0;
  text-align: center;
}

.receipt-seal {
  font-size: 2rem;
  margin-bottom: 4px;
}

.receipt-id {
  font-family: monospace;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gold);
  margin: 4px 0;
}

.receipt-details,
.receipt-dedication,
.receipt-note {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 4px 0;
  line-height: 1.4;
}

/* --- OpenStreetMap Sanctuary View --- */
.live-map-dialog {
  max-width: 520px;
}

.live-map-viewport {
  position: relative;
  width: 100%;
  height: 250px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #f4efe6;
}

.live-map-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 100%;
  height: 100%;
  filter: sepia(0.35) hue-rotate(15deg) contrast(0.92) brightness(0.98);
}

.osm-tile {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.live-map-center-marker {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 3;
}

.live-map-pulse-aura {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: rgba(198, 155, 63, 0.25);
  animation: sanctuaryPulse 2.2s infinite ease-out;
}

@keyframes sanctuaryPulse {
  0% {
    transform: scale(0.6);
    opacity: 1;
  }
  100% {
    transform: scale(1.9);
    opacity: 0;
  }
}

.live-map-lotus-pin {
  font-size: 1.7rem;
  z-index: 4;
}

.live-map-controls {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 5;
}

.map-ctrl-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.live-map-osm-attribution {
  position: absolute;
  bottom: 4px;
  right: 6px;
  font-size: 9px;
  background: rgba(255, 255, 255, 0.88);
  padding: 2px 6px;
  border-radius: 4px;
  color: #555;
  z-index: 5;
}

.live-map-osm-attribution a {
  color: #333;
  text-decoration: underline;
}

.live-map-meta {
  margin: 6px 0;
}

.live-map-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.coord-pill {
  font-family: monospace;
  font-size: 0.8rem;
  background: var(--surface-strong);
  padding: 3px 8px;
  border-radius: 12px;
  border: 1px solid var(--line);
  color: var(--muted);
}

.live-map-desc {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.4;
}

.dialog-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 6px;
}

/* ==========================================================================
   Ambient Zen Floating Embers (putiyuan.pages.dev inspiration)
   ========================================================================== */
.zen-ambient-embers {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.zen-ember {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, #f6d37a, #b8892a 60%, transparent 100%);
  box-shadow: 0 0 10px rgba(246, 211, 122, 0.7);
  opacity: 0;
  animation: emberGlowRise 7s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes emberGlowRise {
  0% {
    transform: translateY(105vh) scale(0.6);
    opacity: 0;
  }
  20% {
    opacity: 0.7;
  }
  80% {
    opacity: 0.5;
  }
  100% {
    transform: translateY(-10vh) scale(1.3);
    opacity: 0;
  }
}

/* ==========================================================================
   Daily Zen Almanac (今日黄历 · 禅意日课)
   ========================================================================== */
.almanac-panel {
  background: color-mix(in srgb, var(--surface) 95%, transparent);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.almanac-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0 8px;
}

.almanac-col {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
}

.almanac-badge {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.suitable-badge {
  background: linear-gradient(135deg, var(--gold), #8a6519);
}

.avoid-badge {
  background: linear-gradient(135deg, var(--vermilion), #7a1f14);
}

.almanac-items {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.almanac-tag {
  font-size: 0.78rem;
  color: var(--ink);
  font-weight: 600;
}

.almanac-verse {
  font-size: 0.82rem;
  color: var(--gold);
  font-style: italic;
  text-align: center;
  margin: 8px 0 0;
  line-height: 1.4;
}

/* ==========================================================================
   Interactive In-Map Deed Execution & Sanctuary Animations
   ========================================================================== */
.spot-sanctuary-line {
  color: var(--gold);
  font-weight: 700;
  font-size: 0.9rem;
  margin: 4px 0 2px;
}

.spot-coord-line {
  color: var(--muted);
  font-size: 0.78rem;
  margin: 2px 0 6px;
}

/* Enhanced Map Pin with Pulse and Category Symbol */
.map-pin {
  position: absolute;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 200ms ease;
  z-index: 10;
  padding: 0;
}

.map-pin:hover {
  transform: scale(1.18);
  box-shadow: 0 6px 24px rgba(184, 137, 42, 0.6);
}

.map-pin.active {
  border-color: #fff;
  background: var(--ink);
  color: var(--gold);
  box-shadow: 0 0 20px var(--gold), 0 0 40px rgba(184, 137, 42, 0.6);
  transform: scale(1.22);
  z-index: 20;
}

.pin-symbol {
  font-size: 1.15rem;
  line-height: 1;
}

.pin-pulse {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  opacity: 0;
  pointer-events: none;
  animation: pinPulseRing 2.4s cubic-bezier(0.2, 0.8, 0.4, 1) infinite;
}

@keyframes pinPulseRing {
  0% { transform: scale(0.7); opacity: 0.85; }
  100% { transform: scale(2); opacity: 0; }
}

.pin-name-badge {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--ink);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  padding: 1px 6px;
  border-radius: 6px;
  border: 1px solid var(--line);
  pointer-events: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Map Animated Overlay */
.map-anim-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 25;
}

/* Swimming Koi on Map */
.map-koi-sprite {
  position: absolute;
  width: 56px;
  height: 56px;
  pointer-events: none;
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.45));
  animation: mapKoiSwimTrajectory 3.4s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes mapKoiSwimTrajectory {
  0% { transform: translate(0, 0) scale(0.6) rotate(-25deg); opacity: 0; }
  15% { opacity: 1; transform: translate(16px, -12px) scale(1) rotate(10deg); }
  50% { transform: translate(65px, -38px) scale(1.15) rotate(-15deg); }
  85% { opacity: 1; transform: translate(115px, -22px) scale(0.95) rotate(20deg); }
  100% { transform: translate(150px, -10px) scale(0.4) rotate(15deg); opacity: 0; }
}

/* Map Water Concentric Ripples */
.map-water-ripple {
  position: absolute;
  border-radius: 50%;
  border: 2px solid var(--gold);
  pointer-events: none;
  animation: mapWaterRippleExpand 2.2s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}

@keyframes mapWaterRippleExpand {
  0% { width: 10px; height: 10px; opacity: 1; transform: translate(-50%, -50%) scale(0.5); }
  100% { width: 220px; height: 220px; opacity: 0; transform: translate(-50%, -50%) scale(1.6); }
}

/* Rising Lotus Lantern on Map */
.map-lantern-sprite {
  position: absolute;
  width: 48px;
  height: 52px;
  pointer-events: none;
  filter: drop-shadow(0 0 16px rgba(255, 200, 80, 0.85));
  animation: mapLanternRiseFloat 3.6s ease-out forwards;
}

@keyframes mapLanternRiseFloat {
  0% { transform: translate(-50%, -50%) scale(0.6); opacity: 0; }
  15% { opacity: 1; transform: translate(-50%, -60px) scale(1); }
  70% { opacity: 0.95; transform: translate(calc(-50% + 14px), -180px) scale(0.95); }
  100% { transform: translate(calc(-50% + 24px), -280px) scale(0.5); opacity: 0; }
}

/* Flying Birds on Map */
.map-bird-sprite {
  position: absolute;
  width: 40px;
  height: 40px;
  pointer-events: none;
  animation: mapBirdFlight 3.2s ease-out forwards;
}

@keyframes mapBirdFlight {
  0% { transform: translate(-50%, -50%) scale(0.4); opacity: 0; }
  20% { opacity: 1; transform: translate(25px, -45px) scale(1); }
  80% { opacity: 0.85; transform: translate(130px, -150px) scale(0.85); }
  100% { transform: translate(190px, -220px) scale(0.3); opacity: 0; }
}

/* Sprouting Tree / Grove on Map */
.map-tree-sprite {
  position: absolute;
  width: 48px;
  height: 48px;
  pointer-events: none;
  animation: mapTreeSprout 3s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
}

@keyframes mapTreeSprout {
  0% { transform: translate(-50%, -50%) scale(0.2); opacity: 0; }
  25% { opacity: 1; transform: translate(-50%, -50%) scale(1.25); }
  75% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
}

/* Floating Merit Calligraphy Banner */
.map-merit-toast {
  position: absolute;
  transform: translate(-50%, -100%);
  white-space: nowrap;
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--gold), var(--vermilion));
  padding: 5px 14px;
  border-radius: 999px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  animation: mapMeritFloatRise 2.6s cubic-bezier(0.2, 0.9, 0.3, 1) forwards;
  z-index: 35;
}

@keyframes mapMeritFloatRise {
  0% { transform: translate(-50%, 0) scale(0.8); opacity: 0; }
  15% { transform: translate(-50%, -28px) scale(1.06); opacity: 1; }
  75% { transform: translate(-50%, -56px) scale(1); opacity: 0.95; }
  100% { transform: translate(-50%, -84px) scale(0.88); opacity: 0; }
}

/* Ripple Counter Bounce */
.ripple-bounce {
  animation: rippleCounterBounce 0.4s ease;
}

@keyframes rippleCounterBounce {
  0% { transform: scale(1); }
  50% { transform: scale(1.25); background: var(--goldGlow); color: var(--gold); }
  100% { transform: scale(1); }
}

/* In-Map Deed Action Deck */
.map-deck-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  margin-top: 14px;
  box-shadow: var(--shadow);
}

.deck-action-title {
  font-size: 0.88rem;
  color: var(--gold);
  margin: 12px 0 8px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.deed-deck-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 8px 0 12px;
}

.deck-deed-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 10px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--surface-strong);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: all 180ms ease;
}

.deck-deed-btn:hover {
  border-color: var(--gold);
  background: color-mix(in srgb, var(--gold) 8%, var(--surface-strong));
  transform: translateY(-1px);
}

.deck-deed-btn:active {
  transform: scale(0.96);
}

.deck-deed-btn.active {
  border-color: var(--gold);
  background: color-mix(in srgb, var(--gold) 15%, var(--surface-strong));
  box-shadow: 0 0 12px rgba(184, 137, 42, 0.25);
}

.deck-btn-icon {
  font-size: 1.3rem;
  line-height: 1;
  flex-shrink: 0;
}

.deck-btn-text strong {
  display: block;
  font-size: 0.78rem;
  color: var(--ink);
  line-height: 1.25;
}

.deck-btn-text small {
  display: block;
  font-size: 0.68rem;
  color: var(--muted);
  line-height: 1.2;
  margin-top: 2px;
}

.map-perform-btn {
  width: 100%;
  min-height: 48px;
  font-size: 0.92rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--gold), #966b1e);
  color: #fff;
  border: 0;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(184, 137, 42, 0.35);
  cursor: pointer;
  transition: all 180ms ease;
}

.map-perform-btn:hover {
  box-shadow: 0 6px 20px rgba(184, 137, 42, 0.5);
  transform: translateY(-1px);
}

.map-perform-btn:active {
  transform: scale(0.97);
}

/* ==========================================================================
   Zen Temple Atmosphere & Sanskrit Chants ("梵音") Audio Player
   ========================================================================== */

/* Mountain Ink Wash Silhouette Backdrop */
.zen-mountain-backdrop {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 380px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.16;
  color: #4a3828;
  transition: opacity 0.3s ease;
}

body.dark .zen-mountain-backdrop {
  opacity: 0.22;
  color: #c9a05c;
}

/* Celebratory Rising Lotus Particle Effect */
.zen-lotus-rise-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}

.zen-rising-lotus {
  position: absolute;
  font-size: 2.6rem;
  animation: lotusRise 3.8s ease-out forwards;
  filter: drop-shadow(0 0 16px rgba(247, 208, 112, 0.75));
}

@keyframes lotusRise {
  0% {
    transform: translateY(100vh) scale(0.5) rotate(0deg);
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  80% {
    opacity: 0.95;
  }
  100% {
    transform: translateY(-20vh) scale(1.5) rotate(35deg);
    opacity: 0;
  }
}

/* Sacred Disk & Halo Animations */
@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes haloPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.35;
  }
  50% {
    transform: scale(1.18);
    opacity: 0.75;
  }
}

@keyframes eqWave {
  0% { transform: scaleY(0.2); }
  100% { transform: scaleY(1); }
}

/* Topbar Chants Button */
.chants-top-btn {
  font-size: 1.15rem;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.35);
  color: var(--gold);
}

.chants-top-btn:hover {
  background: rgba(212, 175, 55, 0.25);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
}

/* Sticky Glassmorphic MiniPlayer */
.zen-mini-player {
  position: fixed;
  bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  width: min(calc(100% - 24px), 680px);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(46, 125, 107, 0.25);
  border-radius: 20px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.10), 0 0 16px rgba(46, 125, 107, 0.10);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  z-index: 998;
  transition: all 0.3s ease;
}

.mini-player-track {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  flex: 1;
  min-width: 0;
}

.mini-disc-icon {
  font-size: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(46, 125, 107, 0.10);
  border: 1px solid rgba(46, 125, 107, 0.30);
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.zen-mini-player.playing .mini-disc-icon {
  animation: spinSlow 18s linear infinite;
  box-shadow: 0 0 16px rgba(46, 125, 107, 0.4);
}

.mini-track-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.mini-track-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1F2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-track-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.74rem;
  color: #4B5563;
}

.mini-eq-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 12px;
}

.eq-bar {
  width: 2.5px;
  height: 100%;
  background: #2E7D6B;
  border-radius: 1px;
  transform-origin: bottom;
  transform: scaleY(0.25);
}

.zen-mini-player.playing .eq-bar:nth-child(1) { animation: eqWave 0.8s ease-in-out infinite alternate; }
.zen-mini-player.playing .eq-bar:nth-child(2) { animation: eqWave 1.1s ease-in-out 0.2s infinite alternate; }
.zen-mini-player.playing .eq-bar:nth-child(3) { animation: eqWave 0.9s ease-in-out 0.4s infinite alternate; }
.zen-mini-player.playing .eq-bar:nth-child(4) { animation: eqWave 1.2s ease-in-out 0.1s infinite alternate; }

.mini-player-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.mini-ctrl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(46, 125, 107, 0.10);
  border: 1px solid rgba(46, 125, 107, 0.30);
  color: #2E7D6B;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mini-ctrl-btn:hover {
  background: rgba(46, 125, 107, 0.20);
  transform: scale(1.06);
}

.mini-open-btn {
  font-size: 0.75rem;
  font-weight: 700;
  width: auto;
  padding: 0 12px;
  border-radius: 14px;
}

.mini-progress-bar {
  position: absolute;
  bottom: 0;
  left: 12px;
  right: 12px;
  height: 2.5px;
  background: rgba(46, 125, 107, 0.12);
  border-radius: 2px;
  overflow: hidden;
}

.mini-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #2E7D6B, #EFBC78);
  transition: width 0.25s linear;
}

/* Dark mode overrides for MiniPlayer */
body.dark .zen-mini-player {
  background: rgba(5, 47, 49, 0.92);
  border: 1px solid rgba(239, 201, 120, 0.4);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.45), 0 0 16px rgba(239, 201, 120, 0.2);
}

body.dark .mini-disc-icon {
  background: rgba(239, 201, 120, 0.16);
  border: 1px solid rgba(239, 201, 120, 0.45);
}

body.dark .zen-mini-player.playing .mini-disc-icon {
  box-shadow: 0 0 16px rgba(239, 201, 120, 0.5);
}

body.dark .mini-track-title {
  color: #ffe7ad;
}

body.dark .mini-track-meta {
  color: rgba(255, 250, 240, 0.75);
}

body.dark .eq-bar {
  background: #efc978;
}

body.dark .mini-ctrl-btn {
  background: rgba(239, 201, 120, 0.16);
  border: 1px solid rgba(239, 201, 120, 0.45);
  color: #ffe7ad;
}

body.dark .mini-ctrl-btn:hover {
  background: rgba(212, 175, 55, 0.32);
}

body.dark .mini-progress-bar {
  background: rgba(212, 175, 55, 0.18);
}

body.dark .mini-progress-fill {
  background: linear-gradient(90deg, #c9a05c, #f7d070);
}

/* Full Sanskrit Chants Dialog */
.chants-dialog {
  max-width: 560px;
  width: 94%;
}

.chants-dialog-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chants-player-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 16px 8px;
  background: rgba(212, 175, 55, 0.05);
  border-radius: 16px;
  border: 1px solid rgba(212, 175, 55, 0.22);
}

.chants-disk-wrapper {
  position: relative;
  width: 86px;
  height: 86px;
  margin-bottom: 12px;
}

.chants-halo-pulse {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.4) 0%, transparent 70%);
  animation: haloPulse 4s ease-in-out infinite;
  pointer-events: none;
}

.chants-lotus-disk {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(139, 96, 20, 0.3));
  border: 2px solid rgba(212, 175, 55, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.35);
  transition: all 0.3s ease;
}

.chants-dialog.playing .chants-lotus-disk {
  animation: spinSlow 20s linear infinite;
  box-shadow: 0 0 28px rgba(247, 208, 112, 0.55);
}

.chants-disk-icon {
  font-size: 2.4rem;
}

.chants-hero-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffe7ad;
  margin: 0 0 4px 0;
  letter-spacing: 0.04em;
}

.chants-hero-subtitle {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0 0 14px 0;
  line-height: 1.4;
}

.chants-scrubber-area {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-bottom: 14px;
}

.chants-time {
  font-size: 0.72rem;
  font-family: monospace;
  color: var(--muted);
  width: 36px;
  text-align: center;
}

.chants-scrubber {
  position: relative;
  flex: 1;
  height: 8px;
  background: rgba(212, 175, 55, 0.18);
  border-radius: 4px;
  cursor: pointer;
}

.chants-scrubber-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #c9a05c, #f7d070);
  border-radius: 4px;
  pointer-events: none;
}

.chants-scrubber-thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #f7d070;
  border: 2px solid #8b6014;
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.6);
  pointer-events: none;
}

.chants-main-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 12px;
}

.chants-round-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.35);
  color: var(--gold);
  font-size: 1.1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.chants-round-btn:hover {
  background: rgba(212, 175, 55, 0.25);
  transform: scale(1.08);
}

.chants-play-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c9a05c, #f7d070);
  border: 0;
  color: #1a1410;
  font-size: 1.35rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(212, 175, 55, 0.4);
  transition: all 0.2s ease;
}

.chants-play-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 22px rgba(212, 175, 55, 0.6);
}

.chants-volume-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(240px, 80%);
  font-size: 0.78rem;
  color: var(--muted);
}

.chants-volume-row input[type="range"] {
  flex: 1;
  accent-color: #f7d070;
}

/* Meditation Session Complete Card */
.chants-meditation-session {
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.28);
  border-radius: 12px;
  padding: 12px 14px;
}

.chants-session-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.chants-session-text {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0;
}

.chants-complete-btn {
  padding: 7px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.3), rgba(184, 137, 42, 0.4));
  border: 1px solid rgba(212, 175, 55, 0.5);
  color: #f7d070;
  border-radius: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chants-complete-btn:hover {
  background: rgba(212, 175, 55, 0.45);
  transform: scale(1.04);
}

.chants-merit-toast {
  margin-top: 8px;
  padding: 8px;
  background: rgba(56, 142, 60, 0.18);
  border: 1px solid rgba(76, 175, 80, 0.4);
  color: #81c784;
  border-radius: 8px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Sacred Playlist Grid */
.chants-playlist-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chants-playlist-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gold);
  margin: 0;
}

.chants-playlist {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  max-height: 220px;
  overflow-y: auto;
  padding-right: 4px;
}

.chant-track-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
}

.chant-track-card:hover {
  border-color: rgba(212, 175, 55, 0.5);
  background: rgba(212, 175, 55, 0.08);
}

.chant-track-card.active {
  border-color: #f7d070;
  background: rgba(212, 175, 55, 0.16);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.25);
}

.chant-track-icon {
  font-size: 1.35rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.12);
  flex-shrink: 0;
}

.chant-track-texts {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.chant-track-name {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chant-track-time {
  font-size: 0.68rem;
  color: var(--muted);
  margin-top: 1px;
}

/* Tactile water click ripples */
.water-click-ripple {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  border: 2px solid rgba(239, 201, 120, 0.6);
  background: radial-gradient(circle, rgba(239, 201, 120, 0.25) 0%, transparent 70%);
  animation: water-ripple-expand 850ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
  z-index: 50;
}

@keyframes water-ripple-expand {
  0% {
    transform: scale(0.08);
    opacity: 0.85;
  }
  100% {
    transform: scale(1);
    opacity: 0;
  }
}

/* ==========================================================================
   Zen Dialog & Modals (Digital Sanctuary Styling)
   ========================================================================== */
.zen-dialog {
  background: rgba(7, 46, 47, 0.96);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  backdrop-filter: blur(28px) saturate(140%);
  border: 1px solid rgba(239, 201, 120, 0.35);
  border-radius: 24px;
  color: #fffaf0;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.65), 0 0 30px rgba(239, 201, 120, 0.15);
  padding: 24px;
  max-width: 540px;
  width: min(92%, 540px);
}

.zen-dialog::backdrop {
  background: rgba(3, 25, 26, 0.78);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.dialog-header h2 {
  font-family: 'Cormorant Garamond', 'Noto Serif SC', Georgia, serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: #fffaf0;
  letter-spacing: 0.01em;
}

.icon-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: #fffaf0;
  font-size: 1rem;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 200ms ease;
}

.icon-close-btn:hover {
  background: rgba(239, 201, 120, 0.2);
  border-color: rgba(239, 201, 120, 0.5);
  color: #efc978;
  transform: scale(1.08);
}

.ethical-badge-callout {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  margin: 16px 0;
  border-radius: 16px;
  background: rgba(112, 214, 176, 0.12);
  border: 1px solid rgba(112, 214, 176, 0.35);
}

.ethical-seal {
  font-size: 1.8rem;
  flex-shrink: 0;
}

.ethical-badge-callout strong {
  display: block;
  font-size: 0.95rem;
  color: #aaf0d6;
  margin-bottom: 2px;
}

.ethical-badge-callout p {
  font-size: 0.8rem;
  color: rgba(255, 250, 240, 0.8);
  line-height: 1.35;
}

.donation-options {
  display: flex;
  gap: 10px;
  margin: 16px 0;
}

.donation-tier {
  flex: 1;
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(10, 70, 72, 0.5);
  color: #fffaf0;
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 200ms ease;
}

.donation-tier:hover {
  border-color: rgba(239, 201, 120, 0.5);
  transform: translateY(-2px);
}

.donation-tier.active {
  border-color: #efc978;
  background: linear-gradient(135deg, rgba(239, 201, 120, 0.3), rgba(112, 214, 176, 0.2));
  color: #ffe7ad;
  box-shadow: 0 0 16px rgba(239, 201, 120, 0.3);
}

.payment-methods-block,
.dedication-block {
  margin: 14px 0;
}

.field-label {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 8px;
}

.payment-method-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pay-method-chip {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(10, 70, 72, 0.45);
  color: #fffaf0;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 200ms ease;
}

.pay-method-chip:hover {
  border-color: rgba(239, 201, 120, 0.4);
}

.pay-method-chip.active {
  border-color: #efc978;
  background: rgba(239, 201, 120, 0.2);
  color: #ffe7ad;
  box-shadow: 0 0 12px rgba(239, 201, 120, 0.25);
}

.dialog-input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(5, 38, 40, 0.65);
  color: #fffaf0;
  padding: 12px 14px;
  font-size: 0.9rem;
  box-sizing: border-box;
  transition: all 200ms ease;
}

.dialog-input:focus {
  border-color: rgba(239, 201, 120, 0.6);
  box-shadow: 0 0 16px rgba(239, 201, 120, 0.25);
  outline: none;
}

.donation-receipt-card {
  margin: 18px 0;
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(8, 56, 58, 0.9), rgba(5, 38, 40, 0.95));
  border: 1px solid rgba(239, 201, 120, 0.4);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(239, 201, 120, 0.3);
  text-align: center;
}

.receipt-seal {
  font-size: 2.2rem;
  margin-bottom: 6px;
  filter: drop-shadow(0 2px 8px rgba(239, 201, 120, 0.5));
}

.donation-receipt-card h4 {
  font-family: 'Cormorant Garamond', 'Noto Serif SC', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffe7ad;
  margin: 0 0 6px 0;
}

.receipt-id {
  font-family: monospace;
  font-size: 0.95rem;
  color: #aaf0d6;
  margin-bottom: 8px;
}

.receipt-details,
.receipt-dedication {
  font-size: 0.85rem;
  color: rgba(255, 250, 240, 0.85);
  margin-bottom: 4px;
}

.receipt-note {
  font-size: 0.76rem;
  color: rgba(255, 250, 240, 0.65);
  margin-top: 10px;
  font-style: italic;
}

.dialog-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.dialog-actions button {
  flex: 1;
}

/* Live Map Viewport */
.live-map-viewport {
  position: relative;
  height: 280px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #052f31;
  margin: 14px 0;
}

.live-map-tiles {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  filter: sepia(0.35) hue-rotate(15deg) contrast(1.05);
}

.live-map-tiles img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.live-map-center-marker {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.live-map-pulse-aura {
  position: absolute;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(239, 201, 120, 0.4) 0%, transparent 70%);
  animation: pulse 2s infinite ease-out;
}

.live-map-lotus-pin {
  font-size: 2rem;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.6));
}

.live-map-controls {
  position: absolute;
  right: 12px;
  top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 6;
}

.map-ctrl-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(7, 46, 47, 0.85);
  color: #fffaf0;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 200ms ease;
}

.map-ctrl-btn:hover {
  background: rgba(239, 201, 120, 0.25);
  color: #ffe7ad;
}

.live-map-osm-attribution {
  position: absolute;
  bottom: 6px;
  right: 10px;
  font-size: 0.65rem;
  color: rgba(255, 250, 240, 0.7);
  background: rgba(5, 38, 40, 0.75);
  padding: 2px 8px;
  border-radius: 4px;
  z-index: 6;
}

.live-map-osm-attribution a {
  color: #ffe7ad;
  text-decoration: none;
}

.live-map-meta {
  margin: 12px 0 16px;
}

.live-map-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.coord-pill {
  font-size: 0.75rem;
  color: #ffe7ad;
  background: rgba(239, 201, 120, 0.15);
  border: 1px solid rgba(239, 201, 120, 0.35);
  border-radius: 999px;
  padding: 4px 10px;
  font-family: monospace;
}

.live-map-desc {
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.4;
}

/* ==========================================================================
   Map Dual-Mode View Switcher (Sanctuary Mode vs Live OSM Mode)
   ========================================================================== */
.map-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.map-view-switcher {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: rgba(7, 46, 47, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.map-view-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.map-view-btn:hover {
  color: #fffaf0;
  background: rgba(239, 201, 120, 0.12);
}

.map-view-btn.active {
  color: #072a2b;
  background: linear-gradient(135deg, #ffe7ad 0%, #efc978 100%);
  box-shadow: 0 2px 10px rgba(239, 201, 120, 0.35);
  font-weight: 700;
}

/* Floating 3D Connected Earth Object */
.map-global-globe-wrap {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 250px;
  height: 250px;
  pointer-events: none;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-globe-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 35px rgba(112, 214, 176, 0.35)) drop-shadow(0 0 15px rgba(239, 201, 120, 0.2));
  animation: globeFloat 8s ease-in-out infinite alternate;
}

.map-globe-glow {
  position: absolute;
  inset: 15px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(112, 214, 176, 0.22) 0%, rgba(239, 201, 120, 0.08) 50%, transparent 70%);
  pointer-events: none;
  animation: globeGlowPulse 4s ease-in-out infinite alternate;
}

@keyframes globeFloat {
  0% { transform: translateY(-4px) rotate(0deg) scale(0.98); }
  100% { transform: translateY(6px) rotate(3deg) scale(1.02); }
}

@keyframes globeGlowPulse {
  0% { transform: scale(0.92); opacity: 0.55; }
  100% { transform: scale(1.12); opacity: 0.9; }
}

/* Real-time Embedded OSM Viewport */
.map-embedded-osm-viewport {
  position: absolute;
  inset: 0;
  z-index: 4;
  border-radius: inherit;
  overflow: hidden;
  background: #052f31;
}

.map-embedded-osm-viewport[hidden] {
  display: none !important;
}

.embedded-osm-tiles {
  position: absolute;
  inset: -60px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  cursor: grab;
  user-select: none;
  filter: sepia(0.3) hue-rotate(15deg) contrast(1.04) brightness(0.96);
  transition: transform 180ms ease-out;
}

.embedded-osm-tiles:active {
  cursor: grabbing;
}

.embedded-osm-tile {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.embedded-osm-center-pin {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.center-pin-halo {
  position: absolute;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(239, 201, 120, 0.45) 0%, transparent 70%);
  animation: pulse 2.2s infinite ease-out;
}

.center-pin-lotus {
  font-size: 2.2rem;
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.7));
  animation: floatLotus 3s ease-in-out infinite alternate;
}

@keyframes floatLotus {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(-4px) scale(1.05); }
}

.embedded-osm-controls {
  position: absolute;
  right: 12px;
  top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 12;
}

.embedded-ctrl-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(7, 46, 47, 0.88);
  color: #fffaf0;
  font-size: 1.25rem;
  font-weight: 700;
  cursor: pointer;
  display: grid;
  place-items: center;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  transition: all 180ms ease;
}

.embedded-ctrl-btn:hover {
  background: rgba(239, 201, 120, 0.28);
  color: #ffe7ad;
  border-color: var(--gold);
  transform: scale(1.06);
}

.embedded-osm-attribution {
  position: absolute;
  bottom: 6px;
  right: 8px;
  font-size: 0.68rem;
  color: rgba(255, 250, 240, 0.75);
  background: rgba(5, 38, 40, 0.88);
  padding: 2px 8px;
  border-radius: 4px;
  z-index: 12;
}

.embedded-osm-attribution a {
  color: #ffe7ad;
  text-decoration: none;
}

/* ==========================================================================
   Deed Search & Filter
   ========================================================================= */
.deed-search-input {
  min-height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(8, 56, 58, 0.85);
  color: #fffaf0;
  padding: 6px 14px 6px 34px;
  font-size: 0.82rem;
  font-family: inherit;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23aaf0d6' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 10px center;
  transition: border-color 200ms ease, box-shadow 200ms ease, width 200ms ease;
  width: min(100%, 200px);
}

.deed-search-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 14px rgba(239, 201, 120, 0.28);
  outline: none;
  width: min(100%, 240px);
}

/* ==========================================================================
   Multi-Scene Dynamic Layers for Deed Ritual Studio
   ========================================================================== */
.deed-scene-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: none;
  z-index: 4;
}

.deed-scene-layer.active {
  display: block;
}

/* Crosswalk & Escort Scene */
.scene-crosswalk-layer {
  background: radial-gradient(circle at 50% 80%, rgba(239, 201, 120, 0.15) 0%, transparent 70%);
}

.crosswalk-stripes {
  position: absolute;
  bottom: 12px;
  left: 20%;
  right: 20%;
  height: 14px;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0.45) 12px, transparent 12px, transparent 24px);
  border-radius: 4px;
}

.elder-pedestrian {
  position: absolute;
  bottom: 24px;
  left: 28%;
  font-size: 1.6rem;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
  animation: pedestrianStep 2.5s ease-in-out infinite alternate;
}

.escort-heart {
  position: absolute;
  bottom: 50px;
  left: 36%;
  font-size: 1.1rem;
  animation: heartFloat 2s ease-in-out infinite alternate;
}

@keyframes pedestrianStep {
  0% { transform: translateX(0) rotate(-2deg); }
  100% { transform: translateX(28px) rotate(2deg); }
}

@keyframes heartFloat {
  0% { transform: translateY(0) scale(0.9); opacity: 0.8; }
  100% { transform: translateY(-8px) scale(1.15); opacity: 1; filter: drop-shadow(0 0 8px rgba(239, 201, 120, 0.8)); }
}

/* Floating Blessing Lantern Scene */
.scene-blessing-layer {
  background: radial-gradient(circle at 60% 40%, rgba(239, 201, 120, 0.2) 0%, transparent 65%);
}

.floating-lotus-lantern {
  position: absolute;
  top: 36px;
  left: 55%;
  font-size: 2rem;
  filter: drop-shadow(0 0 16px rgba(239, 201, 120, 0.85));
  animation: lanternSwayFloat 3.6s ease-in-out infinite alternate;
}

.blessing-streamer {
  position: absolute;
  top: 72px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Cormorant Garamond', 'Noto Serif SC', serif;
  font-size: 0.82rem;
  color: var(--gold);
  background: rgba(7, 46, 47, 0.8);
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(239, 201, 120, 0.4);
  letter-spacing: 0.1em;
  white-space: nowrap;
  animation: streamerShimmer 3s ease-in-out infinite alternate;
}

@keyframes lanternSwayFloat {
  0% { transform: translateY(0) rotate(-4deg); }
  100% { transform: translateY(-12px) rotate(5deg); }
}

@keyframes streamerShimmer {
  0% { opacity: 0.75; transform: translateX(-50%) scale(0.96); }
  100% { opacity: 1; transform: translateX(-50%) scale(1.04); box-shadow: 0 0 10px rgba(239, 201, 120, 0.35); }
}

/* Coastline Nature Cleanup Scene */
.scene-coastline-layer {
  background: radial-gradient(circle at 40% 60%, rgba(112, 214, 176, 0.18) 0%, transparent 70%);
}

.coastline-wave {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 24px;
  background: linear-gradient(180deg, transparent, rgba(112, 214, 176, 0.25));
  border-top: 1px dashed rgba(112, 214, 176, 0.4);
}

.nature-sparkle {
  position: absolute;
  font-size: 1.25rem;
  animation: sparkleBounce 2.4s ease-in-out infinite alternate;
}

.nature-sparkle.s1 {
  top: 30px;
  left: 22%;
  animation-delay: 0s;
}

.nature-sparkle.s2 {
  top: 48px;
  left: 70%;
  animation-delay: 0.8s;
}

@keyframes sparkleBounce {
  0% { transform: translateY(0) scale(0.85); opacity: 0.6; }
  100% { transform: translateY(-8px) scale(1.15); opacity: 1; filter: drop-shadow(0 0 10px rgba(112, 214, 176, 0.7)); }
}

/* Reduced Motion Fallbacks */
@media (prefers-reduced-motion: reduce) {
  .cinematic-backdrop-layer,
  .screen.active,
  .map-globe-img,
  .map-globe-glow,
  .center-pin-halo,
  .center-pin-lotus,
  .elder-pedestrian,
  .escort-heart,
  .floating-lotus-lantern,
  .blessing-streamer,
  .nature-sparkle {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
/* --- Sanctuary Account & SSO Sign-In Card --- */
.account-card {
  position: relative;
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(46, 125, 107, 0.22);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  padding: 22px 20px;
  margin-top: 16px;
  transition: all 300ms ease;
}

body.dark .account-card {
  background: rgba(5, 47, 49, 0.88);
  border: 1px solid rgba(239, 188, 120, 0.25);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

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

.auth-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  background: rgba(46, 125, 107, 0.12);
  color: #2E7D6B;
  border: 1px solid rgba(46, 125, 107, 0.28);
}

body.dark .auth-status-pill {
  background: rgba(112, 214, 176, 0.15);
  color: #70d6b0;
  border-color: rgba(112, 214, 176, 0.35);
}

.auth-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3EB489;
  box-shadow: 0 0 6px #3EB489;
}

.auth-status-pill.guest .auth-status-dot {
  background: #f59e0b;
  box-shadow: 0 0 6px #f59e0b;
}

.auth-sync-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  background: rgba(239, 188, 120, 0.16);
  color: #8f651a;
  border: 1px solid rgba(239, 188, 120, 0.45);
}

body.dark .auth-sync-pill {
  background: rgba(239, 188, 120, 0.18);
  color: #efc978;
}

#accountCardTitle {
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--ink);
  margin: 4px 0 6px;
}

.account-card-sub {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 18px;
}

/* Signed In View */
.account-user-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(46, 125, 107, 0.08);
  border: 1px solid rgba(46, 125, 107, 0.20);
  margin-bottom: 16px;
}

body.dark .account-user-banner {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(239, 188, 120, 0.25);
}

.account-user-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2E7D6B, #3EB489);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.25rem;
  box-shadow: 0 4px 12px rgba(46, 125, 107, 0.35);
  flex-shrink: 0;
}

.account-user-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.account-user-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-user-email {
  font-size: 0.84rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-actions-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.account-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 200ms ease;
}

.account-btn.primary {
  background: linear-gradient(135deg, #2E7D6B, #3EB489);
  color: #ffffff;
  border: 1px solid rgba(46, 125, 107, 0.5);
  box-shadow: 0 4px 12px rgba(46, 125, 107, 0.25);
}

.account-btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(46, 125, 107, 0.35);
}

.account-btn.secondary {
  background: var(--surface-strong);
  color: var(--ink);
  border: 1px solid var(--line);
}

.account-btn.secondary:hover {
  background: rgba(46, 125, 107, 0.1);
  border-color: rgba(46, 125, 107, 0.4);
}

.account-btn.outline {
  background: transparent;
  color: #dc2626;
  border: 1px solid rgba(220, 38, 38, 0.4);
}

.account-btn.outline:hover {
  background: rgba(220, 38, 38, 0.08);
  border-color: #dc2626;
}

body.dark .account-btn.outline {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.45);
}

body.dark .account-btn.outline:hover {
  background: rgba(248, 113, 113, 0.12);
}

.account-sync-message {
  margin-top: 12px;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.85rem;
  background: rgba(46, 125, 107, 0.14);
  color: #2E7D6B;
  border: 1px solid rgba(46, 125, 107, 0.25);
}

body.dark .account-sync-message {
  background: rgba(112, 214, 176, 0.18);
  color: #70d6b0;
  border-color: rgba(112, 214, 176, 0.35);
}

/* Guest Mode / SSO Buttons */
.sso-btn-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sso-btn {
  width: 100%;
  min-height: 46px;
  padding: 10px 16px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 0.94rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

.sso-btn-google {
  background: #ffffff;
  color: #374151;
  border: 1px solid #d1d5db;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.sso-btn-google:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  border-color: #9ca3af;
}

.sso-btn-apple {
  background: #000000;
  color: #ffffff;
  border: 1px solid #000000;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.sso-btn-apple:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  background: #111111;
}

body.dark .sso-btn-apple {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
}

body.dark .sso-btn-apple:hover {
  background: #f3f4f6;
}

.sso-email-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: var(--line);
}

.divider-text {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sso-email-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.sso-email-input {
  flex: 1;
  min-width: 200px;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--ink);
  font-size: 0.9rem;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.sso-email-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 14px rgba(46, 125, 107, 0.28);
  outline: none;
}

.account-demo-row {
  margin-top: 14px;
  text-align: center;
}

.account-demo-btn {
  background: none;
  border: none;
  color: #2E7D6B;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  padding: 4px 8px;
  transition: opacity 200ms ease;
}

.account-demo-btn:hover {
  opacity: 0.8;
}

body.dark .account-demo-btn {
  color: #efc978;
}

.account-guest-notice {
  margin: 14px 0 0;
  font-size: 0.80rem;
  color: var(--muted);
  line-height: 1.45;
  text-align: center;
}

/* ==========================================================================
   2026 UI/UX Redesign & Motion Enhancements (Gaps Audit & Realignment)
   ========================================================================== */

/* Hero Panel Enhancements */
.hero-eyebrow-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 2px;
}

.karma-delta-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(46, 125, 107, 0.14);
  color: #2E7D6B;
  border: 1px solid rgba(46, 125, 107, 0.32);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

body.dark .karma-delta-pill {
  background: rgba(239, 201, 120, 0.18);
  color: #efc978;
  border-color: rgba(239, 201, 120, 0.45);
}

.hero-zen-quote {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.06rem;
  font-style: italic;
  color: var(--muted);
  margin: 6px 0 10px;
  line-height: 1.4;
}

/* 7-Day Flame Streak Track */
.streak-panel .panel-subtext {
  font-size: 0.80rem;
  color: var(--muted);
  margin: 3px 0 0;
  font-weight: 400;
}

.streak-flame-track {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  margin: 14px 0 16px;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 16px;
  border: 1px solid var(--line);
}

body.dark .streak-flame-track {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.10);
}

.flame-day {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.flame-day.active {
  border-color: rgba(239, 188, 120, 0.65);
  background: linear-gradient(180deg, rgba(239, 188, 120, 0.16) 0%, var(--surface) 100%);
}

.flame-day.today-flame {
  border-color: var(--primary);
  box-shadow: 0 0 12px rgba(46, 125, 107, 0.28);
}

body.dark .flame-day.today-flame {
  border-color: var(--gold);
  box-shadow: 0 0 14px rgba(239, 201, 120, 0.35);
}

.flame-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.flame-day-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
}

/* Quick Rituals Panel */
.quick-rituals-panel {
  margin: 20px 0;
}

.quick-rituals-link {
  font-size: 0.84rem;
  font-weight: 600;
  color: #2E7D6B;
  cursor: pointer;
}

body.dark .quick-rituals-link {
  color: #efc978;
}

.quick-rituals-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 10px;
}

@media (max-width: 600px) {
  .quick-rituals-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.quick-ritual-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 16px 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  cursor: pointer;
  transition: transform 250ms var(--ease-premium), box-shadow 250ms ease, border-color 200ms ease;
}

.quick-ritual-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--primary);
}

body.dark .quick-ritual-card:hover {
  border-color: var(--gold);
}

.quick-ritual-icon {
  font-size: 1.6rem;
  margin-bottom: 6px;
  line-height: 1;
}

.quick-ritual-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
}

.quick-ritual-duration {
  font-size: 0.70rem;
  color: var(--muted);
  margin-top: 4px;
  background: rgba(0, 0, 0, 0.04);
  padding: 2px 6px;
  border-radius: 6px;
}

body.dark .quick-ritual-duration {
  background: rgba(255, 255, 255, 0.08);
}

/* Mini World Card */
.mini-world-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  background: linear-gradient(135deg, rgba(46, 125, 107, 0.12) 0%, rgba(207, 233, 247, 0.35) 100%);
  border: 1px solid rgba(46, 125, 107, 0.25);
  border-radius: 20px;
  margin: 20px 0;
  position: relative;
  overflow: hidden;
}

body.dark .mini-world-card {
  background: linear-gradient(135deg, rgba(5, 47, 49, 0.85) 0%, rgba(7, 56, 58, 0.95) 100%);
  border-color: rgba(239, 201, 120, 0.35);
}

.mini-world-content {
  flex: 1;
  z-index: 1;
}

.mini-world-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #2E7D6B;
  margin-bottom: 6px;
}

body.dark .mini-world-badge {
  color: #efc978;
}

.mini-world-card h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
}

.mini-world-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.mini-world-dot {
  opacity: 0.5;
}

.mini-world-globe-art {
  position: relative;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mini-world-emoji {
  font-size: 2.8rem;
  animation: floatGlobe 6s ease-in-out infinite;
}

.spinning-globe-ring {
  position: absolute;
  inset: 0;
  border: 2px dashed rgba(46, 125, 107, 0.38);
  border-radius: 50%;
  animation: spinRing 22s linear infinite;
}

body.dark .spinning-globe-ring {
  border-color: rgba(239, 201, 120, 0.45);
}

/* Tonight's Gentle Ritual Hero Card */
.tonight-ritual-card {
  padding: 22px 24px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(38, 84, 124, 0.08) 0%, rgba(168, 56, 86, 0.07) 50%, rgba(239, 188, 120, 0.14) 100%);
  border: 1px solid rgba(239, 188, 120, 0.38);
  margin-bottom: 22px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.04);
}

body.dark .tonight-ritual-card {
  background: linear-gradient(135deg, rgba(8, 58, 58, 0.88) 0%, rgba(15, 30, 48, 0.92) 100%);
  border-color: rgba(239, 201, 120, 0.3);
}

.tonight-ritual-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}

.tonight-ritual-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #a35912;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

body.dark .tonight-ritual-badge {
  color: var(--gold);
}

.tonight-ritual-chips {
  display: flex;
  gap: 6px;
}

.ritual-meta-chip {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
}

.ritual-meta-chip.guided {
  background: rgba(46, 125, 107, 0.12);
  color: #2E7D6B;
  border-color: rgba(46, 125, 107, 0.25);
}

body.dark .ritual-meta-chip.guided {
  background: rgba(239, 201, 120, 0.18);
  color: #efc978;
  border-color: rgba(239, 201, 120, 0.4);
}

.tonight-ritual-title {
  margin: 0 0 8px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
}

.tonight-ritual-copy {
  margin: 0 0 16px;
  font-size: 0.90rem;
  color: var(--muted);
  line-height: 1.5;
}

.tonight-start-btn {
  padding: 10px 20px;
  font-size: 0.88rem;
}

/* Profile Screen: Circular Progress Rings & Global Impact Grid */
.profile-progress-grid-panel {
  margin-top: 18px;
}

.progress-rings-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 12px;
}

@media (max-width: 680px) {
  .progress-rings-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.progress-ring-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.ring-svg-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.progress-ring-svg {
  width: 44px;
  height: 44px;
  transform: rotate(-90deg);
}

.ring-bg {
  fill: none;
  stroke: var(--line);
  stroke-width: 3.5;
}

.ring-fill {
  fill: none;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-dasharray: 113;
  transition: stroke-dashoffset 800ms ease;
}

.ring-teal { stroke: #2E7D6B; }
.ring-gold { stroke: #EFBC78; }
.ring-coral { stroke: #8d2518; }
.ring-purple { stroke: #26547c; }

body.dark .ring-teal { stroke: #70d6b0; }
body.dark .ring-gold { stroke: #efc978; }
body.dark .ring-coral { stroke: #f4b8a8; }
body.dark .ring-purple { stroke: #a3d9ff; }

.ring-pct {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.64rem;
  font-weight: 700;
  color: var(--ink);
}

.ring-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ring-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ring-sub {
  font-size: 0.70rem;
  color: var(--muted);
  margin-top: 2px;
}

.impact-metrics-panel {
  margin-top: 18px;
}

.impact-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 12px;
}

@media (max-width: 680px) {
  .impact-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.impact-stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 16px 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  transition: transform 250ms ease, box-shadow 250ms ease;
}

.impact-icon {
  font-size: 1.5rem;
  margin-bottom: 6px;
  line-height: 1;
}

.impact-val {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
}

.impact-lbl {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 4px;
}

/* 3D Tilt Glare & Liquid Silk Transitions */
.tilt-card {
  position: relative;
  overflow: hidden;
  will-change: transform;
  transition: transform 250ms cubic-bezier(0.25, 1, 0.5, 1), box-shadow 250ms ease;
}

.tilt-glare {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(circle at var(--glare-x, 50%) var(--glare-y, 50%), rgba(255, 255, 255, var(--glare-opacity, 0)) 0%, transparent 60%);
  mix-blend-mode: overlay;
  z-index: 2;
  transition: opacity 200ms ease;
}

@keyframes screenSilkFade {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.995);
    filter: blur(2px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .screen.active {
    animation: screenSilkFade 350ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }
}

@keyframes floatGlobe {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-4px) rotate(3deg); }
}

@keyframes spinRing {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ==========================================================================
   Phase 2: Interactive 3D Canvas Sanctuaries, HUD & Stream Ticker
   ========================================================================== */

/* Lotus Pond Procedural Water Canvas */
.pond-ripple-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.pond-interactive-hint {
  position: absolute;
  bottom: 8px;
  right: 12px;
  font-size: 0.70rem;
  color: rgba(246, 211, 122, 0.85);
  background: rgba(5, 47, 49, 0.65);
  padding: 3px 9px;
  border-radius: 999px;
  pointer-events: none;
  z-index: 3;
  font-weight: 500;
  letter-spacing: 0.02em;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(246, 211, 122, 0.25);
  transition: opacity 300ms ease;
}

.ritual-scene.pond-scene:hover .pond-interactive-hint {
  opacity: 0.95;
}

/* Wish Lamp Sky 3D Floating Lanterns */
.lamp-sky-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.drifting-lanterns-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.drifting-sky-lantern {
  position: absolute;
  bottom: 0;
  width: 32px;
  height: 42px;
  background: radial-gradient(circle at 50% 65%, #fff2b2 0%, #ff9e00 50%, #c43800 100%);
  border-radius: 6px 6px 12px 12px;
  box-shadow: 0 0 16px rgba(255, 180, 0, 0.75), 0 0 32px rgba(255, 120, 0, 0.4);
  animation: lanternAscent 12s cubic-bezier(0.25, 1, 0.5, 1) forwards;
  pointer-events: none;
}

.drifting-sky-lantern::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 4px;
  background: #ffe680;
  border-radius: 2px;
  box-shadow: 0 0 8px #ffd000;
}

@keyframes lanternAscent {
  0% {
    transform: translateY(20px) scale(0.65) rotate(0deg);
    opacity: 0;
  }
  12% {
    opacity: 0.95;
  }
  80% {
    opacity: 0.85;
  }
  100% {
    transform: translateY(-280px) scale(0.22) rotate(14deg);
    opacity: 0;
  }
}

/* Sanctuary Telemetry HUD Card */
.sanctuary-hud-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 16px;
  background: rgba(46, 125, 107, 0.08);
  border: 1px solid rgba(46, 125, 107, 0.22);
  border-radius: 14px;
  margin: 12px 0;
}

body.dark .sanctuary-hud-card {
  background: rgba(8, 58, 58, 0.65);
  border-color: rgba(239, 201, 120, 0.3);
}

.hud-item {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.hud-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.hud-val {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
  margin-top: 2px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.hud-divider {
  width: 1px;
  height: 26px;
  background: var(--line);
  opacity: 0.6;
}

/* Live Global Kindness Stream Ticker */
.map-kindness-stream-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: 10px 0 14px;
  font-size: 0.80rem;
  overflow: hidden;
  white-space: nowrap;
}

.stream-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2E7D6B;
  box-shadow: 0 0 8px #2E7D6B;
  flex-shrink: 0;
  animation: pulseDot 2s infinite;
}

body.dark .stream-dot {
  background: #efc978;
  box-shadow: 0 0 8px #efc978;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
}

.stream-title {
  color: var(--primary);
  font-weight: 700;
  flex-shrink: 0;
}

body.dark .stream-title {
  color: var(--gold);
}

.stream-text {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  animation: tickerFade 6s ease-in-out infinite;
}

@keyframes tickerFade {
  0%, 10% { opacity: 0; transform: translateY(4px); }
  20%, 90% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-4px); }
}

/* Globe Auroral Particle Canvas */
.globe-particles-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* Kinetic Spring Micro-Interactions */
.primary-action {
  transition: transform 180ms cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 180ms ease, background 200ms ease;
}

.primary-action:active {
  transform: scale(0.96) translateY(1px);
}

.muyu-btn:active {
  transform: scale(0.94);
}

/* Mantra Sparkle Burst */
.mantra-sparkle {
  position: absolute;
  pointer-events: none;
  font-size: 1.1rem;
  color: var(--gold);
  text-shadow: 0 0 8px rgba(245, 166, 35, 0.85);
  animation: mantraSparkleBurst 1.1s cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
  z-index: 10;
}

@keyframes mantraSparkleBurst {
  0% {
    transform: translate(-50%, -50%) translate(0, 0) scale(0.4);
    opacity: 0;
  }
  20% {
    opacity: 1;
    transform: translate(-50%, -50%) translate(calc(var(--tx) * 0.35), calc(var(--ty) * 0.35)) scale(1.2);
  }
  100% {
    transform: translate(-50%, -50%) translate(var(--tx), var(--ty)) scale(0.6);
    opacity: 0;
  }
}

/* Lantern Wish Tag */
.lantern-wish-pill {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(30, 20, 10, 0.75);
  color: #ffe680;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 0.65rem;
  white-space: nowrap;
  pointer-events: none;
  border: 1px solid rgba(255, 230, 128, 0.4);
}

/* Sanctuary Quick Jump Bar */
.sanctuary-quick-jump {
  position: absolute;
  top: 10px;
  left: 54px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  z-index: 5;
  pointer-events: auto;
}

.sanctuary-quick-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 180ms ease;
}

.sanctuary-quick-chip:hover {
  border-color: var(--gold);
  background: color-mix(in srgb, var(--gold) 12%, var(--surface));
  transform: translateY(-1px);
}

.sanctuary-quick-chip.active {
  border-color: var(--gold);
  background: color-mix(in srgb, var(--gold) 20%, var(--surface));
  color: var(--jade);
  box-shadow: 0 0 8px rgba(239, 188, 120, 0.35);
}

/* Buddhist Compass Rose */
.buddhist-compass-rose {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  background: rgba(255, 250, 240, 0.88);
  border: 1.5px solid var(--gold);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  z-index: 5;
  user-select: none;
  animation: compassSlowRotate 30s linear infinite;
  pointer-events: none;
}

body.dark .buddhist-compass-rose {
  background: rgba(5, 47, 49, 0.88);
  border-color: var(--gold);
}

@keyframes compassSlowRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Sanctuary Concentric Ripple Wave */
.sanctuary-ripple-wave {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 50px;
  height: 50px;
  margin-top: -25px;
  margin-left: -25px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  pointer-events: none;
  animation: sanctuaryRipplePulse 2.4s ease-out infinite;
  z-index: 3;
}

@keyframes sanctuaryRipplePulse {
  0% {
    transform: scale(0.6);
    opacity: 0.85;
  }
  100% {
    transform: scale(2.8);
    opacity: 0;
  }
}




