: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: #6cc6ff; 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; }

#menu { justify-content: space-between; padding: calc(28px + var(--safe-t)) 16px calc(26px + var(--safe-b)); pointer-events: none; }
#menu > * { pointer-events: auto; }
.logo-wrap { display: flex; flex-direction: column; align-items: center; animation: drop .7s cubic-bezier(.2,1.6,.4,1) both; }
.logo-img { width: min(78vw, 460px); height: auto; filter: drop-shadow(0 10px 20px rgba(7,19,29,.3)); }
.logo-img + .logo { display: none; }
.logo { margin: 0; display: flex; flex-direction: column; align-items: center; line-height: .82; font-weight: 700; font-style: italic; letter-spacing: -1px; }
.logo span { font-size: clamp(64px, 18vw, 120px); color: var(--cream); -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; text-shadow: 5px 6px 0 var(--cyan), 7px 9px 0 var(--ink); transform: skew(-8deg); }
.logo span + span { color: #fff; }
@keyframes drop { from { transform: translateY(-60px) scale(.8); opacity: 0; } }
.best-m { margin-top: 10px; padding: 6px 16px; border-radius: 999px; background: rgba(7,19,29,.55); color: #fff; font-size: 17px; display: flex; gap: 8px; align-items: center; }
.best-m b { color: var(--gold); font-size: 20px; }
.menu-bottom { display: flex; flex-direction: column; align-items: center; gap: 18px; width: 100%; }
.studio { display: inline-flex; align-items: center; padding: 8px 16px; border-radius: 999px; background: var(--ink); color: var(--cream); font-weight: 700; font-size: 14px; letter-spacing: 1px; box-shadow: 0 4px 12px rgba(7,19,29,.3); }

/* HUD */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 5; }
#hud > * { position: absolute; }
#btnPause { left: 14px; top: calc(14px + var(--safe-t)); pointer-events: auto; }
#score { left: 50%; top: calc(10px + var(--safe-t)); transform: translateX(-50%); font-size: 40px; font-weight: 700; color: #fff; -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 0 4px 0 rgba(7,19,29,.35); font-variant-numeric: tabular-nums; }
#stats { right: 14px; top: calc(14px + var(--safe-t)); display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.pill { display: flex; align-items: center; gap: 6px; padding: 5px 12px 5px 6px; border-radius: 999px; background: rgba(7,19,29,.55); color: #fff; font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }
#powers { left: 14px; top: calc(72px + var(--safe-t)); display: flex; flex-direction: column; gap: 8px; }
.pw { position: relative; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-style: normal; font-weight: 700; color: #fff; overflow: hidden; background: rgba(7,19,29,.55); }
.pw::after { content: ''; position: absolute; left: 0; bottom: 0; height: 4px; width: calc(var(--p) * 100%); background: var(--gold); }
.pw.magnet::before { content: ''; width: 22px; height: 22px; border: 6px solid #ff3b5c; border-top: 0; border-radius: 0 0 14px 14px; }
.pw.double { background: rgba(124, 58, 237, .8); font-size: 18px; }

/* 결과 */
#over { justify-content: flex-end; padding: calc(12px + var(--safe-t)) 16px calc(12px + var(--safe-b)); overflow-y: auto; }
.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; }
.big-num { font-size: 60px; font-weight: 700; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.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; }
.run-cards { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.run-cards a { position: relative; width: 52px; height: 52px; border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 3px #ffc62e, 0 4px 10px rgba(0,0,0,.2); }
.run-cards a img { width: 100%; height: 100%; object-fit: cover; }
.run-cards a.new::after { content: 'NEW'; position: absolute; right: -2px; top: -2px; font-size: 9px; font-weight: 700; background: var(--pink); color: #fff; padding: 1px 4px; border-radius: 6px; }
.feat-lbl { margin-top: 4px; font-size: 13px; font-weight: 700; letter-spacing: 2px; opacity: .5; }
.feature { width: 100%; border-radius: 18px; overflow: hidden; position: relative; display: block; aspect-ratio: 16/9; box-shadow: 0 6px 16px rgba(7,19,29,.2); }
.feature > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.feature div { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: linear-gradient(transparent, rgba(7,19,29,.85)); color: #fff; }
.feature .fi { width: 36px; height: 36px; border-radius: 10px; }
.feature b { flex: 1; font-size: 16px; text-align: left; }
.feature span { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #ff7a1a; font-size: 14px; }

/* 카드 모음 */
.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; }
#grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 12px; overflow-y: auto; padding: 4px; }
.slot { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 4px; border-radius: 16px; background: #f2f4f8; font-size: 12px; font-weight: 600; text-align: center; line-height: 1.2; }
.slot img { width: 64px; height: 64px; border-radius: 16px; object-fit: cover; }
.slot.got { background: linear-gradient(180deg, #fff5d1, #ffe08a); box-shadow: 0 0 0 2px #ffc62e; }
.slot.lock img { filter: brightness(0) opacity(.25); }
.slot.lock span { opacity: .4; font-size: 18px; }

/* 토스트 */
#toast { position: fixed; left: 50%; top: calc(84px + var(--safe-t)); transform: translate(-50%, -30px) scale(.8); opacity: 0; display: flex; align-items: center; gap: 12px; padding: 10px 18px 10px 10px; border-radius: 22px; background: rgba(255,255,255,.96); box-shadow: 0 0 0 3px #ffc62e, var(--shadow); z-index: 20; pointer-events: none; transition: .35s cubic-bezier(.2,1.6,.4,1); max-width: calc(100% - 32px); }
#toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
#toast img { width: 56px; height: 56px; border-radius: 14px; }
#toast b { display: block; font-size: 17px; }
#toast em { font-style: normal; font-weight: 700; font-size: 13px; color: #fff; background: var(--pink); padding: 2px 8px; border-radius: 8px; }
#toast em.dup { background: #ffb13b; }

/* 조작 힌트 */
#hint { position: fixed; left: 50%; bottom: calc(18% + var(--safe-b)); transform: translateX(-50%); display: grid; grid-template-columns: repeat(3, 56px); grid-template-rows: repeat(2, 56px); gap: 6px; z-index: 6; pointer-events: none; animation: fade 3.2s both; }
.sw { width: 56px; height: 56px; border-radius: 16px; background: rgba(255,255,255,.85); position: relative; }
.sw::after { content: ''; position: absolute; left: 50%; top: 50%; border: 12px solid transparent; }
.sw.l { grid-area: 2/1; } .sw.r { grid-area: 2/3; } .sw.u { grid-area: 1/2; } .sw.d { grid-area: 2/2; }
.sw.l::after { border-right: 16px solid var(--ink); transform: translate(-75%, -50%); }
.sw.r::after { border-left: 16px solid var(--ink); transform: translate(-25%, -50%); }
.sw.u::after { border-bottom: 16px solid var(--ink); transform: translate(-50%, -75%); }
.sw.d::after { border-top: 16px solid var(--ink); transform: translate(-50%, -25%); }
@keyframes fade { 0%, 80% { opacity: 1; } 100% { opacity: 0; } }

#count { position: fixed; inset: 0; display: grid; place-items: center; font-size: 120px; font-weight: 700; color: #fff; -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill; z-index: 30; pointer-events: none; }
#nogl { display: none; }
body.nogl #nogl { display: grid; position: fixed; inset: 0; place-items: center; font-size: 24px; }

@media (min-height: 900px) { .big-btn { height: 78px; } }
@media (max-height: 640px) { .logo span { font-size: 60px; } .big-btn { height: 60px; font-size: 26px; } .menu-bottom { gap: 12px; } .big-num { font-size: 48px; } .feature { aspect-ratio: 21/9; } }

/* 보너스·위험·부활·상점 */
#streak { left: 50%; top: calc(58px + var(--safe-t)); transform: translateX(-50%); font-size: 22px; font-weight: 700; color: #ffe14d; -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; }
#pops { left: 50%; top: 42%; width: 0; height: 0; }
.pop { position: absolute; left: 0; top: 0; transform: translate(-50%, 0); font-size: 30px; font-weight: 700; color: #fff; -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; white-space: nowrap; animation: popUp .9s ease-out forwards; }
.pop small { font-size: 20px; color: #ffe14d; margin-left: 6px; }
@keyframes popUp { 0% { transform: translate(-50%, 10px) scale(.6); opacity: 0; } 20% { transform: translate(-50%, -10px) scale(1.15); opacity: 1; } 100% { transform: translate(-50%, -70px) scale(1); opacity: 0; } }
#hud::before { content: ''; position: absolute; inset: 0; box-shadow: inset 0 0 90px 20px rgba(255, 40, 70, .55); opacity: 0; transition: opacity .2s; }
#hud.danger::before { opacity: 1; animation: blink .5s infinite alternate; }
@keyframes blink { to { opacity: .35; } }
.pw.rocket::before { content: ''; width: 14px; height: 26px; border-radius: 7px 7px 3px 3px; background: linear-gradient(#ff4d4d 0 35%, #fff 35%); box-shadow: 0 6px 0 -2px #ff9a3c; }
.pw.rocket { background: rgba(255, 122, 26, .8); }
.i-up { width: 0; height: 0; border-left: 7px solid transparent; border-right: 7px solid transparent; border-bottom: 10px solid #2bc46a; }
.i-heart { width: 44px; height: 40px; background: #ff4d6d; clip-path: path('M22 40 L4 21 A10 10 0 0 1 22 7 A10 10 0 0 1 40 21 Z'); }
.revive-btn { position: relative; width: 170px; height: 170px; border-radius: 50%; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; box-shadow: var(--shadow); animation: pulse 1s infinite; }
.revive-btn svg { position: absolute; inset: -8px; width: calc(100% + 16px); height: calc(100% + 16px); transform: rotate(-90deg); }
.revive-btn circle { fill: none; stroke: #ffc62e; stroke-width: 6; stroke-linecap: round; stroke-dasharray: 289; stroke-dashoffset: 0; }
#revive.run circle { animation: ring 4s linear forwards; }
@keyframes ring { to { stroke-dashoffset: 289; } }
.revive-btn span { display: flex; align-items: center; gap: 6px; font-size: 24px; font-weight: 700; }
.skip { margin-top: 26px; }
#shopList { display: flex; flex-direction: column; gap: 12px; }
.shop-row { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 18px; background: #f2f4f8; }
.shop-row .pw { width: 52px; height: 52px; }
.shop-row .pw.magnet { background: rgba(255, 59, 92, .15); }
.shop-row .pw.double { background: rgba(124, 58, 237, .85); }
.pips { flex: 1; display: flex; gap: 5px; }
.pips b { flex: 1; height: 12px; border-radius: 6px; background: #d6dbe6; }
.pips b.on { background: linear-gradient(90deg, #2bc46a, #9be15d); }
.buy { display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 14px; border-radius: 14px; background: linear-gradient(180deg, #ffb13b, #ff7a1a); color: #fff; font-weight: 700; font-size: 17px; box-shadow: 0 4px 0 #c4520a; }
.buy.no { filter: grayscale(1); opacity: .5; }
.max { font-weight: 700; color: #2bc46a; padding: 0 10px; }
.gift-ic { width: 20px; height: 20px; border-radius: 5px; background: linear-gradient(90deg, transparent 40%, #ffc62e 40% 60%, transparent 60%), linear-gradient(180deg, #ffc62e 0 26%, transparent 26%), #35c7ff; box-shadow: inset 0 -2px 0 rgba(0,0,0,.15); }
.pop .coin-ic { width: 26px; height: 16px; margin-left: 6px; vertical-align: middle; }

.hub-link { position: absolute; left: 14px; top: calc(14px + var(--safe-t)); }
.i-grid { width: 20px; height: 20px; background: radial-gradient(circle, currentColor 0 3.5px, transparent 4px) 0 0 / 10px 10px; }

/* 자랑·공유 */
.i-flag { width: 18px; height: 20px; background: linear-gradient(90deg, #07131d 0 3px, transparent 3px), conic-gradient(from 90deg at 50% 50%, #fff 0 25%, #07131d 0 50%, #fff 0 75%, #07131d 0) 3px 0 / 8px 8px no-repeat; background-size: auto, 15px 12px; }
.i-down { width: 18px; height: 20px; background: currentColor; clip-path: polygon(35% 0, 65% 0, 65% 45%, 90% 45%, 50% 85%, 10% 45%, 35% 45%, 35% 0, 0 100%, 0 88%, 100% 88%, 100% 100%, 0 100%); }
.i-link { width: 22px; height: 12px; border: 3.5px solid currentColor; border-radius: 8px; position: relative; }
.i-link::after { content: ''; position: absolute; left: 4px; right: 4px; top: 50%; height: 3px; margin-top: -1.5px; background: currentColor; }
.chal-m { margin-top: 8px; display: flex; gap: 8px; align-items: center; padding: 6px 14px; border-radius: 999px; background: #fff; font-size: 18px; box-shadow: 0 4px 0 rgba(7,19,29,.15); animation: pulse 1.4s infinite; }
#target { left: 50%; top: calc(88px + var(--safe-t)); transform: translateX(-50%); width: min(60vw, 260px); height: 14px; border-radius: 7px; background: rgba(7,19,29,.45); overflow: visible; }
#target span { position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--p, 0) * 100%); border-radius: 7px; background: linear-gradient(90deg, #ffb13b, #ff5c7a); }
#target .i-flag { position: absolute; right: -6px; top: -16px; }
#target.done span { background: linear-gradient(90deg, #2bc46a, #9be15d); }
.rank { padding: 6px 18px; border-radius: 999px; color: #fff; font-family: 'Jua', 'Fredoka', sans-serif; font-size: 20px; box-shadow: 0 3px 0 rgba(0,0,0,.15); }
.chal-o { display: flex; align-items: center; gap: 8px; font-size: 18px; }
.chal-o em { font-style: normal; font-weight: 700; padding: 2px 10px; border-radius: 8px; color: #fff; }
.chal-o em.win { background: #2bc46a; } .chal-o em.lose { background: #8d99a6; }
.share-sheet { align-items: center; gap: 14px; width: min(100% - 32px, 400px); }
.share-sheet .sheet-h { width: 100%; padding-bottom: 0; }
#shareImg { width: 100%; max-height: 52vh; object-fit: contain; border-radius: 18px; box-shadow: 0 6px 18px rgba(7,19,29,.2); }
#shareImg:not([src]) { display: none; }
.mid-btn.hot { background: linear-gradient(180deg, #ffb13b, #ff7a1a); color: #fff; box-shadow: 0 5px 0 #c4520a; min-width: 90px; }
#shareCopy.ok { background: #2bc46a; color: #fff; }

.over-card { width: 100%; max-width: 230px; border-radius: 16px; box-shadow: 0 6px 18px rgba(7,19,29,.25); cursor: pointer; }
.share-big { background: linear-gradient(180deg, #4fd2ff, #1f8cf0); box-shadow: 0 7px 0 #135ea8, 0 14px 28px rgba(19,94,168,.35); }
.share-big:active { box-shadow: 0 2px 0 #135ea8; }
#toast { position: fixed; left: 50%; bottom: calc(30px + var(--safe-b)); top: auto; 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); }
@media (max-height: 640px) { .over-card { max-width: 150px; } }

/* ---------- KEKE JUMP ---------- */
body.playing #c { cursor: none; }
body.loading #btnPlay { opacity: .6; animation: none; }
.best-m .sep { width: 1px; height: 16px; background: rgba(255,255,255,.4); }
.keys { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
kbd { font-family: inherit; font-size: 13px; font-weight: 700; padding: 4px 9px; border-radius: 8px; background: rgba(255,255,255,.9); box-shadow: 0 3px 0 rgba(7,19,29,.25); }
body.mobile .pc-only { display: none; }
.i-alt { width: 16px; height: 20px; background: currentColor; clip-path: polygon(50% 0, 100% 45%, 66% 45%, 66% 100%, 34% 100%, 34% 45%, 0 45%); }
.best-m .i-alt { color: #9be15d; }
.mini .i-alt { color: #1fa8f0; }
.mini small { font-size: 14px; opacity: .6; }
.i-star { width: 22px; height: 22px; background: linear-gradient(180deg, #fff1b0, #ffc62e); clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); vertical-align: -3px; margin-right: 2px; }
#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); }

#height { left: 50%; top: calc(6px + var(--safe-t)); transform: translateX(-50%); display: flex; align-items: baseline; gap: 2px; color: #fff; font-weight: 700; -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 0 4px 0 rgba(7,19,29,.35); font-variant-numeric: tabular-nums; }
#height b { font-size: 46px; }
#height small { font-size: 24px; }
#hud #score { top: calc(60px + var(--safe-t)); font-size: 22px; -webkit-text-stroke: 1.5px var(--ink); color: #ffe14d; }
#hud #streak { top: calc(90px + var(--safe-t)); font-size: 26px; }
#hud #target { top: calc(126px + var(--safe-t)); }
#meter { right: 18px; top: 50%; transform: translateY(-50%); width: 12px; height: min(36vh, 260px); border-radius: 6px; background: rgba(7,19,29,.35); box-shadow: inset 0 0 0 2px rgba(255,255,255,.5); }
#meter span { position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--p, 0) * 100%); border-radius: 6px; background: linear-gradient(0deg, #9be15d, #2fd6ee); transition: height .2s; }
#meter[data-z="1"] span { background: linear-gradient(0deg, #2fd6ee, #ffb46b); }
#meter[data-z="2"] span { background: linear-gradient(0deg, #ffb46b, #7a5cff); }
#meter[data-z="3"] span { background: linear-gradient(0deg, #7a5cff, #ff3b6b); }
#meter i { position: absolute; left: 50%; top: -30px; transform: translateX(-50%); width: 24px; height: 24px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff, #ffe14d 50%, #ff9a3c); box-shadow: 0 2px 6px rgba(0,0,0,.3); }
#meter[data-z="2"] i { background: radial-gradient(circle at 35% 35%, #e6dcff, #8f7bff 55%, #4b3bb0); }
#meter[data-z="3"] i { background: radial-gradient(circle at 35% 35%, #fff, #ff8fb1 55%, #b0306b); }

#pops { position: fixed; left: 50%; top: 40%; width: 0; height: 0; z-index: 6; pointer-events: none; }
.pop.perfect { color: #ffe14d; font-size: 34px; }
.pop.win { font-size: 56px; color: #9be15d; }

#zoneBanner { position: fixed; left: 50%; top: 30%; transform: translate(-50%, -50%); z-index: 7; pointer-events: none; opacity: 0; display: flex; flex-direction: column; align-items: center; font-family: 'Jua', 'Fredoka', sans-serif; font-size: 76px; color: #fff; -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill; line-height: 1; white-space: nowrap; }
#zoneBanner small { font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 30px; color: #ffe14d; -webkit-text-stroke: 2px var(--ink); }
#zoneBanner.show { animation: banner 2.4s ease-out forwards; }
@keyframes banner { 0% { opacity: 0; transform: translate(-50%, -50%) scale(2); } 12% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -60%) scale(.9); } }

/* 아이템 아이콘 */
.pw.prop { background: rgba(79, 179, 255, .85); }
.pw.prop::before { content: ''; width: 26px; height: 14px; margin-top: 10px; border-radius: 14px 14px 2px 2px; background: conic-gradient(from -90deg at 50% 100%, #ff5c5c 0 45deg, #ffc62e 0 90deg, #52d6a0 0 135deg, #4fb3ff 0); box-shadow: 0 -9px 0 -7px #fff, -9px -10px 0 -8px #fff, 9px -10px 0 -8px #fff; }
.pw.shield { background: rgba(47, 214, 238, .85); }
.pw.shield::before { content: ''; width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff 0 18%, rgba(255,255,255,.35) 19% 60%, rgba(255,255,255,.7) 61%); }
.pw.jump { background: rgba(43, 196, 106, .85); }
.pw.jump::before { content: ''; width: 22px; height: 26px; background: #fff; clip-path: polygon(50% 0, 100% 45%, 68% 45%, 68% 70%, 32% 70%, 32% 45%, 0 45%, 0 100%, 100% 100%, 100% 85%, 0 85%); }
.shop-row .pw.prop, .shop-row .pw.shield, .shop-row .pw.jump, .shop-row .pw.rocket { width: 52px; height: 52px; }

/* 터치 조작 */
#touchzone { position: absolute; inset: 0; pointer-events: auto; display: none; }
body.mobile #touchzone { display: block; }
#stick { position: absolute; left: calc(96px + env(safe-area-inset-left, 0px)); top: calc(100% - 120px - var(--safe-b)); width: 130px; height: 130px; margin: -65px 0 0 -65px; border-radius: 50%; background: rgba(255,255,255,.18); box-shadow: inset 0 0 0 3px rgba(255,255,255,.5), 0 4px 16px rgba(7,19,29,.25); display: none; pointer-events: none; opacity: .75; }
body.mobile #stick { display: block; }
#stick.on { opacity: 1; }
#knob { position: absolute; left: 37px; top: 37px; width: 56px; height: 56px; border-radius: 50%; background: rgba(255,255,255,.9); box-shadow: 0 3px 8px rgba(7,19,29,.3); }
#stick::before { content: ''; position: absolute; inset: 8px; border-radius: 50%; border: 2px dashed rgba(255,255,255,.35); }
.tbtns { display: none; }
body.mobile .tbtns { display: block; inset: 0; pointer-events: none; }
.tbtn { position: absolute; pointer-events: auto; border-radius: 50%; touch-action: none; }
.tbtn.jump { width: 104px; height: 104px; right: calc(26px + env(safe-area-inset-right, 0px)); bottom: calc(40px + var(--safe-b)); background: rgba(255, 177, 59, .6); box-shadow: inset 0 0 0 4px rgba(255,255,255,.7), 0 6px 18px rgba(7,19,29,.25); }
.tbtn.jump::after { content: ''; position: absolute; left: 50%; top: 50%; border: 18px solid transparent; border-bottom: 24px solid #fff; transform: translate(-50%, -75%); }
.tbtn.jump.on { background: rgba(255, 177, 59, .9); transform: scale(.94); }
body.mobile #meter { right: 10px; top: 38%; height: 24vh; }
@media (max-height: 640px) { #height b { font-size: 36px; } #zoneBanner { font-size: 56px; } }
#over .row { gap: 8px; flex-wrap: nowrap; }
#over .row .mid-btn { height: 48px; min-width: 48px; padding: 0 13px; font-size: 17px; }
@media (max-height: 760px) { #over .panel { gap: 8px; padding: 16px 16px 14px; } #over .big-num { font-size: 48px; } #over .over-card { max-width: 170px; } }
@media (max-height: 640px) { #over .over-card { max-width: 120px; } }

/* 버튼이 화면 터치 영역에 가려지지 않게 */
#hud #touchzone { z-index: 1; }
#hud button, #hud .ic-btn, #hud .tbtn, #hud a { z-index: 6; }
#over .row .mid-btn { white-space: nowrap; }
@media (max-width: 400px) { #over .row { gap: 6px; } #over .row .mid-btn { padding: 0 10px; font-size: 16px; } }

/* 왼쪽 위 버튼(게임 목록·일시정지): 크게, 누르는 범위 넓게 */
.hub-link, #btnPause { width: 54px !important; height: 54px !important; border-radius: 16px !important; top: calc(16px + env(safe-area-inset-top, 0px)) !important; left: calc(14px + env(safe-area-inset-left, 0px)) !important; z-index: 20 !important; touch-action: manipulation; }
.hub-link::before, #btnPause::before { content: ''; position: absolute; inset: -14px; }
.hub-link .i-grid { transform: scale(1.15); }


/* ---------- KEKE ROYALE ---------- */
body { background: #5ab8ff; }
.i-kill { width: 20px; height: 20px; background: radial-gradient(circle, #fff 0 22%, transparent 23%), conic-gradient(#ff5c7a 0 25%, #ffd23f 0 50%, #2fd6ee 0 75%, #9be15d 0); border-radius: 50%; box-shadow: 0 0 0 2px #fff; }
.i-alive { width: 18px; height: 20px; background: currentColor; clip-path: path('M9 0a5 5 0 1 1 0 10a5 5 0 1 1 0-10M0 20c0-6 4-9 9-9s9 3 9 9z'); }
.i-clock { width: 20px; height: 20px; border-radius: 50%; border: 3px solid currentColor; position: relative; }
.i-clock::after { content: ''; position: absolute; left: 6px; top: 2px; width: 3px; height: 7px; background: currentColor; border-radius: 2px; box-shadow: 3px 5px 0 -0.5px currentColor; }
.i-paw { width: 20px; height: 20px; background: currentColor; -webkit-mask: radial-gradient(circle at 50% 70%, #000 0 6px, transparent 6.5px), radial-gradient(circle at 18% 38%, #000 0 3px, transparent 3.5px), radial-gradient(circle at 38% 18%, #000 0 3px, transparent 3.5px), radial-gradient(circle at 62% 18%, #000 0 3px, transparent 3.5px), radial-gradient(circle at 82% 38%, #000 0 3px, transparent 3.5px); mask: radial-gradient(circle at 50% 70%, #000 0 6px, transparent 6.5px), radial-gradient(circle at 18% 38%, #000 0 3px, transparent 3.5px), radial-gradient(circle at 38% 18%, #000 0 3px, transparent 3.5px), radial-gradient(circle at 62% 18%, #000 0 3px, transparent 3.5px), radial-gradient(circle at 82% 38%, #000 0 3px, transparent 3.5px); color: #c98a5a; }
.i-zone { width: 18px; height: 18px; border-radius: 50%; border: 3px solid #3f8cff; box-shadow: inset 0 0 0 3px rgba(63,140,255,.35); }
.i-chute { width: 64px; height: 56px; background: conic-gradient(from -90deg at 50% 100%, #ff5c7a 0 30deg, #fff 0 60deg, #2fd6ee 0 90deg, #ffd23f 0 120deg, #9be15d 0 150deg, #b48cff 0 180deg, transparent 0); border-radius: 64px 64px 0 0; -webkit-mask: linear-gradient(#000 0 0) top/100% 58% no-repeat, linear-gradient(#000 0 0) 50% 100%/4px 100% no-repeat; mask: linear-gradient(#000 0 0) top/100% 58% no-repeat, linear-gradient(#000 0 0) 50% 100%/4px 100% no-repeat; }

#hud { --t: env(safe-area-inset-top, 0px); --l: env(safe-area-inset-left, 0px); --r: env(safe-area-inset-right, 0px); }
#hud::before { display: none; }
#touchzone { display: block !important; }
.tl-btns { position: absolute; left: calc(12px + var(--l)); top: calc(12px + var(--t)); display: flex; gap: 8px; z-index: 20; pointer-events: auto; }
.tl-btns .ic-btn { position: relative !important; left: auto !important; top: auto !important; width: 46px !important; height: 46px !important; border-radius: 14px !important; background: rgba(255,255,255,.88); box-shadow: 0 3px 0 rgba(7,19,29,.18); }
.tl-btns .ic-btn::before { content: ''; position: absolute; inset: -8px; }
#counts { left: calc(12px + var(--l)); top: calc(66px + var(--t)); display: flex; gap: 6px; }
#counts span { display: flex; align-items: center; gap: 6px; padding: 4px 12px 4px 8px; border-radius: 999px; background: rgba(7,19,29,.55); color: #fff; font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; }
#zoneInfo { left: 50%; top: calc(10px + var(--t)); transform: translateX(-50%); display: flex; align-items: center; gap: 6px; padding: 5px 14px 5px 10px; border-radius: 999px; background: rgba(7,19,29,.55); color: #fff; font-weight: 700; font-size: 20px; font-variant-numeric: tabular-nums; }
#zoneInfo.shrink { background: rgba(40,100,255,.85); }
#zoneInfo.flash { animation: zflash .6s 3; }
@keyframes zflash { 50% { transform: translateX(-50%) scale(1.2); background: #3f8cff; } }
#lobbyT { left: 50%; top: calc(14px + var(--t)); transform: translateX(-50%); font-size: 54px; font-weight: 700; color: #fff; -webkit-text-stroke: 2px rgba(7,19,29,.55); text-shadow: 0 4px 0 rgba(7,19,29,.25); }
#lobbyT.tick { animation: ltick .4s ease-out; }
@keyframes ltick { 0% { transform: translateX(-50%) scale(1.4); } }
#mapBox { right: calc(12px + var(--r)); top: calc(12px + var(--t)); width: 124px; height: 124px; border-radius: 18px; overflow: hidden; border: 3px solid #fff; box-shadow: 0 4px 14px rgba(7,19,29,.3); background: #6fe0f0; }
#mini { width: 100%; height: 100%; display: block; }
body[data-st="plane"] #mapBox, body[data-st="lobby"] #mapBox { width: 170px; height: 170px; }
#feed { right: calc(12px + var(--r)); top: calc(146px + var(--t)); display: flex; flex-direction: column; align-items: flex-end; gap: 4px; max-width: 46vw; }
.fd { display: flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; background: rgba(7,19,29,.5); color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; transition: opacity .5s, transform .5s; }
.fd img { height: 20px; width: auto; }
.fd span { overflow: hidden; text-overflow: ellipsis; max-width: 110px; }
.fd.me { background: rgba(255,177,59,.9); color: #07131d; }
.fd.bad { background: rgba(255,92,122,.9); }
.fd.gone { opacity: 0; transform: translateX(20px); }
#vitals { left: 50%; bottom: calc(14px + var(--safe-b)); transform: translateX(-50%); width: min(44vw, 340px); display: flex; flex-direction: column; gap: 5px; align-items: center; }
#gear { display: flex; gap: 6px; }
.gi { position: relative; width: 38px; height: 38px; border-radius: 11px; background: rgba(7,19,29,.35); display: grid; place-items: center; opacity: .45; box-shadow: inset 0 0 0 2px rgba(255,255,255,.25); }
.gi img { width: 28px; height: 28px; object-fit: contain; filter: grayscale(1) brightness(1.4); }
.gi.on { opacity: 1; background: rgba(255,255,255,.9); box-shadow: inset 0 0 0 3px var(--c, #fff); }
.gi.on img { filter: none; }
.gi b { position: absolute; right: -4px; bottom: -6px; font-size: 12px; font-weight: 700; color: #fff; background: #07131d; border-radius: 8px; padding: 0 5px; line-height: 16px; }
.gi b:empty { display: none; }
#hpBar { position: relative; width: 100%; height: 16px; border-radius: 9px; background: rgba(7,19,29,.55); overflow: hidden; box-shadow: 0 0 0 2px rgba(255,255,255,.85); }
#hpBar span, #hpBar em { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 9px; }
#hpBar em { background: #ff9eb5; }
#hpBar span { background: linear-gradient(180deg, #fff, #e8f4ff 45%, #c8dcf0); z-index: 1; }
#hpBar.low span { background: linear-gradient(180deg, #ffb0b0, #ff5c7a); }
#healBar { position: absolute; left: 0; bottom: 0; height: 4px; background: #9be15d; z-index: 2; border-radius: 2px; }
#fireBtn { position: absolute; right: calc(34px + var(--r)); bottom: calc(46px + var(--safe-b)); width: 118px; height: 118px; border-radius: 50%; background: radial-gradient(circle at 50% 35%, rgba(255,255,255,.95), rgba(255,255,255,.75)); box-shadow: 0 0 0 5px var(--rc, #fff), 0 6px 0 rgba(7,19,29,.25), 0 10px 22px rgba(7,19,29,.25); display: grid; place-items: center; pointer-events: auto; z-index: 8; touch-action: none; transition: transform .08s; }
#fireBtn::before { content: ''; position: absolute; inset: -26px; border-radius: 50%; }
#fireBtn.on { transform: scale(.92); background: radial-gradient(circle at 50% 35%, #fff6d0, #ffd23f); }
#fireBtn img { width: 76px; height: 64px; object-fit: contain; pointer-events: none; filter: drop-shadow(0 2px 2px rgba(7,19,29,.25)); }
#fireBtn b { position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%); font-size: 15px; font-weight: 700; color: #07131d; background: rgba(255,255,255,.95); border-radius: 8px; padding: 0 6px; line-height: 18px; }
#fireBtn b:empty { display: none; }
#fireBtn svg { position: absolute; inset: -9px; width: calc(100% + 18px); height: calc(100% + 18px); transform: rotate(-90deg); pointer-events: none; opacity: 0; }
#fireBtn.reload svg { opacity: 1; }
#fireBtn circle { fill: none; stroke: #ffd23f; stroke-width: 6; stroke-linecap: round; stroke-dasharray: 289; stroke-dashoffset: calc(289 * (1 - var(--rl, 1))); }
#fireBtn.reload img { opacity: .5; }
#stick { position: absolute; display: block !important; width: 124px; height: 124px; margin: -62px 0 0 -62px; border-radius: 50%; background: rgba(255,255,255,.18); box-shadow: inset 0 0 0 3px rgba(255,255,255,.55); opacity: 0; pointer-events: none; z-index: 7; transition: opacity .15s; left: calc(110px + var(--l)); top: calc(100% - 110px - var(--safe-b)); }
#stick.on { opacity: 1; }
#knob { position: absolute; left: 34px; top: 34px; width: 56px; height: 56px; border-radius: 50%; background: rgba(255,255,255,.95); box-shadow: 0 3px 8px rgba(7,19,29,.3); }
#stick::before { display: none; }
body[data-st="lobby"] #stick:not(.on), body[data-st="play"] #stick:not(.on) { opacity: .45; }
#cross { left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.85); box-shadow: 0 0 0 1px rgba(7,19,29,.25); }
#cross::after { content: ''; position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px; border-radius: 50%; background: #fff; }
#cross.hit { animation: chit .25s ease-out; }
@keyframes chit { 0% { transform: scale(1.7) rotate(45deg); border-color: #ff5c7a; } }
#lock { left: 0; top: 0; width: 58px; height: 58px; margin: -29px; border-radius: 50%; border: 3px dashed #ff5c7a; animation: lockspin 2s linear infinite; }
#lock::after { content: ''; position: absolute; inset: 10px; border-radius: 50%; border: 2px solid rgba(255,92,122,.7); }
#lock.fire { border-style: solid; border-color: #ffd23f; }
@keyframes lockspin { to { rotate: 360deg; } }
#dmgDir { left: 50%; top: 50%; width: 0; height: 0; }
#dmgDir i { position: absolute; left: -60px; top: -150px; width: 120px; height: 150px; transform-origin: 50% 100%; animation: dfade .9s forwards; }
#dmgDir i::before { content: ''; position: absolute; left: 10px; right: 10px; top: 0; height: 26px; border-radius: 60px 60px 0 0; border-top: 9px solid rgba(255,70,100,.85); }
@keyframes dfade { to { opacity: 0; } }
#zoneArrow { left: 50%; top: calc(56px + var(--t)); transform: translateX(-50%); display: flex; align-items: center; gap: 6px; padding: 4px 12px 4px 6px; border-radius: 999px; background: rgba(255,255,255,.9); font-weight: 700; color: #1f6fe0; font-size: 16px; }
#zoneArrow i { width: 26px; height: 26px; background: #3f8cff; clip-path: polygon(50% 0, 100% 55%, 65% 55%, 65% 100%, 35% 100%, 35% 55%, 0 55%); }
#zoneArrow.bad { background: #3f8cff; color: #fff; animation: zflash2 .8s infinite alternate; }
#zoneArrow.bad i { background: #fff; }
@keyframes zflash2 { to { transform: translateX(-50%) scale(1.08); } }
#blueTint { inset: 0; box-shadow: inset 0 0 120px 40px rgba(50,110,255,.55); opacity: 0; transition: opacity .4s; }
#blueTint.on { opacity: 1; }
body::after { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 4; box-shadow: inset 0 0 120px 40px rgba(255, 60, 90, .8); opacity: var(--hurt, 0); }
#jumpCue { left: 50%; bottom: calc(26% + var(--safe-b)); transform: translateX(-50%); width: 104px; height: 104px; border-radius: 50%; background: rgba(255,255,255,.9); display: grid; place-items: center; box-shadow: 0 0 0 6px rgba(255,255,255,.4); animation: tapPulse2 1.1s infinite; }
@keyframes tapPulse2 { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,.8); } 100% { box-shadow: 0 0 0 30px rgba(255,255,255,0); } }
#nums { left: 0; top: 0; }
#nums b { position: absolute; left: 0; top: 0; font-size: 22px; font-weight: 700; color: #fff; -webkit-text-stroke: 1.5px #07131d; opacity: 0; will-change: transform; margin: -14px 0 0 -10px; }
#nums b.big { color: #ffd23f; font-size: 28px; }
#nums b.k { color: #ff5c7a; font-size: 30px; }
#regionName { left: 50%; top: 24%; transform: translateX(-50%); font-family: 'Jua', 'Fredoka', sans-serif; font-size: 34px; color: #fff; -webkit-text-stroke: 2px var(--c, #07131d); paint-order: stroke; opacity: 0; white-space: nowrap; text-shadow: 0 3px 0 rgba(7,19,29,.3); }
#regionName.show { animation: rname 2.6s ease-out; }
@keyframes rname { 0% { opacity: 0; transform: translateX(-50%) translateY(10px); } 15%, 75% { opacity: 1; transform: translateX(-50%); } 100% { opacity: 0; } }
#pickups { left: 50%; bottom: calc(96px + var(--safe-b)); transform: translateX(-50%); display: flex; flex-direction: column-reverse; align-items: center; gap: 4px; }
.pk { display: flex; align-items: center; gap: 6px; padding: 3px 12px 3px 4px; border-radius: 999px; background: rgba(255,255,255,.92); box-shadow: inset 0 0 0 3px var(--c, transparent); font-weight: 700; animation: pk 1.8s ease-out forwards; }
.pk img { width: 34px; height: 34px; object-fit: contain; }
.pk b { font-size: 15px; }
@keyframes pk { 0% { opacity: 0; transform: translateY(16px) scale(.8); } 12% { opacity: 1; transform: none; } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-14px); } }
.wpop { position: fixed; z-index: 6; pointer-events: none; transform: translate(-50%, -50%); font-family: 'Fredoka', sans-serif; font-size: 34px; font-weight: 700; color: #fff; -webkit-text-stroke: 2.5px #ff5c7a; paint-order: stroke; animation: wpop 1.1s ease-out forwards; }
@keyframes wpop { 0% { opacity: 0; transform: translate(-50%, -50%) scale(2.2) rotate(-12deg); } 20% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(-6deg); } 100% { opacity: 0; transform: translate(-50%, -120%) scale(1) rotate(-6deg); } }
.kpop { position: absolute; left: 0; top: 0; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; padding: 6px 18px; border-radius: 999px; background: rgba(255,92,122,.92); color: #fff; font-size: 30px; font-weight: 700; animation: kpop 1.3s ease-out forwards; box-shadow: 0 6px 18px rgba(7,19,29,.3); }
.kpop .i-kill { width: 30px; height: 30px; }
@keyframes kpop { 0% { opacity: 0; transform: translateX(-50%) scale(2); } 15% { opacity: 1; transform: translateX(-50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translateX(-50%) translateY(-30px); } }
#outFx, #winFx { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; pointer-events: none; }
#outFx .stamp { display: flex; flex-direction: column; align-items: center; padding: 16px 44px; border-radius: 28px; background: rgba(255,255,255,.95); border: 6px solid #ff5c7a; transform: rotate(-8deg); animation: stamp .45s cubic-bezier(.2,1.6,.4,1); box-shadow: 0 14px 40px rgba(7,19,29,.35); }
#outFx b { font-size: 84px; line-height: 1; color: #ff5c7a; font-weight: 700; }
#outFx small { font-size: 40px; font-weight: 700; color: #07131d; }
@keyframes stamp { 0% { transform: rotate(-8deg) scale(3); opacity: 0; } }
#winFx { background: radial-gradient(circle, rgba(255,240,180,.75), rgba(255,200,80,.35) 50%, transparent 75%); }
#winFx img { width: min(78vw, 62vh); height: auto; animation: winIn .8s cubic-bezier(.2,1.5,.4,1), winBob 1.6s ease-in-out .8s infinite; filter: drop-shadow(0 16px 30px rgba(7,19,29,.35)); }
#winFx .bone-row { position: absolute; bottom: 14%; display: flex; gap: 14px; }
#winFx .bone-row i { width: 64px; height: 40px; background: #ffd23f; -webkit-mask: var(--bone) center/contain no-repeat; mask: var(--bone) center/contain no-repeat; animation: winBob 1s ease-in-out infinite; }
#winFx .bone-row i:nth-child(2) { animation-delay: .2s; } #winFx .bone-row i:nth-child(3) { animation-delay: .4s; }
@keyframes winIn { 0% { transform: scale(.2) rotate(-20deg); opacity: 0; } }
@keyframes winBob { 50% { transform: translateY(-12px); } }
.fade { position: fixed; inset: 0; z-index: 40; background: #fff; pointer-events: none; animation: fadeo .9s forwards; }
@keyframes fadeo { to { opacity: 0; } }
#loadBar { position: fixed; left: 0; right: 0; bottom: 0; height: 4px; z-index: 50; }
body[data-st="lobby"] #zoneInfo, body[data-st="lobby"] #counts span:last-child { display: none; }
body[data-st="plane"] #vitals, body[data-st="plane"] #fireBtn, body[data-st="plane"] #cross { display: none; }
/* 결과 */
.place { display: flex; align-items: baseline; gap: 2px; font-weight: 700; color: #07131d; }
.place small { font-size: 34px; opacity: .6; }
.place b { font-size: 72px; line-height: 1; }
.place span { font-size: 26px; opacity: .45; }
.place.win b { color: #ffb000; text-shadow: 0 3px 0 #c47a00; }
#over .big-num { font-size: 40px; }
#unlockO { display: flex; gap: 8px; animation: stamp .5s; }
/* 옷장 */
#wardrobe { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; max-width: 360px; }
.wbtn { width: 44px; height: 44px; border-radius: 14px; background: rgba(255,255,255,.85); display: grid; place-items: center; box-shadow: 0 3px 0 rgba(7,19,29,.15); }
.wbtn.sel { box-shadow: 0 0 0 3px #ffb13b, 0 3px 0 rgba(7,19,29,.15); background: #fff6d6; }
.wi { position: relative; width: 30px; height: 30px; display: grid; place-items: center; }
.wi > i { width: 26px; height: 26px; background: var(--c); }
.wi.cape > i { clip-path: polygon(15% 0, 85% 0, 100% 100%, 50% 80%, 0 100%); border-radius: 4px; }
.wi.hat > i { clip-path: polygon(0 100%, 0 30%, 25% 60%, 50% 10%, 75% 60%, 100% 30%, 100% 100%); }
.wi.shot > i { border-radius: 50%; width: 20px; height: 20px; box-shadow: 8px -6px 0 -3px var(--c), -8px 6px 0 -4px var(--c); }
.wi.lock > i { opacity: .25; filter: grayscale(1); }
.wi small { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 1px; font-size: 11px; font-weight: 700; color: #07131d; }
.wi small i { transform: scale(.6); margin: -4px; }
.wi.lock::after { content: ''; position: absolute; right: -6px; top: -6px; width: 12px; height: 10px; border-radius: 2px; background: #8d99a6; box-shadow: 0 -5px 0 -2px transparent; }
#unlockO .wi { width: 46px; height: 46px; border-radius: 14px; background: #fff6d6; box-shadow: 0 0 0 3px #ffb13b; }
/* 세로 화면 */
body.portrait #vitals { width: min(52vw, 260px); bottom: calc(18px + var(--safe-b)); }
body.portrait #fireBtn { right: calc(22px + var(--r)); bottom: calc(118px + var(--safe-b)); width: 108px; height: 108px; }
body.portrait #mapBox { width: 108px; height: 108px; }
body.portrait #feed { top: calc(128px + var(--t)); }
body.portrait #stick { top: calc(100% - 170px - var(--safe-b)); left: 90px; }
body.portrait #pickups { bottom: calc(80px + var(--safe-b)); }
@media (max-height: 420px) {
  #fireBtn { width: 100px; height: 100px; bottom: calc(22px + var(--safe-b)); right: calc(26px + var(--r)); }
  #fireBtn img { width: 64px; height: 54px; }
  #mapBox { width: 100px; height: 100px; }
  body[data-st="plane"] #mapBox, body[data-st="lobby"] #mapBox { width: 128px; height: 128px; }
  #feed { top: calc(118px + var(--t)); }
  #vitals { bottom: calc(8px + var(--safe-b)); width: min(38vw, 300px); }
  .gi { width: 32px; height: 32px; } .gi img { width: 24px; height: 24px; }
  #regionName { top: 18%; font-size: 28px; }
  #lobbyT { font-size: 40px; }
  #counts { top: calc(64px + var(--t)); }
}
/* 낮은 가로 화면: 메뉴 줄이기 */
@media (max-height: 520px) {
  #menu { padding-top: calc(8px + var(--safe-t)); padding-bottom: calc(8px + var(--safe-b)); }
  #menu .logo-img { width: auto; height: 30vh; max-width: 60vw; }
  #hofMenu { display: none !important; }
  .best-m { margin-top: 2px; padding: 3px 12px; }
  .menu-bottom { gap: 8px; }
  #wardrobe { flex-wrap: nowrap; max-width: none; gap: 4px; }
  .wbtn { width: 36px; height: 36px; border-radius: 11px; }
  .wi { transform: scale(.82); }
  #menu .big-btn { height: 54px; font-size: 24px; }
  #menu .row .mid-btn { height: 42px; }
  #menu .studio { display: none; }
}
/* 낮은 가로 화면: 결과를 두 칸으로 */
@media (max-height: 520px) and (min-aspect-ratio: 4/3) {
  #over { justify-content: center; padding-top: calc(8px + var(--safe-t)); padding-bottom: calc(8px + var(--safe-b)); }
  #over .panel { width: min(100%, 720px); display: grid; grid-template-columns: 1fr 1fr; grid-auto-flow: row dense; column-gap: 18px; row-gap: 6px; align-items: center; justify-items: center; padding: 14px 18px; }
  #over .panel > * { grid-column: 1; }
  #over .panel > #overCard, #over .panel > .share-big, #over .panel > .row { grid-column: 2; }
  #over .panel > #overCard { grid-row: 1 / span 4; max-width: 150px; }
  #over .panel > .share-big { grid-row: 5; height: 52px; min-width: 0; width: 100%; font-size: 22px; }
  #over .panel > .row { grid-row: 6; }
  #over .panel > #hofForm, #over .panel > .studio, #over .panel > #moreGames, #over .panel > #hofOver { grid-column: 1 / -1; }
  #over .place b { font-size: 56px; }
  #over .big-num { font-size: 32px; }
}
/* 조준점·정조준 */
#cross { width: 30px; height: 30px; margin: -15px; border: 0; box-shadow: none; transition: transform .12s; }
#cross::before { content: ''; position: absolute; inset: 0; background: linear-gradient(#fff, #fff) 50% 0/3px 9px no-repeat, linear-gradient(#fff, #fff) 50% 100%/3px 9px no-repeat, linear-gradient(#fff, #fff) 0 50%/9px 3px no-repeat, linear-gradient(#fff, #fff) 100% 50%/9px 3px no-repeat; filter: drop-shadow(0 0 1.5px rgba(7,19,29,.8)); }
#cross::after { width: 5px; height: 5px; margin: -2.5px; box-shadow: 0 0 0 1px rgba(7,19,29,.5); }
#cross.on::before { background: linear-gradient(#ff3b5c, #ff3b5c) 50% 0/3px 9px no-repeat, linear-gradient(#ff3b5c, #ff3b5c) 50% 100%/3px 9px no-repeat, linear-gradient(#ff3b5c, #ff3b5c) 0 50%/9px 3px no-repeat, linear-gradient(#ff3b5c, #ff3b5c) 100% 50%/9px 3px no-repeat; }
#cross.on::after { background: #ff3b5c; }
#cross.fire { transform: scale(1.25); }
body.scoped #cross { transform: scale(.6); }
#scopeBtn { position: absolute; right: calc(54px + var(--r)); bottom: calc(184px + var(--safe-b)); width: 62px; height: 62px; border-radius: 50%; background: rgba(255,255,255,.82); box-shadow: 0 4px 0 rgba(7,19,29,.2); display: grid; place-items: center; pointer-events: auto; z-index: 8; touch-action: none; }
#scopeBtn::before { content: ''; position: absolute; inset: -10px; border-radius: 50%; }
#scopeBtn.on { background: #ffd23f; box-shadow: 0 0 0 4px #fff, 0 4px 0 rgba(7,19,29,.2); }
.i-scope { width: 30px; height: 30px; border-radius: 50%; border: 4px solid #07131d; position: relative; }
.i-scope::before, .i-scope::after { content: ''; position: absolute; background: #07131d; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.i-scope::before { width: 34px; height: 3px; } .i-scope::after { width: 3px; height: 34px; }
#scopeView { position: absolute; inset: 0; display: none; background: radial-gradient(circle at 50% 50%, transparent 0 min(34vw, 40vh), rgba(7,19,29,.92) calc(min(34vw, 40vh) + 2px)); }
#scopeView::before, #scopeView::after { content: ''; position: absolute; left: 50%; top: 50%; background: rgba(7,19,29,.85); transform: translate(-50%, -50%); }
#scopeView::before { width: min(68vw, 80vh); height: 2px; } #scopeView::after { width: 2px; height: min(68vw, 80vh); }
body.sniper #scopeView { display: block; }
body.portrait #scopeBtn { right: calc(44px + var(--r)); bottom: calc(244px + var(--safe-b)); }
@media (max-height: 420px) { #scopeBtn { width: 54px; height: 54px; bottom: calc(136px + var(--safe-b)); right: calc(48px + var(--r)); } }
#scopeView { z-index: 2; pointer-events: none; }
#jumpCue { pointer-events: auto; z-index: 8; }
/* 오른쪽 조준(시선) 영역 안내 + 손가락 원 */
#lookZone { left: 52%; right: calc(10px + var(--r)); top: 28%; bottom: 22%; border-radius: 28px; border: 3px dashed rgba(255,255,255,.75); background: rgba(255,255,255,.12); display: grid; place-items: center; opacity: 0; transition: opacity .5s; pointer-events: none; z-index: 2; }
#lookZone.on { opacity: 1; }
.i-look { width: 72px; height: 72px; border-radius: 50%; background: rgba(7,19,29,.35); position: relative; }
.i-look::before { content: ''; position: absolute; inset: 22px; border: 4px solid #fff; border-radius: 50%; }
.i-look::after { content: ''; position: absolute; left: -18px; right: -18px; top: 50%; height: 0; border-top: 4px solid #fff; transform: translateY(-50%); -webkit-mask: linear-gradient(90deg, #000 0 18px, transparent 18px calc(100% - 18px), #000 calc(100% - 18px)); mask: linear-gradient(90deg, #000 0 18px, transparent 18px calc(100% - 18px), #000 calc(100% - 18px)); }
#lookZone.on .i-look { animation: lookSway 1.4s ease-in-out infinite; }
@keyframes lookSway { 0%, 100% { transform: translateX(-16px); } 50% { transform: translateX(16px); } }
#lookDot { left: 0; top: 0; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; border: 3px solid rgba(255,255,255,.9); background: rgba(255,255,255,.18); box-shadow: 0 0 0 2px rgba(7,19,29,.25); opacity: 0; pointer-events: none; z-index: 7; transition: opacity .15s; }
#lookDot.on { opacity: 1; }
/* 조준점: 흰 십자 + 검은 테두리, 적 위면 빨강 */
#cross { width: 40px; height: 40px; margin: -20px; }
#cross::before { background: none; filter: none; inset: 0; }
#cross i { position: absolute; background: #fff; box-shadow: 0 0 0 2px #07131d; border-radius: 2px; }
#cross i:nth-child(1) { left: 18px; top: 0; width: 4px; height: 12px; } #cross i:nth-child(2) { left: 18px; bottom: 0; width: 4px; height: 12px; }
#cross i:nth-child(3) { top: 18px; left: 0; width: 12px; height: 4px; } #cross i:nth-child(4) { top: 18px; right: 0; width: 12px; height: 4px; }
#cross::after { width: 6px; height: 6px; margin: -3px; background: #fff; box-shadow: 0 0 0 2px #07131d; }
#cross.on i, #cross.on::after { background: #ff3b5c; }
body.portrait #lookZone { left: 48%; top: 30%; bottom: 34%; }
/* 총 2칸 교체·탑승 버튼·탄약 */
#swapBtn, #rideBtn { position: absolute; width: 64px; height: 64px; border-radius: 18px; background: rgba(255,255,255,.88); box-shadow: 0 0 0 3px var(--rc, #fff), 0 4px 0 rgba(7,19,29,.2); display: grid; place-items: center; pointer-events: auto; z-index: 8; touch-action: none; }
#swapBtn::before, #rideBtn::before { content: ''; position: absolute; inset: -8px; }
#swapBtn { right: calc(160px + var(--r)); bottom: calc(40px + var(--safe-b)); }
#swapBtn img, #rideBtn img { width: 48px; height: 40px; object-fit: contain; pointer-events: none; }
.i-swap { position: absolute; right: -6px; top: -6px; width: 24px; height: 24px; border-radius: 50%; background: #07131d; }
.i-swap::before { content: ''; position: absolute; inset: 6px; border: 2.5px solid #fff; border-radius: 50%; border-right-color: transparent; }
#rideBtn { right: calc(160px + var(--r)); bottom: calc(118px + var(--safe-b)); width: 72px; height: 72px; border-radius: 50%; background: #ffd23f; box-shadow: 0 0 0 4px #fff, 0 4px 0 rgba(7,19,29,.25); animation: tapPulse2 1.2s infinite; }
#rideBtn .i-exit { display: none; }
#rideBtn.exit img { opacity: .55; }
#rideBtn.exit .i-exit { display: block; position: absolute; width: 30px; height: 30px; background: #ff5c7a; clip-path: polygon(0 40%, 55% 40%, 55% 15%, 100% 50%, 55% 85%, 55% 60%, 0 60%); }
#ammo small { font-size: 11px; opacity: .55; margin-left: 2px; }
#ammo.empty { animation: aempty .5s; background: #ff5c7a !important; color: #fff; }
@keyframes aempty { 30% { transform: translateX(-50%) scale(1.3); } }
.win-t { position: absolute; top: 9%; font-family: 'Jua', 'Fredoka', sans-serif; font-size: clamp(30px, 7vw, 56px); color: #fff; -webkit-text-stroke: 3px #ff8a00; paint-order: stroke; text-shadow: 0 5px 0 rgba(7,19,29,.25); animation: winIn .7s cubic-bezier(.2,1.5,.4,1); white-space: nowrap; }
body.portrait #swapBtn { right: calc(140px + var(--r)); bottom: calc(118px + var(--safe-b)); }
body.portrait #rideBtn { right: calc(140px + var(--r)); bottom: calc(196px + var(--safe-b)); }
@media (max-height: 420px) { #swapBtn { right: calc(140px + var(--r)); bottom: calc(22px + var(--safe-b)); width: 56px; height: 56px; } #rideBtn { right: calc(140px + var(--r)); bottom: calc(92px + var(--safe-b)); width: 60px; height: 60px; } }
/* 왼쪽 위 일시정지·집 버튼: 나란히 같은 크기 (공용 규칙의 top/left 덮기) */
.tl-btns { gap: 10px; }
.tl-btns #btnPause, .tl-btns #btnHomeH { position: relative !important; top: 0 !important; left: 0 !important; width: 50px !important; height: 50px !important; border-radius: 15px !important; display: grid !important; place-items: center; background: rgba(255,255,255,.92); box-shadow: 0 4px 0 rgba(7,19,29,.2); color: #07131d; }
.tl-btns #btnPause::before, .tl-btns #btnHomeH::before { inset: -6px; }
#counts { top: calc(72px + var(--t)); }
/* 강아지 10종 고르기 */
#chars { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; max-width: 380px; }
.cbtn { width: 52px; height: 52px; border-radius: 16px; background: rgba(255,255,255,.85); box-shadow: 0 3px 0 rgba(7,19,29,.15); padding: 2px; overflow: hidden; }
.cbtn img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.cbtn.sel { background: #fff6d6; box-shadow: 0 0 0 3px #ffb13b, 0 3px 0 rgba(7,19,29,.15); transform: scale(1.08); }
@media (max-height: 520px) { #chars { flex-wrap: nowrap; max-width: none; gap: 4px; } .cbtn { width: 40px; height: 40px; border-radius: 12px; } #wardrobe { display: none; } }
/* 온라인 베타·로그인 */
.play-row { display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; }
.online-btn { min-width: 150px; background: linear-gradient(180deg, #5fd0ff, #1f8cf0); box-shadow: 0 7px 0 #135ea8, 0 14px 28px rgba(7,19,29,.25); flex-direction: row; gap: 8px; }
.online-btn small { font-size: 15px; background: rgba(255,255,255,.9); color: #1f6fe0; border-radius: 999px; padding: 1px 8px; }
.online-btn small:empty { display: none; }
.online-btn.full { filter: grayscale(.8); opacity: .7; }
.i-globe { width: 26px; height: 26px; border-radius: 50%; border: 3.5px solid currentColor; position: relative; }
.i-globe::before { content: ''; position: absolute; inset: 0 6px; border: 3px solid currentColor; border-top: 0; border-bottom: 0; border-radius: 50%; }
.i-globe::after { content: ''; position: absolute; left: -2px; right: -2px; top: 50%; height: 3px; margin-top: -1.5px; background: currentColor; }
#account { display: flex; justify-content: center; min-height: 44px; }
#account .me { display: none; align-items: center; gap: 8px; padding: 4px 12px; border-radius: 999px; background: rgba(255,255,255,.9); box-shadow: 0 3px 0 rgba(7,19,29,.15); }
#account.in #gbtn { display: none; }
#account.in .me { display: flex; }
#nickIn { width: 130px; border: 0; background: #eef6ff; border-radius: 10px; padding: 6px 10px; font: 600 17px 'Jua', 'Fredoka', sans-serif; color: #07131d; }
#account .ic-btn { width: 34px; height: 34px; border-radius: 50%; background: #fff; }
#gbtn.nudge { animation: aempty .5s 2; }
@media (max-height: 520px) { .online-btn { min-width: 120px; height: 54px; font-size: 22px; } #account { min-height: 36px; } }
/* 전체 채팅 */
#chatBtn { display: none !important; }
body.online #chatBtn { display: grid !important; }
.i-chat { width: 24px; height: 20px; background: currentColor; border-radius: 8px; position: relative; }
.i-chat::after { content: ''; position: absolute; left: 4px; bottom: -6px; border: 5px solid transparent; border-top-color: currentColor; border-left-color: currentColor; }
#chatLog { left: calc(12px + var(--l)); top: calc(110px + var(--t)); width: min(44vw, 300px); display: flex; flex-direction: column; gap: 3px; pointer-events: none; }
.cl { align-self: flex-start; max-width: 100%; padding: 3px 10px; border-radius: 12px; background: rgba(7,19,29,.5); color: #fff; font-size: 14px; line-height: 1.35; transition: opacity .6s; word-break: break-all; }
.cl b { color: #ffd23f; margin-right: 6px; } .cl.me b { color: #8fe9ff; }
.cl.gone { opacity: 0; }
#chatBox { position: absolute; left: 50%; top: calc(64px + var(--t)); transform: translateX(-50%); width: min(92vw, 420px); padding: 10px; border-radius: 18px; background: rgba(255,255,255,.95); box-shadow: 0 8px 24px rgba(7,19,29,.3); pointer-events: auto; z-index: 30; display: flex; flex-direction: column; gap: 8px; }
#chatEmo { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
#chatEmo button { min-width: 40px; height: 40px; border-radius: 12px; background: #eef6ff; font-size: 20px; font-weight: 700; }
#chatBox .row1 { display: flex; gap: 6px; }
#chatIn { flex: 1; border: 0; background: #eef6ff; border-radius: 12px; padding: 8px 12px; font-size: 16px; }
#chatSend { width: 44px; height: 44px; border-radius: 12px; background: #2fd6ee; color: #fff; }
@media (max-height: 420px) { #chatLog { top: calc(100px + var(--t)); width: min(36vw, 260px); } .cl { font-size: 12px; } }
