/* /meet-nova/: styles from the WordPress page https://novatools.org/meetnovaai/ (ported by scripts/port/port.mjs) */

/* =========================================================
   NOVA · MEET NOVA — INTERACTIVE STORY
   Namespace: nvst- (nova-story) — every class starts with `nvst-`
   so class names never collide with external / WordPress theme CSS.

   ISOLATION LAYER: element-level theme styles (e.g. theme.css doing
   `button { border-radius: 0 }` or `p { margin: 1em 0 }`) can still
   slip past the class prefix — the resets below neutralize those
   inside our tree without touching anything outside it.

   Every reset uses :where(element) to zero out the element portion
   of specificity, so the resets sit at (0,1,0) — the same level as
   our .nvst-* class rules. Source order then lets our own class
   rules (defined below) win, while external theme rules still get
   filtered out by name.
   ========================================================= */

.nvst-story-root,
.nvst-story-root *,
.nvst-story-root *::before,
.nvst-story-root *::after {
  box-sizing: border-box;
}

/* Reset margins/padding on common block/inline elements inside our tree. */
.nvst-story-root :where(p, h1, h2, h3, h4, h5, h6, ul, ol, li, figure, blockquote) {
  margin: 0;
  padding: 0;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  line-height: inherit;
  list-style: none;
}

/* Neutralize theme button styling. */
.nvst-story-root :where(button) {
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: inherit;
  outline: 0;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}
.nvst-story-root :where(button)::-moz-focus-inner {
  border: 0;
  padding: 0;
}

/* Neutralize theme link styling on every interaction state. */
.nvst-story-root :where(a) {
  color: inherit;
  text-decoration: none;
  background: transparent;
}
.nvst-story-root :where(a):hover,
.nvst-story-root :where(a):focus,
.nvst-story-root :where(a):visited,
.nvst-story-root :where(a):active {
  color: inherit;
  text-decoration: none;
}

/* SVG + image defaults — themes sometimes force weird inline/border rules. */
.nvst-story-root :where(svg) {
  display: block;
  overflow: visible;
}
.nvst-story-root :where(img) {
  max-width: none;
  border: 0;
  vertical-align: baseline;
}

/* ---------- STAGE / NOVA AI GRADIENT BACKGROUND ---------- */
.nvst-story-root {
  --bg-t: 1.2s;
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  font-family: 'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #13233d;
  background: linear-gradient(135deg, #5170ff 0%, #43a4d8 50%, #2dcdb5 100%);
  transition: background var(--bg-t) cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 20px 48px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Slow-out state — applied briefly during the fade back to default.
   Everything using var(--bg-t) will inherit this slower duration. */
.nvst-story-root.nvst-slow-out {
  --bg-t: 2.6s;
}

/* Soft white aura behind the doodle */
.nvst-aura {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 620px;
  height: 620px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.35) 0%, transparent 60%);
  filter: blur(40px);
  pointer-events: none;
  animation: nvst-aura-pulse 6s ease-in-out infinite;
  transition: background var(--bg-t) cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes nvst-aura-pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.9; }
  50% { transform: translate(-50%, -50%) scale(1.08); opacity: 1; }
}

/* ---------- GOLDEN STATE — for Give me five ----------
   Warm vibrant gradient — best for the hand + star moment. */
.nvst-story-root.nvst-golden {
  background: linear-gradient(135deg, #ff9522 0%, #ffb84a 50%, #ffd54a 100%);
}
.nvst-story-root.nvst-golden .nvst-aura {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.5) 0%, transparent 60%);
}
.nvst-story-root.nvst-golden .nvst-doodle-glow {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.7) 0%, transparent 65%);
}
.nvst-story-root.nvst-golden .nvst-doodle-svg {
  filter: drop-shadow(0 6px 20px rgba(140, 70, 0, 0.22));
}
.nvst-story-root.nvst-golden .nvst-doodle-wrap::before,
.nvst-story-root.nvst-golden .nvst-doodle-wrap::after {
  border-color: rgba(255, 255, 255, 0.55);
}

/* ---------- CELEBRATE-BLUE STATE — for Let's celebrate (confetti) ----------
   Deeper Nova blue-teal so every confetti color (light blue, light teal,
   yellow, purple, saturated teal) pops clearly against the background. */
.nvst-story-root.nvst-celebrate-blue {
  background: linear-gradient(135deg, #2f3fbf 0%, #1f6fb5 50%, #12836f 100%);
}
.nvst-story-root.nvst-celebrate-blue .nvst-aura {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.55) 0%, transparent 60%);
}
.nvst-story-root.nvst-celebrate-blue .nvst-doodle-glow {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.7) 0%, transparent 65%);
}
.nvst-story-root.nvst-celebrate-blue .nvst-doodle-wrap::before,
.nvst-story-root.nvst-celebrate-blue .nvst-doodle-wrap::after {
  border-color: rgba(255, 255, 255, 0.55);
}

/* ---------- TOP NAVIGATION ---------- */
/* Positioned lower to clear the WordPress menu that sits on top */
.nvst-topnav {
  position: absolute;
  top: 100px;
  right: 22px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nvst-nav-icons,
.nvst-lang-toggle {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(19, 35, 61, 0.12);
}

.nvst-nav-icons {
  gap: 2px;
}

.nvst-nav-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  padding: 0;
  box-shadow: inset 0 0 0 0 transparent;
}

.nvst-nav-btn:hover {
  background: rgba(19, 35, 61, 0.05);
}

.nvst-nav-btn.nvst-active {
  background: rgba(81, 112, 255, 0.08);
  box-shadow: inset 0 0 0 1.5px #5170ff;
}

.nvst-nav-btn.nvst-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.nvst-nav-btn.nvst-disabled:hover {
  background: transparent;
}

.nvst-nav-emoji {
  filter: grayscale(0);
  transition: filter 0.2s ease;
  line-height: 1;
}
.nvst-nav-btn.nvst-disabled .nvst-nav-emoji {
  filter: grayscale(0.4);
}

/* Language toggle */
.nvst-lang-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  height: 32px;
  padding: 0 11px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #4b5b78;
  transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 0 transparent;
}
.nvst-lang-btn:hover {
  color: #13233d;
}
.nvst-lang-btn.nvst-active {
  color: #5170ff;
  background: rgba(81, 112, 255, 0.08);
  box-shadow: inset 0 0 0 1.5px #5170ff;
}

/* ---------- MAIN CONTAINER ---------- */
.nvst-stage {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

/* ---------- NOVA DOODLE ---------- */
.nvst-doodle-wrap {
  position: relative;
  width: 260px;
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.nvst-doodle-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 220px;
  height: 220px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.6) 0%, transparent 60%);
  filter: blur(20px);
  animation: nvst-doodle-pulse 3s ease-in-out infinite;
  transition: background var(--bg-t) ease;
}

@keyframes nvst-doodle-pulse {
  0%, 100% { opacity: 0.7; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
}

.nvst-doodle-svg {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 6px 20px rgba(19, 35, 61, 0.15));
  transition: filter var(--bg-t) ease;
}

.nvst-circle-path {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  opacity: 0;
}

/* Three stroke variations for organic, layered feel */
.nvst-stroke-1 { stroke: #ffffff; }
.nvst-stroke-2 { stroke: url(#nvstDoodleBlue); }
.nvst-stroke-3 { stroke: url(#nvstDoodleTeal); }

/* Ripples — always present around the doodle as a subtle sign of life.
   Amplified when the user has been idle (see .nvst-idle below). */
.nvst-doodle-wrap::before,
.nvst-doodle-wrap::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.32);
  transform: translate(-50%, -50%) scale(1);
  animation: nvst-ripple 3.4s ease-out infinite;
  pointer-events: none;
  transition: border-color 0.6s ease;
}
.nvst-doodle-wrap::after {
  animation-delay: 1.7s;
}

/* Idle attention state — ripples brighten and speed up */
.nvst-doodle-wrap.nvst-idle::before,
.nvst-doodle-wrap.nvst-idle::after {
  border-color: rgba(255, 255, 255, 0.75);
  animation-duration: 2s;
}
.nvst-doodle-wrap.nvst-idle::after {
  animation-delay: 1s;
}

@keyframes nvst-ripple {
  0% { transform: translate(-50%, -50%) scale(0.9); opacity: 0.7; }
  100% { transform: translate(-50%, -50%) scale(1.9); opacity: 0; }
}

/* Warm pulse (scene 4a) — coexists with ripples */
.nvst-doodle-wrap.nvst-warm .nvst-doodle-glow {
  background: radial-gradient(circle, rgba(255, 220, 180, 0.7) 0%, transparent 65%);
  animation: nvst-doodle-pulse 2s ease-in-out infinite;
}

/* Focus state — doodle scales up during the quiet celebration moment
   (after Give me five / Let's celebrate, before Nova speaks) */
.nvst-doodle-wrap.nvst-focus {
  transform: scale(1.2);
}
.nvst-doodle-wrap.nvst-focus .nvst-doodle-glow {
  opacity: 1;
}

/* ---------- BREATHING EXERCISE ---------- */

/* The breath counter (1 → 10) floats above Nova during the exercise. */
.nvst-breath-number {
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 64px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.92);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  z-index: 5;
  text-shadow: 0 4px 20px rgba(19, 35, 61, 0.2);
  user-select: none;
  -webkit-user-select: none;
}
.nvst-breath-number.nvst-visible {
  opacity: 1;
}

/* Doodle expands on breath in, contracts on breath out.
   --breath-duration is set from JS to match the current phase. */
.nvst-doodle-wrap.nvst-breath-in {
  transform: scale(1.32);
  transition: transform var(--breath-duration, 4s) cubic-bezier(0.4, 0, 0.4, 1);
}
.nvst-doodle-wrap.nvst-breath-out {
  transform: scale(0.86);
  transition: transform var(--breath-duration, 4s) cubic-bezier(0.4, 0, 0.4, 1);
}

/* Smooth text swap inside the bubble for the "Breathe in / Breathe out" alternation */
.nvst-nova-text {
  transition: opacity 0.28s ease;
}

/* ---------- SUNRISE STATE — after the 10th breath ---------- */
.nvst-story-root.nvst-sunrise {
  --bg-t: 8s;
  background: linear-gradient(180deg, #ff7f47 0%, #ffb03d 40%, #ffd54a 70%, #ffe89e 100%);
}
.nvst-story-root.nvst-sunrise .nvst-aura {
  background: radial-gradient(circle, rgba(255, 220, 130, 0.55) 0%, transparent 60%);
}
.nvst-story-root.nvst-sunrise .nvst-doodle-glow {
  background: radial-gradient(circle, rgba(255, 240, 180, 0.8) 0%, transparent 65%);
}
.nvst-story-root.nvst-sunrise .nvst-doodle-svg {
  filter: drop-shadow(0 6px 20px rgba(140, 70, 0, 0.25));
}
.nvst-story-root.nvst-sunrise .nvst-doodle-wrap::before,
.nvst-story-root.nvst-sunrise .nvst-doodle-wrap::after {
  border-color: rgba(255, 255, 255, 0.55);
}

/* ---------- BIRDS ---------- */
.nvst-bird {
  position: absolute;
  pointer-events: none;
  z-index: 3;
  color: #4a3316;
  opacity: 0;
  will-change: transform, opacity;
}
.nvst-bird svg {
  width: 100%;
  height: 100%;
  display: block;
}

@keyframes nvst-bird-fly {
  0%   { transform: translateX(-100px) translateY(0); opacity: 0; }
  8%   { opacity: 0.55; }
  50%  { transform: translateX(50vw) translateY(-20px); opacity: 0.55; }
  92%  { opacity: 0.55; }
  100% { transform: translateX(calc(100vw + 100px)) translateY(-40px); opacity: 0; }
}

/* ---------- NOVA SPEECH BUBBLE (white with dark text + tail) ---------- */
.nvst-nova-bubble {
  position: relative;
  z-index: 3;
  width: fit-content;
  max-width: 620px;
  margin-top: -22px;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 24px;
  padding: 24px 28px;
  color: #13233d;
  font-size: 16.5px;
  line-height: 1.6;
  font-weight: 500;
  letter-spacing: 0.1px;
  box-shadow:
    0 20px 60px rgba(19, 35, 61, 0.18),
    0 4px 16px rgba(19, 35, 61, 0.08);
}

/* Tail removed — bubble now floats up into the doodle,
   which itself creates the visual connection */

.nvst-nova-bubble.nvst-in {
  animation: nvst-bubble-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes nvst-bubble-in {
  0% { opacity: 0; transform: translateY(12px) scale(0.98); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.nvst-nova-text {
  margin: 0;
  color: #13233d;
}

.nvst-nova-text em {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-weight: 500;
  color: #13233d;
}

/* ---------- TYPING INDICATOR ---------- */
.nvst-typing {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 2px;
}
.nvst-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(19, 35, 61, 0.35);
  animation: nvst-typing-bounce 1.2s ease-in-out infinite;
}
.nvst-typing span:nth-child(2) { animation-delay: 0.15s; }
.nvst-typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes nvst-typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* ---------- USER OPTIONS ---------- */
.nvst-user-options {
  width: 100%;
  max-width: 640px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.nvst-user-options.nvst-in {
  animation: nvst-options-in 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 0.1s;
}

@keyframes nvst-options-in {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Black rounded-rectangle buttons per Nova design system */
.nvst-option-btn {
  position: relative;
  background: #13233d;
  color: #ffffff;
  border: none;
  padding: 14px 22px;
  border-radius: 14px;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.25s ease,
              background 0.25s ease,
              opacity 0.25s ease;
  box-shadow: 0 6px 18px rgba(19, 35, 61, 0.25);
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.nvst-option-btn:hover {
  background: #1c3358;
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(19, 35, 61, 0.35);
}

.nvst-option-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(19, 35, 61, 0.25);
}

.nvst-option-btn.nvst-disabled {
  opacity: 0.55;
  pointer-events: none;
  transform: none;
}

.nvst-option-btn .nvst-btn-emoji {
  font-size: 17px;
  line-height: 1;
}

/* ---------- FOOTER LINKS (always visible under buttons) ---------- */
.nvst-footer-links {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  padding: 7px 16px;
  color: #13233d;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(10px) saturate(160%);
  -webkit-backdrop-filter: blur(10px) saturate(160%);
  border-radius: 16px;
  animation: nvst-bubble-in 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 0.25s;
}

.nvst-footer-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  letter-spacing: 0.01em;
}

.nvst-footer-primary {
  font-size: 13.5px;
  font-weight: 500;
}

.nvst-footer-videos {
  font-size: 12px;
  font-weight: 500;
  opacity: 0.75;
}

.nvst-footer-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #13233d;
  text-decoration: none;
  padding: 3px 2px;
  transition: opacity 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.nvst-footer-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
}

.nvst-footer-link svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.nvst-footer-videos .nvst-footer-link svg {
  width: 11px;
  height: 11px;
}

.nvst-footer-sep {
  color: rgba(19, 35, 61, 0.35);
  font-weight: 400;
  user-select: none;
}

/* ---------- FINAL CTA SCREEN ---------- */
.nvst-cta-screen {
  width: 100%;
  max-width: 520px;
  text-align: center;
  animation: nvst-bubble-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
  background: #ffffff;
  border-radius: 28px;
  padding: 40px 36px;
  box-shadow:
    0 30px 80px rgba(19, 35, 61, 0.22),
    0 8px 24px rgba(19, 35, 61, 0.08);
}

.nvst-cta-title {
  font-family: 'Figtree', sans-serif;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #13233d;
  margin: 0 0 12px;
}
.nvst-cta-title em {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-weight: 500;
  background: linear-gradient(135deg, #5170ff, #2dcdb5);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nvst-cta-sub {
  font-size: 16px;
  line-height: 1.6;
  color: #4b5b78;
  margin: 0 0 26px;
}

.nvst-cta-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.nvst-cta-primary,
.nvst-cta-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 28px;
  border-radius: 14px;
  font-size: 15.5px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  min-width: 240px;
  font-family: inherit;
  cursor: pointer;
  border: none;
}

.nvst-cta-primary {
  background: #13233d;
  color: #ffffff;
  box-shadow: 0 8px 22px rgba(19, 35, 61, 0.28);
}
.nvst-cta-primary:hover {
  background: #1c3358;
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(19, 35, 61, 0.38);
}

.nvst-cta-secondary {
  background: #f9fcfe;
  color: #13233d;
  border: 1px solid #edf2f9;
}
.nvst-cta-secondary:hover {
  background: #edf2f9;
  transform: translateY(-2px);
}

.nvst-cta-arrow {
  transition: transform 0.25s ease;
}
.nvst-cta-primary:hover .nvst-cta-arrow,
.nvst-cta-secondary:hover .nvst-cta-arrow {
  transform: translateX(4px);
}

/* ---------- SCENE FADE HELPERS ---------- */
.nvst-fade-out {
  animation: nvst-fade-out 0.3s cubic-bezier(0.4, 0, 1, 1) both;
}

@keyframes nvst-fade-out {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-8px) scale(0.98); }
}

/* =========================================================
   HIGH-FIVE INTERACTION (ported from JSX)
   ========================================================= */
.nvst-hifi-overlay {
  position: fixed;
  z-index: 1500;
  pointer-events: none;
}

.nvst-hifi-row {
  display: flex;
  align-items: center;
  animation: nvst-bubble-pop 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: center;
}

.nvst-hifi-bubble {
  position: relative;
  pointer-events: auto;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  padding: 9px 14px;
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(13, 25, 48, 0.14), 0 2px 6px rgba(13, 25, 48, 0.06);
  border: 1px solid #edf2f9;
  transform-origin: right center;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
  color: #111827;
  letter-spacing: -0.005em;
}

.nvst-hifi-bubble::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 7px solid rgba(255, 255, 255, 0.96);
  filter: drop-shadow(1px 0 0 #edf2f9);
}

.nvst-hifi-bubble.nvst-slapped { opacity: 0; }

.nvst-hifi-hand {
  position: relative;
  font-size: 40px;
  line-height: 1;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  pointer-events: auto;
  transform-origin: 50% 70%;
  transition: transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: nvst-hand-float 3s ease-in-out infinite;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  /* White halo + deep navy shadow so the hand pops against the deep blue bg */
  filter:
    drop-shadow(0 0 6px rgba(255, 255, 255, 0.8))
    drop-shadow(0 4px 10px rgba(15, 25, 55, 0.55));
}

.nvst-hifi-hand.nvst-slap-anim {
  transition: none;
  animation: nvst-hand-slap 0.5s cubic-bezier(0.45, 0, 0.55, 1) forwards;
}

@keyframes nvst-bubble-pop {
  0% { opacity: 0; transform: scale(0.6); }
  60% { opacity: 1; transform: scale(1.06); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes nvst-hand-float {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-3px) rotate(4deg); }
}

@keyframes nvst-hand-slap {
  0% { transform: scale(1.4) rotate(0deg) translateX(0); }
  18% { transform: scale(1.6) rotate(-22deg) translateX(-4px); }
  36% { transform: scale(1.75) rotate(15deg) translateX(6px); }
  58% { transform: scale(1.45) rotate(-3deg) translateX(0); opacity: 1; }
  100% { transform: scale(0) rotate(0deg) translateX(0); opacity: 0; }
}

/* Star + flash + sparkles */
.nvst-star-flash {
  position: fixed;
  width: 160px;
  height: 160px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0) 60%);
  animation: nvst-star-flash 0.4s ease-out forwards;
  pointer-events: none;
  z-index: 1499;
}

@keyframes nvst-star-flash {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

.nvst-spark {
  position: fixed;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.9);
  transform: translate(-50%, -50%);
  animation: nvst-spark-fly 0.65s ease-out forwards;
  pointer-events: none;
  z-index: 1501;
}

@keyframes nvst-spark-fly {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0); opacity: 0; }
}

.nvst-star {
  position: fixed;
  transform: translate(-50%, -50%);
  font-size: 52px;
  line-height: 1;
  filter: drop-shadow(0 0 24px rgba(245, 158, 11, 0.85)) drop-shadow(0 6px 14px rgba(0, 0, 0, 0.2));
  animation: nvst-star-hold 1.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  pointer-events: none;
  z-index: 1502;
  user-select: none;
}

@keyframes nvst-star-hold {
  0% { transform: translate(-50%, -50%) scale(0) rotate(-180deg); opacity: 0; }
  22% { transform: translate(-50%, -50%) scale(1.4) rotate(20deg); opacity: 1; }
  38% { transform: translate(-50%, -50%) scale(1) rotate(0deg); opacity: 1; }
  70% { transform: translate(-50%, -50%) scale(1.08) rotate(-4deg); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1.6) rotate(15deg); opacity: 0; }
}

/* =========================================================
   CONFETTI (ported from Nova task panel — exact colors, sizes, timing)
   ========================================================= */
.nvst-confetti-piece {
  position: fixed;
  top: -20px;
  z-index: 1000;
  opacity: 0.8;
  animation: nvst-fall linear forwards;
  pointer-events: none;
}

@keyframes nvst-fall {
  to {
    transform: translateY(105vh) rotate(720deg);
    opacity: 0;
  }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 640px) {
  .nvst-story-root {
    padding: 100px 16px 32px;
    min-height: 100vh;
    min-height: 100dvh;
  }

  .nvst-stage {
    gap: 10px;
  }

  .nvst-topnav {
    top: 84px;
    right: 12px;
    gap: 6px;
  }

  .nvst-nav-icons,
  .nvst-lang-toggle {
    height: 36px;
    padding: 3px;
  }

  .nvst-nav-btn {
    width: 30px;
    height: 30px;
    font-size: 17px;
    border-radius: 7px;
  }

  .nvst-lang-btn {
    height: 30px;
    padding: 0 9px;
    font-size: 11.5px;
    border-radius: 7px;
  }

  .nvst-doodle-wrap {
    width: 200px;
    height: 200px;
  }
  .nvst-doodle-glow {
    width: 160px;
    height: 160px;
  }
  .nvst-doodle-wrap::before,
  .nvst-doodle-wrap::after {
    width: 160px;
    height: 160px;
  }

  .nvst-nova-bubble {
    margin-top: -16px;
    padding: 20px 22px;
    font-size: 15px;
    border-radius: 20px;
  }

  .nvst-user-options {
    flex-direction: column;
    gap: 8px;
  }

  .nvst-option-btn {
    width: 100%;
    padding: 14px 18px;
    font-size: 14px;
    white-space: normal;
    line-height: 1.35;
    justify-content: center;
  }

  .nvst-footer-links {
    padding: 6px 12px;
    gap: 3px;
  }
  .nvst-footer-primary { font-size: 12.5px; }
  .nvst-footer-videos  { font-size: 11.5px; }
  .nvst-footer-row { gap: 8px; }

  .nvst-cta-screen {
    padding: 32px 24px;
    border-radius: 24px;
  }
  .nvst-cta-title {
    font-size: 26px;
  }
  .nvst-cta-sub {
    font-size: 15px;
    margin-bottom: 22px;
  }
  .nvst-cta-primary,
  .nvst-cta-secondary {
    width: 100%;
    min-width: 0;
    padding: 14px 22px;
    font-size: 15px;
  }
}

@media (max-width: 380px) {
  .nvst-doodle-wrap {
    width: 170px;
    height: 170px;
  }
  .nvst-doodle-glow {
    width: 140px;
    height: 140px;
  }
  .nvst-doodle-wrap::before,
  .nvst-doodle-wrap::after {
    width: 140px;
    height: 140px;
  }
  .nvst-nova-bubble {
    margin-top: -14px;
    padding: 18px 18px;
    font-size: 14.5px;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .nvst-aura,
  .nvst-doodle-glow,
  .nvst-doodle-wrap::before,
  .nvst-doodle-wrap::after,
  .nvst-hifi-hand {
    animation: none !important;
  }
}
