/* ============================================================
   星音块 · 四轨钢琴节奏游戏
   ============================================================ */
:root {
  --orange: #FF8A3D;
  --orange-deep: #F06A1F;
  --orange-soft: #FFB37D;
  --cream: #FFF4E8;
  --cream-2: #F6E4D1;
  --ink: #1C1420;
  --ink-2: #2A1E31;
  --bg: #0E0B12;
  --bg-2: #171120;
  --card: #21182A;
  --card-2: #2A1F35;
  --text: #FFF7EE;
  --muted: #B2A4BA;
  --muted-2: #7D7187;
  --line: rgba(255, 255, 255, 0.08);
  --good: #6FE3B0;
  --bad: #FF6B7A;
  --gold: #FFC24B;
  --radius: 22px;
  --shadow-card: 0 14px 30px rgba(0, 0, 0, 0.28);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #08060B;
  color: var(--text);
  font-family: var(--font);
  overscroll-behavior: none;
}
body {
  display: flex;
  align-items: stretch;
  justify-content: center;
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
}
button {
  font-family: inherit;
  color: inherit;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}
button:active { transform: scale(0.97); }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

.app {
  position: relative;
  width: 100%;
  max-width: 480px;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--bg);
  isolation: isolate;
  box-shadow: 0 0 80px rgba(0, 0, 0, 0.7);
}

.screen {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px) scale(0.995);
  transition: opacity 0.28s ease, transform 0.34s cubic-bezier(0.2, 0.8, 0.2, 1);
  overflow: hidden;
}
.screen.is-active {
  z-index: 3;
  opacity: 1;
  pointer-events: auto;
  transform: none;
}
.screen-scroll {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.screen-scroll::-webkit-scrollbar { display: none; }

/* ============================================================
   首页
   ============================================================ */
.screen-home {
  background:
    radial-gradient(120% 58% at 100% -10%, rgba(255, 138, 61, 0.26) 0%, transparent 55%),
    radial-gradient(90% 50% at -10% 34%, rgba(124, 91, 255, 0.16) 0%, transparent 60%),
    linear-gradient(180deg, #171020 0%, #100C16 46%, #0C0910 100%);
}
.home-scroll {
  padding: calc(10px + env(safe-area-inset-top)) 16px calc(26px + env(safe-area-inset-bottom));
}
.home-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 52px;
}
.player-card {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left;
  max-width: 58%;
}
.avatar-wrap {
  position: relative;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 50%;
  background: linear-gradient(145deg, #3A2948, #22182C);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.avatar-fallback { width: 34px; height: 34px; display: block; }
.avatar-fallback svg { width: 100%; height: 100%; display: block; }
.avatar-img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.avatar-ring {
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 138, 61, 0.75);
  box-shadow: 0 0 12px rgba(255, 138, 61, 0.38);
  pointer-events: none;
}
.player-meta { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.player-meta b {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}
.player-meta small { font-size: 10px; color: var(--muted); white-space: nowrap; }
.home-actions { display: flex; align-items: center; gap: 7px; flex: 0 0 auto; }
.coin-pill {
  height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 13px 0 10px;
  border-radius: 999px;
  background: linear-gradient(150deg, rgba(255, 194, 75, 0.22), rgba(255, 138, 61, 0.12));
  border: 1px solid rgba(255, 194, 75, 0.28);
  color: var(--cream);
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.coin-pill .mp-icon { width: 19px; height: 19px; color: var(--gold); filter: drop-shadow(0 0 6px rgba(255, 194, 75, 0.45)); }
.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--cream);
}
.icon-btn .mp-icon { width: 19px; height: 19px; }

/* 主视觉 */
.hero {
  position: relative;
  margin-top: 14px;
  min-height: 286px;
  border-radius: 28px;
  overflow: hidden;
  background:
    radial-gradient(100% 110% at 86% 28%, rgba(255, 138, 61, 0.34) 0%, rgba(255, 138, 61, 0) 54%),
    radial-gradient(80% 90% at 10% 100%, rgba(103, 74, 255, 0.22) 0%, transparent 60%),
    linear-gradient(148deg, #2B1C38 0%, #1B1225 58%, #171020 100%);
  border: 1px solid rgba(255, 255, 255, 0.075);
  box-shadow: 0 24px 46px rgba(0, 0, 0, 0.34);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.14) 0.7px, transparent 0.7px);
  background-size: 18px 18px;
  opacity: 0.22;
  pointer-events: none;
  mask-image: linear-gradient(120deg, #000 0%, transparent 70%);
  -webkit-mask-image: linear-gradient(120deg, #000 0%, transparent 70%);
}
.hero-copy {
  position: relative;
  z-index: 3;
  padding: 24px 22px 22px;
  max-width: 66%;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--orange-soft);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.eyebrow .mp-icon { width: 14px; height: 14px; }
.hero h1 {
  margin: 9px 0 7px;
  font-size: 37px;
  line-height: 1.04;
  letter-spacing: -0.055em;
  font-weight: 900;
  color: #FFF8EF;
  text-shadow: 0 4px 18px rgba(255, 138, 61, 0.18);
}
.hero-copy p {
  margin: 0;
  font-size: 12px;
  line-height: 1.65;
  color: #CBBBD3;
  max-width: 190px;
}
.hero-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.hero-badges span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.065);
  border: 1px solid rgba(255, 255, 255, 0.075);
  color: #E8DCEB;
  font-size: 10px;
  font-weight: 700;
}
.hero-badges .mp-icon { width: 12px; height: 12px; color: var(--orange); }

.hero-art {
  position: absolute;
  right: -26px;
  bottom: -28px;
  width: 250px;
  height: 250px;
  z-index: 2;
  pointer-events: none;
}
.hero-disc {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 192px;
  height: 192px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #33233F 0 26%, #1C1325 27% 48%, #2A1C35 49% 52%, #171020 53% 70%, #24172F 71% 100%);
  border: 1px solid rgba(255, 138, 61, 0.35);
  box-shadow: 0 26px 44px rgba(0, 0, 0, 0.45), inset 0 0 36px rgba(255, 138, 61, 0.1);
  animation: discTurn 22s linear infinite;
}
.disc-ring {
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.13);
}
.disc-ring.small { inset: 32px; border-style: solid; border-color: rgba(255, 138, 61, 0.2); }
.disc-cat {
  position: absolute;
  inset: 52px;
  border-radius: 50%;
  background: linear-gradient(150deg, #FFC48F, #FF8A3D);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.55);
  animation: discTurn 22s linear infinite reverse;
}
.disc-cat svg { width: 74px; height: 74px; }
.disc-note {
  position: absolute;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: rgba(255, 244, 232, 0.92);
  color: #3B2419;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
  animation: floatY 3.4s ease-in-out infinite;
}
.disc-note .mp-icon { width: 19px; height: 19px; }
.disc-note.n1 { top: -4px; left: 20px; color: #7C5BFF; animation-delay: -0.8s; }
.disc-note.n2 { top: 76px; left: -14px; color: var(--orange-deep); animation-delay: -2.1s; }
.disc-note.n3 { right: 4px; bottom: 26px; color: #20A878; animation-delay: -1.4s; }
.hero-keys {
  position: absolute;
  right: -8px;
  bottom: 4px;
  display: flex;
  gap: 3px;
  transform: rotate(-8deg);
  opacity: 0.9;
}
.hero-keys span {
  width: 26px;
  height: 78px;
  border-radius: 0 0 5px 5px;
  background: linear-gradient(180deg, #FFF9F0, #E9D9C6);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.35);
}
.hero-keys span:nth-child(2n) { background: linear-gradient(180deg, #2B1C36, #1A1122); height: 62px; width: 20px; margin: 0 -9px; z-index: 2; border: 1px solid rgba(255, 255, 255, 0.12); }
.hero-tile {
  position: absolute;
  width: 40px;
  height: 78px;
  border-radius: 12px;
  background: linear-gradient(180deg, #FF9D5B, #FF7A2C);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 12px 24px rgba(255, 122, 44, 0.35);
  animation: tileFall 4.6s ease-in-out infinite;
}
.hero-tile.tile-1 { left: 16px; top: 8px; transform: rotate(14deg); }
.hero-tile.tile-2 { left: 68px; top: -10px; transform: rotate(-9deg); animation-delay: -1.6s; background: linear-gradient(180deg, #FFE8D2, #FFC593); }
.hero-tile.tile-3 { left: 112px; top: 4px; transform: rotate(8deg); animation-delay: -3.1s; background: linear-gradient(180deg, #9E83FF, #7457F0); box-shadow: 0 12px 24px rgba(116, 87, 240, 0.3); }
.hero-stars { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.hero-stars i {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #FFE3C4;
  box-shadow: 0 0 8px 2px rgba(255, 208, 160, 0.8);
  animation: twinkle 2.6s ease-in-out infinite;
}
.hero-stars i:nth-child(1) { left: 18%; top: 18%; animation-delay: -0.3s; }
.hero-stars i:nth-child(2) { left: 46%; top: 10%; width: 2px; height: 2px; animation-delay: -1.4s; }
.hero-stars i:nth-child(3) { left: 62%; top: 26%; animation-delay: -2.2s; }
.hero-stars i:nth-child(4) { left: 9%; top: 62%; width: 2px; height: 2px; animation-delay: -1.8s; }
.hero-stars i:nth-child(5) { left: 50%; top: 74%; width: 2px; height: 2px; animation-delay: -0.9s; }
.hero-orbit {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 138, 61, 0.13);
  pointer-events: none;
}
.orbit-a { width: 310px; height: 310px; right: -80px; top: -90px; }
.orbit-b { width: 210px; height: 210px; left: -80px; bottom: -110px; border-color: rgba(124, 91, 255, 0.12); }

/* 主按钮 */
.cta-main {
  width: 100%;
  margin-top: 12px;
  min-height: 74px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 23px;
  background: linear-gradient(135deg, #FFA45D 0%, #FF8A3D 44%, #F2701F 100%);
  color: #2B1407;
  text-align: left;
  box-shadow: 0 14px 28px rgba(255, 122, 44, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  position: relative;
  overflow: hidden;
}
.cta-main::after {
  content: "";
  position: absolute;
  top: -40%;
  left: -20%;
  width: 45%;
  height: 180%;
  transform: rotate(20deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.26), transparent);
  animation: sheen 4.4s ease-in-out infinite;
}
.cta-icon {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: rgba(43, 20, 7, 0.16);
  border: 1px solid rgba(43, 20, 7, 0.1);
}
.cta-icon .mp-icon { width: 26px; height: 26px; }
.cta-copy { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.cta-copy b { font-size: 19px; letter-spacing: -0.02em; font-weight: 900; }
.cta-copy small { font-size: 10.5px; font-weight: 600; opacity: 0.72; }
.cta-arrow { width: 22px; height: 22px; opacity: 0.65; flex: 0 0 auto; }

/* 区块 */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 24px 2px 10px;
}
.section-head h2 { margin: 0; font-size: 17px; font-weight: 800; letter-spacing: -0.02em; }
.section-head span { color: var(--muted-2); font-size: 10.5px; }

/* 模式 */
.mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mode-card {
  position: relative;
  min-height: 106px;
  padding: 13px;
  border-radius: 20px;
  text-align: left;
  background: linear-gradient(148deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.028));
  border: 1px solid rgba(255, 255, 255, 0.075);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.mode-card::after {
  content: "";
  position: absolute;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  right: -46px;
  top: -46px;
  background: var(--mode-glow, rgba(255, 138, 61, 0.2));
  filter: blur(6px);
}
.mode-icon {
  width: 35px;
  height: 35px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--mode-bg, rgba(255, 138, 61, 0.16));
  color: var(--mode-color, var(--orange));
  margin-bottom: 8px;
}
.mode-icon .mp-icon { width: 20px; height: 20px; }
.mode-card b { font-size: 14px; font-weight: 800; letter-spacing: -0.01em; }
.mode-card small { font-size: 10px; color: var(--muted); line-height: 1.45; }
.mode-arcade { --mode-color: #FF9E5E; --mode-bg: rgba(255, 138, 61, 0.14); --mode-glow: rgba(255, 138, 61, 0.18); }
.mode-zen { --mode-color: #6FE3B0; --mode-bg: rgba(111, 227, 176, 0.12); --mode-glow: rgba(111, 227, 176, 0.15); }
.mode-pk { --mode-color: #B49BFF; --mode-bg: rgba(124, 91, 255, 0.16); --mode-glow: rgba(124, 91, 255, 0.2); }
.mode-library { --mode-color: #FFD37A; --mode-bg: rgba(255, 194, 75, 0.13); --mode-glow: rgba(255, 194, 75, 0.14); }

/* 曲目列表 */
.song-list { display: flex; flex-direction: column; gap: 9px; }
.song-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 9px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left;
  overflow: hidden;
  transition: border-color 0.2s, background 0.2s, transform 0.16s;
}
.song-row.is-selected {
  background: rgba(255, 138, 61, 0.1);
  border-color: rgba(255, 138, 61, 0.55);
  box-shadow: 0 0 0 1px rgba(255, 138, 61, 0.15), 0 8px 20px rgba(0, 0, 0, 0.18);
}
.song-row.is-locked { opacity: 0.62; }
.song-row.is-locked .song-cover { filter: grayscale(0.4) brightness(0.75); }
.song-cover {
  position: relative;
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  border-radius: 15px;
  overflow: hidden;
  background: var(--cover, linear-gradient(145deg, #7C5BFF, #FF8A3D));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.song-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0 21%, rgba(255, 255, 255, 0.22) 21% 22%, transparent 22% 46%, rgba(255, 255, 255, 0.16) 46% 47%, transparent 47% 71%, rgba(255, 255, 255, 0.2) 71% 72%, transparent 72%);
  opacity: 0.7;
}
.song-cover::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  border-radius: 50%;
  background: rgba(15, 10, 18, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.3);
}
.song-cover .cover-note {
  position: absolute;
  width: 9px;
  height: 16px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}
.song-cover .cover-note.n1 { left: 8px; top: 13px; transform: rotate(10deg); }
.song-cover .cover-note.n2 { right: 9px; bottom: 10px; transform: rotate(-14deg); }
.song-cover .cover-note.n3 { left: 19px; bottom: 8px; width: 6px; height: 11px; opacity: 0.6; }
.song-cover .cover-lock {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(12, 8, 16, 0.55);
  color: #FFDCA5;
  z-index: 3;
}
.song-cover .cover-lock .mp-icon { width: 20px; height: 20px; }
.song-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.song-title-line { display: flex; align-items: center; gap: 6px; }
.song-title-line b { font-size: 14px; font-weight: 800; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-info small { font-size: 9.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-tags { display: flex; align-items: center; gap: 5px; margin-top: 1px; }
.difficulty { display: inline-flex; align-items: center; gap: 2px; }
.difficulty i { width: 4px; height: 9px; border-radius: 2px; background: rgba(255, 255, 255, 0.13); }
.difficulty i.on { background: var(--orange); box-shadow: 0 0 5px rgba(255, 138, 61, 0.45); }
.song-tags em {
  font-style: normal;
  font-size: 8.5px;
  font-weight: 700;
  color: #C9A9FF;
  background: rgba(124, 91, 255, 0.18);
  padding: 2px 6px;
  border-radius: 999px;
}
.song-stars { display: flex; align-items: center; gap: 1px; flex: 0 0 auto; }
.song-stars .mp-icon { width: 13px; height: 13px; color: rgba(255, 255, 255, 0.15); }
.song-stars .mp-icon.on { color: var(--gold); filter: drop-shadow(0 0 4px rgba(255, 194, 75, 0.45)); }
.song-row .row-play {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  background: rgba(255, 138, 61, 0.16);
  color: var(--orange);
}
.song-row .row-play .mp-icon { width: 17px; height: 17px; }
.song-list.compact .song-row { padding: 8px; }
.song-list.compact .song-cover { width: 52px; height: 52px; flex-basis: 52px; border-radius: 14px; }
.song-list.compact .song-title-line b { font-size: 13px; }

/* 复活提示 */
.revive-tip {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding: 12px;
  border-radius: 19px;
  background: linear-gradient(135deg, rgba(255, 138, 61, 0.14), rgba(255, 194, 75, 0.05));
  border: 1px solid rgba(255, 138, 61, 0.2);
}
.tip-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: rgba(255, 138, 61, 0.16);
  color: var(--orange);
}
.tip-icon .mp-icon { width: 21px; height: 21px; }
.revive-tip > div { flex: 1; min-width: 0; }
.revive-tip b { display: block; font-size: 12px; font-weight: 800; margin-bottom: 2px; }
.revive-tip p { margin: 0; font-size: 10px; line-height: 1.45; color: var(--muted); }
.tip-chip {
  flex: 0 0 auto;
  font-size: 9px;
  font-weight: 800;
  color: #3B1E0C;
  background: var(--orange);
  border-radius: 999px;
  padding: 4px 8px;
}
.home-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
  color: var(--muted-2);
  font-size: 9.5px;
  letter-spacing: 0.06em;
}
.home-footer .mp-icon { width: 13px; height: 13px; color: rgba(255, 138, 61, 0.5); }

/* ============================================================
   曲目选择页
   ============================================================ */
.screen-songs {
  background:
    radial-gradient(100% 44% at 100% 0%, rgba(255, 138, 61, 0.18), transparent 60%),
    radial-gradient(80% 40% at 0% 30%, rgba(124, 91, 255, 0.14), transparent 60%),
    linear-gradient(180deg, #171020 0%, #100C16 52%, #0B0810 100%);
}
.songs-scroll { padding: calc(13px + env(safe-area-inset-top)) 16px calc(140px + env(safe-area-inset-bottom)); }
.back-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--cream);
}
.back-btn .mp-icon { width: 21px; height: 21px; }
.page-heading { padding: 18px 3px 0; }
.page-heading h1 { margin: 7px 0 6px; font-size: 28px; letter-spacing: -0.04em; font-weight: 900; }
.page-heading p { margin: 0; font-size: 11px; line-height: 1.55; color: var(--muted); }
.page-heading .eyebrow { font-size: 9.5px; }
.star-summary {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 13px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.star-summary span { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; color: var(--muted); }
.star-summary .mp-icon { width: 14px; height: 14px; color: var(--gold); }
.star-summary b { color: var(--cream); font-size: 13px; }
#unlock-progress { color: var(--orange-soft); font-weight: 700; }
.song-list.full { margin-top: 14px; gap: 11px; }
.song-list.full .song-row { padding: 11px; border-radius: 20px; }
.song-list.full .song-cover { width: 68px; height: 68px; flex-basis: 68px; border-radius: 17px; }
.song-list.full .song-info { gap: 4px; }
.song-list.full .song-title-line b { font-size: 15px; }
.song-list.full .song-info small { font-size: 10px; }
.song-list.full .song-tags em { font-size: 9px; }
.unlock-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 16px 3px 0;
  color: var(--muted-2);
  font-size: 9.5px;
  line-height: 1.55;
}
.unlock-note .mp-icon { width: 14px; height: 14px; flex: 0 0 14px; margin-top: 1px; color: var(--orange-soft); }
.bottom-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(12, 9, 16, 0.35), rgba(12, 9, 16, 0.94) 28%, #0C0910 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.bottom-pick { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.bottom-pick span { font-size: 8.5px; color: var(--muted-2); letter-spacing: 0.08em; }
.bottom-pick b { font-size: 14px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bottom-pick small { font-size: 9px; color: var(--muted); }
.play-btn {
  flex: 0 0 auto;
  height: 50px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 18px 0 14px;
  border-radius: 17px;
  background: linear-gradient(135deg, #FFA45D, #FF8A3D 45%, #F2701F);
  color: #2B1407;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(255, 122, 44, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.play-btn .mp-icon { width: 20px; height: 20px; }

/* ============================================================
   游戏页
   ============================================================ */
.screen-game { background: #0A0710; }
.game-shell {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: calc(8px + env(safe-area-inset-top)) 12px calc(9px + env(safe-area-inset-bottom));
  background:
    radial-gradient(70% 38% at 50% 100%, rgba(255, 138, 61, 0.16), transparent 70%),
    radial-gradient(80% 44% at 100% 0%, rgba(124, 91, 255, 0.12), transparent 65%),
    linear-gradient(180deg, #14101C 0%, #0B0810 52%, #08060C 100%);
}
.game-hud {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 2px;
}
.hud-btn {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.075);
  color: var(--cream);
}
.hud-btn .mp-icon { width: 20px; height: 20px; }
.hud-score { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.hud-score span { font-size: 8px; letter-spacing: 0.16em; color: var(--muted-2); }
.hud-score b { font-size: 20px; font-weight: 900; line-height: 1.05; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.hud-combo {
  flex: 0 0 auto;
  min-width: 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 13px;
  transition: transform 0.15s ease;
}
.hud-combo b { font-size: 21px; line-height: 1; font-weight: 900; color: var(--orange); font-variant-numeric: tabular-nums; }
.hud-combo span { font-size: 7px; letter-spacing: 0.16em; color: var(--muted-2); margin-top: 3px; }
.hud-combo.bump { transform: scale(1.18); }
.game-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 4px 0;
  min-height: 18px;
  font-size: 9px;
}
.game-title-row span { color: var(--muted-2); }
.game-title-row b { flex: 1; font-size: 11px; font-weight: 700; color: #E9DEEB; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game-title-row span:last-child { color: var(--orange-soft); font-weight: 800; font-variant-numeric: tabular-nums; }
.game-progress {
  height: 4px;
  margin: 8px 4px 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.075);
  overflow: hidden;
}
.game-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #FFC24B, #FF8A3D);
  box-shadow: 0 0 10px rgba(255, 138, 61, 0.55);
  transition: width 0.12s linear;
}
.game-meta {
  display: flex;
  justify-content: space-between;
  padding: 6px 5px 0;
  font-size: 8.5px;
  color: var(--muted-2);
  min-height: 18px;
}
#game-rival { color: #C4B2FF; font-weight: 700; }

.stage {
  position: relative;
  flex: 1;
  min-height: 0;
  margin-top: 7px;
  border-radius: 24px;
  overflow: hidden;
  background:
    radial-gradient(90% 60% at 50% 100%, rgba(255, 138, 61, 0.1), transparent 65%),
    linear-gradient(180deg, rgba(32, 22, 44, 0.92), rgba(13, 9, 18, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.075);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045), 0 18px 34px rgba(0, 0, 0, 0.32);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.stage-aurora {
  position: absolute;
  inset: -30%;
  background:
    radial-gradient(40% 30% at 20% 80%, rgba(124, 91, 255, 0.14), transparent 70%),
    radial-gradient(35% 26% at 85% 20%, rgba(255, 138, 61, 0.14), transparent 70%);
  pointer-events: none;
}
.lanes { position: absolute; inset: 0; display: flex; }
.lane {
  position: relative;
  flex: 1;
  border-right: 1px solid rgba(255, 255, 255, 0.035);
  overflow: hidden;
}
.lane:last-child { border-right: 0; }
.lane-strip {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.018) 55%, rgba(255, 138, 61, 0.045) 100%);
  opacity: 0.9;
}
.lane::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  top: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.025), transparent);
}
.lane-hint {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 8px;
  color: rgba(255, 255, 255, 0.13);
  letter-spacing: 0.1em;
}
.lane.active .lane-strip {
  background: linear-gradient(180deg, transparent, rgba(255, 138, 61, 0.09) 60%, rgba(255, 138, 61, 0.22));
}
.lane.active .lane-hint { color: rgba(255, 138, 61, 0.65); }
.lane.active::before {
  content: "";
  position: absolute;
  left: 4%;
  right: 4%;
  bottom: 0;
  height: 45%;
  background: linear-gradient(0deg, rgba(255, 138, 61, 0.16), transparent);
  pointer-events: none;
}
.notes-layer, .sparks, .tap-ripples { position: absolute; inset: 0; pointer-events: none; }
.notes-layer { z-index: 3; }

.judge-line {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 70%;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 138, 61, 0.22), #FF9A55 22%, #FFE0C2 50%, #FF9A55 78%, rgba(255, 138, 61, 0.22));
  box-shadow: 0 0 12px rgba(255, 138, 61, 0.7), 0 0 30px rgba(255, 138, 61, 0.28);
  z-index: 4;
  pointer-events: none;
}
.judge-pulse {
  position: absolute;
  left: 0;
  right: 0;
  top: -9px;
  height: 21px;
  background: linear-gradient(180deg, transparent, rgba(255, 138, 61, 0.1), transparent);
  animation: judgeBreath 2.6s ease-in-out infinite;
}
.judge-label {
  position: absolute;
  right: 2px;
  top: -20px;
  font-size: 7.5px;
  letter-spacing: 0.18em;
  color: rgba(255, 180, 126, 0.6);
  font-weight: 800;
}

.note {
  position: absolute;
  width: calc(25% - 14px);
  height: 64px;
  border-radius: 15px;
  will-change: transform;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transform: translate3d(0, -200px, 0);
}
.note.black {
  background:
    linear-gradient(180deg, rgba(255, 138, 61, 0.32) 0%, transparent 28%),
    linear-gradient(155deg, #3A2946 0%, #22182C 55%, #171020 100%);
  border: 1.5px solid rgba(255, 138, 61, 0.52);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), inset 0 -8px 14px rgba(0, 0, 0, 0.28), 0 0 16px rgba(255, 138, 61, 0.17), 0 6px 14px rgba(0, 0, 0, 0.35);
}
.note.black::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  top: 8px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 190, 143, 0.75), transparent);
}
.note.black .note-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #FFD2AC;
  box-shadow: 0 0 10px 3px rgba(255, 138, 61, 0.55);
  opacity: 0.9;
}
.note.white {
  background: linear-gradient(165deg, #FFFDF7 0%, #FFF0DD 62%, #EBD8C0 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 2px 0 #fff, inset 0 -9px 14px rgba(171, 132, 87, 0.22), 0 6px 16px rgba(0, 0, 0, 0.28);
}
.note.white .note-x {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(65, 43, 28, 0.32);
  position: relative;
}
.note.white .note-x::before,
.note.white .note-x::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 11px;
  height: 2px;
  border-radius: 2px;
  background: rgba(65, 43, 28, 0.36);
}
.note.white .note-x::before { transform: translate(-50%, -50%) rotate(45deg); }
.note.white .note-x::after { transform: translate(-50%, -50%) rotate(-45deg); }
.note.long { align-items: flex-start; padding-top: 13px; }
.note.long .note-dot { margin-top: 10px; }
.note.long::before {
  content: "";
  position: absolute;
  left: 7px;
  right: 7px;
  top: 52px;
  bottom: 7px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 138, 61, 0.32), rgba(255, 138, 61, 0.08));
  border: 1px solid rgba(255, 138, 61, 0.18);
}
.note.long .long-tag {
  position: absolute;
  bottom: 8px;
  font-size: 7px;
  letter-spacing: 0.16em;
  font-weight: 800;
  color: rgba(255, 201, 163, 0.75);
}
.note.holding {
  border-color: rgba(255, 194, 75, 0.95);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 0 26px rgba(255, 138, 61, 0.55), 0 6px 14px rgba(0, 0, 0, 0.35);
}
.note.miss {
  border-color: rgba(255, 107, 122, 0.9);
  box-shadow: 0 0 24px rgba(255, 107, 122, 0.5);
  animation: noteMiss 0.35s ease forwards;
}
.note.wrong {
  border-color: rgba(255, 107, 122, 0.9);
  animation: noteWrong 0.35s ease forwards;
}

.tap-ripples .ripple {
  position: absolute;
  width: 52px;
  height: 52px;
  margin: -26px 0 0 -26px;
  border-radius: 50%;
  border: 2px solid rgba(255, 194, 75, 0.85);
  box-shadow: 0 0 18px rgba(255, 138, 61, 0.45), inset 0 0 12px rgba(255, 138, 61, 0.25);
  animation: ripple 0.5s ease-out forwards;
}
.spark {
  position: absolute;
  width: var(--size, 5px);
  height: var(--size, 5px);
  margin: calc(var(--size, 5px) / -2) 0 0 calc(var(--size, 5px) / -2);
  border-radius: 50%;
  background: var(--c, #FFC24B);
  box-shadow: 0 0 8px var(--c, #FFC24B);
  animation: sparkFly 0.55s cubic-bezier(0.15, 0.75, 0.3, 1) forwards;
}
.judge-text {
  position: absolute;
  left: 50%;
  top: 60%;
  z-index: 6;
  transform: translate(-50%, -50%);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: var(--orange);
  text-shadow: 0 0 20px rgba(255, 138, 61, 0.55);
  opacity: 0;
  pointer-events: none;
  font-style: italic;
}
.judge-text.show { animation: judgePop 0.46s ease-out; }
.judge-text.perfect { color: #FFB25F; }
.judge-text.good { color: #9FE6C7; text-shadow: 0 0 18px rgba(111, 227, 176, 0.4); }
.judge-text.miss { color: #FF6B7A; text-shadow: 0 0 18px rgba(255, 107, 122, 0.45); }
.countdown {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  place-items: center;
  background: rgba(8, 6, 12, 0.32);
  backdrop-filter: blur(1.5px);
  -webkit-backdrop-filter: blur(1.5px);
  font-size: 84px;
  font-weight: 900;
  color: var(--cream);
  text-shadow: 0 0 34px rgba(255, 138, 61, 0.8);
  letter-spacing: -0.05em;
}
.countdown.pop { animation: countPop 0.5s ease-out; }
.countdown small { font-size: 12px; letter-spacing: 0.3em; color: var(--orange-soft); font-weight: 800; display: block; text-align: center; margin-top: 8px; text-shadow: none; }
.zen-clock {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  align-items: baseline;
  gap: 2px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(10, 7, 14, 0.65);
  border: 1px solid rgba(255, 138, 61, 0.25);
  color: var(--orange-soft);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.zen-clock b { font-size: 15px; font-weight: 900; font-variant-numeric: tabular-nums; }
.zen-clock span { font-size: 8px; color: var(--muted); }

.game-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 5px 0;
  min-height: 46px;
}
.bottom-stat { display: flex; flex-direction: column; gap: 1px; min-width: 62px; }
.bottom-stat b { font-size: 15px; font-weight: 900; font-variant-numeric: tabular-nums; }
.bottom-stat span { font-size: 7.5px; color: var(--muted-2); letter-spacing: 0.08em; }
.bottom-stat.right { align-items: flex-end; }
.revive-charge {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px 4px 6px;
  border-radius: 13px;
  background: rgba(255, 138, 61, 0.1);
  border: 1px solid rgba(255, 138, 61, 0.18);
}
.revive-heart {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 138, 61, 0.17);
  color: var(--orange);
}
.revive-heart .mp-icon { width: 14px; height: 14px; }
.revive-charge div { display: flex; align-items: baseline; gap: 3px; }
.revive-charge b { font-size: 13px; font-weight: 900; color: var(--orange-soft); }
.revive-charge span { font-size: 8px; color: var(--muted); }
.revive-charge.used { opacity: 0.42; }

/* 通用浮层 */
.layer {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(7, 5, 10, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: layerIn 0.22s ease;
}
.pause-card, .revive-card {
  width: 100%;
  max-width: 350px;
  border-radius: 28px;
  padding: 22px 18px 16px;
  background: linear-gradient(160deg, #261C31, #171020);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.55);
  text-align: center;
  animation: cardIn 0.34s cubic-bezier(0.2, 1.1, 0.3, 1);
}
.layer-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 10px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: rgba(255, 138, 61, 0.13);
  color: var(--orange);
}
.layer-icon .mp-icon { width: 28px; height: 28px; }
.pause-card h2 { margin: 0 0 3px; font-size: 22px; font-weight: 900; letter-spacing: -0.03em; }
.pause-card p { margin: 0 0 18px; font-size: 11px; color: var(--muted); }

.primary-btn, .secondary-btn, .ghost-btn {
  width: 100%;
  min-height: 48px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 800;
  transition: transform 0.12s ease, opacity 0.2s;
}
.primary-btn {
  background: linear-gradient(135deg, #FFA45D, #FF8A3D 48%, #F2701F);
  color: #2B1407;
  box-shadow: 0 10px 22px rgba(255, 122, 44, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.32);
}
.primary-btn .mp-icon, .secondary-btn .mp-icon, .ghost-btn .mp-icon { width: 19px; height: 19px; }
.secondary-btn {
  margin-top: 8px;
  background: rgba(255, 255, 255, 0.065);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--cream);
}
.ghost-btn {
  margin-top: 6px;
  min-height: 42px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.ghost-btn:active, .primary-btn:active, .secondary-btn:active { opacity: 0.88; }

/* 复活卡（浅色，强对比） */
.revive-card {
  position: relative;
  color: #2B1B13;
  background:
    radial-gradient(90% 60% at 100% 0%, rgba(255, 138, 61, 0.22), transparent 60%),
    linear-gradient(160deg, #FFF9F0 0%, #FFEEDC 58%, #FFE1C7 100%);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.55), inset 0 1px 0 #fff;
  padding-top: 16px;
  overflow: hidden;
}
.revive-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 138, 61, 0.16) 0.8px, transparent 0.8px);
  background-size: 13px 13px;
  opacity: 0.5;
  pointer-events: none;
  mask-image: linear-gradient(180deg, #000, transparent 50%);
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 50%);
}
.revive-banner { position: relative; height: 54px; margin-bottom: 2px; }
.revive-heart-big {
  position: absolute;
  left: 50%;
  top: -3px;
  transform: translateX(-50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #FFA45D, #FF7A2C);
  color: #fff;
  box-shadow: 0 9px 20px rgba(255, 122, 44, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.revive-heart-big .mp-icon { width: 29px; height: 29px; }
.revive-rays {
  position: absolute;
  left: 50%;
  top: 25px;
  width: 160px;
  height: 160px;
  margin: -80px 0 0 -80px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 138, 61, 0.3);
  animation: discTurn 18s linear infinite;
}
.revive-card .eyebrow.danger { color: #D9572A; font-size: 9px; letter-spacing: 0.2em; }
.revive-card h2 { position: relative; margin: 4px 0 4px; font-size: 24px; font-weight: 900; letter-spacing: -0.04em; color: #2B1B13; }
.revive-desc { position: relative; margin: 0 auto 13px; max-width: 280px; font-size: 11px; line-height: 1.6; color: #7E6658; }
.revive-stats {
  position: relative;
  display: flex;
  gap: 7px;
  margin-bottom: 14px;
}
.revive-stats > div {
  flex: 1;
  padding: 8px 4px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(93, 58, 35, 0.08);
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.revive-stats b { font-size: 16px; font-weight: 900; font-variant-numeric: tabular-nums; color: #332016; }
.revive-stats span { font-size: 8px; color: #8D7567; }
.ad-btn {
  position: relative;
  min-height: 58px;
  justify-content: flex-start;
  gap: 10px;
  padding: 8px 12px;
  text-align: left;
}
.ad-play {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(43, 20, 7, 0.14);
}
.ad-play .mp-icon { width: 22px; height: 22px; }
.ad-btn-copy { flex: 1; display: flex; flex-direction: column; gap: 1px; }
.ad-btn-copy b { font-size: 14px; font-weight: 900; }
.ad-btn-copy small { font-size: 9px; font-weight: 600; opacity: 0.65; }
.ad-badge {
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: #6B3A19;
  background: rgba(43, 20, 7, 0.13);
  padding: 2px 4px;
  border-radius: 4px;
}
.revive-hint { position: relative; margin: 8px 0 0; font-size: 9px; color: #987D6C; }
.revive-card .ghost-btn { position: relative; color: #806A5D; }
.revive-card .ghost-btn:active { opacity: 0.6; }

/* 广告层 */
.ad-layer { z-index: 30; padding: 0; background: rgba(5, 3, 8, 0.94); }
.ad-card {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  padding: calc(18px + env(safe-area-inset-top)) 18px calc(20px + env(safe-area-inset-bottom));
  background:
    radial-gradient(75% 50% at 50% 24%, rgba(255, 138, 61, 0.28), transparent 60%),
    radial-gradient(70% 60% at 50% 100%, rgba(124, 91, 255, 0.22), transparent 62%),
    linear-gradient(180deg, #1A1223 0%, #0D0913 70%, #09060D 100%);
}
.ad-topline { display: flex; justify-content: space-between; align-items: center; font-size: 9px; letter-spacing: 0.16em; color: var(--muted); font-weight: 800; }
.ad-topline span:last-child { color: var(--orange-soft); letter-spacing: 0.04em; }
.ad-visual {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  position: relative;
}
.ad-visual b { font-size: 24px; letter-spacing: -0.03em; font-weight: 900; margin-top: 22px; }
.ad-visual small { font-size: 10px; color: var(--muted); }
.ad-glow {
  position: absolute;
  width: 270px;
  height: 270px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 138, 61, 0.18), transparent 65%);
  animation: pulseGlow 3s ease-in-out infinite;
}
.ad-disc {
  position: relative;
  width: 148px;
  height: 148px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: repeating-radial-gradient(circle at 50% 50%, #2B1D38 0 3px, #1B1224 4px 8px);
  border: 1px solid rgba(255, 138, 61, 0.4);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 44px rgba(255, 138, 61, 0.15);
  animation: discTurn 9s linear infinite;
}
.ad-disc::before {
  content: "";
  position: absolute;
  inset: 44px;
  border-radius: 50%;
  background: linear-gradient(145deg, #FFB06D, #FF7A2C);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.ad-disc .mp-icon { position: relative; z-index: 2; width: 30px; height: 30px; color: #341A0B; }
.ad-eq { display: flex; align-items: flex-end; gap: 4px; height: 24px; margin-top: 14px; }
.ad-eq i { width: 4px; height: 8px; border-radius: 2px; background: var(--orange); animation: eq 1s ease-in-out infinite; }
.ad-eq i:nth-child(2) { animation-delay: -0.2s; background: #FFC24B; }
.ad-eq i:nth-child(3) { animation-delay: -0.4s; }
.ad-eq i:nth-child(4) { animation-delay: -0.6s; background: #B49BFF; }
.ad-eq i:nth-child(5) { animation-delay: -0.8s; background: #FFC24B; }
.ad-progress { height: 5px; border-radius: 999px; background: rgba(255, 255, 255, 0.09); overflow: hidden; }
.ad-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #FFC24B, #FF8A3D); transition: width 0.2s linear; box-shadow: 0 0 12px rgba(255, 138, 61, 0.6); }
#ad-tip { text-align: center; font-size: 9.5px; color: var(--muted-2); margin: 10px 0 0; }
.ad-done {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: rgba(9, 6, 13, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: layerIn 0.25s ease;
}
.ad-done > span {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #FFA45D, #FF7A2C);
  color: #fff;
  margin-bottom: 8px;
  box-shadow: 0 0 36px rgba(255, 138, 61, 0.55);
}
.ad-done .mp-icon { width: 34px; height: 34px; }
.ad-done b { font-size: 21px; font-weight: 900; }
.ad-done small { font-size: 10px; color: var(--muted); }
.ad-continue-btn {
  margin-top: 22px;
  width: min(78%, 260px);
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.02em;
  animation: cardIn 0.3s ease;
}
.ad-continue-btn[hidden] { display: none !important; }
.ad-continue-btn:active { transform: scale(0.96); }
.ad-continue-btn .mp-icon { width: 18px; height: 18px; }

/* ============================================================
   结算页
   ============================================================ */
.screen-result {
  background:
    radial-gradient(95% 45% at 50% 0%, rgba(255, 138, 61, 0.24), transparent 65%),
    radial-gradient(70% 40% at 0% 50%, rgba(124, 91, 255, 0.12), transparent 65%),
    linear-gradient(180deg, #171020 0%, #0F0B15 50%, #09060D 100%);
}
.result-scroll { padding: calc(22px + env(safe-area-inset-top)) 18px calc(24px + env(safe-area-inset-bottom)); }
.result-hero { text-align: center; }
.result-kicker { font-size: 9px; letter-spacing: 0.22em; color: var(--orange-soft); font-weight: 800; }
.result-hero h1 { margin: 8px 0 4px; font-size: 28px; font-weight: 900; letter-spacing: -0.04em; }
.result-hero p { margin: 0; font-size: 11px; color: var(--muted); }
.result-stars { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 18px 0 6px; min-height: 58px; }
.result-stars .star {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.13);
  transform: scale(0.86);
}
.result-stars .star .mp-icon { width: 31px; height: 31px; }
.result-stars .star.on {
  color: #3A210C;
  background: linear-gradient(145deg, #FFD37A, #FFB33F);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 20px rgba(255, 179, 63, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  animation: starPop 0.6s cubic-bezier(0.2, 1.3, 0.4, 1) forwards;
}
.result-stars .star.on:nth-child(2) { animation-delay: 0.12s; }
.result-stars .star.on:nth-child(3) { animation-delay: 0.24s; }
.result-stars .star.miss { color: rgba(255, 255, 255, 0.1); }
.result-score-card {
  margin-top: 10px;
  padding: 17px 16px 14px;
  border-radius: 23px;
  text-align: center;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025));
  border: 1px solid rgba(255, 255, 255, 0.075);
  box-shadow: var(--shadow-card);
}
.result-score-card > span { font-size: 9px; letter-spacing: 0.18em; color: var(--muted-2); }
.result-score-card > b { display: block; font-size: 46px; line-height: 1.05; letter-spacing: -0.05em; font-weight: 900; font-variant-numeric: tabular-nums; margin: 2px 0 4px; background: linear-gradient(180deg, #FFF7EC, #FFC593); -webkit-background-clip: text; background-clip: text; color: transparent; }
.result-coin { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; color: var(--gold); font-weight: 700; }
.result-coin .mp-icon { width: 14px; height: 14px; }
.result-coin b { font-size: 11px; }
.result-stats { display: flex; gap: 8px; margin-top: 10px; }
.result-stats > div {
  flex: 1;
  padding: 11px 4px;
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.result-stats b { font-size: 18px; font-weight: 900; font-variant-numeric: tabular-nums; }
.result-stats span { font-size: 8px; color: var(--muted-2); }
.rival-card {
  margin-top: 10px;
  padding: 13px 14px;
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(124, 91, 255, 0.13), rgba(255, 138, 61, 0.07));
  border: 1px solid rgba(180, 155, 255, 0.14);
}
.rival-head { display: flex; align-items: center; justify-content: space-between; font-size: 10px; color: var(--muted); }
.rival-head span { display: inline-flex; align-items: center; gap: 5px; }
.rival-head .mp-icon { width: 14px; height: 14px; color: #B49BFF; }
.rival-head b { font-size: 13px; color: var(--orange-soft); }
.rival-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.rival-side { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.rival-side span { font-size: 9px; color: var(--muted); }
.rival-side b { font-size: 22px; font-weight: 900; font-variant-numeric: tabular-nums; }
.rival-side small { font-size: 9px; color: var(--muted-2); }
.rival-vs { font-size: 9px; font-weight: 900; color: var(--muted-2); background: rgba(255, 255, 255, 0.06); border-radius: 999px; padding: 5px 7px; }
.result-next-tip {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(111, 227, 176, 0.08);
  border: 1px solid rgba(111, 227, 176, 0.15);
  color: #9FE6C7;
  font-size: 10px;
  font-weight: 700;
}
.result-next-tip .mp-icon { width: 15px; height: 15px; }
.result-actions { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.result-actions .secondary-btn, .result-actions .ghost-btn { margin-top: 0; }

/* ============================================================
   动画
   ============================================================ */
@keyframes discTurn { to { transform: rotate(360deg); } }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes tileFall { 0%, 100% { transform: translateY(0) rotate(var(--rot, 10deg)); } 50% { transform: translateY(9px) rotate(var(--rot, 10deg)); } }
@keyframes twinkle { 0%, 100% { opacity: 0.25; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1.2); } }
@keyframes sheen { 0%, 55% { left: -40%; } 80%, 100% { left: 125%; } }
@keyframes judgeBreath { 0%, 100% { opacity: 0.35; } 50% { opacity: 0.9; } }
@keyframes ripple { 0% { transform: scale(0.5); opacity: 0.9; } 100% { transform: scale(1.55); opacity: 0; } }
@keyframes sparkFly { 0% { transform: translate(0, 0) scale(1); opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) scale(0.15); opacity: 0; } }
@keyframes judgePop { 0% { opacity: 0; transform: translate(-50%, -50%) scale(1.4) rotate(-4deg); } 26% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0); } 75% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -68%) scale(0.94); } }
@keyframes countPop { 0% { transform: scale(1.5); opacity: 0; } 30% { transform: scale(1); opacity: 1; } 100% { transform: scale(0.86); opacity: 0.3; } }
@keyframes noteMiss { to { opacity: 0; transform: translateY(22px) scale(0.86); } }
@keyframes noteWrong { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
@keyframes layerIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes cardIn { from { transform: translateY(24px) scale(0.96); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes starPop { 0% { transform: scale(0.5) rotate(-16deg); opacity: 0; } 65% { transform: scale(1.14) rotate(3deg); opacity: 1; } 100% { transform: scale(1) rotate(0); opacity: 1; } }
@keyframes pulseGlow { 0%, 100% { transform: scale(0.92); opacity: 0.7; } 50% { transform: scale(1.06); opacity: 1; } }
@keyframes eq { 0%, 100% { height: 7px; } 50% { height: 22px; } }

/* 吐司 */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(34px + env(safe-area-inset-bottom));
  z-index: 100;
  transform: translate(-50%, 14px);
  max-width: calc(100vw - 44px);
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(34, 24, 42, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.11);
  color: var(--cream);
  font-size: 11px;
  line-height: 1.4;
  text-align: center;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* 小屏适配 */
@media (max-width: 360px) {
  .home-scroll { padding-left: 13px; padding-right: 13px; }
  .hero { min-height: 262px; }
  .hero h1 { font-size: 32px; }
  .hero-art { right: -42px; transform: scale(0.9); transform-origin: right bottom; }
  .hero-copy { padding: 20px 17px; max-width: 70%; }
  .player-meta small { display: none; }
  .coin-pill { padding: 0 10px 0 8px; font-size: 12px; }
  .game-shell { padding-left: 9px; padding-right: 9px; }
  .song-list.full .song-cover { width: 60px; height: 60px; flex-basis: 60px; }
  .revive-card { padding-left: 14px; padding-right: 14px; }
  .result-score-card > b { font-size: 40px; }
}
@media (min-height: 880px) {
  .hero { min-height: 306px; }
  .hero-art { width: 270px; height: 270px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* ============================================================
   道具 / 每日 / 装扮 / 榜单（新增）
   ============================================================ */
.picked-buffs { color: var(--orange-soft) !important; font-size: 8px !important; }
.picked-buffs.is-on { color: #FFD37A !important; }

/* 开局道具 */
.power-strip {
  margin-top: 12px;
  padding: 11px 12px 12px;
  border-radius: 20px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.022));
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
}
.power-strip.compact { margin-top: 14px; }
.power-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 2px 8px; }
.power-head span { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 800; color: var(--cream); }
.power-head .mp-icon { width: 14px; height: 14px; color: var(--orange); }
.power-head small { font-size: 8.5px; color: var(--muted-2); }
.power-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.power-toggle {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 7px 8px;
  border-radius: 15px;
  text-align: left;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.18s, border-color 0.18s, transform 0.12s;
}
.power-toggle.is-on {
  background: linear-gradient(140deg, rgba(255, 138, 61, 0.18), rgba(255, 194, 75, 0.06));
  border-color: rgba(255, 138, 61, 0.55);
  box-shadow: inset 0 0 0 1px rgba(255, 138, 61, 0.12);
}
.power-ico {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: var(--orange);
  background: rgba(255, 138, 61, 0.14);
}
.power-ico.double { color: var(--gold); background: rgba(255, 194, 75, 0.13); }
.power-ico .mp-icon { width: 18px; height: 18px; }
.power-copy { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.power-copy b { font-size: 11.5px; font-weight: 800; white-space: nowrap; }
.power-copy small { font-size: 8px; color: var(--muted); white-space: nowrap; }
.power-check {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #2B1407;
  background: rgba(255, 255, 255, 0.03);
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.18s, transform 0.18s;
}
.power-check .mp-icon { width: 11px; height: 11px; }
.power-toggle.is-on .power-check {
  opacity: 1;
  transform: scale(1);
  border-color: transparent;
  background: linear-gradient(145deg, #FFD37A, #FF9A4A);
}

/* 今日入口 */
.daily-glance { display: grid; grid-template-columns: 1.08fr 0.92fr; gap: 9px; }
.glance-card {
  position: relative;
  overflow: hidden;
  text-align: left;
  border-radius: 19px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025));
  border: 1px solid rgba(255, 255, 255, 0.075);
  box-shadow: 0 9px 20px rgba(0, 0, 0, 0.18);
}
.glance-daily {
  grid-column: 1;
  grid-row: 1 / 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 13px;
  background:
    radial-gradient(90% 80% at 100% 0%, rgba(255, 138, 61, 0.2), transparent 60%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025));
}
.glance-icon {
  width: 33px;
  height: 33px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: var(--orange);
  background: rgba(255, 138, 61, 0.15);
}
.glance-icon .mp-icon { width: 19px; height: 19px; }
.glance-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.glance-copy b { font-size: 12px; font-weight: 800; }
.glance-copy small { font-size: 8.5px; color: var(--muted); line-height: 1.35; }
.glance-daily .glance-copy small { font-size: 9px; }
.glance-progress { display: block; width: 100%; height: 5px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; margin-top: auto; }
.glance-progress i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #FFC24B, #FF8A3D); transition: width 0.3s ease; }
.glance-stack { display: flex; flex-direction: column; gap: 9px; }
.glance-small { display: flex; align-items: center; gap: 8px; min-height: 55px; padding: 9px 10px; }
.glance-small .glance-icon { width: 29px; height: 29px; flex: 0 0 29px; border-radius: 10px; color: var(--gold); background: rgba(255, 194, 75, 0.12); }
.glance-small .glance-icon .mp-icon { width: 16px; height: 16px; }
.glance-small .glance-copy b { font-size: 11px; }
.glance-small .glance-copy small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 96px; }
.glance-arrow { width: 15px; height: 15px; color: var(--muted-2); flex: 0 0 15px; margin-left: auto; }

/* 游戏内提示 */
.hint-btn {
  position: absolute;
  right: 10px;
  top: 11px;
  z-index: 7;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 4px 10px 4px 5px;
  border-radius: 999px;
  color: var(--cream);
  background: rgba(12, 8, 16, 0.62);
  border: 1px solid rgba(255, 194, 75, 0.26);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}
.hint-btn:active { transform: scale(0.94); }
.hint-btn.is-off { opacity: 0.36; }
.hint-icon {
  width: 27px;
  height: 27px;
  flex: 0 0 27px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #3B1E0C;
  background: linear-gradient(145deg, #FFD37A, #FFA45D);
}
.hint-icon .mp-icon { width: 16px; height: 16px; }
.hint-copy { display: flex; align-items: baseline; gap: 3px; font-size: 10px; font-weight: 800; }
.hint-copy small { font-size: 10px; color: var(--gold); font-weight: 900; }
.note.hinted {
  z-index: 6;
  outline: 2px solid rgba(255, 216, 140, 0.95);
  outline-offset: 1px;
  animation: hintPulse 0.52s ease-in-out infinite;
}
.lane.hint-on .lane-strip {
  background: linear-gradient(180deg, rgba(255, 194, 75, 0.04), rgba(255, 194, 75, 0.16) 62%, rgba(255, 194, 75, 0.32));
}
.lane.hint-on::before {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 0;
  height: 38%;
  background: linear-gradient(0deg, rgba(255, 194, 75, 0.22), transparent);
  pointer-events: none;
}
@keyframes hintPulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(255, 194, 75, 0.28), 0 0 22px rgba(255, 194, 75, 0.7); }
  50% { box-shadow: 0 0 0 4px rgba(255, 194, 75, 0.1), 0 0 34px rgba(255, 216, 140, 0.95); }
}

/* 键盘皮肤 */
.stage.skin-candle {
  background:
    radial-gradient(80% 62% at 50% 100%, rgba(255, 185, 92, 0.2), transparent 66%),
    linear-gradient(180deg, rgba(48, 33, 22, 0.96), rgba(22, 14, 10, 0.99));
}
.skin-candle .lane-strip { background: linear-gradient(180deg, transparent, rgba(255, 205, 140, 0.03) 55%, rgba(255, 185, 92, 0.08)); }
.skin-candle .note.black {
  background: linear-gradient(180deg, rgba(255, 201, 128, 0.4), transparent 32%), linear-gradient(155deg, #5B422C 0%, #342318 60%, #21150E 100%);
  border-color: rgba(255, 199, 122, 0.65);
  box-shadow: inset 0 1px 0 rgba(255, 238, 210, 0.25), 0 0 18px rgba(255, 185, 92, 0.24), 0 6px 14px rgba(0, 0, 0, 0.35);
}
.skin-candle .note.black .note-dot { background: #FFE7BF; box-shadow: 0 0 11px 3px rgba(255, 198, 118, 0.7); }
.skin-candle .judge-line { background: linear-gradient(90deg, rgba(255, 185, 92, 0.2), #FFD59B 25%, #FFF3D8 50%, #FFD59B 75%, rgba(255, 185, 92, 0.2)); }
.stage.skin-neon {
  background:
    radial-gradient(80% 60% at 50% 100%, rgba(70, 220, 255, 0.16), transparent 65%),
    radial-gradient(70% 40% at 100% 0%, rgba(175, 92, 255, 0.2), transparent 62%),
    linear-gradient(180deg, rgba(20, 18, 45, 0.98), rgba(8, 8, 18, 0.99));
}
.skin-neon .lane-strip { background: linear-gradient(180deg, transparent, rgba(86, 222, 255, 0.035) 55%, rgba(175, 92, 255, 0.09)); }
.skin-neon .note.black {
  background: linear-gradient(180deg, rgba(86, 222, 255, 0.45), transparent 30%), linear-gradient(155deg, #2C2460 0%, #19153B 58%, #0D0B22 100%);
  border-color: rgba(86, 222, 255, 0.8);
  box-shadow: inset 0 1px 0 rgba(212, 247, 255, 0.4), 0 0 20px rgba(86, 222, 255, 0.3), 0 0 32px rgba(175, 92, 255, 0.16);
}
.skin-neon .note.black .note-dot { background: #B9F5FF; box-shadow: 0 0 12px 4px rgba(86, 222, 255, 0.8); }
.skin-neon .judge-line { background: linear-gradient(90deg, rgba(86, 222, 255, 0.2), #7CEBFF 26%, #F0DBFF 50%, #7CEBFF 74%, rgba(86, 222, 255, 0.2)); box-shadow: 0 0 14px rgba(86, 222, 255, 0.75), 0 0 30px rgba(175, 92, 255, 0.4); }
.stage.skin-wood {
  background:
    radial-gradient(85% 60% at 50% 100%, rgba(255, 220, 175, 0.14), transparent 66%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.018) 0 2px, transparent 2px 9px),
    linear-gradient(180deg, #3A2A1C 0%, #261A12 55%, #150E09 100%);
}
.skin-wood .lane-strip {
  background:
    repeating-linear-gradient(90deg, rgba(255, 226, 190, 0.035) 0 1px, transparent 1px 7px),
    linear-gradient(180deg, transparent, rgba(255, 220, 175, 0.028) 55%, rgba(255, 220, 175, 0.09));
}
.skin-wood .note.black {
  background: linear-gradient(180deg, rgba(255, 238, 214, 0.28), transparent 26%), linear-gradient(155deg, #4A3422 0%, #2D1F15 58%, #1A110B 100%);
  border-color: rgba(255, 224, 184, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 242, 222, 0.3), 0 0 14px rgba(255, 220, 175, 0.16), 0 6px 14px rgba(0, 0, 0, 0.4);
}
.skin-wood .note.black .note-dot { background: #FFE8C6; box-shadow: 0 0 9px 2px rgba(255, 220, 175, 0.55); }
.skin-wood .note.white {
  background: linear-gradient(165deg, #FFF9EA 0%, #F3E2C4 62%, #D8BF97 100%);
  border-color: rgba(255, 244, 220, 0.95);
  box-shadow: inset 0 2px 0 #FFFDF6, inset 0 -9px 14px rgba(120, 82, 45, 0.22), 0 6px 16px rgba(0, 0, 0, 0.32);
}
.skin-wood .judge-line { background: linear-gradient(90deg, rgba(255, 220, 175, 0.2), #FFE4BF 26%, #FFF9EC 50%, #FFE4BF 74%, rgba(255, 220, 175, 0.2)); }

/* 点击特效 */
.fx-note {
  position: absolute;
  z-index: 5;
  margin: 0;
  pointer-events: none;
  animation: fxNoteFly 0.95s cubic-bezier(0.15, 0.7, 0.3, 1) forwards;
  filter: drop-shadow(0 0 6px currentColor);
}
.fx-ring {
  position: absolute;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border-radius: 50%;
  border: 2px solid rgba(255, 214, 150, 0.92);
  box-shadow: 0 0 20px rgba(255, 194, 75, 0.7), inset 0 0 12px rgba(255, 194, 75, 0.35);
  animation: fxRing 0.6s ease-out forwards;
  pointer-events: none;
}
.fx-shard {
  position: absolute;
  width: var(--size, 6px);
  height: calc(var(--size, 6px) * 0.45);
  margin: calc(var(--size, 6px) / -2) 0 0 calc(var(--size, 6px) / -2);
  border-radius: 2px;
  background: var(--c, #FFC24B);
  box-shadow: 0 0 10px var(--c, #FFC24B);
  animation: fxShard 0.66s cubic-bezier(0.12, 0.7, 0.3, 1) forwards;
  pointer-events: none;
}
@keyframes fxNoteFly {
  0% { transform: translate(-50%, -50%) scale(0.5) rotate(0deg); opacity: 0; }
  18% { opacity: 1; }
  100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.05) rotate(var(--rot, 18deg)); opacity: 0; }
}
@keyframes fxRing {
  0% { transform: scale(0.5); opacity: 1; }
  100% { transform: scale(5.2); opacity: 0; }
}
@keyframes fxShard {
  0% { transform: translate(0, 0) rotate(0deg) scale(1); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) rotate(180deg) scale(0.2); opacity: 0; }
}

/* 结算扩展 */
.coin-tag {
  font-style: normal;
  margin-left: 5px;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 800;
  color: #2B1407;
  background: linear-gradient(145deg, #FFD37A, #FF9A4A);
}
.result-rank {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 194, 75, 0.08);
  border: 1px solid rgba(255, 194, 75, 0.16);
  color: #FFDCA5;
  font-size: 10px;
  font-weight: 700;
}
.result-rank .mp-icon { width: 15px; height: 15px; flex: 0 0 15px; }
.result-rank b { font-size: 12px; color: var(--gold); }
#result-daily-tip { margin-left: auto; font-style: normal; font-size: 8.5px; color: var(--muted); }

/* 装扮 / 每日 / 榜单页 */
.screen-shop {
  background:
    radial-gradient(90% 42% at 100% 0%, rgba(255, 138, 61, 0.2), transparent 60%),
    radial-gradient(80% 40% at 0% 40%, rgba(124, 91, 255, 0.14), transparent 62%),
    linear-gradient(180deg, #171020 0%, #0F0B15 52%, #09060D 100%);
}
.screen-daily {
  background:
    radial-gradient(90% 42% at 0% 0%, rgba(111, 227, 176, 0.13), transparent 60%),
    radial-gradient(80% 45% at 100% 30%, rgba(255, 138, 61, 0.16), transparent 62%),
    linear-gradient(180deg, #15111E 0%, #0E0B13 55%, #09060C 100%);
}
.screen-rank {
  background:
    radial-gradient(90% 44% at 50% 0%, rgba(255, 194, 75, 0.2), transparent 62%),
    radial-gradient(80% 42% at 0% 55%, rgba(124, 91, 255, 0.12), transparent 62%),
    linear-gradient(180deg, #171120 0%, #0F0B15 55%, #09060D 100%);
}
.shop-scroll, .daily-scroll, .rank-scroll {
  padding: calc(13px + env(safe-area-inset-top)) 16px calc(26px + env(safe-area-inset-bottom));
}
.sub-top { display: flex; align-items: center; justify-content: space-between; min-height: 42px; gap: 10px; }
.coin-pill-sm { height: 34px; padding: 0 11px 0 8px; font-size: 12px; }
.coin-pill-sm .mp-icon { width: 16px; height: 16px; }
.date-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.07);
}
.shop-tabs {
  display: flex;
  gap: 5px;
  margin-top: 16px;
  padding: 4px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.shop-tab {
  flex: 1;
  min-height: 34px;
  border-radius: 12px;
  font-size: 10.5px;
  font-weight: 800;
  color: var(--muted);
  transition: background 0.2s, color 0.2s;
}
.shop-tab.is-active {
  color: #2B1407;
  background: linear-gradient(145deg, #FFC06F, #FF8A3D);
  box-shadow: 0 6px 14px rgba(255, 122, 44, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.shop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.shop-card {
  position: relative;
  padding: 8px 8px 9px;
  border-radius: 19px;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025));
  border: 1px solid rgba(255, 255, 255, 0.075);
  box-shadow: 0 9px 20px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}
.shop-card.is-equipped { border-color: rgba(255, 138, 61, 0.5); box-shadow: 0 0 0 1px rgba(255, 138, 61, 0.12), 0 10px 22px rgba(0, 0, 0, 0.2); }
.shop-preview {
  position: relative;
  height: 92px;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.055), rgba(0, 0, 0, 0.18));
  display: grid;
  place-items: center;
}
.preview-badge {
  position: absolute;
  right: 6px;
  top: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 7px;
  font-weight: 900;
  color: #2B1407;
  background: linear-gradient(145deg, #FFD37A, #FF9A4A);
}
.preview-keys {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  width: 84%;
  height: 70px;
  padding: 5px;
  border-radius: 9px;
  background: rgba(10, 7, 14, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.preview-keys i { flex: 1; height: 100%; border-radius: 3px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)); border: 1px solid rgba(255, 255, 255, 0.06); }
.preview-keys .preview-tile {
  position: absolute;
  top: 20%;
  left: 29%;
  width: 18%;
  height: 17px;
  border-radius: 4px;
  background: linear-gradient(180deg, #FFB26B, #E9651D);
  box-shadow: 0 0 10px rgba(255, 138, 61, 0.6);
  transform: rotate(-2deg);
}
.skin-preview-starlight i:nth-child(2), .skin-preview-starlight i:nth-child(4) { background: linear-gradient(180deg, rgba(255, 138, 61, 0.22), rgba(255, 138, 61, 0.04)); }
.skin-preview-candle { background: #2A1B10; }
.skin-preview-candle i:nth-child(odd) { background: linear-gradient(180deg, rgba(255, 219, 166, 0.25), rgba(255, 185, 92, 0.04)); }
.skin-preview-candle .preview-tile { background: linear-gradient(180deg, #FFE0B0, #D08B3D); box-shadow: 0 0 10px rgba(255, 200, 128, 0.65); }
.skin-preview-neon { background: #0B0B20; }
.skin-preview-neon i { background: linear-gradient(180deg, rgba(86, 222, 255, 0.18), rgba(86, 222, 255, 0.02)); }
.skin-preview-neon .preview-tile { background: linear-gradient(180deg, #8DF0FF, #5A63FF); box-shadow: 0 0 12px rgba(86, 222, 255, 0.75); }
.skin-preview-wood { background: #241811; }
.skin-preview-wood i { background: linear-gradient(180deg, rgba(255, 238, 214, 0.2), rgba(255, 220, 175, 0.03)); }
.skin-preview-wood .preview-tile { background: linear-gradient(180deg, #FFE8C6, #8A5B33); box-shadow: 0 0 10px rgba(255, 224, 184, 0.4); }
.preview-effect { position: relative; display: flex; align-items: center; justify-content: center; gap: 3px; width: 80%; height: 62px; color: var(--orange); }
.preview-effect .mp-icon { width: 30px; height: 30px; filter: drop-shadow(0 0 8px currentColor); animation: floatY 3s ease-in-out infinite; }
.preview-effect em { width: 4px; height: 4px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 6px var(--gold); }
.preview-effect em:nth-child(3) { background: #B49BFF; box-shadow: 0 0 6px #B49BFF; }
.effect-preview-note .mp-icon { color: #FFD37A; }
.effect-preview-flare .mp-icon { color: #FF9E5E; }
.preview-timbre { position: relative; display: flex; align-items: flex-end; justify-content: center; gap: 4px; width: 80%; height: 62px; padding-bottom: 8px; }
.preview-timbre i { width: 5px; border-radius: 3px; background: linear-gradient(0deg, #FF8A3D, #FFD37A); animation: eq 1.4s ease-in-out infinite; }
.preview-timbre i:nth-child(1), .preview-timbre i:nth-child(5) { height: 16px; animation-delay: -0.2s; }
.preview-timbre i:nth-child(2), .preview-timbre i:nth-child(4) { height: 30px; animation-delay: -0.5s; }
.preview-timbre i:nth-child(3) { height: 45px; animation-delay: -0.8s; }
.preview-timbre b { position: absolute; top: 0; width: 24px; height: 24px; color: var(--orange-soft); }
.timbre-preview-musicbox i { background: linear-gradient(0deg, #B49BFF, #FFD37A); }
.timbre-preview-soft i { background: linear-gradient(0deg, #6FE3B0, #B9F5FF); }
.shop-body { padding: 8px 2px 7px; }
.shop-body b { display: block; font-size: 12.5px; font-weight: 800; letter-spacing: -0.01em; }
.shop-body small { display: block; margin-top: 2px; font-size: 8.5px; line-height: 1.4; color: var(--muted); min-height: 24px; }
.shop-actions { display: flex; gap: 5px; }
.buy-btn, .equip-btn, .ad-unlock, .owned-pill {
  flex: 1;
  min-height: 31px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 9.5px;
  font-weight: 800;
  white-space: nowrap;
}
.buy-btn { color: #2B1407; background: linear-gradient(145deg, #FFC06F, #FF8A3D); box-shadow: 0 5px 12px rgba(255, 122, 44, 0.22); }
.buy-btn .mp-icon { width: 13px; height: 13px; }
.ad-unlock { flex: 0 0 54px; color: #B49BFF; background: rgba(124, 91, 255, 0.14); border: 1px solid rgba(180, 155, 255, 0.18); }
.equip-btn { color: #2B1407; background: linear-gradient(145deg, #FFD37A, #FFB33F); }
.owned-pill { color: #9FE6C7; background: rgba(111, 227, 176, 0.1); border: 1px solid rgba(111, 227, 176, 0.16); }
.owned-pill .mp-icon { width: 13px; height: 13px; }
.shop-note, .daily-note, .rank-note {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 15px 3px 0;
  color: var(--muted-2);
  font-size: 9px;
  line-height: 1.55;
}
.shop-note .mp-icon, .daily-note .mp-icon, .rank-note .mp-icon { width: 13px; height: 13px; flex: 0 0 13px; margin-top: 1px; color: var(--orange-soft); }

/* 每日任务 */
.daily-summary {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 16px;
  padding: 13px 14px;
  border-radius: 19px;
  background: linear-gradient(145deg, rgba(111, 227, 176, 0.1), rgba(255, 255, 255, 0.025));
  border: 1px solid rgba(111, 227, 176, 0.15);
}
.daily-summary-copy { display: flex; flex-direction: column; gap: 1px; flex: 0 0 auto; }
.daily-summary-copy b { font-size: 21px; font-weight: 900; color: #9FE6C7; font-variant-numeric: tabular-nums; }
.daily-summary-copy span { font-size: 8px; color: var(--muted); }
.daily-summary-bar { flex: 1; height: 7px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.daily-summary-bar i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #6FE3B0, #FFD37A); transition: width 0.3s ease; }
.daily-summary-coin { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 3px; color: var(--gold); font-size: 12px; font-weight: 900; }
.daily-summary-coin .mp-icon { width: 16px; height: 16px; }
.daily-list { display: flex; flex-direction: column; gap: 10px; margin-top: 13px; }
.daily-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border-radius: 20px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.022));
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
}
.daily-card.is-ready { border-color: rgba(255, 138, 61, 0.42); background: linear-gradient(150deg, rgba(255, 138, 61, 0.12), rgba(255, 255, 255, 0.022)); }
.daily-card.is-claimed { opacity: 0.62; }
.daily-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: var(--orange);
  background: rgba(255, 138, 61, 0.13);
}
.daily-icon .mp-icon { width: 21px; height: 21px; }
.daily-info { flex: 1; min-width: 0; }
.daily-title-row { display: flex; align-items: center; gap: 7px; }
.daily-title-row b { flex: 1; font-size: 12px; font-weight: 800; line-height: 1.35; }
.claim-btn {
  flex: 0 0 auto;
  min-height: 27px;
  min-width: 54px;
  padding: 0 9px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 800;
}
.claim-btn.is-ready { color: #2B1407; background: linear-gradient(145deg, #FFC06F, #FF8A3D); box-shadow: 0 5px 12px rgba(255, 122, 44, 0.22); }
.claim-btn.is-locked { color: var(--muted-2); background: rgba(255, 255, 255, 0.05); }
.claim-btn.is-claimed { color: #9FE6C7; background: rgba(111, 227, 176, 0.1); }
.daily-info > small { display: block; margin-top: 2px; font-size: 8.5px; color: var(--muted); }
.daily-bar { height: 5px; margin-top: 7px; border-radius: 999px; background: rgba(255, 255, 255, 0.075); overflow: hidden; }
.daily-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #FFC24B, #FF8A3D); transition: width 0.3s ease; }
.daily-foot { display: flex; justify-content: space-between; gap: 6px; margin-top: 5px; font-size: 8px; color: var(--muted-2); }
.daily-foot em { font-style: normal; color: var(--gold); font-weight: 700; }

/* 今日榜单 */
.rank-me {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 15px;
  padding: 11px 12px;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255, 194, 75, 0.14), rgba(255, 138, 61, 0.05));
  border: 1px solid rgba(255, 194, 75, 0.22);
}
.rank-me-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #3B2409;
  background: linear-gradient(145deg, #FFD37A, #FFB33F);
  box-shadow: 0 5px 12px rgba(255, 179, 63, 0.24);
}
.rank-me-icon .mp-icon { width: 18px; height: 18px; }
.rank-me-copy { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.rank-me-copy b { font-size: 11px; font-weight: 800; }
.rank-me-copy small { font-size: 8.5px; color: var(--muted); }
.rank-me-tag {
  flex: 0 0 auto;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #2B1407;
  background: var(--gold);
  border-radius: 999px;
  padding: 3px 6px;
}
.rank-list { display: flex; flex-direction: column; gap: 7px; margin-top: 11px; }
.rank-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.rank-row.is-me { border-color: rgba(255, 138, 61, 0.48); background: rgba(255, 138, 61, 0.1); box-shadow: 0 0 0 1px rgba(255, 138, 61, 0.1); }
.rank-no { width: 22px; flex: 0 0 22px; text-align: center; font-size: 11px; font-weight: 900; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.rank-row.rank-1 .rank-no { color: #FFD37A; text-shadow: 0 0 10px rgba(255, 194, 75, 0.55); }
.rank-row.rank-2 .rank-no { color: #DDE4F0; }
.rank-row.rank-3 .rank-no { color: #F0B98A; }
.rank-avatar {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.rank-avatar .mp-icon { width: 17px; height: 17px; }
.rank-row.rank-1 .rank-avatar { color: #3B2409; background: linear-gradient(145deg, #FFD37A, #FFB33F); }
.rank-row.rank-2 .rank-avatar { color: #2C3240; background: linear-gradient(145deg, #F2F6FC, #BFCADB); }
.rank-row.rank-3 .rank-avatar { color: #3A2112; background: linear-gradient(145deg, #FFD0A8, #D9945A); }
.rank-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.rank-copy b { font-size: 10.5px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-copy b em { font-style: normal; font-size: 7px; font-weight: 900; color: #2B1407; background: var(--orange); border-radius: 999px; padding: 1px 4px; margin-left: 4px; vertical-align: 1px; }
.rank-copy small { font-size: 8px; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-score { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.rank-score b { font-size: 13px; font-weight: 900; font-variant-numeric: tabular-nums; color: var(--cream); }
.rank-score small { font-size: 7.5px; color: var(--muted-2); }
.rank-loading { display: flex; flex-direction: column; gap: 7px; padding: 6px 0; }
.rank-loading span { display: block; height: 46px; border-radius: 15px; background: linear-gradient(90deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.045)); background-size: 200% 100%; animation: skeleton 1.2s linear infinite; }
@keyframes skeleton { from { background-position: 180% 0; } to { background-position: -80% 0; } }

@media (max-width: 360px) {
  .shop-grid { gap: 8px; }
  .shop-preview { height: 82px; }
  .power-copy b { font-size: 10.5px; }
  .power-copy small { font-size: 7.5px; }
  .glance-small .glance-copy small { max-width: 78px; }
  .daily-title-row b { font-size: 11px; }
}

/* ============================================================
   游戏全屏化 · 底部判定线 · 长块辅助（本轮）
   ============================================================ */
body.game-mode { background: #050409; }
body.game-mode .app {
  width: 100vw;
  max-width: none;
  box-shadow: none;
}

.screen-game .game-shell {
  position: absolute;
  inset: 0;
  display: block;
  padding: 0;
  background: #08060C;
}
.screen-game .game-shell::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 180px;
  z-index: 8;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(5, 3, 8, 0.94) 0%, rgba(5, 3, 8, 0.62) 52%, rgba(5, 3, 8, 0) 100%);
}
.screen-game .stage {
  position: absolute;
  inset: 0;
  z-index: auto;
  flex: none;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background:
    radial-gradient(80% 42% at 50% 104%, rgba(255, 138, 61, 0.25), transparent 68%),
    radial-gradient(65% 38% at 100% 0%, rgba(124, 91, 255, 0.14), transparent 65%),
    linear-gradient(180deg, #171020 0%, #0C0912 52%, #08060B 100%);
}
.screen-game .lanes { inset: 0; }
.screen-game .lane { border-right: 1px solid rgba(255, 255, 255, 0.045); }
.screen-game .lane-strip {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.012) 0%, rgba(255, 255, 255, 0.025) 45%, rgba(255, 138, 61, 0.07) 100%);
}
.screen-game .judge-line {
  left: 0;
  right: 0;
  height: 4px;
  border-radius: 0;
  z-index: 4;
  background: linear-gradient(90deg, rgba(255, 138, 61, 0.12), #FF9A55 18%, #FFEBD8 50%, #FF9A55 82%, rgba(255, 138, 61, 0.12));
  box-shadow: 0 0 18px rgba(255, 138, 61, 0.85), 0 0 46px rgba(255, 138, 61, 0.38);
}
.screen-game .judge-pulse { top: -14px; height: 30px; }
.screen-game .judge-label { right: 16px; top: -22px; font-size: 8px; }
.screen-game .lane-hint {
  bottom: calc(env(safe-area-inset-bottom) + 62px);
  font-size: 9px;
  color: rgba(255, 255, 255, 0.24);
  z-index: 5;
}
.screen-game .lane.active .lane-hint { color: rgba(255, 190, 135, 0.9); }

.screen-game .game-hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  min-height: 0;
  padding: calc(env(safe-area-inset-top) + 9px) 14px 8px;
  pointer-events: none;
}
.screen-game .game-hud .hud-btn { pointer-events: auto; }
.screen-game .hud-score b { text-shadow: 0 0 18px rgba(255, 138, 61, 0.35); }
.screen-game .hud-combo { text-shadow: 0 0 16px rgba(255, 138, 61, 0.3); }
.screen-game .game-title-row {
  position: absolute;
  top: calc(env(safe-area-inset-top) + 61px);
  left: 16px;
  right: 16px;
  z-index: 9;
  margin: 0;
  pointer-events: none;
}
.screen-game .game-progress {
  position: absolute;
  top: calc(env(safe-area-inset-top) + 84px);
  left: 16px;
  right: 16px;
  z-index: 9;
  margin: 0;
  pointer-events: none;
}
.screen-game .game-meta {
  position: absolute;
  top: calc(env(safe-area-inset-top) + 95px);
  left: 16px;
  right: 16px;
  z-index: 9;
  padding: 0;
  pointer-events: none;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}
.screen-game .game-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  min-height: 0;
  padding: 16px 18px calc(env(safe-area-inset-bottom) + 10px);
  pointer-events: none;
  background: linear-gradient(0deg, rgba(5, 3, 8, 0.94) 0%, rgba(5, 3, 8, 0.62) 58%, rgba(5, 3, 8, 0) 100%);
}
.screen-game .game-bottom .bottom-stat b { font-size: 17px; text-shadow: 0 0 12px rgba(255, 138, 61, 0.3); }
.screen-game .revive-charge {
  background: rgba(9, 6, 13, 0.55);
  border-color: rgba(255, 138, 61, 0.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.screen-game .hint-btn {
  top: calc(env(safe-area-inset-top) + 118px);
  right: 14px;
  bottom: auto;
  z-index: 9;
}
.screen-game .zen-clock {
  top: calc(env(safe-area-inset-top) + 118px);
  z-index: 9;
}
.screen-game .countdown {
  z-index: 18;
  background: rgba(7, 5, 10, 0.48);
}
.screen-game .tap-ripples { z-index: 5; }
.screen-game .sparks { z-index: 6; }

/* 长块只点一下 */
.note.long .long-tag {
  bottom: 12px;
  color: rgba(255, 226, 196, 0.92);
  letter-spacing: 0.06em;
}

@media (max-width: 360px) {
  .screen-game .hint-btn { right: 10px; }
  .screen-game .game-hud { padding-left: 10px; padding-right: 10px; }
  .screen-game .game-title-row,
  .screen-game .game-progress,
  .screen-game .game-meta { left: 12px; right: 12px; }
}

.play-tip {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 14px 3px 0;
  padding: 10px 11px;
  border-radius: 14px;
  background: rgba(255, 138, 61, 0.08);
  border: 1px solid rgba(255, 138, 61, 0.14);
  color: #FFD2AC;
  font-size: 9.5px;
  line-height: 1.55;
}
.play-tip .mp-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  margin-top: 1px;
  color: var(--orange);
}

body.game-mode { overflow: hidden; overscroll-behavior: none; }
body.game-mode .screen-game { touch-action: none; }

/* 累计星数进度 */
.song-stars .star-count {
  font-style: normal;
  margin-left: 2px;
  font-size: 9px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: -0.02em;
}
.result-star-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding-left: 4px;
  text-align: left;
}
.result-star-copy b {
  font-size: 25px;
  line-height: 1;
  font-weight: 900;
  color: var(--gold);
  letter-spacing: -0.03em;
}
.result-star-copy small {
  font-size: 9.5px;
  color: var(--muted);
  white-space: nowrap;
}

/* ============================================================
   首页玩法规则 & 星音实机画面
   ============================================================ */
.rules-card {
  margin-top: 10px;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.022));
  border: 1px solid rgba(255, 255, 255, 0.075);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.26);
}
.rules-art { position: relative; height: 148px; overflow: hidden; background: #191122; }
.rules-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 44%;
  display: block;
  transform: scale(1.02);
}
.rules-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 7, 14, 0.08) 0%, rgba(10, 7, 14, 0.35) 55%, rgba(10, 7, 14, 0.88) 100%),
    linear-gradient(90deg, rgba(10, 7, 14, 0.55), transparent 62%);
  pointer-events: none;
}
.rules-art-label {
  position: absolute;
  z-index: 2;
  left: 13px;
  top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 25px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  color: #FFE8CE;
  background: rgba(12, 8, 16, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.rules-art-label .mp-icon { width: 13px; height: 13px; color: var(--orange-soft); }
.rules-art b {
  position: absolute;
  z-index: 2;
  left: 14px;
  right: 14px;
  bottom: 27px;
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -0.035em;
  color: #FFF8EF;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.6);
}
.rules-art small {
  position: absolute;
  z-index: 2;
  left: 15px;
  bottom: 10px;
  font-size: 9px;
  letter-spacing: 0.12em;
  color: #FFD8B0;
  font-weight: 700;
}
.rules-list { padding: 6px 13px 2px; }
.rule-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}
.rule-item:last-child { border-bottom: 0; }
.rule-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--orange);
  background: rgba(255, 138, 61, 0.12);
}
.rule-icon .mp-icon { width: 17px; height: 17px; }
.rule-item > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rule-item b { font-size: 11px; font-weight: 800; }
.rule-item small { font-size: 9px; line-height: 1.5; color: var(--muted); }
.rules-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 2px;
  padding: 10px 13px 12px;
  background: linear-gradient(90deg, rgba(255, 138, 61, 0.09), rgba(255, 194, 75, 0.035));
  border-top: 1px solid rgba(255, 138, 61, 0.12);
  font-size: 9px;
  color: var(--muted);
}
.rules-foot b { color: var(--gold); font-size: 13px; font-weight: 900; }
.rules-foot #rules-next { color: var(--orange-soft); font-weight: 700; text-align: right; }

/* 游戏舞台的星音实机背景 */
.screen-game .stage-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: url("images/gen/rhythm_scene.jpg") center center / cover no-repeat;
  opacity: 0.44;
  filter: saturate(0.95) brightness(0.74) blur(1px);
}
.screen-game .stage-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 6, 12, 0.35) 0%, rgba(8, 6, 12, 0.48) 48%, rgba(8, 6, 12, 0.8) 100%),
    radial-gradient(70% 45% at 50% 88%, rgba(255, 138, 61, 0.16), transparent 70%);
}
.skin-candle .stage-photo { filter: sepia(0.3) saturate(0.9) brightness(0.72) blur(1px); }
.skin-neon .stage-photo { filter: hue-rotate(24deg) saturate(1.15) brightness(0.66) blur(1px); }
.skin-wood .stage-photo { filter: sepia(0.55) saturate(0.8) brightness(0.64) blur(1px); }

/* ============================================================
   首页视觉升级 · 星音实机画面
   ============================================================ */
.screen-home {
  background:
    radial-gradient(90% 48% at 100% -8%, rgba(255, 138, 61, 0.24), transparent 60%),
    radial-gradient(86% 42% at 0% 26%, rgba(124, 91, 255, 0.2), transparent 62%),
    radial-gradient(70% 34% at 54% 0%, rgba(86, 190, 255, 0.12), transparent 66%),
    linear-gradient(180deg, #171020 0%, #100C16 46%, #0C0910 100%);
}
.hero {
  min-height: 312px;
  border-color: rgba(255, 186, 128, 0.18);
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(255, 160, 90, 0.06);
}
.hero::before {
  background:
    linear-gradient(90deg, rgba(8, 6, 13, 0.95) 0%, rgba(8, 6, 13, 0.8) 34%, rgba(8, 6, 13, 0.3) 66%, rgba(8, 6, 13, 0.5) 100%),
    linear-gradient(0deg, rgba(8, 6, 13, 0.93) 0%, rgba(8, 6, 13, 0.2) 52%, transparent 100%),
    url("images/gen/rhythm_scene.jpg") center 62% / cover no-repeat;
  opacity: 1;
  filter: saturate(1.02);
}
.hero::after { opacity: 0.14; }
.hero-art { display: none; }
.hero-copy { max-width: 64%; padding: 26px 20px 22px; z-index: 4; }
.hero h1 { font-size: 40px; text-shadow: 0 6px 22px rgba(255, 122, 44, 0.22), 0 2px 0 rgba(0, 0, 0, 0.2); }
.hero-copy p { color: #D8C8E0; }
.hero-live {
  position: absolute;
  top: 15px;
  right: 14px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  color: #DFF6FF;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  background: rgba(10, 7, 15, 0.5);
  border: 1px solid rgba(180, 230, 255, 0.22);
  box-shadow: 0 0 18px rgba(86, 190, 255, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.hero-live .mp-icon { width: 12px; height: 12px; color: #8DE8FF; }

/* ============================================================
   游戏页贴近实机参考图
   ============================================================ */
.screen-game .stage-photo {
  opacity: 0.62;
  filter: saturate(1.02) brightness(0.8) blur(0.35px);
}
.skin-candle .stage-photo { filter: sepia(0.25) saturate(0.92) brightness(0.74) blur(0.4px); }
.skin-neon .stage-photo { filter: hue-rotate(18deg) saturate(1.16) brightness(0.7) blur(0.4px); }
.skin-wood .stage-photo { filter: sepia(0.5) saturate(0.82) brightness(0.68) blur(0.4px); }
.screen-game .game-shell::before { height: 230px; background: linear-gradient(180deg, rgba(5, 3, 8, 0.96) 0%, rgba(5, 3, 8, 0.68) 56%, rgba(5, 3, 8, 0) 100%); }
.screen-game .lane {
  border-right: 1px solid rgba(190, 226, 255, 0.22);
  box-shadow: inset -10px 0 24px rgba(86, 170, 255, 0.045);
}
.screen-game .lane:last-child { border-right: 0; }
.screen-game .judge-line {
  height: 3px;
  background: linear-gradient(90deg, rgba(160, 225, 255, 0.08), #CFF3FF 18%, #FFF6E2 50%, #CFF3FF 82%, rgba(160, 225, 255, 0.08));
  box-shadow: 0 0 18px rgba(170, 225, 255, 0.85), 0 0 46px rgba(255, 194, 120, 0.35);
}
.screen-game .hud-score b {
  font-size: 29px;
  font-weight: 900;
  color: #FFFDF8;
  text-shadow: 0 2px 16px rgba(255, 164, 93, 0.35), 0 0 26px rgba(255, 220, 170, 0.18);
}
.screen-game .hud-score span { font-size: 7.5px; color: rgba(255, 226, 196, 0.75); }
.screen-game .hud-combo {
  position: absolute;
  top: calc(env(safe-area-inset-top) + 49px);
  left: 50%;
  z-index: 11;
  min-width: 0;
  padding: 0;
  border-radius: 0;
  background: none;
  transform: translateX(-50%);
  text-shadow: 0 0 24px rgba(255, 185, 92, 0.28);
}
.screen-game .hud-combo b {
  font-size: 40px;
  line-height: 0.92;
  color: #FFD27E;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 18px rgba(255, 168, 72, 0.55), 0 2px 0 rgba(74, 34, 0, 0.28);
}
.screen-game .hud-combo span { margin-top: 4px; font-size: 8px; letter-spacing: 0.22em; color: rgba(255, 226, 196, 0.72); }
.screen-game .hud-combo.bump { transform: translateX(-50%) scale(1.12); }
.screen-game .game-title-row { top: calc(env(safe-area-inset-top) + 107px); }
.screen-game .game-progress { top: calc(env(safe-area-inset-top) + 130px); }
.screen-game .game-meta { top: calc(env(safe-area-inset-top) + 141px); }
.screen-game .hint-btn { top: calc(env(safe-area-inset-top) + 162px); }
.screen-game .zen-clock { top: calc(env(safe-area-inset-top) + 162px); }
.screen-game .hint-btn { background: rgba(8, 7, 18, 0.6); border-color: rgba(180, 225, 255, 0.28); }
.screen-game .hint-icon { background: linear-gradient(145deg, #BFEAFF, #7EC8FF); color: #0A2030; }

/* 黑块与长块更贴近参考图的玻璃钢琴块 */
.note.black {
  border-radius: 15px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16) 0%, transparent 22%),
    linear-gradient(150deg, #221C2B 0%, #09070D 56%, #171220 100%);
  border: 1px solid rgba(210, 228, 255, 0.38);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    inset 0 -10px 18px rgba(0, 0, 0, 0.48),
    0 0 16px rgba(160, 208, 255, 0.14),
    0 10px 22px rgba(0, 0, 0, 0.42);
}
.note.black::after { background: linear-gradient(90deg, transparent, rgba(232, 245, 255, 0.72), transparent); }
.note.black .note-dot { background: #FFF0D0; box-shadow: 0 0 12px 4px rgba(255, 188, 92, 0.6); }
.note.long::before {
  left: 50%;
  right: auto;
  top: 46px;
  bottom: 9px;
  width: 3px;
  transform: translateX(-50%);
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #FFF1D0 0%, #FFD37A 42%, #FFA94D 100%);
  box-shadow: 0 0 10px rgba(255, 186, 90, 0.8), 0 0 24px rgba(255, 150, 64, 0.25);
}
.note.long .long-tag { bottom: 9px; color: rgba(255, 238, 210, 0.9); text-shadow: 0 0 8px rgba(255, 170, 70, 0.5); }

/* 底部发光键垫 */
.hit-pads {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: calc(env(safe-area-inset-bottom) + 58px);
  height: 58px;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  pointer-events: none;
}
.hit-pads span {
  position: relative;
  border-radius: 9px;
  border: 1px solid rgba(230, 240, 255, 0.26);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04) 48%, rgba(255, 190, 108, 0.09)),
    rgba(8, 7, 15, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 0 22px rgba(170, 220, 255, 0.1), 0 8px 18px rgba(0, 0, 0, 0.24);
  overflow: hidden;
}
.hit-pads span::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 0;
  height: 42%;
  background: linear-gradient(0deg, rgba(255, 188, 96, 0.2), transparent);
}
.hit-pads span:nth-child(2)::after, .hit-pads span:nth-child(4)::after { background: linear-gradient(0deg, rgba(126, 200, 255, 0.18), transparent); }

@media (max-width: 360px) {
  .hero { min-height: 292px; }
  .hero-copy { max-width: 68%; padding: 22px 17px 19px; }
  .hero h1 { font-size: 35px; }
  .hero-live { right: 10px; top: 12px; }
  .screen-game .hud-combo b { font-size: 36px; }
  .screen-game .hud-combo { top: calc(env(safe-area-inset-top) + 47px); }
}
