/* Unified Brain V22 — post–Activate Angel cutover UI */

body.brain-cutover-active #input-screen,
body.brain-cutover-active #predicted-screen {
  --brain-accent: #00e5ff;
  --brain-accent-2: #a855f7;
  --brain-panel: rgba(8, 12, 28, 0.94);
  --brain-border: rgba(0, 229, 255, 0.45);
}

.brain-command-center {
  position: relative;
  margin: 0 0 14px;
  padding: 14px 12px 12px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(6, 14, 32, 0.97), rgba(18, 8, 36, 0.92));
  border: 1px solid var(--brain-border, rgba(0, 229, 255, 0.45));
  box-shadow:
    0 0 28px rgba(0, 229, 255, 0.12),
    inset 0 0 40px rgba(168, 85, 247, 0.06);
  overflow: hidden;
  font-family: 'Share Tech Mono', monospace;
  z-index: 2;
}

.brain-command-center::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 16px;
  background: conic-gradient(
    from 0deg,
    transparent,
    rgba(0, 229, 255, 0.35),
    rgba(168, 85, 247, 0.35),
    transparent
  );
  animation: brain-ring-spin 6s linear infinite;
  z-index: -1;
  opacity: 0.55;
}

@keyframes brain-ring-spin {
  to {
    transform: rotate(360deg);
  }
}

.brain-tile-glow-money {
  animation: brain-money-glow 2.2s ease-in-out infinite;
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.55);
}

.brain-tile-chip--support.brain-tile-glow-support {
  animation: brain-support-glow 2.8s ease-in-out infinite;
}

.brain-cc-live-phase {
  border-top: 1px dashed rgba(0, 229, 255, 0.25);
  padding-top: 10px;
  margin-top: 4px;
}

@keyframes brain-money-glow {
  0%,
  100% {
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.35);
  }
  50% {
    box-shadow: 0 0 22px rgba(168, 85, 247, 0.55);
  }
}

@keyframes brain-support-glow {
  0%,
  100% {
    opacity: 0.85;
  }
  50% {
    opacity: 1;
    box-shadow: 0 0 8px rgba(148, 163, 184, 0.45);
  }
}

.brain-cc-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.brain-cc-title {
  font-size: 13px;
  font-weight: bold;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #e0f7ff;
  text-shadow: 0 0 12px rgba(0, 229, 255, 0.6);
}

.brain-cc-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 0.08em;
  color: #061018;
  background: linear-gradient(90deg, #00e5ff, #7dd3fc);
  animation: brain-badge-pulse 2s ease-in-out infinite;
}

@keyframes brain-badge-pulse {
  0%,
  100% {
    box-shadow: 0 0 8px rgba(0, 229, 255, 0.5);
  }
  50% {
    box-shadow: 0 0 18px rgba(0, 229, 255, 0.9);
  }
}

.brain-cc-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #061018;
  animation: brain-dot-blink 1.2s step-end infinite;
}

@keyframes brain-dot-blink {
  50% {
    opacity: 0.2;
  }
}

.brain-cc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.brain-cc-block {
  padding: 10px;
  border-radius: 10px;
  background: rgba(0, 20, 40, 0.55);
  border: 1px solid rgba(0, 229, 255, 0.2);
}

.brain-cc-block h4 {
  margin: 0 0 8px;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7dd3fc;
}

.brain-cc-main-tile {
  font-size: 28px;
  font-weight: bold;
  color: #00e5ff;
  text-shadow: 0 0 16px rgba(0, 229, 255, 0.7);
  line-height: 1;
}

.brain-cc-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.brain-tile-chip {
  min-width: 28px;
  padding: 4px 7px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: bold;
  text-align: center;
  border: 1px solid rgba(0, 229, 255, 0.35);
  background: rgba(0, 40, 60, 0.6);
  color: #b8f4ff;
}

.brain-tile-chip--best {
  border-color: #00e5ff;
  background: rgba(0, 229, 255, 0.25);
  color: #fff;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
}

.brain-tile-chip--silver {
  border-color: #94a3b8;
  color: #e2e8f0;
}

.brain-tile-chip--golden {
  border-color: #fbbf24;
  color: #fde68a;
}

.brain-tile-chip--special {
  border-color: #c084fc;
  color: #e9d5ff;
}

.brain-tile-chip--angel {
  border-color: #34d399;
  color: #a7f3d0;
  background: rgba(16, 80, 50, 0.5);
}

.brain-cc-meter {
  margin-top: 8px;
  height: 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.brain-cc-meter-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #a855f7, #00e5ff);
  transition: width 0.6s ease;
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.6);
}

.brain-cc-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 6px;
  font-size: 10px;
  color: #9ecae8;
}

.brain-cc-meta-row strong {
  color: #e0f7ff;
}

.brain-cc-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(0, 229, 255, 0.15);
}

.brain-cc-stat {
  font-size: 9px;
  color: #7dd3fc;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.brain-cc-stat span {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: #f0f9ff;
  text-transform: none;
  letter-spacing: 0;
}

.brain-cc-evolution {
  margin-top: 8px;
  font-size: 9px;
  color: #c4b5fd;
  letter-spacing: 0.08em;
}

.brain-cc-live-bars {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 10px;
  margin: 6px 0 8px;
  padding: 8px;
  border-radius: 8px;
  background: rgba(0, 16, 32, 0.5);
  border: 1px solid rgba(0, 229, 255, 0.15);
}

.brain-cc-live-bar-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 3px;
}

.brain-cc-live-bar-label {
  font-size: 7px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #7dd3fc;
}

.brain-cc-live-bar-pct {
  font-size: 9px;
  font-weight: bold;
  color: #e0f7ff;
}

.brain-cc-meter--compact {
  margin-top: 0;
  height: 4px;
}

.brain-cc-meter-fill--adapt {
  background: linear-gradient(90deg, #34d399, #00e5ff);
}

.brain-cc-live-bars--mobile {
  margin: 6px 0;
  padding: 6px;
}

.brain-predicted-screen .grid-item.brain-predicted-tile {
  border: 2px solid #00e5ff !important;
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.55) !important;
  background: rgba(0, 60, 90, 0.85) !important;
}

.brain-predicted-screen .grid-item.brain-angel-tile {
  border: 2px solid #34d399 !important;
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.45) !important;
}

.brain-predicted-screen .grid-item.brain-best-tile {
  outline: 2px solid #a855f7;
  outline-offset: 2px;
}

body.brain-cutover-active .legacy-prediction-ui {
  display: none !important;
}

body.brain-cutover-active .input-screen-reactive-rails {
  display: none !important;
}

body.brain-cutover-active .autonomous-runtime-hud {
  display: none !important;
}

body.brain-cutover-active .unified-prototype-output {
  display: none !important;
}

body.brain-cutover-active .phase-legend-row,
body.brain-cutover-active .phase3-trace-panel {
  display: none !important;
}

/* Adaptive Survival v23 — HUD + recovery flow */
.ai-survival-hud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  justify-content: center;
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 180, 60, 0.35);
  background: rgba(40, 24, 0, 0.35);
}
.ai-survival-hud__tag {
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fd9;
  font-weight: 700;
}
.ai-survival-hud__tag--recovery {
  color: #f88;
  animation: survivalRecoveryPulse 1.2s ease-in-out infinite;
}
.ai-survival-hud__stat {
  font-size: 0.62rem;
  color: #9bb;
  text-transform: uppercase;
}
.ai-survival-hud__stat strong {
  color: #bfb;
}
@keyframes survivalRecoveryPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}
.money-moment-modal--recovery {
  border-color: rgba(255, 140, 60, 0.55) !important;
  box-shadow: 0 0 28px rgba(255, 100, 0, 0.2) !important;
}
.survival-recovery-layer {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.72);
  padding: 16px;
}
.survival-recovery-scan {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(255, 160, 0, 0.06) 3px,
    rgba(255, 160, 0, 0.06) 6px
  );
  animation: survivalScanMove 2.5s linear infinite;
  pointer-events: none;
}
@keyframes survivalScanMove {
  from { transform: translateY(-8px); }
  to { transform: translateY(8px); }
}
.survival-recovery-card {
  position: relative;
  max-width: 420px;
  width: 100%;
  padding: 18px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 180, 80, 0.5);
  background: linear-gradient(165deg, rgba(48, 20, 0, 0.95), rgba(12, 6, 0, 0.98));
  text-align: center;
}
.survival-recovery-kicker {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: #fd9;
  margin: 0 0 8px;
}
.survival-recovery-title {
  margin: 0 0 10px;
  color: #ffa;
  font-size: 1.15rem;
}
.survival-recovery-msg,
.survival-recovery-apology {
  font-size: 0.82rem;
  line-height: 1.45;
  color: #ccc;
  margin: 0 0 8px;
}
.survival-recovery-tile-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  color: #8aa;
  margin-top: 12px;
}
.survival-recovery-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin: 8px auto 14px;
  border-radius: 10px;
  border: 2px solid #da0;
  background: rgba(80, 60, 0, 0.5);
  color: #ffd700;
  font-size: 1.4rem;
  font-weight: 800;
  box-shadow: 0 0 16px rgba(255, 200, 0, 0.35);
}
.survival-recovery-btn {
  border-color: rgba(255, 180, 80, 0.65) !important;
}

/* Phase 25 — GPU-friendly tiles, reduced pulse/shadow under failsafe */
.grid-item,
.predicted-safe,
.brain-live-pulse-ring {
  will-change: transform;
  transform: translateZ(0);
}
.ai-perf-failsafe .grid-item,
.ai-perf-failsafe .predicted-safe,
.ai-perf-failsafe .brain-cc-panel,
.ai-perf-failsafe .ai-survival-hud {
  box-shadow: none !important;
  filter: none !important;
  animation-duration: 2.2s !important;
}
.ai-perf-failsafe .brain-live-pulse-ring {
  animation: none !important;
  opacity: 0.35;
}
.ai-perf-mobile-lite .brain-cc-panel {
  backdrop-filter: none;
}
.ai-perf-mobile-lite .grid-item {
  transition: transform 0.12s ease, border-color 0.12s ease;
}

.stable-phase-hud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0, 255, 100, 0.35);
  background: rgba(0, 24, 8, 0.85);
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.9rem;
}
.stable-phase-hud-label {
  color: #6a6;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.stable-phase-hud-tile {
  color: #0f0;
  font-size: 1.05rem;
}
.stable-phase-hud-conf {
  color: #8f8;
  margin-left: auto;
}

/* Brain command center — single organized phase block */
.brain-cc-phase-section {
  margin: 12px 0 4px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(0, 229, 255, 0.35);
  background: rgba(4, 12, 28, 0.92);
  text-align: left;
  width: 100%;
  box-sizing: border-box;
}

.brain-cc-phase-section--learning {
  border-color: rgba(148, 163, 184, 0.4);
}

.brain-cc-phase-section--silver {
  border-color: rgba(148, 163, 184, 0.55);
  box-shadow: 0 0 14px rgba(148, 163, 184, 0.15);
}

.brain-cc-phase-section--golden {
  border-color: rgba(255, 215, 0, 0.45);
  box-shadow: 0 0 14px rgba(255, 215, 0, 0.12);
}

.brain-cc-phase-section--special {
  border-color: rgba(168, 85, 247, 0.5);
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.15);
}

.brain-cc-phase-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.brain-cc-phase-section__label {
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #e0f7ff;
}

.brain-cc-phase-section__status {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.45);
}

.brain-cc-phase-section__status--ready {
  color: #6ee7b7;
  border-color: rgba(52, 211, 153, 0.55);
}

.brain-cc-phase-section__count {
  font-size: 15px;
  font-weight: bold;
  color: #a5f3fc;
  margin-bottom: 8px;
}

.brain-cc-phase-section__hint,
.brain-cc-phase-section__reason {
  margin: 8px 0 0;
  font-size: 11px;
  line-height: 1.45;
  color: #94a3b8;
}

.brain-cc-meter--phase {
  height: 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  overflow: hidden;
}

.brain-cc-meter-fill--phase {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #0ea5e9, #34d399);
  transition: width 0.35s ease;
}

.brain-cc-phase-tile-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.brain-cc-phase-tile-num {
  font-size: 28px;
  color: #5eead4;
  text-shadow: 0 0 12px rgba(94, 234, 212, 0.45);
}

.brain-cc-phase-tile-conf {
  font-size: 13px;
  color: #86efac;
}

.brain-cc-phase-section__head-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.brain-cc-phase-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.brain-cc-phase-dot--silver {
  background: #e2e8f0;
  box-shadow: 0 0 12px rgba(226, 232, 240, 0.95);
  animation: brain-phase-dot-blink-silver 1.05s step-end infinite;
}

.brain-cc-phase-dot--golden {
  background: #fcd34d;
  box-shadow: 0 0 14px rgba(252, 211, 77, 0.95);
  animation: brain-phase-dot-blink-golden 1s step-end infinite;
}

.brain-cc-phase-dot--special {
  background: #c084fc;
  box-shadow: 0 0 14px rgba(192, 132, 252, 0.95);
  animation: brain-phase-dot-blink-special 1.15s ease-in-out infinite;
}

.brain-cc-phase-status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 5px;
  border-radius: 50%;
  background: currentColor;
  animation: brain-dot-blink 1.1s step-end infinite;
  vertical-align: middle;
}

@keyframes brain-phase-dot-blink-silver {
  0%,
  45% {
    opacity: 1;
    box-shadow: 0 0 14px rgba(226, 232, 240, 1);
  }
  50%,
  100% {
    opacity: 0.35;
    box-shadow: 0 0 4px rgba(148, 163, 184, 0.4);
  }
}

@keyframes brain-phase-dot-blink-golden {
  0%,
  45% {
    opacity: 1;
    box-shadow: 0 0 16px rgba(255, 215, 0, 1);
  }
  50%,
  100% {
    opacity: 0.3;
    box-shadow: 0 0 4px rgba(255, 180, 0, 0.35);
  }
}

@keyframes brain-phase-dot-blink-special {
  0% {
    background: #c084fc;
    box-shadow: 0 0 12px #c084fc;
  }
  33% {
    background: #67e8f9;
    box-shadow: 0 0 12px #67e8f9;
  }
  66% {
    background: #fbbf24;
    box-shadow: 0 0 12px #fbbf24;
  }
  100% {
    background: #c084fc;
    box-shadow: 0 0 12px #c084fc;
  }
}

.brain-cc-phase-section__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.brain-cc-phase-section__body--mobile {
  grid-template-columns: 1fr;
}

.brain-cc-phase-tile-kicker {
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 2px;
}

.brain-cc-phase-tile-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.brain-cc-phase-tile-vol {
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #67e8f9;
}

.brain-cc-meter-fill--silver {
  background: linear-gradient(90deg, #94a3b8, #e2e8f0);
}

.brain-cc-meter-fill--golden {
  background: linear-gradient(90deg, #ca8a04, #fde047);
}

.brain-cc-meter-fill--special {
  background: linear-gradient(90deg, #7c3aed, #e879f9, #fbbf24);
}

.brain-cc-phase-learn {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 10px;
  font-size: 11px;
  letter-spacing: 0.04em;
}

.brain-cc-phase-learn-safe {
  color: #6ee7b7;
}

.brain-cc-phase-learn-hit {
  color: #fca5a5;
}

.brain-cc-phase-learn-acc {
  color: #bae6fd;
}

.brain-cc-phase-learn strong {
  font-weight: 700;
  margin-left: 3px;
}

.phase24-phase-grids {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 10px 0 6px;
  width: 100%;
}

.phase24-phase-grids--mobile {
  gap: 10px;
}

.brain-cc-phase-mini-wrap {
  display: flex;
  justify-content: center;
}

.brain-cc-phase-mini-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 20px);
  grid-template-rows: repeat(5, 20px);
  gap: 3px;
  padding: 6px;
  border-radius: 10px;
  border: 1px solid rgba(51, 65, 85, 0.55);
  background: rgba(4, 10, 22, 0.92);
  overflow: hidden;
}

.brain-cc-phase-mini-scan {
  position: absolute;
  left: 0;
  right: 0;
  height: 40%;
  pointer-events: none;
  z-index: 2;
  opacity: 0.5;
  animation: brain-cc-phase-mini-scan 2.4s linear infinite;
}

.brain-cc-phase-mini-scan--silver {
  background: linear-gradient(180deg, transparent, rgba(203, 213, 225, 0.22), transparent);
}

.brain-cc-phase-mini-scan--golden {
  background: linear-gradient(180deg, transparent, rgba(255, 215, 0, 0.24), transparent);
}

.brain-cc-phase-mini-scan--special {
  background: linear-gradient(180deg, transparent, rgba(192, 132, 252, 0.28), transparent);
}

@keyframes brain-cc-phase-mini-scan {
  0% {
    top: -50%;
  }
  100% {
    top: 110%;
  }
}

.brain-cc-phase-mini-cell {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  border: 1px solid rgba(51, 65, 85, 0.45);
  background: rgba(8, 14, 28, 0.88);
  font-size: 7px;
  color: #475569;
  line-height: 1;
  user-select: none;
}

.brain-cc-phase-mini-num {
  opacity: 0.55;
}

.brain-cc-phase-mini-cell--money.brain-cc-phase-mini-cell--silver {
  border-color: rgba(203, 213, 225, 0.85);
  color: #f8fafc;
  animation: brain-phase-money-pulse-silver 1.1s ease-in-out infinite;
}

.brain-cc-phase-mini-cell--money.brain-cc-phase-mini-cell--golden {
  border-color: rgba(255, 215, 0, 0.9);
  color: #fffbeb;
  animation: brain-phase-money-pulse-golden 1s ease-in-out infinite;
}

.brain-cc-phase-mini-cell--money.brain-cc-phase-mini-cell--special {
  border-color: rgba(192, 132, 252, 0.9);
  color: #faf5ff;
  animation: brain-phase-money-pulse-special 1.2s ease-in-out infinite;
}

.brain-cc-phase-mini-money {
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 0 8px currentColor;
}

@keyframes brain-phase-money-pulse-silver {
  0%,
  100% {
    box-shadow: 0 0 8px rgba(203, 213, 225, 0.5);
    background: rgba(148, 163, 184, 0.35);
  }
  50% {
    box-shadow: 0 0 16px rgba(226, 232, 240, 0.95);
    background: rgba(203, 213, 225, 0.42);
  }
}

@keyframes brain-phase-money-pulse-golden {
  0%,
  100% {
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.45);
    background: rgba(202, 138, 4, 0.35);
  }
  50% {
    box-shadow: 0 0 18px rgba(255, 215, 0, 0.95);
    background: rgba(250, 204, 21, 0.45);
  }
}

@keyframes brain-phase-money-pulse-special {
  0% {
    box-shadow: 0 0 10px rgba(192, 132, 252, 0.7);
    background: rgba(124, 58, 237, 0.35);
  }
  33% {
    box-shadow: 0 0 12px rgba(103, 232, 249, 0.75);
    background: rgba(6, 182, 212, 0.32);
  }
  66% {
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.75);
    background: rgba(245, 158, 11, 0.32);
  }
  100% {
    box-shadow: 0 0 10px rgba(192, 132, 252, 0.7);
    background: rgba(124, 58, 237, 0.35);
  }
}

.brain-cc-phase-mini-wrap--mobile .brain-cc-phase-mini-grid {
  grid-template-columns: repeat(5, 17px);
  grid-template-rows: repeat(5, 17px);
  gap: 2px;
  padding: 5px;
}

.brain-command-center--stats-only .phase-phase-grids {
  display: none;
}

/* Main prediction card (replaces cramped SAFE TILE#453% row) */
.ai-safe-panel {
  margin: 10px 0 8px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(0, 229, 255, 0.4);
  background: linear-gradient(135deg, rgba(6, 16, 36, 0.96), rgba(10, 28, 48, 0.92));
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.1);
}

.ai-safe-panel--high {
  border-color: rgba(52, 211, 153, 0.55);
}

.ai-safe-panel--medium {
  border-color: rgba(250, 204, 21, 0.5);
}

.ai-safe-panel--low {
  border-color: rgba(148, 163, 184, 0.45);
}

.ai-safe-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.ai-safe-panel__title {
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #cbd5e1;
}

.ai-safe-panel__badge {
  font-size: 9px;
  font-weight: bold;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #061018;
  padding: 3px 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #00e5ff, #7dd3fc);
}

.ai-safe-panel__counters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(0, 229, 255, 0.22);
  background: rgba(2, 10, 24, 0.72);
}

.ai-safe-panel__counter {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.ai-safe-panel__counter-label {
  font-size: 8px;
  font-weight: bold;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #94a3b8;
  line-height: 1.2;
}

.ai-safe-panel__counter-value {
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  color: #e2e8f0;
  font-variant-numeric: tabular-nums;
}

.ai-safe-panel__counter-hint {
  font-size: 7px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.ai-safe-panel__counter-pair {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: baseline;
}

.ai-safe-panel__counter-safe,
.ai-safe-panel__counter-hit {
  font-size: 10px;
  letter-spacing: 0.04em;
  color: #cbd5e1;
  font-variant-numeric: tabular-nums;
}

.ai-safe-panel__counter-safe strong {
  color: #34d399;
  font-size: 14px;
  font-weight: 800;
  margin-left: 3px;
}

.ai-safe-panel__counter-hit strong {
  color: #f87171;
  font-size: 14px;
  font-weight: 800;
  margin-left: 3px;
}

.ai-safe-panel__counter--db .ai-safe-panel__counter-value {
  color: #7dd3fc;
}

.ai-safe-panel--mobile .ai-safe-panel__counters {
  grid-template-columns: 1fr;
}

@media (max-width: 520px) {
  .ai-safe-panel__counters {
    grid-template-columns: 1fr;
  }
}

.ai-safe-panel__body {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px 10px;
}

.ai-safe-panel__copy {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 4px 12px;
  min-width: 0;
}

.ai-safe-panel__grid-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.ai-safe-panel__grid-caption {
  font-size: 7px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #94a3b8;
  line-height: 1;
  font-weight: bold;
}

.ai-safe-panel__grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 20px);
  grid-template-rows: repeat(5, 20px);
  gap: 4px;
  width: 116px;
  height: 116px;
  padding: 6px;
  border-radius: 12px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(ellipse 100% 80% at 50% 0%, rgba(255, 215, 0, 0.14), transparent 50%),
    radial-gradient(ellipse 80% 60% at 50% 100%, rgba(0, 229, 255, 0.1), transparent 45%),
    linear-gradient(165deg, rgba(2, 8, 22, 0.98), rgba(8, 22, 48, 0.94));
  border: 2px solid rgba(255, 215, 0, 0.45);
  box-shadow:
    inset 0 0 24px rgba(0, 229, 255, 0.12),
    0 0 22px rgba(255, 215, 0, 0.2),
    0 6px 20px rgba(0, 0, 0, 0.55);
}

.ai-safe-panel__grid--live {
  animation: ai-safe-grid-live-border 2.4s ease-in-out infinite;
}

.ai-safe-panel__grid-scan {
  position: absolute;
  left: 0;
  right: 0;
  height: 40%;
  pointer-events: none;
  z-index: 0;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(0, 229, 255, 0.07) 45%,
    rgba(255, 215, 0, 0.12) 55%,
    transparent
  );
  animation: ai-safe-grid-scan 2.8s linear infinite;
}

.ai-safe-panel__grid-glow {
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  box-shadow: inset 0 0 30px rgba(255, 215, 0, 0.08);
  animation: ai-safe-grid-glow-pulse 1.6s ease-in-out infinite;
}

.ai-safe-panel__grid > .ai-safe-panel__grid-cell {
  position: relative;
  z-index: 1;
}

@keyframes ai-safe-grid-live-border {
  0%,
  100% {
    border-color: rgba(255, 215, 0, 0.55);
    box-shadow:
      inset 0 0 24px rgba(255, 215, 0, 0.1),
      0 0 24px rgba(255, 215, 0, 0.35),
      0 6px 20px rgba(0, 0, 0, 0.55);
  }
  50% {
    border-color: rgba(0, 229, 255, 0.65);
    box-shadow:
      inset 0 0 28px rgba(0, 229, 255, 0.14),
      0 0 28px rgba(0, 229, 255, 0.3),
      0 6px 20px rgba(0, 0, 0, 0.55);
  }
}

@keyframes ai-safe-grid-scan {
  0% {
    top: -45%;
    opacity: 0.35;
  }
  100% {
    top: 105%;
    opacity: 0.85;
  }
}

@keyframes ai-safe-grid-glow-pulse {
  0%,
  100% {
    opacity: 0.45;
  }
  50% {
    opacity: 1;
  }
}

.ai-safe-panel__grid-legend {
  display: flex;
  gap: 8px;
  font-size: 7px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.ai-safe-panel__grid-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ai-safe-panel__grid-legend-star {
  font-size: 10px;
  line-height: 1;
}

.ai-safe-panel__grid-legend-star--pick {
  color: #ffd700;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.9);
  animation: ai-safe-star-blink-gold 1.1s ease-in-out infinite;
}

.ai-safe-panel__grid-legend-star--rank {
  color: #67e8f9;
  text-shadow: 0 0 6px rgba(103, 232, 249, 0.7);
}

.ai-safe-panel__grid-cell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  border: 1px solid rgba(51, 65, 85, 0.5);
  background: rgba(8, 14, 28, 0.82);
  font-size: 0;
  line-height: 1;
  user-select: none;
}

.ai-safe-panel__grid-star {
  display: block;
  line-height: 1;
  pointer-events: none;
}

/* Top pick — blinking golden star only (no tile number on grid) */
.ai-safe-panel__grid-star--pick {
  font-size: 15px;
  color: #ffd700;
  text-shadow:
    0 0 6px #fff8dc,
    0 0 14px #ffd700,
    0 0 22px #ffb700;
  animation: ai-safe-star-blink-gold 0.95s ease-in-out infinite;
}

.ai-safe-panel__grid-cell--primary {
  z-index: 4;
  transform: scale(1.18);
  border-width: 2px;
  border-color: rgba(255, 215, 0, 0.85);
  background: radial-gradient(circle at 50% 50%, rgba(255, 215, 0, 0.35), rgba(120, 80, 0, 0.25) 70%);
  box-shadow:
    0 0 0 2px rgba(255, 215, 0, 0.25),
    0 0 18px rgba(255, 215, 0, 0.65),
    0 0 32px rgba(255, 180, 0, 0.35);
  animation: ai-safe-cell-pick-pulse 1.4s ease-in-out infinite;
}

/* Ranked safe — star colored by confidence tier */
.ai-safe-panel__grid-star--rank {
  font-size: 11px;
  animation: ai-safe-star-rank-twinkle 1.8s ease-in-out infinite;
}

.ai-safe-panel__grid-star--rank.ai-safe-panel__grid-star--tier-high {
  color: #34d399;
  text-shadow:
    0 0 8px #6ee7b7,
    0 0 16px #10b981;
}

.ai-safe-panel__grid-star--rank.ai-safe-panel__grid-star--tier-medium {
  color: #fbbf24;
  text-shadow:
    0 0 8px #fde68a,
    0 0 14px #f59e0b;
}

.ai-safe-panel__grid-star--rank.ai-safe-panel__grid-star--tier-low {
  color: #94a3b8;
  text-shadow:
    0 0 6px #cbd5e1,
    0 0 10px #64748b;
}

.ai-safe-panel__grid-cell--alt {
  z-index: 3;
  transform: scale(1.08);
  border-width: 1.5px;
}

.ai-safe-panel__grid-cell--alt.ai-safe-panel__grid-cell--tier-high {
  background: radial-gradient(circle at 50% 50%, rgba(52, 211, 153, 0.28), rgba(6, 40, 30, 0.5));
  border-color: rgba(52, 211, 153, 0.75);
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.45);
}

.ai-safe-panel__grid-cell--alt.ai-safe-panel__grid-cell--tier-medium {
  background: radial-gradient(circle at 50% 50%, rgba(251, 191, 36, 0.22), rgba(60, 40, 0, 0.45));
  border-color: rgba(251, 191, 36, 0.7);
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.38);
}

.ai-safe-panel__grid-cell--alt.ai-safe-panel__grid-cell--tier-low {
  background: radial-gradient(circle at 50% 50%, rgba(148, 163, 184, 0.2), rgba(30, 40, 55, 0.5));
  border-color: rgba(148, 163, 184, 0.6);
  box-shadow: 0 0 8px rgba(148, 163, 184, 0.28);
}

@keyframes ai-safe-star-blink-gold {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
    filter: brightness(1.15);
  }
  50% {
    opacity: 0.35;
    transform: scale(1.22);
    filter: brightness(1.55);
  }
}

@keyframes ai-safe-star-rank-twinkle {
  0%,
  100% {
    opacity: 0.88;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.12);
  }
}

@keyframes ai-safe-cell-pick-pulse {
  0%,
  100% {
    box-shadow:
      0 0 0 2px rgba(255, 215, 0, 0.3),
      0 0 16px rgba(255, 215, 0, 0.55),
      0 0 28px rgba(255, 180, 0, 0.3);
  }
  50% {
    box-shadow:
      0 0 0 3px rgba(255, 255, 200, 0.45),
      0 0 24px rgba(255, 215, 0, 0.9),
      0 0 40px rgba(255, 160, 0, 0.5);
  }
}

.ai-safe-panel__tile-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.ai-safe-panel__tile-label,
.ai-safe-panel__conf-label,
.ai-safe-panel__alt-label {
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
}

.ai-safe-panel__tile-num {
  font-size: 28px;
  line-height: 1;
  font-weight: bold;
  color: #5eead4;
  text-shadow: 0 0 14px rgba(94, 234, 212, 0.45);
  letter-spacing: 0.02em;
}

.ai-safe-panel--medium .ai-safe-panel__tile-num {
  color: #fde047;
  text-shadow: 0 0 12px rgba(253, 224, 71, 0.35);
}

.ai-safe-panel--low .ai-safe-panel__tile-num {
  color: #cbd5e1;
  text-shadow: none;
}

.ai-safe-panel__conf-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  text-align: right;
}

.ai-safe-panel__conf-value {
  font-size: 20px;
  font-weight: bold;
  color: #86efac;
  line-height: 1;
}

.ai-safe-panel--low .ai-safe-panel__conf-value {
  color: #cbd5e1;
}

.ai-safe-panel__alt {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed rgba(148, 163, 184, 0.35);
}

.ai-safe-panel__alt-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(129, 140, 248, 0.45);
  color: #c7d2fe;
  background: rgba(99, 102, 241, 0.12);
}

.ai-safe-panel__alt-chip-conf {
  font-size: 9px;
  opacity: 0.85;
  letter-spacing: 0.02em;
}

.ai-safe-panel__alt-chip--tier-high {
  border-color: rgba(52, 211, 153, 0.5);
  color: #a7f3d0;
  background: rgba(16, 185, 129, 0.12);
}

.ai-safe-panel__alt-chip--tier-medium {
  border-color: rgba(250, 204, 21, 0.45);
  color: #fef08a;
  background: rgba(234, 179, 8, 0.1);
}

.ai-safe-panel__alt-chip--tier-low {
  border-color: rgba(148, 163, 184, 0.4);
  color: #cbd5e1;
  background: rgba(71, 85, 105, 0.2);
}

.ai-safe-panel__counter-acc {
  display: block;
  margin-top: 4px;
  font-size: 0.62rem;
  color: #94a3b8;
}

.ai-safe-panel__counter-acc strong {
  color: #6ee7b7;
}

.ai-safe-panel__modifier-pill {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.ai-safe-panel__modifier-pill--active {
  color: #6ee7b7;
  border: 1px solid rgba(52, 211, 153, 0.45);
  background: rgba(52, 211, 153, 0.12);
}

.ai-safe-panel__modifier-pill--learning {
  color: #fcd34d;
  border: 1px solid rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.1);
}

.ai-safe-panel__learning {
  margin: 10px 0 0;
  padding: 10px 10px 8px;
  border-radius: 10px;
  border: 1px solid rgba(52, 211, 153, 0.28);
  background: rgba(0, 24, 20, 0.75);
}

.ai-safe-panel__learning-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-bottom: 8px;
  font-size: 0.68rem;
}

.ai-safe-panel__learning-title {
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6ee7b7;
}

.ai-safe-panel__learning-mod--active {
  color: #6ee7b7;
  font-weight: 700;
}

.ai-safe-panel__learning-mod--learning {
  color: #fcd34d;
  font-weight: 700;
}

.ai-safe-panel__learning-acc {
  color: #bae6fd;
}

.ai-safe-panel__learning-outcomes {
  color: #94a3b8;
  margin-left: auto;
}

.ai-safe-panel__learning-bars {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 8px;
}

.ai-safe-panel__learn-bar {
  display: grid;
  gap: 3px;
  font-size: 0.58rem;
  color: #94a3b8;
}

.ai-safe-panel__learn-bar strong {
  font-size: 0.62rem;
  color: #e2e8f0;
}

.ai-safe-panel__learn-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  overflow: hidden;
}

.ai-safe-panel__learn-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #0891b2, #34d399);
  transition: width 0.35s ease;
}

.ai-safe-panel__learn-fill--ready {
  background: linear-gradient(90deg, #059669, #a3e635);
}

.ai-safe-panel__learning-session {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.62rem;
  color: #7dd3fc;
  margin-bottom: 6px;
}

.ai-safe-panel__learning-phases {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ai-safe-panel__learn-phase {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px;
  border-radius: 6px;
  background: rgba(0, 12, 24, 0.85);
  border: 1px solid rgba(0, 229, 255, 0.15);
  font-size: 0.58rem;
}

.ai-safe-panel__learn-phase-label {
  color: #67e8f9;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ai-safe-panel__learn-phase-wl {
  color: #cbd5e1;
}

.ai-safe-panel__learn-phase-acc {
  color: #6ee7b7;
  font-weight: 700;
}

.ai-safe-panel--mobile .ai-safe-panel__learning-bars {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.phase-phase-card__learn {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
  font-size: 0.68rem;
}

.phase-phase-card__learn-safe {
  color: #6ee7b7;
}

.phase-phase-card__learn-hit {
  color: #fca5a5;
}

.phase-phase-card__learn-acc {
  color: #bae6fd;
  font-weight: 700;
}

.mobile-ai-stat--learn span {
  color: #6ee7b7;
  font-size: 0.72rem;
}

.ai-safe-panel__safety-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
  gap: 0.45rem 0.65rem;
  margin: 0.65rem 0 0.35rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(80, 180, 120, 0.22);
  border-radius: 8px;
  background: rgba(8, 28, 18, 0.55);
}

.ai-safe-panel__safety-metric {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.ai-safe-panel__safety-metric-label {
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(160, 210, 170, 0.72);
}

.ai-safe-panel__safety-metric strong {
  font-size: 0.82rem;
  color: #d8ffe8;
  font-weight: 600;
}

.ai-safe-panel--mobile .ai-safe-panel__safety-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ai-safe-panel__hint {
  margin: 8px 0 0;
  font-size: 10px;
  line-height: 1.4;
  color: #64748b;
}

.ai-safe-panel--mobile .ai-safe-panel__body {
  grid-template-columns: 1fr auto;
  gap: 6px 8px;
}

.ai-safe-panel--mobile .ai-safe-panel__grid {
  grid-template-columns: repeat(5, 17px);
  grid-template-rows: repeat(5, 17px);
  width: 99px;
  height: 99px;
  gap: 3px;
  padding: 5px;
}

.ai-safe-panel--mobile .ai-safe-panel__grid-cell {
  width: 17px;
  height: 17px;
}

.ai-safe-panel--mobile .ai-safe-panel__grid-star--pick {
  font-size: 13px;
}

.ai-safe-panel--mobile .ai-safe-panel__grid-star--rank {
  font-size: 10px;
}

.ai-safe-panel--mobile .ai-safe-panel__tile-num {
  font-size: 24px;
}

.ai-safe-panel--mobile .ai-safe-panel__conf-value {
  font-size: 16px;
}

.mode-platform-selector {
  margin: 0.45rem 0 0.65rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(80, 180, 120, 0.22);
  border-radius: 8px;
  background: rgba(8, 28, 18, 0.45);
}

.mode-platform-selector-label {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(160, 210, 170, 0.78);
  margin-bottom: 0.35rem;
}

.mode-platform-selector-row {
  display: flex;
  gap: 0.45rem;
}

.mode-platform-select-btn {
  flex: 1;
  border: 1px solid rgba(110, 231, 183, 0.25);
  background: rgba(10, 30, 20, 0.75);
  color: #b8f5d0;
  border-radius: 6px;
  padding: 0.35rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.mode-platform-select-btn--active {
  border-color: rgba(110, 231, 183, 0.85);
  background: rgba(20, 70, 45, 0.85);
  color: #eafff4;
  box-shadow: 0 0 0 1px rgba(110, 231, 183, 0.35) inset;
}

.platform-select-screen {
  min-height: 100dvh;
}

.platform-select-card {
  text-align: center;
}

.platform-select-note {
  color: rgba(180, 230, 190, 0.88);
  font-size: 0.92rem;
  margin: 0.5rem 0 1.2rem;
  line-height: 1.45;
}

.platform-select-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.platform-select-btn {
  min-width: 140px;
  padding: 0.85rem 1.2rem;
  border-radius: 10px;
  border: 2px solid rgba(110, 231, 183, 0.45);
  background: rgba(8, 28, 18, 0.82);
  color: #d7ffe4;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.platform-select-btn--1win:hover,
.platform-select-btn--betpawa:hover {
  border-color: rgba(110, 231, 183, 0.9);
  background: rgba(16, 52, 34, 0.92);
}

.platform-select-inline-warn {
  margin: 0.45rem 0 0;
  font-size: 0.72rem;
  color: #ffb020;
}

.platform-setup-badge {
  margin: 0.35rem 0 0.75rem;
  font-size: 0.85rem;
  color: #9dffd0;
}

.platform-setup-change,
.platform-setup-required {
  margin-left: 0.55rem;
  border: 1px solid rgba(110, 231, 183, 0.45);
  background: rgba(10, 30, 20, 0.75);
  color: #c8ffe8;
  border-radius: 6px;
  padding: 0.25rem 0.55rem;
  font-size: 0.75rem;
  cursor: pointer;
}

.platform-select-inline-note {
  margin: 0.35rem 0 0.65rem;
  font-size: 0.78rem;
  color: rgba(160, 210, 170, 0.82);
  line-height: 1.4;
}

.platform-angel-modal {
  position: fixed;
  inset: 0;
  z-index: 12050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(2, 10, 6, 0.82);
  backdrop-filter: blur(4px);
}

.platform-angel-modal__card {
  width: min(520px, 100%);
  border-radius: 14px;
  border: 1px solid rgba(110, 231, 183, 0.35);
  background: linear-gradient(165deg, rgba(8, 28, 18, 0.96), rgba(4, 16, 10, 0.98));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
  padding: 1.25rem 1.35rem 1.1rem;
  text-align: center;
}

.platform-angel-modal__card h3 {
  margin: 0 0 0.45rem;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  color: #d7ffe4;
}

.platform-angel-modal__sub {
  margin: 0 0 1rem;
  font-size: 0.86rem;
  line-height: 1.45;
  color: rgba(180, 230, 190, 0.88);
}

.platform-angel-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.platform-angel-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.85rem 0.65rem 0.75rem;
  border-radius: 12px;
  border: 2px solid rgba(110, 231, 183, 0.28);
  background: rgba(8, 28, 18, 0.72);
  color: #d7ffe4;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.platform-angel-card:hover {
  border-color: rgba(110, 231, 183, 0.65);
  transform: translateY(-1px);
}

.platform-angel-card.is-selected {
  border-color: rgba(110, 231, 183, 0.95);
  box-shadow: 0 0 0 1px rgba(110, 231, 183, 0.35) inset, 0 0 18px rgba(52, 211, 153, 0.18);
  background: rgba(16, 52, 34, 0.88);
}

.platform-angel-card__logo {
  width: min(120px, 72%);
  height: auto;
  max-height: 52px;
  object-fit: contain;
}

.platform-angel-card__title {
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.platform-angel-card__note {
  font-size: 0.68rem;
  line-height: 1.35;
  color: rgba(160, 210, 170, 0.82);
}

.platform-angel-modal__actions {
  display: flex;
  justify-content: center;
  gap: 0.65rem;
}

.platform-angel-modal__actions button {
  border: 1px solid rgba(110, 231, 183, 0.35);
  background: rgba(10, 30, 20, 0.75);
  color: #c8ffe8;
  border-radius: 8px;
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
  cursor: pointer;
}

.platform-angel-modal__confirm {
  border-color: rgba(110, 231, 183, 0.85) !important;
  background: rgba(20, 70, 45, 0.92) !important;
  color: #eafff4 !important;
  font-weight: 700;
  letter-spacing: 0.04em;
  min-width: 120px;
}

.platform-angel-modal__confirm:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

@media (max-width: 520px) {
  .platform-angel-cards {
    grid-template-columns: 1fr;
  }
}

.platform-setup-required {
  display: inline-block;
  margin: 0.5rem 0 0.75rem;
  padding: 0.45rem 0.75rem;
  font-size: 0.82rem;
  border-color: #ffb020;
  color: #ffd27a;
}

.platform-switch-modal {
  position: fixed;
  inset: 0;
  z-index: 10020;
  background: rgba(0, 0, 0, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.platform-switch-modal__card {
  width: min(420px, 100%);
  border: 1px solid rgba(110, 231, 183, 0.45);
  border-radius: 12px;
  background: rgba(8, 22, 14, 0.96);
  padding: 18px;
  color: #dfffe8;
}

.platform-switch-modal__card h3 {
  margin: 0 0 8px;
}

.platform-switch-modal__actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 16px;
}

.platform-switch-modal__confirm {
  border-color: #ffb020;
  color: #ffd27a;
}

/* Legacy row hidden if any old markup remains */
.ai-safe-row {
  display: none !important;
}

/* Admin-ordered live HUD stack (global layout) */
.live-ai-dashboard-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.live-hud-panel {
  width: 100%;
}

.admin-live-hud-order-row button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.admin-live-hud-modal {
  width: min(560px, 96vw);
  max-height: min(88vh, 760px);
  display: flex;
  flex-direction: column;
}

.admin-live-hud-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.admin-live-hud-modal__head h3 {
  margin: 0;
}

.admin-live-hud-modal__close {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(0, 255, 200, 0.35);
  border-radius: 6px;
  background: rgba(0, 20, 18, 0.8);
  color: #bff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.admin-live-hud-order-list {
  margin-top: 12px;
  overflow-y: auto;
  max-height: min(52vh, 420px);
  padding-right: 4px;
}

.admin-live-hud-order-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  margin-bottom: 6px;
  border: 1px solid rgba(0, 255, 200, 0.22);
  border-radius: 6px;
  background: rgba(0, 20, 18, 0.55);
}

.admin-live-hud-order-row__title {
  color: #bfffd4;
  font-weight: bold;
  font-size: 0.82rem;
}

.admin-live-hud-order-row__screens {
  color: #7aa;
  font-size: 0.68rem;
  margin-top: 2px;
}

.admin-live-hud-order-row__actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.admin-live-hud-modal__actions {
  margin-top: 12px;
}

.admin-live-hud-layout-overlay {
  z-index: 10050;
}

/* Phase 24.3 — prediction transparency (read-only) */
.ai-pred-transparency {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(0, 255, 200, 0.22);
  border-radius: 8px;
  background: rgba(0, 18, 16, 0.65);
}

.ai-pred-transparency--main {
  border-color: rgba(255, 215, 0, 0.28);
}

.ai-pred-transparency--angel {
  border-color: rgba(120, 220, 255, 0.3);
}

.ai-pred-transparency__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  color: #bfffd4;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: bold;
  cursor: pointer;
  text-align: left;
}

.ai-pred-transparency__toggle-hint {
  color: #7aa;
  font-size: 0.72rem;
  font-weight: normal;
}

.ai-pred-transparency__body {
  margin-top: 10px;
}

.ai-pred-transparency__note {
  margin: 0 0 8px;
  font-size: 0.68rem;
  color: #7aa;
  line-height: 1.4;
}

.ai-pred-transparency__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.72rem;
}

.ai-pred-transparency__table th,
.ai-pred-transparency__table td {
  padding: 5px 8px;
  border-bottom: 1px solid rgba(0, 255, 200, 0.12);
  text-align: left;
}

.ai-pred-transparency__table th {
  color: #8fc;
  font-weight: 600;
}

.ai-pred-transparency__title {
  margin: 0 0 8px;
  font-size: 0.85rem;
  color: #bfffd4;
}

.ai-pred-transparency__metrics {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}

.ai-pred-transparency__metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.7rem;
  color: #8aa;
}

.ai-pred-transparency__metric strong {
  color: #e2fff0;
  font-size: 0.78rem;
}

.ai-pred-transparency-phase-money {
  margin-top: 8px;
  font-size: 0.72rem;
}

.ai-pred-transparency-phase-money__label {
  display: block;
  color: #8aa;
  margin-bottom: 4px;
}

.ai-pred-transparency-phase-money__chip {
  display: inline-block;
  margin-right: 6px;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(0, 255, 200, 0.25);
  color: #bfffd4;
}

.ai-pred-transparency-phase-cands {
  margin-top: 8px;
  font-size: 0.72rem;
}

.ai-pred-transparency-phase-cands__label {
  display: block;
  color: #8aa;
  margin-bottom: 4px;
}

.ai-pred-transparency-phase-cands__list {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.ai-pred-transparency-phase-cands__list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ai-pred-transparency-phase-cands__rank {
  color: #6a9;
  min-width: 2rem;
}

.ai-pred-transparency-phase-cands__conf,
.ai-pred-transparency-phase-cands__score {
  color: #9cc;
  font-size: 0.68rem;
}

.admin-ai-pred-transparency__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.admin-ai-pred-transparency__card {
  padding: 10px;
  border: 1px solid rgba(0, 255, 200, 0.2);
  border-radius: 6px;
  background: rgba(0, 16, 14, 0.5);
}

.admin-ai-pred-transparency__card h5 {
  margin: 0 0 6px;
  color: #a7f3d0;
  font-size: 0.8rem;
}

.admin-ai-pred-transparency__list {
  margin: 0;
  padding-left: 1rem;
  font-size: 0.75rem;
  color: #cbd5e1;
}

/* Single active phase panel — compact */
.phase24-phase-grids--single {
  margin: 4px 0 2px;
  gap: 0;
  max-width: 100%;
}

.brain-cc-phase-section--compact {
  margin: 4px 0 2px;
  padding: 6px 8px;
  border-radius: 8px;
}

.brain-cc-phase-section--compact .brain-cc-phase-section__head {
  margin-bottom: 6px;
}

.brain-cc-phase-section--compact .brain-cc-phase-section__label {
  font-size: 10px;
}

.brain-cc-phase-section--compact .brain-cc-phase-section__body {
  gap: 8px;
}

.brain-cc-phase-section--compact .brain-cc-phase-tile-kicker {
  font-size: 9px;
  letter-spacing: 0.08em;
}

.brain-cc-phase-section--compact .brain-cc-phase-tile-num {
  font-size: 20px;
  line-height: 1.05;
}

.brain-cc-phase-section--compact .brain-cc-phase-tile-conf,
.brain-cc-phase-section--compact .brain-cc-phase-tile-vol {
  font-size: 10px;
}

.brain-cc-phase-section--compact .brain-cc-meter--phase {
  height: 4px;
  margin-top: 4px;
}

.brain-cc-phase-section--compact .brain-cc-phase-learn {
  margin-top: 4px;
  font-size: 10px;
  gap: 8px;
}

.brain-cc-phase-section--compact .brain-cc-phase-section__reason {
  margin-top: 4px;
  font-size: 9px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.brain-cc-phase-section--compact .ai-pred-transparency-phase-money,
.brain-cc-phase-section--compact .ai-pred-transparency-phase-cands {
  margin-top: 4px;
  font-size: 0.62rem;
}

.brain-cc-phase-section--compact .ai-pred-transparency-phase-money__chip {
  padding: 1px 5px;
  font-size: 9px;
}

.brain-cc-phase-section--compact .ai-pred-transparency-phase-cands__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 8px;
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.brain-cc-phase-section--compact .ai-pred-transparency-phase-cands__list li {
  padding: 1px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brain-cc-phase-section--compact .brain-cc-phase-mini-grid {
  grid-template-columns: repeat(5, 14px);
  grid-template-rows: repeat(5, 14px);
  gap: 1px;
  padding: 3px;
}

.brain-cc-phase-section--compact .brain-cc-phase-mini-num,
.brain-cc-phase-section--compact .brain-cc-phase-mini-money {
  font-size: 7px;
}

/* Angel predictions — blue grid + golden star */
.ai-pred-transparency--angel-visual {
  border-color: rgba(56, 189, 248, 0.45);
  background: linear-gradient(145deg, rgba(2, 20, 42, 0.92), rgba(4, 12, 28, 0.88));
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.08);
}

.ai-pred-transparency-angel-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 12px;
  align-items: start;
}

.ai-pred-transparency__metrics--angel {
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 6px;
}

.angel-pred-mini-wrap {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.angel-pred-mini-grid {
  display: grid;
  grid-template-columns: repeat(5, 18px);
  grid-template-rows: repeat(5, 18px);
  gap: 2px;
  padding: 6px;
  border-radius: 10px;
  border: 1px solid rgba(56, 189, 248, 0.55);
  background: linear-gradient(160deg, rgba(8, 47, 73, 0.95), rgba(12, 74, 110, 0.75));
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.18), inset 0 0 12px rgba(14, 165, 233, 0.08);
}

.angel-pred-mini-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  border: 1px solid rgba(30, 58, 138, 0.55);
  background: rgba(15, 23, 42, 0.65);
  color: rgba(148, 163, 184, 0.75);
  font-size: 7px;
  font-weight: 700;
  line-height: 1;
  user-select: none;
}

.angel-pred-mini-cell--safe {
  border-color: rgba(56, 189, 248, 0.65);
  background: rgba(14, 165, 233, 0.28);
  box-shadow: 0 0 6px rgba(56, 189, 248, 0.2);
}

.angel-pred-mini-cell--star {
  border-color: rgba(255, 215, 0, 0.95);
  background: radial-gradient(circle at 50% 40%, rgba(255, 215, 0, 0.45), rgba(14, 165, 233, 0.35));
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.45), 0 0 6px rgba(56, 189, 248, 0.25);
}

.angel-pred-mini-star {
  color: #ffd700;
  font-size: 11px;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.95), 0 0 4px rgba(255, 255, 255, 0.6);
  line-height: 1;
}

.angel-pred-mini-safe-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #7dd3fc;
  box-shadow: 0 0 6px rgba(125, 211, 252, 0.9);
}

.angel-pred-mini-num {
  opacity: 0.55;
}

.angel-pred-mini-aside {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.angel-pred-mini-legend {
  margin: 0;
  font-size: 9px;
  letter-spacing: 0.04em;
  color: rgba(148, 163, 184, 0.9);
  text-align: center;
  white-space: nowrap;
}

.angel-pred-mini-legend-star {
  color: #ffd700;
  text-shadow: 0 0 6px rgba(255, 215, 0, 0.75);
  margin-right: 3px;
}

@media (max-width: 520px) {
  .ai-pred-transparency-angel-layout {
    grid-template-columns: 1fr;
  }

  .angel-pred-mini-wrap {
    justify-content: flex-start;
  }
}

.ai-pred-why {
  margin-top: 8px;
  font-size: 0.78rem;
  color: #9fd9a8;
}

.ai-pred-why__summary {
  cursor: pointer;
  color: #6ef0a0;
  font-weight: 600;
}

.ai-pred-why__body {
  margin-top: 6px;
  padding: 8px 10px;
  border: 1px solid rgba(0, 255, 120, 0.18);
  border-radius: 6px;
  background: rgba(0, 30, 10, 0.45);
}

.ai-pred-why__reason {
  margin: 0 0 6px;
}

.ai-pred-why__metrics {
  margin: 0;
  padding-left: 16px;
  display: grid;
  gap: 2px;
}

/* Phase 36 — Main Prediction Intelligence Dashboard */
.ai-safe-panel--dashboard {
  padding: 8px 12px 6px;
  background:
    linear-gradient(145deg, rgba(4, 14, 32, 0.98), rgba(8, 24, 44, 0.94)),
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(0, 229, 255, 0.08), transparent 60%);
  animation: ai-dash-panel-breathe 4s ease-in-out infinite;
}

@keyframes ai-dash-panel-breathe {
  0%,
  100% {
    box-shadow: 0 0 18px rgba(0, 229, 255, 0.12);
  }
  50% {
    box-shadow: 0 0 28px rgba(0, 229, 255, 0.22);
  }
}

.ai-safe-panel__head--dash {
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.ai-safe-panel__head-main {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.ai-safe-panel__live-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fecaca;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(248, 113, 113, 0.55);
  background: rgba(127, 29, 29, 0.35);
}

.ai-safe-panel__live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f87171;
  animation: ai-dash-live-pulse 1.2s ease-in-out infinite;
}

@keyframes ai-dash-live-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.45;
    transform: scale(1.35);
  }
}

.ai-safe-panel__head-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.ai-safe-panel__heartbeat {
  position: relative;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ai-safe-panel__heartbeat-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(52, 211, 153, 0.45);
  animation: ai-dash-heartbeat-ring 1.4s ease-out infinite;
}

.ai-safe-panel__heartbeat-core {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  animation: ai-dash-heartbeat-core 1.4s ease-in-out infinite;
}

@keyframes ai-dash-heartbeat-ring {
  0% {
    transform: scale(0.6);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

@keyframes ai-dash-heartbeat-core {
  0%,
  100% {
    transform: scale(1);
  }
  14% {
    transform: scale(1.35);
  }
  28% {
    transform: scale(1);
  }
  42% {
    transform: scale(1.25);
  }
}

.ai-safe-panel__timestamp {
  font-size: 9px;
  letter-spacing: 0.06em;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}

.ai-safe-panel__counters--dash {
  gap: 10px;
  padding: 10px 12px;
}

.ai-safe-panel__sync-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #34d399;
  margin-right: 4px;
  vertical-align: middle;
  animation: ai-dash-live-pulse 1.6s ease-in-out infinite;
}

.ai-safe-panel__counter-value--acc {
  font-size: 28px;
  color: #6ee7b7;
  text-shadow: 0 0 16px rgba(110, 231, 183, 0.35);
  animation: ai-dash-acc-glow 2.2s ease-in-out infinite;
}

@keyframes ai-dash-acc-glow {
  0%,
  100% {
    opacity: 0.92;
  }
  50% {
    opacity: 1;
  }
}

.ai-safe-panel__modifier-pill--pulse {
  animation: ai-dash-pill-pulse 2s ease-in-out infinite;
}

@keyframes ai-dash-pill-pulse {
  0%,
  100% {
    opacity: 0.85;
  }
  50% {
    opacity: 1;
  }
}

.ai-safe-panel__dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) auto minmax(0, 1fr);
  grid-template-areas:
    'recommend conf safety'
    'board board board'
    'learning learning learning'
    'reason reason reason';
  gap: 6px;
  margin-top: 2px;
}

.ai-safe-panel__recommend {
  grid-area: recommend;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 86px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid rgba(0, 229, 255, 0.35);
  background: linear-gradient(160deg, rgba(2, 12, 28, 0.95), rgba(6, 28, 48, 0.88));
  overflow: hidden;
  isolation: isolate;
}

.ai-safe-panel__recommend--ready {
  animation: ai-dash-recommend-pulse 2.4s ease-in-out infinite;
}

.ai-safe-panel__recommend--mining {
  border-color: rgba(251, 191, 36, 0.45);
  animation: ai-dash-mining-pulse 2.8s ease-in-out infinite;
}

@keyframes ai-dash-recommend-pulse {
  0%,
  100% {
    border-color: rgba(52, 211, 153, 0.45);
    box-shadow: 0 0 20px rgba(52, 211, 153, 0.15);
  }
  50% {
    border-color: rgba(0, 229, 255, 0.55);
    box-shadow: 0 0 32px rgba(0, 229, 255, 0.25);
  }
}

@keyframes ai-dash-mining-pulse {
  0%,
  100% {
    box-shadow: 0 0 16px rgba(251, 191, 36, 0.12);
  }
  50% {
    box-shadow: 0 0 28px rgba(251, 191, 36, 0.28);
  }
}

.ai-safe-panel__recommend--ready .ai-safe-panel__tile-num {
  font-size: 38px;
  letter-spacing: 0.04em;
  animation: ai-dash-tile-breathe 3s ease-in-out infinite;
}

@keyframes ai-dash-tile-breathe {
  0%,
  100% {
    transform: scale(1);
    text-shadow: 0 0 20px rgba(94, 234, 212, 0.55);
  }
  50% {
    transform: scale(1.04);
    text-shadow: 0 0 36px rgba(94, 234, 212, 0.85);
  }
}

.ai-safe-panel__recommend-glow {
  position: absolute;
  inset: -20%;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(52, 211, 153, 0.18), transparent 55%);
  animation: ai-dash-glow-rotate 6s linear infinite;
  z-index: 0;
}

.ai-safe-panel__recommend-particles,
.ai-safe-panel__mining-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(0, 229, 255, 0.35) 1px, transparent 1px),
    radial-gradient(circle at 70% 60%, rgba(52, 211, 153, 0.3) 1px, transparent 1px),
    radial-gradient(circle at 45% 80%, rgba(255, 215, 0, 0.25) 1px, transparent 1px);
  background-size: 100% 100%;
  animation: ai-dash-particles-drift 8s linear infinite;
}

@keyframes ai-dash-glow-rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes ai-dash-particles-drift {
  0% {
    opacity: 0.35;
    transform: translateY(0);
  }
  50% {
    opacity: 0.65;
  }
  100% {
    opacity: 0.35;
    transform: translateY(-6px);
  }
}

.ai-safe-panel__recommend .ai-safe-panel__tile-label,
.ai-safe-panel__mining-label {
  position: relative;
  z-index: 1;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #94a3b8;
}

.ai-safe-panel__recommend .ai-safe-panel__tile-num {
  position: relative;
  z-index: 1;
}

.ai-safe-panel__mining-label {
  color: #fcd34d;
  margin-bottom: 6px;
}

.ai-safe-panel__mining-status {
  position: relative;
  z-index: 1;
  font-size: 13px;
  font-weight: 600;
  color: #fde68a;
  text-align: center;
  margin-bottom: 10px;
  animation: ai-dash-mining-fade 3s ease-in-out infinite;
}

@keyframes ai-dash-mining-fade {
  0%,
  100% {
    opacity: 0.75;
  }
  50% {
    opacity: 1;
  }
}

.ai-safe-panel__mining-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  width: 100%;
}

.ai-safe-panel__mining-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 8px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.ai-safe-panel__mining-stat strong {
  font-size: 13px;
  color: #e2e8f0;
  font-variant-numeric: tabular-nums;
  transition: color 0.35s ease, opacity 0.35s ease;
}

.ai-safe-panel__conf-engine {
  grid-area: conf;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-safe-panel__conf-ring {
  position: relative;
  width: 86px;
  height: 86px;
  animation: ai-dash-conf-ring-pulse 2.6s ease-in-out infinite;
}

@keyframes ai-dash-conf-ring-pulse {
  0%,
  100% {
    filter: drop-shadow(0 0 8px rgba(0, 229, 255, 0.25));
  }
  50% {
    filter: drop-shadow(0 0 16px rgba(52, 211, 153, 0.45));
  }
}

.ai-safe-panel__conf-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ai-safe-panel__conf-track {
  fill: none;
  stroke: rgba(51, 65, 85, 0.65);
  stroke-width: 6;
}

.ai-safe-panel__conf-arc {
  fill: none;
  stroke: #34d399;
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 283;
  transition: stroke-dashoffset 0.6s ease, stroke 0.4s ease;
}

.ai-safe-panel__conf-ring--medium .ai-safe-panel__conf-arc {
  stroke: #fbbf24;
}

.ai-safe-panel__conf-ring--low .ai-safe-panel__conf-arc {
  stroke: #94a3b8;
}

.ai-safe-panel__conf-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.ai-safe-panel__conf-center .ai-safe-panel__conf-value {
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
}

.ai-safe-panel__conf-tier {
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #64748b;
}

.ai-safe-panel__safety-metrics--dash {
  grid-area: safety;
  margin: 0;
  align-self: stretch;
  padding: 0.35rem 0.45rem;
  gap: 0.28rem 0.45rem;
  grid-template-columns: repeat(auto-fit, minmax(5.6rem, 1fr));
}

.ai-safe-panel__safety-metrics--dash .ai-safe-panel__safety-metric-label {
  font-size: 0.54rem;
}

.ai-safe-panel__safety-metrics--dash .ai-safe-panel__safety-metric strong {
  font-size: 0.72rem;
  transition: color 0.35s ease, opacity 0.35s ease;
}

.ai-safe-panel__grid-wrap--dash {
  grid-area: board;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-shrink: 0;
}

.ai-safe-panel--dashboard .ai-safe-panel__grid-wrap--dash .ai-safe-panel__grid,
.ai-safe-panel--mobile .ai-safe-panel__grid-wrap--dash .ai-safe-panel__grid {
  box-sizing: border-box !important;
  width: 138px !important;
  height: 138px !important;
  min-width: 138px !important;
  min-height: 138px !important;
  max-width: 138px !important;
  max-height: 138px !important;
  display: grid !important;
  grid-template-columns: repeat(5, 16px) !important;
  grid-template-rows: repeat(5, 16px) !important;
  justify-content: center;
  align-content: center;
  gap: 2px !important;
  padding: 14px !important;
  margin: 0 auto;
  overflow: hidden !important;
  box-shadow:
    inset 0 0 16px rgba(0, 229, 255, 0.1),
    0 0 14px rgba(255, 215, 0, 0.16),
    0 4px 14px rgba(0, 0, 0, 0.5);
}

.ai-safe-panel__grid-wrap--dash .ai-safe-panel__grid-glow {
  box-shadow: inset 0 0 18px rgba(255, 215, 0, 0.08);
}

.ai-safe-panel--dashboard .ai-safe-panel__grid-wrap--dash .ai-safe-panel__grid-cell,
.ai-safe-panel--mobile .ai-safe-panel__grid-wrap--dash .ai-safe-panel__grid-cell {
  box-sizing: border-box !important;
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  min-height: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
  border-radius: 4px !important;
  transform: none !important;
  font-size: 7px;
}

.ai-safe-panel__grid-wrap--dash .ai-safe-panel__grid-star--pick {
  font-size: 13px;
}

.ai-safe-panel__grid-wrap--dash .ai-safe-panel__grid-num {
  font-size: 7px;
}

.ai-safe-panel__grid-num {
  font-size: 8px;
  color: #475569;
  font-weight: 600;
  line-height: 1;
}

.ai-safe-panel__grid-cell--recommended {
  border-width: 2px;
  border-color: rgba(52, 211, 153, 0.95) !important;
  background: radial-gradient(circle at 50% 50%, rgba(52, 211, 153, 0.35), rgba(6, 40, 30, 0.5)) !important;
  animation: ai-dash-rec-cell-pulse 1.6s ease-in-out infinite !important;
}

@keyframes ai-dash-rec-cell-pulse {
  0%,
  100% {
    box-shadow: 0 0 12px rgba(52, 211, 153, 0.45);
  }
  50% {
    box-shadow: 0 0 22px rgba(52, 211, 153, 0.75);
  }
}

.ai-safe-panel__grid-cell--pending {
  border-color: rgba(96, 165, 250, 0.65);
  background: rgba(30, 58, 138, 0.35);
  animation: ai-dash-pending-soft 2.4s ease-in-out infinite;
}

@keyframes ai-dash-pending-soft {
  0%,
  100% {
    opacity: 0.75;
  }
  50% {
    opacity: 1;
  }
}

.ai-safe-panel__grid-cell--analysed {
  border-color: rgba(167, 139, 250, 0.65);
  background: rgba(76, 29, 149, 0.35);
}

.ai-safe-panel__grid-cell--submitted {
  border-color: rgba(52, 211, 153, 0.55);
  background: rgba(6, 78, 59, 0.35);
}

.ai-safe-panel__grid-cell--pending .ai-safe-panel__grid-num {
  color: #93c5fd;
}

.ai-safe-panel__grid-cell--analysed .ai-safe-panel__grid-num {
  color: #c4b5fd;
}

.ai-safe-panel__grid-cell--submitted .ai-safe-panel__grid-num {
  color: #6ee7b7;
}

.ai-safe-panel__grid-legend--dash {
  flex-wrap: nowrap;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
  white-space: nowrap;
}

.ai-safe-panel__grid-legend-item--rec::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 3px;
  background: #34d399;
  margin-right: 4px;
}

.ai-safe-panel__grid-legend-item--pending::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 3px;
  background: #60a5fa;
  margin-right: 4px;
}

.ai-safe-panel__grid-legend-item--analysed::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 3px;
  background: #a78bfa;
  margin-right: 4px;
}

.ai-safe-panel__grid-legend-item--submitted::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 3px;
  background: #10b981;
  margin-right: 4px;
}

.ai-live-learn--dash {
  grid-area: learning;
  width: 100%;
}

.ai-live-learn__toggle {
  display: block;
  width: fit-content;
  max-width: 100%;
  min-height: 0 !important;
  height: auto !important;
  margin: 0 auto !important;
  padding: 4px 10px !important;
  font-family: inherit;
  font-size: 9px !important;
  font-weight: 800 !important;
  letter-spacing: 0.1em !important;
  line-height: 1.15;
  text-transform: uppercase;
  color: #6ee7b7;
  cursor: pointer;
  border-radius: 999px !important;
  border: 1px solid rgba(52, 211, 153, 0.35);
  background: rgba(0, 24, 20, 0.75);
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.14) !important;
}

.ai-live-learn__toggle:hover,
.ai-live-learn__toggle:focus {
  outline: none;
  border-color: rgba(110, 240, 160, 0.55);
  box-shadow: 0 0 14px rgba(52, 211, 153, 0.28) !important;
}

.ai-live-learn__chevron {
  display: inline-block;
  margin-right: 6px;
  transition: transform 250ms ease;
}

.ai-live-learn__toggle[aria-expanded='true'] .ai-live-learn__chevron {
  transform: rotate(180deg);
}

.ai-live-learn__collapse {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 250ms ease;
}

.ai-live-learn__collapse.is-open {
  grid-template-rows: 1fr;
  margin-top: 6px;
}

.ai-live-learn__collapse-inner {
  overflow: hidden;
  min-height: 0;
}

.ai-safe-panel__learning--live {
  margin: 0;
  padding: 6px 8px 5px;
}

.ai-safe-panel__learning--live .ai-safe-panel__learning-head {
  margin-bottom: 4px;
  gap: 4px 8px;
  font-size: 0.6rem;
}

.ai-safe-panel__learning-live-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  margin-bottom: 5px;
}

.ai-safe-panel__learn-live-stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 8px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #64748b;
}

.ai-safe-panel__learn-live-stat strong {
  font-size: 12px;
  color: #e2e8f0;
  font-variant-numeric: tabular-nums;
  transition: opacity 0.35s ease;
}

.ai-safe-panel__learn-live-stat--wide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
}

.ai-safe-panel__learning-bars--compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ai-pred-why--panel {
  grid-area: reason;
  margin-top: 0;
}

.ai-pred-why__header {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6ef0a0;
  margin-bottom: 8px;
}

.ai-pred-why__toggle {
  display: block;
  width: fit-content;
  max-width: 100%;
  min-height: 0 !important;
  height: auto !important;
  margin: 0 auto !important;
  padding: 4px 10px !important;
  font-family: inherit;
  font-size: 9px !important;
  font-weight: 800 !important;
  letter-spacing: 0.1em !important;
  line-height: 1.15;
  text-transform: uppercase;
  color: #6ef0a0;
  cursor: pointer;
  border-radius: 999px !important;
  border: 1px solid rgba(0, 255, 120, 0.28);
  background: rgba(0, 30, 10, 0.45);
  box-shadow: 0 0 10px rgba(0, 255, 120, 0.12) !important;
}

.ai-pred-why__toggle:hover,
.ai-pred-why__toggle:focus {
  outline: none;
  border-color: rgba(110, 240, 160, 0.55);
  box-shadow: 0 0 16px rgba(0, 255, 120, 0.22);
}

.ai-pred-why__collapse {
  max-height: 0;
  margin-top: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: max-height 250ms ease, opacity 250ms ease, margin-top 250ms ease, visibility 250ms ease;
}

.ai-pred-why__collapse.is-open {
  max-height: 480px;
  margin-top: 8px;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.ai-pred-why__pending {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px dashed rgba(148, 163, 184, 0.35);
  color: #94a3b8;
  font-size: 0.78rem;
  animation: ai-dash-mining-fade 2.8s ease-in-out infinite;
}

.ai-safe-panel--mining .ai-safe-panel__conf-ring .ai-safe-panel__conf-arc {
  stroke: #fbbf24;
}

@media (max-width: 900px) {
  .ai-safe-panel__dashboard {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      'recommend recommend'
      'conf safety'
      'board board'
      'learning learning'
      'reason reason';
  }
}

@media (max-width: 520px) {
  .ai-safe-panel--dashboard .ai-safe-panel__grid-wrap--dash .ai-safe-panel__grid,
  .ai-safe-panel--mobile .ai-safe-panel__grid-wrap--dash .ai-safe-panel__grid {
    width: 138px !important;
    height: 138px !important;
    min-width: 0 !important;
    min-height: 138px !important;
    max-width: 100% !important;
    grid-template-columns: repeat(5, 16px) !important;
    grid-template-rows: repeat(5, 16px) !important;
    gap: 2px !important;
    padding: 14px !important;
  }

  .ai-safe-panel__dashboard {
    grid-template-columns: 1fr;
    grid-template-areas:
      'recommend'
      'conf'
      'safety'
      'board'
      'learning'
      'reason';
  }

  .ai-safe-panel__head-meta {
    margin-left: 0;
    width: 100%;
    justify-content: space-between;
  }

  .ai-safe-panel__recommend--ready .ai-safe-panel__tile-num {
    font-size: 32px;
  }

  .ai-safe-panel__conf-ring {
    width: 76px;
    height: 76px;
    margin: 0 auto;
  }

  .ai-safe-panel__learning-live-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ai-safe-panel__mining-grid {
    grid-template-columns: 1fr;
  }

  .ai-safe-panel--mobile .ai-safe-panel__counters--dash {
    grid-template-columns: 1fr;
  }
}

.dash-panel-eye {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(52, 211, 153, 0.45);
  background: rgba(6, 24, 20, 0.72);
  color: #6ee7b7;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.18);
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.dash-panel-eye:hover,
.dash-panel-eye:focus-visible {
  color: #ecfeff;
  border-color: rgba(94, 234, 212, 0.85);
  background: rgba(13, 51, 42, 0.95);
  box-shadow: 0 0 14px rgba(45, 212, 191, 0.35);
  outline: none;
}

.dash-panel-eye--hidden {
  color: #94a3b8;
  border-color: rgba(148, 163, 184, 0.4);
  box-shadow: none;
}

.dash-panel-eye__svg {
  width: 16px;
  height: 16px;
  display: block;
}

.dash-panel-eye__hint {
  margin: 0;
  padding: 2px 0 0;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.dash-panel-eye__title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brain-cc-phase-section__head-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.brain-cc-phase-section--collapsed {
  padding-bottom: 8px;
}

.ai-safe-panel--collapsed {
  padding-bottom: 12px;
}

.brain-cc-status-wrap__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.brain-cc-status-wrap__title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #94a3b8;
}

.brain-cc-status-wrap--collapsed .brain-cc-status-wrap__head {
  margin-bottom: 2px;
}
