/* doorlock/style.css — 혼자 사는 집 전용 화면 요소 (공통 ui.css 위에 덧씌움) */

.dl-layer { position: fixed; inset: 0; pointer-events: none; z-index: 2; }
.dl-dark { position: fixed; inset: 0; pointer-events: none; z-index: 1; opacity: 0; background: radial-gradient(ellipse at center, rgba(0,0,0,0) 38%, rgba(0,0,0,0.7) 78%, rgba(0,0,0,0.95) 100%); }
.dl-black { position: fixed; inset: 0; pointer-events: none; z-index: 6; opacity: 0; background: #000; }
.dl-vig { position: absolute; inset: 0; opacity: 0; transition: opacity 0.18s; background: radial-gradient(ellipse at center, rgba(255,210,120,0) 52%, rgba(255,190,90,0.38) 86%, rgba(255,160,60,0.6)); }
.dl-vig.red { background: radial-gradient(ellipse at center, rgba(255,40,30,0) 48%, rgba(255,40,30,0.45) 84%, rgba(200,0,0,0.75)); }

/* 첫 장면 큰 자막 “누구세요?” */
.dl-big { position: absolute; left: 0; right: 0; top: 34%; text-align: center; font-size: clamp(54px, 15vw, 104px); font-weight: 900; color: #fff; letter-spacing: -0.02em;
  text-shadow: 0 4px 0 #000, 0 0 40px rgba(0,0,0,0.95), 0 0 80px rgba(120,0,0,0.6); opacity: 0; transform: scale(1.25); transition: opacity 0.08s, transform 0.25s cubic-bezier(.2,1.6,.4,1); word-break: keep-all; }
.dl-big.show { opacity: 1; transform: scale(1); animation: dlShake 0.06s 6; }
@keyframes dlShake { 50% { transform: translate(4px, -3px) rotate(-1deg); } }
.dl-think { position: absolute; left: 0; right: 0; top: 64%; text-align: center; font-size: clamp(22px, 6vw, 32px); font-weight: 800; font-style: italic; color: #e8e2d4;
  text-shadow: 0 2px 0 #000, 0 0 18px rgba(0,0,0,0.9); opacity: 0; transition: opacity 0.3s; word-break: keep-all; padding: 0 16px; }
.dl-think.show { opacity: 1; }
.dl-floor { position: absolute; left: 0; right: 0; top: 40%; text-align: center; font-size: clamp(34px, 9vw, 56px); font-weight: 900; color: #cfe0ff; letter-spacing: 0.04em; text-shadow: 0 3px 0 #000, 0 0 24px rgba(0,0,0,0.9); opacity: 0; }
.dl-floor.show { animation: dlFloor 1.6s ease-out forwards; }
@keyframes dlFloor { 0% { opacity: 0; transform: translateY(10px); } 15% { opacity: 1; transform: translateY(0); } 70% { opacity: 1; } 100% { opacity: 0; } }

/* 자막 (그 사람 · 나 · 112 · 문자 · 경비 · 경찰) */
.dl-sub { position: absolute; left: 50%; top: calc(max(14px, env(safe-area-inset-top)) + 46px); transform: translateX(-50%) translateY(-6px); max-width: min(92vw, 560px); width: max-content;
  background: rgba(8,8,10,0.78); border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; padding: 8px 14px; font-size: 17px; font-weight: 800; line-height: 1.38; text-align: center;
  word-break: keep-all; color: #fff; opacity: 0; transition: opacity 0.2s, transform 0.2s; }
.dl-sub.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.dl-sub i { font-style: normal; display: inline-block; font-size: 12px; font-weight: 900; border-radius: 6px; padding: 1px 6px; margin-right: 7px; vertical-align: 2px; background: rgba(255,255,255,0.18); }
.dl-sub.thief, .dl-sub.inside { color: #ffd9cf; font-size: 19px; }
.dl-sub.thief i, .dl-sub.inside i { background: #b3261e; color: #fff; }
.dl-sub.c112 i, .dl-sub.sms i { background: #2f6fd6; color: #fff; }
.dl-sub.c112, .dl-sub.sms { color: #dbe8ff; }
.dl-sub.guard i { background: #ffd54a; color: #1a1408; }
.dl-sub.cop i { background: #c6e33a; color: #12160a; }
@media (max-width: 480px) { .dl-sub { font-size: 15px; top: calc(max(12px, env(safe-area-inset-top)) + 96px); } .dl-sub.thief, .dl-sub.inside { font-size: 17px; } }

/* 첫 판 소음 큰 자막 「쉿! 뛰면 들려요. 천천히」 (10/29): 대사 자막 모양을 크게. 가운데 위쪽 = 대사 자막(두 줄까지) 바로 아래,
   112 고르기·문자 창(30%, 폰 24%)·「들켰다!」(28%)·뜬 글자(40%) 위. 112 창이 뜨거나 판이 끝나면 main.js 가 바로 내림 */
.dl-shh { position: absolute; left: 50%; top: calc(max(14px, env(safe-area-inset-top)) + 124px); transform: translateX(-50%) translateY(-8px) scale(0.96); max-width: min(92vw, 640px); width: max-content;
  background: rgba(8,8,10,0.8); border: 1px solid rgba(255,255,255,0.12); border-radius: 14px; padding: 8px 18px; font-size: clamp(26px, 7.2vw, 42px); font-weight: 900; line-height: 1.2; text-align: center;
  word-break: keep-all; color: #fff; text-shadow: 0 2px 0 #000; opacity: 0; transition: opacity 0.2s, transform 0.25s cubic-bezier(.2,1.4,.4,1); }
.dl-shh.show { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
.dl-shh b { font-weight: 900; color: #ffe066; }
@media (max-width: 480px) { .dl-shh { top: calc(max(12px, env(safe-area-inset-top)) + 166px); } }
@media (max-height: 500px) and (min-width: 481px) { .dl-shh { top: calc(max(10px, env(safe-area-inset-top)) + 94px); font-size: 24px; padding: 6px 14px; } }

/* 머리 위 표시 · 화면 가장자리 */
.dl-alert { position: absolute; left: 0; top: 0; margin: -24px 0 0 -24px; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; font-size: 34px; font-weight: 900;
  text-shadow: 0 3px 0 #000, 0 0 12px rgba(0,0,0,0.9); opacity: 0; }
.dl-alert.show { opacity: 1; }
.dl-alert b { display: block; font: inherit; }
.dl-alert.yellow { color: #ffe066; } .dl-alert.orange { color: #ff9a3a; } .dl-alert.red { color: #ff3b2f; font-size: 44px; }
.dl-alert.orange b { animation: dlPulse 0.4s infinite alternate; } .dl-alert.red b { animation: dlPulse 0.2s infinite alternate; }
@keyframes dlPulse { to { transform: scale(1.18); } } /* 바깥 transform 은 위치(place)가 씀 → 커졌다 작아지기는 안쪽 글자에만 (scale 속성은 위치까지 키워서 표시가 옆으로 밀렸음, 10/27) */
.dl-edge { position: absolute; top: 46%; font-size: 22px; font-weight: 900; text-shadow: 0 2px 0 #000; opacity: 0; padding: 4px 10px; border-radius: 10px; background: rgba(0,0,0,0.45); }
.dl-edge.show { opacity: 1; }
.dl-edge.left { left: 10px; } .dl-edge.right { right: 10px; }
.dl-edge.yellow { color: #ffe066; } .dl-edge.orange { color: #ff9a3a; } .dl-edge.red { color: #ff3b2f; }

/* 게이지 */
.dl-bar { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; text-shadow: 0 1px 2px #000; }
.dl-bar span { min-width: 54px; }
.dl-bar .track { position: relative; width: 120px; height: 9px; border-radius: 9px; background: rgba(255,255,255,0.14); overflow: hidden; }
.dl-bar .track i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(90deg, #7fd6a0, #c6f06b); transition: width 0.12s; }
.dl-noise .track em { position: absolute; left: 80%; top: 0; bottom: 0; width: 2px; background: rgba(255,80,60,0.85); }
.dl-bar.mid .track i { background: linear-gradient(90deg, #ffd24a, #ff9a3a); }
.dl-bar.hi .track i { background: linear-gradient(90deg, #ff6a3a, #ff2a1a); }
.dl-bar.hi span { color: #ff6b5b; }
/* 소음 막대 80 이상 = 빨강 깜빡임 경고(글자 없음), 92 이상 = 더 빠르게. 100 = 그 사람이 뛰어옴 */
.dl-noise.hi .track { animation: dlNoiseWarn 0.5s steps(1, end) infinite; }
.dl-noise.hi .track i { animation: dlNoiseFill 0.5s steps(1, end) infinite; }
.dl-noise.max .track, .dl-noise.max .track i { animation-duration: 0.22s; }
@keyframes dlNoiseWarn { 0% { background: rgba(255,40,30,0.45); box-shadow: 0 0 0 1px rgba(255,70,50,0.95), 0 0 12px rgba(255,40,30,0.9); } 50% { background: rgba(255,255,255,0.14); box-shadow: none; } }
@keyframes dlNoiseFill { 0% { opacity: 1; } 50% { opacity: 0.45; } }
.dl-sus .track i { background: linear-gradient(90deg, #ffe08a, #ffc24a); }
.dl-goals { display: flex; gap: 6px; }
.dl-goals i { font-style: normal; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 999px; background: rgba(10,10,14,0.6); border: 1px solid rgba(255,255,255,0.12); color: #cfc5ad; }
.dl-goals i::before { content: '□ '; }
.dl-goals i.got { color: #8ff09c; border-color: rgba(127,224,138,0.5); }
.dl-goals i.got::before { content: '✓ '; }
.dl-loc { font-size: 13px; padding: 5px 10px; }
.dl-st { font-size: 13px; padding: 5px 10px; }
.dl-st.cop { background: rgba(30,60,140,0.7); }
.dl-st.warn { background: rgba(160,20,20,0.7); }

/* 112 고르기 · 문자 입력 */
.dl-pick { position: absolute; left: 50%; top: 30%; transform: translateX(-50%); background: rgba(10,12,18,0.88); border: 1px solid rgba(120,160,255,0.35); border-radius: 16px; padding: 12px 16px; text-align: center; display: grid; gap: 6px; min-width: 230px; }
.dl-pick b { font-size: 18px; color: #fff; }
.dl-pick span { font-size: 14px; font-weight: 700; color: #dbe4f5; }
.dl-pick span i { font-style: normal; display: inline-block; min-width: 22px; padding: 1px 7px; margin-right: 6px; border-radius: 6px; background: #3b82f6; color: #fff; font-weight: 900; }
.dl-pick span i.g { background: #22a35a; }
.dl-type { position: absolute; left: 50%; top: 30%; transform: translateX(-50%); background: rgba(10,12,18,0.82); border-radius: 14px; padding: 10px 14px; text-align: center; min-width: 200px; display: grid; gap: 6px; }
.dl-type b { font-size: 15px; color: #fff; }
.dl-type .track { height: 8px; border-radius: 8px; background: rgba(255,255,255,0.15); overflow: hidden; }
.dl-type .track i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #3b82f6, #7fb2ff); }
.dl-type small { font-size: 11px; color: #9fb3c6; }
.dl-type.moving small { color: #ff8a80; }
body.touch .dl-pick, body.touch .dl-type { top: 24%; }

/* 작은 안내 (아래 가운데) */
.dl-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(10,10,14,0.76); border: 1px solid rgba(255,255,255,0.1); 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; }
.dl-hint.show { opacity: 1; transform: translateX(-50%) translateY(0); }
body.touch .dl-hint { bottom: calc(232px + env(safe-area-inset-bottom)); font-size: 14px; }
body.dl-on .ods-prompt { font-size: 15px; padding: 7px 14px; border: 1px solid rgba(255,213,74,0.45); max-width: 88vw; white-space: normal; text-align: center; word-break: keep-all; }
body.dl-on .ods-msg { word-break: keep-all; }
@media (max-width: 480px) {
  body.dl-on .ods-msg.scream { font-size: 40px; }
  .dl-bar span { min-width: 44px; font-size: 11px; }
  .dl-bar .track { width: 84px; }
  .dl-loc, .dl-st { font-size: 12px; padding: 4px 9px; }
}
.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: 19px; color: #9fc3ff; }

/* 가상 상황 표시 */
.dl-tag { position: fixed; left: 50%; bottom: calc(6px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 2; pointer-events: none; font-size: 10px; color: rgba(255,255,255,0.42); display: none; white-space: nowrap; }
body.dl-on.dl-played .dl-tag { display: block; }

/* 결과: 정체 공개 · 체크리스트 · 팁 */
.dl-extra { text-align: left; margin: 10px 0 8px; display: grid; gap: 8px; }
.dl-extra .h { font-size: 12px; font-weight: 800; color: #a59a83; margin-bottom: 4px; letter-spacing: 0.04em; }
.dl-reveal { padding: 10px 12px; border-radius: 14px; background: linear-gradient(135deg, rgba(255,213,74,0.16), rgba(255,255,255,0.03)); border: 1px solid rgba(255,213,74,0.35); }
.dl-reveal b { display: block; font-size: 17px; color: #ffe08a; }
.dl-reveal span { display: block; font-size: 13px; color: #e8dfca; margin-top: 2px; word-break: keep-all; }
.dl-reveal em { display: block; font-style: normal; font-size: 12px; color: #b9b2a2; margin-top: 6px; word-break: keep-all; }
.dl-check { padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.07); }
.dl-check ul { list-style: none; display: grid; gap: 4px; }
.dl-check li { display: grid; grid-template-columns: 40px 1fr; gap: 8px; align-items: start; font-size: 13px; line-height: 1.35; }
.dl-check li b { font-size: 11px; font-weight: 900; text-align: center; border-radius: 6px; padding: 2px 0; margin-top: 1px; }
.dl-check li.ok b { background: rgba(127,224,138,0.2); color: #8ff09c; }
.dl-check li.mid b { background: rgba(255,200,80,0.2); color: #ffd47a; }
.dl-check li.miss b { background: rgba(255,93,93,0.18); color: #ff8a80; }
.dl-check li em { font-style: normal; color: #8f8a7e; font-size: 11px; margin-right: 2px; }
.dl-check li i { font-style: normal; font-size: 11px; color: #8f8a7e; margin-left: 4px; }
.dl-check li small { display: block; font-size: 11px; color: #b9a58a; word-break: keep-all; }
.dl-tips { margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,0.07); display: grid; gap: 3px; }
.dl-tips p { font-size: 12px; color: #d8d0bd; word-break: keep-all; }
.dl-tips p::before { content: '· '; color: #7fb2ff; }
.dl-tips b { color: #9fc3ff; }
.dl-src { font-size: 10.5px; color: #8f8a7e; margin-top: 6px; }
