/* Each root establishes a local query container; cqw is never viewport-based. */
.cw-scene {
  container-type: inline-size;
  display: block;
  width: 100%;
  min-width: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 500;
  font-style: normal;
  -webkit-font-smoothing: antialiased;
  --cw-green: var(--swatch--green, #79ff72);
  --cw-pink: var(--swatch--pink, #ff0048);
  --cw-yellow: var(--swatch--yellow, #ffff27);
  --cw-ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}
.cw-scene *, .cw-scene *::before, .cw-scene *::after { box-sizing: border-box; }
.cw-portrait { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; user-select: none; }
/* Fade glass surfaces themselves, never their ancestors. A retained opacity
   animation behaves like will-change: opacity and can trap descendant blur. */
.cw-reveal { opacity: 0; }
.cw-scene[data-started="true"] .cw-reveal { opacity: 1; animation-name: cw-reveal; animation-duration: 320ms; animation-timing-function: var(--cw-ease-out); animation-fill-mode: backwards; }
.cw-scene[data-started="true"] .cw-reveal-position { animation-name: cw-reveal-position; animation-duration: 320ms; animation-timing-function: var(--cw-ease-out); animation-fill-mode: backwards; }
@keyframes cw-reveal { from { opacity: 0; transform: translateY(1.5cqw); } to { opacity: 1; transform: none; } }
@keyframes cw-reveal-position { from { transform: translateY(1.5cqw); } to { transform: none; } }
/* Children share the position wrapper's delay, but do not duplicate its slide. */
.cw-reveal-position .cw-reveal { animation-delay: inherit; }
.cw-scene[data-started="true"] .cw-reveal-position .cw-reveal { animation-name: cw-reveal-opacity; }
@keyframes cw-reveal-opacity { from { opacity: 0; } to { opacity: 1; } }
.cw-scene :is(.cw-reveal, .cw-reveal-position, .cw-blink, .cw-typing-dots i, .cw-orbit, .cw-cursor-motion) { animation-play-state: paused; }
.cw-scene[data-running="true"] :is(.cw-reveal, .cw-reveal-position, .cw-blink, .cw-typing-dots i, .cw-orbit, .cw-cursor-motion) { animation-play-state: running; }
.cw-glass { -webkit-backdrop-filter: blur(var(--cw-blur)); backdrop-filter: blur(var(--cw-blur)); }

/* Messages — original artwork 280 × 129.391, without the presentation box. */
.cw-messages-stage { position: relative; height: 46.211cqw; }
.cw-message-row { --cw-blur: 32.573cqw; position: absolute; left: 0; top: 0; display: flex; align-items: flex-end; gap: 3.257cqw; }
.cw-message-row > .cw-portrait, .cw-next-message > .cw-portrait { flex: 0 0 10.098cqw; width: 10.098cqw; height: 10.098cqw; }
.cw-message-bubble { display: flex; align-items: center; width: 76.462cqw; height: 25.733cqw; padding: 4.96cqw 5.374cqw 6.201cqw; border-radius: 7.854cqw 7.854cqw 7.736cqw 2.21cqw; background: rgb(0 0 0 / 10%); }
.cw-message-bubble span { color: rgb(0 0 0 / 50%); font-size: 6.614cqw; line-height: 7.166cqw; letter-spacing: -0.198cqw; white-space: pre-line; overflow-wrap: anywhere; }
.cw-answered { --cw-blur: 32.573cqw; position: absolute; display: flex; align-items: center; justify-content: space-between; left: 51.791cqw; top: 22.801cqw; width: 48.208cqw; height: 13.355cqw; padding: 2.606cqw 3.909cqw; gap: 1.8cqw; background: #fff; border-radius: 7.854cqw; }
.cw-answered > span:first-child { color: rgb(0 0 0 / 60%); font-size: 6.614cqw; line-height: 7.166cqw; letter-spacing: -0.198cqw; white-space: nowrap; }
.cw-check { position: relative; display: block; flex: 0 0 7.817cqw; width: 7.817cqw; height: 7.817cqw; border-radius: 50%; background: var(--cw-green); }
.cw-check i { display: block; width: 100%; height: 100%; background: #000; mask-size: 100% 100%; mask-repeat: no-repeat; }
.cw-next-message { --cw-blur: 32.573cqw; position: absolute; left: 0.357cqw; top: 36.113cqw; display: flex; align-items: center; gap: 3.117cqw; }
.cw-message-typing { display: flex; align-items: center; justify-content: center; width: 14.173cqw; height: 7.594cqw; border-radius: 16.071cqw; background: rgb(0 0 0 / 15%); }
.cw-typing-dots { display: flex; align-items: center; justify-content: center; gap: 1.409cqw; }
.cw-typing-dots i { display: block; width: 1.88cqw; height: 1.88cqw; border-radius: 50%; background: #efeee9; animation: cw-typing 1.2s ease-in-out infinite both; }
.cw-typing-dots i:nth-child(2) { animation-delay: 0.15s; }
.cw-typing-dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes cw-typing { 0%, 60%, 100% { opacity: 0.4; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-0.35cqw); } }

/* Live — original artwork 91 × 36.75. Only its white dot animates. */
.cw-live-badge { display: flex; align-items: center; justify-content: center; gap: 11.538cqw; min-height: 40.385cqw; padding: 8.511cqw 12.767cqw; background: var(--cw-pink); border-radius: 7.692cqw; color: #fff; }
.cw-live-badge > span { font-size: 21.603cqw; line-height: 23.405cqw; letter-spacing: -0.648cqw; white-space: nowrap; }
.cw-live-dot { display: block; flex: 0 0 12.832cqw; width: 12.832cqw; height: 12.832cqw; border-radius: 50%; background: #fff; }
.cw-blink { animation: cw-blink 1.4s ease-in-out infinite; }
@keyframes cw-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* Status — original artwork 290 × 53.298. */
.cw-status-pill { --cw-blur: 40.841cqw; display: flex; align-items: center; justify-content: space-between; min-height: 18.378cqw; padding: 3.267cqw 5.517cqw; border-radius: 18.378cqw; background: rgb(0 0 0 / 20%); color: #efeee9; }
.cw-status-label { display: flex; align-items: center; gap: 2.759cqw; font-size: 6.779cqw; line-height: 7.344cqw; letter-spacing: -0.203cqw; white-space: nowrap; }
.cw-status-dot { display: block; width: 3.448cqw; height: 3.448cqw; border-radius: 50%; background: var(--cw-green); }
.cw-status-people { display: flex; align-items: center; }
.cw-status-person, .cw-status-count { display: flex; flex: 0 0 11.844cqw; width: 11.844cqw; height: 11.844cqw; }
.cw-status-person { margin-right: -2.759cqw; }
.cw-status-count { position: relative; align-items: center; justify-content: center; border-radius: 50%; background: #292929; font-size: 4.901cqw; line-height: 1.25; letter-spacing: -0.147cqw; font-variant-numeric: tabular-nums; font-weight: 400; }

/* Avatars — original artwork 437 × 267. Background intentionally transparent. */
.cw-avatars-stage { position: relative; height: 61.098cqw; overflow: hidden; }
.cw-selection { position: absolute; border-width: 0.343cqw; border-style: dashed; pointer-events: none; }
.cw-selection-pink { left: 1.592cqw; top: 1.978cqw; width: 53.089cqw; height: 62.599cqw; transform: rotate(4.48deg); border-color: var(--cw-pink); background: color-mix(in srgb, var(--cw-pink) 10%, transparent); }
.cw-selection-yellow { left: 52.401cqw; top: 32.215cqw; width: 56.293cqw; height: 29.062cqw; transform: rotate(-5.12deg); border-color: var(--cw-yellow); background: color-mix(in srgb, var(--cw-yellow) 10%, transparent); }
.cw-floating-position { position: absolute; aspect-ratio: 1; }
.cw-floating-enter, .cw-orbit { width: 100%; height: 100%; animation-delay: inherit; }
.cw-floating-position { --cw-blur: 11.442cqw; animation-delay: var(--cw-stagger); }
.cw-scene[data-started="true"] .cw-floating-enter, .cw-scene[data-started="true"] .cw-floating-enter .cw-reveal { animation-delay: var(--cw-stagger); animation-duration: 440ms; }
.cw-orbit { position: relative; animation: cw-orbit var(--cw-orbit-duration, 18s) linear infinite; animation-delay: var(--cw-orbit-phase, 0s); }
@keyframes cw-orbit { from { transform: rotate(0deg) translateX(0.55cqw) rotate(0deg); } to { transform: rotate(360deg) translateX(0.55cqw) rotate(-360deg); } }
.cw-avatar-typing { position: absolute; display: flex; align-items: center; justify-content: center; width: 8.696cqw; height: 3.204cqw; left: 50%; bottom: -1.602cqw; transform: translateX(-50%); border-radius: 8.924cqw; background: rgb(0 0 0 / 20%); }
.cw-avatars .cw-typing-dots { gap: 0.686cqw; }
.cw-avatars .cw-typing-dots i { width: 0.915cqw; height: 0.915cqw; }
.cw-you-label { position: absolute; display: flex; align-items: center; justify-content: center; left: 1.144cqw; top: 12.128cqw; min-width: 12.128cqw; height: 5.721cqw; padding: 0 2.288cqw; border-radius: 7.094cqw; background: color-mix(in srgb, var(--cw-green) 10%, transparent); color: var(--cw-green); font-size: 3.204cqw; line-height: 0.88; font-weight: 600; white-space: nowrap; }
.cw-cursor-motion { position: absolute; left: 10.984cqw; top: 18.993cqw; width: 4.348cqw; height: 4.348cqw; animation: cw-cursor 7s cubic-bezier(0.45, 0, 0.55, 1) infinite; }
.cw-cursor-reveal { display: block; position: absolute; inset: 0; }
.cw-cursor { display: block; position: absolute; inset: 0.362cqw; background: var(--cw-green); mask-size: 100% 100%; mask-repeat: no-repeat; }
@keyframes cw-cursor {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(1.1cqw, 0.7cqw) rotate(3deg); }
  55% { transform: translate(-0.45cqw, 1.3cqw) rotate(-2deg); }
  80% { transform: translate(0.5cqw, -0.35cqw) rotate(1deg); }
}

/* Static final state is also available as an instance prop. */
.cw-scene[data-motion="off"] .cw-reveal, .cw-scene[data-motion="off"] .cw-reveal-position { animation: none; opacity: 1; transform: none; }
.cw-scene[data-motion="off"] .cw-blink, .cw-scene[data-motion="off"] .cw-typing-dots i, .cw-scene[data-motion="off"] .cw-orbit, .cw-scene[data-motion="off"] .cw-cursor-motion { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .cw-scene .cw-reveal, .cw-scene .cw-reveal-position { animation: none !important; opacity: 1; transform: none; }
  .cw-scene .cw-blink, .cw-scene .cw-typing-dots i, .cw-scene .cw-orbit, .cw-scene .cw-cursor-motion { animation: none !important; }
}

