/* 네온 플래피 제트 */
:root {
  --bg: #020617; --panel: rgba(8, 12, 28, .93); --line: rgba(34, 211, 238, .28);
  --text: #f1f5f9; --mute: #94a3b8; --cyan: #22d3ee; --pink: #f472b6; --yellow: #fde047; --violet: #a78bfa;
}
* { 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; width: 100%; height: 100%; display: block; }

.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(--cyan); 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(34, 211, 238, .3); }
.back-btn:hover { background: rgba(34, 211, 238, .2); }
body.playing .back-btn { display: none; }

.hud { position: fixed; top: calc(10px + env(safe-area-inset-top)); right: calc(10px + env(safe-area-inset-right)); left: calc(10px + env(safe-area-inset-left)); z-index: 20; display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; pointer-events: none; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.chip { font-size: .9rem; font-weight: 800; padding: 5px 11px; border-radius: 99px; background: rgba(2, 8, 18, .72); border: 1px solid rgba(255, 255, 255, .12); font-variant-numeric: tabular-nums; white-space: nowrap; }
.chip.score { font-size: 1.25rem; color: #fff; text-shadow: 0 0 12px rgba(34, 211, 238, .8); }
.chip.coin b { color: var(--yellow); }
.chip.fx:empty { display: none; }
.chip.fx span { margin-right: 6px; }
.chip.fx span:last-child { margin-right: 0; }
.icon-btn { pointer-events: auto; width: 38px; height: 38px; border-radius: 10px; background: rgba(2, 8, 18, .72); border: 1px solid rgba(255, 255, 255, .15); font-size: 1rem; flex-shrink: 0; }
.prog-wrap { position: fixed; bottom: calc(14px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: min(420px, 76vw); z-index: 20; pointer-events: none; }
.prog-bg { position: relative; height: 8px; border-radius: 99px; background: rgba(15, 23, 42, .8); border: 1px solid rgba(34, 211, 238, .35); }
.prog-bg i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: linear-gradient(90deg, #06b6d4, #f472b6); width: 0; }
.prog-bg b { position: absolute; top: 50%; transform: translate(-50%, -50%); font-size: .9rem; left: 0; }
.banner { position: fixed; top: 22%; left: 50%; transform: translateX(-50%); z-index: 25; pointer-events: none; font-weight: 900; font-size: clamp(1.3rem, 6vw, 2rem); letter-spacing: .04em; text-align: center; text-shadow: 0 0 20px currentColor; animation: bannerIn 2.2s ease forwards; white-space: nowrap; }
.banner small { display: block; font-size: .5em; color: #e2e8f0; text-shadow: none; letter-spacing: .1em; }
@keyframes bannerIn { 0% { opacity: 0; transform: translate(-50%, 12px) scale(.9); } 15%, 75% { opacity: 1; transform: translate(-50%, 0) scale(1); } 100% { opacity: 0; transform: translate(-50%, -10px); } }

.screen { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; padding: 60px 14px 20px; overflow-y: auto; touch-action: pan-y; 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, #f472b6, #fde047); -webkit-background-clip: text; background-clip: text; color: transparent; }
h3.sub { text-align: left; font-size: .95rem; margin: 14px 0 8px; color: var(--cyan); }
.logo span { font-size: 3.4rem; display: inline-block; animation: fly 2.4s ease-in-out infinite; filter: drop-shadow(0 0 16px rgba(34, 211, 238, .6)); }
.logo h1 { font-size: clamp(1.4rem, 6vw, 2.1rem); font-weight: 900; letter-spacing: .02em; background: linear-gradient(135deg, #22d3ee, #f472b6, #fde047); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo p { color: var(--mute); margin-top: 2px; }
@keyframes fly { 50% { transform: translate(6px, -8px) rotate(8deg); } }
.wallet { margin-top: 8px; font-weight: 800; color: var(--yellow); font-variant-numeric: tabular-nums; }
.menu { display: flex; flex-direction: column; gap: 10px; margin: 14px auto; 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:disabled { opacity: .4; cursor: not-allowed; }
.btn.primary { background: linear-gradient(135deg, #06b6d4, #db2777); border-color: transparent; color: #fff; box-shadow: 0 6px 20px rgba(6, 182, 212, .3); }
.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; }
.how span { white-space: nowrap; margin-right: 6px; }
.tip { color: var(--mute); font-size: .85rem; line-height: 1.55; }

.zone { margin: 12px 0 4px; text-align: left; }
.zone h3 { font-size: .9rem; margin-bottom: 6px; }
.zone-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.zone-grid.four { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 440px) { .zone-grid.four { 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; min-width: 0; }
.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 i { font-style: normal; color: #334155; }
.st-card:disabled { opacity: .35; cursor: not-allowed; }

.skin-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.skin { padding: 10px 6px; border-radius: 12px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .12); min-width: 0; }
.skin.on { border-color: var(--cyan); background: rgba(34, 211, 238, .12); box-shadow: 0 0 14px rgba(34, 211, 238, .25); }
.skin canvas { display: block; margin: 0 auto 4px; width: 64px; height: 36px; }
.skin b { display: block; font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.skin span { display: block; font-size: .75rem; color: var(--mute); margin-top: 2px; }
.skin .price { color: var(--yellow); }
.up-list { display: flex; flex-direction: column; gap: 8px; }
.up { display: flex; align-items: center; gap: 10px; text-align: left; padding: 9px 10px; border-radius: 12px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); }
.up .ic { font-size: 1.5rem; }
.up .info { flex: 1; min-width: 0; }
.up .info b { display: block; font-size: .9rem; }
.up .info span { font-size: .78rem; color: var(--mute); }
.up .pips { color: var(--cyan); letter-spacing: 2px; font-size: .8rem; }
.up .btn { padding: 8px 12px; font-size: .82rem; white-space: nowrap; }

.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(52, 211, 153, .45); background: rgba(16, 185, 129, .12); }
.ach-list { display: flex; flex-direction: column; gap: 7px; text-align: left; }
.ach { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .08); }
.ach.done { border-color: rgba(253, 224, 71, .4); background: rgba(253, 224, 71, .07); }
.ach .ic { font-size: 1.4rem; filter: grayscale(1); opacity: .6; }
.ach.done .ic { filter: none; opacity: 1; }
.ach .info { flex: 1; min-width: 0; }
.ach .info b { display: block; font-size: .88rem; }
.ach .info > span { display: block; font-size: .75rem; color: var(--mute); }
.ach .bar { display: block; height: 4px; border-radius: 9px; background: rgba(255, 255, 255, .08); margin-top: 5px; overflow: hidden; }
.ach .bar i { display: block; height: 100%; background: linear-gradient(90deg, #06b6d4, #fde047); }
.ach .rw { text-align: right; font-size: .78rem; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ach .rw small { display: block; color: var(--yellow); font-weight: 600; }
.res-ach { margin-top: 10px; font-size: .85rem; display: flex; flex-direction: column; gap: 4px; }
.res-ach div { background: rgba(253, 224, 71, .1); border: 1px solid rgba(253, 224, 71, .35); border-radius: 10px; padding: 6px 8px; }
.res-ach span { color: var(--yellow); }
.toast { position: fixed; bottom: calc(24px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); z-index: 60; pointer-events: none; padding: 10px 16px; border-radius: 14px; background: rgba(8, 12, 28, .95); border: 1px solid rgba(253, 224, 71, .5); font-size: .88rem; text-align: center; line-height: 1.6; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); max-width: 92vw; }
@media (max-width: 380px) { .skin-grid { grid-template-columns: repeat(2, 1fr); } }
