:root {
  color-scheme: dark;
  --canvas-a: #09050f;
  --canvas-b: #1b0d2b;
  --canvas-c: #301449;
  --text: #fbf8ff;
  --muted: #cfc3d9;
  --faint: rgba(251, 248, 255, 0.78);
  --accent: #c28cff;
  --accent-bright: #ead5ff;
  --line: rgba(235, 213, 255, 0.18);
  --surface: rgba(32, 14, 48, 0.58);
  --shadow: rgba(2, 0, 8, 0.42);
  --focus: #f4ceff;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

html[data-phase="message"] {
  --canvas-a: #12081e;
  --canvas-b: #371452;
  --canvas-c: #56227c;
}

html[data-phase="expanded"] {
  --canvas-a: #1c0b2c;
  --canvas-b: #542478;
  --canvas-c: #8550a8;
  --muted: #e4d8eb;
}

html[data-phase="complete"] {
  --canvas-a: #33104d;
  --canvas-b: #6f3186;
  --canvas-c: #844074;
  --muted: #f2e8f4;
  --line: rgba(255, 238, 255, 0.3);
  --surface: rgba(57, 15, 77, 0.48);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--canvas-a);
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto;
  color: var(--text);
  background:
    radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--canvas-c) 68%, transparent), transparent 38%),
    linear-gradient(155deg, var(--canvas-a), var(--canvas-b) 58%, var(--canvas-c));
  transition: background 1.1s var(--ease);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

button:focus-visible,
a:focus-visible,
[tabindex="-1"]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 5px;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  color: #24102f;
  background: #fff;
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.atmosphere,
.atmosphere > * {
  position: fixed;
  pointer-events: none;
}

.atmosphere {
  z-index: 0;
  inset: 0;
  overflow: hidden;
}

.glow {
  width: 32rem;
  height: 32rem;
  border-radius: 50%;
  filter: blur(44px);
  opacity: 0.18;
  transition: opacity 1s var(--ease), transform 1.4s var(--ease);
}

.glow--one {
  top: -18rem;
  left: -15rem;
  background: #9954d9;
}

.glow--two {
  right: -18rem;
  bottom: -20rem;
  background: #df74c9;
}

.glow--sun {
  top: 40%;
  left: 50%;
  width: 12rem;
  height: 12rem;
  background: #ffd9f1;
  opacity: 0;
  filter: blur(56px);
  transform: translate(-50%, -50%) scale(0.35);
}

html[data-phase="expanded"] .glow,
html[data-phase="complete"] .glow {
  opacity: 0.35;
}

html[data-phase="complete"] .glow--sun {
  opacity: 0.58;
  transform: translate(-50%, -50%) scale(1.8);
}

.spark {
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: #fff3d8;
  box-shadow: 0 0 1.2rem 0.35rem rgba(255, 225, 194, 0.65);
  opacity: 0;
  transform: scale(0);
  transition: opacity 600ms var(--ease), transform 900ms var(--ease);
}

.spark--one { top: 20%; left: 17%; }
.spark--two { top: 29%; right: 14%; transition-delay: 80ms; }
.spark--three { top: 64%; left: 10%; transition-delay: 160ms; }
.spark--four { right: 22%; bottom: 16%; transition-delay: 240ms; }
.spark--five { top: 11%; left: 63%; transition-delay: 320ms; }

html[data-phase="complete"] .spark {
  opacity: 0.9;
  transform: scale(1);
  animation: twinkle 2.8s ease-in-out infinite alternate;
}

.topbar,
.shell,
.footer {
  position: relative;
  z-index: 1;
}

.topbar {
  width: min(100%, 76rem);
  margin-inline: auto;
  padding: 1.25rem clamp(1rem, 4vw, 2.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.brand__mark {
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 50%;
  background: var(--accent-bright);
  box-shadow: 0 0 1.2rem 0.28rem rgba(209, 151, 255, 0.5);
}

.topbar__controls {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.music-toggle {
  min-height: 2.75rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  color: var(--faint);
  background: rgba(255, 255, 255, 0.055);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 750;
  white-space: nowrap;
  transition: border-color 220ms ease, background 220ms ease, box-shadow 220ms ease;
}

.music-toggle:hover {
  background: rgba(255, 255, 255, 0.11);
}

.music-toggle[aria-pressed="true"] {
  border-color: rgba(255, 236, 133, 0.52);
  background: rgba(255, 236, 133, 0.12);
  box-shadow: 0 0 1.4rem rgba(255, 214, 92, 0.13);
}

.music-toggle__indicator {
  width: 0.42rem;
  height: 0.42rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.38;
  transition: opacity 220ms ease, box-shadow 220ms ease;
}

.music-toggle[aria-pressed="true"] .music-toggle__indicator {
  opacity: 1;
  box-shadow: 0 0 0.8rem 0.2rem rgba(255, 236, 133, 0.48);
}

.music-toggle__state {
  padding-left: 0.42rem;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.61rem;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  opacity: 0.76;
}

.language-picker {
  min-height: 2.75rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--faint);
}

.language-picker__button {
  min-width: 2.75rem;
  min-height: 2.75rem;
  border: 0;
  border-radius: 999px;
  color: var(--faint);
  background: transparent;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.language-picker__button[aria-pressed="true"] {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
}

.shell {
  width: min(calc(100% - 2rem), 50rem);
  margin-inline: auto;
  display: grid;
  place-items: center;
  padding-block: clamp(1rem, 4vh, 3rem);
}

.panel {
  width: 100%;
  text-align: center;
}

.panel--intro {
  display: grid;
  justify-items: center;
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--accent-bright);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.17em;
  line-height: 1.4;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  text-wrap: balance;
}

h1 {
  max-width: 15ch;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.35rem, 7vw, 5.3rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.intro-copy {
  max-width: 38rem;
  margin: 1.35rem 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  line-height: 1.65;
}

.miracle-button {
  position: relative;
  isolation: isolate;
  width: clamp(13.25rem, 35vw, 17rem);
  aspect-ratio: 1;
  margin: clamp(2.2rem, 7vh, 4.5rem) auto 1.4rem;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 50%;
  display: grid;
  place-content: center;
  gap: 0.35rem;
  color: #fff;
  background:
    radial-gradient(circle at 42% 34%, rgba(255, 255, 255, 0.34), transparent 20%),
    linear-gradient(145deg, #9149bd, #6d2ba2 57%, #401366);
  box-shadow:
    0 1.5rem 4rem rgba(2, 0, 8, 0.5),
    inset 0 1px 1px rgba(255, 255, 255, 0.32),
    inset 0 -1.5rem 2.5rem rgba(39, 3, 68, 0.34);
  cursor: pointer;
  transition: transform 350ms var(--ease), box-shadow 350ms var(--ease), opacity 200ms ease;
}

.miracle-button::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -1rem;
  border: 1px solid rgba(213, 170, 255, 0.26);
  border-radius: inherit;
  animation: breathe 3.4s ease-in-out infinite;
}

.miracle-button:not(:disabled):hover {
  transform: translateY(-0.3rem) scale(1.015);
  box-shadow:
    0 2rem 5rem rgba(2, 0, 8, 0.56),
    0 0 3rem rgba(188, 112, 241, 0.24),
    inset 0 1px 1px rgba(255, 255, 255, 0.32);
}

.miracle-button:not(:disabled):active {
  transform: scale(0.965);
}

.miracle-button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.miracle-button__halo {
  position: absolute;
  z-index: -2;
  inset: -24%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(181, 97, 228, 0.24), transparent 65%);
}

.miracle-button__label {
  font-size: clamp(1.3rem, 4vw, 1.8rem);
  font-weight: 850;
  letter-spacing: 0.17em;
  text-indent: 0.17em;
}

.miracle-button__sub {
  padding: 0.16rem 0.48rem;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(34, 4, 52, 0.38);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.miracle-button__brand {
  margin-top: 0.05rem;
  font-size: 0.5rem;
  font-weight: 650;
  letter-spacing: 0.16em;
  line-height: 1.2;
  opacity: 0.68;
  text-transform: uppercase;
}

.button-hint,
.footer,
.share-status {
  color: var(--faint);
  font-size: 0.76rem;
}

.button-hint {
  min-height: 1.25rem;
  margin: 0;
  letter-spacing: 0.04em;
}

.panel--message {
  max-width: 44rem;
  padding: clamp(1.5rem, 5vw, 3rem);
  border: 1px solid var(--line);
  border-radius: 2rem;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.075), var(--surface));
  box-shadow: 0 2.25rem 6rem var(--shadow);
  backdrop-filter: blur(18px);
  animation: reveal-panel 700ms var(--ease) both;
}

.message-orb {
  width: 3.2rem;
  height: 3.2rem;
  margin: 0 auto 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 2rem rgba(213, 151, 255, 0.24);
}

.message-orb span {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: #f3d8ff;
  box-shadow: 0 0 1rem 0.25rem rgba(228, 183, 255, 0.7);
}

.message-title {
  max-width: 19ch;
  margin: 0 auto;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 5.5vw, 4rem);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.message-section--first {
  margin-top: 1.75rem;
}

.message-section__title {
  margin: 0 0 0.85rem;
  color: var(--accent-bright);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
}

.rich-text {
  max-width: 38rem;
  margin-inline: auto;
  color: var(--muted);
  font-size: clamp(1.03rem, 2.3vw, 1.18rem);
  line-height: 1.75;
}

.rich-text p {
  margin: 0;
  text-wrap: pretty;
}

.rich-text p + p {
  margin-top: 1rem;
}

.rich-text strong {
  color: var(--text);
  font-weight: 750;
}

.rich-text--lead {
  max-width: 34rem;
  font-size: clamp(1.08rem, 2.6vw, 1.28rem);
}

.primary-button,
.action-button {
  min-height: 3.2rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  cursor: pointer;
  font-weight: 750;
}

.primary-button {
  margin-top: 2rem;
  padding: 0.8rem 1.4rem;
  border: 1px solid rgba(255, 255, 255, 0.26);
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
}

.primary-button:hover,
.text-button:hover {
  background: rgba(255, 255, 255, 0.16);
}

.deeper-layer {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  animation: reveal-panel 600ms var(--ease) both;
}

.deeper-layer > .message-section + .message-section,
.deeper-layer > .action-card + .message-section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.action-card {
  max-width: 36rem;
  margin: 2rem auto 0;
  padding: clamp(1.35rem, 4vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 1.35rem;
  background: rgba(14, 5, 24, 0.24);
}

.action-card__time {
  margin: 0 0 0.55rem;
  color: var(--accent-bright);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.action-card h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.45rem, 3vw, 1.9rem);
  font-weight: 400;
}

.action-card .rich-text {
  margin-top: 0.8rem;
  font-size: 1rem;
  line-height: 1.65;
}

.action-button {
  margin-top: 1.25rem;
  padding: 0.78rem 1.25rem;
  border: 0;
  color: #351143;
  background: #f2d8ff;
}

.action-button[aria-pressed="true"] {
  color: #2d1432;
  background: #fff0d5;
}

.completion-note {
  margin: 1rem 0 0;
  color: #fff3d8;
  font-weight: 700;
}

.message-section--share .rich-text {
  font-size: 0.95rem;
}

.message-controls {
  margin-top: 1.6rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.text-button {
  min-height: 2.75rem;
  padding: 0.65rem 0.95rem;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.share-status {
  min-height: 1.2rem;
  margin: 0.65rem 0 0;
}

.footer {
  z-index: 1;
  padding: 1rem;
  text-align: center;
}

.footer p {
  margin: 0;
}

.footer .footer__copyright {
  margin-top: 0.48rem;
  color: rgba(240, 229, 247, 0.68);
  font-size: 0.64rem;
  line-height: 1.5;
  letter-spacing: 0.035em;
}

.noscript {
  position: fixed;
  z-index: 30;
  inset: auto 1rem 1rem;
  padding: 1rem;
  border-radius: 0.75rem;
  color: #25102e;
  background: #fff;
  text-align: center;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@keyframes breathe {
  0%, 100% { transform: scale(0.94); opacity: 0.45; }
  50% { transform: scale(1.06); opacity: 0.9; }
}

@keyframes reveal-panel {
  from { opacity: 0; transform: translateY(1rem) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes twinkle {
  from { filter: brightness(0.75); }
  to { filter: brightness(1.4); }
}

@media (max-width: 38rem) {
  .topbar {
    padding-top: 0.85rem;
    flex-wrap: wrap;
    row-gap: 0.3rem;
  }

  .brand {
    max-width: 12rem;
    font-size: 0.67rem;
  }

  .topbar__controls {
    width: 100%;
    justify-content: flex-end;
  }

  .miracle-button__brand {
    justify-self: center;
    font-size: 0.58rem;
    letter-spacing: 0.14em;
    opacity: 0.8;
  }

  .shell {
    width: min(calc(100% - 1.25rem), 50rem);
    padding-block: 0.5rem 1rem;
  }

  .panel--message {
    padding: 1.5rem 1rem;
    border-radius: 1.4rem;
  }

  .action-card {
    border-radius: 1rem;
  }

  .footer {
    padding-bottom: max(0.85rem, env(safe-area-inset-bottom));
  }
}

@media (max-height: 46rem) and (min-width: 45rem) {
  .miracle-button {
    width: 12rem;
    margin-block: 1.8rem 1rem;
  }

  .panel--intro h1 {
    font-size: clamp(2.35rem, 8vh, 4.25rem);
  }
}

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

@supports not (background: color-mix(in srgb, white, black)) {
  body {
    background: radial-gradient(circle at 50% 40%, var(--canvas-c), transparent 38%), linear-gradient(155deg, var(--canvas-a), var(--canvas-b));
  }
}
