/* ══════════════════════════════════════════════════
   O₂ RHYTHM — HOME: "What just happened?"
══════════════════════════════════════════════════ */

.o2-safety {
  font-size: .8rem; color: var(--text-muted); text-align: center;
  margin: calc(-1 * var(--sp-2)) 0 var(--sp-2);
}
.o2-safety a { color: #d64545; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

.o2-home, .o2-moment { width: 100%; display: flex; flex-direction: column; gap: var(--sp-3); animation: fadeUp var(--ease-panel) both; }
.o2-home[hidden], .o2-moment[hidden] { display: none; }

.o2-home .hero-headline { font-size: clamp(1.75rem, 1.3rem + 2vw, 2.4rem); letter-spacing: -.02em; margin-bottom: var(--sp-1); }
.o2-hero-sub { color: var(--text-muted); font-size: var(--text-sm); margin: 0; }
.o2-inline-link {
  font: inherit; font-weight: 600; color: var(--teal); background: none; border: 0; padding: 0; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}

/* Moment cards */
.o2-moments { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.o2-moment-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  text-align: left; cursor: pointer; font: inherit; color: var(--text);
  background: var(--surface); border: 1.5px solid var(--divider); border-radius: var(--radius-md);
  padding: 10px 12px;
  transition: border-color var(--ease), transform var(--ease), box-shadow var(--ease), background var(--ease);
}
.o2-moment-card:hover, .o2-moment-card:focus-visible {
  border-color: var(--teal); box-shadow: var(--shadow-md); transform: translateY(-2px); outline: none;
}
.o2-moment-card:active { transform: scale(.98); }
.o2-moment-card__label { font-weight: 600; font-size: 1.02rem; line-height: 1.25; color: var(--navy); }
[data-theme="dark"] .o2-moment-card__label { color: var(--text); }
.o2-moment-card__sub { font-size: .78rem; color: var(--text-muted); line-height: 1.35; }

.o2-justbreathe { margin: 2px 0 0; }

/* "Or go straight to" chips (these are the original section buttons, restyled) */
.o2-direct-label { font-size: .78rem; color: var(--text-faint); text-align: center; margin: 4px 0 -6px; letter-spacing: .04em; }
.home-nav.o2-direct { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0; padding: 0; }
.home-btn.o2-chip {
  width: auto; padding: 8px 14px; gap: 0;
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
  border-radius: 999px; box-shadow: none; font: inherit; font-size: .88rem; font-weight: 500;
}
.home-btn.o2-chip:hover { filter: none; border-color: var(--teal); color: var(--teal); }

/* A real line from a real letter */
.o2-snippet {
  display: flex; flex-direction: column; gap: 6px; text-align: left; cursor: pointer; font: inherit;
  background: var(--grad-soft); border: 1px solid var(--divider); border-left: 3px solid var(--teal);
  border-radius: 0 var(--radius-md) var(--radius-md) 0; padding: 14px 16px; color: var(--text);
  transition: transform var(--ease);
}
.o2-snippet[hidden] { display: none; }
.o2-snippet:hover { transform: translateY(-1px); }
.o2-snippet__eyebrow { font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--teal); }
.o2-snippet__text { font-family: Georgia, 'Times New Roman', serif; font-size: 1.02rem; line-height: 1.55; font-style: italic; }
.o2-snippet__from { font-size: .78rem; color: var(--text-muted); }

/* Moment screen */
.o2-moment__back { align-self: flex-start; }
.o2-moment__tag { margin: 0; font-size: .85rem; font-weight: 700; letter-spacing: .06em; color: var(--teal); }
.o2-moment__ack { margin: 0; font-size: clamp(1.4rem, 1.1rem + 1.4vw, 1.9rem); line-height: 1.25; font-weight: 700; color: var(--navy); letter-spacing: -.01em; }
[data-theme="dark"] .o2-moment__ack { color: var(--text); }
.o2-moment__start { width: 100%; }
.o2-moment__alt { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }

@media (max-width: 360px) {
  .o2-moments { grid-template-columns: 1fr; }
}

/* Writing prompt: stack the question above its button so longer prompts read well on phones */
@media (max-width: 560px) {
  .rf-active-prompt { flex-direction: column; align-items: stretch; }
  .rf-active-prompt__text { font-size: 1.05rem; }
  .rf-active-prompt #rfAnotherPrompt { align-self: flex-start; }
}

/* One centered, phone-width column at every screen size */
#panel-home .o2-safety,
#panel-home .o2-home,
#panel-home .o2-moment,
#panel-home .home-support-note {
  width: 100%;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  align-self: center;
}
#panel-home .o2-safety { text-align: center; }
#panel-home .home-support-note { max-width: 34ch; }
.o2-moment-card { padding: 14px; gap: 4px; justify-content: center; }

/* Dark-mode toggle lives in the header's top-right, not floating over content */
.header-inner { position: relative; }
.header-inner .theme-toggle {
  position: absolute; top: 14px; right: 14px; bottom: auto;
  width: 38px; height: 38px; box-shadow: none; z-index: 41;
}

/* "I'm done" closing screen */
.o2-done {
  position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 24px;
  background:
    radial-gradient(120% 60% at 0% 0%, rgba(45, 212, 196, .14), transparent 55%),
    radial-gradient(120% 60% at 100% 100%, rgba(76, 141, 255, .16), transparent 55%),
    #050d1c;
  color: #e8f1fb; text-align: center; animation: fadeUp .5s ease both;
}
.o2-done[hidden] { display: none; }
.o2-done__inner { max-width: 420px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.o2-done__orb {
  width: 90px; height: 90px; border-radius: 50%; margin-bottom: 8px;
  background: radial-gradient(circle at 34% 28%, rgba(255,255,255,.85), rgba(45,212,196,.9) 26%, rgba(26,111,216,.92) 68%, rgba(13,27,62,.95));
  box-shadow: 0 0 50px rgba(45,212,196,.4); animation: rgxBreatheIcon 6s ease-in-out infinite;
}
.o2-done__title { margin: 0; font-size: 1.6rem; font-weight: 700; color: #fff; }
.o2-done__sub { margin: 0; color: rgba(232, 241, 251, .72); line-height: 1.6; }
.o2-done .btn--ghost { color: rgba(232, 241, 251, .8); border: 1px solid rgba(255,255,255,.18); margin-top: 10px; }

/* Add to home screen: card on the home screen */
.o2-install-card {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; cursor: pointer; font: inherit;
  background: var(--surface); color: var(--text); border: 1px solid var(--divider); border-radius: var(--radius-md);
  padding: 12px 14px; transition: border-color var(--ease);
}
.o2-install-card[hidden] { display: none; }
.o2-install-card:hover { border-color: var(--teal); }
.o2-install-card img { border-radius: 11px; flex: none; }
.o2-install-card__text { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.o2-install-card__t { font-weight: 700; font-size: .95rem; }
.o2-install-card__s { font-size: .8rem; color: var(--text-muted); }
.o2-install-card__arrow { font-size: 1.5rem; color: var(--text-muted); }

/* ...and a quiet link on the "I'm done" screen */
.o2-done__install {
  font: inherit; font-size: .85rem; cursor: pointer; margin-top: 4px; padding: 6px;
  background: none; border: 0; color: rgba(232, 241, 251, .7); text-decoration: underline; text-underline-offset: 3px;
}
.o2-done__install[hidden] { display: none; }

/* The how-to sheet */
.o2-sheet {
  position: fixed; inset: 0; z-index: 1100; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(5, 13, 28, .55); padding: 16px;
}
.o2-sheet[hidden] { display: none; }
.o2-sheet__panel {
  width: 100%; max-width: 420px; background: var(--surface); color: var(--text);
  border-radius: 22px; padding: 24px 22px 18px; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
  animation: fadeUp .3s ease both;
}
.o2-sheet__icon { border-radius: 15px; }
.o2-sheet__title { margin: 4px 0 0; font-size: 1.25rem; font-weight: 700; }
.o2-sheet__sub { margin: 0; color: var(--text-muted); font-size: .92rem; }
.o2-sheet__steps { text-align: left; margin: 6px 0 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; width: 100%; }
.o2-sheet__steps[hidden] { display: none; }
.o2-sheet__steps li { line-height: 1.45; }
.o2-sheet__note { margin: 0; font-size: .82rem; color: var(--text-muted); }
.o2-sheet__note[hidden] { display: none; }
.o2-sheet .rgx-found-btn[hidden] { display: none; }
