/* =========================================================
   LEARNING REWIRED LAB — COSMOS EXPERIENCE
   Interactive HTML5 Mission Control Prototype
   File: /assets/css/cosmos-experience.css
   ========================================================= */

.cosmos-xp {
  --xp-ink: #f8fbff;
  --xp-muted: rgba(226, 232, 240, 0.76);
  --xp-soft: rgba(248, 250, 252, 0.1);
  --xp-line: rgba(255, 255, 255, 0.14);
  --xp-deep: #050816;
  --xp-navy: #07111f;
  --xp-panel: rgba(10, 20, 42, 0.78);
  --xp-panel-strong: rgba(12, 24, 52, 0.94);
  --xp-blue: #72a7ff;
  --xp-cyan: #66e3ff;
  --xp-lime: #b9ff7a;
  --xp-gold: #ffd36e;
  --xp-pink: #ff87c8;
  --xp-orange: #ffb86b;
  --xp-danger: #ff6b8a;
  --xp-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
  --xp-radius-xl: 34px;
  --xp-radius-lg: 26px;
  --xp-radius-md: 18px;

  position: relative;
  overflow: hidden;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 8%, rgba(102, 227, 255, 0.18), transparent 34%),
    radial-gradient(circle at 88% 10%, rgba(255, 135, 200, 0.13), transparent 34%),
    radial-gradient(circle at 50% 92%, rgba(114, 167, 255, 0.14), transparent 38%),
    linear-gradient(180deg, #050816 0%, #07111f 48%, #050816 100%);
  color: var(--xp-ink);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

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

.cosmos-xp h1,
.cosmos-xp h2,
.cosmos-xp h3,
.cosmos-xp p,
.cosmos-xp figure {
  margin-top: 0;
}

.cosmos-xp figure {
  margin-right: 0;
  margin-left: 0;
}

.cosmos-xp button,
.cosmos-xp a {
  font: inherit;
}

.cosmos-xp button {
  cursor: pointer;
}

.cosmos-xp button:disabled {
  cursor: not-allowed;
}

.cosmos-xp a {
  color: inherit;
}

.cosmos-xp-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.cosmos-xp-eyebrow {
  margin-bottom: 14px;
  color: var(--xp-cyan);
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* =========================================================
   COSMOS CHAOS LAYER — PREMIUM CSS OBJECTS
   ========================================================= */

.cosmos-chaos-layer {
  position: fixed;
  inset: 0;
  z-index: 4;
  overflow: hidden;
  pointer-events: none;
}

.cosmos-star-shoot,
.cosmos-rocket-flyer,
.cosmos-ufo-flyer,
.cosmos-pig-pod,
.cosmos-asteroid {
  position: absolute;
  display: block;
  will-change: transform, opacity;
}

.cosmos-star-shoot {
  width: 120px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.95), transparent);
  opacity: 0;
  transform: rotate(-18deg);
  filter: drop-shadow(0 0 14px rgba(102, 227, 255, 0.48));
}

.star-one {
  top: 18%;
  left: -140px;
  animation: cosmosShoot 8s ease-in-out 1.2s infinite;
}

.star-two {
  top: 42%;
  left: -160px;
  animation: cosmosShoot 11s ease-in-out 4.8s infinite;
}

.star-three {
  top: 72%;
  left: -180px;
  animation: cosmosShoot 13s ease-in-out 7s infinite;
}

.cosmos-rocket-flyer {
  width: 72px;
  height: 28px;
  opacity: 0;
  filter: drop-shadow(0 0 18px rgba(102, 227, 255, 0.5));
}

.cosmos-rocket-flyer i {
  position: absolute;
  inset: 0;
  display: block;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px 46% 46% 999px;
  background:
    radial-gradient(circle at 72% 50%, rgba(255, 255, 255, 0.95) 0 5px, transparent 6px),
    linear-gradient(135deg, rgba(102, 227, 255, 0.95), rgba(114, 167, 255, 0.78));
}

.cosmos-rocket-flyer i::before {
  content: "";
  position: absolute;
  left: -28px;
  top: 50%;
  width: 34px;
  height: 16px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255, 184, 107, 0.92), rgba(255, 211, 110, 0.82));
  transform: translateY(-50%);
  filter: blur(1px);
}

.cosmos-rocket-flyer i::after {
  content: "";
  position: absolute;
  right: 10px;
  top: -9px;
  width: 18px;
  height: 14px;
  border-radius: 999px 999px 0 0;
  background: rgba(185, 255, 122, 0.78);
  transform: rotate(18deg);
}

.rocket-one {
  top: 20%;
  left: -100px;
  animation: cosmosFlyRocket 18s ease-in-out 2.5s infinite;
}

.cosmos-ufo-flyer {
  width: 86px;
  height: 36px;
  opacity: 0;
  filter: drop-shadow(0 0 18px rgba(255, 135, 200, 0.36));
}

.cosmos-ufo-flyer i {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  display: block;
  height: 18px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.26), rgba(102, 227, 255, 0.16));
}

.cosmos-ufo-flyer i::before {
  content: "";
  position: absolute;
  left: 26px;
  top: -18px;
  width: 34px;
  height: 24px;
  border-radius: 999px 999px 8px 8px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(102, 227, 255, 0.32);
}

.cosmos-ufo-flyer i::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: -7px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--xp-cyan), var(--xp-pink), var(--xp-gold));
  opacity: 0.7;
  filter: blur(1px);
}

.ufo-one {
  right: -100px;
  bottom: 22%;
  animation: cosmosFlySaucer 22s ease-in-out 6s infinite;
}

.cosmos-pig-pod {
  width: 54px;
  height: 54px;
  opacity: 0;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background:
    radial-gradient(circle at 38% 38%, rgba(255, 255, 255, 0.75) 0 3px, transparent 4px),
    radial-gradient(circle at 60% 38%, rgba(255, 255, 255, 0.75) 0 3px, transparent 4px),
    radial-gradient(circle at 50% 58%, rgba(255, 135, 200, 0.95) 0 8px, transparent 9px),
    radial-gradient(circle at 50% 50%, rgba(255, 135, 200, 0.55), rgba(255, 135, 200, 0.1) 58%, rgba(102, 227, 255, 0.16) 100%);
  box-shadow:
    inset 0 0 20px rgba(255, 255, 255, 0.12),
    0 0 22px rgba(255, 135, 200, 0.22);
}

.cosmos-pig-pod::before,
.cosmos-pig-pod::after {
  content: "";
  position: absolute;
  top: 6px;
  width: 13px;
  height: 13px;
  border-radius: 4px 999px 4px 999px;
  background: rgba(255, 135, 200, 0.72);
}

.cosmos-pig-pod::before {
  left: 7px;
  transform: rotate(-18deg);
}

.cosmos-pig-pod::after {
  right: 7px;
  transform: rotate(108deg);
}

.cosmos-pig-pod i {
  position: absolute;
  left: 50%;
  bottom: 12px;
  display: block;
  width: 14px;
  height: 8px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 35% 50%, rgba(5, 8, 22, 0.8) 0 1px, transparent 2px),
    radial-gradient(circle at 65% 50%, rgba(5, 8, 22, 0.8) 0 1px, transparent 2px),
    rgba(255, 210, 225, 0.9);
  transform: translateX(-50%);
}

.pig-one {
  top: 54%;
  left: -80px;
  animation: cosmosPigFloat 19s ease-in-out 3.5s infinite;
}

.pig-two {
  top: 10%;
  right: -80px;
  animation: cosmosPigReverse 24s ease-in-out 9s infinite;
}

.cosmos-asteroid {
  width: 34px;
  height: 28px;
  opacity: 0;
  border-radius: 46% 54% 42% 58%;
  background:
    radial-gradient(circle at 32% 32%, rgba(255, 255, 255, 0.34) 0 3px, transparent 4px),
    radial-gradient(circle at 70% 62%, rgba(5, 8, 22, 0.38) 0 4px, transparent 5px),
    linear-gradient(135deg, rgba(255, 211, 110, 0.66), rgba(255, 184, 107, 0.26));
  box-shadow: 0 0 18px rgba(255, 211, 110, 0.18);
}

.asteroid-one {
  top: 32%;
  right: -70px;
  animation: cosmosAsteroid 16s linear 1s infinite;
}

.asteroid-two {
  top: 76%;
  right: -70px;
  width: 24px;
  height: 22px;
  background:
    radial-gradient(circle at 34% 32%, rgba(255, 255, 255, 0.28) 0 2px, transparent 3px),
    linear-gradient(135deg, rgba(102, 227, 255, 0.54), rgba(114, 167, 255, 0.24));
  animation: cosmosAsteroid 21s linear 5s infinite;
}

.asteroid-three {
  top: 58%;
  left: -70px;
  width: 28px;
  height: 26px;
  background:
    radial-gradient(circle at 32% 32%, rgba(255, 255, 255, 0.28) 0 2px, transparent 3px),
    linear-gradient(135deg, rgba(255, 135, 200, 0.54), rgba(255, 211, 110, 0.2));
  animation: cosmosAsteroidReverse 18s linear 8s infinite;
}

@keyframes cosmosShoot {
  0%, 72% {
    opacity: 0;
    transform: translateX(0) translateY(0) rotate(-18deg);
  }

  78% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateX(calc(100vw + 340px)) translateY(160px) rotate(-18deg);
  }
}

@keyframes cosmosFlyRocket {
  0%, 65% {
    opacity: 0;
    transform: translateX(0) translateY(0) rotate(8deg);
  }

  72% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateX(calc(100vw + 220px)) translateY(-120px) rotate(8deg);
  }
}

@keyframes cosmosFlySaucer {
  0%, 64% {
    opacity: 0;
    transform: translateX(0) translateY(0) rotate(-4deg);
  }

  72% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateX(calc(-100vw - 220px)) translateY(-90px) rotate(-4deg);
  }
}

@keyframes cosmosPigFloat {
  0%, 58% {
    opacity: 0;
    transform: translateX(0) translateY(0) rotate(-12deg);
  }

  66% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateX(calc(100vw + 160px)) translateY(-160px) rotate(20deg);
  }
}

@keyframes cosmosPigReverse {
  0%, 60% {
    opacity: 0;
    transform: translateX(0) translateY(0) rotate(18deg);
  }

  68% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateX(calc(-100vw - 160px)) translateY(180px) rotate(-22deg);
  }
}

@keyframes cosmosAsteroid {
  0%, 70% {
    opacity: 0;
    transform: translateX(0) translateY(0) rotate(0deg);
  }

  76% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateX(calc(-100vw - 180px)) translateY(110px) rotate(360deg);
  }
}

@keyframes cosmosAsteroidReverse {
  0%, 70% {
    opacity: 0;
    transform: translateX(0) translateY(0) rotate(0deg);
  }

  76% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateX(calc(100vw + 180px)) translateY(-110px) rotate(-360deg);
  }
}

/* =========================================================
   TOP BAR
   ========================================================= */

.cosmos-xp-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  min-height: 68px;
  padding: 12px clamp(14px, 3vw, 28px);
  border-bottom: 1px solid var(--xp-line);
  background: rgba(5, 8, 22, 0.78);
  backdrop-filter: blur(20px);
}

.cosmos-xp-back {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid var(--xp-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.065);
  color: var(--xp-muted);
  font-size: 0.84rem;
  font-weight: 850;
  text-decoration: none;
  transition:
    transform 180ms ease,
    color 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.cosmos-xp-back:hover {
  transform: translateY(-1px);
  border-color: rgba(102, 227, 255, 0.34);
  background: rgba(102, 227, 255, 0.1);
  color: #ffffff;
}

.cosmos-xp-title-lockup {
  justify-self: center;
  text-align: center;
}

.cosmos-xp-title-lockup span {
  display: block;
  margin-bottom: 2px;
  color: var(--xp-cyan);
  font-size: 0.66rem;
  font-weight: 950;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.cosmos-xp-title-lockup strong {
  display: block;
  color: #ffffff;
  font-size: 0.94rem;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.cosmos-xp-controls {
  justify-self: end;
  display: flex;
  gap: 8px;
}

.cosmos-icon-btn {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--xp-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.065);
  color: #ffffff;
  font-weight: 950;
  transition:
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.cosmos-icon-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(102, 227, 255, 0.34);
  background: rgba(102, 227, 255, 0.1);
}

.cosmos-icon-btn[aria-pressed="true"] {
  border-color: rgba(185, 255, 122, 0.4);
  background: rgba(185, 255, 122, 0.12);
  color: var(--xp-lime);
  box-shadow: 0 0 26px rgba(185, 255, 122, 0.16);
}

/* =========================================================
   SCREEN SYSTEM
   ========================================================= */

.cosmos-xp-screen {
  position: relative;
  min-height: calc(100vh - 68px);
  padding: clamp(52px, 7vw, 92px) 0;
  animation: cosmosScreenIn 420ms ease both;
}

.cosmos-xp-screen[hidden] {
  display: none !important;
}

.cosmos-xp-screen.is-exiting {
  animation: cosmosScreenOut 240ms ease both;
}

@keyframes cosmosScreenIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.992);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes cosmosScreenOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  to {
    opacity: 0;
    transform: translateY(-10px) scale(0.994);
  }
}

.cosmos-xp-starfield {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.82;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.8) 0 1px, transparent 1px),
    radial-gradient(circle, rgba(255, 255, 255, 0.42) 0 1px, transparent 1px);
  background-position:
    0 0,
    28px 42px;
  background-size:
    86px 86px,
    132px 132px;
  mask-image: linear-gradient(to bottom, black, transparent 92%);
}

.cosmos-xp-start .cosmos-xp-shell,
.cosmos-xp-intro .cosmos-xp-shell,
.cosmos-xp-dashboard .cosmos-xp-shell,
.cosmos-xp-activity .cosmos-xp-shell,
.cosmos-xp-debrief .cosmos-xp-shell {
  position: relative;
  z-index: 5;
}

/* =========================================================
   BUTTONS
   ========================================================= */

.cosmos-xp-btn,
.cosmos-xp-card-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 900;
  text-decoration: none;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease,
    opacity 180ms ease;
}

.cosmos-xp-btn:hover,
.cosmos-xp-card-btn:hover {
  transform: translateY(-2px);
}

.cosmos-xp-btn.primary,
.cosmos-xp-card-btn {
  border: 1px solid rgba(255, 255, 255, 0.32);
  background:
    linear-gradient(135deg, rgba(102, 227, 255, 0.98), rgba(114, 167, 255, 0.98));
  color: #04101e;
  box-shadow: 0 20px 50px rgba(102, 227, 255, 0.22);
}

.cosmos-xp-btn.primary:hover,
.cosmos-xp-card-btn:hover {
  box-shadow: 0 24px 60px rgba(102, 227, 255, 0.32);
}

.cosmos-xp-btn.secondary {
  border: 1px solid var(--xp-line);
  background: rgba(255, 255, 255, 0.07);
  color: var(--xp-ink);
  backdrop-filter: blur(16px);
}

.cosmos-xp-btn.secondary:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.1);
}

.cosmos-xp-btn:disabled,
.cosmos-xp-card-btn:disabled {
  opacity: 0.48;
  transform: none;
  box-shadow: none;
}

/* =========================================================
   START SCREEN
   ========================================================= */

.cosmos-xp-start {
  overflow: hidden;
}

.cosmos-xp-start::before,
.cosmos-xp-start::after {
  content: "";
  position: absolute;
  z-index: 1;
  border-radius: 999px;
  pointer-events: none;
}

.cosmos-xp-start::before {
  top: 5%;
  right: -170px;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(102, 227, 255, 0.18), transparent 68%);
}

.cosmos-xp-start::after {
  left: -260px;
  bottom: -280px;
  width: 640px;
  height: 640px;
  background: radial-gradient(circle, rgba(255, 211, 110, 0.14), transparent 70%);
}

.cosmos-xp-start-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(340px, 0.98fr);
  gap: clamp(34px, 5vw, 76px);
  align-items: center;
}

.cosmos-xp-start-copy h1 {
  max-width: 780px;
  margin-bottom: 22px;
  font-size: clamp(3.15rem, 6.4vw, 5.95rem);
  line-height: 0.94;
  letter-spacing: -0.07em;
}

.cosmos-xp-deck {
  max-width: 690px;
  margin-bottom: 24px;
  color: var(--xp-muted);
  font-size: clamp(1.05rem, 1.7vw, 1.26rem);
  line-height: 1.68;
}

/* =========================================================
   BOOT PANEL
   ========================================================= */

.cosmos-boot-panel {
  max-width: 620px;
  margin-bottom: 28px;
  padding: 18px;
  border: 1px solid rgba(102, 227, 255, 0.24);
  border-radius: 22px;
  background:
    radial-gradient(circle at 8% 18%, rgba(102, 227, 255, 0.13), transparent 34%),
    rgba(255, 255, 255, 0.06);
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
}

.cosmos-boot-panel p {
  margin-bottom: 13px;
  color: var(--xp-cyan);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.cosmos-boot-panel ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cosmos-boot-panel li {
  display: flex;
  gap: 10px;
  align-items: center;
  color: #ffffff;
  font-size: 0.94rem;
  font-weight: 850;
  opacity: 0;
  transform: translateY(8px);
  animation: cosmosBootLine 520ms ease forwards;
}

.cosmos-boot-panel li:nth-child(1) {
  animation-delay: 260ms;
}

.cosmos-boot-panel li:nth-child(2) {
  animation-delay: 620ms;
}

.cosmos-boot-panel li:nth-child(3) {
  animation-delay: 980ms;
}

.cosmos-boot-panel li:nth-child(4) {
  animation-delay: 1340ms;
}

.cosmos-boot-panel li span {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--xp-lime);
  box-shadow: 0 0 18px rgba(185, 255, 122, 0.74);
}

.cosmos-boot-panel li:nth-child(2) span {
  background: var(--xp-gold);
  box-shadow: 0 0 18px rgba(255, 211, 110, 0.74);
}

@keyframes cosmosBootLine {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cosmos-xp-start-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  margin-bottom: 28px;
}

.cosmos-xp-status-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, max-content));
  gap: 12px;
}

.cosmos-xp-status-strip div {
  min-width: 132px;
  padding: 13px 14px;
  border: 1px solid var(--xp-line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.065);
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 850;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(18px);
}

.cosmos-xp-status-strip span {
  display: block;
  margin-bottom: 4px;
  color: var(--xp-muted);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.cosmos-xp-hero-card {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  border: 1px solid var(--xp-line);
  border-radius: var(--xp-radius-xl);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.045)),
    var(--xp-panel);
  box-shadow: var(--xp-shadow);
  backdrop-filter: blur(24px);
}

.cosmos-xp-hero-card figure {
  position: absolute;
  inset: 0;
  margin: 0;
}

.cosmos-xp-hero-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  filter: saturate(1.08) contrast(1.04);
}

.cosmos-xp-hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(5, 8, 22, 0.08), rgba(5, 8, 22, 0.68)),
    radial-gradient(circle at 50% 18%, transparent 0 42%, rgba(5, 8, 22, 0.34) 100%);
  pointer-events: none;
}

.cosmos-xp-hero-card::after {
  content: "";
  position: absolute;
  inset: 16px;
  z-index: 3;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 26px;
  pointer-events: none;
}

.cosmos-xp-hero-overlay {
  position: absolute;
  right: 24px;
  bottom: 24px;
  left: 24px;
  z-index: 4;
  padding: 22px;
  border: 1px solid var(--xp-line);
  border-radius: 24px;
  background: rgba(5, 8, 22, 0.58);
  backdrop-filter: blur(18px);
}

.cosmos-xp-hero-overlay p {
  margin-bottom: 8px;
  color: var(--xp-cyan);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.cosmos-xp-hero-overlay h2 {
  margin-bottom: 10px;
  font-size: clamp(1.8rem, 3.6vw, 3rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.cosmos-xp-hero-overlay span {
  display: block;
  color: var(--xp-muted);
  font-size: 0.98rem;
  line-height: 1.52;
}

/* =========================================================
   CAPTAIN INTRO
   ========================================================= */

.cosmos-xp-intro-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.94fr) minmax(0, 1.06fr);
  gap: clamp(28px, 5vw, 70px);
  align-items: center;
}

.cosmos-xp-captain-stage {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  border: 1px solid var(--xp-line);
  border-radius: var(--xp-radius-xl);
  background:
    radial-gradient(circle at 50% 28%, rgba(255, 211, 110, 0.18), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.045)),
    var(--xp-panel);
  box-shadow: var(--xp-shadow);
}

.cosmos-xp-captain-stage figure {
  position: absolute;
  inset: 0;
  margin: 0;
}

.cosmos-xp-captain-stage img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  filter: saturate(1.05) contrast(1.04);
}

.cosmos-xp-captain-stage::before {
  content: "";
  position: absolute;
  inset: 28px;
  z-index: 2;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  pointer-events: none;
  transform: rotate(-10deg);
}

.cosmos-xp-transmission-badge {
  position: absolute;
  left: 24px;
  bottom: 24px;
  z-index: 3;
  padding: 9px 11px;
  border: 1px solid rgba(255, 211, 110, 0.32);
  border-radius: 999px;
  background: rgba(5, 8, 22, 0.58);
  color: var(--xp-gold);
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  backdrop-filter: blur(12px);
}

.cosmos-xp-dialogue-panel {
  position: relative;
  overflow: hidden;
  padding: clamp(26px, 5vw, 54px);
  border: 1px solid var(--xp-line);
  border-radius: var(--xp-radius-xl);
  background:
    radial-gradient(circle at 90% 10%, rgba(102, 227, 255, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.045));
  box-shadow: var(--xp-shadow);
}

.cosmos-xp-dialogue-panel h2 {
  max-width: 720px;
  margin-bottom: 18px;
  font-size: clamp(2rem, 4.3vw, 4rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.cosmos-xp-dialogue {
  display: grid;
  gap: 14px;
  margin-bottom: 22px;
}

.cosmos-xp-dialogue p {
  margin-bottom: 0;
  color: var(--xp-muted);
  font-size: 1.03rem;
  line-height: 1.7;
}

.cosmos-xp-dialogue p[data-cosmos-typewriter] {
  min-height: 1.7em;
}

.cosmos-xp-dialogue p.is-typing::after {
  content: "▌";
  display: inline-block;
  margin-left: 3px;
  color: var(--xp-cyan);
  animation: cosmosCursorBlink 700ms steps(1) infinite;
}

@keyframes cosmosCursorBlink {
  50% {
    opacity: 0;
  }
}

.cosmos-xp-briefing-card {
  margin-bottom: 26px;
  padding: 18px;
  border: 1px solid rgba(255, 211, 110, 0.3);
  border-radius: 22px;
  background:
    radial-gradient(circle at 4% 10%, rgba(255, 211, 110, 0.14), transparent 32%),
    rgba(255, 211, 110, 0.07);
}

.cosmos-xp-briefing-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--xp-gold);
  font-size: 0.7rem;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.cosmos-xp-briefing-card strong {
  display: block;
  color: #fff7da;
  font-size: 1.02rem;
  line-height: 1.48;
}

/* =========================================================
   DASHBOARD
   ========================================================= */

.cosmos-xp-dashboard-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
  align-items: end;
  margin-bottom: 28px;
}

.cosmos-xp-dashboard-header h2 {
  max-width: 760px;
  margin-bottom: 16px;
  font-size: clamp(2rem, 4.3vw, 4rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.cosmos-xp-dashboard-header p {
  max-width: 780px;
  margin-bottom: 0;
  color: var(--xp-muted);
  font-size: 1.03rem;
  line-height: 1.7;
}

.cosmos-xp-progress-card {
  padding: 18px;
  border: 1px solid var(--xp-line);
  border-radius: var(--xp-radius-lg);
  background: rgba(255, 255, 255, 0.065);
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
}

.cosmos-xp-progress-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--xp-muted);
  font-size: 0.7rem;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.cosmos-xp-progress-card strong {
  display: block;
  margin-bottom: 12px;
  color: #ffffff;
  font-size: 2rem;
  line-height: 1;
  letter-spacing: -0.06em;
}

.cosmos-xp-progress-track {
  overflow: hidden;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.cosmos-xp-progress-track i {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--xp-cyan), var(--xp-lime));
  box-shadow: 0 0 28px rgba(102, 227, 255, 0.42);
  transition: width 320ms ease;
}

.cosmos-xp-mission-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.cosmos-xp-mission-card {
  position: relative;
  overflow: hidden;
  min-height: 330px;
  padding: 20px;
  border: 1px solid var(--xp-line);
  border-radius: var(--xp-radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.095), rgba(255, 255, 255, 0.04)),
    rgba(255, 255, 255, 0.045);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(18px);
  opacity: 0;
  transform: translateY(18px);
  animation: cosmosCardPop 520ms ease forwards;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    opacity 180ms ease;
}

.cosmos-xp-mission-card:nth-child(1) {
  animation-delay: 80ms;
}

.cosmos-xp-mission-card:nth-child(2) {
  animation-delay: 180ms;
}

.cosmos-xp-mission-card:nth-child(3) {
  animation-delay: 280ms;
}

.cosmos-xp-mission-card:nth-child(4) {
  animation-delay: 380ms;
}

.cosmos-xp-mission-card:nth-child(5) {
  animation-delay: 480ms;
}

@keyframes cosmosCardPop {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cosmos-xp-mission-card::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -120px;
  width: 230px;
  height: 230px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(102, 227, 255, 0.14), transparent 68%);
  pointer-events: none;
}

.cosmos-xp-mission-card:hover {
  border-color: rgba(102, 227, 255, 0.35);
  transform: translateY(-5px);
}

.cosmos-xp-mission-card.is-open {
  background:
    radial-gradient(circle at 80% 0%, rgba(185, 255, 122, 0.15), transparent 34%),
    linear-gradient(180deg, rgba(102, 227, 255, 0.15), rgba(255, 255, 255, 0.055)),
    rgba(255, 255, 255, 0.055);
}

.cosmos-xp-mission-card.is-locked {
  opacity: 0.66;
}

.cosmos-xp-card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 32px;
}

.cosmos-xp-card-topline span,
.cosmos-xp-card-topline strong {
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.cosmos-xp-card-topline span {
  color: var(--xp-muted);
}

.cosmos-xp-card-topline strong {
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: var(--xp-lime);
  background: rgba(185, 255, 122, 0.1);
}

.cosmos-xp-mission-card.is-locked .cosmos-xp-card-topline strong {
  color: rgba(226, 232, 240, 0.68);
  background: rgba(255, 255, 255, 0.06);
}

.cosmos-xp-mission-card h3 {
  margin-bottom: 12px;
  font-size: clamp(1.28rem, 1.8vw, 1.58rem);
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.cosmos-xp-mission-card p {
  margin-bottom: 22px;
  color: var(--xp-muted);
  font-size: 0.93rem;
  line-height: 1.58;
}

.cosmos-xp-card-btn {
  width: 100%;
  margin-top: auto;
}

/* =========================================================
   MISSION PATCH BADGES
   ========================================================= */

.cosmos-badges {
  position: relative;
  margin-top: clamp(2rem, 4vw, 3rem);
  padding: clamp(1.4rem, 3vw, 2rem);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 34px;
  background:
    radial-gradient(circle at 12% 0%, rgba(102, 227, 255, 0.14), transparent 36%),
    radial-gradient(circle at 88% 10%, rgba(255, 211, 110, 0.11), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025)),
    rgba(5, 8, 22, 0.58);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 30px 80px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.cosmos-badges::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: radial-gradient(circle at 50% 20%, black, transparent 72%);
  opacity: 0.5;
  pointer-events: none;
}

.cosmos-badges-copy {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin-bottom: clamp(1.4rem, 3vw, 2rem);
}

.cosmos-badges-copy h2 {
  margin: 0 0 0.6rem;
  color: #f8fbff;
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  line-height: 0.92;
  letter-spacing: -0.075em;
}

.cosmos-badges-copy p:not(.cosmos-xp-eyebrow) {
  max-width: 780px;
  margin: 0;
  color: rgba(248, 251, 255, 0.82);
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  line-height: 1.65;
}

.cosmos-badge-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(0.9rem, 1.4vw, 1.2rem);
}

.cosmos-badge {
  position: relative;
  min-height: 286px;
  padding: 1.1rem 1rem 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 30px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.11), transparent 48%),
    linear-gradient(180deg, rgba(18, 32, 62, 0.92), rgba(8, 13, 30, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 24px 58px rgba(0, 0, 0, 0.32);
  text-align: center;
  overflow: hidden;
  transform: translateZ(0);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.cosmos-badge::before {
  content: "";
  position: absolute;
  inset: -40% -30% auto;
  height: 72%;
  background: radial-gradient(circle, var(--badge-glow, rgba(102, 227, 255, 0.22)), transparent 62%);
  opacity: 0.9;
  pointer-events: none;
}

.cosmos-badge::after {
  content: "";
  position: absolute;
  inset: auto 1rem 1rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  pointer-events: none;
}

.cosmos-badge.is-earned {
  border-color: rgba(185, 255, 122, 0.44);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.11),
    0 0 0 1px rgba(185, 255, 122, 0.08),
    0 24px 58px rgba(0, 0, 0, 0.32),
    0 0 38px rgba(185, 255, 122, 0.12);
}

.cosmos-badge:hover {
  transform: translateY(-4px);
  border-color: rgba(102, 227, 255, 0.32);
}

.cosmos-patch {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 138px;
  height: 138px;
  margin: 0 auto 0.95rem;
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.035)),
    linear-gradient(135deg, var(--badge-a), var(--badge-b));
  clip-path: polygon(
    50% 0%,
    84% 13%,
    100% 50%,
    84% 87%,
    50% 100%,
    16% 87%,
    0% 50%,
    16% 13%
  );
  box-shadow:
    inset 0 0 0 7px rgba(255, 255, 255, 0.12),
    inset 0 0 0 10px rgba(5, 8, 22, 0.28),
    0 22px 42px rgba(0, 0, 0, 0.34);
}

.cosmos-patch::before {
  content: "";
  position: absolute;
  inset: 13px;
  border: 1px dashed rgba(255, 255, 255, 0.34);
  clip-path: inherit;
}

.cosmos-patch::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.58), transparent 16%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.24), transparent 38%);
  mix-blend-mode: screen;
  opacity: 0.75;
  pointer-events: none;
}

.cosmos-patch svg {
  position: relative;
  z-index: 1;
  width: 88px;
  height: 88px;
  overflow: visible;
}

.patch-orbit,
.patch-signal {
  fill: none;
  stroke: rgba(248, 251, 255, 0.88);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.patch-rocket,
.patch-planet,
.patch-gear,
.patch-earth {
  fill: rgba(248, 251, 255, 0.9);
}

.patch-window {
  fill: rgba(5, 8, 22, 0.72);
}

.patch-flame,
.patch-moon,
.patch-land,
.patch-check,
.patch-star {
  fill: var(--badge-accent);
}

.patch-check {
  fill: none;
  stroke: var(--badge-accent);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cosmos-badge-status {
  position: relative;
  z-index: 1;
  width: fit-content;
  margin: 0 auto 0.7rem;
  padding: 0.33rem 0.62rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: rgba(248, 251, 255, 0.68);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.cosmos-badge.is-earned .cosmos-badge-status {
  border-color: rgba(185, 255, 122, 0.46);
  background: rgba(185, 255, 122, 0.1);
  color: #b9ff7a;
}

.cosmos-badge h3 {
  position: relative;
  z-index: 1;
  margin: 0 0 0.35rem;
  color: #f8fbff;
  font-size: 1.08rem;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.cosmos-badge > p:last-child {
  position: relative;
  z-index: 1;
  margin: 0;
  color: rgba(248, 251, 255, 0.76);
  font-size: 0.92rem;
  line-height: 1.35;
}

.badge-launch {
  --badge-a: rgba(185, 255, 122, 0.95);
  --badge-b: rgba(102, 227, 255, 0.84);
  --badge-accent: #06101f;
  --badge-glow: rgba(185, 255, 122, 0.24);
}

.badge-signal {
  --badge-a: rgba(102, 227, 255, 0.92);
  --badge-b: rgba(114, 167, 255, 0.72);
  --badge-accent: #ffd36e;
  --badge-glow: rgba(102, 227, 255, 0.24);
}

.badge-orbit {
  --badge-a: rgba(114, 167, 255, 0.95);
  --badge-b: rgba(255, 135, 200, 0.72);
  --badge-accent: #66e3ff;
  --badge-glow: rgba(114, 167, 255, 0.24);
}

.badge-systems {
  --badge-a: rgba(255, 211, 110, 0.92);
  --badge-b: rgba(102, 227, 255, 0.76);
  --badge-accent: #06101f;
  --badge-glow: rgba(255, 211, 110, 0.2);
}

.badge-reentry {
  --badge-a: rgba(255, 211, 110, 0.95);
  --badge-b: rgba(185, 255, 122, 0.8);
  --badge-accent: #06101f;
  --badge-glow: rgba(255, 211, 110, 0.2);
}

.cosmos-badge:not(.is-earned) .cosmos-patch {
  filter: saturate(0.52) brightness(0.68);
  opacity: 0.78;
}

.cosmos-badge:not(.is-earned) .cosmos-patch svg {
  opacity: 0.82;
}

/* =========================================================
   ACTIVITIES
   ========================================================= */

.cosmos-xp-activity-grid,
.cosmos-xp-systems-grid,
.cosmos-xp-practice-grid,
.cosmos-xp-feedback-grid,
.cosmos-xp-evidence-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.cosmos-xp-side-panel,
.cosmos-xp-activity-panel,
.cosmos-xp-debrief-panel,
.cosmos-xp-celebration-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--xp-line);
  border-radius: var(--xp-radius-xl);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.045)),
    rgba(255, 255, 255, 0.045);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(18px);
}

.cosmos-xp-side-panel {
  position: sticky;
  top: 92px;
  padding: 18px;
}

.cosmos-xp-side-panel h2 {
  margin-bottom: 18px;
  font-size: 1.55rem;
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.cosmos-xp-mini-progress {
  margin-bottom: 16px;
}

.cosmos-xp-mini-progress span {
  display: block;
  margin-bottom: 8px;
  color: var(--xp-muted);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.cosmos-xp-mini-progress div {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.cosmos-xp-mini-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--xp-cyan), var(--xp-lime));
}

.cosmos-xp-side-panel figure {
  overflow: hidden;
  margin: 0 0 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.06);
}

.cosmos-xp-side-panel img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 0.82;
  object-fit: cover;
  object-position: center 42%;
}

.cosmos-xp-captain-note {
  margin-bottom: 0;
  padding: 16px;
  border: 1px solid rgba(255, 211, 110, 0.28);
  border-radius: 18px;
  background: rgba(255, 211, 110, 0.07);
  color: #fff7da;
  font-size: 0.95rem;
  line-height: 1.58;
}

.cosmos-xp-activity-panel {
  padding: clamp(24px, 4.8vw, 52px);
}

.cosmos-xp-activity-panel h2 {
  max-width: 860px;
  margin-bottom: 16px;
  font-size: clamp(2rem, 4.2vw, 3.85rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.cosmos-xp-instruction {
  max-width: 780px;
  margin-bottom: 24px;
  color: var(--xp-muted);
  font-size: 1.03rem;
  line-height: 1.65;
}

.cosmos-xp-scenario-card {
  margin-bottom: 24px;
  padding: clamp(20px, 3.4vw, 30px);
  border: 1px solid rgba(255, 211, 110, 0.32);
  border-radius: 24px;
  background:
    radial-gradient(circle at 4% 10%, rgba(255, 211, 110, 0.16), transparent 30%),
    rgba(255, 211, 110, 0.08);
}

.cosmos-xp-scenario-card span {
  display: block;
  margin-bottom: 10px;
  color: var(--xp-gold);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.cosmos-xp-scenario-card p {
  margin-bottom: 0;
  color: #fff7da;
  font-size: clamp(1.1rem, 2.1vw, 1.45rem);
  line-height: 1.52;
  letter-spacing: -0.02em;
}

.cosmos-xp-choice-grid,
.cosmos-xp-choice-stack,
.cosmos-xp-multi-grid {
  display: grid;
  gap: 14px;
}

.cosmos-xp-choice-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}

.cosmos-xp-choice,
.cosmos-xp-token {
  position: relative;
  overflow: hidden;
  display: block;
  width: 100%;
  border: 1px solid var(--xp-line);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.04)),
    rgba(255, 255, 255, 0.045);
  color: #ffffff;
  text-align: left;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.cosmos-xp-choice {
  min-height: 190px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
}

.cosmos-xp-choice:hover,
.cosmos-xp-token:hover {
  transform: translateY(-3px);
  border-color: rgba(102, 227, 255, 0.34);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.115), rgba(255, 255, 255, 0.055)),
    rgba(255, 255, 255, 0.055);
}

.cosmos-xp-choice.is-selected,
.cosmos-xp-token.is-selected {
  border-color: rgba(102, 227, 255, 0.62);
  background:
    radial-gradient(circle at 80% 0%, rgba(102, 227, 255, 0.16), transparent 40%),
    rgba(102, 227, 255, 0.1);
  box-shadow:
    0 0 0 4px rgba(102, 227, 255, 0.12),
    0 24px 64px rgba(0, 0, 0, 0.22);
}

.cosmos-xp-choice.is-correct {
  border-color: rgba(185, 255, 122, 0.64);
  background:
    radial-gradient(circle at 80% 0%, rgba(185, 255, 122, 0.18), transparent 40%),
    rgba(185, 255, 122, 0.1);
}

.cosmos-xp-choice.is-incorrect {
  border-color: rgba(255, 107, 138, 0.48);
  animation: cosmosWarningWobble 300ms ease both;
}

@keyframes cosmosWarningWobble {
  0%, 100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-4px);
  }

  50% {
    transform: translateX(4px);
  }

  75% {
    transform: translateX(-2px);
  }
}

.cosmos-xp-choice > span {
  position: relative;
  z-index: 1;
  display: inline-grid;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  margin-bottom: 28px;
  place-items: center;
  border: 1px solid rgba(102, 227, 255, 0.34);
  border-radius: 12px;
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.18), transparent 40%),
    rgba(102, 227, 255, 0.12);
  color: var(--xp-cyan);
  font-size: 0.82rem;
  font-weight: 950;
  box-shadow: 0 0 18px rgba(102, 227, 255, 0.12);
}

.cosmos-xp-choice strong {
  position: relative;
  z-index: 1;
  display: block;
  flex: 0 0 auto;
  max-width: 16ch;
  margin-bottom: 10px;
  color: #ffffff;
  font-size: clamp(1.02rem, 1.25vw, 1.16rem);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.cosmos-xp-choice em {
  position: relative;
  z-index: 1;
  display: block;
  flex: 0 0 auto;
  max-width: 22ch;
  color: rgba(226, 232, 240, 0.76);
  font-size: 0.94rem;
  font-style: normal;
  line-height: 1.45;
}

.cosmos-xp-choice::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0;
  background:
    radial-gradient(circle at 18% 14%, rgba(102, 227, 255, 0.16), transparent 34%),
    radial-gradient(circle at 86% 88%, rgba(255, 211, 110, 0.09), transparent 38%);
  transition: opacity 180ms ease;
  pointer-events: none;
}

.cosmos-xp-choice:hover::before,
.cosmos-xp-choice.is-selected::before {
  opacity: 1;
}

.cosmos-xp-choice.horizontal {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 16px;
  min-height: 0;
  padding: 18px;
}

.cosmos-xp-choice.horizontal > span {
  margin-bottom: 0;
}

.cosmos-xp-choice.horizontal strong,
.cosmos-xp-choice.horizontal em {
  max-width: none;
}

.cosmos-xp-multi-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cosmos-xp-token {
  min-height: 88px;
  padding: 18px;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.25;
}

.cosmos-xp-token[data-cosmos-token="quiz"].is-selected,
.cosmos-xp-token[data-cosmos-system-token="pig"].is-selected {
  border-color: rgba(255, 107, 138, 0.52);
  background:
    radial-gradient(circle at 80% 0%, rgba(255, 107, 138, 0.14), transparent 40%),
    rgba(255, 107, 138, 0.08);
}

.cosmos-xp-feedback-panel {
  margin-top: 24px;
  padding: 18px;
  border: 1px solid rgba(255, 211, 110, 0.32);
  border-radius: 22px;
  background:
    radial-gradient(circle at 4% 10%, rgba(255, 211, 110, 0.16), transparent 30%),
    rgba(255, 211, 110, 0.08);
  animation: cosmosFeedbackIn 260ms ease both;
}

@keyframes cosmosFeedbackIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cosmos-xp-feedback-panel p {
  margin-bottom: 8px;
  color: var(--xp-gold);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.cosmos-xp-feedback-panel strong {
  display: block;
  color: #fff7da;
  font-size: 1rem;
  line-height: 1.55;
}

.cosmos-xp-activity-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  margin-top: 26px;
}

/* =========================================================
   FEEDBACK BURST
   ========================================================= */

.cosmos-feedback-burst {
  position: sticky;
  top: 68px;
  z-index: 29;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  width: max-content;
  max-width: calc(100% - 32px);
  min-height: 38px;
  margin: 0 auto;
  padding: 9px 16px;
  border: 1px solid rgba(102, 227, 255, 0.32);
  border-top: 0;
  border-radius: 0 0 999px 999px;
  background: rgba(5, 8, 22, 0.84);
  color: #ffffff;
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
  pointer-events: none;
}

.cosmos-feedback-burst[hidden] {
  display: none !important;
}

.cosmos-feedback-burst.is-visible {
  animation: cosmosStickyBurst 1150ms ease both;
}

.cosmos-feedback-burst span {
  color: var(--xp-cyan);
  font-size: 1rem;
  line-height: 1;
}

.cosmos-feedback-burst strong {
  font-size: 0.74rem;
  font-weight: 950;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
}

@keyframes cosmosStickyBurst {
  0% {
    opacity: 0;
    transform: translateY(-12px);
  }

  16% {
    opacity: 1;
    transform: translateY(0);
  }

  72% {
    opacity: 1;
    transform: translateY(0);
  }

  100% {
    opacity: 0;
    transform: translateY(-8px);
  }
}

/* =========================================================
   DEBRIEF
   ========================================================= */

.cosmos-xp-debrief-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.85fr);
  gap: 18px;
  align-items: stretch;
}

.cosmos-xp-debrief-panel {
  padding: clamp(26px, 5vw, 56px);
}

.cosmos-xp-debrief-panel h2 {
  max-width: 800px;
  margin-bottom: 16px;
  font-size: clamp(2.2rem, 5vw, 4.8rem);
  line-height: 0.96;
  letter-spacing: -0.068em;
}

.cosmos-xp-debrief-panel > p {
  max-width: 780px;
  margin-bottom: 26px;
  color: var(--xp-muted);
  font-size: 1.06rem;
  line-height: 1.7;
}

.cosmos-xp-score-card,
.cosmos-xp-debrief-output {
  margin-bottom: 18px;
  padding: 20px;
  border: 1px solid var(--xp-line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.06);
}

.cosmos-xp-score-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--xp-cyan);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.cosmos-xp-score-card strong {
  display: block;
  margin-bottom: 8px;
  color: #ffffff;
  font-size: 2.4rem;
  line-height: 1;
  letter-spacing: -0.06em;
}

.cosmos-xp-score-card p,
.cosmos-xp-debrief-output p {
  margin-bottom: 0;
  color: var(--xp-muted);
  line-height: 1.6;
}

.cosmos-xp-debrief-output h3 {
  margin-bottom: 10px;
  color: #ffffff;
  font-size: 1.35rem;
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.cosmos-xp-celebration-card {
  display: grid;
  align-content: end;
  min-height: 620px;
}

.cosmos-xp-celebration-card figure {
  position: absolute;
  inset: 0;
  margin: 0;
}

.cosmos-xp-celebration-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.cosmos-xp-celebration-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(5, 8, 22, 0.05), rgba(5, 8, 22, 0.72)),
    radial-gradient(circle at 50% 20%, transparent 0 40%, rgba(5, 8, 22, 0.3) 100%);
  pointer-events: none;
}

.cosmos-xp-celebration-card > div {
  position: relative;
  z-index: 3;
  margin: 24px;
  padding: 22px;
  border: 1px solid var(--xp-line);
  border-radius: 24px;
  background: rgba(5, 8, 22, 0.58);
  backdrop-filter: blur(18px);
}

.cosmos-xp-celebration-card p {
  margin-bottom: 8px;
  color: var(--xp-gold);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.cosmos-xp-celebration-card h3 {
  margin-bottom: 0;
  color: #fff7da;
  font-size: 1.35rem;
  line-height: 1.18;
  letter-spacing: -0.045em;
}

/* =========================================================
   MISSION 02 — SYSTEMS SCAN RADAR
   ========================================================= */

.cosmos-scan-console {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  margin-top: 28px;
  border: 1px solid rgba(102, 227, 255, 0.2);
  border-radius: 30px;
  background:
    radial-gradient(circle at 50% 50%, rgba(102, 227, 255, 0.16), transparent 0 18%, rgba(102, 227, 255, 0.08) 19%, transparent 38%),
    radial-gradient(circle at 20% 20%, rgba(255, 211, 110, 0.1), transparent 34%),
    radial-gradient(circle at 82% 78%, rgba(255, 135, 200, 0.1), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.035));
  box-shadow:
    inset 0 0 80px rgba(102, 227, 255, 0.08),
    0 24px 70px rgba(0, 0, 0, 0.24);
}

.cosmos-scan-console::before {
  content: "";
  position: absolute;
  inset: 22px;
  border: 1px solid rgba(102, 227, 255, 0.13);
  border-radius: 24px;
  pointer-events: none;
}

.cosmos-scan-console::after {
  content: "SYSTEMS RADAR";
  position: absolute;
  left: 26px;
  top: 24px;
  color: rgba(102, 227, 255, 0.72);
  font-size: 0.7rem;
  font-weight: 950;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.cosmos-radar {
  position: absolute;
  inset: 50%;
  width: min(430px, 72vw);
  height: min(430px, 72vw);
  border-radius: 999px;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(circle, rgba(102, 227, 255, 0.18) 0 5px, transparent 6px),
    radial-gradient(circle, rgba(102, 227, 255, 0.08), transparent 66%);
  box-shadow:
    inset 0 0 70px rgba(102, 227, 255, 0.12),
    0 0 70px rgba(102, 227, 255, 0.08);
}

.cosmos-radar-ring {
  position: absolute;
  inset: 50%;
  border: 1px solid rgba(102, 227, 255, 0.18);
  border-radius: 999px;
  transform: translate(-50%, -50%);
}

.cosmos-radar-ring.ring-one {
  width: 34%;
  height: 34%;
}

.cosmos-radar-ring.ring-two {
  width: 62%;
  height: 62%;
}

.cosmos-radar-ring.ring-three {
  width: 90%;
  height: 90%;
}

.cosmos-radar-sweep {
  position: absolute;
  inset: 50%;
  width: 50%;
  height: 50%;
  transform-origin: 0 0;
  background: conic-gradient(
    from 0deg,
    rgba(102, 227, 255, 0.34),
    rgba(102, 227, 255, 0.08),
    transparent 44deg
  );
  border-radius: 0 999px 0 0;
  animation: cosmosRadarSweep 3.8s linear infinite;
}

.cosmos-radar-core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--xp-cyan);
  box-shadow:
    0 0 18px rgba(102, 227, 255, 0.8),
    0 0 44px rgba(102, 227, 255, 0.36);
  transform: translate(-50%, -50%);
}

@keyframes cosmosRadarSweep {
  to {
    transform: rotate(360deg);
  }
}

.cosmos-scan-node {
  position: absolute;
  z-index: 4;
  display: inline-flex;
  gap: 9px;
  align-items: center;
  min-height: 40px;
  padding: 9px 13px 9px 10px;
  border: 1px solid rgba(102, 227, 255, 0.3);
  border-radius: 999px;
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.16), transparent 34%),
    rgba(5, 8, 22, 0.72);
  color: #ffffff;
  box-shadow:
    0 0 28px rgba(102, 227, 255, 0.12),
    0 18px 42px rgba(0, 0, 0, 0.22);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  backdrop-filter: blur(16px);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.cosmos-scan-node:hover {
  transform: translateY(-3px) scale(1.02);
  border-color: rgba(102, 227, 255, 0.68);
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.2), transparent 34%),
    rgba(13, 28, 58, 0.86);
  box-shadow:
    0 0 34px rgba(102, 227, 255, 0.22),
    0 22px 54px rgba(0, 0, 0, 0.28);
}

.cosmos-scan-node.is-scanned {
  border-color: rgba(185, 255, 122, 0.55);
  background:
    radial-gradient(circle at 18% 20%, rgba(185, 255, 122, 0.16), transparent 34%),
    rgba(10, 38, 34, 0.82);
}

.cosmos-scan-node span {
  display: block;
  width: 13px;
  height: 13px;
  border-radius: 999px;
  background: var(--xp-cyan);
  box-shadow: 0 0 18px rgba(102, 227, 255, 0.72);
}

.cosmos-scan-node.is-scanned span {
  background: var(--xp-lime);
  box-shadow: 0 0 18px rgba(185, 255, 122, 0.72);
}

.node-manager {
  top: 18%;
  left: 12%;
}

.node-tools {
  top: 18%;
  right: 12%;
}

.node-criteria {
  top: 45%;
  left: 8%;
}

.node-practice {
  top: 45%;
  right: 8%;
}

.node-incentives {
  bottom: 18%;
  left: 16%;
}

.node-feedback {
  bottom: 18%;
  right: 16%;
}

.node-pig {
  left: 50%;
  top: 50%;
  border-color: rgba(255, 135, 200, 0.48);
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 135, 200, 0.2), transparent 34%),
    rgba(42, 14, 38, 0.76);
  transform: translate(-50%, -50%);
}

.node-pig:hover {
  transform: translate(-50%, -50%) scale(1.04);
  border-color: rgba(255, 135, 200, 0.72);
}

.node-pig span {
  background: var(--xp-pink);
  box-shadow: 0 0 18px rgba(255, 135, 200, 0.72);
}

.cosmos-scan-readout {
  margin-top: 22px;
  padding: 20px;
  border: 1px solid rgba(255, 211, 110, 0.32);
  border-radius: 24px;
  background:
    radial-gradient(circle at 6% 12%, rgba(255, 211, 110, 0.16), transparent 34%),
    rgba(255, 211, 110, 0.07);
  animation: cosmosFeedbackIn 260ms ease both;
}

.cosmos-scan-readout p {
  margin-bottom: 8px;
  color: var(--xp-gold);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.cosmos-scan-readout h3 {
  margin-bottom: 10px;
  color: #ffffff;
  font-size: 1.45rem;
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.cosmos-scan-readout strong {
  display: block;
  max-width: 840px;
  color: #fff7da;
  font-size: 1rem;
  font-weight: 750;
  line-height: 1.6;
}

/* =========================================================
   MISSION 03 — PRACTICE ORBIT
   ========================================================= */

.cosmos-practice-briefing {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 26px 0 24px;
}

.cosmos-practice-briefing div {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border: 1px solid rgba(102, 227, 255, 0.22);
  border-radius: 22px;
  background:
    radial-gradient(circle at 8% 14%, rgba(102, 227, 255, 0.12), transparent 34%),
    rgba(255, 255, 255, 0.055);
}

.cosmos-practice-briefing div:nth-child(2) {
  border-color: rgba(255, 211, 110, 0.26);
  background:
    radial-gradient(circle at 8% 14%, rgba(255, 211, 110, 0.13), transparent 34%),
    rgba(255, 255, 255, 0.055);
}

.cosmos-practice-briefing span {
  display: block;
  margin-bottom: 8px;
  color: var(--xp-cyan);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.cosmos-practice-briefing div:nth-child(2) span {
  color: var(--xp-gold);
}

.cosmos-practice-briefing p {
  margin-bottom: 0;
  color: var(--xp-muted);
  font-size: 0.98rem;
  line-height: 1.62;
}

.cosmos-professor-cameo,
.cosmos-truffles-cameo,
.cosmos-snort-cameo {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin-top: 24px;
  padding: 16px;
  border: 1px solid rgba(255, 135, 200, 0.32);
  border-radius: 24px;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 135, 200, 0.16), transparent 34%),
    rgba(255, 135, 200, 0.07);
  animation: cosmosPigCameoIn 320ms ease both;
}

.cosmos-truffles-cameo {
  border-color: rgba(255, 211, 110, 0.34);
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 211, 110, 0.15), transparent 34%),
    rgba(255, 211, 110, 0.07);
}

@keyframes cosmosPigCameoIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.cosmos-professor-cameo figure,
.cosmos-truffles-cameo figure,
.cosmos-snort-cameo figure {
  position: relative;
  overflow: hidden;
  min-height: 140px;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.055);
}

.cosmos-professor-cameo img,
.cosmos-truffles-cameo img,
.cosmos-snort-cameo img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.cosmos-professor-cameo p,
.cosmos-truffles-cameo p,
.cosmos-snort-cameo p {
  margin-bottom: 7px;
  color: var(--xp-pink);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.cosmos-truffles-cameo p {
  color: var(--xp-gold);
}

.cosmos-professor-cameo h3,
.cosmos-truffles-cameo h3,
.cosmos-snort-cameo h3 {
  margin-bottom: 8px;
  color: #ffffff;
  font-size: clamp(1.2rem, 2vw, 1.65rem);
  line-height: 1.1;
  letter-spacing: -0.045em;
}

.cosmos-professor-cameo strong,
.cosmos-truffles-cameo strong,
.cosmos-snort-cameo strong {
  display: block;
  color: var(--xp-muted);
  font-size: 0.94rem;
  line-height: 1.5;
}

.cosmos-practice-builder {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: stretch;
  margin-top: 28px;
}

.cosmos-practice-pieces {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.cosmos-orbit-stage {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  border: 1px solid rgba(102, 227, 255, 0.22);
  border-radius: 30px;
  background:
    radial-gradient(circle at 50% 50%, rgba(102, 227, 255, 0.16), transparent 0 18%, rgba(102, 227, 255, 0.08) 19%, transparent 38%),
    radial-gradient(circle at 18% 22%, rgba(255, 135, 200, 0.1), transparent 34%),
    radial-gradient(circle at 82% 78%, rgba(255, 211, 110, 0.1), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.035));
  box-shadow:
    inset 0 0 80px rgba(102, 227, 255, 0.08),
    0 24px 70px rgba(0, 0, 0, 0.24);
}

.cosmos-orbit-stage::before {
  content: "ORBIT BUILDER";
  position: absolute;
  left: 24px;
  top: 22px;
  z-index: 4;
  color: rgba(102, 227, 255, 0.72);
  font-size: 0.7rem;
  font-weight: 950;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.cosmos-orbit-stage::after {
  content: "";
  position: absolute;
  inset: 22px;
  z-index: 1;
  border: 1px solid rgba(102, 227, 255, 0.12);
  border-radius: 24px;
  pointer-events: none;
}

.cosmos-orbit-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  border: 1px solid rgba(102, 227, 255, 0.2);
  border-radius: 999px;
  transform: translate(-50%, -50%);
}

.cosmos-orbit-ring::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -5px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--xp-cyan);
  box-shadow: 0 0 18px rgba(102, 227, 255, 0.74);
  transform: translateX(-50%);
}

.ring-a {
  width: min(420px, 78%);
  height: min(420px, 78%);
  animation: cosmosOrbitSpin 18s linear infinite;
}

.ring-b {
  width: min(320px, 60%);
  height: min(320px, 60%);
  border-color: rgba(255, 211, 110, 0.18);
  animation: cosmosOrbitSpinReverse 22s linear infinite;
}

.ring-b::before {
  background: var(--xp-gold);
  box-shadow: 0 0 18px rgba(255, 211, 110, 0.74);
}

.ring-c {
  width: min(220px, 42%);
  height: min(220px, 42%);
  border-color: rgba(255, 135, 200, 0.18);
  animation: cosmosOrbitSpin 15s linear infinite;
}

.ring-c::before {
  background: var(--xp-pink);
  box-shadow: 0 0 18px rgba(255, 135, 200, 0.72);
}

@keyframes cosmosOrbitSpin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes cosmosOrbitSpinReverse {
  to {
    transform: translate(-50%, -50%) rotate(-360deg);
  }
}

.cosmos-orbit-core {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  display: grid;
  width: 150px;
  height: 150px;
  place-items: center;
  padding: 18px;
  border: 1px solid rgba(102, 227, 255, 0.34);
  border-radius: 999px;
  background:
    radial-gradient(circle at 35% 20%, rgba(255, 255, 255, 0.16), transparent 36%),
    rgba(5, 8, 22, 0.72);
  box-shadow:
    inset 0 0 36px rgba(102, 227, 255, 0.12),
    0 0 50px rgba(102, 227, 255, 0.14);
  text-align: center;
  transform: translate(-50%, -50%);
  backdrop-filter: blur(18px);
}

.cosmos-orbit-core span {
  color: var(--xp-muted);
  font-size: 0.66rem;
  font-weight: 950;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.cosmos-orbit-core strong {
  color: var(--xp-danger);
  font-size: 1.1rem;
  letter-spacing: -0.04em;
}

.cosmos-orbit-stage.is-stable .cosmos-orbit-core strong {
  color: var(--xp-lime);
}

.cosmos-orbit-stage.is-partial .cosmos-orbit-core strong {
  color: var(--xp-gold);
}

.cosmos-orbit-slot {
  position: absolute;
  z-index: 4;
  display: grid;
  width: 116px;
  min-height: 62px;
  place-items: center;
  padding: 10px;
  border: 1px dashed rgba(102, 227, 255, 0.32);
  border-radius: 18px;
  background: rgba(5, 8, 22, 0.58);
  color: rgba(226, 232, 240, 0.74);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
  backdrop-filter: blur(14px);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease;
}

.cosmos-orbit-slot.is-filled {
  border-style: solid;
  border-color: rgba(185, 255, 122, 0.56);
  background:
    radial-gradient(circle at 20% 18%, rgba(185, 255, 122, 0.14), transparent 34%),
    rgba(10, 38, 34, 0.76);
  color: #ffffff;
  box-shadow:
    0 0 28px rgba(185, 255, 122, 0.14),
    0 18px 42px rgba(0, 0, 0, 0.18);
  animation: cosmosSlotPop 260ms ease both;
}

.cosmos-orbit-slot.is-filled span {
  color: #ffffff;
}

.cosmos-orbit-slot.is-filled::after {
  content: "✓";
  position: absolute;
  right: -8px;
  top: -8px;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: var(--xp-lime);
  color: #04101e;
  font-size: 0.78rem;
  font-weight: 950;
  box-shadow: 0 0 18px rgba(185, 255, 122, 0.58);
}

@keyframes cosmosSlotPop {
  0% {
    transform: scale(0.92);
  }

  100% {
    transform: scale(1);
  }
}

.slot-1 {
  left: 50%;
  top: 74px;
  transform: translateX(-50%);
}

.slot-2 {
  right: 72px;
  top: 50%;
  transform: translateY(-50%);
}

.slot-3 {
  left: 50%;
  bottom: 74px;
  transform: translateX(-50%);
}

.slot-4 {
  left: 72px;
  top: 50%;
  transform: translateY(-50%);
}

.cosmos-orbit-debris {
  position: absolute;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 112px;
  min-height: 44px;
  padding: 9px;
  border: 1px solid rgba(255, 107, 138, 0.38);
  border-radius: 999px;
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 107, 138, 0.18), transparent 34%),
    rgba(42, 14, 38, 0.76);
  color: #ffdce5;
  box-shadow: 0 0 28px rgba(255, 107, 138, 0.16);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
  animation: cosmosDebrisDrift 4.6s ease-in-out infinite;
}

.debris-one {
  left: 16%;
  top: 26%;
}

.debris-two {
  right: 14%;
  bottom: 23%;
  animation-delay: 900ms;
}

@keyframes cosmosDebrisDrift {
  0%, 100% {
    transform: translateY(0) rotate(-2deg);
  }

  50% {
    transform: translateY(-12px) rotate(4deg);
  }
}

.cosmos-orbit-pig,
.cosmos-evidence-pig {
  position: absolute;
  right: 28px;
  top: 28px;
  z-index: 6;
  overflow: hidden;
  width: 92px;
  height: 92px;
  border: 1px solid rgba(255, 135, 200, 0.36);
  border-radius: 24px;
  background: rgba(5, 8, 22, 0.72);
  box-shadow: 0 0 32px rgba(255, 135, 200, 0.16);
  animation: cosmosPigAlert 700ms ease both;
}

.cosmos-evidence-pig {
  border-color: rgba(255, 211, 110, 0.38);
  box-shadow: 0 0 32px rgba(255, 211, 110, 0.16);
}

@keyframes cosmosPigAlert {
  0% {
    opacity: 0;
    transform: translateY(-12px) rotate(-4deg) scale(0.94);
  }

  70% {
    opacity: 1;
    transform: translateY(2px) rotate(3deg) scale(1.04);
  }

  100% {
    opacity: 1;
    transform: translateY(0) rotate(0deg) scale(1);
  }
}

.cosmos-orbit-pig img,
.cosmos-evidence-pig img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.cosmos-practice-piece,
.cosmos-feedback-part,
.cosmos-evidence-card {
  position: relative;
  overflow: hidden;
  display: block;
  width: 100%;
  min-height: 76px;
  padding: 15px 16px;
  border: 1px solid var(--xp-line);
  border-radius: 20px;
  background:
    radial-gradient(circle at 12% 16%, rgba(102, 227, 255, 0.1), transparent 34%),
    rgba(255, 255, 255, 0.055);
  color: #ffffff;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.16);
  font-size: 0.96rem;
  font-weight: 850;
  line-height: 1.35;
  text-align: left;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease,
    opacity 180ms ease;
}

.cosmos-practice-piece:hover,
.cosmos-feedback-part:hover,
.cosmos-evidence-card:hover {
  transform: translateY(-2px);
  border-color: rgba(102, 227, 255, 0.42);
  background:
    radial-gradient(circle at 12% 16%, rgba(102, 227, 255, 0.14), transparent 34%),
    rgba(255, 255, 255, 0.075);
}

.cosmos-practice-piece span,
.cosmos-feedback-part span,
.cosmos-evidence-card span {
  display: block;
  margin-bottom: 5px;
  color: var(--xp-cyan);
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.cosmos-practice-piece.is-selected,
.cosmos-feedback-part.is-selected,
.cosmos-evidence-card.is-selected {
  border-color: rgba(185, 255, 122, 0.56);
  background:
    radial-gradient(circle at 12% 16%, rgba(185, 255, 122, 0.14), transparent 34%),
    rgba(185, 255, 122, 0.08);
  box-shadow:
    0 0 0 4px rgba(185, 255, 122, 0.1),
    0 20px 54px rgba(0, 0, 0, 0.2);
}

.cosmos-practice-piece.is-debris span,
.cosmos-feedback-part.is-weak span,
.cosmos-evidence-card.is-weak span {
  color: var(--xp-danger);
}

.cosmos-practice-piece.is-debris.is-selected,
.cosmos-feedback-part.is-weak.is-selected,
.cosmos-evidence-card.is-weak.is-selected {
  border-color: rgba(255, 107, 138, 0.5);
  background:
    radial-gradient(circle at 12% 16%, rgba(255, 107, 138, 0.16), transparent 34%),
    rgba(255, 107, 138, 0.08);
}

.cosmos-practice-piece.is-pig span,
.cosmos-feedback-part.is-pig span {
  color: var(--xp-pink);
}

.cosmos-evidence-card.is-pig span {
  color: var(--xp-gold);
}

.cosmos-practice-piece.is-pig.is-selected,
.cosmos-feedback-part.is-pig.is-selected {
  border-color: rgba(255, 135, 200, 0.5);
  background:
    radial-gradient(circle at 12% 16%, rgba(255, 135, 200, 0.16), transparent 34%),
    rgba(255, 135, 200, 0.08);
}

.cosmos-evidence-card.is-pig.is-selected {
  border-color: rgba(255, 211, 110, 0.5);
  background:
    radial-gradient(circle at 12% 16%, rgba(255, 211, 110, 0.16), transparent 34%),
    rgba(255, 211, 110, 0.08);
}

[data-cosmos-practice-feedback] {
  margin-top: 22px;
}

/* =========================================================
   MISSION 04 — FEEDBACK BAY
   ========================================================= */

.cosmos-feedback-console {
  display: grid;
  gap: 18px;
  margin: 26px 0 24px;
}

.cosmos-feedback-meter {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border: 1px solid rgba(255, 107, 138, 0.28);
  border-radius: 22px;
  background:
    radial-gradient(circle at 8% 14%, rgba(255, 107, 138, 0.14), transparent 34%),
    rgba(255, 255, 255, 0.055);
}

.cosmos-feedback-meter span {
  display: block;
  margin-bottom: 10px;
  color: var(--xp-muted);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.cosmos-feedback-meter div {
  overflow: hidden;
  height: 12px;
  margin-bottom: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.cosmos-feedback-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--xp-danger), var(--xp-gold));
  box-shadow: 0 0 24px rgba(255, 107, 138, 0.36);
}

.cosmos-feedback-meter strong {
  color: var(--xp-danger);
  font-size: 1rem;
  font-weight: 950;
}

.cosmos-feedback-capsule {
  position: relative;
  overflow: hidden;
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid rgba(255, 211, 110, 0.28);
  border-radius: 26px;
  background:
    radial-gradient(circle at 8% 16%, rgba(255, 211, 110, 0.14), transparent 34%),
    rgba(255, 211, 110, 0.07);
}

.cosmos-feedback-capsule.is-broken {
  border-color: rgba(255, 107, 138, 0.32);
  background:
    radial-gradient(circle at 8% 16%, rgba(255, 107, 138, 0.14), transparent 34%),
    rgba(255, 107, 138, 0.07);
}

.cosmos-feedback-capsule p {
  margin-bottom: 12px;
  color: var(--xp-gold);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.cosmos-feedback-capsule.is-broken p {
  color: var(--xp-danger);
}

.cosmos-feedback-capsule h3 {
  margin-bottom: 0;
  color: #ffffff;
  font-size: clamp(1.35rem, 2.7vw, 2.25rem);
  line-height: 1.15;
  letter-spacing: -0.045em;
}

.cosmos-feedback-warning,
.cosmos-evidence-warning {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 18px;
  border: 1px solid rgba(255, 211, 110, 0.26);
  border-radius: 22px;
  background:
    radial-gradient(circle at 8% 14%, rgba(255, 211, 110, 0.13), transparent 34%),
    rgba(255, 255, 255, 0.055);
}

.cosmos-feedback-warning span,
.cosmos-evidence-warning span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 211, 110, 0.34);
  border-radius: 14px;
  background: rgba(255, 211, 110, 0.1);
  color: var(--xp-gold);
  font-size: 1.15rem;
  font-weight: 950;
}

.cosmos-feedback-warning p,
.cosmos-evidence-warning p {
  margin-bottom: 0;
  color: var(--xp-muted);
  font-size: 0.98rem;
  line-height: 1.62;
}

.cosmos-feedback-repair-grid {
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(0, 1.05fr);
  gap: 18px;
  align-items: stretch;
  margin-top: 28px;
}

.cosmos-feedback-repair-bay {
  position: relative;
  overflow: hidden;
  min-height: 590px;
  padding: 22px;
  border: 1px solid rgba(102, 227, 255, 0.22);
  border-radius: 30px;
  background:
    radial-gradient(circle at 50% 50%, rgba(102, 227, 255, 0.14), transparent 0 18%, rgba(102, 227, 255, 0.07) 19%, transparent 38%),
    radial-gradient(circle at 18% 22%, rgba(255, 135, 200, 0.1), transparent 34%),
    radial-gradient(circle at 82% 78%, rgba(255, 211, 110, 0.1), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.035));
  box-shadow:
    inset 0 0 80px rgba(102, 227, 255, 0.08),
    0 24px 70px rgba(0, 0, 0, 0.24);
}

.cosmos-feedback-repair-bay::before {
  content: "FEEDBACK REPAIR BAY";
  position: absolute;
  left: 24px;
  top: 22px;
  z-index: 4;
  color: rgba(102, 227, 255, 0.72);
  font-size: 0.7rem;
  font-weight: 950;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.cosmos-feedback-repair-bay::after {
  content: "";
  position: absolute;
  inset: 22px;
  z-index: 1;
  border: 1px solid rgba(102, 227, 255, 0.12);
  border-radius: 24px;
  pointer-events: none;
}

.cosmos-feedback-beam {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  width: 280px;
  height: 280px;
  border-radius: 999px;
  background:
    conic-gradient(
      from 0deg,
      rgba(102, 227, 255, 0.34),
      rgba(255, 211, 110, 0.16),
      transparent 80deg,
      transparent 360deg
    );
  opacity: 0.55;
  transform: translate(-50%, -50%);
  animation: cosmosFeedbackBeam 4.8s linear infinite;
}

@keyframes cosmosFeedbackBeam {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.cosmos-feedback-before,
.cosmos-feedback-after,
.cosmos-feedback-quality {
  position: relative;
  z-index: 3;
  border: 1px solid var(--xp-line);
  border-radius: 22px;
  background: rgba(5, 8, 22, 0.64);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(16px);
}

.cosmos-feedback-before,
.cosmos-feedback-after {
  padding: 18px;
}

.cosmos-feedback-before {
  margin-top: 54px;
  border-color: rgba(255, 107, 138, 0.32);
}

.cosmos-feedback-after {
  min-height: 190px;
  margin-top: 22px;
  border-color: rgba(102, 227, 255, 0.28);
}

.cosmos-feedback-after.is-repaired {
  border-color: rgba(185, 255, 122, 0.48);
  background:
    radial-gradient(circle at 8% 12%, rgba(185, 255, 122, 0.12), transparent 34%),
    rgba(5, 8, 22, 0.64);
}

.cosmos-feedback-before span,
.cosmos-feedback-after span,
.cosmos-feedback-quality span {
  display: block;
  margin-bottom: 8px;
  color: var(--xp-muted);
  font-size: 0.7rem;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.cosmos-feedback-before span {
  color: var(--xp-danger);
}

.cosmos-feedback-after span {
  color: var(--xp-cyan);
}

.cosmos-feedback-after.is-repaired span {
  color: var(--xp-lime);
}

.cosmos-feedback-before p,
.cosmos-feedback-after p {
  margin-bottom: 0;
  color: #ffffff;
  font-size: 1.03rem;
  line-height: 1.58;
}

.cosmos-feedback-quality {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin-top: 22px;
  padding: 18px;
}

.cosmos-feedback-quality span {
  margin-bottom: 0;
}

.cosmos-feedback-quality strong {
  color: var(--xp-danger);
  font-size: 1.2rem;
  letter-spacing: -0.04em;
}

.cosmos-feedback-repair-bay.is-partial .cosmos-feedback-quality strong {
  color: var(--xp-gold);
}

.cosmos-feedback-repair-bay.is-repaired .cosmos-feedback-quality strong {
  color: var(--xp-lime);
}

.cosmos-feedback-parts,
.cosmos-evidence-cards {
  display: grid;
  gap: 12px;
}

/* =========================================================
   MISSION 05 — EVIDENCE DECK
   ========================================================= */

.cosmos-evidence-console {
  display: grid;
  grid-template-columns: minmax(220px, 0.35fr) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  margin: 28px 0 26px;
}

.cosmos-evidence-meter,
.cosmos-evidence-readout,
.cosmos-evidence-warning {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(16px);
}

.cosmos-evidence-meter {
  padding: 18px;
  border: 1px solid rgba(255, 107, 138, 0.28);
  background:
    radial-gradient(circle at 14% 14%, rgba(255, 107, 138, 0.16), transparent 34%),
    rgba(255, 255, 255, 0.06);
}

.cosmos-evidence-meter span {
  display: block;
  margin-bottom: 12px;
  color: var(--xp-muted);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.cosmos-evidence-meter div {
  overflow: hidden;
  height: 12px;
  margin-bottom: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.cosmos-evidence-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--xp-danger), var(--xp-gold));
  box-shadow: 0 0 24px rgba(255, 107, 138, 0.38);
}

.cosmos-evidence-meter strong {
  display: block;
  color: var(--xp-danger);
  font-size: 1.08rem;
  font-weight: 950;
  letter-spacing: -0.03em;
}

.cosmos-evidence-readout {
  padding: clamp(22px, 3vw, 30px);
  border: 1px solid rgba(102, 227, 255, 0.28);
  background:
    radial-gradient(circle at 10% 18%, rgba(102, 227, 255, 0.15), transparent 36%),
    radial-gradient(circle at 86% 20%, rgba(255, 211, 110, 0.09), transparent 34%),
    rgba(102, 227, 255, 0.065);
}

.cosmos-evidence-readout::after {
  content: "";
  position: absolute;
  right: -86px;
  top: -86px;
  width: 230px;
  height: 230px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(102, 227, 255, 0.18), transparent 68%);
  pointer-events: none;
}

.cosmos-evidence-readout p {
  position: relative;
  z-index: 2;
  margin-bottom: 12px;
  color: var(--xp-cyan);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.cosmos-evidence-readout h3 {
  position: relative;
  z-index: 2;
  margin-bottom: 0;
  color: #ffffff;
  font-size: clamp(1.35rem, 2.6vw, 2.15rem);
  line-height: 1.12;
  letter-spacing: -0.045em;
}

.cosmos-evidence-warning {
  grid-column: 1 / -1;
}

.cosmos-evidence-builder-grid {
  display: grid;
  grid-template-columns: minmax(380px, 0.96fr) minmax(0, 1.04fr);
  gap: 18px;
  align-items: stretch;
  margin-top: 28px;
}

.cosmos-evidence-deck-stage {
  position: relative;
  overflow: hidden;
  min-height: 590px;
  padding: 22px;
  border: 1px solid rgba(102, 227, 255, 0.22);
  border-radius: 30px;
  background:
    radial-gradient(circle at 50% 50%, rgba(102, 227, 255, 0.12), transparent 0 18%, rgba(102, 227, 255, 0.07) 19%, transparent 38%),
    radial-gradient(circle at 18% 22%, rgba(255, 135, 200, 0.09), transparent 34%),
    radial-gradient(circle at 82% 78%, rgba(255, 211, 110, 0.1), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.035));
  box-shadow:
    inset 0 0 80px rgba(102, 227, 255, 0.08),
    0 24px 70px rgba(0, 0, 0, 0.24);
}

.cosmos-evidence-deck-stage::before {
  content: "EVIDENCE ANALYTICS DECK";
  position: absolute;
  left: 24px;
  top: 22px;
  z-index: 4;
  color: rgba(102, 227, 255, 0.72);
  font-size: 0.7rem;
  font-weight: 950;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.cosmos-evidence-deck-stage::after {
  content: "";
  position: absolute;
  inset: 22px;
  z-index: 1;
  border: 1px solid rgba(102, 227, 255, 0.12);
  border-radius: 24px;
  pointer-events: none;
}

.cosmos-evidence-deck-header {
  position: relative;
  z-index: 3;
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin-top: 54px;
  padding: 18px;
  border: 1px solid rgba(102, 227, 255, 0.24);
  border-radius: 22px;
  background:
    radial-gradient(circle at 10% 20%, rgba(102, 227, 255, 0.12), transparent 34%),
    rgba(5, 8, 22, 0.68);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(16px);
}

.cosmos-evidence-deck-header span {
  color: var(--xp-cyan);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.cosmos-evidence-deck-header strong {
  color: var(--xp-danger);
  font-size: 1.25rem;
  letter-spacing: -0.04em;
}

.cosmos-evidence-deck-stage.is-partial .cosmos-evidence-deck-header strong {
  color: var(--xp-gold);
}

.cosmos-evidence-deck-stage.is-strong .cosmos-evidence-deck-header strong {
  color: var(--xp-lime);
}

.cosmos-evidence-slots {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.cosmos-evidence-slot {
  position: relative;
  display: grid;
  min-height: 118px;
  place-items: center;
  padding: 16px;
  border: 1px dashed rgba(102, 227, 255, 0.34);
  border-radius: 22px;
  background: rgba(5, 8, 22, 0.58);
  color: rgba(226, 232, 240, 0.72);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
  text-align: center;
  backdrop-filter: blur(14px);
}

.cosmos-evidence-slot span {
  display: block;
  font-size: 0.76rem;
  font-weight: 950;
  letter-spacing: 0.12em;
  line-height: 1.35;
  text-transform: uppercase;
}

.cosmos-evidence-slot.is-filled {
  border-style: solid;
  border-color: rgba(185, 255, 122, 0.56);
  background:
    radial-gradient(circle at 18% 18%, rgba(185, 255, 122, 0.14), transparent 34%),
    rgba(10, 38, 34, 0.74);
  color: #ffffff;
  box-shadow:
    0 0 28px rgba(185, 255, 122, 0.14),
    0 18px 42px rgba(0, 0, 0, 0.18);
}

.cosmos-evidence-slot.is-filled::after {
  content: "✓";
  position: absolute;
  right: -8px;
  top: -8px;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: var(--xp-lime);
  color: #04101e;
  font-size: 0.78rem;
  font-weight: 950;
  box-shadow: 0 0 18px rgba(185, 255, 122, 0.58);
}

.cosmos-evidence-noise {
  position: relative;
  z-index: 4;
  display: inline-grid;
  width: auto;
  min-width: 118px;
  min-height: 48px;
  margin: 18px 10px 0 0;
  padding: 9px 16px;
  place-items: center;
  border: 1px solid rgba(255, 107, 138, 0.38);
  border-radius: 999px;
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 107, 138, 0.18), transparent 34%),
    rgba(42, 14, 38, 0.76);
  color: #ffdce5;
  box-shadow: 0 0 28px rgba(255, 107, 138, 0.16);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
  animation: cosmosEvidenceNoise 4.6s ease-in-out infinite;
}

.cosmos-evidence-noise[hidden] {
  display: none !important;
}

.noise-one,
.noise-two {
  left: auto;
  right: auto;
  bottom: auto;
}

.noise-two {
  animation-delay: 820ms;
}

@keyframes cosmosEvidenceNoise {
  0%, 100% {
    transform: translateY(0) rotate(-2deg);
  }

  50% {
    transform: translateY(-6px) rotate(3deg);
  }
}

.cosmos-evidence-deck-message {
  position: relative;
  z-index: 3;
  margin-top: 22px;
  padding: 18px;
  border: 1px solid rgba(255, 211, 110, 0.22);
  border-radius: 22px;
  background:
    radial-gradient(circle at 10% 20%, rgba(255, 211, 110, 0.12), transparent 34%),
    rgba(255, 255, 255, 0.05);
}

.cosmos-evidence-deck-message p {
  margin-bottom: 0;
  color: var(--xp-muted);
  font-size: 0.96rem;
  line-height: 1.58;
}

.cosmos-xp-complete .cosmos-xp-debrief-panel {
  border-color: rgba(185, 255, 122, 0.34);
  background:
    radial-gradient(circle at 18% 12%, rgba(185, 255, 122, 0.12), transparent 34%),
    radial-gradient(circle at 82% 78%, rgba(102, 227, 255, 0.1), transparent 34%),
    rgba(255, 255, 255, 0.06);
}

.cosmos-xp-complete .cosmos-xp-score-card {
  border-color: rgba(185, 255, 122, 0.38);
  background:
    radial-gradient(circle at 12% 14%, rgba(185, 255, 122, 0.14), transparent 34%),
    rgba(185, 255, 122, 0.07);
}

.cosmos-xp-complete .cosmos-xp-score-card strong {
  color: var(--xp-lime);
}

/* =========================================================
   AUDIO / VOLUME CONTROL
   ========================================================= */

.cosmos-volume-control {
  display: inline-flex;
  gap: 10px;
  align-items: center;
}

.cosmos-volume-slider {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--xp-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.065);
  color: var(--xp-muted);
  backdrop-filter: blur(16px);
}

.cosmos-volume-slider span {
  color: var(--xp-muted);
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.cosmos-volume-slider input {
  width: 110px;
  accent-color: var(--xp-cyan);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1180px) {
  .cosmos-xp-mission-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .cosmos-xp-choice-grid,
  .cosmos-xp-multi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1120px) {
  .cosmos-practice-builder,
  .cosmos-feedback-repair-grid,
  .cosmos-evidence-builder-grid {
    grid-template-columns: 1fr;
  }

  .cosmos-orbit-stage {
    min-height: 540px;
  }

  .cosmos-feedback-repair-bay {
    min-height: 520px;
  }

  .cosmos-evidence-deck-stage {
    min-height: 560px;
  }
}

@media (max-width: 1080px) {
  .cosmos-xp-start-grid,
  .cosmos-xp-intro-grid,
  .cosmos-xp-activity-grid,
  .cosmos-xp-systems-grid,
  .cosmos-xp-practice-grid,
  .cosmos-xp-feedback-grid,
  .cosmos-xp-evidence-grid,
  .cosmos-xp-debrief-grid {
    grid-template-columns: 1fr;
  }

  .cosmos-xp-hero-card,
  .cosmos-xp-captain-stage,
  .cosmos-xp-celebration-card {
    min-height: 520px;
  }

  .cosmos-xp-side-panel {
    position: static;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 18px;
    align-items: center;
  }

  .cosmos-xp-side-panel figure,
  .cosmos-xp-captain-note {
    grid-column: 2;
  }

  .cosmos-xp-side-panel .cosmos-xp-eyebrow,
  .cosmos-xp-side-panel h2,
  .cosmos-xp-mini-progress {
    grid-column: 1;
  }

  .cosmos-xp-side-panel figure {
    grid-row: 1 / 4;
    margin-bottom: 0;
  }

  .cosmos-xp-captain-note {
    grid-column: 1 / -1;
  }

  .cosmos-badge-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cosmos-badge {
    min-height: 270px;
  }
}

@media (max-width: 860px) {
  .cosmos-xp-topbar {
    grid-template-columns: 1fr auto;
  }

  .cosmos-xp-title-lockup {
    display: none;
  }

  .cosmos-xp-controls {
    justify-self: end;
  }

  .cosmos-xp-dashboard-header {
    grid-template-columns: 1fr;
  }

  .cosmos-xp-progress-card {
    max-width: 360px;
  }

  .cosmos-xp-mission-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cosmos-xp-choice-grid,
  .cosmos-xp-multi-grid {
    grid-template-columns: 1fr;
  }

  .cosmos-xp-choice {
    min-height: 0;
  }

  .cosmos-scan-console {
    display: grid;
    gap: 12px;
    min-height: 0;
    padding: 72px 18px 18px;
  }

  .cosmos-radar {
    opacity: 0.38;
  }

  .cosmos-scan-node {
    position: relative;
    inset: auto;
    justify-content: flex-start;
    width: 100%;
    transform: none;
  }

  .cosmos-scan-node:hover,
  .node-pig,
  .node-pig:hover {
    transform: none;
  }
}

@media (max-width: 760px) {
  .cosmos-xp-shell {
    width: min(100% - 28px, 1180px);
  }

  .cosmos-xp-screen {
    min-height: calc(100vh - 64px);
    padding: 44px 0 68px;
  }

  .cosmos-xp-topbar {
    min-height: 64px;
    padding: 10px 14px;
  }

  .cosmos-xp-back {
    max-width: 190px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .cosmos-xp-start-copy h1 {
    font-size: clamp(2.85rem, 14vw, 4.55rem);
    line-height: 0.96;
    letter-spacing: -0.065em;
  }

  .cosmos-xp-deck {
    font-size: 1rem;
  }

  .cosmos-xp-start-actions,
  .cosmos-xp-activity-actions {
    display: grid;
  }

  .cosmos-xp-btn {
    width: 100%;
  }

  .cosmos-xp-status-strip,
  .cosmos-practice-briefing,
  .cosmos-evidence-console,
  .cosmos-evidence-slots {
    grid-template-columns: 1fr;
  }

  .cosmos-xp-status-strip div {
    min-width: 0;
  }

  .cosmos-xp-hero-card,
  .cosmos-xp-captain-stage,
  .cosmos-xp-celebration-card {
    min-height: 420px;
    border-radius: 24px;
  }

  .cosmos-xp-hero-overlay {
    right: 16px;
    bottom: 16px;
    left: 16px;
    padding: 18px;
    border-radius: 20px;
  }

  .cosmos-xp-dialogue-panel,
  .cosmos-xp-side-panel,
  .cosmos-xp-activity-panel,
  .cosmos-xp-debrief-panel {
    border-radius: 24px;
  }

  .cosmos-xp-dialogue-panel h2,
  .cosmos-xp-dashboard-header h2,
  .cosmos-xp-activity-panel h2 {
    font-size: clamp(2rem, 10vw, 3.25rem);
    line-height: 1;
  }

  .cosmos-xp-mission-grid {
    grid-template-columns: 1fr;
  }

  .cosmos-xp-mission-card {
    min-height: 260px;
  }

  .cosmos-xp-side-panel {
    grid-template-columns: 1fr;
  }

  .cosmos-xp-side-panel figure,
  .cosmos-xp-captain-note,
  .cosmos-xp-side-panel .cosmos-xp-eyebrow,
  .cosmos-xp-side-panel h2,
  .cosmos-xp-mini-progress {
    grid-column: auto;
    grid-row: auto;
  }

  .cosmos-xp-side-panel figure {
    margin-bottom: 16px;
  }

  .cosmos-xp-side-panel img {
    aspect-ratio: 1 / 0.68;
  }

  .cosmos-xp-choice.horizontal {
    grid-template-columns: 1fr;
  }

  .cosmos-xp-choice.horizontal > span {
    margin-bottom: 4px;
  }

  .cosmos-xp-debrief-panel h2 {
    font-size: clamp(2.2rem, 11vw, 3.7rem);
  }

  .cosmos-chaos-layer {
    opacity: 0.65;
  }

  .cosmos-practice-pieces {
    grid-template-columns: 1fr;
  }

  .cosmos-professor-cameo,
  .cosmos-truffles-cameo,
  .cosmos-snort-cameo {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .cosmos-professor-cameo figure,
  .cosmos-truffles-cameo figure,
  .cosmos-snort-cameo figure {
    min-height: 92px;
    border-radius: 18px;
  }

  .cosmos-orbit-stage {
    min-height: 500px;
    border-radius: 24px;
  }

  .cosmos-orbit-core {
    width: 128px;
    height: 128px;
  }

  .cosmos-orbit-slot {
    width: 104px;
    min-height: 58px;
    font-size: 0.66rem;
  }

  .slot-1 {
    top: 78px;
  }

  .slot-2 {
    right: 22px;
  }

  .slot-3 {
    bottom: 78px;
  }

  .slot-4 {
    left: 22px;
  }

  .cosmos-orbit-debris {
    width: 96px;
    font-size: 0.64rem;
  }

  .cosmos-practice-piece,
  .cosmos-feedback-part,
  .cosmos-evidence-card {
    min-height: 72px;
  }

  .cosmos-feedback-warning,
  .cosmos-evidence-warning {
    grid-column: auto;
    grid-template-columns: 1fr;
  }

  .cosmos-feedback-repair-bay {
    min-height: 480px;
    border-radius: 24px;
  }

  .cosmos-feedback-quality,
  .cosmos-evidence-deck-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .cosmos-evidence-deck-stage {
    min-height: 540px;
    border-radius: 24px;
  }

  .cosmos-evidence-slot {
    min-height: 88px;
  }

  .cosmos-evidence-pig {
    width: 74px;
    height: 74px;
    right: 18px;
    top: 18px;
  }

  .cosmos-volume-control {
    gap: 8px;
  }

  .cosmos-volume-slider {
    display: none;
  }
}

@media (max-width: 620px) {
  .cosmos-badges {
    padding: 1.15rem;
    border-radius: 26px;
  }

  .cosmos-badge-grid {
    display: flex;
    gap: 0.9rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .cosmos-badge {
    flex: 0 0 78%;
    min-height: 268px;
    scroll-snap-align: start;
  }

  .cosmos-patch {
    width: 128px;
    height: 128px;
  }

  .cosmos-badge-grid::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 460px) {
  .cosmos-xp-shell {
    width: min(100% - 22px, 1180px);
  }

  .cosmos-xp-start-copy h1 {
    font-size: 2.85rem;
  }

  .cosmos-xp-hero-card,
  .cosmos-xp-captain-stage,
  .cosmos-xp-celebration-card {
    min-height: 360px;
  }

  .cosmos-xp-hero-overlay h2 {
    font-size: 1.8rem;
  }

  .cosmos-xp-activity-panel,
  .cosmos-xp-dialogue-panel,
  .cosmos-xp-debrief-panel,
  .cosmos-xp-side-panel {
    padding: 18px;
  }

  .cosmos-xp-score-card strong {
    font-size: 2rem;
  }

  .cosmos-orbit-stage {
    min-height: 450px;
  }

  .cosmos-orbit-core {
    width: 112px;
    height: 112px;
    padding: 14px;
  }

  .cosmos-orbit-core strong {
    font-size: 0.98rem;
  }

  .cosmos-orbit-slot {
    width: 92px;
    min-height: 54px;
  }

  .slot-1 {
    top: 74px;
  }

  .slot-2 {
    right: 12px;
  }

  .slot-3 {
    bottom: 74px;
  }

  .slot-4 {
    left: 12px;
  }

  .cosmos-orbit-pig {
    width: 74px;
    height: 74px;
    right: 18px;
    top: 18px;
  }

  .cosmos-feedback-repair-bay {
    min-height: 440px;
    padding: 18px;
  }

  .cosmos-feedback-before {
    margin-top: 50px;
  }

  .cosmos-evidence-deck-stage {
    min-height: 500px;
    padding: 18px;
  }

  .cosmos-evidence-deck-header {
    margin-top: 50px;
  }
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  .cosmos-chaos-layer,
  .cosmos-star-shoot,
  .cosmos-rocket-flyer,
  .cosmos-ufo-flyer,
  .cosmos-pig-pod,
  .cosmos-asteroid {
    display: none;
  }

  .cosmos-xp-screen,
  .cosmos-xp-screen.is-exiting,
  .cosmos-xp-feedback-panel,
  .cosmos-boot-panel li,
  .cosmos-feedback-burst.is-visible,
  .cosmos-xp-mission-card,
  .cosmos-orbit-ring,
  .cosmos-radar-sweep,
  .cosmos-feedback-beam,
  .cosmos-orbit-debris,
  .cosmos-evidence-noise {
    animation: none;
  }

  .cosmos-boot-panel li,
  .cosmos-xp-mission-card {
    opacity: 1;
    transform: none;
  }

  .cosmos-xp-btn,
  .cosmos-xp-card-btn,
  .cosmos-xp-choice,
  .cosmos-xp-token,
  .cosmos-xp-back,
  .cosmos-icon-btn,
  .cosmos-xp-mission-card,
  .cosmos-badge {
    transition: none;
  }

  .cosmos-xp-btn:hover,
  .cosmos-xp-card-btn:hover,
  .cosmos-xp-choice:hover,
  .cosmos-xp-token:hover,
  .cosmos-xp-back:hover,
  .cosmos-icon-btn:hover,
  .cosmos-xp-mission-card:hover,
  .cosmos-badge:hover {
    transform: none;
  }
}
/* =========================================================
   COSMOS IMAGE BADGES — scale fix
   Paste at bottom of: /assets/css/cosmos-experience.css
   ========================================================= */

.cosmos-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 300px;
  padding: 1rem 1rem 1.15rem;
}

.cosmos-badge-art {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 168px;
  aspect-ratio: 1 / 1;
  margin: 0 auto 0.9rem;
  border-radius: 26px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 10%, rgba(255, 255, 255, 0.12), transparent 54%),
    rgba(255, 255, 255, 0.035);
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.cosmos-badge-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.cosmos-badge:not(.is-earned) .cosmos-badge-art img {
  filter: saturate(0.76) brightness(0.72);
  opacity: 0.88;
}

.cosmos-badge.is-earned .cosmos-badge-art {
  max-width: 178px;
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.28),
    0 0 34px rgba(185, 255, 122, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.cosmos-badge-status,
.cosmos-badge h3,
.cosmos-badge > p:last-child {
  position: relative;
  z-index: 2;
}

@media (max-width: 1080px) {
  .cosmos-badge {
    min-height: 288px;
  }

  .cosmos-badge-art {
    max-width: 160px;
  }

  .cosmos-badge.is-earned .cosmos-badge-art {
    max-width: 168px;
  }
}

@media (max-width: 620px) {
  .cosmos-badge {
    flex: 0 0 78%;
    min-height: 292px;
  }

  .cosmos-badge-art {
    max-width: 166px;
  }

  .cosmos-badge.is-earned .cosmos-badge-art {
    max-width: 174px;
  }
}
/* =========================================================
   COSMOS Mission Control — compact preview console fix
   ========================================================= */

.cosmos-mission-control-hub .cosmos-mc-preview-panel {
  max-width: 100%;
  margin-top: 22px;
  padding: clamp(22px, 3vw, 34px);
  border-radius: 28px;
}

.cosmos-mission-control-hub .cosmos-mc-preview-panel .cosmos-xp-eyebrow {
  margin-bottom: 12px;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
}

.cosmos-mission-control-hub .cosmos-mc-preview-panel h2 {
  max-width: 760px;
  margin-bottom: 12px;
  font-size: clamp(2rem, 3.8vw, 3.35rem);
  line-height: 0.98;
  letter-spacing: -0.065em;
}

.cosmos-mission-control-hub .cosmos-mc-preview-panel p {
  max-width: 920px;
  margin-bottom: 0;
  color: rgba(226, 232, 240, 0.82);
  font-size: 1rem;
  line-height: 1.62;
}

.cosmos-mission-control-hub .cosmos-mc-preview-panel .cosmos-xp-activity-actions {
  margin-top: 22px;
}

.cosmos-mission-control-hub .cosmos-xp-mission-grid {
  align-items: stretch;
  margin-bottom: 0;
}

.cosmos-mission-control-hub .cosmos-xp-mission-card {
  display: flex;
  flex-direction: column;
}

.cosmos-mission-control-hub .cosmos-xp-mission-card p {
  flex: 1;
}

.cosmos-mission-control-hub .cosmos-xp-card-btn {
  width: max-content;
  max-width: 100%;
  margin-top: auto;
}

@media (max-width: 760px) {
  .cosmos-mission-control-hub .cosmos-mc-preview-panel {
    padding: 22px;
    border-radius: 24px;
  }

  .cosmos-mission-control-hub .cosmos-mc-preview-panel h2 {
    font-size: clamp(2rem, 10vw, 2.8rem);
  }

  .cosmos-mission-control-hub .cosmos-mc-preview-panel .cosmos-xp-activity-actions {
    display: grid;
  }

  .cosmos-mission-control-hub .cosmos-mc-preview-panel .cosmos-xp-btn {
    width: 100%;
  }

  .cosmos-mission-control-hub .cosmos-xp-card-btn {
    width: 100%;
  }
}
/* =========================================================
   COSMOS Mission Control — tighten badge to mission menu rhythm
   ========================================================= */

.cosmos-mission-control-hub .cosmos-badges {
  margin-bottom: clamp(34px, 5vw, 56px);
  padding-bottom: clamp(28px, 4vw, 46px);
}

.cosmos-mission-control-hub .cosmos-badge-grid {
  margin-bottom: 0;
}

.cosmos-mission-control-hub .cosmos-xp-dashboard-header-secondary {
  margin-top: 0;
  margin-bottom: 24px;
}

.cosmos-mission-control-hub .cosmos-xp-dashboard-header-secondary h2 {
  max-width: 920px;
  margin-bottom: 16px;
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  line-height: 0.95;
  letter-spacing: -0.072em;
}

.cosmos-mission-control-hub .cosmos-xp-dashboard-header-secondary p {
  max-width: 920px;
  font-size: clamp(1rem, 1.25vw, 1.16rem);
  line-height: 1.6;
}

.cosmos-mission-control-hub .cosmos-xp-mission-grid {
  margin-top: 26px;
}

@media (max-width: 760px) {
  .cosmos-mission-control-hub .cosmos-badges {
    margin-bottom: 34px;
    padding-bottom: 30px;
  }

  .cosmos-mission-control-hub .cosmos-xp-dashboard-header-secondary h2 {
    font-size: clamp(2.35rem, 12vw, 3.35rem);
    line-height: 0.98;
  }

  .cosmos-mission-control-hub .cosmos-xp-mission-grid {
    margin-top: 20px;
  }
}
