:root { --bg-top: #63dff5; --bg-bot: #1c9bd3; --ink: #06223a; --gold: #ffc62e; --cyan: #7ae6ff; --pink: #ff5c7a; --font: var(--kp-font, system-ui, 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif); --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px); }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none; background: linear-gradient(180deg, var(--bg-top), var(--bg-bot)); color: #fff; font-family: var(--font); font-synthesis: none; user-select: none; -webkit-user-select: none; touch-action: none; }
#c { position: fixed; top: 0; left: 0; width: 100%; height: 100%; display: block; touch-action: none; }
button { font: inherit; color: inherit; border: 0; cursor: pointer; background: none; }
[hidden] { display: none !important; }
i { display: inline-block; flex: none; font-style: normal; }
svg { display: block; width: 100%; height: 100%; }
#flash, #hurt { position: fixed; inset: 0; pointer-events: none; opacity: 0; z-index: 12; }
#flash.gold { background: radial-gradient(circle, rgba(255,240,160,.0), rgba(255,210,60,.55)); }
#flash.go { animation: fl .5s ease-out 1; }
@keyframes fl { 0% { opacity: .9 } 100% { opacity: 0 } }
#hurt { background: radial-gradient(circle at 50% 45%, rgba(255,0,0,0) 40%, rgba(255,40,40,.55)); }
#hurt.on { animation: fl .7s ease-out 1; }
/* HUD */
#hud { position: fixed; top: 0; bottom: 0; left: var(--cl, 0px); width: var(--cw, 100vw); pointer-events: none; z-index: 10; }
#hud > * { position: absolute; }
.track { display: block; height: 100%; border-radius: 999px; background: rgba(5, 30, 55, .45); overflow: hidden; box-shadow: inset 0 0 0 2px rgba(255,255,255,.25); }
.track u { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #7ae6ff, #35c0ff); border-radius: 999px; }
.bar-o2 { left: 12px; top: calc(var(--safe-t) + 12px); width: 132px; height: 30px; display: flex; align-items: center; gap: 8px; }
.bar-o2 i { width: 30px; height: 30px; color: #bff4ff; filter: drop-shadow(0 2px 0 rgba(0,40,70,.4)); }
.bar-o2 .track { flex: 1; height: 16px; }
.bar-o2 b { font-size: 16px; font-weight: 700; min-width: 28px; text-shadow: 0 2px 0 rgba(0,40,70,.5); }
.bar-o2.low .track u { background: linear-gradient(90deg, #ff9a5c, #ff4a4a); }
#hearts { left: 12px; top: calc(var(--safe-t) + 50px); display: flex; gap: 4px; }
#hearts i { width: 26px; height: 26px; color: #ff4f6d; filter: drop-shadow(0 2px 0 rgba(60,0,20,.45)); }
#hearts i.off { color: rgba(10, 30, 60, .45); filter: none; }
#objchip { left: 152px; top: calc(var(--safe-t) + 9px); display: flex; align-items: center; gap: 6px; padding: 5px 12px 5px 8px; border-radius: 999px; background: rgba(5, 30, 55, .5); box-shadow: inset 0 0 0 2px rgba(255,255,255,.22); }
#objchip i { width: 26px; height: 26px; color: var(--gold); }
#objchip b { font-size: 20px; font-weight: 700; min-width: 18px; }
#objdots { display: flex; gap: 4px; margin-left: 4px; }
#objdots u { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.3); }
#objdots u.on { background: var(--gold); } #objdots u.cur { background: #fff; }
.ic-btn { pointer-events: auto; width: 44px; height: 44px; padding: 10px; border-radius: 14px; background: rgba(5, 30, 55, .5); color: #fff; box-shadow: inset 0 0 0 2px rgba(255,255,255,.22); }
#btnPause { right: 12px; top: calc(var(--safe-t) + 8px); }
.pill { display: flex; align-items: center; gap: 6px; padding: 4px 12px 4px 8px; border-radius: 999px; background: rgba(5, 30, 55, .5); box-shadow: inset 0 0 0 2px rgba(255,255,255,.22); }
#coins { right: 12px; top: calc(var(--safe-t) + 58px); }
#coins i { width: 22px; height: 22px; color: var(--gold); } #coins b { font-size: 19px; font-weight: 700; }
#depth { left: 14px; top: calc(var(--safe-t) + 84px); font-size: 15px; font-weight: 500; opacity: .85; text-shadow: 0 2px 0 rgba(0,40,70,.5); }
#combo { right: 14px; top: 38%; text-align: right; }
#combo b { display: block; font-size: 40px; font-weight: 700; color: var(--gold); -webkit-text-stroke: 4px #5a2a00; paint-order: stroke fill; line-height: 1; }
#combo .track { display: block; width: 70px; height: 8px; margin: 4px 0 0 auto; } #combo .track u { background: var(--gold); }
#boss { left: 50%; top: calc(var(--safe-t) + 100px); transform: translateX(-50%); width: min(70vw, 300px); display: flex; align-items: center; gap: 8px; }
#boss i { width: 30px; height: 30px; color: #ff6a6a; } #boss .track { flex: 1; height: 16px; } #boss .track u { background: linear-gradient(90deg, #ff9a5c, #ff3a3a); }
#slots { left: 50%; bottom: calc(var(--safe-b) + 14px); transform: translateX(-50%); display: flex; gap: 8px; }
#slots i { width: 34px; height: 34px; color: rgba(255,255,255,.28); transition: color .1s; } #slots i.on { color: #fff; filter: drop-shadow(0 2px 0 rgba(0,40,70,.5)); }
/* 조준 링 */
#ret { position: fixed; z-index: 11; width: 90px; height: 90px; transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none; background: conic-gradient(#ffe14a calc(var(--p, 0) * 360deg), rgba(255,255,255,.25) 0); -webkit-mask: radial-gradient(circle, transparent calc(50% - 7px), #000 calc(50% - 6px)); mask: radial-gradient(circle, transparent calc(50% - 7px), #000 calc(50% - 6px)); }
#ret.full { background: #ff7a2e; }
/* 팝업 */
#pops { position: fixed; inset: 0; pointer-events: none; z-index: 11; overflow: hidden; }
.pop { position: absolute; transform: translate(-50%, -50%); font-weight: 700; font-size: 24px; white-space: nowrap; color: #fff; -webkit-text-stroke: 4px #07304f; paint-order: stroke fill; text-shadow: 0 3px 0 rgba(0,30,60,.4); }
.pop.gold { color: var(--gold); -webkit-text-stroke-color: #5a2a00; } .pop.big { font-size: 34px; } .pop.red { color: #ff7a8a; -webkit-text-stroke-color: #4a0010; } .pop.air { color: #bff4ff; } .pop.perf { color: #ffe14a; -webkit-text-stroke-color: #7a2c00; font-size: 28px; }
#banner { position: fixed; left: 50%; top: 36%; transform: translate(-50%, -50%); z-index: 13; pointer-events: none; text-align: center; opacity: 0; transition: opacity .35s; width: 90vw; }
#banner.on { opacity: 1; }
#banner b { display: block; font-size: 44px; font-weight: 700; color: #fff; -webkit-text-stroke: 6px #0a3a5e; paint-order: stroke fill; text-shadow: 0 6px 0 rgba(0,30,60,.35); line-height: 1.1; }
#banner small { display: block; margin-top: 4px; font-size: 22px; font-weight: 500; opacity: .9; text-shadow: 0 2px 0 rgba(0,30,60,.5); }
#banner.combo b { color: var(--gold); -webkit-text-stroke-color: #5a2a00; } #banner.warn b { color: #ff6a6a; -webkit-text-stroke-color: #4a0010; }
#warns i { position: fixed; top: 54%; width: 44px; height: 44px; color: #ff4a4a; opacity: 0; filter: drop-shadow(0 2px 0 rgba(60,0,0,.5)); z-index: 11; } #warns .wl { left: calc(var(--cl, 0px) + 8px); } #warns .wr { left: calc(var(--cl, 0px) + var(--cw, 100vw) - 52px); }
#warns.on.l .wl, #warns.on.r .wr { opacity: 1; }
/* 시트(장비·스테이지) */
.sheet-wrap { position: fixed; inset: 0; z-index: 40; background: rgba(2, 18, 40, .6); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: min(100vw, 460px); max-height: 82vh; overflow: auto; background: linear-gradient(180deg, #14588f, #0b3358); border-radius: 26px 26px 0 0; padding: 14px 14px calc(var(--safe-b) + 18px); box-shadow: 0 -10px 40px rgba(0,0,0,.4); }
.sheet-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.bank { display: flex; align-items: center; gap: 8px; font-size: 26px; font-weight: 700; } .bank i { width: 30px; height: 30px; color: var(--gold); }
.row { display: flex; align-items: center; gap: 10px; padding: 10px; margin-bottom: 8px; border-radius: 18px; background: rgba(255,255,255,.1); }
.row .ic { width: 34px; height: 34px; color: var(--cyan); } .row .nm { flex: 1; font-size: 18px; font-weight: 700; }
.pips { display: flex; gap: 4px; } .pips u { width: 10px; height: 18px; border-radius: 4px; background: rgba(255,255,255,.22); } .pips u.on { background: var(--gold); }
.row button { min-width: 96px; height: 44px; border-radius: 14px; background: linear-gradient(180deg, #ffb13b, #ff7a1a); box-shadow: 0 4px 0 #c4520a; font-size: 18px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 4px; }
.row button .ic.s { width: 20px; height: 20px; color: #fff3b0; } .row button:disabled { background: rgba(255,255,255,.18); box-shadow: none; opacity: .7; }
#stageList { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
#stageList button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 8px; border-radius: 20px; background: rgba(255,255,255,.12); font-weight: 700; }
#stageList b { font-size: 38px; line-height: 1; } #stageList span { font-size: 17px; font-weight: 500; } #stageList .ic { width: 28px; height: 28px; color: var(--cyan); } #stageList button.boss .ic { color: #ff7a7a; } #stageList button:disabled { opacity: .45; }
@media (prefers-reduced-motion: reduce) { #flash.go, #hurt.on { animation-duration: .01s; } }

#dexList { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cell { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border-radius: 16px; background: rgba(255,255,255,.08); min-height: 92px; }
.cell .ic { width: 34px; height: 34px; opacity: .5; } .cell.on { background: rgba(255,255,255,.16); } .cell.on .ic { opacity: 1; }
.cell b { overflow-wrap: anywhere; max-width: 100%; font-size: 13px; font-weight: 700; text-align: center; line-height: 1.15; } .cell u { text-decoration: none; font-size: 14px; color: var(--gold); font-weight: 700; }
.pop.name { font-size: 15px; font-weight: 500; -webkit-text-stroke: 3px #07304f; opacity: .95; }
