/* ============ 脉动回来-听歌猜曲 样式 ============ */
:root {
  --bg: #07070c;
  --bg-soft: #0c0d15;
  --panel: rgba(255, 255, 255, 0.055);
  --panel-strong: rgba(255, 255, 255, 0.085);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f5f6fb;
  --muted: #9aa1b8;
  --muted-2: #6f768d;
  --violet: #7c5cff;
  --cyan: #22d3ee;
  --rose: #ff4d9d;
  --amber: #ffc857;
  --good: #26d07c;
  --bad: #ff4d6d;
  --radius: 20px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  --font: "Inter", "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding: 0 20px 64px;
  padding-bottom: calc(64px + env(safe-area-inset-bottom));
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: contain;
}
button, a, input, select { touch-action: manipulation; }
button { font-family: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { display: block; max-width: 100%; }
h1, h2, h3 { font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
small { font-size: 12px; }

/* ---------- 背景 ---------- */
.bg-layer { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: radial-gradient(120% 80% at 50% -10%, #141226 0%, #07070c 55%); }
.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.5; }
.orb-a { width: 520px; height: 520px; left: -140px; top: -120px; background: #4b2bd6; animation: float-a 18s ease-in-out infinite; }
.orb-b { width: 460px; height: 460px; right: -160px; top: 160px; background: #0e7f96; animation: float-b 22s ease-in-out infinite; }
.orb-c { width: 380px; height: 380px; left: 30%; bottom: -220px; background: #9d1d63; opacity: 0.35; animation: float-a 26s ease-in-out infinite reverse; }
.grid-lines {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.028) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(70% 60% at 50% 20%, #000 0%, transparent 100%);
}
@keyframes float-a { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(60px,40px) scale(1.12); } }
@keyframes float-b { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-50px,60px) scale(1.08); } }

/* ---------- 布局 ---------- */
#main { width: 100%; max-width: 980px; margin: 0 auto; }
.screen { display: none; animation: screen-in 0.45s cubic-bezier(.2,.8,.2,1); }
.screen.active { display: block; }
@keyframes screen-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- 顶栏 ---------- */
.topbar { max-width: 980px; margin: 0 auto; padding: 20px 2px 8px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo-mark { display: flex; align-items: flex-end; gap: 3px; height: 22px; }
.logo-mark i { width: 3.5px; border-radius: 2px; background: linear-gradient(180deg, var(--cyan), var(--violet)); animation: eq 1.1s ease-in-out infinite; }
.logo-mark i:nth-child(1) { height: 40%; animation-delay: -0.2s; }
.logo-mark i:nth-child(2) { height: 100%; animation-delay: -0.5s; }
.logo-mark i:nth-child(3) { height: 65%; animation-delay: -0.8s; }
.logo-mark i:nth-child(4) { height: 85%; animation-delay: -0.35s; }
.logo-text { font-weight: 800; font-size: 17px; letter-spacing: -0.02em; }
.logo-text em { font-style: normal; background: linear-gradient(90deg, var(--cyan), var(--violet) 60%, var(--rose)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.chip-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); color: var(--muted); font-size: 13px; transition: .2s; }
.chip-btn:hover { color: var(--text); border-color: var(--line-strong); background: var(--panel-strong); }
.profile-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); transition: .2s; }
.profile-chip:hover { border-color: var(--line-strong); background: var(--panel-strong); }
.profile-name { font-size: 13px; color: var(--text); max-width: 84px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.avatar { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font-size: 13px; font-weight: 800; color: #0a0a12; background: linear-gradient(135deg, var(--cyan), var(--violet)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); flex: none; }
.avatar-sm { width: 28px; height: 28px; font-size: 12px; }
.avatar-lg { width: 68px; height: 68px; font-size: 24px; }

/* ---------- 按钮 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border-radius: 14px; font-weight: 700; font-size: 14px; letter-spacing: .01em; transition: transform .18s, box-shadow .18s, background .18s, border-color .18s; border: 1px solid transparent; }
.btn:active { transform: scale(.97); }
.btn-primary { background: linear-gradient(120deg, #7c5cff, #5b8dff 55%, #22d3ee); color: #08080f; box-shadow: 0 12px 30px rgba(92, 105, 255, .35), inset 0 1px 0 rgba(255,255,255,.45); }
.btn-primary:hover { box-shadow: 0 16px 40px rgba(92, 105, 255, .5); transform: translateY(-1px); }
.btn-ghost { background: var(--panel); border-color: var(--line); color: var(--text); }
.btn-ghost:hover { background: var(--panel-strong); border-color: var(--line-strong); }
.btn-lg { padding: 14px 26px; font-size: 15px; border-radius: 16px; }
.btn-block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); color: var(--muted); transition: .2s; }
.icon-btn:hover { color: var(--text); background: var(--panel-strong); }

/* ---------- 首页 ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 20px; align-items: center; padding: 42px 0 34px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); letter-spacing: .06em; }
.eyebrow b { color: var(--cyan); }
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 4px rgba(38,208,124,.15); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(38,208,124,0); } }
.hero h1 { font-size: clamp(30px, 5.2vw, 46px); margin: 14px 0 12px; background: linear-gradient(120deg, #fff 20%, #c9c2ff 60%, #8fe8ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { color: var(--muted); font-size: 14px; }
.hero-actions { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }

.hero-visual { position: relative; display: grid; place-items: center; min-height: 250px; }
.vinyl { position: relative; border-radius: 50%; background: radial-gradient(circle at 50% 42%, #23232f 0 18%, #101017 40%, #0a0a10 100%); box-shadow: 0 30px 60px rgba(0,0,0,.6), inset 0 0 0 1px rgba(255,255,255,.07); }
.vinyl-hero { width: 210px; height: 210px; animation: spin 14s linear infinite; }
.vinyl-grooves { position: absolute; inset: 7%; border-radius: 50%; background: repeating-radial-gradient(circle at 50% 50%, rgba(255,255,255,.055) 0 1px, transparent 1px 5px); }
.vinyl-label { position: absolute; inset: 36%; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(from 220deg, #7c5cff, #22d3ee, #ff4d9d, #7c5cff); color: #090910; font-weight: 900; font-size: 22px; box-shadow: inset 0 0 18px rgba(0,0,0,.25); }
.vinyl-label span { transform: translateZ(0); }
.vinyl.playing { animation: spin 4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.eq-bars { display: flex; align-items: flex-end; gap: 4px; height: 34px; margin-top: 22px; }
.eq-bars i { width: 4px; border-radius: 2px; background: linear-gradient(180deg, var(--cyan), var(--violet)); height: 30%; opacity: .75; animation: eq 1s ease-in-out infinite; }
.eq-bars i:nth-child(2) { animation-delay: -.15s; }
.eq-bars i:nth-child(3) { animation-delay: -.32s; }
.eq-bars i:nth-child(4) { animation-delay: -.5s; }
.eq-bars i:nth-child(5) { animation-delay: -.68s; }
.eq-bars i:nth-child(6) { animation-delay: -.22s; }
.eq-bars i:nth-child(7) { animation-delay: -.44s; }
.eq-bars i:nth-child(8) { animation-delay: -.6s; }
.eq-bars i:nth-child(9) { animation-delay: -.1s; }
@keyframes eq { 0%,100% { height: 22%; } 50% { height: 100%; } }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 10px 0 14px; }
.section-head h2 { font-size: 18px; }
.section-note { font-size: 12px; color: var(--muted-2); }
.mode-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.mode-card { position: relative; text-align: left; padding: 18px 16px 16px; border-radius: 18px; background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.025)); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; overflow: hidden; transition: transform .2s, border-color .2s, background .2s; }
.mode-card::after { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 90% at 20% 0%, rgba(124,92,255,.18), transparent 60%); opacity: 0; transition: opacity .25s; pointer-events: none; }
.mode-card:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.mode-card:hover::after { opacity: 1; }
.mode-icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 8px; }
.tint-violet { background: rgba(124,92,255,.16); color: #a992ff; }
.tint-cyan { background: rgba(34,211,238,.14); color: #6fe3f5; }
.tint-amber { background: rgba(255,200,87,.14); color: #ffd684; }
.tint-rose { background: rgba(255,77,157,.14); color: #ff8ec0; }
.mode-name { font-weight: 800; font-size: 15px; }
.mode-desc { font-size: 12.5px; color: var(--muted); }
.mode-tag { margin-top: 8px; font-size: 11px; color: var(--muted-2); letter-spacing: .04em; }

.home-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.foot-card { padding: 15px 17px; border-radius: 16px; border: 1px dashed var(--line); background: rgba(255,255,255,.02); display: flex; flex-direction: column; gap: 3px; }
.foot-card strong { font-size: 13px; color: #d9d5ff; }
.foot-card span { font-size: 12px; color: var(--muted-2); }

/* ---------- 配置页 ---------- */
.page-head { display: flex; align-items: flex-start; gap: 14px; padding: 26px 0 20px; }
.page-head h2 { font-size: 22px; }
.page-head p { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.setup-body { display: flex; flex-direction: column; gap: 22px; }
.setup-group h3 { font-size: 13px; color: var(--muted); font-weight: 600; letter-spacing: .06em; margin-bottom: 10px; }
.choice-row { display: flex; flex-wrap: wrap; gap: 9px; }
.choice { padding: 9px 16px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); color: var(--muted); font-size: 13.5px; font-weight: 600; transition: .18s; }
.choice:hover { color: var(--text); border-color: var(--line-strong); }
.choice.active { background: linear-gradient(120deg, rgba(124,92,255,.9), rgba(34,211,238,.75)); border-color: transparent; color: #07070d; box-shadow: 0 8px 24px rgba(92,105,255,.3); }
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.album-card { text-align: left; border-radius: 16px; padding: 8px; background: var(--panel); border: 1px solid var(--line); transition: .2s; position: relative; }
.album-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.album-card.active { border-color: rgba(124,92,255,.9); box-shadow: 0 0 0 1px rgba(124,92,255,.6), 0 14px 30px rgba(80,60,200,.25); }
.album-card img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 11px; }
.album-name { display: block; font-size: 13px; font-weight: 700; margin-top: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.album-meta { display: block; font-size: 11px; color: var(--muted-2); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 17px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.switch-row strong { display: block; font-size: 14px; }
.switch-row small { color: var(--muted-2); font-size: 12px; }
.switch { position: relative; width: 48px; height: 27px; border-radius: 999px; background: rgba(255,255,255,.12); transition: .22s; flex: none; border: 1px solid var(--line); }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 21px; height: 21px; border-radius: 50%; background: #fff; transition: .22s; box-shadow: 0 2px 6px rgba(0,0,0,.35); }
.switch.on { background: linear-gradient(120deg, var(--violet), var(--cyan)); border-color: transparent; }
.switch.on::after { transform: translateX(21px); }
.player-list { display: flex; flex-direction: column; gap: 8px; }
.player-row { display: flex; align-items: center; gap: 10px; }
.player-row .avatar { flex: none; }
.player-row input { flex: 1; background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 12px; padding: 10px 13px; color: var(--text); font-family: inherit; font-size: 14px; outline: none; transition: .18s; }
.player-row input:focus { border-color: rgba(124,92,255,.7); background: rgba(124,92,255,.08); }
.player-row .del { color: var(--muted-2); padding: 6px; border-radius: 8px; }
.player-row .del:hover { color: var(--bad); background: rgba(255,77,109,.1); }
.setup-foot { position: sticky; bottom: 16px; margin-top: 24px; padding: 12px; border-radius: 20px; background: rgba(8,8,14,.72); backdrop-filter: blur(18px); border: 1px solid var(--line); }
.hint-line { font-size: 12px; color: var(--muted-2); margin-top: 8px; }

/* ---------- 游戏页 ---------- */
#screen-game.active { display: flex; flex-direction: column; min-height: calc(100vh - 110px); min-height: calc(100dvh - 110px); }
.game-top { display: flex; align-items: center; gap: 14px; padding: 14px 0 10px; }
.progress-dots { flex: 1; display: flex; gap: 5px; justify-content: center; flex-wrap: wrap; }
.pdot { width: 100%; max-width: 34px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.1); transition: .3s; }
.pdot.current { background: linear-gradient(90deg, var(--cyan), var(--violet)); box-shadow: 0 0 12px rgba(124,92,255,.7); }
.pdot.ok { background: var(--good); box-shadow: 0 0 10px rgba(38,208,124,.4); }
.pdot.bad { background: var(--bad); }
.score-pill { display: flex; align-items: baseline; gap: 3px; padding: 7px 14px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.score-pill span { font-weight: 800; font-size: 17px; background: linear-gradient(120deg, #fff, #b7a9ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.score-pill small { font-size: 11px; color: var(--muted-2); }

.rush-bar { margin: 0 0 6px; padding: 10px 14px; border-radius: 14px; background: rgba(255,200,87,.07); border: 1px solid rgba(255,200,87,.2); }
.rush-head { display: flex; justify-content: space-between; font-size: 12px; color: #ffd684; margin-bottom: 6px; }
.rush-head b { font-variant-numeric: tabular-nums; }
.rush-track { height: 5px; border-radius: 3px; background: rgba(255,255,255,.09); overflow: hidden; }
.rush-fill { height: 100%; width: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--amber), #ff7a59); transition: width .1s linear; }

.stage { display: flex; flex-direction: column; align-items: center; padding: 6px 0 20px; }
.turn-pill { margin-bottom: 12px; padding: 6px 16px; border-radius: 999px; background: rgba(124,92,255,.16); border: 1px solid rgba(124,92,255,.4); font-size: 12.5px; color: #cfc2ff; }
.turn-pill b { color: #fff; }
.disc-wrap { position: relative; width: 240px; height: 240px; display: grid; place-items: center; margin-bottom: 22px; }
.ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 5; }
.ring-bg { stroke: rgba(255,255,255,.07); }
.ring-fg { stroke: url(#none); stroke: var(--cyan); stroke-linecap: round; stroke-dasharray: 691.15; stroke-dashoffset: 0; transition: stroke .3s; filter: drop-shadow(0 0 6px rgba(34,211,238,.6)); }
.disc-wrap .vinyl { width: 196px; height: 196px; cursor: pointer; }
.disc-wrap .vinyl-label { font-size: 19px; }
.disc-time { position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%); padding: 2px 10px; border-radius: 999px; background: #12121c; border: 1px solid var(--line); font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.stage-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.q-index { font-size: 12px; color: var(--muted-2); letter-spacing: .05em; }
.q-badge { font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: rgba(255,77,157,.16); color: #ff8ec0; border: 1px solid rgba(255,77,157,.35); letter-spacing: .08em; }
.q-badge.clip { background: rgba(34,211,238,.12); color: #6fe3f5; border-color: rgba(34,211,238,.32); }
.q-prompt { font-size: 15px; font-weight: 700; text-align: center; color: #e7e5f7; }
.eq-center { margin-top: 10px; height: 22px; opacity: 0; transition: opacity .3s; }
.eq-center.on { opacity: 1; }
.eq-center i { width: 3px; }
.eq-center i { animation-play-state: paused; }
.eq-center.on i { animation-play-state: running; }
.stage-hint { margin-top: 8px; font-size: 11px; color: var(--muted-2); letter-spacing: .04em; }
.stage-hint .hint-touch { display: none; }
body.in-game .topbar { display: none; }

.options { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; max-width: 620px; margin: 0 auto; width: 100%; }
.opt { position: relative; display: flex; align-items: center; gap: 11px; padding: 9px; border-radius: 16px; background: linear-gradient(180deg, rgba(255,255,255,.065), rgba(255,255,255,.03)); border: 1px solid var(--line); text-align: left; transition: transform .16s, border-color .16s, background .16s; overflow: hidden; }
.opt:hover:not(:disabled) { transform: translateY(-2px); border-color: rgba(124,92,255,.55); background: rgba(124,92,255,.1); }
.opt img { width: 54px; height: 54px; border-radius: 11px; object-fit: cover; flex: none; background: #15151f; }
.opt-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.opt-title { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.opt-album { font-size: 11.5px; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.opt-key { position: absolute; top: 8px; right: 9px; font-size: 10px; color: var(--muted-2); border: 1px solid var(--line); border-radius: 6px; padding: 0 5px; line-height: 15px; }
.opt:disabled { cursor: default; }
.opt.correct { border-color: rgba(38,208,124,.9); background: rgba(38,208,124,.14); box-shadow: 0 0 0 1px rgba(38,208,124,.35), 0 14px 34px rgba(20,160,92,.22); }
.opt.correct .opt-key { color: var(--good); border-color: rgba(38,208,124,.5); }
.opt.wrong { border-color: rgba(255,77,109,.8); background: rgba(255,77,109,.12); animation: shake .34s; }
.opt.dim { opacity: .42; }
@keyframes shake { 25% { transform: translateX(-5px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }

/* ---------- 答题反馈 ---------- */
.feedback { position: fixed; inset: 0; z-index: 40; display: none; align-items: flex-end; justify-content: center; padding: 20px; background: rgba(4,4,9,.55); backdrop-filter: blur(10px); }
.feedback.show { display: flex; animation: fade-in .2s; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.fb-card { width: 100%; max-width: 460px; background: linear-gradient(180deg, #15141f, #0d0d15); border: 1px solid var(--line-strong); border-radius: 24px; padding: 20px; box-shadow: var(--shadow); animation: sheet-up .34s cubic-bezier(.2,.8,.2,1); }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.feedback.good .fb-card { border-color: rgba(38,208,124,.45); box-shadow: 0 0 60px rgba(38,208,124,.12), var(--shadow); }
.feedback.bad .fb-card { border-color: rgba(255,77,109,.45); box-shadow: 0 0 60px rgba(255,77,109,.1), var(--shadow); }
.fb-head { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 17px; margin-bottom: 15px; }
.fb-icon { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.feedback.good .fb-icon { background: rgba(38,208,124,.18); color: var(--good); }
.feedback.bad .fb-icon { background: rgba(255,77,109,.16); color: var(--bad); }
.feedback.good .fb-head { color: var(--good); }
.feedback.bad .fb-head { color: var(--bad); }
.fb-body { display: flex; gap: 14px; margin-bottom: 18px; }
.fb-cover { width: 86px; height: 86px; border-radius: 14px; object-fit: cover; flex: none; box-shadow: 0 10px 24px rgba(0,0,0,.4); }
.fb-info { min-width: 0; flex: 1; }
.fb-info h3 { font-size: 19px; margin-bottom: 3px; }
.fb-info p { font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.fb-stats { display: flex; gap: 16px; }
.fb-stats div { display: flex; flex-direction: column; }
.fb-stats b { font-size: 16px; font-variant-numeric: tabular-nums; }
.fb-stats small { font-size: 10.5px; color: var(--muted-2); }
.feedback.good .fb-stats div:first-child b { color: var(--good); }

/* ---------- 结算 ---------- */
.result-wrap { max-width: 560px; margin: 0 auto; padding: 40px 0 10px; text-align: center; }
.eyebrow.center { justify-content: center; }
.result-title { font-size: 26px; margin: 8px 0 6px; }
.result-score { display: flex; align-items: baseline; justify-content: center; gap: 6px; margin: 6px 0 4px; }
.result-score span { font-size: clamp(60px, 14vw, 88px); font-weight: 900; line-height: 1; letter-spacing: -.04em; background: linear-gradient(120deg, #fff, #b7a9ff 55%, #6fe3f5); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.result-score small { font-size: 15px; color: var(--muted-2); }
.result-stats { display: flex; justify-content: center; gap: 10px; margin: 18px 0 4px; flex-wrap: wrap; }
.result-stats div { min-width: 92px; padding: 10px 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.result-stats b { display: block; font-size: 17px; }
.result-stats small { color: var(--muted-2); font-size: 11px; }
.rank-card { margin: 16px auto 0; max-width: 380px; padding: 14px 18px; border-radius: 16px; background: linear-gradient(120deg, rgba(255,200,87,.09), rgba(124,92,255,.08)); border: 1px solid rgba(255,200,87,.22); font-size: 13.5px; color: #ffe6b0; display: flex; align-items: center; justify-content: center; gap: 8px; }
.rank-card b { font-size: 18px; color: #fff; }
.rank-card.muted { background: var(--panel); border-color: var(--line); color: var(--muted); }
.party-ranking { margin-top: 14px; display: flex; flex-direction: column; gap: 7px; max-width: 380px; margin-left: auto; margin-right: auto; }
.party-ranking .pr-row { display: flex; align-items: center; gap: 10px; padding: 9px 13px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); font-size: 13px; }
.party-ranking .pr-row.win { border-color: rgba(255,200,87,.45); background: rgba(255,200,87,.08); }
.party-ranking .pr-row b { margin-left: auto; font-size: 15px; }
.result-actions { display: flex; gap: 9px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }
.result-tip { margin-top: 16px; font-size: 12px; color: var(--muted-2); }

/* ---------- 排行榜 ---------- */
.board-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.select-wrap { position: relative; display: inline-flex; align-items: center; }
.select-wrap select { appearance: none; padding: 10px 38px 10px 15px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); color: var(--text); font-family: inherit; font-size: 13.5px; outline: none; cursor: pointer; max-width: 60vw; }
.select-wrap select:focus { border-color: rgba(124,92,255,.6); }
.select-wrap svg { position: absolute; right: 12px; color: var(--muted); pointer-events: none; }
.select-wrap option { background: #14141f; color: #fff; }
.board-count { font-size: 12px; color: var(--muted-2); }
.board-list { display: flex; flex-direction: column; gap: 8px; }
.board-row { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-radius: 16px; background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.02)); border: 1px solid var(--line); }
.board-row.top1 { border-color: rgba(255,200,87,.4); background: linear-gradient(120deg, rgba(255,200,87,.11), rgba(255,255,255,.02)); }
.board-row.top2 { border-color: rgba(200,205,225,.28); }
.board-row.top3 { border-color: rgba(214,145,90,.28); }
.board-rank { width: 26px; text-align: center; font-weight: 900; font-size: 15px; color: var(--muted-2); flex: none; }
.board-row.top1 .board-rank { color: var(--amber); }
.board-row.top2 .board-rank { color: #cdd3e6; }
.board-row.top3 .board-rank { color: #d6915a; }
.board-name { font-weight: 700; font-size: 14px; }
.board-sub { font-size: 11.5px; color: var(--muted-2); }
.board-region { font-size: 10.5px; padding: 1px 6px; border-radius: 6px; background: rgba(255,255,255,.07); color: var(--muted); border: 1px solid var(--line); }
.board-score { margin-left: auto; text-align: right; }
.board-score b { display: block; font-size: 17px; font-variant-numeric: tabular-nums; }
.board-score small { font-size: 10.5px; color: var(--muted-2); }
.board-note { margin-top: 16px; font-size: 12px; color: var(--muted-2); text-align: center; }
.empty-state { padding: 46px 20px; text-align: center; color: var(--muted-2); font-size: 13.5px; border: 1px dashed var(--line); border-radius: 18px; }

/* ---------- 弹窗 ---------- */
.modal { position: fixed; inset: 0; z-index: 60; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(4,4,9,.6); backdrop-filter: blur(12px); }
.modal.show { display: flex; animation: fade-in .2s; }
.modal-card { width: 100%; max-width: 360px; padding: 24px; border-radius: 22px; background: linear-gradient(180deg, #171622, #0e0e16); border: 1px solid var(--line-strong); box-shadow: var(--shadow); text-align: center; }
.modal-card h3 { font-size: 18px; margin-bottom: 4px; }
.modal-sub { font-size: 12px; color: var(--muted-2); margin-bottom: 16px; }
.modal-card .avatar-lg { margin: 0 auto 16px; }
.field { display: block; text-align: left; margin-bottom: 16px; }
.field span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.field input { width: 100%; padding: 11px 14px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid var(--line); color: var(--text); font-family: inherit; font-size: 14px; outline: none; transition: .18s; }
.field input:focus { border-color: rgba(124,92,255,.7); background: rgba(124,92,255,.08); }
.modal-actions { display: flex; gap: 9px; }
.modal-actions .btn { flex: 1; }

/* ---------- 提示条 ---------- */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: 11px 20px; border-radius: 12px; background: rgba(20,20,32,.95); border: 1px solid var(--line-strong); font-size: 13px; box-shadow: var(--shadow); transition: .25s; z-index: 90; max-width: 86vw; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .mode-grid { grid-template-columns: repeat(2, 1fr); }
  .hero { grid-template-columns: 1fr; padding: 26px 0 24px; }
  .hero-visual { display: none; }
  .home-foot { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { padding: 0 14px 52px; padding-bottom: calc(52px + env(safe-area-inset-bottom)); }
  .topbar { padding-top: 12px; gap: 8px; }
  .logo { gap: 8px; }
  .logo-text { font-size: 15px; letter-spacing: -0.03em; }
  .logo-text em { margin-left: 2px; }
  .chip-btn { min-height: 40px; min-width: 40px; padding: 8px 11px; }
  .chip-btn span { display: none; }
  .profile-name { display: none; }
  .profile-chip { padding: 4px; min-height: 40px; }
  .hero h1 { font-size: 28px; }
  .hero-sub { font-size: 13px; }
  .hero-actions { margin-top: 20px; }
  .hero-actions .btn { flex: 1; }
  .btn { min-height: 44px; }
  .btn-lg { min-height: 48px; }
  .icon-btn { width: 40px; height: 40px; }
  .mode-grid { gap: 10px; }
  .mode-card { padding: 15px 14px 14px; }
  .options { grid-template-columns: 1fr 1fr; gap: 9px; }
  .opt { flex-direction: column; align-items: flex-start; padding: 8px; gap: 8px; }
  .opt img { width: 100%; height: auto; aspect-ratio: 1; border-radius: 10px; }
  .opt-text { width: 100%; }
  .opt-title { font-size: 13.5px; }
  .opt-key { display: none; }
  .disc-wrap { width: 210px; height: 210px; margin-bottom: 18px; }
  .disc-wrap .vinyl { width: 172px; height: 172px; }
  .stage { padding-bottom: 14px; }
  .q-prompt { font-size: 14.5px; }
  .stage-hint .hint-desktop { display: none; }
  .stage-hint .hint-touch { display: inline; }
  .feedback { padding: 14px 14px calc(14px + env(safe-area-inset-bottom)); }
  .fb-card { padding: 17px; border-radius: 20px; }
  .fb-body { gap: 11px; }
  .fb-cover { width: 70px; height: 70px; }
  .fb-info h3 { font-size: 17px; }
  .fb-stats { gap: 12px; }
  .result-actions .btn { flex: 1 1 40%; }
  .album-grid { grid-template-columns: repeat(2, 1fr); }
  .setup-foot { bottom: calc(10px + env(safe-area-inset-bottom)); }
  .player-row input, .field input, .select-wrap select { font-size: 16px; }
  .board-row { padding: 12px 13px; gap: 10px; }
  .toast { bottom: calc(24px + env(safe-area-inset-bottom)); }
}
@media (max-width: 380px) {
  .hero h1 { font-size: 25px; }
  .logo-text { font-size: 14px; }
  .mode-card { padding: 13px 12px; }
  .mode-desc { font-size: 11.5px; }
  .disc-wrap { width: 188px; height: 188px; margin-bottom: 14px; }
  .disc-wrap .vinyl { width: 154px; height: 154px; }
  .fb-stats b { font-size: 15px; }
}
/* 触屏设备：去掉 hover 位移，避免点击后卡住高亮 */
@media (hover: none) {
  .mode-card:hover, .album-card:hover, .btn-primary:hover { transform: none; }
  .mode-card:hover::after { opacity: 0; }
  .opt:hover:not(:disabled) { transform: none; border-color: var(--line); background: linear-gradient(180deg, rgba(255,255,255,.065), rgba(255,255,255,.03)); }
  .chip-btn:hover, .icon-btn:hover, .btn-ghost:hover { background: var(--panel); border-color: var(--line); }
}
/* 横屏 / 小高度：压缩游戏区，避免答案被挤出屏幕 */
@media (max-height: 560px) {
  #screen-game.active { min-height: 0; }
  .disc-wrap { width: 164px; height: 164px; margin-bottom: 10px; }
  .disc-wrap .vinyl { width: 136px; height: 136px; }
  .disc-time { bottom: -6px; }
  .stage { padding-bottom: 10px; }
  .stage-hint, .eq-center { display: none; }
  .feedback { align-items: center; }
}
