:root {
  color-scheme: light;
}

@font-face {
  font-family: "Fraunces Spark";
  src: url("/assets/fonts/Fraunces_72pt_SuperSoft-Black.ttf") format("truetype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Quicksand";
  src: url("/assets/fonts/Quicksand-Variable.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/Fraunces-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #fffaef;
  --main-blue: #9fc3ff;
  --light-blue: #dcebff;
  --dark-blue: #5f8fea;
  --star-gold: #ffc837;
  --soft-yellow: #fff49a;
  --mint: #8ef0d2;
  --leaf-green: #aeeb9f;
  --peach: #ffd6a7;
  --coral: #ff9f98;
  --lavender: #c9b5ff;
  --soft-pink: #f7b5d0;
  --sand: #d7c195;
  --taupe: #bcaa9b;
  --soft-grey: #dedede;
  --slate: #687581;
  --ink: #23303b;
  --muted: #596771;
  --white: #ffffff;
  --soft-shadow: 0 18px 42px rgba(35, 48, 59, 0.14);
  --neutral-drop: 0 5px 0 rgba(104, 117, 129, 0.2), 0 12px 18px rgba(35, 48, 59, 0.08);
  --neutral-drop-pressed: 0 2px 0 rgba(104, 117, 129, 0.18), 0 7px 12px rgba(35, 48, 59, 0.07);
  --moment-copy-size: 1.42rem;
  --moment-copy-weight: 850;
  --moment-copy-line-height: 1.24;
  --moment-line-gap: 24px;
  --moment-block-gap: 34px;
  --ritual-copy-size: 1.56rem;
  --action-reveal-delay: 2s;
  --thumb-card-width: 180px;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-round: "Quicksand", ui-rounded, "SF Pro Rounded", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  background: var(--main-blue);
  color: var(--ink);
  font-family: var(--font-round);
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  border: 0;
}

.app-shell {
  min-height: 100svh;
  background: var(--main-blue);
}

.screen {
  position: relative;
  min-height: 100svh;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: max(36px, env(safe-area-inset-top)) 42px max(36px, env(safe-area-inset-bottom));
  background: var(--paper);
  color: var(--theme-ink, var(--ink));
}

.screen::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--paper);
}

.theme-luna::before,
.theme-default::before {
  background: var(--paper);
}

.theme-sprout::before,
.reveal-screen::before,
.prep-screen::before {
  background: linear-gradient(180deg, color-mix(in srgb, var(--theme-primary) 86%, white), var(--theme-primary));
}

.splash {
  justify-content: center;
  align-items: center;
  padding: 0;
  background: var(--main-blue);
}

.splash::before {
  background: var(--main-blue);
}

.splash-logo {
  width: min(68vw, 260px);
  height: auto;
  animation: splashFade 4.5s ease both;
}

@keyframes splashFade {
  0% { opacity: 0; transform: scale(1.015); }
  22.22% { opacity: 1; transform: scale(1); }
  55.56% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.995); }
}

.center-copy {
  display: grid;
  justify-items: center;
  gap: 18px;
  text-align: center;
}

.hero-copy {
  margin-top: auto;
}

.screen-top {
  min-height: 80px;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

h1,
h2,
h3,
p,
figure,
dl,
dd {
  margin: 0;
}

h1,
h2 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.08;
}

h1 {
  font-size: 2.1rem;
}

h2 {
  font-size: 1.28rem;
}

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

.hero-line {
  max-width: 320px;
  color: color-mix(in srgb, var(--theme-ink, var(--ink)) 78%, var(--theme-primary));
  font-family: var(--font-display);
  font-size: var(--moment-copy-size);
  font-weight: var(--moment-copy-weight);
  line-height: var(--moment-copy-line-height);
}

.copy,
.support-copy {
  color: var(--muted);
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.45;
}

.support-copy {
  text-align: center;
  font-size: 0.86rem;
}

.auth-notice {
  margin: 14px 0 0;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--main-blue);
}

.auth-notice.is-error {
  color: var(--coral);
}

.app-button,
.choice-button,
.text-action,
.back-button,
.round-button,
.video-close,
.star-rating button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.app-button {
  width: 100%;
  min-height: 58px;
  padding: 16px 20px;
  border-radius: 16px;
  color: var(--ink);
  font-size: 1.12rem;
  font-weight: 850;
  transform: translateY(0);
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.app-button:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 var(--theme-button-shadow), 0 7px 12px rgba(35, 48, 59, 0.08);
}

.app-button:focus-visible,
.choice-button:focus-visible,
.text-field:focus-visible,
.round-button:focus-visible,
.back-button:focus-visible,
.video-close:focus-visible,
.star-rating button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--dark-blue), white 20%);
  outline-offset: 3px;
}

.primary-action {
  background: var(--theme-button);
  color: var(--white);
  box-shadow: 0 5px 0 var(--theme-button-shadow), 0 12px 18px rgba(35, 48, 59, 0.1);
}

.secondary-action {
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 5px 0 rgba(104, 117, 129, 0.2), 0 12px 18px rgba(35, 48, 59, 0.08);
}

.secondary-action:active {
  box-shadow: 0 2px 0 rgba(104, 117, 129, 0.18), 0 7px 12px rgba(35, 48, 59, 0.07);
}

.bottom-actions {
  margin-top: auto;
  display: grid;
  gap: 18px;
}

.top-actions {
  position: absolute;
  top: max(34px, env(safe-area-inset-top));
  left: 42px;
  right: 42px;
  z-index: 8;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.round-button,
.back-button,
.video-close {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: color-mix(in srgb, var(--theme-primary) 70%, var(--slate));
  font-size: 1.55rem;
  font-weight: 900;
  box-shadow: 0 6px 14px rgba(35, 48, 59, 0.1);
}

.back-button {
  position: absolute;
  top: max(44px, env(safe-area-inset-top));
  left: 42px;
  z-index: 8;
  background: var(--white);
  color: var(--main-blue);
  border: 0;
  box-shadow: 0 14px 26px rgba(104, 117, 129, 0.14);
}

.ghost-back {
  color: var(--slate);
  box-shadow: none;
  border: 1px solid rgba(104, 117, 129, 0.22);
}

.account-glyph {
  position: relative;
  width: 23px;
  height: 23px;
  display: block;
}

.account-glyph::before,
.account-glyph::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: currentColor;
}

.account-glyph::before {
  top: 1px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
}

.account-glyph::after {
  bottom: 1px;
  width: 20px;
  height: 11px;
  border-radius: 999px 999px 8px 8px;
}

.auth-screen,
.onboarding-screen,
.account-screen,
.settings-screen,
.legal-screen {
  background: var(--paper);
}

.auth-screen .field-label,
.auth-screen h1,
.auth-screen .copy,
.auth-screen .support-copy {
  color: var(--main-blue);
}

.auth-copy h1 {
  display: grid;
  gap: var(--moment-line-gap);
  max-width: 420px;
  font-family: "Fraunces Spark", var(--font-display);
  font-size: 2.22rem;
  font-weight: 900;
  line-height: 1.08;
}

.auth-copy h1 span {
  display: block;
}

.auth-copy .copy {
  max-width: 370px;
  font-size: 0.95rem;
  font-weight: 750;
}

.auth-copy {
  gap: var(--moment-block-gap);
}

.login-flow > *,
.login-flow-item {
  opacity: 0;
  animation: loginFlowIn 760ms ease both;
  animation-delay: calc(180ms + (var(--flow-index, 0) * 820ms));
}

.enter-after-splash .login-flow > *,
.enter-after-splash .login-flow-item {
  animation-delay: calc(650ms + (var(--flow-index, 0) * 820ms));
}

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

.onboarding-screen {
  gap: 26px;
}

.onboarding-screen .eyebrow,
.onboarding-screen .field-label,
.onboarding-screen h1,
.onboarding-screen .copy,
.onboarding-screen .support-copy {
  color: var(--main-blue);
}

.onboarding-screen .copy {
  font-weight: 750;
}

.onboarding-screen .primary-action {
  --theme-button: var(--main-blue);
  --theme-button-shadow: #6f9de3;
}

.auth-form {
  display: grid;
  gap: 12px;
  margin-top: auto;
}

.field-label {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 850;
}

.text-field {
  width: 100%;
  min-height: 54px;
  padding: 14px 16px;
  border: 2px solid color-mix(in srgb, var(--main-blue) 42%, white);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--main-blue);
  outline: none;
  box-shadow: 0 8px 18px rgba(35, 48, 59, 0.06);
}

.text-field::placeholder {
  color: color-mix(in srgb, var(--main-blue) 55%, var(--slate));
}

.text-field:focus {
  border-color: var(--main-blue);
}

.onboarding-topbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  min-height: 58px;
}

.progress-bars {
  width: min(100%, 320px);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-top: 0;
}

.progress-bars span {
  height: 10px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.72);
  transition: background 280ms ease;
}

.progress-bars span.is-active {
  background: var(--main-blue);
}

.onboarding-copy {
  margin: clamp(72px, 16svh, 150px) 0 0;
  color: var(--main-blue);
}

.onboarding-copy h1 {
  max-width: 380px;
}

.onboarding-copy .copy {
  max-width: 330px;
}

.onboarding-copy h1,
.onboarding-line,
.onboarding-question {
  max-width: 370px;
  color: var(--main-blue);
  font-family: var(--font-display);
  font-size: var(--moment-copy-size);
  font-weight: var(--moment-copy-weight);
  line-height: var(--moment-copy-line-height);
}

.onboarding-flow > *,
.onboarding-flow-item {
  opacity: 0;
  animation: onboardingTextIn 840ms ease both;
  animation-delay: calc(260ms + (var(--flow-index, 0) * 760ms));
}

.onboarding-choice-stack .choice-button {
  opacity: 0;
  animation: onboardingTextIn 720ms ease both;
}

.onboarding-choice-stack .choice-button:nth-child(1) { animation-delay: 1500ms; }
.onboarding-choice-stack .choice-button:nth-child(2) { animation-delay: 1680ms; }
.onboarding-choice-stack .choice-button:nth-child(3) { animation-delay: 1860ms; }
.onboarding-choice-stack .choice-button:nth-child(4) { animation-delay: 2040ms; }

.onboarding-action {
  opacity: 0;
  animation: onboardingActionIn 780ms ease both;
  animation-delay: 2240ms;
}

.enter-onboarding-step {
  animation: onboardingStepEnter 640ms ease both;
}

.onboarding-intro,
.onboarding-ready {
  gap: var(--moment-block-gap);
}

.onboarding-explainer {
  margin-top: clamp(96px, 18svh, 180px);
}

.onboarding-explainer h1 {
  display: grid;
  gap: var(--moment-block-gap);
}

.onboarding-explainer h1 span {
  display: block;
}

.onboarding-choice-copy {
  gap: var(--moment-block-gap);
  margin-top: clamp(60px, 13svh, 118px);
}

.onboarding-choice-copy h1 {
  max-width: 330px;
}

.onboarding-action {
  margin-top: auto;
}

.choice-stack {
  display: grid;
  gap: 10px;
  margin-top: auto;
}

.onboarding-choice-stack {
  margin-top: 0;
}

.choice-button {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 2px solid rgba(159, 195, 255, 0.32);
  background: rgba(255, 255, 255, 0.88);
  color: var(--main-blue);
  font-weight: 850;
  text-align: left;
  box-shadow: none;
  transform: translateY(0);
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.choice-button[aria-pressed="true"] {
  background: var(--soft-yellow);
  border-color: var(--soft-yellow);
  color: var(--main-blue);
  box-shadow: none;
}

.choice-button.is-disabled {
  border-color: color-mix(in srgb, var(--main-blue) 24%, white);
  background: rgba(255, 255, 255, 0.78);
  color: color-mix(in srgb, var(--main-blue) 38%, var(--soft-grey));
  cursor: default;
}

.choice-button.is-disabled:active {
  transform: none;
}

.choice-note {
  margin-left: auto;
  padding: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font-size: 1rem;
  font-weight: 900;
}

.choice-check {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border: 2px solid var(--main-blue);
  border-radius: 999px;
  opacity: 0.65;
}

.choice-button[aria-pressed="true"] .choice-check {
  background: var(--main-blue);
  box-shadow: inset 0 0 0 4px var(--soft-yellow);
  opacity: 1;
}

.choice-button.is-disabled .choice-check {
  display: block;
  border-color: color-mix(in srgb, var(--main-blue) 34%, var(--soft-grey));
  opacity: 0.74;
}

.choice-button:active {
  transform: scale(0.99);
  box-shadow: none;
}

.choice-button[aria-pressed="true"]:active {
  box-shadow: none;
}

.big-spark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  color: var(--theme-accent);
  font-size: 3.4rem;
  filter: drop-shadow(0 8px 14px rgba(255, 200, 55, 0.24));
}

.today-screen {
  align-items: center;
  justify-content: center;
  padding-inline: 28px;
}

.today-screen .top-actions {
  left: 34px;
  right: 34px;
}

.today-screen .round-button {
  background: color-mix(in srgb, var(--paper) 82%, var(--taupe));
  color: rgba(255, 255, 255, 0.96);
  box-shadow: none;
}

.today-screen .round-button:active {
  transform: translateY(2px);
}

.today-state-copy {
  position: absolute;
  top: calc(50% - 225px);
  left: 50%;
  z-index: 2;
  width: min(100vw - 52px, 540px);
  display: grid;
  justify-items: center;
  text-align: center;
  transform: translateX(-50%);
}

.today-state-copy h1 {
  color: var(--main-blue);
}

.today-state-copy h1 {
  max-width: 420px;
  font-family: "Fraunces Spark", var(--font-display);
  font-size: 2.22rem;
  font-weight: 900;
  line-height: 1.08;
}

.today-object-stack {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: grid;
  justify-items: center;
  transform: translate(-50%, -50%);
  isolation: isolate;
}

.today-object-caption {
  position: absolute;
  top: calc(100% + 24px);
  left: 50%;
  margin: 0;
  width: max-content;
  max-width: min(320px, calc(100vw - 64px));
  color: var(--main-blue);
  font-family: var(--font-display);
  font-size: var(--moment-copy-size);
  font-weight: var(--moment-copy-weight);
  line-height: var(--moment-copy-line-height);
  text-align: center;
  transform: translateX(-50%);
}

.today-object {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
}

.home-twinkles {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.home-twinkles span {
  position: absolute;
  left: var(--twinkle-x);
  top: var(--twinkle-y);
  color: var(--star-gold);
  font-size: var(--twinkle-size);
  line-height: 1;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.72) rotate(-8deg);
  text-shadow:
    0 0 14px rgba(255, 200, 55, 0.9),
    0 3px 0 rgba(231, 143, 0, 0.2);
  animation: homeTwinkle 4.6s ease-in-out var(--twinkle-delay) infinite;
}

.daily-card-button {
  width: 280px;
  min-height: 294px;
  position: relative;
  display: grid;
  place-items: center;
  perspective: 1100px;
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: transparent;
  isolation: isolate;
}

.daily-card {
  position: relative;
  z-index: 1;
  width: 176px;
  height: 244px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 4px solid color-mix(in srgb, var(--main-blue) 72%, white);
  border-radius: 22px;
  background: color-mix(in srgb, var(--main-blue) 52%, white);
  box-shadow: 0 20px 34px rgba(95, 143, 234, 0.2);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.daily-card.asset-card {
  width: 280px;
  height: 282px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.home-card-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 16px 18px rgba(95, 143, 234, 0.12));
}

.ready-screen .daily-card-button {
  animation: homeCardFloat 4.8s ease-in-out infinite, homePopIn 0.62s cubic-bezier(0.2, 0.72, 0.28, 1) 0.1s both;
}

.done-screen .today-object {
  animation: homeFadeIn 0.55s ease 0.1s both;
}

.today-screen .home-rays {
  animation: homeFadeIn 0.8s ease 0.28s both;
}

.today-screen .home-twinkles {
  animation: homeFadeIn 0.8s ease 0.34s both;
}

.today-screen .today-state-copy {
  animation: homeTextIn 0.55s ease 0.68s both;
}

.today-screen .today-object-caption {
  animation: homeCaptionIn 0.55s ease 0.72s both;
}

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

@keyframes homePopIn {
  0% { opacity: 0; scale: 0.82; }
  62% { opacity: 1; scale: 1.06; }
  100% { opacity: 1; scale: 1; }
}

@keyframes homeTextIn {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes homeCaptionIn {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.daily-card-button:active .daily-card {
  transform: translateY(4px) scale(0.98);
}

.daily-card-button:disabled {
  cursor: default;
}

.reveal-flip {
  position: relative;
  width: var(--thumb-card-width);
  aspect-ratio: 500 / 725;
  transform-style: preserve-3d;
  animation: revealFlip 1800ms linear forwards;
}

.reveal-flip-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 22px;
  overflow: hidden;
}

.reveal-flip-face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.reveal-flip-front {
  transform: rotateY(180deg);
  border: 4px solid var(--theme-primary);
}

.reveal-flip-front::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  background: linear-gradient(108deg, transparent 38%, rgba(255, 255, 255, 0.85) 50%, transparent 62%);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-65%);
  animation: revealShine 600ms ease-in-out 2700ms forwards;
}

@keyframes revealFlip {
  0% {
    transform: rotateY(0deg) scale(0.96);
    animation-timing-function: cubic-bezier(0.18, 0.72, 0.28, 1);
  }
  68% {
    transform: rotateY(900deg) scale(0.96);
    animation-timing-function: cubic-bezier(0.3, 0.1, 0.3, 1);
  }
  84% {
    transform: rotateY(900deg) scale(1.083);
    animation-timing-function: cubic-bezier(0.35, 0, 0.35, 1);
  }
  100% {
    transform: rotateY(900deg) scale(1);
  }
}

@keyframes revealShine {
  0% { opacity: 0; transform: translateX(-65%); }
  40% { opacity: 0.92; }
  100% { opacity: 0; transform: translateX(65%); }
}

.today-screen.is-revealing .today-state-copy {
  animation: revealCopyOut 520ms cubic-bezier(.2, .8, .2, 1) both;
}

.today-screen.is-revealing .today-object-caption {
  animation: revealCopyOut 420ms cubic-bezier(.2, .8, .2, 1) both;
}

.today-screen.is-revealing .daily-card {
  animation: revealCardOpen 520ms cubic-bezier(.2, .8, .2, 1) both;
}

.today-screen.is-revealing .daily-card-button {
  animation: none;
}

.today-screen.is-revealing .episode-art::after {
  opacity: 0;
  animation: none;
}

.today-screen.is-revealing .home-twinkles span {
  opacity: 0;
  animation: none;
}

.today-screen.is-revealing::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 40;
  background:
    radial-gradient(circle at 50% 58%, rgba(255, 255, 255, 0.96), rgba(255, 250, 239, 0.82) 46%, rgba(255, 250, 239, 0) 100%);
  pointer-events: none;
  animation: revealWashIn 520ms ease both;
}

.mystery-card::before,
.mystery-card::after {
  content: "";
  position: absolute;
  inset: 20px;
  border: 3px solid rgba(255, 255, 255, 0.82);
  border-radius: 16px;
}

.mystery-card::after {
  inset: 31px;
  border-width: 2px;
  opacity: 0.7;
}

.card-star {
  color: var(--star-gold);
  font-size: 3.8rem;
  filter: drop-shadow(0 4px 0 rgba(235, 163, 0, 0.22));
}

.card-star.lower {
  font-size: 3.2rem;
  transform: translateY(-5px);
}

.card-line {
  position: absolute;
  top: 22px;
  width: 88px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
}

.card-line.bottom {
  top: auto;
  bottom: 22px;
}

.episode-art-hero .episode-rays,
.spark-close-hero .close-rays {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(520px, 126vw);
  aspect-ratio: 1;
  z-index: 0;
  pointer-events: none;
  opacity: 0.26;
  overflow: hidden;
  transform: translate(-50%, -50%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 0%, #000 31%, rgba(0, 0, 0, 0.62) 48%, transparent 70%);
  mask-image: radial-gradient(circle at 50% 50%, #000 0%, #000 31%, rgba(0, 0, 0, 0.62) 48%, transparent 70%);
}

.episode-art-hero .episode-rays::before,
.spark-close-hero .close-rays::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-conic-gradient(
    from -6deg at 50% 50%,
    transparent 0deg,
    rgba(255, 255, 255, 0) 2deg,
    rgba(255, 255, 255, 0.54) 6deg,
    rgba(255, 255, 255, 0.54) 9deg,
    rgba(255, 255, 255, 0) 16deg,
    transparent 28deg
  );
  filter: blur(0.2px);
  transform-origin: 50% 50%;
  animation: objectRaysDrift 18s linear infinite;
}

.today-object-stack .home-rays {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(440px, 116vw);
  aspect-ratio: 1;
  z-index: 0;
  pointer-events: none;
  opacity: 1;
  overflow: hidden;
  transform: translate(-50%, -50%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 0%, #000 26%, rgba(0, 0, 0, 0.5) 46%, transparent 68%);
  mask-image: radial-gradient(circle at 50% 50%, #000 0%, #000 26%, rgba(0, 0, 0, 0.5) 46%, transparent 68%);
}

.today-object-stack .home-rays::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-conic-gradient(
    from -6deg at 50% 50%,
    transparent 0deg,
    rgba(255, 255, 255, 0) 2deg,
    rgba(255, 255, 255, 1) 6deg,
    rgba(255, 255, 255, 1) 9deg,
    rgba(255, 255, 255, 0) 16deg,
    transparent 28deg
  );
  transform-origin: 50% 50%;
  animation: objectRaysDrift 30s linear infinite;
}

@keyframes objectRaysDrift {
  to { transform: rotate(360deg); }
}

.enter-reveal-flash::after,
.enter-reveal-open::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 30;
  background:
    radial-gradient(circle at 50% 48%, rgba(255, 255, 255, 0.96), rgba(255, 250, 239, 0.72) 48%, rgba(255, 250, 239, 0) 100%);
  pointer-events: none;
  animation: revealWashOut 920ms ease both;
}

.enter-reveal-open .episode-detail > * {
  opacity: 0;
  animation: episodeRevealIn 780ms cubic-bezier(.16, .82, .2, 1) both;
}

.enter-reveal-open .episode-detail > :nth-child(1) { animation-delay: 160ms; }
.enter-reveal-open .episode-detail > :nth-child(2) { animation-delay: 220ms; }
.enter-reveal-open .episode-detail > :nth-child(3) { animation-delay: 300ms; }
.enter-reveal-open .episode-detail > :nth-child(4) { animation-delay: 380ms; }
.enter-reveal-open .episode-detail > :nth-child(5) { animation-delay: 460ms; }
.enter-reveal-open .episode-detail > :nth-child(6) { animation-delay: 540ms; }

.enter-reveal-open .bottom-actions {
  opacity: 0;
  animation: episodeActionsIn 680ms cubic-bezier(.16, .82, .2, 1) 620ms both;
}

@keyframes revealCopyOut {
  to { opacity: 0; transform: translateY(-12px) scale(0.98); }
}

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

@keyframes homeCardGlow {
  0%, 100% { opacity: 0.58; transform: scale(0.96); }
  50% { opacity: 0.9; transform: scale(1.04); }
}

@keyframes homeCardGlint {
  0%, 68% { opacity: 0; transform: translateX(-58%); }
  74% { opacity: 0.9; }
  82% { opacity: 0; transform: translateX(58%); }
  100% { opacity: 0; transform: translateX(58%); }
}

@keyframes homeTwinkle {
  0%, 100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.7) rotate(-10deg);
  }

  18% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.16) rotate(6deg);
  }

  36% {
    opacity: 0.42;
    transform: translate(-50%, -50%) scale(0.9) rotate(12deg);
  }

  54% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.72) rotate(-4deg);
  }
}

@keyframes revealCardOpen {
  0% { transform: translateY(0) scale(1); filter: brightness(1); }
  62% { transform: translateY(8px) scale(1.05); filter: brightness(1.08); }
  100% { transform: translateY(18px) scale(1.13); filter: brightness(1.12); }
}

@keyframes revealWashIn {
  0% { opacity: 0; transform: scale(0.88); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes revealWashOut {
  0% { opacity: 1; }
  42% { opacity: 0.74; }
  100% { opacity: 0; }
}

@keyframes episodeRevealIn {
  from { opacity: 0; transform: translateY(22px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

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

.enter-soft {
  animation: softEnter 360ms ease both;
}

.enter-after-splash {
  animation: postSplashEnter 760ms ease both;
}

.enter-after-splash::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  background: var(--main-blue);
  animation: splashCurtain 760ms ease both;
}

.enter-spark-added .spark-jar {
  animation: jarPop 620ms cubic-bezier(.2, .85, .2, 1.2) both;
}

.enter-onboarding-complete {
  animation: onboardingHomeEnter 820ms ease both;
}

.enter-onboarding-complete::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  background: var(--paper);
  animation: onboardingHomeCurtain 820ms ease both;
}

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

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

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

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

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

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

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

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

.episode-detail {
  flex: 0 0 auto;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 18px;
  text-align: center;
  padding: 96px 0 10px;
}

.episode-detail h1 {
  max-width: 330px;
  color: var(--white);
  font-family: "Fraunces Spark", var(--font-display);
  font-size: clamp(2.02rem, 8.7vw, 2.22rem);
  font-weight: 900;
  line-height: 1.08;
  text-shadow: 0 2px 16px rgba(35, 48, 59, 0.16);
}

.episode-description {
  max-width: 314px;
  color: var(--white);
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.32;
  text-shadow: 0 2px 14px rgba(35, 48, 59, 0.14);
}

.episode-art-hero {
  position: relative;
  width: min(276px, 74vw);
  min-height: 258px;
  display: grid;
  place-items: center;
  isolation: isolate;
}

.episode-meta {
  width: min(100%, 340px);
  display: grid;
  gap: 16px;
  color: var(--white);
}

.episode-meta > div {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.episode-meta dt {
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: color-mix(in srgb, var(--theme-primary) 48%, var(--ink));
  font-weight: 700;
  font-size: 0.82rem;
  line-height: 1;
}

.episode-meta dd {
  max-width: 310px;
  margin: 0;
  color: var(--white);
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.32;
  text-shadow: 0 2px 14px rgba(35, 48, 59, 0.14);
}

.mode-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.mode-row span,
.card-note {
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.26);
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 700;
}

.card-note {
  background: rgba(255, 255, 255, 0.3);
  color: var(--white);
}

.episode-art {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  aspect-ratio: 500 / 725;
  border: 4px solid color-mix(in srgb, var(--theme-primary), white 35%);
  border-radius: 25px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0)),
    color-mix(in srgb, var(--theme-secondary), white 24%);
  box-shadow: 0 18px 32px rgba(35, 48, 59, 0.16);
}

.episode-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.episode-art::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(108deg, transparent 42%, rgba(255, 255, 255, 0.72) 50%, transparent 58%);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-58%);
  animation: homeCardGlint 6.2s ease-in-out 1.1s infinite;
}

.detail-art {
  z-index: 1;
  width: var(--thumb-card-width);
  animation: cardRise 620ms cubic-bezier(.2, .85, .2, 1) both;
}

.daily-card-art {
  width: var(--thumb-card-width);
  border-radius: 19px;
  box-shadow: none;
  border-color: var(--theme-primary);
}

.daily-card.has-episode {
  width: auto;
  height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

@keyframes cardRise {
  from { opacity: 0; transform: translateY(30px) scale(0.92); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.text-action {
  min-height: 44px;
  border: 0;
  background: transparent;
  color: color-mix(in srgb, var(--theme-ink) 74%, white);
  font-weight: 900;
}

.text-action:disabled {
  opacity: 0.42;
  cursor: default;
}

.reveal-screen .text-action,
.prep-screen .text-action {
  color: rgba(255, 255, 255, 0.86);
  font-weight: 700;
}

.reveal-screen .primary-action,
.prep-screen .primary-action,
.reflection-screen .primary-action {
  font-weight: 700;
}

.video-screen {
  padding: 0;
  background: #111d2a;
}

.video-screen::before {
  background: #111d2a;
}

.video-close {
  position: absolute;
  top: max(42px, env(safe-area-inset-top));
  right: 40px;
  z-index: 8;
  background: rgba(214, 229, 255, 0.42);
  color: #101d2a;
}

.video-stage {
  position: absolute;
  inset: 0;
}

.video-stage video,
.video-poster {
  width: 100%;
  height: 100%;
}

.video-stage video {
  object-fit: cover;
}

.video-poster {
  display: grid;
  align-items: end;
  padding: 42px;
  background-position: center;
  background-size: cover;
}

.video-caption {
  display: grid;
  gap: 8px;
  padding-bottom: 118px;
  color: white;
  text-shadow: 0 2px 12px rgba(17, 29, 42, 0.5);
}

.video-caption p {
  font-size: 0.82rem;
  font-weight: 900;
}

.video-caption h1 {
  font-size: 2rem;
}

.video-controls {
  position: absolute;
  left: 42px;
  right: 42px;
  bottom: max(32px, env(safe-area-inset-bottom));
  z-index: 5;
  display: grid;
  gap: 15px;
  color: white;
  pointer-events: none;
}

.video-track {
  position: relative;
  height: 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.9);
}

.video-track i {
  position: absolute;
  left: 0;
  top: 0;
  width: 46%;
  height: 100%;
  border-radius: inherit;
  background: var(--theme-primary);
}

.prototype-video .video-track i {
  width: 0;
  animation: video-progress 3200ms linear forwards;
}

@keyframes video-progress {
  to {
    width: 100%;
  }
}

.control-row {
  display: flex;
  justify-content: space-around;
  align-items: center;
  font-size: 1.05rem;
}

.play-dot {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: white;
  color: var(--dark-blue);
  font-size: 0.9rem;
}

.pause-screen {
  justify-content: space-between;
  background: var(--theme-primary);
  color: var(--paper);
}

.pause-screen::before {
  background: transparent;
}

.pause-center {
  margin: auto 0;
  display: grid;
  justify-items: center;
  gap: var(--moment-block-gap);
  text-align: center;
}

.pause-line {
  max-width: 360px;
  margin: 0;
  color: var(--paper);
  font-family: var(--font-display);
  font-size: var(--ritual-copy-size);
  font-weight: var(--moment-copy-weight);
  line-height: var(--moment-copy-line-height);
  text-wrap: balance;
  opacity: 0;
  animation: onboardingTextIn 760ms ease both;
  animation-delay: calc(200ms + (var(--flow-index, 0) * 480ms));
}

.pause-screen .bottom-actions,
.reflection-screen .bottom-actions {
  opacity: 0;
  animation: onboardingActionIn 700ms ease both;
  animation-delay: var(--action-reveal-delay);
}

.pause-screen .primary-action {
  color: var(--white);
}

.reflection-screen {
  justify-content: space-between;
  background: var(--theme-primary);
}

.reflection-center {
  margin: auto 0;
  display: grid;
  justify-items: center;
  gap: 30px;
  width: 100%;
}

.reflection-screen::before {
  background: linear-gradient(180deg, color-mix(in srgb, var(--theme-primary) 92%, white), var(--theme-primary));
}

.spark-close-hero {
  position: relative;
  width: min(360px, 82vw);
  height: min(280px, 34svh);
  display: grid;
  place-items: center;
  isolation: isolate;
  opacity: 0;
  animation: reflectionJarIn 720ms cubic-bezier(.2, .85, .2, 1.05) both;
}

.spark-close-hero .spark-jar {
  z-index: 1;
}

@keyframes reflectionJarIn {
  0% { opacity: 0; transform: translateY(10px) scale(0.9); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.reflection-copy h1,
.reflection-copy .hero-line,
.rating-block h2 {
  color: var(--white);
  font-family: var(--font-display);
  font-size: var(--ritual-copy-size);
  font-weight: var(--moment-copy-weight);
  line-height: var(--moment-copy-line-height);
}

.reflection-copy h1 {
  max-width: 330px;
}

.reflection-copy {
  gap: var(--moment-block-gap);
}

/* Jar blooms first, then the copy and the rating question stagger in */
.reflection-copy h1,
.reflection-copy .hero-line,
.reflection-screen .rating-block {
  opacity: 0;
  animation: onboardingTextIn 760ms ease both;
  animation-delay: calc(760ms + (var(--flow-index, 0) * 460ms));
}

.rating-block {
  display: grid;
  justify-items: center;
  gap: 18px;
  text-align: center;
  margin-top: 44px;
}

.star-rating {
  display: flex;
  gap: 13px;
}

.star-rating button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.76);
  font-size: 2.1rem;
  filter: drop-shadow(0 3px 0 rgba(35, 48, 59, 0.08));
  transition: color 160ms ease, transform 160ms ease;
}

.star-rating button[aria-pressed="true"] {
  color: var(--star-gold);
  transform: translateY(-2px) scale(1.04);
}

.spark-jar {
  position: relative;
  width: 220px;
  height: 222px;
}

.spark-jar.large {
  width: 280px;
  height: 282px;
}

.spark-jar.hero {
  width: 260px;
  height: 262px;
}

.spark-jar-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 18px 22px rgba(95, 143, 234, 0.14));
}

.spark-jar.glowing .spark-jar-image {
  filter:
    drop-shadow(0 0 22px rgba(255, 200, 55, 0.28))
    drop-shadow(0 18px 22px rgba(95, 143, 234, 0.14));
}

.jar-lid {
  position: absolute;
  left: 18%;
  right: 18%;
  top: 0;
  height: 30px;
  border-radius: 999px;
  background: linear-gradient(180deg, #c5ddff, #88b9ff);
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.65), 0 8px 0 rgba(95, 143, 234, 0.22);
  z-index: 2;
}

.jar-body {
  position: absolute;
  left: 3%;
  right: 3%;
  top: 18px;
  bottom: 0;
  overflow: hidden;
  border: 6px solid rgba(143, 199, 232, 0.76);
  border-radius: 26px 26px 34px 34px;
  background:
    linear-gradient(115deg, rgba(255,255,255,0.56), transparent 24%),
    radial-gradient(circle at 50% 72%, rgba(255, 244, 154, 0.86), rgba(255, 200, 55, 0.48) 38%, rgba(220, 235, 255, 0.55) 68%),
    rgba(220, 235, 255, 0.68);
  box-shadow:
    inset 0 0 24px rgba(255, 255, 255, 0.72),
    0 20px 28px rgba(95, 143, 234, 0.2);
}

.jar-body::after {
  content: "";
  position: absolute;
  left: 13%;
  top: 16%;
  width: 17%;
  height: 45%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  filter: blur(1px);
}

.jar-spark {
  position: absolute;
  z-index: 2;
  color: var(--star-gold);
  font-size: 1.28rem;
  line-height: 1;
  transform: translate(-50%, -50%) scale(var(--spark-scale));
  text-shadow: 0 0 12px rgba(255, 244, 154, 0.82), 0 3px 0 rgba(231, 143, 0, 0.22);
  animation: sparkTwinkle 2.2s ease-in-out infinite;
}

.spark-jar.glowing .jar-body {
  box-shadow:
    inset 0 0 24px rgba(255, 255, 255, 0.72),
    0 0 44px rgba(255, 200, 55, 0.48),
    0 20px 28px rgba(95, 143, 234, 0.2);
}

@keyframes sparkTwinkle {
  0%, 100% { opacity: 0.76; transform: translate(-50%, -50%) scale(calc(var(--spark-scale) * 0.9)); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(calc(var(--spark-scale) * 1.12)); }
}

@keyframes jarPop {
  0% { transform: scale(0.86); filter: brightness(1); }
  55% { transform: scale(1.08); filter: brightness(1.08); }
  100% { transform: scale(1); filter: brightness(1); }
}

.settings-screen,
.account-screen,
.legal-screen {
  overflow-y: auto;
}

.settings-content,
.account-list,
.legal-content {
  display: grid;
  gap: 22px;
}

.settings-content {
  min-height: calc(100svh - 72px);
  padding-top: 104px;
  padding-bottom: 80px;
  align-content: start;
}

.settings-content h1,
.account-hero h1,
.legal-content h1 {
  color: var(--main-blue);
}

.settings-content h1 {
  text-align: center;
  font-size: 2.45rem;
}

.settings-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  margin-top: -2px;
}

.settings-links button {
  padding: 0;
  background: transparent;
  color: var(--main-blue);
  font-size: 0.92rem;
  font-weight: 850;
}

.settings-groups {
  display: grid;
  gap: 34px;
  margin-top: 30px;
}

.settings-group,
.account-list section {
  display: grid;
  gap: 12px;
}

.settings-group h2,
.account-list h2 {
  color: var(--main-blue);
  font-family: var(--font-round);
  font-size: 1.18rem;
  font-weight: 900;
}

.settings-group p,
.account-list p {
  color: var(--main-blue);
  font-weight: 700;
  line-height: 1.4;
}

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

.settings-option {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border: 2px solid color-mix(in srgb, var(--main-blue) 34%, white);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--main-blue);
  font-weight: 850;
  text-align: left;
  box-shadow: none;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.settings-option:active {
  transform: translateY(1px);
}

.settings-option[aria-pressed="true"] {
  border-color: transparent;
  background: var(--soft-yellow);
  color: var(--main-blue);
}

.settings-option.is-disabled {
  border-color: color-mix(in srgb, var(--main-blue) 24%, white);
  background: rgba(255, 255, 255, 0.58);
  color: color-mix(in srgb, var(--main-blue) 58%, white);
  cursor: not-allowed;
}

.settings-option-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
}

.settings-option-note {
  color: inherit;
  font-size: 0.88rem;
  opacity: 0.82;
}

.settings-option-radio {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border: 3px solid currentColor;
  border-radius: 999px;
}

.settings-option[aria-pressed="true"] .settings-option-radio {
  box-shadow: inset 0 0 0 5px var(--soft-yellow);
  background: currentColor;
}

.settings-session {
  margin: 18px 0 0;
  color: var(--main-blue);
  font-size: 0.98rem;
  font-weight: 850;
  text-align: center;
}

.settings-signout {
  --theme-button: var(--main-blue);
  --theme-button-shadow: #7fa9ef;
  margin-top: 0;
}

.legal-content {
  padding-top: 96px;
}

.legal-content h1 {
  text-align: center;
  font-size: 2.42rem;
}

.legal-content section {
  display: grid;
  gap: 14px;
}

.legal-content h2 {
  color: var(--main-blue);
  font-family: var(--font-round);
  font-size: 1.08rem;
  font-weight: 900;
  line-height: 1.3;
}

.legal-content p {
  color: var(--main-blue);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.48;
}

.account-hero {
  margin-top: 92px;
}

@media (min-width: 720px) {
  .app-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: #dedede;
  }

  .screen,
  .splash {
    width: 430px;
    min-height: 932px;
    max-height: 932px;
    border-radius: 0;
    box-shadow: 0 18px 70px rgba(35, 48, 59, 0.24);
  }
}

@media (max-width: 374px) {
  .screen {
    padding-left: 24px;
    padding-right: 24px;
  }

  .top-actions {
    left: 24px;
    right: 24px;
  }

  .back-button {
    left: 24px;
  }

  .episode-detail h1 {
    font-size: 2rem;
  }

  .detail-art {
    width: 220px;
  }
}

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