/* ═══════════════════════════════════════════════════════════════
   CBE — Chaos Behavioral Engine UI (scoped under .cbe-root + body.cbe-active)
   Per-game layers: CBEVisuals.bgClass / .scene-screen[data-scene] (sceneMoodSystem.css)
   ═══════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  .cbe-root *,
  .cbe-root *::before,
  .cbe-root *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
  .cbe-glitch-sweep,
  .cbe-scanlines {
    animation: none !important;
    opacity: 0.12 !important;
  }
}

/* --- Root / shell ------------------------------------------------ */
.cbe-root {
  min-height: 70vh;
  max-width: none;
  width: 100%;
  margin: 0 auto;
  padding: 1rem min(12rem, 18vw) 3rem 1.25rem;
  font-family: Manrope, Inter, "Noto Sans Greek", system-ui, sans-serif;
  color: rgba(245, 248, 255, 0.95);
  box-sizing: border-box;
}

.cbe-topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 5;
}

.cbe-back {
  background: rgba(155, 93, 255, 0.15);
  border: 1px solid rgba(155, 93, 255, 0.45);
  color: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.cbe-back:hover {
  background: rgba(155, 93, 255, 0.28);
  border-color: rgba(255, 107, 157, 0.5);
}

.cbe-brand {
  font-weight: 800;
  letter-spacing: 0.06em;
  font-size: 0.9rem;
  color: rgba(255, 211, 105, 0.95);
}

.cbe-main {
  animation: cbe-fade-in 0.45s ease-out;
  max-width: 920px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* new text in intro for cbe */
#txtContainer{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-align: center;
    text-wrap: wrap;
    background-color: rgba(135, 206, 250, 0.13);
    padding: 2rem;
    border-radius: 10px;
  }

  #txtContainer h1{
    font-size: clamp(23px, 2vw, 30px);
    
  }

 #txtContainer h4{
    margin: 1rem auto;
    width: 70%;  
    letter-spacing: 1px;
    font-size: clamp(12px, 2vw, 16px);
 } 


  #infoDiv{
    display: flex;
    flex-direction: row;
    gap: 3rem;
    align-items: center;
    justify-content: center;
  }

  #infoDiv div {
  padding: 5px 8px;
  border-radius: 10px;
  line-height: 18px;
  font-size: clamp(15px, 2vw, 18px);
}
 @media (max-width: 520px) {
   #txtContainer{
    padding: 1rem;
   }
   #txtContainer h4{
    width: 90%;
   }
   #infoDiv{
    gap: 1rem;
    flex-wrap: wrap;
   }
   #infoDiv div{
    width: fit-content;

   }
 }

#infoDiv div:first-child {
  background-color: rgba(144, 238, 144, 0.205);
}

#infoDiv div:nth-child(2) {
  background-color: rgba(240, 128, 128, 0.205);
}

#infoDiv div:nth-child(3) {
  background-color: rgba(255, 182, 193, 0.205);
}

#infoDiv div:nth-child(4) {
  background-color: rgba(255, 160, 122, 0.205);
}

#infoDiv div:nth-child(5) {
  background-color: rgba(119, 136, 153, 0.205);
}

  #bottomText{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 2rem auto;
    color: lightgray;
  }

  /* end of the css for the new text in intro for cbe */

@media (min-width: 1200px) {
  .cbe-root {
    padding-left: 2rem;
    padding-right: 2rem;
  }

  .cbe-main {
    max-width: 920px;
  }
}

.cbe-content-column {
  width: 100%;
  max-width: 34rem;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

@keyframes cbe-fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Stage = scene mood canvas (inherits sceneMoodSystem variables) */
.cbe-main .cbe-stage.scene-screen {
  min-height: 0;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 1.35rem 1.4rem 1.6rem;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.35);
  position: relative;
  overflow: hidden;
}

.cbe-stage-inner {
  position: relative;
  z-index: 4;
}

.cbe-stage-inner--sim {
  animation: cbe-sim-settle 0.55s ease-out both;
}

.cbe-stage-inner--chaos {
  animation: cbe-chaos-enter 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes cbe-sim-settle {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes cbe-chaos-enter {
  from {
    opacity: 0;
    transform: translateX(-6px) skewX(-0.8deg);
    filter: saturate(0.7);
  }
  to {
    opacity: 1;
    transform: translateX(0) skewX(0);
    filter: saturate(1.15);
  }
}

/* --- Progress (bar + meta) -------------------------------------- */
.cbe-progress-wrap {
  margin-bottom: 1.1rem;
}

.cbe-progress-meta {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: rgba(125, 214, 255, 0.88);
  margin-bottom: 0.45rem;
}

.cbe-progress-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.cbe-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-2, #6dd5ff), var(--accent-1, #9b5dff), var(--accent-3, #ff6b9d));
  background-size: 160% 100%;
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  animation: cbe-progress-shimmer 4s ease-in-out infinite;
}

@keyframes cbe-progress-shimmer {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* --- CBE 2 / 3 badges ------------------------------------------- */
.cbe-phase-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  padding: 0.28rem 0.65rem;
  border-radius: 6px;
}

.cbe-phase-badge--sim {
  color: rgba(200, 230, 255, 0.95);
  background: rgba(109, 213, 255, 0.12);
  border: 1px solid rgba(109, 213, 255, 0.35);
}

.cbe-phase-badge--chaos {
  color: #1a0a12;
  background: linear-gradient(135deg, #ff6b9d 0%, #ffd93d 100%);
  border: 1px solid rgba(255, 107, 157, 0.85);
  box-shadow: 0 0 20px rgba(255, 107, 157, 0.45);
  animation: cbe-badge-pulse 1.8s ease-in-out infinite;
}

.cbe-phase-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}

.cbe-phase-header .cbe-phase-badge {
  margin-bottom: 0;
}

h2.cbe-phase-heading {
  display: block;
  width: 100%;
  max-width: 40rem;
  margin: 0 auto 0.75rem;
  padding: 0;
  border: none;
  background: none;
  text-transform: none;
  letter-spacing: 0.01em;
  font-size: clamp(1.02rem, 2.5vw, 1.32rem);
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
  color: rgba(232, 240, 255, 0.98);
  -webkit-text-fill-color: rgba(232, 240, 255, 0.98);
  box-shadow: none;
  animation: none;
}

h2.cbe-chaos-heading {
  color: rgba(255, 232, 240, 0.98);
  -webkit-text-fill-color: rgba(255, 232, 240, 0.98);
}

@keyframes cbe-badge-pulse {
  0%,
  100% {
    box-shadow: 0 0 14px rgba(255, 107, 157, 0.35);
  }
  50% {
    box-shadow: 0 0 28px rgba(255, 211, 105, 0.55);
  }
}

.cbe-game-title {
  font-size: clamp(1.35rem, 3.5vw, 1.85rem);
  font-weight: 700;
  margin: 0 0 0.85rem;
  line-height: 1.22;
}

.cbe-phase-tag {
  display: inline-block;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  background: rgba(109, 213, 255, 0.12);
  border: 1px solid rgba(109, 213, 255, 0.4);
  color: rgba(230, 240, 255, 0.95);
}

h2.cbe-phase-tag {
  margin-top: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

/* Legacy scene heading hook (prefer .cbe-phase-heading) */
h2.cbe-scene-heading.cbe-phase-tag {
  display: block;
  width: 100%;
  max-width: 40rem;
  margin: 0 auto 0.85rem;
  padding: 0;
  border: none;
  border-radius: 0;
  background: none;
  text-transform: none;
  letter-spacing: 0.01em;
  font-size: clamp(1.05rem, 2.6vw, 1.38rem);
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  color: rgba(232, 240, 255, 0.98);
  -webkit-text-fill-color: rgba(232, 240, 255, 0.98);
  box-shadow: none;
  animation: none;
}

/* Unified Chaos Event layout (all G1–G10) */
.cbe-fx-g3-risk-warning {
  display: none !important;
}

.cbe-xp-layout-chaos-unified .cbe-choices {
  max-width: none;
}

.cbe-stage-inner--chaos.cbe-xp-layout-chaos-unified .cbe-choice {
  text-align: center;
}

.cbe-phase-tag--sim {
  background: rgba(109, 213, 255, 0.1);
  border-color: rgba(109, 213, 255, 0.38);
}

.cbe-chaos-tag,
.cbe-phase-tag.cbe-chaos-tag {
  margin-left: 0.35rem;
  padding: 0.28rem 0.65rem;
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(255, 20, 80, 0.35) 0%, rgba(155, 93, 255, 0.28) 100%);
  border: 1px solid rgba(255, 80, 120, 0.75);
  color: #fff;
  box-shadow: 0 0 22px rgba(255, 60, 120, 0.35);
  animation: cbe-chaos-tag-flicker 2.4s steps(2, end) infinite;
}

@keyframes cbe-chaos-tag-flicker {
  0%,
  100% {
    opacity: 1;
    transform: translateX(0);
  }
  50% {
    opacity: 0.92;
    transform: translateX(1px);
  }
}

/* --- Recap chip (Chaos Event) ----------------------------------- */
.cbe-recap-chip {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px dashed rgba(255, 211, 105, 0.45);
  box-shadow: inset 0 0 24px rgba(255, 107, 157, 0.08);
}

.cbe-recap-chip-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 211, 105, 0.9);
}

.cbe-recap-chip-text {
  font-size: 0.92rem;
  line-height: 1.45;
  color: rgba(226, 232, 255, 0.92);
}

/* Narrative: match sceneMoodSystem (.scene-narrative-card p) + guard direct text */
.cbe-body.scene-narrative-card {
  color: rgba(226, 232, 255, 0.92);
  -webkit-text-fill-color: rgba(226, 232, 255, 0.92);
}

.cbe-body.scene-narrative-card .chaos-game-description,
.cbe-body.scene-narrative-card > p {
  margin: 0;
  font-size: clamp(0.98rem, 2.1vw, 1.08rem);
  line-height: 1.65;
  letter-spacing: 0.4px;
  color: rgba(226, 232, 255, 0.92);
  -webkit-text-fill-color: rgba(226, 232, 255, 0.92);
  white-space: pre-line;
  text-align: center;
}

.cbe-root .cbe-scenario .cbe-scenario-text,
.cbe-root .cbe-scenario .chaos-game-description {
  display: block;
  visibility: visible;
  opacity: 1;
  color: rgba(226, 232, 255, 0.96) !important;
  -webkit-text-fill-color: rgba(226, 232, 255, 0.96) !important;
}

.cbe-root .cbe-scenario.scene-narrative-card {
  display: block;
  min-height: 2.5rem;
}

.cbe-stage-inner--chaos .cbe-body {
  border-color: rgba(255, 107, 157, 0.22);
}

/* --- Choices + selection -------------------------------------- */
.cbe-choices {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.cbe-choice {
  text-align: center;
  padding: 1rem 1.15rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 17, 58, 0.45);
  color: rgba(255, 255, 255, 0.95);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.cbe-choice:hover {
  border-color: rgba(125, 214, 255, 0.55);
  background: rgba(26, 31, 74, 0.62);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
}

.cbe-choice:focus-visible {
  outline: 2px solid rgba(125, 214, 255, 0.85);
  outline-offset: 2px;
}

.cbe-choice--selected {
  border-color: rgba(255, 211, 105, 0.75);
  background: linear-gradient(135deg, rgba(155, 93, 255, 0.35) 0%, rgba(26, 31, 74, 0.75) 100%);
  box-shadow: 0 0 0 1px rgba(255, 211, 105, 0.35), 0 10px 32px rgba(155, 93, 255, 0.25);
  transform: translateY(-1px);
}

.cbe-stage-inner--chaos .cbe-choice:hover {
  border-color: rgba(255, 107, 157, 0.55);
  box-shadow: 0 0 24px rgba(255, 107, 157, 0.12);
}

.cbe-stage-inner--chaos .cbe-choice--selected {
  border-color: rgba(255, 107, 157, 0.9);
  background: linear-gradient(135deg, rgba(255, 60, 100, 0.22) 0%, rgba(26, 31, 74, 0.85) 100%);
  box-shadow: 0 0 0 1px rgba(255, 107, 157, 0.45), 0 12px 36px rgba(255, 20, 80, 0.15);
}

/* --- Footer / Continue ----------------------------------------- */
.cbe-footer-actions {
  margin-top: 1.35rem;
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.cbe-btn-continue:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  transform: none;
}

/* --- Chaos disruption overlay ----------------------------------- */
.cbe-chaos-disruption {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  border-radius: inherit;
  overflow: hidden;
}

.cbe-glitch-sweep {
  position: absolute;
  inset: -10%;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(255, 255, 255, 0.03) 2px,
    rgba(255, 255, 255, 0.03) 4px
  );
  animation: cbe-glitch-sweep 3.2s linear infinite;
  mix-blend-mode: overlay;
}

.cbe-scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0px, rgba(0, 0, 0, 0.15) 1px, transparent 1px, transparent 3px);
  opacity: 0.35;
  animation: cbe-shake 0.35s ease-in-out infinite;
}

@keyframes cbe-glitch-sweep {
  0% {
    transform: translateX(-5%) skewX(-0.5deg);
    opacity: 0.5;
  }
  25% {
    transform: translateX(2%) skewX(0.6deg);
    opacity: 0.65;
  }
  50% {
    transform: translateX(-1%) skewX(-0.4deg);
    opacity: 0.55;
  }
  100% {
    transform: translateX(4%) skewX(0.3deg);
    opacity: 0.5;
  }
}

@keyframes cbe-shake {
  0%,
  100% {
    transform: translate(0, 0);
  }
  20% {
    transform: translate(-1px, 1px);
  }
  40% {
    transform: translate(1px, -1px);
  }
  60% {
    transform: translate(-1px, -1px);
  }
  80% {
    transform: translate(1px, 0);
  }
}

/* --- Cinematic transitions (replaces generic transition card) --- */
.cbe-chaos-noise {
  position: absolute;
  inset: 0;
  opacity: 0.12;
  /* background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E"); */
  mix-blend-mode: overlay;
  animation: cbe-noise-drift 30s linear forwards;
  pointer-events: none;
}

/* @keyframes cbe-noise-drift {
  0% {
    transform: scale(0);
  border-radius: 50%;
  }
  100% {
    transform: scale(1);
  border-radius: 0px;

  }
} */

.cbe-xp-trans {
  position: relative;
  min-height: min(58vh, 520px);
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: cbe-xp-trans-enter 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes cbe-xp-trans-enter {
  from {
    opacity: 0;
    filter: brightness(0.4);
  }
  to {
    opacity: 1;
    filter: brightness(1);
  }
}

.cbe-xp-trans__veil {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 90% 70% at 50% 40%, transparent 20%, rgba(0, 0, 0, 0.75) 100%);
  pointer-events: none;
  z-index: 1;
}

.cbe-xp-trans__glow {
  position: absolute;
  inset: -20%;
  background: radial-gradient(circle at 30% 30%, rgba(155, 93, 255, 0.2), transparent 45%),
    radial-gradient(circle at 80% 70%, rgba(255, 107, 157, 0.15), transparent 40%);
  pointer-events: none;
  z-index: 0;
  animation: cbe-xp-glow-drift 8s ease-in-out infinite;
}

@keyframes cbe-xp-glow-drift {
  0%,
  100% {
    transform: scale(1) translate(0, 0);
  }
  50% {
    transform: scale(1.05) translate(2%, -1%);
  }
}

.cbe-xp-trans__particles {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.14) 1px, transparent 1px);
  background-size: 24px 28px;
  animation: cbe-xp-particles 2.2s linear infinite;
}

@keyframes cbe-xp-particles {
  0% {
    opacity: 0;
    transform: translateY(8%);
  }
  20% {
    opacity: 0.45;
  }
  100% {
    opacity: 0;
    transform: translateY(-18%);
  }
}

.cbe-xp-trans__lines {
  position: relative;
  z-index: 4;
  padding: 2rem 1.5rem 5.5rem;
  max-width: 36rem;
}

.cbe-xp-trans__line1 {
  font-size: clamp(1.85rem, 5vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
  line-height: 1.1;
  text-shadow: 0 0 40px rgba(125, 214, 255, 0.35);
}

.cbe-xp-trans__line2 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.55;
  color: rgba(210, 220, 255, 0.88);
  max-width: 32rem;
}

.cbe-xp-trans__bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  padding: 1rem 1.25rem 1.35rem;
  background: linear-gradient(180deg, transparent, rgba(4, 8, 28, 0.92));
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 1rem;
}

.cbe-xp-trans__cta {
  border-radius: 999px;
  padding: 0.75rem 1.6rem;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid rgba(125, 214, 255, 0.55);
  background: linear-gradient(135deg, rgba(155, 93, 255, 0.45), rgba(255, 107, 157, 0.35));
  color: #fff;
  font-size: 0.95rem;
  box-shadow: 0 0 24px rgba(155, 93, 255, 0.25);
}

.cbe-xp-trans__cta:hover {
  filter: brightness(1.1);
}

.cbe-xp-trans--blackout-dim .cbe-xp-trans__veil {
  animation: cbe-xp-blackout 1.1s ease-out both;
}

@keyframes cbe-xp-blackout {
  0% {
    opacity: 1;
    background: #000;
  }
  55% {
    opacity: 1;
  }
  100% {
    opacity: 0.85;
  }
}

.cbe-xp-trans--particle-sweep .cbe-xp-trans__particles {
  opacity: 1;
  animation-duration: 3.5s;
}

.cbe-xp-trans--fade-text .cbe-xp-trans__lines {
  animation: cbe-xp-text-rise 0.9s ease-out 0.15s both;
}

@keyframes cbe-xp-text-rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cbe-xp-trans--signal-interrupt .cbe-xp-trans__veil {
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.5),
    rgba(0, 0, 0, 0.5) 2px,
    rgba(255, 60, 120, 0.15) 2px,
    rgba(255, 60, 120, 0.15) 4px
  );
  animation: cbe-xp-signal 0.45s steps(3) 2;
}

@keyframes cbe-xp-signal {
  0%,
  100% {
    opacity: 0.9;
  }
  50% {
    opacity: 0.4;
  }
}

.cbe-xp-trans--ambient-sweep .cbe-xp-trans__glow {
  animation-duration: 14s;
  opacity: 0.85;
}

.cbe-xp-trans--ambient-soft .cbe-xp-trans__veil {
  background: radial-gradient(ellipse 100% 80% at 50% 100%, rgba(0, 0, 0, 0.55), transparent 55%);
}

.cbe-xp-trans--ambient-drift .cbe-xp-trans__lines {
  animation: cbe-xp-drift-in 1.4s ease-in-out both;
}

@keyframes cbe-xp-drift-in {
  from {
    opacity: 0;
    transform: translateX(-12px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
    filter: blur(0);
  }
}

.cbe-xp-trans--blackout-brief .cbe-xp-trans__veil {
  animation: cbe-xp-brief-black 0.45s ease-in-out both;
}

@keyframes cbe-xp-brief-black {
  0% {
    background: #000;
    opacity: 1;
  }
  40% {
    opacity: 1;
  }
  100% {
    opacity: 0.75;
  }
}

.cbe-xp-trans--distortion-wave .cbe-xp-trans__lines {
  animation: cbe-xp-wave 1s ease-out both;
}

@keyframes cbe-xp-wave {
  0% {
    transform: skewX(-2deg) translateX(-6px);
    opacity: 0;
  }
  100% {
    transform: skewX(0) translateX(0);
    opacity: 1;
  }
}

.cbe-xp-trans--countdown-dissolve .cbe-xp-trans__line1 {
  animation: cbe-xp-pulse-title 1.2s ease-in-out infinite;
}

@keyframes cbe-xp-pulse-title {
  0%,
  100% {
    text-shadow: 0 0 20px rgba(255, 143, 179, 0.4);
  }
  50% {
    text-shadow: 0 0 48px rgba(255, 60, 100, 0.65);
  }
}

.cbe-xp-trans--long-hold .cbe-xp-trans__veil {
  animation: cbe-xp-longhold 1.1s ease-in-out both;
}

@keyframes cbe-xp-longhold {
  0% {
    opacity: 1;
    background: rgba(0, 0, 0, 0.92);
  }
  70% {
    opacity: 1;
  }
  100% {
    opacity: 0.78;
  }
}

.cbe-xp-trans--compile-sweep .cbe-xp-trans__particles {
  opacity: 1;
  animation: cbe-xp-compile 2s ease-out both;
}

@keyframes cbe-xp-compile {
  from {
    transform: translateY(20%) scale(1.1);
    opacity: 0.6;
  }
  to {
    transform: translateY(-10%) scale(1);
    opacity: 0;
  }
}

.cbe-xp-trans--fade-distort .cbe-xp-trans__lines {
  animation: cbe-xp-fade-distort 0.75s ease-out both;
}

@keyframes cbe-xp-fade-distort {
  from {
    opacity: 0;
    transform: scale(0.98);
    filter: saturate(0.3);
  }
  to {
    opacity: 1;
    transform: scale(1);
    filter: saturate(1);
  }
}

.cbe-xp-trans--noise-slice .cbe-xp-trans__veil {
  clip-path: inset(0 0 0 0);
  animation: cbe-xp-slice 0.6s ease-out both;
}

@keyframes cbe-xp-slice {
  from {
    clip-path: inset(0 100% 0 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}

/* --- Per-simulation layouts ------------------------------------ */
.cbe-xp-layout-pressure .cbe-choices {
  max-width: 34rem;
  margin-left: auto;
  margin-right: auto;
}

.cbe-xp-layout-pressure.cbe-stage-inner--sim .scene-narrative-card,
.cbe-xp-layout-pressure.cbe-stage-inner--sim .cbe-body {
  box-shadow: 0 0 0 1px rgba(109, 213, 255, 0.12), 0 0 60px rgba(0, 0, 0, 0.35);
}

.cbe-xp-layout-social .cbe-choice {
  min-height: 4.25rem;
  padding: 1.2rem 1.35rem;
  font-size: 1.05rem;
}

.cbe-xp-layout-split .cbe-choices {
  border-left: 2px solid rgba(255, 107, 157, 0.22);
  padding-left: 1rem;
  margin-top: 0.25rem;
}

@media (min-width: 860px) {
  .cbe-xp-layout-split .cbe-body {
    max-width: 48rem;
  }
}

.cbe-xp-layout-hud .cbe-choice {
  border-radius: 10px;
  border-left: 3px solid rgba(109, 213, 255, 0.55);
}

.cbe-xp-layout-hud .cbe-choices {
  gap: 0.55rem;
}

.cbe-xp-layout-cinematic .cbe-body {
  max-width: 40rem;
}

.cbe-xp-layout-cinematic .cbe-choice {
  border-radius: 18px;
  padding: 1.2rem 1.4rem;
}

.cbe-xp-layout-clinical .cbe-choices {
  transform: skewX(-0.5deg);
}

.cbe-xp-layout-clinical .cbe-choice {
  transform: skewX(0.5deg);
}

.cbe-xp-layout-asymmetric .cbe-choices {
  margin-left: 0;
  margin-right: clamp(0rem, 8vw, 4rem);
}

@media (min-width: 860px) {
  .cbe-xp-layout-asymmetric .cbe-body {
    max-width: 42rem;
  }
}

.cbe-xp-layout-compact .cbe-choices {
  gap: 0.55rem;
}

.cbe-xp-layout-compact .cbe-choice {
  font-size: 0.93rem;
  padding: 0.75rem 0.95rem;
}

.cbe-xp-layout-stagger .cbe-choices {
  gap: 0.85rem;
}

.cbe-xp-layout-manifesto .cbe-choice {
  font-size: 1.06rem;
  line-height: 1.45;
  letter-spacing: 0.015em;
  padding: 1.2rem 1.35rem;
}

.cbe-xp-choices--ranked .cbe-choice:nth-child(1) {
  min-height: 3.4rem;
}
.cbe-xp-choices--ranked .cbe-choice:nth-child(2),
.cbe-xp-choices--ranked .cbe-choice:nth-child(3) {
  min-height: 2.85rem;
}

.cbe-xp-choice-stagger {
  opacity: 0;
  transform: translateY(10px);
  animation: cbe-xp-stagger-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes cbe-xp-stagger-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cbe-xp-delay-label .cbe-phase-tag {
  opacity: 0;
  animation: cbe-xp-label-pop 0.55s ease forwards;
  animation-delay: var(--cbe-xp-label-delay, 380ms);
}

@keyframes cbe-xp-label-pop {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Visual timer (no auto-submit) ----------------------------- */
.cbe-xp-pressure-timer {
  margin-bottom: 1rem;
  max-width: 100% !important;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  outline: 1px solid rgba(255, 107, 157, 0.25);
  animation: alertForTimer 1s  infinite;
}

@keyframes alertForTimer {
  0%{
  outline: 1px solid rgba(255, 107, 157, 0.25);
  }
  50%{
  outline: 1px solid rgb(255, 107, 156);
  }
  100%{
  outline: 1px solid rgba(255, 107, 157, 0.25);
  }
}

 /* stops the outline animation of the timer when the timer ends */
.timerAnimationStop{
  animation: none;
}

.cbe-xp-timer-label {
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 211, 105, 0.85);
  margin-bottom: 0.35rem;
}

.cbe-xp-timer-track {
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-bottom: 0.35rem;
}

.cbe-xp-timer-fill {
  height: 100%;
  width: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff6b9d, #9b5dff, #6dd5ff);
  transition: width 0.25s linear;
}

.cbe-xp-timer-seconds {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  font-size: 1.35rem;
  color: rgba(255, 240, 250, 0.95);
  text-align: right;
}

.cbe-xp-timer-hint {
  margin: 0.5rem 0 0;
  font-size: 0.82rem;
  line-height: 1.45;
  text-align: center;
  color: rgba(255, 211, 105, 0.92);
}


.cbe-xp-timer--expired .cbe-xp-timer-track {
  border-color: rgba(255, 107, 157, 0.55);
}

.cbe-xp-timer--expired .cbe-xp-timer-fill {
  width: 0 !important;
  opacity: 0.35;
}

.cbe-tx-line3 {
  font-size: clamp(0.95rem, 2.2vw, 1.25rem);
  line-height: 1.55;
  letter-spacing: 1px;
  color: rgba(226, 232, 255, 0.88);
  max-width: 36rem;
  margin: 0.75rem auto 0;
  text-align: center;
}

.cbe-results-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.5rem;
}

.cbe-btn-ir {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  text-align: center;
}

/* --- Chaos disruption profiles --------------------------------- */
.cbe-xp-chaos-profile--spotlight-break .cbe-glitch-sweep {
  opacity: 0.65;
}

.cbe-xp-chaos-profile--breath-tension .cbe-scanlines {
  opacity: 0.22;
  animation: none;
}

.cbe-xp-chaos-profile--accent-mutate .cbe-chaos-disruption {
  background: radial-gradient(ellipse at 50% 0%, rgba(255, 107, 157, 0.2), transparent 55%);
}

.cbe-xp-chaos-profile--pressure-overlay .cbe-chaos-disruption {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.25), rgba(255, 60, 100, 0.08));
}

.cbe-xp-chaos-profile--heavy-emotion .cbe-glitch-sweep {
  opacity: 0.85;
}

.cbe-xp-chaos-profile--ui-interrupt .cbe-chaos-noise {
  animation-duration: 1.2s;
  opacity: 0.22;
}

.cbe-xp-chaos-profile--fog-shift .cbe-scanlines {
  opacity: 0.18;
}

.cbe-xp-chaos-profile--urgent-pulse .cbe-glitch-sweep {
  animation-duration: 1.6s;
}

.cbe-xp-chaos-profile--dual-glow .cbe-chaos-disruption {
  background: radial-gradient(circle at 20% 50%, rgba(155, 93, 255, 0.15), transparent 40%),
    radial-gradient(circle at 85% 40%, rgba(109, 213, 255, 0.12), transparent 42%);
}

.cbe-xp-chaos-profile--max-intensity .cbe-glitch-sweep {
  animation-duration: 1s;
  opacity: 0.95;
}

.cbe-xp-chaos-profile--max-intensity .cbe-scanlines {
  opacity: 0.48;
  animation-duration: 0.22s;
}

.cbe-xp-chaos-profile--max-intensity .cbe-chaos-noise {
  opacity: 0.28;
}

.cbe-xp-chaos-g8 .cbe-stage-inner--chaos {
  animation-duration: 0.32s;
}

@media (prefers-reduced-motion: reduce) {
  .cbe-xp-trans,
  .cbe-xp-trans__particles,
  .cbe-xp-trans__glow,
  .cbe-xp-trans__veil,
  .cbe-xp-trans__lines,
  .cbe-xp-choice-stagger,
  .cbe-chaos-noise {
    animation: none !important;
  }
  .cbe-xp-choice-stagger {
    opacity: 1;
    transform: none;
  }
  .cbe-xp-delay-label .cbe-phase-tag {
    opacity: 1;
    animation: none;
  }
}

/* --- Per-game accent (inset glows — avoids clobbering scene-screen pseudos) --- */
.cbe-stage.cbe-gen-g1 {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07), 0 12px 48px rgba(0, 0, 0, 0.35),
    inset -45% -35% 100px rgba(109, 213, 255, 0.14);
}
.cbe-stage.cbe-gen-g2 {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07), 0 12px 48px rgba(0, 0, 0, 0.35),
    inset 40% 60% 110px rgba(155, 93, 255, 0.16);
}
.cbe-stage.cbe-gen-g3 {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07), 0 12px 48px rgba(0, 0, 0, 0.35),
    inset 0 -35% 90px rgba(181, 125, 255, 0.12);
}
.cbe-stage.cbe-gen-g4 {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07), 0 12px 48px rgba(0, 0, 0, 0.35),
    inset 50% 80% 100px rgba(109, 213, 255, 0.15);
}
.cbe-stage.cbe-gen-g5 {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07), 0 12px 48px rgba(0, 0, 0, 0.35),
    inset -30% 20% 100px rgba(255, 107, 157, 0.12);
}
.cbe-stage.cbe-gen-g6 {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07), 0 12px 48px rgba(0, 0, 0, 0.35),
    inset 85% 40% 120px rgba(255, 143, 179, 0.14);
}
.cbe-stage.cbe-gen-g7 {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07), 0 12px 48px rgba(0, 0, 0, 0.35),
    inset 0 90% 120px rgba(139, 163, 212, 0.12);
}
.cbe-stage.cbe-gen-g8 {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07), 0 12px 48px rgba(0, 0, 0, 0.35),
    inset -20% -20% 100px rgba(255, 143, 179, 0.16);
}
.cbe-stage.cbe-gen-g9 {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07), 0 12px 48px rgba(0, 0, 0, 0.35),
    inset 70% 30% 110px rgba(155, 93, 255, 0.13);
}
.cbe-stage.cbe-gen-g10 {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07), 0 12px 48px rgba(0, 0, 0, 0.35),
    inset 25% 85% 100px rgba(255, 107, 157, 0.14);
}

/* --- Effect utility classes (on .cbe-stage; paired with CBE_VISUALS.effect) --- */
.cbe-stage.cbe-effect-aurora-cool .cbe-game-title {
  filter: drop-shadow(0 0 18px rgba(109, 213, 255, 0.35));
}
.cbe-stage.cbe-effect-glow-violet .cbe-game-title {
  filter: drop-shadow(0 0 22px rgba(155, 93, 255, 0.45));
}
.cbe-stage.cbe-effect-drift-soft {
  animation: cbe-drift-hue 18s ease-in-out infinite;
}
@keyframes cbe-drift-hue {
  0%,
  100% {
    filter: hue-rotate(0deg);
  }
  50% {
    filter: hue-rotate(12deg);
  }
}
.cbe-stage.cbe-effect-hud-pulse .cbe-progress-fill {
  animation: cbe-progress-shimmer 2.2s ease-in-out infinite;
}
.cbe-stage.cbe-effect-tension-edge {
  animation: cbe-tension-border 3.2s ease-in-out infinite;
}
@keyframes cbe-tension-border {
  0%,
  100% {
    border-color: rgba(255, 255, 255, 0.1);
  }
  50% {
    border-color: rgba(255, 107, 157, 0.45);
  }
}
.cbe-stage.cbe-effect-role-glow .cbe-stage-inner {
  border-radius: 14px;
  box-shadow: 0 0 48px rgba(255, 143, 179, 0.1);
}
.cbe-stage.cbe-effect-cold-void {
  filter: saturate(0.92);
}
.cbe-stage.cbe-effect-urgency-ring {
  animation: cbe-clash-border 2.8s ease-in-out infinite;
}
.cbe-stage.cbe-effect-overload-shimmer .cbe-choice {
  background: rgba(12, 18, 48, 0.5);
}
.cbe-stage.cbe-effect-clash-wave {
  animation: cbe-clash-border 8s ease-in-out infinite;
}
@keyframes cbe-clash-border {
  0%,
  100% {
    border-color: rgba(255, 255, 255, 0.1);
  }
  50% {
    border-color: rgba(255, 107, 157, 0.38);
  }
}

/* --- Results CBE 5 / 6 ------------------------------------------ */
.cbe-results-shell {
  padding: 1.5rem 1.35rem 2.25rem;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  max-width: 100%;
}

.cbe-results-hero {
  padding-bottom: 1.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cbe-results-screen-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(125, 214, 255, 0.88);
  margin-bottom: 0.65rem;
}

.cbe-results-screen-label--secondary {
  margin-top: 0.25rem;
  color: rgba(255, 211, 105, 0.85);
}

.cbe-results-title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800;
  margin: 0 0 1rem;
  background: linear-gradient(135deg, #ff6b9d 0%, #9b5dff 55%, #ffd93d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.cbe-results-kicker {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(125, 214, 255, 0.85);
  margin-bottom: 0.35rem;
}

.cbe-nav-summary {
  font-size: 1.12rem;
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 0.25rem;
  color: rgba(255, 255, 255, 0.95);
}

/* --- Results: flow diagram + dimension bars ------------------------- */
.cbe-results-flow {
  margin-bottom: 1.5rem;
  padding: 1rem 1.1rem 1.1rem;
  border-radius: 14px;
  border: 1px solid rgba(125, 214, 255, 0.22);
  background: rgba(8, 17, 58, 0.35);
}

.cbe-results-flow-title {
  margin-top: 0;
}

.cbe-results-flow-track {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.35rem 0.25rem;
  margin: 0.75rem 0 0.5rem;
}

.cbe-results-flow-step {
  flex: 1 1 7.5rem;
  min-width: 7rem;
  padding: 0.65rem 0.55rem;
  border-radius: 10px;
  border: 1px solid rgba(155, 93, 255, 0.28);
  background: rgba(155, 93, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.cbe-results-flow-num {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255, 211, 105, 0.9);
}

.cbe-results-flow-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
}

.cbe-results-flow-desc {
  font-size: 0.72rem;
  line-height: 1.45;
  color: rgba(196, 210, 255, 0.82);
}

.cbe-results-flow-arrow {
  align-self: center;
  font-size: 1rem;
  color: rgba(125, 214, 255, 0.65);
  padding: 0 0.15rem;
}

.cbe-results-flow-note {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
}

.cbe-results-flow-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.5rem;
  margin: 0.15rem 0 0.25rem;
}

.cbe-flow-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.74rem;
  color: rgba(226, 232, 255, 0.9);
}

.cbe-flow-chip-dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 999px;
  flex: 0 0 auto;
}

.cbe-flow-chip.is-primary .cbe-flow-chip-dot {
  background: rgba(255, 107, 157, 0.95);
}

.cbe-flow-chip.is-secondary .cbe-flow-chip-dot {
  background: rgba(155, 93, 255, 0.9);
}

.cbe-flow-chip.is-tradeoff .cbe-flow-chip-dot {
  background: rgba(125, 214, 255, 0.55);
}

.cbe-flow-chip-pts {
  font-weight: 700;
  color: rgba(255, 211, 105, 0.92);
}

.cbe-dim-bars {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin: 0.5rem 0 1rem;
}

.cbe-dim-bar-row {
  display: grid;
  grid-template-columns: minmax(7rem, 1fr) minmax(4rem, 5.5rem) 2rem;
  gap: 0.45rem 0.55rem;
  align-items: center;
}

.cbe-dim-bar-label-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.cbe-dim-bar-level {
  font-size: 0.68rem;
  line-height: 1.25;
  color: rgba(200, 208, 255, 0.72);
  font-style: normal;
}

.cbe-dim-bar-row--top .cbe-dim-bar-fill {
  background: linear-gradient(90deg, rgba(155, 93, 255, 0.75), rgba(255, 107, 157, 0.65));
}

.cbe-dim-bar-label {
  font-size: 0.78rem;
  line-height: 1.3;
  color: rgba(226, 232, 255, 0.9);
}

.cbe-dim-bar-track {
  height: 0.4rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.cbe-dim-bar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(125, 214, 255, 0.65), rgba(155, 93, 255, 0.55));
  min-width: 2px;
  transition: width 0.4s ease;
}

.cbe-dim-bar-pct {
  font-size: 0.65rem;
  font-weight: 500;
  text-align: right;
  color: rgba(200, 208, 255, 0.55);
}

@media (max-width: 640px) {
  .cbe-results-flow-arrow {
    display: none;
  }
  .cbe-results-flow-step {
    flex: 1 1 100%;
  }
  .cbe-dim-bar-row {
    grid-template-columns: 1fr 2rem;
    grid-template-rows: auto auto;
  }
  .cbe-dim-bar-label-wrap {
    grid-column: 1 / -1;
  }
  .cbe-dim-bar-track {
    grid-column: 1;
  }
  .cbe-dim-bar-pct {
    grid-column: 2;
    grid-row: 2;
  }
}

.cbe-core-message {
  font-size: 1.05rem;
  line-height: 1.45;
  font-weight: 600;
  color: rgba(232, 236, 255, 0.95);
  margin: 0.35rem 0 0.75rem;
  max-width: 36rem;
}

.cbe-reflection {
  margin: 1.5rem 0 1rem;
  padding: 1rem 1.1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(155, 93, 255, 0.18);
}

.cbe-reflection-list {
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
  color: rgba(226, 232, 255, 0.92);
}

.cbe-reflection-q {
  margin: 0.5rem 0;
  line-height: 1.45;
}

.cbe-narrative-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 211, 105, 0.85);
  margin: 0.75rem 0 0.2rem;
}

.cbe-dim-level-tag {
  font-size: 0.78rem;
  color: rgba(200, 208, 255, 0.78);
  margin: 0 0 0.35rem;
  font-style: italic;
}

.cbe-signal-microcopy {
  font-size: 0.78rem;
  line-height: 1.45;
  margin: 0.35rem 0 0.85rem;
}

.cbe-coverage-note,
.cbe-repeat-hint {
  font-size: 0.8rem;
  line-height: 1.45;
  max-width: 40rem;
}

.cbe-results-actions {
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}

.cbe-repeat-hint {
  flex: 1 1 100%;
  margin: 0.25rem 0 0;
  order: 3;
}

.cbe-h2 {
  font-size: 1rem;
  font-weight: 700;
  margin: 1.5rem 0 0.5rem;
  color: rgba(255, 211, 105, 0.95);
}

.cbe-h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 1rem 0 0.35rem;
  color: rgba(255, 255, 255, 0.92);
}

.cbe-dominant-list,
.cbe-secondary-list {
  margin: 0;
  padding-left: 1.2rem;
  color: rgba(226, 232, 255, 0.92);
  line-height: 1.6;
}

.cbe-sec-body {
  margin: 0 0 0.5rem;
  line-height: 1.65;
  color: rgba(210, 220, 255, 0.88);
}

.cbe-muted {
  font-size: 0.9rem;
  color: rgba(180, 195, 230, 0.75);
}

.cbe-disclaimer {
  margin-top: 2rem;
  font-size: 0.85rem;
  line-height: 1.55;
  color: rgba(160, 175, 210, 0.85);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1.25rem;
}

.cbe-btn-primary,
.cbe-btn-ghost {
  display: inline-block;
  margin-right: 0.75rem;
  margin-top: 0.5rem;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.95rem;
  border: none;
}

.cbe-btn-primary {
  background: linear-gradient(135deg, rgba(155, 93, 255, 0.35) 0%, rgba(255, 107, 157, 0.3) 100%);
  border: 2px solid rgba(155, 93, 255, 0.55);
  color: #fff;
}

.cbe-btn-primary:hover:not(:disabled) {
  filter: brightness(1.08);
}

.cbe-btn-ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.88);
}

.cbe-error {
  color: #ff8fb8;
  padding: 2rem 0;
  line-height: 1.6;
}

.cbe-resume {
  max-width: 480px;
  margin: 3rem auto;
  text-align: center;
  padding: 2rem;
  border-radius: 16px;
  border: 1px solid rgba(155, 93, 255, 0.35);
  background: rgba(8, 17, 58, 0.5);
}

.cbe-resume-title {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: rgba(255, 255, 255, 0.92);
}

.cbe-resume-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

body.cbe-active .chaos-flamey-visual {
  top: auto;
  bottom: 5.5rem;
  right: 0.65rem;
  transform: none;
  width: 86px;
  opacity: 0.36;
  z-index: 12;
}

body.cbe-active .chaos-flamey-img {
  opacity: 0.85;
  mix-blend-mode: screen;
}

@media (max-width: 1024px) {
   .cbe-root {
    padding-right: 5rem;
    padding-left: 5rem;
  }
}

@media (max-width: 900px) {
  .cbe-root {
    padding-right: 0.85rem;
    padding-left: 0.85rem;
  }
  body.cbe-active .chaos-flamey-visual {
    width: 72px;
    bottom: 4.75rem;
    opacity: 0.28;
  }
}

@media (max-width: 640px) {
  body.cbe-active .chaos-flamey-visual {
    display: none !important;
  }
}

@media (max-width: 520px) {
  .cbe-main .cbe-stage.scene-screen {
    padding: 1.05rem 1rem 1.35rem;
    border-radius: 16px;
  }

  .cbe-choice {
    padding: 0.85rem 1rem;
   letter-spacing: 0.5px;  
  }

  .cbe-footer-actions {
    justify-content: stretch;
  }

  .cbe-footer-actions .cbe-btn-continue {
    width: 100%;
  }

  .cbe-xp-trans__bar {
    flex-direction: column;
    align-items: stretch;
  }

  .cbe-xp-trans__cta {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 640px){
  .cbe-resume {
    margin: 3rem 1rem;
  }
}

/* --- Per-game FREE / PREMIUM session notes (results) ---------------- */
.cbe-per-game-insight {
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(155, 93, 255, 0.12);
}

.cbe-per-game-insight:last-of-type {
  border-bottom: none;
}

.cbe-per-game-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.35rem;
}

.cbe-per-game-id {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.75;
  color: rgba(125, 214, 255, 0.95);
}

.cbe-per-game-tier {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(255, 211, 105, 0.85);
}

.cbe-per-game-title {
  margin-top: 0;
}

.cbe-per-game-body {
  margin-top: 0.35rem;
}

.cbe-per-game-details {
  margin-top: 0.35rem;
}

.cbe-per-game-details-summary {
  cursor: pointer;
  font-size: 0.82rem;
  color: rgba(125, 214, 255, 0.9);
  user-select: none;
}

.cbe-per-game-details[open] .cbe-per-game-details-summary {
  color: rgba(255, 211, 105, 0.92);
}

.cbe-results-free-hint {
  margin-top: 0.75rem;
  max-width: 42rem;
}

.cbe-results-upsell {
  margin-top: 1.25rem;
  padding: 1.1rem 1.25rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 211, 105, 0.35);
  background: linear-gradient(135deg, rgba(255, 211, 105, 0.08), rgba(155, 93, 255, 0.1));
}

.cbe-results-upsell .cbe-h3 {
  margin-top: 0;
}

.cbe-results-upsell-cta {
  display: inline-block;
  margin-top: 0.85rem;
  text-decoration: none;
  text-align: center;
}

/* --- Premium gate (free tier, after G5) ----------------------------- */
.cbe-premium-gate {
  max-width: 42rem;
  margin: 0 auto;
  padding: 1.5rem 1rem 2.5rem;
}

.cbe-premium-gate-hero {
  text-align: center;
  margin-bottom: 1.75rem;
}

.cbe-premium-gate-title {
  margin: 0.65rem 0 0.75rem;
  font-size: clamp(1.45rem, 4vw, 1.85rem);
  line-height: 1.25;
  color: #f0f3ff;
}

.cbe-premium-gate-lead {
  margin: 0 auto;
  max-width: 36rem;
  font-size: 0.98rem;
  line-height: 1.6;
  color: rgba(226, 232, 255, 0.88);
}

.cbe-premium-gate-list-wrap {
  margin: 1.5rem 0;
}

.cbe-premium-gate-list-title {
  margin-bottom: 0.85rem;
  font-size: 1rem;
  opacity: 0.92;
}

.cbe-premium-gate-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cbe-premium-gate-item {
  position: relative;
  padding: 1rem 1.1rem;
  border-radius: 12px;
  border: 1px solid rgba(155, 93, 255, 0.22);
  background: linear-gradient(135deg, rgba(8, 17, 58, 0.65), rgba(155, 93, 255, 0.06));
}

.cbe-premium-gate-item.is-locked {
  opacity: 0.82;
}

.cbe-premium-gate-item-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  margin-bottom: 0.35rem;
}

.cbe-premium-gate-item-icon {
  font-size: 0.95rem;
  line-height: 1;
}

.cbe-premium-gate-item-id {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(125, 214, 255, 0.85);
}

.cbe-premium-gate-item-badge {
  margin-left: auto;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  color: rgba(255, 211, 105, 0.95);
  border: 1px solid rgba(255, 211, 105, 0.45);
  background: rgba(255, 211, 105, 0.08);
}

.cbe-premium-gate-item-title {
  margin: 0.15rem 0 0.35rem;
  font-size: 1.02rem;
  color: #eef1ff;
}

.cbe-premium-gate-item-desc {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.55;
  color: rgba(200, 208, 255, 0.78);
}

.cbe-premium-gate-upsell {
  margin-top: 1.35rem;
  padding: 1.1rem 1.25rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 211, 105, 0.35);
  background: linear-gradient(135deg, rgba(255, 211, 105, 0.08), rgba(155, 93, 255, 0.1));
  text-align: center;
}

.cbe-premium-gate-upsell .cbe-h3 {
  margin-top: 0;
}

.cbe-premium-gate-cta {
  display: inline-block;
  margin-top: 0.85rem;
  text-decoration: none;
}

.cbe-premium-gate-actions {
  margin-top: 1.25rem;
  text-align: center;
}

.cbe-premium-gate-skip {
  font-size: 0.92rem;
}

.cbe-results-shell[data-cbe-tier='free'] .cbe-per-game-tier {
  color: rgba(125, 214, 255, 0.9);
}

.cbe-results-shell[data-cbe-tier='premium'] .cbe-per-game-tier {
  color: rgba(255, 211, 105, 0.9);
}

/* --- Behavioral Navigation Map (qualitative radar) ---------------- */
.cbe-bnav {
  margin: 1.75rem 0 2rem;
  padding: 1.5rem 1.35rem;
  border-radius: 16px;
  border: 1px solid rgba(155, 93, 255, 0.28);
  background: linear-gradient(
    165deg,
    rgba(8, 17, 58, 0.55) 0%,
    rgba(155, 93, 255, 0.08) 100%
  );
}

.cbe-bnav-title {
  margin-top: 0;
}

.cbe-bnav-subtitle {
  max-width: 52ch;
  line-height: 1.65;
}

.cbe-bnav-chart-name {
  margin-top: 1.25rem;
  color: rgba(125, 214, 255, 0.95);
}

.cbe-bnav-chart-wrap {
  display: flex;
  justify-content: center;
  margin: 1.25rem auto 1rem;
  max-width: min(100%, 360px);
}

.cbe-bnav-radar-svg {
  width: 100%;
  height: auto;
  display: block;
}

.cbe-bnav-ring {
  fill: none;
  stroke: rgba(148, 163, 255, 0.2);
  stroke-width: 1;
}

.cbe-bnav-ring--3 {
  stroke: rgba(155, 93, 255, 0.35);
}

.cbe-bnav-axis {
  stroke: rgba(148, 163, 255, 0.15);
  stroke-width: 1;
}

.cbe-bnav-data {
  fill: rgba(57, 242, 255, 0.22);
  stroke: rgba(57, 242, 255, 0.75);
  stroke-width: 2;
  stroke-linejoin: round;
}

.cbe-bnav-axis-label {
  fill: rgba(229, 233, 255, 0.88);
  font-size: 9px;
  font-family: Manrope, "Noto Sans Greek", sans-serif;
  font-weight: 600;
}

@media (min-width: 480px) {
  .cbe-bnav-axis-label {
    font-size: 10px;
  }
}

.cbe-bnav-legend-list {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

@media (min-width: 560px) {
  .cbe-bnav-legend-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

.cbe-bnav-legend-item {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  background: rgba(8, 17, 58, 0.45);
  font-size: 0.85rem;
}

.cbe-bnav-legend-item-name {
  color: rgba(229, 233, 255, 0.9);
}

.cbe-bnav-legend-item-level {
  color: rgba(255, 168, 84, 0.9);
  font-weight: 600;
  white-space: nowrap;
}

.cbe-bnav-insights {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

@media (min-width: 720px) {
  .cbe-bnav-insights {
    grid-template-columns: repeat(3, 1fr);
  }
}

.cbe-bnav-insight-card {
  padding: 1rem 1.1rem;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 255, 0.22);
  background: rgba(10, 18, 40, 0.65);
}

.cbe-bnav-insight-title {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(125, 214, 255, 0.9);
}

.cbe-bnav-insight-signal {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #f0f2ff;
  line-height: 1.35;
}

.cbe-bnav-insight-level {
  display: inline-block;
  margin-bottom: 0.65rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(155, 93, 255, 0.2);
  border: 1px solid rgba(155, 93, 255, 0.35);
  color: rgba(255, 220, 180, 0.95);
}

.cbe-bnav-insight-body {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: rgba(229, 233, 255, 0.78);
}

.cbe-bnav-disclaimer {
  margin: 0;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px dashed rgba(148, 163, 255, 0.28);
  font-size: 0.82rem;
  line-height: 1.55;
  color: rgba(229, 233, 255, 0.65);
}

.cbe-dim-bar-pct {
  display: none;
}

.cbe-results-shell[data-cbe-tier='premium'] .cbe-dim-bar-pct {
  display: none;
}
