/* 골든타임 119 디펜스 v3 — 차고 킷(docs/td-v3-art-direction.md): 맵이 화면 끝까지 · HUD는 판 위에 뜬 명판 · 아래는 떠 있는 메달·단추.
 * 색·글꼴은 theme3.js T·FONT와 같은 값(한쪽만 바꾸지 말 것). 글꼴은 Black Han Sans(제목) + Pretendard(나머지·모든 숫자) 두 가족만. */
:root {
  --c-ink: #0B0F18; --c-steel-900: #121A29; --c-steel-800: #1B2638; --c-steel-700: #273549; --c-steel-500: #52627C; --c-steel-300: #9AA8BE;
  --c-paper: #F5ECD7; --c-paper-shade: #E4D3AE; --c-paper-ink: #2B2014; --c-paper-muted: #6B5A42;
  --c-enamel: #C62A2F; --c-enamel-hi: #E8484A; --c-enamel-lo: #7E1419; --c-brass: #C99A3E; --c-brass-hi: #F3D98C; --c-brass-lo: #7A5A1E;
  --c-chrome: #D9E1EA; --c-reflect: #F4E04D; --c-outline: #24150B;
  --c-text: #FFF6E4; --c-text-2: #D8CFBD; --c-text-3: #9AA8BE;
  --c-ok: #1E8E4E; --c-ok-hi: #4CCB7E; --c-hold: #F0B429; --c-bad: #E2372B; --c-bad-soft: #FF8A7A; --c-weak: #8793A6;
  --c-water: #5CD0F0; --c-water-hi: #C9F1FF; --c-flame: #FF7A1A; --c-flame-hi: #FFD166;
  /* 약제 정체성 색(data3 IDENT · theme3 T.agent와 같은 값): 물 · 폼 · 분말 · 막기 · 알코올 폼 · 모래. 색 판 위 글자는 늘 짙은 글씨 */
  --a-water: #2E8BFF; --a-afff: #B6FFDD; --a-abc: #FF3D6E; --a-block: #FF8A1F; --a-arfoam: #F0A0FF; --a-sand: #F5E08A; --a-lid: #D9E1EA; --a-panel: #D9E1EA; --a-hero: #F3D98C;
  --f-display: "Black Han Sans", "Pretendard Variable", Pretendard, sans-serif;
  --f-ui: "Pretendard Variable", Pretendard, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  --sh-ground: rgba(12, 6, 2, .45); --sh-air: rgba(0, 0, 0, .35);
  --t-press: 80ms; --t-fast: 160ms; --t-med: 240ms; --e-out: cubic-bezier(.22, 1, .36, 1); --e-back: cubic-bezier(.34, 1.56, .64, 1); --e-in: cubic-bezier(.55, 0, 1, .45);
  --ol: 2px 0 0 var(--c-outline), -2px 0 0 var(--c-outline), 0 2px 0 var(--c-outline), 0 -2px 0 var(--c-outline), 1.4px 1.4px 0 var(--c-outline), -1.4px 1.4px 0 var(--c-outline), 1.4px -1.4px 0 var(--c-outline), -1.4px -1.4px 0 var(--c-outline), 0 3.5px 0 rgba(0, 0, 0, .35);
  --ol-sm: 1.5px 0 0 var(--c-outline), -1.5px 0 0 var(--c-outline), 0 1.5px 0 var(--c-outline), 0 -1.5px 0 var(--c-outline), 1px 1px 0 var(--c-outline), -1px 1px 0 var(--c-outline), 1px -1px 0 var(--c-outline), -1px -1px 0 var(--c-outline), 0 2.5px 0 rgba(0, 0, 0, .35);
  /* v2 공용 td.css가 쓰는 변수도 두 가족으로(Plex·Mono 없음) */
  --sans: var(--f-ui); --mono: var(--f-ui); --title: var(--f-display);
  --gold: #C99A3E; --gold-2: #F3D98C; --ink: #FFF6E4; --muted: #9AA8BE; --navy: #121A29;
}
html, body.t3-body { margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none; background: var(--c-ink); color: var(--c-text); font-family: var(--f-ui); }
.t3, .t3 * { letter-spacing: 0; } /* 한글 자간 0(v2 td.css의 .kicker·h3 자간도 덮음) */
.t3 { position: relative; margin: 0 auto; overflow: hidden; width: 100vw; height: 100vh; user-select: none; -webkit-user-select: none; font-family: var(--f-ui); word-break: keep-all; overflow-wrap: anywhere; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
:where(.t3) button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; }
.t3 [hidden] { display: none !important; }
.t3 img { pointer-events: none; -webkit-touch-callout: none; -webkit-user-drag: none; } /* 길게 눌러 그림 저장 메뉴 없음 */
.t3-flex { flex: 1 1 auto; min-width: 0; }
.t3 .foot { margin: 0; font-size: 12px; line-height: 1.5; color: var(--c-text-3); text-align: center; }
/* 가로로 누운 작은 화면(손가락 기기): 세로로 돌려 달라는 덮개. 움직임 없음. main3.js가 같은 조건에서 하던 판을 멈춤 */
.t3-rot { display: none; }
@media (orientation: landscape) and (max-height: 519px) and (pointer: coarse) {
  .t3-rot { display: grid; place-items: center; position: fixed; inset: 0; z-index: 1000; background: var(--c-ink); color: var(--c-text); text-align: center; font-family: var(--f-ui); padding: 16px; box-sizing: border-box; }
  .t3-rot .in { display: grid; justify-items: center; gap: 8px; }
  .t3-rot .ph { position: relative; width: 34px; height: 58px; box-sizing: border-box; border: 3px solid var(--c-brass-hi); border-radius: 9px; margin-bottom: 6px; }
  .t3-rot .ph::after { content: ""; position: absolute; left: 50%; bottom: 4px; width: 10px; height: 3px; margin-left: -5px; border-radius: 2px; background: var(--c-brass-hi); }
  .t3-rot b { font: 800 20px/1.3 var(--f-ui); }
  .t3-rot span { font: 600 14px/1.5 var(--f-ui); color: var(--c-text-2); }
}
.t3-sat { position: absolute; left: 0; top: 0; width: 0; height: 0; visibility: hidden; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }

/* ---------- 킷 기본 ---------- */
/* 아틀라스 아이콘(8×8): 32px 이하는 64칸 밉, .lg는 128칸. 크기는 --s(인라인 또는 맥락 CSS) */
.ic { display: inline-block; flex: none; width: var(--s, 20px); height: var(--s, 20px); box-sizing: content-box; padding: 0; border: 0; border-radius: 0; font-style: normal; vertical-align: -0.22em; /* v2 td.css의 .ic(42px 단추)를 덮음 */
  background: url(../art/ui/ui-atlas-64.webp?v=1) no-repeat; background-size: calc(var(--s, 20px) * 8) calc(var(--s, 20px) * 8);
  background-position: calc(var(--s, 20px) * var(--x, 0) * -1) calc(var(--s, 20px) * var(--y, 0) * -1); }
.ic.lg { background-image: url(../art/ui/ui-atlas.webp?v=1); }
/* 각인 숫자: 흰 채움 + 짙은 갈색 외곽선 2px + 아래 그림자 */
.num { font: 900 20px/1 var(--f-ui); font-variant-numeric: tabular-nums; font-style: normal; color: var(--c-text); text-shadow: var(--ol); letter-spacing: 0; }
.num.sm { font-size: 14px; text-shadow: var(--ol-sm); }

/* ---------- 게임: 판은 화면 전체, HUD·버튼은 판 위에 뜸 ---------- */
.t3-game { position: absolute; inset: 0; touch-action: none; } /* 판 위 두 손가락 확대 없음 */
.t3-board { position: absolute; left: 0; top: 0; width: var(--W); height: var(--H); overflow: hidden; }
.t3-cv { position: absolute; left: 0; top: 0; touch-action: none; display: block; }
.t3-over { position: absolute; left: 0; top: 0; pointer-events: none; z-index: 20; }

/* 상황 명판(안전 · 소방력) + 무리 게이지: 왼쪽 위 */
.k-hud { position: absolute; left: 12px; top: calc(var(--sat, 0px) + 8px); z-index: 10; pointer-events: none; display: grid; gap: 4px; justify-items: stretch; }
.k-status { display: flex; align-items: center; gap: 5px; height: 40px; box-sizing: border-box; min-width: 172px; padding: 0 12px 0 8px; border: 0 solid transparent;
  border-image: url(../art/ui/ui-plate-steel.webp?v=1) 48 fill / 14px stretch; filter: drop-shadow(0 3px 0 var(--sh-ground)); }
.k-status .st { display: inline-flex; align-items: center; gap: 4px; }
.k-status .num { min-width: 2ch; text-align: right; }
.k-status .money .num { min-width: 3ch; }
.k-status .rivet { width: 6px; height: 6px; margin: 0 5px; border-radius: 50%; flex: none; background: radial-gradient(circle at 35% 30%, var(--c-brass-hi), var(--c-brass) 60%, var(--c-brass-lo)); box-shadow: 0 0 0 1px var(--c-outline); }
.k-status.low .safe .num { color: var(--c-bad-soft); }
.k-status.low .safe .ic { animation: k-beat 1.2s ease-in-out infinite; }
.k-status.shake .st.safe { animation: k-shake3 .2s; } /* 안전을 잃음: HUD는 그대로, 안전 명판만 3px(UX 2차 4.5) */
@keyframes k-shake3 { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-3px); } 50% { transform: translateX(3px); } 75% { transform: translateX(-1.5px); } }
.k-status .money.puff .ic { animation: k-puff .14s var(--e-out); }
.k-status .money.lit .ic { border-radius: 50%; box-shadow: 0 0 0 2px var(--c-brass-hi); } /* 저자극: 동전이 날지 않고 아이콘 테만 150ms 번쩍 */
.k-gauge { height: 20px; box-sizing: border-box; border-radius: 999px; background: var(--c-steel-900); box-shadow: inset 0 0 0 1.5px var(--c-brass), 0 3px 0 var(--sh-ground); display: flex; align-items: center; gap: 2px; padding: 0 5px; }
.k-gauge .segs { flex: 1; display: flex; gap: 2px; align-items: center; height: 100%; }
.k-gauge .gseg { position: relative; height: 9px; flex: 1; border-radius: 999px; background: rgba(255, 255, 255, .06); box-shadow: inset 0 1px 0 rgba(0, 0, 0, .4); }
.k-gauge .gseg.past { background: linear-gradient(var(--c-brass-hi), var(--c-brass) 55%, var(--c-brass-lo)); }
.k-gauge .gseg.now { background: linear-gradient(90deg, var(--c-flame), #FFA24A 50%, var(--c-flame)); box-shadow: 0 0 6px rgba(255, 122, 26, .7); }
/* 지금 칸 빛: background-position을 매 프레임 칠하던 것(판 전체 페인트 +2.8ms) 대신 덮개 한 장의 불투명도만(컴포지터) */
.k-gauge .gseg.now::after { content: ""; position: absolute; inset: 0; border-radius: 999px; background: linear-gradient(90deg, rgba(255, 209, 102, 0), var(--c-flame-hi) 50%, rgba(255, 209, 102, 0)); opacity: .25; animation: k-glow 1.6s ease-in-out infinite alternate; will-change: opacity; }
@keyframes k-glow { to { opacity: 1; } }
.t3.low .k-gauge .gseg.now::after { animation: none; opacity: .7; }
.k-gauge .gseg.fresh { animation: k-segin .6s var(--e-out); }
.k-gauge .gseg.clear { animation: k-segpop .36s var(--e-back); z-index: 2; } /* 무리를 다 끔: 그 칸이 1.3배로 튐 + 황동 반짝이 넷(main3 덮개), 글자 없음(UX 2차 4.6) */
@keyframes k-segpop { 0% { transform: scale(1); } 35% { transform: scale(1.3); filter: brightness(1.8); } 100% { transform: none; filter: none; } } /* 칸 넘어감: 지난 칸이 황동으로 칠해지며 광택 한 번 */
@keyframes k-segin { 0% { filter: brightness(2.2); transform: scaleY(1.5); } 100% { filter: none; transform: none; } }
.k-gauge .gseg .ic { --s: 16px; position: absolute; left: 50%; top: 50%; margin: -9px 0 0 -8px; z-index: 1; }
.k-gauge .lab { font: 800 12px/1 var(--f-ui); font-variant-numeric: tabular-nums; color: var(--c-text); margin-left: 4px; min-width: 24px; text-align: right; }

/* 둥근 단추(속도 · 멈춤): 조작반 누름 단추 */
.k-round { position: relative; flex: none; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center;
  background: url(../art/ui/ui-btn-round.webp?v=1) center / 100% 100% no-repeat; filter: drop-shadow(0 3px 0 var(--sh-ground)); transition: transform var(--t-fast) var(--e-back), filter var(--t-fast); }
.k-round > .ic { grid-area: 1 / 1; }
.k-round:active { transform: translateY(3px) scale(.97); filter: drop-shadow(0 1px 0 var(--sh-ground)) brightness(.94); transition-duration: var(--t-press); transition-timing-function: linear; }
.t3-game > .k-round { position: absolute; z-index: 10; }
.k-round.speed { top: calc(var(--sat, 0px) + 8px); right: 64px; }
.k-round.pause { top: calc(var(--sat, 0px) + 8px); right: 12px; }
.k-round.r48 { width: 48px; height: 48px; } .k-round.r56 { width: 56px; height: 56px; }
.k-round .lb { position: absolute; left: 50%; top: calc(100% + 4px); transform: translateX(-50%); font: 700 12px/1.2 var(--f-ui); color: var(--c-text-2); white-space: nowrap; text-shadow: var(--ol-sm); pointer-events: none; }
.k-round.off > .ic { opacity: .55; }
.k-round.on { filter: drop-shadow(0 3px 0 var(--sh-ground)) drop-shadow(0 0 4px rgba(243, 217, 140, .95)); }
.k-round.on .lb { color: var(--c-brass-hi); }
.k-round.speed .g2, .k-round.speed.on .g1 { opacity: 0; }
.k-round.speed.on .g2 { opacity: 1; }
.k-round.speed .ic { transition: opacity .12s; }
.k-round .tg { position: absolute; left: 50%; bottom: -9px; transform: translateX(-50%); font: 900 14px/1 var(--f-ui); font-variant-numeric: tabular-nums; color: var(--c-text); text-shadow: var(--ol-sm); white-space: nowrap; }

/* 아래: 떠 있는 팀장 메달 · 힘 단추 둘 · 빨리 부르기 (띠·배경 없음) */
.k-medal, .k-power, .k-call { position: absolute; z-index: 10; padding: 0; border: 0; background: none; transition: transform var(--t-fast) var(--e-back); }
.k-medal { left: 12px; top: calc(var(--bandCY) - 34px); width: 68px; height: 68px; filter: drop-shadow(0 3px 0 var(--sh-ground)); }
.k-medal .face { position: absolute; left: 19.7%; top: 19.1%; width: 59.4%; height: 59.4%; border-radius: 50%; overflow: hidden; background: radial-gradient(circle at 50% 35%, var(--c-enamel), var(--c-enamel-lo)); } /* kit.json portrait_circle (126.5, 125, r 76)/256 */
.k-medal .face img { width: 100%; height: 100%; display: block; }
.k-medal .rim { position: absolute; inset: 0; width: 100%; height: 100%; }
.k-medal .lvl { position: absolute; right: -2px; top: -4px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--c-water) 0 var(--xp, 0%), rgba(18, 26, 41, .9) 0); box-shadow: 0 0 0 1.5px var(--c-outline), 0 2px 0 rgba(0, 0, 0, .35); }
.k-medal .lvl span { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, var(--c-brass-hi), var(--c-brass) 55%, var(--c-brass-lo)); font: 900 12px/1 var(--f-ui); color: var(--c-outline); font-variant-numeric: tabular-nums; }
.k-medal .hpb { position: absolute; left: 8px; right: 8px; bottom: -2px; height: 8px; border-radius: 999px; background: var(--c-steel-900); box-shadow: 0 0 0 1.5px var(--c-outline); overflow: hidden; }
.k-medal .hpb i { position: absolute; left: 1px; top: 1px; bottom: 1px; width: calc((100% - 2px) * var(--hp, 1)); border-radius: 999px; background: linear-gradient(90deg, var(--c-ok), var(--c-ok-hi)); }
.k-medal .hpb.mid i { background: var(--c-hold); } .k-medal .hpb.low i { background: var(--c-bad); }
.k-medal .down { position: absolute; left: 50%; top: 48%; transform: translate(-50%, -50%); font-size: 18px; display: none; }
.k-medal.down .face img { filter: brightness(.55); }
.k-medal.down .down { display: block; }
.k-medal.down::before { content: ""; position: absolute; inset: 1px; border-radius: 50%; background: conic-gradient(var(--c-water) 0 var(--dn, 0%), transparent 0);
  -webkit-mask: radial-gradient(closest-side, transparent 86%, #000 88%, #000 100%); mask: radial-gradient(closest-side, transparent 86%, #000 88%, #000 100%); }
.k-medal.sel { transform: scale(1.06); filter: drop-shadow(0 3px 0 var(--sh-ground)) drop-shadow(0 0 6px rgba(243, 217, 140, .85)); }
/* 이 현장에서 곧 오는 칸: 진짜 단추를 어둡게(명도 .5 덮개) + 테에 작은 자물쇠 14 — 큰 자물쇠 소켓 셋이 나란히 서 있던 '덜 만든' 줄 대신.
   다음 현장부터인 칸(.later)은 아예 숨김(자리는 그대로) */
.k-medal .lk, .k-power .lk { display: none; position: absolute; right: -2px; bottom: 1px; z-index: 2; width: 22px; height: 22px; border-radius: 50%; background: var(--c-steel-900); box-shadow: 0 0 0 1.5px var(--c-brass), 0 2px 0 var(--sh-ground); place-items: center; }
.k-medal .lk .ic, .k-power .lk .ic { --s: 14px; }
.k-medal.locked::after, .k-power.locked::after { content: ""; position: absolute; left: 9%; top: 9%; width: 82%; height: 82%; border-radius: 50%; background: rgba(11, 15, 24, .52); pointer-events: none; }
.k-medal.locked .lk, .k-power.locked .lk { display: grid; }
.k-medal.locked .lvl, .k-medal.locked .hpb, .k-power.locked .cool, .k-power.locked .cd { display: none; }
.k-power.locked .lbl { opacity: .75; }
.k-medal.later, .k-power.later { visibility: hidden; }
/* 이 현장에서 곧 열리는 칸도 그리지 않음(UX 2차 5.1 #14: 잠긴 단추가 '못 누르는 단추'로 읽힘). 열릴 때 단추가 튀어 들어옴(.in) */
.k-medal.locked, .k-power.locked { visibility: hidden; }
.k-power { top: calc(var(--bandCY) - 28px); width: 56px; height: 56px; border-radius: 50%; background: url(../art/ui/ui-btn-round.webp?v=1) center / 100% 100% no-repeat; filter: drop-shadow(0 3px 0 var(--sh-ground)); }
.k-power.backup { left: 94px; } .k-power.cannon { left: 160px; }
.k-power .pw { --s: 36px; position: absolute; left: 50%; top: 50%; margin: -18px 0 0 -18px; }
.k-power .cool { position: absolute; left: 16.7%; top: 16.7%; width: 66.6%; height: 66.6%; border-radius: 50%; background: conic-gradient(rgba(11, 15, 24, .66) 0 var(--cd, 0%), transparent 0); display: none; }
.k-power.cooling .cool { display: block; }
.k-power .cd { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 18px; }
.k-power .cd:empty { display: none; }
.k-power .lbl { position: absolute; left: 50%; top: calc(100% - 3px); transform: translateX(-50%); height: 16px; padding: 0 6px; border-radius: 999px; background: rgba(18, 26, 41, .92); box-shadow: inset 0 0 0 1px var(--c-brass-lo); font: 700 12px/16px var(--f-ui); color: var(--c-text-2); white-space: nowrap; }
.k-power.ready { filter: drop-shadow(0 3px 0 var(--sh-ground)) drop-shadow(0 0 5px rgba(243, 217, 140, .55)); }
.k-power.ready.pop { animation: k-pop .18s var(--e-back); }
.k-power.sel { filter: drop-shadow(0 3px 0 var(--sh-ground)) drop-shadow(0 0 0 var(--c-water)) drop-shadow(0 0 6px var(--c-water)); transform: scale(1.06); }
.k-medal:active:not(.locked), .k-power:active:not(.locked) { transform: translateY(3px) scale(.97); transition: transform var(--t-press) linear; }
.k-medal.pulse::after, .k-power.pulse::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; box-shadow: 0 0 0 0 rgba(243, 217, 140, .9); animation: k-ring 1.1s var(--e-out) infinite; pointer-events: none; }
.t3.short .k-power .lbl { display: none; }
/* 빨리 부르기: 펌프차 붉은 에나멜 9-slice(kit.json 44 81 44 80 / 19px 35px) */
.k-call { right: 12px; top: calc(var(--bandCY) - 28px); width: 112px; height: 56px; box-sizing: border-box; border: 0 solid transparent;
  border-image: url(../art/ui/ui-btn-red.webp?v=1) 44 81 44 80 fill / 19px 35px stretch; filter: drop-shadow(0 4px 0 var(--sh-ground));
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding-bottom: 3px; }
.k-call.steel { border-image-source: url(../art/ui/ui-btn-steel.webp?v=1); filter: drop-shadow(0 3px 0 var(--sh-ground)); }
.k-call .t { font: 400 16px/1.05 var(--f-display); color: var(--c-text); text-shadow: var(--ol-sm); white-space: nowrap; }
.k-call.steel .t { color: var(--c-text-2); }
.k-call .b { display: flex; align-items: center; gap: 2px; min-height: 16px; font: 900 14px/1 var(--f-ui); color: var(--c-text); text-shadow: var(--ol-sm); white-space: nowrap; font-variant-numeric: tabular-nums; }
.k-call .b:empty { display: none; }
.k-call .b .ic { --s: 14px; }
.k-call .b small { font: 800 12px/1 var(--f-ui); margin-right: 2px; }
.k-call .cbar { position: absolute; left: 24px; right: 24px; bottom: 7px; height: 3px; border-radius: 2px; background: rgba(0, 0, 0, .28); overflow: hidden; }
.k-call .cbar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 2px; background: linear-gradient(90deg, var(--c-paper), rgba(245, 236, 215, .35)); }
/* 부를 수 없음(출동 중·준비 중): 스틸 면을 .8로 가라앉히고 크롬 광택을 짙은 덮개로 죽임 — 쉬는 단추가 줄에서 가장 밝지 않게 */
.k-call.off { opacity: .8; filter: brightness(.8) drop-shadow(0 2px 0 var(--sh-ground)); } /* 명도만 낮춤(회색 필터 없음) — 크롬 테 광택이 줄에서 튀지 않게 */
.k-call.off::after { content: ""; position: absolute; left: 7px; right: 7px; top: 5px; bottom: 6px; border-radius: 999px; background: linear-gradient(180deg, rgba(11, 15, 24, .62), rgba(11, 15, 24, .4)); pointer-events: none; }
.k-call > .t, .k-call > .b, .k-call > .cbar { z-index: 1; }
.k-call > .t, .k-call > .b { position: relative; }
.k-call.off .t { color: var(--c-text-3); text-shadow: none; }
.k-call.off .b { color: var(--c-text-2); text-shadow: none; }
.k-call:active { transform: translateY(3px) scale(.97); filter: drop-shadow(0 1px 0 var(--sh-ground)) brightness(.94); transition: transform var(--t-press) linear; }
.k-medal.shake, .k-power.shake, .k-call.shake { animation: t3shake .35s; }

/* 안내 말풍선(무전기 + 크림 종이) · 설명판(스틸 명판) · 무전 띠 */
.k-coach { position: absolute; left: 0; top: 0; transform: translate(var(--tx, 0px), var(--ty, 0px)); z-index: 12; pointer-events: none; display: flex; align-items: center; gap: 6px; height: 36px; box-sizing: border-box; padding: 0 14px 0 9px; border-radius: 999px;
  background: var(--c-paper); box-shadow: inset 0 0 0 1.5px var(--c-paper-shade), 0 3px 0 var(--sh-ground), 0 8px 18px var(--sh-air); font: 700 14px/1 var(--f-ui); color: var(--c-paper-ink); white-space: nowrap; max-width: calc(var(--W) - 24px); }
.k-coach > span { overflow: hidden; text-overflow: ellipsis; }
.k-coach > .ic { --s: 20px; }
.k-coach .mk { --s: 18px; }
.k-coach::after { content: ""; position: absolute; left: var(--tail, 50%); top: -7px; border: 8px solid transparent; border-top: 0; border-bottom-color: var(--c-paper); transform: translateX(-50%); }
.k-coach.dn::after { top: auto; bottom: -7px; border-bottom: 0; border-top: 8px solid var(--c-paper); }
.k-coach.nt::after { display: none; }
.k-coach.in { animation: k-drop .18s var(--e-back); }
.k-info { position: absolute; left: 0; top: 0; transform: translate(var(--tx, 0px), var(--ty, 0px)); z-index: 11; pointer-events: none; box-sizing: border-box; min-height: 30px; max-width: calc(var(--W) - 24px); padding: 7px 12px; border: 0 solid transparent;
  border-image: url(../art/ui/ui-plate-steel.webp?v=1) 48 fill / 10px stretch; filter: drop-shadow(0 3px 0 var(--sh-ground)); display: grid; gap: 3px; justify-items: center; text-align: center; }
.k-info .r1 { font: 700 14px/1.2 var(--f-ui); color: var(--c-text); white-space: nowrap; }
.k-info .r1 .sep { color: var(--c-steel-300); margin: 0 4px; }
.k-info .r1 .ic { --s: 18px; }
.k-info .r1.warn { color: var(--c-bad-soft); }
.k-info .r2 { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 2px 4px; font: 600 12px/1.3 var(--f-ui); color: var(--c-text-2); }
.k-info .r2 b { color: var(--c-text); font-weight: 800; }
.k-info .r2 .lab { color: var(--c-text-3); font-weight: 700; margin-right: 2px; }
.k-info .r2 .tx.sm { color: var(--c-text-3); }
.k-info .r2 .vt { display: inline-flex; align-items: center; gap: 2px; margin: 0 3px; }
/* 무전 띠(5.11): 무전 슬롯(HUD 게이지 아래 8px 가운데), 글자 폭에 맞춤(최대 W−24). 제목 Black Han Sans 16 + 본문 Pretendard 700 12 */
.k-radio { position: absolute; left: 50%; top: 0; width: max-content; max-width: calc(var(--W) - 24px); transform: translate(-50%, var(--ty, 0px)); z-index: 13; pointer-events: none; display: grid; grid-template-columns: 44px auto; align-items: stretch; min-height: 52px; box-sizing: border-box; border: 0 solid transparent;
  border-image: url(../art/ui/ui-plate-steel.webp?v=1) 48 fill / 12px stretch; filter: drop-shadow(0 3px 0 var(--sh-ground)) drop-shadow(0 8px 14px var(--sh-air)); }
.k-radio .hd { display: grid; place-items: center; margin: 4px 0 4px 4px; border-radius: 9px; overflow: hidden; background: linear-gradient(180deg, var(--c-enamel-hi), var(--c-enamel) 45%, var(--c-enamel-lo)); box-shadow: inset 0 0 0 1.5px var(--c-brass); }
.k-radio .hd .ic { --s: 26px; position: relative; z-index: 1; }
.k-radio .tx { align-self: center; display: grid; gap: 2px; min-width: 0; padding: 8px 16px 8px 10px; text-align: left; }
.k-radio .tx .t1 { font: 400 16px/1.2 var(--f-display); color: var(--c-text); text-shadow: var(--ol-sm); text-wrap: balance; }
.k-radio .tx .t2 { font: 700 12px/1.3 var(--f-ui); color: var(--c-text-2); text-wrap: balance; }
.k-radio .tx .t2:empty { display: none; }
.k-radio.in { animation: k-drop16 .22s var(--e-back); }
@keyframes k-drop16 { from { transform: translate(-50%, calc(var(--ty, 0px) - 16px)); opacity: 0; } }
/* 무전 띠 들어올 때: 광택 한 번 훑고 무전기 아이콘이 떨림(수신). 큰 무리(.big)는 머리판이 황동 + 경광등 아이콘 + 노란 맥박 두 번(빨간 섬광 없음) */
.k-radio::after { content: ''; position: absolute; inset: 3px; border-radius: 10px; pointer-events: none; opacity: 0; background: linear-gradient(105deg, transparent 38%, rgba(255, 246, 228, .34) 48%, rgba(255, 246, 228, .1) 54%, transparent 62%) no-repeat; background-size: 260% 100%; background-position: 130% 0; }
.k-radio.in::after { animation: k-sweep .62s .1s var(--e-out); }
.k-radio .hd { position: relative; }
.k-radio.in .hd .ic { animation: k-wiggle .42s .06s ease-in-out; }
.k-radio.big .hd { background: linear-gradient(180deg, var(--c-brass-hi), var(--c-brass) 50%, var(--c-brass-lo)); box-shadow: inset 0 0 0 1.5px var(--c-outline); }
/* 경광등 빛: 머리판 안에서만 도는 둥근 빛(머리판 overflow로 잘림 — 네모 그림자가 띠 밖으로 번지지 않게), 두 번 */
.k-radio.big.in .hd::after { content: ''; position: absolute; left: 50%; top: 50%; width: 60px; height: 60px; margin: -30px 0 0 -30px; border-radius: 50%; pointer-events: none; opacity: 0; background: radial-gradient(closest-side, rgba(255, 246, 228, .95), rgba(243, 217, 140, .55) 45%, rgba(243, 217, 140, 0)); animation: k-beacon .5s ease-out 2; }
@keyframes k-sweep { 0% { opacity: 1; background-position: 130% 0; } 100% { opacity: 1; background-position: -40% 0; } }
@keyframes k-wiggle { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-14deg); } 45% { transform: rotate(11deg); } 70% { transform: rotate(-6deg); } }
@keyframes k-beacon { from { opacity: 1; transform: scale(.4); } to { opacity: 0; transform: scale(1.1); } }
.k-radio.mute { opacity: 0 !important; transition: opacity .12s; }
.k-radio.out { opacity: 0; transform: translate(-50%, calc(var(--ty, 0px) - 8px)); transition: opacity .16s var(--e-in), transform .16s var(--e-in); }
/* 다음 무리 알약(입구 종 옆): 화마 얼굴 × 수 + 특수한 불은 '→ 폼' */
.t3-bellpill { position: absolute; left: 0; top: 0; z-index: 11; pointer-events: none; padding: 6px 8px; border: 0 solid transparent; border-image: url(../art/ui/ui-plate-steel.webp?v=1) 48 fill / 10px stretch; filter: drop-shadow(0 3px 0 var(--sh-ground)); max-width: calc(var(--W) - 16px); }
.t3-bellpill .icons { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; }
.t3-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; } /* 화면 읽기 전용(첫 무리 알림) */
/* 다음 무리 아이콘 · 판정 배지 · 능력 막대 */
.wi { position: relative; display: inline-flex; align-items: center; gap: 1px; margin: 0 3px; }
.wi img { width: 24px; height: 24px; object-fit: contain; }
.wi.sil img { filter: brightness(0) invert(.25); }
.wi em { position: absolute; left: 6px; top: 0; font: 800 13px/24px var(--f-ui); font-style: normal; color: var(--c-text); text-shadow: var(--ol-sm); }
.wi b { font: 800 12px/1 var(--f-ui); font-variant-numeric: tabular-nums; color: var(--c-text); }
.wi .cico, .wi .qm { --s: 16px; position: absolute; left: -6px; bottom: -4px; } /* 판 위 분류 배지와 같은 16px(13px는 360에서 B·AL·숨음이 구분되지 않았음) */
.mk { --s: 18px; margin-left: 2px; }
.sb { display: inline-flex; align-items: center; gap: 4px; margin: 0 4px; font-size: 12px; color: var(--c-text-3); }
.sb i { font-style: normal; }
.sb .tr { position: relative; width: 40px; height: 7px; border-radius: 999px; background: var(--c-steel-900); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); overflow: hidden; }
.sb .tr u, .sb .tr s { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; }
.sb .tr s { background: var(--c-ok-hi); } .sb .tr u { background: var(--c-text-2); z-index: 1; }
.cico { --s: 16px; }
.qm { --s: 16px; }

@keyframes k-shimmer { from { background-position: 0 0; } to { background-position: -200% 0; } }
@keyframes k-beat { 50% { transform: scale(1.08); } }
@keyframes k-puff { 50% { transform: scale(1.18); } }
@keyframes k-pop { from { transform: scale(1); } 50% { transform: scale(1.12); } to { transform: scale(1); } }
@keyframes k-ring { 0% { box-shadow: 0 0 0 0 rgba(243, 217, 140, .85); } 70%, 100% { box-shadow: 0 0 0 9px rgba(243, 217, 140, 0); } }
@keyframes k-drop { from { transform: translate(var(--tx, 0px), calc(var(--ty, 0px) - 12px)); opacity: 0; } }

/* ---------- 킷 기본형(5.1): 주 버튼 · 보조 버튼 · 스틸 명판 · 지령서 종이 · 황동 머리판 · 리본 · 도장 · 꼬리표 ---------- */
/* 누름(7.2): 누를 때 3px 내려가고 그림자 4→1 · .97배(80ms), 뗄 때 E.back 160ms로 돌아옴. 막힌 누름은 .shake */
.k-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; box-sizing: border-box; margin: 0; padding: 0; border: 0 solid transparent; background: none;
  color: var(--c-text); white-space: nowrap; font: 400 20px/1 var(--f-display); text-shadow: var(--ol); transition: transform var(--t-fast) var(--e-back), filter var(--t-fast); }
.k-btn.red { height: 56px; min-width: 120px; border-width: 19px 35px; border-image: url(../art/ui/ui-btn-red.webp?v=1) 44 81 44 80 fill / 19px 35px stretch; filter: drop-shadow(0 4px 0 var(--sh-ground)); }
.k-btn.big { height: 64px; border-width: 22px 40px; border-image-width: 22px 40px; font-size: 28px; }
.k-btn.steel { height: 48px; min-width: 96px; border-width: 17px 30px; border-image: url(../art/ui/ui-btn-steel.webp?v=1) 44 81 44 80 fill / 17px 30px stretch; font-size: 16px; text-shadow: var(--ol-sm); filter: drop-shadow(0 3px 0 var(--sh-ground)); }
.k-btn:active { transform: translateY(3px) scale(.97); filter: drop-shadow(0 1px 0 var(--sh-ground)) brightness(.94); transition-duration: var(--t-press); transition-timing-function: linear; }
/* 강조: 3초마다 황동 테 광택이 0.6초 동안 지나감(버튼 알약 안) */
.k-btn.shine::after { content: ""; position: absolute; inset: -14px -30px; border-radius: 999px; pointer-events: none; background: linear-gradient(105deg, transparent 38%, rgba(255, 246, 228, .5) 48%, rgba(255, 246, 228, .12) 55%, transparent 62%) no-repeat; background-size: 300% 100%; background-position: 150% 0; animation: k-shine 3s 1s var(--e-out) infinite; }
.k-btn.big.shine::after { inset: -17px -35px; }
@keyframes k-shine { 0% { background-position: 150% 0; } 20%, 100% { background-position: -50% 0; } }
.k-btn.shake, .k-round.shake { animation: t3shake .35s; }
.k-pin.shake .bob { animation: t3shake .35s; } /* 핀 자체의 등장 애니(k-pinin, 지연 있음)를 덮어쓰면 끝날 때 다시 돌며 400ms 사라졌음 → 안쪽만 흔듦 */
.k-plate { box-sizing: border-box; border: 12px solid transparent; border-image: url(../art/ui/ui-plate-steel.webp?v=1) 48 fill / 24px stretch; filter: drop-shadow(0 3px 0 var(--sh-ground)) drop-shadow(0 8px 18px var(--sh-air)); }
.k-paper { box-sizing: border-box; border: solid transparent; border-width: 18px 30px 22px; border-image: url(../art/ui/ui-plate-paper.webp?v=1) 64 56 73 56 fill / 32px 28px 36px 28px round; color: var(--c-paper-ink); filter: drop-shadow(0 8px 18px var(--sh-air)); }
.k-brass { display: flex; align-items: center; justify-content: center; gap: 8px; box-sizing: border-box; height: 44px; min-width: 0; border: solid transparent; border-width: 0 34px; border-image: url(../art/ui/ui-plate-brass-head.webp?v=1) 0 96 fill / 0 34px stretch;
  font: 400 20px/1 var(--f-display); color: var(--c-outline); text-shadow: 0 1px 0 rgba(255, 246, 228, .45); white-space: nowrap; filter: drop-shadow(0 3px 0 var(--sh-ground)); }
.k-brass > span { overflow: hidden; text-overflow: ellipsis; }
.k-brass .no { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--c-outline); color: var(--c-brass-hi); font: 400 15px/1 var(--f-display); text-shadow: none; }
.k-ribbon { display: flex; align-items: center; justify-content: center; box-sizing: border-box; height: 72px; border: solid transparent; border-width: 0 62px; border-image: url(../art/ui/ui-ribbon-red.webp?v=1) 0 220 fill / 0 62px stretch; }
.k-ribbon.steel { border-image-source: url(../art/ui/ui-ribbon-steel.webp?v=1); }
.k-stamp { display: inline-grid; place-items: center; width: 104px; height: 46px; background: url(../art/ui/ui-stamp.webp?v=1) center / 100% 100% no-repeat; color: var(--c-enamel); font: 400 16px/1 var(--f-display); transform: rotate(2deg); opacity: .94; white-space: nowrap; }
.k-stamp > span { transform: rotate(6deg); }
.k-chip { display: inline-flex; align-items: center; gap: 4px; height: 24px; box-sizing: border-box; padding: 0 9px 0 7px; border-radius: 999px; background: var(--c-steel-800); box-shadow: inset 0 0 0 1.5px var(--c-brass), 0 2px 0 var(--sh-ground);
  font: 800 12px/1 var(--f-ui); color: var(--c-text); white-space: nowrap; }
.k-chip .ic { --s: 16px; }
.k-chip.red { background: linear-gradient(180deg, var(--c-enamel-hi), var(--c-enamel) 45%, var(--c-enamel-lo)); padding: 0 10px; }
.k-chip.ok { box-shadow: inset 0 0 0 1.5px var(--c-ok-hi), 0 2px 0 var(--sh-ground); }
.k-chip.bad { box-shadow: inset 0 0 0 1.5px var(--c-bad-soft), 0 2px 0 var(--sh-ground); }
/* 팀장 메달(흉상 + 결합구 테, DOM): --m 지름. 사람 흉상이 남는 곳은 팀장 하나뿐(조는 약제 메달 .ag-md) */
.k-md { position: relative; display: inline-block; flex: none; width: var(--m, 40px); height: var(--m, 40px); }
.k-md .bu { position: absolute; left: 19.7%; top: 19.1%; width: 59.4%; height: 59.4%; border-radius: 50%; overflow: hidden; background: radial-gradient(circle at 50% 35%, var(--c-enamel), var(--c-enamel-lo)); }
.k-md.steel .bu { background: radial-gradient(circle at 50% 35%, var(--c-steel-500), var(--c-steel-900)); }
.k-md .bu img, .k-md .rim { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* 화마 소켓 칩: 스틸 소켓 + 화마 그림(처음 보는 화마는 실루엣) */
.k-sock { position: relative; display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; background: url(../art/ui/ui-socket.webp?v=1) center / 100% 100% no-repeat; }
.k-sock::before { content: ""; position: absolute; inset: 20%; border-radius: 50%; background: radial-gradient(circle, rgba(255, 150, 60, .42), rgba(255, 150, 60, 0) 72%); }
.k-sock > img { position: relative; width: 34px; height: 34px; object-fit: contain; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .6)); }
.k-sock.sil::before { background: radial-gradient(circle, rgba(154, 168, 190, .35), rgba(154, 168, 190, 0) 72%); }
.k-sock.sil > img { filter: brightness(0) invert(.42) drop-shadow(0 0 1px rgba(201, 241, 255, .7)); }
.k-sock .cico, .k-sock .qm { --s: 16px; position: absolute; left: -3px; bottom: -3px; }
.k-sock .n { position: absolute; right: -6px; bottom: -4px; font-size: 13px; }
/* 외곽선 제목(로고·리본): 외곽선 .1em(34px에 3.5px) + 자간 .07em. Black Han Sans는 글자 사이가 좁아 굵은 획(8~9px)·자간 0이면
   글자 사이와 받침 구멍이 외곽선으로 메워져 검은 테이프처럼 보였음(검토 1). 두 겹(외곽선 · 채움)이 같은 자간이라야 겹침이 맞음 */
.ot { display: inline-grid; } .ot > * { grid-area: 1 / 1; font: inherit; letter-spacing: .07em; margin-right: -.07em; }
.ot > i { font-style: normal; color: var(--c-outline); -webkit-text-stroke: var(--sw, .1em) var(--c-outline); text-shadow: 0 .06em 0 rgba(0, 0, 0, .3); }
.ot > b { color: var(--c-text); }
.ot.gold > b { background: linear-gradient(180deg, var(--c-text) 0 38%, var(--c-brass-hi) 56%, var(--c-brass)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- 차고 셔터(7.2): 붉은 에나멜 롤러 셔터가 내려왔다 말려 올라감. 저자극은 검정 페이드 ---------- */
.k-shutter { position: absolute; inset: 0; z-index: 90; pointer-events: auto; overflow: hidden; }
.k-shutter.fade { background: var(--c-ink); opacity: 0; }
.k-shutter .door { position: absolute; left: 0; right: 0; top: 0; bottom: -18px; transform: translateY(-120%); }
.k-shutter .slats { position: absolute; inset: 0 0 18px; background: url(../art/ui/ui-shutter.webp?v=1) 0 100% / 384px 96px repeat; box-shadow: inset 0 -30px 40px -20px rgba(0, 0, 0, .45); }
.k-shutter .rail { position: absolute; left: 0; right: 0; bottom: 0; height: 22px; background: linear-gradient(180deg, var(--c-steel-300), var(--c-steel-500) 45%, var(--c-steel-900)); box-shadow: 0 1px 0 var(--c-outline), 0 10px 18px rgba(0, 0, 0, .55); }
.k-shutter .rail i { position: absolute; left: 50%; top: 5px; width: 64px; height: 10px; margin-left: -32px; border-radius: 999px; background: linear-gradient(180deg, var(--c-brass-hi), var(--c-brass) 55%, var(--c-brass-lo)); box-shadow: 0 0 0 1.5px var(--c-outline); }
.k-shutter .plate { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); max-width: calc(100% - 48px); box-sizing: border-box; padding: 0 22px; height: 52px; display: grid; place-items: center;
  border: 0 solid transparent; border-image: url(../art/ui/ui-plate-steel.webp?v=1) 48 fill / 16px stretch; filter: drop-shadow(0 4px 0 var(--sh-ground)); }
.k-shutter .plate b { font: 400 20px/1 var(--f-display); color: var(--c-text); text-shadow: var(--ol-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- 타이틀(5.16) ---------- */
.t3-title { position: absolute; inset: 0; overflow: hidden; background: var(--c-ink); }
.t3-title .kv { position: absolute; left: 0; right: 0; top: 0; height: 124%; background: 50% 0 / cover no-repeat; background-color: var(--c-ink); transform-origin: 50% 30%; animation: k-kv 12s ease-in-out infinite alternate; }
@keyframes k-kv { from { transform: scale(1); } to { transform: scale(1.04); } }
.t3-title .shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(11, 15, 24, .5) 0%, rgba(11, 15, 24, .08) 26%, rgba(11, 15, 24, 0) 36%, rgba(11, 15, 24, .55) 54%, rgba(11, 15, 24, .92) 72%, var(--c-ink) 86%); }
.t3-title canvas.emb { position: absolute; left: 0; top: 0; pointer-events: none; }
.t3-title .crew { position: absolute; left: 50%; bottom: var(--crewB, 120px); width: var(--crewW, 400px); margin-left: calc(var(--crewW, 400px) / -2); pointer-events: none; animation: k-rise .42s .15s var(--e-out) backwards; }
.t3-title .crew::before { content: ""; position: absolute; left: 14%; right: 14%; bottom: 0; height: 12%; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .7), rgba(0, 0, 0, 0)); }
.t3-title .crew img { position: relative; display: block; width: 100%; height: auto; filter: drop-shadow(0 0 16px rgba(255, 122, 26, .45)); }
.t3-title .logo { position: absolute; left: 50%; top: calc(var(--sat, 0px) + 50px); width: var(--lw, 360px); margin: 0 0 0 calc(var(--lw, 360px) / -2); aspect-ratio: 2 / 1; font: inherit; animation: k-logo .5s var(--e-back) backwards; }
.t3-title .logo > img { display: block; width: 100%; height: 100%; filter: drop-shadow(0 6px 0 var(--sh-ground)) drop-shadow(0 10px 20px rgba(0, 0, 0, .5)); }
.t3-title .logo::after { content: ""; position: absolute; left: 14%; right: 14%; top: 40%; bottom: 20%; border-radius: 24px; background: var(--c-text); opacity: 0; pointer-events: none; animation: k-flash .14s .36s ease-out; }
.t3-title .lt { position: absolute; left: 19.4%; top: 42.2%; width: 56.9%; height: 34.5%; display: grid; place-content: center; justify-items: center; align-content: center; gap: 1px; line-height: 1; }
.t3-title .l1 { font: 400 calc(var(--lw, 360px) * .095)/1 var(--f-display); --sw: .1em; }
.t3-title .l2 { display: flex; align-items: baseline; gap: .2em; font: 400 calc(var(--lw, 360px) * .095)/1 var(--f-display); --sw: .1em; }
.t3-title .l2 .n119 { font-size: calc(var(--lw, 360px) * .125); --sw: .09em; }
.t3-title .gear { position: absolute; right: 12px; top: calc(var(--sat, 0px) + 10px); z-index: 3; }
.t3-title .k-set { position: absolute; right: 12px; top: calc(var(--sat, 0px) + 62px); z-index: 3; display: flex; gap: 20px; padding: 8px 14px 26px; animation: k-dropin .18s var(--e-back); }
.t3-title .gow { position: absolute; left: 50%; bottom: var(--goB, 58px); width: 240px; margin-left: -120px; animation: k-rise .24s .5s var(--e-out) backwards; }
.t3-title .gow .glow { position: absolute; left: -40px; right: -40px; top: -26px; bottom: -30px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 122, 26, .5), rgba(255, 122, 26, 0)); animation: k-breath 2s ease-in-out infinite; pointer-events: none; }
.t3-title .gow .go { width: 100%; }
.t3-title .foot { position: absolute; left: 20px; right: 20px; bottom: calc(var(--sab, 0px) + 10px); text-wrap: balance; }
@keyframes k-logo { from { transform: scale(1.3); opacity: 0; } 50% { opacity: 1; } }
@keyframes k-flash { from { opacity: .7; } to { opacity: 0; } }
@keyframes k-rise { from { transform: translateY(20px); opacity: 0; } }
@keyframes k-breath { 0%, 100% { opacity: .55; transform: scale(.92); } 50% { opacity: 1; transform: scale(1.06); } }
@keyframes k-dropin { from { transform: translateY(-10px); opacity: 0; } }

/* ---------- 현장 지도(5.17) ---------- */
.t3-map { position: absolute; inset: 0; overflow: hidden; background: var(--c-ink); }
.t3-map .sc { position: absolute; inset: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
.t3-map .sc::-webkit-scrollbar { display: none; }
.t3-map .mv { position: relative; }
.t3-map .mv > img.bg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.t3-map .vig { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 72% 58% at 50% 52%, rgba(0, 0, 0, 0) 58%, rgba(0, 0, 0, .42) 100%), linear-gradient(180deg, rgba(8, 10, 16, .62) 0, rgba(8, 10, 16, 0) 13%, rgba(8, 10, 16, 0) 84%, rgba(8, 10, 16, .55) 100%); }
.t3-map svg.trail { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.trail path { fill: none; stroke-linecap: round; stroke-dasharray: 0 24; }
.trail .o { stroke: var(--c-outline); stroke-width: 17; opacity: .8; }
.trail .d { stroke: var(--c-brass-hi); stroke-width: 10; }
.trail .fut .o { opacity: .28; } .trail .fut .d { stroke: var(--c-steel-300); opacity: .3; }
.trail .next path { animation: k-march 1.2s linear infinite; }
.trail .next .d { stroke: var(--c-paper); }
.trail mask path.rev { stroke: #fff; stroke-width: 60; stroke-dasharray: 1 1; stroke-dashoffset: 1; animation: k-rev .9s .45s var(--e-inout) forwards; }
@keyframes k-march { to { stroke-dashoffset: -24; } }
@keyframes k-rev { to { stroke-dashoffset: 0; } }
.k-pin { position: absolute; width: 64px; height: 64px; margin: -63px 0 0 -32px; padding: 0; border: 0; background: none; z-index: 1; animation: k-pinin .34s var(--d, 0ms) var(--e-back) backwards; }
.k-pin .bob { position: absolute; inset: 0; transform-origin: 50% 100%; }
.k-pin .pn { position: absolute; inset: 0; background: url(../art/ui/ui-pins.webp?v=1) 0 0 / 400% 100% no-repeat; filter: drop-shadow(0 3px 0 var(--sh-ground)) drop-shadow(0 4px 6px rgba(0, 0, 0, .45)); transform-origin: 50% 100%; transition: transform var(--t-fast) var(--e-back); }
.k-pin.open .pn { background-position: 33.333% 0; } .k-pin.current .pn { background-position: 66.667% 0; } .k-pin.cleared .pn { background-position: 100% 0; }
.k-pin:active .pn { transform: translateY(3px) scale(.95); transition-duration: var(--t-press); }
.k-pin .no { position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%); font: 400 17px/1 var(--f-display); color: var(--c-paper-ink); }
.k-pin.current .no { top: 53.5%; } .k-pin.cleared .no { top: 50%; color: var(--c-outline); text-shadow: 0 1px 0 rgba(255, 246, 228, .5); }
.k-pin.current { z-index: 2; }
.k-pin.current .bob { animation: k-bob 1.2s ease-in-out infinite; }
.k-pin.current::before { content: ""; position: absolute; left: 50%; top: 100%; width: 46px; height: 18px; margin: -9px 0 0 -23px; border-radius: 50%; box-shadow: 0 0 0 2.5px var(--c-brass-hi); animation: k-foot 1.2s var(--e-out) infinite; pointer-events: none; }
.k-pin.sel .pn { filter: drop-shadow(0 3px 0 var(--sh-ground)) drop-shadow(0 0 6px rgba(243, 217, 140, .95)); }
.k-pin.born { animation: k-pinborn .6s 1.1s var(--e-back) backwards; }
.k-pin .nm { position: absolute; left: 50%; top: calc(100% + 2px); transform: translateX(calc(-50% + var(--dx, 0px))); height: 26px; box-sizing: border-box; padding: 0 11px; border: 0 solid transparent; border-image: url(../art/ui/ui-plate-steel.webp?v=1) 48 fill / 10px stretch;
  font: 800 14px/26px var(--f-ui); color: var(--c-text); white-space: nowrap; filter: drop-shadow(0 2px 0 var(--sh-ground)); pointer-events: none; }
.k-pin.current .nm { color: var(--c-brass-hi); }
.k-pin .sts { position: absolute; left: 50%; top: calc(100% + 30px); transform: translateX(calc(-50% + var(--dx0, 0px))); display: flex; gap: 0; pointer-events: none; filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .6)); }
.k-pin .sts .ic { --s: 16px; }
@keyframes k-pinin { from { transform: translateY(-16px) scale(.6); opacity: 0; } }
@keyframes k-pinborn { 0% { transform: translateY(-40px) scale(.4); opacity: 0; } 70% { opacity: 1; } }
@keyframes k-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes k-foot { from { transform: scale(.5); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }
.t3-map .mtop { position: absolute; left: 0; right: 0; top: 0; z-index: 4; display: flex; justify-content: space-between; align-items: center; padding: calc(var(--sat, 0px) + 8px) 12px 0; pointer-events: none; }
.t3-map .mtop > * { pointer-events: auto; }
.t3-map .tot { display: flex; align-items: center; gap: 4px; height: 40px; box-sizing: border-box; padding: 0 12px 0 8px; border: 0 solid transparent; border-image: url(../art/ui/ui-plate-steel.webp?v=1) 48 fill / 14px stretch; filter: drop-shadow(0 3px 0 var(--sh-ground)); }
.t3-map .tot .num { font-size: 18px; }
.t3-map .tot small { font: 800 14px/1 var(--f-ui); color: var(--c-text-3); font-variant-numeric: tabular-nums; }
.k-say { position: absolute; z-index: 6; }
/* (옛 핀 명판: 핀을 누르면 지령서가 바로 올라와 쓰지 않음) */
.k-pop { position: absolute; left: 50%; z-index: 5; width: min(calc(var(--W, 360px) - 24px), 340px); margin-left: calc(min(calc(var(--W, 360px) - 24px), 340px) / -2); display: grid; animation: k-popin .22s var(--e-back) backwards; }
.k-pop.pt { top: calc(var(--sat, 0px) + 60px); } .k-pop.pb { bottom: calc(var(--sab, 0px) + 12px); }
.k-pop .hd { position: relative; z-index: 1; margin: 0 14px -12px; }
.k-pop .bd { display: grid; gap: 10px; justify-items: center; padding: 16px 8px 8px; }
.k-pop .sr { display: flex; gap: 2px; filter: drop-shadow(0 2px 0 var(--sh-ground)); }
.k-pop .sr .ic:nth-child(2) { transform: translateY(-5px) scale(1.12); }
.k-pop .fo { display: grid; justify-items: center; gap: 6px; }
.k-pop .fo small, .t3-pause .sec > b { font: 700 12px/1 var(--f-ui); color: var(--c-text-3); }
.k-pop .chips, .t3-pause .chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.k-pop .bt { width: 100%; display: grid; } .k-pop .bt.two { grid-template-columns: auto 1fr; gap: 10px; }
.k-pop .bt .k-btn { min-width: 0; }
@keyframes k-popin { from { transform: translateY(14px) scale(.96); opacity: 0; } }

/* ---------- 덮개 공통(지령서·카드·멈춤·결과) ---------- */
.t3-ov { position: absolute; inset: 0; z-index: 40; display: grid; justify-items: center; align-content: safe center; gap: 10px; box-sizing: border-box; padding: calc(var(--sat, 0px) + 14px) 14px calc(var(--sab, 0px) + 14px); text-align: center;
  background: rgba(11, 15, 24, .78); overflow-y: auto; overflow-x: hidden; animation: k-fade .16s both; }
.t3-ov .foot { max-width: 320px; text-wrap: balance; }
@keyframes k-fade { from { opacity: 0; } }

/* ---------- 지령서(5.18) ---------- */
.t3-brief { background: rgba(11, 15, 24, .66); padding-left: 12px; padding-right: 12px; }
.t3-brief .sheet { width: min(100%, 400px); display: grid; animation: k-paper .2s var(--e-out) backwards; } /* 핀을 누르면 셔터 없이 200ms에 올라옴 */
@keyframes k-paper { from { transform: translateY(-28px) rotate(-1.2deg); opacity: 0; } }
.t3-brief .paper { text-align: left; padding: 2px 2px 26px; }
.t3-brief .mapstrip { position: relative; height: 84px; margin: 0 0 8px; border-radius: 6px; overflow: hidden; background: var(--c-steel-900); box-shadow: 0 0 0 1.5px rgba(43, 32, 20, .55); }
.t3-brief .mapstrip img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; display: block; filter: sepia(.2) saturate(.95); }
.t3-brief .mapstrip::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 16px rgba(43, 32, 20, .55); }
.t3-brief .mapstrip .no { position: absolute; left: 8px; top: 8px; z-index: 1; }
.t3-brief .hd { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; margin: 0 0 6px; }
.t3-brief h2 { margin: 0; font: 400 28px/1.1 var(--f-display); color: var(--c-paper-ink); text-wrap: balance; }
.t3-brief .k-stamp { margin-right: -6px; }
.t3-brief .radio { display: flex; gap: 6px; align-items: flex-start; margin: 0 0 6px; font: 700 14px/1.45 var(--f-ui); }
.t3-brief .radio .ic { --s: 18px; margin-top: 1px; }
.t3-brief .warn { display: flex; gap: 6px; align-items: center; margin: 0 0 2px; padding: 5px 8px; border-radius: 6px; background: rgba(240, 180, 41, .2); box-shadow: inset 0 0 0 1px rgba(122, 90, 30, .35); font: 700 13px/1.35 var(--f-ui); }
.t3-brief .warn .cico, .t3-brief .warn .qm { --s: 20px; flex: none; }
.t3-brief h3 { display: flex; align-items: center; gap: 8px; margin: 10px 0 6px; font: 800 12px/1 var(--f-ui); color: var(--c-paper-muted); }
.t3-brief h3::after { content: ""; flex: 1; height: 1.5px; background: var(--c-paper-shade); }
.t3-brief .foes { display: flex; flex-wrap: wrap; gap: 4px 8px; padding-left: 2px; }
.t3-brief .stk { display: grid; justify-items: center; gap: 2px; width: 60px; transform: rotate(var(--r, 0deg)); }
.t3-brief .stk .im { position: relative; width: 46px; height: 46px; }
.t3-brief .stk img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(1.5px 0 0 #fff) drop-shadow(-1.5px 0 0 #fff) drop-shadow(0 1.5px 0 #fff) drop-shadow(0 -1.5px 0 #fff) drop-shadow(0 2px 2px rgba(43, 32, 20, .35)); }
.t3-brief .stk.sil img { filter: brightness(0) invert(.2) drop-shadow(1.5px 0 0 #fff) drop-shadow(-1.5px 0 0 #fff) drop-shadow(0 1.5px 0 #fff) drop-shadow(0 -1.5px 0 #fff) drop-shadow(0 2px 2px rgba(43, 32, 20, .35)); }
.t3-brief .stk .cico, .t3-brief .stk .qm { --s: 18px; position: absolute; right: -6px; top: -4px; }
.t3-brief .stk b { font: 700 12px/1.2 var(--f-ui); text-align: center; color: var(--c-paper-ink); }
.t3-brief .crews { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; }
.t3-brief .srule { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.t3-brief .sl { display: inline-flex; align-items: center; gap: 4px; font: 700 12px/1 var(--f-ui); color: var(--c-paper-muted); }
.t3-brief .sgs { display: flex; gap: 6px; }
.t3-brief .sg { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 999px; background: rgba(43, 32, 20, .07); box-shadow: inset 0 0 0 1px rgba(43, 32, 20, .18); }
.t3-brief .sg .ss { display: inline-flex; } .t3-brief .sg .ic { --s: 14px; margin-right: -2px; }
.t3-brief .sg b { font: 800 14px/1 var(--f-ui); font-variant-numeric: tabular-nums; }
.t3-brief .btns { position: relative; z-index: 1; display: grid; grid-template-columns: 48px 1fr; gap: 14px; align-items: center; margin: -14px 16px 18px; }
.t3-brief .btns .go { min-width: 0; }
.t3-brief.c1 .mapstrip { height: 54px; margin-bottom: 6px; } .t3-brief.c1 h2 { font-size: 24px; } .t3-brief.c1 .k-stamp { width: 90px; height: 40px; font-size: 14px; }
.t3-brief.c1 h3 { margin: 7px 0 4px; } .t3-brief.c1 .radio { margin-bottom: 4px; line-height: 1.35; } .t3-brief.c1 .stk .im { width: 40px; height: 40px; } .t3-brief.c1 .crews { gap: 4px 10px; }
.t3-brief.c1 .paper { padding-bottom: 22px; } .t3-brief.c1 .btns { margin-bottom: 20px; }

/* ---------- 새 화마 카드(5.14): 도감 한 장 · 뒤집기 ---------- */
.t3-cardov { background: rgba(11, 15, 24, .8); perspective: 800px; }
.t3-card { width: min(100%, 336px); display: grid; gap: 8px; text-align: left; animation: k-flip .38s .1s var(--e-back) backwards; }
@keyframes k-flip { from { transform: rotateY(90deg); } }
.t3-card .ill { position: relative; height: 150px; border-radius: 8px; overflow: hidden; background: radial-gradient(ellipse 80% 90% at 50% 88%, var(--cb0, #5A2A14), var(--c-steel-800) 78%); box-shadow: inset 0 0 0 1.5px rgba(201, 154, 62, .5); }
.t3-card .ill.kB { --cb0: #6A4A10; } .t3-card .ill.kAL { --cb0: #3E2A6E; } .t3-card .ill.kC { --cb0: #1E2E6E; } .t3-card .ill.kK { --cb0: #6A3210; } .t3-card .ill.kD { --cb0: #3A4250; }
.t3-card .ill .foe { position: absolute; left: 50%; bottom: -8px; height: 118%; transform: translateX(-50%); transform-origin: 50% 100%; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .5)); animation: k-grow .3s .56s var(--e-back) backwards; }
@keyframes k-grow { from { transform: translateX(-50%) scale(.6); } }
.t3-card .ill::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(105deg, transparent 35%, rgba(255, 246, 228, .3) 47%, rgba(255, 246, 228, .08) 54%, transparent 62%) no-repeat; background-size: 300% 100%; background-position: 150% 0; animation: k-sweepx .5s .68s ease-out backwards; }
@keyframes k-sweepx { from { background-position: 150% 0; } to { background-position: -50% 0; } }
.t3-card .ill .cb { position: absolute; left: 8px; top: 8px; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .45)); }
.t3-card .ill .nw { position: absolute; right: 8px; top: 8px; }
.t3-card .nmrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.t3-card h3 { margin: 0 4px 0 0; font: 400 28px/1.1 var(--f-display); color: var(--c-text); text-shadow: var(--ol-sm); }
.t3-card .vg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.t3-card .col { box-sizing: border-box; padding: 6px 4px 6px; border-radius: 8px; background: rgba(11, 15, 24, .38); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.t3-card .col .hd { display: block; margin: 0 0 4px 4px; font: 800 12px/1 var(--f-ui); }
.t3-card .col.good .hd { color: var(--c-ok-hi); } .t3-card .col.bad .hd { color: var(--c-bad-soft); }
.t3-card .cells { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 4px 0; }
.t3-card .col { min-width: 0; }
.t3-card .cell { position: relative; display: grid; justify-items: center; align-content: start; gap: 2px; min-width: 0; }
.t3-card .cell .ags { position: relative; display: flex; justify-content: center; }
.t3-card .cell .ag { filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .4)); }
/* 한쪽 칸만 있으면(예: 연기 망령 '잘 들어요'만) 한 줄 전체를 씀 */
.t3-card .vg.one { grid-template-columns: 1fr; }
.t3-card .vg.one .cells { grid-template-columns: repeat(3, 1fr); }
/* 같은 반응끼리 묶은 칸: 아이콘 둘을 겹치고 나머지는 '+N' 알약(세 개를 한 칸에 욱여넣지 않음) */
.t3-card .cell.g2 .ag + .ag { margin-left: -12px; }
.t3-card .cell .more { position: absolute; right: -10px; top: -2px; z-index: 1; min-width: 20px; height: 18px; box-sizing: border-box; padding: 0 4px; border-radius: 999px; background: var(--c-steel-800); box-shadow: inset 0 0 0 1.5px var(--c-brass), 0 2px 0 var(--sh-ground); font: 900 12px/18px var(--f-ui); font-variant-numeric: tabular-nums; color: var(--c-text); text-align: center; }
.t3-card .cell .vb { position: absolute; right: -7px; bottom: -3px; }
.t3-card .cell .rb { position: absolute; left: -7px; top: -4px; }
.t3-card .cell small { max-width: 100%; font: 700 12px/1.15 var(--f-ui); color: var(--c-text-2); text-align: center; word-break: keep-all; }
.t3-card .col.bad .cell small { color: var(--c-bad-soft); }
.t3-card .anim canvas { display: block; width: 100%; height: auto; aspect-ratio: 600 / 170; }
.t3-card .outs { display: grid; grid-template-columns: 1fr 1fr; justify-items: center; margin-top: -12px; position: relative; }
.t3-card .text { margin: 0; font: 500 14px/1.45 var(--f-ui); color: var(--c-text); text-wrap: balance; }
.t3-card .safety { display: flex; gap: 6px; align-items: flex-start; margin: 0; padding: 7px 10px; border-radius: 6px; background: var(--c-paper); box-shadow: inset 0 0 0 1px var(--c-paper-shade); color: var(--c-paper-ink); font: 700 12px/1.4 var(--f-ui); }
.t3-card .safety > span { text-wrap: balance; }
.t3-card .safety .ic { --s: 16px; flex: none; margin-top: 1px; }
.t3-card .okb { width: 100%; margin-top: 2px; }

/* ---------- 잠깐 멈춤(5.19) ---------- */
.t3-pause { background: rgba(11, 15, 24, .72); }
.k-pz { width: 296px; max-width: 100%; display: grid; animation: k-popin .22s var(--e-back) backwards; }
.k-pz .hd { position: relative; z-index: 1; margin: 0 16px -12px; }
.k-pz .bd { display: grid; gap: 12px; justify-items: center; padding: 18px 8px 10px; }
.t3-pause .sec { width: 100%; display: grid; gap: 6px; justify-items: center; }
.t3-pause .none { font: 700 12px/44px var(--f-ui); color: var(--c-text-2); }
.t3-pause .mc { display: grid; justify-items: center; gap: 2px; min-width: 48px; padding: 0; border: 0; background: none; transition: transform var(--t-fast) var(--e-back); }
.t3-pause .mc:active { transform: translateY(2px) scale(.96); }
.t3-pause .mc small { font: 700 12px/1.2 var(--f-ui); color: var(--c-text-2); }
.t3-pause .togs { display: flex; gap: 40px; margin: 2px 0 14px; }
.t3-pause .go { width: 100%; }
.t3-pause .two { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.t3-pause .two .k-btn { min-width: 0; }
.t3-pause .two.wait { opacity: .45; pointer-events: none; } /* 저절로 멈춘 뒤 돌아온 2초: 판을 버리는 단추를 흐리게 잠금(QA 2) */
.t3-pause .two { transition: opacity .3s; }

/* ---------- 결과(5.15) ---------- */
.t3-result { background: radial-gradient(ellipse 90% 40% at 50% 0%, rgba(255, 150, 60, .26), rgba(255, 150, 60, 0) 70%), rgba(11, 15, 24, .9); gap: 6px; }
.t3-result .rs { width: min(100%, 340px); display: grid; justify-items: center; }
.t3-result .rib { position: relative; z-index: 2; width: 100%; margin-bottom: -26px; animation: k-ribin .4s var(--e-back) backwards; }
.t3-result .rib .ot { font: 400 clamp(36px, 10vw, 44px)/1 var(--f-display); --sw: .1em; transform: translateY(-5px); }
.t3-result.regroup .rib .ot { font-size: 34px; }
@keyframes k-ribin { from { transform: translateY(-30px) scale(1.15); opacity: 0; } }
.t3-result .body { width: 100%; display: grid; gap: 10px; justify-items: center; padding: 26px 2px 26px; animation: k-fade .2s .1s backwards; }
.t3-result .sub { margin: 4px 0 0; font: 800 16px/1.3 var(--f-ui); color: var(--c-paper-ink); }
.t3-result .stars3 { display: flex; align-items: flex-end; justify-content: center; gap: 2px; height: 80px; margin-top: 2px; }
.t3-result .bst { position: relative; width: 60px; height: 60px; background: url(../art/ui/ui-star.webp?v=1) 100% 0 / 200% 100% no-repeat; }
.t3-result .bst.mid { width: 72px; height: 72px; margin-bottom: 8px; }
.t3-result .bst .st { position: absolute; inset: 0; background: url(../art/ui/ui-star.webp?v=1) 0 0 / 200% 100% no-repeat; opacity: 0; }
.t3-result .bst.stamp .st { opacity: 1; animation: k-starin .28s var(--e-back) backwards; }
.t3-result .bst .sp { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; }
.t3-result .bst.stamp .sp::before { content: ""; position: absolute; left: -46px; top: -46px; width: 92px; height: 92px; border-radius: 50%; box-shadow: 0 0 0 3px rgba(243, 217, 140, .9); opacity: 0; animation: k-dust .5s .12s var(--e-out); }
.t3-result .bst.stamp .sp::after { content: ""; position: absolute; left: -3px; top: -3px; width: 6px; height: 6px; border-radius: 50%; opacity: 0; background: var(--c-brass-hi);
  box-shadow: 0 -40px 0 1px var(--c-brass-hi), 34px -20px 0 0 var(--c-text), 34px 22px 0 1px var(--c-brass-hi), 0 42px 0 0 var(--c-text), -34px 22px 0 1px var(--c-brass-hi), -34px -20px 0 0 var(--c-text); animation: k-spark .45s .12s var(--e-out); }
@keyframes k-starin { from { transform: scale(1.8) rotate(-12deg); opacity: 0; } 60% { opacity: 1; } }
@keyframes k-dust { from { opacity: 1; transform: scale(.55); } to { opacity: 0; transform: scale(1.25); } }
@keyframes k-spark { from { opacity: 1; transform: scale(.4); } 70% { opacity: 1; } to { opacity: 0; transform: scale(1.1); } }
.t3-result .say { display: grid; grid-template-columns: 60px 1fr; align-items: center; gap: 8px; width: 100%; text-align: left; }
.t3-result .bub { position: relative; margin: 0; padding: 8px 12px; border-radius: 12px; background: var(--c-paper-shade); box-shadow: inset 0 0 0 1px rgba(122, 90, 30, .28); font: 700 14px/1.35 var(--f-ui); color: var(--c-paper-ink); text-wrap: balance; }
.t3-result .bub::before { content: ""; position: absolute; left: -7px; top: 50%; margin-top: -7px; border: 7px solid transparent; border-left: 0; border-right-color: var(--c-paper-shade); }
.t3-result .bub .t2 { display: none; }
.t3-result .nums { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.t3-result .npl { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; align-items: center; column-gap: 6px; row-gap: 3px; height: 56px; box-sizing: border-box; padding: 0 12px 0 10px; border: 0 solid transparent;
  border-image: url(../art/ui/ui-plate-steel.webp?v=1) 48 fill / 14px stretch; filter: drop-shadow(0 2px 0 var(--sh-ground)); text-align: left; }
.t3-result .npl .ic { grid-row: 1 / 3; }
.t3-result .npl span { font: 700 12px/1 var(--f-ui); color: var(--c-text-3); align-self: end; }
.t3-result .npl .num { font-size: 20px; align-self: start; }
.t3-result .leaks { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 12px; }
.t3-result .leaks small { font: 800 12px/1 var(--f-ui); color: var(--c-paper-muted); }
.t3-result .lk { display: inline-flex; align-items: center; gap: 4px; }
.t3-result .lk .k-sock { width: 36px; height: 36px; } .t3-result .lk .k-sock > img { width: 28px; height: 28px; }
.t3-result .lk .lv { font: 900 14px/1 var(--f-ui); color: var(--c-bad); font-variant-numeric: tabular-nums; }
.t3-result .lesson { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0; padding: 7px 12px; border-radius: 6px; background: var(--c-paper-shade); font: 800 14px/1.3 var(--f-ui); color: var(--c-paper-ink); }
.t3-result .lesson .ic { flex: none; }
.t3-result .join { display: grid; justify-items: center; gap: 6px; width: 100%; }
.t3-result .jh { font: 800 12px/1 var(--f-ui); color: var(--c-paper-muted); }
.t3-result .jcs { display: flex; gap: 12px; justify-content: center; width: 100%; }
.t3-result .jc { position: relative; width: 132px; display: grid; justify-items: center; gap: 2px; padding-top: 4px; }
.t3-result .jc.wide { width: 100%; padding: 6px 30px 2px 6px; }
.t3-result .jt { display: grid; justify-items: center; gap: 3px; }
.t3-result .jt b { font: 800 14px/1.25 var(--f-ui); color: var(--c-text); text-align: center; }
.t3-result .jt b { overflow-wrap: normal; }
.t3-result .jhr { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 16px; }
.t3-result .jhs { display: none; }
.t3-result .vs { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 8px; }
.t3-result .vs em { display: inline-flex; align-items: center; gap: 2px; font: 700 12px/1 var(--f-ui); font-style: normal; color: var(--c-text-2); white-space: nowrap; }
.t3-result .js { position: absolute; right: -22px; top: -18px; width: 88px; height: 39px; font-size: 15px; transform: rotate(10deg) scale(0); opacity: 0; }
.t3-result .js.go { animation: k-stamp .3s var(--e-out) forwards; }
@keyframes k-stamp { from { transform: rotate(10deg) scale(1.8); opacity: 0; } to { transform: rotate(10deg) scale(1); opacity: .94; } }
.t3-result .legend { display: flex; align-items: center; justify-content: center; gap: 4px; margin: 0; font: 700 12px/1 var(--f-ui); color: var(--c-paper-muted); }
.t3-result .legend .ic:last-of-type { margin-left: 8px; }
.t3-result .life { display: flex; gap: 6px; align-items: flex-start; margin: 0; padding: 0 6px; font: 600 12px/1.45 var(--f-ui); color: var(--c-paper-muted); text-align: left; }
.t3-result .life > span { text-wrap: balance; }
/* 결과·멈춤 화면에는 맨 아래 각주를 두지 않음(둥근 단추 아래 같은 말이 또 나오던 것) */
.t3-result > .foot, .t3-pause > .foot { display: none; }
.t3-result .life .ic { --s: 16px; flex: none; margin-top: 1px; }
.t3-result .btns { position: relative; z-index: 2; width: 100%; display: grid; justify-items: center; gap: 12px; margin-top: -16px; padding: 0 14px; box-sizing: border-box; animation: k-rise .3s .3s var(--e-out) backwards; }
.t3-result .btns .prim { width: 100%; }
.t3-result .rnd { display: flex; gap: 44px; padding-bottom: 18px; }
/* 한 화면에 맞추기: c1 = 한마디와 교훈을 합치고(흉상 48) 합류 카드를 가로로 · c2 = 틈을 줄이고 맨 아래 각주를 뺌 · c3 = 생활안전을 한 줄 */
.t3-result.c1 .say { grid-template-columns: 48px 1fr; } .t3-result.c1 .say .k-md { --m: 48px !important; }
.t3-result.c1 .bub .t1 { display: none; } .t3-result.c1 .bub .t2 { display: inline; }
.t3-result.c1 .lesson { display: none; }
.t3-result.c1 .jc:not(.wide) { flex: 1 1 0; width: auto; min-width: 0; grid-template-columns: auto 1fr; justify-items: start; align-items: center; column-gap: 4px; padding: 2px 6px 2px 0; }
.t3-result.c1 .jc:not(.wide) .k-md { --m: 44px !important; }
.t3-result.c1 .jc:not(.wide) .jt { justify-items: start; } .t3-result.c1 .jc:not(.wide) .vs { justify-content: flex-start; gap: 3px 6px; }
.t3-result.c1 .stars3 { height: 70px; } .t3-result.c1 .bst { width: 52px; height: 52px; } .t3-result.c1 .bst.mid { width: 64px; height: 64px; }
.t3-result.c2 { gap: 0; } .t3-result.c2 .foot { display: none; } .t3-result.c2 .body { gap: 8px; padding-bottom: 22px; } .t3-result.c2 .rnd { padding-bottom: 6px; }
.t3-result.c1 .jc .js { display: none; } .t3-result.c1 .jhs { display: inline-grid; position: relative; right: auto; top: auto; width: 72px; height: 32px; font-size: 13px; margin: -8px 0 -8px; }
.t3-result.c3 .stars3 { height: 58px; } .t3-result.c3 .bst { width: 46px; height: 46px; } .t3-result.c3 .bst.mid { width: 56px; height: 56px; margin-bottom: 6px; } .t3-result.c3 .body { gap: 6px; } .t3-result.c3 .bub { padding: 6px 10px; } .t3-result.c3 .rnd { padding-bottom: 2px; }
.t3-result.c3 .life span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } .t3-result.c3 .legend { display: none; }

/* ---------- 약제 정체성(UX 2차 2장): 약제 하나 = 색 하나 + 아이콘 하나 + 낱말 하나 — 캔버스 render3.agentPill과 같은 부품 ---------- */
/* 약제 알약: word(색 판 + 낱말) · full(아이콘 원 + 낱말) · to(→ + full) · dot(아이콘 원만) · no(교리 때문에 안 씀: 스틸 판 + ✗/손바닥). 글자는 늘 짙은 글씨 */
.ag-chip { position: relative; display: inline-flex; align-items: center; flex: none; gap: 2px; height: 20px; box-sizing: border-box; padding: 0 8px 0 0; border-radius: 999px; overflow: hidden;
  background: var(--ag, var(--c-steel-500)); box-shadow: inset 0 0 0 1.5px var(--c-outline), 0 0 0 1px rgba(255, 246, 228, .6), 0 2px 0 var(--sh-ground);
  font: 800 12px/1 var(--f-ui); color: var(--c-outline); white-space: nowrap; vertical-align: middle; letter-spacing: 0; text-shadow: none; }
.ag-chip::before { content: ""; position: absolute; left: 3px; right: 3px; top: 2px; height: 30%; border-radius: 999px; background: rgba(255, 255, 255, .3); pointer-events: none; }
.ag-chip > b { position: relative; font: inherit; color: inherit; }
.ag-chip .ai { position: relative; z-index: 1; display: grid; place-items: center; flex: none; width: 20px; height: 20px; box-sizing: border-box; border-radius: 50%; background: var(--c-steel-900); box-shadow: inset 0 0 0 1.5px var(--c-outline); }
.ag-chip .ai .ic { --s: 15px; }
.ag-chip.word { padding: 0 8px; height: 18px; }
.ag-chip.dot { padding: 0; width: 20px; }
.ag-chip.dot .ai { box-shadow: inset 0 0 0 2px var(--ag), inset 0 0 0 3.5px var(--c-outline); }
.ag-chip.stripe::after { content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 10px; background: repeating-linear-gradient(-45deg, transparent 0 4px, rgba(36, 21, 11, .82) 4px 7px); pointer-events: none; }
.ag-chip.stripe:not(.dot) { padding-right: 13px; }
.ag-chip.no { background: var(--c-steel-700); color: var(--c-text); }
.ag-chip.no .ai .ic { opacity: .8; }
.ag-chip .mk { --s: 16px; margin: 0 -3px 0 1px; position: relative; }
.ag-chip.big { height: 24px; font-size: 14px; }
.ag-chip.big .ai { width: 24px; height: 24px; } .ag-chip.big .ai .ic { --s: 18px; }
.ag-chip.big.word { height: 22px; }
.ag-to { display: inline-flex; align-items: center; gap: 2px; flex: none; vertical-align: middle; }
.ag-to .arr, .oc .arr { font: 900 16px/1 var(--f-ui); color: var(--c-text); text-shadow: var(--ol-sm); }
/* 약제 메달(지령서·결과 합류 카드): 황동 테 + 약제 색 원판 + 큰 아이콘. 막기는 검은 빗금 */
.ag-md { position: relative; display: inline-grid; place-items: center; flex: none; width: var(--m, 40px); height: var(--m, 40px); box-sizing: border-box; border-radius: 50%;
  background: radial-gradient(circle at 38% 28%, rgba(255, 255, 255, .38), rgba(255, 255, 255, 0) 45%), var(--ag, var(--c-steel-500));
  border: 3px solid var(--c-brass); box-shadow: 0 0 0 1.5px var(--c-outline), inset 0 0 0 1.5px var(--c-outline), 0 3px 0 var(--sh-ground); }
.ag-md.stripe { background: radial-gradient(circle at 38% 28%, rgba(255, 255, 255, .38), rgba(255, 255, 255, 0) 45%), repeating-linear-gradient(-45deg, var(--ag) 0 6px, rgba(36, 21, 11, .5) 6px 9px); }
.ag-md > .ic { filter: drop-shadow(0 1.5px 0 rgba(0, 0, 0, .35)); }
/* 둘째 아이콘 시트(ui-atlas2 3×2, 128칸): 강화 · 철수 · 되돌리기 */
.ic2 { display: inline-block; flex: none; width: var(--s, 24px); height: var(--s, 24px); font-style: normal; vertical-align: -0.25em;
  background: url(../art/ui/ui-atlas2.webp?v=1) no-repeat; background-size: calc(var(--s, 24px) * 3) calc(var(--s, 24px) * 2);
  background-position: calc(var(--s, 24px) * var(--x, 0) * -1) calc(var(--s, 24px) * var(--y, 0) * -1); }
/* 되돌리기 알약(UX 2차 1.6): 가로 가운데, 아래 끝이 팀장 메달 위 10px. 높이 44 · 폭 132, 아래 막대가 3초 동안 줄어듦 */
.k-undo { position: absolute; left: 50%; top: 0; z-index: 12; width: 132px; height: 44px; margin-left: -66px; box-sizing: border-box; padding: 0 14px 0 8px; border: 0; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; gap: 6px; transform: translateY(var(--uy, 0px));
  background: var(--c-paper); box-shadow: inset 0 0 0 1.5px var(--c-paper-shade), 0 0 0 1.5px var(--c-outline), 0 4px 0 var(--sh-ground), 0 8px 18px var(--sh-air);
  font: 800 15px/1 var(--f-ui); color: var(--c-paper-ink); overflow: hidden; }
.k-undo .ubar { position: absolute; left: 16px; right: 16px; bottom: 5px; height: 3px; border-radius: 2px; background: rgba(43, 32, 20, .15); overflow: hidden; }
.k-undo .ubar i { position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--k, 1) * 100%); border-radius: 2px; background: var(--c-brass); }
.k-undo:active { transform: translateY(calc(var(--uy, 0px) + 3px)) scale(.97); }
.k-undo.in { animation: k-undoin .18s var(--e-back); }
@keyframes k-undoin { from { transform: translateY(calc(var(--uy, 0px) + 14px)) scale(.9); opacity: 0; } }
/* 한번에 배치(UX 2차 보강): 되돌리기 알약과 같은 자리(아래 가운데). 붉은 에나멜 주 단추 + 이번에 세울 조의 약제 방울 + 낱말. 3초마다 광택 */
.k-quick { position: absolute; left: 50%; top: 0; z-index: 12; height: 46px; min-width: 176px; box-sizing: border-box; padding: 0; border: 0 solid transparent; border-width: 16px 30px;
  border-image: url(../art/ui/ui-btn-red.webp?v=1) 44 81 44 80 fill / 16px 30px stretch; background: none; filter: drop-shadow(0 4px 0 var(--sh-ground)) drop-shadow(0 6px 12px var(--sh-air));
  display: flex; align-items: center; justify-content: center; gap: 6px; transform: translate(-50%, var(--uy, 0px)); white-space: nowrap; }
.k-quick .qd { display: inline-flex; align-items: center; gap: 0; margin: -10px 0 -10px -14px; }
.k-quick .qd .ag-chip + .ag-chip { margin-left: -5px; }
.k-quick .qd .qn { font: 900 12px/1 var(--f-ui); color: var(--c-text); text-shadow: var(--ol-sm); margin-left: 2px; }
.k-quick .qt { font: 400 18px/1 var(--f-display); color: var(--c-text); text-shadow: var(--ol-sm); margin-right: -8px; }
.k-quick:active { transform: translate(-50%, calc(var(--uy, 0px) + 3px)) scale(.97); filter: drop-shadow(0 1px 0 var(--sh-ground)) brightness(.94); }
.k-quick.in { animation: k-quickin .2s var(--e-back); }
@keyframes k-quickin { from { transform: translate(-50%, calc(var(--uy, 0px) + 14px)) scale(.9); opacity: 0; } }
.k-quick.shine::after { content: ""; position: absolute; inset: -12px -26px; border-radius: 999px; pointer-events: none; background: linear-gradient(105deg, transparent 38%, rgba(255, 246, 228, .5) 48%, rgba(255, 246, 228, .12) 55%, transparent 62%) no-repeat; background-size: 300% 100%; background-position: 150% 0; animation: k-shine 3s 1s var(--e-out) infinite; }
/* 팀장 메달 이름표(지원 단추 이름표와 같은 모양) · 단계 숫자가 오르면 1.4배로 튐 */
.k-medal .lbl { position: absolute; left: 50%; top: calc(100% + 1px); transform: translateX(-50%); height: 16px; padding: 0 7px; border-radius: 999px; background: linear-gradient(180deg, var(--c-brass-hi), var(--c-brass)); box-shadow: inset 0 0 0 1px var(--c-outline); font: 800 12px/16px var(--f-ui); color: var(--c-outline); white-space: nowrap; }
.k-medal.lvup .lvl { animation: k-lvup .5s var(--e-back); }
@keyframes k-lvup { 0% { transform: scale(1); box-shadow: 0 0 0 1.5px var(--c-outline), 0 0 0 0 rgba(243, 217, 140, .9); } 40% { transform: scale(1.4); box-shadow: 0 0 0 1.5px var(--c-outline), 0 0 12px 6px rgba(243, 217, 140, .9); } 100% { transform: scale(1); } }
.t3.short .k-medal .lbl { display: none; }
/* 빨리 부르기를 부를 수 없을 때(UX 2차 보강): 같은 모양의 스틸 단추 '오는 중' + 안쪽 무리 진행 막대 — 붉은 단추가 사라진 줄 알던 것, 누름이 판으로 새던 것(누름은 단추가 받고 흔들림만) */
.k-call.wait { border-image-source: url(../art/ui/ui-btn-steel.webp?v=1); filter: drop-shadow(0 3px 0 var(--sh-ground)); }
.k-call.wait > .t { font-size: 15px; color: var(--c-text-2); }
.k-call.wait > .b { display: none; }
.k-call.wait .cbar { left: 22px; right: 22px; bottom: 9px; height: 6px; border-radius: 999px; background: var(--c-steel-900); box-shadow: 0 0 0 1px var(--c-outline); }
.k-call.wait .cbar i { background: linear-gradient(90deg, var(--c-flame), var(--c-flame-hi)); border-radius: 999px; transition: width .2s linear; }
.k-call.wait:active { transform: none; }
.k-power { touch-action: none; } /* 단추에서 판으로 끌어 놓기(방수포·응원출동 직접 조준): 끄는 동안 브라우저가 가로채지 않게 */
.k-call.pulse::after { content: ""; position: absolute; inset: -4px; border-radius: 999px; box-shadow: 0 0 0 0 rgba(243, 217, 140, .9); animation: k-ring 1.1s var(--e-out) infinite; pointer-events: none; }
/* 다음 무리 알약(입구 종 옆, 세는 동안 내내): 화마 얼굴 28 × 수 + '→ 폼' */
.t3-bellpill { transform-origin: 0 50%; transition: none; }
.t3-bellpill .icons { flex-direction: column; flex-wrap: nowrap; align-items: flex-start; gap: 3px; } /* 한 줄에 한 종류(좁은 화면에서 종 둘 사이에 들어가게) */
.t3-bellpill .nw { display: inline-flex; align-items: center; gap: 2px; margin: 0 1px; }
.t3-bellpill .nw img, .t3-pause .nxt .nw img { width: 28px; height: 28px; object-fit: contain; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .6)); }
.t3-bellpill .nw .num, .t3-pause .nxt .num { margin-right: 2px; }
.t3-bellpill .more { margin: -2px 0 0 12px; }
.t3-pause .nxt .nw { display: inline-flex; align-items: center; gap: 2px; }
.t3-pause .skl { margin: 0; padding: 0; list-style: none; display: grid; gap: 3px; font: 700 12px/1.3 var(--f-ui); color: var(--c-text-2); text-align: center; }
/* 지령서: 출동 조 = 약제 메달 + 낱말 알약 + 작은 조직 이름 · 네 조 모두(1현장 다시 하기)는 스틸 단추 */
.t3-brief .cr { display: grid; grid-template-columns: 36px 1fr; grid-template-rows: auto auto; column-gap: 8px; row-gap: 1px; align-items: center; }
.t3-brief .cr .ag-md { grid-row: 1 / 3; }
.t3-brief .cr .ag-chip { justify-self: start; }
.t3-brief .cr small { font: 600 12px/1.2 var(--f-ui); color: var(--c-paper-muted); }
.t3-brief .stk .fm { position: absolute; right: -6px; top: -4px; }
.t3-brief .warn .ag-chip { flex: none; }
.t3-brief .btns.three { grid-template-columns: 48px auto 1fr; gap: 10px; }
.t3-brief .btns .all { min-width: 0; padding: 0 2px; }
.k-sock .fm { position: absolute; left: -4px; bottom: -4px; }
/* 새 화마 카드: 맨 위 한 줄 상성(✓ · ✋ · ✗ + 약제 알약) · 교리 용어 작은 글 */
.t3-card .ill .cb { position: absolute; left: 8px; top: 8px; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .45)); }
.t3-card .vrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.t3-card .vr { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.t3-card .vr .mk { --s: 20px; margin: 0; }
.t3-card .vr small { font: 800 12px/1 var(--f-ui); color: var(--c-text-2); }
.t3-card .vr.bad small { color: var(--c-bad-soft); }
.t3-card .text { font: 800 16px/1.35 var(--f-ui); }
.t3-card .outs .oc { display: inline-flex; align-items: center; gap: 3px; font: 800 12px/1 var(--f-ui); color: var(--c-text); }
.t3-card .outs .oc.bad { color: var(--c-bad-soft); }
.t3-card .outs .oc .ic { --s: 16px; }
.t3-card .term { margin: 0; font: 600 12px/1.3 var(--f-ui); color: var(--c-text-3); }
/* 결과 합류 카드: 약제 메달 + 낱말 알약 + 작은 조직 이름 */
.t3-result .jt .org { font: 600 12px/1.2 var(--f-ui); color: var(--c-text-3); }
.t3-result.c1 .jc:not(.wide) .ag-md { --m: 44px !important; }

/* ---------- 그 밖 ---------- */
.mir { transform: scaleX(-1); } /* 좌우 뒤집힌 현장(3·4현장) 배경 */
@keyframes t3shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 50% { transform: translateX(4px); } 75% { transform: translateX(-2px); } }
/* HUD 숫자 올라가기(7.2): 늘면 크림 번쩍 + 1.15배, 안전이 줄면 경고색 + 흔들림 3px, 소방력을 쓰면 짧게 가라앉음 */
.k-status .st.up .num { animation: k-numup .14s var(--e-out); }
.k-status .st.dn .num { animation: k-numdn .32s; }
.k-status .st.spend .num { animation: k-spend .16s var(--e-out); }
@keyframes k-numup { 50% { transform: scale(1.15); color: var(--c-brass-hi); } }
@keyframes k-numdn { 0%, 100% { transform: translateX(0); color: var(--c-bad-soft); } 25% { transform: translateX(-3px); } 50% { transform: translateX(3px); } 75% { transform: translateX(-1.5px); color: var(--c-bad-soft); } }
@keyframes k-spend { 50% { transform: translateY(2px) scale(.94); } }

/* ---------- 저자극(6.4): 움직임 대신 고정 테 · 무전 띠·말풍선은 120ms 페이드 ---------- */
@media (prefers-reduced-motion: reduce) {
  .t3 *, .t3 *::before, .t3 *::after { animation: none !important; transition: none !important; }
  .k-medal.pulse::after, .k-power.pulse::after { box-shadow: 0 0 0 3px rgba(243, 217, 140, .9); }
  .t3 .k-radio.in, .t3 .k-coach.in { animation: k-fade .12s !important; }
  .t3 .t3-result .js { transform: rotate(10deg) scale(1); opacity: .94; }
  .t3 .k-pin.current::before { transform: scale(1); opacity: 1; }
}
.t3.calm *, .t3.calm *::before, .t3.calm *::after { animation: none !important; transition: none !important; }
.t3.calm .k-medal.pulse::after, .t3.calm .k-power.pulse::after { box-shadow: 0 0 0 3px rgba(243, 217, 140, .9); }
.t3.calm .k-radio.in, .t3.calm .k-coach.in { animation: k-fade .12s !important; }
.t3.calm .t3-result .js { transform: rotate(10deg) scale(1); opacity: .94; }
