/* 게임 화면 공통 틀 */
html, body.play { height: 100%; }
body.play { margin: 0; display: flex; flex-direction: column; overflow: hidden; background: #1c2140; color: #fff; touch-action: manipulation; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.playbar { flex: none; height: 48px; display: flex; align-items: center; gap: 6px; padding: 0 8px; background: #141833; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.playbar a, .playbar button { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; border: 0; background: none; color: #cfd3ff; font-size: 20px; }
.playbar a:hover, .playbar button:hover { background: rgba(255, 255, 255, 0.08); }
.pb-title { flex: 1; min-width: 0; font-family: var(--title); font-weight: 400; font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stage { flex: 1; min-height: 0; position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; }
body.play:fullscreen .playbar { display: none; }

/* 시작 · 끝 화면 */
.overlay { position: absolute; inset: 0; z-index: 10; display: grid; place-items: center; padding: 16px; background: rgba(15, 18, 40, 0.72); backdrop-filter: blur(4px); }
.overlay[hidden] { display: none; }
.panel { width: min(400px, 100%); max-height: 100%; overflow: auto; background: #fff; color: var(--ink); border-radius: 24px; padding: 26px 24px; text-align: center; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35); animation: pop-in 0.25s ease-out; }
@keyframes pop-in { from { transform: scale(0.9); opacity: 0; } }
.panel h2 { font-size: 34px; margin: 4px 0 6px; }
.panel p { margin: 0 0 12px; color: var(--ink-2); }
.panel ul { text-align: left; color: var(--ink-2); padding-left: 20px; margin: 0 0 16px; font-size: 15px; }
.panel .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 18px; }
.panel .stats div { background: var(--panel-2); border-radius: 14px; padding: 10px 4px; }
.panel .stats b { display: block; font-family: var(--title); font-weight: 400; font-size: 26px; color: var(--main-ink); }
.panel .stats span { font-size: 12px; color: var(--muted); }
.panel .newbest { color: var(--pop); font-weight: 800; }
.big-btn { display: block; width: 100%; font-family: var(--title); font-size: 24px; padding: 14px; border: 0; border-radius: 16px; background: var(--main); color: #fff; margin-top: 6px; box-shadow: 0 8px 20px rgba(79, 91, 234, 0.35); }
.big-btn:active { transform: scale(0.97); }
.sub-btn { display: block; width: 100%; font-size: 15px; padding: 11px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--ink-2); margin-top: 8px; text-align: center; }
.panel .seg { display: flex; gap: 6px; margin: 4px 0 12px; }
.panel .seg button { flex: 1; padding: 10px 4px; border-radius: 12px; border: 2px solid var(--line); background: #fff; font-weight: 700; color: var(--ink-2); }
.panel .seg button.on { border-color: var(--main); background: var(--main-soft); color: var(--main-ink); }

/* 위쪽 점수판 */
.hud { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.hud div { min-width: 82px; background: rgba(255, 255, 255, 0.08); border-radius: 12px; padding: 4px 12px; text-align: center; }
.hud span { display: block; font-size: 11px; color: #a9afd6; letter-spacing: 0.04em; }
.hud b { font-family: var(--title); font-weight: 400; font-size: 24px; line-height: 1.2; }
