:root { --pink: #ff4f7a; --cyan: #36e0ff; --gold: #ffcf3f; --ink: #10142c; --panel: rgba(16, 20, 44, .72); }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #151a3a; color: #fff; font-family: "Pretendard", -apple-system, "Malgun Gothic", sans-serif; user-select: none; -webkit-user-select: none; touch-action: none; overscroll-behavior: none; }
.hidden { display: none !important; }
#view { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; }
button { font: inherit; }

/* ---------- 처음 화면 ---------- */
.screen { position: fixed; inset: 0; display: flex; flex-direction: column; background: linear-gradient(90deg, rgba(12, 14, 36, .82) 0%, rgba(12, 14, 36, .45) 45%, rgba(12, 14, 36, 0) 75%); }
.top { display: flex; justify-content: space-between; align-items: flex-start; padding: max(12px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left)); gap: 10px; }
/* 🎵 음악 단추 (2026-10-31): 계정 칸 바로 아래 오른쪽 화면 끝에 따로 띄움 (위 띠에 넣으면 좁은 휴대폰에서 넘침). 꺼지면 흐리게 */
.mus { position: absolute; right: max(16px, env(safe-area-inset-right)); top: calc(max(12px, env(safe-area-inset-top)) + 50px); z-index: 2; width: 44px; height: 44px; padding: 0; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .18); background: rgba(20, 24, 56, .78); color: #fff; font-size: 19px; line-height: 1; cursor: pointer; backdrop-filter: blur(6px); transition: transform .08s, opacity .15s; }
.mus:active { transform: scale(.92); }
.mus.off { opacity: .45; filter: grayscale(1); }
.logo { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.logo h1 { margin: 0; line-height: 0; }
.logo img { display: block; width: clamp(200px, 34vw, 340px); height: auto; filter: drop-shadow(0 4px 0 rgba(0, 0, 0, .35)) drop-shadow(0 0 18px rgba(255, 79, 122, .35)); }
.logo small { font-size: 15px; font-style: normal; letter-spacing: 0; margin-left: 6px; color: #c9cff5; font-weight: 800; }
.home-main { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 10px max(16px, env(safe-area-inset-left)); gap: 14px; max-width: 520px; }
.menu { display: grid; gap: 10px; }
.mrow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.mbtn { display: grid; gap: 2px; text-align: left; padding: 14px 18px; border-radius: 16px; border: 1.5px solid rgba(255, 255, 255, .18); background: rgba(20, 24, 56, .78); color: #fff; cursor: pointer; backdrop-filter: blur(6px); transition: transform .08s, background .15s; }
.mbtn b { font-size: 21px; font-weight: 900; }
.mbtn small { color: #b9c0ea; font-size: 12.5px; font-weight: 600; }
.mbtn:hover { background: rgba(40, 46, 96, .85); }
.mbtn:active { transform: scale(.97); }
.mbtn.hot { background: linear-gradient(120deg, #ff4f7a, #ff8a4f); border-color: transparent; box-shadow: 0 10px 30px rgba(255, 79, 122, .35); }
.mbtn.hot small { color: #fff3; color: rgba(255, 255, 255, .85); }
.mbtn.sm { padding: 11px 12px; text-align: center; }
.mbtn.sm b { font-size: 16px; }
.mbtn.sm small { font-size: 11px; }
.hint { color: #aab2e0; font-size: 12px; margin: 0; line-height: 1.5; }
@media (pointer: coarse) { #homeHint { display: none; } }
@media (max-height: 460px) { .home-main { justify-content: flex-start; padding-top: 4px; gap: 8px; } .mbtn { padding: 9px 14px; } .mbtn b { font-size: 17px; } .menu { gap: 7px; } .mrow { gap: 7px; } .logo img { width: 190px; } .logo small { font-size: 12px; } }

/* 키트 칩은 어두운 배경 위 */
.kit-chip { box-shadow: 0 6px 20px rgba(0, 0, 0, .25); }

/* ---------- HUD ---------- */
#hud { position: fixed; inset: 0; pointer-events: none; font-weight: 800; }
#hud > * { position: absolute; }
#cross { left: 50%; top: 50%; width: 0; height: 0; --g: 8px; }
#cross i { position: absolute; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .45); border-radius: 1px; }
#cross .c-t, #cross .c-b { width: 2px; height: 9px; left: -1px; }
#cross .c-l, #cross .c-r { height: 2px; width: 9px; top: -1px; }
#cross .c-t { bottom: var(--g); } #cross .c-b { top: var(--g); } #cross .c-l { right: var(--g); } #cross .c-r { left: var(--g); }
#cross .c-d { width: 3px; height: 3px; left: -1.5px; top: -1.5px; border-radius: 50%; }
#cross.enemy i { background: #ff5a7a; }
#cross.hide { display: none; }
#cross.pulse { animation: crossPulse .16s ease-out; }
@keyframes crossPulse { 0% { transform: scale(1.5); } 100% { transform: scale(1); } }
#hitmark { left: 50%; top: 50%; width: 0; height: 0; opacity: 0; transition: opacity .18s; }
#hitmark i { position: absolute; width: 2.5px; height: 11px; background: #fff; left: -1.25px; top: -5.5px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .35); }
#hitmark i:nth-child(1) { transform: rotate(45deg) translateY(-12px); } #hitmark i:nth-child(2) { transform: rotate(135deg) translateY(-12px); }
#hitmark i:nth-child(3) { transform: rotate(225deg) translateY(-12px); } #hitmark i:nth-child(4) { transform: rotate(315deg) translateY(-12px); }
#hitmark.on { opacity: 1; transition: none; }
#hitmark.head i { background: #ffcf3f; }
#hitmark.kill i { background: #ff4f7a; height: 15px; }
#scope { inset: 0; display: none; }
#scope.on { display: block; }
#scope .sc-ring { position: absolute; left: 50%; top: 50%; width: min(86vh, 86vw); height: min(86vh, 86vw); transform: translate(-50%, -50%); border-radius: 50%; box-shadow: 0 0 0 200vmax rgba(5, 6, 14, .92), inset 0 0 40px rgba(0, 0, 0, .7); border: 3px solid #111; }
#scope .sc-h, #scope .sc-v { position: absolute; background: rgba(10, 10, 20, .9); }
#scope .sc-h { left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; }
#scope .sc-v { top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; }
#dmgDirs { left: 50%; top: 50%; width: 0; height: 0; }
.ddir { position: absolute; left: -70px; top: -70px; width: 140px; height: 140px; border-radius: 50%; border: 6px solid transparent; border-top-color: rgba(255, 90, 120, .95); filter: drop-shadow(0 0 6px rgba(255, 60, 90, .8)); transition: opacity .6s; }
#vignette { inset: 0; box-shadow: inset 0 0 120px 30px rgba(255, 60, 100, 0); transition: box-shadow .3s; }
#vignette.low { box-shadow: inset 0 0 130px 40px rgba(255, 60, 100, .45); }
#vignette.hit { box-shadow: inset 0 0 90px 25px rgba(255, 255, 255, .5); transition: none; }
#nums { inset: 0; }
.num { position: absolute; font-weight: 900; font-size: 17px; color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, .6); animation: numUp .8s ease-out forwards; transform: translate(-50%, -50%); }
.num.h { color: #ffcf3f; font-size: 21px; }
@keyframes numUp { 0% { opacity: 1; margin-top: 0; } 100% { opacity: 0; margin-top: -40px; } }
#radar { left: max(14px, env(safe-area-inset-left)); top: max(14px, env(safe-area-inset-top)); width: 132px; height: 132px; }
body.touch #radar { display: none; }
#topbar { left: 50%; top: max(8px, env(safe-area-inset-top)); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 4px; }
#timer { font-size: 22px; background: var(--panel); padding: 3px 14px; border-radius: 10px; font-variant-numeric: tabular-nums; }
#timer.warn { color: #ff7a9a; }
#score { display: flex; gap: 6px; font-size: 14px; }
#score span { background: var(--panel); padding: 3px 10px; border-radius: 8px; }
#score .t0 { background: rgba(74, 168, 255, .85); } #score .t1 { background: rgba(255, 154, 60, .85); }
#feed { right: max(10px, env(safe-area-inset-right)); top: max(10px, env(safe-area-inset-top)); display: grid; gap: 4px; justify-items: end; font-size: 13px; max-width: 46vw; }
.fe { background: var(--panel); padding: 4px 9px; border-radius: 8px; white-space: nowrap; animation: feIn .2s ease-out; }
.fe em { font-style: normal; color: #c9cff5; font-size: 11px; margin: 0 5px; padding: 1px 5px; border-radius: 4px; background: rgba(255, 255, 255, .12); }
.fe.me { box-shadow: 0 0 0 1.5px #ffcf3f; }
@keyframes feIn { from { transform: translateX(20px); opacity: 0; } }
#center { left: 50%; top: 30%; transform: translateX(-50%); text-align: center; display: grid; gap: 4px; justify-items: center; }
.cmsg { font-size: 22px; line-height: 1.35; font-weight: 900; text-shadow: 0 3px 0 rgba(0, 0, 0, .45); animation: pop .25s ease-out; }
.cmsg.big { font-size: 36px; color: #ffcf3f; font-style: italic; letter-spacing: -1px; }
.cmsg.kill { color: #ff6f91; }
@keyframes pop { from { transform: scale(1.6); opacity: 0; } }
#hpBox { left: max(16px, env(safe-area-inset-left)); bottom: max(14px, env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 10px; background: var(--panel); padding: 8px 12px; border-radius: 12px; }
.hp-bar { position: relative; width: 170px; height: 12px; border-radius: 6px; background: rgba(255, 255, 255, .15); overflow: hidden; }
.hp-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; }
#hpLag { background: #ff9ab0; width: 100%; transition: width .6s .2s; }
#hpFill { background: linear-gradient(90deg, #5fdc9a, #8ff0b8); width: 100%; z-index: 1; transition: width .08s; }
#hpFill.low { background: linear-gradient(90deg, #ff4f7a, #ff8aa4); }
#hpNum { font-size: 22px; min-width: 40px; font-variant-numeric: tabular-nums; }
#shieldTag { font-size: 12px; background: #36e0ff; color: #08203a; padding: 2px 7px; border-radius: 6px; }
#ammoBox { right: max(16px, env(safe-area-inset-right)); bottom: max(14px, env(safe-area-inset-bottom)); background: var(--panel); padding: 8px 14px; border-radius: 12px; text-align: right; min-width: 130px; }
#ammoBox small { display: block; color: #c9cff5; font-size: 12px; }
#ammo { font-size: 30px; font-variant-numeric: tabular-nums; }
#ammo.low { color: #ff7a9a; }
#ammoBox span { color: #aab2e0; font-size: 15px; }
#ammoBox em { font-style: normal; }
#rlBar { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .15); margin-top: 4px; overflow: hidden; visibility: hidden; }
#rlBar.on { visibility: visible; }
#rlBar i { display: block; height: 100%; width: 0; background: var(--cyan); }
#slots { z-index: 5; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; gap: 6px; }
.slot { width: 58px; height: 44px; border-radius: 10px; background: var(--panel); display: grid; place-items: center; font-size: 11px; color: #c9cff5; position: relative; border: 2px solid transparent; pointer-events: auto; }
.slot svg { width: 46px; height: 28px; }
.slot.on { border-color: var(--c, #fff); background: rgba(40, 46, 96, .9); color: #fff; }
.slot b { position: absolute; left: 5px; top: 2px; font-size: 10px; color: #8d95c4; }
#dead { left: 50%; top: 58%; transform: translateX(-50%); display: grid; gap: 4px; justify-items: center; background: var(--panel); padding: 12px 22px; border-radius: 14px; }
#deadBy { font-size: 20px; } #deadT { color: #c9cff5; font-size: 14px; }
#board { z-index: 6; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, 92vw); max-height: 80vh; overflow: auto; background: rgba(12, 15, 36, .92); border-radius: 16px; padding: 14px; pointer-events: auto; }
.bd-row { display: grid; grid-template-columns: 26px 1fr 50px 50px 60px; gap: 6px; padding: 6px 8px; border-radius: 8px; align-items: center; font-size: 14px; }
.bd-row.h { color: #8d95c4; font-size: 12px; }
.bd-row.me { background: rgba(255, 207, 63, .15); }
.bd-row .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.bd-team { font-size: 13px; margin: 8px 0 2px; padding-left: 6px; }
#menuBtn { right: max(16px, env(safe-area-inset-right)); top: 50%; display: none; }
#lockHint { left: 50%; top: 62%; transform: translateX(-50%); background: var(--panel); padding: 10px 16px; border-radius: 12px; font-size: 15px; }

/* 휴대폰 버튼 */
#touchZone { inset: 0; pointer-events: auto; touch-action: none; }
#touchZone { --u: calc(1px * var(--tbs, 1)); --R: max(16px, env(safe-area-inset-right)); --L: max(16px, env(safe-area-inset-left)); --B: max(10px, env(safe-area-inset-bottom)); }
#joy { position: absolute; left: 0; top: 0; width: calc(120 * var(--u)); height: calc(120 * var(--u)); border-radius: 50%; background: rgba(255, 255, 255, .1); border: 2px solid rgba(255, 255, 255, .3); pointer-events: none; }
#joy i { position: absolute; left: calc(35 * var(--u)); top: calc(35 * var(--u)); width: calc(50 * var(--u)); height: calc(50 * var(--u)); border-radius: 50%; background: rgba(255, 255, 255, .55); box-shadow: 0 2px 10px rgba(0, 0, 0, .3); }
#joy.idle { left: calc(var(--L) + 24px); top: auto; bottom: calc(var(--B) + 56 * var(--u)); opacity: .5; }
.tb { position: absolute; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .16); border: 2px solid rgba(255, 255, 255, .35); color: #fff; font-size: calc(13 * var(--u)); font-weight: 900; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.tb span { pointer-events: none; }
.tb.down { background: rgba(255, 255, 255, .4); transform: scale(.94); }
.tb-jump { width: calc(66 * var(--u)); height: calc(66 * var(--u)); right: var(--R); bottom: calc(var(--B) + 30 * var(--u)); }
.tb-fire { width: calc(92 * var(--u)); height: calc(92 * var(--u)); right: calc(var(--R) + 70 * var(--u)); bottom: calc(var(--B) + 90 * var(--u)); background: rgba(255, 79, 122, .45); border-color: rgba(255, 140, 170, .8); font-size: calc(16 * var(--u)); }
.tb-ads { width: calc(58 * var(--u)); height: calc(58 * var(--u)); right: var(--R); bottom: calc(var(--B) + 110 * var(--u)); }
.tb-ads.on { background: rgba(54, 224, 255, .5); }
.tb-reload { width: calc(54 * var(--u)); height: calc(54 * var(--u)); right: calc(var(--R) + 170 * var(--u)); bottom: calc(var(--B) + 40 * var(--u)); }
.tb-next { width: calc(54 * var(--u)); height: calc(54 * var(--u)); right: calc(var(--R) + 160 * var(--u)); bottom: calc(var(--B) + 160 * var(--u)); }
.tb-fire2 { width: calc(64 * var(--u)); height: calc(64 * var(--u)); left: calc(var(--L) + 8px); bottom: calc(var(--B) + 196 * var(--u)); background: rgba(255, 79, 122, .35); border-color: rgba(255, 140, 170, .6); }
#touchZone.nofire2 .tb-fire2 { display: none; }
.tb-board { width: 44px; height: 44px; left: calc(var(--L) + 4px); top: 12px; font-size: 11px; }
.tb-menu { width: 44px; height: 44px; left: calc(var(--L) + 56px); top: 12px; font-size: 13px; }
body.touch #hpBox { bottom: auto; top: max(64px, env(safe-area-inset-top)); left: max(14px, env(safe-area-inset-left)); padding: 5px 9px; }
body.touch .hp-bar { width: 110px; }
body.touch #hpNum { font-size: 17px; }
body.touch #ammoBox { bottom: auto; top: max(64px, env(safe-area-inset-top)); right: auto; left: calc(max(14px, env(safe-area-inset-left)) + 210px); padding: 4px 10px; min-width: 96px; }
body.touch #ammo { font-size: 20px; }
body.touch #feed { font-size: 11px; }
body.touch #slots { bottom: max(8px, env(safe-area-inset-bottom)); }
body.touch .slot { width: calc(52px * var(--sls, 1)); height: calc(40px * var(--sls, 1)); }
body.touch .slot svg { width: calc(44px * var(--sls, 1)); height: calc(26px * var(--sls, 1)); }
body.touch #feed { top: 8px; }
body.touch #lockHint { display: none !important; }
body.touch #dead { top: 64%; padding: 8px 16px; }
body.touch #deadBy { font-size: 16px; }
body.touch #deadT { font-size: 12px; }

#rotate { position: fixed; inset: 0; z-index: 8000; display: grid; place-items: center; background: rgba(12, 14, 36, .94); text-align: center; padding: 24px; }
#rotate b { display: block; font-size: 22px; margin-bottom: 8px; }
#rotate small { color: #b9c0ea; }

/* ---------- 창 (키트 모양 위에 게임 내용) ---------- */
.ok-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 10px; }
.ok-tabs button { flex: 1; min-width: 70px; padding: 9px 6px; border-radius: 12px; border: 1.5px solid #ece8f4; background: #fff; font-weight: 800; color: #7a809c; cursor: pointer; }
.ok-tabs button.on { background: #2f3550; color: #fff; border-color: #2f3550; }
.ok-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.ok-card { border: 1.5px solid #ece8f4; border-radius: 14px; padding: 10px; display: grid; gap: 5px; background: #fff; text-align: left; position: relative; }
.ok-card.on { border-color: var(--c, #8b7cf6); box-shadow: 0 0 0 2px var(--c, #8b7cf6) inset; }
.ok-card.lock { opacity: .55; }
.ok-card .art { height: 46px; display: grid; place-items: center; border-radius: 10px; background: #f4f2fb; }
.ok-card b { font-size: 15px; }
.ok-card small { color: #7a809c; font-size: 12px; line-height: 1.4; }
.ok-card .lv { position: absolute; right: 10px; top: 8px; font-weight: 900; color: #ff7a59; font-size: 14px; }
.stat { display: grid; grid-template-columns: 44px 1fr; align-items: center; gap: 6px; font-size: 11px; color: #7a809c; }
.stat div { height: 6px; border-radius: 3px; background: #efedf6; overflow: hidden; }
.stat i { display: block; height: 100%; background: var(--c, #8b7cf6); border-radius: 3px; }
.enh-box { display: grid; gap: 10px; text-align: center; }
.enh-big { font-size: 46px; font-weight: 900; color: #2f3550; }
.enh-big em { font-style: normal; color: #ff7a59; }
.enh-tbl { display: grid; grid-template-columns: 1fr auto auto auto; gap: 4px 10px; font-size: 13px; text-align: left; background: #f8f7fc; border-radius: 12px; padding: 10px 12px; }
.enh-tbl .up { color: #1fa865; font-weight: 800; }
.enh-anim { animation: enhPop .5s ease-out; }
.enh-anim.fail { animation: enhShake .4s; }
@keyframes enhPop { 0% { transform: scale(1); } 40% { transform: scale(1.35); color: #ffb800; } 100% { transform: scale(1); } }
@keyframes enhShake { 25% { transform: translateX(-8px); } 50% { transform: translateX(8px); } 75% { transform: translateX(-4px); } }
.pick { display: flex; gap: 6px; flex-wrap: wrap; }
.pick button { flex: 1; min-width: 64px; padding: 10px 8px; border-radius: 12px; border: 1.5px solid #ece8f4; background: #fff; font-weight: 800; color: #4a5070; cursor: pointer; }
.pick button.on { background: #ff4f7a; border-color: #ff4f7a; color: #fff; }
.pick button small { display: block; font-size: 11px; font-weight: 600; opacity: .8; }
.set-row { display: grid; gap: 6px; margin: 10px 0; text-align: left; }
.set-row > span { font-weight: 800; font-size: 13px; color: #7a809c; }
.set-row input[type=range] { width: 100%; }
.res-list { display: grid; gap: 4px; margin: 8px 0; }
.res-row { display: grid; grid-template-columns: 28px 1fr 46px 46px; gap: 6px; align-items: center; padding: 7px 10px; border-radius: 10px; background: #f8f7fc; font-size: 14px; text-align: left; }
.res-row.me { background: #fff4d6; font-weight: 800; }
.res-row .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }
.res-gold { font-size: 26px; font-weight: 900; color: #f5a524; text-align: center; }
.res-title { font-size: 30px; font-weight: 900; text-align: center; margin: 2px 0; }
.res-title.win { color: #ff4f7a; }
.dex-sec { margin: 12px 0 6px; font-weight: 900; font-size: 15px; text-align: left; }
.medal { font-size: 11px; font-weight: 800; padding: 1px 6px; border-radius: 6px; background: #f1eefc; color: #7a6ad8; }
.kit-sheet { max-height: 92vh; }

/* 처치 배지·처음 화면 기록 카드 */
#vignette.kill { box-shadow: inset 0 0 110px 26px rgba(255, 207, 63, .45); transition: none; }
#kbadges { left: 50%; top: 58%; transform: translateX(-50%); display: flex; gap: 6px; }
.kbadge { display: grid; justify-items: center; animation: kb 1.3s ease-out forwards; }
.kbadge svg { width: 44px; height: 44px; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .35)); }
.kbadge b { font-size: 16px; color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, .5); }
.kbadge b small { color: #ffcf3f; }
@keyframes kb { 0% { transform: scale(2); opacity: 0; } 12% { transform: scale(1); opacity: 1; } 75% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(-24px); } }
.home-card { display: grid; gap: 8px; background: rgba(20, 24, 56, .7); border: 1.5px solid rgba(255, 255, 255, .14); border-radius: 16px; padding: 10px 14px; backdrop-filter: blur(6px); }
.home-card:empty { display: none; }
.hc-row { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: #b9c0ea; }
.hc-row b { color: #fff; font-size: 15px; }
.hc-guns { display: flex; flex-wrap: wrap; gap: 6px; }
.hc-guns i { font-style: normal; font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 99px; background: color-mix(in srgb, var(--c) 25%, transparent); border: 1.5px solid var(--c); color: #fff; }
.hc-guns i em { font-style: normal; color: #ffcf3f; margin-left: 3px; }
.hc-guns i.more { border-style: dashed; border-color: rgba(255, 255, 255, .3); background: none; color: #b9c0ea; }
@media (max-height: 460px) { .home-card { padding: 6px 10px; gap: 5px; } .hc-row { font-size: 12px; } }

.hp-sec { text-align: left; margin: 10px 0; }
.hp-sec h3 { margin: 0 0 6px; font-size: 15px; }
.hp-sec ul { margin: 0; padding-left: 18px; line-height: 1.7; font-size: 13.5px; color: #4a5070; }
.hp-w { border-left: 4px solid var(--c); padding: 4px 10px; margin: 6px 0; display: grid; }
.hp-w b { font-size: 14px; } .hp-w small { color: #7a809c; font-size: 12px; }

.ar-prev { display: block; width: 100%; height: 170px; border-radius: 16px; background: radial-gradient(ellipse at 50% 80%, #e9e4ff, #f7f5ff 70%); margin-bottom: 4px; }
.ok-card .art[data-try] { cursor: pointer; }

.ach-list { display: grid; gap: 6px; }
.ach { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; border-radius: 12px; background: #f8f7fc; text-align: left; }
.ach div { display: grid; } .ach b { font-size: 14px; } .ach small { color: #7a809c; font-size: 12px; }
.ach > span { font-size: 12px; color: #a0a5bf; font-weight: 800; white-space: nowrap; }
.ach.got { opacity: .6; } .ach.ready { background: #fff6dc; box-shadow: 0 0 0 1.5px #ffcf3f inset; }
.mbtn.badge { position: relative; } .mbtn.badge::after { content: ''; position: absolute; right: 8px; top: 8px; width: 10px; height: 10px; border-radius: 50%; background: #ff4f7a; box-shadow: 0 0 0 2px #fff; }

#score .zone { background: rgba(255,255,255,.18); } #score .zone.z0 { background: rgba(74,168,255,.6); } #score .zone.z1 { background: rgba(255,154,60,.6); } #score .zone.z-2 { background: rgba(255,90,122,.7); }

.fe .fi { width: 22px; height: 14px; vertical-align: -3px; margin-right: 3px; }
.fe .hd { color: #ffcf3f; }

/* 버튼 위치 바꾸기 (js/touchlayout.js) */
#joy { width: calc(120 * var(--u) * var(--js, 1)); height: calc(120 * var(--u) * var(--js, 1)); }
#joy i { left: calc(35 * var(--u) * var(--js, 1)); top: calc(35 * var(--u) * var(--js, 1)); width: calc(50 * var(--u) * var(--js, 1)); height: calc(50 * var(--u) * var(--js, 1)); }
.tb.tl, #slots.tl { transform: translate(-50%, -50%) scale(var(--ts, 1)); }
.tb.tl.down { transform: translate(-50%, -50%) scale(calc(var(--ts, 1) * .92)); }
#touchZone.nofire2 .tb-fire2.tl, #touchZone.tl-all .tb-fire2 { display: grid; }
body.tl-editing #hud { z-index: 9001; pointer-events: none; }
body.tl-editing #hud > *:not(#touchZone):not(#slots) { visibility: hidden; }
body.tl-editing #touchZone { pointer-events: none; }
body.tl-editing #touchZone .tb, body.tl-editing #joy, body.tl-editing #slots { pointer-events: auto; cursor: grab; touch-action: none; outline: 2px dashed rgba(255, 255, 255, .75); outline-offset: 3px; }
body.tl-editing #joy { opacity: .85; }
body.tl-editing #slots .slot { pointer-events: none; }
body.tl-editing .tl-sel { outline: 3px solid #ffd84a !important; }
body.tl-editing .tl-bad { outline: 3px solid #ff4f6a !important; }
#tlBack { position: fixed; inset: 0; z-index: 9000; background: repeating-linear-gradient(45deg, rgba(14, 16, 40, .86) 0 22px, rgba(20, 24, 56, .86) 22px 44px); }
#tlPanel { position: fixed; z-index: 9002; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(340px, calc(100vw - 32px)); max-height: calc(100vh - 24px); overflow: auto; padding: 12px 14px; border-radius: 16px; background: rgba(24, 28, 66, .94); border: 1px solid rgba(255, 255, 255, .18); color: #fff; display: flex; flex-direction: column; gap: 8px; font-size: 13px; box-shadow: 0 10px 30px rgba(0, 0, 0, .45); }
#tlPanel small { color: #b9c0ee; font-size: 12px; }
#tlPanel label { display: flex; flex-direction: column; gap: 4px; font-weight: 800; }
#tlPanel label.tl-chk { flex-direction: row; align-items: center; gap: 8px; font-weight: 700; }
#tlPanel input[type=range] { width: 100%; }
#tlPanel .tl-btns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
@media (max-height: 430px) { #tlPanel { top: 8px; transform: translateX(-50%); padding: 8px 12px; gap: 5px; } #tlPanel small { display: none; } }
#tlPanel .tl-btns button { padding: 8px 12px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .1); color: #fff; font: inherit; font-weight: 800; }
#tlPanel .tl-btns #tlSave { background: #ff4f7a; border-color: #ff4f7a; }
#tlPanel .tl-btns #tlReset { background: transparent; }

/* 결과 화면: 골드 반짝 · 색종이 */
.res-gold.pop { animation: goldPop .45s ease-out; }
@keyframes goldPop { 0% { transform: scale(1); } 40% { transform: scale(1.25); text-shadow: 0 0 18px rgba(255, 207, 63, .9); } 100% { transform: scale(1); } }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; border-radius: inherit; }
.confetti i { position: absolute; top: -12px; width: 8px; height: 13px; border-radius: 2px; animation: confFall 2.2s cubic-bezier(.2, .6, .4, 1) forwards; }
@keyframes confFall { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 100% { transform: translate(var(--dx), 520px) rotate(var(--r)); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .confetti { display: none; } }
/* 좁은 휴대폰(≤520px): 로고를 줄이고 계정 칸이 남은 너비 안에서 줄어들게 → 오른쪽이 잘리지 않음 (아이디·돈이 길면 … 로 줄임) */
@media (max-width: 520px) {
  .logo img { width: clamp(128px, 38vw, 200px); }
  .logo small { font-size: 11.5px; margin-left: 2px; }
  #accountSlot { min-width: 0; flex: 0 1 auto; }
  #accountSlot .kit-chip { max-width: 100%; }
  #accountSlot .kc-me { min-width: 0; padding: 5px 9px 5px 11px; }
  #accountSlot .kc-me b, #accountSlot .kc-me span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #accountSlot .kc-shop { padding: 0 11px; white-space: nowrap; }
}

/* 좁은 휴대폰: 손님 계정 칸(💾 가입 붙음)이 남은 너비 안에서 줄어들게 → 오른쪽이 잘리지 않음 (2026-10-31) */
@media (max-width: 520px) {
  #accountSlot .kc-me { padding: 5px 7px 5px 10px; }
  #accountSlot .kc-rank { flex: none; padding: 0 6px; }
  #accountSlot .kc-shop, #accountSlot .kc-save { flex: none; padding: 0 8px; }
  #accountSlot .kit-chip button { white-space: nowrap; }
}
/* 아주 좁은 휴대폰(≤400px) 손님: 칩의 🏆 칸을 숨겨 이름·골드가 보이게 (가입하면 다시 보임) */
@media (max-width: 400px) { #accountSlot .kit-chip:has(.kc-save) .kc-rank { display: none; } }

/* 연습전 준비 창: 맵·방식·봇·시간을 다 내리지 않아도 시작 버튼이 늘 아래에 보이게 (2026-11-01). bottom·margin 의 -22px = kit-sheet 아래 padding (크롬은 sticky 를 padding 안쪽 기준으로 붙임) */
.kit-actions.sticky-go { position: sticky; bottom: -22px; z-index: 3; margin: 14px -20px -22px; padding: 12px 20px 18px; background: var(--kit-card, #fff); box-shadow: 0 -10px 18px -12px rgba(40, 30, 90, .35); }

/* 아주 좁은 휴대폰: 계정 칸에 🏠 가 생겨서 골드가 잘리지 않게 칸 여백을 조금 줄임 (2026-11-01) */
@media (max-width: 380px) { #accountSlot .kc-home { padding: 0 4px 0 8px; font-size: 15px; } #accountSlot .kc-rank { padding: 0 4px; } #accountSlot .kc-shop { padding: 0 7px; } .logo img { width: clamp(112px, 32vw, 200px); } .logo small { font-size: 10.5px; white-space: nowrap; } #accountSlot .kc-me { padding: 5px 5px 5px 8px; } }
/* ⚡ 빠른 대전 (친구와 대전 창 맨 위): 방식 고르기 + 큰 단추 */
.qm-box { display: grid; gap: 8px; margin: 0 0 12px; padding: 10px; border-radius: 16px; background: #f4f2ff; }
.qm-box .pick button { min-height: 44px; }
.qm-box .qm-go { width: 100%; min-height: 52px; font-size: 18px; }
.qm-box .kit-fine { margin: 0; font-size: 12.5px; color: #6b7190; text-align: center; }
/* 빠른 대전 채팅 창이 열려 있으면 '⛶ 전체 화면으로' 단추를 숨김 (창의 ✕ 닫기 단추를 가리지 않게) */
body:has(.qm-panel) .or-fs { display: none !important; }

/* 🎬 첫 화면 (kit/title.css 위에 이 게임 색·밤하늘 격자·떠다니는 물감·로봇·물감 총알) */
#title { --lt-a: #ff4f7a; --lt-b: #7b6cff; --lt-ink: #2f3550; --lt-muted: #6b7190; --lt-brand: #6d5fe8; --lt-sh: #4b3fc0; --lt-glow: rgba(10, 14, 50, .38); --lt-bgc: #1a1f4a;
  --lt-fade: radial-gradient(ellipse at 50% 47%, rgba(255, 255, 255, .96) 0, rgba(255, 255, 255, .78) 34%, rgba(255, 255, 255, 0) 64%);
  background-image: linear-gradient(rgba(120, 140, 255, .13) 2px, transparent 2px), linear-gradient(90deg, rgba(120, 140, 255, .13) 2px, transparent 2px), radial-gradient(ellipse at 50% 120%, #3a2f7a 0, #1a1f4a 60%);
  background-size: 56px 56px, 56px 56px, 100% 100%; }
#title .ok-o { filter: drop-shadow(0 7px 10px rgba(10, 14, 50, .28)); }
#title .ok-o svg { width: 100%; height: auto; }
#title .s1 { width: 120px; top: 6%; left: -14px; --r: -10deg; } #title .s2 { width: 96px; top: 13%; right: 3%; --r: 25deg; } #title .s3 { width: 110px; bottom: 5%; left: 6%; --r: 60deg; }
#title .s4 { width: 130px; bottom: -20px; right: -14px; } #title .s5 { width: 60px; top: 3%; left: 42%; }
#title .b1 { width: 70px; top: 22%; left: 20%; --r: -12deg; } #title .b2 { width: 62px; bottom: 20%; right: 7%; --r: 10deg; } #title .b3 { width: 58px; bottom: 16%; left: 30%; --r: -6deg; }
#title .p1 { width: 46px; top: 30%; right: 20%; } #title .p2 { width: 42px; bottom: 28%; left: 4%; --r: 200deg; } #title .p3 { width: 38px; top: 42%; left: 3%; --r: 20deg; }
@media (max-width: 600px) {
  #title .s2 { top: 14%; } #title .s5 { top: 14%; left: 40%; } #title .b1 { top: 20%; left: 6%; } #title .p1 { top: 26%; right: 6%; } #title .b3 { bottom: 14%; left: 46%; } #title .b2 { bottom: 17%; } #title .p2 { bottom: 4%; left: 40%; }
}
@media (orientation: landscape) and (max-height: 500px) {
  #title .s1 { width: 84px; } #title .s2 { width: 70px; top: 22%; right: 4%; } #title .s3 { width: 76px; } #title .s4 { width: 90px; } #title .s5 { width: 44px; top: 4%; left: 26%; }
  #title .b1 { width: 52px; top: 30%; left: 14%; } #title .b2 { width: 46px; bottom: 24%; right: 16%; } #title .b3 { width: 44px; bottom: 6%; left: 26%; }
  #title .p1 { width: 34px; top: 40%; right: 24%; } #title .p2 { width: 32px; } #title .p3 { width: 30px; }
}
