/* ===== TOKENS ===== */
:root {
  --bg-a: #fdfbf6;
  --bg-b: #f0f5ff;
  --bg-c: #dde9fc;
  --glass: rgba(255, 255, 255, 0.62);
  --glass-heavy: rgba(255, 255, 255, 0.78);
  --stroke: rgba(255, 255, 255, 0.85);
  --stroke-subtle: rgba(255, 255, 255, 0.45);
  --text: #1a2540;
  --text-secondary: #3d4f6f;
  --muted: #7b8db0;
  --accent-blue: #4a8df8;
  --accent-blue-deep: #3672d4;
  --accent-gold: #d4af37;
  --accent-gold-soft: rgba(212, 175, 55, 0.15);
  --ai-bubble: rgba(255, 255, 255, 0.88);
  --human-bg: linear-gradient(135deg, #4a8df8 0%, #3672d4 100%);
  --shadow-sm: 0 2px 8px rgba(26, 37, 64, 0.06);
  --shadow-md: 0 8px 32px rgba(26, 37, 64, 0.10);
  --shadow-lg: 0 16px 48px rgba(26, 37, 64, 0.12);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --radius-bubble: 22px;
}

* { box-sizing: border-box; margin: 0; }

html, body {
  height: 100%;
  overflow: hidden;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
  position: fixed;
  width: 100%;
}

body {
  font-family: "Nunito", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background:
    radial-gradient(ellipse 700px 300px at 50% -2%, rgba(212, 175, 55, 0.18), transparent 70%),
    radial-gradient(ellipse 500px 250px at 10% 20%, rgba(255, 255, 255, 0.6), transparent 70%),
    radial-gradient(ellipse 600px 280px at 90% 10%, rgba(200, 220, 255, 0.35), transparent 70%),
    linear-gradient(165deg, var(--bg-a) 0%, var(--bg-b) 50%, var(--bg-c) 100%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== SKY GLOW ===== */
.sky-glow {
  position: fixed;
  border-radius: 999px;
  filter: blur(50px);
  pointer-events: none;
  z-index: -1;
  animation: floatGlow 10s ease-in-out infinite;
}
.sky-glow-1 {
  top: -90px; left: -80px;
  width: 320px; height: 320px;
  background: rgba(212, 175, 55, 0.20);
}
.sky-glow-2 {
  right: -100px; bottom: -130px;
  width: 380px; height: 380px;
  background: rgba(180, 210, 255, 0.25);
  animation-delay: 1.5s;
}

/* ===== SHELL ===== */
.shell {
  width: 100%;
  max-width: 640px;
  height: 100dvh;
  height: 100vh;
  height: calc(var(--app-height, 100dvh));
  margin: 0 auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: height 0s;
}

/* ===== GLASS ===== */
.glass {
  background: var(--glass);
  border: 1px solid var(--stroke);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
}

/* ===== HERO ===== */
.hero {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 16px 20px 12px;
  padding-top: calc(16px + var(--safe-t));
  border-radius: 0;
  border-left: none;
  border-right: none;
  border-top: none;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5), var(--shadow-sm);
  background:
    radial-gradient(ellipse 240px 100px at 50% 0%, var(--accent-gold-soft), transparent 70%),
    var(--glass-heavy);
  transition: padding 350ms cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.hero-actions {
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  margin: 2px 0 8px;
  z-index: 8;
}
.response-modes {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
}

.character-wrap {
  position: relative;
  width: 160px;
  display: grid;
  place-items: center;
  overflow: hidden;
  transition: height 400ms cubic-bezier(0.4, 0, 0.2, 1),
              opacity 300ms ease,
              margin 400ms cubic-bezier(0.4, 0, 0.2, 1);
  height: 140px;
  margin-bottom: 6px;
}

/* Chat-mode: shrink character, hide text/chips */
.shell.chat-mode .character-wrap {
  height: 72px;
  margin-bottom: 0;
}
.shell.chat-mode .character-wrap .angel {
  transform: scale(0.55);
  transform-origin: top center;
}
.shell.chat-mode .character-wrap .state {
  opacity: 0;
}
/* Show state text when praying, even in chat mode */
.shell.chat-mode .character-wrap .state.visible {
  opacity: 1;
}
.shell.chat-mode .hero-copy {
  opacity: 0;
  height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
}
.shell.chat-mode .hero {
  padding-top: calc(6px + var(--safe-t));
  padding-bottom: 4px;
}
.shell.chat-mode .hero-actions {
  margin: 2px 0 4px;
}
.shell.chat-mode .chips {
  max-height: 0;
  opacity: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

/* ===== SPARKLES ===== */
.sparkle {
  position: absolute;
  width: 6px; height: 6px;
  border-radius: 999px;
  background: var(--accent-gold);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.6);
  animation: sparkle 3.4s ease-in-out infinite;
  will-change: transform, opacity;
}
.s1 { top: 22%; left: 16%; }
.s2 { top: 12%; right: 18%; animation-delay: 0.8s; }
.s3 { bottom: 24%; right: 26%; animation-delay: 1.6s; }

/* ===== CHARACTER (Christ figure) ===== */
.angel {
  position: relative;
  width: 110px; height: 136px;
  animation: angelIdle 4.4s cubic-bezier(0.42, 0, 0.23, 1) infinite;
  transition: transform 400ms cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}
.angel.thinking { animation-duration: 1.8s; }
.angel.thinking .hand-left  { animation: handLift 1.25s ease-in-out infinite alternate; }
.angel.thinking .hand-right { animation: handLift 1.25s ease-in-out infinite alternate 0.24s; }
.angel.joyful .halo {
  animation: haloJoy 1.15s ease-out 1;
}
.angel.joyful .smile {
  transform: translateX(-50%) scale(1.2);
  border-bottom-width: 2px;
  border-bottom-color: #b1784f;
}
.character-wrap.joyful .sparkle {
  animation-duration: 1.15s;
  opacity: 1;
}

/* ===== PRAYER STATE — sacred glow ===== */
.angel.praying {
  animation-duration: 2.4s;
}

/* Golden radiance behind the character */
.angel.praying::before {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 140px; height: 140px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.35) 0%, rgba(212, 175, 55, 0.10) 50%, transparent 70%);
  animation: prayerGlow 2.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  pointer-events: none;
  z-index: 0;
  will-change: transform, opacity;
}

/* Halo brightens and grows */
.angel.praying .halo {
  animation: haloPrayer 2.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  border-color: #e8c84a;
}

/* Hands rise to prayer position */
.angel.praying .hand-left {
  animation: handPrayLeft 0.95s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.angel.praying .hand-right {
  animation: handPrayRight 0.95s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Robe gets a subtle glow */
.angel.praying .robe {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6),
              inset 0 -2px 5px rgba(140, 120, 90, 0.08),
              0 0 20px rgba(212, 175, 55, 0.12);
  transition: box-shadow 1s ease;
}

/* Halo — floats and gently pulses above the head */
.halo {
  position: absolute;
  top: 0; left: 50%;
  width: 54px; height: 14px;
  transform: translateX(-50%);
  border-radius: 999px;
  border: 2.5px solid var(--accent-gold);
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.5),
              0 0 4px rgba(212, 175, 55, 0.3);
  animation: haloFloat 3s ease-in-out infinite;
  z-index: 5;
  will-change: transform, opacity, box-shadow;
}

/* Hair — behind head, only top visible as hairline + side locks */
.hair {
  position: absolute;
  top: 14px; left: 50%;
  transform: translateX(-50%);
  width: 58px; height: 28px;
  border-radius: 30px 30px 4px 4px;
  background: linear-gradient(180deg, #5c3926, #4a2e1e);
  z-index: 1;
}
/* Long locks flowing down each side */
.hair::before,
.hair::after {
  content: "";
  position: absolute;
  top: 18px;
  width: 10px; height: 40px;
  border-radius: 0 0 6px 6px;
  background: linear-gradient(180deg, #4a2e1e, #3d2518);
}
.hair::before { left: 0; }
.hair::after  { right: 0; }

/* Face — sits in front of hair */
.head {
  position: absolute;
  top: 18px; left: 50%;
  transform: translateX(-50%);
  width: 46px; height: 42px;
  border-radius: 50% 50% 44% 44%;
  background: linear-gradient(180deg, #f5d0a8, #edbe8a);
  box-shadow: inset 0 -2px 4px rgba(180, 120, 60, 0.10);
  z-index: 3;
}

/* Eyes — children of .head, so positioned relative to face */
.eye {
  position: absolute;
  top: 16px;
  width: 4.5px; height: 5.5px;
  border-radius: 999px;
  background: #2f1f14;
  animation: blink 4.6s infinite;
}
.eye-left  { left: 11px; }
.eye-right { right: 11px; }

/* Gentle smile — child of .head */
.smile {
  position: absolute;
  left: 50%; bottom: 7px;
  width: 10px; height: 4px;
  transform: translateX(-50%);
  border-radius: 0 0 8px 8px;
  border-bottom: 1.5px solid #a06a48;
  transition: transform 220ms ease, border-bottom-color 220ms ease, border-bottom-width 220ms ease;
}

/* Beard — sibling of .head, positioned below face */
.beard {
  position: absolute;
  top: 52px; left: 50%;
  transform: translateX(-50%);
  width: 24px; height: 14px;
  border-radius: 4px 4px 12px 12px;
  background: linear-gradient(180deg, #5c3926, #4a2e1e);
  z-index: 2;
}

/* ---- Body ---- */
.body {
  position: absolute;
  left: 50%; bottom: 0;
  transform: translateX(-50%);
  width: 70px; height: 58px;
  z-index: 1;
}
.robe {
  position: absolute; inset: 0;
  border-radius: 8px 8px 20px 20px;
  background: linear-gradient(180deg, #faf8f5 0%, #eeeae4 50%, #e4dfd8 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6),
              inset 0 -2px 5px rgba(140, 120, 90, 0.08);
}

/* Sash — subtle gold drape */
.sash {
  position: absolute;
  top: 10px; left: 50%;
  transform: translateX(-50%) rotate(-6deg);
  width: 48px; height: 5px;
  border-radius: 3px;
  background: linear-gradient(90deg, transparent 5%, var(--accent-gold) 25%, var(--accent-gold) 75%, transparent 95%);
  opacity: 0.35;
}

/* Small cross on chest */
.cross {
  position: absolute;
  left: 50%; top: 22px;
  transform: translateX(-50%);
  width: 2.5px; height: 12px;
  background: var(--accent-gold);
  border-radius: 1px;
  opacity: 0.55;
}
.cross::after {
  content: "";
  position: absolute;
  top: 3px; left: 50%;
  transform: translateX(-50%);
  width: 8px; height: 2.5px;
  background: var(--accent-gold);
  border-radius: 1px;
}

/* Hands — skin tone circles at robe sides */
.hand {
  position: absolute;
  bottom: 16px;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: linear-gradient(180deg, #f5d0a8, #edbe8a);
  z-index: 2;
  transition: transform 360ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}
.hand-left  { left: 8px; }
.hand-right { right: 8px; }

.state {
  position: absolute;
  bottom: 5px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--muted);
  transition: opacity 300ms ease;
}

/* ===== HERO COPY ===== */
.hero-copy {
  transition: opacity 300ms ease, height 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

.eyebrow {
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-gold);
  font-size: 0.65rem;
  font-weight: 700;
}

h1 {
  margin: 6px 0 2px;
  font-size: clamp(1.25rem, 2.4vw, 1.8rem);
  line-height: 1.15;
  font-family: "Baloo 2", cursive;
  font-weight: 700;
  color: var(--text);
}

.subtitle {
  margin: 0 0 10px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.4;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  padding: 0 8px 2px;
  transition: max-height 350ms cubic-bezier(0.4, 0, 0.2, 1),
              opacity 300ms ease,
              margin 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

.chip {
  flex: 0 0 auto;
  white-space: nowrap;
  border: 1px solid rgba(74, 141, 248, 0.18);
  background: rgba(255, 255, 255, 0.8);
  color: var(--accent-blue);
  border-radius: 999px;
  padding: 6px 13px;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
  box-shadow: var(--shadow-sm);
}
.chip:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 16px rgba(74, 141, 248, 0.18);
}
.chip:active {
  transform: scale(0.97);
}

/* ===== CHAT SECTION ===== */
.chat {
  flex: 1 1 0%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  padding: 0;
  border-radius: 0;
  border-left: none;
  border-right: none;
  border-bottom: none;
  box-shadow: none;
  background: transparent;
  border: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* ===== MESSAGES ===== */
.messages {
  flex: 1 1 0%;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 16px 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ===== CHAT BUBBLES ===== */
.message {
  position: relative;
  display: inline-block;
  border-radius: var(--radius-bubble);
  padding: 11px 16px;
  line-height: 1.5;
  font-size: 0.92rem;
  width: fit-content;
  max-width: min(82%, 500px);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  animation: bubbleIn 250ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.message p { margin: 0; }

.message.ai {
  align-self: flex-start;
  background: var(--ai-bubble);
  color: var(--text);
  border-bottom-left-radius: 6px;
  box-shadow: 0 1px 3px rgba(26, 37, 64, 0.06),
              0 1px 0 rgba(255, 255, 255, 0.6) inset;
  border: 1px solid rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.message.user {
  align-self: flex-end;
  background: var(--human-bg);
  color: #fff;
  border-bottom-right-radius: 6px;
  box-shadow: 0 2px 8px rgba(74, 141, 248, 0.25);
}
.bubble-actions {
  margin-top: 8px;
  display: flex;
}
.bubble-action {
  border: 1px solid rgba(74, 141, 248, 0.22);
  background: rgba(255, 255, 255, 0.78);
  color: var(--accent-blue-deep);
  border-radius: 999px;
  padding: 4px 10px;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
}
.bubble-action:active {
  transform: scale(0.97);
}

.message.share-card {
  max-width: min(92%, 540px);
  background: linear-gradient(145deg, rgba(255, 251, 240, 0.95), rgba(255, 244, 210, 0.88));
  border: 1px solid rgba(212, 175, 55, 0.28);
  box-shadow: 0 2px 10px rgba(212, 175, 55, 0.16);
}
.share-quote {
  margin: 0;
  color: #4a3b1b;
  font-size: 0.88rem;
  line-height: 1.45;
}
.share-meta {
  margin: 6px 0 0;
  color: #7f6a33;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.share-actions {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.share-action {
  border: 1px solid rgba(74, 141, 248, 0.26);
  background: rgba(255, 255, 255, 0.74);
  color: var(--accent-blue-deep);
  border-radius: 999px;
  padding: 4px 10px;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
}
.share-action:active {
  transform: scale(0.97);
}

.quick-replies {
  flex: 0 0 auto;
  display: flex;
  gap: 7px;
  padding: 6px 14px 8px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}
.quick-replies[hidden] {
  display: none;
}
.quick-reply {
  border: 1px solid rgba(74, 141, 248, 0.18);
  background: rgba(255, 255, 255, 0.82);
  color: var(--accent-blue-deep);
  border-radius: 999px;
  padding: 5px 11px;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}
.quick-reply:active {
  transform: scale(0.97);
}
.quick-reply:disabled {
  opacity: 0.55;
  cursor: default;
}

.show-hero-btn {
  position: absolute;
  right: 14px;
  bottom: calc(84px + var(--safe-b));
  border: 1px solid rgba(74, 141, 248, 0.24);
  background: rgba(255, 255, 255, 0.88);
  color: var(--accent-blue-deep);
  border-radius: 999px;
  padding: 6px 12px;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 160ms ease, transform 160ms ease;
  z-index: 9;
}
.shell.chat-mode .show-hero-btn {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.shell.keyboard-open .show-hero-btn {
  opacity: 0;
  pointer-events: none;
}

/* ===== KEYBOARD TOOLBAR ===== */
.kb-toolbar {
  flex: 0 0 auto;
  display: none;
  justify-content: flex-end;
  padding: 4px 14px;
  background: var(--glass-heavy);
  border-top: 1px solid rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
}
.shell.keyboard-open .kb-toolbar {
  display: flex;
}
.kb-done {
  border: none;
  background: none;
  color: var(--accent-blue);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 4px 8px;
  cursor: pointer;
}
.kb-done:active {
  opacity: 0.6;
}

/* ===== COMPOSER ===== */
.composer {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 10px 14px;
  padding-bottom: calc(10px + var(--safe-b));
  background: var(--glass-heavy);
  border-top: 1px solid rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.04);
}
/* When keyboard is open, remove bottom safe area padding */
.shell.keyboard-open .composer {
  padding-bottom: 10px;
}

textarea {
  flex: 1;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 22px;
  padding: 10px 18px;
  font: inherit;
  font-size: 0.95rem;
  color: var(--text);
  min-height: 44px;
  max-height: 120px;
  resize: none;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.7);
  line-height: 1.4;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}
textarea::placeholder {
  color: var(--muted);
  opacity: 0.7;
}
textarea:focus-visible {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(74, 141, 248, 0.12);
  background: rgba(255, 255, 255, 0.9);
}

button[type="submit"] {
  flex: 0 0 auto;
  border: none;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  font: inherit;
  background: var(--human-bg);
  color: #fff;
  box-shadow: 0 3px 12px rgba(74, 141, 248, 0.30);
  cursor: pointer;
  transition: transform 140ms ease, opacity 140ms ease, box-shadow 140ms ease;
}
button[type="submit"]:hover:not(:disabled) {
  transform: scale(1.06);
  box-shadow: 0 4px 16px rgba(74, 141, 248, 0.40);
}
button[type="submit"]:active:not(:disabled) {
  transform: scale(0.96);
}
button[type="submit"]:disabled {
  opacity: 0.45;
  cursor: default;
}

.mode-chip {
  border: 1px solid rgba(74, 141, 248, 0.22);
  background: rgba(255, 255, 255, 0.86);
  color: var(--accent-blue-deep);
  border-radius: 999px;
  padding: 5px 10px;
  font: inherit;
  font-size: 0.67rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}
.mode-chip.active {
  background: rgba(74, 141, 248, 0.14);
  border-color: rgba(74, 141, 248, 0.4);
}
.mode-chip:active {
  transform: scale(0.96);
}
.mode-chip:disabled {
  opacity: 0.55;
  cursor: default;
}

.note {
  flex: 0 0 auto;
  text-align: center;
  color: var(--muted);
  font-size: 0.64rem;
  padding: 2px 14px 6px;
  padding-bottom: calc(6px + var(--safe-b));
  letter-spacing: 0.02em;
}

/* ===== KEYFRAMES ===== */
@keyframes angelIdle {
  0%, 100% { transform: translateY(0); }
  25% { transform: translateY(-2px); }
  50% { transform: translateY(-4px); }
  75% { transform: translateY(-2px); }
}
@keyframes haloFloat {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.9; }
  50% { transform: translateX(-50%) translateY(-3px); opacity: 1; }
}
@keyframes haloJoy {
  0% { transform: translateX(-50%) scale(1); opacity: 0.9; }
  50% { transform: translateX(-50%) scale(1.1); opacity: 1; }
  100% { transform: translateX(-50%) scale(1); opacity: 0.95; }
}
@keyframes blink {
  0%, 95%, 100% { transform: scaleY(1); }
  96%, 98% { transform: scaleY(0.2); }
}
@keyframes handLift {
  from { transform: translateY(0); }
  to   { transform: translateY(-4px); }
}
/* Prayer glow — golden radiance builds then holds */
@keyframes prayerGlow {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.74); }
  35%  { opacity: 0.92; transform: translate(-50%, -50%) scale(1); }
  75%  { opacity: 0.76; transform: translate(-50%, -50%) scale(1.06); }
  100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1.08); }
}
/* Halo brightens and expands during prayer */
@keyframes haloPrayer {
  0%   { box-shadow: 0 0 16px rgba(212, 175, 55, 0.5), 0 0 4px rgba(212, 175, 55, 0.3); }
  40%  { box-shadow: 0 0 26px rgba(212, 175, 55, 0.76), 0 0 9px rgba(212, 175, 55, 0.45), 0 0 48px rgba(212, 175, 55, 0.17); }
  100% { box-shadow: 0 0 20px rgba(212, 175, 55, 0.58), 0 0 7px rgba(212, 175, 55, 0.34), 0 0 38px rgba(212, 175, 55, 0.12); }
}
/* Hands come together at center for prayer */
@keyframes handPrayLeft {
  0%   { transform: translate(0, 0) scale(1); }
  65%  { transform: translate(15px, -13px) scale(1.03); }
  100% { transform: translate(13px, -12px) scale(1); }
}
@keyframes handPrayRight {
  0%   { transform: translate(0, 0) scale(1); }
  65%  { transform: translate(-15px, -13px) scale(1.03); }
  100% { transform: translate(-13px, -12px) scale(1); }
}
@keyframes sparkle {
  0%   { transform: scale(0.5); opacity: 0.2; }
  50%  { transform: scale(1.0); opacity: 0.9; }
  100% { transform: scale(0.5); opacity: 0.2; }
}
@keyframes floatGlow {
  0%, 100% { transform: translateY(0) translateX(0); }
  50% { transform: translateY(-16px) translateX(5px); }
}
@keyframes bubbleIn {
  from { opacity: 0; transform: translateY(6px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ===== DESKTOP ===== */
@media (min-width: 641px) {
  .shell {
    max-width: 700px;
    height: calc(100dvh - 32px);
    margin: 16px auto;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--stroke-subtle);
  }
  .hero {
    border-radius: 28px 28px 0 0;
    border: none;
  }
  .chat {
    border-radius: 0 0 28px 28px;
  }
}

/* ===== SMALL PHONES ===== */
@media (max-width: 380px) {
  h1 { font-size: 1.15rem; }
  .subtitle { display: none; }
  .character-wrap { height: 120px; width: 140px; }
  .angel { width: 96px; height: 112px; }
  .mode-chip {
    font-size: 0.64rem;
    padding: 4px 9px;
  }
  .quick-replies {
    padding: 5px 10px 7px;
    gap: 6px;
  }
  .quick-reply {
    font-size: 0.68rem;
    padding: 4px 10px;
  }
  .show-hero-btn {
    right: 10px;
    bottom: calc(80px + var(--safe-b));
    font-size: 0.68rem;
    padding: 5px 10px;
  }
}
