/* CLASS FIGHTERS — black brushed-steel plates, red neon edge light, Korean-first heavy type.
   Chamfered plates (clip-path) carry the metal; colour comes from the fighters themselves. */
:root {
  --ink: #040405;
  --steel-0: #0c0d10; --steel-1: #17181c; --steel-2: #24262c; --steel-3: #3a3d45; --steel-4: #8b909a; --steel-5: #d8dbe0;
  --red: #ff2443; --red-2: #ff5468; --red-glow: rgba(255, 36, 67, 0.55);
  --gold: #ffcf5a; --text: #f1f2f4; --dim: #9ba1ab;
  --p1: #ff3348; --p2: #3d8bff;
  --cut: 14px;
  --font: "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans KR", "Nanum Gothic", sans-serif;
  --font-latin: "Arial Black", "Segoe UI Black", Impact, var(--font);
  --safe-l: env(safe-area-inset-left, 0px); --safe-r: env(safe-area-inset-right, 0px); --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--ink); color: var(--text); font-family: var(--font); overflow: hidden; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
#game { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
#ui { position: fixed; inset: 0; pointer-events: none; }
#ui > * { pointer-events: auto; }
.screen { position: absolute; inset: 0; display: flex; flex-direction: column; }
.screen.pass { pointer-events: none; }
.screen.pass .interactive { pointer-events: auto; }
button { font-family: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.hidden { display: none !important; }
.num { font-variant-numeric: tabular-nums; font-family: var(--font-latin); }

/* ---------- steel plate primitive ---------- */
.plate {
  position: relative;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.025) 0 1px, transparent 1px 3px),
    linear-gradient(180deg, var(--steel-2) 0%, var(--steel-1) 45%, var(--steel-0) 100%);
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), inset 0 -1px 0 rgba(0,0,0,0.6);
}
.plate::before { /* bevel line */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,0.18), transparent 22%, transparent 78%, rgba(255,36,67,0.25));
  clip-path: inherit; mix-blend-mode: screen; opacity: 0.6;
}
.neon-edge { box-shadow: 0 0 0 1px rgba(255,36,67,0.55), 0 0 18px var(--red-glow); }

/* ---------- boot ---------- */
#boot { align-items: center; justify-content: center; background: radial-gradient(ellipse at center, #1a0508 0%, #000 70%); gap: 18px; }
#boot .bar { width: min(420px, 70vw); height: 6px; background: #1b1c20; clip-path: polygon(4px 0,100% 0,calc(100% - 4px) 100%,0 100%); }
#boot .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #8b0f22, var(--red), #ffb0b8); box-shadow: 0 0 12px var(--red); transition: width .2s; }
#boot .msg { color: var(--dim); font-size: 14px; letter-spacing: 0.04em; }

/* ---------- logo ---------- */
.logo { text-align: center; line-height: 0.86; filter: drop-shadow(0 12px 24px rgba(0,0,0,0.8)); }
.logo .l1, .logo .l2 {
  display: block; font-family: var(--font-latin); font-weight: 900; font-style: italic; letter-spacing: -0.01em;
  background: linear-gradient(180deg, #ffffff 0%, #d6d9de 38%, #6e737c 50%, #e8eaee 62%, #9da2aa 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,0.35);
  /* extrusion via drop-shadow filters: text-shadow would paint over a background-clip:text gradient */
  filter: drop-shadow(0 1px 0 #4a4e55) drop-shadow(0 2px 0 #2c2f34) drop-shadow(0 2px 0 #1d1f23) drop-shadow(0 6px 4px rgba(0,0,0,0.7));
  transform: skewX(-8deg);
}
.logo .l1 { font-size: clamp(54px, 9vw, 132px); }
.logo .l2 { font-size: clamp(64px, 11vw, 160px); color: transparent;
  background: linear-gradient(180deg, #ffd0d6 0%, #ff4458 40%, #8a0016 52%, #ff2443 64%, #ff8a98 100%); -webkit-background-clip: text; background-clip: text;
  filter: drop-shadow(0 2px 0 #5a0010) drop-shadow(0 3px 0 #2a0008) drop-shadow(0 0 18px rgba(255,36,67,0.55)); }
.logo .sub { display: inline-block; margin-top: 18px; padding: 8px 26px 9px; font-size: clamp(18px, 2.2vw, 30px); font-weight: 900; letter-spacing: 0.32em; color: #fff;
  background: linear-gradient(90deg, transparent, rgba(255,36,67,0.85) 20%, rgba(255,36,67,0.85) 80%, transparent); text-shadow: 0 2px 0 #5a0010; }
.logo.anim .l1 { animation: logoIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) both; }
.logo.anim .l2 { animation: logoIn 0.9s 0.12s cubic-bezier(0.16, 1, 0.3, 1) both; }
.logo.anim .sub { animation: subIn 0.8s 0.5s cubic-bezier(0.16, 1, 0.3, 1) both; }
.logo .shine { position: absolute; inset: 0; background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.75) 50%, transparent 60%); mix-blend-mode: overlay; animation: shine 4.5s 1.2s infinite; pointer-events: none; }
@keyframes logoIn { from { opacity: 0; transform: skewX(-8deg) scale(1.6) translateY(-20px); filter: blur(10px); } to { opacity: 1; transform: skewX(-8deg) scale(1); filter: blur(0); } }
@keyframes subIn { from { opacity: 0; letter-spacing: 1em; } to { opacity: 1; letter-spacing: 0.32em; } }
@keyframes shine { 0% { transform: translateX(-100%); } 25%, 100% { transform: translateX(100%); } }

/* ---------- title ---------- */
#title { align-items: center; justify-content: center; background: radial-gradient(ellipse at 50% 120%, rgba(255,36,67,0.25), transparent 60%), linear-gradient(180deg, rgba(0,0,0,0.55), transparent 30%, transparent 65%, rgba(0,0,0,0.85)); }
#title .logo { position: relative; }
#title .press { margin-top: 9vh; font-size: clamp(16px, 2vw, 24px); font-weight: 900; letter-spacing: 0.18em; color: #fff; text-shadow: 0 0 14px var(--red); animation: blink 1.4s steps(2, jump-none) infinite; }
#title .press small { display: block; margin-top: 6px; font-size: 0.6em; color: var(--dim); letter-spacing: 0.08em; text-shadow: none; animation: none; }
#title .foot { position: absolute; bottom: calc(18px + var(--safe-b)); left: 0; right: 0; text-align: center; color: #6c717a; font-size: 12px; }
@keyframes blink { 50% { opacity: 0.25; } }

/* ---------- main menu ---------- */
#menu { flex-direction: row; align-items: center; background: linear-gradient(90deg, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.75) 38%, transparent 70%); }
#menu .left { width: min(520px, 92vw); padding-left: calc(6vw + var(--safe-l)); display: flex; flex-direction: column; gap: 2px; max-height: 100vh; padding-top: 2vh; padding-bottom: 6vh; }
#menu .logo { text-align: left; margin: 0 0 1vh; transform-origin: left top; transform: scale(0.34); height: clamp(64px, 12vh, 110px); }
.menu-item { position: relative; display: grid; grid-template-columns: 42px 1fr; align-items: center; gap: 14px; padding: 6px 22px; min-height: clamp(40px, 6.2vh, 56px); cursor: pointer; border: 0; background: transparent; text-align: left;
  transform: skewX(-10deg); transition: transform .18s cubic-bezier(0.16,1,0.3,1), background .18s; }
.menu-item > * { transform: skewX(10deg); }
.menu-item .mi-ico { width: 34px; height: 34px; color: var(--steel-4); }
.menu-item .mi-t { font-size: clamp(18px, min(2.2vw, 3.6vh), 28px); font-weight: 900; color: #d8dbe0; }
.menu-item .mi-d { grid-column: 2; font-size: 13px; color: var(--dim); margin-top: -4px; display: none; }
.menu-item.active, .menu-item:hover { background: linear-gradient(90deg, rgba(255,36,67,0.9), rgba(255,36,67,0.15) 70%, transparent); transform: skewX(-10deg) translateX(12px); }
.menu-item.active .mi-t { color: #fff; text-shadow: 0 2px 0 #5a0010; }
.menu-item.active .mi-ico { color: #fff; }
.menu-item.active .mi-d { display: block; color: #ffd8dc; }
.menu-item.active::after { content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 4px; background: #fff; box-shadow: 0 0 10px #fff; }
#menu .info { position: absolute; right: calc(4vw + var(--safe-r)); bottom: calc(5vh + var(--safe-b)); width: min(360px, 40vw); padding: 18px 22px; }
#menu .info h4 { margin: 0 0 6px; font-size: 15px; color: var(--gold); }
#menu .info p { margin: 0; color: #c8ccd2; font-size: 14px; line-height: 1.55; }
.hint-bar { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px calc(24px + var(--safe-r)) calc(10px + var(--safe-b)) calc(24px + var(--safe-l)); display: flex; gap: 22px; justify-content: flex-end; color: var(--dim); font-size: 13px; background: linear-gradient(0deg, rgba(0,0,0,0.85), transparent); pointer-events: none; }
.key { display: inline-block; min-width: 22px; padding: 1px 6px; margin-right: 5px; border: 1px solid #555a63; border-bottom-width: 3px; border-radius: 3px; font-family: var(--font-latin); font-size: 11px; color: #e8e8e8; text-align: center; background: #1a1b1f; }

/* ---------- generic header for sub screens ---------- */
.scr-head { display: flex; align-items: flex-end; gap: 18px; padding: calc(22px + var(--safe-t)) calc(32px + var(--safe-r)) 14px calc(32px + var(--safe-l)); background: linear-gradient(180deg, rgba(0,0,0,0.9), transparent); }
.scr-head h2 { margin: 0; font-size: clamp(24px, 3vw, 38px); font-weight: 900; transform: skewX(-8deg); }
.scr-head h2 b { color: var(--red); }
.scr-head .tag { color: var(--dim); font-size: 14px; padding-bottom: 6px; }
.scr-head .back { margin-left: auto; }
.btn { position: relative; display: inline-flex; align-items: center; gap: 8px; justify-content: center; padding: 11px 26px; min-height: 46px; border: 0; cursor: pointer; font-weight: 900; font-size: 16px; color: #e7e9ec;
  background: linear-gradient(180deg, #34363d, #1a1b1f); clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%); transition: filter .15s, transform .15s; }
.btn:hover, .btn.active { filter: brightness(1.25); }
.btn.primary { background: linear-gradient(180deg, #ff4a62, #b30d28); color: #fff; text-shadow: 0 1px 0 #600; }
.btn.active { box-shadow: inset 0 0 0 2px #fff; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.4; cursor: default; }

/* ---------- character select ---------- */
#select { background: transparent; }
#select .grid { position: absolute; left: 50%; bottom: calc(40px + var(--safe-b)); transform: translateX(-50%); display: grid; grid-template-columns: repeat(9, clamp(62px, 7.2vw, 104px)); gap: 6px; }
.cell { position: relative; aspect-ratio: 1 / 1.18; cursor: pointer; background: #0e0f12; clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); transition: transform .15s cubic-bezier(0.16,1,0.3,1); overflow: hidden; }
.cell img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(0.85) brightness(0.85); transition: filter .15s; }
.cell .nm { position: absolute; left: 0; right: 0; bottom: 0; padding: 3px 0 4px; text-align: center; font-weight: 900; font-size: clamp(12px, 1.2vw, 15px); background: linear-gradient(0deg, rgba(0,0,0,0.9), transparent); }
.cell .stripe { position: absolute; top: 0; left: 0; right: 0; height: 4px; }
.cell:hover img, .cell.p1 img, .cell.p2 img { filter: none; }
.cell.p1 { box-shadow: inset 0 0 0 3px var(--p1); transform: translateY(-6px); }
.cell.p2 { box-shadow: inset 0 0 0 3px var(--p2); transform: translateY(-6px); }
.cell.p1.p2 { box-shadow: inset 0 0 0 3px var(--p1), inset 0 0 0 6px var(--p2); }
.cell .badge { position: absolute; top: 6px; font-family: var(--font-latin); font-size: 11px; padding: 1px 5px; color: #fff; }
.cell .badge.b1 { left: 4px; background: var(--p1); } .cell .badge.b2 { right: 4px; background: var(--p2); }
.cell.random { display: grid; place-items: center; background: repeating-linear-gradient(45deg, #15161a 0 8px, #1d1e23 8px 16px); }
.cell.random span { font-family: var(--font-latin); font-size: 40px; color: var(--steel-4); }
.cell.locked { opacity: 0.6; }
.side-info { position: absolute; top: calc(84px + var(--safe-t)); width: min(390px, 31vw); display: flex; flex-direction: column; gap: 8px; max-height: calc(100vh - 84px - clamp(130px, 19vh, 180px) - var(--safe-b)); overflow: hidden; }
.side-info.s1 { left: calc(26px + var(--safe-l)); }
.side-info.s2 { right: calc(26px + var(--safe-r)); text-align: right; align-items: flex-end; }
.side-info .who { font-family: var(--font-latin); font-size: 15px; letter-spacing: 0.1em; }
.side-info.s1 .who { color: var(--p1); } .side-info.s2 .who { color: var(--p2); }
.side-info .cname { font-size: clamp(46px, 5.6vw, 84px); font-weight: 900; line-height: 0.95; transform: skewX(-8deg); text-shadow: 0 4px 0 rgba(0,0,0,0.6); }
.side-info .ctitle { font-size: clamp(15px, 1.5vw, 20px); font-weight: 800; color: var(--accent, #fff); }
.side-info .ctype { font-size: 13px; color: var(--dim); }
.side-info .ready { font-size: 24px; font-weight: 900; color: #fff; background: var(--accent); padding: 4px 16px; transform: skewX(-12deg); display: inline-block; align-self: flex-start; }
.side-info.s2 .ready { align-self: flex-end; }
.radar { width: clamp(120px, 21vh, 180px); height: clamp(120px, 21vh, 180px); flex: none; }
.skills { display: flex; flex-direction: column; gap: 4px; width: 100%; }
.skill-row { display: grid; grid-template-columns: 40px 1fr; gap: 8px; align-items: center; padding: 6px 10px; background: rgba(10,10,12,0.72); text-align: left; clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%); }
.skill-row .ic { width: 36px; height: 36px; }
.skill-row b { font-size: 14px; } .skill-row span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 12px; color: #b9bec6; line-height: 1.35; }
.skill-row.hiddenrow b { color: #8a8f98; letter-spacing: 0.3em; }
.select-mid { position: absolute; top: calc(92px + var(--safe-t)); left: 50%; transform: translateX(-50%); text-align: center; }
.select-mid .step { font-size: 15px; color: var(--dim); }
.select-mid .opts { display: flex; gap: 8px; justify-content: center; margin-top: 8px; flex-wrap: wrap; }
.opt { padding: 6px 14px; font-weight: 800; font-size: 14px; cursor: pointer; background: rgba(20,20,24,0.8); border: 1px solid #3a3d45; }
.opt.on { background: var(--red); border-color: #fff; color: #fff; }
.stage-strip { position: absolute; left: 50%; bottom: calc(44px + var(--safe-b)); transform: translateX(-50%); display: flex; gap: 8px; }
.stage-card { width: clamp(120px, 13vw, 190px); padding: 12px 12px 14px; cursor: pointer; }
.stage-card b { display: block; font-size: 15px; } .stage-card span { font-size: 12px; color: var(--dim); }
.stage-card.on { box-shadow: inset 0 0 0 2px #fff, 0 0 20px var(--red-glow); background: linear-gradient(180deg, #5a1020, #1a0a0e); }

/* ---------- VS ---------- */
#vs { overflow: hidden; }
#vs .half { position: absolute; top: 0; bottom: 0; width: 50%; display: flex; flex-direction: column; justify-content: flex-end; padding: 0 4vw 12vh; }
#vs .half.a { left: 0; background: linear-gradient(100deg, var(--ca) -20%, transparent 55%); animation: slideL 0.7s cubic-bezier(0.16,1,0.3,1) both; }
#vs .half.b { right: 0; align-items: flex-end; text-align: right; background: linear-gradient(-100deg, var(--cb) -20%, transparent 55%); animation: slideR 0.7s cubic-bezier(0.16,1,0.3,1) both; }
#vs .vname { font-size: clamp(60px, 9vw, 140px); font-weight: 900; line-height: 0.9; transform: skewX(-10deg); text-shadow: 0 6px 0 rgba(0,0,0,0.6); }
#vs .vtitle { font-size: clamp(16px, 2vw, 26px); font-weight: 900; }
#vs .vline { margin-top: 8px; font-size: clamp(14px, 1.4vw, 18px); color: #e4e6ea; font-style: italic; }
#vs .vslogo { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%) skewX(-10deg); font-family: var(--font-latin); font-style: italic; font-size: clamp(90px, 14vw, 220px); font-weight: 900;
  background: linear-gradient(180deg, #fff, #ffd257 45%, #b06a00 55%, #ffe7a0); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 24px rgba(255,36,67,0.8)); animation: vsIn 0.6s 0.35s cubic-bezier(0.16,1,0.3,1) both; }
#vs .slash { position: absolute; left: 50%; top: -10%; bottom: -10%; width: 8px; background: #fff; box-shadow: 0 0 30px #fff, 0 0 60px var(--red); transform: rotate(12deg); animation: slashIn 0.5s 0.2s both; }
#vs .loading { position: absolute; left: 50%; bottom: calc(5vh + var(--safe-b)); transform: translateX(-50%); width: min(560px, 80vw); text-align: center; }
#vs .loading .bar { height: 5px; background: #1b1c20; margin-bottom: 10px; }
#vs .loading .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--ca), var(--cb)); transition: width 0.25s; }
#vs .loading .tip { font-size: 14px; color: #c9cdd3; }
#vs .loading .stg { font-size: 13px; color: var(--gold); margin-bottom: 6px; }
@keyframes slideL { from { transform: translateX(-100%); } to { transform: none; } }
@keyframes slideR { from { transform: translateX(100%); } to { transform: none; } }
@keyframes vsIn { from { opacity: 0; transform: translate(-50%, -50%) skewX(-10deg) scale(3); } to { opacity: 1; transform: translate(-50%, -50%) skewX(-10deg) scale(1); } }
@keyframes slashIn { from { transform: rotate(12deg) scaleY(0); } to { transform: rotate(12deg) scaleY(1); } }

/* ---------- HUD ---------- */
#hud { pointer-events: none; }
.hud-top { position: absolute; top: calc(12px + var(--safe-t)); left: calc(14px + var(--safe-l)); right: calc(14px + var(--safe-r)); display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 10px; }
.pl { display: grid; grid-template-columns: 74px 1fr; gap: 8px; }
.pl.r { grid-template-columns: 1fr 74px; }
.pl.r .portrait { order: 2; } .pl.r .pl-main { order: 1; }
.portrait { width: 74px; height: 74px; background: #000; clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px); box-shadow: inset 0 0 0 2px var(--accent); }
.portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pl-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pl.r .pl-main { align-items: flex-end; }
.hpframe { position: relative; width: 100%; height: 26px; padding: 4px; background: linear-gradient(180deg, #4c5058, #1a1b1f 50%, #34363c); clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 100%, 0 100%); }
.pl.r .hpframe { clip-path: polygon(0 0, 100% 0, 100% 100%, 14px 100%); }
.hpframe .well { position: relative; height: 100%; background: #160608; overflow: hidden; }
.hpframe .trail, .hpframe .fill { position: absolute; top: 0; bottom: 0; left: 0; width: 100%; transform-origin: left; }
.pl.r .hpframe .trail, .pl.r .hpframe .fill { left: auto; right: 0; transform-origin: right; }
.hpframe .trail { background: linear-gradient(180deg, #fff, #ff8a8a); }
.hpframe .fill { background: linear-gradient(180deg, #fff6b0 0%, #ffd24a 35%, #e7a200 60%, #ffcf3a 100%); box-shadow: inset 0 -3px 0 rgba(0,0,0,0.25); }
.hpframe .fill.low { background: linear-gradient(180deg, #ffd0d0, #ff3040 45%, #a3001a 60%, #ff4a5a); animation: hpPulse 0.6s infinite alternate; }
.hpframe .ticks { position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 1px), rgba(0,0,0,0.45) calc(10% - 1px) 10%); }
@keyframes hpPulse { to { filter: brightness(1.4); } }
.pl-name { display: flex; align-items: baseline; gap: 8px; font-weight: 900; }
.pl-name b { font-size: 20px; text-shadow: 0 2px 0 #000; }
.pl-name span { font-size: 12px; color: var(--accent); }
.pips { display: flex; gap: 5px; margin-left: auto; }
.pl.r .pips { margin-left: 0; margin-right: auto; }
.pl.r .pl-name { flex-direction: row-reverse; }
.pip { width: 16px; height: 16px; transform: rotate(45deg); background: #1b1c20; border: 2px solid #5a5e66; }
.pip.on { background: var(--gold); border-color: #fff; box-shadow: 0 0 10px var(--gold); }
.status-row { display: flex; gap: 4px; min-height: 26px; flex-wrap: wrap; }
.pl.r .status-row { justify-content: flex-end; }
.st-ic { position: relative; width: 26px; height: 26px; display: grid; place-items: center; background: rgba(0,0,0,0.6); clip-path: polygon(5px 0, 100% 0, calc(100% - 5px) 100%, 0 100%); }
.st-ic svg { width: 18px; height: 18px; }
.st-ic.debuff { box-shadow: inset 0 -2px 0 #ff3df5; }
.st-ic.buff { box-shadow: inset 0 -2px 0 #43ff7a; }
.st-ic em { position: absolute; right: 1px; bottom: -1px; font-style: normal; font-family: var(--font-latin); font-size: 10px; text-shadow: 0 0 3px #000, 0 0 3px #000; }
.st-ic .t { position: absolute; left: 0; bottom: 0; height: 2px; background: #fff; }
.timer { position: relative; width: 96px; height: 84px; display: grid; place-items: center; background: linear-gradient(180deg, #3b3e45, #121316 55%, #26282d); clip-path: polygon(16px 0, calc(100% - 16px) 0, 100% 30%, calc(100% - 22px) 100%, 22px 100%, 0 30%); }
.timer .num { font-size: 46px; color: #fff; text-shadow: 0 0 12px var(--red-glow), 0 3px 0 #000; }
.timer .num.warn { color: #ff4a5e; animation: blink 0.5s steps(2) infinite; }
.timer .rnd { position: absolute; bottom: 6px; font-size: 10px; color: var(--dim); font-family: var(--font-latin); letter-spacing: 0.15em; }
.hud-bottom { position: absolute; bottom: calc(12px + var(--safe-b)); left: calc(14px + var(--safe-l)); right: calc(14px + var(--safe-r)); display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.pb { display: flex; flex-direction: column; gap: 6px; width: min(430px, 42vw); }
.pb.r { align-items: flex-end; }
.gauge { position: relative; height: 18px; width: 100%; padding: 3px; background: linear-gradient(180deg, #3e4148, #15161a); clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 100%, 0 100%); }
.pb.r .gauge { clip-path: polygon(0 0, 100% 0, 100% 100%, 10px 100%); }
.gauge i { position: absolute; top: 3px; bottom: 3px; left: 3px; background: linear-gradient(90deg, #3a5bff, #9a6bff, #ff4af0); width: 0; transition: width .1s; }
.pb.r .gauge i { left: auto; right: 3px; }
.gauge.full i { background: linear-gradient(90deg, #ffcf5a, #fff, #ffcf5a); background-size: 200% 100%; animation: gaugeFull 0.8s linear infinite; box-shadow: 0 0 14px #ffcf5a; }
.gauge .lbl { position: absolute; top: -1px; right: 14px; font-family: var(--font-latin); font-size: 12px; text-shadow: 0 0 4px #000; }
.pb.r .gauge .lbl { right: auto; left: 14px; }
@keyframes gaugeFull { to { background-position: -200% 0; } }
.res { position: relative; height: 12px; width: 72%; background: #111216; clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 100%, 0 100%); }
.pb.r .res { clip-path: polygon(0 0, 100% 0, 100% 100%, 6px 100%); }
.res i { position: absolute; top: 2px; bottom: 2px; left: 2px; width: 0; background: var(--accent); transition: width .12s; }
.pb.r .res i { left: auto; right: 2px; }
.res .pipz { position: absolute; inset: 0; display: flex; gap: 2px; padding: 2px; }
.res .pipz b { flex: 1; background: #26272c; }
.res .pipz b.on { background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.res-l { font-size: 12px; font-weight: 800; color: var(--accent); display: flex; gap: 8px; }
.skill-bar { display: flex; gap: 6px; }
.pb.r .skill-bar { flex-direction: row-reverse; }
.sk { position: relative; width: 50px; height: 50px; background: #0d0e11; clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); }
.sk .ic { position: absolute; inset: 5px; }
.sk .cd { position: absolute; inset: 0; background: conic-gradient(rgba(0,0,0,0.78) var(--p, 0%), transparent 0); }
.sk .cdn { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-latin); font-size: 16px; text-shadow: 0 0 4px #000; }
.sk .kb { position: absolute; right: 2px; bottom: 1px; font-family: var(--font-latin); font-size: 9px; color: #fff; text-shadow: 0 0 3px #000; }
.sk.ready { box-shadow: inset 0 0 0 2px var(--accent); }
.sk.sup { width: 60px; height: 60px; }
.sk.sup.ready { animation: supReady 0.8s infinite alternate; }
.sk.locked .ic { filter: grayscale(1) brightness(0.4); }
.sk.flashuse { animation: skUse .3s; }
@keyframes supReady { to { box-shadow: inset 0 0 0 3px #ffcf5a, 0 0 18px #ffcf5a; } }
@keyframes skUse { 0% { transform: scale(1.25); filter: brightness(2); } 100% { transform: none; } }
.combo { position: absolute; top: 28%; display: flex; flex-direction: column; align-items: flex-start; pointer-events: none; transition: opacity .3s; }
.combo.l { left: calc(3vw + var(--safe-l)); } .combo.r { right: calc(3vw + var(--safe-r)); align-items: flex-end; }
.combo .n { font-family: var(--font-latin); font-style: italic; font-size: clamp(54px, 7vw, 96px); line-height: 0.9; color: #fff; -webkit-text-stroke: 2px #000; text-shadow: 0 0 20px var(--accent), 0 5px 0 rgba(0,0,0,0.6); }
.combo .h { font-family: var(--font-latin); font-style: italic; font-size: 22px; color: var(--accent); -webkit-text-stroke: 1px #000; }
.combo .d { font-size: 15px; font-weight: 900; color: #fff; text-shadow: 0 2px 0 #000; }
.combo.pop .n { animation: comboPop .18s cubic-bezier(0.16,1,0.3,1); }
@keyframes comboPop { from { transform: scale(1.5); } to { transform: none; } }
.callout { position: absolute; font-weight: 900; font-size: 22px; padding: 2px 12px; transform: skewX(-10deg); pointer-events: none; animation: calloutIn 0.9s both; white-space: nowrap; }
@keyframes calloutIn { 0% { opacity: 0; transform: skewX(-10deg) translateY(10px) scale(1.4); } 15% { opacity: 1; transform: skewX(-10deg) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: skewX(-10deg) translateY(-14px); } }
.announce { position: absolute; left: 0; right: 0; top: 34%; text-align: center; pointer-events: none; }
.announce .big { display: inline-block; font-family: var(--font-latin); font-style: italic; font-weight: 900; font-size: clamp(80px, 13vw, 200px); line-height: 1; letter-spacing: -0.02em;
  background: linear-gradient(180deg, #ffffff 0%, #ffe07a 40%, #d17a00 52%, #ffd04a 64%, #fff2c0 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 16px rgba(255,140,0,0.7)) drop-shadow(0 8px 0 rgba(0,0,0,0.7)); transform: skewX(-8deg); }
.announce .big.red { background-image: linear-gradient(180deg, #ffffff 0%, #ff8a98 38%, #b0001c 52%, #ff2443 64%, #ffd0d6 100%); filter: drop-shadow(0 0 20px rgba(255,36,67,0.9)) drop-shadow(0 8px 0 rgba(0,0,0,0.7)); }
.announce .big.cyan { background-image: linear-gradient(180deg, #fff, #8ff7ff 40%, #0a7a8a 52%, #19f5e1 64%, #e8fffd); filter: drop-shadow(0 0 20px rgba(25,245,225,0.8)); }
.announce .small { display: block; margin-top: 6px; font-size: clamp(18px, 2.4vw, 32px); font-weight: 900; color: #fff; text-shadow: 0 0 12px #000, 0 3px 0 #000; }
.announce .in { animation: annIn 0.45s cubic-bezier(0.16,1,0.3,1) both; }
.announce .out { animation: annOut 0.35s cubic-bezier(0.6,0,0.9,0.35) both; }
@keyframes annIn { from { opacity: 0; transform: skewX(-8deg) scale(2.4); filter: blur(12px); } to { opacity: 1; transform: skewX(-8deg) scale(1); } }
@keyframes annOut { to { opacity: 0; transform: skewX(-8deg) scale(0.7); } }
.hidden-banner { position: absolute; left: 0; right: 0; top: 18%; display: flex; flex-direction: column; align-items: center; pointer-events: none; animation: hiddenIn 2.6s both; }
.hidden-banner .hb1 { font-family: var(--font-latin); font-size: clamp(26px, 3.6vw, 52px); letter-spacing: 0.22em; color: #fff; padding: 6px 40px; background: linear-gradient(90deg, transparent, rgba(0,0,0,0.9) 15%, rgba(0,0,0,0.9) 85%, transparent); text-shadow: 0 0 18px var(--accent), 0 0 4px var(--accent); }
.hidden-banner .hb2 { margin-top: 6px; font-size: clamp(22px, 2.8vw, 40px); font-weight: 900; color: var(--accent); text-shadow: 0 0 12px #000, 0 3px 0 #000; }
@keyframes hiddenIn { 0% { opacity: 0; clip-path: inset(50% 0 50% 0); } 10% { opacity: 1; clip-path: inset(0 0 0 0); } 85% { opacity: 1; } 100% { opacity: 0; } }
.rage-mark { position: absolute; font-family: var(--font-latin); font-style: italic; font-size: 18px; color: #fff; background: #d0001e; padding: 1px 10px; transform: skewX(-12deg); animation: blink .5s steps(2) infinite; }
.cutin { position: absolute; left: 0; right: 0; top: 56%; height: 128px; display: flex; align-items: center; overflow: hidden; pointer-events: none; animation: cutIn 1.6s both; }
.cutin .band { position: absolute; inset: 0; background: linear-gradient(90deg, var(--accent), rgba(0,0,0,0.85) 70%); clip-path: polygon(0 14%, 100% 0, 100% 86%, 0 100%); }
.cutin .txt { position: relative; margin-left: 8vw; }
.cutin .txt b { display: block; font-size: clamp(34px, 5vw, 72px); font-weight: 900; color: #fff; transform: skewX(-10deg); text-shadow: 0 4px 0 rgba(0,0,0,0.6); }
.cutin .txt span { font-size: 18px; font-weight: 900; color: rgba(255,255,255,0.85); letter-spacing: 0.2em; }
.cutin.right .band { background: linear-gradient(-90deg, var(--accent), rgba(0,0,0,0.85) 70%); }
.cutin.right .txt { margin-left: auto; margin-right: 8vw; text-align: right; }
@keyframes cutIn { 0% { transform: translateX(-100%); } 12% { transform: none; } 85% { transform: none; opacity: 1; } 100% { transform: translateX(30%); opacity: 0; } }
.megatext { position: absolute; left: 0; right: 0; top: 30%; text-align: center; pointer-events: none; font-weight: 900; font-size: clamp(90px, 18vw, 320px); line-height: 1; color: transparent; -webkit-text-stroke: 3px var(--c); text-shadow: 0 0 40px var(--g); animation: mega 1.5s both; }
.megatext.big { font-size: clamp(60px, 10vw, 170px); }
.megatext.fill { color: var(--c); -webkit-text-stroke: 2px #000; }
@keyframes mega { 0% { opacity: 0; transform: scale(2.2) skewX(-8deg); letter-spacing: 0.5em; } 18% { opacity: 1; transform: scale(1) skewX(-8deg); letter-spacing: 0; } 80% { opacity: 1; } 100% { opacity: 0; transform: scale(1.1) skewX(-8deg); } }
.systext { position: absolute; left: 50%; top: 12%; transform: translateX(-50%); font-family: Consolas, "Courier New", monospace; font-size: clamp(16px, 2vw, 26px); padding: 6px 20px; border: 1px solid currentColor; background: rgba(0,10,14,0.7); pointer-events: none; animation: sysIn 1.8s both; white-space: nowrap; }
@keyframes sysIn { 0% { opacity: 0; clip-path: inset(0 100% 0 0); } 20% { opacity: 1; clip-path: inset(0 0 0 0); } 80% { opacity: 1; } 100% { opacity: 0; } }
.practice-panel { position: absolute; top: calc(112px + var(--safe-t)); right: calc(14px + var(--safe-r)); width: 230px; padding: 12px 14px; font-size: 13px; pointer-events: auto; }
.practice-panel h5 { margin: 0 0 8px; font-size: 14px; color: var(--gold); }
.practice-panel label { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; cursor: pointer; }
.practice-panel select { background: #111; color: #eee; border: 1px solid #444; font-family: inherit; }
.practice-panel .stat { color: var(--dim); font-size: 12px; margin-top: 6px; line-height: 1.5; }
.practice-panel .fd { margin-top: 8px; padding-top: 6px; border-top: 1px solid rgba(255,255,255,0.12); color: #ddd; }
.practice-panel .fd-h { color: var(--gold); font-weight: 700; margin-bottom: 2px; }
.practice-panel .fd b { color: #fff; }
.fps { position: absolute; left: calc(10px + var(--safe-l)); bottom: calc(110px + var(--safe-b)); font-family: Consolas, monospace; font-size: 11px; color: #8f8; background: rgba(0,0,0,0.5); padding: 3px 6px; pointer-events: none; white-space: pre; }
.hud-pause { position: absolute; top: calc(104px + var(--safe-t)); left: 50%; transform: translateX(-50%); pointer-events: auto; width: 38px; height: 38px; display: grid; place-items: center; background: rgba(0,0,0,0.5); border: 1px solid #444; color: #ddd; cursor: pointer; font-size: 18px; }
.spectate-tag { position: absolute; top: calc(104px + var(--safe-t)); left: 50%; transform: translateX(-50%) translateY(46px); font-size: 13px; font-weight: 900; color: var(--gold); letter-spacing: 0.2em; }

/* ---------- overlays (pause, result, settings ...) ---------- */
.overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.72); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; }
.dialog { width: min(560px, 92vw); max-height: 88vh; overflow: auto; padding: 26px 30px; display: flex; flex-direction: column; gap: 8px; }
.dialog h3 { margin: 0 0 10px; font-size: 28px; font-weight: 900; transform: skewX(-8deg); }
.dialog .list { display: flex; flex-direction: column; gap: 6px; }
.dialog .list .btn { justify-content: flex-start; width: 100%; font-size: 18px; }
.movelist { margin-top: 6px; display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: 13px; }
.movelist dt { color: var(--gold); font-weight: 800; } .movelist dd { margin: 0; color: #d2d6dc; }

#result { background: linear-gradient(90deg, rgba(0,0,0,0.88), rgba(0,0,0,0.6) 40%, transparent 65%); }
#result .wbox { position: absolute; left: calc(5vw + var(--safe-l)); top: 50%; transform: translateY(-50%); width: min(560px, 90vw); display: flex; flex-direction: column; gap: 14px; }
#result .winner { font-family: var(--font-latin); font-style: italic; font-size: clamp(60px, 9vw, 130px); line-height: 0.9; background: linear-gradient(180deg, #fff, #ffe07a 45%, #c56a00 55%, #ffd04a); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 20px rgba(255,160,0,0.6)); animation: logoIn 0.8s cubic-bezier(0.16,1,0.3,1) both; }
#result .wname { font-size: clamp(34px, 4.5vw, 64px); font-weight: 900; transform: skewX(-8deg); }
#result .quote { font-size: 18px; color: #e6e8ec; font-style: italic; }
.stats { display: grid; grid-template-columns: 1fr auto auto; gap: 3px 18px; padding: 14px 18px; font-size: 14px; }
.stats .h { color: var(--dim); font-size: 12px; }
.stats .v { text-align: right; font-family: var(--font-latin); font-variant-numeric: tabular-nums; }
.stats .v.best { color: var(--gold); }
.result-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.settings { width: min(860px, 94vw); }
.tabs { display: flex; gap: 4px; margin-bottom: 10px; flex-wrap: wrap; }
.tabs .btn { min-height: 38px; padding: 6px 16px; font-size: 14px; }
.row { display: grid; grid-template-columns: 220px 1fr auto; align-items: center; gap: 14px; padding: 8px 4px; border-bottom: 1px solid #23252a; }
.row label { font-weight: 800; font-size: 15px; }
.row small { color: var(--dim); font-size: 12px; display: block; font-weight: 400; }
.row input[type=range] { width: 100%; accent-color: var(--red); }
.row .val { width: 56px; text-align: right; font-family: var(--font-latin); font-size: 13px; }
.seg { display: flex; flex-wrap: wrap; gap: 4px; }
.seg button { padding: 6px 12px; border: 1px solid #3a3d45; background: #15161a; cursor: pointer; font-weight: 800; font-size: 13px; }
.seg button.on { background: var(--red); border-color: #fff; color: #fff; }
.keygrid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px 14px; align-items: center; font-size: 14px; }
.keygrid .kh { color: var(--dim); font-size: 12px; font-weight: 800; }
.keybtn { padding: 6px 10px; min-width: 90px; background: #15161a; border: 1px solid #3a3d45; cursor: pointer; font-family: var(--font-latin); font-size: 13px; }
.keybtn.wait { background: var(--red); color: #fff; animation: blink .6s steps(2) infinite; }
.keybtn.conflict { border-color: #ff3df5; color: #ffb0f0; }

.records table { width: 100%; border-collapse: collapse; font-size: 14px; }
.records th { text-align: left; color: var(--dim); font-size: 12px; padding: 6px; border-bottom: 1px solid #333; }
.records td { padding: 7px 6px; border-bottom: 1px solid #1e2024; }
.records td.n { font-family: var(--font-latin); text-align: right; font-variant-numeric: tabular-nums; }
.wr { position: relative; height: 8px; background: #1c1d22; width: 120px; }
.wr i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--red), var(--gold)); }

/* tournament bracket */
#bracket .tree { position: absolute; inset: 120px 4vw 90px; display: grid; grid-template-columns: 1fr 1fr 1fr 1fr 1fr; align-items: center; }
.col { display: flex; flex-direction: column; justify-content: space-around; height: 100%; gap: 8px; }
.match { padding: 6px 8px; display: flex; flex-direction: column; gap: 3px; }
.match.now { box-shadow: 0 0 0 2px var(--gold), 0 0 22px rgba(255,207,90,0.4); }
.slot { display: flex; align-items: center; gap: 8px; padding: 3px 6px; font-weight: 900; font-size: 15px; background: rgba(0,0,0,0.35); }
.slot img { width: 30px; height: 30px; object-fit: cover; }
.slot.win { background: linear-gradient(90deg, rgba(255,207,90,0.35), transparent); }
.slot.lose { opacity: 0.4; text-decoration: line-through; }
.slot.you::after { content: "YOU"; margin-left: auto; font-family: var(--font-latin); font-size: 10px; color: var(--p1); }
.champ { text-align: center; }
.champ .crown { font-family: var(--font-latin); font-size: 14px; color: var(--gold); letter-spacing: 0.3em; }
.champ img { width: 120px; height: 120px; object-fit: cover; clip-path: polygon(14px 0,100% 0,100% calc(100% - 14px),calc(100% - 14px) 100%,0 100%,0 14px); box-shadow: inset 0 0 0 3px var(--gold); }
.bracket-actions { position: absolute; bottom: calc(24px + var(--safe-b)); left: 50%; transform: translateX(-50%); display: flex; gap: 10px; }

/* ---------- touch controls ---------- */
#touch { position: absolute; inset: 0; pointer-events: none; }
#touch .pad { position: absolute; left: calc(18px + var(--safe-l)); bottom: calc(18px + var(--safe-b)); width: 168px; height: 168px; pointer-events: auto; touch-action: none; }
#touch .pad .k { position: absolute; width: 56px; height: 56px; display: grid; place-items: center; background: rgba(20,20,26,0.55); border: 1px solid rgba(255,255,255,0.25); font-size: 20px; color: #fff; }
#touch .pad .up { left: 56px; top: 0; } #touch .pad .dn { left: 56px; bottom: 0; } #touch .pad .lf { left: 0; top: 56px; } #touch .pad .rt { right: 0; top: 56px; }
#touch .pad .k.on, #touch .btns .tb.on { background: rgba(255,36,67,0.7); }
#touch .btns { position: absolute; right: calc(14px + var(--safe-r)); bottom: calc(16px + var(--safe-b)); width: 238px; height: 190px; pointer-events: auto; touch-action: none; }
#touch .tb { position: absolute; width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; background: rgba(20,20,26,0.6); border: 1px solid rgba(255,255,255,0.3); color: #fff; font-weight: 900; font-size: 13px; text-align: center; line-height: 1.05; }
#touch .tb.atk { right: 0; bottom: 0; width: 78px; height: 78px; font-size: 15px; background: rgba(255,36,67,0.45); }
#touch .tb.s1 { right: 88px; bottom: 6px; } #touch .tb.s2 { right: 70px; bottom: 76px; } #touch .tb.s3 { right: 2px; bottom: 88px; }
#touch .tb.sup { right: 150px; bottom: 60px; background: rgba(255,207,90,0.45); } #touch .tb.dash { right: 160px; bottom: 0; } #touch .tb.grd { right: 214px; bottom: 96px; width: 54px; height: 54px; } #touch .tb.lch { right: 150px; bottom: 124px; width: 56px; height: 56px; font-size: 12px; background: rgba(90,140,255,0.4); } #touch .tb.thr { right: 80px; bottom: 140px; width: 48px; height: 48px; font-size: 12px; background: rgba(200,120,40,0.45); }
#touch .tpause { position: absolute; top: calc(104px + var(--safe-t)); right: calc(14px + var(--safe-r)); width: 44px; height: 44px; pointer-events: auto; background: rgba(0,0,0,0.5); border: 1px solid #555; color: #fff; display: grid; place-items: center; }

@media (max-width: 900px) {
  .side-info { width: 44vw; top: 70px; }
  .side-info .cname { font-size: 40px; }
  .radar { width: 120px; height: 120px; }
  .skill-row span { display: none; }
  #select .grid { grid-template-columns: repeat(9, 9.6vw); gap: 3px; }
  .pl { grid-template-columns: 48px 1fr; } .pl.r { grid-template-columns: 1fr 48px; }
  .portrait { width: 48px; height: 48px; }
  .timer { width: 70px; height: 62px; } .timer .num { font-size: 32px; }
  .pl-name b { font-size: 15px; } .pl-name span { display: none; }
  .pb { width: 38vw; }
  .sk { width: 38px; height: 38px; } .sk.sup { width: 44px; height: 44px; }
  .hud-bottom { bottom: auto; top: calc(66px + var(--safe-t)); align-items: flex-start; }
  .pb { gap: 3px; } .gauge { height: 12px; padding: 2px; } .gauge .lbl { font-size: 10px; top: -2px; } .res { height: 8px; } .res-l { font-size: 10px; }
  .status-row { min-height: 18px; } .st-ic { width: 18px; height: 18px; } .st-ic svg { width: 12px; height: 12px; }
  .combo { top: 40%; } .combo .n { font-size: 44px; }
  body.touch .hud-bottom .skill-bar { display: none; }
  #menu .info { display: none; }
  .row { grid-template-columns: 1fr; gap: 6px; }
  #bracket .tree { inset: 90px 2vw 90px; font-size: 12px; }
  .slot { font-size: 12px; } .slot img { width: 22px; height: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
body.reduce-motion *, body.reduce-motion *::before { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }

/* ---------- roster of 19: two rows of ten, info panels sized so full skill text fits ---------- */
#select .grid { grid-template-columns: repeat(12, clamp(44px, 4.6vw, 78px)); gap: 5px; bottom: calc(34px + var(--safe-b)); }
#select .cell { aspect-ratio: 1 / 1.06; }
#select .cell .nm { font-size: clamp(11px, 1.05vw, 14px); }
.side-info { top: calc(78px + var(--safe-t)); width: min(420px, 31vw); gap: 6px; max-height: calc(100vh - 78px - 2 * clamp(53px, 5.72vw, 93px) - 52px - var(--safe-b)); overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: #5a5e66 transparent; overscroll-behavior: contain; }
.side-info.s2 { direction: rtl; } .side-info.s2 > * { direction: ltr; }
.ci-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; width: 100%; }
.side-info.s2 .ci-head { flex-direction: row-reverse; }
.ci-id { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.side-info.s2 .ci-id { align-items: flex-end; }
.side-info .cname { font-size: clamp(34px, 4.2vw, 68px); }
.side-info .radar { width: clamp(104px, 16vh, 150px); height: clamp(104px, 16vh, 150px); flex: none; }
.skill-row { padding: 5px 9px; }
.skill-row span { display: block; -webkit-line-clamp: unset; overflow: visible; font-size: 12px; line-height: 1.38; }
@media (max-width: 900px) {
  #select .grid { grid-template-columns: repeat(12, 7.3vw); gap: 3px; }
  .side-info { width: 46vw; }
  .skill-row span { display: block; }
}
.side-info .cname { white-space: nowrap; }
.side-info .cname.long { font-size: clamp(26px, 2.9vw, 48px); }

/* online */
.net-wait { position: absolute; left: 50%; top: 40%; transform: translateX(-50%); padding: 10px 22px; background: rgba(8,8,12,0.82); border: 1px solid rgba(255,255,255,0.18); color: #fff; font-weight: 800; letter-spacing: 0.02em; display: none; }

.key-help { font-size: 13px; color: #b9bec6; margin-bottom: 8px; }
.key-note { margin-top: 8px; padding: 8px 12px; background: rgba(255,207,90,0.1); border: 1px solid rgba(255,207,90,0.45); font-size: 13px; color: #ffe9b0; }
.screen.online { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; background: radial-gradient(ellipse at center, rgba(0,0,0,0.35), rgba(0,0,0,0.75)); }
.on-dialog { width: min(560px, 94vw); }
.on-dialog.wide { width: min(980px, 96vw); }
.on-note, .on-sub, .on-hint, .on-tip { color: #b9bec6; font-size: 14px; margin: 0; }
.on-tip { font-size: 12px; margin-top: 6px; }
.on-field { display: grid; gap: 4px; margin: 6px 0; }
.on-field > span { font-weight: 800; font-size: 14px; }
.on-field small { color: #8d939c; font-size: 12px; }
.on-input { font: inherit; font-size: 17px; padding: 10px 12px; background: rgba(0,0,0,0.5); color: #fff; border: 1px solid rgba(255,255,255,0.22); outline: none; width: 100%; box-sizing: border-box; }
.on-input:focus { border-color: #ff4a62; box-shadow: 0 0 0 2px rgba(255,74,98,0.25); }
.on-input.code { font-family: var(--font-latin); font-weight: 900; letter-spacing: 0.3em; text-transform: uppercase; }
.on-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 12px; }
.on-error { padding: 9px 12px; background: rgba(200,20,40,0.2); border: 1px solid rgba(255,74,98,0.55); color: #ffd0d6; font-size: 14px; }
.on-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.on-box { display: grid; gap: 8px; padding: 12px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); }
.on-box h4, .on-dialog h4 { margin: 6px 0 2px; font-size: 15px; color: #ffcf5a; }
.on-listhead { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.btn.small { min-height: 32px; padding: 6px 14px; font-size: 13px; }
.on-rooms { display: grid; gap: 6px; max-height: 32vh; overflow: auto; }
.on-room { display: grid; grid-template-columns: 90px 1fr auto; align-items: center; gap: 12px; padding: 8px 12px; background: rgba(0,0,0,0.35); border: 1px solid rgba(255,255,255,0.08); }
.on-code { font-family: var(--font-latin); font-weight: 900; font-size: 22px; letter-spacing: 0.15em; color: #fff; }
.on-rinfo small { color: #8d939c; }
.on-empty { padding: 18px; text-align: center; color: #8d939c; background: rgba(0,0,0,0.25); }
.on-roomhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.on-bigcode { font-family: var(--font-latin); font-weight: 900; font-size: clamp(34px, 5vw, 56px); letter-spacing: 0.18em; padding: 4px 16px; background: #fff; color: #111; transform: skewX(-8deg); user-select: all; }
.on-slots { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: stretch; margin: 10px 0 4px; }
.on-vs { align-self: center; font-family: var(--font-latin); font-weight: 900; font-size: 28px; color: #ff4a62; transform: skewX(-8deg); }
.on-slot { position: relative; display: grid; grid-template-columns: 78px 1fr; gap: 10px; align-items: center; padding: 8px; background: rgba(0,0,0,0.45); border: 1px solid color-mix(in srgb, var(--accent, #555) 60%, transparent); min-height: 92px; }
.on-slot.ready { box-shadow: inset 0 0 0 2px #5dff9a; }
.on-slot.empty { display: grid; grid-template-columns: 1fr; place-items: center; color: #8d939c; border-color: rgba(255,255,255,0.1); border-style: dashed; }
.on-slot img, .on-noimg { width: 78px; height: 78px; object-fit: cover; background: #111; display: grid; place-items: center; font-size: 30px; color: #555; }
.on-pname { font-weight: 900; font-size: 17px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.on-pchar { color: #cfd3da; font-size: 13px; }
.on-slot small { color: #8d939c; font-size: 12px; }
.tag { font-size: 11px; padding: 1px 6px; background: #ffcf5a; color: #111; font-weight: 900; }
.tag.me { background: #7ec8ff; }
.on-ready { position: absolute; right: 10px; top: 8px; font-family: var(--font-latin); font-weight: 900; color: #5dff9a; font-size: 14px; }
.on-chars { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; }
.on-char { position: relative; padding: 0; border: 1px solid rgba(255,255,255,0.1); background: #0d0d10; cursor: pointer; overflow: hidden; }
.on-char img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.on-char span { display: block; font-size: 11px; font-weight: 800; color: #fff; padding: 2px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.on-char:hover { filter: brightness(1.25); }
.on-char.on { box-shadow: inset 0 0 0 2px var(--accent), 0 0 12px var(--accent); }
.on-stages { flex-wrap: wrap; }
@media (max-width: 720px) { .on-grid2, .on-slots { grid-template-columns: 1fr; } .on-vs { display: none; } .on-chars { grid-template-columns: repeat(7, minmax(0, 1fr)); } }

/* 철권식 커맨드 리스트 (기술표) */
.ml-char { margin-bottom: 6px; }
.ml-style { color: var(--dim); font-size: 13px; margin-bottom: 6px; }
.cmdlist { width: 100%; border-collapse: collapse; font-size: 13px; }
.cmdlist th { text-align: left; color: var(--gold); font-weight: 700; font-size: 12px; padding: 4px 6px; border-bottom: 1px solid rgba(255,255,255,0.18); }
.cmdlist td { padding: 4px 6px; border-bottom: 1px solid rgba(255,255,255,0.06); vertical-align: middle; }
.cmdlist tr:hover td { background: rgba(255,255,255,0.04); }
.cmdlist td.in { white-space: nowrap; color: #fff; font-weight: 700; }
.cmdlist td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cmdlist .ht { display: inline-block; white-space: nowrap; min-width: 40px; text-align: center; padding: 1px 6px; font-size: 12px; font-weight: 800; border-radius: 3px; }
.cmdlist .ht.hi { background: rgba(255,214,90,0.18); color: #ffd65a; }
.cmdlist .ht.md { background: rgba(255,120,90,0.18); color: #ff9a7a; }
.cmdlist .ht.lo { background: rgba(90,170,255,0.2); color: #8cc8ff; }
.cmdlist .ml-tag { display: inline-block; margin: 1px 3px 1px 0; padding: 1px 6px; font-size: 11px; border: 1px solid rgba(255,255,255,0.25); border-radius: 3px; color: #e8e8e8; white-space: nowrap; }
.tk-style { font-size: 13px; color: #ddd; padding: 6px 8px; margin-bottom: 6px; border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.04); }
.tk-style b { color: var(--gold); margin-right: 4px; }
.tk-tags { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px; }
.tk-tags span { font-size: 11px; padding: 1px 6px; border: 1px solid rgba(255,255,255,0.25); border-radius: 3px; color: #fff; }
