/* 엘리멘탈 스트라이커 화면. 1280×720 기준(#ui)을 창 크기에 맞춰 늘린다. 알약 모양 없음(모서리 6px), 글자 상하 가운데 */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #0b0e16; overflow: hidden; overscroll-behavior: none; font-family: system-ui, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; color: #f2f5fb; user-select: none; }
#frame { position: fixed; inset: 0; }
#frame > canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#fx2d { pointer-events: none; z-index: 2; }
#ui { position: absolute; left: 0; top: 0; width: 1280px; height: 720px; transform-origin: 0 0; z-index: 3; pointer-events: none; }
.hidden { display: none !important; }
button { pointer-events: auto; height: 44px; padding: 0 18px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.22); 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; gap: 8px; cursor: pointer; }
button.main { background: #ffd36e; color: #14100a; border-color: #ffd36e; }
button:hover { filter: brightness(1.12); }
/* 키캡 */
.kcs { display: inline-flex; align-items: center; gap: 6px; }
.kc { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 30px; padding: 0 6px; border-radius: 5px; border: 1px solid #8a94a8; border-bottom: 4px solid #5a6378; background: linear-gradient(180deg, #3a4254, #262c3a); color: #fff; font: 900 14px/1 system-ui, sans-serif; }
.kc.w { min-width: 0; padding: 0 8px; font-size: 12px; height: 24px; }
button.main .kc { border-color: #6a5420; border-bottom-color: #4a3a14; background: linear-gradient(180deg, #fff3c8, #f0d58a); color: #14100a; }
.kgrp { display: inline-flex; align-items: center; gap: 10px; }
.kgrp > em { font-style: normal; font-size: 14px; font-weight: 800; color: #8a94a8; }
/* 게임 중 양옆 칸 */
.side { position: absolute; top: 16px; width: 250px; display: flex; flex-direction: column; gap: 10px; }
.side.left { left: 16px; } .side.right { right: 16px; }
.box { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 40px; padding: 0 14px; background: rgba(10,14,24,0.82); border: 1px solid rgba(255,255,255,0.14); border-radius: 6px; }
.box span { font-size: 13px; font-weight: 800; color: #a8b0c0; } .box b { font-size: 18px; font-weight: 900; font-variant-numeric: tabular-nums; }
.box.score b { font-size: 22px; color: #ffe26b; }
.pip { display: inline-block; width: 14px; height: 14px; margin-left: 4px; border-radius: 3px; background: #2a3142; border: 1px solid #4a5266; vertical-align: middle; }
.pip.on { background: var(--c, #ffd36e); border-color: #fff; }
.card { padding: 10px 12px; background: rgba(10,14,24,0.86); border: 1px solid rgba(255,255,255,0.14); border-left: 4px solid var(--c); border-radius: 6px; display: flex; gap: 10px; align-items: center; }
.card .tile { flex: none; width: 58px; height: 58px; border: 2px solid var(--c); border-radius: 5px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #0b0f18; position: relative; }
.card .tile small { position: absolute; left: 4px; top: 3px; font-size: 10px; color: #dfe6f2; } .card .tile b { font-size: 22px; color: var(--c); line-height: 1; } .card .tile em { font-style: normal; font-size: 11px; margin-top: 3px; }
.card .tx { font-size: 12.5px; line-height: 1.4; color: #dfe6f2; word-break: keep-all; } .card .tx b { display: block; font-size: 14px; color: #fff; margin-bottom: 2px; }
#bossbar { position: absolute; left: 330px; right: 330px; top: 16px; display: flex; flex-direction: column; gap: 6px; align-items: center; }
#bossName { font-size: 15px; font-weight: 900; text-shadow: 0 2px 4px #000; }
.bar { position: relative; width: 100%; height: 12px; background: #1c2130; border: 1px solid rgba(255,255,255,0.25); border-radius: 3px; overflow: hidden; }
.bar i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #ff6a5a, #ffd36e); }
#banner { position: absolute; left: 50%; top: 150px; transform: translate(-50%, -8px); max-width: 640px; padding: 12px 22px; background: rgba(10,14,24,0.88); border: 1px solid rgba(255,226,107,0.6); border-radius: 6px; font-size: 20px; font-weight: 800; color: #ffe26b; text-align: center; opacity: 0; transition: opacity .2s, transform .2s; word-break: keep-all; }
#banner.show { opacity: 1; transform: translate(-50%, 0); } #banner.big { font-size: 30px; }
/* 고르기 */
#select { position: absolute; inset: 0; pointer-events: auto; }
#select .top { position: absolute; left: 0; right: 0; top: 0; height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 0 32px; background: rgba(7,9,15,0.92); border-bottom: 1px solid #2a3140; }
#select h1 { margin: 0; font-size: 30px; font-weight: 900; display: flex; align-items: center; gap: 14px; } #select h1 small { font-size: 14px; letter-spacing: 2px; color: #a8b0c0; }
#stageSel { display: flex; gap: 8px; margin: 0; }
#stageSel button { height: 34px; font-size: 13px; padding: 0 12px; } #stageSel button.on { background: #ffd36e; color: #14100a; border-color: #ffd36e; } #stageSel button:disabled { opacity: .45; cursor: default; }
#selCols { position: absolute; left: 0; right: 0; top: 72px; bottom: 64px; display: grid; grid-template-columns: repeat(6, 1fr); }
#selCols .col { position: relative; display: flex; flex-direction: column; justify-content: flex-end; padding: 0 14px 16px; border-right: 1px solid rgba(255,255,255,0.06); cursor: pointer; }
#selCols .col.on { box-shadow: inset 0 0 0 2px var(--c); background: linear-gradient(180deg, transparent 0%, color-mix(in srgb, var(--c) 14%, transparent) 100%); }
#selCols .nm { display: flex; align-items: center; gap: 8px; } #selCols .nm .tile { width: 44px; height: 44px; border: 2px solid var(--c); border-radius: 5px; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 18px; color: var(--c); background: #0b0f18; }
#selCols .nm b { font-size: 20px; } #selCols p { margin: 8px 0 0; font-size: 12.5px; line-height: 1.45; color: #c8d0e0; word-break: keep-all; } #selCols p.why { color: #fff; font-weight: 800; font-size: 13px; }
#selKeys { position: absolute; left: 0; right: 0; bottom: 0; height: 64px; display: flex; align-items: center; justify-content: center; gap: 0; padding: 0 32px; background: rgba(7,9,15,0.95); border-top: 1px solid #2a3140; }
#selKeys .kgrp + .kgrp { margin-left: 32px; padding-left: 32px; border-left: 1px solid #2f3746; height: 34px; }
.selExit { position: absolute; right: 32px; bottom: 15px; height: 34px; }
/* 창 */
.panel { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); min-width: 420px; max-width: 700px; padding: 26px 30px; background: rgba(12,16,26,0.96); border: 1px solid rgba(255,255,255,0.16); border-radius: 8px; text-align: center; pointer-events: auto; }
.panel h2 { margin: 6px 0 14px; font-size: 30px; } .panel h2.red { color: #ff6a6a; }
.eyebrow { margin: 0; font-size: 12px; font-weight: 800; color: #ffd36e; letter-spacing: 1px; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 16px; } .btns.col { flex-direction: column; }
.keyline { margin: 16px 0 0; display: flex; justify-content: center; gap: 20px; }
.rank { display: flex; flex-direction: column; align-items: center; margin: 4px 0 10px; } .rank b { font-size: 56px; line-height: 1; color: #ffd36e; } .rank span { font-size: 12px; color: #a8b0c0; }
#clearStats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 24px; text-align: left; font-size: 14px; } #clearStats div { display: flex; justify-content: space-between; } #clearStats span { color: #a8b0c0; }
#loading { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 360px; text-align: center; } #loading .bar i { width: 0; }

#learned { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.fchip { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 12px; border: 2px solid var(--c); border-radius: 6px; color: var(--c); font-size: 14px; font-weight: 800; background: rgba(0,0,0,0.35); line-height: 1; }
.fchip b { color: #fff; font-size: 15px; }
#selCols .nm { justify-content: center; }

/* 게임 중 HUD(11-19 충쌤 "하단좌우에 이미지로 uiuxup"): 위 왼쪽 점수, 아래 왼쪽 목숨·폭탄 아이콘, 아래 오른쪽 원소와 미사일 단계 */
#hudScore { position: absolute; left: 22px; top: 14px; display: flex; flex-direction: column; gap: 0; text-shadow: 0 2px 0 #0b0f18, 0 0 10px rgba(0,0,0,0.6); }
#hudScore em { font-style: normal; font: 900 12px/1 system-ui, sans-serif; letter-spacing: 3px; color: #c8d2e4; }
#hudScore b { font: 900 34px/1.1 system-ui, sans-serif; color: #ffe26b; font-variant-numeric: tabular-nums; -webkit-text-stroke: 1px #3a2a08; }
.hpanel { position: absolute; bottom: 16px; display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 10px 14px; background: linear-gradient(180deg, rgba(14,19,32,0.88), rgba(8,11,20,0.92)); border: 1px solid rgba(255,255,255,0.16); border-radius: 6px; box-shadow: 0 4px 14px rgba(0,0,0,0.35); }
#hudBL { left: 16px; } #hudBR { right: 16px; flex-direction: row; align-items: center; gap: 14px; }
.hrow { display: flex; align-items: center; gap: 6px; height: 30px; }
.hrow svg { width: 30px; height: 30px; display: block; } .hrow svg.off { opacity: 0.22; }
#shipCard { display: flex; align-items: center; gap: 10px; }
#shipCard .tile { width: 52px; height: 52px; border: 2px solid var(--c); border-radius: 5px; display: flex; align-items: center; justify-content: center; background: #0b0f18; box-shadow: 0 0 12px color-mix(in srgb, var(--c) 45%, transparent) inset; }
#shipCard .tile b { font: 900 22px/1 system-ui, sans-serif; color: var(--c); }
#shipCard .tx { display: flex; flex-direction: column; justify-content: center; gap: 3px; } #shipCard .tx b { font-size: 15px; font-weight: 900; color: #fff; } #shipCard .tx small { font-size: 12px; font-weight: 800; color: var(--c); }
#hPower { display: flex; align-items: flex-end; gap: 5px; height: 52px; }
#hPower i { width: 9px; border-radius: 3px; background: #262c3a; border: 1px solid #3a4256; }
#hPower i.on { background: linear-gradient(0deg, var(--c), #ffffff); border-color: var(--c); box-shadow: 0 0 8px var(--c); }
#learned { gap: 6px; flex-wrap: nowrap; } .fchip { padding: 0 8px; gap: 5px; font-size: 13px; } .fchip b { font-size: 14px; }

/* 원소 먹을 때 대화창(11-20 충쌤 "화면 중앙 하단에 캐릭터 얼굴 1:1 비율 대화창 토스트"): 아래 HUD 사이 가운데, 아래에서 올라왔다가 아래로 내려가며 닫힘 */
#toastWrap { position: absolute; left: 50%; bottom: 0; width: 560px; height: 120px; transform: translateX(-50%); overflow: hidden; pointer-events: none; }
#toast { position: absolute; left: 0; right: 0; bottom: 16px; height: 88px; display: flex; align-items: center; gap: 14px; padding: 0 18px 0 11px; background: linear-gradient(180deg, rgba(14,19,32,0.96), rgba(8,11,20,0.97)); border: 1px solid rgba(255,255,255,0.16); border-left: 4px solid var(--c, #ffd36e); border-radius: 6px; box-shadow: 0 4px 14px rgba(0,0,0,0.35); transform: translateY(140px); transition: transform .22s ease-out; }
#toast.show { transform: translateY(0); }
#toastFace { flex: none; width: 66px; height: 66px; border-radius: 5px; border: 2px solid var(--c, #ffd36e); background: radial-gradient(circle at 50% 40%, #2a3448, #0b0f18); object-fit: cover; display: block; }
#toast .tt { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 7px; }
#toast .th { display: flex; align-items: center; gap: 10px; }
#toastHead { font-size: 21px; font-weight: 900; line-height: 1; color: var(--c, #ffd36e); text-shadow: 0 2px 0 #05070c; white-space: nowrap; }
#toastTag { display: inline-flex; align-items: center; justify-content: center; height: 22px; padding: 0 8px; border: 1px solid var(--c, #ffd36e); border-radius: 4px; font-size: 12px; font-weight: 900; line-height: 1; color: var(--c, #ffd36e); white-space: nowrap; }
#toastLine { margin: 0; font-size: 14.5px; font-weight: 700; line-height: 1.25; color: #e6ecf6; word-break: keep-all; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 고르기 칸: 조종사 얼굴(1:1) + 우주선 이름 + 조종사 줄. 겹치지 않게 가로로 */
#selCols .nm { justify-content: center; gap: 12px; } #selCols .nm .pf { flex: none; width: 52px; height: 52px; border: 2px solid #ffd36e; border-radius: 5px; object-fit: cover; display: block; background: #0b0f18; }
#selCols .nm .nt { display: flex; flex-direction: column; justify-content: center; gap: 4px; min-width: 0; } #selCols .nm .nt b { font-size: 20px; line-height: 1.1; } #selCols .nm .nt small { font-size: 12.5px; font-weight: 800; color: #a8b0c0; white-space: nowrap; }
#selCols .nm .nt em { font-style: normal; font-size: 12px; font-weight: 700; color: #d8dee8; white-space: nowrap; }

/* 소리 토글(오른쪽 위, 고르기·게임·멈춤 모두 같은 자리). 정사각·모서리 살짝 둥글게, 그림 가운데, 끄면 사선 */
#sndBar { position: absolute; right: 20px; top: 17px; display: flex; gap: 8px; z-index: 20; pointer-events: auto; }
.tg { width: 38px; height: 38px; padding: 0; border-radius: 8px; display: flex; align-items: center; justify-content: center; background: rgba(10,14,22,0.78); border: 1px solid rgba(255,255,255,0.24); color: #f4f6fb; }
.tg:hover { border-color: #ffd36e; }
.tg svg { width: 20px; height: 20px; display: block; }
.tg .x { display: none; stroke: #ff6a5a; }
.tg.off { color: #7e889a; }
.tg.off .x { display: inline; }
.tg.off .w { display: none; }
#select .top { padding-right: 190px; }

/* 11-22 충쌤 HUD: 원소 칸은 위 가운데, 폭탄은 왼쪽 위(점수 아래)·라이프는 오른쪽 위(소리 토글 아래), 상자 없이 그림만. 각각 최대 5 */
#hudBR { left: 50%; right: auto; top: 12px; bottom: auto; transform: translateX(-50%); padding: 8px 14px; }
#hudBR #shipCard .tile { width: 46px; height: 46px; } #hudBR #hPower { height: 46px; }
#bossbar { top: 92px; }
#hBombs, #hLives { position: absolute; top: 66px; height: 40px; gap: 4px; }
#hBombs { left: 18px; justify-content: flex-start; }
#hLives { right: 18px; justify-content: flex-end; }
.hrow img { width: 40px; height: 40px; display: block; object-fit: contain; filter: drop-shadow(0 0 1px #05070c) drop-shadow(0 0 1px #05070c) drop-shadow(0 2px 2px rgba(0,0,0,0.7)); }
.hrow img.off { filter: grayscale(1) brightness(0.42) contrast(0.6) drop-shadow(0 0 1px #05070c); }

/* 11-23 전체 화면 단추(소리 단추 옆, 같은 크기) · 모바일 */
.tg .fsout { display: none; } .tg.on .fsin { display: none; } .tg.on .fsout { display: inline; }
.tg.mob { display: none; }
html.mobile .tg.pc { display: none; } html.mobile .tg.mob { display: flex; }
html.mobile, html.mobile body { touch-action: none; -webkit-user-select: none; -webkit-touch-callout: none; position: fixed; inset: 0; width: 100%; height: 100%; }
html.mobile #frame { touch-action: none; }
html.mobile .tg { width: calc(46px / var(--k)); height: calc(46px / var(--k)); border-radius: calc(9px / var(--k)); } html.mobile .tg svg { width: calc(22px / var(--k)); height: calc(22px / var(--k)); }
html.mobile #sndBar { right: calc(10px / var(--k)); top: calc(8px / var(--k)); gap: calc(8px / var(--k)); }
html.mobile button:not(.tg) { min-height: calc(46px / var(--k)); height: auto; font-size: calc(15px / var(--k)); padding: 0 calc(16px / var(--k)); }
html.mobile .kc.w { display: none; }
html.mobile #select .top { padding-right: calc(170px / var(--k)); flex-wrap: nowrap; }
html.mobile #select .top h1 { white-space: nowrap; font-size: 26px; } html.mobile #select .top h1 small { display: none; }
html.mobile #stageSel { flex-wrap: nowrap; } html.mobile #stageSel button { white-space: nowrap; font-size: calc(12px / var(--k)); padding: 0 calc(10px / var(--k)); min-height: calc(44px / var(--k)); }
html.mobile #pause .btns.col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
html.mobile .keyline, html.mobile #selKeys { white-space: nowrap; }
html.mobile .keyline { display: grid; grid-template-columns: auto auto; justify-content: center; gap: 8px 28px; }
html.mobile .kgrp > em { font-size: calc(12px / var(--k)); } html.mobile .kgrp b { font-size: calc(13px / var(--k)); }
html.mobile .panel { max-height: calc(100% - 20px); }
html.mobile #selKeys .kgrp b, html.mobile .keyline .kgrp b { font-size: 15px; font-weight: 900; color: #f2f5fb; }
html.mobile #selKeys .kgrp + .kgrp { margin-left: 18px; padding-left: 18px; }
#fsGate, #rotateMsg { position: absolute; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; background: rgba(7,9,15,0.92); pointer-events: auto; }
.gbox { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 22px 30px; border: 1px solid #3a4256; border-radius: 10px; background: #111725; }
.gbox b { font-size: 24px; font-weight: 900; } .gbox span { font-size: 15px; color: #a8b0c0; }
#rotateMsg { display: none; }
@media (orientation: portrait) { html.mobile #rotateMsg { display: flex; } }
html.mobile #select .top h1 { display: none; } html.mobile #select .top { justify-content: flex-start; padding-left: calc(12px / var(--k)); }
html.mobile #hLives, html.mobile #hBombs { top: calc(62px / var(--k)); }
html.mobile #hudBR { top: calc(8px / var(--k)); }
html.mobile .gbox { gap: calc(8px / var(--k)); padding: calc(18px / var(--k)) calc(24px / var(--k)); border-radius: calc(10px / var(--k)); } html.mobile .gbox b { font-size: calc(20px / var(--k)); } html.mobile .gbox span { font-size: calc(14px / var(--k)); }
html.mobile #selKeys { height: calc(58px / var(--k)); justify-content: flex-start; padding-left: calc(14px / var(--k)); } html.mobile #selCols { bottom: calc(58px / var(--k)); }
html.mobile .selExit { right: calc(10px / var(--k)); bottom: calc(6px / var(--k)); height: auto; min-height: calc(46px / var(--k)); }
