:root {
  --bone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 52 32'%3E%3Ccircle cx='9' cy='9' r='8'/%3E%3Ccircle cx='9' cy='23' r='8'/%3E%3Ccircle cx='43' cy='9' r='8'/%3E%3Ccircle cx='43' cy='23' r='8'/%3E%3Crect x='8' y='9' width='36' height='14' rx='6'/%3E%3C/svg%3E");
  --ink: #07131d;
  --cream: #f7e6c2;
  --cyan: #2fd6ee;
  --gold: #ffc62e;
  --pink: #ff5c7a;
  --panel: rgba(255, 255, 255, 0.94);
  --shadow: 0 10px 30px rgba(7, 19, 29, 0.25);
  --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; background: #3aa8ff; color: var(--ink); font-family: 'Fredoka', 'Jua', system-ui, sans-serif; user-select: none; -webkit-user-select: none; touch-action: none; }
html:lang(ko) body, html:lang(ja) body { font-family: 'Fredoka', 'Jua', system-ui, sans-serif; }
#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
button { font: inherit; color: inherit; border: 0; cursor: pointer; background: none; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

/* 아이콘 */
i { display: inline-block; flex: none; }
.coin-ic { width: 26px; height: 16px; background: linear-gradient(180deg, #fff1b0, #ffc62e 55%, #d98b00); -webkit-mask: var(--bone) center/contain no-repeat; mask: var(--bone) center/contain no-repeat; }
.card-ic { width: 18px; height: 23px; border-radius: 5px; background: linear-gradient(135deg, #ffe58a, #ffb800); box-shadow: inset 0 0 0 3px #fff7d6, 0 2px 0 rgba(0,0,0,.15); }
.i-play { width: 0; height: 0; border-left: 22px solid currentColor; border-top: 14px solid transparent; border-bottom: 14px solid transparent; margin-left: 4px; }
.i-pause { width: 16px; height: 18px; border-left: 5px solid currentColor; border-right: 5px solid currentColor; }
.i-sound { width: 24px; height: 22px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 9v6h4l5 5V4L7 9H3zm13.5 3A4.5 4.5 0 0 0 14 8v8a4.5 4.5 0 0 0 2.5-4zM14 3.2v2.1a7 7 0 0 1 0 13.4v2.1a9 9 0 0 0 0-17.6z'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 9v6h4l5 5V4L7 9H3zm13.5 3A4.5 4.5 0 0 0 14 8v8a4.5 4.5 0 0 0 2.5-4zM14 3.2v2.1a7 7 0 0 1 0 13.4v2.1a9 9 0 0 0 0-17.6z'/%3E%3C/svg%3E") center/contain no-repeat; }
.btn-sound.off .i-sound { opacity: .35; }
.i-out { width: 12px; height: 12px; border-top: 2.5px solid currentColor; border-right: 2.5px solid currentColor; transform: rotate(0deg); margin-left: 4px; }
.i-again { width: 22px; height: 22px; border: 4px solid currentColor; border-top-color: transparent; border-radius: 50%; }
.i-share { width: 20px; height: 20px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M18 16a3 3 0 0 0-2.4 1.2l-6.7-3.4a3 3 0 0 0 0-1.6l6.7-3.4A3 3 0 1 0 15 7l-6.7 3.4a3 3 0 1 0 0 3.2L15 17a3 3 0 1 0 3-1z'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M18 16a3 3 0 0 0-2.4 1.2l-6.7-3.4a3 3 0 0 0 0-1.6l6.7-3.4A3 3 0 1 0 15 7l-6.7 3.4a3 3 0 1 0 0 3.2L15 17a3 3 0 1 0 3-1z'/%3E%3C/svg%3E") center/contain no-repeat; }
.i-home { width: 22px; height: 20px; background: currentColor; clip-path: polygon(50% 0, 100% 45%, 86% 45%, 86% 100%, 14% 100%, 14% 45%, 0 45%); }
.i-x { width: 18px; height: 18px; background: linear-gradient(45deg, transparent 42%, currentColor 42% 58%, transparent 58%), linear-gradient(-45deg, transparent 42%, currentColor 42% 58%, transparent 58%); }
.i-crown { width: 20px; height: 16px; background: var(--gold); clip-path: polygon(0 100%, 0 20%, 25% 55%, 50% 0, 75% 55%, 100% 20%, 100% 100%); }

/* 버튼 */
.big-btn { display: flex; align-items: center; justify-content: center; gap: 12px; min-width: 220px; height: 70px; padding: 0 34px; border-radius: 999px; font-size: 30px; font-weight: 700; color: #fff; background: linear-gradient(180deg, #ffb13b, #ff7a1a); box-shadow: 0 7px 0 #c4520a, 0 14px 28px rgba(196, 82, 10, .35); text-shadow: 0 2px 0 rgba(0,0,0,.18); transition: transform .08s; animation: pulse 1.6s ease-in-out infinite; }
.big-btn:active { transform: translateY(5px); box-shadow: 0 2px 0 #c4520a; }
.mid-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 52px; min-width: 52px; padding: 0 18px; border-radius: 18px; font-size: 19px; font-weight: 700; background: #fff; box-shadow: 0 5px 0 rgba(7,19,29,.18), 0 8px 18px rgba(7,19,29,.12); }
.mid-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(7,19,29,.18); }
.ic-btn { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: rgba(255,255,255,.9); box-shadow: 0 4px 0 rgba(7,19,29,.15); }
@keyframes pulse { 50% { transform: scale(1.04); } }

/* 화면 */
.screen { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; z-index: 10; }
.screen.dim { background: rgba(7, 19, 29, .45); justify-content: center; backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.row { display: flex; gap: 12px; justify-content: center; align-items: center; flex-wrap: wrap; }
.row.col { flex-direction: column; gap: 18px; }

@keyframes drop { from { transform: translateY(-60px) scale(.8); opacity: 0; } }
.panel { width: min(100%, 400px); background: var(--panel); border-radius: 28px; padding: 22px 20px 18px; display: flex; flex-direction: column; align-items: center; gap: 12px; box-shadow: var(--shadow); animation: pop .45s cubic-bezier(.2,1.5,.4,1) both; }
@keyframes pop { from { transform: scale(.7); opacity: 0; } }
.lbl { font-size: 16px; font-weight: 600; opacity: .55; letter-spacing: 2px; }
.badge { padding: 4px 14px; border-radius: 999px; background: linear-gradient(90deg, #ff5c7a, #ffb13b); color: #fff; font-weight: 700; letter-spacing: 2px; animation: pulse 1s infinite; }
.mini { display: flex; gap: 22px; font-size: 20px; }
.mini span { display: flex; align-items: center; gap: 6px; }
.sheet { width: min(100% - 32px, 520px); max-height: min(86vh, 720px); background: var(--panel); border-radius: 26px; padding: 16px; display: flex; flex-direction: column; box-shadow: var(--shadow); animation: pop .35s cubic-bezier(.2,1.5,.4,1) both; }
.sheet-h { display: flex; justify-content: space-between; align-items: center; padding: 0 4px 12px; font-size: 22px; }
.sheet-h b { display: flex; align-items: center; gap: 8px; }
.i-up { width: 0; height: 0; border-left: 7px solid transparent; border-right: 7px solid transparent; border-bottom: 10px solid #2bc46a; }
#flash { position: fixed; inset: 0; z-index: 8; pointer-events: none; background: radial-gradient(circle, rgba(255,255,255,0), rgba(255,236,140,.55)); opacity: 0; }
#flash.on { animation: flash .6s ease-out; }
@keyframes flash { 0% { opacity: 1; } 100% { opacity: 0; } }

/* ===== KEKE ACE ===== */
.star-ic { width: 20px; height: 20px; background: linear-gradient(180deg, #fff1b0, #ffc62e 60%, #e89a00); clip-path: polygon(50% 0, 62% 36%, 100% 38%, 70% 60%, 80% 100%, 50% 76%, 20% 100%, 30% 60%, 0 38%, 38% 36%); filter: drop-shadow(0 1px 0 rgba(0,0,0,.25)); }
.emo { font-style: normal; font-size: 22px; line-height: 1; }
body.loading #btnPlay { opacity: .6; }
.big-btn { min-width: 200px; height: 64px; font-size: 28px; }
#stageRow { display: flex; gap: 8px; max-width: 100%; overflow-x: auto; padding: 8px 10px 12px; scrollbar-width: none; touch-action: pan-x; }
#stageRow::-webkit-scrollbar { display: none; }
.st { flex: none; position: relative; width: 62px; height: 78px; border-radius: 18px; background: rgba(255,255,255,.92); box-shadow: 0 5px 0 rgba(7,19,29,.18); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-weight: 700; }
.st .emo { font-size: 26px; }
.st b { font-size: 16px; line-height: 1; }
.st small { font-size: 11px; line-height: 1; letter-spacing: 1px; color: #e89a00; min-height: 11px; }
.st.sel { box-shadow: 0 0 0 4px #ff7a1a, 0 5px 0 rgba(7,19,29,.18); transform: translateY(-4px); }
.st.lock { filter: grayscale(1); opacity: .6; }
.st.lock::after { content: '🔒'; position: absolute; right: -4px; top: -6px; font-size: 18px; }

/* HUD */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 5; }
#hud > * { position: absolute; }
#btnPause { pointer-events: auto; }
#hearts { left: 74px; top: calc(20px + var(--safe-t)); display: flex; gap: 2px; font-size: 24px; filter: drop-shadow(0 2px 0 rgba(7,19,29,.4)); }
#hearts i { font-style: normal; }
#hearts i.off { filter: grayscale(1) brightness(1.4); opacity: .5; }
#score { left: 50%; top: calc(66px + var(--safe-t)); transform: translateX(-50%); font-size: 34px; font-weight: 700; color: #fff; -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 0 3px 0 rgba(7,19,29,.35); font-variant-numeric: tabular-nums; }
#combo { left: 50%; top: calc(106px + var(--safe-t)); transform: translateX(-50%); font-size: 26px; font-weight: 700; color: #ffe14d; -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; opacity: 0; transition: opacity .2s; }
#combo.on { opacity: 1; } #combo.bump b { display: inline-block; animation: bump .25s; }
@keyframes bump { 50% { transform: scale(1.5); } }
#stats { right: 14px; top: calc(14px + var(--safe-t)); }
.pill { display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: rgba(7,19,29,.55); color: #fff; font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }
#boss { left: 50%; top: calc(142px + var(--safe-t)); transform: translateX(-50%); width: min(70vw, 300px); display: flex; align-items: center; gap: 8px; }
#boss i { font-style: normal; font-size: 28px; filter: drop-shadow(0 2px 0 rgba(7,19,29,.4)); }
#boss .bar { flex: 1; height: 16px; border-radius: 9px; background: rgba(7,19,29,.55); padding: 3px; }
#boss .bar span { display: block; height: 100%; width: 100%; border-radius: 6px; background: linear-gradient(90deg, #ff5c7a, #ffb13b); transition: width .12s; }
#powers { left: 14px; top: calc(76px + var(--safe-t)); display: flex; flex-direction: column; gap: 6px; }
.pw { position: relative; width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; font-size: 22px; background: rgba(7,19,29,.55); overflow: hidden; }
.pw::after { content: ''; position: absolute; left: 0; bottom: 0; height: 4px; width: calc(var(--p) * 100%); background: var(--gold); }
#weapon { left: 14px; bottom: calc(26px + var(--safe-b)); display: flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 999px; background: rgba(7,19,29,.55); color: #fff; font-size: 22px; font-weight: 700; }
#weapon u { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #ffd23f; text-decoration: none; }
#weapon u.off { background: rgba(255,255,255,.3); }
.bomb-btn { right: calc(18px + env(safe-area-inset-right, 0px)); bottom: calc(24px + var(--safe-b)); pointer-events: auto; width: 68px; height: 68px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #ffd9ef 55%, #ff9ad0); box-shadow: 0 0 0 4px #fff, 0 6px 16px rgba(7,19,29,.35); display: grid; place-items: center; z-index: 6; touch-action: manipulation; }
.bomb-btn i { font-style: normal; font-size: 34px; line-height: 1; }
.bomb-btn b { position: absolute; right: -4px; top: -4px; min-width: 26px; height: 26px; border-radius: 13px; background: #ff3b5c; color: #fff; font-size: 16px; display: grid; place-items: center; box-shadow: 0 0 0 2px #fff; }
.bomb-btn.off { filter: grayscale(1); opacity: .45; }
#pops { position: fixed; inset: 0; z-index: 6; pointer-events: none; overflow: hidden; }
.pop { position: absolute; transform: translate(-50%, -50%); font-size: 30px; font-weight: 700; color: #fff; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; white-space: nowrap; animation: popUp .85s ease-out forwards; }
.pop.big { font-size: 56px; color: #ffe14d; -webkit-text-stroke: 4px var(--ink); animation-duration: 1.3s; }
.pop.emj { font-size: 40px; width: auto; height: auto; background: none; -webkit-text-stroke: 0; overflow: visible; }

.pop.sc { font-size: 22px; color: #ffe14d; }
@keyframes popUp { 0% { transform: translate(-50%, 0) scale(.5); opacity: 0; } 20% { transform: translate(-50%, -14px) scale(1.2); opacity: 1; } 100% { transform: translate(-50%, -64px) scale(1); opacity: 0; } }
#banner { position: fixed; left: 0; right: 0; top: 30%; z-index: 9; pointer-events: none; display: flex; flex-direction: column; align-items: center; gap: 4px; opacity: 0; font-weight: 700; color: #fff; -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill; text-shadow: 0 6px 0 rgba(7,19,29,.35); }
#banner .b1 { font-size: 64px; line-height: 1; } #banner .b2 { font-size: 40px; }
#banner.show { animation: banner 2.2s ease-out forwards; }
#banner.warn { color: #ff5c7a; }
@keyframes banner { 0% { opacity: 0; transform: scale(.5); } 12% { opacity: 1; transform: scale(1.12); } 20% { transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: scale(1.1); } }
#hurt { position: fixed; inset: 0; pointer-events: none; z-index: 4; opacity: 0; box-shadow: inset 0 0 120px 40px rgba(255, 30, 60, .7); }
#hurt.on { animation: flash .5s ease-out; }

/* 결과 */
.se-title { font-size: 28px; font-weight: 700; }
.se-stars { display: flex; gap: 6px; font-size: 54px; line-height: 1; }
.se-stars i { font-style: normal; filter: grayscale(1) brightness(1.3); opacity: .45; transform: scale(.7); }
.se-stars i.on { filter: none; opacity: 1; animation: starIn .5s cubic-bezier(.2,1.8,.4,1) both; animation-delay: calc(var(--i) * .25s); }
@keyframes starIn { from { transform: scale(0) rotate(-90deg); } to { transform: scale(1); } }
.mini small { font-size: 14px; opacity: .6; }
#moreGames { width: 100%; }
@media (max-height: 760px) { .panel { gap: 8px; padding: 16px 16px 14px; } .big-num { font-size: 48px; } .se-stars { font-size: 44px; } }
#toast { position: fixed; left: 50%; bottom: calc(30px + var(--safe-b)); transform: translate(-50%, 20px); opacity: 0; padding: 10px 18px; border-radius: 16px; background: #fff; font-weight: 700; z-index: 40; pointer-events: none; transition: .3s; box-shadow: 0 6px 20px rgba(7,19,29,.25); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#nogl { display: none; }
body.nogl #nogl { display: grid; position: fixed; inset: 0; place-items: center; font-size: 40px; color: #fff; }

/* 격납고(기체·업그레이드) */
#shop { justify-content: flex-end; padding-bottom: 0; }
#shop .sheet { max-height: 62vh; width: min(100%, 520px); border-radius: 26px 26px 0 0; padding-bottom: calc(14px + var(--safe-b)); overflow-y: auto; animation: sheetUp .3s ease-out both; }
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } }
#planeList { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 12px; touch-action: pan-x; scrollbar-width: none; }
.pl { flex: none; width: 92px; position: relative; border-radius: 18px; background: #eef4fa; padding: 8px 4px 8px; display: flex; flex-direction: column; align-items: center; gap: 2px; box-shadow: 0 4px 0 rgba(7,19,29,.12); font-weight: 700; }
.pl .emo { font-size: 34px; }
.pl span { font-size: 14px; }
.pl small { display: flex; align-items: center; gap: 3px; font-size: 14px; min-height: 18px; }
.pl.sel { background: #fff3c9; box-shadow: 0 0 0 4px #ff7a1a, 0 4px 0 rgba(7,19,29,.12); }
.pl.lock .emo { filter: grayscale(.8); opacity: .7; }
.pl .ds { display: flex; gap: 2px; font-size: 11px; opacity: .8; }
#upList { display: flex; flex-direction: column; gap: 8px; }
.up { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 16px; background: #eef4fa; font-weight: 700; }
.up .emo { font-size: 28px; }
.up .pips { flex: 1; display: flex; gap: 5px; }
.up .pips u { width: 14px; height: 14px; border-radius: 50%; background: #cfd9e4; text-decoration: none; }
.up .pips u.on { background: #2bc46a; }
.up button { min-width: 92px; height: 42px; border-radius: 14px; background: linear-gradient(180deg, #ffb13b, #ff7a1a); color: #fff; box-shadow: 0 4px 0 #c4520a; display: flex; align-items: center; justify-content: center; gap: 4px; font-size: 17px; }
.up button:disabled { background: #b6c2cf; box-shadow: 0 4px 0 #8d99a6; }
.up button:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 #c4520a; }
.i-grid { width: 20px; height: 20px; background: radial-gradient(circle, currentColor 0 3.5px, transparent 4px) 0 0 / 10px 10px; }
#shop.dim { background: none; backdrop-filter: none; -webkit-backdrop-filter: none; pointer-events: none; }
#shop .sheet { pointer-events: auto; }

/* 만화 컷인: 집중선 + 큰 의성어 */
#cutin { position: fixed; inset: 0; z-index: 12; pointer-events: none; display: grid; place-items: center; opacity: 0; }
#cutin i { position: absolute; inset: -20%; background: repeating-conic-gradient(rgba(255,255,255,.0) 0 4deg, rgba(255,255,255,.55) 4deg 6deg); mask: radial-gradient(circle, transparent 18%, #000 60%); -webkit-mask: radial-gradient(circle, transparent 18%, #000 60%); }
#cutin b { position: relative; font-size: 96px; font-weight: 700; color: #ffe14d; -webkit-text-stroke: 7px var(--ink); paint-order: stroke fill; text-shadow: 0 8px 0 rgba(7,19,29,.4); transform: rotate(-6deg); }
#cutin.show { animation: cutin .9s ease-out forwards; }
#cutin.warn b { color: #ff5c7a; } #cutin.big b { font-size: 120px; }
@keyframes cutin { 0% { opacity: 0; transform: scale(.4); } 12% { opacity: 1; transform: scale(1.15); } 25% { transform: scale(1); } 75% { opacity: 1; } 100% { opacity: 0; transform: scale(1.2); } }
.dance { font-size: 46px; line-height: 1; animation: dance .6s ease-in-out infinite alternate; }
.dance.sad { animation: wobble 1.2s ease-in-out infinite alternate; }
@keyframes dance { from { transform: translateY(0) rotate(-8deg); } to { transform: translateY(-12px) rotate(8deg) scale(1.1); } }
@keyframes wobble { from { transform: translateX(-14px) rotate(-12deg); } to { transform: translateX(14px) rotate(12deg); } }

/* ===== KEKE SUB ===== */
html, body { background: #0b3a5c; }
.pearl-ic { width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #f3e9ff 40%, #b9a6e8 100%); box-shadow: 0 0 8px rgba(255,255,255,.8), 0 2px 0 rgba(7,19,29,.25); }
#vig { position: fixed; inset: 0; z-index: 3; pointer-events: none; opacity: 0; box-shadow: inset 0 0 140px 50px rgba(255, 20, 50, .85); }
#ink { position: fixed; inset: 0; z-index: 7; pointer-events: none; opacity: 0; transition: opacity .35s; }
#ink i { position: absolute; border-radius: 50%; background: radial-gradient(circle, #1a0a33 55%, rgba(26,10,51,0) 72%); }
#ink i:nth-child(1) { left: -10%; top: 5%; width: 70%; height: 45%; } #ink i:nth-child(2) { right: -12%; top: 18%; width: 75%; height: 50%; }
#ink i:nth-child(3) { left: 10%; top: 42%; width: 80%; height: 52%; } #ink i:nth-child(4) { left: -15%; top: 62%; width: 60%; height: 45%; } #ink i:nth-child(5) { right: -5%; top: 70%; width: 60%; height: 40%; }
#ink.on { opacity: .96; }
#depth { left: 50%; top: calc(14px + var(--safe-t)); transform: translateX(-50%); display: flex; align-items: baseline; gap: 3px; padding: 4px 16px 5px; border-radius: 999px; background: rgba(7,19,29,.55); color: #fff; font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; }
#depth small { font-size: 16px; opacity: .8; }
#score { left: auto; right: 14px; top: calc(62px + var(--safe-t)); transform: none; font-size: 28px; }
#stats { right: 14px; top: calc(14px + var(--safe-t)); }
#combo { left: 50%; top: calc(66px + var(--safe-t)); }
#bars { left: 14px; top: calc(80px + var(--safe-t)); display: flex; flex-direction: column; gap: 6px; width: min(46vw, 190px); }
.bar { display: flex; align-items: center; gap: 6px; }
.bar > i { font-style: normal; font-size: 22px; width: 26px; text-align: center; filter: drop-shadow(0 2px 0 rgba(7,19,29,.45)); }
.bar > span { flex: 1; height: 16px; border-radius: 9px; background: rgba(7,19,29,.6); padding: 3px; }
.bar > span u { display: block; height: 100%; width: 100%; border-radius: 6px; text-decoration: none; transition: width .1s; }
.bar > b { min-width: 30px; font-size: 14px; color: #fff; text-shadow: 0 2px 0 rgba(7,19,29,.55); font-variant-numeric: tabular-nums; }
.bar.o2 u { background: linear-gradient(90deg, #4fd2ff, #bff3ff); }
.bar.hull u { background: linear-gradient(90deg, #ff5c7a, #ffb13b); }
.bar.noise u { background: linear-gradient(90deg, #a06bff, #ff6bd6); width: 0; }
.bar.low { animation: lowBar .45s ease-in-out infinite alternate; }
.bar.low > i { animation: bump .45s infinite; }
@keyframes lowBar { to { filter: brightness(1.7) saturate(1.5); transform: translateX(3px); } }
#ping { left: 50%; bottom: calc(24px + var(--safe-b)); transform: translateX(-50%); width: 54px; height: 54px; border-radius: 50%; background: rgba(7,19,29,.45); display: grid; place-items: center; }
#ping i { width: 30px; height: 30px; border-radius: 50%; border: 3px solid #7ee8ff; box-shadow: 0 0 0 6px rgba(126,232,255,.25), inset 0 0 0 7px rgba(126,232,255,.25); transform: scale(var(--p, 1)); opacity: calc(.35 + var(--p, 1) * .65); }
#boss .bar { flex: 1; height: 16px; border-radius: 9px; background: rgba(7,19,29,.6); padding: 3px; }
#boss { top: calc(120px + var(--safe-t)); left: auto; right: 14px; transform: none; width: min(44vw, 180px); }
#hearts { display: none; }
#cutin b { font-size: 78px; }
.up { }
.up .pips { display: flex; }
.pop.near { font-size: 46px; color: #ffe14d; -webkit-text-stroke: 5px var(--ink); animation-duration: 1.1s; }
.pop.red { color: #ff6b8a; }
.pop.cy { color: #8fe9ff; }
#toast { background: #fff; }

#hofMenu { display: none !important; }
body::after { content: ''; position: fixed; inset: 0; z-index: 2; pointer-events: none; background: radial-gradient(ellipse at 50% 46%, rgba(0,0,0,0) 52%, rgba(2,12,34,.42) 100%); }
#btnPause { position: absolute; left: calc(14px + env(safe-area-inset-left, 0px)); top: calc(16px + env(safe-area-inset-top, 0px)); width: 54px; height: 54px; border-radius: 16px; z-index: 20; touch-action: manipulation; }
#btnPause::before { content: ''; position: absolute; inset: -14px; }

.warn-mk { position: fixed; z-index: 6; transform: translate(-50%, -50%); pointer-events: none; font-size: 28px; line-height: 1; color: #ff3b2a; text-shadow: 0 0 10px #ff3b2a, 0 2px 0 #3a0804; -webkit-text-stroke: 1px #fff; animation: wmk .4s ease-in-out infinite alternate; }
@keyframes wmk { to { transform: translate(-50%, -62%) scale(1.25); } }
#hint { position: fixed; left: 50%; top: calc(150px + var(--safe-t)); transform: translateX(-50%); z-index: 6; display: flex; gap: 22px; pointer-events: none; }
#hint[hidden] { display: none; }
#hint span { width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; font-size: 34px; background: rgba(7,19,29,.55); animation: hint 0.7s ease-in-out infinite alternate; }
#hint .hz { color: #ff3b2a; box-shadow: 0 0 0 4px #ff3b2a, 0 0 22px #ff3b2a; text-shadow: 0 0 8px #ff3b2a; }
#hint .it { box-shadow: 0 0 0 4px #ffe14d, 0 0 22px #ffe14d; }
#hint .it i { width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #f3e9ff 40%, #b9a6e8); box-shadow: 0 0 12px #ffe14d; }
@keyframes hint { to { transform: scale(1.12); } }

/* 맵 선택 (20개) */
#stages .sheet { overflow-y: auto; }
#stageList { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 2px 2px 6px; }
.stg { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; min-height: 84px; border-radius: 18px; background: #eef4fa; box-shadow: 0 4px 0 rgba(7,19,29,.14); font-weight: 800; padding: 6px 2px; }
.stg .emo { font-size: 24px; font-style: normal; line-height: 1.1; }
.stg b { font-size: 20px; line-height: 1.1; }
.stg u { text-decoration: none; font-size: 14px; color: #ffb13b; letter-spacing: 1px; }
.stg.boss { background: #ffe3de; } .stg.boss .emo { color: #e0392b; }
.stg.cur { background: #fff3c9; box-shadow: 0 0 0 4px #ff7a1a, 0 4px 0 rgba(7,19,29,.14); }
.stg.lock { opacity: .55; }
.stg:active:not(:disabled) { transform: translateY(3px); }
#stages { z-index: 60; background: rgba(7, 19, 29, .72); }
#stageList { grid-template-columns: repeat(5, 1fr); gap: 8px; }
.stg { min-height: 70px; } .stg b { font-size: 18px; } .stg .emo { font-size: 20px; } .stg u { font-size: 11px; letter-spacing: 0; }
