/* alley/style.css — 골목에서 일진과 눈이 마주쳤다 전용 화면 요소 (공통 ui.css 위에 덧씌움) */

/* 시비 게이지 */
.al-gauge { display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; column-gap: 7px; align-items: center; font-size: 12px; font-weight: 800; text-shadow: 0 1px 2px #000;
  background: rgba(10,10,14,0.55); border: 1px solid rgba(255,255,255,0.08); border-radius: 14px; padding: 6px 10px 5px; }
.al-gauge .track { position: relative; width: 132px; height: 11px; border-radius: 11px; background: rgba(255,255,255,0.16); overflow: hidden; border: 1px solid rgba(0,0,0,0.35); }
.al-gauge .track i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #ffe066, #ffc23a); transition: width 0.12s; }
.al-gauge .track em { position: absolute; top: 0; bottom: 0; width: 2px; background: rgba(0,0,0,0.55); }
.al-gauge b { font-size: 13px; min-width: 36px; font-variant-numeric: tabular-nums; }
.al-gauge small { grid-column: 1 / 4; font-size: 11px; color: #d8cfb8; margin-top: 2px; }
.al-gauge.mid .track i { background: linear-gradient(90deg, #ffb13a, #ff7a2f); }
.al-gauge.hi .track i { background: linear-gradient(90deg, #ff6a3a, #ff2f2f); }
/* 좁은 세로 화면: 가운데 위 '녹화 중' 표시와 안 겹치게 2줄로 접는다 */
@media (max-width: 520px) {
  .al-gauge { grid-template-columns: 1fr auto; padding: 5px 9px 5px; column-gap: 6px; }
  .al-gauge > span { font-size: 11px; }
  .al-gauge b { font-size: 12px; min-width: 0; text-align: right; }
  .al-gauge .track { grid-column: 1 / 3; grid-row: 2; width: 112px; height: 9px; margin-top: 3px; }
  .al-gauge small { grid-column: 1 / 3; grid-row: 3; font-size: 10.5px; }
}
.al-gauge.hi { animation: odsPulse 0.35s infinite alternate; }
.al-gauge.hi small { color: #ffb3a8; }

/* 우리 집 방향 */
.al-home { display: flex; align-items: center; gap: 8px; background: rgba(10,10,14,0.6); border: 1px solid rgba(255,255,255,0.08); padding: 6px 12px 6px 9px; border-radius: 14px; font-weight: 800; }
.al-home .al-arrow { display: inline-block; font-style: normal; font-size: 16px; color: #ffd54a; transition: transform 0.15s; width: 18px; text-align: center; }
.al-home small { display: block; font-size: 10px; color: #cfc5ad; line-height: 1; }
.al-home b { font-size: 18px; line-height: 1.1; font-variant-numeric: tabular-nums; }

/* 3D 위에 띄우는 것들 */
.al-layer { position: fixed; inset: 0; pointer-events: none; z-index: 2; overflow: hidden; }
.al-bubble { position: absolute; left: 0; top: 0; max-width: min(86vw, 360px); padding: 7px 13px 8px; border-radius: 16px; background: #fffaf0; color: #1b140c;
  font-size: 18px; font-weight: 900; line-height: 1.25; text-align: center; word-break: keep-all; width: max-content; box-shadow: 0 4px 14px rgba(0,0,0,0.5);
  opacity: 0; translate: -50% -100%; transition: opacity 0.12s; border: 2px solid #1b140c; }
.al-bubble.show { opacity: 1; }
.al-bubble em { display: block; font-style: normal; font-size: 10px; font-weight: 800; color: #8a5a3a; letter-spacing: 0.04em; margin-bottom: 1px; }
.al-bubble.big { font-size: 40px; padding: 10px 22px 12px; background: #ffffff; border-width: 3px; }
.al-bubble.big em { color: #a03020; }
.al-bubble.dock { translate: -50% 0; }
.al-bubble.clerk { background: #e8fff0; }
.al-bubble.clerk em { color: #1f7a4a; }

/* 속마음 (아래 가운데) */
.al-me { position: absolute; left: 50%; bottom: 25%; transform: translateX(-50%); font-size: 19px; font-weight: 800; color: #fff; text-shadow: 0 2px 0 #000, 0 0 12px rgba(0,0,0,0.9);
  opacity: 0; transition: opacity 0.2s; white-space: nowrap; font-style: italic; }
.al-me.show { opacity: 1; }
body.touch .al-me { bottom: 35%; font-size: 17px; }

/* 관제센터 (위 가운데) */
.al-ctrl { position: absolute; left: 50%; top: 18%; transform: translateX(-50%); max-width: min(90vw, 460px); background: rgba(8,20,40,0.88); border: 1px solid rgba(120,190,255,0.5); color: #e6f2ff;
  padding: 8px 14px; border-radius: 12px; font-size: 15px; font-weight: 800; text-align: center; word-break: keep-all; opacity: 0; transition: opacity 0.2s; }
.al-ctrl em { display: block; font-style: normal; font-size: 10px; color: #8fc8ff; letter-spacing: 0.06em; margin-bottom: 2px; }
.al-ctrl.show { opacity: 1; }

/* 눈 마주침 경고 */
.al-eye { position: absolute; left: 50%; top: calc(50% + 46px); transform: translate(-50%, -50%) scale(0.9); font-size: 24px; font-weight: 900; color: #ff4a3a; letter-spacing: 0.04em;
  text-shadow: 0 2px 0 #000, 0 0 18px rgba(255,0,0,0.6); opacity: 0; transition: opacity 0.12s, transform 0.12s; }
.al-eye.show { opacity: 1; transform: translate(-50%, -50%) scale(1); animation: alBeat 0.4s infinite alternate; }
@keyframes alBeat { from { scale: 1; } to { scale: 1.12; } }
.al-vig { position: absolute; inset: 0; opacity: 0; transition: opacity 0.15s;
  background: radial-gradient(ellipse at center, rgba(255,30,20,0) 45%, rgba(200,10,10,0.35) 78%, rgba(120,0,0,0.75)); }

/* 갈림목 길 표시 */
.al-tag { position: absolute; left: 0; top: 0; translate: -50% -100%; font-size: 12px; font-weight: 900; color: #1b140c; background: #ffd54a; padding: 3px 9px; border-radius: 8px;
  opacity: 0; transition: opacity 0.25s; white-space: nowrap; box-shadow: 0 2px 8px rgba(0,0,0,0.45); }
.al-tag.show { opacity: 0.92; }
.al-tag i { position: absolute; left: 50%; bottom: -6px; margin-left: -6px; width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 7px solid #ffd54a; }

/* 작은 안내 (아래 가운데) */
.al-hint { position: absolute; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(8px); max-width: min(92vw, 520px);
  background: rgba(10,10,14,0.78); border: 1px solid rgba(255,213,74,0.35); border-radius: 12px; padding: 8px 14px; font-size: 15px; font-weight: 800;
  text-align: center; word-break: keep-all; opacity: 0; transition: opacity 0.25s, transform 0.25s; color: #fff3cf; }
.al-hint.show { opacity: 1; transform: translateX(-50%) translateY(0); }
body.touch .al-hint { bottom: calc(232px + env(safe-area-inset-bottom)); font-size: 14px; }
body.al-phoneup .al-hint { bottom: 30.5%; } /* 폰 들면 화면 아래 폰과 안 겹치게 */
body.al-on .ods-prompt { font-size: 15px; padding: 7px 14px; border: 1px solid rgba(255,213,74,0.5); top: calc(50% + 60px); }

/* 줌인 순간 화면 테두리 · 암전 */
.al-zoom { position: fixed; inset: 0; pointer-events: none; z-index: 1; opacity: 0; transition: opacity 0.1s;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0) 40%, rgba(0,0,0,0.75) 85%); }
.al-zoom.on { opacity: 1; }
.al-black { position: fixed; inset: 0; pointer-events: none; z-index: 3; opacity: 0; background: #000; }

/* 버튼 글자 */
.ctl-btn small { font-size: 12px; font-weight: 800; }
.ctl-btn.slot-d .ctl-label { font-size: 17px; }
.ctl-btn.slot-b .ctl-label { font-size: 16px; }

/* 결과: 안전 점수 체크리스트 */
.al-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); }
.al-check-h { font-size: 12px; font-weight: 800; color: #a59a83; margin-bottom: 6px; letter-spacing: 0.04em; }
.al-check-h b { color: #ffd54a; font-size: 14px; }
.al-check ul { list-style: none; display: grid; gap: 4px; }
.al-check li { display: grid; grid-template-columns: 44px 1fr; gap: 8px; align-items: start; font-size: 13px; line-height: 1.35; }
.al-check li b { font-size: 11px; font-weight: 900; text-align: center; border-radius: 6px; padding: 2px 0; margin-top: 1px; font-variant-numeric: tabular-nums; }
.al-check li.ok b { background: rgba(127,224,138,0.2); color: #8ff09c; }
.al-check li.half b { background: rgba(255,213,74,0.16); color: #ffd54a; }
.al-check li.miss b { background: rgba(255,93,93,0.18); color: #ff8a80; }
.al-check li small { display: block; font-size: 11px; color: #b9a58a; }
.al-check li span { color: #ece5d6; }
.al-117 { font-size: 12px; color: #e8e2d2; margin-top: 8px; padding: 6px 8px; border-radius: 8px; background: rgba(120,190,255,0.08); border: 1px solid rgba(120,190,255,0.2); }
.al-117 b { color: #8fc8ff; }
.al-src { font-size: 10.5px; color: #8f8a7e; margin-top: 6px; }
@media (max-height: 520px) { .al-bubble.big { font-size: 30px; } .al-ctrl { top: 10%; } }
@media (max-width: 480px) { .al-bubble { font-size: 16px; padding: 6px 11px 7px; } .al-bubble.big { font-size: 34px; } }
