/* elevator/style.css — 엘리베이터가 멈췄다 전용 화면 요소 (공통 ui.css 위에 덧씌움) */

/* 공포 · 학생 게이지: 차오를수록 나쁨 */
.el-fear .fill { background: linear-gradient(90deg, #ffd54a, #ff9a4b); }
.el-fear.danger .fill { background: linear-gradient(90deg, #ff7a3b, #ff2f2f); }
.el-fear.danger { animation: odsPulse 0.5s infinite alternate; }
.el-kidbar .fill { background: linear-gradient(90deg, #9fd3ff, #7c9cff); }
.el-kidbar.danger .fill { background: linear-gradient(90deg, #ff9bb0, #ff5d7d); }
body:not(.el-ready) .el-fear, body:not(.el-ready) .el-kidbar, body:not(.el-ready) .el-phone { opacity: 0; }
.el-fear, .el-kidbar, .el-phone { transition: opacity 0.4s; }

/* 휴대폰 상태 */
.el-phone { gap: 8px !important; font-size: 14px; }
.el-phone .sig { letter-spacing: -2px; font-size: 13px; color: #fff; }
.el-phone .sig i { font-style: normal; color: rgba(255,255,255,0.22); }
.el-phone b.low { color: #ff6b5b; }
.el-callchip { background: rgba(30, 90, 50, 0.75) !important; border-color: rgba(120,255,160,0.25) !important; }

/* 자막: 통화 (아래) */
.el-sub { position: absolute; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(6px); max-width: min(94vw, 560px);
  background: rgba(8,9,12,0.82); border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; padding: 8px 14px; font-size: 16px; font-weight: 700; line-height: 1.4;
  text-align: center; word-break: keep-all; opacity: 0; transition: opacity 0.18s, transform 0.18s; }
.el-sub.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.el-sub b, .el-kidsub b { display: inline-block; font-size: 12px; font-weight: 900; border-radius: 6px; padding: 2px 7px; margin-right: 8px; vertical-align: 2px; }
.w-op { background: #2f6fd6; color: #fff; }
.w-119 { background: #e0402b; color: #fff; }
.w-me { background: #f4e9d0; color: #16120b; }
.w-kid { background: #8fa2ff; color: #10142a; }
.w-res { background: #ff8a2a; color: #1b0f05; }
body.touch .el-sub { bottom: calc(250px + env(safe-area-inset-bottom)); font-size: 15px; }

/* 자막: 학생 (위) */
.el-kidsub { position: absolute; left: 50%; top: calc(18% + env(safe-area-inset-top)); transform: translateX(-50%); max-width: min(90vw, 480px);
  background: rgba(20,24,46,0.78); border: 1px solid rgba(143,162,255,0.25); border-radius: 12px; padding: 7px 13px; font-size: 15px; font-weight: 700;
  text-align: center; word-break: keep-all; opacity: 0; transition: opacity 0.18s; }
.el-kidsub.show { opacity: 1; }
@media (max-width: 480px) { .el-kidsub { top: calc(96px + env(safe-area-inset-top)); font-size: 14px; } }

/* 안내 */
.el-hint { position: absolute; left: 50%; bottom: calc(26px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(8px); max-width: min(92vw, 520px);
  background: rgba(60,48,10,0.82); border: 1px solid rgba(255,213,74,0.35); border-radius: 12px; padding: 8px 14px; font-size: 15px; font-weight: 800; color: #ffe9a6;
  text-align: center; word-break: keep-all; opacity: 0; transition: opacity 0.25s, transform 0.25s; }
.el-hint.show { opacity: 1; transform: translateX(-50%) translateY(0); }
body.touch .el-hint { bottom: calc(196px + env(safe-area-inset-bottom)); font-size: 14px; }
body.el-on .ods-prompt { font-size: 15px; padding: 7px 14px; border: 1px solid rgba(255,213,74,0.45); top: calc(50% + 40px); }
body.touch.el-on .ods-prompt { display: none; }

/* 숨 고리 */
.el-breath { position: absolute; left: 50%; bottom: calc(140px + env(safe-area-inset-bottom)); width: 64px; height: 64px; margin-left: -32px; transition: opacity 0.3s; }
.el-breath svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.el-breath circle { fill: none; stroke-width: 8; }
.el-breath .trk { stroke: rgba(255,255,255,0.14); }
.el-breath .band { stroke: rgba(127,224,138,0.35); }
.el-breath .prog { stroke: #9fd3ff; transition: stroke 0.15s; }
.el-breath.ok .prog { stroke: #7fe08a; }
.el-breath.out .prog { stroke: #c9b7ff; }
.el-breath span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 900; color: #fff; text-shadow: 0 1px 2px #000; }
.el-breath.hide { display: block !important; opacity: 0; }
body.touch .el-breath { left: auto; right: calc(30px + env(safe-area-inset-right)); bottom: calc(214px + env(safe-area-inset-bottom)); margin-left: 0; width: 70px; height: 70px; }

/* 시선 답하기 · 길게 누르기 */
.el-gaze, .el-hold { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%;
  background: conic-gradient(#7fe08a calc(var(--p, 0) * 360deg), rgba(255,255,255,0.15) 0); -webkit-mask: radial-gradient(circle, transparent 17px, #000 18px); mask: radial-gradient(circle, transparent 17px, #000 18px); }
.el-hold { background: conic-gradient(#ffd54a calc(var(--p, 0) * 360deg), rgba(255,255,255,0.15) 0); width: 58px; height: 58px; margin: -29px 0 0 -29px;
  -webkit-mask: radial-gradient(circle, transparent 22px, #000 23px); mask: radial-gradient(circle, transparent 22px, #000 23px); }
.el-hold.danger { background: conic-gradient(#ff4b3b calc(var(--p, 0) * 360deg), rgba(255,255,255,0.15) 0); }

/* 화면 밖 목표 화살표 */
.el-arrow { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 2px; pointer-events: none; }
.el-arrow i { display: block; width: 0; height: 0; border-top: 11px solid transparent; border-bottom: 11px solid transparent; border-left: 18px solid #ffd54a; filter: drop-shadow(0 0 6px rgba(255,213,74,0.7)); animation: elNudge 0.7s ease-in-out infinite alternate; }
.el-arrow span { font-size: 12px; font-weight: 900; color: #ffd54a; text-shadow: 0 1px 2px #000; white-space: nowrap; }
@keyframes elNudge { to { opacity: 0.5; } }

/* 공포 화면 · 검은 화면 */
.el-vig { position: fixed; inset: 0; pointer-events: none; z-index: 1; opacity: 0;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0) 34%, rgba(10,0,0,0.75) 72%, rgba(0,0,0,0.97)); }
.el-vig.pulse { animation: elPulse 0.55s ease-in-out infinite alternate; }
@keyframes elPulse { to { filter: brightness(1.35); } }
.el-black { position: fixed; inset: 0; pointer-events: none; z-index: 3; opacity: 0; background: #000; }

/* 가상 상황 표시 */
.el-tag { position: fixed; left: 50%; top: max(10px, env(safe-area-inset-top)); transform: translateX(-50%); z-index: 2; pointer-events: none; font-size: 10px; color: rgba(255,255,255,0.42);
  letter-spacing: 0.02em; display: none; white-space: nowrap; }
body.el-on .el-tag { display: block; }
@media (max-width: 480px) { .el-tag { top: auto; bottom: calc(6px + env(safe-area-inset-bottom)); } }

/* 버튼 글자 */
.ctl-btn small { font-size: 11px; font-weight: 800; pointer-events: none; } /* 10/23 QA: 버튼 아래 글자(small)를 누르면 글자가 바뀌는 순간 손을 떼도 버튼이 계속 눌린 걸로 남던 버그 (B 숨쉬기 고장) */
.ctl-btn.slot-d .ctl-label { font-size: 18px; }
.ctl-btn.slot-b .ctl-label { font-size: 13px; }
.ctl-btn.slot-b.on { background: rgba(255, 230, 150, 0.45); border-color: rgba(255,230,150,0.9); }

/* 결과: 행동요령 체크리스트 */
.el-check { text-align: left; margin: 10px 0 8px; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.07); }
.el-check-h { font-size: 12px; font-weight: 800; color: #a59a83; margin-bottom: 6px; letter-spacing: 0.02em; display: flex; justify-content: space-between; }
.el-check-h b { color: #ffd54a; }
.el-check ul { list-style: none; display: grid; gap: 4px; }
.el-check li { display: grid; grid-template-columns: 40px 1fr 26px; gap: 8px; align-items: start; font-size: 13px; line-height: 1.35; }
.el-check li > b { font-size: 11px; font-weight: 900; text-align: center; border-radius: 6px; padding: 2px 0; margin-top: 1px; }
.el-check li.ok > b { background: rgba(127,224,138,0.2); color: #8ff09c; }
.el-check li.miss > b { background: rgba(255,93,93,0.18); color: #ff8a80; }
.el-check li em { font-style: normal; color: #8f8a7e; font-size: 11px; margin-right: 2px; }
.el-check li small { display: block; font-size: 11px; color: #b9a58a; }
.el-check li.ok span { color: #e8e2d2; }
.el-check li.miss span { color: #f2e6d8; }
.el-check li > i { font-style: normal; font-size: 11px; font-weight: 800; color: #8f8a7e; text-align: right; margin-top: 2px; }
.el-check li.ok > i { color: #8ff09c; }
.el-src { font-size: 10.5px; color: #8f8a7e; margin-top: 8px; line-height: 1.45; }
