/* L1 Sentrix 시작·로그인 로딩 「관제 레이더」(마크 선택 B, 2026-10-30).
   이 파일이 #startupOverlay의 보이는 모양을 맡는다. 구조·문구·단계·실패/다시 시도 동작은 app.js 그대로이고,
   components.css의 기존 startup 블록(위치·숨김 전환·z-index)은 이 파일이 색·배치만 덮는다.
   화면은 테마와 상관없이 짙은 남색으로 고정한다(관제실 장면). 움직임은 transform·opacity만, 동작 줄이기에서는 멈춘다. */

.soc-startup-overlay {
  --startup-ink: #f8fafc;
  --startup-sub: #cbd5e1;
  --startup-quiet: #94a3b8;
  --startup-line: rgba(255, 255, 255, 0.12);
  --startup-line-soft: rgba(255, 255, 255, 0.07);
  --startup-accent: #fb923c;
  --startup-brand: #ff6b00;
  --startup-ok: #22c55e;
  --startup-radar: 232px;
  background:
    radial-gradient(circle at 50% 34%, #13284a 0, #0b1a2e 36%, #07111f 72%),
    #07111f;
  color: var(--startup-ink);
  color-scheme: dark;
}

.soc-startup-panel {
  width: min(100%, 560px);
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--startup-ink);
  transform: none;
}

.soc-startup-brand {
  gap: 18px;
}

/* ---- 레이더 ---- */
.soc-startup-radar {
  position: relative;
  width: var(--startup-radar);
  height: var(--startup-radar);
  display: grid;
  place-items: center;
}

.soc-startup-radar > span,
.soc-startup-radar-sites i {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.soc-startup-radar-orbit {
  border: 1px dashed rgba(203, 213, 225, 0.16);
}

.soc-startup-radar-orbit--inner {
  inset: 18%;
}

.soc-startup-radar-orbit--outer {
  inset: 0;
}

.soc-startup-radar-sweep {
  inset: 0;
  background: conic-gradient(from 0deg, rgba(255, 107, 0, 0) 0deg, rgba(255, 107, 0, 0) 296deg, rgba(255, 107, 0, 0.26) 359deg, rgba(255, 107, 0, 0) 360deg);
  -webkit-mask: radial-gradient(circle, #000 0, #000 62%, transparent 71%);
  mask: radial-gradient(circle, #000 0, #000 62%, transparent 71%);
  animation: soc-startup-radar-sweep 2.4s linear infinite;
}

.soc-startup-radar-ring {
  inset: 26%;
  border: 1px solid rgba(251, 146, 60, 0.55);
  opacity: 0;
  animation: soc-startup-radar-ring 2.4s cubic-bezier(0.2, 0.6, 0.3, 1) infinite;
}

.soc-startup-radar-ring:nth-of-type(5) {
  animation-delay: -0.8s;
}

.soc-startup-radar-ring:nth-of-type(6) {
  animation-delay: -1.6s;
}

.soc-startup-radar-sites {
  inset: 0;
  border-radius: 0;
}

/* 현장 점 6개 = 단계 3개 × 2. 단계가 끝나면 그 단계의 두 점이 초록으로 켜지고, 진행 중인 단계의 점은 깜박인다. */
.soc-startup-radar-sites i {
  width: 9px;
  height: 9px;
  margin: -4.5px 0 0 -4.5px;
  background: #334155;
  transition: background-color 0.24s ease;
}

.soc-startup-radar-sites i:nth-child(1) { left: 80%; top: 33%; }
.soc-startup-radar-sites i:nth-child(2) { left: 26%; top: 22%; }
.soc-startup-radar-sites i:nth-child(3) { left: 11%; top: 60%; }
.soc-startup-radar-sites i:nth-child(4) { left: 89%; top: 66%; }
.soc-startup-radar-sites i:nth-child(5) { left: 60%; top: 90%; }
.soc-startup-radar-sites i:nth-child(6) { left: 36%; top: 84%; }

.soc-startup-overlay:has([data-startup-stage="SHELL"].is-running) .soc-startup-radar-sites i:nth-child(-n+2),
.soc-startup-overlay:has([data-startup-stage="AUTH_SCOPE"].is-running) .soc-startup-radar-sites i:nth-child(n+3):nth-child(-n+4),
.soc-startup-overlay:has([data-startup-stage="CORE_DATA"].is-running) .soc-startup-radar-sites i:nth-child(n+5) {
  background: var(--startup-accent);
  animation: soc-startup-radar-blink 1.1s ease-in-out infinite;
}

.soc-startup-overlay:has([data-startup-stage="SHELL"].is-completed) .soc-startup-radar-sites i:nth-child(-n+2),
.soc-startup-overlay:has([data-startup-stage="AUTH_SCOPE"].is-completed) .soc-startup-radar-sites i:nth-child(n+3):nth-child(-n+4),
.soc-startup-overlay:has([data-startup-stage="CORE_DATA"].is-completed) .soc-startup-radar-sites i:nth-child(n+5) {
  background: var(--startup-ok);
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.7);
  animation: soc-startup-radar-lit 0.36s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.soc-startup-overlay:has(.soc-startup-stage.is-failed) .soc-startup-radar-sweep,
.soc-startup-overlay:has(.soc-startup-stage.is-failed) .soc-startup-radar-ring {
  animation-play-state: paused;
  opacity: 0.25;
}

/* ---- 로고: 어두운 화면이라 흰 S 승인 자산과 흰 워드마크를 쓴다 ---- */
.soc-startup-radar .soc-startup-logo {
  position: relative;
  width: 80px;
  height: 72px;
}

.soc-startup-overlay .soc-startup-logo--light {
  display: none;
}

.soc-startup-overlay .soc-startup-logo--dark {
  display: block;
}

.soc-startup-overlay .soc-startup-wordmark {
  filter: brightness(0) invert(1);
}

/* 단계 점 3개는 레이더 현장 점이 대신 보여 준다 */
.soc-startup-overlay .soc-startup-status-dots {
  display: none;
}

/* ---- 문구·진행 ---- */
.soc-startup-copy {
  margin-top: 26px;
}

.soc-startup-title {
  color: var(--startup-ink);
}

.soc-startup-message {
  color: var(--startup-sub);
}

.soc-startup-progress-wrap {
  width: min(100%, 420px);
  margin-top: 18px;
}

.soc-startup-progress-track {
  height: 4px;
  background: rgba(255, 255, 255, 0.12);
}

.soc-startup-progress-bar {
  background: var(--startup-brand);
}

/* 「100%」가 27px 고정 칸을 넘쳐 모바일에서 오른쪽 끝을 지나던 것: 글자 폭만큼 칸을 둔다 */
.soc-startup-progress-percent {
  flex: 0 0 auto;
  min-width: 34px;
  color: var(--startup-accent);
}

/* ---- 단계 3칸 ---- */
.soc-startup-stages {
  margin-top: 26px;
  border-color: var(--startup-line);
  background: rgba(255, 255, 255, 0.04);
}

.soc-startup-stage-icon {
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--startup-quiet);
  background: #0d1b2e;
  box-shadow: none;
}

.soc-startup-stage-copy strong {
  color: var(--startup-ink);
}

.soc-startup-stage-copy small {
  color: var(--startup-quiet);
}

.soc-startup-stage-connector {
  background: radial-gradient(circle, #64748b 1px, transparent 1.5px) 0 50% / 7px 2px repeat-x;
}

.soc-startup-stage.is-running .soc-startup-stage-icon,
.soc-startup-stage.is-running .soc-startup-stage-copy small {
  color: var(--startup-accent);
}

.soc-startup-stage.is-completed .soc-startup-stage-icon {
  border-color: rgba(134, 239, 172, 0.35);
  color: #86efac;
  background: rgba(34, 197, 94, 0.14);
}

.soc-startup-stage.is-completed .soc-startup-stage-copy small {
  color: #86efac;
}

.soc-startup-stage.is-failed .soc-startup-stage-icon {
  border-color: rgba(248, 113, 113, 0.4);
  color: #fca5a5;
  background: rgba(248, 113, 113, 0.14);
}

.soc-startup-stage.is-failed .soc-startup-stage-copy small {
  color: #fca5a5;
}

/* ---- 실패 안내: 어두운 위험 면 + 밝은 붉은 글자, 버튼은 흰 글자/#dc2626(4.8:1) ---- */
.soc-startup-error {
  border-color: rgba(248, 113, 113, 0.4);
  background: rgba(255, 92, 92, 0.16);
}

.soc-startup-error p,
.soc-startup-error-actions small {
  color: #fecaca;
}

.soc-startup-error-actions button {
  border-color: #dc2626;
  background: #dc2626;
  color: #fff;
}

.soc-startup-error-actions button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.soc-startup-security {
  color: var(--startup-quiet);
}

/* 닫힌 오버레이(visibility hidden으로 남음)는 레이더를 돌리지 않는다 */
.soc-startup-overlay:is(.is-hidden, [hidden]) .soc-startup-radar *,
.soc-startup-overlay:is(.is-hidden, [hidden]) .soc-startup-radar-sites i {
  animation: none !important;
}

@keyframes soc-startup-radar-sweep {
  to { transform: rotate(360deg); }
}

@keyframes soc-startup-radar-ring {
  0% { transform: scale(0.45); opacity: 0.9; }
  100% { transform: scale(2.1); opacity: 0; }
}

@keyframes soc-startup-radar-blink {
  50% { opacity: 0.35; }
}

@keyframes soc-startup-radar-lit {
  0% { transform: scale(0.3); }
  55% { transform: scale(1.5); }
  100% { transform: scale(1); }
}

@media (max-width: 620px) {
  .soc-startup-overlay {
    --startup-radar: 196px;
  }

  .soc-startup-radar .soc-startup-logo {
    width: 70px;
    height: 63px;
  }

  .soc-startup-copy {
    margin-top: 20px;
  }
}

@media (max-height: 640px) and (min-width: 621px) {
  .soc-startup-overlay {
    --startup-radar: 176px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .soc-startup-radar-sweep {
    display: none;
  }

  .soc-startup-radar-ring,
  .soc-startup-radar-sites i {
    animation: none !important;
  }

  .soc-startup-radar-ring:nth-of-type(4) {
    opacity: 0.35;
    transform: scale(1.4);
  }
}

/* ===== L3 행사 모드 진입 막 — Sentrix 쪽 덮는 장면(js/event-mode-entry.js) =====
   event-mode.css의 L3 블록과 같은 값이다(행사 화면은 자기 CSS만 읽는다는 격리 계약 때문에 따로 둔다).
   막이 다 덮이면 event-mode.html이 같은 모양을 덮인 상태로 이어받는다. */
.em-entry-cover {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  overflow: hidden;
  color: #f8fafc;
  color-scheme: dark;
}

.em-entry-cover-panel {
  position: absolute;
  top: -10%;
  bottom: -10%;
  left: -24vw;
  width: 148vw;
  background: #07111f;
  transform: skewX(-10deg) translateX(0);
  animation: em-entry-cover-in 480ms cubic-bezier(0.7, 0, 0.2, 1) both;
}

.em-entry-cover-panel::before,
.em-entry-cover-panel::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 6vw;
  min-width: 28px;
  background: #ff6b00;
}

.em-entry-cover-panel::before {
  right: 100%;
}

.em-entry-cover-panel::after {
  left: 100%;
}

.em-entry-cover-body {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start; /* event-mode.css L3와 같은 자리 */
  padding: 24px 20px;
  /* R17 (2026-10-31): 로고(64×58)+간격 20+알약 32 = 110px 묶음의 가운데를 화면 가운데에 둔다(vh 먼저, dvh 지원 시 덮어씀) */
  padding-top: max(24px, env(safe-area-inset-top, 0px), calc(50vh - 55px));
  padding-top: max(24px, env(safe-area-inset-top, 0px), calc(50dvh - 55px));
  animation: em-entry-fade-in 240ms ease-out 260ms both;
}

.em-entry-cover-mark {
  display: block;
  width: 64px;
  height: auto;
}

.em-entry-cover-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  margin-top: 20px;
  padding: 0 14px;
  border: 1px solid rgba(251, 146, 60, 0.5);
  border-radius: 999px;
  background: rgba(251, 146, 60, 0.14);
  color: #fdba74;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.em-entry-cover-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fb923c;
}

@keyframes em-entry-cover-in {
  from { transform: skewX(-10deg) translateX(-112%); }
  to { transform: skewX(-10deg) translateX(0); }
}

@keyframes em-entry-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 520px) {
  .em-entry-cover-mark {
    width: 56px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .em-entry-cover-panel,
  .em-entry-cover-body {
    animation: none !important;
  }
}
