/* hero-training.css — 캐릭터 창(일러스트·스킬 탭 시연 무대)과 훈련장(직접 해보기). */
.menu.scr-hero .hd { grid-template-columns: minmax(240px, .85fr) minmax(0, 1.5fr); grid-template-rows: minmax(0,1fr); gap: 20px; padding: 12px 20px; }
.hd-profile { display: flex; flex-direction: column; align-items: center; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.menu.scr-hero .hd-profile .hd-art { flex: 1 0 200px; width: 100%; height: min(48vh,440px); max-height: 440px; object-fit: contain; }
.menu.scr-hero .hd-profile .hd-art.recruit { flex: none; height: 220px; width: 150px; }
.hd-story { flex: none; width: 100%; max-width: 400px; padding: 12px 14px; background: #142638; border: 1px solid #718390; }
.hd-story h3 { color: #ebd09b; font-size: 13px; margin: 0 0 6px; }
.hd-story p { font-size: 13px; line-height: 1.8; margin: 0; word-break: keep-all; overflow-wrap: anywhere; }
.menu.scr-hero .sk[data-slot] { cursor: default; }

/* ---------- 스킬 탭: 일러스트 자리 = 도트 시연 무대 ---------- */
.menu.scr-hero .hd.demo-on .hd-profile .hd-art { display: none; }
html:not(.vp-touch) .menu.scr-hero .hd.tabbed.demo-on { grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr); }
.menu.scr-hero .hd.demo-on .hd-profile { justify-content: flex-start; }
.hd-demo { width: 100%; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.hd-demo > :not(.hd-demo-stage) { align-self: stretch; }
.hd-demo[hidden] { display: none !important; }
.hd-demo-stage { position: relative; flex: 0 1 auto; width: calc(100% - 12px); aspect-ratio: 4 / 3; max-height: calc(100% - 120px); min-height: 130px; overflow: hidden; display: grid; place-items: center; margin: 6px 6px 0; background: #0b1220;
  box-shadow: 0 0 0 2px #05070d, 0 0 0 4px #c9a45c, 0 0 0 6px #05070d, 4px 6px 0 6px #05080f99; }
.hd-demo-stage canvas { display: block; image-rendering: pixelated; }
.hd-demo-cap { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; padding: 4px 6px 0; min-height: 40px; }
.hd-demo-cap small { flex: 1 1 100%; font-size: 11px; color: #9fb2c3; }
.hd-demo-cap b { font-size: 16px; color: #fff1c8; }
.hd-demo-cap em { margin-left: auto; font-style: normal; font-size: 12px; font-weight: 900; color: #ffe39a; font-variant-numeric: tabular-nums; }
.menu.scr-hero .hd-demo .hd-training { flex: none; width: 100%; min-width: 0; min-height: 48px; margin: 0; font-size: 16px; }
.hd-training small { display: block; font-size: 10px; font-weight: 700; opacity: .8; }
/* 스킬 카드 = 시연 고르기(레벨업 버튼은 그대로) */
.menu.scr-hero .sk.demo-pick { cursor: pointer; }
.menu.scr-hero .sk.demo-pick.sel { box-shadow: 0 0 0 2px #ffe39a, 3px 3px 0 2px #05070d; }
.menu.scr-hero .sk.demo-pick.sel .sk-title b::after { content: '▶ 시연 중'; display: block; font-size: 10px; color: #ffe39a; letter-spacing: 1px; }
.menu.scr-hero .sk.demo-pick:not(.sel):hover { filter: brightness(1.12); }

/* ---------- 훈련장(직접 해보기): 전투 화면처럼 전장이 화면을 채운다 ---------- */
/* 다른 대화상자 규칙(모바일 510px 폭·키트 창틀·PC zoom)보다 앞선다: 훈련장은 화면 전체 */
html dialog.hero-training.ht2 { box-sizing: border-box; position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; border-image: none; overflow: hidden; color: #f3ede0; background: #05070d; box-shadow: none; zoom: 1 !important; }
.hero-training.ht2::backdrop { background: #05070d; }
.hero-training.ht2 * { box-sizing: border-box; }
.ht-stage { position: absolute; inset: 0; }
.ht-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.ht-tags { position: absolute; inset: 0; pointer-events: none; }
.ht-tag { position: absolute; transform: translate(-50%, -100%); display: flex; flex-direction: column; align-items: center; gap: 1px; white-space: nowrap; font-size: calc(10px * var(--ui-z, 1)); font-weight: 900; line-height: 1.2; text-shadow: 1px 1px 0 #05070d, -1px 0 0 #05070d, 0 -1px 0 #05070d; }
.ht-tag i { display: block; width: calc(52px * var(--ui-z, 1)); height: calc(5px * var(--ui-z, 1)); background: #2a1016; box-shadow: 0 0 0 1px #05070d; }
.ht-tag u { display: block; height: 100%; background: #e0485a; box-shadow: inset 0 1px 0 #ff8c8c; }
.ht-tag.ally u { background: #5fc47c; box-shadow: inset 0 1px 0 #b0f0b8; }
.ht-tag small { font-size: calc(9px * var(--ui-z, 1)); color: #fff1c8; font-variant-numeric: tabular-nums; }
.ht-tag.down { opacity: .55; }
/* 머리줄: 영웅 · 설정 칩 · 닫기 */
.ht2 .ht-top { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 10px; padding: 8px 12px 18px; background: linear-gradient(#05070de0, #05070d00); zoom: var(--ui-z, 1); }
.ht-who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ht-who img { width: 40px; height: 40px; image-rendering: pixelated; background: #132432; box-shadow: 0 0 0 2px var(--c, #c9a45c), 2px 2px 0 2px #05070d; }
.ht-who h2 { margin: 0; font-size: 17px; color: #fff1c8; line-height: 1.1; }
.ht-who h2 small { font-size: 11px; color: #9fb2c3; margin-left: 4px; }
.ht-who > div > small { font-size: 11px; color: #b9c8d6; }
.ht-opts { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; justify-content: flex-end; }
.hero-training.ht2 .ht-chip { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 3px 10px; border: 0; border-radius: 0; background: #0d1422e8; color: #eef2f8; font: inherit; font-size: 12px; font-weight: 900; box-shadow: 0 0 0 2px #415767, 2px 2px 0 2px #05070d; cursor: pointer; }
.hero-training.ht2 .ht-chip[aria-pressed="true"] { background: #4a3810; color: #fff1c8; box-shadow: 0 0 0 2px #c9a45c, 2px 2px 0 2px #05070d; }
.hero-training.ht2 .ht-chip select { min-height: 24px; padding: 0 2px; border: 0; background: #132432; color: #ffe39a; font: inherit; cursor: pointer; }
.hero-training.ht2 .ht-close { width: 40px; height: 40px; min-height: 0; padding: 0; border: 0; background: #3a1820; color: #ffd6d6; font-size: 18px; font-weight: 900; box-shadow: 0 0 0 2px #8a3a44, 2px 2px 0 2px #05070d; cursor: pointer; }
.hero-training.ht2 button:focus-visible, .hero-training.ht2 select:focus-visible { outline: 2px dashed #ffe4a2; outline-offset: 3px; }
/* 피해 측정기(왼쪽 아래) */
.ht2 .ht-meter { position: absolute; left: 12px; bottom: 12px; display: grid; grid-template-columns: repeat(2, auto); gap: 3px 16px; padding: 8px 12px; font-size: 11px; color: #c5d8de; background: #0d1422e8; box-shadow: 0 0 0 2px #c9a45c, 3px 3px 0 2px #05070d; zoom: var(--ui-z, 1); }
.ht-meter span { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.ht-meter span[hidden] { display: none; }
.ht-meter b { color: #ffe39a; font-size: 15px; font-variant-numeric: tabular-nums; }
/* 스킬 설명(가운데 아래)과 알림 */
.ht2 .ht-info { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); width: min(400px, 38%); display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 12px 7px; text-align: center; background: #0d1422d8; box-shadow: 0 0 0 2px #415767, 2px 2px 0 2px #05070d; zoom: var(--ui-z, 1); }
.ht-info small { font-size: 10px; color: #9fb2c3; }
.ht-info b { font-size: 14px; color: #fff1c8; }
.ht-info span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: 11px; line-height: 1.45; color: #d2e0e4; word-break: keep-all; overflow-wrap: anywhere; }
.ht2 .ht-status { position: absolute; left: 50%; top: var(--ht-top-h, 58px); transform: translateX(-50%); margin: 0; width: max-content; max-width: calc(100% - 24px); text-align: center; font-size: 15px; font-weight: 900; color: #fff1c8; letter-spacing: 1px; text-shadow: 2px 2px 0 #05070d, -1px 0 0 #05070d, 0 -1px 0 #05070d; pointer-events: none; zoom: var(--ui-z, 1); }
.ht-status.pop { animation: htPop .35s steps(3, end); }
@keyframes htPop { from { transform: translate(-50%, 6px) scale(1.25); opacity: 0; } }
.ht2 .ht-note { position: absolute; left: 12px; top: calc(var(--ht-top-h, 58px) + 26px); margin: 0; max-width: 34%; font-size: 10px; line-height: 1.5; color: #9fb2c3; text-shadow: 1px 1px 0 #05070d; pointer-events: none; zoom: var(--ui-z, 1); }
/* 스킬 버튼(오른쪽 아래): 전투 HUD 와 같은 둥근 링 · 키 표시 */
.ht2 .ht-skills { position: absolute; right: 34px; bottom: 24px; display: flex; align-items: flex-end; gap: 18px; zoom: var(--ui-z, 1); }
.hero-training.ht2 .ht-sb { position: relative; width: 62px; height: 62px; padding: 0; border: 0; border-radius: 50%; background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--c) 55%, #1a1630), #0e0c18 75%); color: #fff; cursor: pointer; overflow: visible; }
.hero-training.ht2 .ht-sb.ult { width: 84px; height: 84px; }
.ht-sb::before { content: ''; position: absolute; inset: -16.9% -17.6% -17.25% -17.6%; z-index: 3; pointer-events: none; background: url(../../assets/ui/ring_skill.png) center / 100% 100% no-repeat; image-rendering: pixelated; }
.ht-sb.ult::before { inset: -30.4% -25.6% -26.7% -25.6%; background-image: url(../../assets/ui/ring_ult.png); }
.ht-sb .ic { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; display: grid; place-items: center; }
.ht-sb .ic :is(svg, img, canvas) { width: 78%; height: 78%; image-rendering: pixelated; }
.ht-sb .lock { position: absolute; inset: 0; z-index: 2; border-radius: 50%; background: conic-gradient(#06040ec8 calc(var(--lock, 0) * 360deg), transparent 0); pointer-events: none; }
.ht-sb .cdn { position: absolute; right: -6px; bottom: -10px; z-index: 5; min-width: 22px; padding: 1px 4px; background: #3a1820; color: #ffd6d6; font-size: 11px; font-weight: 900; font-variant-numeric: tabular-nums; line-height: 16px; text-align: center; box-shadow: 0 0 0 1px #8a3a44; pointer-events: none; }
.ht-sb.ready .cdn { background: #4a5810; color: #fff1c8; box-shadow: 0 0 0 1px #8c9a38; }
/* 이름은 전투 HUD 처럼 원 안 아래쪽(화면 아래 가장자리 밖으로 새지 않게) */
.ht-sb .nm { position: absolute; left: 50%; bottom: 3px; z-index: 4; transform: translateX(-50%); max-width: 110%; overflow: hidden; text-overflow: clip; white-space: nowrap; font-size: 9px; font-weight: 900; color: #fff1c8; text-shadow: 1px 1px 0 #05070d, -1px 0 0 #05070d, 0 -1px 0 #05070d, 1px 0 0 #05070d; }
.ht-sb.ult .nm { bottom: 7px; font-size: 10px; }
.ht-sb kbd { position: absolute; right: -8px; top: -8px; z-index: 5; min-width: 18px; padding: 0 4px; font: 900 10px/16px inherit; color: #1a1204; background: #ffe39a; box-shadow: 0 0 0 1px #05070d; }
.hero-training.ht2 .ht-sb.sel { box-shadow: 0 0 0 3px #fff1c8, 0 0 14px #fff1c8aa; }
.hero-training.ht2 .ht-sb:disabled { cursor: wait; filter: none; }
.hero-training.ht2 .ht-sb:not(:disabled):hover { filter: brightness(1.15); translate: 0 -1px; }
/* 좁은 화면: 설명 칸을 스킬 위로 올려 측정기·버튼과 겹치지 않게 */
@media (max-width: 900px) {
  .ht2 .ht-info { bottom: 142px; width: min(360px, calc(100% - 24px)); }
  .ht2 .ht-note { display: none; }
  .ht2 .ht-top { flex-wrap: wrap; }
}
@media (max-width: 600px) {
  .ht2 .ht-top { display: grid; grid-template-columns: minmax(0, 1fr) 40px; gap: 8px; }
  .ht-who { grid-column: 1; grid-row: 1; }
  .hero-training.ht2 .ht-close { grid-column: 2; grid-row: 1; }
  .ht-opts { grid-column: 1 / -1; margin-left: 0; justify-content: flex-start; }
  .ht2 .ht-meter { grid-template-columns: 1fr; gap: 2px; padding: 6px 8px; font-size: 10px; }
  .ht-meter b { font-size: 13px; }
  .ht2 .ht-info { bottom: 150px; }
  .ht2 .ht-skills { right: 24px; gap: 12px; }
  .hero-training.ht2 .ht-sb { width: 46px; height: 46px; }
  .hero-training.ht2 .ht-sb.ult { width: 60px; height: 60px; }
  .ht-sb .nm { font-size: 8px; }
  .ht-sb.ult .nm { font-size: 9px; }
}
html.vp-touch .ht2 .ht-top, html.vp-touch .ht2 .ht-meter, html.vp-touch .ht2 .ht-info, html.vp-touch .ht2 .ht-skills, html.vp-touch .ht2 .ht-status, html.vp-touch .ht2 .ht-note { zoom: 1; }
html.vp-touch .hero-training.ht2 .ht-chip { min-height: calc(34px / var(--vs, 1)); font-size: var(--read-small, 12px); }
html.vp-touch .hero-training.ht2 .ht-sb { width: calc(60px / var(--vs, 1)); height: calc(60px / var(--vs, 1)); }
html.vp-touch .hero-training.ht2 .ht-sb.ult { width: calc(78px / var(--vs, 1)); height: calc(78px / var(--vs, 1)); }
html.vp-touch .ht-sb .nm { font-size: calc(8px / var(--vs, 1)); }
html.vp-touch .ht-tag { font-size: calc(8px / var(--vs, 1)); }
html.vp-touch .ht-tag small { font-size: calc(8px / var(--vs, 1)); }
html.vp-touch .ht2 .ht-note { display: none; }
html.vp-touch .ht-meter { font-size: var(--read-small, 11px); }
html.vp-touch .ht2 .ht-info { top: auto; bottom: calc(138px / var(--vs, 1)); width: min(360px, calc(100% - 24px)); }

@media (max-width:700px) {
  .menu.scr-hero .hd { grid-template-columns: minmax(0,1fr); grid-template-rows: max-content max-content; overflow-y: auto; padding: 10px; gap: 18px; }
  .menu.scr-hero .hd-profile { overflow: visible; }
  .menu.scr-hero .hd-profile .hd-art { flex: none; height: 310px; }
  .menu.scr-hero .hd-info { overflow: visible; grid-column: 1; padding: 4px; }
}
