/* ==========================================================================
   SHAN YUAN (善缘) - PRODUCTION DESIGN SYSTEM & STYLES
   Mindful Sanctuary & Temple Explorer Platform
   ========================================================================== */

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

:root {
  /* Color Palette */
  --bg-parchment: #FBF9F5;
  --bg-surround: #E8E2D8;
  --color-maroon: #96282E;
  --color-maroon-dark: #7D1F24;
  --color-maroon-light: #B83A41;
  --color-forest: #1D4B3E;
  --color-forest-dark: #14372D;
  --color-sage-bg: #EBF3EC;
  --color-sage-text: #2D5E4A;
  --color-sand-card: #F4EFEB;
  --color-sand-card-alt: #EFE8DF;
  --color-sand-border: #E8E0D5;
  --text-primary: #241D1B;
  --text-secondary: #756D65;
  --text-muted: #9E968D;
  --color-gold: #C89B67;
  --color-gold-light: #E5C396;
  --color-white: #FFFFFF;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;
  --shadow-sm: 0 2px 8px rgba(36, 29, 27, 0.04);
  --shadow-md: 0 6px 20px rgba(36, 29, 27, 0.07);
  --shadow-lg: 0 12px 32px rgba(36, 29, 27, 0.12);
  --font-serif: 'Playfair Display', 'Noto Serif SC', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-chinese: 'Noto Serif SC', 'Songti SC', serif;
}

html {
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-surround);
  color: var(--text-primary);
  height: 100vh;
  height: 100dvh;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
}

/* Allow text selection in reading passages, chat assistant messages, and inputs */
.assistant-bubble,
.reading-content,
.drawer-body-scroll,
input, textarea, select {
  -webkit-user-select: text;
  user-select: text;
}

/* Prevent iOS Safari automatic viewport zoom on input focus (occurs when font-size < 16px) */
@media (max-width: 768px) {
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="tel"],
  input[type="number"],
  input[type="search"],
  textarea,
  select {
    font-size: 16px !important;
  }
}

/* --------------------------------------------------------------------------
   SANCTUARY APPLICATION VIEWPORT (CUSTOMER READY)
   -------------------------------------------------------------------------- */
.app-viewport-wrapper {
  position: relative;
  width: 100%;
  max-width: 480px;
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  background-color: var(--bg-parchment);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex-shrink: 1;
}

@media (min-height: 600px) and (min-width: 561px) and (max-width: 767px) {
  .app-viewport-wrapper {
    height: min(900px, 94vh);
    border-radius: 20px;
    border: 1px solid rgba(216, 206, 195, 0.7);
    box-shadow: 0 20px 60px rgba(36, 29, 27, 0.16), 0 2px 6px rgba(0, 0, 0, 0.04);
  }
}

@media (min-width: 768px) {
  .app-viewport-wrapper {
    max-width: 820px;
    height: min(920px, 94vh);
    border-radius: 24px;
    border: 1px solid rgba(216, 206, 195, 0.7);
    box-shadow: 0 20px 60px rgba(36, 29, 27, 0.16), 0 2px 6px rgba(0, 0, 0, 0.04);
  }
  .bottom-nav-tabs {
    max-width: 600px;
  }
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
  }
  .home-quick-grid {
    grid-template-columns: repeat(6, 1fr) !important;
  }
  .temple-cards-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 10px;
  }
}

/* App Header */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 20px 10px 20px;
  flex-shrink: 0;
  background-color: var(--bg-parchment);
  z-index: 40;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.icon-btn {
  background: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.15s ease;
}
.icon-btn:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.header-title-group h1 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}
.header-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 400;
}
.header-action-circle-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background-color: #FFFFFF;
  border: 1px solid #EAE3D7;
  box-shadow: 0 2px 6px rgba(36, 29, 27, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
}
.header-action-circle-btn:hover {
  background-color: #FAF7F2;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(36, 29, 27, 0.08);
}

.header-lang-btn {
  width: auto !important;
  min-width: 48px !important;
  height: 38px !important;
  padding: 0 9px !important;
  border-radius: 19px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.3px;
  color: #96282E !important;
  background: #FFFDF9 !important;
  border: 1px solid #E5D5C3 !important;
  box-shadow: 0 1px 4px rgba(36, 29, 27, 0.06);
}
.header-lang-btn:hover {
  background-color: #F8EFE5 !important;
}

.user-active-dot {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: #22634E;
  border: 1.5px solid #FFFFFF;
}

.cart-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background-color: var(--color-maroon);
  color: white;
  font-size: 10px;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --------------------------------------------------------------------------
   VIEW CONTAINER & SCROLLABLE CONTENT
   -------------------------------------------------------------------------- */
.view-viewport {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 70px;
}
.view-viewport::-webkit-scrollbar {
  width: 4px;
}
.view-viewport::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.1);
  border-radius: 4px;
}

.view-screen {
  display: none;
  padding: 10px 20px 24px 20px;
  opacity: 0;
  transition: opacity 0.25s ease-out;
}
.view-screen.active {
  display: block;
  opacity: 1;
}

/* --------------------------------------------------------------------------
   SHARED UI PILLS, INPUTS & CARDS
   -------------------------------------------------------------------------- */
.search-container {
  position: relative;
  margin-bottom: 14px;
}
.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 18px;
  height: 18px;
}
.search-input {
  width: 100%;
  padding: 13px 16px 13px 42px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-sand-border);
  background-color: #FAF6F0;
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.search-input:focus {
  border-color: var(--color-gold);
  background-color: #FFF;
}
.search-input::placeholder {
  color: var(--text-muted);
}

.pill-group {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 14px;
  scrollbar-width: none;
}
.pill-group::-webkit-scrollbar {
  display: none;
}
.pill-btn {
  padding: 7px 18px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--color-sand-border);
  background-color: var(--color-sand-card);
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.pill-btn.active {
  background-color: var(--color-maroon);
  color: #FFF;
  border-color: var(--color-maroon);
}

/* Section Header */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 18px 0 12px 0;
}
.section-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
}
.section-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-maroon);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* --------------------------------------------------------------------------
   02 / TEMPLE FINDER (EXPLORE SCREEN)
   -------------------------------------------------------------------------- */
.map-canvas-card {
  position: relative;
  width: 100%;
  height: 220px;
  max-height: 260px;
  background-color: #F1ECE3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-sand-border);
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, margin 0.3s ease;
  opacity: 1;
}
.map-canvas-card.is-collapsed {
  max-height: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  margin-bottom: 0 !important;
  border-width: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden;
}

.map-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.map-top-pill {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.05);
  cursor: pointer;
}

.map-locate-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #FFF;
  border: 1px solid var(--color-sand-border);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-maroon);
  cursor: pointer;
}

.map-disclaimer {
  position: absolute;
  bottom: 8px;
  left: 12px;
  font-size: 10px;
  color: var(--text-muted);
}

/* Temple Cards */
.temple-cards-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.temple-card {
  background: #FFF;
  border: 1px solid var(--color-sand-border);
  border-radius: 14px;
  padding: 10px;
  display: flex;
  gap: 10px;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}
.temple-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.temple-thumb {
  width: 100px;
  height: 90px;
  border-radius: var(--radius-md);
  object-fit: cover;
  background-color: var(--color-sand-card);
  flex-shrink: 0;
}

.temple-card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.temple-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.temple-card-location {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.temple-tag-badge {
  display: inline-block;
  align-self: flex-start;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background-color: var(--color-sand-card);
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 6px;
}
.temple-action-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-maroon);
  display: flex;
  align-items: center;
  gap: 4px;
}
.heart-fav-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-maroon);
  padding: 4px;
}

/* Temple Search Header Row with Integrated State Picker */
.temple-search-header-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  width: 100%;
  box-sizing: border-box;
}
.temple-search-flex {
  flex: 1;
  min-width: 0;
  margin-bottom: 0 !important;
}
.state-select-trigger-btn {
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: #FFFDF9;
  border: 1px solid #D6BFA4;
  color: #96282E;
  font-weight: 700;
  font-size: 12px;
  padding: 0 11px;
  border-radius: var(--radius-md);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: all 0.2s ease;
  box-sizing: border-box;
  max-width: 130px;
}
.state-select-trigger-btn:hover {
  background: #96282E;
  border-color: #96282E;
  color: #FFF;
}
.state-pin-icon {
  font-size: 12px;
  flex-shrink: 0;
}
#triggerRegionLabel {
  display: inline-block;
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}
.trigger-chevron {
  font-size: 10px;
  opacity: 0.8;
  margin-left: 1px;
}

/* Micro Dataset Status Bar */
.temple-micro-stat-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 8px 4px;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}
.micro-stat-info {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.micro-stat-dot {
  color: #96282E;
  font-size: 8px;
  flex-shrink: 0;
}
.micro-stat-title {
  font-weight: 700;
  font-size: 12px;
  color: #241D1B;
  flex-shrink: 0;
}
.micro-stat-sub {
  font-size: 11.5px;
  color: #7A6F65;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Enhanced Temple Card Details */
.temple-card-top-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
}
.temple-id-pill {
  font-size: 9.5px;
  font-weight: 700;
  color: #8F5B3E;
  background: #FAF2E8;
  padding: 1px 6px;
  border-radius: 4px;
  letter-spacing: 0.3px;
}
.temple-card-names {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 3px;
}
.temple-chinese-name {
  font-family: var(--font-chinese);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--color-maroon);
}
.temple-deity-line {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  color: var(--color-forest);
  margin-bottom: 3px;
}
.temple-deity-icon {
  font-size: 12px;
}
.temple-deity-name {
  font-weight: 600;
}
.temple-domain-chip {
  font-size: 10px;
  background: #EBF3EC;
  color: #2D5E4A;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
}
.temple-card-meta-row {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-bottom: 3px;
}
.temple-rating-star {
  color: #B8860B;
  font-weight: 700;
}
.temple-review-count {
  font-size: 11px;
  color: #756D65;
}
.temple-meta-dot {
  color: #D6CEC3;
}
.temple-state-badge {
  font-weight: 600;
  color: #5D544E;
}
.temple-card-address {
  font-size: 11px;
  color: #9E968D;
  margin-bottom: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 220px;
}

/* Load More Button */
.btn-load-more {
  width: 100%;
  padding: 13px;
  margin: 14px 0 20px 0;
  background: #FFFDF9;
  border: 1px solid #DECFC0;
  border-radius: 16px;
  color: #96282E;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: var(--shadow-sm);
}
.btn-load-more:hover {
  background: #F8EFE4;
  transform: translateY(-1px);
}

/* State Picker Modal Sheet */
.state-picker-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(36, 29, 27, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.state-picker-sheet {
  background: #FFFDF9;
  width: 100%;
  max-height: 85%;
  border-radius: 28px 28px 0 0;
  padding: 20px 18px max(24px, env(safe-area-inset-bottom)) 18px;
  overflow-y: auto;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  animation: slideUpDrawer 0.25s ease-out;
}
.state-picker-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #EBE3D7;
}
.state-picker-header h3 {
  font-size: 17px;
  font-weight: 700;
  color: #241D1B;
}
.state-picker-header p {
  font-size: 12px;
  color: #756D65;
  margin-top: 2px;
}
.state-picker-close {
  background: #EFE8DF;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 13px;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: #756D65;
}

@keyframes locateSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.map-locate-btn.locating-spin svg {
  animation: locateSpin 0.75s linear infinite;
}

.gps-detect-banner-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #FAF4EB, #F2E7D7);
  border: 1.5px solid #D8C6B1;
  border-radius: 16px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
  box-sizing: border-box;
}
.gps-detect-banner-btn:hover {
  background: linear-gradient(135deg, #F5ECE0, #EADBC8);
  border-color: #C89B67;
  transform: translateY(-1px);
}

.state-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #F4EFE6;
  border: 1px solid #E2D7C7;
  border-radius: 12px;
  padding: 8px 12px;
  margin-bottom: 12px;
}
.state-search-box input {
  border: none;
  background: transparent;
  width: 100%;
  font-size: 13px;
  font-family: inherit;
  color: var(--text-primary);
  outline: none;
}
.city-search-results-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 180px;
  overflow-y: auto;
  margin-bottom: 12px;
  background: #FFF;
  border: 1px solid #EBE3D7;
  border-radius: 12px;
  padding: 6px;
}
.city-search-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 8px;
  background: #FAF7F2;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease;
}
.city-search-item:hover {
  background: #F2E8DA;
}
.city-item-name {
  font-size: 13px;
  font-weight: 700;
  color: #241D1B;
}
.city-item-state {
  font-size: 11px;
  color: #8F5B3E;
}

.state-grid-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.state-choice-card {
  background: #FAF7F2;
  border: 1px solid #E5DCCE;
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}
.state-choice-card:hover {
  background: #F4EDE2;
  border-color: #C89B67;
}
.state-choice-card.selected {
  background: #F8ECE7;
  border-color: #96282E;
  box-shadow: 0 0 0 1px #96282E;
}
.state-choice-en {
  font-size: 13px;
  font-weight: 700;
  color: #241D1B;
}
.state-choice-zh {
  font-size: 11px;
  font-family: var(--font-chinese);
  color: #8F5B3E;
}
.state-choice-badge {
  background: #EFE5D7;
  color: #96282E;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 9999px;
}
.state-choice-card.selected .state-choice-badge {
  background: #96282E;
  color: #FFF;
}

/* AI Funnel Trigger Card (Compact & Zero-Overflow) */
.ai-funnel-trigger-card {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  box-sizing: border-box !important;
  margin-top: 2px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #FAF2E6 0%, #F5E5D0 100%);
  border: 1px solid #D6BFA4;
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: 0 2px 8px rgba(150, 40, 46, 0.06);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.ai-funnel-compact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}
.ai-funnel-tag-group {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  flex: 1;
}
.ai-funnel-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #96282E;
  color: #FFF;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  padding: 2.5px 8px;
  border-radius: var(--radius-pill);
  flex-shrink: 0;
  white-space: nowrap;
}
.ai-funnel-compact-title {
  font-size: 12px;
  font-weight: 600;
  color: #5C1D21;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.btn-start-funnel-compact {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #96282E;
  color: #FFF;
  border: none;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
  box-shadow: 0 1px 4px rgba(150, 40, 46, 0.2);
}
.btn-start-funnel-compact:hover {
  background: #7D1F24;
}
.btn-start-funnel-compact:active {
  transform: scale(0.96);
}
.ai-funnel-quick-wishes {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  box-sizing: border-box;
}
.ai-funnel-quick-wishes::-webkit-scrollbar {
  display: none;
}
.quick-wish-chip {
  background: #FFFFFF;
  border: 1px solid #D9C8B5;
  border-radius: var(--radius-pill);
  padding: 3.5px 9px;
  font-size: 11px;
  font-weight: 600;
  color: #4A3A2F;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  flex-shrink: 0;
}
.quick-wish-chip:hover {
  background: #96282E;
  color: #FFF;
  border-color: #96282E;
}

/* Map View Toggle Button */
.map-view-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #FAF6F0;
  border: 1px solid var(--color-sand-border);
  color: #5A4E46;
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s ease;
}
.map-view-toggle-btn:hover,
.map-view-toggle-btn.active {
  background: #96282E;
  border-color: #96282E;
  color: #FFF;
}
.map-view-toggle-btn.active .map-toggle-text {
  color: #FFF;
}

/* AI Funnel Modal Sheet */
.ai-funnel-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(36, 29, 27, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn 0.2s ease-out;
}
.ai-funnel-sheet {
  background: #FFFDF9;
  width: 100%;
  max-width: 520px;
  max-height: 88%;
  border-radius: 28px 28px 0 0;
  padding: 20px 20px max(28px, env(safe-area-inset-bottom)) 20px;
  overflow-y: auto;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  animation: slideUpDrawer 0.25s ease-out;
  box-sizing: border-box;
}
.ai-funnel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #ECE3D5;
}
.ai-funnel-header h3 {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  color: #241D1B;
}
.ai-funnel-header p {
  font-size: 12px;
  color: #756D65;
  margin-top: 2px;
}
.ai-funnel-close-btn {
  background: #EFE8DF;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: #756D65;
  transition: background 0.15s ease;
}
.ai-funnel-close-btn:hover {
  background: #E2D7CA;
  color: #241D1B;
}

/* Funnel Stepper Progress Bar */
.ai-funnel-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 0 4px;
}
.funnel-step-node {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: #9C8E80;
  cursor: pointer;
}
.funnel-step-node.active {
  color: #96282E;
  font-weight: 700;
}
.funnel-step-node.completed {
  color: #1D4B3E;
}
.step-circle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid #D5C7B5;
  background: #FAF6EF;
  display: grid;
  place-items: center;
  font-size: 11px;
}
.funnel-step-node.active .step-circle {
  border-color: #96282E;
  background: #96282E;
  color: #FFF;
}
.funnel-step-node.completed .step-circle {
  border-color: #1D4B3E;
  background: #EAF3EC;
  color: #1D4B3E;
}
.funnel-step-line {
  flex: 1;
  height: 2px;
  background: #E8DECF;
  margin: 0 8px;
}
.funnel-step-line.active {
  background: #96282E;
}

/* Funnel Step View Containers */
.funnel-step-content {
  display: none;
  animation: fadeIn 0.2s ease;
}
.funnel-step-content.active {
  display: block;
}
.funnel-step-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #241D1B;
  margin-bottom: 4px;
}
.funnel-step-sub {
  font-size: 12px;
  color: #756D65;
  margin-bottom: 14px;
}

/* Selection Grids */
.funnel-options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}
.funnel-option-card {
  background: #FAF7F2;
  border: 1.5px solid #E5DCCE;
  border-radius: 14px;
  padding: 12px 10px;
  cursor: pointer;
  text-align: left;
  transition: all 0.18s ease;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.funnel-option-card:hover {
  background: #F4ECE0;
  border-color: #C89B67;
  transform: translateY(-1px);
}
.funnel-option-card.selected {
  background: #F8ECE7;
  border-color: #96282E;
  box-shadow: 0 0 0 1px #96282E;
}
.funnel-opt-icon {
  font-size: 24px;
  margin-bottom: 2px;
}
.funnel-opt-label {
  font-size: 13px;
  font-weight: 700;
  color: #241D1B;
}
.funnel-opt-desc {
  font-size: 11px;
  color: #756D65;
  line-height: 1.35;
}

/* Funnel Navigation Footer */
.funnel-nav-row {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #ECE3D5;
}
.btn-funnel-prev {
  padding: 10px 18px;
  background: #FAF7F2;
  border: 1px solid #D9C8B5;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  color: #5C4E43;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-funnel-prev:hover {
  background: #F0E6D8;
}
.btn-funnel-next {
  flex: 1;
  padding: 10px 18px;
  background: linear-gradient(135deg, #96282E 0%, #7D1F24 100%);
  color: #FFF;
  border: none;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(150, 40, 46, 0.2);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn-funnel-next:hover {
  background: linear-gradient(135deg, #A82F36 0%, #8C2329 100%);
  transform: translateY(-1px);
}

/* Step 4: AI Recommendations Matches List */
.ai-results-banner {
  background: linear-gradient(135deg, #FAF4EB, #F2E7D7);
  border: 1px solid #D8C6B1;
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 12.5px;
  color: #5C402E;
  line-height: 1.45;
}
.ai-match-cards-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}
.ai-match-card {
  background: #FFF;
  border: 1.5px solid #EBE4DA;
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.2s ease;
}
.ai-match-card:hover {
  border-color: #96282E;
}
.ai-match-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ai-score-pill {
  background: #EAF3EC;
  color: #1D4B3E;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.ai-match-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.ai-tag-chip {
  background: #FAF2E8;
  color: #8C5B32;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 6px;
}
.ai-match-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #241D1B;
}
.ai-match-zh {
  font-size: 12px;
  color: #8C5B32;
  font-family: var(--font-chinese);
  margin-left: 6px;
}
.ai-match-reason-box {
  background: #FAF7F2;
  border-left: 3px solid #96282E;
  padding: 8px 10px;
  border-radius: 0 8px 8px 0;
  font-size: 11.5px;
  color: #5C483B;
  line-height: 1.4;
}
.ai-match-btn-row {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}
.btn-view-match {
  flex: 1;
  background: #96282E;
  color: #FFF;
  border: none;
  border-radius: var(--radius-pill);
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}
.btn-apply-matches-to-main {
  width: 100%;
  background: #1D4B3E;
  color: #FFF;
  border: none;
  border-radius: var(--radius-pill);
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 8px;
}
.btn-apply-matches-to-main:hover {
  background: #255C4C;
}

/* Extended Filter Pills */
.pill-btn.pill-ai-highlight {
  background: linear-gradient(135deg, #FAF0E4 0%, #F5DFCA 100%);
  border-color: #C89B67;
  color: #96282E;
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(150, 40, 46, 0.1);
}
.pill-btn.pill-ai-highlight:hover,
.pill-btn.pill-ai-highlight.active {
  background: linear-gradient(135deg, #96282E 0%, #7D1F24 100%) !important;
  color: #FFF !important;
  border-color: #96282E !important;
}

/* Guide Card */
.guide-card {
  margin-top: 14px;
  background-color: var(--color-sand-card);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  border: 1px solid var(--color-sand-border);
}
.guide-icon-box {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background-color: #FAF7F2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-gold);
}
.guide-text h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.guide-text p {
  font-size: 12px;
  color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   03 / AI GUIDANCE (CHAT SCREEN - PINNED INPUT DOCK, SCROLLABLE CHAT ONLY)
   -------------------------------------------------------------------------- */
.view-viewport.chat-viewport-mode {
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  min-height: 0 !important;
  height: 100% !important;
  flex: 1 1 0% !important;
}

.chat-viewport-mode + .app-bottom-nav {
  padding-top: 2px !important;
  padding-bottom: 4px !important;
  box-shadow: 0 -1px 4px rgba(0, 0, 0, 0.04) !important;
}
.chat-viewport-mode + .app-bottom-nav .nav-tab-item {
  min-height: 40px !important;
  padding: 4px 2px 2px 2px !important;
}

.ai-chat-layout {
  height: 100%;
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  background-color: var(--bg-parchment);
  min-height: 0;
  flex: 1 1 0%;
}

.ai-chat-header-section {
  flex-shrink: 0;
  padding: 6px 14px;
  background: var(--bg-parchment);
  border-bottom: 1px solid rgba(220, 201, 174, 0.45);
  z-index: 10;
}

.ai-topic-bar-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ai-topic-pills-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 0 !important;
  flex-wrap: nowrap !important;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.ai-topic-pills-row::-webkit-scrollbar {
  display: none;
}

.ai-privacy-mini {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
  color: #7D7266;
  flex-shrink: 0;
  background: rgba(235, 227, 214, 0.7);
  padding: 4px 8px;
  border-radius: 12px;
  border: 1px solid rgba(214, 206, 195, 0.4);
}
.ai-reset-chat-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
  color: #7D7266;
  flex-shrink: 0;
  background: rgba(235, 227, 214, 0.7);
  padding: 4px 8px;
  border-radius: 12px;
  border: 1px solid rgba(214, 206, 195, 0.4);
  cursor: pointer;
  transition: all 0.15s ease;
}
.ai-reset-chat-btn:hover {
  background: #E5DACB;
  color: #241D1B;
}

/* ONLY the conversation area is scrollable */
.ai-chat-scroll-area {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px 14px;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ai-chat-scroll-area::-webkit-scrollbar {
  width: 4px;
}
.ai-chat-scroll-area::-webkit-scrollbar-thumb {
  background-color: rgba(150, 40, 46, 0.15);
  border-radius: 4px;
}

/* Chat Bubbles */
.chat-messages-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.user-bubble {
  align-self: flex-end;
  max-width: 82%;
  background-color: var(--color-maroon);
  color: #FFF;
  border-radius: 14px 14px 4px 14px;
  padding: 8px 12px;
  font-size: 13.5px;
  line-height: 1.4;
  box-shadow: 0 1px 4px rgba(150, 40, 46, 0.15);
}

.assistant-message-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 90%;
}
.assistant-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: #F7EFE3;
  border: 1px solid #E5D6C1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 4px;
}

.assistant-bubble {
  background-color: #FFF;
  border: 1px solid #EBE5DC;
  border-radius: 14px 14px 14px 4px;
  padding: 10px 14px;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--text-primary);
  box-shadow: 0 1px 4px rgba(36, 29, 27, 0.05);
}

/* Master Persona Header Badge in Bubble */
.assistant-persona-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #FAF3E8;
  border: 1px solid #E5D5BF;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  margin-bottom: 6px;
}
.persona-gold-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #C89B67;
  box-shadow: 0 0 5px rgba(200, 155, 103, 0.6);
  flex-shrink: 0;
}
.persona-name {
  font-size: 11px;
  font-weight: 700;
  color: #7D1F24;
  letter-spacing: 0.2px;
}
.persona-title {
  font-size: 9.5px;
  font-weight: 500;
  color: #756D65;
  border-left: 1px solid #DFD2BF;
  padding-left: 5px;
}

/* AI Thinking Animated State */
.ai-thinking-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 90%;
  margin-bottom: 14px;
  animation: aiThinkingFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.ai-thinking-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.ai-master-avatar {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #FAF1E4;
  border: 1.5px solid #D8C3A5;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.ai-master-lotus-icon {
  width: 20px;
  height: 20px;
  animation: masterIconFloat 3s ease-in-out infinite;
}

@keyframes masterIconFloat {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-1.5px) scale(1.04);
  }
}

.ai-thinking-halo {
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 155, 103, 0.4) 0%, rgba(200, 155, 103, 0) 70%);
  animation: masterHaloPulse 2.4s ease-in-out infinite;
  z-index: 1;
}

@keyframes masterHaloPulse {
  0%, 100% {
    transform: scale(0.95);
    opacity: 0.35;
  }
  50% {
    transform: scale(1.25);
    opacity: 0.95;
  }
}

.ai-thinking-content {
  background-color: #FFFFFF;
  border: 1px solid #EAE2D5;
  border-radius: 18px 18px 18px 4px;
  padding: 12px 16px;
  box-shadow: 0 4px 16px rgba(36, 29, 27, 0.05);
}

.ai-thinking-master-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #FAF3E8;
  border: 1px solid #E5D5BF;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  margin-bottom: 8px;
}

.ai-thinking-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #C89B67;
  animation: masterDotGlow 1.6s ease-in-out infinite alternate;
}

@keyframes masterDotGlow {
  from { opacity: 0.4; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1.2); }
}

.ai-thinking-name {
  font-size: 11px;
  font-weight: 700;
  color: #7D1F24;
}

.ai-thinking-role {
  font-size: 10px;
  color: #756D65;
  border-left: 1px solid #DFD2BF;
  padding-left: 5px;
}

.ai-thinking-text-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: #241D1B;
  font-weight: 500;
}

.zen-dots-wave {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.zen-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #C89B67;
  display: inline-block;
  animation: zenDotWave 1.4s ease-in-out infinite;
}

.zen-dot:nth-child(2) {
  animation-delay: 0.2s;
  background: #96282E;
}

.zen-dot:nth-child(3) {
  animation-delay: 0.4s;
  background: #1D4B3E;
}

@keyframes zenDotWave {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  30% {
    transform: translateY(-5px);
    opacity: 1;
  }
}

.ai-thinking-subtext {
  font-size: 11px;
  color: #8C8276;
  margin-top: 5px;
  font-style: italic;
}

/* Structured Step Card */
.ai-step-card {
  margin-top: 10px;
  background-color: #FFF;
  border: 1px solid #EAE2D5;
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}
.ai-step-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--color-maroon);
  background: #FDF3E7;
  padding: 2px 8px;
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 6px;
}
.ai-step-card h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}
.ai-step-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 12px;
}
.ai-step-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-maroon);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid rgba(150, 40, 46, 0.2);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  transition: all 0.2s ease;
}
.ai-step-action:hover {
  background-color: #F8ECE7;
}

/* AI Funneling Interactive Chips */
.ai-funnel-chips-group {
  margin-top: 14px;
  background: #FFFDF9;
  border: 1px solid #EBE2D5;
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 2px 8px rgba(150, 40, 46, 0.04);
}
.ai-funnel-prompt-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #96282E;
  margin-bottom: 8px;
}
.ai-funnel-chips {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.ai-funnel-chip {
  background: #FAF6EE;
  border: 1px solid #DFD5C6;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #241D1B;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.ai-funnel-chip:hover {
  background: #F5EBE1;
  border-color: #96282E;
  color: #96282E;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(150, 40, 46, 0.12);
}
.ai-funnel-chip:active {
  transform: translateY(0);
}

/* AI Inline Suggested Temple Card in Chat */
.ai-suggested-temple-card {
  margin-top: 12px;
  background: linear-gradient(135deg, #FFFDF9 0%, #FAF3E8 100%);
  border: 1px solid #E5D5C3;
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 2px 8px rgba(150, 40, 46, 0.06);
}
.ai-temple-card-top {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 8px;
}
.ai-temple-thumb {
  width: 58px;
  height: 58px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid #E8DEC8;
  background-color: #EFE8DE;
}
.ai-temple-info {
  flex: 1;
  min-width: 0;
}
.ai-temple-badge {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #96282E;
  background: #FDF3E7;
  padding: 2px 6px;
  border-radius: 4px;
  margin-bottom: 3px;
}
.ai-temple-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #241D1B;
  line-height: 1.25;
  margin-bottom: 2px;
}
.ai-temple-zh {
  font-size: 11.5px;
  font-weight: 500;
  color: #8F5B3E;
  margin-left: 3px;
}
.ai-temple-meta {
  font-size: 11px;
  color: #756D65;
  line-height: 1.3;
}
.ai-temple-reason {
  font-size: 12px;
  line-height: 1.45;
  color: #52443B;
  background: rgba(255, 255, 255, 0.75);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 10px;
  border-left: 2.5px solid #96282E;
}
.ai-temple-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.ai-btn-view-temple {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #96282E;
  color: #FFF;
  border: none;
  font-size: 11.5px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(150, 40, 46, 0.2);
}
.ai-btn-view-temple:hover {
  background: #7D1F24;
}
.ai-btn-open-directions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #FFF;
  color: #5A4E46;
  border: 1px solid #D6C8B8;
  font-size: 11.5px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}
.ai-btn-open-directions:hover {
  background: #F4EBE1;
  color: #241D1B;
}


/* === AI Chat Redesign: Hero text, follow chips, triggered carousel === */

/* Hero message text — compact, readable, spiritual */
.ai-message-text {
  font-size: 13.5px;
  line-height: 1.55;
  color: #241D1B;
  white-space: pre-line;
  letter-spacing: 0.005em;
  margin: 3px 0 8px 0;
  font-weight: 400;
}
.ai-message-text strong {
  font-weight: 700;
  color: #1F1917;
}
.ai-message-text em {
  font-style: italic;
  color: #61564C;
}
.ai-message-text code {
  font-size: 12px;
  background: #F3EAE0;
  padding: 1px 5px;
  border-radius: 4px;
}

/* Suggested contextual question prompt chips */
.ai-suggest-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
  margin-bottom: 6px;
}
.ai-suggest-prompt-chip {
  display: inline-flex;
  align-items: center;
  font-size: 11.5px;
  font-weight: 500;
  color: #6B4E36;
  background: #FAF2E6;
  border: 1px solid #E5D5BF;
  border-radius: 14px;
  padding: 4px 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.3;
}
.ai-suggest-prompt-chip:hover {
  background: #F3E4CF;
  border-color: #C9A97C;
  color: #241D1B;
}

/* Inline Temple Recommendation Card directly in chat */
.ai-inline-temple-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #FFFDF9;
  border: 1px solid #E5D7C5;
  border-radius: 12px;
  padding: 8px 10px;
  margin: 6px 0;
  box-shadow: 0 1px 4px rgba(36, 29, 27, 0.04);
}
.ai-inline-temple-thumb {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid #EBE2D5;
}
.ai-inline-temple-info {
  flex: 1;
  min-width: 0;
}
.ai-inline-temple-name {
  font-size: 12.5px;
  font-weight: 700;
  color: #241D1B;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ai-inline-temple-sub {
  font-size: 11px;
  color: #7A6F64;
  margin: 2px 0 4px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ai-inline-temple-actions {
  display: flex;
  gap: 6px;
}
.ai-inline-btn {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 12px;
  border: 1px solid #D6C8B8;
  background: #FAF4EB;
  color: #554A43;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: all 0.15s ease;
}
.ai-inline-btn:hover {
  background: #F0E2D0;
  color: #241D1B;
}
.ai-inline-dir-btn {
  background: #7D1F24;
  border-color: #7D1F24;
  color: #FFF;
}
.ai-inline-dir-btn:hover {
  background: #65171B;
  color: #FFF;
}

/* Follow-up action chips row — shown after latest AI message */
.ai-follow-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}
.ai-follow-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 600;
  color: #554A43;
  background: #FAF4EB;
  border: 1px solid #E2D4C2;
  border-radius: 18px;
  padding: 5px 11px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.12s ease;
  white-space: nowrap;
}
.ai-follow-chip:hover {
  background: #F3E8D8;
  border-color: #C9A97C;
  color: #241D1B;
}
.ai-follow-chip.active {
  background: #7D1F24;
  border-color: #7D1F24;
  color: #FFF8EE;
  transform: scale(0.97);
}

/* Carousel zone that slides in when a follow chip is tapped */
.ai-follow-carousel-zone {
  animation: slideDownFade 0.28s cubic-bezier(0.16, 1, 0.3, 1) both;
  margin-bottom: 6px;
}
@keyframes slideDownFade {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.ai-follow-carousel-wrap {
  background: #FFFDF9;
  border: 1px solid #E6D8C8;
  border-radius: 14px;
  overflow: hidden;
  padding: 10px 10px 12px 10px;
}
.ai-follow-carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 2px 6px 2px;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.ai-follow-carousel::-webkit-scrollbar { height: 3px; }
.ai-follow-carousel::-webkit-scrollbar-thumb {
  background: rgba(150, 40, 46, 0.18);
  border-radius: 4px;
}
.ai-follow-carousel-loading {
  padding: 10px 0;
}

/* Carousel card inside follow carousel (reuses shared card styles) */
.ai-follow-carousel-card {
  flex: 0 0 200px;
  width: 200px;
  scroll-snap-align: start;
  background: #FFFFFF;
  border: 1px solid #E8DEC8;
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 2px 6px rgba(36, 29, 27, 0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.ai-follow-carousel-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 14px rgba(36, 29, 27, 0.08);
}
.ai-follow-carousel-card.is-service-card {
  border-color: #EBD3BE;
  background: linear-gradient(180deg, #FFFFFF 0%, #FFFDF9 100%);
}
.ai-follow-carousel-card.is-temple-card {
  border-color: #DBBFA0;
}
.ai-temple-carousel-thumb {
  width: 100%;
  height: 90px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid #EBE2D5;
  background-color: #FAF4EB;
}
.ai-carousel-badge.badge-temple {
  color: #7D1F24;
  background: #FEF0E7;
  border: 1px solid #F5CECD;
}

/* Comfort row spacing */
.ai-comfort-row {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}

/* AI Expandable Carousel Offerings Tray in Chat */
.ai-upsell-tray {

  margin-top: 12px;
  background: #FFFDF9;
  border: 1px solid #E6D8C8;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 3px 12px rgba(36, 29, 27, 0.05);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.ai-upsell-tray-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: linear-gradient(135deg, #FAF4EB 0%, #F5ECDF 100%);
  border-bottom: 1px solid #EBE0D3;
  cursor: pointer;
  user-select: none;
}
.ai-upsell-tray-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ai-upsell-tray-icon {
  font-size: 16px;
  line-height: 1;
}
.ai-upsell-tray-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #7D1F24;
  line-height: 1.2;
}
.ai-upsell-tray-sub {
  font-size: 10.5px;
  color: #7A6F64;
  margin-top: 1px;
}
.ai-upsell-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #96282E;
  background: #FFF;
  border: 1px solid #E5D5C3;
  padding: 4px 9px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.ai-upsell-toggle-btn:hover {
  background: #FAF2E8;
}
.ai-upsell-chevron {
  width: 12px;
  height: 12px;
  transition: transform 0.2s ease;
}
.ai-upsell-tray.is-collapsed .ai-upsell-chevron {
  transform: rotate(-90deg);
}
.ai-upsell-tray.is-collapsed .ai-upsell-tray-body {
  display: none;
}
.ai-upsell-tray-body {
  padding: 10px 12px 14px 12px;
}
.ai-upsell-carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 2px 8px 2px;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.ai-upsell-carousel::-webkit-scrollbar {
  height: 4px;
}
.ai-upsell-carousel::-webkit-scrollbar-thumb {
  background: rgba(150, 40, 46, 0.2);
  border-radius: 4px;
}
.ai-carousel-card {
  flex: 0 0 215px;
  width: 215px;
  scroll-snap-align: start;
  background: #FFFFFF;
  border: 1px solid #E8DEC8;
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 2px 6px rgba(36, 29, 27, 0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.ai-carousel-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 14px rgba(36, 29, 27, 0.08);
}
.ai-carousel-card.is-service-card {
  border-color: #EBD3BE;
  background: linear-gradient(180deg, #FFFFFF 0%, #FFFDF9 100%);
}
.ai-carousel-card-top {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin-bottom: 8px;
}
.ai-carousel-thumb {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid #EBE2D5;
  background-color: #FAF4EB;
}
.ai-carousel-info {
  flex: 1;
  min-width: 0;
}
.ai-carousel-badge {
  display: inline-block;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  padding: 2px 5px;
  border-radius: 4px;
  margin-bottom: 3px;
  text-transform: uppercase;
}
.ai-carousel-badge.badge-service {
  color: #8C252B;
  background: #FEECEB;
  border: 1px solid #F5CECD;
}
.ai-carousel-badge.badge-product {
  color: #1E523A;
  background: #E8F4EE;
  border: 1px solid #CDE6D9;
}
.ai-carousel-name {
  font-size: 12px;
  font-weight: 700;
  color: #241D1B;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ai-carousel-zh {
  font-size: 10.5px;
  color: #8F5B3E;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ai-carousel-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 3px;
}
.ai-carousel-price {
  font-size: 12.5px;
  font-weight: 700;
  color: #96282E;
}
.ai-carousel-pitch {
  font-size: 10.5px;
  line-height: 1.4;
  color: #554A43;
  background: #FBF8F2;
  border-radius: 6px;
  padding: 6px 8px;
  margin-bottom: 8px;
  border-left: 2px solid #C89B67;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ai-carousel-card-actions {
  display: flex;
  gap: 6px;
}
.ai-carousel-btn-details {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #FFF;
  color: #554A43;
  border: 1px solid #D6C8B8;
  font-size: 10.5px;
  font-weight: 600;
  padding: 5px 6px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.ai-carousel-btn-details:hover {
  background: #F4EBE1;
  color: #241D1B;
}
.ai-carousel-btn-add {
  flex: 1.2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: #1E523A;
  color: #FFF;
  border: none;
  font-size: 10.5px;
  font-weight: 600;
  padding: 5px 8px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.ai-carousel-btn-add:hover {
  background: #153C2A;
}
.is-service-card .ai-carousel-btn-add {
  background: #96282E;
}
.is-service-card .ai-carousel-btn-add:hover {
  background: #7D1F24;
}

/* AI Inline Product & Service Upsell Card in Chat */
.ai-upsell-item-card {
  margin-top: 10px;
  background: linear-gradient(135deg, #FFFCF7 0%, #F8F3EA 100%);
  border: 1px solid #E5D5C3;
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 2px 8px rgba(30, 60, 45, 0.05);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.ai-upsell-item-card.is-service-card {
  background: linear-gradient(135deg, #FFFDF8 0%, #FAF1E5 100%);
  border-color: #EBD3BE;
}
.ai-upsell-top {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 8px;
}
.ai-upsell-thumb {
  width: 58px;
  height: 58px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid #E5D9C7;
  background-color: #FAF4EB;
}
.ai-upsell-info {
  flex: 1;
  min-width: 0;
}
.ai-upsell-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: 4px;
  margin-bottom: 3px;
  text-transform: uppercase;
}
.ai-upsell-badge.badge-service {
  color: #8C252B;
  background: #FEECEB;
  border: 1px solid #F5CECD;
}
.ai-upsell-badge.badge-product {
  color: #1E523A;
  background: #E8F4EE;
  border: 1px solid #CDE6D9;
}
.ai-upsell-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #241D1B;
  line-height: 1.25;
  margin-bottom: 3px;
}
.ai-upsell-zh {
  font-size: 11.5px;
  font-weight: 500;
  color: #8F5B3E;
  margin-left: 2px;
}
.ai-upsell-price-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.ai-upsell-price {
  font-size: 13px;
  font-weight: 700;
  color: #96282E;
}
.ai-upsell-status-tag {
  font-size: 10px;
  color: #2E6B4E;
  font-weight: 600;
  background: rgba(46, 107, 78, 0.08);
  padding: 1px 5px;
  border-radius: 4px;
}
.ai-upsell-pitch {
  font-size: 11.5px;
  line-height: 1.45;
  color: #554A43;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 8px;
  padding: 7px 10px;
  margin-bottom: 10px;
  border-left: 2.5px solid #1E523A;
}
.is-service-card .ai-upsell-pitch {
  border-left-color: #96282E;
}
.ai-upsell-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.ai-btn-view-product {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #FFF;
  color: #554A43;
  border: 1px solid #D6C8B8;
  font-size: 11.5px;
  font-weight: 600;
  padding: 6px 11px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.15s ease;
}
.ai-btn-view-product:hover {
  background: #F4EBE1;
  color: #241D1B;
}
.ai-btn-add-cart {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #1E523A;
  color: #FFF;
  border: none;
  font-size: 11.5px;
  font-weight: 600;
  padding: 6px 13px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(30, 82, 58, 0.2);
}
.ai-btn-add-cart:hover {
  background: #153C2A;
}
.is-service-card .ai-btn-add-cart {
  background: #96282E;
  box-shadow: 0 1px 3px rgba(150, 40, 46, 0.2);
}
.is-service-card .ai-btn-add-cart:hover {
  background: #7D1F24;
}



/* Chat Footer Dock - Pinned at bottom, never scrolls with chat */
.ai-chat-footer-dock {
  flex-shrink: 0;
  padding: 8px 16px 10px 16px;
  background: #FFFDF9;
  border-top: 1px solid #ECE4DA;
  box-shadow: 0 -4px 16px rgba(36, 29, 27, 0.05);
  z-index: 20;
}

.quick-chips-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.quick-chips-row::-webkit-scrollbar {
  display: none;
}

.quick-chip {
  background: #F4EFEB;
  border: 1px solid var(--color-sand-border);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.quick-chip:hover {
  background: #EBE3D8;
  color: var(--text-primary);
}

/* Chat Input Bar */
.chat-input-bar {
  display: flex;
  align-items: center;
  background: #FAF7F2;
  border: 1px solid var(--color-sand-border);
  border-radius: var(--radius-pill);
  padding: 5px 6px 5px 16px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 6px;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.chat-input-bar:focus-within {
  background: #FFF;
  border-color: #C89B67;
  box-shadow: 0 0 0 2px rgba(200, 155, 103, 0.2);
}
.chat-input-field {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
}
.chat-input-field::placeholder {
  color: var(--text-muted);
}
.chat-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--color-maroon);
  color: #FFF;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-left: 6px;
  transition: transform 0.15s ease;
  flex-shrink: 0;
}
.chat-send-btn:hover {
  transform: scale(1.05);
}
.ai-disclaimer {
  text-align: center;
  font-size: 10.5px;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   04 / INNER PEACE (MEDITATION & MOOD SCREEN)
   -------------------------------------------------------------------------- */
#peace.view-screen,
.peace-view-content {
  padding: 8px 18px clamp(88px, 18vh, 140px) 18px;
  overflow-y: visible;
  box-sizing: border-box;
}

.peace-headline {
  font-family: var(--font-serif);
  font-size: clamp(20px, 5.5vw, 25px);
  font-weight: 600;
  color: var(--color-forest);
  text-align: center;
  line-height: 1.25;
  margin: 6px 10px 4px 10px;
}
.peace-subheadline {
  text-align: center;
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-bottom: clamp(10px, 2.2vh, 18px);
}

.lotus-breathing-visual {
  position: relative;
  width: clamp(105px, 26vw, 145px);
  height: clamp(105px, 26vw, 145px);
  margin: 2px auto clamp(4px, 1.2vh, 8px) auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: radial-gradient(circle, #E5EFE7 0%, #EEF4F0 50%, rgba(251, 249, 245, 0) 72%);
}

.breath-circle-outer {
  position: absolute;
  width: 94%;
  height: 94%;
  border-radius: 50%;
  border: 1px solid #C4D7C7;
  opacity: 0.85;
}
.breath-circle-mid {
  position: absolute;
  width: 78%;
  height: 78%;
  border-radius: 50%;
  border: 1px solid #CFE0D1;
  opacity: 0.9;
}
.breath-circle-inner {
  position: absolute;
  width: 62%;
  height: 62%;
  border-radius: 50%;
  border: 1px solid #D8E7DA;
  opacity: 0.95;
}

.lotus-graphic-img {
  width: clamp(56px, 14vw, 78px);
  height: auto;
  max-height: 52%;
  z-index: 2;
  transition: transform 4s cubic-bezier(0.4, 0, 0.2, 1);
}

.breathe-caption-title {
  text-align: center;
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-bottom: 2px;
}
.breathe-caption-duration {
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: #4D735D;
  margin-bottom: clamp(8px, 1.6vh, 12px);
}

.btn-primary-forest {
  width: 100%;
  background-color: #265945;
  color: #FFF;
  border: none;
  border-radius: var(--radius-pill);
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(38, 89, 69, 0.22);
  margin-bottom: clamp(10px, 1.8vh, 14px);
  transition: background 0.15s ease, transform 0.15s ease;
}
.btn-primary-forest:hover {
  background-color: #1E4A39;
  transform: translateY(-1px);
}

.need-talk-card {
  background-color: #FAF7F2;
  border: 1px solid #EBE4D8;
  border-radius: var(--radius-lg);
  padding: 10px 14px;
  margin-bottom: clamp(10px, 1.8vh, 14px);
  box-shadow: var(--shadow-sm);
}
.need-talk-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.need-talk-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #E3EEE6;
  color: #265945;
  display: flex;
  align-items: center;
  justify-content: center;
}
.need-talk-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
}
.need-talk-desc {
  font-size: 11px;
  color: var(--text-secondary);
}

.need-talk-actions {
  display: flex;
  gap: 8px;
}
.btn-talk-chat {
  flex: 1;
  background-color: #265945;
  color: white;
  border: none;
  padding: 9px 12px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.btn-talk-chat:hover {
  background-color: #1E4A39;
}
.btn-talk-voice {
  flex: 1;
  background-color: #FFFFFF;
  color: #265945;
  border: 1.5px solid #265945;
  padding: 9px 12px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.btn-talk-voice:hover {
  background-color: #F4F8F5;
}

/* Mood Minimal Vector Faces Row */
.mood-checkin-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  margin-bottom: 16px;
  padding: 0 4px;
  overflow: visible;
}
.mood-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: transform 0.15s ease;
  flex-shrink: 0;
}
.mood-item:hover {
  transform: translateY(-2px);
}
.mood-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: visible;
}
.mood-face-svg {
  width: 42px;
  height: 42px;
  display: block;
}
.mood-item.selected .mood-circle {
  transform: scale(1.08);
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.12));
}
.mood-label {
  font-size: 11.5px;
  color: var(--text-secondary);
  font-weight: 500;
  text-align: center;
}

/* --------------------------------------------------------------------------
   05 / RETAIL (MEANINGFUL FINDS SCREEN)
   -------------------------------------------------------------------------- */
.retail-tabs-segmented {
  display: flex;
  background-color: #EDE7DC;
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 16px;
}
.retail-tab-btn {
  flex: 1;
  padding: 8px 12px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}
.retail-tab-btn.active {
  background-color: var(--color-maroon);
  color: white;
  box-shadow: var(--shadow-sm);
}

.retail-hero-banner {
  position: relative;
  background: linear-gradient(135deg, #96282E 0%, #7B1F24 100%);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  color: #FFF;
  overflow: hidden;
  margin-bottom: 20px;
}
.retail-hero-watermark {
  position: absolute;
  right: 12px;
  bottom: -10px;
  font-family: var(--font-chinese);
  font-size: 110px;
  color: rgba(255, 255, 255, 0.13);
  user-select: none;
  pointer-events: none;
}
.retail-hero-subtitle {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #F7C69A;
  margin-bottom: 4px;
}
.retail-hero-title {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.25;
  max-width: 70%;
}

.category-circles-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 22px;
}
.category-circle-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  width: 22%;
}
.cat-circle {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background-color: #F1ECE3;
  border: 1px solid #E5DDD0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7D6B5A;
  transition: all 0.2s ease;
}
.category-circle-item:hover .cat-circle,
.category-circle-item.active .cat-circle {
  background-color: #EFE5D5;
  border-color: var(--color-gold);
  transform: translateY(-2px);
}
.cat-label {
  font-size: 12px;
  color: var(--text-primary);
  font-weight: 500;
  text-align: center;
}

/* 2x2 Product Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}
.product-card {
  background: #FFF;
  border: 1px solid var(--color-sand-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}
.product-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.product-img-box {
  width: 100%;
  height: 130px;
  background-color: #FAF6EF;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 10px;
}
.product-img-svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-info-box {
  padding: 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}
.product-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
  line-height: 1.3;
}
.product-category-tag {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.product-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
}
.product-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-maroon);
}
.product-add-cart-btn {
  background: none;
  border: none;
  color: var(--color-maroon);
  cursor: pointer;
  padding: 4px;
}

/* --------------------------------------------------------------------------
   BOTTOM NAVIGATION (5 TABS) - Pixel-perfect fitment & touch alignment
   -------------------------------------------------------------------------- */
.app-bottom-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  background-color: #FFFFFF;
  border-top: 1px solid #ECE4DA;
  flex-shrink: 0;
  z-index: 50;
  margin: 0 auto;
  box-sizing: border-box;
  padding: 4px 6px 4px 6px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.03);
}

.bottom-nav-tabs {
  display: flex;
  justify-content: space-around;
  align-items: center;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}

.nav-tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: none;
  border: none;
  color: #8C827A;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 4px 5px 4px;
  min-height: 48px;
  border-radius: 12px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
  min-width: 0;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.nav-tab-item:active {
  transform: scale(0.92);
}
.nav-tab-item span {
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
  color: #8C827A;
  font-family: var(--font-sans);
  transition: color 0.15s ease;
  white-space: nowrap;
  letter-spacing: -0.2px;
}
.nav-tab-item svg {
  width: 22px;
  height: 22px;
  stroke: #8C827A;
  stroke-width: 1.8;
  fill: none;
  display: block;
  margin: 0 auto;
  transition: stroke 0.15s ease, transform 0.15s ease;
}
.nav-tab-item.active {
  color: var(--color-maroon);
  background-color: rgba(150, 40, 46, 0.05);
}
.nav-tab-item.active span {
  font-weight: 700;
  color: var(--color-maroon);
}
.nav-tab-item.active svg {
  stroke: var(--color-maroon);
  transform: translateY(-1px);
}

.home-indicator-bar {
  width: 134px;
  height: 4.5px;
  background-color: #1C1917;
  border-radius: 100px;
  margin: 6px auto 2px auto;
  flex-shrink: 0;
  display: block;
}

/* --------------------------------------------------------------------------
   MODALS, DRAWERS & DETAIL PANELS
   -------------------------------------------------------------------------- */
.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 2500;
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.modal-overlay.open {
  display: flex;
}

.bottom-drawer {
  width: 100%;
  max-height: 85%;
  background-color: var(--bg-parchment);
  border-radius: 28px 28px 0 0;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  position: relative;
  animation: slideUpDrawer 0.28s ease-out;
}

.drawer-header-bar {
  padding-top: 14px;
  padding-bottom: 6px;
  flex-shrink: 0;
  position: relative;
  background: var(--bg-parchment);
  border-radius: 28px 28px 0 0;
}

.drawer-body-scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 24px 20px 24px;
  min-height: 0;
}

.drawer-fixed-footer {
  flex-shrink: 0;
  padding: 12px 24px max(18px, env(safe-area-inset-bottom));
  background: var(--bg-parchment);
  border-top: 1px solid #EBE4D8;
  box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.08);
  z-index: 20;
}

.drawer-fixed-footer .btn-primary-forest {
  width: 100%;
  margin: 0;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 14px;
  display: block;
}

/* --------------------------------------------------------------------------
   FLUID RESPONSIVE DESIGN SYSTEM (SCALING UP & DOWN ACROSS SCREEN SIZES)
   Uses clamp() for smooth proportional typography, paddings, and asset sizes.
   -------------------------------------------------------------------------- */
button, input { font-family: inherit; }
body {
  align-items: flex-start;
  padding-top: clamp(0px, 2vh, 20px);
}
.app-viewport-wrapper {
  background: #FCF8F0;
  border-color: #D7CBB8;
}
.phone-status-bar {
  padding: clamp(10px, 2.5vw, 16px) clamp(16px, 4vw, 26px) 6px;
  font-size: clamp(12.5px, 3vw, 14.5px);
}
.app-header {
  padding: clamp(8px, 2vw, 12px) clamp(14px, 3.5vw, 20px) clamp(10px, 2.5vw, 14px);
  background: #FCF8F0;
}
.header-left { gap: clamp(8px, 2vw, 12px); }
.header-brand-mark {
  width: clamp(34px, 8.5vw, 42px);
  height: clamp(34px, 8.5vw, 42px);
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  background: #F7E0D4;
  color: var(--color-maroon);
}
.header-brand-mark img {
  width: clamp(22px, 5.5vw, 28px);
  height: clamp(22px, 5.5vw, 28px);
  filter: sepia(1) saturate(5) hue-rotate(315deg);
}
.header-title-group h1 {
  font-size: clamp(17px, 4.2vw, 21px);
  letter-spacing: -0.4px;
}
.header-subtitle {
  font-size: clamp(10.5px, 2.5vw, 12px);
  color: #9A806A;
  margin-top: 2px;
}
.home-header .header-left { gap: clamp(8px, 2vw, 12px); }
.home-header .header-title-group h1 {
  font-family: var(--font-chinese);
  font-size: clamp(22px, 5.5vw, 28px);
  line-height: 0.95;
}
.home-header .header-subtitle {
  letter-spacing: clamp(1.8px, 0.5vw, 3px);
  font-size: clamp(9px, 2.2vw, 10px);
}
.header-action-circle-btn {
  width: clamp(38px, 9.5vw, 44px);
  height: clamp(38px, 9.5vw, 44px);
}

/* Fluid Viewport Margins */
.view-viewport {
  background: #FCF8F0;
}
.view-viewport > * {
  margin-left: clamp(12px, 3.2vw, 20px);
  margin-right: clamp(12px, 3.2vw, 20px);
}
.view-viewport > .home-brand-lockup,
.view-viewport > .home-hero,
.view-viewport > .home-quick-grid,
.view-viewport > .home-checkin-card,
.view-viewport > .home-section-header,
.view-viewport > .home-temple-card {
  margin-left: clamp(12px, 3.2vw, 20px);
  margin-right: clamp(12px, 3.2vw, 20px);
}

.section-title {
  font-size: clamp(15px, 3.8vw, 18px);
  letter-spacing: -0.3px;
}
.section-header {
  margin: clamp(14px, 3.5vw, 20px) 0 clamp(8px, 2vw, 12px);
}
.search-input {
  height: clamp(44px, 10.5vw, 52px);
  padding-top: clamp(8px, 2vw, 12px);
  padding-bottom: clamp(8px, 2vw, 12px);
  border-radius: clamp(16px, 3.8vw, 22px);
  background: #FFFCF7;
  font-size: clamp(13px, 3vw, 14.5px);
}
.pill-group {
  gap: clamp(6px, 1.8vw, 10px);
  margin-bottom: clamp(10px, 2.5vw, 16px);
}
.pill-btn {
  padding: clamp(7px, 1.8vw, 9px) clamp(12px, 3vw, 18px);
  background: #F5EEE3;
  border-color: #E8DCC9;
  font-size: clamp(11.5px, 2.8vw, 13.5px);
}
.pill-btn.active {
  background: var(--color-maroon);
  border-color: var(--color-maroon);
}
.map-canvas-card {
  height: clamp(190px, 50vw, 260px);
  border-radius: clamp(18px, 4.5vw, 28px);
}
.temple-card {
  padding: clamp(10px, 2.5vw, 14px);
  border-radius: clamp(16px, 4vw, 22px);
  min-height: clamp(96px, 22vw, 120px);
}
.temple-thumb {
  width: clamp(86px, 21vw, 112px);
  height: clamp(74px, 18vw, 98px);
  border-radius: clamp(12px, 3vw, 16px);
  flex-shrink: 0;
}
.temple-card-title {
  font-size: clamp(14px, 3.6vw, 16.5px);
}
.temple-card-location {
  font-size: clamp(11.5px, 2.8vw, 12.5px);
}
.temple-action-link {
  font-size: clamp(11.5px, 2.8vw, 12.5px);
}
.guide-card {
  border-radius: clamp(16px, 4vw, 22px);
  background: #F3E9D8;
}

/* Home Screen Fluid Elements */
.home-brand-lockup {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(8px, 2vw, 12px);
  margin-top: 2px;
  margin-bottom: clamp(10px, 2.5vw, 16px);
  min-height: clamp(42px, 10vw, 52px);
}
.home-brand-left {
  display: flex;
  align-items: center;
  gap: clamp(8px, 2vw, 12px);
  flex-shrink: 0;
}
.home-brand-orb {
  width: clamp(38px, 9.5vw, 48px);
  height: clamp(38px, 9.5vw, 48px);
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #F7E0D4;
  flex-shrink: 0;
}
.home-brand-orb img {
  width: clamp(24px, 5.8vw, 30px);
  height: clamp(24px, 5.8vw, 30px);
  filter: sepia(1) saturate(5) hue-rotate(315deg);
}
.home-brand-titles {
  display: flex;
  flex-direction: column;
}
.home-brand-cn {
  font-family: var(--font-chinese);
  color: var(--color-maroon);
  font-size: clamp(22px, 5.5vw, 28px);
  font-weight: 700;
  line-height: 0.95;
}
.home-brand-en {
  color: #8A735F;
  letter-spacing: clamp(1.8px, 0.5vw, 3px);
  font-size: clamp(9px, 2.2vw, 10px);
  margin-top: 3px;
}
.home-header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 1;
  min-width: 0;
}
.home-location {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #6D6259;
  font-size: clamp(11px, 2.7vw, 13px);
  padding: 5px 9px;
  background: rgba(245, 238, 227, 0.7);
  border: 1px solid #EBE2D4;
  border-radius: 16px;
  white-space: nowrap;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.home-location span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.home-lang-btn {
  flex-shrink: 0;
  cursor: pointer;
}
.home-hero {
  height: clamp(125px, 22vw, 155px);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  margin-bottom: 10px;
  background: #6D1D1A;
}
.home-hero > img, .reading-hero > img, .services-hero > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.home-hero-overlay, .reading-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(72,15,14,.85), rgba(109,18,12,.3) 70%, rgba(91,14,10,.5));
}
.home-hero-content {
  position: absolute;
  inset: 0;
  padding: 10px 14px;
  color: #FFF8ED;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.home-eyebrow, .reading-eyebrow {
  font-size: clamp(9px, 2.2vw, 10.5px);
  font-weight: 700;
  letter-spacing: clamp(1.2px, 0.3vw, 2px);
}
.home-hero h2 {
  font-family: var(--font-serif);
  font-size: clamp(17px, 3.8vw, 22px);
  line-height: 1.1;
  font-weight: 500;
  margin: 2px 0;
}
.home-hero p {
  font-family: var(--font-chinese);
  font-size: clamp(11px, 2.5vw, 12.5px);
  color: #EFC7A5;
}
.home-hero-button {
  align-self: flex-start;
  margin-top: 4px;
  border: 0;
  border-radius: 999px;
  padding: 4px 12px;
  background: #FFF7EA;
  color: var(--color-maroon);
  font-size: 11px;
  font-weight: 700;
}
.home-hero-button span {
  font-size: 13px;
  margin-left: 6px;
  vertical-align: -1px;
}
.home-quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}
.home-quick-card {
  min-height: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 1px solid #E8DDCB;
  border-radius: 12px;
  background: #FFFCF7;
  color: var(--text-primary);
  font-size: clamp(10.5px, 2.5vw, 11.5px);
  font-weight: 600;
  cursor: pointer;
  padding: 6px 3px;
}
.home-quick-icon {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  font-size: 18px;
  line-height: 1;
}
.home-quick-icon.maroon { color: var(--color-maroon); }
.home-quick-icon.forest { color: #286B57; }
.home-quick-icon.gold { color: #A37B38; }
.home-checkin-card {
  background: #EAF0E5;
  border-radius: 14px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.home-checkin-eyebrow {
  color: #648272;
  font-size: 10px;
  letter-spacing: 1px;
  margin-bottom: 4px;
}
.home-checkin-card h3 {
  font-size: 13.5px;
  margin-bottom: 6px;
}
.home-checkin-pills {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.home-checkin-pills button {
  background: #F8FBF5;
  border: 1px solid #C7D7C5;
  color: #47705A;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
}
.home-section-header {
  margin-top: 4px;
}
.home-temple-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: #FFFCF7;
  border: 1px solid #E8DDCB;
  border-radius: 14px;
  margin-bottom: 8px;
  cursor: pointer;
}
.home-temple-card img {
  width: 74px;
  height: 74px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}
.home-temple-card h3 {
  font-size: 14px;
  margin-bottom: 2px;
}
.home-temple-card p {
  color: #8B7B6C;
  font-size: 11px;
  margin-bottom: 4px;
}
.home-temple-card a {
  color: var(--color-maroon);
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
}
.home-temple-card a span {
  font-size: 13px;
  margin-left: 4px;
}

/* Inner Peace Fluid Elements */
.peace-headline {
  font-family: var(--font-serif);
  font-size: clamp(20px, 5.2vw, 26px);
  font-weight: 600;
  color: var(--color-forest);
  text-align: center;
  line-height: 1.25;
  margin: clamp(8px, 2vw, 16px) clamp(8px, 2vw, 16px) clamp(4px, 1vw, 6px);
}
.peace-subheadline {
  text-align: center;
  font-size: clamp(12px, 2.8vw, 13.5px);
  margin-bottom: clamp(12px, 3vw, 18px);
  color: #8C9685;
}
.lotus-breathing-visual {
  width: clamp(170px, 44vw, 220px);
  height: clamp(170px, 44vw, 220px);
  margin: 0 auto clamp(10px, 2.5vw, 16px);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: radial-gradient(circle, #E5EFE7 0%, #EEF4F0 50%, rgba(251, 249, 245, 0) 72%);
}
.breath-circle-outer {
  position: absolute;
  width: 94%;
  height: 94%;
  border-radius: 50%;
  border: 1px solid #C4D7C7;
  opacity: 0.85;
}
.breath-circle-mid {
  position: absolute;
  width: 78%;
  height: 78%;
  border-radius: 50%;
  border: 1px solid #CFE0D1;
  opacity: 0.9;
}
.breath-circle-inner {
  position: absolute;
  width: 62%;
  height: 62%;
  border-radius: 50%;
  border: 1px solid #D8E7DA;
  opacity: 0.95;
}
.lotus-graphic-img {
  width: clamp(88px, 23vw, 118px);
  height: auto;
  max-height: 50%;
  z-index: 2;
  transition: transform 4s cubic-bezier(0.4, 0, 0.2, 1);
}
.breathe-caption-title {
  text-align: center;
  font-size: clamp(12px, 2.8vw, 13.5px);
  color: var(--text-secondary);
  margin-bottom: 2px;
}
.breathe-caption-duration {
  text-align: center;
  font-size: clamp(10px, 2.4vw, 11px);
  font-weight: 700;
  letter-spacing: 1.2px;
  color: #4D735D;
  margin-bottom: clamp(12px, 3vw, 18px);
}
.btn-primary-forest {
  border-radius: clamp(16px, 4vw, 22px);
  padding: clamp(11px, 2.8vw, 15px) clamp(16px, 3.5vw, 20px);
  font-size: clamp(13px, 3vw, 14.5px);
  margin-bottom: clamp(14px, 3vw, 20px);
}
.need-talk-card {
  border-radius: clamp(16px, 4vw, 22px);
  background: #FFFCF7;
  padding: clamp(12px, 3vw, 16px) clamp(14px, 3.5vw, 18px);
}
.btn-talk-chat, .btn-talk-voice {
  border-radius: clamp(14px, 3.5vw, 18px);
  padding: clamp(10px, 2.5vw, 13px) clamp(8px, 2vw, 12px);
  font-size: clamp(12px, 2.8vw, 13.5px);
}

/* AI Guidance Fluid Elements */
.user-bubble {
  border-radius: 16px 16px 4px 16px;
  padding: 8px 12px;
  font-size: 13.5px;
}
.assistant-bubble {
  border-radius: 14px 14px 14px 4px;
  padding: 10px 14px;
  font-size: 13.5px;
}
.chat-input-bar {
  padding: 5px 6px 5px clamp(12px, 3vw, 16px);
  border: 1px solid #DCC9AE;
  background: #FFFCF7;
  border-radius: clamp(16px, 3.5vw, 20px);
}

/* Retail & Services Fluid Elements */
.retail-tabs-segmented {
  padding: 3px;
  border-radius: clamp(14px, 3.5vw, 18px);
  background: #F0E7D8;
}
.retail-tab-btn {
  padding: clamp(8px, 2vw, 11px);
  font-size: clamp(13px, 3vw, 14.5px);
  border-radius: clamp(12px, 3vw, 15px);
}
.retail-hero-banner {
  min-height: clamp(120px, 30vw, 150px);
  border-radius: clamp(18px, 4vw, 24px);
  padding: clamp(16px, 4vw, 22px) clamp(16px, 4.5vw, 24px);
  background: linear-gradient(135deg, #A92427, #C44830);
}
.retail-hero-title {
  font-size: clamp(20px, 5vw, 26px);
  line-height: 1.15;
}
.retail-hero-subtitle {
  font-size: clamp(9.5px, 2.4vw, 11px);
  letter-spacing: clamp(1.5px, 0.4vw, 2.5px);
}
.cat-circle {
  width: clamp(46px, 12vw, 58px);
  height: clamp(46px, 12vw, 58px);
  font-size: clamp(20px, 5vw, 25px);
  background: #F5E9CF;
  border: none;
}
.cat-label {
  font-size: clamp(10.5px, 2.6vw, 12px);
  color: #806851;
}
.category-circles-row {
  display: flex;
  justify-content: space-around;
  gap: clamp(6px, 1.8vw, 12px);
}
.products-grid {
  gap: clamp(8px, 2vw, 14px);
}
.product-card {
  border-radius: clamp(16px, 4vw, 22px);
}
.product-img-box {
  height: clamp(100px, 25vw, 130px);
  padding: 6px;
  background: #F3E9D8;
}
.product-info-box {
  padding: clamp(10px, 2.5vw, 13px);
  min-height: clamp(80px, 20vw, 100px);
}
.product-title {
  font-size: clamp(12px, 2.9vw, 13.5px);
}
.product-price {
  font-size: clamp(14px, 3.5vw, 16.5px);
}
.retail-disclaimer {
  text-align: center;
  color: #9B8871;
  font-size: 11px;
  padding: 4px 0 14px;
}
.category-circle-item {
  border: 0;
  background: transparent;
  padding: 0;
  font-family: inherit;
}
.service-switch {
  margin-bottom: clamp(16px, 4vw, 28px);
}
.services-intro h2 {
  font-family: var(--font-serif);
  color: #7B3B2E;
  font-size: clamp(22px, 5.5vw, 30px);
  line-height: 1.1;
  font-weight: 500;
  margin-bottom: clamp(10px, 2.5vw, 16px);
}
.services-intro p {
  color: #947E69;
  font-size: clamp(12px, 2.8vw, 13.5px);
  margin-bottom: clamp(12px, 3vw, 18px);
}
.services-hero {
  height: clamp(110px, 28vw, 140px);
  border-radius: clamp(18px, 4vw, 24px);
  overflow: hidden;
  position: relative;
  margin-bottom: clamp(12px, 3vw, 18px);
}
.services-hero:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(68,19,10,.75), rgba(92,18,7,.05));
}
.services-hero > div {
  position: absolute;
  z-index: 1;
  left: clamp(14px, 3.5vw, 20px);
  bottom: clamp(14px, 3.5vw, 20px);
  color: white;
}
.services-hero > div > div {
  font-size: clamp(9.5px, 2.4vw, 11px);
  letter-spacing: 1.8px;
  color: #F1D09B;
  margin-bottom: 6px;
}
.services-hero strong {
  font-family: var(--font-serif);
  font-size: clamp(15px, 3.8vw, 18px);
  font-weight: 500;
}
.service-pills {
  margin-bottom: clamp(12px, 3vw, 18px);
}
.services-list {
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 2.5vw, 14px);
}
.service-card {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2.5vw, 14px);
  padding: clamp(12px, 3vw, 16px) clamp(12px, 3vw, 16px);
  min-height: clamp(96px, 24vw, 120px);
  background: #FFFCF7;
  border: 1px solid #E7DAC5;
  border-radius: clamp(18px, 4vw, 24px);
  cursor: pointer;
}
.service-card-icon {
  width: clamp(44px, 11vw, 54px);
  height: clamp(44px, 11vw, 54px);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: clamp(22px, 5.5vw, 28px);
  flex: 0 0 auto;
}
.service-tone-0 { background: #F6E1D5; color: #B22D2F; }
.service-tone-1 { background: #F4E8C9; color: #A57A2E; }
.service-tone-2 { background: #DDECDF; color: #2B6C57; }
.service-card-copy { flex: 1; }
.service-card-copy h3 {
  font-size: clamp(14px, 3.5vw, 16.5px);
  margin-bottom: 4px;
}
.service-card-copy p {
  color: #937F6C;
  font-size: clamp(11.5px, 2.8vw, 12.5px);
  margin-bottom: 8px;
}
.service-card-copy a {
  color: var(--color-maroon);
  font-size: clamp(11.5px, 2.8vw, 12.5px);
  text-decoration: none;
  font-weight: 600;
}
.service-card-arrow {
  font-size: clamp(22px, 5.5vw, 28px);
  color: var(--color-maroon);
}
.service-note {
  display: flex;
  gap: clamp(10px, 2.5vw, 14px);
  padding: clamp(12px, 3vw, 16px);
  margin: clamp(12px, 3vw, 16px) 0 clamp(16px, 4vw, 22px);
  background: #F2E8D5;
  border-radius: clamp(16px, 4vw, 22px);
  color: #806B52;
}
.service-note > span { font-size: clamp(18px, 4.5vw, 22px); }
.service-note strong { font-size: clamp(13px, 3vw, 14.5px); }
.service-note p {
  font-size: clamp(11px, 2.6vw, 12px);
  line-height: 1.6;
  margin-top: 6px;
}

/* Reading Space Fluid Elements */
.reading-search { margin-top: 2px; }
.reading-hero {
  height: clamp(160px, 40vw, 220px);
  border-radius: clamp(18px, 4vw, 26px);
  overflow: hidden;
  position: relative;
  margin-bottom: clamp(12px, 3vw, 18px);
}
.reading-hero-overlay {
  background: linear-gradient(0deg, rgba(20,70,55,.88), rgba(112,36,21,.18) 70%);
}
.reading-save {
  position: absolute;
  top: clamp(10px, 2.5vw, 16px);
  right: clamp(10px, 2.5vw, 16px);
  width: clamp(32px, 8vw, 38px);
  height: clamp(32px, 8vw, 38px);
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(75,34,25,.28);
  color: #FFF;
  font-size: clamp(18px, 4.5vw, 22px);
}
.reading-hero-content {
  position: absolute;
  left: clamp(14px, 3.5vw, 22px);
  right: clamp(14px, 3.5vw, 18px);
  bottom: clamp(14px, 3.5vw, 22px);
  color: #FFF8ED;
}
.reading-hero-content h2 {
  font-family: var(--font-serif);
  font-size: clamp(18px, 4.8vw, 26px);
  line-height: 1.1;
  font-weight: 500;
  margin: clamp(10px, 2.5vw, 16px) 0 clamp(8px, 2vw, 12px);
}
.reading-meta {
  font-size: clamp(9.5px, 2.4vw, 11px);
  letter-spacing: 1.2px;
}
.reading-continue {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2.5vw, 14px);
  padding: clamp(12px, 3vw, 16px) clamp(12px, 3vw, 16px);
  background: #FFFCF7;
  border: 1px solid #E7DAC5;
  border-radius: clamp(16px, 4vw, 22px);
  margin-bottom: clamp(14px, 3vw, 20px);
}
.reading-icon-box {
  width: clamp(42px, 10.5vw, 50px);
  height: clamp(42px, 10.5vw, 50px);
  border-radius: 50%;
  background: #F2E6C6;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.reading-icon-box img {
  width: clamp(22px, 5.5vw, 28px);
  filter: sepia(.5) saturate(2);
}
.reading-continue > div:nth-child(2) { flex: 1; }
.reading-continue-label {
  color: #B07C38;
  font-size: clamp(9.5px, 2.4vw, 11px);
  letter-spacing: 1.5px;
  font-weight: 700;
  margin-bottom: 6px;
}
.reading-continue h3 {
  font-size: clamp(13px, 3.2vw, 15.5px);
}
.reading-continue > span {
  font-size: clamp(20px, 5vw, 26px);
  color: #A77C37;
}
.reading-list {
  margin-bottom: clamp(10px, 2.5vw, 14px);
}
.reading-row {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2.5vw, 14px);
  padding: clamp(10px, 2.5vw, 13px) 0;
  border-bottom: 1px solid #E6DCCB;
}
.reading-row img {
  width: clamp(68px, 18vw, 86px);
  height: clamp(68px, 18vw, 86px);
  border-radius: clamp(14px, 3.5vw, 18px);
  object-fit: cover;
  flex-shrink: 0;
}
.reading-row div { flex: 1; }
.reading-row h3 {
  font-size: clamp(14px, 3.5vw, 16px);
  font-weight: 500;
  margin-bottom: 5px;
}
.reading-row p {
  color: #927F6C;
  font-size: clamp(11.5px, 2.8vw, 12.5px);
}
.reading-row > span {
  color: #9E896E;
  font-size: clamp(20px, 5vw, 24px);
}
.reading-audio {
  width: auto;
  max-width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: clamp(10px, 2.5vw, 14px);
  text-align: left;
  padding: clamp(12px, 3vw, 16px);
  border: 0;
  border-radius: clamp(18px, 4vw, 24px);
  background: #22634E;
  color: #FFF7EA;
  cursor: pointer;
}
.reading-audio-icon {
  font-size: clamp(20px, 5vw, 24px);
}
.reading-audio div { flex: 1; }
.reading-audio div div {
  font-size: clamp(9.5px, 2.4vw, 11px);
  letter-spacing: 1.2px;
  color: #B5C9B1;
  margin-bottom: 6px;
}
.reading-audio strong {
  font-size: clamp(14px, 3.5vw, 16px);
  font-weight: 500;
}
.reading-play {
  width: clamp(34px, 8.5vw, 40px);
  height: clamp(34px, 8.5vw, 40px);
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #F6E8C8;
  color: #22634E;
  flex-shrink: 0;
}
.reading-controls {
  display: flex;
  justify-content: space-between;
  padding: clamp(12px, 3vw, 16px) 6px clamp(16px, 4vw, 20px);
  color: #9B8871;
  font-size: clamp(11px, 2.6vw, 12px);
}


@media (max-width: 520px) {
  body {
    padding: 0 !important;
    margin: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }
  body.has-announcement {
    padding-top: 36px !important;
  }
  .app-viewport-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    border: none !important;
    flex: 1 1 auto !important;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
  }
}

/* Hide duplicate app header on home screen */
.app-header.home-header {
  display: none !important;
}

.drawer-drag-pill {
  width: 40px;
  height: 4px;
  background-color: #D6CEC3;
  border-radius: 2px;
  margin: 0 auto;
  flex-shrink: 0;
}

.drawer-close-btn {
  position: absolute;
  top: 12px;
  right: 20px;
  background: #EDE6DB;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 15;
  transition: background-color 0.15s ease;
}
.drawer-close-btn:hover {
  background: #E0D5C5;
}

/* ==========================================================================
   PRODUCTION ENHANCEMENTS: ANNOUNCEMENTS, MAINTENANCE & RESPONSIVE LAYOUT
   ========================================================================== */
.global-announcement-ribbon {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 36px;
  box-sizing: border-box;
  background: linear-gradient(90deg, #96282E, #7A1F24);
  color: #FFF;
  padding: 6px 24px;
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 999;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.global-announcement-ribbon .announcement-link {
  color: #F1D09B;
  font-weight: 700;
  text-decoration: none;
  margin-left: 8px;
}

.global-announcement-ribbon .announcement-link:hover {
  text-decoration: underline;
}

body.has-announcement {
  padding-top: 36px !important;
}

body.has-announcement .app-viewport-wrapper {
  height: min(844px, calc(100vh - 84px));
}

@media (max-width: 520px) {
  body.has-announcement .app-viewport-wrapper {
    height: calc(100vh - 36px) !important;
    height: calc(100dvh - 36px) !important;
  }
}

/* Maintenance Mode Barrier */
.maintenance-barrier-overlay {
  position: fixed;
  inset: 0;
  background: rgba(36,29,27,0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}

.maintenance-barrier-card {
  background: #FFFDF9;
  border-radius: 28px;
  padding: 44px 32px;
  max-width: 480px;
  width: 100%;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0,0,0,0.3);
  border: 2px solid #C89B67;
}

.barrier-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.maintenance-barrier-card h2 {
  font-family: var(--font-serif);
  color: var(--color-maroon);
  font-size: 26px;
  margin-bottom: 4px;
}

.barrier-tag {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--color-gold);
  text-transform: uppercase;
  margin-bottom: 20px;
}

.maintenance-barrier-card p {
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.6;
}

/* Responsive Desktop Layout (Problem 15) */
@media (min-width: 768px) {
  body {
    background: #EFE9DE;
  }

  .app-viewport-wrapper {
    max-width: 1060px !important;
    width: 100% !important;
    height: 100vh !important;
    height: 100dvh !important;
    border-radius: 0 !important;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.08) !important;
    border-left: 1px solid rgba(216, 206, 195, 0.6) !important;
    border-right: 1px solid rgba(216, 206, 195, 0.6) !important;
  }

  .phone-status-bar {
    display: none !important;
  }

  .app-header {
    max-width: 1060px !important;
    margin: 0 auto !important;
    width: 100% !important;
    padding: 14px 28px !important;
  }

  .view-viewport {
    max-width: 1060px !important;
    margin: 0 auto !important;
    width: 100% !important;
    padding-left: 28px !important;
    padding-right: 28px !important;
    padding-bottom: 96px !important;
  }

  .view-viewport > * {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .app-bottom-nav {
    position: fixed !important;
    bottom: 0 !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 100% !important;
    max-width: 620px !important;
    border-radius: 24px 24px 0 0 !important;
    border: 1px solid var(--color-sand-border) !important;
    border-bottom: none !important;
    background-color: rgba(251, 249, 245, 0.98) !important;
    backdrop-filter: blur(12px) !important;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.1) !important;
    z-index: 50 !important;
    padding: 8px 14px 14px 14px !important;
  }

  .home-indicator-bar {
    display: none !important;
  }

  .products-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
    gap: 16px !important;
  }

  .home-quick-grid {
    grid-template-columns: repeat(6, 1fr) !important;
    gap: 12px !important;
  }

  .temple-cards-list {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)) !important;
    gap: 16px !important;
  }

  .reading-list {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)) !important;
    gap: 16px !important;
  }

  .reading-row {
    background: #FFF;
    border: 1px solid #E6DCCB;
    border-radius: 16px;
    padding: 12px 16px;
  }

  .bottom-drawer {
    max-width: 620px !important;
    margin: 0 auto 20px auto !important;
    border-radius: 24px !important;
    max-height: 86vh !important;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28) !important;
  }

  .drawer-header-bar {
    border-radius: 24px 24px 0 0 !important;
  }

  .state-picker-sheet,
  .ai-funnel-sheet {
    max-width: 620px !important;
    margin: 0 auto 20px auto !important;
    border-radius: 24px !important;
    max-height: 86vh !important;
  }
}

body.fullscreen-mode .app-viewport-wrapper {
  max-width: 100% !important;
}

body.modal-open .app-bottom-nav {
  pointer-events: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transform: translateY(100%) !important;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* --------------------------------------------------------------------------
   CEREMONIAL BLESSING & ORDER RECEIPT MODAL
   -------------------------------------------------------------------------- */
.receipt-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(28, 22, 20, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.receipt-modal-overlay.open {
  display: flex;
}
.receipt-modal-card {
  width: 100%;
  max-width: 360px;
  background: #FFFDF9;
  border: 1px solid #E8DCC9;
  border-radius: 28px;
  padding: 24px 20px 20px 20px;
  box-shadow: 0 20px 48px rgba(36, 29, 27, 0.28);
  text-align: center;
  position: relative;
  animation: popReceiptIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}
@keyframes popReceiptIn {
  from { opacity: 0; transform: scale(0.92) translateY(16px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.receipt-seal-badge {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #FAF1EE;
  border: 2px solid #E4B5B8;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px auto;
  box-shadow: 0 4px 14px rgba(150, 40, 46, 0.15);
}
.receipt-header-title {
  font-family: var(--font-chinese);
  font-size: 24px;
  font-weight: 700;
  color: var(--color-maroon);
  letter-spacing: 2px;
  line-height: 1.2;
}
.receipt-header-sub {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.6px;
  color: #8C7B6B;
  margin-top: 3px;
  text-transform: uppercase;
}
.receipt-order-id {
  display: inline-block;
  font-family: monospace;
  font-size: 12px;
  font-weight: 700;
  background: #F4EDE2;
  color: #5C4A38;
  padding: 4px 12px;
  border-radius: 8px;
  margin: 10px auto 10px auto;
  letter-spacing: 1px;
}
.receipt-consecration-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: #92580E;
  background: #FEF8ED;
  border: 1px solid #F3E0B5;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
}
.status-dot-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #D97706;
  box-shadow: 0 0 0 0 rgba(217, 119, 6, 0.5);
  animation: dotPulse 2s infinite;
}
@keyframes dotPulse {
  0% { box-shadow: 0 0 0 0 rgba(217, 119, 6, 0.6); }
  70% { box-shadow: 0 0 0 6px rgba(217, 119, 6, 0); }
  100% { box-shadow: 0 0 0 0 rgba(217, 119, 6, 0); }
}
.receipt-blessing-quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 12.5px;
  line-height: 1.5;
  color: #4A3F35;
  background: #F8F3EA;
  padding: 10px 14px;
  border-radius: 12px;
  border-left: 3px solid #C5A44E;
  text-align: left;
  margin-bottom: 12px;
}
.receipt-details-box {
  background: #FAF7F2;
  border: 1px solid #EBE3D5;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 12.5px;
  text-align: left;
  margin-bottom: 16px;
  max-height: 200px;
  overflow-y: auto;
}
.receipt-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 0;
  color: #5C5248;
}
.receipt-row.total-row {
  border-top: 1px dashed #D9CFC1;
  margin-top: 6px;
  padding-top: 8px;
  font-weight: 700;
  font-size: 14px;
  color: var(--color-maroon);
}
.receipt-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.btn-receipt-copy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px;
  background: #FAF5EE;
  border: 1px solid #E2D7C7;
  border-radius: 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: #5C4A38;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.btn-receipt-copy:hover {
  background: #F2E8D8;
}
.btn-receipt-copy:active {
  transform: scale(0.98);
}

/* --------------------------------------------------------------------------
   MINDFUL TOAST NOTIFICATION
   -------------------------------------------------------------------------- */
#appToast {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: rgba(36, 29, 27, 0.92);
  color: #FFFDF9;
  padding: 10px 20px;
  border-radius: 9999px;
  font-size: 12.5px;
  font-weight: 500;
  z-index: 10000;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  max-width: 90%;
  text-overflow: ellipsis;
  overflow: hidden;
}
#appToast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* --------------------------------------------------------------------------
   MOBILE RESPONSIVE & PWA FITMENT (<= 560px & Standalone Display)
   Customer-ready edge-to-edge native layout for mobile and standalone PWA.
   -------------------------------------------------------------------------- */
@media (max-width: 560px), (display-mode: standalone) {
  body {
    padding: 0 !important;
    background: var(--bg-parchment) !important;
    align-items: stretch !important;
    height: 100dvh !important;
  }

  .app-viewport-wrapper {
    max-width: 100% !important;
    height: 100dvh !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    border: none !important;
  }

  .app-header {
    padding-top: max(12px, env(safe-area-inset-top)) !important;
  }

  .app-bottom-nav {
    padding-bottom: max(8px, env(safe-area-inset-bottom)) !important;
  }

  .home-indicator-bar {
    display: none !important;
  }

  .bottom-drawer {
    border-radius: 28px 28px 0 0;
    max-height: 90%;
    padding: 0 !important;
    overflow: hidden !important;
  }

  .drawer-fixed-footer {
    padding-bottom: max(22px, env(safe-area-inset-bottom));
  }
}

/* ==========================================================================
   PWA INSTALLATION PROMPT & STANDALONE MODALS (iOS & Android)
   ========================================================================== */
#pwaInstallModal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
}

#pwaInstallModal.visible {
  display: block;
  pointer-events: auto;
}

.pwa-install-overlay {
  position: absolute;
  inset: 0;
  background: rgba(36, 29, 27, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  animation: pwaFadeIn 0.25s ease-out;
}

@keyframes pwaFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.pwa-install-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: #FCFAF6;
  border-radius: 24px;
  border: 1px solid #EBE3D7;
  box-shadow: 0 16px 40px rgba(36, 29, 27, 0.22);
  padding: 22px 20px 20px 20px;
  animation: pwaSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.pwa-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #EFE8DE;
  border: none;
  color: #756D65;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}
.pwa-close-btn:hover {
  background: #E5DCCE;
  color: #241D1B;
}

.pwa-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  padding-right: 28px;
}

.pwa-brand-icon {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: #96282E;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(150, 40, 46, 0.25);
  flex-shrink: 0;
  overflow: hidden;
}
.pwa-brand-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pwa-header-texts {
  flex: 1;
}
.pwa-badge {
  font-size: 10px;
  font-weight: 700;
  color: #96282E;
  letter-spacing: 0.8px;
  margin-bottom: 3px;
}
.pwa-header-texts h3 {
  font-size: 18px;
  font-weight: 700;
  color: #241D1B;
  font-family: var(--font-serif);
  line-height: 1.2;
}
.pwa-header-texts p {
  font-size: 12px;
  color: #756D65;
}

.pwa-benefit-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #FAF5EE;
  border-radius: 14px;
  padding: 12px 14px;
  border: 1px solid #ECE3D6;
  margin-bottom: 16px;
}
.pwa-benefit-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #403630;
  line-height: 1.4;
}
.pwa-benefit-icon {
  font-size: 15px;
  flex-shrink: 0;
}

.pwa-card-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pwa-btn-primary {
  width: 100%;
  background: #1D4B3E;
  color: #FFFFFF;
  border: none;
  border-radius: 14px;
  padding: 13px 18px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(29, 75, 62, 0.25);
  transition: all 0.2s ease;
}
.pwa-btn-primary:hover {
  background: #14372D;
  transform: translateY(-1px);
}
.pwa-btn-secondary {
  width: 100%;
  background: transparent;
  color: #756D65;
  border: none;
  padding: 8px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}
.pwa-btn-secondary:hover {
  color: #241D1B;
}

/* iOS Specific Step Guide */
.ios-card {
  padding-bottom: 24px;
}
.ios-step-guide {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}
.ios-step-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #FAF6EE;
  border-radius: 12px;
  padding: 10px 12px;
  border: 1px solid #ECE3D6;
}
.ios-step-number {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #96282E;
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ios-step-info {
  font-size: 12.5px;
  color: #362D28;
  line-height: 1.4;
  flex: 1;
}
.ios-share-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #FFFFFF;
  border: 1px solid #D6CEC3;
  border-radius: 8px;
  padding: 4px 8px;
  margin-top: 5px;
  font-size: 11.5px;
  font-weight: 600;
  color: #241D1B;
}.ios-bottom-pointer {
  text-align: center;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: iosBounce 1.8s infinite ease-in-out;
}
@keyframes iosBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}
.ios-pointer-arrow {
  font-size: 20px;
  color: #96282E;
  font-weight: 700;
  line-height: 1;
}
.ios-pointer-text {
  font-size: 11px;
  font-weight: 600;
  color: #756D65;
  margin-top: 2px;
}

/* ==========================================================================
   Sacred Confetti & Emotional Reward Modal (情绪价值激励弹窗)
   ========================================================================== */
.sacred-confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 10600;
}

.reward-modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(22, 17, 15, 0.62);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  box-sizing: border-box;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.reward-modal-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.reward-modal-card {
  position: relative;
  background: linear-gradient(175deg, #FFFDF9 0%, #FAF5EE 100%);
  border: 1px solid rgba(200, 155, 103, 0.32);
  box-shadow: 0 24px 50px -12px rgba(36, 29, 27, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.8) inset;
  border-radius: 24px;
  width: 100%;
  max-width: 380px;
  padding: 26px 20px 20px;
  text-align: center;
  box-sizing: border-box;
  transform: scale(0.92) translateY(16px);
  transition: transform 0.32s cubic-bezier(0.18, 0.89, 0.32, 1.28);
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.reward-modal-overlay.is-visible .reward-modal-card {
  transform: scale(1) translateY(0);
}

.reward-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid #EAE3D7;
  background: #FFFFFF;
  color: #756D65;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s ease;
  z-index: 2;
}

.reward-modal-close:hover {
  background: #F3ECE2;
  color: #241D1B;
  transform: scale(1.05);
}

.reward-lotus-crown {
  position: relative;
  width: 68px;
  height: 68px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reward-halo-glow {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 155, 103, 0.4) 0%, rgba(200, 155, 103, 0) 70%);
  animation: rewardHaloPulse 2.4s infinite ease-in-out;
}

@keyframes rewardHaloPulse {
  0%, 100% { transform: scale(1); opacity: 0.65; }
  50% { transform: scale(1.22); opacity: 1; }
}

.reward-lotus-icon {
  font-size: 38px;
  line-height: 1;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 4px 10px rgba(150, 40, 46, 0.2));
  animation: rewardLotusFloat 3s infinite ease-in-out;
}

@keyframes rewardLotusFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.reward-merit-chip-row {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}

.reward-merit-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, #F3EBDD 0%, #EBE0CF 100%);
  border: 1px solid #D9CAAF;
  color: #7A5328;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.reward-modal-title {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 700;
  color: #241D1B;
  margin: 0 0 4px;
  line-height: 1.3;
}

.reward-modal-subtitle {
  font-size: 12px;
  color: #8C8275;
  margin-bottom: 14px;
}

.reward-comfort-box {
  background: #FFFFFF;
  border: 1px solid #EBE4D8;
  border-left: 3.5px solid #C89B67;
  border-radius: 14px;
  padding: 14px;
  text-align: left;
  margin-bottom: 14px;
  box-shadow: 0 2px 8px rgba(36, 29, 27, 0.04);
}

.reward-comfort-zh {
  font-size: 13.5px;
  color: #2C2420;
  line-height: 1.6;
  font-weight: 500;
  margin-bottom: 8px;
}

.reward-comfort-en {
  font-size: 11.5px;
  color: #7D746A;
  line-height: 1.5;
  font-style: italic;
}

.reward-fortune-container {
  margin-bottom: 16px;
}

.reward-fortune-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #FAF2E6;
  border: 1px dashed #D6B98D;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: #8D5B1E;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.reward-fortune-toggle:hover {
  background: #F4E8D5;
}

.reward-fortune-toggle .fortune-toggle-arrow {
  transition: transform 0.2s ease;
}

.reward-fortune-toggle.is-open .fortune-toggle-arrow {
  transform: rotate(180deg);
}

.reward-fortune-card {
  background: #FFFDF8;
  border: 1px solid #E5D5BC;
  border-radius: 12px;
  padding: 14px;
  margin-top: 10px;
  text-align: center;
  animation: fortuneUnfold 0.3s ease-out forwards;
  box-shadow: 0 6px 16px rgba(141, 91, 30, 0.08);
}

@keyframes fortuneUnfold {
  0% { opacity: 0; transform: translateY(-8px); }
  100% { opacity: 1; transform: translateY(0); }
}

.fortune-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 11px;
}

.fortune-seal {
  background: #96282E;
  color: #FFF;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.fortune-tag {
  color: #8D5B1E;
  font-weight: 600;
}

.fortune-name {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
  color: #96282E;
  margin-bottom: 8px;
}

.fortune-verse-box {
  background: #FBF8F1;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 10px;
}

.fortune-verse {
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 700;
  color: #241D1B;
  margin-bottom: 3px;
}

.fortune-subverse {
  font-family: var(--font-serif);
  font-size: 12.5px;
  color: #5C5248;
  margin-bottom: 6px;
}

.fortune-translation {
  font-size: 11px;
  color: #8A8074;
  line-height: 1.4;
}

.fortune-guidance {
  font-size: 12px;
  color: #3F3730;
  text-align: left;
  line-height: 1.5;
  background: #F5EFE4;
  padding: 8px 10px;
  border-radius: 6px;
}

.reward-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.reward-btn-confirm {
  width: 100%;
  background: linear-gradient(135deg, #1D4B3E 0%, #15382E 100%);
  color: #FFFFFF;
  border: none;
  border-radius: 14px;
  padding: 13px 18px;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(29, 75, 62, 0.28);
  transition: all 0.18s ease;
}

.reward-btn-confirm:hover {
  background: linear-gradient(135deg, #245C4D 0%, #1A4438 100%);
  transform: translateY(-1px);
}

.ai-comfort-receive-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #FAF4EB 0%, #F5ECDD 100%);
  border: 1px solid #DFCBB0;
  color: #8A5A23;
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 16px;
  cursor: pointer;
  margin-top: 8px;
  transition: all 0.18s ease;
}

.ai-comfort-receive-btn:hover {
  background: #EFE4D0;
  transform: scale(1.02);
}
