/**
 * Alma — shared “Breathe” invitation (Core, Creations, Philosophy, Schedule).
 * Orb ~16s guided cycle: inhale, longer holds at top and bottom, slow exhale — therapist-paced.
 * Trigger shell: more / larger butterflies, wider drift, durations tied to 16s breath. Cues: Inhale → Hold → Exhale → Hold.
 */

/* Trigger animates as soon as it is shown; optional auto-popups still wait for alma-ready in JS. */

.alma-breathe-trigger-shell {
  position: fixed;
  z-index: 1285;
  left: max(0.55rem, env(safe-area-inset-left));
  bottom: calc(max(0.55rem, env(safe-area-inset-bottom)) + 6.85rem);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  pointer-events: none;
  overflow: visible;
}

.alma-breathe-trigger-shell .alma-breathe-trigger {
  pointer-events: auto;
}

.alma-breathe-trigger-orbit {
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(148px, 40vw, 228px);
  height: clamp(148px, 40vw, 228px);
  transform: translate(-50%, -50%);
  overflow: visible;
  pointer-events: none;
  z-index: 0;
}

/* Soft drift (no rigid spin): faded, varied speed via --bf-dur / --bf-delay, size from JS */
.alma-breathe-trigger-mini-bf {
  position: absolute;
  left: calc(50% + var(--bf-ox, 0px));
  top: calc(50% + var(--bf-oy, 0px));
  transform: translate(-50%, -50%);
  transform-origin: center center;
  width: 8px;
  height: 6px;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.22));
  will-change: transform, opacity;
}

.alma-breathe-trigger-mini-bf svg {
  display: block;
  width: 100%;
  height: 100%;
}

.alma-breathe-trigger-mini-bf svg path:first-child {
  fill: rgba(255, 255, 255, 0.42);
}

.alma-breathe-trigger-mini-bf svg path:last-child {
  fill: rgba(255, 255, 255, 0.28);
}

.alma-breathe-trigger-mini-bf--p0 {
  animation-name: alma-trigger-bf-drift-a;
  animation-duration: var(--bf-dur, 16s);
  animation-delay: var(--bf-delay, 0s);
}

.alma-breathe-trigger-mini-bf--p1 {
  animation-name: alma-trigger-bf-drift-b;
  animation-duration: var(--bf-dur, 22s);
  animation-delay: var(--bf-delay, 0s);
}

.alma-breathe-trigger-mini-bf--p2 {
  animation-name: alma-trigger-bf-drift-c;
  animation-duration: var(--bf-dur, 16s);
  animation-delay: var(--bf-delay, 0s);
}

.alma-breathe-trigger-mini-bf--p3 {
  animation-name: alma-trigger-bf-drift-d;
  animation-duration: var(--bf-dur, 20s);
  animation-delay: var(--bf-delay, 0s);
}

.alma-breathe-trigger-mini-bf--rev {
  animation-direction: reverse;
}

@keyframes alma-trigger-bf-drift-a {
  0%,
  100% {
    transform: translate(-50%, -50%) translate(0, 0) rotate(-5deg);
  }
  22% {
    transform: translate(-50%, -50%) translate(38px, -32px) rotate(7deg);
  }
  48% {
    transform: translate(-50%, -50%) translate(-26px, 22px) rotate(-9deg);
  }
  72% {
    transform: translate(-50%, -50%) translate(16px, 34px) rotate(5deg);
  }
}

@keyframes alma-trigger-bf-drift-b {
  0%,
  100% {
    transform: translate(-50%, -50%) translate(0, 0) rotate(6deg);
  }
  28% {
    transform: translate(-50%, -50%) translate(-40px, 14px) rotate(-8deg);
  }
  52% {
    transform: translate(-50%, -50%) translate(28px, -30px) rotate(4deg);
  }
  78% {
    transform: translate(-50%, -50%) translate(-14px, -38px) rotate(-6deg);
  }
}

@keyframes alma-trigger-bf-drift-c {
  0%,
  100% {
    transform: translate(-50%, -50%) translate(0, 0) rotate(-3deg);
  }
  33% {
    transform: translate(-50%, -50%) translate(10px, -44px) rotate(10deg);
  }
  55% {
    transform: translate(-50%, -50%) translate(-8px, 14px) rotate(-4deg);
  }
  80% {
    transform: translate(-50%, -50%) translate(22px, 32px) rotate(6deg);
  }
}

@keyframes alma-trigger-bf-drift-d {
  0%,
  100% {
    transform: translate(-50%, -50%) translate(0, 0) rotate(4deg);
  }
  25% {
    transform: translate(-50%, -50%) translate(-36px, -20px) rotate(-7deg);
  }
  50% {
    transform: translate(-50%, -50%) translate(44px, 10px) rotate(8deg);
  }
  75% {
    transform: translate(-50%, -50%) translate(-16px, 38px) rotate(-5deg);
  }
}

.alma-breathe-trigger {
  position: relative;
  z-index: 1;
  padding: 0.42rem 0.78rem;
  border-radius: 9999px;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  font-size: clamp(0.45rem, 0.95vw, 0.52rem);
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.52);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.22);
  cursor: pointer;
  backdrop-filter: blur(14px) saturate(1.04);
  -webkit-backdrop-filter: blur(14px) saturate(1.04);
  transition: color 0.35s ease, border-color 0.35s ease, background 0.35s ease;
  pointer-events: auto;
  isolation: isolate;
  animation:
    alma-breathe-trigger-rim 16s cubic-bezier(0.37, 0, 0.63, 1) infinite,
    alma-breathe-trigger-sleep 16s cubic-bezier(0.48, 0.02, 0.2, 1) infinite;
}

/* Gentle chest-like rise/fall — same period as orb, softer than linear */
@keyframes alma-breathe-trigger-sleep {
  0%,
  100% {
    transform: translateY(1px) scale(0.992);
  }
  28% {
    transform: translateY(-2.5px) scale(1.018);
  }
  38% {
    transform: translateY(-1.5px) scale(1.012);
  }
  48% {
    transform: translateY(-0.5px) scale(1.006);
  }
  82% {
    transform: translateY(1.5px) scale(0.988);
  }
}

.alma-breathe-trigger__wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2em;
  min-width: min(5.8em, 32vw);
  margin: 0 auto;
}

.alma-breathe-trigger__star {
  display: block;
  font-size: 0.95em;
  line-height: 1;
  letter-spacing: 0;
  margin-bottom: 0.12em;
  color: rgba(255, 248, 220, 0.88);
  text-shadow:
    0 0 12px rgba(255, 252, 240, 0.55),
    0 0 28px rgba(255, 220, 180, 0.35);
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.35));
}

/* Synced to orb: inhale while orb grows/holds top; exhale while orb releases */
.alma-breathe-trigger__phase {
  position: relative;
  width: 100%;
  height: 1.05em;
  flex-shrink: 0;
}

.alma-breathe-trigger__cue {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 0.78em;
  letter-spacing: 0.32em;
  color: rgba(255, 255, 255, 0.72);
  opacity: 0;
  pointer-events: none;
}

.alma-breathe-trigger__cue--inhale {
  animation: alma-breathe-inhale-cue 16s cubic-bezier(0.42, 0, 0.22, 1) infinite;
}

.alma-breathe-trigger__cue--hold-top {
  animation: alma-breathe-hold-top-cue 16s cubic-bezier(0.42, 0, 0.22, 1) infinite;
}

.alma-breathe-trigger__cue--exhale {
  animation: alma-breathe-exhale-cue 16s cubic-bezier(0.42, 0, 0.22, 1) infinite;
}

.alma-breathe-trigger__cue--hold-bottom {
  animation: alma-breathe-hold-bottom-cue 16s cubic-bezier(0.42, 0, 0.22, 1) infinite;
}

/* Shared with modal — four phases vs orb: inhale ↑, hold top, exhale ↓, hold bottom */
@keyframes alma-breathe-inhale-cue {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(3px);
    filter: blur(2px);
  }
  3% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    filter: none;
  }
  24% {
    opacity: 1;
  }
  28% {
    opacity: 0;
    transform: translateX(-50%) translateY(-2px);
    filter: blur(2px);
  }
  29%,
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(3px);
    filter: blur(3px);
  }
}

@keyframes alma-breathe-hold-top-cue {
  0%,
  27% {
    opacity: 0;
    transform: translateX(-50%) translateY(3px);
    filter: blur(2px);
  }
  29% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    filter: none;
  }
  46% {
    opacity: 1;
  }
  49% {
    opacity: 0;
    transform: translateX(-50%) translateY(-1px);
    filter: blur(2px);
  }
  50%,
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(3px);
    filter: blur(3px);
  }
}

@keyframes alma-breathe-exhale-cue {
  0%,
  49% {
    opacity: 0;
    transform: translateX(-50%) translateY(3px);
    filter: blur(2px);
  }
  51% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    filter: none;
  }
  79% {
    opacity: 1;
  }
  82% {
    opacity: 0;
    transform: translateX(-50%) translateY(2px);
    filter: blur(2px);
  }
  83%,
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(3px);
    filter: blur(3px);
  }
}

@keyframes alma-breathe-hold-bottom-cue {
  0%,
  81% {
    opacity: 0;
    transform: translateX(-50%) translateY(3px);
    filter: blur(2px);
  }
  83% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    filter: none;
  }
  94% {
    opacity: 1;
  }
  97% {
    opacity: 0;
    transform: translateX(-50%) translateY(2px);
    filter: blur(2px);
  }
  98%,
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(3px);
    filter: blur(3px);
  }
}

/* One short word at a time (~3s each), same 16s loop */
.alma-breathe-trigger__words {
  position: relative;
  width: 100%;
  height: 1.15em;
  flex-shrink: 0;
}

.alma-breathe-trigger__word {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 0.92em;
  letter-spacing: 0.22em;
  color: inherit;
  opacity: 0;
  animation-duration: 16s;
  animation-timing-function: cubic-bezier(0.42, 0, 0.22, 1);
  animation-iteration-count: infinite;
  will-change: opacity, transform, filter;
}

.alma-breathe-trigger__word:nth-child(1) {
  animation-name: alma-breathe-trigger-word-0;
}

.alma-breathe-trigger__word:nth-child(2) {
  animation-name: alma-breathe-trigger-word-1;
}

.alma-breathe-trigger__word:nth-child(3) {
  animation-name: alma-breathe-trigger-word-2;
}

.alma-breathe-trigger__word:nth-child(4) {
  animation-name: alma-breathe-trigger-word-3;
}

.alma-breathe-trigger__word:nth-child(5) {
  animation-name: alma-breathe-trigger-word-4;
}

.alma-breathe-trigger__word:nth-child(6) {
  animation-name: alma-breathe-trigger-word-5;
}

/* Six ~3s slots; each word fades in/out only in its slice */
@keyframes alma-breathe-trigger-word-0 {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(4px);
    filter: blur(2px);
  }
  2% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    filter: none;
  }
  12% {
    opacity: 1;
  }
  15.5% {
    opacity: 0;
    transform: translateX(-50%) translateY(-3px);
    filter: blur(2px);
  }
  16%,
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(4px);
    filter: blur(3px);
  }
}

@keyframes alma-breathe-trigger-word-1 {
  0%,
  15.5% {
    opacity: 0;
    transform: translateX(-50%) translateY(4px);
    filter: blur(2px);
  }
  17.5% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    filter: none;
  }
  28% {
    opacity: 1;
  }
  31.5% {
    opacity: 0;
    transform: translateX(-50%) translateY(-3px);
    filter: blur(2px);
  }
  32%,
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(4px);
    filter: blur(3px);
  }
}

@keyframes alma-breathe-trigger-word-2 {
  0%,
  31.5% {
    opacity: 0;
    transform: translateX(-50%) translateY(4px);
    filter: blur(2px);
  }
  33.5% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    filter: none;
  }
  44% {
    opacity: 1;
  }
  47.5% {
    opacity: 0;
    transform: translateX(-50%) translateY(-3px);
    filter: blur(2px);
  }
  48%,
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(4px);
    filter: blur(3px);
  }
}

@keyframes alma-breathe-trigger-word-3 {
  0%,
  47.5% {
    opacity: 0;
    transform: translateX(-50%) translateY(4px);
    filter: blur(2px);
  }
  49.5% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    filter: none;
  }
  60% {
    opacity: 1;
  }
  63.5% {
    opacity: 0;
    transform: translateX(-50%) translateY(-3px);
    filter: blur(2px);
  }
  64%,
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(4px);
    filter: blur(3px);
  }
}

@keyframes alma-breathe-trigger-word-4 {
  0%,
  63.5% {
    opacity: 0;
    transform: translateX(-50%) translateY(4px);
    filter: blur(2px);
  }
  65.5% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    filter: none;
  }
  76% {
    opacity: 1;
  }
  79.5% {
    opacity: 0;
    transform: translateX(-50%) translateY(-3px);
    filter: blur(2px);
  }
  80%,
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(4px);
    filter: blur(3px);
  }
}

@keyframes alma-breathe-trigger-word-5 {
  0%,
  79.5% {
    opacity: 0;
    transform: translateX(-50%) translateY(4px);
    filter: blur(2px);
  }
  81.5% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    filter: none;
  }
  92% {
    opacity: 1;
  }
  98% {
    opacity: 0;
    transform: translateX(-50%) translateY(-3px);
    filter: blur(2px);
  }
  98.5%,
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(4px);
    filter: blur(3px);
  }
}

.alma-breathe-trigger::before {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: inherit;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(255, 252, 248, 0.42) 0%,
    rgba(255, 255, 255, 0.12) 38%,
    transparent 72%
  );
  filter: blur(14px);
  opacity: 0.35;
  animation: alma-breathe-trigger-aura 16s cubic-bezier(0.37, 0, 0.63, 1) infinite;
}

/* Rim + outer glow only — color/background stay on hover transitions */
@keyframes alma-breathe-trigger-rim {
  0%,
  100% {
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow:
      0 0 0 0 rgba(255, 255, 255, 0),
      0 0 18px rgba(255, 255, 255, 0.04);
  }
  26% {
    border-color: rgba(255, 255, 255, 0.38);
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.08),
      0 0 28px rgba(255, 255, 255, 0.2),
      0 0 52px rgba(255, 248, 238, 0.12);
  }
  38% {
    border-color: rgba(255, 255, 255, 0.44);
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.1),
      0 0 34px rgba(255, 255, 255, 0.26),
      0 0 68px rgba(255, 252, 248, 0.15);
  }
  48% {
    border-color: rgba(255, 255, 255, 0.24);
    box-shadow:
      0 0 22px rgba(255, 255, 255, 0.12),
      0 0 40px rgba(255, 248, 238, 0.08);
  }
  82% {
    border-color: rgba(255, 255, 255, 0.13);
    box-shadow:
      0 0 0 0 rgba(255, 255, 255, 0),
      0 0 16px rgba(255, 255, 255, 0.05);
  }
}

@keyframes alma-breathe-trigger-aura {
  0%,
  100% {
    opacity: 0.22;
    transform: scale(0.92);
  }
  26% {
    opacity: 0.95;
    transform: scale(1.08);
  }
  38% {
    opacity: 1;
    transform: scale(1.1);
  }
  82% {
    opacity: 0.2;
    transform: scale(0.9);
  }
}

.alma-breathe-trigger:hover,
.alma-breathe-trigger:focus-visible {
  color: rgba(255, 255, 255, 0.78);
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
}

.alma-breathe-trigger:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.25);
  outline-offset: 2px;
}

.alma-breathe-trigger-shell[hidden] {
  display: none !important;
}

.alma-breathe {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: grid;
  place-items: center;
  padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom))
    max(1rem, env(safe-area-inset-left));
  pointer-events: auto;
}

.alma-breathe[hidden] {
  display: none !important;
  pointer-events: none;
}

.alma-breathe__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.74);
  backdrop-filter: blur(12px) saturate(1.03);
  -webkit-backdrop-filter: blur(12px) saturate(1.03);
}

.alma-breathe__sheet {
  position: relative;
  z-index: 1;
  width: min(100%, 28rem);
  max-height: min(90dvh, 38rem);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: clamp(1.35rem, 4.5vw, 2rem);
  border-radius: 1.25rem;
  background: var(--alma-liquid-shine), var(--alma-liquid-veil);
  border: 1px solid var(--alma-liquid-border);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.32) inset,
    0 1px 0 var(--alma-liquid-inset) inset,
    0 28px 72px rgba(0, 0, 0, 0.34),
    var(--alma-liquid-shadow);
  backdrop-filter: blur(var(--alma-liquid-blur, 22px)) saturate(var(--alma-liquid-sat, 1.05));
  -webkit-backdrop-filter: blur(var(--alma-liquid-blur, 22px)) saturate(var(--alma-liquid-sat, 1.05));
}

.alma-breathe__start {
  display: block;
  width: 100%;
  max-width: 14rem;
  margin: 0 auto 1.1rem;
  padding: 0.62rem 1.2rem;
  border-radius: 9999px;
  font-family: inherit;
  font-size: clamp(0.62rem, 1.45vw, 0.72rem);
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.95);
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(18px) saturate(1.06);
  -webkit-backdrop-filter: blur(18px) saturate(1.06);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.22) inset,
    0 0 28px rgba(255, 255, 255, 0.1);
  transition: border-color 0.4s ease, box-shadow 0.4s ease, background 0.4s ease;
}

.alma-breathe__start:hover,
.alma-breathe__start:focus-visible {
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.14);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.18) inset,
    0 0 36px rgba(255, 255, 255, 0.14);
}

.alma-breathe__start:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.35);
  outline-offset: 3px;
}

.alma-breathe__start[hidden] {
  display: none !important;
}

.alma-breathe--awaiting-start .alma-breathe__stage .alma-breathe__bf,
.alma-breathe--awaiting-start .alma-breathe__stage .alma-breathe__orb-wrap,
.alma-breathe--awaiting-start .alma-breathe__stage .alma-breathe__orb-halo,
.alma-breathe--awaiting-start .alma-breathe__stage .alma-breathe__orb-glow,
.alma-breathe--awaiting-start .alma-breathe__stage .alma-breathe__orb-core,
.alma-breathe--awaiting-start .alma-breathe__stage .alma-breathe__cue {
  animation-play-state: paused !important;
}

.alma-breathe__title {
  font-size: clamp(0.98rem, 2.6vw, 1.2rem);
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-align: center;
  color: rgba(255, 255, 255, 0.94);
  margin-bottom: 0.9rem;
}

.alma-breathe__desc {
  font-size: clamp(0.78rem, 1.5vw, 0.9rem);
  font-weight: 300;
  letter-spacing: 0.045em;
  line-height: 1.72;
  color: rgba(255, 255, 255, 0.52);
  text-align: center;
  margin-bottom: 1.35rem;
}

.alma-breathe__auto-opt {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  max-width: 22rem;
  margin: -0.35rem auto 1.15rem;
  padding: 0.5rem 0.65rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.14);
  cursor: pointer;
  font-size: clamp(0.68rem, 1.35vw, 0.78rem);
  font-weight: 300;
  letter-spacing: 0.03em;
  line-height: 1.5;
  color: rgba(255, 250, 245, 0.58);
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}

.alma-breathe__auto-opt[hidden] {
  display: none !important;
}

.alma-breathe__auto-opt input {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  margin: 0.12rem 0 0;
  accent-color: rgba(200, 190, 255, 0.95);
  cursor: pointer;
}

.alma-breathe__auto-opt strong {
  font-weight: 500;
  color: rgba(255, 248, 240, 0.78);
}

.alma-breathe__auto-opt:focus-within {
  outline: 1px solid rgba(255, 255, 255, 0.28);
  outline-offset: 2px;
}

.alma-breathe__stage {
  position: relative;
  height: min(48vw, 240px);
  max-height: 260px;
  margin: 0 auto 1.5rem;
  border-radius: 1.1rem;
  background: radial-gradient(ellipse 72% 78% at 50% 48%, rgba(18, 18, 22, 0.92) 0%, rgba(0, 0, 0, 0.35) 100%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  overflow: hidden;
}

.alma-breathe--awaiting-start .alma-breathe__stage {
  opacity: 0.55;
}

.alma-breathe__cues {
  position: absolute;
  left: 0;
  right: 0;
  top: max(0.5rem, 3%);
  z-index: 6;
  height: 1.5em;
  pointer-events: none;
  text-align: center;
}

.alma-breathe__cue {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: clamp(0.62rem, 1.65vw, 0.82rem);
  font-weight: 300;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 0 20px rgba(0, 0, 0, 0.85);
  opacity: 0;
  pointer-events: none;
}

.alma-breathe__cue--inhale {
  animation: alma-breathe-inhale-cue 16s cubic-bezier(0.42, 0, 0.22, 1) infinite;
}

.alma-breathe__cue--hold-top {
  animation: alma-breathe-hold-top-cue 16s cubic-bezier(0.42, 0, 0.22, 1) infinite;
}

.alma-breathe__cue--exhale {
  animation: alma-breathe-exhale-cue 16s cubic-bezier(0.42, 0, 0.22, 1) infinite;
}

.alma-breathe__cue--hold-bottom {
  animation: alma-breathe-hold-bottom-cue 16s cubic-bezier(0.42, 0, 0.22, 1) infinite;
}

.alma-breathe__bf-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.alma-breathe__bf {
  position: absolute;
  left: var(--bf-x, 50%);
  top: var(--bf-y, 50%);
  width: clamp(16px, 3.5vw, 26px);
  height: clamp(12px, 2.6vw, 20px);
  margin: 0;
  opacity: 0.52;
  animation: alma-breathe-bf-drift var(--bf-dur, 14s) ease-in-out infinite;
  animation-delay: var(--bf-delay, 0s);
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.12));
}

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

@keyframes alma-breathe-bf-drift {
  0%,
  100% {
    transform: translate(-50%, -50%) translate(0, 0) rotate(-8deg);
    opacity: 0.4;
  }
  25% {
    transform: translate(-50%, -50%) translate(28px, -20px) rotate(12deg);
    opacity: 0.65;
  }
  50% {
    transform: translate(-50%, -50%) translate(-12px, -36px) rotate(-6deg);
    opacity: 0.55;
  }
  75% {
    transform: translate(-50%, -50%) translate(-26px, 18px) rotate(14deg);
    opacity: 0.48;
  }
}

.alma-breathe__orb-wrap {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 120px;
  height: 120px;
  margin: -60px 0 0 -60px;
  display: grid;
  place-items: center;
  z-index: 2;
  animation: alma-breathe-orb-cycle 16s cubic-bezier(0.37, 0, 0.63, 1) infinite;
  transform-origin: center center;
}

.alma-breathe__orb-halo {
  position: absolute;
  width: 130%;
  height: 130%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 44%, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0.08) 42%, transparent 68%);
  animation: alma-breathe-halo-cycle 16s cubic-bezier(0.37, 0, 0.63, 1) infinite;
}

.alma-breathe__orb-glow {
  position: absolute;
  width: 95%;
  height: 95%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 48%, rgba(255, 252, 248, 0.45) 0%, transparent 60%);
  filter: blur(10px);
  opacity: 0.82;
  animation: alma-breathe-orb-glow-cycle 16s cubic-bezier(0.37, 0, 0.63, 1) infinite;
}

.alma-breathe__orb-core {
  position: relative;
  z-index: 2;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow:
    0 0 14px rgba(255, 255, 255, 1),
    0 0 36px rgba(255, 255, 255, 0.55),
    0 0 72px rgba(255, 248, 238, 0.28);
  animation: alma-breathe-orb-core-cycle 16s cubic-bezier(0.37, 0, 0.63, 1) infinite;
}

/* ~16s: inhale, hold full (~3s), long exhale, hold empty (~2s) */
@keyframes alma-breathe-orb-cycle {
  0%,
  100% {
    transform: scale(0.8);
  }
  24% {
    transform: scale(1.18);
  }
  30% {
    transform: scale(1.26);
  }
  38% {
    transform: scale(1.3);
  }
  48% {
    transform: scale(1.28);
  }
  82% {
    transform: scale(0.8);
  }
}

@keyframes alma-breathe-halo-cycle {
  0%,
  100% {
    transform: scale(0.86);
    opacity: 0.55;
  }
  24% {
    transform: scale(1.24);
    opacity: 0.88;
  }
  30% {
    transform: scale(1.34);
    opacity: 0.98;
  }
  38% {
    transform: scale(1.42);
    opacity: 1;
  }
  48% {
    transform: scale(1.38);
    opacity: 0.98;
  }
  82% {
    transform: scale(0.84);
    opacity: 0.52;
  }
}

@keyframes alma-breathe-orb-glow-cycle {
  0%,
  100% {
    opacity: 0.55;
    filter: blur(10px);
  }
  24% {
    opacity: 0.9;
    filter: blur(13px);
  }
  38% {
    opacity: 1;
    filter: blur(15px);
  }
  48% {
    opacity: 0.98;
    filter: blur(14px);
  }
  82% {
    opacity: 0.5;
    filter: blur(9px);
  }
}

@keyframes alma-breathe-orb-core-cycle {
  0%,
  100% {
    box-shadow:
      0 0 10px rgba(255, 255, 255, 0.75),
      0 0 26px rgba(255, 255, 255, 0.35),
      0 0 48px rgba(255, 248, 238, 0.16);
  }
  38% {
    box-shadow:
      0 0 22px rgba(255, 255, 255, 1),
      0 0 52px rgba(255, 255, 255, 0.62),
      0 0 96px rgba(255, 248, 238, 0.34);
  }
  82% {
    box-shadow:
      0 0 10px rgba(255, 255, 255, 0.72),
      0 0 24px rgba(255, 255, 255, 0.32),
      0 0 44px rgba(255, 248, 238, 0.14);
  }
}

.alma-breathe__btn {
  display: block;
  width: 100%;
  margin: 0 auto;
  font-family: inherit;
  font-weight: 400;
  font-size: clamp(0.58rem, 1.1vw, 0.68rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.28);
  padding: 1rem 1.35rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: border-color 0.35s ease, background 0.35s ease;
}

.alma-breathe__btn:hover,
.alma-breathe__btn:focus-visible {
  border-color: rgba(255, 255, 255, 0.46);
  background: rgba(255, 255, 255, 0.14);
}

.alma-breathe__btn:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.35);
  outline-offset: 3px;
}

@media (max-width: 520px) {
  .alma-breathe-trigger-shell {
    bottom: calc(max(0.5rem, env(safe-area-inset-bottom)) + 7.35rem);
  }

  .alma-breathe-trigger {
    letter-spacing: 0.16em;
    padding-inline: 0.62rem;
  }

  .alma-breathe-trigger__wrap {
    min-width: min(5.4em, 38vw);
  }

  .alma-breathe-trigger__cue {
    font-size: 0.72em;
    letter-spacing: 0.26em;
  }

  .alma-breathe-trigger__word {
    font-size: 0.85em;
    letter-spacing: 0.16em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .alma-breathe-trigger-orbit {
    display: none;
  }

  .alma-breathe__cues {
    display: none;
  }

  .alma-breathe-trigger,
  .alma-breathe-trigger::before {
    animation: none;
  }

  .alma-breathe-trigger {
    transform: none;
  }

  .alma-breathe-trigger::before {
    opacity: 0.28;
    transform: none;
  }

  .alma-breathe-trigger__wrap {
    min-width: auto;
    gap: 0;
  }

  .alma-breathe-trigger__phase {
    display: none;
  }

  .alma-breathe-trigger__words {
    height: auto;
  }

  .alma-breathe-trigger__word {
    animation: none !important;
    position: absolute;
    opacity: 0 !important;
    filter: none !important;
    transform: translateX(-50%) !important;
    letter-spacing: 0.2em;
  }

  .alma-breathe-trigger__word:first-child {
    position: relative;
    left: auto;
    transform: none !important;
    opacity: 1 !important;
  }

  .alma-breathe-trigger__word:not(:first-child) {
    visibility: hidden;
    pointer-events: none;
  }

  .alma-breathe__orb-wrap,
  .alma-breathe__orb-halo,
  .alma-breathe__orb-glow,
  .alma-breathe__orb-core {
    animation: none;
  }

  .alma-breathe__orb-wrap {
    transform: scale(1);
  }

  .alma-breathe__orb-glow {
    opacity: 0.75;
    filter: blur(10px);
  }

  .alma-breathe__bf {
    animation: none;
    opacity: 0.42;
  }
}
