/* flow_stages.css — Этап 1 (ИИ-диагностика + 6-лучевой радар) и Этап 4 (Замок оценки + Анкета ОС) */

/* Жёсткий замок на итоговой оценке до отправки обратной связи (ни 1 мс спойлера!) */
#s-result:not(.fb-unlocked) .res-body,
#s-result:not(.fb-unlocked) .res-foot {
  filter: blur(20px) brightness(0.35);
  pointer-events: none;
  user-select: none;
  transition: filter 0.45s ease;
}
#s-result.fb-unlocked .res-body,
#s-result.fb-unlocked .res-foot {
  filter: none;
  transition: filter 0.45s ease;
}

/* Полноэкранный слой этапов внутри вертикальной консоли #stage */
.stage-overlay {
  position: absolute; inset: 0; z-index: 135;
  display: flex; flex-direction: column;
  padding: max(12px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 50% 18%, rgba(29, 180, 255, 0.24), transparent 55%),
    linear-gradient(180deg, rgba(7, 13, 34, 0.96) 0%, rgba(5, 9, 24, 0.99) 100%);
  animation: ovIn 0.28s cubic-bezier(.2, 1.15, .4, 1);
}
.stage-overlay[hidden] { display: none; }
@keyframes ovIn { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }

/* 4-шаговая полоса маршрута курса сверху */
.route-stepper {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px;
  margin-bottom: 10px; flex-shrink: 0;
}
.route-step {
  padding: 5px 4px; border-radius: 10px; border: 2px solid var(--ink);
  background: rgba(255, 255, 255, 0.06); color: var(--muted);
  font-size: 9.5px; font-weight: 900; text-align: center; text-transform: uppercase;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.route-step.done { background: rgba(36, 224, 102, 0.22); border-color: var(--green); color: #A6FFC6; }
.route-step.cur  { background: linear-gradient(180deg, #FFD33B, #FF8A00); color: var(--ink); box-shadow: 0 3px 0 #8A3A00; }

/* ЭТАП 1: ИИ-ДИАГНОСТИКА */
.diag-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-shrink: 0; }
.diag-head img { width: 50px; height: 50px; object-fit: contain; filter: drop-shadow(0 5px 10px rgba(0,0,0,0.6)); }
.diag-head-meta { flex: 1; min-width: 0; }
.diag-head-meta b { display: block; font-size: 16px; font-weight: 900; color: #FFE866; }
.diag-head-meta span { font-size: 11.5px; font-weight: 700; color: #8AEBFF; }

.diag-scroll {
  flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 11px;
  padding-bottom: 10px; scrollbar-width: none;
}
.diag-scroll::-webkit-scrollbar { display: none; }

.diag-q-card {
  padding: 15px; border-radius: 20px; border: 3px solid var(--ink);
  background: linear-gradient(180deg, rgba(28, 45, 96, 0.94), rgba(13, 21, 48, 0.98));
  box-shadow: inset 0 2px 0 rgba(160, 225, 255, 0.3), 0 6px 0 var(--ink);
}
.diag-q-text { font-size: 16.5px; font-weight: 800; line-height: 1.4; margin-top: 8px; }

/* SVG 6-лучевой Радар + вердикт DeepSeek */
.radar-box {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 12px; border-radius: 20px; border: 3px solid var(--ink);
  background: linear-gradient(180deg, rgba(20, 34, 76, 0.95), rgba(9, 15, 36, 0.98));
  box-shadow: 0 6px 0 var(--ink);
}
.radar-svg { width: 236px; height: 214px; overflow: visible; }
.radar-grid { fill: none; stroke: rgba(120, 195, 255, 0.24); stroke-width: 1.4; }
.radar-axis { stroke: rgba(120, 195, 255, 0.22); stroke-width: 1.2; }
.radar-poly {
  fill: rgba(29, 180, 255, 0.34); stroke: #4CEBFF; stroke-width: 3;
  filter: drop-shadow(0 0 10px rgba(29, 180, 255, 0.75));
}
.radar-dot { fill: #FFE866; stroke: var(--ink); stroke-width: 2; }
.radar-lbl { font-size: 10.5px; font-weight: 900; fill: #E4F2FF; text-anchor: middle; }

.diag-pills { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; width: 100%; }
.diag-zrow {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 7px 10px; border-radius: 12px; border: 2px solid var(--ink);
  background: rgba(255, 255, 255, 0.06); font-size: 11.5px; font-weight: 800;
}
.diag-zrow.strong { border-color: var(--green); background: rgba(36, 224, 102, 0.16); color: #A6FFC6; }
.diag-zrow.weak   { border-color: var(--orange); background: rgba(255, 130, 16, 0.16); color: #FFD89E; }

.ai-advice-box {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 13px; border-radius: 17px; border: 2.5px solid var(--ink);
  background: linear-gradient(180deg, #273E88, #142252);
  box-shadow: inset 0 0 0 2px rgba(76, 235, 255, 0.45), 0 4px 0 var(--ink);
  font-size: 13px; font-weight: 700; line-height: 1.42; color: #F0F7FF;
}
.ai-advice-box img { width: 46px; height: 46px; object-fit: contain; flex-shrink: 0; }
.ai-advice-box b { display: block; color: #FFE866; font-size: 12px; text-transform: uppercase; margin-bottom: 3px; }

/* Кнопка Радара в Лобби */
.rail-btn.radar-btn {
  background: linear-gradient(180deg, #FF9E2C 0%, #D95300 100%);
  box-shadow: 0 5px 0 #782A00, 0 8px 18px rgba(0, 0, 0, 0.45);
}

/* ЭТАП 4: ЗАМОК НА ОЦЕНКЕ + АНКЕТА ОБРАТНОЙ СВЯЗИ */
.lock-banner {
  display: flex; align-items: center; gap: 11px;
  padding: 12px 14px; border-radius: 18px; border: 3px solid var(--gold);
  background: linear-gradient(135deg, rgba(255, 200, 51, 0.22), rgba(155, 92, 255, 0.24));
  box-shadow: 0 5px 0 var(--ink), 0 0 24px rgba(255, 200, 51, 0.28);
  margin-bottom: 10px; flex-shrink: 0;
}
.lock-ico {
  width: 46px; height: 46px; border-radius: 14px; border: 3px solid var(--ink);
  background: linear-gradient(180deg, #FFE047, #FF8E00);
  display: grid; place-items: center; font-size: 24px; flex-shrink: 0;
  box-shadow: 0 4px 0 #8A3A00;
}
.lock-banner b { display: block; font-size: 15px; font-weight: 900; color: #FFE866; }
.lock-banner span { font-size: 12px; font-weight: 700; color: #E4F0FF; line-height: 1.3; display: block; margin-top: 2px; }

.fb-form-scroll {
  flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 11px;
  padding-bottom: 10px; scrollbar-width: none;
}
.fb-form-scroll::-webkit-scrollbar { display: none; }

.fb-group {
  padding: 12px 13px; border-radius: 17px; border: 2.5px solid var(--ink);
  background: rgba(16, 26, 58, 0.92); box-shadow: 0 4px 0 var(--ink);
}
.fb-group label {
  display: block; font-size: 12.5px; font-weight: 900; color: #8AEBFF;
  margin-bottom: 8px; letter-spacing: 0.02em;
}

.star-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.star-btn {
  height: 44px; border-radius: 13px; border: 2.5px solid var(--ink);
  background: rgba(255, 255, 255, 0.08); color: #8DA4CC;
  font-size: 22px; cursor: pointer; transition: transform 0.1s ease, background 0.15s ease;
  box-shadow: 0 3px 0 var(--ink);
}
.star-btn.on {
  background: linear-gradient(180deg, #FFE047, #FF9400); color: var(--ink);
  transform: translateY(-2px); box-shadow: 0 5px 0 #8A3A00, 0 0 14px rgba(255, 200, 51, 0.6);
}

.chip-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.fb-chip {
  padding: 7px 11px; border-radius: 12px; border: 2px solid var(--ink);
  background: rgba(255, 255, 255, 0.08); color: #DCEBFF; font-family: inherit;
  font-size: 12px; font-weight: 800; cursor: pointer; transition: 0.12s;
}
.fb-chip.on {
  background: linear-gradient(180deg, #3AD6FF, #0F84DC); color: #fff;
  box-shadow: 0 3px 0 #074378;
}

.fb-textarea {
  width: 100%; min-height: 76px; resize: none; padding: 10px 12px;
  border-radius: 13px; border: 2.5px solid rgba(120, 195, 255, 0.35);
  background: #060B1E; color: #fff; font-family: inherit; font-size: 14px; font-weight: 700; outline: none;
}
.fb-textarea:focus { border-color: var(--cyan); }

/* Анимация срыва замка при открытии оценки */
#unlock-burst {
  position: absolute; left: 50%; top: 44%; z-index: 195; pointer-events: none;
  opacity: 0; padding: 14px 24px; border-radius: 18px; border: 5px solid var(--ink);
  background: linear-gradient(180deg, #62FF8F, #14B84A); color: #fff;
  font-size: 26px; font-weight: 900; font-style: italic; white-space: nowrap;
  -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill;
  box-shadow: 0 10px 0 var(--ink), 0 0 50px rgba(42, 227, 104, 0.9);
}
#unlock-burst.go { animation: unlockPop 1.35s cubic-bezier(.15, 1.3, .3, 1) forwards; }
@keyframes unlockPop {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(2.8) rotate(-14deg); }
  20%  { opacity: 1; transform: translate(-50%, -50%) scale(0.95) rotate(-5deg); }
  75%  { opacity: 1; transform: translate(-50%, -50%) scale(1.04) rotate(-5deg); }
  100% { opacity: 0; transform: translate(-50%, -62%) scale(1.12) rotate(0deg); }
}