/* 갈래 소유 파일 — HUD(가독성·타격감·소리). js/hud.js 가 만드는 요소의 모양.
   글자 최소 11px, 본문 글자 대비 4.5:1 이상(어두운 판 #1d1926 기준). 색만으로 구분하지 않는다(▲▼✕ · 굵기 · 위치 같이). */
:root { --hud-bg: rgb(29 25 38 / 0.92); --hud-line: #3a3448; --hud-t1: #f2eff7; --hud-t2: #c4bdd2; --hud-t3: #a9a2b8; }

/* 싸우는 화면에서 능력치 칸은 뺀다(hud.md 3-2). 조작 안내는 시험판이라 남긴다 */
#stats { display: none; }

/* ── 내 판(아래 가운데) ── */
#hudp { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 100001; display: flex; flex-direction: column; gap: 6px; align-items: stretch; pointer-events: none; }
#hudp .vit { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: var(--hud-bg); border: 1px solid var(--hud-line); border-radius: 10px; font-size: 12px; color: var(--hud-t2); font-variant-numeric: tabular-nums; }
#hudp .lvn { color: #ffd36b; font-weight: 800; min-width: 38px; }
#hudp .hb { position: relative; flex: 1 1 260px; height: 10px; border-radius: 5px; background: #352f42; overflow: hidden; }
#hudp .hb i, #hudp .hb b { position: absolute; left: 0; top: 0; bottom: 0; display: block; width: 100%; }
#hudp .hb b { background: #f2eff7; opacity: 0.55; transition: width 0.25s ease-out 0.3s; }
#hudp .hb i { background: #5fd08f; transition: width 0.1s; }
#hudp .hb.low i { background: #ff6b5a; }
#hudp .hpn { color: var(--hud-t1); font-weight: 700; min-width: 64px; }
#hudp .xb { flex: 0 0 90px; height: 4px; border-radius: 2px; background: #2a2534; overflow: hidden; }
#hudp .xb i { display: block; height: 100%; width: 0; background: #6ab0ff; }
#hudp .aim { margin-left: auto; color: var(--hud-t2); white-space: nowrap; }

/* 기술 칸 — 이름 / 대상·거리 / 판정 두 줄 / 효과 칩(2개까지) / 상성(조준 중인 상대) / 남은 초 */
#hudp .skills { position: static; transform: none; display: flex; gap: 6px; pointer-events: auto; }
#hudp .sk { position: relative; width: 104px; min-height: 82px; box-sizing: border-box; padding: 6px 8px 7px; border-radius: 10px; background: var(--hud-bg); border: 1px solid var(--hud-line); border-top: 3px solid var(--c, #4a4458); color: var(--hud-t1); }
#hudp .sk.ultc { border-color: #6a5a2a; border-top-color: var(--c); }
#hudp .sk.pas { width: 112px; border-style: dashed; border-top-style: solid; }
#hudp .sk.pas .l1 { white-space: normal; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
#hudp .sk.none .mv { color: var(--hud-t3); }
#hudp .sk .k { position: absolute; right: 6px; top: 5px; font-size: 11px; color: var(--hud-t2); border: 1px solid #4a4458; border-radius: 5px; padding: 0 4px; line-height: 15px; }
#hudp .sk.pas .k { position: static; display: inline-block; border: 0; padding: 0; }
#hudp .sk .mv { font-weight: 800; font-size: 13px; margin-top: 1px; padding-right: 26px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#hudp .sk .l1, #hudp .sk .l2 { font-size: 11px; color: var(--hud-t2); line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#hudp .sk .chips { display: flex; gap: 3px; margin-top: 3px; min-height: 15px; overflow: hidden; }
#hudp .sk .chips i { font-style: normal; font-size: 11px; line-height: 15px; padding: 0 4px; border-radius: 4px; background: #2e2840; color: var(--hud-t1); white-space: nowrap; }
#hudp .sk .ef { position: absolute; right: 6px; bottom: 7px; font-size: 11px; line-height: 15px; font-weight: 800; padding: 0 3px; border-radius: 4px; background: rgb(29 25 38 / 0.95); }
#hudp .sk .ef.up { color: #ffb02e; } #hudp .sk .ef.down { color: #c4bdd2; } #hudp .sk .ef.no { color: #ff8a7a; }
#hudp .sk .cdw { position: absolute; inset: 0; border-radius: 10px; overflow: hidden; pointer-events: none; }
#hudp .sk .cdf { position: absolute; inset: 0; background: rgb(10 8 14 / 0.62); transform-origin: 50% 100%; transform: scaleY(0); }
#hudp .sk .cds { position: absolute; inset: 0; display: grid; place-items: center; font-size: 20px; font-weight: 900; color: #fff; text-shadow: 0 2px 0 #000; font-variant-numeric: tabular-nums; }
#hudp .sk.locked .cdf { transform: scaleY(1) !important; }
/* 쿨 중·잠김: 설명 글씨는 흐리게, 칸 아래에서 위로 덮는 막 + 가운데 숫자 하나만 */
#hudp .sk.cool .l1, #hudp .sk.cool .l2, #hudp .sk.cool .chips, #hudp .sk.cool .ef,
#hudp .sk.locked .l1, #hudp .sk.locked .l2, #hudp .sk.locked .chips, #hudp .sk.locked .ef { opacity: 0.18; }
#hudp .sk.cool .mv, #hudp .sk.locked .mv { opacity: 0.55; }
#hudp .sk.cool .cdw { background: rgb(10 8 14 / 0.28); }
#hudp .sk.cool .cdf { background: rgb(10 8 14 / 0.6); }
#hudp .sk .cds { font-size: 24px; z-index: 1; }
#hudp .sk .lockt { z-index: 1; font-size: 14px; text-shadow: 0 2px 0 #000; }
#hudp .sk .lockt { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; color: #ffd36b; font-size: 13px; }
#hudp .sk .tip { display: none; position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); width: 300px; background: #120f17; border: 1px solid #403a4e; border-radius: 10px; padding: 10px 12px; color: #ddd; font-size: 12px; line-height: 1.5; z-index: 3; }
#hudp .sk:hover .tip { display: block; }

/* ── 떠오르는 글씨(돌려 쓰는 14개). a/b 는 같은 움직임 — 이름을 바꿔 reflow 없이 다시 시작 ── */
/* will-change 를 두지 않는다 — 쉬는 풀 14칸이 늘 합성 레이어로 남는다. 애니메이션 도는 동안은 브라우저가 알아서 올린다 */
.np { position: absolute; z-index: 100002; pointer-events: none; white-space: nowrap; font-weight: 900; color: #fff; text-shadow: 0 2px 0 #000, 0 0 3px #000; opacity: 0; transform: translateX(-50%); animation-fill-mode: forwards; animation-timing-function: ease-out; }
.np.a { animation-name: npA; } .np.b { animation-name: npB; }
.np.k-dmg { animation-duration: 0.75s; animation-timing-function: cubic-bezier(.2,1.4,.4,1); }
.np.k-txt { animation-duration: 1s; } .np.k-call { animation-duration: 1.1s; } .np.k-lv { animation-duration: 1.3s; }
@keyframes npA { 0% { transform: translate(-50%, 4px) scale(var(--s0, 1.7)); opacity: 1; } 16% { transform: translate(-50%, -6px) scale(1); opacity: 1; } 70% { opacity: 1; } 100% { transform: translate(-50%, -36px) scale(0.92); opacity: 0; } }
@keyframes npB { 0% { transform: translate(-50%, 4px) scale(var(--s0, 1.7)); opacity: 1; } 16% { transform: translate(-50%, -6px) scale(1); opacity: 1; } 70% { opacity: 1; } 100% { transform: translate(-50%, -36px) scale(0.92); opacity: 0; } }
/* 피해 숫자(hud.md 3-6): 내가 줌 흰 18 · 굉장 주황 22 ▲ · 별로 회색 15 ▼ · 급소 빨강 26 ! · 내가 받음 빨강 18 · 도트 13 · 회복 초록 · 남들끼리 흰 55% 13 */
.np.n-out { font-size: 18px; -webkit-text-stroke: 1px #000; }
.np.n-super { font-size: 22px; color: #ffb02e; }
.np.n-weak { font-size: 15px; color: #c4bdd2; --s0: 1.3; }
.np.n-crit { font-size: 26px; color: #ff5a3a; --s0: 2.1; }
.np.n-in { font-size: 18px; color: #ff6b5a; -webkit-text-stroke: 1px #000; }
.np.n-dot { font-size: 13px; font-style: italic; --s0: 1.1; }
.np.n-heal { font-size: 16px; color: #5fd08f; --s0: 1.2; }
.np.n-oth { font-size: 13px; color: rgb(255 255 255 / 0.6); text-shadow: 0 1px 0 #000; --s0: 1.15; }
.np.n-dim { filter: opacity(0.6); }
.np.n-eff { font-size: 13px; --s0: 1.1; }
.np.n-super.n-eff { font-size: 14px; }
.np.n-call { font-size: 14px; background: rgb(20 16 28 / 0.85); border: 1px solid #555; border-radius: 8px; padding: 2px 8px; --s0: 1.1; }
.np.n-ult { font-size: 18px; padding: 3px 11px; border-width: 2px; }
.np.n-lv { font-size: 16px; color: #8cc4ff; --s0: 1.2; }

/* ── 처치 알림 줄(점수판 아래) ── */
#feed { position: fixed; right: 16px; top: 140px; z-index: 100001; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; pointer-events: none; font-size: 12px; }
#feed .fr { display: none; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 7px; background: rgb(23 20 29 / 0.82); color: var(--hud-t2); white-space: nowrap; opacity: 0.75; }
#feed .fr.on { display: flex; }
#feed .fr.mine { opacity: 1; color: var(--hud-t1); border: 1px solid #5a5070; }
#feed .fd { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
#feed .fa, #feed .fv { font-weight: 700; } #feed .fx { color: var(--hud-t3); } #feed .fs { color: #ffd36b; font-weight: 800; }

/* 내 처치 — 가운데 위 1.2초 */
#kbanner { position: fixed; left: 50%; top: 16%; z-index: 100004; pointer-events: none; font-size: 22px; font-weight: 900; color: #fff; text-shadow: 0 2px 0 #000; opacity: 0; transform: translateX(-50%); }
#kbanner.a { animation: kbA 1.2s ease-out forwards; } #kbanner.b { animation: kbB 1.2s ease-out forwards; }
@keyframes kbA { 0% { opacity: 0; transform: translate(-50%, 8px) scale(1.2); } 12% { opacity: 1; transform: translate(-50%, 0) scale(1); } 75% { opacity: 1; } 100% { opacity: 0; } }
@keyframes kbB { 0% { opacity: 0; transform: translate(-50%, 8px) scale(1.2); } 12% { opacity: 1; transform: translate(-50%, 0) scale(1); } 75% { opacity: 1; } 100% { opacity: 0; } }

/* 쓰러진 이유 — 다시 나올 때까지 */
#death { position: fixed; left: 50%; top: 30%; transform: translateX(-50%); z-index: 100004; display: none; text-align: center; padding: 12px 22px; border-radius: 12px; background: rgb(18 14 24 / 0.9); border: 1px solid #4a4058; pointer-events: none; min-width: 260px; }
#death.on { display: block; }
#death .d1 { font-size: 13px; color: #ff8a7a; letter-spacing: 0.05em; }
#death .d2 { font-size: 20px; font-weight: 900; color: #fff; margin-top: 2px; }
#death .d3 { font-size: 12px; color: var(--hud-t2); margin-top: 4px; }
#death .d4 { font-size: 13px; color: #ffd36b; margin-top: 6px; font-variant-numeric: tabular-nums; }

/* ── 피격 테두리: bridge 가 직접 쓰는 값보다 이 규칙이 이긴다. 세기는 hud.js 가 번쩍임 한도를 거쳐 --vig 로 ── */
#vig { opacity: var(--vig, 0) !important; transition: opacity var(--vigd, 350ms) ease-out !important; box-shadow: inset 0 0 120px 20px rgb(220 30 30 / 0.7) !important; }
/* 낮은 체력: 30% 이하 1초 주기, 15% 이하 0.6초 주기로 천천히 숨 쉼(최대 0.25). 번쩍임 줄이기면 고정 */
#lowhp { position: fixed; inset: 0; pointer-events: none; z-index: 100003; opacity: 0; box-shadow: inset 0 0 160px 30px rgb(200 20 20 / 1); }
#lowhp.on { animation: lowB 1s ease-in-out infinite alternate; }
#lowhp.on.crit { animation-duration: 0.6s; }
#lowhp.on.steady { animation: none; opacity: 0.18; }
@keyframes lowB { from { opacity: 0.06; } to { opacity: 0.25; } }

/* ── 점수판 ── */
#board div { display: flex; gap: 6px; } #board div span { margin-left: auto; font-variant-numeric: tabular-nums; } #board div span + span { margin-left: 8px; }
#board { color: var(--hud-t2); } #board b { color: var(--hud-t1); font-weight: 600; } #board .mine b { color: #5fd08f; font-weight: 800; }

/* ── 소리 · 번쩍임 설정 ── */
#hopt { position: absolute; right: 16px; bottom: 82px; z-index: 100001; display: flex; gap: 6px; align-items: center; font-size: 12px; }
#hopt button { background: #2a2534; border: 1px solid #403a4e; color: var(--hud-t1); border-radius: 8px; padding: 4px 9px; font: inherit; cursor: pointer; }
#hopt button.off { color: var(--hud-t3); border-style: dashed; }
#hopt input[type=range] { width: 80px; accent-color: #8a7aff; }

/* 판 준비·카운트다운·끝: 기술을 못 쓰는 동안 칸 위 숫자 대신 판 전체를 흐리게 */
#hudp.held .sk:not(.pas) { opacity: 0.45; }
#hudp.held .sk .cds { visibility: hidden; }

/* 좁은 화면(1400 미만): 오른쪽 아래 조작 안내가 가방 칸과 겹친다 — 숨김(첫 판 안내 · Esc 단축키 창이 대신) */
@media (max-width: 1399px) { .hint { display: none; } }

/* 첫 판 안내(판 화면 갈래의 .mt-guide): 가운데 캐릭터를 덮지 않게 화면 아래쪽 띠로 — 내 판(#hudp) 바로 위 */
#mt .mt-guide { top: auto; bottom: 196px; display: flex; gap: 18px; align-items: center; padding: 6px 18px; font-size: 13px; line-height: 1.6; border-radius: 10px; white-space: nowrap; }
#mt .mt-guide[hidden] { display: none; }
/* 은신한 상대(아지랑이): 머리 위 막대·그림자도 옅게 — 몸보다 막대가 먼저 드러나지 않게 */
.mon.cloak .bar { opacity: 0.25; } .mon.cloak .shadow { opacity: 0.3; }
