/* 네온 부스트 스네이크 */
:root {
  --bg: #02040a; --panel: rgba(8, 14, 28, .92); --line: rgba(34, 211, 238, .28);
  --text: #f1f5f9; --mute: #94a3b8; --cyan: #22d3ee; --green: #34d399; --pink: #f472b6; --yellow: #fde047;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; overflow: hidden; background: var(--bg); }
body { color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Pretendard", "Noto Sans KR", sans-serif; user-select: none; -webkit-user-select: none; touch-action: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
[hidden] { display: none !important; }
#cv { position: fixed; inset: 0; display: block; cursor: crosshair; }

.back-btn { position: fixed; top: calc(10px + env(safe-area-inset-top)); left: calc(10px + env(safe-area-inset-left)); z-index: 30; color: var(--green); text-decoration: none; font-weight: 700; font-size: .85rem; display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px; border-radius: 9px; background: rgba(2, 10, 18, .7); border: 1px solid rgba(52, 211, 153, .3); }
.back-btn:hover { background: rgba(52, 211, 153, .2); }
body.playing .back-btn { opacity: .55; }

.hud { position: fixed; top: calc(10px + env(safe-area-inset-top)); right: calc(10px + env(safe-area-inset-right)); left: 130px; z-index: 20; display: flex; justify-content: flex-end; align-items: center; gap: 8px; pointer-events: none; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.chip { font-size: .85rem; font-weight: 700; padding: 5px 10px; border-radius: 99px; background: rgba(2, 8, 18, .72); border: 1px solid rgba(255, 255, 255, .1); font-variant-numeric: tabular-nums; white-space: nowrap; }
.chip.goal { color: var(--yellow); border-color: rgba(253, 224, 71, .35); }
.chip.score b { color: var(--green); }
.icon-btn { pointer-events: auto; width: 36px; height: 36px; border-radius: 10px; background: rgba(2, 8, 18, .72); border: 1px solid rgba(255, 255, 255, .15); font-size: 1rem; flex-shrink: 0; }
.fx-bar { position: fixed; top: calc(54px + env(safe-area-inset-top)); right: calc(10px + env(safe-area-inset-right)); z-index: 20; display: flex; gap: 6px; pointer-events: none; }
.fx { position: relative; width: 38px; height: 38px; border-radius: 10px; background: rgba(2, 8, 18, .75); border: 1px solid; display: grid; place-items: center; font-size: 1.1rem; overflow: hidden; }
.fx i { position: absolute; left: 0; bottom: 0; height: 3px; background: currentColor; }
.fx small { position: absolute; right: 2px; bottom: 2px; font-size: .62rem; font-weight: 800; }

.boost-wrap { position: fixed; bottom: calc(16px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: min(420px, 62vw); z-index: 20; display: flex; align-items: center; gap: 8px; pointer-events: none; font-size: .8rem; font-weight: 800; color: var(--cyan); }
.boost-bg { flex: 1; height: 9px; border-radius: 99px; background: rgba(15, 23, 42, .8); border: 1px solid rgba(34, 211, 238, .35); overflow: hidden; }
.boost-bg i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #06b6d4, #67e8f9); box-shadow: 0 0 10px #06b6d4; }
.boost-bg i.low { background: #64748b; box-shadow: none; }
.boost-wrap .len { color: var(--green); white-space: nowrap; font-variant-numeric: tabular-nums; }
.boost-btn { position: fixed; right: calc(18px + env(safe-area-inset-right)); bottom: calc(46px + env(safe-area-inset-bottom)); z-index: 25; width: 78px; height: 78px; border-radius: 50%; font-size: 2rem; background: radial-gradient(circle, rgba(34, 211, 238, .35), rgba(2, 8, 18, .75)); border: 2px solid rgba(34, 211, 238, .6); box-shadow: 0 0 20px rgba(34, 211, 238, .35); touch-action: none; }
.boost-btn.on { background: radial-gradient(circle, rgba(34, 211, 238, .75), rgba(8, 47, 73, .9)); transform: scale(.94); }

.screen { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; padding: 60px 14px 20px; overflow-y: auto; background: radial-gradient(circle at 50% 30%, rgba(8, 47, 73, .55), rgba(2, 4, 10, .92)); }
.screen.dim { background: rgba(2, 4, 10, .7); backdrop-filter: blur(4px); }
.panel { width: min(420px, 100%); margin: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 22px 18px; text-align: center; box-shadow: 0 20px 60px rgba(0, 0, 0, .6), 0 0 40px rgba(34, 211, 238, .08); }
.panel.wide { width: min(640px, 100%); }
h2 { font-size: 1.45rem; margin-bottom: 10px; background: linear-gradient(135deg, #67e8f9, #34d399, #fde047); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow { font-size: .75rem; letter-spacing: .15em; color: var(--cyan); font-weight: 800; }
.logo span { font-size: 3.4rem; display: inline-block; animation: wig 2.6s ease-in-out infinite; filter: drop-shadow(0 0 16px rgba(52, 211, 153, .6)); }
.logo h1 { font-size: clamp(1.4rem, 6vw, 2.1rem); font-weight: 900; letter-spacing: .02em; background: linear-gradient(135deg, #34d399, #22d3ee, #fde047); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo p { color: var(--mute); margin-top: 2px; }
@keyframes wig { 50% { transform: rotate(-8deg) translateY(-6px); } }
.menu { display: flex; flex-direction: column; gap: 10px; margin: 18px auto 14px; width: min(340px, 100%); }
.btn { padding: 11px 18px; border-radius: 12px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .15); font-weight: 700; transition: transform .12s, background .2s; }
.btn:hover:not(:disabled) { background: rgba(255, 255, 255, .14); transform: translateY(-1px); }
.btn.primary { background: linear-gradient(135deg, #10b981, #0891b2); border-color: transparent; color: #fff; box-shadow: 0 6px 20px rgba(16, 185, 129, .35); }
.btn.big { padding: 14px 18px; font-size: 1.05rem; }
.btn.small { padding: 7px 14px; font-size: .85rem; }
.btn small { display: block; font-size: .78rem; font-weight: 600; opacity: .85; margin-top: 2px; }
.btns { display: flex; gap: 8px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.btns.col { flex-direction: column; }
.how { text-align: left; font-size: .82rem; color: var(--mute); line-height: 1.6; background: rgba(0, 0, 0, .25); border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; }
.how p + p { margin-top: 6px; }
.how b { color: var(--text); margin-right: 4px; }
.items span { display: inline-block; margin-right: 10px; white-space: nowrap; }

.zone { margin: 12px 0 4px; text-align: left; }
.zone h3 { font-size: .9rem; margin-bottom: 6px; }
.zone-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
@media (max-width: 480px) { .zone-grid { grid-template-columns: repeat(2, 1fr); } }
.st-card { padding: 10px 6px; border-radius: 12px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .12); text-align: center; }
.st-card:hover:not(:disabled) { background: rgba(255, 255, 255, .1); }
.st-card b { display: block; font-size: 1.1rem; }
.st-card span { display: block; font-size: .78rem; color: var(--mute); margin: 2px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-card .st { color: var(--yellow); letter-spacing: 1px; font-size: .85rem; }
.st-card .st .off { color: #334155; }
.st-card:disabled { opacity: .35; cursor: not-allowed; }

.goal-line { font-size: 1.1rem; font-weight: 800; color: var(--yellow); margin: 8px 0; }
.tip { color: var(--mute); font-size: .88rem; line-height: 1.55; }
.rate { margin-top: 10px; font-size: .8rem; color: #cbd5e1; }
.stars { font-size: 2.4rem; letter-spacing: 6px; margin: 4px 0 10px; }
.stars i { font-style: normal; color: #1e293b; display: inline-block; }
.stars i.on { color: var(--yellow); text-shadow: 0 0 18px rgba(253, 224, 71, .7); animation: pop .45s backwards; }
.stars i.on:nth-child(2) { animation-delay: .15s; } .stars i.on:nth-child(3) { animation-delay: .3s; }
@keyframes pop { from { transform: scale(0) rotate(-90deg); } }
.res-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.res-grid div { background: rgba(0, 0, 0, .3); border-radius: 10px; padding: 8px; }
.res-grid span { display: block; font-size: .75rem; color: var(--mute); }
.res-grid b { font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.new-rec { margin-top: 10px; color: var(--yellow); font-weight: 800; }
.noscript { position: fixed; inset: 0; display: grid; place-items: center; }

.menu-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn.daily { border-color: rgba(253, 224, 71, .45); background: rgba(253, 224, 71, .08); }
.menu-row small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.skin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin-top: 12px; }
.skin-card { padding: 10px 8px; border-radius: 12px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .12); text-align: center; }
.skin-card:hover:not(:disabled) { background: rgba(255, 255, 255, .1); }
.skin-card.on { border-color: var(--green); box-shadow: 0 0 14px rgba(52, 211, 153, .35); }
.skin-card i { display: block; height: 14px; border-radius: 99px; margin: 2px 6px 8px; box-shadow: 0 0 10px rgba(255, 255, 255, .15); }
.skin-card b { display: block; font-size: .9rem; }
.skin-card span { display: block; font-size: .75rem; color: var(--mute); margin-top: 2px; }
.skin-card.on span { color: var(--green); }
.skin-card:disabled { opacity: .45; cursor: not-allowed; }
.skin-card:disabled i { filter: grayscale(.8) brightness(.6); }

/* 지난 도전·업적 */
.past-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin-top: 12px; }
.past-card { padding: 10px 8px; border-radius: 12px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .12); text-align: center; }
.past-card:hover { background: rgba(255, 255, 255, .1); }
.past-card b { display: block; font-size: .95rem; }
.past-card span { display: block; font-size: .78rem; color: var(--mute); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.past-card.tried { border-color: rgba(253, 224, 71, .35); }
.past-card.done { border-color: var(--green); box-shadow: 0 0 12px rgba(52, 211, 153, .25); }
.past-card.done .sc { color: var(--green); }
.ach-sum { font-size: .9rem; color: var(--mute); -webkit-text-fill-color: var(--mute); }
.ach-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; margin-top: 8px; text-align: left; }
.ach { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; background: rgba(0, 0, 0, .28); border: 1px solid rgba(255, 255, 255, .08); opacity: .55; }
.ach.got { opacity: 1; border-color: rgba(253, 224, 71, .4); }
.ach .ai { font-size: 1.5rem; width: 32px; text-align: center; flex: none; }
.ach b { display: block; font-size: .9rem; }
.ach small { display: block; font-size: .75rem; color: var(--mute); line-height: 1.4; }
.res-ach { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.res-ach span { padding: 4px 10px; border-radius: 99px; background: rgba(253, 224, 71, .12); border: 1px solid rgba(253, 224, 71, .45); color: var(--yellow); font-size: .8rem; font-weight: 700; animation: pop .45s backwards; }
