dialog.zo-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none !important;
  height: 100%;
  max-height: none;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0 !important;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  isolation: isolate;
  z-index: 12000;
  background: transparent;
  box-shadow: none;
  color: #2b1d45;
  font-family: inherit;
  pointer-events: none;
}

dialog.zo-overlay[open] { animation: none; }
.zo-overlay::backdrop { background: transparent; animation: none; }
body:has(> .zo-overlay[open]) #flowNotice { visibility: hidden; }

.zo-overlay:not([open]),
.zo-overlay[hidden],
.zo-overlay [hidden] {
  display: none !important;
}

.zo-preview, .zo-effects, .zo-effects > canvas, .zo-wall {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.zo-preview {
  display: block;
  z-index: 0;
  border: 0;
  background: #f9f6ff;
  animation: zo-preview-in 220ms ease-out both;
}

.zo-effects {
  z-index: 1;
  overflow: hidden;
}

.zo-effects > canvas {
  z-index: 3;
  display: block;
}

@property --zo-wall-reach {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 0%;
}

.zo-wall {
  overflow: hidden;
  background: linear-gradient(151deg, #f68258 0%, #f0659b 34%, #8165eb 67%, #4079ed 100%);
  opacity: 0;
  --zo-wall-falloff: #000 max(0%, calc(var(--zo-wall-reach) - 44%)),
    #0008 calc(var(--zo-wall-reach) * .68), #0001 calc(var(--zo-wall-reach) * .88), transparent var(--zo-wall-reach);
  mask-image:
    radial-gradient(ellipse 105% 91% at 28% 106%, var(--zo-wall-falloff)),
    radial-gradient(ellipse 98% 92% at 105% 43%, var(--zo-wall-falloff)),
    radial-gradient(ellipse 104% 90% at 66% -10%, var(--zo-wall-falloff)),
    radial-gradient(ellipse 95% 98% at -10% 42%, var(--zo-wall-falloff)),
    radial-gradient(ellipse 75% 82% at 77% 97%, var(--zo-wall-falloff));
  transition:
    opacity var(--zo-wall-fill-time) cubic-bezier(.68,.08,.84,.5),
    --zo-wall-reach var(--zo-wall-fill-time) ease-in-out;
}

.zo-wall::before, .zo-wall::after {
  content: "";
  position: absolute;
  inset: -30%;
}

.zo-wall::before {
  background:
    radial-gradient(ellipse 34% 35% at 29% 35%, #ffe687eb, #ffc47d91 49%, transparent),
    radial-gradient(ellipse 32% 39% at 33% 69%, #79efa3e6, #8ee9aa80 53%, transparent),
    radial-gradient(ellipse 34% 39% at 62% 36%, #f490bbc9, transparent);
  animation: zo-wall-warm-flow 6.8s ease-in-out -0.7s infinite;
}

.zo-wall::after {
  background:
    radial-gradient(ellipse 40% 36% at 51% 48%, #f8efffbf, #eee7ff6e 44%, transparent),
    radial-gradient(ellipse 32% 33% at 71% 32%, #51a5ffe6, #6eafff80 48%, transparent),
    radial-gradient(ellipse 33% 34% at 73% 69%, #bc8af5e8, #9c79ee80 53%, transparent),
    radial-gradient(ellipse 31% 37% at 46% 74%, #61e3e2c9, #6cd9eb6b 48%, transparent);
  animation: zo-wall-cool-flow 8.1s ease-in-out -1.1s infinite;
}

.zo-effects:is([data-scene="wall"], [data-scene="closing"]) .zo-wall {
  --zo-wall-reach: 108%;
  opacity: 1;
  transition-timing-function: cubic-bezier(.38,.05,.31,1), ease-in-out;
}

.zo-effects[data-scene="wall"] .zo-wall {
  /* The moving ribbons lead the reveal, then blend into the full wall. */
  mask-image: none;
  transition-duration: calc(var(--zo-wall-arrival-time) * .64), 0s;
  transition-delay: calc(var(--zo-wall-arrival-time) * .36), 0s;
}

.zo-wall-arrival {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.zo-wall-ribbon {
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(93vmin, 80vw);
  height: 60vmin;
  translate: -50% -50%;
  opacity: 0;
  background:
    radial-gradient(ellipse 26% 36% at 73% 38%, var(--zo-ribbon-light), transparent),
    radial-gradient(ellipse 46% 46% at 52% 49%, var(--zo-ribbon-color), transparent),
    radial-gradient(ellipse 27% 37% at 28% 61%, var(--zo-ribbon-tail), transparent);
}

.zo-wall-ribbon-warm {
  --zo-ribbon-light: #ffd170;
  --zo-ribbon-color: #ff8e62eb;
  --zo-ribbon-tail: #ff789eab;
  --zo-ribbon-motion: zo-wall-arrival-warm;
  --zo-ribbon-delay: 0ms;
}

.zo-wall-ribbon-cool {
  --zo-ribbon-light: #97ffeb;
  --zo-ribbon-color: #40c0f5e8;
  --zo-ribbon-tail: #61dbb9b5;
  --zo-ribbon-motion: zo-wall-arrival-cool;
  --zo-ribbon-delay: 115ms;
}

.zo-wall-ribbon-violet {
  --zo-ribbon-light: #e6aeff;
  --zo-ribbon-color: #a778f8da;
  --zo-ribbon-tail: #8389ffad;
  --zo-ribbon-motion: zo-wall-arrival-violet;
  --zo-ribbon-delay: 205ms;
}

.zo-effects[data-scene="wall"] .zo-wall-ribbon {
  animation: var(--zo-ribbon-motion) calc(var(--zo-wall-arrival-time) - var(--zo-ribbon-delay))
    cubic-bezier(.32,.20,.62,.92) var(--zo-ribbon-delay) both;
}

.zo-edge, .zo-edge-canvas, .zo-stream-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.zo-edge, .zo-edge-canvas { z-index: 1; }
.zo-stream-canvas { z-index: 3; }

@property --zo-edge-reach {
  syntax: "<angle>";
  inherits: false;
  initial-value: 218deg;
}

@property --zo-edge-fill {
  syntax: "<number>";
  inherits: false;
  initial-value: 1;
}

@property --zo-edge-seed {
  syntax: "<number>";
  inherits: false;
  initial-value: 1;
}

.zo-edge {
  mask-image: conic-gradient(from 180deg,
    rgb(0 0 0 / var(--zo-edge-seed)) 0deg calc(var(--zo-edge-reach) - 18deg),
    rgb(0 0 0 / var(--zo-edge-fill)) calc(var(--zo-edge-reach) + 11deg) calc(360deg - var(--zo-edge-reach) - 11deg),
    rgb(0 0 0 / var(--zo-edge-seed)) calc(360deg - var(--zo-edge-reach) + 18deg) 360deg);
  opacity: .87;
  animation: zo-edge-opening 760ms ease-in-out both;
  transition: opacity 680ms ease;
}

.zo-edge::before, .zo-edge::after {
  position: absolute;
  inset: 0;
  content: "";
}

@property --zo-edge-swell-a {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 24%;
}

@property --zo-edge-swell-b {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 77%;
}

.zo-edge::before {
  background:
    radial-gradient(ellipse 30% 11% at var(--zo-edge-swell-a) -2%, #ffb46dbd, transparent),
    radial-gradient(ellipse 10% 36% at 102% calc(109% - var(--zo-edge-swell-a)), #66c9ffc4, transparent),
    radial-gradient(ellipse 33% 12% at var(--zo-edge-swell-b) 103%, #fb53adba, transparent),
    radial-gradient(ellipse 10% 37% at -2% calc(var(--zo-edge-swell-b) - 8%), #8a79efbc, transparent),
    radial-gradient(ellipse 50% 10% at 7% -2%, #ff8d37, #ff93698f 37%, transparent),
    radial-gradient(ellipse 50% 11% at 83% -2%, #ff438d, #b75de59c 42%, transparent),
    radial-gradient(ellipse 10% 61% at 102% 49%, #b755ed, #6e89edaf 43%, transparent),
    radial-gradient(ellipse 51% 12% at 90% 103%, #3eacff, #5b7deaab 46%, transparent),
    radial-gradient(ellipse 53% 13% at 28% 104%, #f14b91, #a75eecac 42%, transparent),
    radial-gradient(ellipse 11% 67% at -3% 57%, #8270f4, #5594f799 39%, transparent);
  animation: zo-edge-swell-a 4.4s ease-in-out infinite alternate,
    zo-edge-swell-b 5.7s ease-in-out infinite alternate;
}

.zo-edge::after {
  background: radial-gradient(ellipse 42% 28% at 50% 103%, #fb458dcf, #9d4ffc88 39%, transparent);
  opacity: 0;
  animation: zo-edge-bloom 760ms ease-in-out both;
}

.zo-effects.zo-accelerated .zo-edge { visibility: hidden; }
.zo-effects:is([data-scene="wall"], [data-scene="closing"]) .zo-edge { opacity: .51; }
.zo-effects:is([data-scene="gather"], [data-scene="settled"]) .zo-edge,
.zo-effects[data-scene="settled"] .zo-edge-canvas { opacity: 0; }

.zo-spotlight {
  position: absolute;
  z-index: 2;
  border-radius: var(--zo-target-radius, 16px);
  box-shadow: 0 0 0 1px #a578dc55, 0 0 5px 2px #bc95ef36, 0 1px 15px 2px #b687f042;
  pointer-events: none;
}
.zo-opening {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: clamp(22px, 7vw, 94px);
  text-align: center;
  pointer-events: none;
  transition: opacity 240ms ease;
}

.zo-opening.zo-opening-exit { opacity: 0; }

.zo-opening-copy {
  max-width: 18em;
  margin: 0;
  color: #251439;
  font-size: clamp(28px, 4.7vw, 64px);
  font-weight: 750;
  line-height: 1.3;
  letter-spacing: -.038em;
  text-shadow: 0 1px 22px #fff9;
  text-wrap: balance;
}

.zo-opening-copy.zo-enter,
.zo-opening-copy[data-enter] {
  animation: zo-copy-in 480ms cubic-bezier(.2,.67,.25,1) both;
}

.zo-opening-audio {
  position: absolute;
  bottom: max(24px, env(safe-area-inset-bottom));
  justify-self: center;
}

.zo-card {
  position: absolute;
  z-index: 3;
  inset: var(--zo-card-top, auto) var(--zo-card-right, max(24px, env(safe-area-inset-right)))
    var(--zo-card-bottom, max(24px, env(safe-area-inset-bottom))) var(--zo-card-left, auto);
  box-sizing: border-box;
  width: min(390px, calc(100% - 32px));
  height: max-content;
  max-height: min(470px, calc(100% - 36px));
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  padding: clamp(16px, 3vw, 24px);
  border: 1px solid #fefaff;
  border-radius: 20px;
  background: linear-gradient(145deg, #fffdffec 6%, #f6eefff3 100%);
  backdrop-filter: blur(19px) saturate(1.16);
  box-shadow: 0 12px 44px #50317935, inset 0 0 0 1px #cbb0ed55;
  color: #2b1d45;
  pointer-events: auto;
  animation: zo-copy-in 260ms cubic-bezier(.2,.67,.25,1) both;
}

.zo-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  column-gap: 12px;
  row-gap: 6px;
}

.zo-card-kicker {
  color: #673bb0;
  font-size: 12px;
  font-weight: 700;
}

.zo-step-count {
  color: #685c77;
  font-size: 12px;
  line-height: 1.5;
}

.zo-card-title, .zo-card h2 {
  margin: 8px 0;
  font-size: clamp(21px, 4vw, 25px);
  font-weight: 750;
  line-height: 1.3;
  color: #302044;
}

.zo-card-description {
  margin: 0 0 16px;
  color: #574962;
  font-size: 14px;
  line-height: 1.65;
}

.zo-card-status {
  width: max-content;
  margin: -4px 0 14px;
  padding: 3px 8px;
  border-radius: 7px;
  background: #f4edff;
  color: #633b98;
  font-size: 11px;
  line-height: 1.5;
}

.zo-chapters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
  color: #584b68;
  font-size: 12px;
}

.zo-chapters select {
  min-width: 0;
  max-width: 100%;
  min-height: 36px;
  padding: 5px 10px;
  border: 1px solid #e4d9f1;
  border-radius: 9px;
  background: #faf7ff;
  color: #4b346b;
  font: inherit;
  cursor: pointer;
  pointer-events: auto;
}

.zo-card progress {
  display: block;
  width: 100%;
  height: 5px;
  margin: 10px 0 13px;
  accent-color: #7543d5;
}

.zo-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.zo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 40px;
  padding: 8px 13px;
  border: 1px solid #e3d7f3;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 1px 3px #36204a12;
  color: #51367b;
  font-family: inherit;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.25;
  cursor: pointer;
  pointer-events: auto;
  transition: background .18s ease, border-color .18s ease;
}

.zo-btn.zo-btn-primary {
  border-color: #6839c9;
  background: #6939c9;
  color: #fff;
}

.zo-btn:hover:not(:disabled) {
  border-color: #ac8ade;
  background: #f8f3ff;
}

.zo-btn.zo-btn-primary:hover:not(:disabled) {
  border-color: #5324a8;
  background: #5324a8;
}

.zo-overlay button:disabled { opacity: .46; cursor: default; }
.zo-overlay :is(button, select):focus-visible {
  outline: 2px solid #8356df;
  outline-offset: 3px;
}

@keyframes zo-edge-opening {
  0% { --zo-edge-reach: 5deg; --zo-edge-fill: 0; --zo-edge-seed: 0; }
  19% { --zo-edge-reach: 17deg; --zo-edge-seed: 1; }
  43% { --zo-edge-reach: 88deg; --zo-edge-fill: 0; }
  64% { --zo-edge-fill: 0; }
  83%, 100% { --zo-edge-reach: 218deg; --zo-edge-fill: 1; --zo-edge-seed: 1; }
}
@keyframes zo-edge-bloom {
  0%, 100% { opacity: 0; }
  38%, 54% { opacity: .82; }
}
@keyframes zo-edge-swell-a {
  from { --zo-edge-swell-a: 12%; }
  58% { --zo-edge-swell-a: 61%; }
  to { --zo-edge-swell-a: 90%; }
}
@keyframes zo-edge-swell-b {
  from { --zo-edge-swell-b: 84%; }
  47% { --zo-edge-swell-b: 51%; }
  to { --zo-edge-swell-b: 11%; }
}
@keyframes zo-wall-arrival-warm {
  0% { opacity: 0; transform: translate(-52vw, 52vh) rotate(-17deg) scale(.72); }
  26% { opacity: .88; transform: translate(-28vw, 31vh) rotate(-28deg) scale(.93); }
  54% { opacity: .9; transform: translate(-7vw, 7vh) rotate(-39deg) scale(1.12); }
  77% { opacity: .58; transform: translate(11vw, -13vh) rotate(-43deg) scale(1.31); }
  100% { opacity: 0; transform: translate(21vw, -22vh) rotate(-45deg) scale(1.52); }
}
@keyframes zo-wall-arrival-cool {
  0% { opacity: 0; transform: translate(61vw, -26vh) rotate(-25deg) scale(.68); }
  23% { opacity: .85; transform: translate(35vw, -22vh) rotate(-15deg) scale(.93); }
  50% { opacity: .88; transform: translate(9vw, -5vh) rotate(8deg) scale(1.15); }
  76% { opacity: .57; transform: translate(-13vw, 15vh) rotate(23deg) scale(1.33); }
  100% { opacity: 0; transform: translate(-22vw, 25vh) rotate(31deg) scale(1.55); }
}
@keyframes zo-wall-arrival-violet {
  0% { opacity: 0; transform: translate(-26vw, -61vh) rotate(8deg) scale(.64); }
  25% { opacity: .76; transform: translate(-19vw, -28vh) rotate(19deg) scale(.88); }
  51% { opacity: .81; transform: translate(-3vw, -10vh) rotate(34deg) scale(1.1); }
  75% { opacity: .53; transform: translate(18vw, 11vh) rotate(43deg) scale(1.24); }
  100% { opacity: 0; transform: translate(30vw, 27vh) rotate(53deg) scale(1.44); }
}
@keyframes zo-wall-warm-flow {
  0%, 100% { transform: translate(-8%, -5%) rotate(-4deg) scale(1.02); }
  26% { transform: translate(9%, -6%) rotate(4deg) scale(1.1); }
  52% { transform: translate(12%, 7%) rotate(2deg) scale(1.03); }
  76% { transform: translate(-5%, 11%) rotate(-5deg) scale(1.09); }
}
@keyframes zo-wall-cool-flow {
  0%, 100% { transform: translate(5%, -7%) rotate(6deg) scale(1.08); }
  21% { transform: translate(-9%, 5%) rotate(-2deg) scale(1.13); }
  48% { transform: translate(2%, 11%) rotate(-5deg) scale(1.03); }
  75% { transform: translate(11%, 0) rotate(3deg) scale(1.11); }
}
@keyframes zo-preview-in {
  from { opacity: .72; }
  to { opacity: 1; }
}
@keyframes zo-copy-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
  .zo-card {
    inset: var(--zo-card-top, auto) var(--zo-card-right, 12px)
      var(--zo-card-bottom, max(12px, env(safe-area-inset-bottom))) var(--zo-card-left, 12px);
    width: calc(100% - 24px);
    max-height: min(63dvh, calc(100% - 32px));
    border-radius: 18px;
  }

  .zo-card-actions { gap: 6px; }
  .zo-btn { min-height: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  .zo-overlay *, .zo-overlay *::before, .zo-overlay *::after {
    animation: none !important;
    transition: none !important;
  }
  .zo-effects > canvas { display: none; }
  .zo-effects.zo-accelerated .zo-edge { visibility: visible; }
}

@media (forced-colors: active) {
  .zo-edge, .zo-wall, .zo-wall-arrival, .zo-effects > canvas { display: none !important; }
  .zo-spotlight { outline: 2px solid Highlight; }
}
