/* v48 — Premium Cinematic AI Operating System */
:root {
  --cosmos-blue: #00CFFF;
  --cosmos-purple: #7B5CFF;
  --cosmos-cyan: #00F5FF;
  --cosmos-magenta: #FF4FD8;
  --cosmos-deep: #030008;
}

.cinematic-os-wrap {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 16px 40px;
}

.cinematic-os {
  --mx: 0px;
  --my: 0px;
  --ring-p: 0;
  --brain-intensity: 0.25;
  --brain-speed: 0.5;
  position: relative;
  min-height: 620px;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(0, 207, 255, 0.2);
  background: var(--cosmos-deep);
  box-shadow:
    0 0 0 1px rgba(123, 92, 255, 0.12),
    0 32px 100px rgba(0, 0, 0, 0.65),
    0 0 80px rgba(123, 92, 255, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  perspective: 1400px;
  transition: box-shadow 0.6s ease;
}
.cinematic-os.cosmos-transitioning {
  box-shadow: 0 0 0 1px rgba(255, 79, 216, 0.25), 0 32px 100px rgba(0, 0, 0, 0.7), 0 0 100px rgba(0, 207, 255, 0.2);
}

.cosmos-canvas,
.cosmos-fx-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.cosmos-canvas { z-index: 0; }
.cosmos-fx-canvas { z-index: 1; }

.cosmos-nebula {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
  z-index: 0;
  animation: nebulaDrift 22s ease-in-out infinite;
}
.cosmos-nebula--purple { width: 60%; height: 50%; top: -15%; left: 5%; background: rgba(123, 92, 255, 0.3); }
.cosmos-nebula--blue { width: 55%; height: 45%; bottom: -10%; right: 0; background: rgba(0, 207, 255, 0.18); animation-delay: -7s; }
.cosmos-nebula--magenta { width: 40%; height: 35%; top: 30%; right: 20%; background: rgba(255, 79, 216, 0.12); animation-delay: -12s; }
@keyframes nebulaDrift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(25px, -20px) scale(1.06); }
  66% { transform: translate(-15px, 10px) scale(0.98); }
}

.cosmos-rays {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 50% 42%, rgba(0, 245, 255, 0.1), transparent 65%),
    conic-gradient(from 200deg at 50% 45%, transparent, rgba(123, 92, 255, 0.06), transparent);
  pointer-events: none;
  z-index: 0;
}
.cosmos-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 35%, rgba(3, 0, 8, 0.75) 100%);
  pointer-events: none;
  z-index: 4;
}
.cosmos-grid-floor {
  position: absolute;
  bottom: 0;
  left: -20%;
  right: -20%;
  height: 45%;
  background-image:
    linear-gradient(rgba(0, 207, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 207, 255, 0.06) 1px, transparent 1px);
  background-size: 40px 40px;
  transform: perspective(400px) rotateX(72deg);
  transform-origin: center top;
  mask-image: linear-gradient(to top, black, transparent);
  pointer-events: none;
  z-index: 0;
  animation: gridScroll 12s linear infinite;
}
@keyframes gridScroll {
  to { background-position: 0 40px; }
}

.cosmos-topbar {
  position: relative;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(0, 207, 255, 0.15);
  background: linear-gradient(180deg, rgba(3, 0, 8, 0.85), rgba(3, 0, 8, 0.4));
  backdrop-filter: blur(16px);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}
.cosmos-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cosmos-cyan);
}
.cosmos-brand img { filter: drop-shadow(0 0 6px rgba(0, 245, 255, 0.5)); }
.cosmos-phase {
  color: var(--cosmos-magenta);
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 79, 216, 0.4);
  background: rgba(255, 79, 216, 0.1);
  box-shadow: 0 0 20px rgba(255, 79, 216, 0.15);
  animation: phasePulse 2.5s ease-in-out infinite;
}
@keyframes phasePulse {
  0%, 100% { box-shadow: 0 0 12px rgba(255, 79, 216, 0.1); }
  50% { box-shadow: 0 0 28px rgba(255, 79, 216, 0.35); }
}
.cosmos-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #34d399;
}
.cosmos-live i {
  width: 7px; height: 7px; border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 10px #34d399;
  animation: liveBadge 1s ease-in-out infinite;
}

.cosmos-story-line {
  position: relative;
  z-index: 6;
  text-align: center;
  padding: 8px 20px 4px;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(226, 232, 240, 0.9);
  letter-spacing: 0.02em;
  min-height: 1.6em;
  text-shadow: 0 0 20px rgba(0, 207, 255, 0.3);
}

.cosmos-beams {
  position: absolute;
  top: 18%;
  left: 0;
  width: 100%;
  height: 55%;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1s ease;
}
.cosmos-beam {
  stroke-dasharray: 8 12;
  opacity: 0;
  transition: opacity 0.8s ease;
}
.cosmos-beam path { animation: beamDash 1.5s linear infinite; }

.cosmos-stage {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(240px, 380px) minmax(160px, 1fr);
  gap: 16px;
  padding: 20px 16px 12px;
  transform-style: preserve-3d;
  transition: transform 0.15s ease-out, opacity 0.5s ease;
}

.cosmos-col-title {
  font-size: 0.52rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: rgba(0, 207, 255, 0.65);
  margin-bottom: 10px;
  text-align: center;
  text-shadow: 0 0 12px rgba(0, 207, 255, 0.3);
}

.cosmos-glass {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 13px;
  margin-bottom: 9px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: linear-gradient(135deg, rgba(12, 18, 40, 0.55), rgba(6, 8, 20, 0.65));
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  cursor: pointer;
  opacity: 0;
  transform: translateX(-24px) translateY(8px) scale(0.92);
  transition: all 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  font-family: inherit;
  color: inherit;
  text-align: left;
  width: 100%;
  animation: panelFloat 4s ease-in-out infinite;
  animation-play-state: paused;
}
.cosmos-col--out .cosmos-glass { transform: translateX(24px) translateY(8px) scale(0.92); }
.cosmos-glass--hot {
  border-color: rgba(0, 245, 255, 0.45) !important;
  box-shadow: 0 0 28px rgba(0, 207, 255, 0.25), inset 0 0 20px rgba(0, 207, 255, 0.05) !important;
  animation-play-state: running;
}
@keyframes panelFloat {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -4px; }
}
.cosmos-glass-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px rgba(0, 207, 255, 0.3));
}
.cosmos-glass strong { display: block; font-size: 0.72rem; font-weight: 800; color: #f8fafc; margin-bottom: 2px; }
.cosmos-glass em { display: block; font-size: 0.62rem; color: rgba(203, 213, 225, 0.7); font-style: normal; line-height: 1.4; }
.cosmos-glass small { display: block; font-size: 0.52rem; color: rgba(0, 207, 255, 0.6); margin-top: 4px; }
.cosmos-tag { display: inline-block; margin-top: 5px; font-size: 0.48rem; font-weight: 800; padding: 2px 7px; border-radius: 4px; }
.cosmos-tag--ok { color: #34d399; background: rgba(52, 211, 153, 0.12); border: 1px solid rgba(52, 211, 153, 0.35); }

/* Brain zone */
.cosmos-brain-zone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 380px;
  justify-content: center;
}

.cosmos-orbit-rings {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -55%);
  width: 280px;
  height: 280px;
  pointer-events: none;
  z-index: 0;
}
.cosmos-orbit-rings span {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px dashed rgba(0, 207, 255, 0.12);
}
.cosmos-orbit-rings span:nth-child(1) { animation: orbitSpin 20s linear infinite; }
.cosmos-orbit-rings span:nth-child(2) { inset: 12%; border-color: rgba(123, 92, 255, 0.15); animation: orbitSpin 14s linear infinite reverse; }
.cosmos-orbit-rings span:nth-child(3) { inset: 24%; border-color: rgba(255, 79, 216, 0.1); animation: orbitSpin 10s linear infinite; }
@keyframes orbitSpin { to { transform: rotate(360deg); } }

.cosmos-brain-stack {
  position: relative;
  z-index: 2;
  padding-bottom: 48px;
}

.cosmos-holo-platform {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 180px;
  height: 100px;
  z-index: 0;
}
.cosmos-holo-plinth {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 12px;
  background: linear-gradient(90deg, transparent, rgba(0, 207, 255, 0.3), rgba(123, 92, 255, 0.4), rgba(0, 207, 255, 0.3), transparent);
  border-radius: 4px;
  box-shadow: 0 0 40px rgba(0, 207, 255, 0.4);
}
.cosmos-holo-base {
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0, 245, 255, 0.5), transparent 70%);
  animation: holoBasePulse 2s ease-in-out infinite;
}
.cosmos-holo-beam {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 50%;
  height: 90px;
  background: linear-gradient(180deg, rgba(0, 245, 255, 0.35), rgba(123, 92, 255, 0.1), transparent);
  clip-path: polygon(15% 100%, 85% 100%, 100% 0, 0 0);
  animation: holoBeam 2.5s ease-in-out infinite;
}
.cosmos-holo-ring {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 50%;
  border: 2px solid rgba(0, 245, 255, 0.35);
}
.cosmos-holo-ring--1 { width: 130px; height: 28px; animation: holoRingSpin 8s linear infinite; }
.cosmos-holo-ring--2 { width: 100px; height: 20px; border-color: rgba(255, 79, 216, 0.25); animation: holoRingSpin 5s linear infinite reverse; }
@keyframes holoBasePulse { 0%, 100% { opacity: 0.6; } 50% { opacity: 1; } }
@keyframes holoBeam { 0%, 100% { opacity: 0.35; } 50% { opacity: 0.85; } }
@keyframes holoRingSpin { to { transform: translateX(-50%) rotate(360deg); } }

.cosmos-process-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -58%);
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: conic-gradient(from -90deg, var(--cosmos-cyan) calc(var(--ring-p) * 1%), transparent 0);
  mask: radial-gradient(circle, transparent 62%, black 63%);
  -webkit-mask: radial-gradient(circle, transparent 62%, black 63%);
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
  z-index: 1;
}

/* v55 — Remove overlays on brain, clean stack */
.cosmos-vignette--off,
.cosmos-grid-floor--off { display: none !important; }

.cosmos-mobile-flow--hidden { display: none !important; }

.cosmos-brain-zone {
  z-index: 12;
  isolation: isolate;
}

.cosmos-brain-stack {
  z-index: 12;
  padding-bottom: 16px;
}

.cinematic-os .cosmos-nebula { opacity: 0.1; pointer-events: none; }
.cinematic-os .cosmos-rays { opacity: 0.35; }

.cosmos-brain-shell--side .cosmos-brain-canvas {
  z-index: 2;
  opacity: 0.45;
}

.cosmos-story-pipeline {
  position: relative;
  z-index: 3;
  margin-top: 8px;
  background: rgba(5, 8, 20, 0.65);
}

.brain-base-img { display: none !important; }

/* v54 — Clean brain: no overlays, reference image primary */
.cosmos-brain--clean .cosmos-brain-badge,
.cosmos-brain--clean .cosmos-brain-core,
.cosmos-brain--clean .cosmos-scan,
.cosmos-brain--clean .cosmos-think-ring { display: none !important; }

.cosmos-brain-zone:has(.cosmos-brain--clean) .cosmos-fly-bubble { display: none !important; }

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

.cosmos-brain--v53 {
  width: min(300px, 86vw);
  filter: drop-shadow(0 0 40px rgba(0, 245, 255, 0.22)) drop-shadow(0 0 70px rgba(123, 92, 255, 0.15));
}

.brain-base-img {
  mix-blend-mode: normal;
  opacity: 1;
}

.cosmos-brain-shell--side .cosmos-brain-canvas {
  z-index: 1;
  opacity: 0.75;
}

.cosmos-brain-svg--side {
  position: relative;
  z-index: 3;
  filter: drop-shadow(0 8px 24px rgba(123, 92, 255, 0.35));
}

.brain-folds { opacity: 0.12; pointer-events: none; }

.cosmos-nerve--mesh {
  stroke: rgba(0, 245, 255, 0.3);
  stroke-width: 0.55;
  opacity: 0.3;
}
.cosmos-nerve--main {
  stroke-width: 1.2;
  opacity: calc(0.35 + var(--brain-intensity, 0.4) * 0.35);
}

.cosmos-neuron--mesh {
  fill: #00F5FF;
  opacity: 0.45;
  filter: drop-shadow(0 0 3px rgba(0, 245, 255, 0.5));
}

.cosmos-neuron { opacity: 0.7; }
.cosmos-neuron--core { opacity: 0.95; r: 6; }

.synapse-pulse { opacity: 0.75; }

/* v53 — Reference image quality */
.cosmos-process-ring--hidden { display: none !important; }
.cosmos-brain-zone:has(.cosmos-brain--v53) .cosmos-orbit-rings { display: none !important; }

.cosmos-brain--v53 {
  width: min(280px, 78vw);
  filter: drop-shadow(0 0 35px rgba(0, 245, 255, 0.18)) drop-shadow(0 0 60px rgba(123, 92, 255, 0.12));
}

.brain-base-img {
  mix-blend-mode: screen;
  pointer-events: none;
}

.cosmos-brain-shell--side .cosmos-brain-canvas {
  border-radius: 0;
  clip-path: none;
}

.cosmos-nerve--mesh {
  stroke: rgba(0, 245, 255, 0.45);
  stroke-width: 0.65;
  opacity: calc(0.4 + var(--brain-intensity, 0.4) * 0.45);
}
.cosmos-nerve--main {
  stroke: url(#nerveGradV52);
  stroke-width: 1.6;
  opacity: calc(0.55 + var(--brain-intensity, 0.4) * 0.45);
  filter: drop-shadow(0 0 3px rgba(0, 245, 255, 0.5));
}

.cosmos-neuron--mesh {
  fill: #00F5FF;
  opacity: 0.65;
  filter: drop-shadow(0 0 4px rgba(0, 245, 255, 0.7));
}

.cosmos-neuron {
  fill: var(--cosmos-cyan);
  opacity: 0.85;
  filter: drop-shadow(0 0 6px rgba(0, 245, 255, 0.9)) drop-shadow(0 0 12px rgba(0, 245, 255, 0.4));
}
.cosmos-neuron--core {
  fill: #00F5FF;
  filter: drop-shadow(0 0 10px rgba(0, 245, 255, 1)) drop-shadow(0 0 20px rgba(255, 79, 216, 0.6));
  animation: coreNeuronPulse 1.5s ease-in-out infinite;
}
@keyframes coreNeuronPulse {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; }
}

.synapse-pulse { opacity: 0.85; filter: drop-shadow(0 0 4px currentColor); }

.cosmos-brain-core--thalamus {
  top: 44%;
  left: 40%;
  transform: translate(-50%, -50%);
  width: 64px;
  pointer-events: none;
}
.cosmos-core-label {
  font-size: 0.48rem;
  letter-spacing: 0.1em;
  text-shadow: 0 0 12px rgba(0, 245, 255, 0.9), 0 0 24px rgba(0, 245, 255, 0.4);
}

.cosmos-holo-platform--v52 {
  width: 230px;
  height: 100px;
  bottom: 8px;
  z-index: 0;
}
.cosmos-holo-beam--v52 {
  width: 42%;
  height: 130px;
  opacity: 0.9;
  background: linear-gradient(180deg,
    rgba(0, 245, 255, 0.75) 0%,
    rgba(123, 92, 255, 0.45) 40%,
    rgba(255, 79, 216, 0.15) 70%,
    transparent 100%);
}

/* v52 — Side-profile anatomical brain */
.cosmos-brain--v52 { width: min(260px, 72vw); }
.cosmos-brain-shell--side { aspect-ratio: 280 / 260; }
.cosmos-brain-svg--side {
  filter: drop-shadow(0 10px 28px rgba(123, 92, 255, 0.4));
}
.brain-silhouette { transition: filter 0.5s ease; }
.brain-cerebellum { animation: cerebellumPulse 3s ease-in-out infinite; }
@keyframes cerebellumPulse {
  0%, 100% { opacity: 0.32; }
  50% { opacity: 0.48; }
}
.cosmos-nerve {
  stroke: url(#nerveGradV52);
  stroke-width: 1.3;
  stroke-linecap: round;
  opacity: calc(0.35 + var(--brain-intensity, 0.3) * 0.55);
  transition: opacity 0.4s ease;
}
.cosmos-neuron--decision {
  fill: #FFB347;
  filter: drop-shadow(0 0 8px rgba(255, 179, 71, 0.8));
}
.cosmos-brain-core--thalamus {
  top: 45%;
  left: 38.5%;
  transform: translate(-50%, -50%);
  width: 56px;
}
.cosmos-holo-platform--v52 {
  width: 210px;
  height: 95px;
  bottom: 12px;
}
.cosmos-holo-ring--3 {
  width: 70px;
  height: 14px;
  border-color: rgba(0, 245, 255, 0.2);
  animation: holoRingSpin 3.5s linear infinite;
}
.cosmos-holo-beam--v52 {
  width: 38%;
  height: 115px;
  bottom: 10px;
  background: linear-gradient(180deg,
    rgba(0, 245, 255, 0.55) 0%,
    rgba(123, 92, 255, 0.35) 45%,
    transparent 100%);
  animation: holoBeam 2s ease-in-out infinite;
}

.cosmos-brain {
  position: relative;
  width: 240px;
  margin: 0 auto;
  transform: scale(0.08);
  opacity: 0;
  filter: brightness(0.3);
}
.cosmos-brain-pro { width: min(240px, 72vw); }

.cosmos-brain-shell {
  position: relative;
  width: 100%;
  aspect-ratio: 240 / 220;
}

.cosmos-brain-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 4;
  border-radius: 50%;
}

.cosmos-brain-svg {
  width: 100%;
  height: auto;
  display: block;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 8px 24px rgba(123, 92, 255, 0.35));
}

.brain-hemi { transition: filter 0.4s ease; }
.brain-fissure { opacity: 0.8; }
.brain-folds { opacity: 0.9; }
.brain-inner-parts { opacity: 0.7; }

.brain-arc {
  stroke-dasharray: 6 10;
  opacity: 0;
  animation: arcFlow 1.5s linear infinite;
}
.brain-arc.a1 { animation-delay: 0s; }
.brain-arc.a2 { animation-delay: 0.4s; }
.brain-arc.a3 { animation-delay: 0.8s; }
@keyframes arcFlow {
  0% { stroke-dashoffset: 0; opacity: 0.2; }
  50% { opacity: 0.9; }
  100% { stroke-dashoffset: -32; opacity: 0.2; }
}

.synapse-pulse { opacity: 0.35; }

.cosmos-neuron {
  fill: var(--cosmos-cyan);
  opacity: 0.7;
  filter: drop-shadow(0 0 5px rgba(0, 245, 255, 0.8));
}
.cosmos-neuron--core {
  fill: var(--cosmos-magenta);
  filter: drop-shadow(0 0 10px rgba(255, 79, 216, 0.9));
}
.cosmos-synapse {
  stroke: rgba(0, 245, 255, 0.55);
  stroke-width: 1.4;
  opacity: 0.65;
  stroke-linecap: round;
}

.cosmos-brain-core {
  position: absolute;
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 5;
  width: 72px;
}
.cosmos-core-ring {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 2px solid rgba(0, 245, 255, 0.35);
  animation: corePulse 2s ease-out infinite;
}
.cosmos-brain-core img {
  display: block;
  margin: 0 auto 3px;
  filter: drop-shadow(0 0 10px rgba(0, 245, 255, 0.8));
  position: relative;
  z-index: 1;
}
.cosmos-core-label {
  display: block;
  font-size: 0.44rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--cosmos-cyan);
  text-shadow: 0 0 8px rgba(0, 245, 255, 0.6);
  transition: color 0.3s, text-shadow 0.3s;
}

.cosmos-sparks-inbrain {
  position: absolute;
  inset: 8%;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
}
.cosmos-sparks-inbrain i {
  position: absolute;
  font-style: normal;
  font-size: 0.55rem;
  color: #00F5FF;
  text-shadow: 0 0 8px #00F5FF;
  animation: sparkInBrain 1.5s ease-out infinite;
}
.cosmos-sparks-inbrain i:nth-child(1) { top: 20%; left: 15%; animation-delay: 0s; }
.cosmos-sparks-inbrain i:nth-child(2) { top: 35%; right: 12%; animation-delay: 0.25s; }
.cosmos-sparks-inbrain i:nth-child(3) { top: 55%; left: 20%; animation-delay: 0.5s; }
.cosmos-sparks-inbrain i:nth-child(4) { top: 50%; right: 18%; animation-delay: 0.75s; }
.cosmos-sparks-inbrain i:nth-child(5) { top: 70%; left: 35%; animation-delay: 1s; }
.cosmos-sparks-inbrain i:nth-child(6) { top: 65%; right: 30%; animation-delay: 1.25s; }
@keyframes sparkInBrain {
  0% { opacity: 0; transform: scale(0.3); }
  30% { opacity: 1; transform: scale(1.3); }
  100% { opacity: 0; transform: scale(0.2) translateY(-12px); }
}

/* Story pipeline under brain */
.cosmos-story-pipeline {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 14px;
  border: 1px solid rgba(0, 207, 255, 0.12);
  background: rgba(5, 8, 20, 0.5);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.cosmos-sp-step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: 999px;
  opacity: 0.25;
  transform: scale(0.92);
  transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.cosmos-sp-step em {
  font-style: normal;
  font-size: 0.62rem;
  font-weight: 700;
  color: rgba(203, 213, 225, 0.7);
  letter-spacing: 0.04em;
}
.cosmos-sp-icon { font-size: 0.85rem; }
.cosmos-sp-arrow {
  font-size: 0.65rem;
  color: rgba(0, 207, 255, 0.35);
  line-height: 1;
  opacity: 0.3;
}
.cosmos-sp-step--active {
  opacity: 1 !important;
  transform: scale(1.05) !important;
  background: rgba(0, 207, 255, 0.1);
  border: 1px solid rgba(0, 245, 255, 0.35);
  box-shadow: 0 0 20px rgba(0, 207, 255, 0.2);
}
.cosmos-sp-step--active em { color: #fff; }
.cosmos-sp-step--done {
  opacity: 0.65 !important;
  transform: scale(1) !important;
}
.cosmos-sp-step--done em { color: #34d399; }

.cosmos-brain-badge {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--cosmos-cyan);
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid rgba(0, 245, 255, 0.45);
  background: rgba(0, 245, 255, 0.08);
  box-shadow: 0 0 24px rgba(0, 245, 255, 0.2);
  z-index: 6;
}

@keyframes corePulse {
  0% { transform: scale(0.85); opacity: 1; }
  100% { transform: scale(1.5); opacity: 0; }
}

.cosmos-scan {
  position: absolute;
  left: 8%;
  right: 8%;
  height: 18%;
  background: linear-gradient(180deg, transparent, rgba(0, 245, 255, 0.45), transparent);
  opacity: 0;
  pointer-events: none;
  animation: brainScan 2.2s ease-in-out infinite;
}
.cosmos-scan--2 { animation-delay: 1.1s; animation-direction: reverse; }
@keyframes brainScan {
  0% { top: 8%; opacity: 0; }
  15% { opacity: 0.9; }
  85% { top: 78%; opacity: 0.9; }
  100% { top: 88%; opacity: 0; }
}

.cosmos-think-ring {
  position: absolute;
  inset: 5%;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--cosmos-magenta);
  opacity: 0;
  animation: thinkRing 1.2s linear infinite;
}
@keyframes thinkRing { to { transform: rotate(360deg); } }

.cosmos-voice-waves {
  position: absolute;
  bottom: 6%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 28px;
  opacity: 0;
}
.cosmos-voice-waves span {
  width: 4px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--cosmos-cyan), var(--cosmos-magenta));
  animation: voiceBar 0.7s ease-in-out infinite;
}
.cosmos-voice-waves span:nth-child(1) { height: 8px; animation-delay: 0s; }
.cosmos-voice-waves span:nth-child(2) { height: 14px; animation-delay: 0.08s; }
.cosmos-voice-waves span:nth-child(3) { height: 22px; animation-delay: 0.16s; }
.cosmos-voice-waves span:nth-child(4) { height: 18px; animation-delay: 0.24s; }
.cosmos-voice-waves span:nth-child(5) { height: 24px; animation-delay: 0.32s; }
.cosmos-voice-waves span:nth-child(6) { height: 12px; animation-delay: 0.4s; }
@keyframes voiceBar {
  0%, 100% { transform: scaleY(0.35); opacity: 0.5; }
  50% { transform: scaleY(1); opacity: 1; }
}

.cosmos-fly-bubble {
  position: absolute;
  z-index: 5;
  padding: 10px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(8, 16, 36, 0.88);
  backdrop-filter: blur(12px);
  font-size: 0.72rem;
  opacity: 0;
  pointer-events: none;
  max-width: 160px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}
.cosmos-bubble-tag {
  display: block;
  font-size: 0.48rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--cosmos-cyan);
  margin-bottom: 4px;
}
.cosmos-fly-bubble span:not(.cosmos-bubble-tag) { display: block; font-weight: 800; color: #fff; margin-bottom: 3px; }
.cosmos-fly-bubble small { font-size: 0.58rem; color: rgba(203, 213, 225, 0.75); line-height: 1.35; }
.cosmos-fly-bubble--in { left: 2%; top: 32%; border-color: rgba(37, 211, 102, 0.4); box-shadow: 0 0 24px rgba(37, 211, 102, 0.15); }
.cosmos-fly-bubble--out { right: 2%; top: 38%; border-color: rgba(0, 207, 255, 0.4); box-shadow: 0 0 24px rgba(0, 207, 255, 0.15); }

.cosmos-brain-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.cosmos-brain-chips span {
  font-size: 0.55rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(123, 92, 255, 0.35);
  color: rgba(0, 245, 255, 0.95);
  background: rgba(123, 92, 255, 0.12);
  backdrop-filter: blur(4px);
}

.cosmos-mobile-flow { display: none; }

.cosmos-workflow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
  padding: 12px 14px;
  margin: 8px 14px 0;
  border-radius: 16px;
  border: 1px solid rgba(123, 92, 255, 0.22);
  background: rgba(8, 8, 24, 0.55);
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  z-index: 5;
}
.cosmos-wf-step { text-align: center; padding: 6px 8px; min-width: 56px; opacity: 0.4; transition: opacity 0.4s; }
.cosmos-wf-step span { font-size: 1.05rem; display: block; margin-bottom: 3px; }
.cosmos-wf-step strong { display: block; font-size: 0.54rem; font-weight: 800; color: #f1f5f9; }
.cosmos-wf-step em { font-size: 0.46rem; color: var(--muted); font-style: normal; }
.cosmos-wf-arrow { color: var(--cosmos-blue); font-weight: 800; font-size: 0.7rem; opacity: 0.35; }

.cosmos-bottom {
  position: relative;
  z-index: 5;
  padding: 14px;
  opacity: 0;
  transform: translateY(24px);
  transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.cosmos-notif {
  position: absolute;
  top: -6px;
  right: 24px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--cosmos-purple), var(--cosmos-magenta));
  box-shadow: 0 6px 28px rgba(255, 79, 216, 0.45);
  opacity: 0;
  z-index: 7;
}

.cosmos-dash { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.cosmos-dash-card {
  flex: 1 1 95px;
  padding: 11px 12px;
  border-radius: 14px;
  border: 1px solid rgba(0, 207, 255, 0.18);
  background: linear-gradient(160deg, rgba(10, 16, 36, 0.7), rgba(6, 8, 20, 0.8));
  backdrop-filter: blur(10px);
  text-align: center;
  opacity: 0;
  transform: translateY(16px) scale(0.95);
  transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.cosmos-dash-card strong { display: block; font-size: 1rem; font-weight: 800; color: var(--cosmos-cyan); line-height: 1.2; text-shadow: 0 0 16px rgba(0, 207, 255, 0.3); }
.cosmos-dash-card em { font-size: 0.48rem; color: rgba(203, 213, 225, 0.65); font-style: normal; letter-spacing: 0.05em; }
.cosmos-mini-graph { display: flex; align-items: flex-end; justify-content: center; gap: 3px; height: 22px; margin-top: 6px; }
.cosmos-mini-graph span {
  width: 4px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--cosmos-magenta), var(--cosmos-purple));
  animation: miniGraph 1.4s ease-in-out infinite;
}
.cosmos-mini-graph span:nth-child(1) { height: 6px; animation-delay: 0s; }
.cosmos-mini-graph span:nth-child(2) { height: 11px; animation-delay: 0.1s; }
.cosmos-mini-graph span:nth-child(3) { height: 18px; animation-delay: 0.2s; }
.cosmos-mini-graph span:nth-child(4) { height: 13px; animation-delay: 0.3s; }
.cosmos-mini-graph span:nth-child(5) { height: 20px; animation-delay: 0.4s; }
.cosmos-mini-graph span:nth-child(6) { height: 15px; animation-delay: 0.5s; }
@keyframes miniGraph {
  0%, 100% { transform: scaleY(0.55); opacity: 0.55; }
  50% { transform: scaleY(1); opacity: 1; }
}

.cosmos-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: calc(100% - 28px);
  margin: 14px auto 18px;
  padding: 15px 22px;
  border-radius: 18px;
  border: 1px solid rgba(123, 92, 255, 0.55);
  background: linear-gradient(135deg, rgba(123, 92, 255, 0.4), rgba(0, 207, 255, 0.22));
  color: #fff;
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  position: relative;
  z-index: 6;
  opacity: 0;
  transform: translateY(12px);
  transition: all 0.6s ease;
}
.cinematic-os[data-phase="6"] .cosmos-cta {
  animation: ctaGlow 2.5s ease-in-out infinite;
}
@keyframes ctaGlow {
  0%, 100% { box-shadow: 0 8px 36px rgba(123, 92, 255, 0.25); }
  50% { box-shadow: 0 16px 56px rgba(0, 207, 255, 0.4), 0 0 40px rgba(255, 79, 216, 0.15); }
}

/* ═══ PHASE STORY ═══ */
@keyframes brainBirth {
  0% { transform: scale(0.08); opacity: 0; filter: brightness(0.2); }
  50% { transform: scale(1.08); opacity: 1; filter: brightness(1.4); }
  100% { transform: scale(1); opacity: 1; filter: brightness(1); }
}
@keyframes brainIdle {
  0%, 100% { filter: brightness(1) drop-shadow(0 0 25px rgba(123, 92, 255, 0.45)); }
  50% { filter: brightness(1.12) drop-shadow(0 0 45px rgba(0, 207, 255, 0.55)); }
}

.cinematic-os[data-phase="1"] .cosmos-brain {
  animation: brainBirth 3.5s cubic-bezier(0.22, 1, 0.36, 1) forwards, brainIdle 3s ease-in-out 3.5s infinite;
}
.cinematic-os[data-phase="1"] .cosmos-orbit-rings { opacity: 0.3; transition: opacity 2s; }
.cinematic-os[data-phase="1"] .cosmos-holo-platform { opacity: 0.5; transition: opacity 2s 1s; }

.cinematic-os[data-phase="2"] .cosmos-brain,
.cinematic-os[data-phase="3"] .cosmos-brain,
.cinematic-os[data-phase="4"] .cosmos-brain,
.cinematic-os[data-phase="5"] .cosmos-brain,
.cinematic-os[data-phase="6"] .cosmos-brain {
  transform: scale(1);
  opacity: 1;
  filter: brightness(1);
  animation: brainIdle 3s ease-in-out infinite;
}
.cinematic-os[data-phase="2"] .cosmos-process-ring { opacity: 0.6; }
.cinematic-os[data-phase="2"] .cosmos-neuron,
.cinematic-os[data-phase="3"] .cosmos-neuron,
.cinematic-os[data-phase="4"] .cosmos-neuron,
.cinematic-os[data-phase="5"] .cosmos-neuron,
.cinematic-os[data-phase="6"] .cosmos-neuron { animation: neuronBlink 1s ease-in-out infinite; opacity: 0.85; }
.cinematic-os[data-phase="2"] .cosmos-synapse,
.cinematic-os[data-phase="3"] .cosmos-synapse,
.cinematic-os[data-phase="4"] .cosmos-synapse,
.cinematic-os[data-phase="5"] .cosmos-synapse,
.cinematic-os[data-phase="6"] .cosmos-synapse { animation: synapsePulse 1.2s ease-in-out infinite; opacity: 0.75; }
.cinematic-os[data-phase="2"] .synapse-pulse,
.cinematic-os[data-phase="3"] .synapse-pulse,
.cinematic-os[data-phase="4"] .synapse-pulse,
.cinematic-os[data-phase="5"] .synapse-pulse,
.cinematic-os[data-phase="6"] .synapse-pulse { opacity: 1; }
.cinematic-os[data-phase="2"] .brain-arc,
.cinematic-os[data-phase="3"] .brain-arc,
.cinematic-os[data-phase="4"] .brain-arc,
.cinematic-os[data-phase="5"] .brain-arc,
.cinematic-os[data-phase="6"] .brain-arc { opacity: 0.6; }
.cinematic-os[data-phase="4"] .brain-arc,
.cinematic-os[data-phase="5"] .brain-arc { opacity: 1; animation: arcFlow 1.2s linear infinite; }
.cinematic-os[data-phase="4"] .brain-silhouette,
.cinematic-os[data-phase="5"] .brain-silhouette { filter: brightness(1.15) drop-shadow(0 0 20px rgba(0,245,255,0.3)); }
.cinematic-os[data-phase="3"] .cosmos-nerve[data-from^="f"] { opacity: 0.95; stroke: #25d366; }
.cinematic-os[data-phase="5"] .cosmos-nerve[data-to="out"],
.cinematic-os[data-phase="5"] .cosmos-nerve[data-from="out"] { opacity: 1; }
.cinematic-os[data-phase="2"] .brain-inner-parts,
.cinematic-os[data-phase="3"] .brain-inner-parts,
.cinematic-os[data-phase="4"] .brain-inner-parts,
.cinematic-os[data-phase="5"] .brain-inner-parts,
.cinematic-os[data-phase="6"] .brain-inner-parts { opacity: 0.9; }
.cinematic-os[data-phase="2"] .cosmos-sparks-inbrain { opacity: 0.5; }
.cinematic-os[data-phase="2"] .cosmos-neuron.n1 { animation-delay: 0s; }
.cinematic-os[data-phase="2"] .cosmos-neuron.n2 { animation-delay: 0.15s; }
.cinematic-os[data-phase="2"] .cosmos-neuron.n3 { animation-delay: 0.3s; }
.cinematic-os[data-phase="2"] .cosmos-neuron.n4 { animation-delay: 0.45s; }
.cinematic-os[data-phase="2"] .cosmos-neuron.n5 { animation-delay: 0.6s; }
.cinematic-os[data-phase="2"] .cosmos-neuron.n6 { animation-delay: 0.2s; }
.cinematic-os[data-phase="2"] .cosmos-neuron.n7 { animation-delay: 0.35s; }
.cinematic-os[data-phase="2"] .cosmos-neuron.n8 { animation-delay: 0.5s; }
@keyframes neuronBlink {
  0%, 100% { opacity: 0.35; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.35); fill: var(--cosmos-magenta); }
}
@keyframes synapsePulse {
  0%, 100% { opacity: 0.25; stroke-width: 1; }
  50% { opacity: 0.95; stroke-width: 2.2; stroke: var(--cosmos-cyan); }
}

.cinematic-os[data-phase="3"] .cosmos-beams { opacity: 1; }
.cinematic-os[data-phase="3"] .cosmos-story-pipeline { opacity: 1; transform: none; }
.cinematic-os[data-phase="3"] .cosmos-sp-step--1 { opacity: 1; transform: scale(1.05); background: rgba(37, 211, 102, 0.12); border: 1px solid rgba(37, 211, 102, 0.35); box-shadow: 0 0 18px rgba(37, 211, 102, 0.2); }
.cinematic-os[data-phase="3"] .cosmos-sp-step--1 em { color: #fff; }
.cinematic-os[data-phase="3"] .cosmos-sp-arrow:nth-of-type(1) { opacity: 0.8; color: rgba(37, 211, 102, 0.6); }
.cinematic-os[data-phase="3"] #cosmosCoreLabel { color: #25d366; text-shadow: 0 0 10px rgba(37, 211, 102, 0.6); }
.cinematic-os[data-phase="3"] .synapse-pulse { opacity: 0.6; }
.cinematic-os[data-phase="3"] .cosmos-fly-bubble--in { animation: bubbleToBrain 2.8s ease-in-out infinite; }
.cinematic-os[data-phase="3"] .cosmos-fly-bubble--out { opacity: 0 !important; animation: none; }
.cinematic-os[data-phase="3"] .cosmos-beam--in1,
.cinematic-os[data-phase="3"] .cosmos-beam--in2,
.cinematic-os[data-phase="3"] .cosmos-beam--in3 { opacity: 0.7; stroke-dashoffset: 0; animation: beamDash 1.2s linear infinite; }
.cinematic-os[data-phase="3"] .cosmos-col--in .cosmos-in--0 { opacity: 1; transform: none; transition-delay: 0.05s; animation-play-state: running; }
.cinematic-os[data-phase="3"] .cosmos-col--in .cosmos-in--1 { opacity: 1; transform: none; transition-delay: 0.2s; }
.cinematic-os[data-phase="3"] .cosmos-col--in .cosmos-in--2 { opacity: 1; transform: none; transition-delay: 0.35s; }
.cinematic-os[data-phase="4"] .cosmos-process-ring { opacity: 1; }
.cinematic-os[data-phase="4"] .cosmos-story-pipeline { opacity: 1; transform: none; }
.cinematic-os[data-phase="4"] .cosmos-sp-step--1 { opacity: 0.65; transform: scale(1); }
.cinematic-os[data-phase="4"] .cosmos-sp-step--1 em { color: #34d399; }
.cinematic-os[data-phase="4"] .cosmos-sp-step--2 { opacity: 1; transform: scale(1.08); background: rgba(123, 92, 255, 0.15); border: 1px solid rgba(123, 92, 255, 0.45); box-shadow: 0 0 22px rgba(123, 92, 255, 0.25); }
.cinematic-os[data-phase="4"] .cosmos-sp-step--2 em { color: #fff; }
.cinematic-os[data-phase="4"] .cosmos-sp-arrow:nth-of-type(1),
.cinematic-os[data-phase="4"] .cosmos-sp-arrow:nth-of-type(2) { opacity: 0.7; }
.cinematic-os[data-phase="4"] .cosmos-scan,
.cinematic-os[data-phase="4"] .cosmos-scan--2 { opacity: 1; }
.cinematic-os[data-phase="4"] .cosmos-think-ring { opacity: 1; }
.cinematic-os[data-phase="4"] .cosmos-voice-waves { opacity: 1; }
.cinematic-os[data-phase="4"] .cosmos-sparks-inbrain { opacity: 1; }
.cinematic-os[data-phase="4"] .cosmos-brain-chips { opacity: 1; }
.cinematic-os[data-phase="4"] .synapse-pulse { opacity: 1; }
.cinematic-os[data-phase="4"] .brain-arc { opacity: 1; }
.cinematic-os[data-phase="4"] .cosmos-neuron { animation: neuronBlink 0.8s ease-in-out infinite; opacity: 0.85; }
.cinematic-os[data-phase="4"] .cosmos-synapse { animation: synapsePulse 0.9s ease-in-out infinite; opacity: 0.8; }
.cinematic-os[data-phase="4"] .cosmos-fly-bubble--in { opacity: 0 !important; animation: none; }
.cinematic-os[data-phase="4"] .cosmos-fly-bubble--out { opacity: 0 !important; animation: none; }
.cinematic-os[data-phase="4"] .cosmos-brain { animation: brainIdle 1.5s ease-in-out infinite, brainProcess 2s ease-in-out infinite; }
.cinematic-os[data-phase="4"] .brain-hemi { filter: brightness(1.15); }
@keyframes brainProcess {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

.cinematic-os[data-phase="5"] .cosmos-beams { opacity: 1; }
.cinematic-os[data-phase="5"] .cosmos-story-pipeline { opacity: 1; transform: none; }
.cinematic-os[data-phase="5"] .cosmos-sp-step--1,
.cinematic-os[data-phase="5"] .cosmos-sp-step--2 { opacity: 0.65; transform: scale(1); }
.cinematic-os[data-phase="5"] .cosmos-sp-step--1 em,
.cinematic-os[data-phase="5"] .cosmos-sp-step--2 em { color: #34d399; }
.cinematic-os[data-phase="5"] .cosmos-sp-step--3 { opacity: 1; transform: scale(1.08); background: rgba(255, 165, 0, 0.12); border: 1px solid rgba(255, 165, 0, 0.4); box-shadow: 0 0 22px rgba(255, 165, 0, 0.2); }
.cinematic-os[data-phase="5"] .cosmos-sp-step--3 em { color: #fff; }
.cinematic-os[data-phase="5"] .cosmos-sparks-inbrain { opacity: 0.8; }
.cinematic-os[data-phase="5"] .synapse-pulse { opacity: 1; }
.cinematic-os[data-phase="5"] .brain-arc { opacity: 0.85; }
.cinematic-os[data-phase="5"] .cosmos-fly-bubble--in { opacity: 0 !important; animation: none; }
.cinematic-os[data-phase="5"] .cosmos-beam--out1,
.cinematic-os[data-phase="5"] .cosmos-beam--out2,
.cinematic-os[data-phase="5"] .cosmos-beam--out3 { opacity: 0.75; animation: beamDash 1.2s linear infinite; }
.cinematic-os[data-phase="5"] .cosmos-col--out .cosmos-out--0 { opacity: 1; transform: none; animation-play-state: running; }
.cinematic-os[data-phase="5"] .cosmos-col--out .cosmos-out--1 { opacity: 1; transform: none; transition-delay: 0.15s; }
.cinematic-os[data-phase="5"] .cosmos-col--out .cosmos-out--2 { opacity: 1; transform: none; transition-delay: 0.3s; }
.cinematic-os[data-phase="5"] .cosmos-fly-bubble--out { animation: bubbleFromBrain 2.8s ease-in-out infinite; }
.cinematic-os[data-phase="6"] .cosmos-story-pipeline { opacity: 1; transform: none; }
.cinematic-os[data-phase="6"] .cosmos-sp-step { opacity: 0.65; transform: scale(1); }
.cinematic-os[data-phase="6"] .cosmos-sp-step--4 { opacity: 1; transform: scale(1.05); background: rgba(0, 207, 255, 0.12); border: 1px solid rgba(0, 245, 255, 0.4); box-shadow: 0 0 20px rgba(0, 207, 255, 0.25); }
.cinematic-os[data-phase="6"] .cosmos-sp-step--4 em { color: #fff; }
.cinematic-os[data-phase="6"] .cosmos-sp-step--1 em,
.cinematic-os[data-phase="6"] .cosmos-sp-step--2 em,
.cinematic-os[data-phase="6"] .cosmos-sp-step--3 em { color: #34d399; }
.cinematic-os[data-phase="6"] .cosmos-sparks-inbrain { opacity: 0.5; }
.cinematic-os[data-phase="6"] .synapse-pulse { opacity: 0.7; }
@keyframes beamDash { to { stroke-dashoffset: -40; } }
@keyframes bubbleToBrain {
  0% { opacity: 0; transform: translate(-60px, 20px) scale(0.7); }
  25% { opacity: 1; transform: translate(20px, -10px) scale(1); }
  55% { opacity: 1; transform: translate(60px, -30px) scale(0.95); }
  100% { opacity: 0; transform: translate(100px, -50px) scale(0.4); }
}
@keyframes bubbleFromBrain {
  0% { opacity: 0; transform: translate(60px, -20px) scale(0.5); }
  30% { opacity: 1; transform: translate(-10px, -5px) scale(1); }
  70% { opacity: 1; transform: translate(-50px, 5px) scale(1); }
  100% { opacity: 0.85; transform: translate(-70px, 10px) scale(0.95); }
}

.cinematic-os[data-phase="6"] .cosmos-beams { opacity: 0.5; }
.cinematic-os[data-phase="6"] .cosmos-col--in .cosmos-in,
.cinematic-os[data-phase="6"] .cosmos-col--out .cosmos-out { opacity: 0.75; transform: none; animation-play-state: running; }
.cinematic-os[data-phase="6"] .cosmos-in--3,
.cinematic-os[data-phase="6"] .cosmos-in--4,
.cinematic-os[data-phase="6"] .cosmos-out--3,
.cinematic-os[data-phase="6"] .cosmos-out--4 { opacity: 0.7; transform: none; }
.cinematic-os[data-phase="6"] .cosmos-workflow { opacity: 1; transform: none; }
.cinematic-os[data-phase="6"] .cosmos-wf-step { opacity: 1; }
.cinematic-os[data-phase="6"] .cosmos-bottom { opacity: 1; transform: none; }
.cinematic-os[data-phase="6"] .cosmos-notif { animation: notifPop 2.5s ease-in-out infinite; }
@keyframes notifPop {
  0% { opacity: 0; transform: translateY(-24px) scale(0.7); }
  15% { opacity: 1; transform: translateY(0) scale(1.08); }
  85% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0.95; transform: translateY(-6px) scale(1); }
}
.cinematic-os[data-phase="6"] .cosmos-dash-card { opacity: 1; transform: none; }
.cinematic-os[data-phase="6"] .cosmos-dash-card:nth-child(1) { transition-delay: 0.05s; }
.cinematic-os[data-phase="6"] .cosmos-dash-card:nth-child(2) { transition-delay: 0.12s; }
.cinematic-os[data-phase="6"] .cosmos-dash-card:nth-child(3) { transition-delay: 0.19s; }
.cinematic-os[data-phase="6"] .cosmos-dash-card:nth-child(4) { transition-delay: 0.26s; }
.cinematic-os[data-phase="6"] .cosmos-dash-card:nth-child(5) { transition-delay: 0.33s; }
.cinematic-os[data-phase="6"] .cosmos-cta { opacity: 1; transform: none; }
.cinematic-os[data-phase="6"] .cosmos-brain-chips { opacity: 1; }
.cinematic-os[data-phase="6"] .cosmos-process-ring { opacity: 1; --ring-p: 100; }

/* Hero layout */
.hero-hitech { padding-bottom: 40px !important; min-height: auto !important; }
.hero-grid { grid-template-columns: 1fr !important; max-width: 520px; }
.hero-content.hero-glass-panel { margin-bottom: 12px; padding: 18px; }
.hero-sub--cinema { font-size: 0.85rem; }
.hero-actions--cinema { margin-top: 10px; }

@media (min-width: 1024px) {
  .hero-hitech {
    display: grid;
    grid-template-columns: minmax(300px, 360px) 1fr;
    align-items: start;
    gap: 0 24px;
    padding-left: max(16px, calc((100% - var(--max)) / 2));
    padding-right: max(16px, calc((100% - var(--max)) / 2));
  }
  .hero-hitech .container.hero-grid {
    grid-column: 1;
    max-width: none;
    width: 100%;
    margin: 0;
    padding: calc(var(--topbar-h) + var(--nav-h) + 20px) 0 0;
  }
  .cinematic-os-wrap {
    grid-column: 2;
    max-width: none;
    padding: calc(var(--topbar-h) + var(--nav-h) + 12px) 0 36px;
  }
}

@media (max-width: 768px) {
  .hero-hud-corner, .hero-cyber-layer { display: none !important; }
  .hero-content .hero-badge, .hero-content .hero-eyebrow-tech, .hero-content .hero-sub--cinema { display: none; }
  .hero-content h1 { font-size: 1.05rem !important; text-align: center; line-height: 1.25; }
  .hero-actions--cinema .btn-outline { display: none; }
  .hero-actions--cinema .btn-wa { width: 100%; justify-content: center; font-size: 0.72rem; padding: 9px; }
  .hero-content.hero-glass-panel { background: transparent; border: none; box-shadow: none; padding: 4px 0 0; margin-bottom: 4px; }

  .cinematic-os-wrap { padding: 0 6px 12px; }
  .cinematic-os { min-height: 0; border-radius: 14px; overflow: hidden; }
  .cosmos-topbar { font-size: 0.44rem; padding: 6px 8px; }
  .cosmos-phase { font-size: 0.42rem; padding: 2px 6px; }
  .cosmos-brand-text { display: none; }
  .cosmos-story-line { display: none; }
  .cosmos-grid-floor { display: none; }

  .cosmos-stage { grid-template-columns: 1fr; padding: 6px 6px 4px; }
  .cosmos-col--in, .cosmos-col--out { display: none; }
  .cosmos-beams { opacity: 0.2 !important; top: 20%; height: 45%; }

  .cosmos-brain-zone { min-height: 0; justify-content: flex-start; }
  .cosmos-brain-stack { padding-bottom: 0; width: 100%; }
  .cosmos-orbit-rings, .cosmos-holo-platform, .cosmos-process-ring,
  .cosmos-fly-bubble, .cosmos-brain-chips { display: none !important; }

  .cosmos-brain--v52 { width: min(165px, 50vw); }
  .cosmos-brain--v53 { width: min(185px, 55vw); }
  .cosmos-brain-shell--side { aspect-ratio: 280 / 260; }
  .cosmos-holo-platform--v52 { width: 165px; height: 72px; bottom: 8px; }
  .cosmos-holo-beam--v52 { height: 90px; }
  .cosmos-brain-core--thalamus { width: 44px; }
  .cosmos-core-label { font-size: 0.34rem; }
  .cosmos-brain-stack { padding-bottom: 0; }
  .cosmos-brain-badge { font-size: 0.4rem; top: -16px; padding: 3px 7px; }
  .cosmos-brain-core { width: 52px; }
  .cosmos-brain-core img { width: 18px !important; height: 18px !important; }
  .cosmos-core-label { font-size: 0.36rem; }

  .cosmos-story-pipeline {
    opacity: 1 !important;
    transform: none !important;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 2px;
    padding: 4px 5px;
    margin-top: 4px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }
  .cosmos-sp-step {
    padding: 2px 4px;
    flex: 1 1 0;
    justify-content: center;
    min-width: 0;
    opacity: 0.5 !important;
    transform: scale(1) !important;
  }
  .cosmos-sp-step em { font-size: 0.4rem; }
  .cosmos-sp-icon { font-size: 0.55rem; }
  .cosmos-sp-arrow { display: none; }

  .cosmos-mobile-flow {
    display: flex !important;
    flex-direction: column;
    gap: 3px;
    width: 100%;
    margin-top: 5px;
    padding: 0 2px;
  }
  .cosmos-mob-card {
    display: flex;
    opacity: 1 !important;
    transform: none !important;
    padding: 5px 8px;
    gap: 6px;
    border-radius: 10px;
    transition: border-color 0.4s, box-shadow 0.4s;
  }
  .cosmos-mob-card span { font-size: 0.85rem; }
  .cosmos-mob-card strong { font-size: 0.55rem; }
  .cosmos-mob-card em { font-size: 0.46rem; }
  .cosmos-mob-card--active {
    border-color: rgba(0, 245, 255, 0.45) !important;
    box-shadow: 0 0 14px rgba(0, 207, 255, 0.2);
    background: rgba(0, 207, 255, 0.08);
  }

  .cosmos-bottom,
  .cosmos-workflow,
  .cosmos-cta,
  .cosmos-mobile-flow { display: none !important; }

  .cinematic-os { overflow: visible; margin-bottom: 8px; }
  .cinematic-os-wrap { padding-bottom: 4px; }

  .mobile-ai-home { margin-top: 0 !important; padding-top: 12px !important; }
  .mobile-ai-cta { display: none; }
}

@media (min-width: 769px) and (max-width: 1100px) {
  .cosmos-stage { grid-template-columns: 1fr 260px 1fr; gap: 10px; }
  .cosmos-glass { padding: 9px 10px; }
  .cosmos-glass strong { font-size: 0.65rem; }
  .cosmos-brain { width: 170px; }
}
10px; }
  .cosmos-glass strong { font-size: 0.65rem; }
  .cosmos-brain { width: 170px; }
}
