/* 엘리멘탈 파이터즈(Elemental Fighters, 옛 on-Strike 원소 격투판) 화면: 도트 없음. 1280×720 기준(#ui)을 화면 크기에 맞춰 늘린다. 모서리 6px(알약 모양 금지), 배지·버튼 글자는 가운데 */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #07090f; overflow: hidden; overscroll-behavior: none; user-select: none; -webkit-user-select: none; font-family: system-ui, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; color: #f4f6fb; }
#frame { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); overflow: hidden; background: #07090f; }
#view3d { position: absolute; left: 0; top: 0; z-index: 1; }
#ui { position: absolute; left: 0; top: 0; width: 1280px; height: 720px; transform-origin: 0 0; z-index: 2; pointer-events: none; }
#ui button, #selCols .col { pointer-events: auto; }
#fx2d { position: absolute; inset: 0; width: 1280px; height: 720px; }
.hidden { display: none !important; }
.bar { position: relative; background: rgba(255,255,255,0.12); border-radius: 4px; overflow: hidden; }
.bar i { position: absolute; left: 0; top: 0; bottom: 0; display: block; transition: width .12s; }
.bar span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; text-shadow: 0 1px 2px #000; }
.badge, .tag, .chip { display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; font-weight: 800; }
.panelbox, #hud, #elemCard, .key, #bossbar, .panel { background: rgba(10,14,24,0.78); border: 1px solid rgba(255,255,255,0.14); border-radius: 6px; backdrop-filter: blur(6px); }

#hud { position: absolute; left: 20px; top: 18px; width: 360px; padding: 12px 14px; --c: #ff6a3a; }
#hud .row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
#hud .row b { font-size: 24px; letter-spacing: -0.5px; }
#hud .badge { height: 26px; padding: 0 10px; background: var(--c); color: #10131c; font-size: 14px; }
#hud .hp { height: 20px; margin-bottom: 6px; } #hud .hp i { background: linear-gradient(90deg, #ff4a5a, #ff8a6a); }
#hud .g { height: 14px; } #hud .g i { background: var(--c); } #hud .g span { font-size: 10px; }
#hud.awake { box-shadow: 0 0 0 2px var(--c), 0 0 24px var(--c); }

#elemCard { position: absolute; left: 394px; top: 18px; width: 522px; min-height: 100px; padding: 10px 12px 14px; display: flex; gap: 12px; align-items: center; --c: #8fd0ff; }
#elemCard .sym { flex: none; width: 84px; height: 84px; border: 3px solid var(--c); border-radius: 6px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 34px; font-weight: 900; color: var(--c); position: relative; line-height: 1; }
#elemCard .sym small { position: absolute; left: 6px; top: 4px; font-size: 12px; color: #dfe6f2; }
#elemCard .sym em { font-style: normal; font-size: 13px; margin-top: 6px; color: #f4f6fb; }
#elemCard .sym.none { color: #6a7388; border-color: #3a4256; }
#elemCard .tx { flex: 1; font-size: 13.5px; line-height: 1.42; word-break: keep-all; overflow-wrap: anywhere; }
#elemCard .tx p { margin: 2px 0; display: flex; gap: 6px; align-items: flex-start; }
#elemCard .tx b { font-size: 15px; }
#elemCard .tx .dim { color: #a8b0c0; }
#elemCard .tag { flex: none; min-width: 34px; height: 20px; padding: 0 6px; background: rgba(255,255,255,0.14); font-size: 11px; color: #fff; margin-top: 1px; }
#elemCard .tag.g { color: #10131c; }
#elemCard .bar { position: absolute; left: 12px; right: 12px; bottom: 6px; height: 4px; } #elemCard .bar i { background: var(--c); }

#keys { position: absolute; right: 20px; top: 18px; display: grid; grid-template-columns: repeat(3, 108px); gap: 6px; }
.key { position: relative; height: 44px; display: flex; flex-direction: row; gap: 8px; align-items: center; justify-content: center; overflow: hidden; }
.key b { font-size: 20px; line-height: 1; } .key span { font-size: 13px; color: #c8d0e0; }
.key i { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.55); }
.key.hot { border-color: #ffe26b; box-shadow: 0 0 12px rgba(255,226,107,0.5); }

#combo { position: absolute; right: 40px; top: 200px; text-align: right; opacity: 0; transform: scale(0.8); transition: opacity .15s, transform .15s; text-shadow: 0 3px 0 #10131c, 0 0 18px rgba(255,180,80,0.6); }
#combo.show { opacity: 1; transform: scale(1); }
#combo b { display: block; font-size: 72px; font-weight: 900; color: #ffe26b; line-height: 1; } #combo span { font-size: 18px; font-weight: 800; }
#bossbar { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); width: 600px; padding: 8px 12px; display: flex; align-items: center; gap: 12px; }
#bossbar span { flex: none; font-weight: 800; color: #ff8a8a; } #bossbar .bar { flex: 1; height: 14px; } #bossbar .bar i { background: linear-gradient(90deg, #ff3a4a, #ff9a5a); }
#banner { position: absolute; left: 50%; top: 192px; transform: translate(-50%, -10px); padding: 12px 24px; background: rgba(10,14,24,0.86); border: 1px solid rgba(255,226,107,0.6); border-radius: 6px; font-size: 22px; font-weight: 800; color: #ffe26b; opacity: 0; transition: opacity .15s, transform .15s; white-space: nowrap; text-align: center; }
#banner.show { opacity: 1; transform: translate(-50%, 0); } #banner.warn { color: #ff7a7a; border-color: rgba(255,90,90,0.7); }

#select { position: absolute; inset: 0; }
#select .top { position: absolute; left: 0; right: 0; top: 0; height: 58px; display: flex; align-items: center; gap: 24px; padding: 0 24px; background: rgba(7,9,15,0.82); }
#select h1 { margin: 0; font-size: 28px; font-weight: 900; letter-spacing: -0.5px; display: flex; align-items: baseline; gap: 10px; }
#select h1 small { font-size: 14px; font-weight: 700; color: #a8b0c0; letter-spacing: 0.5px; }
.panel .eyebrow { margin: 0 0 6px; font-size: 13px; font-weight: 800; color: #ffd36e; letter-spacing: 0.5px; }
#select .top p { margin: 0; font-size: 15px; color: #ffd36e; font-weight: 700; } #select .top .hint { margin-left: auto; color: #e8ecf4; }
#selCols { position: absolute; left: 0; right: 0; bottom: 0; height: 250px; display: flex; }
#selCols .col { flex: 1; padding: 16px 18px; background: rgba(7,9,15,0.78); border-top: 4px solid transparent; cursor: pointer; opacity: 0.72; }
#selCols .col.on { opacity: 1; border-top-color: var(--c); background: rgba(7,9,15,0.9); }
#selCols .nm { display: flex; align-items: center; gap: 10px; } #selCols .nm b { font-size: 30px; font-weight: 900; }
#selCols .attr { height: 26px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; background: var(--c); color: #10131c; font-weight: 800; font-size: 14px; }
#selCols .st { margin: 12px 0 6px; font-size: 16px; font-weight: 700; line-height: 1.4; } #selCols .why { margin: 0 0 12px; font-size: 14px; color: #a8b0c0; }
#selCols .best { display: flex; align-items: center; gap: 6px; } #selCols .best em { font-style: normal; font-size: 12px; color: #c8d0e0; margin-right: 4px; }
.chip { min-width: 34px; height: 26px; padding: 0 6px; border: 2px solid; font-size: 13px; }

.panel { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); min-width: 460px; padding: 28px 32px; text-align: center; background: rgba(10,14,24,0.92); }
.panel h2 { margin: 0 0 14px; font-size: 34px; font-weight: 900; } .panel h2.red { color: #ff6a7a; } .panel p { margin: 0 0 18px; color: #c8d0e0; }
.btns { display: flex; gap: 10px; justify-content: center; margin-top: 18px; }
button { pointer-events: auto; height: 46px; padding: 0 20px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.08); color: #f4f6fb; font: 800 16px system-ui, "Apple SD Gothic Neo", sans-serif; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
button.main { background: #ffd36e; color: #14100a; border-color: #ffd36e; } button:hover { filter: brightness(1.12); }
.keytab { margin: 0 auto; border-collapse: separate; border-spacing: 8px 8px; font-size: 14px; text-align: left; }
.keytab th { min-width: 44px; height: 30px; text-align: center; background: rgba(255,255,255,0.12); border-radius: 6px; } .keytab td { color: #dfe6f2; padding-right: 12px; }
.rank { display: flex; flex-direction: column; align-items: center; margin-bottom: 12px; } .rank b { font-size: 72px; font-weight: 900; color: #ffd36e; line-height: 1; } .rank span { font-size: 13px; color: #a8b0c0; }
#clearStats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; text-align: left; font-size: 15px; } #clearStats div { display: flex; justify-content: space-between; gap: 16px; } #clearStats span { color: #a8b0c0; }
#loading { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 360px; text-align: center; } #loading p { margin: 0 0 12px; color: #c8d0e0; } #loading .bar { height: 6px; } #loading .bar i { background: #ffd36e; }

/* ===== HUD 다듬기 (2026-11-17 Yui, 충쌤 "여기 높이 통일 하고 uiuxup 가자") =====
   위 HUD 세 칸(주인공 · 원소 카드 · 키 6칸)을 같은 높이 128px, 같은 위·아래 끝선(18 → 146)으로.
   가장 긴 철(Fe) 카드도 128px 안에 들어가게 가운데 카드를 넓히고(522 → 612px), 양옆 칸은 300px.
   원소를 먹을 때 뜨는 알림 띠(#banner, 위 192px)와는 46px 떨어진다. 글자는 상하 가운데, 모서리 6px. */
#ui { --hud-top: 18px; --hud-h: 128px; --hud-side: 300px; --hud-gap: 14px; }
#hud, #elemCard, #keys { top: var(--hud-top); height: var(--hud-h); }
#hud { left: 20px; width: var(--hud-side); padding: 14px 16px; display: flex; flex-direction: column; justify-content: space-between; }
#hud .row { margin: 0; height: 30px; }
#hud .row b { font-size: 24px; line-height: 1; }
#hud .badge { height: 26px; line-height: 1; }
#hud .hp { height: 24px; margin: 0; } #hud .hp span { font-size: 13px; }
#hud .g { height: 18px; } #hud .g span { font-size: 11px; }
#elemCard { left: calc(20px + var(--hud-side) + var(--hud-gap)); width: calc(1280px - 40px - 2 * var(--hud-side) - 2 * var(--hud-gap)); min-height: 0; padding: 12px 14px 16px; gap: 14px; align-items: center; overflow: hidden; }
#elemCard .sym { width: 84px; height: 84px; }
#elemCard .tx { font-size: 13.5px; line-height: 1.36; }
#elemCard .tx p { margin: 2px 0; }
#elemCard .tx p:first-child { margin-top: 0; } #elemCard .tx p:last-child { margin-bottom: 0; }
#elemCard .tag { height: 20px; line-height: 1; }
#elemCard .bar { bottom: 7px; left: 14px; right: 14px; }
#keys { right: 20px; width: var(--hud-side); grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 6px; }
.key { height: auto; flex-direction: column; gap: 5px; }
.key b { font-size: 22px; } .key span { font-size: 12px; line-height: 1; white-space: nowrap; }

/* ===== 원소 카드 게임 HUD화 (2026-11-18 Yui, 충쌤 "여기 설명 uiuxup 좀 더 게임틱하게 화려하게 수정해") =====
   style.css만: game.js는 원소를 먹거나 끝날 때만 카드 속을 새로 그리므로(ah), 속 요소의 CSS 애니메이션이 먹을 때마다 다시 돈다.
   칸 크기·글자 크기·줄 간격은 그대로(128px, 24조합 넘침 0 유지). 원소 색 --c는 맵 아이템과 같은 값(game.js Ht.color). */
#elemCard:not(.empty) {
  border-color: color-mix(in srgb, var(--c) 60%, transparent);
  background:
    radial-gradient(120% 140% at 0% 50%, color-mix(in srgb, var(--c) 20%, transparent) 0%, transparent 46%),
    linear-gradient(180deg, rgba(18,23,36,0.92), rgba(8,11,19,0.9));
  box-shadow: 0 0 0 1px rgba(0,0,0,0.5), 0 0 22px color-mix(in srgb, var(--c) 34%, transparent), inset 0 1px 0 color-mix(in srgb, var(--c) 45%, transparent);
}
/* 주기율표 칸: 원소 색으로 빛나고, 먹는 순간 커지며 떠오른다 */
#elemCard .sym:not(.none) {
  border-width: 2px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 30%, #0b0f18) 0%, #0b0f18 72%);
  box-shadow: 0 0 14px color-mix(in srgb, var(--c) 55%, transparent), inset 0 0 14px color-mix(in srgb, var(--c) 28%, transparent);
  text-shadow: 0 0 12px color-mix(in srgb, var(--c) 80%, transparent);
  animation: esSymIn .55s cubic-bezier(.2,1.4,.4,1) both, esSymGlow 2.4s ease-in-out .6s infinite;
}
#elemCard .sym:not(.none) em, #elemCard .sym:not(.none) small { text-shadow: none; }
/* 먹은 순간 카드 전체가 번쩍: .tx의 ::before가 카드(#elemCard) 크기로 빛을 한 번 쓸고 지나간다 */
#elemCard:not(.empty) .tx::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(105deg, transparent 30%, color-mix(in srgb, var(--c) 55%, transparent) 46%, rgba(255,255,255,0.55) 50%, color-mix(in srgb, var(--c) 55%, transparent) 54%, transparent 70%) no-repeat;
  background-size: 260% 100%; opacity: 0;
  animation: esSweep .7s ease-out .08s both;
}
#elemCard:not(.empty) .tx::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: radial-gradient(90% 160% at 10% 50%, rgba(255,255,255,0.7), color-mix(in srgb, var(--c) 60%, transparent) 40%, transparent 85%);
  box-shadow: inset 0 0 0 2px var(--c); opacity: 0;
  animation: esFlash .45s ease-out both;
}
@keyframes esFlash { 0% { opacity: .95; } 100% { opacity: 0; } }
#elemCard:not(.empty) .tx p { animation: esLineIn .38s cubic-bezier(.2,.9,.3,1) both; }
#elemCard:not(.empty) .tx p:nth-child(2) { animation-delay: .07s; }
#elemCard:not(.empty) .tx p:nth-child(3) { animation-delay: .14s; }
/* 머리표(왜·효과): 각진 게임 라벨(평행사변형), 왼쪽 원소 색 띠. 상자 크기는 그대로라 줄바꿈이 바뀌지 않는다 */
#elemCard .tag {
  border-radius: 0; clip-path: polygon(4px 0, 100% 0, calc(100% - 4px) 100%, 0 100%);
  background: linear-gradient(90deg, var(--c) 0 4px, color-mix(in srgb, var(--c) 26%, #0d111b) 4px);
  color: #fff; padding: 0 5px 0 7px;
}
/* 케미 등급: 같은 각진 라벨, 등급마다 색(game.js sf)과 강도를 다르게 */
#elemCard .tag.g { color: #10131c; padding-left: 6px; } /* 배경은 game.js가 넣는 등급 색 그대로 */
#elemCard .tag.g[style*="#ff5a7a" i] { background: linear-gradient(90deg, #ff9db1, #ff5a7a 60%) !important; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.75), inset 0 -6px 8px rgba(255,255,255,0.25); animation: esHot .9s ease-in-out infinite; } /* 아주 강함: 밝은 띠 + 맥박 */
#elemCard .tag.g[style*="#ffb04a" i] { box-shadow: inset 0 0 0 1px rgba(255,255,255,0.55); } /* 강함: 밝은 테 */
#elemCard .tag.g[style*="#a8b0c0" i], #elemCard .tag.g[style*="#8a92a8" i] { filter: saturate(0.5); } /* 보통 · 나쁨: 차분하게 */
/* 남은 시간 막대: 원소 색, 빛 띠, 끝 15%(약 4초)부터 깜빡임 */
#elemCard .bar { bottom: 6px; height: 5px; background: rgba(255,255,255,0.08); border-radius: 0; }
#elemCard .bar i { background: linear-gradient(90deg, color-mix(in srgb, var(--c) 70%, #000), var(--c)); box-shadow: 0 0 8px var(--c); }
#elemT[style*="width: 0."], #elemT[style*="width: 1."], #elemT[style*="width: 2."], #elemT[style*="width: 3."], #elemT[style*="width: 4."],
#elemT[style*="width: 5."], #elemT[style*="width: 6."], #elemT[style*="width: 7."], #elemT[style*="width: 8."], #elemT[style*="width: 9."],
#elemT[style*="width: 10."], #elemT[style*="width: 11."], #elemT[style*="width: 12."], #elemT[style*="width: 13."], #elemT[style*="width: 14."],
#elemT[style="width: 0%;"], #elemT[style="width: 1%;"], #elemT[style="width: 2%;"], #elemT[style="width: 3%;"], #elemT[style="width: 4%;"], #elemT[style="width: 5%;"], #elemT[style="width: 6%;"], #elemT[style="width: 7%;"], #elemT[style="width: 8%;"], #elemT[style="width: 9%;"], #elemT[style="width: 10%;"], #elemT[style="width: 11%;"], #elemT[style="width: 12%;"], #elemT[style="width: 13%;"], #elemT[style="width: 14%;"] { animation: esBlink .32s steps(2, jump-none) infinite; }
@keyframes esSymIn { 0% { transform: translateY(14px) scale(.55); opacity: 0; filter: brightness(2.4); } 60% { transform: translateY(-3px) scale(1.08); opacity: 1; } 100% { transform: none; filter: none; } }
@keyframes esSymGlow { 50% { box-shadow: 0 0 22px color-mix(in srgb, var(--c) 75%, transparent), inset 0 0 18px color-mix(in srgb, var(--c) 40%, transparent); } }
@keyframes esSweep { 0% { opacity: 1; background-position: 120% 0; } 100% { opacity: 0; background-position: -60% 0; } }
@keyframes esLineIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
@keyframes esHot { 50% { filter: brightness(1.18); } }
@keyframes esBlink { 0% { opacity: 1; } 100% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { #elemCard *, #elemCard *::before, #elemCard *::after { animation: none !important; } }

/* ===== 키 칸 6개가 빠진 뒤 HUD 두 칸 배치 (2026-11-18 Yui, 충쌤 "키 설명이나 조합 커맨드는 게임안에 따로 설명 넣지마") =====
   #keys 안에 .key가 없거나 #keys가 없으면: 주인공 칸은 왼쪽(20px), 원소 카드는 오른쪽 끝(20px)에 붙인다.
   높이 128px, 위아래 끝선 18 → 146, 카드 폭 612px은 그대로(24조합 넘침 0 그대로). 가운데 328px은 게임 화면으로 비운다. */
#hudWrap:not(:has(#keys .key)) #keys { display: none; }
#hudWrap:not(:has(#keys .key)) #elemCard { left: auto; right: 20px; }

/* ===== 주인공 고르기 화면 uiuxup (2026-11-18 Yui, 충쌤 "선택하기 전에 활성화 되었을 때 더 화려하게", "상단에 uiux up", 안내 문구 "삭제") =====
   머리줄: 왼쪽 제목(28px)+영문명(14px, 같은 글자 바닥선), 오른쪽 스테이지 칸(고른 스테이지가 들어갈 자리, Gilbert stageUI). 높이 64px 안에서 상하 가운데.
   이펙트(#selFx)는 캐릭터 둘레·칸 가장자리에만, 캐릭터를 번쩍이게·반투명하게·크게 만들지 않는다. 알약·장식 원 배지 없음.
   ※ 이 구역과 아래 'HUD·멈춤 창' 구역은 src/brawl/selfx.js·hudfx.js·index.html 마크업과 한 묶음이라 빠지면 HUD가 깨진다(11-18 한 번 빠졌다 되살림). */
#select .top { height: 64px; gap: 20px; padding: 0 28px; background: linear-gradient(180deg, rgba(7,9,15,0.96), rgba(7,9,15,0.84)); border-bottom: 1px solid #2a3140; z-index: 2; }
#select h1 { font-size: 28px; line-height: 1; gap: 12px; }
#select h1 small { font-size: 14px; line-height: 1; color: #9aa4b8; letter-spacing: 1px; text-transform: uppercase; }
#select .top #stageSel { margin: 0 0 0 auto; display: flex; align-items: center; gap: 6px; }
#stageSel .stg { height: 36px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #3a4256; border-radius: 6px; background: rgba(255,255,255,0.04); color: #c8d0e0; font: 800 14px/1 system-ui, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; letter-spacing: -0.2px; cursor: pointer; pointer-events: auto; }
#stageSel .stg.on { border-color: #ffd36e; color: #10131c; background: #ffd36e; }
#stageSel .stg:disabled { color: #6a7388; border-color: #2a3140; background: transparent; cursor: default; }
#stageSel .stg:not(:disabled):not(.on):hover { border-color: #ffd36e; color: #ffe9a8; }
#selFx { position: absolute; inset: 0; width: 1280px; height: 720px; pointer-events: none; z-index: 0; }
#selCols { z-index: 1; }
#selCols .col { position: relative; opacity: 0.6; border-top: 3px solid #2a3140; transition: opacity .18s, background-color .18s; }
#selCols .col.on { opacity: 1; border-top-color: var(--c); background: linear-gradient(180deg, color-mix(in srgb, var(--c) 22%, rgba(7,9,15,0.92)) 0%, rgba(7,9,15,0.92) 70%); box-shadow: inset 0 1px 0 color-mix(in srgb, var(--c) 60%, transparent); }
#selCols .col.on .nm b { color: #fff; text-shadow: 0 0 14px color-mix(in srgb, var(--c) 70%, transparent); }
#selCols .col.on .attr { box-shadow: 0 0 12px color-mix(in srgb, var(--c) 60%, transparent); }
#selGo { position: absolute; left: 0; right: 0; top: 150px; z-index: 30; display: flex; flex-direction: column; align-items: center; gap: 10px; pointer-events: none; }
#selGo b { font-size: 120px; line-height: 1; font-weight: 900; letter-spacing: -4px; color: #fff; -webkit-text-stroke: 3px var(--c); text-shadow: 0 6px 0 rgba(0,0,0,0.55), 0 0 40px var(--c); }
#selGo span { height: 36px; padding: 0 16px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; background: rgba(7,9,15,0.85); border: 1px solid #3a4256; font-size: 18px; font-weight: 800; color: #e8ecf4; }
#selGo.run b { animation: esGoName 1.3s cubic-bezier(.2,.9,.25,1) both; }
#selGo.run span { animation: esGoTag 1.3s ease-out both; }
@keyframes esGoName { 0% { opacity: 0; transform: translateX(-120px); letter-spacing: 24px; } 22% { opacity: 1; transform: none; letter-spacing: -4px; } 78% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateX(60px); } }
@keyframes esGoTag { 0%, 15% { opacity: 0; transform: translateY(10px); } 30%, 78% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { #selGo.run b, #selGo.run span { animation-duration: 1.3s; animation-name: esGoTag; } }

/* ===== 게임 HUD·멈춤 창 uiuxup (2026-11-18 Yui, 충쌤 "여기 uiuxup 카드처럼", "개밤티야") =====
   웹 카드 모양을 버리고 격투 게임 HUD로(레퍼런스: 스트리트 오브 레이지 4·철권·킹오파 체력바와 초상).
   진한 바탕(흐림 유리 없음), 굵은 글자에 검은 외곽선, 비스듬한 막대. 캐릭터에는 아무 효과도 걸지 않는다. 알약·장식 원 배지 없음. */
:root { --hud-ink: #0a0d14; }
#hud { left: 20px; top: 16px; width: auto; height: auto; padding: 0; display: flex; flex-direction: row; justify-content: flex-start; align-items: flex-start; gap: 0; background: none; border: 0; border-radius: 0; backdrop-filter: none; box-shadow: none; }
#hud.awake { box-shadow: none; }
#hud .pf { position: relative; z-index: 2; flex: none; width: 92px; height: 92px; padding: 4px; background: var(--hud-ink); clip-path: polygon(0 0, 100% 0, 100% 78%, 82% 100%, 0 100%); }
#hud .pf::before { content: ""; position: absolute; inset: 0; background: var(--c); clip-path: polygon(0 0, 100% 0, 100% 78%, 82% 100%, 0 100%, 0 0, 4px 4px, 4px calc(100% - 4px), calc(82% - 2px) calc(100% - 4px), calc(100% - 4px) calc(78% - 2px), calc(100% - 4px) 4px, 4px 4px); }
#hud .pf img { display: block; width: 84px; height: 84px; object-fit: cover; clip-path: polygon(0 0, 100% 0, 100% 78%, 82% 100%, 0 100%); }
#hud .hb { position: relative; margin: 8px 0 0 -6px; padding: 8px 22px 10px 18px; display: flex; flex-direction: column; gap: 6px; background: linear-gradient(90deg, rgba(10,13,20,0.92), rgba(10,13,20,0.82)); clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 100%, 0 100%); }
#hud .row { height: 26px; margin: 0; display: flex; align-items: center; gap: 8px; }
#hud .row b { font-size: 24px; line-height: 1; letter-spacing: -0.5px; color: #fff; font-weight: 900; -webkit-text-stroke: 3px var(--hud-ink); paint-order: stroke fill; }
#hud .badge { height: 22px; padding: 0 8px; border-radius: 3px; background: var(--c); color: #10131c; font-size: 13px; line-height: 1; transform: skewX(-12deg); }
#hud .num { margin-left: auto; padding-left: 10px; font-size: 13px; line-height: 1; font-weight: 800; color: #c8d0e0; font-variant-numeric: tabular-nums; }
#hud .bar { position: relative; overflow: hidden; border-radius: 0; background: #1c2130; border: 2px solid var(--hud-ink); transform: skewX(-18deg); margin-left: 4px; }
#hud .bar.hp { width: 300px; height: 22px; margin-bottom: 0; }
#hud .bar.hp i { position: absolute; left: 0; top: 0; bottom: 0; transition: none; }
#hud .bar.hp i#hpFill { background: linear-gradient(180deg, #ffe98a 0%, #ffd23a 45%, #f0a818 100%); box-shadow: inset 0 -3px 0 rgba(0,0,0,0.18); }
#hud .bar.hp i.lag { background: #e3303f; }
#hud.low .bar.hp i#hpFill { background: linear-gradient(180deg, #ff9a7a 0%, #ff5a4a 50%, #d8303a 100%); }
#hud .bar.g { width: 230px; height: 15px; }
#hud .bar.g i { background: linear-gradient(90deg, color-mix(in srgb, var(--c) 70%, #000), var(--c)); }
#hud .bar.g span { left: 0; right: 0; transform: skewX(18deg); font-size: 11px; font-weight: 900; color: #fff; -webkit-text-stroke: 2px var(--hud-ink); paint-order: stroke fill; text-shadow: none; }
#hud.ready .bar.g { border-color: #fff3b0; box-shadow: 0 0 10px var(--c); animation: esReady 0.8s ease-in-out infinite alternate; }
#hud.ready .bar.g span { font-size: 13px; letter-spacing: 1px; color: #fff; }
#hud.awake .bar.g { border-color: var(--c); box-shadow: 0 0 12px var(--c); }
@keyframes esReady { from { box-shadow: 0 0 4px var(--c); } to { box-shadow: 0 0 14px var(--c); } }
#elemCard, #hudWrap:not(:has(#keys .key)) #elemCard { left: auto; right: 20px; top: 16px; width: 560px; height: auto; min-height: 0; padding: 10px 14px 18px 10px; display: flex; align-items: center; gap: 14px; overflow: hidden;
  background: linear-gradient(90deg, rgba(10,13,20,0.80), rgba(10,13,20,0.94) 30%); border: 0; border-right: 4px solid var(--c); border-radius: 0; backdrop-filter: none; box-shadow: none; clip-path: polygon(14px 0, 100% 0, 100% 100%, 0 100%); }
#elemCard.empty, #hudWrap:not(:has(#keys .key)) #elemCard.empty { width: auto; padding: 8px 18px 8px 22px; border-right-color: #3a4256; }
#elemCard .tile { position: relative; flex: none; width: 86px; height: 86px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 3px solid var(--c); border-radius: 4px; background: linear-gradient(160deg, color-mix(in srgb, var(--c) 34%, #0b0f18), #0b0f18 75%); box-shadow: 0 0 16px color-mix(in srgb, var(--c) 55%, transparent); animation: esSymIn .5s cubic-bezier(.2,1.4,.4,1) both; }
#elemCard .tile small { position: absolute; left: 6px; top: 4px; font-size: 13px; line-height: 1; font-weight: 800; color: #e8ecf4; }
#elemCard .tile b { font-size: 38px; line-height: 1; font-weight: 900; color: var(--c); -webkit-text-stroke: 2px var(--hud-ink); paint-order: stroke fill; }
#elemCard .tile em { margin-top: 5px; font-style: normal; font-size: 13px; line-height: 1; font-weight: 800; color: #f4f6fb; }
#elemCard .tile.none { width: 40px; height: 40px; border-width: 2px; border-color: #4a5266; background: #121722; box-shadow: none; font-size: 20px; font-weight: 900; color: #6a7388; animation: none; }
#elemCard .info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
#elemCard .info p { margin: 0; }
#elemCard .nm { display: flex; align-items: center; gap: 8px; min-height: 24px; }
#elemCard .nm b { font-size: 20px; line-height: 1.1; font-weight: 900; color: #fff; -webkit-text-stroke: 3px var(--hud-ink); paint-order: stroke fill; }
#elemCard .nm .tag { height: 20px; padding: 0 7px; border-radius: 3px; font-size: 12px; line-height: 1; transform: skewX(-12deg); color: #10131c; clip-path: none; background-image: none; }
#elemCard .ef { font-size: 14px; line-height: 1.4; font-weight: 800; color: #e8ecf4; word-break: keep-all; }
#elemCard .why { font-size: 12.5px; line-height: 1.4; color: #b8c0d0; word-break: keep-all; overflow: hidden; max-height: 54px; animation: esWhy 4.8s ease-in forwards; }
@keyframes esWhy { 0%, 88% { max-height: 54px; opacity: 1; } 100% { max-height: 0; opacity: 0; } }
#elemCard.empty .nm b { font-size: 16px; color: #c8d0e0; }
#elemCard.empty .ef { font-size: 12.5px; font-weight: 700; color: #9aa4b8; }
#elemCard .bar { position: absolute; left: 24px; right: 14px; bottom: 7px; height: 6px; border-radius: 0; background: #1c2130; transform: skewX(-18deg); }
#elemCard:not(.empty) .info::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(90% 160% at 10% 50%, rgba(255,255,255,0.55), color-mix(in srgb, var(--c) 55%, transparent) 40%, transparent 85%); opacity: 0; animation: esFlash .45s ease-out both; }
@media (prefers-reduced-motion: reduce) { #elemCard .why { animation: none; } }
.panel { background: linear-gradient(180deg, #121826, #0a0d14); border: 2px solid #2e3648; border-radius: 4px; backdrop-filter: none; box-shadow: 0 0 0 4px rgba(0,0,0,0.45), 0 18px 40px rgba(0,0,0,0.5); }
.panel h2 { font-size: 40px; font-weight: 900; letter-spacing: -0.5px; -webkit-text-stroke: 3px var(--hud-ink); paint-order: stroke fill; }
#pause.menu { min-width: 380px; padding: 26px 34px 22px; }
#pause .vlist { flex-direction: column; align-items: stretch; gap: 8px; margin-top: 8px; }
#pause .vlist button { position: relative; height: 50px; padding: 0 22px 0 44px; display: flex; align-items: center; justify-content: flex-start; border-radius: 3px; border: 2px solid #2e3648; background: #161c2a; color: #dfe6f2; font-size: 18px; font-weight: 900; line-height: 1; text-align: left; transform: skewX(-8deg); transition: background-color .12s, border-color .12s, color .12s; }
#pause .vlist button::before { content: ""; position: absolute; left: 18px; top: 50%; width: 0; height: 0; margin-top: -7px; border-left: 11px solid #ffd36e; border-top: 7px solid transparent; border-bottom: 7px solid transparent; opacity: 0; }
#pause .vlist button.sel { background: #ffd36e; border-color: #ffd36e; color: #10131c; }
#pause .vlist button.sel::before { opacity: 1; border-left-color: #10131c; }
#pause .vlist button.main:not(.sel) { background: #161c2a; color: #dfe6f2; border-color: #2e3648; }
#pause .vlist button:focus { outline: none; }
#pause .vlist button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
#pause .keyline { margin: 16px 0 0; font-size: 15px; font-weight: 800; color: #c8d0e0; text-align: center; }

/* 11-19 충쌤 "키는 알파벳만 보이지 말고 키보드 처럼 박스안에": 키캡. 글자 하나는 정사각, 모서리 5px, 아래 테두리 두껍게, 글자 상하좌우 가운데 */
.kcs { display: inline-flex; align-items: center; gap: 4px; margin: 0 4px; vertical-align: middle; }
.kcs em { font-style: normal; font-weight: 900; color: #c8d0e0; font-size: 13px; line-height: 1; }
.kc { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; padding: 0 5px; border-radius: 5px; border: 1px solid #8a94a8; border-bottom: 4px solid #5a6378; background: linear-gradient(180deg, #3a4254, #262c3a); color: #ffffff; font: 900 14px/1 system-ui, "Apple SD Gothic Neo", sans-serif; text-shadow: none; -webkit-text-stroke: 0; vertical-align: middle; }
.kc.w { min-width: 0; padding: 0 8px; font-size: 12px; }
button .kc { margin-left: 8px; height: 24px; }
button.main .kc { border-color: #6a5420; border-bottom-color: #4a3a14; background: linear-gradient(180deg, #fff3c8, #f0d58a); color: #14100a; }
#banner .kcs { margin-left: 10px; } #banner .kc { height: 28px; min-width: 28px; font-size: 15px; }
#hud #gKeys { position: absolute; right: 26px; bottom: 7px; margin: 0; gap: 3px; }
#hud #gKeys .kc { min-width: 20px; height: 20px; font-size: 12px; border-bottom-width: 3px; padding: 0 3px; }
#hud #gKeys em { font-size: 11px; }
#gKeys.hidden { display: none; }
/* 11-19 필살기 이름은 크게 */
#banner.big { font-size: 34px; padding: 14px 30px; letter-spacing: -0.5px; }
#banner.big .kc { height: 30px; min-width: 30px; font-size: 16px; }

/* 11-19 충쌤: 조작 안내는 문장 없이 키캡 두 묶음('이동' · '공격'), 하단바 여백 넉넉히 */
.kgrp { display: inline-flex; align-items: center; gap: 10px; }
.kgrp > em { font-style: normal; font-size: 14px; font-weight: 800; color: #a8b0c0; line-height: 1; }
#selKeys .kc { min-width: 30px; height: 30px; font-size: 15px; }
#pause .keyline { display: flex; justify-content: center; gap: 28px; }

/* 11-19 충쌤 "하단바 답답해": 키캡은 바 높이(64)의 약 55%(34), 키캡 사이 7px, 두 묶음 사이 세로 구분선과 큰 여백, 라벨·키캡·나가기 버튼 모두 세로 가운데, 버튼 높이 = 키캡 줄 높이 */
#selKeys .kcs, #pause .keyline .kcs { gap: 7px; margin: 0; }
#selKeys .kc { min-width: 34px; height: 34px; font-size: 15px; border-bottom-width: 4px; }
#selKeys .kgrp { gap: 12px; }
#selKeys .kgrp + .kgrp { margin-left: 36px; padding-left: 36px; border-left: 1px solid #2f3746; height: 34px; }
#selKeys .kgrp > em { font-size: 14px; color: #8a94a8; }
#pause .keyline { gap: 0; }
#pause .keyline .kgrp + .kgrp { margin-left: 22px; padding-left: 22px; border-left: 1px solid #2f3746; height: 28px; }
#pause .keyline .kgrp > em { font-size: 13px; color: #8a94a8; }
#pause .keyline .kc { min-width: 28px; height: 28px; font-size: 13px; }

/* 11-19 충쌤 "여기 카드 잘려 좌측 상단": 원소 칸 판을 사선으로 자르던 clip-path 와 기울어 삐져나온 시간 막대를 바로 세움. 네 모서리 모두 온전히(모서리 6px).
   먹는 순간 카드가 하얗게 번쩍이던 빛(esFlash)도 뺌(번쩍임 금지) */
#elemCard, #hudWrap:not(:has(#keys .key)) #elemCard { clip-path: none !important; border-radius: 6px; overflow: hidden; }
#elemCard .bar { transform: none !important; left: 14px; right: 18px; bottom: 7px; border-radius: 3px; }
#elemCard .bar i { border-radius: 3px; }
#elemCard:not(.empty) .info::after, #elemCard:not(.empty) .tx::before { display: none !important; animation: none !important; }

/* 끝 화면 uiuxup(11-19 충쌤 "이 화면도 uiuxup"): 제목·등급 한 줄, 점수가 주인공, 기록은 6칸 타일, 버튼은 한 줄(주 버튼 왼쪽·나가기 오른쪽) */
#clear.result { width: 760px; min-width: 0; padding: 26px 30px 24px; text-align: left; }
#clear .rhead { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 16px; border-bottom: 2px solid #232a3a; }
#clear .rtitle { display: flex; flex-direction: column; justify-content: center; } #clear .rtitle .eyebrow { margin: 0 0 6px; } #clear .rtitle h2 { margin: 0; font-size: 36px; line-height: 1.1; }
#clear .rbadge { flex: none; width: 92px; height: 92px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; background: #ffd36e; color: #10131c; border-radius: 4px; clip-path: polygon(0 0, 100% 0, 100% 80%, 80% 100%, 0 100%); }
#clear .rbadge b { font-size: 56px; font-weight: 900; line-height: 1; } #clear .rbadge span { font-size: 12px; font-weight: 900; line-height: 1; letter-spacing: 1px; }
#clear .rscore { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 18px 0 16px; }
#clear .rmain { display: flex; flex-direction: column; gap: 4px; } #clear .rmain span { font-size: 13px; font-weight: 800; color: #9aa4b8; }
#clear .rmain b { font-size: 52px; font-weight: 900; line-height: 1; color: #ffe26b; font-variant-numeric: tabular-nums; -webkit-text-stroke: 3px var(--hud-ink); paint-order: stroke fill; }
#clear .rside { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; font-size: 14px; color: #a8b0c0; } #clear .rside b { color: #fff; font-variant-numeric: tabular-nums; margin-left: 8px; }
#clear .rside .new { display: inline-flex; align-items: center; justify-content: center; height: 22px; padding: 0 8px; background: #ff6a5a; color: #fff; font-size: 12px; font-weight: 900; border-radius: 3px; }
#clear .rgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; font-size: 14px; }
#clear .rgrid div { display: flex; flex-direction: column; justify-content: center; gap: 6px; height: 68px; padding: 0 14px; background: #161c2a; border: 1px solid #262e40; border-radius: 4px; }
#clear .rgrid span { font-size: 12.5px; font-weight: 800; color: #8a94a8; } #clear .rgrid b { font-size: 22px; font-weight: 900; color: #fff; line-height: 1; font-variant-numeric: tabular-nums; }
#clear .rbtns { display: flex; flex-wrap: nowrap; justify-content: flex-start; gap: 8px; margin-top: 20px; } #clear .rbtns button { height: 46px; padding: 0 16px; white-space: nowrap; } #clear .rbtns .exitBtn { margin-left: auto; }
#clear .rmain b.none { font-size: 28px; color: #a8b0c0; -webkit-text-stroke: 0; }
